@narrative.io/data-collaboration-sdk-ts 0.0.50 → 0.0.52

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