From f0ccbd155b8e7c5daa4838ffb8165aeb8d94be02 Mon Sep 17 00:00:00 2001 From: Kenton Duprey Date: Mon, 29 Sep 2025 19:44:04 -0400 Subject: [PATCH] =?UTF-8?q?Revert=20"feat(backend):=20Add=20`user=5Fid`=20?= =?UTF-8?q?field=20to=20`organizationInvitation.accepte=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit ea2bc260fadac8fd7480cd476046f5a06c0d917d. --- .changeset/blue-teeth-report.md | 7 ------- packages/backend/src/api/resources/JSON.ts | 4 ---- packages/backend/src/api/resources/Webhooks.ts | 9 +-------- 3 files changed, 1 insertion(+), 19 deletions(-) delete mode 100644 .changeset/blue-teeth-report.md diff --git a/.changeset/blue-teeth-report.md b/.changeset/blue-teeth-report.md deleted file mode 100644 index 042669feb92..00000000000 --- a/.changeset/blue-teeth-report.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@clerk/backend': minor ---- - -Add `user_id` field to `organizationInvitation.accepted` webhook events. - -Creates a new `OrganizationInvitationAcceptedJSON` interface that extends `OrganizationInvitationJSON` with a required `user_id` field, and updates the webhook type system to use this interface specifically for `organizationInvitation`.accepted events. diff --git a/packages/backend/src/api/resources/JSON.ts b/packages/backend/src/api/resources/JSON.ts index cc67a8c347c..91ddd021239 100644 --- a/packages/backend/src/api/resources/JSON.ts +++ b/packages/backend/src/api/resources/JSON.ts @@ -392,10 +392,6 @@ export interface OrganizationInvitationJSON extends ClerkResourceJSON { expires_at: number; } -export interface OrganizationInvitationAcceptedJSON extends OrganizationInvitationJSON { - user_id: string; -} - /** * @interface */ diff --git a/packages/backend/src/api/resources/Webhooks.ts b/packages/backend/src/api/resources/Webhooks.ts index 16b4d0e1e9c..b208748f1e3 100644 --- a/packages/backend/src/api/resources/Webhooks.ts +++ b/packages/backend/src/api/resources/Webhooks.ts @@ -5,7 +5,6 @@ import type { DeletedObjectJSON, EmailJSON, OrganizationDomainJSON, - OrganizationInvitationAcceptedJSON, OrganizationInvitationJSON, OrganizationJSON, OrganizationMembershipJSON, @@ -53,15 +52,10 @@ export type OrganizationMembershipWebhookEvent = Webhook< >; export type OrganizationInvitationWebhookEvent = Webhook< - 'organizationInvitation.created' | 'organizationInvitation.revoked', + 'organizationInvitation.accepted' | 'organizationInvitation.created' | 'organizationInvitation.revoked', OrganizationInvitationJSON >; -export type OrganizationInvitationAcceptedWebhookEvent = Webhook< - 'organizationInvitation.accepted', - OrganizationInvitationAcceptedJSON ->; - export type RoleWebhookEvent = Webhook<'role.created' | 'role.updated' | 'role.deleted', RoleJSON>; export type PermissionWebhookEvent = Webhook< @@ -104,7 +98,6 @@ export type WebhookEvent = | OrganizationDomainWebhookEvent | OrganizationMembershipWebhookEvent | OrganizationInvitationWebhookEvent - | OrganizationInvitationAcceptedWebhookEvent | RoleWebhookEvent | PermissionWebhookEvent | WaitlistEntryWebhookEvent