feat: default org membership role

This commit is contained in:
Scott Wilson
2024-10-07 15:02:14 -07:00
parent 56798f09bf
commit eae5e57346
17 changed files with 367 additions and 54 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 = {