@baseplate-dev/project-builder-lib 0.5.1 → 0.5.2

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.
Files changed (121) hide show
  1. package/CHANGELOG.md +464 -0
  2. package/dist/definition/model/model-field-utils.js +4 -4
  3. package/dist/definition/model/model-field-utils.js.map +1 -1
  4. package/dist/definition/model/model-utils.js +3 -3
  5. package/dist/definition/model/model-utils.js.map +1 -1
  6. package/dist/migrations/index.d.ts.map +1 -1
  7. package/dist/migrations/index.js +3 -1
  8. package/dist/migrations/index.js.map +1 -1
  9. package/dist/migrations/migration-007-model-graphql.js +1 -1
  10. package/dist/migrations/migration-007-model-graphql.js.map +1 -1
  11. package/dist/migrations/migration-020-move-redis-to-infrastructure.js +1 -1
  12. package/dist/migrations/migration-020-move-redis-to-infrastructure.js.map +1 -1
  13. package/dist/migrations/migration-021-migrate-bullmq-to-plugin.js +1 -1
  14. package/dist/migrations/migration-021-migrate-bullmq-to-plugin.js.map +1 -1
  15. package/dist/migrations/migration-023-assign-app-ports.d.ts +34 -0
  16. package/dist/migrations/migration-023-assign-app-ports.d.ts.map +1 -0
  17. package/dist/migrations/migration-023-assign-app-ports.js +49 -0
  18. package/dist/migrations/migration-023-assign-app-ports.js.map +1 -0
  19. package/dist/plugins/spec/config-spec.js +2 -2
  20. package/dist/plugins/spec/config-spec.js.map +1 -1
  21. package/dist/references/collect-refs.d.ts +5 -1
  22. package/dist/references/collect-refs.d.ts.map +1 -1
  23. package/dist/references/collect-refs.js +20 -1
  24. package/dist/references/collect-refs.js.map +1 -1
  25. package/dist/references/definition-ref-builder.d.ts.map +1 -1
  26. package/dist/references/expression-types.d.ts +152 -0
  27. package/dist/references/expression-types.d.ts.map +1 -0
  28. package/dist/references/expression-types.js +46 -0
  29. package/dist/references/expression-types.js.map +1 -0
  30. package/dist/references/extend-parser-context-with-refs.d.ts +13 -0
  31. package/dist/references/extend-parser-context-with-refs.d.ts.map +1 -1
  32. package/dist/references/extend-parser-context-with-refs.js +39 -1
  33. package/dist/references/extend-parser-context-with-refs.js.map +1 -1
  34. package/dist/references/extract-definition-refs.d.ts +6 -3
  35. package/dist/references/extract-definition-refs.d.ts.map +1 -1
  36. package/dist/references/extract-definition-refs.js +25 -4
  37. package/dist/references/extract-definition-refs.js.map +1 -1
  38. package/dist/references/index.d.ts +1 -0
  39. package/dist/references/index.d.ts.map +1 -1
  40. package/dist/references/index.js +1 -0
  41. package/dist/references/index.js.map +1 -1
  42. package/dist/references/markers.d.ts +23 -0
  43. package/dist/references/markers.d.ts.map +1 -1
  44. package/dist/references/markers.js +16 -0
  45. package/dist/references/markers.js.map +1 -1
  46. package/dist/references/resolve-zod-ref-payload-names.d.ts.map +1 -1
  47. package/dist/references/resolve-zod-ref-payload-names.js +1 -0
  48. package/dist/references/resolve-zod-ref-payload-names.js.map +1 -1
  49. package/dist/references/strip-ref-markers.d.ts +3 -3
  50. package/dist/references/strip-ref-markers.d.ts.map +1 -1
  51. package/dist/references/strip-ref-markers.js +7 -4
  52. package/dist/references/strip-ref-markers.js.map +1 -1
  53. package/dist/references/types.d.ts +5 -0
  54. package/dist/references/types.d.ts.map +1 -1
  55. package/dist/references/types.js.map +1 -1
  56. package/dist/schema/apps/backend/index.d.ts +2 -0
  57. package/dist/schema/apps/backend/index.d.ts.map +1 -1
  58. package/dist/schema/apps/backend/index.js +1 -0
  59. package/dist/schema/apps/backend/index.js.map +1 -1
  60. package/dist/schema/apps/base.d.ts +2 -0
  61. package/dist/schema/apps/base.d.ts.map +1 -1
  62. package/dist/schema/apps/base.js +1 -0
  63. package/dist/schema/apps/base.js.map +1 -1
  64. package/dist/schema/apps/web/admin/sections/crud-actions/types.d.ts.map +1 -1
  65. package/dist/schema/apps/web/web-app.d.ts +2 -0
  66. package/dist/schema/apps/web/web-app.d.ts.map +1 -1
  67. package/dist/schema/apps/web/web-app.js +1 -0
  68. package/dist/schema/apps/web/web-app.js.map +1 -1
  69. package/dist/schema/creator/types.d.ts +6 -1
  70. package/dist/schema/creator/types.d.ts.map +1 -1
  71. package/dist/schema/models/authorizer/authorizer-expression-acorn-parser.d.ts +30 -0
  72. package/dist/schema/models/authorizer/authorizer-expression-acorn-parser.d.ts.map +1 -0
  73. package/dist/schema/models/authorizer/authorizer-expression-acorn-parser.js +291 -0
  74. package/dist/schema/models/authorizer/authorizer-expression-acorn-parser.js.map +1 -0
  75. package/dist/schema/models/authorizer/authorizer-expression-ast.d.ts +159 -0
  76. package/dist/schema/models/authorizer/authorizer-expression-ast.d.ts.map +1 -0
  77. package/dist/schema/models/authorizer/authorizer-expression-ast.js +31 -0
  78. package/dist/schema/models/authorizer/authorizer-expression-ast.js.map +1 -0
  79. package/dist/schema/models/authorizer/authorizer-expression-parser.d.ts +77 -0
  80. package/dist/schema/models/authorizer/authorizer-expression-parser.d.ts.map +1 -0
  81. package/dist/schema/models/authorizer/authorizer-expression-parser.js +147 -0
  82. package/dist/schema/models/authorizer/authorizer-expression-parser.js.map +1 -0
  83. package/dist/schema/models/authorizer/authorizer-expression-validator.d.ts +51 -0
  84. package/dist/schema/models/authorizer/authorizer-expression-validator.d.ts.map +1 -0
  85. package/dist/schema/models/authorizer/authorizer-expression-validator.js +125 -0
  86. package/dist/schema/models/authorizer/authorizer-expression-validator.js.map +1 -0
  87. package/dist/schema/models/authorizer/authorizer.d.ts +59 -0
  88. package/dist/schema/models/authorizer/authorizer.d.ts.map +1 -0
  89. package/dist/schema/models/authorizer/authorizer.js +56 -0
  90. package/dist/schema/models/authorizer/authorizer.js.map +1 -0
  91. package/dist/schema/models/authorizer/index.d.ts +7 -0
  92. package/dist/schema/models/authorizer/index.d.ts.map +1 -0
  93. package/dist/schema/models/authorizer/index.js +7 -0
  94. package/dist/schema/models/authorizer/index.js.map +1 -0
  95. package/dist/schema/models/authorizer/types.d.ts +6 -0
  96. package/dist/schema/models/authorizer/types.d.ts.map +1 -0
  97. package/dist/schema/models/authorizer/types.js +8 -0
  98. package/dist/schema/models/authorizer/types.js.map +1 -0
  99. package/dist/schema/models/index.d.ts +2 -860
  100. package/dist/schema/models/index.d.ts.map +1 -1
  101. package/dist/schema/models/index.js +2 -222
  102. package/dist/schema/models/index.js.map +1 -1
  103. package/dist/schema/models/models.d.ts +914 -0
  104. package/dist/schema/models/models.d.ts.map +1 -0
  105. package/dist/schema/models/models.js +225 -0
  106. package/dist/schema/models/models.js.map +1 -0
  107. package/dist/schema/project-definition.d.ts +46 -2
  108. package/dist/schema/project-definition.d.ts.map +1 -1
  109. package/dist/schema/settings/settings.d.ts +2 -2
  110. package/dist/schema/settings/theme.d.ts +3 -3
  111. package/dist/tools/model-merger/model-merger.js +1 -1
  112. package/dist/tools/model-merger/model-merger.js.map +1 -1
  113. package/dist/utils/color-conversions.js +1 -1
  114. package/dist/utils/color-conversions.js.map +1 -1
  115. package/dist/web/components/feature-combobox-field.d.ts.map +1 -1
  116. package/dist/web/components/feature-combobox-field.js +1 -1
  117. package/dist/web/components/feature-combobox-field.js.map +1 -1
  118. package/dist/web/components/model-combobox-field.d.ts.map +1 -1
  119. package/dist/web/components/model-combobox-field.js +1 -1
  120. package/dist/web/components/model-combobox-field.js.map +1 -1
  121. package/package.json +10 -9
