Add new commit logic on every folder/secret operation

This commit is contained in:
carlosmonastyrski
2025-05-06 18:57:25 -03:00
parent 32a3e1d200
commit f493a617b1
32 changed files with 675 additions and 140 deletions
+1 -2
View File
@@ -9,8 +9,7 @@ import { TImmutableDBKeys } from "./models";
export const FolderCheckpointsSchema = z.object({
id: z.string().uuid(),
folderCommitId: z.coerce.number(),
date: z.date(),
folderCommitId: z.string().uuid(),
createdAt: z.date(),
updatedAt: z.date()
});
@@ -9,7 +9,7 @@ import { TImmutableDBKeys } from "./models";
export const FolderCommitChangesSchema = z.object({
id: z.string().uuid(),
folderCommitId: z.coerce.number(),
folderCommitId: z.string().uuid(),
changeType: z.string(),
secretVersionId: z.string().uuid().nullable().optional(),
folderVersionId: z.string().uuid().nullable().optional(),
+3 -3
View File
@@ -8,11 +8,11 @@ import { z } from "zod";
import { TImmutableDBKeys } from "./models";
export const FolderCommitsSchema = z.object({
id: z.coerce.number(),
actorName: z.string(),
id: z.string().uuid(),
commitId: z.coerce.number(),
actorMetadata: z.unknown(),
actorType: z.string(),
message: z.string().nullable().optional(),
date: z.date(),
folderId: z.string().uuid(),
createdAt: z.date(),
updatedAt: z.date()
@@ -11,7 +11,7 @@ export const FolderTreeCheckpointResourcesSchema = z.object({
id: z.string().uuid(),
folderTreeCheckpointId: z.string().uuid(),
folderId: z.string().uuid(),
folderCommitId: z.coerce.number(),
folderCommitId: z.string().uuid(),
createdAt: z.date(),
updatedAt: z.date()
});
@@ -9,8 +9,7 @@ import { TImmutableDBKeys } from "./models";
export const FolderTreeCheckpointsSchema = z.object({
id: z.string().uuid(),
folderCommitId: z.coerce.number(),
date: z.date(),
folderCommitId: z.string().uuid(),
createdAt: z.date(),
updatedAt: z.date()
});
+1 -1
View File
@@ -161,7 +161,7 @@ export enum TableName {
FolderTreeCheckpointResources = "folder_tree_checkpoint_resources"
}
export type TImmutableDBKeys = "id" | "createdAt" | "updatedAt";
export type TImmutableDBKeys = "id" | "createdAt" | "updatedAt" | "commitId";
export const UserDeviceSchema = z
.object({