mirror of
https://github.com/luxfi/kms.git
synced 2026-07-27 05:54:18 +00:00
kms-ui: /v1-only API — drop the /api/ prefix from all KMS call-sites
House rule: no /api/ prefix, never bump past v1. Converts every KMS frontend API call (/api/v1/... -> /v1/...) and self-referencing URLs (Slack OAuth, MCP connect, CRL, SCIM, SSH-CA). The backend already serves /v1. External third-party URLs (Datadog /api/v2/logs) left untouched. vite build green. (de-Infisical already landed on main.)
This commit is contained in:
@@ -71,7 +71,7 @@ export const useUpdateAccessApprovalPolicy = () => {
|
||||
environments,
|
||||
maxTimePeriod
|
||||
}) => {
|
||||
const { data } = await apiRequest.patch(`/api/v1/access-approvals/policies/${id}`, {
|
||||
const { data } = await apiRequest.patch(`/v1/access-approvals/policies/${id}`, {
|
||||
approvals,
|
||||
approvers,
|
||||
bypassers,
|
||||
@@ -98,7 +98,7 @@ export const useDeleteAccessApprovalPolicy = () => {
|
||||
|
||||
return useMutation<object, object, TDeleteSecretPolicyDTO>({
|
||||
mutationFn: async ({ id }) => {
|
||||
const { data } = await apiRequest.delete(`/api/v1/access-approvals/policies/${id}`);
|
||||
const { data } = await apiRequest.delete(`/v1/access-approvals/policies/${id}`);
|
||||
return data;
|
||||
},
|
||||
onSuccess: (_, { projectSlug }) => {
|
||||
@@ -141,7 +141,7 @@ export const useUpdateAccessRequest = () => {
|
||||
return useMutation<TAccessApprovalRequest, object, TUpdateAccessRequestDTO>({
|
||||
mutationFn: async ({ requestId, ...payload }) => {
|
||||
const { data } = await apiRequest.patch<{ approval: TAccessApprovalRequest }>(
|
||||
`/api/v1/access-approvals/requests/${requestId}`,
|
||||
`/v1/access-approvals/requests/${requestId}`,
|
||||
payload
|
||||
);
|
||||
|
||||
@@ -171,7 +171,7 @@ export const useReviewAccessRequest = () => {
|
||||
>({
|
||||
mutationFn: async ({ requestId, status, bypassReason }) => {
|
||||
const { data } = await apiRequest.post(
|
||||
`/api/v1/access-approvals/requests/${requestId}/review`,
|
||||
`/v1/access-approvals/requests/${requestId}/review`,
|
||||
{
|
||||
status,
|
||||
bypassReason
|
||||
|
||||
@@ -59,7 +59,7 @@ export const useAdminDeleteUser = () => {
|
||||
const queryClient = useQueryClient();
|
||||
return useMutation({
|
||||
mutationFn: async (userId: string) => {
|
||||
await apiRequest.delete(`/api/v1/admin/user-management/users/${userId}`);
|
||||
await apiRequest.delete(`/v1/admin/user-management/users/${userId}`);
|
||||
|
||||
return {};
|
||||
},
|
||||
@@ -96,7 +96,7 @@ export const useAdminDeleteOrganizationMembership = () => {
|
||||
return useMutation<object, object, { organizationId: string; membershipId: string }>({
|
||||
mutationFn: async ({ organizationId, membershipId }) => {
|
||||
await apiRequest.delete(
|
||||
`/api/v1/admin/organization-management/organizations/${organizationId}/memberships/${membershipId}`
|
||||
`/v1/admin/organization-management/organizations/${organizationId}/memberships/${membershipId}`
|
||||
);
|
||||
|
||||
return {};
|
||||
@@ -114,7 +114,7 @@ export const useAdminDeleteOrganization = () => {
|
||||
return useMutation({
|
||||
mutationFn: async (organizationId: string) => {
|
||||
await apiRequest.delete(
|
||||
`/api/v1/admin/organization-management/organizations/${organizationId}`
|
||||
`/v1/admin/organization-management/organizations/${organizationId}`
|
||||
);
|
||||
},
|
||||
onSuccess: () => {
|
||||
@@ -130,7 +130,7 @@ export const useAdminRemoveIdentitySuperAdminAccess = () => {
|
||||
return useMutation({
|
||||
mutationFn: async (identityId: string) => {
|
||||
await apiRequest.delete(
|
||||
`/api/v1/admin/identity-management/identities/${identityId}/super-admin-access`
|
||||
`/v1/admin/identity-management/identities/${identityId}/super-admin-access`
|
||||
);
|
||||
|
||||
return {};
|
||||
@@ -147,7 +147,7 @@ export const useRemoveUserServerAdminAccess = () => {
|
||||
const queryClient = useQueryClient();
|
||||
return useMutation({
|
||||
mutationFn: async (userId: string) => {
|
||||
await apiRequest.delete(`/api/v1/admin/user-management/users/${userId}/admin-access`);
|
||||
await apiRequest.delete(`/v1/admin/user-management/users/${userId}/admin-access`);
|
||||
|
||||
return {};
|
||||
},
|
||||
@@ -163,7 +163,7 @@ export const useAdminGrantServerAdminAccess = () => {
|
||||
const queryClient = useQueryClient();
|
||||
return useMutation({
|
||||
mutationFn: async (userId: string) => {
|
||||
await apiRequest.patch(`/api/v1/admin/user-management/users/${userId}/admin-access`);
|
||||
await apiRequest.patch(`/v1/admin/user-management/users/${userId}/admin-access`);
|
||||
return {};
|
||||
},
|
||||
onSuccess: () => {
|
||||
@@ -219,7 +219,7 @@ export const useServerAdminResendOrgInvite = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ organizationId, membershipId }: TResendOrgInviteDTO) => {
|
||||
await apiRequest.post(
|
||||
`/api/v1/admin/organization-management/organizations/${organizationId}/memberships/${membershipId}/resend-invite`
|
||||
`/v1/admin/organization-management/organizations/${organizationId}/memberships/${membershipId}/resend-invite`
|
||||
);
|
||||
}
|
||||
});
|
||||
@@ -231,7 +231,7 @@ export const useServerAdminAccessOrg = () => {
|
||||
return useMutation({
|
||||
mutationFn: async (orgId: string) => {
|
||||
const { data } = await apiRequest.post(
|
||||
`/api/v1/admin/organization-management/organizations/${orgId}/access`
|
||||
`/v1/admin/organization-management/organizations/${orgId}/access`
|
||||
);
|
||||
return data;
|
||||
},
|
||||
|
||||
@@ -44,7 +44,7 @@ export const useUpdateAiMcpEndpoint = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ endpointId, ...dto }: TUpdateAiMcpEndpointDTO) => {
|
||||
const { data } = await apiRequest.patch<{ endpoint: TAiMcpEndpoint }>(
|
||||
`/api/v1/ai/mcp/endpoints/${endpointId}`,
|
||||
`/v1/ai/mcp/endpoints/${endpointId}`,
|
||||
dto
|
||||
);
|
||||
return data.endpoint;
|
||||
@@ -66,7 +66,7 @@ export const useDeleteAiMcpEndpoint = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ endpointId }: TDeleteAiMcpEndpointDTO) => {
|
||||
const { data } = await apiRequest.delete<{ endpoint: TAiMcpEndpoint }>(
|
||||
`/api/v1/ai/mcp/endpoints/${endpointId}`
|
||||
`/v1/ai/mcp/endpoints/${endpointId}`
|
||||
);
|
||||
return data.endpoint;
|
||||
},
|
||||
@@ -84,7 +84,7 @@ export const useEnableEndpointTool = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ endpointId, serverToolId }: TEnableEndpointToolDTO) => {
|
||||
const { data } = await apiRequest.post<{ tool: TAiMcpEndpointToolConfig }>(
|
||||
`/api/v1/ai/mcp/endpoints/${endpointId}/tools/${serverToolId}`
|
||||
`/v1/ai/mcp/endpoints/${endpointId}/tools/${serverToolId}`
|
||||
);
|
||||
return data.tool;
|
||||
},
|
||||
@@ -101,7 +101,7 @@ export const useDisableEndpointTool = () => {
|
||||
|
||||
return useMutation({
|
||||
mutationFn: async ({ endpointId, serverToolId }: TDisableEndpointToolDTO) => {
|
||||
await apiRequest.delete(`/api/v1/ai/mcp/endpoints/${endpointId}/tools/${serverToolId}`);
|
||||
await apiRequest.delete(`/v1/ai/mcp/endpoints/${endpointId}/tools/${serverToolId}`);
|
||||
},
|
||||
onSuccess: (_, variables) => {
|
||||
queryClient.invalidateQueries({
|
||||
@@ -117,7 +117,7 @@ export const useBulkUpdateEndpointTools = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ endpointId, tools }: TBulkUpdateEndpointToolsDTO) => {
|
||||
const { data } = await apiRequest.patch<{ tools: TAiMcpEndpointToolConfig[] }>(
|
||||
`/api/v1/ai/mcp/endpoints/${endpointId}/tools/bulk`,
|
||||
`/v1/ai/mcp/endpoints/${endpointId}/tools/bulk`,
|
||||
{ tools }
|
||||
);
|
||||
return data.tools;
|
||||
@@ -134,7 +134,7 @@ export const useFinalizeMcpEndpointOAuth = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ endpointId, ...body }: TFinalizeMcpEndpointOAuthDTO) => {
|
||||
const { data } = await apiRequest.post<{ callbackUrl: string }>(
|
||||
`/api/v1/ai/mcp/endpoints/${endpointId}/oauth/finalize`,
|
||||
`/v1/ai/mcp/endpoints/${endpointId}/oauth/finalize`,
|
||||
body
|
||||
);
|
||||
return data;
|
||||
@@ -146,7 +146,7 @@ export const useInitiateServerOAuth = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ endpointId, serverId }: TInitiateServerOAuthDTO) => {
|
||||
const { data } = await apiRequest.post<{ authUrl: string; sessionId: string }>(
|
||||
`/api/v1/ai/mcp/endpoints/${endpointId}/servers/${serverId}/oauth/initiate`
|
||||
`/v1/ai/mcp/endpoints/${endpointId}/servers/${serverId}/oauth/initiate`
|
||||
);
|
||||
return data;
|
||||
}
|
||||
@@ -157,7 +157,7 @@ export const useVerifyServerBearerToken = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ endpointId, serverId, accessToken }: TVerifyServerBearerTokenDTO) => {
|
||||
const { data } = await apiRequest.post<TVerifyServerBearerTokenResponse>(
|
||||
`/api/v1/ai/mcp/endpoints/${endpointId}/servers/${serverId}/verify-token`,
|
||||
`/v1/ai/mcp/endpoints/${endpointId}/servers/${serverId}/verify-token`,
|
||||
{ accessToken }
|
||||
);
|
||||
return data;
|
||||
@@ -171,7 +171,7 @@ export const useSaveUserServerCredential = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ endpointId, serverId, ...body }: TSaveUserServerCredentialDTO) => {
|
||||
const { data } = await apiRequest.post<{ success: boolean }>(
|
||||
`/api/v1/ai/mcp/endpoints/${endpointId}/servers/${serverId}/credentials`,
|
||||
`/v1/ai/mcp/endpoints/${endpointId}/servers/${serverId}/credentials`,
|
||||
body
|
||||
);
|
||||
return data;
|
||||
|
||||
@@ -40,7 +40,7 @@ export const useGetAiMcpEndpointById = ({ endpointId }: { endpointId: string })
|
||||
queryKey: aiMcpEndpointKeys.byId(endpointId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{ endpoint: TAiMcpEndpointWithServerIds }>(
|
||||
`/api/v1/ai/mcp/endpoints/${endpointId}`
|
||||
`/v1/ai/mcp/endpoints/${endpointId}`
|
||||
);
|
||||
return data.endpoint;
|
||||
},
|
||||
@@ -53,7 +53,7 @@ export const useListEndpointTools = ({ endpointId }: { endpointId: string }) =>
|
||||
queryKey: aiMcpEndpointKeys.tools(endpointId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{ tools: TAiMcpEndpointToolConfig[] }>(
|
||||
`/api/v1/ai/mcp/endpoints/${endpointId}/tools`
|
||||
`/v1/ai/mcp/endpoints/${endpointId}/tools`
|
||||
);
|
||||
return data.tools;
|
||||
},
|
||||
@@ -66,7 +66,7 @@ export const useGetServersRequiringAuth = ({ endpointId }: { endpointId: string
|
||||
queryKey: aiMcpEndpointKeys.serversRequiringAuth(endpointId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{ servers: TServerAuthStatus[] }>(
|
||||
`/api/v1/ai/mcp/endpoints/${endpointId}/servers-requiring-auth`
|
||||
`/v1/ai/mcp/endpoints/${endpointId}/servers-requiring-auth`
|
||||
);
|
||||
return data.servers;
|
||||
},
|
||||
|
||||
@@ -39,7 +39,7 @@ export const useUpdateAiMcpServer = () => {
|
||||
mutationFn: async ({ serverId, ...data }) => {
|
||||
const { data: response } = await apiRequest.patch<{
|
||||
server: TAiMcpServer;
|
||||
}>(`/api/v1/ai/mcp/servers/${serverId}`, data);
|
||||
}>(`/v1/ai/mcp/servers/${serverId}`, data);
|
||||
return response.server;
|
||||
},
|
||||
onSuccess: (server, { serverId }) => {
|
||||
@@ -60,7 +60,7 @@ export const useDeleteAiMcpServer = () => {
|
||||
mutationFn: async ({ serverId }) => {
|
||||
const { data: response } = await apiRequest.delete<{
|
||||
server: TAiMcpServer;
|
||||
}>(`/api/v1/ai/mcp/servers/${serverId}`);
|
||||
}>(`/v1/ai/mcp/servers/${serverId}`);
|
||||
return response.server;
|
||||
},
|
||||
onSuccess: (server, { serverId }) => {
|
||||
@@ -93,7 +93,7 @@ export const useSyncAiMcpServerTools = () => {
|
||||
mutationFn: async ({ serverId }) => {
|
||||
const { data: response } = await apiRequest.post<{
|
||||
tools: TAiMcpServerTool[];
|
||||
}>(`/api/v1/ai/mcp/servers/${serverId}/tools/sync`);
|
||||
}>(`/v1/ai/mcp/servers/${serverId}/tools/sync`);
|
||||
return response;
|
||||
},
|
||||
onSuccess: (_, { serverId }) => {
|
||||
|
||||
@@ -48,7 +48,7 @@ export const useGetAiMcpServerById = (
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{
|
||||
server: TAiMcpServer;
|
||||
}>(`/api/v1/ai/mcp/servers/${serverId}`);
|
||||
}>(`/v1/ai/mcp/servers/${serverId}`);
|
||||
return data.server;
|
||||
},
|
||||
enabled: Boolean(serverId),
|
||||
@@ -62,7 +62,7 @@ export const useListAiMcpServerTools = ({ serverId }: TListAiMcpServerToolsDTO)
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{
|
||||
tools: TAiMcpServerTool[];
|
||||
}>(`/api/v1/ai/mcp/servers/${serverId}/tools`);
|
||||
}>(`/v1/ai/mcp/servers/${serverId}/tools`);
|
||||
return data;
|
||||
},
|
||||
enabled: Boolean(serverId)
|
||||
@@ -77,7 +77,7 @@ export const useGetOAuthStatus = (
|
||||
queryKey: aiMcpServerKeys.oauthStatus(sessionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TOAuthStatusResponse>(
|
||||
`/api/v1/ai/mcp/servers/oauth/status/${sessionId}`
|
||||
`/v1/ai/mcp/servers/oauth/status/${sessionId}`
|
||||
);
|
||||
return data;
|
||||
},
|
||||
|
||||
@@ -33,7 +33,7 @@ export const useUpdateAPIKeyV2 = () => {
|
||||
mutationFn: async ({ apiKeyDataId, name }) => {
|
||||
const {
|
||||
data: { apiKeyData }
|
||||
} = await apiRequest.patch(`/api/v3/api-key/${apiKeyDataId}`, {
|
||||
} = await apiRequest.patch(`/v3/api-key/${apiKeyDataId}`, {
|
||||
name
|
||||
});
|
||||
return apiKeyData;
|
||||
@@ -50,7 +50,7 @@ export const useDeleteAPIKeyV2 = () => {
|
||||
mutationFn: async ({ apiKeyDataId }) => {
|
||||
const {
|
||||
data: { apiKeyData }
|
||||
} = await apiRequest.delete(`/api/v3/api-key/${apiKeyDataId}`);
|
||||
} = await apiRequest.delete(`/v3/api-key/${apiKeyDataId}`);
|
||||
return apiKeyData;
|
||||
},
|
||||
onSuccess: () => {
|
||||
|
||||
@@ -27,7 +27,7 @@ export const useOnePassConnectionListVaults = (
|
||||
queryKey: onePassConnectionKeys.listVaults(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TOnePassVault[]>(
|
||||
`/api/v1/app-connections/1password/${connectionId}/vaults`
|
||||
`/v1/app-connections/1password/${connectionId}/vaults`
|
||||
);
|
||||
|
||||
return data;
|
||||
|
||||
@@ -27,7 +27,7 @@ export const useAuth0ConnectionListClients = (
|
||||
queryKey: auth0ConnectionKeys.listClients(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{ clients: TAuth0Client[] }>(
|
||||
`/api/v1/app-connections/auth0/${connectionId}/clients`
|
||||
`/v1/app-connections/auth0/${connectionId}/clients`
|
||||
);
|
||||
|
||||
return data.clients;
|
||||
|
||||
@@ -36,7 +36,7 @@ export const useListAwsConnectionKmsKeys = (
|
||||
queryKey: awsConnectionKeys.listKmsKeys({ connectionId, ...params }),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TAwsConnectionListKmsKeysResponse>(
|
||||
`/api/v1/app-connections/aws/${connectionId}/kms-keys`,
|
||||
`/v1/app-connections/aws/${connectionId}/kms-keys`,
|
||||
{ params }
|
||||
);
|
||||
|
||||
@@ -62,7 +62,7 @@ export const useListAwsConnectionIamUsers = (
|
||||
queryKey: awsConnectionKeys.listIamUsers({ connectionId }),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TAwsConnectionListIamUsersResponse>(
|
||||
`/api/v1/app-connections/aws/${connectionId}/users`
|
||||
`/v1/app-connections/aws/${connectionId}/users`
|
||||
);
|
||||
|
||||
return data.iamUsers;
|
||||
|
||||
@@ -29,7 +29,7 @@ export const useAzureConnectionListClients = (
|
||||
queryKey: azureConnectionKeys.listClients(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{ clients: TAzureClient[] }>(
|
||||
`/api/v1/app-connections/azure-client-secrets/${connectionId}/clients`
|
||||
`/v1/app-connections/azure-client-secrets/${connectionId}/clients`
|
||||
);
|
||||
|
||||
return data.clients;
|
||||
@@ -46,7 +46,7 @@ export const fetchAzureDevOpsProjects = async (
|
||||
}
|
||||
|
||||
const { data } = await apiRequest.get<AzureDevOpsProjectsResponse>(
|
||||
`/api/v1/app-connections/azure-devops/${connectionId}/projects`
|
||||
`/v1/app-connections/azure-devops/${connectionId}/projects`
|
||||
);
|
||||
|
||||
return data;
|
||||
|
||||
@@ -38,7 +38,7 @@ export const useBitbucketConnectionListWorkspaces = (
|
||||
queryKey: bitbucketConnectionKeys.listWorkspaces(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TBitbucketConnectionListWorkspacesResponse>(
|
||||
`/api/v1/app-connections/bitbucket/${connectionId}/workspaces`
|
||||
`/v1/app-connections/bitbucket/${connectionId}/workspaces`
|
||||
);
|
||||
|
||||
return data.workspaces;
|
||||
@@ -64,7 +64,7 @@ export const useBitbucketConnectionListRepositories = (
|
||||
queryKey: bitbucketConnectionKeys.listRepos(connectionId, workspaceSlug),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TBitbucketConnectionListRepositoriesResponse>(
|
||||
`/api/v1/app-connections/bitbucket/${connectionId}/repositories?workspaceSlug=${encodeURIComponent(workspaceSlug)}`
|
||||
`/v1/app-connections/bitbucket/${connectionId}/repositories?workspaceSlug=${encodeURIComponent(workspaceSlug)}`
|
||||
);
|
||||
|
||||
return data.repositories;
|
||||
@@ -91,7 +91,7 @@ export const useBitbucketConnectionListEnvironments = (
|
||||
queryKey: bitbucketConnectionKeys.listEnvironments(connectionId, workspaceSlug, repoSlug),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TBitbucketConnectionListEnvironmentsResponse>(
|
||||
`/api/v1/app-connections/bitbucket/${connectionId}/environments?workspaceSlug=${encodeURIComponent(workspaceSlug)}&repositorySlug=${encodeURIComponent(repoSlug)}`
|
||||
`/v1/app-connections/bitbucket/${connectionId}/environments?workspaceSlug=${encodeURIComponent(workspaceSlug)}&repositorySlug=${encodeURIComponent(repoSlug)}`
|
||||
);
|
||||
|
||||
return data.environments;
|
||||
|
||||
@@ -27,7 +27,7 @@ export const useCamundaConnectionListClusters = (
|
||||
queryKey: camundaConnectionKeys.listClusters(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{ clusters: TCamundaCluster[] }>(
|
||||
`/api/v1/app-connections/camunda/${connectionId}/clusters`
|
||||
`/v1/app-connections/camunda/${connectionId}/clusters`
|
||||
);
|
||||
|
||||
return data.clusters;
|
||||
|
||||
@@ -29,7 +29,7 @@ export const useChecklyConnectionListAccounts = (
|
||||
queryKey: checklyConnectionKeys.listAccounts(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{ accounts: TChecklyAccount[] }>(
|
||||
`/api/v1/app-connections/checkly/${connectionId}/accounts`
|
||||
`/v1/app-connections/checkly/${connectionId}/accounts`
|
||||
);
|
||||
|
||||
return data.accounts;
|
||||
@@ -55,7 +55,7 @@ export const useChecklyConnectionListGroups = (
|
||||
queryKey: checklyConnectionKeys.listGroups(connectionId, accountId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{ groups: TChecklyAccount[] }>(
|
||||
`/api/v1/app-connections/checkly/${connectionId}/accounts/${accountId}/groups`
|
||||
`/v1/app-connections/checkly/${connectionId}/accounts/${accountId}/groups`
|
||||
);
|
||||
|
||||
return data.groups;
|
||||
|
||||
@@ -29,7 +29,7 @@ export const useChefConnectionListDataBags = (
|
||||
queryKey: chefConnectionKeys.listDataBags(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TChefDataBag[]>(
|
||||
`/api/v1/app-connections/chef/${connectionId}/data-bags`
|
||||
`/v1/app-connections/chef/${connectionId}/data-bags`
|
||||
);
|
||||
|
||||
return data;
|
||||
@@ -56,7 +56,7 @@ export const useChefConnectionListDataBagItems = (
|
||||
queryFn: async () => {
|
||||
const params = { dataBagName };
|
||||
const { data } = await apiRequest.get<TChefDataBagItem[]>(
|
||||
`/api/v1/app-connections/chef/${connectionId}/data-bag-items`,
|
||||
`/v1/app-connections/chef/${connectionId}/data-bag-items`,
|
||||
{ params }
|
||||
);
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ export const useCloudflareConnectionListPagesProjects = (
|
||||
queryKey: cloudflareConnectionKeys.listPagesProjects(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TCloudflarePagesProject[]>(
|
||||
`/api/v1/app-connections/cloudflare/${connectionId}/cloudflare-pages-projects`
|
||||
`/v1/app-connections/cloudflare/${connectionId}/cloudflare-pages-projects`
|
||||
);
|
||||
|
||||
return data;
|
||||
@@ -56,7 +56,7 @@ export const useCloudflareConnectionListWorkersScripts = (
|
||||
queryKey: cloudflareConnectionKeys.listWorkersScripts(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TCloudflareWorkersScript[]>(
|
||||
`/api/v1/app-connections/cloudflare/${connectionId}/cloudflare-workers-scripts`
|
||||
`/v1/app-connections/cloudflare/${connectionId}/cloudflare-workers-scripts`
|
||||
);
|
||||
|
||||
return data;
|
||||
@@ -81,7 +81,7 @@ export const useCloudflareConnectionListZones = (
|
||||
queryKey: cloudflareConnectionKeys.listZones(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TCloudflareZone[]>(
|
||||
`/api/v1/app-connections/cloudflare/${connectionId}/cloudflare-zones`
|
||||
`/v1/app-connections/cloudflare/${connectionId}/cloudflare-zones`
|
||||
);
|
||||
|
||||
return data;
|
||||
|
||||
@@ -34,7 +34,7 @@ export const useDatabricksConnectionListSecretScopes = (
|
||||
queryKey: databricksConnectionKeys.listSecretScopes(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TDatabricksConnectionListSecretScopesResponse>(
|
||||
`/api/v1/app-connections/databricks/${connectionId}/secret-scopes`
|
||||
`/v1/app-connections/databricks/${connectionId}/secret-scopes`
|
||||
);
|
||||
|
||||
return data.secretScopes;
|
||||
@@ -59,7 +59,7 @@ export const useDatabricksConnectionListServicePrincipals = (
|
||||
queryKey: databricksConnectionKeys.listServicePrincipals(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TDatabricksConnectionListServicePrincipalsResponse>(
|
||||
`/api/v1/app-connections/databricks/${connectionId}/service-principals`
|
||||
`/v1/app-connections/databricks/${connectionId}/service-principals`
|
||||
);
|
||||
|
||||
return data.servicePrincipals;
|
||||
|
||||
@@ -27,7 +27,7 @@ export const useDigitalOceanConnectionListApps = (
|
||||
queryKey: digitalOceanAppPlatformConnectionKeys.listAccounts(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{ apps: TDigitalOceanApp[] }>(
|
||||
`/api/v1/app-connections/digital-ocean/${connectionId}/apps`
|
||||
`/v1/app-connections/digital-ocean/${connectionId}/apps`
|
||||
);
|
||||
|
||||
return data.apps;
|
||||
|
||||
@@ -27,7 +27,7 @@ export const useDNSMadeEasyConnectionListZones = (
|
||||
queryKey: dnsMadeEasyConnectionKeys.listZones(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TDNSMadeEasyZone[]>(
|
||||
`/api/v1/app-connections/dns-made-easy/${connectionId}/dns-made-easy-zones`
|
||||
`/v1/app-connections/dns-made-easy/${connectionId}/dns-made-easy-zones`
|
||||
);
|
||||
|
||||
return data;
|
||||
|
||||
@@ -26,7 +26,7 @@ export const useFlyioConnectionListApps = (
|
||||
queryKey: flyioConnectionKeys.listApps(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TFlyioApp[]>(
|
||||
`/api/v1/app-connections/flyio/${connectionId}/apps`
|
||||
`/v1/app-connections/flyio/${connectionId}/apps`
|
||||
);
|
||||
|
||||
return data;
|
||||
|
||||
@@ -29,7 +29,7 @@ export const useGcpConnectionListProjects = (
|
||||
queryKey: gcpConnectionKeys.listProjects(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TGcpProject[]>(
|
||||
`/api/v1/app-connections/gcp/${connectionId}/secret-manager-projects`
|
||||
`/v1/app-connections/gcp/${connectionId}/secret-manager-projects`
|
||||
);
|
||||
|
||||
return data;
|
||||
@@ -54,7 +54,7 @@ export const useGcpConnectionListProjectLocations = (
|
||||
queryKey: gcpConnectionKeys.listProjectLocations({ connectionId, projectId }),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TGcpLocation[]>(
|
||||
`/api/v1/app-connections/gcp/${connectionId}/secret-manager-project-locations`,
|
||||
`/v1/app-connections/gcp/${connectionId}/secret-manager-project-locations`,
|
||||
{ params: { projectId } }
|
||||
);
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ export const useGitHubRadarConnectionListRepositories = (
|
||||
queryKey: githubRadarConnectionKeys.listRepositories(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TGitHubRadarConnectionListRepositoriesResponse>(
|
||||
`/api/v1/app-connections/github-radar/${connectionId}/repositories`
|
||||
`/v1/app-connections/github-radar/${connectionId}/repositories`
|
||||
);
|
||||
|
||||
return data.repositories;
|
||||
|
||||
@@ -39,7 +39,7 @@ export const useGitHubConnectionListRepositories = (
|
||||
queryKey: githubConnectionKeys.listRepositories(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TGitHubConnectionListRepositoriesResponse>(
|
||||
`/api/v1/app-connections/github/${connectionId}/repositories`
|
||||
`/v1/app-connections/github/${connectionId}/repositories`
|
||||
);
|
||||
|
||||
return data.repositories;
|
||||
@@ -64,7 +64,7 @@ export const useGitHubConnectionListOrganizations = (
|
||||
queryKey: githubConnectionKeys.listOrganizations(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TGitHubConnectionListOrganizationsResponse>(
|
||||
`/api/v1/app-connections/github/${connectionId}/organizations`
|
||||
`/v1/app-connections/github/${connectionId}/organizations`
|
||||
);
|
||||
|
||||
return data.organizations;
|
||||
@@ -89,7 +89,7 @@ export const useGitHubConnectionListEnvironments = (
|
||||
queryKey: githubConnectionKeys.listEnvironments({ connectionId, repo, owner }),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TGitHubConnectionListEnvironmentsResponse>(
|
||||
`/api/v1/app-connections/github/${connectionId}/environments`,
|
||||
`/v1/app-connections/github/${connectionId}/environments`,
|
||||
{
|
||||
params: {
|
||||
repo,
|
||||
|
||||
@@ -29,7 +29,7 @@ export const useGitLabConnectionListProjects = (
|
||||
queryKey: gitlabConnectionKeys.listProjects(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TGitLabProject[]>(
|
||||
`/api/v1/app-connections/gitlab/${connectionId}/projects`
|
||||
`/v1/app-connections/gitlab/${connectionId}/projects`
|
||||
);
|
||||
|
||||
return data;
|
||||
@@ -54,7 +54,7 @@ export const useGitLabConnectionListGroups = (
|
||||
queryKey: gitlabConnectionKeys.listGroups(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TGitLabGroup[]>(
|
||||
`/api/v1/app-connections/gitlab/${connectionId}/groups`
|
||||
`/v1/app-connections/gitlab/${connectionId}/groups`
|
||||
);
|
||||
|
||||
return data;
|
||||
|
||||
@@ -26,7 +26,7 @@ export const useHCVaultConnectionListMounts = (
|
||||
queryKey: hcVaultConnectionKeys.listMounts(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<string[]>(
|
||||
`/api/v1/app-connections/hashicorp-vault/${connectionId}/mounts`
|
||||
`/v1/app-connections/hashicorp-vault/${connectionId}/mounts`
|
||||
);
|
||||
|
||||
return data;
|
||||
|
||||
@@ -26,7 +26,7 @@ export const useHerokuConnectionListApps = (
|
||||
queryKey: herokuConnectionKeys.listApps(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<THerokuApp[]>(
|
||||
`/api/v1/app-connections/heroku/${connectionId}/apps`
|
||||
`/v1/app-connections/heroku/${connectionId}/apps`
|
||||
);
|
||||
|
||||
return data;
|
||||
|
||||
@@ -27,7 +27,7 @@ export const useHumanitecConnectionListOrganizations = (
|
||||
queryKey: humanitecConnectionKeys.listOrganizations(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<THumanitecOrganization[]>(
|
||||
`/api/v1/app-connections/humanitec/${connectionId}/organizations`
|
||||
`/v1/app-connections/humanitec/${connectionId}/organizations`
|
||||
);
|
||||
|
||||
return data;
|
||||
|
||||
@@ -31,7 +31,7 @@ export const useLaravelForgeConnectionListOrganizations = (
|
||||
queryKey: laravelForgeConnectionKeys.listOrganizations(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TLaravelForgeOrganization[]>(
|
||||
`/api/v1/app-connections/laravel-forge/${connectionId}/organizations`
|
||||
`/v1/app-connections/laravel-forge/${connectionId}/organizations`
|
||||
);
|
||||
|
||||
return data;
|
||||
@@ -58,7 +58,7 @@ export const useLaravelForgeConnectionListServers = (
|
||||
queryFn: async () => {
|
||||
const params = { organizationSlug };
|
||||
const { data } = await apiRequest.get<TLaravelForgeServer[]>(
|
||||
`/api/v1/app-connections/laravel-forge/${connectionId}/servers`,
|
||||
`/v1/app-connections/laravel-forge/${connectionId}/servers`,
|
||||
{ params }
|
||||
);
|
||||
|
||||
@@ -92,7 +92,7 @@ export const useLaravelForgeConnectionListSites = (
|
||||
};
|
||||
|
||||
const { data } = await apiRequest.get<TLaravelForgeSite[]>(
|
||||
`/api/v1/app-connections/laravel-forge/${connectionId}/sites`,
|
||||
`/v1/app-connections/laravel-forge/${connectionId}/sites`,
|
||||
{ params }
|
||||
);
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ export const useCreateAppConnection = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ app, ...params }: TCreateAppConnectionDTO) => {
|
||||
const { data } = await apiRequest.post<TAppConnectionResponse>(
|
||||
`/api/v1/app-connections/${app}`,
|
||||
`/v1/app-connections/${app}`,
|
||||
params
|
||||
);
|
||||
|
||||
@@ -32,7 +32,7 @@ export const useUpdateAppConnection = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ connectionId, app, ...params }: TUpdateAppConnectionDTO) => {
|
||||
const { data } = await apiRequest.patch<TAppConnectionResponse>(
|
||||
`/api/v1/app-connections/${app}/${connectionId}`,
|
||||
`/v1/app-connections/${app}/${connectionId}`,
|
||||
params
|
||||
);
|
||||
|
||||
@@ -50,7 +50,7 @@ export const useDeleteAppConnection = () => {
|
||||
const queryClient = useQueryClient();
|
||||
return useMutation({
|
||||
mutationFn: async ({ connectionId, app }: TDeleteAppConnectionDTO) => {
|
||||
const { data } = await apiRequest.delete(`/api/v1/app-connections/${app}/${connectionId}`);
|
||||
const { data } = await apiRequest.delete(`/v1/app-connections/${app}/${connectionId}`);
|
||||
|
||||
return data;
|
||||
},
|
||||
|
||||
@@ -29,7 +29,7 @@ export const useNetlifyConnectionListAccounts = (
|
||||
queryKey: netlifyConnectionKeys.listAccounts(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{ accounts: TNetlifyAccount[] }>(
|
||||
`/api/v1/app-connections/netlify/${connectionId}/accounts`
|
||||
`/v1/app-connections/netlify/${connectionId}/accounts`
|
||||
);
|
||||
|
||||
return data.accounts;
|
||||
@@ -55,7 +55,7 @@ export const useNetlifyConnectionListSites = (
|
||||
queryKey: netlifyConnectionKeys.listSites(connectionId, accountId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{ sites: TNetlifySite[] }>(
|
||||
`/api/v1/app-connections/netlify/${connectionId}/accounts/${accountId}/sites`
|
||||
`/v1/app-connections/netlify/${connectionId}/accounts/${accountId}/sites`
|
||||
);
|
||||
|
||||
return data.sites;
|
||||
|
||||
@@ -29,7 +29,7 @@ export const useNorthflankConnectionListProjects = (
|
||||
queryKey: northflankConnectionKeys.listProjects(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{ projects: TNorthflankProject[] }>(
|
||||
`/api/v1/app-connections/northflank/${connectionId}/projects`
|
||||
`/v1/app-connections/northflank/${connectionId}/projects`
|
||||
);
|
||||
|
||||
return data.projects;
|
||||
@@ -55,7 +55,7 @@ export const useNorthflankConnectionListSecretGroups = (
|
||||
queryKey: northflankConnectionKeys.listSecretGroups(connectionId, projectId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{ secretGroups: TNorthflankSecretGroup[] }>(
|
||||
`/api/v1/app-connections/northflank/${connectionId}/projects/${projectId}/secret-groups`
|
||||
`/v1/app-connections/northflank/${connectionId}/projects/${projectId}/secret-groups`
|
||||
);
|
||||
|
||||
return data.secretGroups;
|
||||
|
||||
@@ -37,7 +37,7 @@ export const useOCIConnectionListCompartments = (
|
||||
queryKey: ociConnectionKeys.listCompartments(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TOCICompartment[]>(
|
||||
`/api/v1/app-connections/oci/${connectionId}/compartments`
|
||||
`/v1/app-connections/oci/${connectionId}/compartments`
|
||||
);
|
||||
|
||||
return data;
|
||||
@@ -62,7 +62,7 @@ export const useOCIConnectionListVaults = (
|
||||
queryKey: ociConnectionKeys.listVaults(connectionId, compartmentOcid),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TOCIVault[]>(
|
||||
`/api/v1/app-connections/oci/${connectionId}/vaults`,
|
||||
`/v1/app-connections/oci/${connectionId}/vaults`,
|
||||
{
|
||||
params: {
|
||||
compartmentOcid
|
||||
@@ -92,7 +92,7 @@ export const useOCIConnectionListVaultKeys = (
|
||||
queryKey: ociConnectionKeys.listVaultKeys(connectionId, compartmentOcid, vaultOcid),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TOCIVaultKey[]>(
|
||||
`/api/v1/app-connections/oci/${connectionId}/vault-keys`,
|
||||
`/v1/app-connections/oci/${connectionId}/vault-keys`,
|
||||
{
|
||||
params: {
|
||||
compartmentOcid,
|
||||
|
||||
@@ -31,7 +31,7 @@ export const useOctopusDeployConnectionListSpaces = (
|
||||
queryKey: octopusDeployConnectionKeys.listSpaces(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TOctopusDeploySpace[]>(
|
||||
`/api/v1/app-connections/octopus-deploy/${connectionId}/spaces`
|
||||
`/v1/app-connections/octopus-deploy/${connectionId}/spaces`
|
||||
);
|
||||
|
||||
return data;
|
||||
@@ -57,7 +57,7 @@ export const useOctopusDeployConnectionListProjects = (
|
||||
queryKey: octopusDeployConnectionKeys.listProjects(connectionId, spaceId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TOctopusDeployProject[]>(
|
||||
`/api/v1/app-connections/octopus-deploy/${connectionId}/projects`,
|
||||
`/v1/app-connections/octopus-deploy/${connectionId}/projects`,
|
||||
{
|
||||
params: { spaceId }
|
||||
}
|
||||
@@ -87,7 +87,7 @@ export const useOctopusDeployConnectionGetScopeValues = (
|
||||
queryKey: octopusDeployConnectionKeys.getScopeValues(connectionId, spaceId, projectId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TOctopusDeployScopeValues>(
|
||||
`/api/v1/app-connections/octopus-deploy/${connectionId}/scope-values`,
|
||||
`/v1/app-connections/octopus-deploy/${connectionId}/scope-values`,
|
||||
{ params: { spaceId, projectId } }
|
||||
);
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ export const useOktaConnectionListApps = (
|
||||
queryKey: oktaConnectionKeys.listApps(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{ apps: TOktaApp[] }>(
|
||||
`/api/v1/app-connections/okta/${connectionId}/apps`
|
||||
`/v1/app-connections/okta/${connectionId}/apps`
|
||||
);
|
||||
|
||||
return data.apps;
|
||||
|
||||
@@ -114,7 +114,7 @@ export const useListAvailableAppConnections = (
|
||||
queryKey: appConnectionKeys.listAvailable(app, projectId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TAvailableAppConnectionsResponse>(
|
||||
`/api/v1/app-connections/${app}/available`,
|
||||
`/v1/app-connections/${app}/available`,
|
||||
{ params: { projectId } }
|
||||
);
|
||||
|
||||
@@ -142,7 +142,7 @@ export const useListAvailableAppConnections = (
|
||||
// queryKey: appConnectionKeys.getUsage(app, connectionId),
|
||||
// queryFn: async () => {
|
||||
// const { data } = await apiRequest.get<AppConnectionUsage>(
|
||||
// `/api/v1/app-connections/${app}/${connectionId}/usage`
|
||||
// `/v1/app-connections/${app}/${connectionId}/usage`
|
||||
// );
|
||||
//
|
||||
// return data;
|
||||
@@ -168,7 +168,7 @@ export const useListAvailableAppConnections = (
|
||||
// queryKey: appConnectionKeys.listByApp(app),
|
||||
// queryFn: async () => {
|
||||
// const { data } = await apiRequest.get<TListAppConnections<TAppConnectionMap[T]>>(
|
||||
// `/api/v1/app-connections/${app}`
|
||||
// `/v1/app-connections/${app}`
|
||||
// );
|
||||
//
|
||||
// return data.appConnections;
|
||||
@@ -195,7 +195,7 @@ export const useListAvailableAppConnections = (
|
||||
// queryKey: appConnectionKeys.byId(app, connectionId),
|
||||
// queryFn: async () => {
|
||||
// const { data } = await apiRequest.get<TGetAppConnection<TAppConnectionMap[T]>>(
|
||||
// `/api/v1/app-connections/${app}/${connectionId}`
|
||||
// `/v1/app-connections/${app}/${connectionId}`
|
||||
// );
|
||||
//
|
||||
// return data.appConnection;
|
||||
|
||||
@@ -27,7 +27,7 @@ export const useRailwayConnectionListProjects = (
|
||||
queryKey: railwayConnectionKeys.listSecretScopes(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{ projects: TRailwayProject[] }>(
|
||||
`/api/v1/app-connections/railway/${connectionId}/projects`
|
||||
`/v1/app-connections/railway/${connectionId}/projects`
|
||||
);
|
||||
|
||||
return data.projects;
|
||||
|
||||
@@ -29,7 +29,7 @@ export const useRenderConnectionListServices = (
|
||||
queryKey: renderConnectionKeys.listServices(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TRenderService[]>(
|
||||
`/api/v1/app-connections/render/${connectionId}/services`
|
||||
`/v1/app-connections/render/${connectionId}/services`
|
||||
);
|
||||
|
||||
return data;
|
||||
@@ -54,7 +54,7 @@ export const useRenderConnectionListEnvironmentGroups = (
|
||||
queryKey: renderConnectionKeys.listEnvironmentGroups(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TRenderEnvironmentGroup[]>(
|
||||
`/api/v1/app-connections/render/${connectionId}/environment-groups`
|
||||
`/v1/app-connections/render/${connectionId}/environment-groups`
|
||||
);
|
||||
|
||||
return data;
|
||||
|
||||
@@ -27,7 +27,7 @@ export const useSupabaseConnectionListProjects = (
|
||||
queryKey: supabaseConnectionKeys.listProjects(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{ projects: TSupabaseProject[] }>(
|
||||
`/api/v1/app-connections/supabase/${connectionId}/projects`
|
||||
`/v1/app-connections/supabase/${connectionId}/projects`
|
||||
);
|
||||
|
||||
return data.projects;
|
||||
|
||||
@@ -27,7 +27,7 @@ export const useTeamCityConnectionListProjects = (
|
||||
queryKey: teamcityConnectionKeys.listProjects(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TTeamCityProjectWithBuildTypes[]>(
|
||||
`/api/v1/app-connections/teamcity/${connectionId}/projects`
|
||||
`/v1/app-connections/teamcity/${connectionId}/projects`
|
||||
);
|
||||
|
||||
return data;
|
||||
|
||||
@@ -27,7 +27,7 @@ export const useTerraformCloudConnectionListOrganizations = (
|
||||
queryKey: terraformCloudConnectionKeys.listOrganizations(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TTerraformCloudOrganization[]>(
|
||||
`/api/v1/app-connections/terraform-cloud/${connectionId}/organizations`
|
||||
`/v1/app-connections/terraform-cloud/${connectionId}/organizations`
|
||||
);
|
||||
|
||||
return data;
|
||||
|
||||
@@ -28,7 +28,7 @@ export const useVercelConnectionListOrganizations = (
|
||||
queryKey: vercelConnectionKeys.listOrganizations(connectionId, projectSearch),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TVercelConnectionOrganization[]>(
|
||||
`/api/v1/app-connections/vercel/${connectionId}/projects`,
|
||||
`/v1/app-connections/vercel/${connectionId}/projects`,
|
||||
{
|
||||
params: {
|
||||
projectSearch
|
||||
|
||||
@@ -27,7 +27,7 @@ export const useWindmillConnectionListWorkspaces = (
|
||||
queryKey: windmillConnectionKeys.listWorkspaces(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TWindmillWorkspace[]>(
|
||||
`/api/v1/app-connections/windmill/${connectionId}/workspaces`
|
||||
`/v1/app-connections/windmill/${connectionId}/workspaces`
|
||||
);
|
||||
|
||||
return data;
|
||||
|
||||
@@ -26,7 +26,7 @@ export const useZabbixConnectionListHosts = (
|
||||
queryKey: zabbixConnectionKeys.listHosts(connectionId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TZabbixHost[]>(
|
||||
`/api/v1/app-connections/zabbix/${connectionId}/hosts`
|
||||
`/v1/app-connections/zabbix/${connectionId}/hosts`
|
||||
);
|
||||
|
||||
return data;
|
||||
|
||||
@@ -11,7 +11,7 @@ export const useRevokeApprovalGrant = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ policyType, grantId, revocationReason }: TRevokeApprovalGrantDTO) => {
|
||||
const { data } = await apiRequest.post<{ grant: TApprovalGrant }>(
|
||||
`/api/v1/approval-policies/${policyType}/grants/${grantId}/revoke`,
|
||||
`/v1/approval-policies/${policyType}/grants/${grantId}/revoke`,
|
||||
{ revocationReason }
|
||||
);
|
||||
return data.grant;
|
||||
|
||||
@@ -15,7 +15,7 @@ export const approvalGrantQuery = {
|
||||
queryKey: approvalGrantQuery.getByIdKey(params),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{ grant: TApprovalGrant }>(
|
||||
`/api/v1/approval-policies/${params.policyType}/grants/${params.grantId}`
|
||||
`/v1/approval-policies/${params.policyType}/grants/${params.grantId}`
|
||||
);
|
||||
return data.grant;
|
||||
}
|
||||
@@ -26,7 +26,7 @@ export const approvalGrantQuery = {
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{
|
||||
grants: TApprovalGrant[];
|
||||
}>(`/api/v1/approval-policies/${params.policyType}/grants`, {
|
||||
}>(`/v1/approval-policies/${params.policyType}/grants`, {
|
||||
params: {
|
||||
projectId: params.projectId
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ export const useCreateApprovalPolicy = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ policyType, ...dto }: TCreateApprovalPolicyDTO) => {
|
||||
const { data } = await apiRequest.post<{ policy: TApprovalPolicy }>(
|
||||
`/api/v1/approval-policies/${policyType}`,
|
||||
`/v1/approval-policies/${policyType}`,
|
||||
dto
|
||||
);
|
||||
return data.policy;
|
||||
@@ -33,7 +33,7 @@ export const useUpdateApprovalPolicy = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ policyType, policyId, ...updates }: TUpdateApprovalPolicyDTO) => {
|
||||
const { data } = await apiRequest.patch<{ policy: TApprovalPolicy }>(
|
||||
`/api/v1/approval-policies/${policyType}/${policyId}`,
|
||||
`/v1/approval-policies/${policyType}/${policyId}`,
|
||||
updates
|
||||
);
|
||||
return data.policy;
|
||||
@@ -49,7 +49,7 @@ export const useDeleteApprovalPolicy = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ policyType, policyId }: TDeleteApprovalPolicyDTO) => {
|
||||
const { data } = await apiRequest.delete<{ policyId: string }>(
|
||||
`/api/v1/approval-policies/${policyType}/${policyId}`
|
||||
`/v1/approval-policies/${policyType}/${policyId}`
|
||||
);
|
||||
return data.policyId;
|
||||
},
|
||||
@@ -63,7 +63,7 @@ export const useCheckPolicyMatch = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ policyType, projectId, inputs }: TCheckPolicyMatchDTO) => {
|
||||
const { data } = await apiRequest.post<TCheckPolicyMatchResult>(
|
||||
`/api/v1/approval-policies/${policyType}/check-policy-match`,
|
||||
`/v1/approval-policies/${policyType}/check-policy-match`,
|
||||
{ projectId, inputs }
|
||||
);
|
||||
return data;
|
||||
|
||||
@@ -15,7 +15,7 @@ export const approvalPolicyQuery = {
|
||||
queryKey: approvalPolicyQuery.getByIdKey(params),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{ policy: TApprovalPolicy }>(
|
||||
`/api/v1/approval-policies/${params.policyType}/${params.policyId}`
|
||||
`/v1/approval-policies/${params.policyType}/${params.policyId}`
|
||||
);
|
||||
return data.policy;
|
||||
}
|
||||
@@ -26,7 +26,7 @@ export const approvalPolicyQuery = {
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{
|
||||
policies: TApprovalPolicy[];
|
||||
}>(`/api/v1/approval-policies/${params.policyType}`, {
|
||||
}>(`/v1/approval-policies/${params.policyType}`, {
|
||||
params: {
|
||||
projectId: params.projectId
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ export const useCreateApprovalRequest = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ policyType, ...dto }: TCreateApprovalRequestDTO) => {
|
||||
const { data } = await apiRequest.post<{ request: TApprovalRequest }>(
|
||||
`/api/v1/approval-policies/${policyType}/requests`,
|
||||
`/v1/approval-policies/${policyType}/requests`,
|
||||
dto
|
||||
);
|
||||
return data.request;
|
||||
@@ -32,7 +32,7 @@ export const useApproveApprovalRequest = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ policyType, requestId, comment }: TApproveApprovalRequestDTO) => {
|
||||
const { data } = await apiRequest.post<{ request: TApprovalRequest }>(
|
||||
`/api/v1/approval-policies/${policyType}/requests/${requestId}/approve`,
|
||||
`/v1/approval-policies/${policyType}/requests/${requestId}/approve`,
|
||||
{ comment }
|
||||
);
|
||||
return data.request;
|
||||
@@ -48,7 +48,7 @@ export const useRejectApprovalRequest = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ policyType, requestId, comment }: TRejectApprovalRequestDTO) => {
|
||||
const { data } = await apiRequest.post<{ request: TApprovalRequest }>(
|
||||
`/api/v1/approval-policies/${policyType}/requests/${requestId}/reject`,
|
||||
`/v1/approval-policies/${policyType}/requests/${requestId}/reject`,
|
||||
{ comment }
|
||||
);
|
||||
return data.request;
|
||||
@@ -64,7 +64,7 @@ export const useCancelApprovalRequest = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ policyType, requestId }: TCancelApprovalRequestDTO) => {
|
||||
const { data } = await apiRequest.post<{ request: TApprovalRequest }>(
|
||||
`/api/v1/approval-policies/${policyType}/requests/${requestId}/cancel`
|
||||
`/v1/approval-policies/${policyType}/requests/${requestId}/cancel`
|
||||
);
|
||||
return data.request;
|
||||
},
|
||||
|
||||
@@ -15,7 +15,7 @@ export const approvalRequestQuery = {
|
||||
queryKey: approvalRequestQuery.getByIdKey(params),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{ request: TApprovalRequest }>(
|
||||
`/api/v1/approval-policies/${params.policyType}/requests/${params.requestId}`
|
||||
`/v1/approval-policies/${params.policyType}/requests/${params.requestId}`
|
||||
);
|
||||
return data.request;
|
||||
}
|
||||
@@ -26,7 +26,7 @@ export const approvalRequestQuery = {
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{
|
||||
requests: TApprovalRequest[];
|
||||
}>(`/api/v1/approval-policies/${params.policyType}/requests`, {
|
||||
}>(`/v1/approval-policies/${params.policyType}/requests`, {
|
||||
params: {
|
||||
projectId: params.projectId
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ export const useAssumeProjectPrivileges = () =>
|
||||
useMutation({
|
||||
mutationFn: async ({ projectId, actorId, actorType }: TProjectAssumePrivilegesDTO) => {
|
||||
const { data } = await apiRequest.post<{ message: string }>(
|
||||
`/api/v1/projects/${projectId}/assume-privileges`,
|
||||
`/v1/projects/${projectId}/assume-privileges`,
|
||||
{ actorId, actorType }
|
||||
);
|
||||
|
||||
@@ -20,7 +20,7 @@ export const useRemoveAssumeProjectPrivilege = () =>
|
||||
useMutation({
|
||||
mutationFn: async ({ projectId }: { projectId: string }) => {
|
||||
const { data } = await apiRequest.delete<{ message: string }>(
|
||||
`/api/v1/projects/${projectId}/assume-privileges`
|
||||
`/v1/projects/${projectId}/assume-privileges`
|
||||
);
|
||||
|
||||
return data;
|
||||
|
||||
@@ -15,7 +15,7 @@ export const useCreateAuditLogStream = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ provider, ...params }: TCreateAuditLogStreamDTO) => {
|
||||
const { data } = await apiRequest.post<{ auditLogStream: TAuditLogStream }>(
|
||||
`/api/v1/audit-log-streams/${provider}`,
|
||||
`/v1/audit-log-streams/${provider}`,
|
||||
params
|
||||
);
|
||||
|
||||
@@ -30,7 +30,7 @@ export const useUpdateAuditLogStream = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ auditLogStreamId, provider, ...params }: TUpdateAuditLogStreamDTO) => {
|
||||
const { data } = await apiRequest.patch<{ auditLogStream: TAuditLogStream }>(
|
||||
`/api/v1/audit-log-streams/${provider}/${auditLogStreamId}`,
|
||||
`/v1/audit-log-streams/${provider}/${auditLogStreamId}`,
|
||||
params
|
||||
);
|
||||
|
||||
@@ -50,7 +50,7 @@ export const useDeleteAuditLogStream = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ auditLogStreamId, provider }: TDeleteAuditLogStreamDTO) => {
|
||||
const { data } = await apiRequest.delete<{ auditLogStream: TAuditLogStream }>(
|
||||
`/api/v1/audit-log-streams/${provider}/${auditLogStreamId}`
|
||||
`/v1/audit-log-streams/${provider}/${auditLogStreamId}`
|
||||
);
|
||||
|
||||
return data.auditLogStream;
|
||||
|
||||
@@ -79,7 +79,7 @@ export const useGetAuditLogStreamById = <T extends LogProvider>(
|
||||
queryKey: auditLogStreamKeys.getById(provider, logStreamId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{ auditLogStream: TAuditLogStreamProviderMap[T] }>(
|
||||
`/api/v1/audit-log-streams/${provider}/${logStreamId}`
|
||||
`/v1/audit-log-streams/${provider}/${logStreamId}`
|
||||
);
|
||||
|
||||
return data.auditLogStream;
|
||||
|
||||
@@ -61,7 +61,7 @@ export const useGetAuditLogActorFilterOpts = (projectId: string) => {
|
||||
queryKey: auditLogKeys.getAuditLogActorFilterOpts(projectId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{ actors: Actor[] }>(
|
||||
`/api/v1/projects/${projectId}/audit-logs/filters/actors`
|
||||
`/v1/projects/${projectId}/audit-logs/filters/actors`
|
||||
);
|
||||
return data.actors;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ export const useGetWorkspaceBot = (workspaceId: string) =>
|
||||
queryFn: async () => {
|
||||
const {
|
||||
data: { bot }
|
||||
} = await apiRequest.get<{ bot: TBot }>(`/api/v1/bot/${workspaceId}`);
|
||||
} = await apiRequest.get<{ bot: TBot }>(`/v1/bot/${workspaceId}`);
|
||||
return bot;
|
||||
},
|
||||
enabled: Boolean(workspaceId)
|
||||
@@ -25,7 +25,7 @@ export const useUpdateBotActiveStatus = () => {
|
||||
|
||||
return useMutation<object, object, TSetBotActiveStatusDto>({
|
||||
mutationFn: ({ botId, isActive, botKey }) => {
|
||||
return apiRequest.patch(`/api/v1/bot/${botId}/active`, {
|
||||
return apiRequest.patch(`/v1/bot/${botId}/active`, {
|
||||
isActive,
|
||||
botKey
|
||||
});
|
||||
|
||||
@@ -29,7 +29,7 @@ export const useUpdateCa = () => {
|
||||
return useMutation<TUnifiedCertificateAuthority, object, TUpdateCertificateAuthorityDTO>({
|
||||
mutationFn: async ({ id, ...body }) => {
|
||||
const { data } = await apiRequest.patch<TUnifiedCertificateAuthority>(
|
||||
`/api/v1/cert-manager/ca/${body.type}/${id}`,
|
||||
`/v1/cert-manager/ca/${body.type}/${id}`,
|
||||
body
|
||||
);
|
||||
|
||||
@@ -55,7 +55,7 @@ export const useCreateCa = () => {
|
||||
return useMutation<TUnifiedCertificateAuthority, object, TCreateCertificateAuthorityDTO>({
|
||||
mutationFn: async (body) => {
|
||||
const { data } = await apiRequest.post<TUnifiedCertificateAuthority>(
|
||||
`/api/v1/cert-manager/ca/${body.type}`,
|
||||
`/v1/cert-manager/ca/${body.type}`,
|
||||
body
|
||||
);
|
||||
return data;
|
||||
@@ -77,7 +77,7 @@ export const useDeleteCa = () => {
|
||||
return useMutation<TUnifiedCertificateAuthority, object, TDeleteCertificateAuthorityDTO>({
|
||||
mutationFn: async ({ id, type }) => {
|
||||
const { data } = await apiRequest.delete<TUnifiedCertificateAuthority>(
|
||||
`/api/v1/cert-manager/ca/${type}/${id}`
|
||||
`/v1/cert-manager/ca/${type}/${id}`
|
||||
);
|
||||
return data;
|
||||
},
|
||||
@@ -98,7 +98,7 @@ export const useSignIntermediate = () => {
|
||||
return useMutation<TSignIntermediateResponse, object, TSignIntermediateDTO>({
|
||||
mutationFn: async (body) => {
|
||||
const { data } = await apiRequest.post<TSignIntermediateResponse>(
|
||||
`/api/v1/cert-manager/ca/internal/${body.caId}/sign-intermediate`,
|
||||
`/v1/cert-manager/ca/internal/${body.caId}/sign-intermediate`,
|
||||
body
|
||||
);
|
||||
return data;
|
||||
@@ -111,7 +111,7 @@ export const useImportCaCertificate = (projectId: string) => {
|
||||
return useMutation<TImportCaCertificateResponse, object, TImportCaCertificateDTO>({
|
||||
mutationFn: async ({ caId, ...body }) => {
|
||||
const { data } = await apiRequest.post<TImportCaCertificateResponse>(
|
||||
`/api/v1/cert-manager/ca/internal/${caId}/import-certificate`,
|
||||
`/v1/cert-manager/ca/internal/${caId}/import-certificate`,
|
||||
body
|
||||
);
|
||||
return data;
|
||||
@@ -198,7 +198,7 @@ export const useRenewCa = () => {
|
||||
return useMutation<TRenewCaResponse, object, TRenewCaDTO>({
|
||||
mutationFn: async (body) => {
|
||||
const { data } = await apiRequest.post<TRenewCaResponse>(
|
||||
`/api/v1/cert-manager/ca/internal/${body.caId}/renew`,
|
||||
`/v1/cert-manager/ca/internal/${body.caId}/renew`,
|
||||
body
|
||||
);
|
||||
return data;
|
||||
|
||||
@@ -34,7 +34,7 @@ export const useGetCa = ({ caId, type }: { caId: string; type: CaType }) => {
|
||||
queryKey: caKeys.getCaById(caId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TUnifiedCertificateAuthority>(
|
||||
`/api/v1/cert-manager/ca/${type}/${caId}`
|
||||
`/v1/cert-manager/ca/${type}/${caId}`
|
||||
);
|
||||
return data;
|
||||
},
|
||||
@@ -47,7 +47,7 @@ export const useListCasByTypeAndProjectId = (type: CaType, projectId: string) =>
|
||||
queryKey: caKeys.listCasByTypeAndProjectId(type, projectId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TUnifiedCertificateAuthority[]>(
|
||||
`/api/v1/cert-manager/ca/${type}?projectId=${projectId}`
|
||||
`/v1/cert-manager/ca/${type}?projectId=${projectId}`
|
||||
);
|
||||
|
||||
return data;
|
||||
@@ -61,7 +61,7 @@ export const useListCasByProjectId = (projectId: string) => {
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{
|
||||
certificateAuthorities: TUnifiedCertificateAuthority[];
|
||||
}>(`/api/v1/cert-manager/ca?projectId=${projectId}`);
|
||||
}>(`/v1/cert-manager/ca?projectId=${projectId}`);
|
||||
|
||||
return data.certificateAuthorities;
|
||||
}
|
||||
@@ -74,10 +74,10 @@ export const useListExternalCasByProjectId = (projectId: string) => {
|
||||
queryFn: async () => {
|
||||
const [acmeResponse, azureAdCsResponse] = await Promise.allSettled([
|
||||
apiRequest.get<TUnifiedCertificateAuthority[]>(
|
||||
`/api/v1/cert-manager/ca/${CaType.ACME}?projectId=${projectId}`
|
||||
`/v1/cert-manager/ca/${CaType.ACME}?projectId=${projectId}`
|
||||
),
|
||||
apiRequest.get<TUnifiedCertificateAuthority[]>(
|
||||
`/api/v1/cert-manager/ca/${CaType.AZURE_AD_CS}?projectId=${projectId}`
|
||||
`/v1/cert-manager/ca/${CaType.AZURE_AD_CS}?projectId=${projectId}`
|
||||
)
|
||||
]);
|
||||
|
||||
@@ -101,7 +101,7 @@ export const useGetInternalCaById = (caId: string) => {
|
||||
queryKey: caKeys.getCaById(caId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TInternalCertificateAuthority>(
|
||||
`/api/v1/cert-manager/ca/internal/${caId}`
|
||||
`/v1/cert-manager/ca/internal/${caId}`
|
||||
);
|
||||
return data;
|
||||
},
|
||||
@@ -120,7 +120,7 @@ export const useGetCaCerts = (caId: string) => {
|
||||
serialNumber: string;
|
||||
version: number;
|
||||
}[]
|
||||
>(`/api/v1/cert-manager/ca/internal/${caId}/ca-certificates`);
|
||||
>(`/v1/cert-manager/ca/internal/${caId}/ca-certificates`);
|
||||
return data;
|
||||
},
|
||||
enabled: Boolean(caId)
|
||||
@@ -135,7 +135,7 @@ export const useGetCaCert = (caId: string) => {
|
||||
certificate: string;
|
||||
certificateChain: string;
|
||||
serialNumber: string;
|
||||
}>(`/api/v1/cert-manager/ca/internal/${caId}/certificate`);
|
||||
}>(`/v1/cert-manager/ca/internal/${caId}/certificate`);
|
||||
return data;
|
||||
},
|
||||
enabled: Boolean(caId)
|
||||
@@ -150,7 +150,7 @@ export const useGetCaCsr = (caId: string) => {
|
||||
data: { csr }
|
||||
} = await apiRequest.get<{
|
||||
csr: string;
|
||||
}>(`/api/v1/cert-manager/ca/internal/${caId}/csr`);
|
||||
}>(`/v1/cert-manager/ca/internal/${caId}/csr`);
|
||||
return csr;
|
||||
},
|
||||
enabled: Boolean(caId)
|
||||
@@ -166,7 +166,7 @@ export const useGetCaCrls = (caId: string) => {
|
||||
id: string;
|
||||
crl: string;
|
||||
}[]
|
||||
>(`/api/v1/cert-manager/ca/internal/${caId}/crls`);
|
||||
>(`/v1/cert-manager/ca/internal/${caId}/crls`);
|
||||
return data;
|
||||
},
|
||||
enabled: Boolean(caId)
|
||||
@@ -180,7 +180,7 @@ export const useGetCaCertTemplates = (caId: string) => {
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{
|
||||
certificateTemplates: TCertificateTemplate[];
|
||||
}>(`/api/v1/pki/ca/${caId}/certificate-templates`);
|
||||
}>(`/v1/pki/ca/${caId}/certificate-templates`);
|
||||
return data;
|
||||
},
|
||||
enabled: Boolean(caId)
|
||||
@@ -201,7 +201,7 @@ export const useGetAzureAdcsTemplates = ({
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{
|
||||
templates: TAzureAdCsTemplate[];
|
||||
}>(`/api/v1/cert-manager/ca/azure-ad-cs/${caId}/templates?projectId=${projectId}`);
|
||||
}>(`/v1/cert-manager/ca/azure-ad-cs/${caId}/templates?projectId=${projectId}`);
|
||||
return data;
|
||||
},
|
||||
enabled: Boolean(caId && projectId && isAzureAdcsCa)
|
||||
|
||||
@@ -33,7 +33,7 @@ export const useUpdateCertificatePolicy = () => {
|
||||
mutationFn: async ({ policyId, ...data }) => {
|
||||
const { data: response } = await apiRequest.patch<{
|
||||
certificatePolicy: TCertificatePolicy;
|
||||
}>(`/api/v1/cert-manager/certificate-policies/${policyId}`, data);
|
||||
}>(`/v1/cert-manager/certificate-policies/${policyId}`, data);
|
||||
return response.certificatePolicy;
|
||||
},
|
||||
onSuccess: (policy, { policyId }) => {
|
||||
@@ -53,7 +53,7 @@ export const useDeleteCertificatePolicy = () => {
|
||||
mutationFn: async ({ policyId }) => {
|
||||
const { data: response } = await apiRequest.delete<{
|
||||
certificatePolicy: TCertificatePolicy;
|
||||
}>(`/api/v1/cert-manager/certificate-policies/${policyId}`);
|
||||
}>(`/v1/cert-manager/certificate-policies/${policyId}`);
|
||||
return response.certificatePolicy;
|
||||
},
|
||||
onSuccess: (policy, { policyId }) => {
|
||||
|
||||
@@ -47,7 +47,7 @@ export const useGetCertificatePolicyById = ({ policyId }: TGetCertificatePolicyB
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{
|
||||
certificatePolicy: TCertificatePolicy;
|
||||
}>(`/api/v1/cert-manager/certificate-policies/${policyId}`);
|
||||
}>(`/v1/cert-manager/certificate-policies/${policyId}`);
|
||||
return data.certificatePolicy;
|
||||
},
|
||||
enabled: Boolean(policyId)
|
||||
|
||||
@@ -35,7 +35,7 @@ export const useUpdateCertificateProfile = () => {
|
||||
mutationFn: async ({ profileId, ...data }) => {
|
||||
const { data: response } = await apiRequest.patch<{
|
||||
certificateProfile: TCertificateProfile;
|
||||
}>(`/api/v1/cert-manager/certificate-profiles/${profileId}`, data);
|
||||
}>(`/v1/cert-manager/certificate-profiles/${profileId}`, data);
|
||||
return response.certificateProfile;
|
||||
},
|
||||
onSuccess: (profile, { profileId }) => {
|
||||
@@ -56,7 +56,7 @@ export const useDeleteCertificateProfile = () => {
|
||||
mutationFn: async ({ profileId }) => {
|
||||
const { data: response } = await apiRequest.delete<{
|
||||
certificateProfile: TCertificateProfile;
|
||||
}>(`/api/v1/cert-manager/certificate-profiles/${profileId}`);
|
||||
}>(`/v1/cert-manager/certificate-profiles/${profileId}`);
|
||||
return response.certificateProfile;
|
||||
},
|
||||
onSuccess: (profile, { profileId }) => {
|
||||
|
||||
@@ -93,7 +93,7 @@ export const useGetCertificateProfileById = ({ profileId }: TGetCertificateProfi
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{
|
||||
certificateProfile: TCertificateProfileWithDetails;
|
||||
}>(`/api/v1/cert-manager/certificate-profiles/${profileId}`);
|
||||
}>(`/v1/cert-manager/certificate-profiles/${profileId}`);
|
||||
return data.certificateProfile;
|
||||
},
|
||||
enabled: Boolean(profileId)
|
||||
@@ -109,7 +109,7 @@ export const useGetCertificateProfileBySlug = ({
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{
|
||||
certificateProfile: TCertificateProfile;
|
||||
}>(`/api/v1/cert-manager/certificate-profiles/slug/${slug}`, {
|
||||
}>(`/v1/cert-manager/certificate-profiles/slug/${slug}`, {
|
||||
params: { projectId }
|
||||
});
|
||||
return data.certificateProfile;
|
||||
@@ -125,7 +125,7 @@ export const useRevealAcmeEabSecret = ({ profileId }: TRevealAcmeEabSecretDTO) =
|
||||
const { data } = await apiRequest.get<{
|
||||
eabKid: string;
|
||||
eabSecret: string;
|
||||
}>(`/api/v1/cert-manager/certificate-profiles/${profileId}/acme/eab-secret/reveal`);
|
||||
}>(`/v1/cert-manager/certificate-profiles/${profileId}/acme/eab-secret/reveal`);
|
||||
return data;
|
||||
},
|
||||
enabled: Boolean(profileId)
|
||||
@@ -144,7 +144,7 @@ export const useGetProfileCertificates = ({
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{
|
||||
certificates: TProfileCertificate[];
|
||||
}>(`/api/v1/cert-manager/certificate-profiles/${profileId}/certificates`, {
|
||||
}>(`/v1/cert-manager/certificate-profiles/${profileId}/certificates`, {
|
||||
params: {
|
||||
offset,
|
||||
limit,
|
||||
|
||||
@@ -43,7 +43,7 @@ export const useUpdateCertTemplate = () => {
|
||||
return useMutation<TCertificateTemplate, object, TUpdateCertificateTemplateDTO>({
|
||||
mutationFn: async (data) => {
|
||||
const { data: certificateTemplate } = await apiRequest.patch<TCertificateTemplate>(
|
||||
`/api/v1/pki/certificate-templates/${data.id}`,
|
||||
`/v1/pki/certificate-templates/${data.id}`,
|
||||
data
|
||||
);
|
||||
|
||||
@@ -65,7 +65,7 @@ export const useDeleteCertTemplate = () => {
|
||||
return useMutation<TCertificateTemplate, object, TDeleteCertificateTemplateDTO>({
|
||||
mutationFn: async (data) => {
|
||||
const { data: certificateTemplate } = await apiRequest.delete<TCertificateTemplate>(
|
||||
`/api/v1/pki/certificate-templates/${data.id}`
|
||||
`/v1/pki/certificate-templates/${data.id}`
|
||||
);
|
||||
return certificateTemplate;
|
||||
},
|
||||
@@ -104,7 +104,7 @@ export const useUpdateCertTemplateV2 = () => {
|
||||
return useMutation<TCertificateTemplate, object, TUpdateCertificateTemplateV2DTO>({
|
||||
mutationFn: async (dto) => {
|
||||
const { data } = await apiRequest.patch<{ certificateTemplate: TCertificateTemplate }>(
|
||||
`/api/v2/pki/certificate-templates/${dto.templateName}`,
|
||||
`/v2/pki/certificate-templates/${dto.templateName}`,
|
||||
dto
|
||||
);
|
||||
|
||||
@@ -126,7 +126,7 @@ export const useDeleteCertTemplateV2 = () => {
|
||||
return useMutation<TCertificateTemplate, object, TDeleteCertificateTemplateV2DTO>({
|
||||
mutationFn: async (dto) => {
|
||||
const { data } = await apiRequest.delete<{ certificateTemplate: TCertificateTemplate }>(
|
||||
`/api/v2/pki/certificate-templates/${dto.templateName}`,
|
||||
`/v2/pki/certificate-templates/${dto.templateName}`,
|
||||
{
|
||||
data: {
|
||||
projectId: dto.projectId
|
||||
@@ -152,7 +152,7 @@ export const useCreateEstConfig = () => {
|
||||
return useMutation<object, object, TCreateEstConfigDTO>({
|
||||
mutationFn: async (body) => {
|
||||
const { data } = await apiRequest.post(
|
||||
`/api/v1/pki/certificate-templates/${body.certificateTemplateId}/est-config`,
|
||||
`/v1/pki/certificate-templates/${body.certificateTemplateId}/est-config`,
|
||||
body
|
||||
);
|
||||
return data;
|
||||
@@ -171,7 +171,7 @@ export const useUpdateEstConfig = () => {
|
||||
return useMutation<object, object, TUpdateEstConfigDTO>({
|
||||
mutationFn: async (body) => {
|
||||
const { data } = await apiRequest.patch(
|
||||
`/api/v1/pki/certificate-templates/${body.certificateTemplateId}/est-config`,
|
||||
`/v1/pki/certificate-templates/${body.certificateTemplateId}/est-config`,
|
||||
body
|
||||
);
|
||||
return data;
|
||||
|
||||
@@ -25,7 +25,7 @@ export const useGetCertTemplate = (id: string) => {
|
||||
queryKey: certTemplateKeys.getCertTemplateById(id),
|
||||
queryFn: async () => {
|
||||
const { data: certificateTemplate } = await apiRequest.get<TCertificateTemplate>(
|
||||
`/api/v1/pki/certificate-templates/${id}`
|
||||
`/v1/pki/certificate-templates/${id}`
|
||||
);
|
||||
return certificateTemplate;
|
||||
},
|
||||
@@ -63,7 +63,7 @@ export const useGetEstConfig = (certificateTemplateId: string) => {
|
||||
queryKey: certTemplateKeys.getEstConfig(certificateTemplateId),
|
||||
queryFn: async () => {
|
||||
const { data: estConfig } = await apiRequest.get<TEstConfig>(
|
||||
`/api/v1/pki/certificate-templates/${certificateTemplateId}/est-config`
|
||||
`/v1/pki/certificate-templates/${certificateTemplateId}/est-config`
|
||||
);
|
||||
|
||||
return estConfig;
|
||||
|
||||
@@ -25,7 +25,7 @@ export const useDeleteCert = () => {
|
||||
const {
|
||||
data: { certificate }
|
||||
} = await apiRequest.delete<{ certificate: TCertificate }>(
|
||||
`/api/v1/cert-manager/certificates/${id}`
|
||||
`/v1/cert-manager/certificates/${id}`
|
||||
);
|
||||
return certificate;
|
||||
},
|
||||
@@ -53,7 +53,7 @@ export const useRevokeCert = () => {
|
||||
const {
|
||||
data: { certificate }
|
||||
} = await apiRequest.post<{ certificate: TCertificate }>(
|
||||
`/api/v1/cert-manager/certificates/${id}/revoke`,
|
||||
`/v1/cert-manager/certificates/${id}/revoke`,
|
||||
{
|
||||
revocationReason
|
||||
}
|
||||
@@ -100,7 +100,7 @@ export const useRenewCertificate = () => {
|
||||
return useMutation<TRenewCertificateResponse, object, TRenewCertificateDTO>({
|
||||
mutationFn: async ({ certificateId }) => {
|
||||
const { data } = await apiRequest.post<TRenewCertificateResponse>(
|
||||
`/api/v1/cert-manager/certificates/${certificateId}/renew`,
|
||||
`/v1/cert-manager/certificates/${certificateId}/renew`,
|
||||
{}
|
||||
);
|
||||
return data;
|
||||
@@ -133,7 +133,7 @@ export const useUpdateRenewalConfig = () => {
|
||||
>({
|
||||
mutationFn: async ({ certificateId, renewBeforeDays, enableAutoRenewal }) => {
|
||||
const { data } = await apiRequest.patch<{ message: string; renewBeforeDays?: number }>(
|
||||
`/api/v1/cert-manager/certificates/${certificateId}/config`,
|
||||
`/v1/cert-manager/certificates/${certificateId}/config`,
|
||||
{ renewBeforeDays, enableAutoRenewal }
|
||||
);
|
||||
return data;
|
||||
@@ -154,7 +154,7 @@ export const useDownloadCertPkcs12 = () => {
|
||||
mutationFn: async ({ certificateId, projectSlug, password, alias }) => {
|
||||
try {
|
||||
const response = await apiRequest.post(
|
||||
`/api/v1/cert-manager/certificates/${certificateId}/pkcs12`,
|
||||
`/v1/cert-manager/certificates/${certificateId}/pkcs12`,
|
||||
{
|
||||
password,
|
||||
alias
|
||||
|
||||
@@ -40,7 +40,7 @@ export const useGetCert = (serialNumber: string) => {
|
||||
const {
|
||||
data: { certificate }
|
||||
} = await apiRequest.get<{ certificate: TCertificate }>(
|
||||
`/api/v1/pki/certificates/${serialNumber}`
|
||||
`/v1/pki/certificates/${serialNumber}`
|
||||
);
|
||||
return certificate;
|
||||
},
|
||||
@@ -56,7 +56,7 @@ export const useGetCertBody = (serialNumber: string) => {
|
||||
certificate: string;
|
||||
certificateChain: string;
|
||||
serialNumber: string;
|
||||
}>(`/api/v1/pki/certificates/${serialNumber}/certificate`);
|
||||
}>(`/v1/pki/certificates/${serialNumber}/certificate`);
|
||||
return data;
|
||||
},
|
||||
enabled: Boolean(serialNumber)
|
||||
@@ -72,7 +72,7 @@ export const useGetCertBundle = (serialNumber: string) => {
|
||||
certificateChain: string;
|
||||
serialNumber: string;
|
||||
privateKey: string | null;
|
||||
}>(`/api/v1/pki/certificates/${serialNumber}/bundle`);
|
||||
}>(`/v1/pki/certificates/${serialNumber}/bundle`);
|
||||
return data;
|
||||
},
|
||||
enabled: Boolean(serialNumber)
|
||||
@@ -117,7 +117,7 @@ export const useGetCertificateRequest = (requestId: string, projectSlug: string)
|
||||
queryKey: certKeys.getCertificateRequest(requestId, projectSlug),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TCertificateRequestDetails>(
|
||||
`/api/v1/cert-manager/certificates/certificate-requests/${requestId}?projectSlug=${projectSlug}`
|
||||
`/v1/cert-manager/certificates/certificate-requests/${requestId}?projectSlug=${projectSlug}`
|
||||
);
|
||||
return data;
|
||||
},
|
||||
|
||||
@@ -35,7 +35,7 @@ export const useUpdateCmek = () => {
|
||||
const queryClient = useQueryClient();
|
||||
return useMutation({
|
||||
mutationFn: async ({ keyId, name, description, isDisabled }: TUpdateCmek) => {
|
||||
const { data } = await apiRequest.patch(`/api/v1/kms/keys/${keyId}`, {
|
||||
const { data } = await apiRequest.patch(`/v1/kms/keys/${keyId}`, {
|
||||
name,
|
||||
description,
|
||||
isDisabled
|
||||
@@ -53,7 +53,7 @@ export const useDeleteCmek = () => {
|
||||
const queryClient = useQueryClient();
|
||||
return useMutation({
|
||||
mutationFn: async ({ keyId }: TDeleteCmek) => {
|
||||
const { data } = await apiRequest.delete(`/api/v1/kms/keys/${keyId}`);
|
||||
const { data } = await apiRequest.delete(`/v1/kms/keys/${keyId}`);
|
||||
|
||||
return data;
|
||||
},
|
||||
@@ -67,7 +67,7 @@ export const useCmekEncrypt = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ keyId, plaintext, isBase64Encoded }: TCmekEncrypt) => {
|
||||
const { data } = await apiRequest.post<TCmekEncryptResponse>(
|
||||
`/api/v1/kms/keys/${keyId}/encrypt`,
|
||||
`/v1/kms/keys/${keyId}/encrypt`,
|
||||
{
|
||||
plaintext: isBase64Encoded ? plaintext : encodeBase64(Buffer.from(plaintext))
|
||||
}
|
||||
@@ -86,7 +86,7 @@ export const useCmekSign = () => {
|
||||
signingAlgorithm,
|
||||
isBase64Encoded
|
||||
}: TCmekSign & { isBase64Encoded: boolean }) => {
|
||||
const res = await apiRequest.post<TCmekSignResponse>(`/api/v1/kms/keys/${keyId}/sign`, {
|
||||
const res = await apiRequest.post<TCmekSignResponse>(`/v1/kms/keys/${keyId}/sign`, {
|
||||
data: isBase64Encoded ? data : encodeBase64(Buffer.from(data)),
|
||||
signingAlgorithm
|
||||
});
|
||||
@@ -105,7 +105,7 @@ export const useCmekVerify = () => {
|
||||
signingAlgorithm,
|
||||
isBase64Encoded
|
||||
}: TCmekVerify & { isBase64Encoded: boolean }) => {
|
||||
const res = await apiRequest.post<TCmekVerifyResponse>(`/api/v1/kms/keys/${keyId}/verify`, {
|
||||
const res = await apiRequest.post<TCmekVerifyResponse>(`/v1/kms/keys/${keyId}/verify`, {
|
||||
data: isBase64Encoded ? data : encodeBase64(Buffer.from(data)),
|
||||
signature,
|
||||
signingAlgorithm
|
||||
@@ -120,7 +120,7 @@ export const useCmekDecrypt = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ keyId, ciphertext }: TCmekDecrypt) => {
|
||||
const { data } = await apiRequest.post<TCmekDecryptResponse>(
|
||||
`/api/v1/kms/keys/${keyId}/decrypt`,
|
||||
`/v1/kms/keys/${keyId}/decrypt`,
|
||||
{
|
||||
ciphertext
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ export const useGetCmekPublicKey = (
|
||||
queryKey: cmekKeys.getPublicKey(keyId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TCmekGetPublicKeyResponse>(
|
||||
`/api/v1/kms/keys/${keyId}/public-key`
|
||||
`/v1/kms/keys/${keyId}/public-key`
|
||||
);
|
||||
return data;
|
||||
},
|
||||
@@ -101,7 +101,7 @@ export const useGetCmekPrivateKey = (
|
||||
queryKey: cmekKeys.getPrivateKey(keyId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TCmekGetPrivateKeyResponse>(
|
||||
`/api/v1/kms/keys/${keyId}/private-key`
|
||||
`/v1/kms/keys/${keyId}/private-key`
|
||||
);
|
||||
return data;
|
||||
},
|
||||
|
||||
@@ -38,7 +38,7 @@ export const useUpdateDynamicSecret = () => {
|
||||
return useMutation<object, object, TUpdateDynamicSecretDTO>({
|
||||
mutationFn: async (dto) => {
|
||||
const { data } = await apiRequest.patch<{ dynamicSecret: TDynamicSecret }>(
|
||||
`/api/v1/dynamic-secrets/${dto.name}`,
|
||||
`/v1/dynamic-secrets/${dto.name}`,
|
||||
dto
|
||||
);
|
||||
return data.dynamicSecret;
|
||||
@@ -62,7 +62,7 @@ export const useDeleteDynamicSecret = () => {
|
||||
return useMutation<object, object, TDeleteDynamicSecretDTO>({
|
||||
mutationFn: async (dto) => {
|
||||
const { data } = await apiRequest.delete<{ dynamicSecret: TDynamicSecret }>(
|
||||
`/api/v1/dynamic-secrets/${dto.name}`,
|
||||
`/v1/dynamic-secrets/${dto.name}`,
|
||||
{ data: dto }
|
||||
);
|
||||
return data.dynamicSecret;
|
||||
|
||||
@@ -58,7 +58,7 @@ export const useGetDynamicSecretDetails = ({
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{
|
||||
dynamicSecret: TDynamicSecret & { inputs: unknown };
|
||||
}>(`/api/v1/dynamic-secrets/${name}`, {
|
||||
}>(`/v1/dynamic-secrets/${name}`, {
|
||||
params: {
|
||||
projectSlug,
|
||||
environmentSlug,
|
||||
|
||||
@@ -53,7 +53,7 @@ export const useRenewDynamicSecretLease = () => {
|
||||
return useMutation<object, object, TRenewDynamicSecretLeaseDTO>({
|
||||
mutationFn: async (dto) => {
|
||||
const { data } = await apiRequest.post<{ lease: TDynamicSecretLease }>(
|
||||
`/api/v1/dynamic-secrets/leases/${dto.leaseId}/renew`,
|
||||
`/v1/dynamic-secrets/leases/${dto.leaseId}/renew`,
|
||||
dto
|
||||
);
|
||||
return data.lease;
|
||||
@@ -77,7 +77,7 @@ export const useRevokeDynamicSecretLease = () => {
|
||||
return useMutation<object, object, TRevokeDynamicSecretLeaseDTO>({
|
||||
mutationFn: async (dto) => {
|
||||
const { data } = await apiRequest.delete<{ lease: TDynamicSecretLease }>(
|
||||
`/api/v1/dynamic-secrets/leases/${dto.leaseId}`,
|
||||
`/v1/dynamic-secrets/leases/${dto.leaseId}`,
|
||||
{ data: dto }
|
||||
);
|
||||
return data.lease;
|
||||
|
||||
@@ -26,7 +26,7 @@ export const useGetDynamicSecretLeases = ({
|
||||
enabled: Boolean(projectSlug && environmentSlug && path && dynamicSecretName && enabled),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{ leases: TDynamicSecretLease[] }>(
|
||||
`/api/v1/dynamic-secrets/${dynamicSecretName}/leases`,
|
||||
`/v1/dynamic-secrets/${dynamicSecretName}/leases`,
|
||||
{
|
||||
params: {
|
||||
projectSlug,
|
||||
|
||||
@@ -99,7 +99,7 @@ const fetchFolderCommitHistory = async (
|
||||
|
||||
export const fetchCommitDetails = async (projectId: string, commitId: string) => {
|
||||
const { data } = await apiRequest.get<CommitWithChanges>(
|
||||
`/api/v1/pit/commits/${commitId}/changes`,
|
||||
`/v1/pit/commits/${commitId}/changes`,
|
||||
{
|
||||
params: {
|
||||
projectId
|
||||
@@ -118,7 +118,7 @@ export const fetchRollbackPreview = async (
|
||||
secretPath: string
|
||||
): Promise<RollbackPreview[]> => {
|
||||
const { data } = await apiRequest.get<RollbackPreview[]>(
|
||||
`/api/v1/pit/commits/${commitId}/compare`,
|
||||
`/v1/pit/commits/${commitId}/compare`,
|
||||
{
|
||||
params: {
|
||||
folderId,
|
||||
@@ -141,7 +141,7 @@ const fetchRollback = async (
|
||||
envSlug?: string
|
||||
) => {
|
||||
const { data } = await apiRequest.post<{ success: boolean }>(
|
||||
`/api/v1/pit/commits/${commitId}/rollback`,
|
||||
`/v1/pit/commits/${commitId}/rollback`,
|
||||
{
|
||||
folderId,
|
||||
deepRollback,
|
||||
@@ -155,7 +155,7 @@ const fetchRollback = async (
|
||||
|
||||
const fetchRevert = async (commitId: string, projectId: string) => {
|
||||
const { data } = await apiRequest.post<{ success: boolean; message: string }>(
|
||||
`/api/v1/pit/commits/${commitId}/revert`,
|
||||
`/v1/pit/commits/${commitId}/revert`,
|
||||
{
|
||||
projectId
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ export const useDeleteGatewayV2ById = () => {
|
||||
const queryClient = useQueryClient();
|
||||
return useMutation({
|
||||
mutationFn: (id: string) => {
|
||||
return apiRequest.delete(`/api/v2/gateways/${id}`);
|
||||
return apiRequest.delete(`/v2/gateways/${id}`);
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries(gatewaysQueryKeys.list());
|
||||
|
||||
@@ -9,7 +9,7 @@ export const useDeleteGatewayById = () => {
|
||||
const queryClient = useQueryClient();
|
||||
return useMutation({
|
||||
mutationFn: (id: string) => {
|
||||
return apiRequest.delete(`/api/v1/gateways/${id}`);
|
||||
return apiRequest.delete(`/v1/gateways/${id}`);
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries(gatewaysQueryKeys.list());
|
||||
@@ -21,7 +21,7 @@ export const useUpdateGatewayById = () => {
|
||||
const queryClient = useQueryClient();
|
||||
return useMutation({
|
||||
mutationFn: ({ id, name }: TUpdateGatewayDTO) => {
|
||||
return apiRequest.patch(`/api/v1/gateways/${id}`, { name });
|
||||
return apiRequest.patch(`/v1/gateways/${id}`, { name });
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries(gatewaysQueryKeys.list());
|
||||
|
||||
@@ -48,7 +48,7 @@ export const useUpdateGroup = () => {
|
||||
slug?: string;
|
||||
role?: string;
|
||||
}) => {
|
||||
const { data: group } = await apiRequest.patch<TGroup>(`/api/v1/groups/${id}`, {
|
||||
const { data: group } = await apiRequest.patch<TGroup>(`/v1/groups/${id}`, {
|
||||
name,
|
||||
slug,
|
||||
role
|
||||
@@ -67,7 +67,7 @@ export const useDeleteGroup = () => {
|
||||
const queryClient = useQueryClient();
|
||||
return useMutation({
|
||||
mutationFn: async ({ id }: { id: string }) => {
|
||||
const { data: group } = await apiRequest.delete<TGroup>(`/api/v1/groups/${id}`);
|
||||
const { data: group } = await apiRequest.delete<TGroup>(`/v1/groups/${id}`);
|
||||
|
||||
return group;
|
||||
},
|
||||
@@ -89,7 +89,7 @@ export const useAddUserToGroup = () => {
|
||||
username: string;
|
||||
slug: string;
|
||||
}) => {
|
||||
const { data } = await apiRequest.post<TGroup>(`/api/v1/groups/${groupId}/users/${username}`);
|
||||
const { data } = await apiRequest.post<TGroup>(`/v1/groups/${groupId}/users/${username}`);
|
||||
|
||||
return data;
|
||||
},
|
||||
@@ -112,7 +112,7 @@ export const useRemoveUserFromGroup = () => {
|
||||
groupId: string;
|
||||
}) => {
|
||||
const { data } = await apiRequest.delete<TGroup>(
|
||||
`/api/v1/groups/${groupId}/users/${username}`
|
||||
`/v1/groups/${groupId}/users/${username}`
|
||||
);
|
||||
|
||||
return data;
|
||||
@@ -137,7 +137,7 @@ export const useAddIdentityToGroup = () => {
|
||||
slug: string;
|
||||
}) => {
|
||||
const { data } = await apiRequest.post<Pick<TGroupMachineIdentity, "id" | "name">>(
|
||||
`/api/v1/groups/${groupId}/machine-identities/${identityId}`
|
||||
`/v1/groups/${groupId}/machine-identities/${identityId}`
|
||||
);
|
||||
|
||||
return data;
|
||||
@@ -161,7 +161,7 @@ export const useRemoveIdentityFromGroup = () => {
|
||||
slug: string;
|
||||
}) => {
|
||||
const { data } = await apiRequest.delete<Pick<TGroupMachineIdentity, "id" | "name">>(
|
||||
`/api/v1/groups/${groupId}/machine-identities/${identityId}`
|
||||
`/v1/groups/${groupId}/machine-identities/${identityId}`
|
||||
);
|
||||
|
||||
return data;
|
||||
|
||||
@@ -104,7 +104,7 @@ export const useGetGroupById = (groupId: string) => {
|
||||
enabled: Boolean(groupId),
|
||||
queryKey: groupKeys.getGroupById(groupId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TGroup>(`/api/v1/groups/${groupId}`);
|
||||
const { data } = await apiRequest.get<TGroup>(`/v1/groups/${groupId}`);
|
||||
|
||||
return { group: data };
|
||||
}
|
||||
@@ -145,7 +145,7 @@ export const useListGroupUsers = ({
|
||||
});
|
||||
|
||||
const { data } = await apiRequest.get<{ users: TGroupUser[]; totalCount: number }>(
|
||||
`/api/v1/groups/${id}/users`,
|
||||
`/v1/groups/${id}/users`,
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -203,7 +203,7 @@ export const useListGroupMembers = ({
|
||||
}
|
||||
|
||||
const { data } = await apiRequest.get<{ members: TGroupMember[]; totalCount: number }>(
|
||||
`/api/v1/groups/${id}/members`,
|
||||
`/v1/groups/${id}/members`,
|
||||
{
|
||||
params
|
||||
}
|
||||
@@ -250,7 +250,7 @@ export const useListGroupMachineIdentities = ({
|
||||
const { data } = await apiRequest.get<{
|
||||
machineIdentities: TGroupMachineIdentity[];
|
||||
totalCount: number;
|
||||
}>(`/api/v1/groups/${id}/machine-identities`, {
|
||||
}>(`/v1/groups/${id}/machine-identities`, {
|
||||
params
|
||||
});
|
||||
|
||||
@@ -299,7 +299,7 @@ export const useListGroupProjects = ({
|
||||
});
|
||||
|
||||
const { data } = await apiRequest.get<{ projects: TGroupProject[]; totalCount: number }>(
|
||||
`/api/v1/groups/${id}/projects`,
|
||||
`/v1/groups/${id}/projects`,
|
||||
{
|
||||
params
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ export const useAddIdentityUniversalAuth = () => {
|
||||
}) => {
|
||||
const {
|
||||
data: { identityUniversalAuth }
|
||||
} = await apiRequest.post(`/api/v1/auth/universal-auth/identities/${identityId}`, {
|
||||
} = await apiRequest.post(`/v1/auth/universal-auth/identities/${identityId}`, {
|
||||
clientSecretTrustedIps,
|
||||
accessTokenTTL,
|
||||
accessTokenMaxTTL,
|
||||
@@ -140,7 +140,7 @@ export const useUpdateIdentityUniversalAuth = () => {
|
||||
}) => {
|
||||
const {
|
||||
data: { identityUniversalAuth }
|
||||
} = await apiRequest.patch(`/api/v1/auth/universal-auth/identities/${identityId}`, {
|
||||
} = await apiRequest.patch(`/v1/auth/universal-auth/identities/${identityId}`, {
|
||||
clientSecretTrustedIps,
|
||||
accessTokenTTL,
|
||||
accessTokenMaxTTL,
|
||||
@@ -182,7 +182,7 @@ export const useDeleteIdentityUniversalAuth = () => {
|
||||
mutationFn: async ({ identityId }) => {
|
||||
const {
|
||||
data: { identityUniversalAuth }
|
||||
} = await apiRequest.delete(`/api/v1/auth/universal-auth/identities/${identityId}`);
|
||||
} = await apiRequest.delete(`/v1/auth/universal-auth/identities/${identityId}`);
|
||||
return identityUniversalAuth;
|
||||
},
|
||||
onSuccess: (_, { organizationId, identityId, projectId }) => {
|
||||
@@ -216,7 +216,7 @@ export const useCreateIdentityUniversalAuthClientSecret = () => {
|
||||
>({
|
||||
mutationFn: async ({ identityId, description, ttl, numUsesLimit }) => {
|
||||
const { data } = await apiRequest.post(
|
||||
`/api/v1/auth/universal-auth/identities/${identityId}/client-secrets`,
|
||||
`/v1/auth/universal-auth/identities/${identityId}/client-secrets`,
|
||||
{
|
||||
description,
|
||||
ttl,
|
||||
@@ -240,7 +240,7 @@ export const useRevokeIdentityUniversalAuthClientSecret = () => {
|
||||
const {
|
||||
data: { clientSecretData }
|
||||
} = await apiRequest.post<{ clientSecretData: ClientSecretData }>(
|
||||
`/api/v1/auth/universal-auth/identities/${identityId}/client-secrets/${clientSecretId}/revoke`
|
||||
`/v1/auth/universal-auth/identities/${identityId}/client-secrets/${clientSecretId}/revoke`
|
||||
);
|
||||
return clientSecretData;
|
||||
},
|
||||
@@ -259,7 +259,7 @@ export const useClearIdentityUniversalAuthLockouts = () => {
|
||||
const {
|
||||
data: { deleted }
|
||||
} = await apiRequest.post<{ deleted: number }>(
|
||||
`/api/v1/auth/universal-auth/identities/${identityId}/clear-lockouts`
|
||||
`/v1/auth/universal-auth/identities/${identityId}/clear-lockouts`
|
||||
);
|
||||
return deleted;
|
||||
},
|
||||
@@ -288,7 +288,7 @@ export const useAddIdentityGcpAuth = () => {
|
||||
const {
|
||||
data: { identityGcpAuth }
|
||||
} = await apiRequest.post<{ identityGcpAuth: IdentityGcpAuth }>(
|
||||
`/api/v1/auth/gcp-auth/identities/${identityId}`,
|
||||
`/v1/auth/gcp-auth/identities/${identityId}`,
|
||||
{
|
||||
type,
|
||||
allowedServiceAccounts,
|
||||
@@ -340,7 +340,7 @@ export const useUpdateIdentityGcpAuth = () => {
|
||||
const {
|
||||
data: { identityGcpAuth }
|
||||
} = await apiRequest.patch<{ identityGcpAuth: IdentityGcpAuth }>(
|
||||
`/api/v1/auth/gcp-auth/identities/${identityId}`,
|
||||
`/v1/auth/gcp-auth/identities/${identityId}`,
|
||||
{
|
||||
type,
|
||||
allowedServiceAccounts,
|
||||
@@ -381,7 +381,7 @@ export const useDeleteIdentityGcpAuth = () => {
|
||||
mutationFn: async ({ identityId }) => {
|
||||
const {
|
||||
data: { identityGcpAuth }
|
||||
} = await apiRequest.delete(`/api/v1/auth/gcp-auth/identities/${identityId}`);
|
||||
} = await apiRequest.delete(`/v1/auth/gcp-auth/identities/${identityId}`);
|
||||
return identityGcpAuth;
|
||||
},
|
||||
onSuccess: (_, { organizationId, identityId, projectId }) => {
|
||||
@@ -420,7 +420,7 @@ export const useAddIdentityAwsAuth = () => {
|
||||
const {
|
||||
data: { identityAwsAuth }
|
||||
} = await apiRequest.post<{ identityAwsAuth: IdentityAwsAuth }>(
|
||||
`/api/v1/auth/aws-auth/identities/${identityId}`,
|
||||
`/v1/auth/aws-auth/identities/${identityId}`,
|
||||
{
|
||||
stsEndpoint,
|
||||
allowedPrincipalArns,
|
||||
@@ -470,7 +470,7 @@ export const useUpdateIdentityAwsAuth = () => {
|
||||
const {
|
||||
data: { identityAwsAuth }
|
||||
} = await apiRequest.patch<{ identityAwsAuth: IdentityAwsAuth }>(
|
||||
`/api/v1/auth/aws-auth/identities/${identityId}`,
|
||||
`/v1/auth/aws-auth/identities/${identityId}`,
|
||||
{
|
||||
stsEndpoint,
|
||||
allowedPrincipalArns,
|
||||
@@ -510,7 +510,7 @@ export const useDeleteIdentityAwsAuth = () => {
|
||||
mutationFn: async ({ identityId }) => {
|
||||
const {
|
||||
data: { identityAwsAuth }
|
||||
} = await apiRequest.delete(`/api/v1/auth/aws-auth/identities/${identityId}`);
|
||||
} = await apiRequest.delete(`/v1/auth/aws-auth/identities/${identityId}`);
|
||||
return identityAwsAuth;
|
||||
},
|
||||
onSuccess: (_, { organizationId, identityId, projectId }) => {
|
||||
@@ -548,7 +548,7 @@ export const useAddIdentityOciAuth = () => {
|
||||
const {
|
||||
data: { identityOciAuth }
|
||||
} = await apiRequest.post<{ identityOciAuth: IdentityOciAuth }>(
|
||||
`/api/v1/auth/oci-auth/identities/${identityId}`,
|
||||
`/v1/auth/oci-auth/identities/${identityId}`,
|
||||
{
|
||||
tenancyOcid,
|
||||
allowedUsernames,
|
||||
@@ -596,7 +596,7 @@ export const useUpdateIdentityOciAuth = () => {
|
||||
const {
|
||||
data: { identityOciAuth }
|
||||
} = await apiRequest.patch<{ identityOciAuth: IdentityOciAuth }>(
|
||||
`/api/v1/auth/oci-auth/identities/${identityId}`,
|
||||
`/v1/auth/oci-auth/identities/${identityId}`,
|
||||
{
|
||||
tenancyOcid,
|
||||
allowedUsernames,
|
||||
@@ -635,7 +635,7 @@ export const useDeleteIdentityOciAuth = () => {
|
||||
mutationFn: async ({ identityId }) => {
|
||||
const {
|
||||
data: { identityOciAuth }
|
||||
} = await apiRequest.delete(`/api/v1/auth/oci-auth/identities/${identityId}`);
|
||||
} = await apiRequest.delete(`/v1/auth/oci-auth/identities/${identityId}`);
|
||||
return identityOciAuth;
|
||||
},
|
||||
onSuccess: (_, { organizationId, identityId, projectId }) => {
|
||||
@@ -672,7 +672,7 @@ export const useAddIdentityAliCloudAuth = () => {
|
||||
const {
|
||||
data: { identityAliCloudAuth }
|
||||
} = await apiRequest.post<{ identityAliCloudAuth: IdentityAliCloudAuth }>(
|
||||
`/api/v1/auth/alicloud-auth/identities/${identityId}`,
|
||||
`/v1/auth/alicloud-auth/identities/${identityId}`,
|
||||
{
|
||||
allowedArns,
|
||||
accessTokenTTL,
|
||||
@@ -720,7 +720,7 @@ export const useUpdateIdentityAliCloudAuth = () => {
|
||||
const {
|
||||
data: { identityAliCloudAuth }
|
||||
} = await apiRequest.patch<{ identityAliCloudAuth: IdentityAliCloudAuth }>(
|
||||
`/api/v1/auth/alicloud-auth/identities/${identityId}`,
|
||||
`/v1/auth/alicloud-auth/identities/${identityId}`,
|
||||
{
|
||||
allowedArns,
|
||||
accessTokenTTL,
|
||||
@@ -760,7 +760,7 @@ export const useDeleteIdentityAliCloudAuth = () => {
|
||||
mutationFn: async ({ identityId }) => {
|
||||
const {
|
||||
data: { identityAliCloudAuth }
|
||||
} = await apiRequest.delete(`/api/v1/auth/alicloud-auth/identities/${identityId}`);
|
||||
} = await apiRequest.delete(`/v1/auth/alicloud-auth/identities/${identityId}`);
|
||||
return identityAliCloudAuth;
|
||||
},
|
||||
onSuccess: (_, { organizationId, identityId, projectId }) => {
|
||||
@@ -800,7 +800,7 @@ export const useAddIdentityTlsCertAuth = () => {
|
||||
const {
|
||||
data: { identityTlsCertAuth }
|
||||
} = await apiRequest.post<{ identityTlsCertAuth: IdentityTlsCertAuth }>(
|
||||
`/api/v1/auth/tls-cert-auth/identities/${identityId}`,
|
||||
`/v1/auth/tls-cert-auth/identities/${identityId}`,
|
||||
{
|
||||
allowedCommonNames,
|
||||
caCertificate,
|
||||
@@ -850,7 +850,7 @@ export const useUpdateIdentityTlsCertAuth = () => {
|
||||
const {
|
||||
data: { identityTlsCertAuth }
|
||||
} = await apiRequest.patch<{ identityTlsCertAuth: IdentityTlsCertAuth }>(
|
||||
`/api/v1/auth/tls-cert-auth/identities/${identityId}`,
|
||||
`/v1/auth/tls-cert-auth/identities/${identityId}`,
|
||||
{
|
||||
caCertificate,
|
||||
allowedCommonNames,
|
||||
@@ -891,7 +891,7 @@ export const useDeleteIdentityTlsCertAuth = () => {
|
||||
mutationFn: async ({ identityId }) => {
|
||||
const {
|
||||
data: { identityTlsCertAuth }
|
||||
} = await apiRequest.delete(`/api/v1/auth/tls-cert-auth/identities/${identityId}`);
|
||||
} = await apiRequest.delete(`/v1/auth/tls-cert-auth/identities/${identityId}`);
|
||||
return identityTlsCertAuth;
|
||||
},
|
||||
onSuccess: (_, { organizationId, identityId, projectId }) => {
|
||||
@@ -936,7 +936,7 @@ export const useUpdateIdentityOidcAuth = () => {
|
||||
const {
|
||||
data: { identityOidcAuth }
|
||||
} = await apiRequest.patch<{ identityOidcAuth: IdentityOidcAuth }>(
|
||||
`/api/v1/auth/oidc-auth/identities/${identityId}`,
|
||||
`/v1/auth/oidc-auth/identities/${identityId}`,
|
||||
{
|
||||
oidcDiscoveryUrl,
|
||||
caCert,
|
||||
@@ -994,7 +994,7 @@ export const useAddIdentityOidcAuth = () => {
|
||||
const {
|
||||
data: { identityOidcAuth }
|
||||
} = await apiRequest.post<{ identityOidcAuth: IdentityOidcAuth }>(
|
||||
`/api/v1/auth/oidc-auth/identities/${identityId}`,
|
||||
`/v1/auth/oidc-auth/identities/${identityId}`,
|
||||
{
|
||||
oidcDiscoveryUrl,
|
||||
caCert,
|
||||
@@ -1038,7 +1038,7 @@ export const useDeleteIdentityOidcAuth = () => {
|
||||
mutationFn: async ({ identityId }) => {
|
||||
const {
|
||||
data: { identityOidcAuth }
|
||||
} = await apiRequest.delete(`/api/v1/auth/oidc-auth/identities/${identityId}`);
|
||||
} = await apiRequest.delete(`/v1/auth/oidc-auth/identities/${identityId}`);
|
||||
return identityOidcAuth;
|
||||
},
|
||||
onSuccess: (_, { organizationId, identityId, projectId }) => {
|
||||
@@ -1081,7 +1081,7 @@ export const useUpdateIdentityJwtAuth = () => {
|
||||
const {
|
||||
data: { identityJwtAuth }
|
||||
} = await apiRequest.patch<{ identityJwtAuth: IdentityJwtAuth }>(
|
||||
`/api/v1/auth/jwt-auth/identities/${identityId}`,
|
||||
`/v1/auth/jwt-auth/identities/${identityId}`,
|
||||
{
|
||||
configurationType,
|
||||
jwksUrl,
|
||||
@@ -1141,7 +1141,7 @@ export const useAddIdentityJwtAuth = () => {
|
||||
const {
|
||||
data: { identityJwtAuth }
|
||||
} = await apiRequest.post<{ identityJwtAuth: IdentityJwtAuth }>(
|
||||
`/api/v1/auth/jwt-auth/identities/${identityId}`,
|
||||
`/v1/auth/jwt-auth/identities/${identityId}`,
|
||||
{
|
||||
configurationType,
|
||||
jwksUrl,
|
||||
@@ -1186,7 +1186,7 @@ export const useDeleteIdentityJwtAuth = () => {
|
||||
mutationFn: async ({ identityId }) => {
|
||||
const {
|
||||
data: { identityJwtAuth }
|
||||
} = await apiRequest.delete(`/api/v1/auth/jwt-auth/identities/${identityId}`);
|
||||
} = await apiRequest.delete(`/v1/auth/jwt-auth/identities/${identityId}`);
|
||||
return identityJwtAuth;
|
||||
},
|
||||
onSuccess: (_, { organizationId, identityId, projectId }) => {
|
||||
@@ -1225,7 +1225,7 @@ export const useAddIdentityAzureAuth = () => {
|
||||
const {
|
||||
data: { identityAzureAuth }
|
||||
} = await apiRequest.post<{ identityAzureAuth: IdentityAzureAuth }>(
|
||||
`/api/v1/auth/azure-auth/identities/${identityId}`,
|
||||
`/v1/auth/azure-auth/identities/${identityId}`,
|
||||
{
|
||||
tenantId,
|
||||
resource,
|
||||
@@ -1282,7 +1282,7 @@ export const useAddIdentityKubernetesAuth = () => {
|
||||
const {
|
||||
data: { identityKubernetesAuth }
|
||||
} = await apiRequest.post<{ identityKubernetesAuth: IdentityKubernetesAuth }>(
|
||||
`/api/v1/auth/kubernetes-auth/identities/${identityId}`,
|
||||
`/v1/auth/kubernetes-auth/identities/${identityId}`,
|
||||
{
|
||||
kubernetesHost,
|
||||
tokenReviewerJwt,
|
||||
@@ -1337,7 +1337,7 @@ export const useUpdateIdentityAzureAuth = () => {
|
||||
const {
|
||||
data: { identityAzureAuth }
|
||||
} = await apiRequest.patch<{ identityAzureAuth: IdentityAzureAuth }>(
|
||||
`/api/v1/auth/azure-auth/identities/${identityId}`,
|
||||
`/v1/auth/azure-auth/identities/${identityId}`,
|
||||
{
|
||||
tenantId,
|
||||
resource,
|
||||
@@ -1377,7 +1377,7 @@ export const useDeleteIdentityAzureAuth = () => {
|
||||
mutationFn: async ({ identityId }) => {
|
||||
const {
|
||||
data: { identityAzureAuth }
|
||||
} = await apiRequest.delete(`/api/v1/auth/azure-auth/identities/${identityId}`);
|
||||
} = await apiRequest.delete(`/v1/auth/azure-auth/identities/${identityId}`);
|
||||
return identityAzureAuth;
|
||||
},
|
||||
onSuccess: (_, { organizationId, identityId, projectId }) => {
|
||||
@@ -1421,7 +1421,7 @@ export const useUpdateIdentityKubernetesAuth = () => {
|
||||
const {
|
||||
data: { identityKubernetesAuth }
|
||||
} = await apiRequest.patch<{ identityKubernetesAuth: IdentityKubernetesAuth }>(
|
||||
`/api/v1/auth/kubernetes-auth/identities/${identityId}`,
|
||||
`/v1/auth/kubernetes-auth/identities/${identityId}`,
|
||||
{
|
||||
kubernetesHost,
|
||||
tokenReviewerJwt,
|
||||
@@ -1468,7 +1468,7 @@ export const useDeleteIdentityKubernetesAuth = () => {
|
||||
mutationFn: async ({ identityId }) => {
|
||||
const {
|
||||
data: { identityKubernetesAuth }
|
||||
} = await apiRequest.delete(`/api/v1/auth/kubernetes-auth/identities/${identityId}`);
|
||||
} = await apiRequest.delete(`/v1/auth/kubernetes-auth/identities/${identityId}`);
|
||||
return identityKubernetesAuth;
|
||||
},
|
||||
onSuccess: (_, { organizationId, identityId, projectId }) => {
|
||||
@@ -1506,7 +1506,7 @@ export const useAddIdentityTokenAuth = () => {
|
||||
const {
|
||||
data: { identityTokenAuth }
|
||||
} = await apiRequest.post<{ identityTokenAuth: IdentityTokenAuth }>(
|
||||
`/api/v1/auth/token-auth/identities/${identityId}`,
|
||||
`/v1/auth/token-auth/identities/${identityId}`,
|
||||
{
|
||||
accessTokenTTL,
|
||||
accessTokenMaxTTL,
|
||||
@@ -1552,7 +1552,7 @@ export const useUpdateIdentityTokenAuth = () => {
|
||||
const {
|
||||
data: { identityTokenAuth }
|
||||
} = await apiRequest.patch<{ identityTokenAuth: IdentityTokenAuth }>(
|
||||
`/api/v1/auth/token-auth/identities/${identityId}`,
|
||||
`/v1/auth/token-auth/identities/${identityId}`,
|
||||
{
|
||||
accessTokenTTL,
|
||||
accessTokenMaxTTL,
|
||||
@@ -1591,7 +1591,7 @@ export const useDeleteIdentityTokenAuth = () => {
|
||||
mutationFn: async ({ identityId }) => {
|
||||
const {
|
||||
data: { identityTokenAuth }
|
||||
} = await apiRequest.delete(`/api/v1/auth/token-auth/identities/${identityId}`);
|
||||
} = await apiRequest.delete(`/v1/auth/token-auth/identities/${identityId}`);
|
||||
return identityTokenAuth;
|
||||
},
|
||||
onSuccess: (_, { organizationId, identityId, projectId }) => {
|
||||
@@ -1619,7 +1619,7 @@ export const useCreateTokenIdentityTokenAuth = () => {
|
||||
return useMutation<CreateTokenIdentityTokenAuthRes, object, CreateTokenIdentityTokenAuthDTO>({
|
||||
mutationFn: async ({ identityId, name }) => {
|
||||
const { data } = await apiRequest.post<CreateTokenIdentityTokenAuthRes>(
|
||||
`/api/v1/auth/token-auth/identities/${identityId}/tokens`,
|
||||
`/v1/auth/token-auth/identities/${identityId}/tokens`,
|
||||
{
|
||||
name
|
||||
}
|
||||
@@ -1642,7 +1642,7 @@ export const useUpdateIdentityTokenAuthToken = () => {
|
||||
const {
|
||||
data: { token }
|
||||
} = await apiRequest.patch<{ token: IdentityAccessToken }>(
|
||||
`/api/v1/auth/token-auth/tokens/${tokenId}`,
|
||||
`/v1/auth/token-auth/tokens/${tokenId}`,
|
||||
{
|
||||
name
|
||||
}
|
||||
@@ -1663,7 +1663,7 @@ export const useRevokeIdentityTokenAuthToken = () => {
|
||||
return useMutation<RevokeTokenRes, object, RevokeTokenDTO>({
|
||||
mutationFn: async ({ tokenId }) => {
|
||||
const { data } = await apiRequest.post<RevokeTokenRes>(
|
||||
`/api/v1/auth/token-auth/tokens/${tokenId}/revoke`
|
||||
`/v1/auth/token-auth/tokens/${tokenId}/revoke`
|
||||
);
|
||||
|
||||
return data;
|
||||
@@ -1699,7 +1699,7 @@ export const useAddIdentityLdapAuth = () => {
|
||||
lockoutCounterResetSeconds
|
||||
}) => {
|
||||
const { data } = await apiRequest.post<{ identityLdapAuth: IdentityLdapAuth }>(
|
||||
`/api/v1/auth/ldap-auth/identities/${identityId}`,
|
||||
`/v1/auth/ldap-auth/identities/${identityId}`,
|
||||
{
|
||||
templateId,
|
||||
url,
|
||||
@@ -1766,7 +1766,7 @@ export const useUpdateIdentityLdapAuth = () => {
|
||||
lockoutCounterResetSeconds
|
||||
}) => {
|
||||
const { data } = await apiRequest.patch<{ identityLdapAuth: IdentityLdapAuth }>(
|
||||
`/api/v1/auth/ldap-auth/identities/${identityId}`,
|
||||
`/v1/auth/ldap-auth/identities/${identityId}`,
|
||||
{
|
||||
templateId,
|
||||
url,
|
||||
@@ -1814,7 +1814,7 @@ export const useDeleteIdentityLdapAuth = () => {
|
||||
const queryClient = useQueryClient();
|
||||
return useMutation<IdentityLdapAuth, object, DeleteIdentityLdapAuthDTO>({
|
||||
mutationFn: async ({ identityId }) => {
|
||||
const { data } = await apiRequest.delete(`/api/v1/auth/ldap-auth/identities/${identityId}`);
|
||||
const { data } = await apiRequest.delete(`/v1/auth/ldap-auth/identities/${identityId}`);
|
||||
return data.identityLdapAuth;
|
||||
},
|
||||
onSuccess: (_, { organizationId, identityId, projectId }) => {
|
||||
@@ -1846,7 +1846,7 @@ export const useClearIdentityLdapAuthLockouts = () => {
|
||||
const {
|
||||
data: { deleted }
|
||||
} = await apiRequest.post<{ deleted: number }>(
|
||||
`/api/v1/auth/ldap-auth/identities/${identityId}/clear-lockouts`
|
||||
`/v1/auth/ldap-auth/identities/${identityId}/clear-lockouts`
|
||||
);
|
||||
return deleted;
|
||||
},
|
||||
|
||||
@@ -60,7 +60,7 @@ export const useGetOrgIdentityMembershipById = (identityId: string) => {
|
||||
const {
|
||||
data: { identity }
|
||||
} = await apiRequest.get<{ identity: IdentityMembershipOrg }>(
|
||||
`/api/v1/identities/${identityId}`
|
||||
`/v1/identities/${identityId}`
|
||||
);
|
||||
return identity;
|
||||
}
|
||||
@@ -96,7 +96,7 @@ export const useGetIdentityProjectMemberships = (identityId: string) => {
|
||||
const {
|
||||
data: { identityMemberships }
|
||||
} = await apiRequest.get<{ identityMemberships: IdentityProjectMembershipV1[] }>(
|
||||
`/api/v1/identities/${identityId}/identity-memberships`
|
||||
`/v1/identities/${identityId}/identity-memberships`
|
||||
);
|
||||
return identityMemberships;
|
||||
}
|
||||
@@ -113,7 +113,7 @@ export const useGetIdentityUniversalAuth = (
|
||||
const {
|
||||
data: { identityUniversalAuth }
|
||||
} = await apiRequest.get<{ identityUniversalAuth: IdentityUniversalAuth }>(
|
||||
`/api/v1/auth/universal-auth/identities/${identityId}`
|
||||
`/v1/auth/universal-auth/identities/${identityId}`
|
||||
);
|
||||
return identityUniversalAuth;
|
||||
},
|
||||
@@ -132,7 +132,7 @@ export const useGetIdentityUniversalAuthClientSecrets = (identityId: string) =>
|
||||
const {
|
||||
data: { clientSecretData }
|
||||
} = await apiRequest.get<{ clientSecretData: ClientSecretData[] }>(
|
||||
`/api/v1/auth/universal-auth/identities/${identityId}/client-secrets`
|
||||
`/v1/auth/universal-auth/identities/${identityId}/client-secrets`
|
||||
);
|
||||
return clientSecretData;
|
||||
}
|
||||
@@ -149,7 +149,7 @@ export const useGetIdentityGcpAuth = (
|
||||
const {
|
||||
data: { identityGcpAuth }
|
||||
} = await apiRequest.get<{ identityGcpAuth: IdentityGcpAuth }>(
|
||||
`/api/v1/auth/gcp-auth/identities/${identityId}`
|
||||
`/v1/auth/gcp-auth/identities/${identityId}`
|
||||
);
|
||||
return identityGcpAuth;
|
||||
},
|
||||
@@ -170,7 +170,7 @@ export const useGetIdentityAwsAuth = (
|
||||
const {
|
||||
data: { identityAwsAuth }
|
||||
} = await apiRequest.get<{ identityAwsAuth: IdentityAwsAuth }>(
|
||||
`/api/v1/auth/aws-auth/identities/${identityId}`
|
||||
`/v1/auth/aws-auth/identities/${identityId}`
|
||||
);
|
||||
return identityAwsAuth;
|
||||
},
|
||||
@@ -191,7 +191,7 @@ export const useGetIdentityTlsCertAuth = (
|
||||
const {
|
||||
data: { identityTlsCertAuth }
|
||||
} = await apiRequest.get<{ identityTlsCertAuth: IdentityTlsCertAuth }>(
|
||||
`/api/v1/auth/tls-cert-auth/identities/${identityId}`
|
||||
`/v1/auth/tls-cert-auth/identities/${identityId}`
|
||||
);
|
||||
return identityTlsCertAuth;
|
||||
},
|
||||
@@ -212,7 +212,7 @@ export const useGetIdentityOciAuth = (
|
||||
const {
|
||||
data: { identityOciAuth }
|
||||
} = await apiRequest.get<{ identityOciAuth: IdentityOciAuth }>(
|
||||
`/api/v1/auth/oci-auth/identities/${identityId}`
|
||||
`/v1/auth/oci-auth/identities/${identityId}`
|
||||
);
|
||||
return identityOciAuth;
|
||||
},
|
||||
@@ -233,7 +233,7 @@ export const useGetIdentityAliCloudAuth = (
|
||||
const {
|
||||
data: { identityAliCloudAuth }
|
||||
} = await apiRequest.get<{ identityAliCloudAuth: IdentityAliCloudAuth }>(
|
||||
`/api/v1/auth/alicloud-auth/identities/${identityId}`
|
||||
`/v1/auth/alicloud-auth/identities/${identityId}`
|
||||
);
|
||||
return identityAliCloudAuth;
|
||||
},
|
||||
@@ -254,7 +254,7 @@ export const useGetIdentityAzureAuth = (
|
||||
const {
|
||||
data: { identityAzureAuth }
|
||||
} = await apiRequest.get<{ identityAzureAuth: IdentityAzureAuth }>(
|
||||
`/api/v1/auth/azure-auth/identities/${identityId}`
|
||||
`/v1/auth/azure-auth/identities/${identityId}`
|
||||
);
|
||||
return identityAzureAuth;
|
||||
},
|
||||
@@ -275,7 +275,7 @@ export const useGetIdentityKubernetesAuth = (
|
||||
const {
|
||||
data: { identityKubernetesAuth }
|
||||
} = await apiRequest.get<{ identityKubernetesAuth: IdentityKubernetesAuth }>(
|
||||
`/api/v1/auth/kubernetes-auth/identities/${identityId}`
|
||||
`/v1/auth/kubernetes-auth/identities/${identityId}`
|
||||
);
|
||||
return identityKubernetesAuth;
|
||||
},
|
||||
@@ -296,7 +296,7 @@ export const useGetIdentityTokenAuth = (
|
||||
const {
|
||||
data: { identityTokenAuth }
|
||||
} = await apiRequest.get<{ identityTokenAuth: IdentityTokenAuth }>(
|
||||
`/api/v1/auth/token-auth/identities/${identityId}`
|
||||
`/v1/auth/token-auth/identities/${identityId}`
|
||||
);
|
||||
return identityTokenAuth;
|
||||
},
|
||||
@@ -317,7 +317,7 @@ export const useGetIdentityLdapAuth = (
|
||||
const {
|
||||
data: { identityLdapAuth }
|
||||
} = await apiRequest.get<{ identityLdapAuth: IdentityLdapAuth }>(
|
||||
`/api/v1/auth/ldap-auth/identities/${identityId}`
|
||||
`/v1/auth/ldap-auth/identities/${identityId}`
|
||||
);
|
||||
return identityLdapAuth;
|
||||
},
|
||||
@@ -336,7 +336,7 @@ export const useGetIdentityTokensTokenAuth = (identityId: string) => {
|
||||
const {
|
||||
data: { tokens }
|
||||
} = await apiRequest.get<{ tokens: IdentityAccessToken[] }>(
|
||||
`/api/v1/auth/token-auth/identities/${identityId}/tokens`
|
||||
`/v1/auth/token-auth/identities/${identityId}/tokens`
|
||||
);
|
||||
return tokens;
|
||||
}
|
||||
@@ -353,7 +353,7 @@ export const useGetIdentityOidcAuth = (
|
||||
const {
|
||||
data: { identityOidcAuth }
|
||||
} = await apiRequest.get<{ identityOidcAuth: IdentityOidcAuth }>(
|
||||
`/api/v1/auth/oidc-auth/identities/${identityId}`
|
||||
`/v1/auth/oidc-auth/identities/${identityId}`
|
||||
);
|
||||
return identityOidcAuth;
|
||||
},
|
||||
@@ -374,7 +374,7 @@ export const useGetIdentityJwtAuth = (
|
||||
const {
|
||||
data: { identityJwtAuth }
|
||||
} = await apiRequest.get<{ identityJwtAuth: IdentityJwtAuth }>(
|
||||
`/api/v1/auth/jwt-auth/identities/${identityId}`
|
||||
`/v1/auth/jwt-auth/identities/${identityId}`
|
||||
);
|
||||
|
||||
return identityJwtAuth;
|
||||
|
||||
@@ -37,7 +37,7 @@ export const useUpdateIdentityAuthTemplate = () => {
|
||||
return useMutation({
|
||||
mutationFn: async (dto: UpdateIdentityAuthTemplateDTO) => {
|
||||
const { data } = await apiRequest.patch<{ template: IdentityAuthTemplate }>(
|
||||
`/api/v1/identity-templates/${dto.templateId}`,
|
||||
`/v1/identity-templates/${dto.templateId}`,
|
||||
dto
|
||||
);
|
||||
return data.template;
|
||||
@@ -58,7 +58,7 @@ export const useDeleteIdentityAuthTemplate = () => {
|
||||
|
||||
return useMutation({
|
||||
mutationFn: async (dto: DeleteIdentityAuthTemplateDTO) => {
|
||||
await apiRequest.delete(`/api/v1/identity-templates/${dto.templateId}`, {
|
||||
await apiRequest.delete(`/v1/identity-templates/${dto.templateId}`, {
|
||||
params: { organizationId: dto.organizationId }
|
||||
});
|
||||
},
|
||||
@@ -79,7 +79,7 @@ export const useUnlinkTemplateUsage = () => {
|
||||
return useMutation({
|
||||
mutationFn: async (dto: UnlinkTemplateUsageDTO) => {
|
||||
const { data } = await apiRequest.post<MachineAuthTemplateUsage[]>(
|
||||
`/api/v1/identity-templates/${dto.templateId}/delete-usage`,
|
||||
`/v1/identity-templates/${dto.templateId}/delete-usage`,
|
||||
{ identityIds: dto.identityIds },
|
||||
{ params: { organizationId: dto.organizationId } }
|
||||
);
|
||||
|
||||
@@ -48,7 +48,7 @@ export const useGetIdentityAuthTemplate = (templateId: string, organizationId: s
|
||||
queryKey: identityAuthTemplatesKeys.getTemplate(templateId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<IdentityAuthTemplate>(
|
||||
`/api/v1/identity-templates/${templateId}`,
|
||||
`/v1/identity-templates/${templateId}`,
|
||||
{
|
||||
params: { organizationId }
|
||||
}
|
||||
@@ -77,7 +77,7 @@ export const useGetTemplateUsages = (dto: GetTemplateUsagesDTO) => {
|
||||
queryKey: identityAuthTemplatesKeys.getTemplateUsages(dto.templateId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<MachineAuthTemplateUsage[]>(
|
||||
`/api/v1/identity-templates/${dto.templateId}/usage`,
|
||||
`/v1/identity-templates/${dto.templateId}/usage`,
|
||||
{
|
||||
params: { organizationId: dto.organizationId }
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ export const useUpdateIdentityProjectAdditionalPrivilege = () => {
|
||||
return useMutation<TIdentityProjectPrivilege, object, TUpdateIdentityProjectPrivlegeDTO>({
|
||||
mutationFn: async ({ projectId, privilegeId, identityId, permissions, slug, type }) => {
|
||||
const { data: res } = await apiRequest.patch(
|
||||
`/api/v2/identity-project-additional-privilege/${privilegeId}`,
|
||||
`/v2/identity-project-additional-privilege/${privilegeId}`,
|
||||
{
|
||||
privilegeId,
|
||||
projectId,
|
||||
@@ -58,7 +58,7 @@ export const useDeleteIdentityProjectAdditionalPrivilege = () => {
|
||||
return useMutation<TIdentityProjectPrivilege, object, TDeleteIdentityProjectPrivilegeDTO>({
|
||||
mutationFn: async ({ identityId, projectId, privilegeId }) => {
|
||||
const { data } = await apiRequest.delete(
|
||||
`/api/v2/identity-project-additional-privilege/${privilegeId}`,
|
||||
`/v2/identity-project-additional-privilege/${privilegeId}`,
|
||||
{
|
||||
data: {
|
||||
identityId,
|
||||
|
||||
@@ -35,7 +35,7 @@ export const useGetIdentityProjectPrivilegeDetails = ({
|
||||
data: { privilege }
|
||||
} = await apiRequest.get<{
|
||||
privilege: TIdentityProjectPrivilege;
|
||||
}>(`/api/v2/identity-project-additional-privilege/${privilegeId}`, {
|
||||
}>(`/v2/identity-project-additional-privilege/${privilegeId}`, {
|
||||
params: {
|
||||
identityId,
|
||||
projectId
|
||||
|
||||
@@ -13,7 +13,7 @@ export const useGetOrgIncidentContact = (orgId: string) =>
|
||||
queryKey: incidentContactKeys.getAllContact(orgId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{ incidentContactsOrg: IncidentContact[] }>(
|
||||
`/api/v1/organization/${orgId}/incidentContactOrg`
|
||||
`/v1/organization/${orgId}/incidentContactOrg`
|
||||
);
|
||||
|
||||
return data.incidentContactsOrg;
|
||||
@@ -27,7 +27,7 @@ export const useAddIncidentContact = () => {
|
||||
|
||||
return useMutation<object, object, AddIncidentContactDTO>({
|
||||
mutationFn: async ({ orgId, email }) => {
|
||||
const { data } = await apiRequest.post(`/api/v1/organization/${orgId}/incidentContactOrg`, {
|
||||
const { data } = await apiRequest.post(`/v1/organization/${orgId}/incidentContactOrg`, {
|
||||
email
|
||||
});
|
||||
return data;
|
||||
@@ -44,7 +44,7 @@ export const useDeleteIncidentContact = () => {
|
||||
return useMutation<object, object, DeleteIncidentContactDTO>({
|
||||
mutationFn: async ({ orgId, incidentContactId }) => {
|
||||
const { data } = await apiRequest.delete(
|
||||
`/api/v1/organization/${orgId}/incidentContactOrg/${incidentContactId}`
|
||||
`/v1/organization/${orgId}/incidentContactOrg/${incidentContactId}`
|
||||
);
|
||||
return data;
|
||||
},
|
||||
|
||||
@@ -9,7 +9,7 @@ export const useDuplicateIntegrationAuth = () => {
|
||||
return useMutation<IntegrationAuth, object, TDuplicateIntegrationAuthDTO>({
|
||||
mutationFn: async (body) => {
|
||||
const { data } = await apiRequest.post<{ integrationAuth: IntegrationAuth }>(
|
||||
`/api/v1/integration-auth/${body.integrationAuthId}/duplicate`,
|
||||
`/v1/integration-auth/${body.integrationAuthId}/duplicate`,
|
||||
body
|
||||
);
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ const integrationAuthKeys = {
|
||||
|
||||
const fetchIntegrationAuthById = async (integrationAuthId: string) => {
|
||||
const { data } = await apiRequest.get<{ integrationAuth: IntegrationAuth }>(
|
||||
`/api/v1/integration-auth/${integrationAuthId}`
|
||||
`/v1/integration-auth/${integrationAuthId}`
|
||||
);
|
||||
return data.integrationAuth;
|
||||
};
|
||||
@@ -170,7 +170,7 @@ const fetchIntegrationAuthApps = async ({
|
||||
|
||||
const searchParams = new URLSearchParams(params);
|
||||
const { data } = await apiRequest.get<{ apps: App[] }>(
|
||||
`/api/v1/integration-auth/${integrationAuthId}/apps`,
|
||||
`/v1/integration-auth/${integrationAuthId}/apps`,
|
||||
{ params: searchParams }
|
||||
);
|
||||
|
||||
@@ -179,7 +179,7 @@ const fetchIntegrationAuthApps = async ({
|
||||
|
||||
const fetchIntegrationAuthTeams = async (integrationAuthId: string) => {
|
||||
const { data } = await apiRequest.get<{ teams: Team[] }>(
|
||||
`/api/v1/integration-auth/${integrationAuthId}/teams`
|
||||
`/v1/integration-auth/${integrationAuthId}/teams`
|
||||
);
|
||||
return data.teams;
|
||||
};
|
||||
@@ -192,7 +192,7 @@ const fetchIntegrationAuthChecklyGroups = async ({
|
||||
accountId: string;
|
||||
}) => {
|
||||
const { data } = await apiRequest.get<{ groups: ChecklyGroup[] }>(
|
||||
`/api/v1/integration-auth/${integrationAuthId}/checkly/groups`,
|
||||
`/v1/integration-auth/${integrationAuthId}/checkly/groups`,
|
||||
{
|
||||
params: {
|
||||
accountId
|
||||
@@ -213,7 +213,7 @@ const fetchIntegrationAuthVercelBranches = async ({
|
||||
const {
|
||||
data: { branches }
|
||||
} = await apiRequest.get<{ branches: string[] }>(
|
||||
`/api/v1/integration-auth/${integrationAuthId}/vercel/branches`,
|
||||
`/v1/integration-auth/${integrationAuthId}/vercel/branches`,
|
||||
{
|
||||
params: {
|
||||
appId
|
||||
@@ -228,7 +228,7 @@ const fetchIntegrationAuthGithubOrgs = async (integrationAuthId: string) => {
|
||||
const {
|
||||
data: { orgs }
|
||||
} = await apiRequest.get<{ orgs: Org[] }>(
|
||||
`/api/v1/integration-auth/${integrationAuthId}/github/orgs`
|
||||
`/v1/integration-auth/${integrationAuthId}/github/orgs`
|
||||
);
|
||||
|
||||
return orgs;
|
||||
@@ -244,7 +244,7 @@ const fetchIntegrationAuthGithubEnvs = async (
|
||||
const {
|
||||
data: { envs }
|
||||
} = await apiRequest.get<{ envs: Array<{ name: string; envId: string }> }>(
|
||||
`/api/v1/integration-auth/${integrationAuthId}/github/envs?repoName=${repoName}&repoOwner=${repoOwner}`
|
||||
`/v1/integration-auth/${integrationAuthId}/github/envs?repoName=${repoName}&repoOwner=${repoOwner}`
|
||||
);
|
||||
|
||||
return envs;
|
||||
@@ -254,7 +254,7 @@ const fetchIntegrationAuthQoveryOrgs = async (integrationAuthId: string) => {
|
||||
const {
|
||||
data: { orgs }
|
||||
} = await apiRequest.get<{ orgs: Org[] }>(
|
||||
`/api/v1/integration-auth/${integrationAuthId}/qovery/orgs`
|
||||
`/v1/integration-auth/${integrationAuthId}/qovery/orgs`
|
||||
);
|
||||
|
||||
return orgs;
|
||||
@@ -272,7 +272,7 @@ const fetchIntegrationAuthQoveryProjects = async ({
|
||||
const {
|
||||
data: { projects }
|
||||
} = await apiRequest.get<{ projects: Project[] }>(
|
||||
`/api/v1/integration-auth/${integrationAuthId}/qovery/projects`,
|
||||
`/v1/integration-auth/${integrationAuthId}/qovery/projects`,
|
||||
{
|
||||
params: {
|
||||
orgId
|
||||
@@ -295,7 +295,7 @@ const fetchIntegrationAuthQoveryEnvironments = async ({
|
||||
const {
|
||||
data: { environments }
|
||||
} = await apiRequest.get<{ environments: Environment[] }>(
|
||||
`/api/v1/integration-auth/${integrationAuthId}/qovery/environments`,
|
||||
`/v1/integration-auth/${integrationAuthId}/qovery/environments`,
|
||||
{
|
||||
params: {
|
||||
projectId
|
||||
@@ -321,7 +321,7 @@ const fetchIntegrationAuthQoveryScopes = async ({
|
||||
const {
|
||||
data: { apps }
|
||||
} = await apiRequest.get<{ apps: App[] }>(
|
||||
`/api/v1/integration-auth/${integrationAuthId}/qovery/apps`,
|
||||
`/v1/integration-auth/${integrationAuthId}/qovery/apps`,
|
||||
{
|
||||
params: {
|
||||
environmentId
|
||||
@@ -336,7 +336,7 @@ const fetchIntegrationAuthQoveryScopes = async ({
|
||||
const {
|
||||
data: { containers }
|
||||
} = await apiRequest.get<{ containers: App[] }>(
|
||||
`/api/v1/integration-auth/${integrationAuthId}/qovery/containers`,
|
||||
`/v1/integration-auth/${integrationAuthId}/qovery/containers`,
|
||||
{
|
||||
params: {
|
||||
environmentId
|
||||
@@ -351,7 +351,7 @@ const fetchIntegrationAuthQoveryScopes = async ({
|
||||
const {
|
||||
data: { jobs }
|
||||
} = await apiRequest.get<{ jobs: App[] }>(
|
||||
`/api/v1/integration-auth/${integrationAuthId}/qovery/jobs`,
|
||||
`/v1/integration-auth/${integrationAuthId}/qovery/jobs`,
|
||||
{
|
||||
params: {
|
||||
environmentId
|
||||
@@ -379,7 +379,7 @@ const fetchIntegrationAuthVercelCustomEnvironments = async ({
|
||||
appId: string;
|
||||
customEnvironments: VercelEnvironment[];
|
||||
}[];
|
||||
}>(`/api/v1/integration-auth/${integrationAuthId}/vercel/custom-environments`, {
|
||||
}>(`/v1/integration-auth/${integrationAuthId}/vercel/custom-environments`, {
|
||||
params: {
|
||||
teamId
|
||||
}
|
||||
@@ -396,7 +396,7 @@ const fetchIntegrationAuthHerokuPipelines = async ({
|
||||
const {
|
||||
data: { pipelines }
|
||||
} = await apiRequest.get<{ pipelines: HerokuPipelineCoupling[] }>(
|
||||
`/api/v1/integration-auth/${integrationAuthId}/heroku/pipelines`
|
||||
`/v1/integration-auth/${integrationAuthId}/heroku/pipelines`
|
||||
);
|
||||
|
||||
return pipelines;
|
||||
@@ -413,7 +413,7 @@ const fetchIntegrationAuthRailwayEnvironments = async ({
|
||||
const {
|
||||
data: { environments }
|
||||
} = await apiRequest.get<{ environments: Environment[] }>(
|
||||
`/api/v1/integration-auth/${integrationAuthId}/railway/environments`,
|
||||
`/v1/integration-auth/${integrationAuthId}/railway/environments`,
|
||||
{
|
||||
params: {
|
||||
appId
|
||||
@@ -435,7 +435,7 @@ const fetchIntegrationAuthRailwayServices = async ({
|
||||
const {
|
||||
data: { services }
|
||||
} = await apiRequest.get<{ services: Service[] }>(
|
||||
`/api/v1/integration-auth/${integrationAuthId}/railway/services`,
|
||||
`/v1/integration-auth/${integrationAuthId}/railway/services`,
|
||||
{
|
||||
params: {
|
||||
appId
|
||||
@@ -450,7 +450,7 @@ const fetchIntegrationAuthBitbucketWorkspaces = async (integrationAuthId: string
|
||||
const {
|
||||
data: { workspaces }
|
||||
} = await apiRequest.get<{ workspaces: BitbucketWorkspace[] }>(
|
||||
`/api/v1/integration-auth/${integrationAuthId}/bitbucket/workspaces`
|
||||
`/v1/integration-auth/${integrationAuthId}/bitbucket/workspaces`
|
||||
);
|
||||
return workspaces;
|
||||
};
|
||||
@@ -463,7 +463,7 @@ const fetchIntegrationAuthBitbucketEnvironments = async (
|
||||
const {
|
||||
data: { environments }
|
||||
} = await apiRequest.get<{ environments: BitbucketEnvironment[] }>(
|
||||
`/api/v1/integration-auth/${integrationAuthId}/bitbucket/environments`,
|
||||
`/v1/integration-auth/${integrationAuthId}/bitbucket/environments`,
|
||||
{
|
||||
params: {
|
||||
workspaceSlug,
|
||||
@@ -484,7 +484,7 @@ const fetchIntegrationAuthNorthflankSecretGroups = async ({
|
||||
const {
|
||||
data: { secretGroups }
|
||||
} = await apiRequest.get<{ secretGroups: NorthflankSecretGroup[] }>(
|
||||
`/api/v1/integration-auth/${integrationAuthId}/northflank/secret-groups`,
|
||||
`/v1/integration-auth/${integrationAuthId}/northflank/secret-groups`,
|
||||
{
|
||||
params: {
|
||||
appId
|
||||
@@ -507,7 +507,7 @@ const fetchIntegrationAuthTeamCityBuildConfigs = async ({
|
||||
const {
|
||||
data: { buildConfigs }
|
||||
} = await apiRequest.get<{ buildConfigs: TeamCityBuildConfig[] }>(
|
||||
`/api/v1/integration-auth/${integrationAuthId}/teamcity/build-configs`,
|
||||
`/v1/integration-auth/${integrationAuthId}/teamcity/build-configs`,
|
||||
{
|
||||
params: {
|
||||
appId
|
||||
@@ -523,7 +523,7 @@ const fetchIntegrationAuthOctopusDeploySpaces = async (integrationAuthId: string
|
||||
data: { spaces }
|
||||
} = await apiRequest.get<{
|
||||
spaces: { Name: string; Slug: string; Id: string; IsDefault: boolean }[];
|
||||
}>(`/api/v1/integration-auth/${integrationAuthId}/octopus-deploy/spaces`);
|
||||
}>(`/v1/integration-auth/${integrationAuthId}/octopus-deploy/spaces`);
|
||||
return spaces;
|
||||
};
|
||||
|
||||
@@ -534,7 +534,7 @@ const fetchIntegrationAuthOctopusDeployScopeValues = async ({
|
||||
resourceId
|
||||
}: TGetIntegrationAuthOctopusDeployScopeValuesDTO) => {
|
||||
const { data } = await apiRequest.get<TOctopusDeployVariableSetScopeValues>(
|
||||
`/api/v1/integration-auth/${integrationAuthId}/octopus-deploy/scope-values`,
|
||||
`/v1/integration-auth/${integrationAuthId}/octopus-deploy/scope-values`,
|
||||
{ params: { scope, spaceId, resourceId } }
|
||||
);
|
||||
return data;
|
||||
@@ -675,7 +675,7 @@ export const useGetIntegrationAuthAwsKmsKeys = ({
|
||||
const {
|
||||
data: { kmsKeys }
|
||||
} = await apiRequest.get<{ kmsKeys: KmsKey[] }>(
|
||||
`/api/v1/integration-auth/${integrationAuthId}/aws-secrets-manager/kms-keys`,
|
||||
`/v1/integration-auth/${integrationAuthId}/aws-secrets-manager/kms-keys`,
|
||||
{
|
||||
params: {
|
||||
region
|
||||
@@ -887,7 +887,7 @@ const fetchIntegrationAuthCircleCIOrganizations = async (integrationAuthId: stri
|
||||
data: { organizations }
|
||||
} = await apiRequest.get<{
|
||||
organizations: CircleCIOrganization[];
|
||||
}>(`/api/v1/integration-auth/${integrationAuthId}/circleci/organizations`);
|
||||
}>(`/v1/integration-auth/${integrationAuthId}/circleci/organizations`);
|
||||
return organizations;
|
||||
};
|
||||
export const useGetIntegrationAuthCircleCIOrganizations = (integrationAuthId: string) => {
|
||||
@@ -1028,7 +1028,7 @@ export const useDeleteIntegrationAuths = () => {
|
||||
return useMutation<object, object, { integration: string; workspaceId: string }>({
|
||||
mutationFn: ({ integration, workspaceId }) =>
|
||||
apiRequest.delete(
|
||||
`/api/v1/integration-auth?${new URLSearchParams({
|
||||
`/v1/integration-auth?${new URLSearchParams({
|
||||
integration,
|
||||
projectId: workspaceId
|
||||
})}`
|
||||
@@ -1049,7 +1049,7 @@ export const useDeleteIntegrationAuth = () => {
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
return useMutation<object, object, { id: string; workspaceId: string }>({
|
||||
mutationFn: ({ id }) => apiRequest.delete(`/api/v1/integration-auth/${id}`),
|
||||
mutationFn: ({ id }) => apiRequest.delete(`/v1/integration-auth/${id}`),
|
||||
onSuccess: (_, { workspaceId }) => {
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: projectKeys.getProjectAuthorization(workspaceId)
|
||||
|
||||
@@ -26,7 +26,7 @@ const fetchIntegrations = async () => {
|
||||
|
||||
const fetchIntegration = async (id: string) => {
|
||||
const { data } = await apiRequest.get<{ integration: TIntegrationWithEnv }>(
|
||||
`/api/v1/integration/${id}`
|
||||
`/v1/integration/${id}`
|
||||
);
|
||||
|
||||
return data.integration;
|
||||
@@ -137,7 +137,7 @@ export const useDeleteIntegration = () => {
|
||||
>({
|
||||
mutationFn: ({ id, shouldDeleteIntegrationSecrets }) =>
|
||||
apiRequest.delete(
|
||||
`/api/v1/integration/${id}?shouldDeleteIntegrationSecrets=${shouldDeleteIntegrationSecrets}`
|
||||
`/v1/integration/${id}?shouldDeleteIntegrationSecrets=${shouldDeleteIntegrationSecrets}`
|
||||
),
|
||||
onSuccess: (_, { workspaceId }) => {
|
||||
queryClient.invalidateQueries({
|
||||
@@ -172,7 +172,7 @@ export const useGetIntegration = (
|
||||
|
||||
export const useSyncIntegration = () => {
|
||||
return useMutation<object, object, { id: string; workspaceId: string; lastUsed: string }>({
|
||||
mutationFn: ({ id }) => apiRequest.post(`/api/v1/integration/${id}/sync`),
|
||||
mutationFn: ({ id }) => apiRequest.post(`/v1/integration/${id}/sync`),
|
||||
onSuccess: () => {
|
||||
createNotification({
|
||||
text: "Successfully triggered manual sync",
|
||||
|
||||
@@ -32,7 +32,7 @@ export const useUpdateKmipClient = () => {
|
||||
const queryClient = useQueryClient();
|
||||
return useMutation({
|
||||
mutationFn: async ({ id, name, description, permissions }: TUpdateKmipClient) => {
|
||||
const { data } = await apiRequest.patch(`/api/v1/kmip/clients/${id}`, {
|
||||
const { data } = await apiRequest.patch(`/v1/kmip/clients/${id}`, {
|
||||
name,
|
||||
description,
|
||||
permissions
|
||||
@@ -52,7 +52,7 @@ export const useDeleteKmipClients = () => {
|
||||
const queryClient = useQueryClient();
|
||||
return useMutation({
|
||||
mutationFn: async ({ id }: TDeleteKmipClient) => {
|
||||
const { data } = await apiRequest.delete(`/api/v1/kmip/clients/${id}`);
|
||||
const { data } = await apiRequest.delete(`/v1/kmip/clients/${id}`);
|
||||
|
||||
return data;
|
||||
},
|
||||
@@ -68,7 +68,7 @@ export const useGenerateKmipClientCertificate = () => {
|
||||
return useMutation({
|
||||
mutationFn: async (payload: TGenerateKmipClientCertificate) => {
|
||||
const { data } = await apiRequest.post<KmipClientCertificate>(
|
||||
`/api/v1/kmip/clients/${payload.clientId}/certificates`,
|
||||
`/v1/kmip/clients/${payload.clientId}/certificates`,
|
||||
payload
|
||||
);
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ export const useAddExternalKms = (orgId: string) => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ name, description, configuration }: AddExternalKmsType) => {
|
||||
const providerPath = configuration.type === ExternalKmsProvider.Aws ? "aws" : "gcp";
|
||||
const { data } = await apiRequest.post(`/api/v1/external-kms/${providerPath}`, {
|
||||
const { data } = await apiRequest.post(`/v1/external-kms/${providerPath}`, {
|
||||
name,
|
||||
description,
|
||||
configuration: configuration.inputs
|
||||
@@ -42,7 +42,7 @@ export const useUpdateExternalKms = (orgId: string, provider: ExternalKmsProvide
|
||||
}: {
|
||||
kmsId: string;
|
||||
} & UpdateExternalKmsType) => {
|
||||
const { data } = await apiRequest.patch(`/api/v1/external-kms/${provider}/${kmsId}`, {
|
||||
const { data } = await apiRequest.patch(`/v1/external-kms/${provider}/${kmsId}`, {
|
||||
name,
|
||||
description,
|
||||
configuration: configuration?.inputs
|
||||
@@ -61,7 +61,7 @@ export const useRemoveExternalKms = (orgId: string) => {
|
||||
const queryClient = useQueryClient();
|
||||
return useMutation({
|
||||
mutationFn: async ({ kmsId, provider }: { kmsId: string; provider: ExternalKmsProvider }) => {
|
||||
const { data } = await apiRequest.delete(`/api/v1/external-kms/${provider}/${kmsId}`);
|
||||
const { data } = await apiRequest.delete(`/v1/external-kms/${provider}/${kmsId}`);
|
||||
|
||||
return data;
|
||||
},
|
||||
@@ -77,7 +77,7 @@ export const useUpdateProjectKms = (projectId: string) => {
|
||||
mutationFn: async (
|
||||
updatedData: { type: KmsType.Internal } | { type: KmsType.External; kmsId: string }
|
||||
) => {
|
||||
const { data } = await apiRequest.patch(`/api/v1/projects/${projectId}/kms`, {
|
||||
const { data } = await apiRequest.patch(`/v1/projects/${projectId}/kms`, {
|
||||
kms: updatedData
|
||||
});
|
||||
|
||||
@@ -93,7 +93,7 @@ export const useLoadProjectKmsBackup = (projectId: string) => {
|
||||
const queryClient = useQueryClient();
|
||||
return useMutation({
|
||||
mutationFn: async (backup: string) => {
|
||||
const { data } = await apiRequest.post(`/api/v1/projects/${projectId}/kms/backup`, {
|
||||
const { data } = await apiRequest.post(`/v1/projects/${projectId}/kms/backup`, {
|
||||
backup
|
||||
});
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ export const useGetExternalKmsById = ({
|
||||
queryKey: kmsKeys.getExternalKmsById(kmsId),
|
||||
enabled: Boolean(kmsId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<Kms>(`/api/v1/external-kms/${provider}/${kmsId}`);
|
||||
const { data } = await apiRequest.get<Kms>(`/v1/external-kms/${provider}/${kmsId}`);
|
||||
return data;
|
||||
}
|
||||
});
|
||||
@@ -53,7 +53,7 @@ export const useGetActiveProjectKms = (projectId: string) => {
|
||||
name: string;
|
||||
isExternal: string;
|
||||
};
|
||||
}>(`/api/v1/projects/${projectId}/kms`);
|
||||
}>(`/v1/projects/${projectId}/kms`);
|
||||
return secretManagerKmsKey;
|
||||
}
|
||||
});
|
||||
@@ -62,7 +62,7 @@ export const useGetActiveProjectKms = (projectId: string) => {
|
||||
export const fetchProjectKmsBackup = async (projectId: string) => {
|
||||
const { data } = await apiRequest.get<{
|
||||
secretManager: string;
|
||||
}>(`/api/v1/projects/${projectId}/kms/backup`);
|
||||
}>(`/v1/projects/${projectId}/kms/backup`);
|
||||
|
||||
return data;
|
||||
};
|
||||
|
||||
@@ -116,7 +116,7 @@ export const useCreateLDAPGroupMapping = () => {
|
||||
ldapGroupCN: string;
|
||||
groupSlug: string;
|
||||
}) => {
|
||||
const { data } = await apiRequest.post(`/api/v1/ldap/config/${ldapConfigId}/group-maps`, {
|
||||
const { data } = await apiRequest.post(`/v1/ldap/config/${ldapConfigId}/group-maps`, {
|
||||
ldapGroupCN,
|
||||
groupSlug
|
||||
});
|
||||
@@ -139,7 +139,7 @@ export const useDeleteLDAPGroupMapping = () => {
|
||||
ldapGroupMapId: string;
|
||||
}) => {
|
||||
const { data } = await apiRequest.delete(
|
||||
`/api/v1/ldap/config/${ldapConfigId}/group-maps/${ldapGroupMapId}`
|
||||
`/v1/ldap/config/${ldapConfigId}/group-maps/${ldapGroupMapId}`
|
||||
);
|
||||
return data;
|
||||
},
|
||||
|
||||
@@ -15,7 +15,7 @@ export const useGetLDAPConfig = (organizationId: string) => {
|
||||
queryFn: async () => {
|
||||
try {
|
||||
const { data } = await apiRequest.get(
|
||||
`/api/v1/ldap/config?organizationId=${organizationId}`
|
||||
`/v1/ldap/config?organizationId=${organizationId}`
|
||||
);
|
||||
|
||||
return data;
|
||||
@@ -34,7 +34,7 @@ export const useGetLDAPGroupMaps = (ldapConfigId: string) => {
|
||||
if (!ldapConfigId) return [];
|
||||
|
||||
const { data } = await apiRequest.get<LDAPGroupMap[]>(
|
||||
`/api/v1/ldap/config/${ldapConfigId}/group-maps`
|
||||
`/v1/ldap/config/${ldapConfigId}/group-maps`
|
||||
);
|
||||
|
||||
return data;
|
||||
|
||||
@@ -14,7 +14,7 @@ export const useMfaSessionStatus = (mfaSessionId: string, enabled = true) => {
|
||||
queryKey: ["mfa-session-status", mfaSessionId],
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TMfaSessionStatusResponse>(
|
||||
`/api/v2/mfa-sessions/${mfaSessionId}/status`
|
||||
`/v2/mfa-sessions/${mfaSessionId}/status`
|
||||
);
|
||||
return data;
|
||||
},
|
||||
@@ -33,7 +33,7 @@ export const useVerifyMfaSession = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ mfaSessionId, mfaToken, mfaMethod }: TVerifyMfaSessionRequest) => {
|
||||
const { data } = await apiRequest.post<TVerifyMfaSessionResponse>(
|
||||
`/api/v2/mfa-sessions/${mfaSessionId}/verify`,
|
||||
`/v2/mfa-sessions/${mfaSessionId}/verify`,
|
||||
{
|
||||
mfaToken,
|
||||
mfaMethod
|
||||
|
||||
@@ -130,7 +130,7 @@ export const useUpdateVaultExternalMigrationConfig = () => {
|
||||
>({
|
||||
mutationFn: async ({ id, connectionId, namespace }) => {
|
||||
const { data } = await apiRequest.put<{ config: TVaultExternalMigrationConfig }>(
|
||||
`/api/v3/external-migration/vault/configs/${id}`,
|
||||
`/v3/external-migration/vault/configs/${id}`,
|
||||
{
|
||||
connectionId,
|
||||
namespace
|
||||
@@ -152,7 +152,7 @@ export const useDeleteVaultExternalMigrationConfig = () => {
|
||||
return useMutation<TVaultExternalMigrationConfig, Error, { id: string }>({
|
||||
mutationFn: async ({ id }) => {
|
||||
const { data } = await apiRequest.delete<{ config: TVaultExternalMigrationConfig }>(
|
||||
`/api/v3/external-migration/vault/configs/${id}`
|
||||
`/v3/external-migration/vault/configs/${id}`
|
||||
);
|
||||
return data.config;
|
||||
},
|
||||
|
||||
@@ -57,7 +57,7 @@ export const useHasCustomMigrationAvailable = (provider: ExternalMigrationProvid
|
||||
queryKey: externalMigrationQueryKeys.customMigrationAvailable(provider),
|
||||
queryFn: () =>
|
||||
apiRequest.get<{ enabled: boolean }>(
|
||||
`/api/v3/external-migration/custom-migration-enabled/${provider}`
|
||||
`/v3/external-migration/custom-migration-enabled/${provider}`
|
||||
)
|
||||
});
|
||||
};
|
||||
|
||||
@@ -35,7 +35,7 @@ export const useUpdateNotification = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ notificationId, isRead }: { notificationId: string; isRead: boolean }) => {
|
||||
const { data } = await apiRequest.patch<{ notification: TUserNotification }>(
|
||||
`/api/v1/notifications/user/${notificationId}`,
|
||||
`/v1/notifications/user/${notificationId}`,
|
||||
{ isRead }
|
||||
);
|
||||
return data.notification;
|
||||
@@ -58,7 +58,7 @@ export const useDeleteNotification = () => {
|
||||
const queryClient = useQueryClient();
|
||||
return useMutation({
|
||||
mutationFn: async (notificationId: string) => {
|
||||
await apiRequest.delete(`/api/v1/notifications/user/${notificationId}`);
|
||||
await apiRequest.delete(`/v1/notifications/user/${notificationId}`);
|
||||
},
|
||||
onSuccess: (_, notificationId) => {
|
||||
queryClient.setQueryData<TUserNotification[]>(notificationKeys.list(orgId), (oldData) => {
|
||||
|
||||
@@ -8,7 +8,7 @@ export const useOrgAdminAccessProject = () =>
|
||||
useMutation({
|
||||
mutationFn: async ({ projectId }: TOrgAdminAccessProjectDTO) => {
|
||||
const { data } = await apiRequest.post(
|
||||
`/api/v1/organization-admin/projects/${projectId}/grant-admin-access`
|
||||
`/v1/organization-admin/projects/${projectId}/grant-admin-access`
|
||||
);
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ export const useUpdateOrgIdentity = () => {
|
||||
mutationFn: async ({ identityId, name, role, hasDeleteProtection, metadata }) => {
|
||||
const {
|
||||
data: { identity }
|
||||
} = await apiRequest.patch(`/api/v1/identities/${identityId}`, {
|
||||
} = await apiRequest.patch(`/v1/identities/${identityId}`, {
|
||||
name,
|
||||
role,
|
||||
hasDeleteProtection,
|
||||
@@ -81,7 +81,7 @@ export const useUpdateOrgIdentity = () => {
|
||||
// return useMutation({
|
||||
// mutationFn: async ({ identityId, ...updates }: TUpdateOrgIdentityDTO) => {
|
||||
// const { data } = await apiRequest.patch<{ identity: TOrgIdentity }>(
|
||||
// `/api/v1/organization/identities/${identityId}`,
|
||||
// `/v1/organization/identities/${identityId}`,
|
||||
// updates
|
||||
// );
|
||||
// return data;
|
||||
@@ -97,7 +97,7 @@ export const useDeleteOrgIdentity = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ identityId }: TDeleteOrgIdentityDTO) => {
|
||||
const { data } = await apiRequest.delete<{ identity: TOrgIdentity }>(
|
||||
`/api/v1/identities/${identityId}`
|
||||
`/v1/identities/${identityId}`
|
||||
);
|
||||
return data;
|
||||
},
|
||||
|
||||
@@ -15,7 +15,7 @@ export const orgIdentityQuery = {
|
||||
queryKey: orgIdentityQuery.getByIdKey(params),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{ identity: TOrgIdentity }>(
|
||||
`/api/v1/organization/identities/${params.identityId}`
|
||||
`/v1/organization/identities/${params.identityId}`
|
||||
);
|
||||
return data.identity;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ export const useCreateOrgIdentityMembership = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ identityId, roles }: TCreateOrgIdentityMembershipDTO) => {
|
||||
const { data } = await apiRequest.post<{ identityMembership: TOrgIdentityMembership }>(
|
||||
`/api/v1/organization/identity-memberships/${identityId}`,
|
||||
`/v1/organization/identity-memberships/${identityId}`,
|
||||
{ roles }
|
||||
);
|
||||
return data.identityMembership;
|
||||
@@ -30,7 +30,7 @@ export const useDeleteOrgIdentityMembership = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ identityId }: TDeleteOrgIdentityMembershipDTO) => {
|
||||
const { data } = await apiRequest.delete<{ identityMembership: TOrgIdentityMembership }>(
|
||||
`/api/v1/organization/identity-memberships/${identityId}`
|
||||
`/v1/organization/identity-memberships/${identityId}`
|
||||
);
|
||||
return data.identityMembership;
|
||||
},
|
||||
|
||||
@@ -68,7 +68,7 @@ export const fetchOrganizationById = async (id: string) => {
|
||||
data: { organization }
|
||||
} = await apiRequest.get<{
|
||||
organization: Organization;
|
||||
}>(`/api/v1/organization/${id}`);
|
||||
}>(`/v1/organization/${id}`);
|
||||
return organization;
|
||||
};
|
||||
|
||||
@@ -129,7 +129,7 @@ export const useUpdateOrg = () => {
|
||||
blockDuplicateSecretSyncDestinations,
|
||||
secretShareBrandConfig
|
||||
}) => {
|
||||
return apiRequest.patch(`/api/v1/organization/${orgId}`, {
|
||||
return apiRequest.patch(`/v1/organization/${orgId}`, {
|
||||
name,
|
||||
authEnforced,
|
||||
googleSsoAuthEnforced,
|
||||
@@ -176,7 +176,7 @@ export const useGetOrgTrialUrl = () => {
|
||||
mutationFn: async ({ orgId, success_url }: { orgId: string; success_url: string }) => {
|
||||
const {
|
||||
data: { url }
|
||||
} = await apiRequest.post(`/api/v1/organizations/${orgId}/session/trial`, {
|
||||
} = await apiRequest.post(`/v1/organizations/${orgId}/session/trial`, {
|
||||
success_url
|
||||
});
|
||||
|
||||
@@ -190,7 +190,7 @@ export const useGetOrgPlanBillingInfo = (organizationId: string) => {
|
||||
queryKey: organizationKeys.getOrgPlanBillingInfo(organizationId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<PlanBillingInfo>(
|
||||
`/api/v1/organizations/${organizationId}/plan/billing`
|
||||
`/v1/organizations/${organizationId}/plan/billing`
|
||||
);
|
||||
|
||||
return data;
|
||||
@@ -204,7 +204,7 @@ export const useGetOrgPlanTable = (organizationId: string) => {
|
||||
queryKey: organizationKeys.getOrgPlanTable(organizationId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<OrgPlanTable>(
|
||||
`/api/v1/organizations/${organizationId}/plan/table`
|
||||
`/v1/organizations/${organizationId}/plan/table`
|
||||
);
|
||||
|
||||
return data;
|
||||
@@ -224,7 +224,7 @@ export const useGetOrgPlansTable = ({
|
||||
queryKey: organizationKeys.getOrgPlansTable(organizationId, billingCycle),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<ProductsTable>(
|
||||
`/api/v1/organizations/${organizationId}/plans/table?billingCycle=${billingCycle}`
|
||||
`/v1/organizations/${organizationId}/plans/table?billingCycle=${billingCycle}`
|
||||
);
|
||||
|
||||
return data;
|
||||
@@ -238,7 +238,7 @@ export const useGetOrgBillingDetails = (organizationId: string) => {
|
||||
queryKey: organizationKeys.getOrgBillingDetails(organizationId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<BillingDetails>(
|
||||
`/api/v1/organizations/${organizationId}/billing-details`
|
||||
`/v1/organizations/${organizationId}/billing-details`
|
||||
);
|
||||
|
||||
return data;
|
||||
@@ -260,7 +260,7 @@ export const useUpdateOrgBillingDetails = () => {
|
||||
email?: string;
|
||||
}) => {
|
||||
const { data } = await apiRequest.patch(
|
||||
`/api/v1/organizations/${organizationId}/billing-details`,
|
||||
`/v1/organizations/${organizationId}/billing-details`,
|
||||
{
|
||||
name,
|
||||
email
|
||||
@@ -282,7 +282,7 @@ export const useGetOrgPmtMethods = (organizationId: string) => {
|
||||
queryKey: organizationKeys.getOrgPmtMethods(organizationId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<PmtMethod[]>(
|
||||
`/api/v1/organizations/${organizationId}/billing-details/payment-methods`
|
||||
`/v1/organizations/${organizationId}/billing-details/payment-methods`
|
||||
);
|
||||
|
||||
return data;
|
||||
@@ -307,7 +307,7 @@ export const useAddOrgPmtMethod = () => {
|
||||
const {
|
||||
data: { url }
|
||||
} = await apiRequest.post(
|
||||
`/api/v1/organizations/${organizationId}/billing-details/payment-methods`,
|
||||
`/v1/organizations/${organizationId}/billing-details/payment-methods`,
|
||||
{
|
||||
success_url,
|
||||
cancel_url
|
||||
@@ -336,7 +336,7 @@ export const useDeleteOrgPmtMethod = () => {
|
||||
pmtMethodId: string;
|
||||
}) => {
|
||||
const { data } = await apiRequest.delete(
|
||||
`/api/v1/organizations/${organizationId}/billing-details/payment-methods/${pmtMethodId}`
|
||||
`/v1/organizations/${organizationId}/billing-details/payment-methods/${pmtMethodId}`
|
||||
);
|
||||
|
||||
return data;
|
||||
@@ -354,7 +354,7 @@ export const useGetOrgTaxIds = (organizationId: string) => {
|
||||
queryKey: organizationKeys.getOrgTaxIds(organizationId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TaxID[]>(
|
||||
`/api/v1/organizations/${organizationId}/billing-details/tax-ids`
|
||||
`/v1/organizations/${organizationId}/billing-details/tax-ids`
|
||||
);
|
||||
|
||||
return data;
|
||||
@@ -377,7 +377,7 @@ export const useAddOrgTaxId = () => {
|
||||
value: string;
|
||||
}) => {
|
||||
const { data } = await apiRequest.post(
|
||||
`/api/v1/organizations/${organizationId}/billing-details/tax-ids`,
|
||||
`/v1/organizations/${organizationId}/billing-details/tax-ids`,
|
||||
{
|
||||
type,
|
||||
value
|
||||
@@ -400,7 +400,7 @@ export const useDeleteOrgTaxId = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ organizationId, taxId }: { organizationId: string; taxId: string }) => {
|
||||
const { data } = await apiRequest.delete(
|
||||
`/api/v1/organizations/${organizationId}/billing-details/tax-ids/${taxId}`
|
||||
`/v1/organizations/${organizationId}/billing-details/tax-ids/${taxId}`
|
||||
);
|
||||
|
||||
return data;
|
||||
@@ -418,7 +418,7 @@ export const useGetOrgInvoices = (organizationId: string) => {
|
||||
queryKey: organizationKeys.getOrgInvoices(organizationId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<Invoice[]>(
|
||||
`/api/v1/organizations/${organizationId}/invoices`
|
||||
`/v1/organizations/${organizationId}/invoices`
|
||||
);
|
||||
|
||||
return data;
|
||||
@@ -431,7 +431,7 @@ export const useCreateCustomerPortalSession = () => {
|
||||
return useMutation({
|
||||
mutationFn: async (organizationId: string) => {
|
||||
const { data } = await apiRequest.post(
|
||||
`/api/v1/organizations/${organizationId}/customer-portal-session`
|
||||
`/v1/organizations/${organizationId}/customer-portal-session`
|
||||
);
|
||||
return data;
|
||||
}
|
||||
@@ -445,7 +445,7 @@ export const useGetOrgLicenses = (organizationId: string) => {
|
||||
if (organizationId === "") return undefined;
|
||||
|
||||
const { data } = await apiRequest.get<License[]>(
|
||||
`/api/v1/organizations/${organizationId}/licenses`
|
||||
`/v1/organizations/${organizationId}/licenses`
|
||||
);
|
||||
|
||||
return data;
|
||||
@@ -491,7 +491,7 @@ export const useGetIdentityMembershipOrgs = (
|
||||
}),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TOrgIdentitiesList>(
|
||||
`/api/v2/organizations/${organizationId}/identity-memberships`,
|
||||
`/v2/organizations/${organizationId}/identity-memberships`,
|
||||
{ params }
|
||||
);
|
||||
|
||||
@@ -510,7 +510,7 @@ export const useDeleteOrgById = () => {
|
||||
const {
|
||||
data: { organization }
|
||||
} = await apiRequest.delete<{ organization: Organization }>(
|
||||
`/api/v2/organizations/${organizationId}`
|
||||
`/v2/organizations/${organizationId}`
|
||||
);
|
||||
return organization;
|
||||
},
|
||||
@@ -555,7 +555,7 @@ export const useGetOrganizationGroups = (organizationId: string) => {
|
||||
const {
|
||||
data: { groups }
|
||||
} = await apiRequest.get<{ groups: TGroupOrgMembership[] }>(
|
||||
`/api/v1/organization/${organizationId}/groups`
|
||||
`/v1/organization/${organizationId}/groups`
|
||||
);
|
||||
|
||||
return groups;
|
||||
@@ -571,7 +571,7 @@ export const useGetOrgIntegrationAuths = <TData = IntegrationAuth[],>(
|
||||
queryKey: organizationKeys.getOrgIntegrationAuths(organizationId),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<{ authorizations: IntegrationAuth[] }>(
|
||||
`/api/v1/organization/${organizationId}/integration-authorizations`
|
||||
`/v1/organization/${organizationId}/integration-authorizations`
|
||||
);
|
||||
|
||||
return data.authorizations;
|
||||
|
||||
@@ -24,7 +24,7 @@ export const useCreatePamResource = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ resourceType, ...params }: TCreatePamResourceDTO) => {
|
||||
const { data } = await apiRequest.post<{ resource: TPamResource }>(
|
||||
`/api/v1/pam/resources/${resourceType}`,
|
||||
`/v1/pam/resources/${resourceType}`,
|
||||
params
|
||||
);
|
||||
|
||||
@@ -41,7 +41,7 @@ export const useUpdatePamResource = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ resourceId, resourceType, ...params }: TUpdatePamResourceDTO) => {
|
||||
const { data } = await apiRequest.patch<{ resource: TPamResource }>(
|
||||
`/api/v1/pam/resources/${resourceType}/${resourceId}`,
|
||||
`/v1/pam/resources/${resourceType}/${resourceId}`,
|
||||
params
|
||||
);
|
||||
|
||||
@@ -58,7 +58,7 @@ export const useDeletePamResource = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ resourceId, resourceType }: TDeletePamResourceDTO) => {
|
||||
const { data } = await apiRequest.delete<{ resource: TPamResource }>(
|
||||
`/api/v1/pam/resources/${resourceType}/${resourceId}`
|
||||
`/v1/pam/resources/${resourceType}/${resourceId}`
|
||||
);
|
||||
|
||||
return data.resource;
|
||||
@@ -75,7 +75,7 @@ export const useCreatePamAccount = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ resourceType, ...params }: TCreatePamAccountDTO) => {
|
||||
const { data } = await apiRequest.post<{ account: TPamAccount }>(
|
||||
`/api/v1/pam/accounts/${resourceType}`,
|
||||
`/v1/pam/accounts/${resourceType}`,
|
||||
params
|
||||
);
|
||||
|
||||
@@ -92,7 +92,7 @@ export const useUpdatePamAccount = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ resourceType, accountId, ...params }: TUpdatePamAccountDTO) => {
|
||||
const { data } = await apiRequest.patch<{ account: TPamAccount }>(
|
||||
`/api/v1/pam/accounts/${resourceType}/${accountId}`,
|
||||
`/v1/pam/accounts/${resourceType}/${accountId}`,
|
||||
params
|
||||
);
|
||||
|
||||
@@ -109,7 +109,7 @@ export const useDeletePamAccount = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ resourceType, accountId }: TDeletePamAccountDTO) => {
|
||||
const { data } = await apiRequest.delete<{ account: TPamAccount }>(
|
||||
`/api/v1/pam/accounts/${resourceType}/${accountId}`
|
||||
`/v1/pam/accounts/${resourceType}/${accountId}`
|
||||
);
|
||||
|
||||
return data.account;
|
||||
@@ -179,7 +179,7 @@ export const useUpdatePamFolder = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ folderId, ...params }: TUpdatePamFolderDTO) => {
|
||||
const { data } = await apiRequest.patch<{ folder: TPamFolder }>(
|
||||
`/api/v1/pam/folders/${folderId}`,
|
||||
`/v1/pam/folders/${folderId}`,
|
||||
params
|
||||
);
|
||||
|
||||
@@ -196,7 +196,7 @@ export const useDeletePamFolder = () => {
|
||||
return useMutation({
|
||||
mutationFn: async ({ folderId }: TDeletePamFolderDTO) => {
|
||||
const { data } = await apiRequest.delete<{ folder: TPamFolder }>(
|
||||
`/api/v1/pam/folders/${folderId}`
|
||||
`/v1/pam/folders/${folderId}`
|
||||
);
|
||||
|
||||
return data.folder;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user