File tree Expand file tree Collapse file tree 4 files changed +9
-4
lines changed
Expand file tree Collapse file tree 4 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @clerk/backend ' : minor
3+ ---
4+
5+ Allow creating organizations without an initial owner to facilitate B2B onboarding flows
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ type CreateParams = {
3131 name : string ;
3232 slug ?: string ;
3333 /* The User id for the user creating the organization. The user will become an administrator for the organization. */
34- createdBy : string ;
34+ createdBy ? : string ;
3535 maxAllowedMemberships ?: number ;
3636} & MetadataParams ;
3737
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ export interface OrganizationJSON extends ClerkResourceJSON {
157157 admin_delete_enabled : boolean ;
158158 public_metadata : OrganizationPublicMetadata | null ;
159159 private_metadata ?: OrganizationPrivateMetadata ;
160- created_by : string ;
160+ created_by ? : string ;
161161 created_at : number ;
162162 updated_at : number ;
163163}
Original file line number Diff line number Diff line change @@ -7,14 +7,14 @@ export class Organization {
77 readonly slug : string | null ,
88 readonly imageUrl : string ,
99 readonly hasImage : boolean ,
10- readonly createdBy : string ,
1110 readonly createdAt : number ,
1211 readonly updatedAt : number ,
1312 readonly publicMetadata : OrganizationPublicMetadata | null = { } ,
1413 readonly privateMetadata : OrganizationPrivateMetadata = { } ,
1514 readonly maxAllowedMemberships : number ,
1615 readonly adminDeleteEnabled : boolean ,
1716 readonly membersCount ?: number ,
17+ readonly createdBy ?: string ,
1818 ) { }
1919
2020 static fromJSON ( data : OrganizationJSON ) : Organization {
@@ -24,14 +24,14 @@ export class Organization {
2424 data . slug ,
2525 data . image_url || '' ,
2626 data . has_image ,
27- data . created_by ,
2827 data . created_at ,
2928 data . updated_at ,
3029 data . public_metadata ,
3130 data . private_metadata ,
3231 data . max_allowed_memberships ,
3332 data . admin_delete_enabled ,
3433 data . members_count ,
34+ data . created_by ,
3535 ) ;
3636 }
3737}
You can’t perform that action at this time.
0 commit comments