mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-29 20:34:28 +00:00
* feat(storage): add archive storage support for assets * fix(webui): show archive icon in front of file name in breadcrumb bar * fix(webui): display archive icon in breadcrumbs when restoring * refactor(transcode): simplify restore asset workflow to single while loop * docs(configuration): add archive storage documentation and readme entries * fix(webui): show archive icon in front of version names and prevent version card overflow * fix(webui): fix overflow in manage versions dialog scroll area * fix(webui): prevent manage versions dialog overflow on long file names * docs(configuration): fix archive storage environment variables and defaults * fix(storage): address code review findings for archive storage
55 lines
1.3 KiB
TypeScript
55 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(),
|
|
status: 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>
|