Files
shumai/packages/dtos/src/versionStack.ts
T
Yiling-J dd0ea05a88 feat(asset): record and display agent provenance on assets and audit logs (#380)
* feat(asset): record and display agent provenance on assets and audit logs

* style(webui): apply 30% translucent frosted glass background to bot badges

* style(webui): match bot icon badge style to thumbnail media overlay (bg-black/60 text-white)

* style(webui): use "AI" text badge with pdf overlay style instead of bot icon
2026-09-04 11:27:52 +08:00

54 lines
1.3 KiB
TypeScript

import { z } from 'zod'
export const createVersionStackRequestSchema = z.object({
fileIds: z.array(z.string()),
})
export type CreateVersionStackRequest = z.infer<typeof createVersionStackRequestSchema>
export interface CreateVersionStackParams {
fileIds: string[]
projectId: string
creatorId: string
}
export const changeStackFileVersionRequestSchema = z.object({
fileId: z.string(),
beforeId: z.string(),
})
export type ChangeStackFileVersionRequest = z.infer<typeof changeStackFileVersionRequestSchema>
export interface ChangeStackFileVersionParams {
stackId: string
fileId: string
beforeId: string
}
export interface RemoveStackVersionParams {
stackId: string
fileId: string
}
export const stackVersionInfoSchema = z.object({
id: z.string(),
version: z.number(),
name: z.string().optional().nullable(),
previewUrl: z.string().optional().nullable(),
createdAt: z.string().optional().nullable(),
creator: z
.object({
id: z.string(),
name: z.string().nullable(),
image: z.string().optional().nullable(),
})
.nullable()
.optional(),
agent: z
.object({
id: z.string(),
name: z.string(),
})
.nullable()
.optional(),
})
export type StackVersionInfo = z.infer<typeof stackVersionInfoSchema>