Skip to content

Commit

Permalink
feat: Update organization settings and organizations to include admin…
Browse files Browse the repository at this point in the history
…_delete_enabled
  • Loading branch information
mzhong9723 committed Jun 5, 2023
1 parent 02f1e29 commit 4207969
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clerk/instances.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,13 @@ type OrganizationSettingsResponse struct {
Object string `json:"object"`
Enabled bool `json:"enabled"`
MaxAllowedMemberships int `json:"max_allowed_memberships"`
AdminDeleteEnabled bool `json:"admin_delete_enabled"`
}

type UpdateOrganizationSettingsParams struct {
Enabled *bool `json:"enabled,omitempty"`
MaxAllowedMemberships *int `json:"max_allowed_memberships,omitempty"`
AdminDeleteEnabled *bool `json:"admin_delete_enabled,omitempty"`
}

func (s *InstanceService) UpdateOrganizationSettings(params UpdateOrganizationSettingsParams) (*OrganizationSettingsResponse, error) {
Expand Down
2 changes: 2 additions & 0 deletions clerk/organizations.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type Organization struct {
ImageURL *string `json:"image_url,omitempty"`
MembersCount *int `json:"members_count,omitempty"`
MaxAllowedMemberships int `json:"max_allowed_memberships"`
AdminDeleteEnabled bool `json:"admin_delete_enabled"`
PublicMetadata json.RawMessage `json:"public_metadata"`
PrivateMetadata json.RawMessage `json:"private_metadata,omitempty"`
CreatedBy string `json:"created_by"`
Expand Down Expand Up @@ -48,6 +49,7 @@ func (s *OrganizationsService) Create(params CreateOrganizationParams) (*Organiz
type UpdateOrganizationParams struct {
Name *string `json:"name,omitempty"`
MaxAllowedMemberships *int `json:"max_allowed_memberships,omitempty"`
AdminDeleteEnabled *bool `json:"admin_delete_enabled,omitempty"`
PublicMetadata json.RawMessage `json:"public_metadata,omitempty"`
PrivateMetadata json.RawMessage `json:"private_metadata,omitempty"`
}
Expand Down

0 comments on commit 4207969

Please sign in to comment.