mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 15:40:47 +00:00
feat(infisical-pg): test first milestone one flow
This commit is contained in:
@@ -72,7 +72,7 @@ export const completeAccountSignup = async (details: CompleteAccountSignupDTO) =
|
||||
};
|
||||
|
||||
export const completeAccountSignupInvite = async (details: CompleteAccountDTO) => {
|
||||
const { data } = await apiRequest.post("/api/v2/signup/complete-account/invite", details);
|
||||
const { data } = await apiRequest.post("/api/v3/signup/complete-account/invite", details);
|
||||
return data;
|
||||
};
|
||||
|
||||
|
||||
@@ -42,10 +42,10 @@ export const useDeleteIncidentContact = () => {
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
return useMutation<{}, {}, DeleteIncidentContactDTO>({
|
||||
mutationFn: async ({ orgId, email }) => {
|
||||
const { data } = await apiRequest.delete(`/api/v1/organization/${orgId}/incidentContactOrg`, {
|
||||
data: { email }
|
||||
});
|
||||
mutationFn: async ({ orgId, incidentContactId }) => {
|
||||
const { data } = await apiRequest.delete(
|
||||
`/api/v1/organization/${orgId}/incidentContactOrg/${incidentContactId}`
|
||||
);
|
||||
return data;
|
||||
},
|
||||
onSuccess: (_, { orgId }) => {
|
||||
|
||||
@@ -9,7 +9,7 @@ export type IncidentContact = {
|
||||
|
||||
export type DeleteIncidentContactDTO = {
|
||||
orgId: string;
|
||||
email: string;
|
||||
incidentContactId: string;
|
||||
};
|
||||
|
||||
export type AddIncidentContactDTO = {
|
||||
|
||||
@@ -67,13 +67,11 @@ const getUserOrgPermissions = async ({ orgId }: TGetUserOrgPermissionsDTO) => {
|
||||
if (orgId === "") return { permissions: [], membership: null };
|
||||
|
||||
const { data } = await apiRequest.get<{
|
||||
data: {
|
||||
permissions: PackRule<RawRuleOf<MongoAbility<OrgPermissionSet>>>[];
|
||||
membership: OrgUser;
|
||||
};
|
||||
}>(`/api/v1/roles/organization/${orgId}/permissions`);
|
||||
permissions: PackRule<RawRuleOf<MongoAbility<OrgPermissionSet>>>[];
|
||||
membership: OrgUser;
|
||||
}>(`/api/ee/v1/organization/${orgId}/permissions`);
|
||||
|
||||
return data.data;
|
||||
return data;
|
||||
};
|
||||
|
||||
export const useGetUserOrgPermissions = ({ orgId }: TGetUserOrgPermissionsDTO) =>
|
||||
|
||||
Reference in New Issue
Block a user