Add descriptions to secret folders

This commit is contained in:
carlosmonastyrski
2025-03-04 10:11:20 -03:00
parent c29841fbcf
commit a0029ab469
13 changed files with 164 additions and 45 deletions
@@ -148,12 +148,13 @@ export const useUpdateFolder = () => {
const queryClient = useQueryClient();
return useMutation<object, object, TUpdateFolderDTO>({
mutationFn: async ({ path = "/", folderId, name, environment, projectId }) => {
mutationFn: async ({ path = "/", folderId, name, environment, projectId, description }) => {
const { data } = await apiRequest.patch(`/api/v1/folders/${folderId}`, {
name,
environment,
workspaceId: projectId,
path
path,
description
});
return data;
},
@@ -5,6 +5,7 @@ export enum ReservedFolders {
export type TSecretFolder = {
id: string;
name: string;
description?: string;
};
export type TGetProjectFoldersDTO = {
@@ -24,6 +25,7 @@ export type TCreateFolderDTO = {
environment: string;
name: string;
path?: string;
description?: string
};
export type TUpdateFolderDTO = {
@@ -32,6 +34,7 @@ export type TUpdateFolderDTO = {
name: string;
folderId: string;
path?: string;
description?: string
};
export type TDeleteFolderDTO = {
@@ -49,5 +52,6 @@ export type TUpdateFolderBatchDTO = {
environment: string;
id: string;
path?: string;
description?: string;
}[];
};