Merge pull request #2549 from scott-ray-wilson/org-default-role

Feat: Default Org Membership Role
This commit is contained in:
Scott Wilson
2024-10-09 11:55:47 -07:00
committed by GitHub
18 changed files with 383 additions and 56 deletions
@@ -82,12 +82,13 @@ export const useCreateOrg = (options: { invalidate: boolean } = { invalidate: tr
export const useUpdateOrg = () => {
const queryClient = useQueryClient();
return useMutation<{}, {}, UpdateOrgDTO>({
mutationFn: ({ name, authEnforced, scimEnabled, slug, orgId }) => {
mutationFn: ({ name, authEnforced, scimEnabled, slug, orgId, defaultMembershipRoleSlug }) => {
return apiRequest.patch(`/api/v1/organization/${orgId}`, {
name,
authEnforced,
scimEnabled,
slug
slug,
defaultMembershipRoleSlug
});
},
onSuccess: () => {
@@ -10,6 +10,7 @@ export type Organization = {
orgAuthMethod: string;
scimEnabled: boolean;
slug: string;
defaultMembershipRole: string;
};
export type UpdateOrgDTO = {
@@ -18,6 +19,7 @@ export type UpdateOrgDTO = {
authEnforced?: boolean;
scimEnabled?: boolean;
slug?: string;
defaultMembershipRoleSlug?: string;
};
export type BillingDetails = {