@budibase/pro 3.23.26 → 3.23.27

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.
@@ -1,3 +1,3 @@
1
1
  import { z } from "zod";
2
2
  import { TableSchemaFromAI } from "../types";
3
- export declare function tableDataStructuredOutput(tables: TableSchemaFromAI[]): z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
3
+ export declare function tableDataStructuredOutput(tables: TableSchemaFromAI[]): z.ZodObject<{}, z.core.$strip>;
@@ -4,590 +4,101 @@ import { TableSchemaFromAI } from "../types";
4
4
  export declare const generationStructure: z.ZodObject<{
5
5
  tables: z.ZodArray<z.ZodObject<{
6
6
  name: z.ZodString;
7
- schema: z.ZodArray<z.ZodUnion<[z.ZodObject<{
7
+ schema: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
8
8
  name: z.ZodString;
9
- } & {
10
- type: z.ZodEnum<[FieldType.STRING, FieldType.NUMBER, FieldType.BOOLEAN, FieldType.LONGFORM]>;
9
+ type: z.ZodEnum<{
10
+ string: FieldType.STRING;
11
+ longform: FieldType.LONGFORM;
12
+ number: FieldType.NUMBER;
13
+ boolean: FieldType.BOOLEAN;
14
+ }>;
11
15
  constraints: z.ZodNullable<z.ZodOptional<z.ZodObject<{
12
16
  presence: z.ZodBoolean;
13
- }, "strip", z.ZodTypeAny, {
14
- presence: boolean;
15
- }, {
16
- presence: boolean;
17
- }>>>;
18
- }, "strip", z.ZodTypeAny, {
19
- name: string;
20
- type: FieldType.STRING | FieldType.LONGFORM | FieldType.NUMBER | FieldType.BOOLEAN;
21
- constraints?: {
22
- presence: boolean;
23
- } | null | undefined;
24
- }, {
25
- name: string;
26
- type: FieldType.STRING | FieldType.LONGFORM | FieldType.NUMBER | FieldType.BOOLEAN;
27
- constraints?: {
28
- presence: boolean;
29
- } | null | undefined;
30
- }>, z.ZodObject<{
17
+ }, z.core.$strip>>>;
18
+ }, z.core.$strip>, z.ZodObject<{
31
19
  name: z.ZodString;
32
- } & {
33
20
  type: z.ZodLiteral<FieldType.LINK>;
34
21
  tableId: z.ZodString;
35
22
  reverseFieldName: z.ZodString;
36
23
  relationshipId: z.ZodString;
37
- } & {
38
- relationshipType: z.ZodEnum<[RelationshipType.MANY_TO_ONE]>;
39
- }, "strip", z.ZodTypeAny, {
40
- name: string;
41
- type: FieldType.LINK;
42
- tableId: string;
43
- reverseFieldName: string;
44
- relationshipId: string;
45
- relationshipType: RelationshipType.MANY_TO_ONE;
46
- }, {
47
- name: string;
48
- type: FieldType.LINK;
49
- tableId: string;
50
- reverseFieldName: string;
51
- relationshipId: string;
52
- relationshipType: RelationshipType.MANY_TO_ONE;
53
- }>, z.ZodObject<{
24
+ relationshipType: z.ZodEnum<{
25
+ "many-to-one": RelationshipType.MANY_TO_ONE;
26
+ }>;
27
+ }, z.core.$strip>, z.ZodObject<{
54
28
  name: z.ZodString;
55
- } & {
56
29
  type: z.ZodLiteral<FieldType.LINK>;
57
30
  tableId: z.ZodString;
58
31
  reverseFieldName: z.ZodString;
59
32
  relationshipId: z.ZodString;
60
- } & {
61
- relationshipType: z.ZodEnum<[RelationshipType.ONE_TO_MANY]>;
62
- }, "strip", z.ZodTypeAny, {
63
- name: string;
64
- type: FieldType.LINK;
65
- tableId: string;
66
- reverseFieldName: string;
67
- relationshipId: string;
68
- relationshipType: RelationshipType.ONE_TO_MANY;
69
- }, {
70
- name: string;
71
- type: FieldType.LINK;
72
- tableId: string;
73
- reverseFieldName: string;
74
- relationshipId: string;
75
- relationshipType: RelationshipType.ONE_TO_MANY;
76
- }>, z.ZodObject<{
33
+ relationshipType: z.ZodEnum<{
34
+ "one-to-many": RelationshipType.ONE_TO_MANY;
35
+ }>;
36
+ }, z.core.$strip>, z.ZodObject<{
77
37
  name: z.ZodString;
78
- } & {
79
38
  type: z.ZodLiteral<FieldType.LINK>;
80
39
  tableId: z.ZodString;
81
40
  reverseFieldName: z.ZodString;
82
41
  relationshipId: z.ZodString;
83
- } & {
84
- relationshipType: z.ZodEnum<[RelationshipType.MANY_TO_MANY]>;
85
- }, "strip", z.ZodTypeAny, {
86
- name: string;
87
- type: FieldType.LINK;
88
- tableId: string;
89
- reverseFieldName: string;
90
- relationshipId: string;
91
- relationshipType: RelationshipType.MANY_TO_MANY;
92
- }, {
93
- name: string;
94
- type: FieldType.LINK;
95
- tableId: string;
96
- reverseFieldName: string;
97
- relationshipId: string;
98
- relationshipType: RelationshipType.MANY_TO_MANY;
99
- }>, z.ZodObject<{
42
+ relationshipType: z.ZodEnum<{
43
+ "many-to-many": RelationshipType.MANY_TO_MANY;
44
+ }>;
45
+ }, z.core.$strip>, z.ZodObject<{
100
46
  name: z.ZodString;
101
- } & {
102
47
  type: z.ZodLiteral<FieldType.OPTIONS>;
103
48
  constraints: z.ZodObject<{
104
- inclusion: z.ZodArray<z.ZodString, "many">;
49
+ inclusion: z.ZodArray<z.ZodString>;
105
50
  presence: z.ZodBoolean;
106
- }, "strip", z.ZodTypeAny, {
107
- presence: boolean;
108
- inclusion: string[];
109
- }, {
110
- presence: boolean;
111
- inclusion: string[];
112
- }>;
113
- }, "strip", z.ZodTypeAny, {
114
- name: string;
115
- type: FieldType.OPTIONS;
116
- constraints: {
117
- presence: boolean;
118
- inclusion: string[];
119
- };
120
- }, {
121
- name: string;
122
- type: FieldType.OPTIONS;
123
- constraints: {
124
- presence: boolean;
125
- inclusion: string[];
126
- };
127
- }>, z.ZodObject<{
51
+ }, z.core.$strip>;
52
+ }, z.core.$strip>, z.ZodObject<{
128
53
  name: z.ZodString;
129
- } & {
130
54
  type: z.ZodLiteral<FieldType.ARRAY>;
131
55
  constraints: z.ZodObject<{
132
- inclusion: z.ZodArray<z.ZodString, "many">;
56
+ inclusion: z.ZodArray<z.ZodString>;
133
57
  presence: z.ZodBoolean;
134
58
  type: z.ZodLiteral<JsonFieldSubType>;
135
- }, "strip", z.ZodTypeAny, {
136
- type: JsonFieldSubType;
137
- presence: boolean;
138
- inclusion: string[];
139
- }, {
140
- type: JsonFieldSubType;
141
- presence: boolean;
142
- inclusion: string[];
143
- }>;
144
- }, "strip", z.ZodTypeAny, {
145
- name: string;
146
- type: FieldType.ARRAY;
147
- constraints: {
148
- type: JsonFieldSubType;
149
- presence: boolean;
150
- inclusion: string[];
151
- };
152
- }, {
153
- name: string;
154
- type: FieldType.ARRAY;
155
- constraints: {
156
- type: JsonFieldSubType;
157
- presence: boolean;
158
- inclusion: string[];
159
- };
160
- }>, z.ZodObject<{
59
+ }, z.core.$strip>;
60
+ }, z.core.$strip>, z.ZodObject<{
161
61
  name: z.ZodString;
162
- } & {
163
62
  type: z.ZodLiteral<FieldType.FORMULA>;
164
63
  formula: z.ZodString;
165
- responseType: z.ZodEnum<[FieldType.STRING, FieldType.NUMBER, FieldType.BOOLEAN, FieldType.DATETIME]>;
166
- }, "strip", z.ZodTypeAny, {
167
- name: string;
168
- type: FieldType.FORMULA;
169
- formula: string;
170
- responseType: FieldType.STRING | FieldType.NUMBER | FieldType.BOOLEAN | FieldType.DATETIME;
171
- }, {
172
- name: string;
173
- type: FieldType.FORMULA;
174
- formula: string;
175
- responseType: FieldType.STRING | FieldType.NUMBER | FieldType.BOOLEAN | FieldType.DATETIME;
176
- }>, z.ZodObject<{
64
+ responseType: z.ZodEnum<{
65
+ string: FieldType.STRING;
66
+ number: FieldType.NUMBER;
67
+ boolean: FieldType.BOOLEAN;
68
+ datetime: FieldType.DATETIME;
69
+ }>;
70
+ }, z.core.$strip>, z.ZodObject<{
177
71
  name: z.ZodString;
178
- } & {
179
72
  type: z.ZodLiteral<FieldType.DATETIME>;
180
73
  ignoreTimezones: z.ZodBoolean;
181
- }, "strip", z.ZodTypeAny, {
182
- name: string;
183
- type: FieldType.DATETIME;
184
- ignoreTimezones: boolean;
185
- }, {
186
- name: string;
187
- type: FieldType.DATETIME;
188
- ignoreTimezones: boolean;
189
- }>, z.ZodObject<{
74
+ }, z.core.$strip>, z.ZodObject<{
190
75
  name: z.ZodString;
191
- } & {
192
76
  type: z.ZodLiteral<FieldType.DATETIME>;
193
77
  ignoreTimezones: z.ZodBoolean;
194
78
  timeOnly: z.ZodLiteral<true>;
195
- }, "strip", z.ZodTypeAny, {
196
- name: string;
197
- type: FieldType.DATETIME;
198
- ignoreTimezones: boolean;
199
- timeOnly: true;
200
- }, {
201
- name: string;
202
- type: FieldType.DATETIME;
203
- ignoreTimezones: boolean;
204
- timeOnly: true;
205
- }>, z.ZodObject<{
79
+ }, z.core.$strip>, z.ZodObject<{
206
80
  name: z.ZodString;
207
- } & {
208
81
  type: z.ZodLiteral<FieldType.DATETIME>;
209
82
  ignoreTimezones: z.ZodBoolean;
210
83
  dateOnly: z.ZodLiteral<true>;
211
- }, "strip", z.ZodTypeAny, {
212
- name: string;
213
- type: FieldType.DATETIME;
214
- ignoreTimezones: boolean;
215
- dateOnly: true;
216
- }, {
217
- name: string;
218
- type: FieldType.DATETIME;
219
- ignoreTimezones: boolean;
220
- dateOnly: true;
221
- }>, z.ZodObject<{
84
+ }, z.core.$strip>, z.ZodObject<{
222
85
  name: z.ZodString;
223
- } & {
224
86
  type: z.ZodLiteral<FieldType.ATTACHMENT_SINGLE>;
225
87
  subtype: z.ZodLiteral<AttachmentSubType>;
226
- }, "strip", z.ZodTypeAny, {
227
- name: string;
228
- type: FieldType.ATTACHMENT_SINGLE;
229
- subtype: AttachmentSubType;
230
- }, {
231
- name: string;
232
- type: FieldType.ATTACHMENT_SINGLE;
233
- subtype: AttachmentSubType;
234
- }>, z.ZodObject<{
88
+ }, z.core.$strip>, z.ZodObject<{
235
89
  name: z.ZodString;
236
- } & {
237
90
  type: z.ZodLiteral<FieldType.ATTACHMENT_SINGLE>;
238
- }, "strip", z.ZodTypeAny, {
239
- name: string;
240
- type: FieldType.ATTACHMENT_SINGLE;
241
- }, {
242
- name: string;
243
- type: FieldType.ATTACHMENT_SINGLE;
244
- }>, z.ZodObject<{
91
+ }, z.core.$strip>, z.ZodObject<{
245
92
  name: z.ZodString;
246
- } & {
247
93
  type: z.ZodLiteral<FieldType.ATTACHMENTS>;
248
94
  subtype: z.ZodLiteral<AttachmentSubType>;
249
- }, "strip", z.ZodTypeAny, {
250
- name: string;
251
- type: FieldType.ATTACHMENTS;
252
- subtype: AttachmentSubType;
253
- }, {
254
- name: string;
255
- type: FieldType.ATTACHMENTS;
256
- subtype: AttachmentSubType;
257
- }>, z.ZodObject<{
95
+ }, z.core.$strip>, z.ZodObject<{
258
96
  name: z.ZodString;
259
- } & {
260
97
  type: z.ZodLiteral<FieldType.ATTACHMENTS>;
261
- }, "strip", z.ZodTypeAny, {
262
- name: string;
263
- type: FieldType.ATTACHMENTS;
264
- }, {
265
- name: string;
266
- type: FieldType.ATTACHMENTS;
267
- }>]>, "many">;
98
+ }, z.core.$strip>]>>;
268
99
  primaryDisplay: z.ZodString;
