@ghentcdh/crouton-core 0.0.1-alpha.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2894 @@
1
+ import z$1, { z, ZodObject } from 'zod';
2
+ import * as zod_v4_core from 'zod/v4/core';
3
+ import { Layout, JsonSchema } from '@jsonforms/core';
4
+
5
+ declare const Operator: readonly ["contains", "not_contains", "equals", "not_equals", "gt", "lt", "isnull", "isnotnull"];
6
+ type OperatorType = (typeof Operator)[number];
7
+ /** Human-readable label shown in the filter operator dropdown. */
8
+ declare const OperatorLabel: Record<OperatorType, string>;
9
+ declare const OperatorOptions: {
10
+ value: "contains" | "not_contains" | "equals" | "not_equals" | "gt" | "lt" | "isnull" | "isnotnull";
11
+ label: string;
12
+ }[];
13
+ /** Operators that don't require a user-supplied value. */
14
+ declare const OperatorNoValue: Set<"contains" | "not_contains" | "equals" | "not_equals" | "gt" | "lt" | "isnull" | "isnotnull">;
15
+ /** Field types used to restrict which operators are shown in the filter UI. */
16
+ type FieldType = 'string' | 'number' | 'date' | 'boolean' | 'enum';
17
+ /** Operators available for each field type. */
18
+ declare const OperatorsByType: Record<FieldType, OperatorType[]>;
19
+ type Filter = {
20
+ key: string;
21
+ value: any;
22
+ operator: OperatorType;
23
+ label?: string;
24
+ };
25
+ declare const buildSort: (key: string, sortDir?: string) => any;
26
+ declare const buildSortKey: (keys: string[], sortDir: any) => any;
27
+ declare const buildFilter: (filters: string[]) => Record<string, any>;
28
+ declare const extractFilters: (filters: string[]) => Filter[];
29
+ declare const filterToString: (filter: Filter) => string;
30
+ declare const stringToFilter: (s: string) => Filter;
31
+
32
+ declare const SortDirEnum: z.ZodEnum<{
33
+ asc: "asc";
34
+ desc: "desc";
35
+ }>;
36
+ type SortDir = z.infer<typeof SortDirEnum>;
37
+ declare const RequestSchema: z.ZodObject<{
38
+ page: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
39
+ pageSize: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
40
+ sort: z.ZodDefault<z.ZodOptional<z.ZodString>>;
41
+ sortDir: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
42
+ asc: "asc";
43
+ desc: "desc";
44
+ }>>>;
45
+ filter: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>>>;
46
+ }, z.core.$strip>;
47
+ type ListRequest = z.infer<typeof RequestSchema>;
48
+ /** @deprecated Use `ListRequest` instead — `Request` shadows the global DOM `Request` type. */
49
+ type Request = ListRequest;
50
+ declare const RequestSchemaWithOffset: z.ZodPipe<z.ZodObject<{
51
+ page: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
52
+ pageSize: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
53
+ sort: z.ZodDefault<z.ZodOptional<z.ZodString>>;
54
+ sortDir: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
55
+ asc: "asc";
56
+ desc: "desc";
57
+ }>>>;
58
+ filter: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>>>;
59
+ }, z.core.$strip>, z.ZodTransform<{
60
+ sort: string;
61
+ offset: number;
62
+ page: number;
63
+ pageSize: number;
64
+ sortDir: "asc" | "desc";
65
+ filter: string[];
66
+ }, {
67
+ page: number;
68
+ pageSize: number;
69
+ sort: string;
70
+ sortDir: "asc" | "desc";
71
+ filter: string[];
72
+ }>>;
73
+
74
+ declare const ResponseRequestSchema: z.ZodObject<{
75
+ page: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
76
+ pageSize: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
77
+ sort: z.ZodDefault<z.ZodOptional<z.ZodString>>;
78
+ sortDir: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
79
+ asc: "asc";
80
+ desc: "desc";
81
+ }>>>;
82
+ filter: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>>>;
83
+ count: z.ZodCoercedNumber<unknown>;
84
+ totalPages: z.ZodCoercedNumber<unknown>;
85
+ }, z.core.$strip>;
86
+ declare const ResponseSchema: z.ZodObject<{
87
+ data: z.ZodArray<z.ZodUnknown>;
88
+ request: z.ZodObject<{
89
+ page: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
90
+ pageSize: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
91
+ sort: z.ZodDefault<z.ZodOptional<z.ZodString>>;
92
+ sortDir: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
93
+ asc: "asc";
94
+ desc: "desc";
95
+ }>>>;
96
+ filter: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>>>;
97
+ count: z.ZodCoercedNumber<unknown>;
98
+ totalPages: z.ZodCoercedNumber<unknown>;
99
+ }, z.core.$strip>;
100
+ }, z.core.$strip>;
101
+ type ResponseData<TYPE> = z.infer<typeof ResponseSchema> & {
102
+ data: TYPE[];
103
+ };
104
+
105
+ declare const PositiveRequestNumber: () => z.ZodCoercedNumber<unknown>;
106
+ declare const StringOrArray: () => z.ZodPipe<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>;
107
+
108
+ declare enum ModalSize {
109
+ xs = "xs",
110
+ sm = "sm",
111
+ lg = "lg",
112
+ xl = "xl"
113
+ }
114
+ type ModalSizeType = keyof typeof ModalSize;
115
+
116
+ /** @deprecated Use `ModalSizeType` instead. */
117
+ type SizeType = ModalSizeType;
118
+ type JsonFormsLayout = {
119
+ uiSchema: Layout;
120
+ schema: JsonSchema;
121
+ modalSize?: ModalSizeType;
122
+ };
123
+ type FormSchemaModel = {
124
+ form: JsonFormsLayout;
125
+ table?: JsonFormsLayout;
126
+ filter?: JsonFormsLayout;
127
+ uri: string;
128
+ searchUri: string;
129
+ };
130
+ declare const createSchema: (props: {
131
+ uiSchema: any;
132
+ tableSchema?: JsonSchema;
133
+ filterSchema?: JsonSchema;
134
+ schema: ZodObject<any>;
135
+ dtoSchema: ZodObject<any>;
136
+ responseSchema?: ZodObject<any>;
137
+ uri: string;
138
+ searchUri?: string;
139
+ modalSize?: ModalSizeType;
140
+ }) => {
141
+ dtoSchema: ZodObject<any, zod_v4_core.$strip>;
142
+ responseSchema: ZodObject<any, zod_v4_core.$strip>;
143
+ schema: FormSchemaModel;
144
+ };
145
+
146
+ type Field = {
147
+ scope: string;
148
+ };
149
+ /**
150
+ * Recursively drop nullable fields from `required`. A nullable field
151
+ * (anyOf with a `{ type: "null" }` branch) should be treated as optional.
152
+ */
153
+ declare const dropNullableFromRequired: (schema: JsonSchema) => JsonSchema;
154
+ declare const enforceRequiredStringMinLength: (schema: JsonSchema) => JsonSchema;
155
+ declare const findProperty: <F extends Field>(column: F, schema: JsonSchema) => {
156
+ id: string;
157
+ property: any;
158
+ } | {
159
+ id: null;
160
+ property: null;
161
+ };
162
+
163
+ type GroupType<TYPE> = {
164
+ type: 'Group';
165
+ label: string;
166
+ elements?: ElementBuilder<TYPE>[];
167
+ };
168
+ declare class GroupBuilder<TYPE> extends BuilderWithElements<GroupType<TYPE>, TYPE> {
169
+ private readonly label;
170
+ private constructor();
171
+ static label(label: string): GroupBuilder<unknown>;
172
+ build(): GroupType<TYPE>;
173
+ }
174
+
175
+ type Rule = {
176
+ effect: 'SHOW';
177
+ condition: any;
178
+ };
179
+ type CategoryType<TYPE> = {
180
+ type: 'Category';
181
+ label: string;
182
+ elements?: ElementBuilder<TYPE>[];
183
+ rule?: Rule;
184
+ };
185
+ declare class CategoryBuilder<TYPE> extends BuilderWithElements<CategoryType<TYPE>, TYPE> {
186
+ private readonly label;
187
+ private rule;
188
+ private constructor();
189
+ static label(label: string): CategoryBuilder<unknown>;
190
+ build(): CategoryType<TYPE>;
191
+ }
192
+
193
+ declare const ControlType: {
194
+ readonly number: "number";
195
+ readonly string: "string";
196
+ readonly integer: "Integer";
197
+ readonly autocomplete: "autocomplete";
198
+ readonly textArea: "textarea";
199
+ readonly markdown: "markdown";
200
+ readonly array: "array";
201
+ readonly custom: "custom";
202
+ readonly select: "select";
203
+ readonly mutliSelect: "mutliSelect";
204
+ readonly boolean: "boolean";
205
+ readonly link: "link";
206
+ readonly relation: "relation";
207
+ readonly date: "date";
208
+ readonly dateTime: "dateTime";
209
+ readonly dateRange: "date-range";
210
+ };
211
+ interface DateRangeOptions extends ControlOption {
212
+ format: 'date-range';
213
+ /** Label shown above the start date input. Defaults to "From". */
214
+ fromLabel?: string;
215
+ /** Label shown above the end date input. Defaults to "To". */
216
+ toLabel?: string;
217
+ /** JSON object key for the start date. Defaults to "from". */
218
+ fromField?: string;
219
+ /** JSON object key for the end date. Defaults to "to". */
220
+ toField?: string;
221
+ }
222
+ interface TextAreaOptions extends ControlOption {
223
+ format: 'textarea';
224
+ }
225
+ interface MarkdownOptions extends ControlOption {
226
+ format: 'markdown';
227
+ minHeight: string;
228
+ }
229
+ interface DetailOptions extends ControlOption {
230
+ format: 'array';
231
+ layout: 'row' | 'column';
232
+ }
233
+ interface SelectOptions extends ControlOption {
234
+ format: 'select' | 'multiselect';
235
+ options: Array<any>;
236
+ values?: Array<any>;
237
+ resource?: string;
238
+ labelKey?: string;
239
+ valueKey?: string;
240
+ }
241
+ interface AutocompleteOptions extends Omit<SelectOptions, 'format'> {
242
+ format: 'autocomplete';
243
+ freeText?: boolean;
244
+ enableCreate?: boolean;
245
+ }
246
+ interface AutocompleteRemoteOptions extends Omit<AutocompleteOptions, 'format' | 'options'> {
247
+ format: 'autocomplete';
248
+ uri: string;
249
+ dataField?: string;
250
+ skipAuth?: boolean;
251
+ }
252
+ interface AutocompleteResourceOptions extends Omit<AutocompleteOptions, 'format' | 'options'> {
253
+ format: 'autocomplete';
254
+ resource: string;
255
+ skipAuth?: boolean;
256
+ }
257
+ type AutocompleteAllOptions = AutocompleteOptions | AutocompleteRemoteOptions | AutocompleteResourceOptions;
258
+ type ArrayActionType = 'edit';
259
+ type ArrayAction = {
260
+ type: ArrayActionType;
261
+ idField: string;
262
+ };
263
+ interface ControlOption {
264
+ format?: string;
265
+ readonly?: boolean;
266
+ label?: string;
267
+ styles?: Partial<any>;
268
+ elements?: any;
269
+ elementLabelProp?: string;
270
+ customLabel?: string;
271
+ actions?: ArrayAction[];
272
+ placeholder?: string;
273
+ hideLabel?: boolean;
274
+ hideActions?: boolean;
275
+ layout?: 'row' | 'column';
276
+ labelKey?: string;
277
+ valueKey?: string;
278
+ options?: Array<any>;
279
+ dataField?: string;
280
+ uri?: string;
281
+ skipAuth?: boolean;
282
+ freeText?: boolean;
283
+ enableCreate?: boolean;
284
+ /** date-range: label above the start date input. */
285
+ fromLabel?: string;
286
+ /** date-range: label above the end date input. */
287
+ toLabel?: string;
288
+ /** date-range: JSON object key for the start date. Defaults to "from". */
289
+ fromField?: string;
290
+ /** date-range: JSON object key for the end date. Defaults to "to". */
291
+ toField?: string;
292
+ customRender?: any;
293
+ }
294
+ type ControlTypes = {
295
+ type: 'Control' | 'Object' | 'TextCell';
296
+ scope: string;
297
+ options?: TextAreaOptions | AutocompleteOptions | DetailOptions;
298
+ };
299
+ declare class ControlBuilder<TYPE, KEY = keyof TYPE> extends Builder<ControlTypes> {
300
+ private readonly scope;
301
+ private options;
302
+ private _detail?;
303
+ private constructor();
304
+ static asObject<TYPE>(property: keyof TYPE): ControlBuilder<TYPE>;
305
+ static properties<TYPE>(property: keyof TYPE): ControlBuilder<TYPE>;
306
+ static asCustom<TYPE>(property: keyof TYPE, type: string): ControlBuilder<TYPE>;
307
+ setCustomRender(customRender: string): this;
308
+ detail<TYPE>(layoutBuilder: LayoutBuilder<TYPE>, label?: string): this;
309
+ addAction(action: ArrayAction): this;
310
+ detailFixed<TYPE>(layoutBuilder: LayoutBuilder<TYPE>, options?: {
311
+ label?: string;
312
+ layout?: 'row' | 'column';
313
+ }): this;
314
+ labelKey(labelKey: string): this;
315
+ readonly(): ControlBuilder<TYPE>;
316
+ link(): ControlBuilder<TYPE>;
317
+ markdown(options?: Omit<MarkdownOptions, 'format'>): ControlBuilder<TYPE>;
318
+ textArea(options?: Omit<TextAreaOptions, 'format'>): this;
319
+ autocomplete(options: Omit<AutocompleteOptions, 'format'> | Omit<AutocompleteRemoteOptions, 'format'>): this;
320
+ control(format: string, options?: Partial<ControlOption>): this;
321
+ select(options: Omit<SelectOptions, 'format'>): this;
322
+ mutliSelect(options: Omit<SelectOptions, 'format'>): this;
323
+ width(width: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full'): this;
324
+ customLabel(label: string): this;
325
+ placeHolder(placeholder: string): this;
326
+ hideLabel(): this;
327
+ private addOptions;
328
+ build(): ControlTypes;
329
+ }
330
+
331
+ declare abstract class Builder<TYPE> {
332
+ protected readonly type: string;
333
+ constructor(type: string);
334
+ abstract build(): TYPE;
335
+ }
336
+ declare abstract class BuilderWithElements<TYPE, CONTROL_TYPE> extends Builder<TYPE> {
337
+ protected elements: Array<ElementBuilder<CONTROL_TYPE>>;
338
+ addControl(control: ElementBuilder<CONTROL_TYPE>): this;
339
+ addControls(...controls: Array<ElementBuilder<CONTROL_TYPE>>): this;
340
+ protected buildElements(): (ControlTypes | LayoutType | CategoryType<CONTROL_TYPE> | GroupType<CONTROL_TYPE> | TextCellType)[];
341
+ }
342
+
343
+ interface TextCellOption {
344
+ format: 'TextCell';
345
+ sortId?: string;
346
+ sortable?: boolean;
347
+ }
348
+ interface KeyValueOption extends Omit<TextCellOption, 'format'> {
349
+ format: 'keyValue';
350
+ key: string;
351
+ }
352
+ type TextCellType = {
353
+ type: 'TextCell';
354
+ scope: string;
355
+ options?: KeyValueOption;
356
+ };
357
+ declare class TextCellBuilder<TYPE> extends Builder<TextCellType> {
358
+ private readonly scope;
359
+ private options;
360
+ protected constructor(scope: string, type?: string);
361
+ static properties<TYPE>(property: keyof TYPE): TextCellBuilder<TYPE>;
362
+ key(key: string): TextCellBuilder<TYPE>;
363
+ setSortId(sortId: string): TextCellBuilder<TYPE>;
364
+ build(): TextCellType;
365
+ }
366
+ declare class BooleanCellBuilder extends TextCellBuilder<boolean> {
367
+ protected constructor(scope: string);
368
+ static properties<TYPE>(property: keyof TYPE): BooleanCellBuilder;
369
+ }
370
+ declare class TableBuilder<TYPE> {
371
+ private builder;
372
+ private constructor();
373
+ static init<TYPE>(): TableBuilder<TYPE>;
374
+ addControl(control: TextCellBuilder<TYPE>): this;
375
+ addControls(...controls: Array<TextCellBuilder<TYPE>>): this;
376
+ build(): LayoutType;
377
+ }
378
+
379
+ type ElementBuilder<TYPE> = ControlBuilder<TYPE> | LayoutBuilder<TYPE> | CategoryBuilder<TYPE> | GroupBuilder<TYPE> | TextCellBuilder<TYPE>;
380
+ declare const LayoutTypes: {
381
+ readonly HorizontalLayout: "HorizontalLayout";
382
+ readonly VerticalLayout: "VerticalLayout";
383
+ readonly CollapseLayout: "CollapseLayout";
384
+ readonly GridLayout: "GridLayout";
385
+ };
386
+ type _LayoutTypes = (typeof LayoutTypes)[keyof typeof LayoutTypes];
387
+ type LayoutType = {
388
+ type: 'LayoutTypes';
389
+ elements: Array<ControlTypes | LayoutType>;
390
+ };
391
+ declare class LayoutBuilder<TYPE> extends BuilderWithElements<LayoutType, TYPE> {
392
+ private options;
393
+ protected constructor(type: _LayoutTypes, options?: {});
394
+ static horizontal<TYPE>(): LayoutBuilder<TYPE>;
395
+ static collapse<TYPE>(): LayoutBuilder<TYPE>;
396
+ static vertical<TYPE>(): LayoutBuilder<TYPE>;
397
+ static grid<TYPE>(): LayoutBuilder<TYPE>;
398
+ titleKey(titleKey: string): this;
399
+ title(title: string): this;
400
+ private addOptions;
401
+ build(): LayoutType;
402
+ }
403
+
404
+ declare const uiFromJsonSchema: (jsonSchema: JsonSchema) => LayoutType;
405
+
406
+ /**
407
+ * Helpers for the `{ value, label }` envelope used by enum/select columns.
408
+ *
409
+ * The DB stores a bare scalar; the API can wrap it into `{ value, label }` on
410
+ * read (so the UI shows a human-readable label) and unwrap it back to the
411
+ * scalar on write. These helpers are pure and shared by the read/write paths.
412
+ */
413
+ interface ValueLabelOption {
414
+ value: unknown;
415
+ label: string;
416
+ }
417
+ interface ValueLabel {
418
+ value: unknown;
419
+ label: string;
420
+ }
421
+ /**
422
+ * Wrap a stored scalar into `{ value, label }` using the option list.
423
+ * - `null` / `undefined` pass through unchanged (never wrapped).
424
+ * - An array (multi-value enum) is mapped element-wise.
425
+ * - A value missing from `values` falls back to `label = String(value)`.
426
+ */
427
+ declare const toValueLabel: (value: unknown, values: ValueLabelOption[]) => unknown;
428
+ /**
429
+ * Unwrap a `{ value, label }` (or array of them) back to the bare scalar for
430
+ * persistence / filtering. Plain scalars pass through unchanged (idempotent).
431
+ */
432
+ declare const fromValueLabel: (input: unknown) => unknown;
433
+
434
+ type ColumnDef = TextCellType & {
435
+ id: string;
436
+ label: string;
437
+ };
438
+ declare const findColumnDef: (column: TextCellType, schema: JsonSchema) => TextCellType & {
439
+ id: string;
440
+ };
441
+
442
+ /**
443
+ * Shape of a `data-source.json`. The `type`/`name`/`default` keys are also read by crouton-api at runtime;
444
+ * the rest are codegen-only.
445
+ */
446
+ declare const DataSourceShape: z$1.ZodObject<{
447
+ name: z$1.ZodString;
448
+ urlEnv: z$1.ZodString;
449
+ generatedTypesImport: z$1.ZodOptional<z$1.ZodString>;
450
+ type: z$1.ZodDefault<z$1.ZodString>;
451
+ default: z$1.ZodDefault<z$1.ZodBoolean>;
452
+ prismaSchema: z$1.ZodOptional<z$1.ZodString>;
453
+ prismaConfig: z$1.ZodOptional<z$1.ZodString>;
454
+ zodOutput: z$1.ZodOptional<z$1.ZodString>;
455
+ clientOutput: z$1.ZodOptional<z$1.ZodString>;
456
+ }, z$1.core.$strip>;
457
+ declare const transformDataSource: <D extends z$1.infer<typeof DataSourceShape>>(data: D) => D & {
458
+ generatedTypesImport: string;
459
+ prismaSchema: string;
460
+ prismaConfig: string;
461
+ zodOutput: string;
462
+ clientOutput: string;
463
+ };
464
+ declare const DataSourceSchema: z$1.ZodPipe<z$1.ZodObject<{
465
+ name: z$1.ZodString;
466
+ urlEnv: z$1.ZodString;
467
+ generatedTypesImport: z$1.ZodOptional<z$1.ZodString>;
468
+ type: z$1.ZodDefault<z$1.ZodString>;
469
+ default: z$1.ZodDefault<z$1.ZodBoolean>;
470
+ prismaSchema: z$1.ZodOptional<z$1.ZodString>;
471
+ prismaConfig: z$1.ZodOptional<z$1.ZodString>;
472
+ zodOutput: z$1.ZodOptional<z$1.ZodString>;
473
+ clientOutput: z$1.ZodOptional<z$1.ZodString>;
474
+ }, z$1.core.$strip>, z$1.ZodTransform<{
475
+ name: string;
476
+ urlEnv: string;
477
+ type: string;
478
+ default: boolean;
479
+ generatedTypesImport?: string | undefined;
480
+ prismaSchema?: string | undefined;
481
+ prismaConfig?: string | undefined;
482
+ zodOutput?: string | undefined;
483
+ clientOutput?: string | undefined;
484
+ } & {
485
+ generatedTypesImport: string;
486
+ prismaSchema: string;
487
+ prismaConfig: string;
488
+ zodOutput: string;
489
+ clientOutput: string;
490
+ }, {
491
+ name: string;
492
+ urlEnv: string;
493
+ type: string;
494
+ default: boolean;
495
+ generatedTypesImport?: string | undefined;
496
+ prismaSchema?: string | undefined;
497
+ prismaConfig?: string | undefined;
498
+ zodOutput?: string | undefined;
499
+ clientOutput?: string | undefined;
500
+ }>>;
501
+ type DataSource = z$1.infer<typeof DataSourceSchema>;
502
+
503
+ declare const JsonOperationsSchema: z.ZodObject<{
504
+ findAll: z.ZodDefault<z.ZodBoolean>;
505
+ findOne: z.ZodDefault<z.ZodBoolean>;
506
+ create: z.ZodDefault<z.ZodBoolean>;
507
+ update: z.ZodDefault<z.ZodBoolean>;
508
+ patch: z.ZodDefault<z.ZodBoolean>;
509
+ upsert: z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
510
+ upsertOn: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
511
+ }, z.core.$strip>]>>;
512
+ delete: z.ZodDefault<z.ZodBoolean>;
513
+ }, z.core.$strip>;
514
+ type JsonResourceOperations = z.infer<typeof JsonOperationsSchema>;
515
+ type JsonResourceOperationsInput = z.input<typeof JsonOperationsSchema>;
516
+
517
+ declare const JsonColumnsMapSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
518
+ enum: z.ZodOptional<z.ZodString>;
519
+ sortId: z.ZodOptional<z.ZodString>;
520
+ sortable: z.ZodDefault<z.ZodBoolean>;
521
+ label: z.ZodOptional<z.ZodString>;
522
+ hideLabel: z.ZodDefault<z.ZodBoolean>;
523
+ column: z.ZodOptional<z.ZodString>;
524
+ displayKey: z.ZodOptional<z.ZodString>;
525
+ hiddenInTable: z.ZodDefault<z.ZodBoolean>;
526
+ hiddenInView: z.ZodDefault<z.ZodBoolean>;
527
+ fieldInput: z.ZodOptional<z.ZodObject<{
528
+ type: z.ZodOptional<z.ZodString>;
529
+ customRender: z.ZodOptional<z.ZodString>;
530
+ format: z.ZodOptional<z.ZodString>;
531
+ resource: z.ZodOptional<z.ZodString>;
532
+ relationType: z.ZodOptional<z.ZodEnum<{
533
+ oneToOne: "oneToOne";
534
+ manyToOne: "manyToOne";
535
+ oneToMany: "oneToMany";
536
+ manyToMany: "manyToMany";
537
+ }>>;
538
+ position: z.ZodOptional<z.ZodNumber>;
539
+ options: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
540
+ colspan: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
541
+ sort: z.ZodOptional<z.ZodString>;
542
+ sortDir: z.ZodOptional<z.ZodEnum<{
543
+ asc: "asc";
544
+ desc: "desc";
545
+ }>>;
546
+ direction: z.ZodOptional<z.ZodString>;
547
+ displayKey: z.ZodOptional<z.ZodString>;
548
+ resource: z.ZodOptional<z.ZodString>;
549
+ }, z.core.$catchall<z.ZodUnknown>>, z.ZodUnknown]>>;
550
+ detail: z.ZodOptional<z.ZodObject<{
551
+ layout: z.ZodEnum<{
552
+ row: "row";
553
+ collapse: "collapse";
554
+ }>;
555
+ titleKey: z.ZodOptional<z.ZodString>;
556
+ controls: z.ZodArray<z.ZodObject<{
557
+ property: z.ZodString;
558
+ type: z.ZodOptional<z.ZodString>;
559
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
560
+ hideLabel: z.ZodOptional<z.ZodBoolean>;
561
+ width: z.ZodOptional<z.ZodString>;
562
+ }, z.core.$strip>>;
563
+ }, z.core.$strip>>;
564
+ }, z.core.$strip>>;
565
+ hiddenInForm: z.ZodDefault<z.ZodBoolean>;
566
+ defaultSort: z.ZodDefault<z.ZodBoolean>;
567
+ searchable: z.ZodDefault<z.ZodBoolean>;
568
+ filterable: z.ZodDefault<z.ZodBoolean>;
569
+ createable: z.ZodDefault<z.ZodBoolean>;
570
+ updateable: z.ZodDefault<z.ZodBoolean>;
571
+ showWhen: z.ZodOptional<z.ZodObject<{
572
+ field: z.ZodString;
573
+ eq: z.ZodOptional<z.ZodUnknown>;
574
+ neq: z.ZodOptional<z.ZodUnknown>;
575
+ exists: z.ZodOptional<z.ZodBoolean>;
576
+ notExists: z.ZodOptional<z.ZodBoolean>;
577
+ }, z.core.$strip>>;
578
+ hideWhen: z.ZodOptional<z.ZodObject<{
579
+ field: z.ZodString;
580
+ eq: z.ZodOptional<z.ZodUnknown>;
581
+ neq: z.ZodOptional<z.ZodUnknown>;
582
+ exists: z.ZodOptional<z.ZodBoolean>;
583
+ notExists: z.ZodOptional<z.ZodBoolean>;
584
+ }, z.core.$strip>>;
585
+ disabledWhen: z.ZodOptional<z.ZodObject<{
586
+ field: z.ZodString;
587
+ eq: z.ZodOptional<z.ZodUnknown>;
588
+ neq: z.ZodOptional<z.ZodUnknown>;
589
+ exists: z.ZodOptional<z.ZodBoolean>;
590
+ notExists: z.ZodOptional<z.ZodBoolean>;
591
+ }, z.core.$strip>>;
592
+ idField: z.ZodDefault<z.ZodBoolean>;
593
+ showInLookup: z.ZodDefault<z.ZodBoolean>;
594
+ columnType: z.ZodDefault<z.ZodString>;
595
+ fieldView: z.ZodOptional<z.ZodObject<{
596
+ type: z.ZodOptional<z.ZodString>;
597
+ customRender: z.ZodOptional<z.ZodString>;
598
+ format: z.ZodOptional<z.ZodString>;
599
+ resource: z.ZodOptional<z.ZodString>;
600
+ relationType: z.ZodOptional<z.ZodEnum<{
601
+ oneToOne: "oneToOne";
602
+ manyToOne: "manyToOne";
603
+ oneToMany: "oneToMany";
604
+ manyToMany: "manyToMany";
605
+ }>>;
606
+ position: z.ZodOptional<z.ZodNumber>;
607
+ options: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
608
+ colspan: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
609
+ sort: z.ZodOptional<z.ZodString>;
610
+ sortDir: z.ZodOptional<z.ZodEnum<{
611
+ asc: "asc";
612
+ desc: "desc";
613
+ }>>;
614
+ direction: z.ZodOptional<z.ZodString>;
615
+ displayKey: z.ZodOptional<z.ZodString>;
616
+ resource: z.ZodOptional<z.ZodString>;
617
+ }, z.core.$catchall<z.ZodUnknown>>, z.ZodUnknown]>>;
618
+ detail: z.ZodOptional<z.ZodObject<{
619
+ layout: z.ZodEnum<{
620
+ row: "row";
621
+ collapse: "collapse";
622
+ }>;
623
+ titleKey: z.ZodOptional<z.ZodString>;
624
+ controls: z.ZodArray<z.ZodObject<{
625
+ property: z.ZodString;
626
+ type: z.ZodOptional<z.ZodString>;
627
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
628
+ hideLabel: z.ZodOptional<z.ZodBoolean>;
629
+ width: z.ZodOptional<z.ZodString>;
630
+ }, z.core.$strip>>;
631
+ }, z.core.$strip>>;
632
+ }, z.core.$strip>>;
633
+ fieldTable: z.ZodOptional<z.ZodObject<{
634
+ type: z.ZodOptional<z.ZodString>;
635
+ customRender: z.ZodOptional<z.ZodString>;
636
+ format: z.ZodOptional<z.ZodString>;
637
+ resource: z.ZodOptional<z.ZodString>;
638
+ relationType: z.ZodOptional<z.ZodEnum<{
639
+ oneToOne: "oneToOne";
640
+ manyToOne: "manyToOne";
641
+ oneToMany: "oneToMany";
642
+ manyToMany: "manyToMany";
643
+ }>>;
644
+ position: z.ZodOptional<z.ZodNumber>;
645
+ options: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
646
+ colspan: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
647
+ sort: z.ZodOptional<z.ZodString>;
648
+ sortDir: z.ZodOptional<z.ZodEnum<{
649
+ asc: "asc";
650
+ desc: "desc";
651
+ }>>;
652
+ direction: z.ZodOptional<z.ZodString>;
653
+ displayKey: z.ZodOptional<z.ZodString>;
654
+ resource: z.ZodOptional<z.ZodString>;
655
+ }, z.core.$catchall<z.ZodUnknown>>, z.ZodUnknown]>>;
656
+ detail: z.ZodOptional<z.ZodObject<{
657
+ layout: z.ZodEnum<{
658
+ row: "row";
659
+ collapse: "collapse";
660
+ }>;
661
+ titleKey: z.ZodOptional<z.ZodString>;
662
+ controls: z.ZodArray<z.ZodObject<{
663
+ property: z.ZodString;
664
+ type: z.ZodOptional<z.ZodString>;
665
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
666
+ hideLabel: z.ZodOptional<z.ZodBoolean>;
667
+ width: z.ZodOptional<z.ZodString>;
668
+ }, z.core.$strip>>;
669
+ }, z.core.$strip>>;
670
+ }, z.core.$strip>>;
671
+ extend: z.ZodOptional<z.ZodString>;
672
+ columns: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
673
+ }, z.core.$catchall<z.ZodUnknown>>>;
674
+ type JsonColumnsMap = z.infer<typeof JsonColumnsMapSchema>;
675
+ declare const JsonDisplaySchema: z.ZodObject<{
676
+ mode: z.ZodDefault<z.ZodEnum<{
677
+ page: "page";
678
+ modal: "modal";
679
+ }>>;
680
+ customComponent: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
681
+ }, z.core.$strip>;
682
+ type JsonDisplay = z.infer<typeof JsonDisplaySchema>;
683
+ declare const ResourceJsonShape: z.ZodObject<{
684
+ name: z.ZodString;
685
+ route: z.ZodString;
686
+ model: z.ZodString;
687
+ tag: z.ZodString;
688
+ title: z.ZodOptional<z.ZodString>;
689
+ table: z.ZodOptional<z.ZodString>;
690
+ database: z.ZodOptional<z.ZodString>;
691
+ sidebar: z.ZodDefault<z.ZodObject<{
692
+ hide: z.ZodDefault<z.ZodBoolean>;
693
+ position: z.ZodOptional<z.ZodNumber>;
694
+ label: z.ZodOptional<z.ZodString>;
695
+ group: z.ZodOptional<z.ZodString>;
696
+ }, z.core.$strip>>;
697
+ display: z.ZodDefault<z.ZodObject<{
698
+ mode: z.ZodDefault<z.ZodEnum<{
699
+ page: "page";
700
+ modal: "modal";
701
+ }>>;
702
+ customComponent: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
703
+ }, z.core.$strip>>;
704
+ operations: z.ZodObject<{
705
+ findAll: z.ZodDefault<z.ZodBoolean>;
706
+ findOne: z.ZodDefault<z.ZodBoolean>;
707
+ create: z.ZodDefault<z.ZodBoolean>;
708
+ update: z.ZodDefault<z.ZodBoolean>;
709
+ patch: z.ZodDefault<z.ZodBoolean>;
710
+ upsert: z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
711
+ upsertOn: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
712
+ }, z.core.$strip>]>>;
713
+ delete: z.ZodDefault<z.ZodBoolean>;
714
+ }, z.core.$strip>;
715
+ columns: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
716
+ enum: z.ZodOptional<z.ZodString>;
717
+ sortId: z.ZodOptional<z.ZodString>;
718
+ sortable: z.ZodDefault<z.ZodBoolean>;
719
+ label: z.ZodOptional<z.ZodString>;
720
+ hideLabel: z.ZodDefault<z.ZodBoolean>;
721
+ column: z.ZodOptional<z.ZodString>;
722
+ displayKey: z.ZodOptional<z.ZodString>;
723
+ hiddenInTable: z.ZodDefault<z.ZodBoolean>;
724
+ hiddenInView: z.ZodDefault<z.ZodBoolean>;
725
+ fieldInput: z.ZodOptional<z.ZodObject<{
726
+ type: z.ZodOptional<z.ZodString>;
727
+ customRender: z.ZodOptional<z.ZodString>;
728
+ format: z.ZodOptional<z.ZodString>;
729
+ resource: z.ZodOptional<z.ZodString>;
730
+ relationType: z.ZodOptional<z.ZodEnum<{
731
+ oneToOne: "oneToOne";
732
+ manyToOne: "manyToOne";
733
+ oneToMany: "oneToMany";
734
+ manyToMany: "manyToMany";
735
+ }>>;
736
+ position: z.ZodOptional<z.ZodNumber>;
737
+ options: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
738
+ colspan: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
739
+ sort: z.ZodOptional<z.ZodString>;
740
+ sortDir: z.ZodOptional<z.ZodEnum<{
741
+ asc: "asc";
742
+ desc: "desc";
743
+ }>>;
744
+ direction: z.ZodOptional<z.ZodString>;
745
+ displayKey: z.ZodOptional<z.ZodString>;
746
+ resource: z.ZodOptional<z.ZodString>;
747
+ }, z.core.$catchall<z.ZodUnknown>>, z.ZodUnknown]>>;
748
+ detail: z.ZodOptional<z.ZodObject<{
749
+ layout: z.ZodEnum<{
750
+ row: "row";
751
+ collapse: "collapse";
752
+ }>;
753
+ titleKey: z.ZodOptional<z.ZodString>;
754
+ controls: z.ZodArray<z.ZodObject<{
755
+ property: z.ZodString;
756
+ type: z.ZodOptional<z.ZodString>;
757
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
758
+ hideLabel: z.ZodOptional<z.ZodBoolean>;
759
+ width: z.ZodOptional<z.ZodString>;
760
+ }, z.core.$strip>>;
761
+ }, z.core.$strip>>;
762
+ }, z.core.$strip>>;
763
+ hiddenInForm: z.ZodDefault<z.ZodBoolean>;
764
+ defaultSort: z.ZodDefault<z.ZodBoolean>;
765
+ searchable: z.ZodDefault<z.ZodBoolean>;
766
+ filterable: z.ZodDefault<z.ZodBoolean>;
767
+ createable: z.ZodDefault<z.ZodBoolean>;
768
+ updateable: z.ZodDefault<z.ZodBoolean>;
769
+ showWhen: z.ZodOptional<z.ZodObject<{
770
+ field: z.ZodString;
771
+ eq: z.ZodOptional<z.ZodUnknown>;
772
+ neq: z.ZodOptional<z.ZodUnknown>;
773
+ exists: z.ZodOptional<z.ZodBoolean>;
774
+ notExists: z.ZodOptional<z.ZodBoolean>;
775
+ }, z.core.$strip>>;
776
+ hideWhen: z.ZodOptional<z.ZodObject<{
777
+ field: z.ZodString;
778
+ eq: z.ZodOptional<z.ZodUnknown>;
779
+ neq: z.ZodOptional<z.ZodUnknown>;
780
+ exists: z.ZodOptional<z.ZodBoolean>;
781
+ notExists: z.ZodOptional<z.ZodBoolean>;
782
+ }, z.core.$strip>>;
783
+ disabledWhen: z.ZodOptional<z.ZodObject<{
784
+ field: z.ZodString;
785
+ eq: z.ZodOptional<z.ZodUnknown>;
786
+ neq: z.ZodOptional<z.ZodUnknown>;
787
+ exists: z.ZodOptional<z.ZodBoolean>;
788
+ notExists: z.ZodOptional<z.ZodBoolean>;
789
+ }, z.core.$strip>>;
790
+ idField: z.ZodDefault<z.ZodBoolean>;
791
+ showInLookup: z.ZodDefault<z.ZodBoolean>;
792
+ columnType: z.ZodDefault<z.ZodString>;
793
+ fieldView: z.ZodOptional<z.ZodObject<{
794
+ type: z.ZodOptional<z.ZodString>;
795
+ customRender: z.ZodOptional<z.ZodString>;
796
+ format: z.ZodOptional<z.ZodString>;
797
+ resource: z.ZodOptional<z.ZodString>;
798
+ relationType: z.ZodOptional<z.ZodEnum<{
799
+ oneToOne: "oneToOne";
800
+ manyToOne: "manyToOne";
801
+ oneToMany: "oneToMany";
802
+ manyToMany: "manyToMany";
803
+ }>>;
804
+ position: z.ZodOptional<z.ZodNumber>;
805
+ options: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
806
+ colspan: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
807
+ sort: z.ZodOptional<z.ZodString>;
808
+ sortDir: z.ZodOptional<z.ZodEnum<{
809
+ asc: "asc";
810
+ desc: "desc";
811
+ }>>;
812
+ direction: z.ZodOptional<z.ZodString>;
813
+ displayKey: z.ZodOptional<z.ZodString>;
814
+ resource: z.ZodOptional<z.ZodString>;
815
+ }, z.core.$catchall<z.ZodUnknown>>, z.ZodUnknown]>>;
816
+ detail: z.ZodOptional<z.ZodObject<{
817
+ layout: z.ZodEnum<{
818
+ row: "row";
819
+ collapse: "collapse";
820
+ }>;
821
+ titleKey: z.ZodOptional<z.ZodString>;
822
+ controls: z.ZodArray<z.ZodObject<{
823
+ property: z.ZodString;
824
+ type: z.ZodOptional<z.ZodString>;
825
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
826
+ hideLabel: z.ZodOptional<z.ZodBoolean>;
827
+ width: z.ZodOptional<z.ZodString>;
828
+ }, z.core.$strip>>;
829
+ }, z.core.$strip>>;
830
+ }, z.core.$strip>>;
831
+ fieldTable: z.ZodOptional<z.ZodObject<{
832
+ type: z.ZodOptional<z.ZodString>;
833
+ customRender: z.ZodOptional<z.ZodString>;
834
+ format: z.ZodOptional<z.ZodString>;
835
+ resource: z.ZodOptional<z.ZodString>;
836
+ relationType: z.ZodOptional<z.ZodEnum<{
837
+ oneToOne: "oneToOne";
838
+ manyToOne: "manyToOne";
839
+ oneToMany: "oneToMany";
840
+ manyToMany: "manyToMany";
841
+ }>>;
842
+ position: z.ZodOptional<z.ZodNumber>;
843
+ options: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
844
+ colspan: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
845
+ sort: z.ZodOptional<z.ZodString>;
846
+ sortDir: z.ZodOptional<z.ZodEnum<{
847
+ asc: "asc";
848
+ desc: "desc";
849
+ }>>;
850
+ direction: z.ZodOptional<z.ZodString>;
851
+ displayKey: z.ZodOptional<z.ZodString>;
852
+ resource: z.ZodOptional<z.ZodString>;
853
+ }, z.core.$catchall<z.ZodUnknown>>, z.ZodUnknown]>>;
854
+ detail: z.ZodOptional<z.ZodObject<{
855
+ layout: z.ZodEnum<{
856
+ row: "row";
857
+ collapse: "collapse";
858
+ }>;
859
+ titleKey: z.ZodOptional<z.ZodString>;
860
+ controls: z.ZodArray<z.ZodObject<{
861
+ property: z.ZodString;
862
+ type: z.ZodOptional<z.ZodString>;
863
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
864
+ hideLabel: z.ZodOptional<z.ZodBoolean>;
865
+ width: z.ZodOptional<z.ZodString>;
866
+ }, z.core.$strip>>;
867
+ }, z.core.$strip>>;
868
+ }, z.core.$strip>>;
869
+ extend: z.ZodOptional<z.ZodString>;
870
+ columns: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
871
+ }, z.core.$catchall<z.ZodUnknown>>>>;
872
+ calculatedColumns: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodObject<{
873
+ id: z.ZodString;
874
+ alias: z.ZodString;
875
+ label: z.ZodOptional<z.ZodString>;
876
+ sqlExpression: z.ZodString;
877
+ type: z.ZodOptional<z.ZodEnum<{
878
+ string: "string";
879
+ number: "number";
880
+ boolean: "boolean";
881
+ }>>;
882
+ position: z.ZodOptional<z.ZodNumber>;
883
+ hiddenInTable: z.ZodOptional<z.ZodBoolean>;
884
+ hiddenInView: z.ZodOptional<z.ZodBoolean>;
885
+ fieldInput: z.ZodOptional<z.ZodObject<{
886
+ type: z.ZodOptional<z.ZodString>;
887
+ customRender: z.ZodOptional<z.ZodString>;
888
+ format: z.ZodOptional<z.ZodString>;
889
+ resource: z.ZodOptional<z.ZodString>;
890
+ relationType: z.ZodOptional<z.ZodEnum<{
891
+ oneToOne: "oneToOne";
892
+ manyToOne: "manyToOne";
893
+ oneToMany: "oneToMany";
894
+ manyToMany: "manyToMany";
895
+ }>>;
896
+ position: z.ZodOptional<z.ZodNumber>;
897
+ options: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
898
+ colspan: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
899
+ sort: z.ZodOptional<z.ZodString>;
900
+ sortDir: z.ZodOptional<z.ZodEnum<{
901
+ asc: "asc";
902
+ desc: "desc";
903
+ }>>;
904
+ direction: z.ZodOptional<z.ZodString>;
905
+ displayKey: z.ZodOptional<z.ZodString>;
906
+ resource: z.ZodOptional<z.ZodString>;
907
+ }, z.core.$catchall<z.ZodUnknown>>, z.ZodUnknown]>>;
908
+ detail: z.ZodOptional<z.ZodObject<{
909
+ layout: z.ZodEnum<{
910
+ row: "row";
911
+ collapse: "collapse";
912
+ }>;
913
+ titleKey: z.ZodOptional<z.ZodString>;
914
+ controls: z.ZodArray<z.ZodObject<{
915
+ property: z.ZodString;
916
+ type: z.ZodOptional<z.ZodString>;
917
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
918
+ hideLabel: z.ZodOptional<z.ZodBoolean>;
919
+ width: z.ZodOptional<z.ZodString>;
920
+ }, z.core.$strip>>;
921
+ }, z.core.$strip>>;
922
+ }, z.core.$strip>>;
923
+ }, z.core.$strip>, z.ZodTransform<{
924
+ id: string;
925
+ alias: string;
926
+ sqlExpression: string;
927
+ label?: string | undefined;
928
+ type?: "string" | "number" | "boolean" | undefined;
929
+ position?: number | undefined;
930
+ hiddenInTable?: boolean | undefined;
931
+ hiddenInView?: boolean | undefined;
932
+ fieldInput?: {
933
+ type?: string | undefined;
934
+ customRender?: string | undefined;
935
+ format?: string | undefined;
936
+ resource?: string | undefined;
937
+ relationType?: "oneToOne" | "manyToOne" | "oneToMany" | "manyToMany" | undefined;
938
+ position?: number | undefined;
939
+ options?: unknown;
940
+ detail?: {
941
+ layout: "row" | "collapse";
942
+ controls: {
943
+ property: string;
944
+ type?: string | undefined;
945
+ options?: Record<string, unknown> | undefined;
946
+ hideLabel?: boolean | undefined;
947
+ width?: string | undefined;
948
+ }[];
949
+ titleKey?: string | undefined;
950
+ } | undefined;
951
+ } | undefined;
952
+ }, {
953
+ id: string;
954
+ alias: string;
955
+ sqlExpression: string;
956
+ label?: string | undefined;
957
+ type?: "string" | "number" | "boolean" | undefined;
958
+ position?: number | undefined;
959
+ hiddenInTable?: boolean | undefined;
960
+ hiddenInView?: boolean | undefined;
961
+ fieldInput?: {
962
+ type?: string | undefined;
963
+ customRender?: string | undefined;
964
+ format?: string | undefined;
965
+ resource?: string | undefined;
966
+ relationType?: "oneToOne" | "manyToOne" | "oneToMany" | "manyToMany" | undefined;
967
+ position?: number | undefined;
968
+ options?: unknown;
969
+ detail?: {
970
+ layout: "row" | "collapse";
971
+ controls: {
972
+ property: string;
973
+ type?: string | undefined;
974
+ options?: Record<string, unknown> | undefined;
975
+ hideLabel?: boolean | undefined;
976
+ width?: string | undefined;
977
+ }[];
978
+ titleKey?: string | undefined;
979
+ } | undefined;
980
+ } | undefined;
981
+ }>>>>;
982
+ actions: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodUnion<readonly [z.ZodObject<{
983
+ id: z.ZodString;
984
+ label: z.ZodString;
985
+ icon: z.ZodOptional<z.ZodString>;
986
+ tooltip: z.ZodOptional<z.ZodString>;
987
+ condition: z.ZodOptional<z.ZodObject<{
988
+ field: z.ZodString;
989
+ op: z.ZodDefault<z.ZodEnum<{
990
+ gt: "gt";
991
+ lt: "lt";
992
+ eq: "eq";
993
+ neq: "neq";
994
+ exists: "exists";
995
+ notExists: "notExists";
996
+ gte: "gte";
997
+ lte: "lte";
998
+ }>>;
999
+ value: z.ZodOptional<z.ZodUnknown>;
1000
+ }, z.core.$strip>>;
1001
+ type: z.ZodDefault<z.ZodLiteral<"procedure">>;
1002
+ procedure: z.ZodString;
1003
+ method: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1004
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1005
+ }, z.core.$strip>, z.ZodObject<{
1006
+ id: z.ZodString;
1007
+ label: z.ZodString;
1008
+ icon: z.ZodOptional<z.ZodString>;
1009
+ tooltip: z.ZodOptional<z.ZodString>;
1010
+ condition: z.ZodOptional<z.ZodObject<{
1011
+ field: z.ZodString;
1012
+ op: z.ZodDefault<z.ZodEnum<{
1013
+ gt: "gt";
1014
+ lt: "lt";
1015
+ eq: "eq";
1016
+ neq: "neq";
1017
+ exists: "exists";
1018
+ notExists: "notExists";
1019
+ gte: "gte";
1020
+ lte: "lte";
1021
+ }>>;
1022
+ value: z.ZodOptional<z.ZodUnknown>;
1023
+ }, z.core.$strip>>;
1024
+ type: z.ZodDefault<z.ZodLiteral<"link">>;
1025
+ href: z.ZodString;
1026
+ }, z.core.$strip>]>, z.ZodTransform<({
1027
+ tooltip: string;
1028
+ } & {
1029
+ id: string;
1030
+ label: string;
1031
+ type: "procedure";
1032
+ procedure: string;
1033
+ method: string;
1034
+ icon?: string | undefined;
1035
+ tooltip?: string | undefined;
1036
+ condition?: {
1037
+ field: string;
1038
+ op: "gt" | "lt" | "eq" | "neq" | "exists" | "notExists" | "gte" | "lte";
1039
+ value?: unknown;
1040
+ } | undefined;
1041
+ data?: Record<string, unknown> | undefined;
1042
+ }) | ({
1043
+ tooltip: string;
1044
+ } & {
1045
+ id: string;
1046
+ label: string;
1047
+ type: "link";
1048
+ href: string;
1049
+ icon?: string | undefined;
1050
+ tooltip?: string | undefined;
1051
+ condition?: {
1052
+ field: string;
1053
+ op: "gt" | "lt" | "eq" | "neq" | "exists" | "notExists" | "gte" | "lte";
1054
+ value?: unknown;
1055
+ } | undefined;
1056
+ }), {
1057
+ id: string;
1058
+ label: string;
1059
+ type: "procedure";
1060
+ procedure: string;
1061
+ method: string;
1062
+ icon?: string | undefined;
1063
+ tooltip?: string | undefined;
1064
+ condition?: {
1065
+ field: string;
1066
+ op: "gt" | "lt" | "eq" | "neq" | "exists" | "notExists" | "gte" | "lte";
1067
+ value?: unknown;
1068
+ } | undefined;
1069
+ data?: Record<string, unknown> | undefined;
1070
+ } | {
1071
+ id: string;
1072
+ label: string;
1073
+ type: "link";
1074
+ href: string;
1075
+ icon?: string | undefined;
1076
+ tooltip?: string | undefined;
1077
+ condition?: {
1078
+ field: string;
1079
+ op: "gt" | "lt" | "eq" | "neq" | "exists" | "notExists" | "gte" | "lte";
1080
+ value?: unknown;
1081
+ } | undefined;
1082
+ }>>>>;
1083
+ tableActions: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodUnion<readonly [z.ZodObject<{
1084
+ id: z.ZodString;
1085
+ label: z.ZodString;
1086
+ icon: z.ZodOptional<z.ZodString>;
1087
+ tooltip: z.ZodOptional<z.ZodString>;
1088
+ condition: z.ZodOptional<z.ZodObject<{
1089
+ field: z.ZodString;
1090
+ op: z.ZodDefault<z.ZodEnum<{
1091
+ gt: "gt";
1092
+ lt: "lt";
1093
+ eq: "eq";
1094
+ neq: "neq";
1095
+ exists: "exists";
1096
+ notExists: "notExists";
1097
+ gte: "gte";
1098
+ lte: "lte";
1099
+ }>>;
1100
+ value: z.ZodOptional<z.ZodUnknown>;
1101
+ }, z.core.$strip>>;
1102
+ type: z.ZodDefault<z.ZodLiteral<"procedure">>;
1103
+ procedure: z.ZodString;
1104
+ method: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1105
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1106
+ }, z.core.$strip>, z.ZodObject<{
1107
+ id: z.ZodString;
1108
+ label: z.ZodString;
1109
+ icon: z.ZodOptional<z.ZodString>;
1110
+ tooltip: z.ZodOptional<z.ZodString>;
1111
+ condition: z.ZodOptional<z.ZodObject<{
1112
+ field: z.ZodString;
1113
+ op: z.ZodDefault<z.ZodEnum<{
1114
+ gt: "gt";
1115
+ lt: "lt";
1116
+ eq: "eq";
1117
+ neq: "neq";
1118
+ exists: "exists";
1119
+ notExists: "notExists";
1120
+ gte: "gte";
1121
+ lte: "lte";
1122
+ }>>;
1123
+ value: z.ZodOptional<z.ZodUnknown>;
1124
+ }, z.core.$strip>>;
1125
+ type: z.ZodDefault<z.ZodLiteral<"link">>;
1126
+ href: z.ZodString;
1127
+ }, z.core.$strip>]>, z.ZodTransform<({
1128
+ tooltip: string;
1129
+ } & {
1130
+ id: string;
1131
+ label: string;
1132
+ type: "procedure";
1133
+ procedure: string;
1134
+ method: string;
1135
+ icon?: string | undefined;
1136
+ tooltip?: string | undefined;
1137
+ condition?: {
1138
+ field: string;
1139
+ op: "gt" | "lt" | "eq" | "neq" | "exists" | "notExists" | "gte" | "lte";
1140
+ value?: unknown;
1141
+ } | undefined;
1142
+ data?: Record<string, unknown> | undefined;
1143
+ }) | ({
1144
+ tooltip: string;
1145
+ } & {
1146
+ id: string;
1147
+ label: string;
1148
+ type: "link";
1149
+ href: string;
1150
+ icon?: string | undefined;
1151
+ tooltip?: string | undefined;
1152
+ condition?: {
1153
+ field: string;
1154
+ op: "gt" | "lt" | "eq" | "neq" | "exists" | "notExists" | "gte" | "lte";
1155
+ value?: unknown;
1156
+ } | undefined;
1157
+ }), {
1158
+ id: string;
1159
+ label: string;
1160
+ type: "procedure";
1161
+ procedure: string;
1162
+ method: string;
1163
+ icon?: string | undefined;
1164
+ tooltip?: string | undefined;
1165
+ condition?: {
1166
+ field: string;
1167
+ op: "gt" | "lt" | "eq" | "neq" | "exists" | "notExists" | "gte" | "lte";
1168
+ value?: unknown;
1169
+ } | undefined;
1170
+ data?: Record<string, unknown> | undefined;
1171
+ } | {
1172
+ id: string;
1173
+ label: string;
1174
+ type: "link";
1175
+ href: string;
1176
+ icon?: string | undefined;
1177
+ tooltip?: string | undefined;
1178
+ condition?: {
1179
+ field: string;
1180
+ op: "gt" | "lt" | "eq" | "neq" | "exists" | "notExists" | "gte" | "lte";
1181
+ value?: unknown;
1182
+ } | undefined;
1183
+ }>>>>;
1184
+ modalSize: z.ZodDefault<z.ZodEnum<{
1185
+ xs: "xs";
1186
+ sm: "sm";
1187
+ lg: "lg";
1188
+ xl: "xl";
1189
+ }>>;
1190
+ include: z.ZodDefault<z.ZodArray<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
1191
+ }, z.core.$strip>;
1192
+ declare const ResourceJsonSchema: z.ZodPipe<z.ZodObject<{
1193
+ name: z.ZodString;
1194
+ route: z.ZodString;
1195
+ model: z.ZodString;
1196
+ tag: z.ZodString;
1197
+ title: z.ZodOptional<z.ZodString>;
1198
+ table: z.ZodOptional<z.ZodString>;
1199
+ database: z.ZodOptional<z.ZodString>;
1200
+ sidebar: z.ZodDefault<z.ZodObject<{
1201
+ hide: z.ZodDefault<z.ZodBoolean>;
1202
+ position: z.ZodOptional<z.ZodNumber>;
1203
+ label: z.ZodOptional<z.ZodString>;
1204
+ group: z.ZodOptional<z.ZodString>;
1205
+ }, z.core.$strip>>;
1206
+ display: z.ZodDefault<z.ZodObject<{
1207
+ mode: z.ZodDefault<z.ZodEnum<{
1208
+ page: "page";
1209
+ modal: "modal";
1210
+ }>>;
1211
+ customComponent: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1212
+ }, z.core.$strip>>;
1213
+ operations: z.ZodObject<{
1214
+ findAll: z.ZodDefault<z.ZodBoolean>;
1215
+ findOne: z.ZodDefault<z.ZodBoolean>;
1216
+ create: z.ZodDefault<z.ZodBoolean>;
1217
+ update: z.ZodDefault<z.ZodBoolean>;
1218
+ patch: z.ZodDefault<z.ZodBoolean>;
1219
+ upsert: z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
1220
+ upsertOn: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
1221
+ }, z.core.$strip>]>>;
1222
+ delete: z.ZodDefault<z.ZodBoolean>;
1223
+ }, z.core.$strip>;
1224
+ columns: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
1225
+ enum: z.ZodOptional<z.ZodString>;
1226
+ sortId: z.ZodOptional<z.ZodString>;
1227
+ sortable: z.ZodDefault<z.ZodBoolean>;
1228
+ label: z.ZodOptional<z.ZodString>;
1229
+ hideLabel: z.ZodDefault<z.ZodBoolean>;
1230
+ column: z.ZodOptional<z.ZodString>;
1231
+ displayKey: z.ZodOptional<z.ZodString>;
1232
+ hiddenInTable: z.ZodDefault<z.ZodBoolean>;
1233
+ hiddenInView: z.ZodDefault<z.ZodBoolean>;
1234
+ fieldInput: z.ZodOptional<z.ZodObject<{
1235
+ type: z.ZodOptional<z.ZodString>;
1236
+ customRender: z.ZodOptional<z.ZodString>;
1237
+ format: z.ZodOptional<z.ZodString>;
1238
+ resource: z.ZodOptional<z.ZodString>;
1239
+ relationType: z.ZodOptional<z.ZodEnum<{
1240
+ oneToOne: "oneToOne";
1241
+ manyToOne: "manyToOne";
1242
+ oneToMany: "oneToMany";
1243
+ manyToMany: "manyToMany";
1244
+ }>>;
1245
+ position: z.ZodOptional<z.ZodNumber>;
1246
+ options: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1247
+ colspan: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1248
+ sort: z.ZodOptional<z.ZodString>;
1249
+ sortDir: z.ZodOptional<z.ZodEnum<{
1250
+ asc: "asc";
1251
+ desc: "desc";
1252
+ }>>;
1253
+ direction: z.ZodOptional<z.ZodString>;
1254
+ displayKey: z.ZodOptional<z.ZodString>;
1255
+ resource: z.ZodOptional<z.ZodString>;
1256
+ }, z.core.$catchall<z.ZodUnknown>>, z.ZodUnknown]>>;
1257
+ detail: z.ZodOptional<z.ZodObject<{
1258
+ layout: z.ZodEnum<{
1259
+ row: "row";
1260
+ collapse: "collapse";
1261
+ }>;
1262
+ titleKey: z.ZodOptional<z.ZodString>;
1263
+ controls: z.ZodArray<z.ZodObject<{
1264
+ property: z.ZodString;
1265
+ type: z.ZodOptional<z.ZodString>;
1266
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1267
+ hideLabel: z.ZodOptional<z.ZodBoolean>;
1268
+ width: z.ZodOptional<z.ZodString>;
1269
+ }, z.core.$strip>>;
1270
+ }, z.core.$strip>>;
1271
+ }, z.core.$strip>>;
1272
+ hiddenInForm: z.ZodDefault<z.ZodBoolean>;
1273
+ defaultSort: z.ZodDefault<z.ZodBoolean>;
1274
+ searchable: z.ZodDefault<z.ZodBoolean>;
1275
+ filterable: z.ZodDefault<z.ZodBoolean>;
1276
+ createable: z.ZodDefault<z.ZodBoolean>;
1277
+ updateable: z.ZodDefault<z.ZodBoolean>;
1278
+ showWhen: z.ZodOptional<z.ZodObject<{
1279
+ field: z.ZodString;
1280
+ eq: z.ZodOptional<z.ZodUnknown>;
1281
+ neq: z.ZodOptional<z.ZodUnknown>;
1282
+ exists: z.ZodOptional<z.ZodBoolean>;
1283
+ notExists: z.ZodOptional<z.ZodBoolean>;
1284
+ }, z.core.$strip>>;
1285
+ hideWhen: z.ZodOptional<z.ZodObject<{
1286
+ field: z.ZodString;
1287
+ eq: z.ZodOptional<z.ZodUnknown>;
1288
+ neq: z.ZodOptional<z.ZodUnknown>;
1289
+ exists: z.ZodOptional<z.ZodBoolean>;
1290
+ notExists: z.ZodOptional<z.ZodBoolean>;
1291
+ }, z.core.$strip>>;
1292
+ disabledWhen: z.ZodOptional<z.ZodObject<{
1293
+ field: z.ZodString;
1294
+ eq: z.ZodOptional<z.ZodUnknown>;
1295
+ neq: z.ZodOptional<z.ZodUnknown>;
1296
+ exists: z.ZodOptional<z.ZodBoolean>;
1297
+ notExists: z.ZodOptional<z.ZodBoolean>;
1298
+ }, z.core.$strip>>;
1299
+ idField: z.ZodDefault<z.ZodBoolean>;
1300
+ showInLookup: z.ZodDefault<z.ZodBoolean>;
1301
+ columnType: z.ZodDefault<z.ZodString>;
1302
+ fieldView: z.ZodOptional<z.ZodObject<{
1303
+ type: z.ZodOptional<z.ZodString>;
1304
+ customRender: z.ZodOptional<z.ZodString>;
1305
+ format: z.ZodOptional<z.ZodString>;
1306
+ resource: z.ZodOptional<z.ZodString>;
1307
+ relationType: z.ZodOptional<z.ZodEnum<{
1308
+ oneToOne: "oneToOne";
1309
+ manyToOne: "manyToOne";
1310
+ oneToMany: "oneToMany";
1311
+ manyToMany: "manyToMany";
1312
+ }>>;
1313
+ position: z.ZodOptional<z.ZodNumber>;
1314
+ options: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1315
+ colspan: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1316
+ sort: z.ZodOptional<z.ZodString>;
1317
+ sortDir: z.ZodOptional<z.ZodEnum<{
1318
+ asc: "asc";
1319
+ desc: "desc";
1320
+ }>>;
1321
+ direction: z.ZodOptional<z.ZodString>;
1322
+ displayKey: z.ZodOptional<z.ZodString>;
1323
+ resource: z.ZodOptional<z.ZodString>;
1324
+ }, z.core.$catchall<z.ZodUnknown>>, z.ZodUnknown]>>;
1325
+ detail: z.ZodOptional<z.ZodObject<{
1326
+ layout: z.ZodEnum<{
1327
+ row: "row";
1328
+ collapse: "collapse";
1329
+ }>;
1330
+ titleKey: z.ZodOptional<z.ZodString>;
1331
+ controls: z.ZodArray<z.ZodObject<{
1332
+ property: z.ZodString;
1333
+ type: z.ZodOptional<z.ZodString>;
1334
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1335
+ hideLabel: z.ZodOptional<z.ZodBoolean>;
1336
+ width: z.ZodOptional<z.ZodString>;
1337
+ }, z.core.$strip>>;
1338
+ }, z.core.$strip>>;
1339
+ }, z.core.$strip>>;
1340
+ fieldTable: z.ZodOptional<z.ZodObject<{
1341
+ type: z.ZodOptional<z.ZodString>;
1342
+ customRender: z.ZodOptional<z.ZodString>;
1343
+ format: z.ZodOptional<z.ZodString>;
1344
+ resource: z.ZodOptional<z.ZodString>;
1345
+ relationType: z.ZodOptional<z.ZodEnum<{
1346
+ oneToOne: "oneToOne";
1347
+ manyToOne: "manyToOne";
1348
+ oneToMany: "oneToMany";
1349
+ manyToMany: "manyToMany";
1350
+ }>>;
1351
+ position: z.ZodOptional<z.ZodNumber>;
1352
+ options: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1353
+ colspan: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1354
+ sort: z.ZodOptional<z.ZodString>;
1355
+ sortDir: z.ZodOptional<z.ZodEnum<{
1356
+ asc: "asc";
1357
+ desc: "desc";
1358
+ }>>;
1359
+ direction: z.ZodOptional<z.ZodString>;
1360
+ displayKey: z.ZodOptional<z.ZodString>;
1361
+ resource: z.ZodOptional<z.ZodString>;
1362
+ }, z.core.$catchall<z.ZodUnknown>>, z.ZodUnknown]>>;
1363
+ detail: z.ZodOptional<z.ZodObject<{
1364
+ layout: z.ZodEnum<{
1365
+ row: "row";
1366
+ collapse: "collapse";
1367
+ }>;
1368
+ titleKey: z.ZodOptional<z.ZodString>;
1369
+ controls: z.ZodArray<z.ZodObject<{
1370
+ property: z.ZodString;
1371
+ type: z.ZodOptional<z.ZodString>;
1372
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1373
+ hideLabel: z.ZodOptional<z.ZodBoolean>;
1374
+ width: z.ZodOptional<z.ZodString>;
1375
+ }, z.core.$strip>>;
1376
+ }, z.core.$strip>>;
1377
+ }, z.core.$strip>>;
1378
+ extend: z.ZodOptional<z.ZodString>;
1379
+ columns: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1380
+ }, z.core.$catchall<z.ZodUnknown>>>>;
1381
+ calculatedColumns: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodObject<{
1382
+ id: z.ZodString;
1383
+ alias: z.ZodString;
1384
+ label: z.ZodOptional<z.ZodString>;
1385
+ sqlExpression: z.ZodString;
1386
+ type: z.ZodOptional<z.ZodEnum<{
1387
+ string: "string";
1388
+ number: "number";
1389
+ boolean: "boolean";
1390
+ }>>;
1391
+ position: z.ZodOptional<z.ZodNumber>;
1392
+ hiddenInTable: z.ZodOptional<z.ZodBoolean>;
1393
+ hiddenInView: z.ZodOptional<z.ZodBoolean>;
1394
+ fieldInput: z.ZodOptional<z.ZodObject<{
1395
+ type: z.ZodOptional<z.ZodString>;
1396
+ customRender: z.ZodOptional<z.ZodString>;
1397
+ format: z.ZodOptional<z.ZodString>;
1398
+ resource: z.ZodOptional<z.ZodString>;
1399
+ relationType: z.ZodOptional<z.ZodEnum<{
1400
+ oneToOne: "oneToOne";
1401
+ manyToOne: "manyToOne";
1402
+ oneToMany: "oneToMany";
1403
+ manyToMany: "manyToMany";
1404
+ }>>;
1405
+ position: z.ZodOptional<z.ZodNumber>;
1406
+ options: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1407
+ colspan: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1408
+ sort: z.ZodOptional<z.ZodString>;
1409
+ sortDir: z.ZodOptional<z.ZodEnum<{
1410
+ asc: "asc";
1411
+ desc: "desc";
1412
+ }>>;
1413
+ direction: z.ZodOptional<z.ZodString>;
1414
+ displayKey: z.ZodOptional<z.ZodString>;
1415
+ resource: z.ZodOptional<z.ZodString>;
1416
+ }, z.core.$catchall<z.ZodUnknown>>, z.ZodUnknown]>>;
1417
+ detail: z.ZodOptional<z.ZodObject<{
1418
+ layout: z.ZodEnum<{
1419
+ row: "row";
1420
+ collapse: "collapse";
1421
+ }>;
1422
+ titleKey: z.ZodOptional<z.ZodString>;
1423
+ controls: z.ZodArray<z.ZodObject<{
1424
+ property: z.ZodString;
1425
+ type: z.ZodOptional<z.ZodString>;
1426
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1427
+ hideLabel: z.ZodOptional<z.ZodBoolean>;
1428
+ width: z.ZodOptional<z.ZodString>;
1429
+ }, z.core.$strip>>;
1430
+ }, z.core.$strip>>;
1431
+ }, z.core.$strip>>;
1432
+ }, z.core.$strip>, z.ZodTransform<{
1433
+ id: string;
1434
+ alias: string;
1435
+ sqlExpression: string;
1436
+ label?: string | undefined;
1437
+ type?: "string" | "number" | "boolean" | undefined;
1438
+ position?: number | undefined;
1439
+ hiddenInTable?: boolean | undefined;
1440
+ hiddenInView?: boolean | undefined;
1441
+ fieldInput?: {
1442
+ type?: string | undefined;
1443
+ customRender?: string | undefined;
1444
+ format?: string | undefined;
1445
+ resource?: string | undefined;
1446
+ relationType?: "oneToOne" | "manyToOne" | "oneToMany" | "manyToMany" | undefined;
1447
+ position?: number | undefined;
1448
+ options?: unknown;
1449
+ detail?: {
1450
+ layout: "row" | "collapse";
1451
+ controls: {
1452
+ property: string;
1453
+ type?: string | undefined;
1454
+ options?: Record<string, unknown> | undefined;
1455
+ hideLabel?: boolean | undefined;
1456
+ width?: string | undefined;
1457
+ }[];
1458
+ titleKey?: string | undefined;
1459
+ } | undefined;
1460
+ } | undefined;
1461
+ }, {
1462
+ id: string;
1463
+ alias: string;
1464
+ sqlExpression: string;
1465
+ label?: string | undefined;
1466
+ type?: "string" | "number" | "boolean" | undefined;
1467
+ position?: number | undefined;
1468
+ hiddenInTable?: boolean | undefined;
1469
+ hiddenInView?: boolean | undefined;
1470
+ fieldInput?: {
1471
+ type?: string | undefined;
1472
+ customRender?: string | undefined;
1473
+ format?: string | undefined;
1474
+ resource?: string | undefined;
1475
+ relationType?: "oneToOne" | "manyToOne" | "oneToMany" | "manyToMany" | undefined;
1476
+ position?: number | undefined;
1477
+ options?: unknown;
1478
+ detail?: {
1479
+ layout: "row" | "collapse";
1480
+ controls: {
1481
+ property: string;
1482
+ type?: string | undefined;
1483
+ options?: Record<string, unknown> | undefined;
1484
+ hideLabel?: boolean | undefined;
1485
+ width?: string | undefined;
1486
+ }[];
1487
+ titleKey?: string | undefined;
1488
+ } | undefined;
1489
+ } | undefined;
1490
+ }>>>>;
1491
+ actions: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodUnion<readonly [z.ZodObject<{
1492
+ id: z.ZodString;
1493
+ label: z.ZodString;
1494
+ icon: z.ZodOptional<z.ZodString>;
1495
+ tooltip: z.ZodOptional<z.ZodString>;
1496
+ condition: z.ZodOptional<z.ZodObject<{
1497
+ field: z.ZodString;
1498
+ op: z.ZodDefault<z.ZodEnum<{
1499
+ gt: "gt";
1500
+ lt: "lt";
1501
+ eq: "eq";
1502
+ neq: "neq";
1503
+ exists: "exists";
1504
+ notExists: "notExists";
1505
+ gte: "gte";
1506
+ lte: "lte";
1507
+ }>>;
1508
+ value: z.ZodOptional<z.ZodUnknown>;
1509
+ }, z.core.$strip>>;
1510
+ type: z.ZodDefault<z.ZodLiteral<"procedure">>;
1511
+ procedure: z.ZodString;
1512
+ method: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1513
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1514
+ }, z.core.$strip>, z.ZodObject<{
1515
+ id: z.ZodString;
1516
+ label: z.ZodString;
1517
+ icon: z.ZodOptional<z.ZodString>;
1518
+ tooltip: z.ZodOptional<z.ZodString>;
1519
+ condition: z.ZodOptional<z.ZodObject<{
1520
+ field: z.ZodString;
1521
+ op: z.ZodDefault<z.ZodEnum<{
1522
+ gt: "gt";
1523
+ lt: "lt";
1524
+ eq: "eq";
1525
+ neq: "neq";
1526
+ exists: "exists";
1527
+ notExists: "notExists";
1528
+ gte: "gte";
1529
+ lte: "lte";
1530
+ }>>;
1531
+ value: z.ZodOptional<z.ZodUnknown>;
1532
+ }, z.core.$strip>>;
1533
+ type: z.ZodDefault<z.ZodLiteral<"link">>;
1534
+ href: z.ZodString;
1535
+ }, z.core.$strip>]>, z.ZodTransform<({
1536
+ tooltip: string;
1537
+ } & {
1538
+ id: string;
1539
+ label: string;
1540
+ type: "procedure";
1541
+ procedure: string;
1542
+ method: string;
1543
+ icon?: string | undefined;
1544
+ tooltip?: string | undefined;
1545
+ condition?: {
1546
+ field: string;
1547
+ op: "gt" | "lt" | "eq" | "neq" | "exists" | "notExists" | "gte" | "lte";
1548
+ value?: unknown;
1549
+ } | undefined;
1550
+ data?: Record<string, unknown> | undefined;
1551
+ }) | ({
1552
+ tooltip: string;
1553
+ } & {
1554
+ id: string;
1555
+ label: string;
1556
+ type: "link";
1557
+ href: string;
1558
+ icon?: string | undefined;
1559
+ tooltip?: string | undefined;
1560
+ condition?: {
1561
+ field: string;
1562
+ op: "gt" | "lt" | "eq" | "neq" | "exists" | "notExists" | "gte" | "lte";
1563
+ value?: unknown;
1564
+ } | undefined;
1565
+ }), {
1566
+ id: string;
1567
+ label: string;
1568
+ type: "procedure";
1569
+ procedure: string;
1570
+ method: string;
1571
+ icon?: string | undefined;
1572
+ tooltip?: string | undefined;
1573
+ condition?: {
1574
+ field: string;
1575
+ op: "gt" | "lt" | "eq" | "neq" | "exists" | "notExists" | "gte" | "lte";
1576
+ value?: unknown;
1577
+ } | undefined;
1578
+ data?: Record<string, unknown> | undefined;
1579
+ } | {
1580
+ id: string;
1581
+ label: string;
1582
+ type: "link";
1583
+ href: string;
1584
+ icon?: string | undefined;
1585
+ tooltip?: string | undefined;
1586
+ condition?: {
1587
+ field: string;
1588
+ op: "gt" | "lt" | "eq" | "neq" | "exists" | "notExists" | "gte" | "lte";
1589
+ value?: unknown;
1590
+ } | undefined;
1591
+ }>>>>;
1592
+ tableActions: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodUnion<readonly [z.ZodObject<{
1593
+ id: z.ZodString;
1594
+ label: z.ZodString;
1595
+ icon: z.ZodOptional<z.ZodString>;
1596
+ tooltip: z.ZodOptional<z.ZodString>;
1597
+ condition: z.ZodOptional<z.ZodObject<{
1598
+ field: z.ZodString;
1599
+ op: z.ZodDefault<z.ZodEnum<{
1600
+ gt: "gt";
1601
+ lt: "lt";
1602
+ eq: "eq";
1603
+ neq: "neq";
1604
+ exists: "exists";
1605
+ notExists: "notExists";
1606
+ gte: "gte";
1607
+ lte: "lte";
1608
+ }>>;
1609
+ value: z.ZodOptional<z.ZodUnknown>;
1610
+ }, z.core.$strip>>;
1611
+ type: z.ZodDefault<z.ZodLiteral<"procedure">>;
1612
+ procedure: z.ZodString;
1613
+ method: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1614
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1615
+ }, z.core.$strip>, z.ZodObject<{
1616
+ id: z.ZodString;
1617
+ label: z.ZodString;
1618
+ icon: z.ZodOptional<z.ZodString>;
1619
+ tooltip: z.ZodOptional<z.ZodString>;
1620
+ condition: z.ZodOptional<z.ZodObject<{
1621
+ field: z.ZodString;
1622
+ op: z.ZodDefault<z.ZodEnum<{
1623
+ gt: "gt";
1624
+ lt: "lt";
1625
+ eq: "eq";
1626
+ neq: "neq";
1627
+ exists: "exists";
1628
+ notExists: "notExists";
1629
+ gte: "gte";
1630
+ lte: "lte";
1631
+ }>>;
1632
+ value: z.ZodOptional<z.ZodUnknown>;
1633
+ }, z.core.$strip>>;
1634
+ type: z.ZodDefault<z.ZodLiteral<"link">>;
1635
+ href: z.ZodString;
1636
+ }, z.core.$strip>]>, z.ZodTransform<({
1637
+ tooltip: string;
1638
+ } & {
1639
+ id: string;
1640
+ label: string;
1641
+ type: "procedure";
1642
+ procedure: string;
1643
+ method: string;
1644
+ icon?: string | undefined;
1645
+ tooltip?: string | undefined;
1646
+ condition?: {
1647
+ field: string;
1648
+ op: "gt" | "lt" | "eq" | "neq" | "exists" | "notExists" | "gte" | "lte";
1649
+ value?: unknown;
1650
+ } | undefined;
1651
+ data?: Record<string, unknown> | undefined;
1652
+ }) | ({
1653
+ tooltip: string;
1654
+ } & {
1655
+ id: string;
1656
+ label: string;
1657
+ type: "link";
1658
+ href: string;
1659
+ icon?: string | undefined;
1660
+ tooltip?: string | undefined;
1661
+ condition?: {
1662
+ field: string;
1663
+ op: "gt" | "lt" | "eq" | "neq" | "exists" | "notExists" | "gte" | "lte";
1664
+ value?: unknown;
1665
+ } | undefined;
1666
+ }), {
1667
+ id: string;
1668
+ label: string;
1669
+ type: "procedure";
1670
+ procedure: string;
1671
+ method: string;
1672
+ icon?: string | undefined;
1673
+ tooltip?: string | undefined;
1674
+ condition?: {
1675
+ field: string;
1676
+ op: "gt" | "lt" | "eq" | "neq" | "exists" | "notExists" | "gte" | "lte";
1677
+ value?: unknown;
1678
+ } | undefined;
1679
+ data?: Record<string, unknown> | undefined;
1680
+ } | {
1681
+ id: string;
1682
+ label: string;
1683
+ type: "link";
1684
+ href: string;
1685
+ icon?: string | undefined;
1686
+ tooltip?: string | undefined;
1687
+ condition?: {
1688
+ field: string;
1689
+ op: "gt" | "lt" | "eq" | "neq" | "exists" | "notExists" | "gte" | "lte";
1690
+ value?: unknown;
1691
+ } | undefined;
1692
+ }>>>>;
1693
+ modalSize: z.ZodDefault<z.ZodEnum<{
1694
+ xs: "xs";
1695
+ sm: "sm";
1696
+ lg: "lg";
1697
+ xl: "xl";
1698
+ }>>;
1699
+ include: z.ZodDefault<z.ZodArray<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>>;
1700
+ }, z.core.$strip>, z.ZodTransform<{
1701
+ columns: {
1702
+ id: string;
1703
+ hiddenInTable: boolean;
1704
+ hiddenInForm: boolean;
1705
+ hiddenInView: boolean;
1706
+ sortable: boolean;
1707
+ defaultSort: boolean;
1708
+ searchable: boolean;
1709
+ filterable: boolean;
1710
+ createable: boolean;
1711
+ updateable: boolean;
1712
+ hideLabel: boolean;
1713
+ idField: boolean;
1714
+ showInLookup: boolean;
1715
+ columnType: string;
1716
+ column?: string | undefined;
1717
+ label?: string | undefined;
1718
+ showWhen?: {
1719
+ field: string;
1720
+ eq?: unknown;
1721
+ neq?: unknown;
1722
+ exists?: boolean | undefined;
1723
+ notExists?: boolean | undefined;
1724
+ } | undefined;
1725
+ hideWhen?: {
1726
+ field: string;
1727
+ eq?: unknown;
1728
+ neq?: unknown;
1729
+ exists?: boolean | undefined;
1730
+ notExists?: boolean | undefined;
1731
+ } | undefined;
1732
+ disabledWhen?: {
1733
+ field: string;
1734
+ eq?: unknown;
1735
+ neq?: unknown;
1736
+ exists?: boolean | undefined;
1737
+ notExists?: boolean | undefined;
1738
+ } | undefined;
1739
+ displayKey?: string | undefined;
1740
+ sortId?: string | undefined;
1741
+ enum?: string | undefined;
1742
+ fieldInput?: {
1743
+ type?: string | undefined;
1744
+ customRender?: string | undefined;
1745
+ format?: string | undefined;
1746
+ resource?: string | undefined;
1747
+ relationType?: "oneToOne" | "manyToOne" | "oneToMany" | "manyToMany" | undefined;
1748
+ position?: number | undefined;
1749
+ options?: unknown;
1750
+ detail?: {
1751
+ layout: "row" | "collapse";
1752
+ controls: {
1753
+ property: string;
1754
+ type?: string | undefined;
1755
+ options?: Record<string, unknown> | undefined;
1756
+ hideLabel?: boolean | undefined;
1757
+ width?: string | undefined;
1758
+ }[];
1759
+ titleKey?: string | undefined;
1760
+ } | undefined;
1761
+ } | undefined;
1762
+ fieldView?: {
1763
+ type?: string | undefined;
1764
+ customRender?: string | undefined;
1765
+ format?: string | undefined;
1766
+ resource?: string | undefined;
1767
+ relationType?: "oneToOne" | "manyToOne" | "oneToMany" | "manyToMany" | undefined;
1768
+ position?: number | undefined;
1769
+ options?: unknown;
1770
+ detail?: {
1771
+ layout: "row" | "collapse";
1772
+ controls: {
1773
+ property: string;
1774
+ type?: string | undefined;
1775
+ options?: Record<string, unknown> | undefined;
1776
+ hideLabel?: boolean | undefined;
1777
+ width?: string | undefined;
1778
+ }[];
1779
+ titleKey?: string | undefined;
1780
+ } | undefined;
1781
+ } | undefined;
1782
+ fieldTable?: {
1783
+ type?: string | undefined;
1784
+ customRender?: string | undefined;
1785
+ format?: string | undefined;
1786
+ resource?: string | undefined;
1787
+ relationType?: "oneToOne" | "manyToOne" | "oneToMany" | "manyToMany" | undefined;
1788
+ position?: number | undefined;
1789
+ options?: unknown;
1790
+ detail?: {
1791
+ layout: "row" | "collapse";
1792
+ controls: {
1793
+ property: string;
1794
+ type?: string | undefined;
1795
+ options?: Record<string, unknown> | undefined;
1796
+ hideLabel?: boolean | undefined;
1797
+ width?: string | undefined;
1798
+ }[];
1799
+ titleKey?: string | undefined;
1800
+ } | undefined;
1801
+ } | undefined;
1802
+ extend?: string | undefined;
1803
+ columns?: Record<string, Record<string, unknown>> | undefined;
1804
+ }[] | undefined;
1805
+ name: string;
1806
+ route: string;
1807
+ model: string;
1808
+ tag: string;
1809
+ sidebar: {
1810
+ hide: boolean;
1811
+ position?: number | undefined;
1812
+ label?: string | undefined;
1813
+ group?: string | undefined;
1814
+ };
1815
+ display: {
1816
+ mode: "page" | "modal";
1817
+ customComponent: string | null;
1818
+ };
1819
+ operations: {
1820
+ findAll: boolean;
1821
+ findOne: boolean;
1822
+ create: boolean;
1823
+ update: boolean;
1824
+ patch: boolean;
1825
+ upsert: boolean | {
1826
+ upsertOn: string | string[];
1827
+ };
1828
+ delete: boolean;
1829
+ };
1830
+ calculatedColumns: {
1831
+ id: string;
1832
+ alias: string;
1833
+ sqlExpression: string;
1834
+ label?: string | undefined;
1835
+ type?: "string" | "number" | "boolean" | undefined;
1836
+ position?: number | undefined;
1837
+ hiddenInTable?: boolean | undefined;
1838
+ hiddenInView?: boolean | undefined;
1839
+ fieldInput?: {
1840
+ type?: string | undefined;
1841
+ customRender?: string | undefined;
1842
+ format?: string | undefined;
1843
+ resource?: string | undefined;
1844
+ relationType?: "oneToOne" | "manyToOne" | "oneToMany" | "manyToMany" | undefined;
1845
+ position?: number | undefined;
1846
+ options?: unknown;
1847
+ detail?: {
1848
+ layout: "row" | "collapse";
1849
+ controls: {
1850
+ property: string;
1851
+ type?: string | undefined;
1852
+ options?: Record<string, unknown> | undefined;
1853
+ hideLabel?: boolean | undefined;
1854
+ width?: string | undefined;
1855
+ }[];
1856
+ titleKey?: string | undefined;
1857
+ } | undefined;
1858
+ } | undefined;
1859
+ }[];
1860
+ actions: (({
1861
+ tooltip: string;
1862
+ } & {
1863
+ id: string;
1864
+ label: string;
1865
+ type: "procedure";
1866
+ procedure: string;
1867
+ method: string;
1868
+ icon?: string | undefined;
1869
+ tooltip?: string | undefined;
1870
+ condition?: {
1871
+ field: string;
1872
+ op: "gt" | "lt" | "eq" | "neq" | "exists" | "notExists" | "gte" | "lte";
1873
+ value?: unknown;
1874
+ } | undefined;
1875
+ data?: Record<string, unknown> | undefined;
1876
+ }) | ({
1877
+ tooltip: string;
1878
+ } & {
1879
+ id: string;
1880
+ label: string;
1881
+ type: "link";
1882
+ href: string;
1883
+ icon?: string | undefined;
1884
+ tooltip?: string | undefined;
1885
+ condition?: {
1886
+ field: string;
1887
+ op: "gt" | "lt" | "eq" | "neq" | "exists" | "notExists" | "gte" | "lte";
1888
+ value?: unknown;
1889
+ } | undefined;
1890
+ }))[];
1891
+ tableActions: (({
1892
+ tooltip: string;
1893
+ } & {
1894
+ id: string;
1895
+ label: string;
1896
+ type: "procedure";
1897
+ procedure: string;
1898
+ method: string;
1899
+ icon?: string | undefined;
1900
+ tooltip?: string | undefined;
1901
+ condition?: {
1902
+ field: string;
1903
+ op: "gt" | "lt" | "eq" | "neq" | "exists" | "notExists" | "gte" | "lte";
1904
+ value?: unknown;
1905
+ } | undefined;
1906
+ data?: Record<string, unknown> | undefined;
1907
+ }) | ({
1908
+ tooltip: string;
1909
+ } & {
1910
+ id: string;
1911
+ label: string;
1912
+ type: "link";
1913
+ href: string;
1914
+ icon?: string | undefined;
1915
+ tooltip?: string | undefined;
1916
+ condition?: {
1917
+ field: string;
1918
+ op: "gt" | "lt" | "eq" | "neq" | "exists" | "notExists" | "gte" | "lte";
1919
+ value?: unknown;
1920
+ } | undefined;
1921
+ }))[];
1922
+ modalSize: "xs" | "sm" | "lg" | "xl";
1923
+ include: any[];
1924
+ title: string;
1925
+ table?: string | undefined;
1926
+ database?: string | undefined;
1927
+ }, {
1928
+ name: string;
1929
+ route: string;
1930
+ model: string;
1931
+ tag: string;
1932
+ sidebar: {
1933
+ hide: boolean;
1934
+ position?: number | undefined;
1935
+ label?: string | undefined;
1936
+ group?: string | undefined;
1937
+ };
1938
+ display: {
1939
+ mode: "page" | "modal";
1940
+ customComponent: string | null;
1941
+ };
1942
+ operations: {
1943
+ findAll: boolean;
1944
+ findOne: boolean;
1945
+ create: boolean;
1946
+ update: boolean;
1947
+ patch: boolean;
1948
+ upsert: boolean | {
1949
+ upsertOn: string | string[];
1950
+ };
1951
+ delete: boolean;
1952
+ };
1953
+ columns: Record<string, {
1954
+ [x: string]: unknown;
1955
+ sortable: boolean;
1956
+ hideLabel: boolean;
1957
+ hiddenInTable: boolean;
1958
+ hiddenInView: boolean;
1959
+ hiddenInForm: boolean;
1960
+ defaultSort: boolean;
1961
+ searchable: boolean;
1962
+ filterable: boolean;
1963
+ createable: boolean;
1964
+ updateable: boolean;
1965
+ idField: boolean;
1966
+ showInLookup: boolean;
1967
+ columnType: string;
1968
+ enum?: string | undefined;
1969
+ sortId?: string | undefined;
1970
+ label?: string | undefined;
1971
+ column?: string | undefined;
1972
+ displayKey?: string | undefined;
1973
+ fieldInput?: {
1974
+ type?: string | undefined;
1975
+ customRender?: string | undefined;
1976
+ format?: string | undefined;
1977
+ resource?: string | undefined;
1978
+ relationType?: "oneToOne" | "manyToOne" | "oneToMany" | "manyToMany" | undefined;
1979
+ position?: number | undefined;
1980
+ options?: unknown;
1981
+ detail?: {
1982
+ layout: "row" | "collapse";
1983
+ controls: {
1984
+ property: string;
1985
+ type?: string | undefined;
1986
+ options?: Record<string, unknown> | undefined;
1987
+ hideLabel?: boolean | undefined;
1988
+ width?: string | undefined;
1989
+ }[];
1990
+ titleKey?: string | undefined;
1991
+ } | undefined;
1992
+ } | undefined;
1993
+ showWhen?: {
1994
+ field: string;
1995
+ eq?: unknown;
1996
+ neq?: unknown;
1997
+ exists?: boolean | undefined;
1998
+ notExists?: boolean | undefined;
1999
+ } | undefined;
2000
+ hideWhen?: {
2001
+ field: string;
2002
+ eq?: unknown;
2003
+ neq?: unknown;
2004
+ exists?: boolean | undefined;
2005
+ notExists?: boolean | undefined;
2006
+ } | undefined;
2007
+ disabledWhen?: {
2008
+ field: string;
2009
+ eq?: unknown;
2010
+ neq?: unknown;
2011
+ exists?: boolean | undefined;
2012
+ notExists?: boolean | undefined;
2013
+ } | undefined;
2014
+ fieldView?: {
2015
+ type?: string | undefined;
2016
+ customRender?: string | undefined;
2017
+ format?: string | undefined;
2018
+ resource?: string | undefined;
2019
+ relationType?: "oneToOne" | "manyToOne" | "oneToMany" | "manyToMany" | undefined;
2020
+ position?: number | undefined;
2021
+ options?: unknown;
2022
+ detail?: {
2023
+ layout: "row" | "collapse";
2024
+ controls: {
2025
+ property: string;
2026
+ type?: string | undefined;
2027
+ options?: Record<string, unknown> | undefined;
2028
+ hideLabel?: boolean | undefined;
2029
+ width?: string | undefined;
2030
+ }[];
2031
+ titleKey?: string | undefined;
2032
+ } | undefined;
2033
+ } | undefined;
2034
+ fieldTable?: {
2035
+ type?: string | undefined;
2036
+ customRender?: string | undefined;
2037
+ format?: string | undefined;
2038
+ resource?: string | undefined;
2039
+ relationType?: "oneToOne" | "manyToOne" | "oneToMany" | "manyToMany" | undefined;
2040
+ position?: number | undefined;
2041
+ options?: unknown;
2042
+ detail?: {
2043
+ layout: "row" | "collapse";
2044
+ controls: {
2045
+ property: string;
2046
+ type?: string | undefined;
2047
+ options?: Record<string, unknown> | undefined;
2048
+ hideLabel?: boolean | undefined;
2049
+ width?: string | undefined;
2050
+ }[];
2051
+ titleKey?: string | undefined;
2052
+ } | undefined;
2053
+ } | undefined;
2054
+ extend?: string | undefined;
2055
+ columns?: Record<string, Record<string, unknown>> | undefined;
2056
+ }>;
2057
+ calculatedColumns: {
2058
+ id: string;
2059
+ alias: string;
2060
+ sqlExpression: string;
2061
+ label?: string | undefined;
2062
+ type?: "string" | "number" | "boolean" | undefined;
2063
+ position?: number | undefined;
2064
+ hiddenInTable?: boolean | undefined;
2065
+ hiddenInView?: boolean | undefined;
2066
+ fieldInput?: {
2067
+ type?: string | undefined;
2068
+ customRender?: string | undefined;
2069
+ format?: string | undefined;
2070
+ resource?: string | undefined;
2071
+ relationType?: "oneToOne" | "manyToOne" | "oneToMany" | "manyToMany" | undefined;
2072
+ position?: number | undefined;
2073
+ options?: unknown;
2074
+ detail?: {
2075
+ layout: "row" | "collapse";
2076
+ controls: {
2077
+ property: string;
2078
+ type?: string | undefined;
2079
+ options?: Record<string, unknown> | undefined;
2080
+ hideLabel?: boolean | undefined;
2081
+ width?: string | undefined;
2082
+ }[];
2083
+ titleKey?: string | undefined;
2084
+ } | undefined;
2085
+ } | undefined;
2086
+ }[];
2087
+ actions: (({
2088
+ tooltip: string;
2089
+ } & {
2090
+ id: string;
2091
+ label: string;
2092
+ type: "procedure";
2093
+ procedure: string;
2094
+ method: string;
2095
+ icon?: string | undefined;
2096
+ tooltip?: string | undefined;
2097
+ condition?: {
2098
+ field: string;
2099
+ op: "gt" | "lt" | "eq" | "neq" | "exists" | "notExists" | "gte" | "lte";
2100
+ value?: unknown;
2101
+ } | undefined;
2102
+ data?: Record<string, unknown> | undefined;
2103
+ }) | ({
2104
+ tooltip: string;
2105
+ } & {
2106
+ id: string;
2107
+ label: string;
2108
+ type: "link";
2109
+ href: string;
2110
+ icon?: string | undefined;
2111
+ tooltip?: string | undefined;
2112
+ condition?: {
2113
+ field: string;
2114
+ op: "gt" | "lt" | "eq" | "neq" | "exists" | "notExists" | "gte" | "lte";
2115
+ value?: unknown;
2116
+ } | undefined;
2117
+ }))[];
2118
+ tableActions: (({
2119
+ tooltip: string;
2120
+ } & {
2121
+ id: string;
2122
+ label: string;
2123
+ type: "procedure";
2124
+ procedure: string;
2125
+ method: string;
2126
+ icon?: string | undefined;
2127
+ tooltip?: string | undefined;
2128
+ condition?: {
2129
+ field: string;
2130
+ op: "gt" | "lt" | "eq" | "neq" | "exists" | "notExists" | "gte" | "lte";
2131
+ value?: unknown;
2132
+ } | undefined;
2133
+ data?: Record<string, unknown> | undefined;
2134
+ }) | ({
2135
+ tooltip: string;
2136
+ } & {
2137
+ id: string;
2138
+ label: string;
2139
+ type: "link";
2140
+ href: string;
2141
+ icon?: string | undefined;
2142
+ tooltip?: string | undefined;
2143
+ condition?: {
2144
+ field: string;
2145
+ op: "gt" | "lt" | "eq" | "neq" | "exists" | "notExists" | "gte" | "lte";
2146
+ value?: unknown;
2147
+ } | undefined;
2148
+ }))[];
2149
+ modalSize: "xs" | "sm" | "lg" | "xl";
2150
+ include: any[];
2151
+ title?: string | undefined;
2152
+ table?: string | undefined;
2153
+ database?: string | undefined;
2154
+ }>>;
2155
+ type ResourceJson = z.infer<typeof ResourceJsonSchema>;
2156
+ type ResourceJsonInput = z.input<typeof ResourceJsonShape>;
2157
+ type ResourceConfig = ResourceJson;
2158
+
2159
+ /**
2160
+ * Configuration for a single sidebar group, defined centrally in `crouton.json`.
2161
+ * Keyed by the group slug (e.g. `"metadata"`).
2162
+ */
2163
+ declare const SidebarGroupSchema: z$1.ZodObject<{
2164
+ label: z$1.ZodOptional<z$1.ZodString>;
2165
+ position: z$1.ZodOptional<z$1.ZodNumber>;
2166
+ }, z$1.core.$strip>;
2167
+ type SidebarGroupConfig = z$1.infer<typeof SidebarGroupSchema>;
2168
+ declare const SidebarSchema: z$1.ZodObject<{
2169
+ hide: z$1.ZodDefault<z$1.ZodBoolean>;
2170
+ position: z$1.ZodOptional<z$1.ZodNumber>;
2171
+ label: z$1.ZodOptional<z$1.ZodString>;
2172
+ group: z$1.ZodOptional<z$1.ZodString>;
2173
+ }, z$1.core.$strip>;
2174
+ type Sidebar = z$1.infer<typeof SidebarSchema>;
2175
+
2176
+ /**
2177
+ * A single entry in an `include` list.
2178
+ * - Plain string: `"author"` → `{ author: true }`
2179
+ * - Object with nested includes: `{ relation: "text_author", include: ["author"] }`
2180
+ * → `{ text_author: { include: { author: true } } }`
2181
+ * - Object with orderBy: `{ relation: "sections", orderBy: { title: "asc" } }`
2182
+ * → `{ sections: { orderBy: { title: "asc" } } }`
2183
+ */
2184
+ declare const JsonIncludeEntrySchema: z.ZodType<any>;
2185
+ type JsonIncludeEntry = z.infer<typeof JsonIncludeEntrySchema>;
2186
+
2187
+ declare const ActionConditionSchema: z.ZodObject<{
2188
+ field: z.ZodString;
2189
+ op: z.ZodDefault<z.ZodEnum<{
2190
+ gt: "gt";
2191
+ lt: "lt";
2192
+ eq: "eq";
2193
+ neq: "neq";
2194
+ exists: "exists";
2195
+ notExists: "notExists";
2196
+ gte: "gte";
2197
+ lte: "lte";
2198
+ }>>;
2199
+ value: z.ZodOptional<z.ZodUnknown>;
2200
+ }, z.core.$strip>;
2201
+ declare const JsonProcedureActionSchema: z.ZodObject<{
2202
+ id: z.ZodString;
2203
+ label: z.ZodString;
2204
+ icon: z.ZodOptional<z.ZodString>;
2205
+ tooltip: z.ZodOptional<z.ZodString>;
2206
+ condition: z.ZodOptional<z.ZodObject<{
2207
+ field: z.ZodString;
2208
+ op: z.ZodDefault<z.ZodEnum<{
2209
+ gt: "gt";
2210
+ lt: "lt";
2211
+ eq: "eq";
2212
+ neq: "neq";
2213
+ exists: "exists";
2214
+ notExists: "notExists";
2215
+ gte: "gte";
2216
+ lte: "lte";
2217
+ }>>;
2218
+ value: z.ZodOptional<z.ZodUnknown>;
2219
+ }, z.core.$strip>>;
2220
+ type: z.ZodDefault<z.ZodLiteral<"procedure">>;
2221
+ procedure: z.ZodString;
2222
+ method: z.ZodDefault<z.ZodOptional<z.ZodString>>;
2223
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2224
+ }, z.core.$strip>;
2225
+ /** Action that opens a URL in a new browser tab — no backend call. */
2226
+ declare const JsonLinkActionSchema: z.ZodObject<{
2227
+ id: z.ZodString;
2228
+ label: z.ZodString;
2229
+ icon: z.ZodOptional<z.ZodString>;
2230
+ tooltip: z.ZodOptional<z.ZodString>;
2231
+ condition: z.ZodOptional<z.ZodObject<{
2232
+ field: z.ZodString;
2233
+ op: z.ZodDefault<z.ZodEnum<{
2234
+ gt: "gt";
2235
+ lt: "lt";
2236
+ eq: "eq";
2237
+ neq: "neq";
2238
+ exists: "exists";
2239
+ notExists: "notExists";
2240
+ gte: "gte";
2241
+ lte: "lte";
2242
+ }>>;
2243
+ value: z.ZodOptional<z.ZodUnknown>;
2244
+ }, z.core.$strip>>;
2245
+ type: z.ZodDefault<z.ZodLiteral<"link">>;
2246
+ href: z.ZodString;
2247
+ }, z.core.$strip>;
2248
+ declare const JsonActionSchema: z.ZodPipe<z.ZodUnion<readonly [z.ZodObject<{
2249
+ id: z.ZodString;
2250
+ label: z.ZodString;
2251
+ icon: z.ZodOptional<z.ZodString>;
2252
+ tooltip: z.ZodOptional<z.ZodString>;
2253
+ condition: z.ZodOptional<z.ZodObject<{
2254
+ field: z.ZodString;
2255
+ op: z.ZodDefault<z.ZodEnum<{
2256
+ gt: "gt";
2257
+ lt: "lt";
2258
+ eq: "eq";
2259
+ neq: "neq";
2260
+ exists: "exists";
2261
+ notExists: "notExists";
2262
+ gte: "gte";
2263
+ lte: "lte";
2264
+ }>>;
2265
+ value: z.ZodOptional<z.ZodUnknown>;
2266
+ }, z.core.$strip>>;
2267
+ type: z.ZodDefault<z.ZodLiteral<"procedure">>;
2268
+ procedure: z.ZodString;
2269
+ method: z.ZodDefault<z.ZodOptional<z.ZodString>>;
2270
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2271
+ }, z.core.$strip>, z.ZodObject<{
2272
+ id: z.ZodString;
2273
+ label: z.ZodString;
2274
+ icon: z.ZodOptional<z.ZodString>;
2275
+ tooltip: z.ZodOptional<z.ZodString>;
2276
+ condition: z.ZodOptional<z.ZodObject<{
2277
+ field: z.ZodString;
2278
+ op: z.ZodDefault<z.ZodEnum<{
2279
+ gt: "gt";
2280
+ lt: "lt";
2281
+ eq: "eq";
2282
+ neq: "neq";
2283
+ exists: "exists";
2284
+ notExists: "notExists";
2285
+ gte: "gte";
2286
+ lte: "lte";
2287
+ }>>;
2288
+ value: z.ZodOptional<z.ZodUnknown>;
2289
+ }, z.core.$strip>>;
2290
+ type: z.ZodDefault<z.ZodLiteral<"link">>;
2291
+ href: z.ZodString;
2292
+ }, z.core.$strip>]>, z.ZodTransform<({
2293
+ tooltip: string;
2294
+ } & {
2295
+ id: string;
2296
+ label: string;
2297
+ type: "procedure";
2298
+ procedure: string;
2299
+ method: string;
2300
+ icon?: string | undefined;
2301
+ tooltip?: string | undefined;
2302
+ condition?: {
2303
+ field: string;
2304
+ op: "gt" | "lt" | "eq" | "neq" | "exists" | "notExists" | "gte" | "lte";
2305
+ value?: unknown;
2306
+ } | undefined;
2307
+ data?: Record<string, unknown> | undefined;
2308
+ }) | ({
2309
+ tooltip: string;
2310
+ } & {
2311
+ id: string;
2312
+ label: string;
2313
+ type: "link";
2314
+ href: string;
2315
+ icon?: string | undefined;
2316
+ tooltip?: string | undefined;
2317
+ condition?: {
2318
+ field: string;
2319
+ op: "gt" | "lt" | "eq" | "neq" | "exists" | "notExists" | "gte" | "lte";
2320
+ value?: unknown;
2321
+ } | undefined;
2322
+ }), {
2323
+ id: string;
2324
+ label: string;
2325
+ type: "procedure";
2326
+ procedure: string;
2327
+ method: string;
2328
+ icon?: string | undefined;
2329
+ tooltip?: string | undefined;
2330
+ condition?: {
2331
+ field: string;
2332
+ op: "gt" | "lt" | "eq" | "neq" | "exists" | "notExists" | "gte" | "lte";
2333
+ value?: unknown;
2334
+ } | undefined;
2335
+ data?: Record<string, unknown> | undefined;
2336
+ } | {
2337
+ id: string;
2338
+ label: string;
2339
+ type: "link";
2340
+ href: string;
2341
+ icon?: string | undefined;
2342
+ tooltip?: string | undefined;
2343
+ condition?: {
2344
+ field: string;
2345
+ op: "gt" | "lt" | "eq" | "neq" | "exists" | "notExists" | "gte" | "lte";
2346
+ value?: unknown;
2347
+ } | undefined;
2348
+ }>>;
2349
+ type JsonActionCondition = z.infer<typeof ActionConditionSchema>;
2350
+ type JsonAction = z.infer<typeof JsonActionSchema>;
2351
+ type JsonLinkAction = z.infer<typeof JsonLinkActionSchema>;
2352
+ type JsonProcedureAction = z.infer<typeof JsonProcedureActionSchema>;
2353
+
2354
+ /**
2355
+ * A column whose value is computed by a raw SQL subquery at query time.
2356
+ * The `sqlExpression` may reference the parent table via the alias `main`.
2357
+ *
2358
+ * Example:
2359
+ * ```json
2360
+ * {
2361
+ * "id": "inception",
2362
+ * "alias": "inception",
2363
+ * "label": "Available in inception",
2364
+ * "sqlExpression": "SELECT COUNT(id) FROM text_content WHERE text_content.text_id = main.id",
2365
+ * "position": 8
2366
+ * }
2367
+ * ```
2368
+ */
2369
+ declare const CalculatedColumnSchema: z.ZodPipe<z.ZodObject<{
2370
+ id: z.ZodString;
2371
+ alias: z.ZodString;
2372
+ label: z.ZodOptional<z.ZodString>;
2373
+ sqlExpression: z.ZodString;
2374
+ type: z.ZodOptional<z.ZodEnum<{
2375
+ string: "string";
2376
+ number: "number";
2377
+ boolean: "boolean";
2378
+ }>>;
2379
+ position: z.ZodOptional<z.ZodNumber>;
2380
+ hiddenInTable: z.ZodOptional<z.ZodBoolean>;
2381
+ hiddenInView: z.ZodOptional<z.ZodBoolean>;
2382
+ fieldInput: z.ZodOptional<z.ZodObject<{
2383
+ type: z.ZodOptional<z.ZodString>;
2384
+ customRender: z.ZodOptional<z.ZodString>;
2385
+ format: z.ZodOptional<z.ZodString>;
2386
+ resource: z.ZodOptional<z.ZodString>;
2387
+ relationType: z.ZodOptional<z.ZodEnum<{
2388
+ oneToOne: "oneToOne";
2389
+ manyToOne: "manyToOne";
2390
+ oneToMany: "oneToMany";
2391
+ manyToMany: "manyToMany";
2392
+ }>>;
2393
+ position: z.ZodOptional<z.ZodNumber>;
2394
+ options: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2395
+ colspan: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2396
+ sort: z.ZodOptional<z.ZodString>;
2397
+ sortDir: z.ZodOptional<z.ZodEnum<{
2398
+ asc: "asc";
2399
+ desc: "desc";
2400
+ }>>;
2401
+ direction: z.ZodOptional<z.ZodString>;
2402
+ displayKey: z.ZodOptional<z.ZodString>;
2403
+ resource: z.ZodOptional<z.ZodString>;
2404
+ }, z.core.$catchall<z.ZodUnknown>>, z.ZodUnknown]>>;
2405
+ detail: z.ZodOptional<z.ZodObject<{
2406
+ layout: z.ZodEnum<{
2407
+ row: "row";
2408
+ collapse: "collapse";
2409
+ }>;
2410
+ titleKey: z.ZodOptional<z.ZodString>;
2411
+ controls: z.ZodArray<z.ZodObject<{
2412
+ property: z.ZodString;
2413
+ type: z.ZodOptional<z.ZodString>;
2414
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2415
+ hideLabel: z.ZodOptional<z.ZodBoolean>;
2416
+ width: z.ZodOptional<z.ZodString>;
2417
+ }, z.core.$strip>>;
2418
+ }, z.core.$strip>>;
2419
+ }, z.core.$strip>>;
2420
+ }, z.core.$strip>, z.ZodTransform<{
2421
+ id: string;
2422
+ alias: string;
2423
+ sqlExpression: string;
2424
+ label?: string | undefined;
2425
+ type?: "string" | "number" | "boolean" | undefined;
2426
+ position?: number | undefined;
2427
+ hiddenInTable?: boolean | undefined;
2428
+ hiddenInView?: boolean | undefined;
2429
+ fieldInput?: {
2430
+ type?: string | undefined;
2431
+ customRender?: string | undefined;
2432
+ format?: string | undefined;
2433
+ resource?: string | undefined;
2434
+ relationType?: "oneToOne" | "manyToOne" | "oneToMany" | "manyToMany" | undefined;
2435
+ position?: number | undefined;
2436
+ options?: unknown;
2437
+ detail?: {
2438
+ layout: "row" | "collapse";
2439
+ controls: {
2440
+ property: string;
2441
+ type?: string | undefined;
2442
+ options?: Record<string, unknown> | undefined;
2443
+ hideLabel?: boolean | undefined;
2444
+ width?: string | undefined;
2445
+ }[];
2446
+ titleKey?: string | undefined;
2447
+ } | undefined;
2448
+ } | undefined;
2449
+ }, {
2450
+ id: string;
2451
+ alias: string;
2452
+ sqlExpression: string;
2453
+ label?: string | undefined;
2454
+ type?: "string" | "number" | "boolean" | undefined;
2455
+ position?: number | undefined;
2456
+ hiddenInTable?: boolean | undefined;
2457
+ hiddenInView?: boolean | undefined;
2458
+ fieldInput?: {
2459
+ type?: string | undefined;
2460
+ customRender?: string | undefined;
2461
+ format?: string | undefined;
2462
+ resource?: string | undefined;
2463
+ relationType?: "oneToOne" | "manyToOne" | "oneToMany" | "manyToMany" | undefined;
2464
+ position?: number | undefined;
2465
+ options?: unknown;
2466
+ detail?: {
2467
+ layout: "row" | "collapse";
2468
+ controls: {
2469
+ property: string;
2470
+ type?: string | undefined;
2471
+ options?: Record<string, unknown> | undefined;
2472
+ hideLabel?: boolean | undefined;
2473
+ width?: string | undefined;
2474
+ }[];
2475
+ titleKey?: string | undefined;
2476
+ } | undefined;
2477
+ } | undefined;
2478
+ }>>;
2479
+ type CalculatedColumn = z.infer<typeof CalculatedColumnSchema>;
2480
+
2481
+ declare const RelationType: z.ZodEnum<{
2482
+ oneToOne: "oneToOne";
2483
+ manyToOne: "manyToOne";
2484
+ oneToMany: "oneToMany";
2485
+ manyToMany: "manyToMany";
2486
+ }>;
2487
+ type RelationType = z.infer<typeof RelationType>;
2488
+ declare const DetailControlSchema: z.ZodObject<{
2489
+ property: z.ZodString;
2490
+ type: z.ZodOptional<z.ZodString>;
2491
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2492
+ hideLabel: z.ZodOptional<z.ZodBoolean>;
2493
+ width: z.ZodOptional<z.ZodString>;
2494
+ }, z.core.$strip>;
2495
+ type DetailControl = z.infer<typeof DetailControlSchema>;
2496
+ declare const DetailConfigSchema: z.ZodObject<{
2497
+ layout: z.ZodEnum<{
2498
+ row: "row";
2499
+ collapse: "collapse";
2500
+ }>;
2501
+ titleKey: z.ZodOptional<z.ZodString>;
2502
+ controls: z.ZodArray<z.ZodObject<{
2503
+ property: z.ZodString;
2504
+ type: z.ZodOptional<z.ZodString>;
2505
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2506
+ hideLabel: z.ZodOptional<z.ZodBoolean>;
2507
+ width: z.ZodOptional<z.ZodString>;
2508
+ }, z.core.$strip>>;
2509
+ }, z.core.$strip>;
2510
+ type DetailConfig = z.infer<typeof DetailConfigSchema>;
2511
+ /**
2512
+ * Options for relation field inputs (`fieldInput.format === "relation"`).
2513
+ * These are injected into the frontend control and — for `sort`/`sortDir` —
2514
+ * also used by the backend to apply `orderBy` on included relation records.
2515
+ */
2516
+ declare const RelationFieldInputOptionsSchema: z.ZodObject<{
2517
+ colspan: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2518
+ sort: z.ZodOptional<z.ZodString>;
2519
+ sortDir: z.ZodOptional<z.ZodEnum<{
2520
+ asc: "asc";
2521
+ desc: "desc";
2522
+ }>>;
2523
+ direction: z.ZodOptional<z.ZodString>;
2524
+ displayKey: z.ZodOptional<z.ZodString>;
2525
+ resource: z.ZodOptional<z.ZodString>;
2526
+ }, z.core.$catchall<z.ZodUnknown>>;
2527
+ type RelationFieldInputOptions = z.infer<typeof RelationFieldInputOptionsSchema>;
2528
+ declare const FieldInputSchema: z.ZodObject<{
2529
+ type: z.ZodOptional<z.ZodString>;
2530
+ customRender: z.ZodOptional<z.ZodString>;
2531
+ format: z.ZodOptional<z.ZodString>;
2532
+ resource: z.ZodOptional<z.ZodString>;
2533
+ relationType: z.ZodOptional<z.ZodEnum<{
2534
+ oneToOne: "oneToOne";
2535
+ manyToOne: "manyToOne";
2536
+ oneToMany: "oneToMany";
2537
+ manyToMany: "manyToMany";
2538
+ }>>;
2539
+ position: z.ZodOptional<z.ZodNumber>;
2540
+ options: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2541
+ colspan: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2542
+ sort: z.ZodOptional<z.ZodString>;
2543
+ sortDir: z.ZodOptional<z.ZodEnum<{
2544
+ asc: "asc";
2545
+ desc: "desc";
2546
+ }>>;
2547
+ direction: z.ZodOptional<z.ZodString>;
2548
+ displayKey: z.ZodOptional<z.ZodString>;
2549
+ resource: z.ZodOptional<z.ZodString>;
2550
+ }, z.core.$catchall<z.ZodUnknown>>, z.ZodUnknown]>>;
2551
+ detail: z.ZodOptional<z.ZodObject<{
2552
+ layout: z.ZodEnum<{
2553
+ row: "row";
2554
+ collapse: "collapse";
2555
+ }>;
2556
+ titleKey: z.ZodOptional<z.ZodString>;
2557
+ controls: z.ZodArray<z.ZodObject<{
2558
+ property: z.ZodString;
2559
+ type: z.ZodOptional<z.ZodString>;
2560
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2561
+ hideLabel: z.ZodOptional<z.ZodBoolean>;
2562
+ width: z.ZodOptional<z.ZodString>;
2563
+ }, z.core.$strip>>;
2564
+ }, z.core.$strip>>;
2565
+ }, z.core.$strip>;
2566
+ type FieldInput = z.infer<typeof FieldInputSchema>;
2567
+ /**
2568
+ * A per-context override of a column's field config. Structurally identical to
2569
+ * {@link FieldInputSchema} — every key is optional — so a variant can override
2570
+ * just what it needs (typically a single `options` key) and inherit the rest
2571
+ * from the level below it via {@link mergeFieldVariant}.
2572
+ */
2573
+ declare const FieldVariantSchema: z.ZodObject<{
2574
+ type: z.ZodOptional<z.ZodString>;
2575
+ customRender: z.ZodOptional<z.ZodString>;
2576
+ format: z.ZodOptional<z.ZodString>;
2577
+ resource: z.ZodOptional<z.ZodString>;
2578
+ relationType: z.ZodOptional<z.ZodEnum<{
2579
+ oneToOne: "oneToOne";
2580
+ manyToOne: "manyToOne";
2581
+ oneToMany: "oneToMany";
2582
+ manyToMany: "manyToMany";
2583
+ }>>;
2584
+ position: z.ZodOptional<z.ZodNumber>;
2585
+ options: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2586
+ colspan: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2587
+ sort: z.ZodOptional<z.ZodString>;
2588
+ sortDir: z.ZodOptional<z.ZodEnum<{
2589
+ asc: "asc";
2590
+ desc: "desc";
2591
+ }>>;
2592
+ direction: z.ZodOptional<z.ZodString>;
2593
+ displayKey: z.ZodOptional<z.ZodString>;
2594
+ resource: z.ZodOptional<z.ZodString>;
2595
+ }, z.core.$catchall<z.ZodUnknown>>, z.ZodUnknown]>>;
2596
+ detail: z.ZodOptional<z.ZodObject<{
2597
+ layout: z.ZodEnum<{
2598
+ row: "row";
2599
+ collapse: "collapse";
2600
+ }>;
2601
+ titleKey: z.ZodOptional<z.ZodString>;
2602
+ controls: z.ZodArray<z.ZodObject<{
2603
+ property: z.ZodString;
2604
+ type: z.ZodOptional<z.ZodString>;
2605
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2606
+ hideLabel: z.ZodOptional<z.ZodBoolean>;
2607
+ width: z.ZodOptional<z.ZodString>;
2608
+ }, z.core.$strip>>;
2609
+ }, z.core.$strip>>;
2610
+ }, z.core.$strip>;
2611
+ type FieldVariant = z.infer<typeof FieldVariantSchema>;
2612
+ /**
2613
+ * Layer a variant over a base field config (deep-merge, one level into `options`).
2614
+ *
2615
+ * - `override` wins key-by-key; `base` supplies everything the override omits.
2616
+ * - `options` is merged one level deep so a variant can tweak `options.display`
2617
+ * without repeating `format`, `resource`, `relationType`, etc.
2618
+ * - a `null` value in the override deletes that inherited key (top-level or in
2619
+ * `options`).
2620
+ *
2621
+ * Returns `base` unchanged when there is no override, and `override` when there
2622
+ * is no base — so `mergeFieldVariant(x, undefined) === x`.
2623
+ */
2624
+ declare const mergeFieldVariant: (base: FieldInput | undefined, override: FieldVariant | undefined) => FieldInput | undefined;
2625
+
2626
+ declare const WhenConditionSchema: z.ZodObject<{
2627
+ field: z.ZodString;
2628
+ eq: z.ZodOptional<z.ZodUnknown>;
2629
+ neq: z.ZodOptional<z.ZodUnknown>;
2630
+ exists: z.ZodOptional<z.ZodBoolean>;
2631
+ notExists: z.ZodOptional<z.ZodBoolean>;
2632
+ }, z.core.$strip>;
2633
+ declare const JsonColumnSchema: z.ZodObject<{
2634
+ id: z.ZodString;
2635
+ column: z.ZodOptional<z.ZodString>;
2636
+ label: z.ZodOptional<z.ZodString>;
2637
+ hiddenInTable: z.ZodDefault<z.ZodBoolean>;
2638
+ hiddenInForm: z.ZodDefault<z.ZodBoolean>;
2639
+ hiddenInView: z.ZodDefault<z.ZodBoolean>;
2640
+ sortable: z.ZodDefault<z.ZodBoolean>;
2641
+ defaultSort: z.ZodDefault<z.ZodBoolean>;
2642
+ searchable: z.ZodDefault<z.ZodBoolean>;
2643
+ filterable: z.ZodDefault<z.ZodBoolean>;
2644
+ createable: z.ZodDefault<z.ZodBoolean>;
2645
+ updateable: z.ZodDefault<z.ZodBoolean>;
2646
+ hideLabel: z.ZodDefault<z.ZodBoolean>;
2647
+ showWhen: z.ZodOptional<z.ZodObject<{
2648
+ field: z.ZodString;
2649
+ eq: z.ZodOptional<z.ZodUnknown>;
2650
+ neq: z.ZodOptional<z.ZodUnknown>;
2651
+ exists: z.ZodOptional<z.ZodBoolean>;
2652
+ notExists: z.ZodOptional<z.ZodBoolean>;
2653
+ }, z.core.$strip>>;
2654
+ hideWhen: z.ZodOptional<z.ZodObject<{
2655
+ field: z.ZodString;
2656
+ eq: z.ZodOptional<z.ZodUnknown>;
2657
+ neq: z.ZodOptional<z.ZodUnknown>;
2658
+ exists: z.ZodOptional<z.ZodBoolean>;
2659
+ notExists: z.ZodOptional<z.ZodBoolean>;
2660
+ }, z.core.$strip>>;
2661
+ disabledWhen: z.ZodOptional<z.ZodObject<{
2662
+ field: z.ZodString;
2663
+ eq: z.ZodOptional<z.ZodUnknown>;
2664
+ neq: z.ZodOptional<z.ZodUnknown>;
2665
+ exists: z.ZodOptional<z.ZodBoolean>;
2666
+ notExists: z.ZodOptional<z.ZodBoolean>;
2667
+ }, z.core.$strip>>;
2668
+ displayKey: z.ZodOptional<z.ZodString>;
2669
+ sortId: z.ZodOptional<z.ZodString>;
2670
+ enum: z.ZodOptional<z.ZodString>;
2671
+ idField: z.ZodDefault<z.ZodBoolean>;
2672
+ showInLookup: z.ZodDefault<z.ZodBoolean>;
2673
+ columnType: z.ZodDefault<z.ZodString>;
2674
+ fieldInput: z.ZodOptional<z.ZodObject<{
2675
+ type: z.ZodOptional<z.ZodString>;
2676
+ customRender: z.ZodOptional<z.ZodString>;
2677
+ format: z.ZodOptional<z.ZodString>;
2678
+ resource: z.ZodOptional<z.ZodString>;
2679
+ relationType: z.ZodOptional<z.ZodEnum<{
2680
+ oneToOne: "oneToOne";
2681
+ manyToOne: "manyToOne";
2682
+ oneToMany: "oneToMany";
2683
+ manyToMany: "manyToMany";
2684
+ }>>;
2685
+ position: z.ZodOptional<z.ZodNumber>;
2686
+ options: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2687
+ colspan: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2688
+ sort: z.ZodOptional<z.ZodString>;
2689
+ sortDir: z.ZodOptional<z.ZodEnum<{
2690
+ asc: "asc";
2691
+ desc: "desc";
2692
+ }>>;
2693
+ direction: z.ZodOptional<z.ZodString>;
2694
+ displayKey: z.ZodOptional<z.ZodString>;
2695
+ resource: z.ZodOptional<z.ZodString>;
2696
+ }, z.core.$catchall<z.ZodUnknown>>, z.ZodUnknown]>>;
2697
+ detail: z.ZodOptional<z.ZodObject<{
2698
+ layout: z.ZodEnum<{
2699
+ row: "row";
2700
+ collapse: "collapse";
2701
+ }>;
2702
+ titleKey: z.ZodOptional<z.ZodString>;
2703
+ controls: z.ZodArray<z.ZodObject<{
2704
+ property: z.ZodString;
2705
+ type: z.ZodOptional<z.ZodString>;
2706
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2707
+ hideLabel: z.ZodOptional<z.ZodBoolean>;
2708
+ width: z.ZodOptional<z.ZodString>;
2709
+ }, z.core.$strip>>;
2710
+ }, z.core.$strip>>;
2711
+ }, z.core.$strip>>;
2712
+ fieldView: z.ZodOptional<z.ZodObject<{
2713
+ type: z.ZodOptional<z.ZodString>;
2714
+ customRender: z.ZodOptional<z.ZodString>;
2715
+ format: z.ZodOptional<z.ZodString>;
2716
+ resource: z.ZodOptional<z.ZodString>;
2717
+ relationType: z.ZodOptional<z.ZodEnum<{
2718
+ oneToOne: "oneToOne";
2719
+ manyToOne: "manyToOne";
2720
+ oneToMany: "oneToMany";
2721
+ manyToMany: "manyToMany";
2722
+ }>>;
2723
+ position: z.ZodOptional<z.ZodNumber>;
2724
+ options: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2725
+ colspan: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2726
+ sort: z.ZodOptional<z.ZodString>;
2727
+ sortDir: z.ZodOptional<z.ZodEnum<{
2728
+ asc: "asc";
2729
+ desc: "desc";
2730
+ }>>;
2731
+ direction: z.ZodOptional<z.ZodString>;
2732
+ displayKey: z.ZodOptional<z.ZodString>;
2733
+ resource: z.ZodOptional<z.ZodString>;
2734
+ }, z.core.$catchall<z.ZodUnknown>>, z.ZodUnknown]>>;
2735
+ detail: z.ZodOptional<z.ZodObject<{
2736
+ layout: z.ZodEnum<{
2737
+ row: "row";
2738
+ collapse: "collapse";
2739
+ }>;
2740
+ titleKey: z.ZodOptional<z.ZodString>;
2741
+ controls: z.ZodArray<z.ZodObject<{
2742
+ property: z.ZodString;
2743
+ type: z.ZodOptional<z.ZodString>;
2744
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2745
+ hideLabel: z.ZodOptional<z.ZodBoolean>;
2746
+ width: z.ZodOptional<z.ZodString>;
2747
+ }, z.core.$strip>>;
2748
+ }, z.core.$strip>>;
2749
+ }, z.core.$strip>>;
2750
+ fieldTable: z.ZodOptional<z.ZodObject<{
2751
+ type: z.ZodOptional<z.ZodString>;
2752
+ customRender: z.ZodOptional<z.ZodString>;
2753
+ format: z.ZodOptional<z.ZodString>;
2754
+ resource: z.ZodOptional<z.ZodString>;
2755
+ relationType: z.ZodOptional<z.ZodEnum<{
2756
+ oneToOne: "oneToOne";
2757
+ manyToOne: "manyToOne";
2758
+ oneToMany: "oneToMany";
2759
+ manyToMany: "manyToMany";
2760
+ }>>;
2761
+ position: z.ZodOptional<z.ZodNumber>;
2762
+ options: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2763
+ colspan: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2764
+ sort: z.ZodOptional<z.ZodString>;
2765
+ sortDir: z.ZodOptional<z.ZodEnum<{
2766
+ asc: "asc";
2767
+ desc: "desc";
2768
+ }>>;
2769
+ direction: z.ZodOptional<z.ZodString>;
2770
+ displayKey: z.ZodOptional<z.ZodString>;
2771
+ resource: z.ZodOptional<z.ZodString>;
2772
+ }, z.core.$catchall<z.ZodUnknown>>, z.ZodUnknown]>>;
2773
+ detail: z.ZodOptional<z.ZodObject<{
2774
+ layout: z.ZodEnum<{
2775
+ row: "row";
2776
+ collapse: "collapse";
2777
+ }>;
2778
+ titleKey: z.ZodOptional<z.ZodString>;
2779
+ controls: z.ZodArray<z.ZodObject<{
2780
+ property: z.ZodString;
2781
+ type: z.ZodOptional<z.ZodString>;
2782
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2783
+ hideLabel: z.ZodOptional<z.ZodBoolean>;
2784
+ width: z.ZodOptional<z.ZodString>;
2785
+ }, z.core.$strip>>;
2786
+ }, z.core.$strip>>;
2787
+ }, z.core.$strip>>;
2788
+ extend: z.ZodOptional<z.ZodString>;
2789
+ columns: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2790
+ }, z.core.$strip>;
2791
+ type JsonColumn = z.infer<typeof JsonColumnSchema>;
2792
+ type JsonColumnInput = z.input<typeof JsonColumnSchema>;
2793
+
2794
+ /**
2795
+ * Resolve the field config that drives each rendering context, applying the
2796
+ * `fieldInput → fieldView → fieldTable` fallback chain. These are the single
2797
+ * source of truth for the fallback; every consumer (transformer, view builders)
2798
+ * goes through them so the three-way behaviour can't drift.
2799
+ *
2800
+ * form ← fieldInput (base, unchanged)
2801
+ * view ← fieldView, then fieldInput
2802
+ * table ← fieldTable, then fieldView, then fieldInput
2803
+ *
2804
+ * Merging is deep one level into `options` (see {@link mergeFieldVariant}).
2805
+ */
2806
+ declare const resolveFormField: (c: JsonColumn) => FieldInput | undefined;
2807
+ declare const resolveViewField: (c: JsonColumn) => FieldInput | undefined;
2808
+ declare const resolveTableField: (c: JsonColumn) => FieldInput | undefined;
2809
+
2810
+ declare const RulesetSchema: z.ZodObject<{
2811
+ hideIdInTable: z.ZodDefault<z.ZodBoolean>;
2812
+ hideIdInForm: z.ZodDefault<z.ZodBoolean>;
2813
+ hideIdInView: z.ZodDefault<z.ZodBoolean>;
2814
+ hideTimestamps: z.ZodDefault<z.ZodBoolean>;
2815
+ hideForeignKeys: z.ZodDefault<z.ZodBoolean>;
2816
+ includeRelations: z.ZodDefault<z.ZodBoolean>;
2817
+ hideRelationsInTable: z.ZodDefault<z.ZodBoolean>;
2818
+ showRelationsInForm: z.ZodDefault<z.ZodBoolean>;
2819
+ enumValueLabel: z.ZodDefault<z.ZodBoolean>;
2820
+ sharedEnums: z.ZodDefault<z.ZodBoolean>;
2821
+ defaultOperations: z.ZodDefault<z.ZodObject<{
2822
+ findAll: z.ZodDefault<z.ZodBoolean>;
2823
+ findOne: z.ZodDefault<z.ZodBoolean>;
2824
+ create: z.ZodDefault<z.ZodBoolean>;
2825
+ update: z.ZodDefault<z.ZodBoolean>;
2826
+ patch: z.ZodDefault<z.ZodBoolean>;
2827
+ upsert: z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
2828
+ upsertOn: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
2829
+ }, z.core.$strip>]>>;
2830
+ delete: z.ZodDefault<z.ZodBoolean>;
2831
+ }, z.core.$strip>>;
2832
+ }, z.core.$strip>;
2833
+ type Ruleset = z.infer<typeof RulesetSchema>;
2834
+ declare const CroutonConfigSchema: z.ZodObject<{
2835
+ title: z.ZodString;
2836
+ resourcesDir: z.ZodString;
2837
+ dataSourcesDir: z.ZodString;
2838
+ schemaExportName: z.ZodDefault<z.ZodString>;
2839
+ enumsFile: z.ZodDefault<z.ZodString>;
2840
+ rules: z.ZodDefault<z.ZodObject<{
2841
+ hideIdInTable: z.ZodDefault<z.ZodBoolean>;
2842
+ hideIdInForm: z.ZodDefault<z.ZodBoolean>;
2843
+ hideIdInView: z.ZodDefault<z.ZodBoolean>;
2844
+ hideTimestamps: z.ZodDefault<z.ZodBoolean>;
2845
+ hideForeignKeys: z.ZodDefault<z.ZodBoolean>;
2846
+ includeRelations: z.ZodDefault<z.ZodBoolean>;
2847
+ hideRelationsInTable: z.ZodDefault<z.ZodBoolean>;
2848
+ showRelationsInForm: z.ZodDefault<z.ZodBoolean>;
2849
+ enumValueLabel: z.ZodDefault<z.ZodBoolean>;
2850
+ sharedEnums: z.ZodDefault<z.ZodBoolean>;
2851
+ defaultOperations: z.ZodDefault<z.ZodObject<{
2852
+ findAll: z.ZodDefault<z.ZodBoolean>;
2853
+ findOne: z.ZodDefault<z.ZodBoolean>;
2854
+ create: z.ZodDefault<z.ZodBoolean>;
2855
+ update: z.ZodDefault<z.ZodBoolean>;
2856
+ patch: z.ZodDefault<z.ZodBoolean>;
2857
+ upsert: z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
2858
+ upsertOn: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
2859
+ }, z.core.$strip>]>>;
2860
+ delete: z.ZodDefault<z.ZodBoolean>;
2861
+ }, z.core.$strip>>;
2862
+ }, z.core.$strip>>;
2863
+ sidebarGroups: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
2864
+ label: z.ZodOptional<z.ZodString>;
2865
+ position: z.ZodOptional<z.ZodNumber>;
2866
+ }, z.core.$strip>>>;
2867
+ autoSave: z.ZodDefault<z.ZodBoolean>;
2868
+ }, z.core.$strip>;
2869
+ type CroutonConfig = z.infer<typeof CroutonConfigSchema>;
2870
+
2871
+ declare const CONFIG_FILES: string[];
2872
+
2873
+ /**
2874
+ * Name derivations. The most error-prone one is `clientAccessor`: the value
2875
+ * crouton puts in `resource.json.model` must equal the PrismaClient property,
2876
+ * which Prisma derives by lower-casing the first character of the model name
2877
+ * (the rest is preserved). Getting this wrong silently breaks every query.
2878
+ */
2879
+ /**
2880
+ * Derive a human-readable label from an id.
2881
+ * `"field_label"` → `"Field label"`, `"fieldLabel"` → `"Field label"`.
2882
+ *
2883
+ * Kept local (mirrors `labelFromId` in `@ghentcdh/crouton-core`) so the engine
2884
+ * has no runtime dependency on core — only type-only imports, which keeps the
2885
+ * bundle lean and avoids pulling core's peer deps (zod, jsonforms) into it.
2886
+ */
2887
+ declare const labelFromId: (id: string) => string;
2888
+ type LabelObj = {
2889
+ id: string;
2890
+ label?: string;
2891
+ };
2892
+ declare const normalizeLabel: <L extends LabelObj>(obj: L) => L;
2893
+
2894
+ export { type ArrayAction, type ArrayActionType, type AutocompleteAllOptions, type AutocompleteOptions, type AutocompleteRemoteOptions, type AutocompleteResourceOptions, BooleanCellBuilder, Builder, BuilderWithElements, CONFIG_FILES, type CalculatedColumn, CalculatedColumnSchema, CategoryBuilder, type CategoryType, type ColumnDef, ControlBuilder, type ControlOption, ControlType, type ControlTypes, type CroutonConfig, CroutonConfigSchema, type DataSource, DataSourceSchema, DataSourceShape, type DateRangeOptions, type DetailConfig, DetailConfigSchema, type DetailControl, DetailControlSchema, type DetailOptions, type ElementBuilder, type FieldInput, FieldInputSchema, type FieldType, type FieldVariant, FieldVariantSchema, type Filter, type FormSchemaModel, GroupBuilder, type GroupType, type JsonAction, type JsonActionCondition, JsonActionSchema, type JsonColumn, type JsonColumnInput, JsonColumnSchema, type JsonColumnsMap, type JsonDisplay, type JsonFormsLayout, type JsonIncludeEntry, JsonIncludeEntrySchema, type JsonLinkAction, JsonLinkActionSchema, JsonOperationsSchema, type JsonProcedureAction, JsonProcedureActionSchema, type JsonResourceOperations, type JsonResourceOperationsInput, type KeyValueOption, LayoutBuilder, type LayoutType, LayoutTypes, type ListRequest, type MarkdownOptions, ModalSize, type ModalSizeType, Operator, OperatorLabel, OperatorNoValue, OperatorOptions, type OperatorType, OperatorsByType, PositiveRequestNumber, type RelationFieldInputOptions, RelationFieldInputOptionsSchema, RelationType, type Request, RequestSchema, RequestSchemaWithOffset, type ResourceConfig, type ResourceJson, type ResourceJsonInput, ResourceJsonSchema, ResourceJsonShape, type ResponseData, ResponseRequestSchema, ResponseSchema, type Ruleset, RulesetSchema, type SelectOptions, type Sidebar, type SidebarGroupConfig, SidebarGroupSchema, SidebarSchema, ModalSize as Size, type SizeType, type SortDir, SortDirEnum, StringOrArray, TableBuilder, type TextAreaOptions, TextCellBuilder, type TextCellOption, type TextCellType, type ValueLabel, type ValueLabelOption, WhenConditionSchema, buildFilter, buildSort, buildSortKey, createSchema, dropNullableFromRequired, enforceRequiredStringMinLength, extractFilters, filterToString, findColumnDef, findProperty, fromValueLabel, labelFromId, mergeFieldVariant, normalizeLabel, resolveFormField, resolveTableField, resolveViewField, stringToFilter, toValueLabel, transformDataSource, uiFromJsonSchema };