@@ -1,865 +1,7 @@
1
- import { z } from 'zod';
2
- import type { def } from '#src/schema/creator/index.js';
1
+ export * from './authorizer/index.js';
3
2
  export * from './enums.js';
4
3
  export * from './graphql.js';
4
+ export * from './models.js';
5
5
  export * from './transformers/index.js';
6
6
  export * from './types.js';
7
- export declare const createModelScalarFieldSchema: import("#src/schema/creator/index.js").DefinitionSchemaCreatorWithSlots<z.ZodPipe<z.ZodType<{
8
- id: string;
9
- name: string;
10
- type: "string" | "boolean" | "int" | "date" | "enum" | "uuid" | "dateTime" | "float" | "decimal" | "json";
11
- isOptional: boolean;
12
- options: {
13
- defaultEnumValueRef?: string | undefined;
14
- default: string;
15
- genUuid?: boolean | undefined;
16
- updatedAt?: boolean | undefined;
17
- defaultToNow?: boolean | undefined;
18
- enumRef?: string | undefined;
19
- };
20
- }, {
21
- id: string;
22
- name: string;
23
- type: "string" | "boolean" | "int" | "date" | "enum" | "uuid" | "dateTime" | "float" | "decimal" | "json";
24
- isOptional?: boolean | undefined;
25
- options?: {
26
- default?: string | undefined;
27
- genUuid?: boolean | undefined;
28
- updatedAt?: boolean | undefined;
29
- defaultToNow?: boolean | undefined;
30
- enumRef?: string | undefined;
31
- defaultEnumValueRef?: string | undefined;
32
- } | undefined;
33
- }, z.core.$ZodTypeInternals<{
34
- id: string;
35
- name: string;
36
- type: "string" | "boolean" | "int" | "date" | "enum" | "uuid" | "dateTime" | "float" | "decimal" | "json";
37
- isOptional: boolean;
38
- options: {
39
- defaultEnumValueRef?: string | undefined;
40
- default: string;
41
- genUuid?: boolean | undefined;
42
- updatedAt?: boolean | undefined;
43
- defaultToNow?: boolean | undefined;
44
- enumRef?: string | undefined;
45
- };
46
- }, {
47
- id: string;
48
- name: string;
49
- type: "string" | "boolean" | "int" | "date" | "enum" | "uuid" | "dateTime" | "float" | "decimal" | "json";
50
- isOptional?: boolean | undefined;
51
- options?: {
52
- default?: string | undefined;
53
- genUuid?: boolean | undefined;
54
- updatedAt?: boolean | undefined;
55
- defaultToNow?: boolean | undefined;
56
- enumRef?: string | undefined;
57
- defaultEnumValueRef?: string | undefined;
58
- } | undefined;
59
- }>>, z.ZodTransform<{
60
- id: string;
61
- name: string;
62
- type: "string" | "boolean" | "int" | "date" | "enum" | "uuid" | "dateTime" | "float" | "decimal" | "json";
63
- isOptional: boolean;
64
- options: {
65
- defaultEnumValueRef?: string | undefined;
66
- default: string;
67
- genUuid?: boolean | undefined;
68
- updatedAt?: boolean | undefined;
69
- defaultToNow?: boolean | undefined;
70
- enumRef?: string | undefined;
71
- };
72
- }, {
73
- id: string;
74
- name: string;
75
- type: "string" | "boolean" | "int" | "date" | "enum" | "uuid" | "dateTime" | "float" | "decimal" | "json";
76
- isOptional: boolean;
77
- options: {
78
- defaultEnumValueRef?: string | undefined;
79
- default: string;
80
- genUuid?: boolean | undefined;
81
- updatedAt?: boolean | undefined;
82
- defaultToNow?: boolean | undefined;
83
- enumRef?: string | undefined;
84
- };
85
- }>>, {
86
- modelSlot: import("#src/references/index.js").DefinitionEntityType<false>;
87
- }>;
88
- export type ModelScalarFieldConfig = def.InferOutput<typeof createModelScalarFieldSchema>;
89
- export type ModelScalarFieldConfigInput = def.InferInput<typeof createModelScalarFieldSchema>;
90
- export declare const REFERENTIAL_ACTIONS: readonly ["Cascade", "Restrict", "NoAction", "SetNull", "SetDefault"];
91
- export declare const createModelRelationFieldSchema: import("#src/schema/creator/index.js").DefinitionSchemaCreatorWithSlots<z.ZodType<{
92
- id: string;
93
- foreignId: string;
94
- name: string;
95
- references: {
96
- localRef: string;
97
- foreignRef: string;
98
- }[];
99
- modelRef: string;
100
- foreignRelationName: string;
101
- onDelete: "Cascade" | "Restrict" | "NoAction" | "SetNull" | "SetDefault";
102
- onUpdate: "Cascade" | "Restrict" | "NoAction" | "SetNull" | "SetDefault";
103
- }, {
104
- id: string;
105
- name: string;
106
- references: {
107
- localRef: string;
108
- foreignRef: string;
109
- }[];
110
- modelRef: string;
111
- foreignRelationName: string;
112
- foreignId?: string | undefined;
113
- onDelete?: "Cascade" | "Restrict" | "NoAction" | "SetNull" | "SetDefault" | undefined;
114
- onUpdate?: "Cascade" | "Restrict" | "NoAction" | "SetNull" | "SetDefault" | undefined;
115
- }, z.core.$ZodTypeInternals<{
116
- id: string;
117
- foreignId: string;
118
- name: string;
119
- references: {
120
- localRef: string;
121
- foreignRef: string;
122
- }[];
123
- modelRef: string;
124
- foreignRelationName: string;
125
- onDelete: "Cascade" | "Restrict" | "NoAction" | "SetNull" | "SetDefault";
126
- onUpdate: "Cascade" | "Restrict" | "NoAction" | "SetNull" | "SetDefault";
127
- }, {
128
- id: string;
129
- name: string;
130
- references: {
131
- localRef: string;
132
- foreignRef: string;
133
- }[];
134
- modelRef: string;
135
- foreignRelationName: string;
136
- foreignId?: string | undefined;
137
- onDelete?: "Cascade" | "Restrict" | "NoAction" | "SetNull" | "SetDefault" | undefined;
138
- onUpdate?: "Cascade" | "Restrict" | "NoAction" | "SetNull" | "SetDefault" | undefined;
139
- }>>, {
140
- modelSlot: import("#src/references/index.js").DefinitionEntityType<false>;
141
- }>;
142
- export type ModelRelationFieldConfig = def.InferOutput<typeof createModelRelationFieldSchema>;
143
- export type ModelRelationFieldConfigInput = def.InferInput<typeof createModelRelationFieldSchema>;
144
- export declare const createModelUniqueConstraintSchema: import("#src/schema/creator/index.js").DefinitionSchemaCreatorWithSlots<z.ZodType<{
145
- id: string;
146
- fields: {
147
- fieldRef: string;
148
- }[];
149
- }, {
150
- id: string;
151
- fields: {
152
- fieldRef: string;
153
- }[];
154
- }, z.core.$ZodTypeInternals<{
155
- id: string;
156
- fields: {
157
- fieldRef: string;
158
- }[];
159
- }, {
160
- id: string;
161
- fields: {
162
- fieldRef: string;
163
- }[];
164
- }>>, {
165
- modelSlot: import("#src/references/index.js").DefinitionEntityType<false>;
166
- }>;
167
- export type ModelUniqueConstraintConfig = def.InferOutput<typeof createModelUniqueConstraintSchema>;
168
- export type ModelUniqueConstraintConfigInput = def.InferInput<typeof createModelUniqueConstraintSchema>;
169
- export declare const createModelServiceSchema: import("#src/schema/creator/index.js").DefinitionSchemaCreatorWithSlots<z.ZodObject<{
170
- create: z.ZodDefault<z.ZodObject<{
171
- enabled: z.ZodDefault<z.ZodBoolean>;
172
- fields: z.ZodOptional<z.ZodArray<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
173
- transformerNames: z.ZodOptional<z.ZodArray<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
174
- }, z.core.$strip>>;
175
- update: z.ZodDefault<z.ZodObject<{
176
- enabled: z.ZodDefault<z.ZodBoolean>;
177
- fields: z.ZodOptional<z.ZodArray<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
178
- transformerNames: z.ZodOptional<z.ZodArray<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
179
- }, z.core.$strip>>;
180
- delete: z.ZodDefault<z.ZodObject<{
181
- enabled: z.ZodDefault<z.ZodBoolean>;
182
- }, z.core.$strip>>;
183
- transformers: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
184
- readonly id: z.ZodString;
185
- readonly type: z.ZodString;
186
- }, z.core.$loose>], "type">>>;
187
- }, z.core.$strip>, {
188
- modelSlot: import("#src/references/index.js").DefinitionEntityType<false>;
189
- }>;
190
- export type ModelServiceConfig = def.InferOutput<typeof createModelServiceSchema>;
191
- export declare const createModelBaseSchema: import("#src/schema/creator/index.js").DefinitionSchemaCreatorWithSlots<z.ZodObject<{
192
- id: z.ZodString;
193
- name: z.ZodString;
194
- featureRef: z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
195
- model: z.ZodObject<{
196
- fields: z.ZodArray<z.ZodPipe<z.ZodType<{
197
- id: string;
198
- name: string;
199
- type: "string" | "boolean" | "int" | "date" | "enum" | "uuid" | "dateTime" | "float" | "decimal" | "json";
200
- isOptional: boolean;
201
- options: {
202
- defaultEnumValueRef?: string | undefined;
203
- default: string;
204
- genUuid?: boolean | undefined;
205
- updatedAt?: boolean | undefined;
206
- defaultToNow?: boolean | undefined;
207
- enumRef?: string | undefined;
208
- };
209
- }, {
210
- id: string;
211
- name: string;
212
- type: "string" | "boolean" | "int" | "date" | "enum" | "uuid" | "dateTime" | "float" | "decimal" | "json";
213
- isOptional?: boolean | undefined;
214
- options?: {
215
- default?: string | undefined;
216
- genUuid?: boolean | undefined;
217
- updatedAt?: boolean | undefined;
218
- defaultToNow?: boolean | undefined;
219
- enumRef?: string | undefined;
220
- defaultEnumValueRef?: string | undefined;
221
- } | undefined;
222
- }, z.core.$ZodTypeInternals<{
223
- id: string;
224
- name: string;
225
- type: "string" | "boolean" | "int" | "date" | "enum" | "uuid" | "dateTime" | "float" | "decimal" | "json";
226
- isOptional: boolean;
227
- options: {
228
- defaultEnumValueRef?: string | undefined;
229
- default: string;
230
- genUuid?: boolean | undefined;
231
- updatedAt?: boolean | undefined;
232
- defaultToNow?: boolean | undefined;
233
- enumRef?: string | undefined;
234
- };
235
- }, {
236
- id: string;
237
- name: string;
238
- type: "string" | "boolean" | "int" | "date" | "enum" | "uuid" | "dateTime" | "float" | "decimal" | "json";
239
- isOptional?: boolean | undefined;
240
- options?: {
241
- default?: string | undefined;
242
- genUuid?: boolean | undefined;
243
- updatedAt?: boolean | undefined;
244
- defaultToNow?: boolean | undefined;
245
- enumRef?: string | undefined;
246
- defaultEnumValueRef?: string | undefined;
247
- } | undefined;
248
- }>>, z.ZodTransform<{
249
- id: string;
250
- name: string;
251
- type: "string" | "boolean" | "int" | "date" | "enum" | "uuid" | "dateTime" | "float" | "decimal" | "json";
252
- isOptional: boolean;
253
- options: {
254
- defaultEnumValueRef?: string | undefined;
255
- default: string;
256
- genUuid?: boolean | undefined;
257
- updatedAt?: boolean | undefined;
258
- defaultToNow?: boolean | undefined;
259
- enumRef?: string | undefined;
260
- };
261
- }, {
262
- id: string;
263
- name: string;
264
- type: "string" | "boolean" | "int" | "date" | "enum" | "uuid" | "dateTime" | "float" | "decimal" | "json";
265
- isOptional: boolean;
266
- options: {
267
- defaultEnumValueRef?: string | undefined;
268
- default: string;
269
- genUuid?: boolean | undefined;
270
- updatedAt?: boolean | undefined;
271
- defaultToNow?: boolean | undefined;
272
- enumRef?: string | undefined;
273
- };
274
- }>>>;
275
- relations: z.ZodOptional<z.ZodArray<z.ZodType<{
276
- id: string;
277
- foreignId: string;
278
- name: string;
279
- references: {
280
- localRef: string;
281
- foreignRef: string;
282
- }[];
283
- modelRef: string;
284
- foreignRelationName: string;
285
- onDelete: "Cascade" | "Restrict" | "NoAction" | "SetNull" | "SetDefault";
286
- onUpdate: "Cascade" | "Restrict" | "NoAction" | "SetNull" | "SetDefault";
287
- }, {
288
- id: string;
289
- name: string;
290
- references: {
291
- localRef: string;
292
- foreignRef: string;
293
- }[];
294
- modelRef: string;
295
- foreignRelationName: string;
296
- foreignId?: string | undefined;
297
- onDelete?: "Cascade" | "Restrict" | "NoAction" | "SetNull" | "SetDefault" | undefined;
298
- onUpdate?: "Cascade" | "Restrict" | "NoAction" | "SetNull" | "SetDefault" | undefined;
299
- }, z.core.$ZodTypeInternals<{
300
- id: string;
301
- foreignId: string;
302
- name: string;
303
- references: {
304
- localRef: string;
305
- foreignRef: string;
306
- }[];
307
- modelRef: string;
308
- foreignRelationName: string;
309
- onDelete: "Cascade" | "Restrict" | "NoAction" | "SetNull" | "SetDefault";
310
- onUpdate: "Cascade" | "Restrict" | "NoAction" | "SetNull" | "SetDefault";
311
- }, {
312
- id: string;
313
- name: string;
314
- references: {
315
- localRef: string;
316
- foreignRef: string;
317
- }[];
318
- modelRef: string;
319
- foreignRelationName: string;
320
- foreignId?: string | undefined;
321
- onDelete?: "Cascade" | "Restrict" | "NoAction" | "SetNull" | "SetDefault" | undefined;
322
- onUpdate?: "Cascade" | "Restrict" | "NoAction" | "SetNull" | "SetDefault" | undefined;
323
- }>>>>;
324
- primaryKeyFieldRefs: z.ZodArray<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
325
- uniqueConstraints: z.ZodOptional<z.ZodArray<z.ZodType<{
326
- id: string;
327
- fields: {
328
- fieldRef: string;
329
- }[];
330
- }, {
331
- id: string;
332
- fields: {
333
- fieldRef: string;
334
- }[];
335
- }, z.core.$ZodTypeInternals<{
336
- id: string;
337
- fields: {
338
- fieldRef: string;
339
- }[];
340
- }, {
341
- id: string;
342
- fields: {
343
- fieldRef: string;
344
- }[];
345
- }>>>>;
346
- }, z.core.$strip>;
347
- service: z.ZodDefault<z.ZodObject<{
348
- create: z.ZodDefault<z.ZodObject<{
349
- enabled: z.ZodDefault<z.ZodBoolean>;
350
- fields: z.ZodOptional<z.ZodArray<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
351
- transformerNames: z.ZodOptional<z.ZodArray<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
352
- }, z.core.$strip>>;
353
- update: z.ZodDefault<z.ZodObject<{
354
- enabled: z.ZodDefault<z.ZodBoolean>;
355
- fields: z.ZodOptional<z.ZodArray<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
356
- transformerNames: z.ZodOptional<z.ZodArray<z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
357
- }, z.core.$strip>>;
358
- delete: z.ZodDefault<z.ZodObject<{
359
- enabled: z.ZodDefault<z.ZodBoolean>;
360
- }, z.core.$strip>>;
361
- transformers: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
362
- readonly id: z.ZodString;
363
- readonly type: z.ZodString;
364
- }, z.core.$loose>], "type">>>;
365
- }, z.core.$strip>>;
366
- graphql: z.ZodOptional<z.ZodType<{
367
- objectType?: {
368
- enabled?: boolean | undefined;
369
- fields?: string[] | undefined;
370
- localRelations?: string[] | undefined;
371
- foreignRelations?: string[] | undefined;
372
- } | undefined;
373
- queries?: {
374
- get?: {
375
- enabled?: boolean | undefined;
376
- roles?: string[] | undefined;
377
- } | undefined;
378
- list?: {
379
- enabled?: boolean | undefined;
380
- roles?: string[] | undefined;
381
- } | undefined;
382
- } | undefined;
383
- mutations?: {
384
- create?: {
385
- enabled?: boolean | undefined;
386
- roles?: string[] | undefined;
387
- } | undefined;
388
- update?: {
389
- enabled?: boolean | undefined;
390
- roles?: string[] | undefined;
391
- } | undefined;
392
- delete?: {
393
- enabled?: boolean | undefined;
394
- roles?: string[] | undefined;
395
- } | undefined;
396
- } | undefined;
397
- } | undefined, {
398
- objectType?: {
399
- enabled?: boolean | undefined;
400
- fields?: string[] | undefined;
401
- localRelations?: string[] | undefined;
402
- foreignRelations?: string[] | undefined;
403
- } | undefined;
404
- queries?: {
405
- get?: {
406
- enabled?: boolean | undefined;
407
- roles?: string[] | undefined;
408
- } | undefined;
409
- list?: {
410
- enabled?: boolean | undefined;
411
- roles?: string[] | undefined;
412
- } | undefined;
413
- } | undefined;
414
- mutations?: {
415
- create?: {
416
- enabled?: boolean | undefined;
417
- roles?: string[] | undefined;
418
- } | undefined;
419
- update?: {
420
- enabled?: boolean | undefined;
421
- roles?: string[] | undefined;
422
- } | undefined;
423
- delete?: {
424
- enabled?: boolean | undefined;
425
- roles?: string[] | undefined;
426
- } | undefined;
427
- } | undefined;
428
- } | undefined, z.core.$ZodTypeInternals<{
429
- objectType?: {
430
- enabled?: boolean | undefined;
431
- fields?: string[] | undefined;
432
- localRelations?: string[] | undefined;
433
- foreignRelations?: string[] | undefined;
434
- } | undefined;
435
- queries?: {
436
- get?: {
437
- enabled?: boolean | undefined;
438
- roles?: string[] | undefined;
439
- } | undefined;
440
- list?: {
441
- enabled?: boolean | undefined;
442
- roles?: string[] | undefined;
443
- } | undefined;
444
- } | undefined;
445
- mutations?: {
446
- create?: {
447
- enabled?: boolean | undefined;
448
- roles?: string[] | undefined;
449
- } | undefined;
450
- update?: {
451
- enabled?: boolean | undefined;
452
- roles?: string[] | undefined;
453
- } | undefined;
454
- delete?: {
455
- enabled?: boolean | undefined;
456
- roles?: string[] | undefined;
457
- } | undefined;
458
- } | undefined;
459
- } | undefined, {
460
- objectType?: {
461
- enabled?: boolean | undefined;
462
- fields?: string[] | undefined;
463
- localRelations?: string[] | undefined;
464
- foreignRelations?: string[] | undefined;
465
- } | undefined;
466
- queries?: {
467
- get?: {
468
- enabled?: boolean | undefined;
469
- roles?: string[] | undefined;
470
- } | undefined;
471
- list?: {
472
- enabled?: boolean | undefined;
473
- roles?: string[] | undefined;
474
- } | undefined;
475
- } | undefined;
476
- mutations?: {
477
- create?: {
478
- enabled?: boolean | undefined;
479
- roles?: string[] | undefined;
480
- } | undefined;
481
- update?: {
482
- enabled?: boolean | undefined;
483
- roles?: string[] | undefined;
484
- } | undefined;
485
- delete?: {
486
- enabled?: boolean | undefined;
487
- roles?: string[] | undefined;
488
- } | undefined;
489
- } | undefined;
490
- } | undefined>>>;
491
- }, z.core.$strip>, {
492
- modelSlot: import("#src/references/index.js").DefinitionEntityType<false>;
493
- }>;
494
- export declare const createModelSchema: (context: import("#src/schema/creator/index.js").DefinitionSchemaParserContext) => z.ZodType<{
495
- id: string;
496
- name: string;
497
- featureRef: string;
498
- model: {
499
- fields: {
500
- id: string;
501
- name: string;
502
- type: "string" | "boolean" | "int" | "date" | "enum" | "uuid" | "dateTime" | "float" | "decimal" | "json";
503
- isOptional: boolean;
504
- options: {
505
- defaultEnumValueRef?: string | undefined;
506
- default: string;
507
- genUuid?: boolean | undefined;
508
- updatedAt?: boolean | undefined;
509
- defaultToNow?: boolean | undefined;
510
- enumRef?: string | undefined;
511
- };
512
- }[];
513
- primaryKeyFieldRefs: string[];
514
- relations?: {
515
- id: string;
516
- foreignId: string;
517
- name: string;
518
- references: {
519
- localRef: string;
520
- foreignRef: string;
521
- }[];
522
- modelRef: string;
523
- foreignRelationName: string;
524
- onDelete: "Cascade" | "Restrict" | "NoAction" | "SetNull" | "SetDefault";
525
- onUpdate: "Cascade" | "Restrict" | "NoAction" | "SetNull" | "SetDefault";
526
- }[] | undefined;
527
- uniqueConstraints?: {
528
- id: string;
529
- fields: {
530
- fieldRef: string;
531
- }[];
532
- }[] | undefined;
533
- };
534
- service: {
535
- create: {
536
- enabled: boolean;
537
- fields?: string[] | undefined;
538
- transformerNames?: string[] | undefined;
539
- };
540
- update: {
541
- enabled: boolean;
542
- fields?: string[] | undefined;
543
- transformerNames?: string[] | undefined;
544
- };
545
- delete: {
546
- enabled: boolean;
547
- };
548
- transformers: {
549
- [x: string]: unknown;
550
- id: string;
551
- type: string;
552
- }[];
553
- };
554
- graphql?: {
555
- objectType?: {
556
- enabled?: boolean | undefined;
557
- fields?: string[] | undefined;
558
- localRelations?: string[] | undefined;
559
- foreignRelations?: string[] | undefined;
560
- } | undefined;
561
- queries?: {
562
- get?: {
563
- enabled?: boolean | undefined;
564
- roles?: string[] | undefined;
565
- } | undefined;
566
- list?: {
567
- enabled?: boolean | undefined;
568
- roles?: string[] | undefined;
569
- } | undefined;
570
- } | undefined;
571
- mutations?: {
572
- create?: {
573
- enabled?: boolean | undefined;
574
- roles?: string[] | undefined;
575
- } | undefined;
576
- update?: {
577
- enabled?: boolean | undefined;
578
- roles?: string[] | undefined;
579
- } | undefined;
580
- delete?: {
581
- enabled?: boolean | undefined;
582
- roles?: string[] | undefined;
583
- } | undefined;
584
- } | undefined;
585
- } | undefined;
586
- }, {
587
- id: string;
588
- name: string;
589
- featureRef: string;
590
- model: {
591
- fields: {
592
- id: string;
593
- name: string;
594
- type: "string" | "boolean" | "int" | "date" | "enum" | "uuid" | "dateTime" | "float" | "decimal" | "json";
595
- isOptional?: boolean | undefined;
596
- options?: {
597
- default?: string | undefined;
598
- genUuid?: boolean | undefined;
599
- updatedAt?: boolean | undefined;
600
- defaultToNow?: boolean | undefined;
601
- enumRef?: string | undefined;
602
- defaultEnumValueRef?: string | undefined;
603
- } | undefined;
604
- }[];
605
- primaryKeyFieldRefs: string[];
606
- relations?: {
607
- id: string;
608
- name: string;
609
- references: {
610
- localRef: string;
611
- foreignRef: string;
612
- }[];
613
- modelRef: string;
614
- foreignRelationName: string;
615
- foreignId?: string | undefined;
616
- onDelete?: "Cascade" | "Restrict" | "NoAction" | "SetNull" | "SetDefault" | undefined;
617
- onUpdate?: "Cascade" | "Restrict" | "NoAction" | "SetNull" | "SetDefault" | undefined;
618
- }[] | undefined;
619
- uniqueConstraints?: {
620
- id: string;
621
- fields: {
622
- fieldRef: string;
623
- }[];
624
- }[] | undefined;
625
- };
626
- service?: {
627
- create?: {
628
- enabled?: boolean | undefined;
629
- fields?: string[] | undefined;
630
- transformerNames?: string[] | undefined;
631
- } | undefined;
632
- update?: {
633
- enabled?: boolean | undefined;
634
- fields?: string[] | undefined;
635
- transformerNames?: string[] | undefined;
636
- } | undefined;
637
- delete?: {
638
- enabled?: boolean | undefined;
639
- } | undefined;
640
- transformers?: {
641
- [x: string]: unknown;
642
- id: string;
643
- type: string;
644
- }[] | undefined;
645
- } | undefined;
646
- graphql?: {
647
- objectType?: {
648
- enabled?: boolean | undefined;
649
- fields?: string[] | undefined;
650
- localRelations?: string[] | undefined;
651
- foreignRelations?: string[] | undefined;
652
- } | undefined;
653
- queries?: {
654
- get?: {
655
- enabled?: boolean | undefined;
656
- roles?: string[] | undefined;
657
- } | undefined;
658
- list?: {
659
- enabled?: boolean | undefined;
660
- roles?: string[] | undefined;
661
- } | undefined;
662
- } | undefined;
663
- mutations?: {
664
- create?: {
665
- enabled?: boolean | undefined;
666
- roles?: string[] | undefined;
667
- } | undefined;
668
- update?: {
669
- enabled?: boolean | undefined;
670
- roles?: string[] | undefined;
671
- } | undefined;
672
- delete?: {
673
- enabled?: boolean | undefined;
674
- roles?: string[] | undefined;
675
- } | undefined;
676
- } | undefined;
677
- } | undefined;
678
- }, z.core.$ZodTypeInternals<{
679
- id: string;
680
- name: string;
681
- featureRef: string;
682
- model: {
683
- fields: {
684
- id: string;
685
- name: string;
686
- type: "string" | "boolean" | "int" | "date" | "enum" | "uuid" | "dateTime" | "float" | "decimal" | "json";
687
- isOptional: boolean;
688
- options: {
689
- defaultEnumValueRef?: string | undefined;
690
- default: string;
691
- genUuid?: boolean | undefined;
692
- updatedAt?: boolean | undefined;
693
- defaultToNow?: boolean | undefined;
694
- enumRef?: string | undefined;
695
- };
696
- }[];
697
- primaryKeyFieldRefs: string[];
698
- relations?: {
699
- id: string;
700
- foreignId: string;
701
- name: string;
702
- references: {
703
- localRef: string;
704
- foreignRef: string;
705
- }[];
706
- modelRef: string;
707
- foreignRelationName: string;
708
- onDelete: "Cascade" | "Restrict" | "NoAction" | "SetNull" | "SetDefault";
709
- onUpdate: "Cascade" | "Restrict" | "NoAction" | "SetNull" | "SetDefault";
710
- }[] | undefined;
711
- uniqueConstraints?: {
712
- id: string;
713
- fields: {
714
- fieldRef: string;
715
- }[];
716
- }[] | undefined;
717
- };
718
- service: {
719
- create: {
720
- enabled: boolean;
721
- fields?: string[] | undefined;
722
- transformerNames?: string[] | undefined;
723
- };
724
- update: {
725
- enabled: boolean;
726
- fields?: string[] | undefined;
727
- transformerNames?: string[] | undefined;
728
- };
729
- delete: {
730
- enabled: boolean;
731
- };
732
- transformers: {
733
- [x: string]: unknown;
734
- id: string;
735
- type: string;
736
- }[];
737
- };
738
- graphql?: {
739
- objectType?: {
740
- enabled?: boolean | undefined;
741
- fields?: string[] | undefined;
742
- localRelations?: string[] | undefined;
743
- foreignRelations?: string[] | undefined;
744
- } | undefined;
745
- queries?: {
746
- get?: {
747
- enabled?: boolean | undefined;
748
- roles?: string[] | undefined;
749
- } | undefined;
750
- list?: {
751
- enabled?: boolean | undefined;
752
- roles?: string[] | undefined;
753
- } | undefined;
754
- } | undefined;
755
- mutations?: {
756
- create?: {
757
- enabled?: boolean | undefined;
758
- roles?: string[] | undefined;
759
- } | undefined;
760
- update?: {
761
- enabled?: boolean | undefined;
762
- roles?: string[] | undefined;
763
- } | undefined;
764
- delete?: {
765
- enabled?: boolean | undefined;
766
- roles?: string[] | undefined;
767
- } | undefined;
768
- } | undefined;
769
- } | undefined;
770
- }, {
771
- id: string;
772
- name: string;
773
- featureRef: string;
774
- model: {
775
- fields: {
776
- id: string;
777
- name: string;
778
- type: "string" | "boolean" | "int" | "date" | "enum" | "uuid" | "dateTime" | "float" | "decimal" | "json";
779
- isOptional?: boolean | undefined;
780
- options?: {
781
- default?: string | undefined;
782
- genUuid?: boolean | undefined;
783
- updatedAt?: boolean | undefined;
784
- defaultToNow?: boolean | undefined;
785
- enumRef?: string | undefined;
786
- defaultEnumValueRef?: string | undefined;
787
- } | undefined;
788
- }[];
789
- primaryKeyFieldRefs: string[];
790
- relations?: {
791
- id: string;
792
- name: string;
793
- references: {
794
- localRef: string;
795
- foreignRef: string;
796
- }[];
797
- modelRef: string;
798
- foreignRelationName: string;
799
- foreignId?: string | undefined;
800
- onDelete?: "Cascade" | "Restrict" | "NoAction" | "SetNull" | "SetDefault" | undefined;
801
- onUpdate?: "Cascade" | "Restrict" | "NoAction" | "SetNull" | "SetDefault" | undefined;
802
- }[] | undefined;
803
- uniqueConstraints?: {
804
- id: string;
805
- fields: {
806
- fieldRef: string;
807
- }[];
808
- }[] | undefined;
809
- };
810
- service?: {
811
- create?: {
812
- enabled?: boolean | undefined;
813
- fields?: string[] | undefined;
814
- transformerNames?: string[] | undefined;
815
- } | undefined;
816
- update?: {
817
- enabled?: boolean | undefined;
818
- fields?: string[] | undefined;
819
- transformerNames?: string[] | undefined;
820
- } | undefined;
821
- delete?: {
822
- enabled?: boolean | undefined;
823
- } | undefined;
824
- transformers?: {
825
- [x: string]: unknown;
826
- id: string;
827
- type: string;
828
- }[] | undefined;
829
- } | undefined;
830
- graphql?: {
831
- objectType?: {
832
- enabled?: boolean | undefined;
833
- fields?: string[] | undefined;
834
- localRelations?: string[] | undefined;
835
- foreignRelations?: string[] | undefined;
836
- } | undefined;
837
- queries?: {
838
- get?: {
839
- enabled?: boolean | undefined;
840
- roles?: string[] | undefined;
841
- } | undefined;
842
- list?: {
843
- enabled?: boolean | undefined;
844
- roles?: string[] | undefined;
845
- } | undefined;
846
- } | undefined;
847
- mutations?: {
848
- create?: {
849
- enabled?: boolean | undefined;
850
- roles?: string[] | undefined;
851
- } | undefined;
852
- update?: {
853
- enabled?: boolean | undefined;
854
- roles?: string[] | undefined;
855
- } | undefined;
856
- delete?: {
857
- enabled?: boolean | undefined;
858
- roles?: string[] | undefined;
859
- } | undefined;
860
- } | undefined;
861
- } | undefined;
862
- }>>;
863
- export type ModelConfig = def.InferOutput<typeof createModelSchema>;
864
- export type ModelConfigInput = def.InferInput<typeof createModelSchema>;
865
7
  //# sourceMappingURL=index.d.ts.map