@xpert-ai/plugin-analytics-files 0.0.0-stage → 0.1.1

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,1160 @@
1
+ import { z } from 'zod/v3';
2
+ import type { JSONValue } from '@xpert-ai/contracts';
3
+ export declare const PROVIDER = "file.table";
4
+ export declare const MAX_BYTES = 8000000;
5
+ export declare const MAX_ROWS = 50000;
6
+ export declare const forbidden: Set<string>;
7
+ export declare const key: z.ZodEffects<z.ZodString, string, string>;
8
+ export declare const selector: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
9
+ export declare const scalar: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
10
+ export declare const fileSchema: z.ZodDiscriminatedUnion<"catalog", [z.ZodObject<{
11
+ catalog: z.ZodLiteral<"xperts">;
12
+ xpertId: z.ZodString;
13
+ filePath: z.ZodEffects<z.ZodString, string, string>;
14
+ }, "strict", z.ZodTypeAny, {
15
+ catalog: "xperts";
16
+ xpertId: string;
17
+ filePath: string;
18
+ }, {
19
+ catalog: "xperts";
20
+ xpertId: string;
21
+ filePath: string;
22
+ }>, z.ZodObject<{
23
+ catalog: z.ZodLiteral<"user-xperts">;
24
+ xpertId: z.ZodString;
25
+ userId: z.ZodString;
26
+ filePath: z.ZodEffects<z.ZodString, string, string>;
27
+ }, "strict", z.ZodTypeAny, {
28
+ catalog: "user-xperts";
29
+ xpertId: string;
30
+ filePath: string;
31
+ userId: string;
32
+ }, {
33
+ catalog: "user-xperts";
34
+ xpertId: string;
35
+ filePath: string;
36
+ userId: string;
37
+ }>, z.ZodObject<{
38
+ catalog: z.ZodLiteral<"users">;
39
+ userId: z.ZodString;
40
+ filePath: z.ZodEffects<z.ZodString, string, string>;
41
+ }, "strict", z.ZodTypeAny, {
42
+ catalog: "users";
43
+ filePath: string;
44
+ userId: string;
45
+ }, {
46
+ catalog: "users";
47
+ filePath: string;
48
+ userId: string;
49
+ }>, z.ZodObject<{
50
+ catalog: z.ZodLiteral<"projects">;
51
+ projectId: z.ZodString;
52
+ filePath: z.ZodEffects<z.ZodString, string, string>;
53
+ }, "strict", z.ZodTypeAny, {
54
+ catalog: "projects";
55
+ filePath: string;
56
+ projectId: string;
57
+ }, {
58
+ catalog: "projects";
59
+ filePath: string;
60
+ projectId: string;
61
+ }>]>;
62
+ export declare const readerSchema: z.ZodDiscriminatedUnion<"format", [z.ZodObject<{
63
+ format: z.ZodLiteral<"csv">;
64
+ delimiter: z.ZodDefault<z.ZodEnum<[",", ";", "\t"]>>;
65
+ headerRow: z.ZodDefault<z.ZodNumber>;
66
+ }, "strict", z.ZodTypeAny, {
67
+ format: "csv";
68
+ delimiter: "," | ";" | "\t";
69
+ headerRow: number;
70
+ }, {
71
+ format: "csv";
72
+ delimiter?: "," | ";" | "\t" | undefined;
73
+ headerRow?: number | undefined;
74
+ }>, z.ZodObject<{
75
+ format: z.ZodLiteral<"json">;
76
+ rowsPath: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
77
+ }, "strict", z.ZodTypeAny, {
78
+ format: "json";
79
+ rowsPath: string[];
80
+ }, {
81
+ format: "json";
82
+ rowsPath: string[];
83
+ }>, z.ZodObject<{
84
+ format: z.ZodLiteral<"xlsx">;
85
+ sheet: z.ZodString;
86
+ headerRow: z.ZodDefault<z.ZodNumber>;
87
+ formulaPolicy: z.ZodDefault<z.ZodEnum<["reject", "cached"]>>;
88
+ }, "strict", z.ZodTypeAny, {
89
+ format: "xlsx";
90
+ headerRow: number;
91
+ sheet: string;
92
+ formulaPolicy: "reject" | "cached";
93
+ }, {
94
+ format: "xlsx";
95
+ sheet: string;
96
+ headerRow?: number | undefined;
97
+ formulaPolicy?: "reject" | "cached" | undefined;
98
+ }>]>;
99
+ export declare const columnSchema: z.ZodObject<{
100
+ key: z.ZodEffects<z.ZodString, string, string>;
101
+ path: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
102
+ label: z.ZodString;
103
+ description: z.ZodString;
104
+ logicalType: z.ZodEnum<["string", "boolean", "int64", "decimal", "float64", "date", "timestamp"]>;
105
+ nullable: z.ZodBoolean;
106
+ role: z.ZodEnum<["dimension", "measure", "time", "identifier"]>;
107
+ unit: z.ZodOptional<z.ZodString>;
108
+ nullValues: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
109
+ }, "strict", z.ZodTypeAny, {
110
+ path: string[];
111
+ key: string;
112
+ label: string;
113
+ description: string;
114
+ logicalType: "string" | "boolean" | "date" | "int64" | "decimal" | "float64" | "timestamp";
115
+ nullable: boolean;
116
+ role: "dimension" | "measure" | "time" | "identifier";
117
+ nullValues: string[];
118
+ unit?: string | undefined;
119
+ }, {
120
+ path: string[];
121
+ key: string;
122
+ label: string;
123
+ description: string;
124
+ logicalType: "string" | "boolean" | "date" | "int64" | "decimal" | "float64" | "timestamp";
125
+ nullable: boolean;
126
+ role: "dimension" | "measure" | "time" | "identifier";
127
+ unit?: string | undefined;
128
+ nullValues?: string[] | undefined;
129
+ }>;
130
+ export declare const datasetSchema: z.ZodEffects<z.ZodObject<{
131
+ id: z.ZodEffects<z.ZodString, string, string>;
132
+ revision: z.ZodEffects<z.ZodString, string, string>;
133
+ name: z.ZodString;
134
+ description: z.ZodString;
135
+ file: z.ZodDiscriminatedUnion<"catalog", [z.ZodObject<{
136
+ catalog: z.ZodLiteral<"xperts">;
137
+ xpertId: z.ZodString;
138
+ filePath: z.ZodEffects<z.ZodString, string, string>;
139
+ }, "strict", z.ZodTypeAny, {
140
+ catalog: "xperts";
141
+ xpertId: string;
142
+ filePath: string;
143
+ }, {
144
+ catalog: "xperts";
145
+ xpertId: string;
146
+ filePath: string;
147
+ }>, z.ZodObject<{
148
+ catalog: z.ZodLiteral<"user-xperts">;
149
+ xpertId: z.ZodString;
150
+ userId: z.ZodString;
151
+ filePath: z.ZodEffects<z.ZodString, string, string>;
152
+ }, "strict", z.ZodTypeAny, {
153
+ catalog: "user-xperts";
154
+ xpertId: string;
155
+ filePath: string;
156
+ userId: string;
157
+ }, {
158
+ catalog: "user-xperts";
159
+ xpertId: string;
160
+ filePath: string;
161
+ userId: string;
162
+ }>, z.ZodObject<{
163
+ catalog: z.ZodLiteral<"users">;
164
+ userId: z.ZodString;
165
+ filePath: z.ZodEffects<z.ZodString, string, string>;
166
+ }, "strict", z.ZodTypeAny, {
167
+ catalog: "users";
168
+ filePath: string;
169
+ userId: string;
170
+ }, {
171
+ catalog: "users";
172
+ filePath: string;
173
+ userId: string;
174
+ }>, z.ZodObject<{
175
+ catalog: z.ZodLiteral<"projects">;
176
+ projectId: z.ZodString;
177
+ filePath: z.ZodEffects<z.ZodString, string, string>;
178
+ }, "strict", z.ZodTypeAny, {
179
+ catalog: "projects";
180
+ filePath: string;
181
+ projectId: string;
182
+ }, {
183
+ catalog: "projects";
184
+ filePath: string;
185
+ projectId: string;
186
+ }>]>;
187
+ reader: z.ZodDiscriminatedUnion<"format", [z.ZodObject<{
188
+ format: z.ZodLiteral<"csv">;
189
+ delimiter: z.ZodDefault<z.ZodEnum<[",", ";", "\t"]>>;
190
+ headerRow: z.ZodDefault<z.ZodNumber>;
191
+ }, "strict", z.ZodTypeAny, {
192
+ format: "csv";
193
+ delimiter: "," | ";" | "\t";
194
+ headerRow: number;
195
+ }, {
196
+ format: "csv";
197
+ delimiter?: "," | ";" | "\t" | undefined;
198
+ headerRow?: number | undefined;
199
+ }>, z.ZodObject<{
200
+ format: z.ZodLiteral<"json">;
201
+ rowsPath: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
202
+ }, "strict", z.ZodTypeAny, {
203
+ format: "json";
204
+ rowsPath: string[];
205
+ }, {
206
+ format: "json";
207
+ rowsPath: string[];
208
+ }>, z.ZodObject<{
209
+ format: z.ZodLiteral<"xlsx">;
210
+ sheet: z.ZodString;
211
+ headerRow: z.ZodDefault<z.ZodNumber>;
212
+ formulaPolicy: z.ZodDefault<z.ZodEnum<["reject", "cached"]>>;
213
+ }, "strict", z.ZodTypeAny, {
214
+ format: "xlsx";
215
+ headerRow: number;
216
+ sheet: string;
217
+ formulaPolicy: "reject" | "cached";
218
+ }, {
219
+ format: "xlsx";
220
+ sheet: string;
221
+ headerRow?: number | undefined;
222
+ formulaPolicy?: "reject" | "cached" | undefined;
223
+ }>]>;
224
+ columns: z.ZodArray<z.ZodObject<{
225
+ key: z.ZodEffects<z.ZodString, string, string>;
226
+ path: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
227
+ label: z.ZodString;
228
+ description: z.ZodString;
229
+ logicalType: z.ZodEnum<["string", "boolean", "int64", "decimal", "float64", "date", "timestamp"]>;
230
+ nullable: z.ZodBoolean;
231
+ role: z.ZodEnum<["dimension", "measure", "time", "identifier"]>;
232
+ unit: z.ZodOptional<z.ZodString>;
233
+ nullValues: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
234
+ }, "strict", z.ZodTypeAny, {
235
+ path: string[];
236
+ key: string;
237
+ label: string;
238
+ description: string;
239
+ logicalType: "string" | "boolean" | "date" | "int64" | "decimal" | "float64" | "timestamp";
240
+ nullable: boolean;
241
+ role: "dimension" | "measure" | "time" | "identifier";
242
+ nullValues: string[];
243
+ unit?: string | undefined;
244
+ }, {
245
+ path: string[];
246
+ key: string;
247
+ label: string;
248
+ description: string;
249
+ logicalType: "string" | "boolean" | "date" | "int64" | "decimal" | "float64" | "timestamp";
250
+ nullable: boolean;
251
+ role: "dimension" | "measure" | "time" | "identifier";
252
+ unit?: string | undefined;
253
+ nullValues?: string[] | undefined;
254
+ }>, "many">;
255
+ }, "strict", z.ZodTypeAny, {
256
+ description: string;
257
+ id: string;
258
+ revision: string;
259
+ name: string;
260
+ file: {
261
+ catalog: "xperts";
262
+ xpertId: string;
263
+ filePath: string;
264
+ } | {
265
+ catalog: "user-xperts";
266
+ xpertId: string;
267
+ filePath: string;
268
+ userId: string;
269
+ } | {
270
+ catalog: "users";
271
+ filePath: string;
272
+ userId: string;
273
+ } | {
274
+ catalog: "projects";
275
+ filePath: string;
276
+ projectId: string;
277
+ };
278
+ reader: {
279
+ format: "csv";
280
+ delimiter: "," | ";" | "\t";
281
+ headerRow: number;
282
+ } | {
283
+ format: "json";
284
+ rowsPath: string[];
285
+ } | {
286
+ format: "xlsx";
287
+ headerRow: number;
288
+ sheet: string;
289
+ formulaPolicy: "reject" | "cached";
290
+ };
291
+ columns: {
292
+ path: string[];
293
+ key: string;
294
+ label: string;
295
+ description: string;
296
+ logicalType: "string" | "boolean" | "date" | "int64" | "decimal" | "float64" | "timestamp";
297
+ nullable: boolean;
298
+ role: "dimension" | "measure" | "time" | "identifier";
299
+ nullValues: string[];
300
+ unit?: string | undefined;
301
+ }[];
302
+ }, {
303
+ description: string;
304
+ id: string;
305
+ revision: string;
306
+ name: string;
307
+ file: {
308
+ catalog: "xperts";
309
+ xpertId: string;
310
+ filePath: string;
311
+ } | {
312
+ catalog: "user-xperts";
313
+ xpertId: string;
314
+ filePath: string;
315
+ userId: string;
316
+ } | {
317
+ catalog: "users";
318
+ filePath: string;
319
+ userId: string;
320
+ } | {
321
+ catalog: "projects";
322
+ filePath: string;
323
+ projectId: string;
324
+ };
325
+ reader: {
326
+ format: "csv";
327
+ delimiter?: "," | ";" | "\t" | undefined;
328
+ headerRow?: number | undefined;
329
+ } | {
330
+ format: "json";
331
+ rowsPath: string[];
332
+ } | {
333
+ format: "xlsx";
334
+ sheet: string;
335
+ headerRow?: number | undefined;
336
+ formulaPolicy?: "reject" | "cached" | undefined;
337
+ };
338
+ columns: {
339
+ path: string[];
340
+ key: string;
341
+ label: string;
342
+ description: string;
343
+ logicalType: "string" | "boolean" | "date" | "int64" | "decimal" | "float64" | "timestamp";
344
+ nullable: boolean;
345
+ role: "dimension" | "measure" | "time" | "identifier";
346
+ unit?: string | undefined;
347
+ nullValues?: string[] | undefined;
348
+ }[];
349
+ }>, {
350
+ description: string;
351
+ id: string;
352
+ revision: string;
353
+ name: string;
354
+ file: {
355
+ catalog: "xperts";
356
+ xpertId: string;
357
+ filePath: string;
358
+ } | {
359
+ catalog: "user-xperts";
360
+ xpertId: string;
361
+ filePath: string;
362
+ userId: string;
363
+ } | {
364
+ catalog: "users";
365
+ filePath: string;
366
+ userId: string;
367
+ } | {
368
+ catalog: "projects";
369
+ filePath: string;
370
+ projectId: string;
371
+ };
372
+ reader: {
373
+ format: "csv";
374
+ delimiter: "," | ";" | "\t";
375
+ headerRow: number;
376
+ } | {
377
+ format: "json";
378
+ rowsPath: string[];
379
+ } | {
380
+ format: "xlsx";
381
+ headerRow: number;
382
+ sheet: string;
383
+ formulaPolicy: "reject" | "cached";
384
+ };
385
+ columns: {
386
+ path: string[];
387
+ key: string;
388
+ label: string;
389
+ description: string;
390
+ logicalType: "string" | "boolean" | "date" | "int64" | "decimal" | "float64" | "timestamp";
391
+ nullable: boolean;
392
+ role: "dimension" | "measure" | "time" | "identifier";
393
+ nullValues: string[];
394
+ unit?: string | undefined;
395
+ }[];
396
+ }, {
397
+ description: string;
398
+ id: string;
399
+ revision: string;
400
+ name: string;
401
+ file: {
402
+ catalog: "xperts";
403
+ xpertId: string;
404
+ filePath: string;
405
+ } | {
406
+ catalog: "user-xperts";
407
+ xpertId: string;
408
+ filePath: string;
409
+ userId: string;
410
+ } | {
411
+ catalog: "users";
412
+ filePath: string;
413
+ userId: string;
414
+ } | {
415
+ catalog: "projects";
416
+ filePath: string;
417
+ projectId: string;
418
+ };
419
+ reader: {
420
+ format: "csv";
421
+ delimiter?: "," | ";" | "\t" | undefined;
422
+ headerRow?: number | undefined;
423
+ } | {
424
+ format: "json";
425
+ rowsPath: string[];
426
+ } | {
427
+ format: "xlsx";
428
+ sheet: string;
429
+ headerRow?: number | undefined;
430
+ formulaPolicy?: "reject" | "cached" | undefined;
431
+ };
432
+ columns: {
433
+ path: string[];
434
+ key: string;
435
+ label: string;
436
+ description: string;
437
+ logicalType: "string" | "boolean" | "date" | "int64" | "decimal" | "float64" | "timestamp";
438
+ nullable: boolean;
439
+ role: "dimension" | "measure" | "time" | "identifier";
440
+ unit?: string | undefined;
441
+ nullValues?: string[] | undefined;
442
+ }[];
443
+ }>;
444
+ export declare const optionsSchema: z.ZodEffects<z.ZodObject<{
445
+ datasets: z.ZodArray<z.ZodEffects<z.ZodObject<{
446
+ id: z.ZodEffects<z.ZodString, string, string>;
447
+ revision: z.ZodEffects<z.ZodString, string, string>;
448
+ name: z.ZodString;
449
+ description: z.ZodString;
450
+ file: z.ZodDiscriminatedUnion<"catalog", [z.ZodObject<{
451
+ catalog: z.ZodLiteral<"xperts">;
452
+ xpertId: z.ZodString;
453
+ filePath: z.ZodEffects<z.ZodString, string, string>;
454
+ }, "strict", z.ZodTypeAny, {
455
+ catalog: "xperts";
456
+ xpertId: string;
457
+ filePath: string;
458
+ }, {
459
+ catalog: "xperts";
460
+ xpertId: string;
461
+ filePath: string;
462
+ }>, z.ZodObject<{
463
+ catalog: z.ZodLiteral<"user-xperts">;
464
+ xpertId: z.ZodString;
465
+ userId: z.ZodString;
466
+ filePath: z.ZodEffects<z.ZodString, string, string>;
467
+ }, "strict", z.ZodTypeAny, {
468
+ catalog: "user-xperts";
469
+ xpertId: string;
470
+ filePath: string;
471
+ userId: string;
472
+ }, {
473
+ catalog: "user-xperts";
474
+ xpertId: string;
475
+ filePath: string;
476
+ userId: string;
477
+ }>, z.ZodObject<{
478
+ catalog: z.ZodLiteral<"users">;
479
+ userId: z.ZodString;
480
+ filePath: z.ZodEffects<z.ZodString, string, string>;
481
+ }, "strict", z.ZodTypeAny, {
482
+ catalog: "users";
483
+ filePath: string;
484
+ userId: string;
485
+ }, {
486
+ catalog: "users";
487
+ filePath: string;
488
+ userId: string;
489
+ }>, z.ZodObject<{
490
+ catalog: z.ZodLiteral<"projects">;
491
+ projectId: z.ZodString;
492
+ filePath: z.ZodEffects<z.ZodString, string, string>;
493
+ }, "strict", z.ZodTypeAny, {
494
+ catalog: "projects";
495
+ filePath: string;
496
+ projectId: string;
497
+ }, {
498
+ catalog: "projects";
499
+ filePath: string;
500
+ projectId: string;
501
+ }>]>;
502
+ reader: z.ZodDiscriminatedUnion<"format", [z.ZodObject<{
503
+ format: z.ZodLiteral<"csv">;
504
+ delimiter: z.ZodDefault<z.ZodEnum<[",", ";", "\t"]>>;
505
+ headerRow: z.ZodDefault<z.ZodNumber>;
506
+ }, "strict", z.ZodTypeAny, {
507
+ format: "csv";
508
+ delimiter: "," | ";" | "\t";
509
+ headerRow: number;
510
+ }, {
511
+ format: "csv";
512
+ delimiter?: "," | ";" | "\t" | undefined;
513
+ headerRow?: number | undefined;
514
+ }>, z.ZodObject<{
515
+ format: z.ZodLiteral<"json">;
516
+ rowsPath: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
517
+ }, "strict", z.ZodTypeAny, {
518
+ format: "json";
519
+ rowsPath: string[];
520
+ }, {
521
+ format: "json";
522
+ rowsPath: string[];
523
+ }>, z.ZodObject<{
524
+ format: z.ZodLiteral<"xlsx">;
525
+ sheet: z.ZodString;
526
+ headerRow: z.ZodDefault<z.ZodNumber>;
527
+ formulaPolicy: z.ZodDefault<z.ZodEnum<["reject", "cached"]>>;
528
+ }, "strict", z.ZodTypeAny, {
529
+ format: "xlsx";
530
+ headerRow: number;
531
+ sheet: string;
532
+ formulaPolicy: "reject" | "cached";
533
+ }, {
534
+ format: "xlsx";
535
+ sheet: string;
536
+ headerRow?: number | undefined;
537
+ formulaPolicy?: "reject" | "cached" | undefined;
538
+ }>]>;
539
+ columns: z.ZodArray<z.ZodObject<{
540
+ key: z.ZodEffects<z.ZodString, string, string>;
541
+ path: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
542
+ label: z.ZodString;
543
+ description: z.ZodString;
544
+ logicalType: z.ZodEnum<["string", "boolean", "int64", "decimal", "float64", "date", "timestamp"]>;
545
+ nullable: z.ZodBoolean;
546
+ role: z.ZodEnum<["dimension", "measure", "time", "identifier"]>;
547
+ unit: z.ZodOptional<z.ZodString>;
548
+ nullValues: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
549
+ }, "strict", z.ZodTypeAny, {
550
+ path: string[];
551
+ key: string;
552
+ label: string;
553
+ description: string;
554
+ logicalType: "string" | "boolean" | "date" | "int64" | "decimal" | "float64" | "timestamp";
555
+ nullable: boolean;
556
+ role: "dimension" | "measure" | "time" | "identifier";
557
+ nullValues: string[];
558
+ unit?: string | undefined;
559
+ }, {
560
+ path: string[];
561
+ key: string;
562
+ label: string;
563
+ description: string;
564
+ logicalType: "string" | "boolean" | "date" | "int64" | "decimal" | "float64" | "timestamp";
565
+ nullable: boolean;
566
+ role: "dimension" | "measure" | "time" | "identifier";
567
+ unit?: string | undefined;
568
+ nullValues?: string[] | undefined;
569
+ }>, "many">;
570
+ }, "strict", z.ZodTypeAny, {
571
+ description: string;
572
+ id: string;
573
+ revision: string;
574
+ name: string;
575
+ file: {
576
+ catalog: "xperts";
577
+ xpertId: string;
578
+ filePath: string;
579
+ } | {
580
+ catalog: "user-xperts";
581
+ xpertId: string;
582
+ filePath: string;
583
+ userId: string;
584
+ } | {
585
+ catalog: "users";
586
+ filePath: string;
587
+ userId: string;
588
+ } | {
589
+ catalog: "projects";
590
+ filePath: string;
591
+ projectId: string;
592
+ };
593
+ reader: {
594
+ format: "csv";
595
+ delimiter: "," | ";" | "\t";
596
+ headerRow: number;
597
+ } | {
598
+ format: "json";
599
+ rowsPath: string[];
600
+ } | {
601
+ format: "xlsx";
602
+ headerRow: number;
603
+ sheet: string;
604
+ formulaPolicy: "reject" | "cached";
605
+ };
606
+ columns: {
607
+ path: string[];
608
+ key: string;
609
+ label: string;
610
+ description: string;
611
+ logicalType: "string" | "boolean" | "date" | "int64" | "decimal" | "float64" | "timestamp";
612
+ nullable: boolean;
613
+ role: "dimension" | "measure" | "time" | "identifier";
614
+ nullValues: string[];
615
+ unit?: string | undefined;
616
+ }[];
617
+ }, {
618
+ description: string;
619
+ id: string;
620
+ revision: string;
621
+ name: string;
622
+ file: {
623
+ catalog: "xperts";
624
+ xpertId: string;
625
+ filePath: string;
626
+ } | {
627
+ catalog: "user-xperts";
628
+ xpertId: string;
629
+ filePath: string;
630
+ userId: string;
631
+ } | {
632
+ catalog: "users";
633
+ filePath: string;
634
+ userId: string;
635
+ } | {
636
+ catalog: "projects";
637
+ filePath: string;
638
+ projectId: string;
639
+ };
640
+ reader: {
641
+ format: "csv";
642
+ delimiter?: "," | ";" | "\t" | undefined;
643
+ headerRow?: number | undefined;
644
+ } | {
645
+ format: "json";
646
+ rowsPath: string[];
647
+ } | {
648
+ format: "xlsx";
649
+ sheet: string;
650
+ headerRow?: number | undefined;
651
+ formulaPolicy?: "reject" | "cached" | undefined;
652
+ };
653
+ columns: {
654
+ path: string[];
655
+ key: string;
656
+ label: string;
657
+ description: string;
658
+ logicalType: "string" | "boolean" | "date" | "int64" | "decimal" | "float64" | "timestamp";
659
+ nullable: boolean;
660
+ role: "dimension" | "measure" | "time" | "identifier";
661
+ unit?: string | undefined;
662
+ nullValues?: string[] | undefined;
663
+ }[];
664
+ }>, {
665
+ description: string;
666
+ id: string;
667
+ revision: string;
668
+ name: string;
669
+ file: {
670
+ catalog: "xperts";
671
+ xpertId: string;
672
+ filePath: string;
673
+ } | {
674
+ catalog: "user-xperts";
675
+ xpertId: string;
676
+ filePath: string;
677
+ userId: string;
678
+ } | {
679
+ catalog: "users";
680
+ filePath: string;
681
+ userId: string;
682
+ } | {
683
+ catalog: "projects";
684
+ filePath: string;
685
+ projectId: string;
686
+ };
687
+ reader: {
688
+ format: "csv";
689
+ delimiter: "," | ";" | "\t";
690
+ headerRow: number;
691
+ } | {
692
+ format: "json";
693
+ rowsPath: string[];
694
+ } | {
695
+ format: "xlsx";
696
+ headerRow: number;
697
+ sheet: string;
698
+ formulaPolicy: "reject" | "cached";
699
+ };
700
+ columns: {
701
+ path: string[];
702
+ key: string;
703
+ label: string;
704
+ description: string;
705
+ logicalType: "string" | "boolean" | "date" | "int64" | "decimal" | "float64" | "timestamp";
706
+ nullable: boolean;
707
+ role: "dimension" | "measure" | "time" | "identifier";
708
+ nullValues: string[];
709
+ unit?: string | undefined;
710
+ }[];
711
+ }, {
712
+ description: string;
713
+ id: string;
714
+ revision: string;
715
+ name: string;
716
+ file: {
717
+ catalog: "xperts";
718
+ xpertId: string;
719
+ filePath: string;
720
+ } | {
721
+ catalog: "user-xperts";
722
+ xpertId: string;
723
+ filePath: string;
724
+ userId: string;
725
+ } | {
726
+ catalog: "users";
727
+ filePath: string;
728
+ userId: string;
729
+ } | {
730
+ catalog: "projects";
731
+ filePath: string;
732
+ projectId: string;
733
+ };
734
+ reader: {
735
+ format: "csv";
736
+ delimiter?: "," | ";" | "\t" | undefined;
737
+ headerRow?: number | undefined;
738
+ } | {
739
+ format: "json";
740
+ rowsPath: string[];
741
+ } | {
742
+ format: "xlsx";
743
+ sheet: string;
744
+ headerRow?: number | undefined;
745
+ formulaPolicy?: "reject" | "cached" | undefined;
746
+ };
747
+ columns: {
748
+ path: string[];
749
+ key: string;
750
+ label: string;
751
+ description: string;
752
+ logicalType: "string" | "boolean" | "date" | "int64" | "decimal" | "float64" | "timestamp";
753
+ nullable: boolean;
754
+ role: "dimension" | "measure" | "time" | "identifier";
755
+ unit?: string | undefined;
756
+ nullValues?: string[] | undefined;
757
+ }[];
758
+ }>, "many">;
759
+ }, "strict", z.ZodTypeAny, {
760
+ datasets: {
761
+ description: string;
762
+ id: string;
763
+ revision: string;
764
+ name: string;
765
+ file: {
766
+ catalog: "xperts";
767
+ xpertId: string;
768
+ filePath: string;
769
+ } | {
770
+ catalog: "user-xperts";
771
+ xpertId: string;
772
+ filePath: string;
773
+ userId: string;
774
+ } | {
775
+ catalog: "users";
776
+ filePath: string;
777
+ userId: string;
778
+ } | {
779
+ catalog: "projects";
780
+ filePath: string;
781
+ projectId: string;
782
+ };
783
+ reader: {
784
+ format: "csv";
785
+ delimiter: "," | ";" | "\t";
786
+ headerRow: number;
787
+ } | {
788
+ format: "json";
789
+ rowsPath: string[];
790
+ } | {
791
+ format: "xlsx";
792
+ headerRow: number;
793
+ sheet: string;
794
+ formulaPolicy: "reject" | "cached";
795
+ };
796
+ columns: {
797
+ path: string[];
798
+ key: string;
799
+ label: string;
800
+ description: string;
801
+ logicalType: "string" | "boolean" | "date" | "int64" | "decimal" | "float64" | "timestamp";
802
+ nullable: boolean;
803
+ role: "dimension" | "measure" | "time" | "identifier";
804
+ nullValues: string[];
805
+ unit?: string | undefined;
806
+ }[];
807
+ }[];
808
+ }, {
809
+ datasets: {
810
+ description: string;
811
+ id: string;
812
+ revision: string;
813
+ name: string;
814
+ file: {
815
+ catalog: "xperts";
816
+ xpertId: string;
817
+ filePath: string;
818
+ } | {
819
+ catalog: "user-xperts";
820
+ xpertId: string;
821
+ filePath: string;
822
+ userId: string;
823
+ } | {
824
+ catalog: "users";
825
+ filePath: string;
826
+ userId: string;
827
+ } | {
828
+ catalog: "projects";
829
+ filePath: string;
830
+ projectId: string;
831
+ };
832
+ reader: {
833
+ format: "csv";
834
+ delimiter?: "," | ";" | "\t" | undefined;
835
+ headerRow?: number | undefined;
836
+ } | {
837
+ format: "json";
838
+ rowsPath: string[];
839
+ } | {
840
+ format: "xlsx";
841
+ sheet: string;
842
+ headerRow?: number | undefined;
843
+ formulaPolicy?: "reject" | "cached" | undefined;
844
+ };
845
+ columns: {
846
+ path: string[];
847
+ key: string;
848
+ label: string;
849
+ description: string;
850
+ logicalType: "string" | "boolean" | "date" | "int64" | "decimal" | "float64" | "timestamp";
851
+ nullable: boolean;
852
+ role: "dimension" | "measure" | "time" | "identifier";
853
+ unit?: string | undefined;
854
+ nullValues?: string[] | undefined;
855
+ }[];
856
+ }[];
857
+ }>, {
858
+ datasets: {
859
+ description: string;
860
+ id: string;
861
+ revision: string;
862
+ name: string;
863
+ file: {
864
+ catalog: "xperts";
865
+ xpertId: string;
866
+ filePath: string;
867
+ } | {
868
+ catalog: "user-xperts";
869
+ xpertId: string;
870
+ filePath: string;
871
+ userId: string;
872
+ } | {
873
+ catalog: "users";
874
+ filePath: string;
875
+ userId: string;
876
+ } | {
877
+ catalog: "projects";
878
+ filePath: string;
879
+ projectId: string;
880
+ };
881
+ reader: {
882
+ format: "csv";
883
+ delimiter: "," | ";" | "\t";
884
+ headerRow: number;
885
+ } | {
886
+ format: "json";
887
+ rowsPath: string[];
888
+ } | {
889
+ format: "xlsx";
890
+ headerRow: number;
891
+ sheet: string;
892
+ formulaPolicy: "reject" | "cached";
893
+ };
894
+ columns: {
895
+ path: string[];
896
+ key: string;
897
+ label: string;
898
+ description: string;
899
+ logicalType: "string" | "boolean" | "date" | "int64" | "decimal" | "float64" | "timestamp";
900
+ nullable: boolean;
901
+ role: "dimension" | "measure" | "time" | "identifier";
902
+ nullValues: string[];
903
+ unit?: string | undefined;
904
+ }[];
905
+ }[];
906
+ }, {
907
+ datasets: {
908
+ description: string;
909
+ id: string;
910
+ revision: string;
911
+ name: string;
912
+ file: {
913
+ catalog: "xperts";
914
+ xpertId: string;
915
+ filePath: string;
916
+ } | {
917
+ catalog: "user-xperts";
918
+ xpertId: string;
919
+ filePath: string;
920
+ userId: string;
921
+ } | {
922
+ catalog: "users";
923
+ filePath: string;
924
+ userId: string;
925
+ } | {
926
+ catalog: "projects";
927
+ filePath: string;
928
+ projectId: string;
929
+ };
930
+ reader: {
931
+ format: "csv";
932
+ delimiter?: "," | ";" | "\t" | undefined;
933
+ headerRow?: number | undefined;
934
+ } | {
935
+ format: "json";
936
+ rowsPath: string[];
937
+ } | {
938
+ format: "xlsx";
939
+ sheet: string;
940
+ headerRow?: number | undefined;
941
+ formulaPolicy?: "reject" | "cached" | undefined;
942
+ };
943
+ columns: {
944
+ path: string[];
945
+ key: string;
946
+ label: string;
947
+ description: string;
948
+ logicalType: "string" | "boolean" | "date" | "int64" | "decimal" | "float64" | "timestamp";
949
+ nullable: boolean;
950
+ role: "dimension" | "measure" | "time" | "identifier";
951
+ unit?: string | undefined;
952
+ nullValues?: string[] | undefined;
953
+ }[];
954
+ }[];
955
+ }>;
956
+ export declare const filterSchema: z.ZodObject<{
957
+ column: z.ZodEffects<z.ZodString, string, string>;
958
+ operator: z.ZodEnum<["eq", "ne", "gt", "gte", "lt", "lte", "contains"]>;
959
+ value: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
960
+ type: z.ZodLiteral<"literal">;
961
+ value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
962
+ }, "strict", z.ZodTypeAny, {
963
+ value: string | number | boolean | null;
964
+ type: "literal";
965
+ }, {
966
+ value: string | number | boolean | null;
967
+ type: "literal";
968
+ }>, z.ZodObject<{
969
+ type: z.ZodLiteral<"parameter">;
970
+ name: z.ZodEffects<z.ZodString, string, string>;
971
+ }, "strict", z.ZodTypeAny, {
972
+ type: "parameter";
973
+ name: string;
974
+ }, {
975
+ type: "parameter";
976
+ name: string;
977
+ }>]>;
978
+ skipWhenNull: z.ZodDefault<z.ZodBoolean>;
979
+ }, "strict", z.ZodTypeAny, {
980
+ value: {
981
+ value: string | number | boolean | null;
982
+ type: "literal";
983
+ } | {
984
+ type: "parameter";
985
+ name: string;
986
+ };
987
+ column: string;
988
+ operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains";
989
+ skipWhenNull: boolean;
990
+ }, {
991
+ value: {
992
+ value: string | number | boolean | null;
993
+ type: "literal";
994
+ } | {
995
+ type: "parameter";
996
+ name: string;
997
+ };
998
+ column: string;
999
+ operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains";
1000
+ skipWhenNull?: boolean | undefined;
1001
+ }>;
1002
+ export declare const aggregateSchema: z.ZodObject<{
1003
+ key: z.ZodEffects<z.ZodString, string, string>;
1004
+ operation: z.ZodEnum<["sum", "count", "min", "max"]>;
1005
+ column: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1006
+ }, "strict", z.ZodTypeAny, {
1007
+ key: string;
1008
+ operation: "sum" | "count" | "min" | "max";
1009
+ column?: string | undefined;
1010
+ }, {
1011
+ key: string;
1012
+ operation: "sum" | "count" | "min" | "max";
1013
+ column?: string | undefined;
1014
+ }>;
1015
+ export declare const payloadSchema: z.ZodObject<{
1016
+ datasetId: z.ZodEffects<z.ZodString, string, string>;
1017
+ revision: z.ZodEffects<z.ZodString, string, string>;
1018
+ contractHash: z.ZodString;
1019
+ select: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
1020
+ filters: z.ZodDefault<z.ZodArray<z.ZodObject<{
1021
+ column: z.ZodEffects<z.ZodString, string, string>;
1022
+ operator: z.ZodEnum<["eq", "ne", "gt", "gte", "lt", "lte", "contains"]>;
1023
+ value: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1024
+ type: z.ZodLiteral<"literal">;
1025
+ value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
1026
+ }, "strict", z.ZodTypeAny, {
1027
+ value: string | number | boolean | null;
1028
+ type: "literal";
1029
+ }, {
1030
+ value: string | number | boolean | null;
1031
+ type: "literal";
1032
+ }>, z.ZodObject<{
1033
+ type: z.ZodLiteral<"parameter">;
1034
+ name: z.ZodEffects<z.ZodString, string, string>;
1035
+ }, "strict", z.ZodTypeAny, {
1036
+ type: "parameter";
1037
+ name: string;
1038
+ }, {
1039
+ type: "parameter";
1040
+ name: string;
1041
+ }>]>;
1042
+ skipWhenNull: z.ZodDefault<z.ZodBoolean>;
1043
+ }, "strict", z.ZodTypeAny, {
1044
+ value: {
1045
+ value: string | number | boolean | null;
1046
+ type: "literal";
1047
+ } | {
1048
+ type: "parameter";
1049
+ name: string;
1050
+ };
1051
+ column: string;
1052
+ operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains";
1053
+ skipWhenNull: boolean;
1054
+ }, {
1055
+ value: {
1056
+ value: string | number | boolean | null;
1057
+ type: "literal";
1058
+ } | {
1059
+ type: "parameter";
1060
+ name: string;
1061
+ };
1062
+ column: string;
1063
+ operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains";
1064
+ skipWhenNull?: boolean | undefined;
1065
+ }>, "many">>;
1066
+ groupBy: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
1067
+ aggregates: z.ZodDefault<z.ZodArray<z.ZodObject<{
1068
+ key: z.ZodEffects<z.ZodString, string, string>;
1069
+ operation: z.ZodEnum<["sum", "count", "min", "max"]>;
1070
+ column: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1071
+ }, "strict", z.ZodTypeAny, {
1072
+ key: string;
1073
+ operation: "sum" | "count" | "min" | "max";
1074
+ column?: string | undefined;
1075
+ }, {
1076
+ key: string;
1077
+ operation: "sum" | "count" | "min" | "max";
1078
+ column?: string | undefined;
1079
+ }>, "many">>;
1080
+ orderBy: z.ZodDefault<z.ZodArray<z.ZodObject<{
1081
+ column: z.ZodEffects<z.ZodString, string, string>;
1082
+ direction: z.ZodEnum<["asc", "desc"]>;
1083
+ }, "strict", z.ZodTypeAny, {
1084
+ column: string;
1085
+ direction: "asc" | "desc";
1086
+ }, {
1087
+ column: string;
1088
+ direction: "asc" | "desc";
1089
+ }>, "many">>;
1090
+ }, "strict", z.ZodTypeAny, {
1091
+ revision: string;
1092
+ datasetId: string;
1093
+ contractHash: string;
1094
+ select: string[];
1095
+ filters: {
1096
+ value: {
1097
+ value: string | number | boolean | null;
1098
+ type: "literal";
1099
+ } | {
1100
+ type: "parameter";
1101
+ name: string;
1102
+ };
1103
+ column: string;
1104
+ operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains";
1105
+ skipWhenNull: boolean;
1106
+ }[];
1107
+ groupBy: string[];
1108
+ aggregates: {
1109
+ key: string;
1110
+ operation: "sum" | "count" | "min" | "max";
1111
+ column?: string | undefined;
1112
+ }[];
1113
+ orderBy: {
1114
+ column: string;
1115
+ direction: "asc" | "desc";
1116
+ }[];
1117
+ }, {
1118
+ revision: string;
1119
+ datasetId: string;
1120
+ contractHash: string;
1121
+ select: string[];
1122
+ filters?: {
1123
+ value: {
1124
+ value: string | number | boolean | null;
1125
+ type: "literal";
1126
+ } | {
1127
+ type: "parameter";
1128
+ name: string;
1129
+ };
1130
+ column: string;
1131
+ operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains";
1132
+ skipWhenNull?: boolean | undefined;
1133
+ }[] | undefined;
1134
+ groupBy?: string[] | undefined;
1135
+ aggregates?: {
1136
+ key: string;
1137
+ operation: "sum" | "count" | "min" | "max";
1138
+ column?: string | undefined;
1139
+ }[] | undefined;
1140
+ orderBy?: {
1141
+ column: string;
1142
+ direction: "asc" | "desc";
1143
+ }[] | undefined;
1144
+ }>;
1145
+ export declare const discoverySchema: z.ZodObject<{
1146
+ datasetId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1147
+ page: z.ZodDefault<z.ZodNumber>;
1148
+ }, "strict", z.ZodTypeAny, {
1149
+ page: number;
1150
+ datasetId?: string | undefined;
1151
+ }, {
1152
+ datasetId?: string | undefined;
1153
+ page?: number | undefined;
1154
+ }>;
1155
+ export type FileDataset = z.output<typeof datasetSchema>;
1156
+ export type Column = z.output<typeof columnSchema>;
1157
+ export type FileQuery = z.output<typeof payloadSchema>;
1158
+ export type FileReader = z.output<typeof readerSchema>;
1159
+ export declare function jsonSchema(schema: z.ZodTypeAny): Record<string, JSONValue>;
1160
+ export declare function readPath(value: unknown, path: string[]): unknown;