From 48eeff4674a47da4d1faffc93f44543e909fca01 Mon Sep 17 00:00:00 2001 From: jkoe-cf <152918105+jkoe-cf@users.noreply.github.com> Date: Thu, 12 Sep 2024 09:02:54 -0700 Subject: [PATCH] Not including detail id in wrangler output (#6671) --- .changeset/smooth-bananas-obey.md | 5 +++++ packages/wrangler/src/r2/helpers.ts | 7 +++---- 2 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 .changeset/smooth-bananas-obey.md 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 } );