diff --git a/.changeset/smooth-bananas-obey.md b/.changeset/smooth-bananas-obey.md new file mode 100644 index 000000000000..627945fd495c --- /dev/null +++ b/.changeset/smooth-bananas-obey.md @@ -0,0 +1,5 @@ +--- +"wrangler": patch +--- + +fix: Update R2 Create Event Notification response diff --git a/packages/wrangler/src/r2/helpers.ts b/packages/wrangler/src/r2/helpers.ts index 4515512514ff..33ccbf44aeee 100644 --- a/packages/wrangler/src/r2/helpers.ts +++ b/packages/wrangler/src/r2/helpers.ts @@ -523,8 +523,7 @@ export async function getEventNotificationConfig( /** Construct & transmit notification configuration to EWC. * - * On success, receive HTTP 200 response with a body like: - * { event_notification_detail_id: string } + * On success, receive HTTP 200 response with no body * * Possible status codes on failure: * - 400 Bad Request - Either: @@ -541,7 +540,7 @@ export async function putEventNotificationConfig( eventTypes: R2EventType[], prefix?: string, suffix?: string -): Promise<{ event_notification_detail_id: string }> { +): Promise { const queue = await getQueue(config, queueName); const headers = eventNotificationHeaders(apiCredentials); let actions: R2EventableOperation[] = []; @@ -561,7 +560,7 @@ export async function putEventNotificationConfig( " and " )} (${actions.join(",")})` ); - return await fetchResult<{ event_notification_detail_id: string }>( + return await fetchResult( `/accounts/${accountId}/event_notifications/r2/${bucketName}/configuration/queues/${queue.queue_id}`, { method: "PUT", body: JSON.stringify(body), headers } );