generic src for react admin

This commit is contained in:
2026-04-01 14:22:14 +05:30
parent 4d06859cb0
commit 14dcd19b17
13 changed files with 1137 additions and 7 deletions

View File

@@ -0,0 +1,33 @@
export type FieldType =
| 'string'
| 'number'
| 'boolean'
| 'date'
| 'markdown'
| 'enum'
| 'object'
| 'array';
export interface ResourceField {
type: FieldType;
label: string;
required?: boolean;
options?: string[]; // for enum
schema?: Record<string, ResourceField>; // for object or array items
readOnly?: boolean;
}
export interface ResourceConfig {
name: string;
label: string;
pluralLabel: string;
endpoint: string;
primaryKey: string;
fields: Record<string, ResourceField>;
}
export interface AppConfig {
baseUrl: string;
authBaseUrl: string;
resources: ResourceConfig[];
}