improvements: address feedback

This commit is contained in:
Scott Wilson
2025-01-20 22:17:20 -08:00
parent 6341b7e989
commit 3c1fc024c2
57 changed files with 981 additions and 432 deletions
@@ -48,8 +48,10 @@ export const useUpdateSecretSync = () => {
export const useDeleteSecretSync = () => {
const queryClient = useQueryClient();
return useMutation({
mutationFn: async ({ syncId, destination }: TDeleteSecretSyncDTO) => {
const { data } = await apiRequest.delete(`/api/v1/secret-syncs/${destination}/${syncId}`);
mutationFn: async ({ syncId, destination, removeSecrets }: TDeleteSecretSyncDTO) => {
const { data } = await apiRequest.delete(`/api/v1/secret-syncs/${destination}/${syncId}`, {
params: { removeSecrets }
});
return data;
},
@@ -37,6 +37,7 @@ export type TUpdateSecretSyncDTO = Partial<
export type TDeleteSecretSyncDTO = {
destination: SecretSync;
syncId: string;
removeSecrets: boolean;
};
export type TTriggerSecretSyncSyncSecretsDTO = {
@@ -6,7 +6,7 @@ export type TRootSecretSync = {
name: string;
description?: string | null;
version: number;
folderId: string;
folderId: string | null;
connectionId: string;
createdAt: string;
updatedAt: string;
@@ -38,9 +38,9 @@ export type TRootSecretSync = {
id: string;
name: string;
slug: string;
};
} | null;
folder: {
id: string;
path: string;
};
} | null;
};