Skip to content

Commit

Permalink
fix(backend): Add missing property 'adminDeleteEnabled' in Organizati…
Browse files Browse the repository at this point in the history
…on resource
  • Loading branch information
chanioxaris committed Jul 11, 2023
1 parent 73c9c1d commit 16c3283
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/breezy-fans-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/backend': patch
---

Add missing property 'adminDeleteEnabled' in Organization resource
1 change: 1 addition & 0 deletions packages/backend/src/api/resources/JSON.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ export interface OrganizationJSON extends ClerkResourceJSON {
created_at: number;
updated_at: number;
max_allowed_memberships: number;
admin_delete_enabled: boolean;
}

export interface OrganizationInvitationJSON extends ClerkResourceJSON {
Expand Down
2 changes: 2 additions & 0 deletions packages/backend/src/api/resources/Organization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export class Organization {
readonly publicMetadata: OrganizationPublicMetadata | null = {},
readonly privateMetadata: OrganizationPrivateMetadata = {},
readonly maxAllowedMemberships: number,
readonly adminDeleteEnabled: boolean,
) {}

static fromJSON(data: OrganizationJSON): Organization {
Expand All @@ -28,6 +29,7 @@ export class Organization {
data.public_metadata,
data.private_metadata,
data.max_allowed_memberships,
data.admin_delete_enabled,
);
}
}

0 comments on commit 16c3283

Please sign in to comment.