UNPKG

resolvo-cms

Version:

Headless CMS for Resolvo websites with real-time content management

56 lines 1.43 kB
export interface ValidationRule { type: 'required' | 'min' | 'max' | 'pattern' | 'email' | 'url' | 'custom'; value?: any; message?: string; } export interface FieldOption { label: string; value: any; } export type FieldType = 'text' | 'textarea' | 'number' | 'boolean' | 'image' | 'file' | 'select' | 'array' | 'object' | 'rich-text' | 'date' | 'datetime' | 'color' | 'url'; export interface CMSField { id: string; name: string; label: string; type: FieldType; required: boolean; defaultValue?: any; validation?: ValidationRule[]; options?: FieldOption[]; placeholder?: string; description?: string; helpText?: string; order: number; group?: string; config?: Record<string, any>; } export interface CMSSchema { id: string; name: string; description?: string; projectId: number; fields: CMSField[]; isActive: boolean; version: number; createdAt: Date; updatedAt: Date; } export interface CreateSchemaRequest { name: string; description?: string; projectId: number; fields: Omit<CMSField, 'id'>[]; } export interface UpdateSchemaRequest { name?: string; description?: string; fields?: Omit<CMSField, 'id'>[]; isActive?: boolean; } export interface SchemaListResponse { schemas: CMSSchema[]; total: number; page: number; limit: number; } //# sourceMappingURL=schema.d.ts.map