mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 20:25:43 +00:00
Fix merge conflicts
This commit is contained in:
@@ -26,9 +26,9 @@ export {
|
||||
useGetWorkspaceIndexStatus,
|
||||
useGetWorkspaceIntegrations,
|
||||
useGetWorkspaceSecrets,
|
||||
useGetWorkspaceSlackConfig,
|
||||
useGetWorkspaceUserDetails,
|
||||
useGetWorkspaceUsers,
|
||||
useGetWorkspaceWorkflowIntegrationConfig,
|
||||
useListWorkspaceCas,
|
||||
useListWorkspaceCertificates,
|
||||
useListWorkspaceCertificateTemplates,
|
||||
|
||||
@@ -21,7 +21,10 @@ import { TSshHost } from "../sshHost/types";
|
||||
import { TSshHostGroup } from "../sshHostGroup/types";
|
||||
import { userKeys } from "../users/query-keys";
|
||||
import { TWorkspaceUser } from "../users/types";
|
||||
import { ProjectSlackConfig } from "../workflowIntegrations/types";
|
||||
import {
|
||||
ProjectWorkflowIntegrationConfig,
|
||||
WorkflowIntegrationPlatform
|
||||
} from "../workflowIntegrations/types";
|
||||
import { workspaceKeys } from "./query-keys";
|
||||
import {
|
||||
CreateEnvironmentDTO,
|
||||
@@ -899,13 +902,27 @@ export const useListWorkspaceSshCertificateTemplates = (projectId: string) => {
|
||||
});
|
||||
};
|
||||
|
||||
export const useGetWorkspaceSlackConfig = ({ workspaceId }: { workspaceId: string }) => {
|
||||
export const useGetWorkspaceWorkflowIntegrationConfig = ({
|
||||
workspaceId,
|
||||
integration
|
||||
}: {
|
||||
workspaceId: string;
|
||||
integration: WorkflowIntegrationPlatform;
|
||||
}) => {
|
||||
return useQuery({
|
||||
queryKey: workspaceKeys.getWorkspaceSlackConfig(workspaceId),
|
||||
queryKey: workspaceKeys.getWorkspaceWorkflowIntegrationConfig(workspaceId, integration),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<ProjectSlackConfig>(
|
||||
`/api/v1/workspace/${workspaceId}/slack-config`
|
||||
);
|
||||
const { data } = await apiRequest
|
||||
.get<ProjectWorkflowIntegrationConfig>(
|
||||
`/api/v1/workspace/${workspaceId}/workflow-integration-config/${integration}`
|
||||
)
|
||||
.catch((err) => {
|
||||
if (err.response.status === 404) {
|
||||
return { data: null };
|
||||
}
|
||||
|
||||
throw err;
|
||||
});
|
||||
|
||||
return data;
|
||||
},
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { TListProjectIdentitiesDTO, TSearchProjectsDTO } from "@app/hooks/api/workspace/types";
|
||||
|
||||
import type { CaStatus } from "../ca";
|
||||
import { WorkflowIntegrationPlatform } from "../workflowIntegrations/types";
|
||||
|
||||
export const workspaceKeys = {
|
||||
getWorkspaceById: (workspaceId: string) => ["workspaces", { workspaceId }] as const,
|
||||
@@ -54,8 +55,10 @@ export const workspaceKeys = {
|
||||
[{ workspaceId }, "workspace-pki-collections"] as const,
|
||||
getWorkspaceCertificateTemplates: (workspaceId: string) =>
|
||||
[{ workspaceId }, "workspace-certificate-templates"] as const,
|
||||
getWorkspaceSlackConfig: (workspaceId: string) =>
|
||||
[{ workspaceId }, "workspace-slack-config"] as const,
|
||||
getWorkspaceWorkflowIntegrationConfig: (
|
||||
workspaceId: string,
|
||||
integration: WorkflowIntegrationPlatform
|
||||
) => [{ workspaceId, integration }, "workspace-workflow-integration-config"] as const,
|
||||
getWorkspaceSshCas: (projectId: string) => [{ projectId }, "workspace-ssh-cas"] as const,
|
||||
allWorkspaceSshCertificates: (projectId: string) =>
|
||||
[{ projectId }, "workspace-ssh-certificates"] as const,
|
||||
|
||||
Reference in New Issue
Block a user