diff --git a/.changeset/nice-games-rule.md b/.changeset/nice-games-rule.md new file mode 100644 index 0000000000..41d7e4a42d --- /dev/null +++ b/.changeset/nice-games-rule.md @@ -0,0 +1,5 @@ +--- +'@clerk/backend': patch +--- + +Fix missing members_count property for an Organization diff --git a/packages/backend/src/api/resources/JSON.ts b/packages/backend/src/api/resources/JSON.ts index 4c5be9fffc..bbbe53c4a6 100644 --- a/packages/backend/src/api/resources/JSON.ts +++ b/packages/backend/src/api/resources/JSON.ts @@ -146,6 +146,7 @@ export interface OrganizationJSON extends ClerkResourceJSON { updated_at: number; max_allowed_memberships: number; admin_delete_enabled: boolean; + members_count?: number; } export interface OrganizationInvitationJSON extends ClerkResourceJSON { diff --git a/packages/backend/src/api/resources/Organization.ts b/packages/backend/src/api/resources/Organization.ts index 7d5172f9ce..ac1dcdc7c1 100644 --- a/packages/backend/src/api/resources/Organization.ts +++ b/packages/backend/src/api/resources/Organization.ts @@ -18,6 +18,7 @@ export class Organization { readonly privateMetadata: OrganizationPrivateMetadata = {}, readonly maxAllowedMemberships: number, readonly adminDeleteEnabled: boolean, + readonly members_count?: number, ) {} static fromJSON(data: OrganizationJSON): Organization { @@ -35,6 +36,7 @@ export class Organization { data.private_metadata, data.max_allowed_memberships, data.admin_delete_enabled, + data.members_count, ); } }