269
- }, "strip", z.ZodTypeAny, {
270
- name: string;
271
- schema: ({
272
- name: string;
273
- type: FieldType.STRING | FieldType.LONGFORM | FieldType.NUMBER | FieldType.BOOLEAN;
274
- constraints?: {
275
- presence: boolean;
276
- } | null | undefined;
277
- } | {
278
- name: string;
279
- type: FieldType.LINK;
280
- tableId: string;
281
- reverseFieldName: string;
282
- relationshipId: string;
283
- relationshipType: RelationshipType.MANY_TO_ONE;
284
- } | {
285
- name: string;
286
- type: FieldType.LINK;
287
- tableId: string;
288
- reverseFieldName: string;
289
- relationshipId: string;
290
- relationshipType: RelationshipType.ONE_TO_MANY;
291
- } | {
292
- name: string;
293
- type: FieldType.LINK;
294
- tableId: string;
295
- reverseFieldName: string;
296
- relationshipId: string;
297
- relationshipType: RelationshipType.MANY_TO_MANY;
298
- } | {
299
- name: string;
300
- type: FieldType.OPTIONS;
301
- constraints: {
302
- presence: boolean;
303
- inclusion: string[];
304
- };
305
- } | {
306
- name: string;
307
- type: FieldType.ARRAY;
308
- constraints: {
309
- type: JsonFieldSubType;
310
- presence: boolean;
311
- inclusion: string[];
312
- };
313
- } | {
314
- name: string;
315
- type: FieldType.FORMULA;
316
- formula: string;
317
- responseType: FieldType.STRING | FieldType.NUMBER | FieldType.BOOLEAN | FieldType.DATETIME;
318
- } | {
319
- name: string;
320
- type: FieldType.DATETIME;
321
- ignoreTimezones: boolean;
322
- } | {
323
- name: string;
324
- type: FieldType.DATETIME;
325
- ignoreTimezones: boolean;
326
- timeOnly: true;
327
- } | {
328
- name: string;
329
- type: FieldType.DATETIME;
330
- ignoreTimezones: boolean;
331
- dateOnly: true;
332
- } | {
333
- name: string;
334
- type: FieldType.ATTACHMENT_SINGLE;
335
- subtype: AttachmentSubType;
336
- } | {
337
- name: string;
338
- type: FieldType.ATTACHMENT_SINGLE;
339
- } | {
340
- name: string;
341
- type: FieldType.ATTACHMENTS;
342
- subtype: AttachmentSubType;
343
- } | {
344
- name: string;
345
- type: FieldType.ATTACHMENTS;
346
- })[];
347
- primaryDisplay: string;
348
- }, {
349
- name: string;
350
- schema: ({
351
- name: string;
352
- type: FieldType.STRING | FieldType.LONGFORM | FieldType.NUMBER | FieldType.BOOLEAN;
353
- constraints?: {
354
- presence: boolean;
355
- } | null | undefined;
356
- } | {
357
- name: string;
358
- type: FieldType.LINK;
359
- tableId: string;
360
- reverseFieldName: string;
361
- relationshipId: string;
362
- relationshipType: RelationshipType.MANY_TO_ONE;
363
- } | {
364
- name: string;
365
- type: FieldType.LINK;
366
- tableId: string;
367
- reverseFieldName: string;
368
- relationshipId: string;
369
- relationshipType: RelationshipType.ONE_TO_MANY;
370
- } | {
371
- name: string;
372
- type: FieldType.LINK;
373
- tableId: string;
374
- reverseFieldName: string;
375
- relationshipId: string;
376
- relationshipType: RelationshipType.MANY_TO_MANY;
377
- } | {
378
- name: string;
379
- type: FieldType.OPTIONS;
380
- constraints: {
381
- presence: boolean;
382
- inclusion: string[];
383
- };
384
- } | {
385
- name: string;
386
- type: FieldType.ARRAY;
387
- constraints: {
388
- type: JsonFieldSubType;
389
- presence: boolean;
390
- inclusion: string[];
391
- };
392
- } | {
393
- name: string;
394
- type: FieldType.FORMULA;
395
- formula: string;
396
- responseType: FieldType.STRING | FieldType.NUMBER | FieldType.BOOLEAN | FieldType.DATETIME;
397
- } | {
398
- name: string;
399
- type: FieldType.DATETIME;
400
- ignoreTimezones: boolean;
401
- } | {
402
- name: string;
403
- type: FieldType.DATETIME;
404
- ignoreTimezones: boolean;
405
- timeOnly: true;
406
- } | {
407
- name: string;
408
- type: FieldType.DATETIME;
409
- ignoreTimezones: boolean;
410
- dateOnly: true;
411
- } | {
412
- name: string;
413
- type: FieldType.ATTACHMENT_SINGLE;
414
- subtype: AttachmentSubType;
415
- } | {
416
- name: string;
417
- type: FieldType.ATTACHMENT_SINGLE;
418
- } | {
419
- name: string;
420
- type: FieldType.ATTACHMENTS;
421
- subtype: AttachmentSubType;
422
- } | {
423
- name: string;
424
- type: FieldType.ATTACHMENTS;
425
- })[];
426
- primaryDisplay: string;
427
- }>, "many">;
428
- }, "strip", z.ZodTypeAny, {
429
- tables: {
430
- name: string;
431
- schema: ({
432
- name: string;
433
- type: FieldType.STRING | FieldType.LONGFORM | FieldType.NUMBER | FieldType.BOOLEAN;
434
- constraints?: {
435
- presence: boolean;
436
- } | null | undefined;
437
- } | {
438
- name: string;
439
- type: FieldType.LINK;
440
- tableId: string;
441
- reverseFieldName: string;
442
- relationshipId: string;
443
- relationshipType: RelationshipType.MANY_TO_ONE;
444
- } | {
445
- name: string;
446
- type: FieldType.LINK;
447
- tableId: string;
448
- reverseFieldName: string;
449
- relationshipId: string;
450
- relationshipType: RelationshipType.ONE_TO_MANY;
451
- } | {
452
- name: string;
453
- type: FieldType.LINK;
454
- tableId: string;
455
- reverseFieldName: string;
456
- relationshipId: string;
457
- relationshipType: RelationshipType.MANY_TO_MANY;
458
- } | {
459
- name: string;
460
- type: FieldType.OPTIONS;
461
- constraints: {
462
- presence: boolean;
463
- inclusion: string[];
464
- };
465
- } | {
466
- name: string;
467
- type: FieldType.ARRAY;
468
- constraints: {
469
- type: JsonFieldSubType;
470
- presence: boolean;
471
- inclusion: string[];
472
- };
473
- } | {
474
- name: string;
475
- type: FieldType.FORMULA;
476
- formula: string;
477
- responseType: FieldType.STRING | FieldType.NUMBER | FieldType.BOOLEAN | FieldType.DATETIME;
478
- } | {
479
- name: string;
480
- type: FieldType.DATETIME;
481
- ignoreTimezones: boolean;
482
- } | {
483
- name: string;
484
- type: FieldType.DATETIME;
485
- ignoreTimezones: boolean;
486
- timeOnly: true;
487
- } | {
488
- name: string;
489
- type: FieldType.DATETIME;
490
- ignoreTimezones: boolean;
491
- dateOnly: true;
492
- } | {
493
- name: string;
494
- type: FieldType.ATTACHMENT_SINGLE;
495
- subtype: AttachmentSubType;
496
- } | {
497
- name: string;
498
- type: FieldType.ATTACHMENT_SINGLE;
499
- } | {
500
- name: string;
501
- type: FieldType.ATTACHMENTS;
502
- subtype: AttachmentSubType;
503
- } | {
504
- name: string;
505
- type: FieldType.ATTACHMENTS;
506
- })[];
507
- primaryDisplay: string;
508
- }[];
509
- }, {
510
- tables: {
511
- name: string;
512
- schema: ({
513
- name: string;
514
- type: FieldType.STRING | FieldType.LONGFORM | FieldType.NUMBER | FieldType.BOOLEAN;
515
- constraints?: {
516
- presence: boolean;
517
- } | null | undefined;
518
- } | {
519
- name: string;
520
- type: FieldType.LINK;
521
- tableId: string;
522
- reverseFieldName: string;
523
- relationshipId: string;
524
- relationshipType: RelationshipType.MANY_TO_ONE;
525
- } | {
526
- name: string;
527
- type: FieldType.LINK;
528
- tableId: string;
529
- reverseFieldName: string;
530
- relationshipId: string;
531
- relationshipType: RelationshipType.ONE_TO_MANY;
532
- } | {
533
- name: string;
534
- type: FieldType.LINK;
535
- tableId: string;
536
- reverseFieldName: string;
537
- relationshipId: string;
538
- relationshipType: RelationshipType.MANY_TO_MANY;
539
- } | {
540
- name: string;
541
- type: FieldType.OPTIONS;
542
- constraints: {
543
- presence: boolean;
544
- inclusion: string[];
545
- };
546
- } | {
547
- name: string;
548
- type: FieldType.ARRAY;
549
- constraints: {
550
- type: JsonFieldSubType;
551
- presence: boolean;
552
- inclusion: string[];
553
- };
554
- } | {
555
- name: string;
556
- type: FieldType.FORMULA;
557
- formula: string;
558
- responseType: FieldType.STRING | FieldType.NUMBER | FieldType.BOOLEAN | FieldType.DATETIME;
559
- } | {
560
- name: string;
561
- type: FieldType.DATETIME;
562
- ignoreTimezones: boolean;
563
- } | {
564
- name: string;
565
- type: FieldType.DATETIME;
566
- ignoreTimezones: boolean;
567
- timeOnly: true;
568
- } | {
569
- name: string;
570
- type: FieldType.DATETIME;
571
- ignoreTimezones: boolean;
572
- dateOnly: true;
573
- } | {
574
- name: string;
575
- type: FieldType.ATTACHMENT_SINGLE;
576
- subtype: AttachmentSubType;
577
- } | {
578
- name: string;
579
- type: FieldType.ATTACHMENT_SINGLE;
580
- } | {
581
- name: string;
582
- type: FieldType.ATTACHMENTS;
583
- subtype: AttachmentSubType;
584
- } | {
585
- name: string;
586
- type: FieldType.ATTACHMENTS;
587
- })[];
588
- primaryDisplay: string;
589
- }[];
590
- }>;
100
+ }, z.core.$strip>>;
101
+ }, z.core.$strip>;
591
102
  export type GenerationStructure = z.infer<typeof generationStructure>;
592
- export declare function aiColumnSchemas(tables: TableSchemaFromAI[]): z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
103
+ export declare function aiColumnSchemas(tables: TableSchemaFromAI[]): z.ZodObject<{}, z.core.$strip>;
593
104
  export type AIColumnSchemas = Record<string, AIFieldMetadata[]>;