flnxi-Wu/lib/upload-template-save-validation.ts
2026-06-03 18:41:52 +08:00

28 lines
653 B
TypeScript

export type FormattedUploadTemplateField = {
id?: string | null
key: string
label: string
type: string
required: boolean
orderIndex: number
layoutWidth: string
validations: string | null
optionsSource: string | null
optionsStatic: string | null
allowedExtensions: string | null
visibleOnHomeFilter: boolean
isSearchable: boolean
isReadOnly: boolean
addToCategory: boolean
conditions: string | null
}
export type UploadTemplateSaveValidationResult =
| { valid: true; fields: FormattedUploadTemplateField[] }
| {
valid: false
error: string
field: string
details?: Record<string, unknown>
}