bem-ai-sdk 0.28.0 → 0.29.0

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 (126) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/client.d.mts +10 -10
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +10 -10
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/buckets.d.mts +9 -113
  10. package/resources/buckets.d.mts.map +1 -1
  11. package/resources/buckets.d.ts +9 -113
  12. package/resources/buckets.d.ts.map +1 -1
  13. package/resources/buckets.js +3 -3
  14. package/resources/buckets.js.map +1 -1
  15. package/resources/buckets.mjs +3 -3
  16. package/resources/buckets.mjs.map +1 -1
  17. package/resources/entities/entities.d.mts +52 -103
  18. package/resources/entities/entities.d.mts.map +1 -1
  19. package/resources/entities/entities.d.ts +52 -103
  20. package/resources/entities/entities.d.ts.map +1 -1
  21. package/resources/entities/entities.js.map +1 -1
  22. package/resources/entities/entities.mjs.map +1 -1
  23. package/resources/entities/index.d.mts +1 -1
  24. package/resources/entities/index.d.mts.map +1 -1
  25. package/resources/entities/index.d.ts +1 -1
  26. package/resources/entities/index.d.ts.map +1 -1
  27. package/resources/entities/index.js.map +1 -1
  28. package/resources/entities/index.mjs.map +1 -1
  29. package/resources/entity-types/entity-types.d.mts +8 -124
  30. package/resources/entity-types/entity-types.d.mts.map +1 -1
  31. package/resources/entity-types/entity-types.d.ts +8 -124
  32. package/resources/entity-types/entity-types.d.ts.map +1 -1
  33. package/resources/entity-types/entity-types.js.map +1 -1
  34. package/resources/entity-types/entity-types.mjs.map +1 -1
  35. package/resources/entity-types/index.d.mts +2 -2
  36. package/resources/entity-types/index.d.mts.map +1 -1
  37. package/resources/entity-types/index.d.ts +2 -2
  38. package/resources/entity-types/index.d.ts.map +1 -1
  39. package/resources/entity-types/index.js.map +1 -1
  40. package/resources/entity-types/index.mjs.map +1 -1
  41. package/resources/entity-types/reviewers.d.mts +10 -39
  42. package/resources/entity-types/reviewers.d.mts.map +1 -1
  43. package/resources/entity-types/reviewers.d.ts +10 -39
  44. package/resources/entity-types/reviewers.d.ts.map +1 -1
  45. package/resources/entity-types/reviewers.js +1 -1
  46. package/resources/entity-types/reviewers.js.map +1 -1
  47. package/resources/entity-types/reviewers.mjs +1 -1
  48. package/resources/entity-types/reviewers.mjs.map +1 -1
  49. package/resources/eval/eval.d.mts +2 -2
  50. package/resources/eval/eval.d.mts.map +1 -1
  51. package/resources/eval/eval.d.ts +2 -2
  52. package/resources/eval/eval.d.ts.map +1 -1
  53. package/resources/eval/eval.js.map +1 -1
  54. package/resources/eval/eval.mjs.map +1 -1
  55. package/resources/eval/index.d.mts +1 -1
  56. package/resources/eval/index.d.mts.map +1 -1
  57. package/resources/eval/index.d.ts +1 -1
  58. package/resources/eval/index.d.ts.map +1 -1
  59. package/resources/eval/index.js.map +1 -1
  60. package/resources/eval/index.mjs.map +1 -1
  61. package/resources/eval/score.d.mts +60 -219
  62. package/resources/eval/score.d.mts.map +1 -1
  63. package/resources/eval/score.d.ts +60 -219
  64. package/resources/eval/score.d.ts.map +1 -1
  65. package/resources/eval/score.js +2 -2
  66. package/resources/eval/score.js.map +1 -1
  67. package/resources/eval/score.mjs +2 -2
  68. package/resources/eval/score.mjs.map +1 -1
  69. package/resources/functions/functions.d.mts +364 -1095
  70. package/resources/functions/functions.d.mts.map +1 -1
  71. package/resources/functions/functions.d.ts +364 -1095
  72. package/resources/functions/functions.d.ts.map +1 -1
  73. package/resources/functions/functions.js.map +1 -1
  74. package/resources/functions/functions.mjs.map +1 -1
  75. package/resources/functions/index.d.mts +1 -1
  76. package/resources/functions/index.d.mts.map +1 -1
  77. package/resources/functions/index.d.ts +1 -1
  78. package/resources/functions/index.d.ts.map +1 -1
  79. package/resources/functions/index.js.map +1 -1
  80. package/resources/functions/index.mjs.map +1 -1
  81. package/resources/functions/versions.d.mts +2 -108
  82. package/resources/functions/versions.d.mts.map +1 -1
  83. package/resources/functions/versions.d.ts +2 -108
  84. package/resources/functions/versions.d.ts.map +1 -1
  85. package/resources/index.d.mts +5 -5
  86. package/resources/index.d.mts.map +1 -1
  87. package/resources/index.d.ts +5 -5
  88. package/resources/index.d.ts.map +1 -1
  89. package/resources/index.js.map +1 -1
  90. package/resources/index.mjs.map +1 -1
  91. package/resources/outputs.d.mts +1 -1
  92. package/resources/outputs.d.mts.map +1 -1
  93. package/resources/outputs.d.ts +1 -1
  94. package/resources/outputs.d.ts.map +1 -1
  95. package/resources/views.d.mts +97 -745
  96. package/resources/views.d.mts.map +1 -1
  97. package/resources/views.d.ts +97 -745
  98. package/resources/views.d.ts.map +1 -1
  99. package/resources/workflows/workflows.d.mts +2 -19
  100. package/resources/workflows/workflows.d.mts.map +1 -1
  101. package/resources/workflows/workflows.d.ts +2 -19
  102. package/resources/workflows/workflows.d.ts.map +1 -1
  103. package/resources/workflows/workflows.js.map +1 -1
  104. package/resources/workflows/workflows.mjs.map +1 -1
  105. package/src/client.ts +38 -18
  106. package/src/resources/buckets.ts +9 -137
  107. package/src/resources/entities/entities.ts +61 -118
  108. package/src/resources/entities/index.ts +2 -0
  109. package/src/resources/entity-types/entity-types.ts +8 -151
  110. package/src/resources/entity-types/index.ts +2 -4
  111. package/src/resources/entity-types/reviewers.ts +11 -49
  112. package/src/resources/eval/eval.ts +8 -4
  113. package/src/resources/eval/index.ts +4 -2
  114. package/src/resources/eval/score.ts +66 -263
  115. package/src/resources/functions/functions.ts +411 -1249
  116. package/src/resources/functions/index.ts +8 -0
  117. package/src/resources/functions/versions.ts +2 -118
  118. package/src/resources/index.ts +19 -9
  119. package/src/resources/outputs.ts +1 -0
  120. package/src/resources/views.ts +118 -936
  121. package/src/resources/workflows/workflows.ts +2 -21
  122. package/src/version.ts +1 -1
  123. package/version.d.mts +1 -1
  124. package/version.d.ts +1 -1
  125. package/version.js +1 -1
  126. package/version.mjs +1 -1
@@ -56,7 +56,7 @@ export class Views extends APIResource {
56
56
  * The new view is created at `versionNum: 1`. Subsequent updates produce new
57
57
  * versions; the version-1 configuration remains addressable.
58
58
  */
59
- create(body: ViewCreateParams, options?: RequestOptions): APIPromise<ViewCreateResponse> {
59
+ create(body: ViewCreateParams, options?: RequestOptions): APIPromise<View> {
60
60
  return this._client.post('/v3/views', { body, ...options });
61
61
  }
62
62
 
@@ -67,7 +67,7 @@ export class Views extends APIResource {
67
67
  * list of versions on the View object and re-request with the desired version
68
68
  * pinned (versions are immutable once created).
69
69
  */
70
- retrieve(viewID: string, options?: RequestOptions): APIPromise<ViewRetrieveResponse> {
70
+ retrieve(viewID: string, options?: RequestOptions): APIPromise<View> {
71
71
  return this._client.get(path`/v3/views/${viewID}`, options);
72
72
  }
73
73
 
@@ -78,7 +78,7 @@ export class Views extends APIResource {
78
78
  * fully replacing — pass the complete view body, not a patch. The version number
79
79
  * is auto-incremented.
80
80
  */
81
- update(viewID: string, body: ViewUpdateParams, options?: RequestOptions): APIPromise<ViewUpdateResponse> {
81
+ update(viewID: string, body: ViewUpdateParams, options?: RequestOptions): APIPromise<View> {
82
82
  return this._client.put(path`/v3/views/${viewID}`, { body, ...options });
83
83
  }
84
84
 
@@ -155,166 +155,48 @@ export class Views extends APIResource {
155
155
  }
156
156
  }
157
157
 
158
- /**
159
- * A view is a table visualization of transformations that allows customers to have
160
- * insight into their transformations
161
- */
162
- export interface ViewCreateResponse {
163
- /**
164
- * List of aggregations defined for the view
165
- */
166
- aggregations: Array<ViewCreateResponse.Aggregation>;
167
-
158
+ export interface FunctionIdentifier {
168
159
  /**
169
- * List of columns in the view
160
+ * Unique identifier of function. Provide either id or name, not both.
170
161
  */
171
- columns: Array<ViewCreateResponse.Column>;
162
+ id?: string;
172
163
 
173
164
  /**
174
- * Current version number of the view
175
- */
176
- currentVersionNum: number;
177
-
178
- /**
179
- * List of filters applied to the view
180
- */
181
- filters: Array<ViewCreateResponse.Filter>;
182
-
183
- /**
184
- * List of functions that this view queries transformations from
165
+ * Name of function. Must be UNIQUE on a per-environment basis. Provide either id
166
+ * or name, not both.
185
167
  */
186
- functions: Array<ViewCreateResponse.Function>;
187
-
188
- /**
189
- * Name of the view
190
- */
191
- name: string;
192
-
193
- /**
194
- * Unique identifier of the view
195
- */
196
- viewID: string;
197
-
198
- /**
199
- * Description of the view
200
- */
201
- description?: string | null;
168
+ name?: string;
202
169
  }
203
170
 
204
- export namespace ViewCreateResponse {
205
- /**
206
- * An aggregation definition for a view
207
- */
208
- export interface Aggregation {
209
- /**
210
- * Aggregation function to apply to a view column
211
- */
212
- function: 'count' | 'count_distinct' | 'sum' | 'average' | 'min' | 'max';
213
-
214
- /**
215
- * Name of the aggregation
216
- */
217
- name: string;
218
-
219
- /**
220
- * Name of the column to aggregate (required for count_distinct, sum, average, min,
221
- * max functions)
222
- */
223
- aggregateColumnName?: string | null;
224
-
225
- /**
226
- * How to display the aggregation results
227
- */
228
- displayType?: 'table' | 'bar_chart' | 'pie_chart';
229
-
230
- /**
231
- * Name of the column to group by (optional, for grouped aggregations)
232
- */
233
- groupByColumnName?: string | null;
234
- }
235
-
171
+ /**
172
+ * Time window for filtering transformations in a view
173
+ */
174
+ export interface TimeWindow {
236
175
  /**
237
- * A column definition in a view
176
+ * End of the time window in ISO 8601 (RFC 3339) format in UTC
238
177
  */
239
- export interface Column {
240
- /**
241
- * Order in which this column should be displayed (0-based index)
242
- */
243
- displayOrderIndex: number;
244
-
245
- /**
246
- * Name of the column
247
- */
248
- name: string;
249
-
250
- /**
251
- * JSON path to the value in the transformation output schema (e.g.,
252
- * ["invoiceDetails", "invoiceNumber"])
253
- */
254
- valueSchemaPath: Array<string>;
255
- }
178
+ end: string;
256
179
 
257
180
  /**
258
- * A filter to apply to a view column
181
+ * Start of the time window in ISO 8601 (RFC 3339) format in UTC
259
182
  */
260
- export interface Filter {
261
- /**
262
- * Name of the column to filter on
263
- */
264
- columnName: string;
265
-
266
- /**
267
- * Type of filter to apply to a view column
268
- */
269
- filterType:
270
- | 'equals_string'
271
- | 'equals_number'
272
- | 'less_than_number'
273
- | 'less_than_equal_number'
274
- | 'greater_than_number'
275
- | 'greater_than_equal_number'
276
- | 'is_null'
277
- | 'is_not_null';
278
-
279
- /**
280
- * Numeric value for the filter (required for number filter types)
281
- */
282
- number?: number | null;
283
-
284
- /**
285
- * String value for the filter (required for string filter types)
286
- */
287
- string?: string | null;
288
- }
289
-
290
- export interface Function {
291
- /**
292
- * Unique identifier of function. Provide either id or name, not both.
293
- */
294
- id?: string;
295
-
296
- /**
297
- * Name of function. Must be UNIQUE on a per-environment basis. Provide either id
298
- * or name, not both.
299
- */
300
- name?: string;
301
- }
183
+ start: string;
302
184
  }
303
185
 
304
186
  /**
305
187
  * A view is a table visualization of transformations that allows customers to have
306
188
  * insight into their transformations
307
189
  */
308
- export interface ViewRetrieveResponse {
190
+ export interface View {
309
191
  /**
310
192
  * List of aggregations defined for the view
311
193
  */
312
- aggregations: Array<ViewRetrieveResponse.Aggregation>;
194
+ aggregations: Array<ViewAggregation>;
313
195
 
314
196
  /**
315
197
  * List of columns in the view
316
198
  */
317
- columns: Array<ViewRetrieveResponse.Column>;
199
+ columns: Array<ViewColumn>;
318
200
 
319
201
  /**
320
202
  * Current version number of the view
@@ -324,12 +206,12 @@ export interface ViewRetrieveResponse {
324
206
  /**
325
207
  * List of filters applied to the view
326
208
  */
327
- filters: Array<ViewRetrieveResponse.Filter>;
209
+ filters: Array<ViewFilter>;
328
210
 
329
211
  /**
330
212
  * List of functions that this view queries transformations from
331
213
  */
332
- functions: Array<ViewRetrieveResponse.Function>;
214
+ functions: Array<FunctionIdentifier>;
333
215
 
334
216
  /**
335
217
  * Name of the view
@@ -347,250 +229,124 @@ export interface ViewRetrieveResponse {
347
229
  description?: string | null;
348
230
  }
349
231
 
350
- export namespace ViewRetrieveResponse {
232
+ /**
233
+ * An aggregation definition for a view
234
+ */
235
+ export interface ViewAggregation {
351
236
  /**
352
- * An aggregation definition for a view
237
+ * Aggregation function to apply to a view column
353
238
  */
354
- export interface Aggregation {
355
- /**
356
- * Aggregation function to apply to a view column
357
- */
358
- function: 'count' | 'count_distinct' | 'sum' | 'average' | 'min' | 'max';
359
-
360
- /**
361
- * Name of the aggregation
362
- */
363
- name: string;
364
-
365
- /**
366
- * Name of the column to aggregate (required for count_distinct, sum, average, min,
367
- * max functions)
368
- */
369
- aggregateColumnName?: string | null;
370
-
371
- /**
372
- * How to display the aggregation results
373
- */
374
- displayType?: 'table' | 'bar_chart' | 'pie_chart';
375
-
376
- /**
377
- * Name of the column to group by (optional, for grouped aggregations)
378
- */
379
- groupByColumnName?: string | null;
380
- }
239
+ function: 'count' | 'count_distinct' | 'sum' | 'average' | 'min' | 'max';
381
240
 
382
241
  /**
383
- * A column definition in a view
242
+ * Name of the aggregation
384
243
  */
385
- export interface Column {
386
- /**
387
- * Order in which this column should be displayed (0-based index)
388
- */
389
- displayOrderIndex: number;
390
-
391
- /**
392
- * Name of the column
393
- */
394
- name: string;
395
-
396
- /**
397
- * JSON path to the value in the transformation output schema (e.g.,
398
- * ["invoiceDetails", "invoiceNumber"])
399
- */
400
- valueSchemaPath: Array<string>;
401
- }
244
+ name: string;
402
245
 
403
246
  /**
404
- * A filter to apply to a view column
247
+ * Name of the column to aggregate (required for count_distinct, sum, average, min,
248
+ * max functions)
405
249
  */
406
- export interface Filter {
407
- /**
408
- * Name of the column to filter on
409
- */
410
- columnName: string;
250
+ aggregateColumnName?: string | null;
411
251
 
412
- /**
413
- * Type of filter to apply to a view column
414
- */
415
- filterType:
416
- | 'equals_string'
417
- | 'equals_number'
418
- | 'less_than_number'
419
- | 'less_than_equal_number'
420
- | 'greater_than_number'
421
- | 'greater_than_equal_number'
422
- | 'is_null'
423
- | 'is_not_null';
252
+ /**
253
+ * How to display the aggregation results
254
+ */
255
+ displayType?: 'table' | 'bar_chart' | 'pie_chart';
424
256
 
425
- /**
426
- * Numeric value for the filter (required for number filter types)
427
- */
428
- number?: number | null;
257
+ /**
258
+ * Name of the column to group by (optional, for grouped aggregations)
259
+ */
260
+ groupByColumnName?: string | null;
261
+ }
429
262
 
430
- /**
431
- * String value for the filter (required for string filter types)
432
- */
433
- string?: string | null;
434
- }
263
+ /**
264
+ * A column definition in a view
265
+ */
266
+ export interface ViewColumn {
267
+ /**
268
+ * Order in which this column should be displayed (0-based index)
269
+ */
270
+ displayOrderIndex: number;
435
271
 
436
- export interface Function {
437
- /**
438
- * Unique identifier of function. Provide either id or name, not both.
439
- */
440
- id?: string;
272
+ /**
273
+ * Name of the column
274
+ */
275
+ name: string;
441
276
 
442
- /**
443
- * Name of function. Must be UNIQUE on a per-environment basis. Provide either id
444
- * or name, not both.
445
- */
446
- name?: string;
447
- }
277
+ /**
278
+ * JSON path to the value in the transformation output schema (e.g.,
279
+ * ["invoiceDetails", "invoiceNumber"])
280
+ */
281
+ valueSchemaPath: Array<string>;
448
282
  }
449
283
 
450
284
  /**
451
- * A view is a table visualization of transformations that allows customers to have
452
- * insight into their transformations
285
+ * Request to create a new view or update an existing view
453
286
  */
454
- export interface ViewUpdateResponse {
287
+ export interface ViewCreate {
455
288
  /**
456
289
  * List of aggregations defined for the view
457
290
  */
458
- aggregations: Array<ViewUpdateResponse.Aggregation>;
291
+ aggregations: Array<ViewAggregation>;
459
292
 
460
293
  /**
461
294
  * List of columns in the view
462
295
  */
463
- columns: Array<ViewUpdateResponse.Column>;
464
-
465
- /**
466
- * Current version number of the view
467
- */
468
- currentVersionNum: number;
296
+ columns: Array<ViewColumn>;
469
297
 
470
298
  /**
471
299
  * List of filters applied to the view
472
300
  */
473
- filters: Array<ViewUpdateResponse.Filter>;
301
+ filters: Array<ViewFilter>;
474
302
 
475
303
  /**
476
304
  * List of functions that this view queries transformations from
477
305
  */
478
- functions: Array<ViewUpdateResponse.Function>;
306
+ functions: Array<FunctionIdentifier>;
479
307
 
480
308
  /**
481
309
  * Name of the view
482
310
  */
483
311
  name: string;
484
312
 
485
- /**
486
- * Unique identifier of the view
487
- */
488
- viewID: string;
489
-
490
313
  /**
491
314
  * Description of the view
492
315
  */
493
- description?: string | null;
316
+ description?: string;
494
317
  }
495
318
 
496
- export namespace ViewUpdateResponse {
319
+ /**
320
+ * A filter to apply to a view column
321
+ */
322
+ export interface ViewFilter {
497
323
  /**
498
- * An aggregation definition for a view
324
+ * Name of the column to filter on
499
325
  */
500
- export interface Aggregation {
501
- /**
502
- * Aggregation function to apply to a view column
503
- */
504
- function: 'count' | 'count_distinct' | 'sum' | 'average' | 'min' | 'max';
505
-
506
- /**
507
- * Name of the aggregation
508
- */
509
- name: string;
510
-
511
- /**
512
- * Name of the column to aggregate (required for count_distinct, sum, average, min,
513
- * max functions)
514
- */
515
- aggregateColumnName?: string | null;
516
-
517
- /**
518
- * How to display the aggregation results
519
- */
520
- displayType?: 'table' | 'bar_chart' | 'pie_chart';
521
-
522
- /**
523
- * Name of the column to group by (optional, for grouped aggregations)
524
- */
525
- groupByColumnName?: string | null;
526
- }
326
+ columnName: string;
527
327
 
528
328
  /**
529
- * A column definition in a view
329
+ * Type of filter to apply to a view column
530
330
  */
531
- export interface Column {
532
- /**
533
- * Order in which this column should be displayed (0-based index)
534
- */
535
- displayOrderIndex: number;
536
-
537
- /**
538
- * Name of the column
539
- */
540
- name: string;
541
-
542
- /**
543
- * JSON path to the value in the transformation output schema (e.g.,
544
- * ["invoiceDetails", "invoiceNumber"])
545
- */
546
- valueSchemaPath: Array<string>;
547
- }
331
+ filterType:
332
+ | 'equals_string'
333
+ | 'equals_number'
334
+ | 'less_than_number'
335
+ | 'less_than_equal_number'
336
+ | 'greater_than_number'
337
+ | 'greater_than_equal_number'
338
+ | 'is_null'
339
+ | 'is_not_null';
548
340
 
549
341
  /**
550
- * A filter to apply to a view column
342
+ * Numeric value for the filter (required for number filter types)
551
343
  */
552
- export interface Filter {
553
- /**
554
- * Name of the column to filter on
555
- */
556
- columnName: string;
557
-
558
- /**
559
- * Type of filter to apply to a view column
560
- */
561
- filterType:
562
- | 'equals_string'
563
- | 'equals_number'
564
- | 'less_than_number'
565
- | 'less_than_equal_number'
566
- | 'greater_than_number'
567
- | 'greater_than_equal_number'
568
- | 'is_null'
569
- | 'is_not_null';
344
+ number?: number | null;
570
345
 
571
- /**
572
- * Numeric value for the filter (required for number filter types)
573
- */
574
- number?: number | null;
575
-
576
- /**
577
- * String value for the filter (required for string filter types)
578
- */
579
- string?: string | null;
580
- }
581
-
582
- export interface Function {
583
- /**
584
- * Unique identifier of function. Provide either id or name, not both.
585
- */
586
- id?: string;
587
-
588
- /**
589
- * Name of function. Must be UNIQUE on a per-environment basis. Provide either id
590
- * or name, not both.
591
- */
592
- name?: string;
593
- }
346
+ /**
347
+ * String value for the filter (required for string filter types)
348
+ */
349
+ string?: string | null;
594
350
  }
595
351
 
596
352
  /**
@@ -600,160 +356,12 @@ export interface ViewListResponse {
600
356
  /**
601
357
  * Total number of views matching the query
602
358
  */
603
- totalCount: number;
604
-
605
- /**
606
- * Array of views
607
- */
608
- views: Array<ViewListResponse.View>;
609
- }
610
-
611
- export namespace ViewListResponse {
612
- /**
613
- * A view is a table visualization of transformations that allows customers to have
614
- * insight into their transformations
615
- */
616
- export interface View {
617
- /**
618
- * List of aggregations defined for the view
619
- */
620
- aggregations: Array<View.Aggregation>;
621
-
622
- /**
623
- * List of columns in the view
624
- */
625
- columns: Array<View.Column>;
626
-
627
- /**
628
- * Current version number of the view
629
- */
630
- currentVersionNum: number;
631
-
632
- /**
633
- * List of filters applied to the view
634
- */
635
- filters: Array<View.Filter>;
636
-
637
- /**
638
- * List of functions that this view queries transformations from
639
- */
640
- functions: Array<View.Function>;
641
-
642
- /**
643
- * Name of the view
644
- */
645
- name: string;
646
-
647
- /**
648
- * Unique identifier of the view
649
- */
650
- viewID: string;
651
-
652
- /**
653
- * Description of the view
654
- */
655
- description?: string | null;
656
- }
657
-
658
- export namespace View {
659
- /**
660
- * An aggregation definition for a view
661
- */
662
- export interface Aggregation {
663
- /**
664
- * Aggregation function to apply to a view column
665
- */
666
- function: 'count' | 'count_distinct' | 'sum' | 'average' | 'min' | 'max';
667
-
668
- /**
669
- * Name of the aggregation
670
- */
671
- name: string;
672
-
673
- /**
674
- * Name of the column to aggregate (required for count_distinct, sum, average, min,
675
- * max functions)
676
- */
677
- aggregateColumnName?: string | null;
678
-
679
- /**
680
- * How to display the aggregation results
681
- */
682
- displayType?: 'table' | 'bar_chart' | 'pie_chart';
683
-
684
- /**
685
- * Name of the column to group by (optional, for grouped aggregations)
686
- */
687
- groupByColumnName?: string | null;
688
- }
689
-
690
- /**
691
- * A column definition in a view
692
- */
693
- export interface Column {
694
- /**
695
- * Order in which this column should be displayed (0-based index)
696
- */
697
- displayOrderIndex: number;
698
-
699
- /**
700
- * Name of the column
701
- */
702
- name: string;
703
-
704
- /**
705
- * JSON path to the value in the transformation output schema (e.g.,
706
- * ["invoiceDetails", "invoiceNumber"])
707
- */
708
- valueSchemaPath: Array<string>;
709
- }
710
-
711
- /**
712
- * A filter to apply to a view column
713
- */
714
- export interface Filter {
715
- /**
716
- * Name of the column to filter on
717
- */
718
- columnName: string;
719
-
720
- /**
721
- * Type of filter to apply to a view column
722
- */
723
- filterType:
724
- | 'equals_string'
725
- | 'equals_number'
726
- | 'less_than_number'
727
- | 'less_than_equal_number'
728
- | 'greater_than_number'
729
- | 'greater_than_equal_number'
730
- | 'is_null'
731
- | 'is_not_null';
732
-
733
- /**
734
- * Numeric value for the filter (required for number filter types)
735
- */
736
- number?: number | null;
737
-
738
- /**
739
- * String value for the filter (required for string filter types)
740
- */
741
- string?: string | null;
742
- }
743
-
744
- export interface Function {
745
- /**
746
- * Unique identifier of function. Provide either id or name, not both.
747
- */
748
- id?: string;
359
+ totalCount: number;
749
360
 
750
- /**
751
- * Name of function. Must be UNIQUE on a per-environment basis. Provide either id
752
- * or name, not both.
753
- */
754
- name?: string;
755
- }
756
- }
361
+ /**
362
+ * Array of views
363
+ */
364
+ views: Array<View>;
757
365
  }
758
366
 
759
367
  /**
@@ -854,22 +462,22 @@ export interface ViewCreateParams {
854
462
  /**
855
463
  * List of aggregations defined for the view
856
464
  */
857
- aggregations: Array<ViewCreateParams.Aggregation>;
465
+ aggregations: Array<ViewAggregation>;
858
466
 
859
467
  /**
860
468
  * List of columns in the view
861
469
  */
862
- columns: Array<ViewCreateParams.Column>;
470
+ columns: Array<ViewColumn>;
863
471
 
864
472
  /**
865
473
  * List of filters applied to the view
866
474
  */
867
- filters: Array<ViewCreateParams.Filter>;
475
+ filters: Array<ViewFilter>;
868
476
 
869
477
  /**
870
478
  * List of functions that this view queries transformations from
871
479
  */
872
- functions: Array<ViewCreateParams.Function>;
480
+ functions: Array<FunctionIdentifier>;
873
481
 
874
482
  /**
875
483
  * Name of the view
@@ -882,126 +490,26 @@ export interface ViewCreateParams {
882
490
  description?: string;
883
491
  }
884
492
 
885
- export namespace ViewCreateParams {
886
- /**
887
- * An aggregation definition for a view
888
- */
889
- export interface Aggregation {
890
- /**
891
- * Aggregation function to apply to a view column
892
- */
893
- function: 'count' | 'count_distinct' | 'sum' | 'average' | 'min' | 'max';
894
-
895
- /**
896
- * Name of the aggregation
897
- */
898
- name: string;
899
-
900
- /**
901
- * Name of the column to aggregate (required for count_distinct, sum, average, min,
902
- * max functions)
903
- */
904
- aggregateColumnName?: string | null;
905
-
906
- /**
907
- * How to display the aggregation results
908
- */
909
- displayType?: 'table' | 'bar_chart' | 'pie_chart';
910
-
911
- /**
912
- * Name of the column to group by (optional, for grouped aggregations)
913
- */
914
- groupByColumnName?: string | null;
915
- }
916
-
917
- /**
918
- * A column definition in a view
919
- */
920
- export interface Column {
921
- /**
922
- * Order in which this column should be displayed (0-based index)
923
- */
924
- displayOrderIndex: number;
925
-
926
- /**
927
- * Name of the column
928
- */
929
- name: string;
930
-
931
- /**
932
- * JSON path to the value in the transformation output schema (e.g.,
933
- * ["invoiceDetails", "invoiceNumber"])
934
- */
935
- valueSchemaPath: Array<string>;
936
- }
937
-
938
- /**
939
- * A filter to apply to a view column
940
- */
941
- export interface Filter {
942
- /**
943
- * Name of the column to filter on
944
- */
945
- columnName: string;
946
-
947
- /**
948
- * Type of filter to apply to a view column
949
- */
950
- filterType:
951
- | 'equals_string'
952
- | 'equals_number'
953
- | 'less_than_number'
954
- | 'less_than_equal_number'
955
- | 'greater_than_number'
956
- | 'greater_than_equal_number'
957
- | 'is_null'
958
- | 'is_not_null';
959
-
960
- /**
961
- * Numeric value for the filter (required for number filter types)
962
- */
963
- number?: number | null;
964
-
965
- /**
966
- * String value for the filter (required for string filter types)
967
- */
968
- string?: string | null;
969
- }
970
-
971
- export interface Function {
972
- /**
973
- * Unique identifier of function. Provide either id or name, not both.
974
- */
975
- id?: string;
976
-
977
- /**
978
- * Name of function. Must be UNIQUE on a per-environment basis. Provide either id
979
- * or name, not both.
980
- */
981
- name?: string;
982
- }
983
- }
984
-
985
493
  export interface ViewUpdateParams {
986
494
  /**
987
495
  * List of aggregations defined for the view
988
496
  */
989
- aggregations: Array<ViewUpdateParams.Aggregation>;
497
+ aggregations: Array<ViewAggregation>;
990
498
 
991
499
  /**
992
500
  * List of columns in the view
993
501
  */
994
- columns: Array<ViewUpdateParams.Column>;
502
+ columns: Array<ViewColumn>;
995
503
 
996
504
  /**
997
505
  * List of filters applied to the view
998
506
  */
999
- filters: Array<ViewUpdateParams.Filter>;
507
+ filters: Array<ViewFilter>;
1000
508
 
1001
509
  /**
1002
510
  * List of functions that this view queries transformations from
1003
511
  */
1004
- functions: Array<ViewUpdateParams.Function>;
512
+ functions: Array<FunctionIdentifier>;
1005
513
 
1006
514
  /**
1007
515
  * Name of the view
@@ -1014,106 +522,6 @@ export interface ViewUpdateParams {
1014
522
  description?: string;
1015
523
  }
1016
524
 
1017
- export namespace ViewUpdateParams {
1018
- /**
1019
- * An aggregation definition for a view
1020
- */
1021
- export interface Aggregation {
1022
- /**
1023
- * Aggregation function to apply to a view column
1024
- */
1025
- function: 'count' | 'count_distinct' | 'sum' | 'average' | 'min' | 'max';
1026
-
1027
- /**
1028
- * Name of the aggregation
1029
- */
1030
- name: string;
1031
-
1032
- /**
1033
- * Name of the column to aggregate (required for count_distinct, sum, average, min,
1034
- * max functions)
1035
- */
1036
- aggregateColumnName?: string | null;
1037
-
1038
- /**
1039
- * How to display the aggregation results
1040
- */
1041
- displayType?: 'table' | 'bar_chart' | 'pie_chart';
1042
-
1043
- /**
1044
- * Name of the column to group by (optional, for grouped aggregations)
1045
- */
1046
- groupByColumnName?: string | null;
1047
- }
1048
-
1049
- /**
1050
- * A column definition in a view
1051
- */
1052
- export interface Column {
1053
- /**
1054
- * Order in which this column should be displayed (0-based index)
1055
- */
1056
- displayOrderIndex: number;
1057
-
1058
- /**
1059
- * Name of the column
1060
- */
1061
- name: string;
1062
-
1063
- /**
1064
- * JSON path to the value in the transformation output schema (e.g.,
1065
- * ["invoiceDetails", "invoiceNumber"])
1066
- */
1067
- valueSchemaPath: Array<string>;
1068
- }
1069
-
1070
- /**
1071
- * A filter to apply to a view column
1072
- */
1073
- export interface Filter {
1074
- /**
1075
- * Name of the column to filter on
1076
- */
1077
- columnName: string;
1078
-
1079
- /**
1080
- * Type of filter to apply to a view column
1081
- */
1082
- filterType:
1083
- | 'equals_string'
1084
- | 'equals_number'
1085
- | 'less_than_number'
1086
- | 'less_than_equal_number'
1087
- | 'greater_than_number'
1088
- | 'greater_than_equal_number'
1089
- | 'is_null'
1090
- | 'is_not_null';
1091
-
1092
- /**
1093
- * Numeric value for the filter (required for number filter types)
1094
- */
1095
- number?: number | null;
1096
-
1097
- /**
1098
- * String value for the filter (required for string filter types)
1099
- */
1100
- string?: string | null;
1101
- }
1102
-
1103
- export interface Function {
1104
- /**
1105
- * Unique identifier of function. Provide either id or name, not both.
1106
- */
1107
- id?: string;
1108
-
1109
- /**
1110
- * Name of function. Must be UNIQUE on a per-environment basis. Provide either id
1111
- * or name, not both.
1112
- */
1113
- name?: string;
1114
- }
1115
- }
1116
-
1117
525
  export interface ViewListParams {
1118
526
  /**
1119
527
  * Cursor — a `viewID` defining your place in the list.
@@ -1157,22 +565,22 @@ export interface ViewGenerateAggregationDataParams {
1157
565
  /**
1158
566
  * List of aggregations defined for the view
1159
567
  */
1160
- aggregations: Array<ViewGenerateAggregationDataParams.Aggregation>;
568
+ aggregations: Array<ViewAggregation>;
1161
569
 
1162
570
  /**
1163
571
  * List of columns in the view
1164
572
  */
1165
- columns: Array<ViewGenerateAggregationDataParams.Column>;
573
+ columns: Array<ViewColumn>;
1166
574
 
1167
575
  /**
1168
576
  * List of filters applied to the view
1169
577
  */
1170
- filters: Array<ViewGenerateAggregationDataParams.Filter>;
578
+ filters: Array<ViewFilter>;
1171
579
 
1172
580
  /**
1173
581
  * List of functions that this view queries transformations from
1174
582
  */
1175
- functions: Array<ViewGenerateAggregationDataParams.Function>;
583
+ functions: Array<FunctionIdentifier>;
1176
584
 
1177
585
  /**
1178
586
  * Name of the view
@@ -1182,7 +590,7 @@ export interface ViewGenerateAggregationDataParams {
1182
590
  /**
1183
591
  * Time window for filtering transformations in a view
1184
592
  */
1185
- timeWindow: ViewGenerateAggregationDataParams.TimeWindow;
593
+ timeWindow: TimeWindow;
1186
594
 
1187
595
  /**
1188
596
  * Description of the view
@@ -1190,141 +598,26 @@ export interface ViewGenerateAggregationDataParams {
1190
598
  description?: string;
1191
599
  }
1192
600
 
1193
- export namespace ViewGenerateAggregationDataParams {
1194
- /**
1195
- * An aggregation definition for a view
1196
- */
1197
- export interface Aggregation {
1198
- /**
1199
- * Aggregation function to apply to a view column
1200
- */
1201
- function: 'count' | 'count_distinct' | 'sum' | 'average' | 'min' | 'max';
1202
-
1203
- /**
1204
- * Name of the aggregation
1205
- */
1206
- name: string;
1207
-
1208
- /**
1209
- * Name of the column to aggregate (required for count_distinct, sum, average, min,
1210
- * max functions)
1211
- */
1212
- aggregateColumnName?: string | null;
1213
-
1214
- /**
1215
- * How to display the aggregation results
1216
- */
1217
- displayType?: 'table' | 'bar_chart' | 'pie_chart';
1218
-
1219
- /**
1220
- * Name of the column to group by (optional, for grouped aggregations)
1221
- */
1222
- groupByColumnName?: string | null;
1223
- }
1224
-
1225
- /**
1226
- * A column definition in a view
1227
- */
1228
- export interface Column {
1229
- /**
1230
- * Order in which this column should be displayed (0-based index)
1231
- */
1232
- displayOrderIndex: number;
1233
-
1234
- /**
1235
- * Name of the column
1236
- */
1237
- name: string;
1238
-
1239
- /**
1240
- * JSON path to the value in the transformation output schema (e.g.,
1241
- * ["invoiceDetails", "invoiceNumber"])
1242
- */
1243
- valueSchemaPath: Array<string>;
1244
- }
1245
-
1246
- /**
1247
- * A filter to apply to a view column
1248
- */
1249
- export interface Filter {
1250
- /**
1251
- * Name of the column to filter on
1252
- */
1253
- columnName: string;
1254
-
1255
- /**
1256
- * Type of filter to apply to a view column
1257
- */
1258
- filterType:
1259
- | 'equals_string'
1260
- | 'equals_number'
1261
- | 'less_than_number'
1262
- | 'less_than_equal_number'
1263
- | 'greater_than_number'
1264
- | 'greater_than_equal_number'
1265
- | 'is_null'
1266
- | 'is_not_null';
1267
-
1268
- /**
1269
- * Numeric value for the filter (required for number filter types)
1270
- */
1271
- number?: number | null;
1272
-
1273
- /**
1274
- * String value for the filter (required for string filter types)
1275
- */
1276
- string?: string | null;
1277
- }
1278
-
1279
- export interface Function {
1280
- /**
1281
- * Unique identifier of function. Provide either id or name, not both.
1282
- */
1283
- id?: string;
1284
-
1285
- /**
1286
- * Name of function. Must be UNIQUE on a per-environment basis. Provide either id
1287
- * or name, not both.
1288
- */
1289
- name?: string;
1290
- }
1291
-
1292
- /**
1293
- * Time window for filtering transformations in a view
1294
- */
1295
- export interface TimeWindow {
1296
- /**
1297
- * End of the time window in ISO 8601 (RFC 3339) format in UTC
1298
- */
1299
- end: string;
1300
-
1301
- /**
1302
- * Start of the time window in ISO 8601 (RFC 3339) format in UTC
1303
- */
1304
- start: string;
1305
- }
1306
- }
1307
-
1308
601
  export interface ViewGenerateTableDataParams {
1309
602
  /**
1310
603
  * List of aggregations defined for the view
1311
604
  */
1312
- aggregations: Array<ViewGenerateTableDataParams.Aggregation>;
605
+ aggregations: Array<ViewAggregation>;
1313
606
 
1314
607
  /**
1315
608
  * List of columns in the view
1316
609
  */
1317
- columns: Array<ViewGenerateTableDataParams.Column>;
610
+ columns: Array<ViewColumn>;
1318
611
 
1319
612
  /**
1320
613
  * List of filters applied to the view
1321
614
  */
1322
- filters: Array<ViewGenerateTableDataParams.Filter>;
615
+ filters: Array<ViewFilter>;
1323
616
 
1324
617
  /**
1325
618
  * List of functions that this view queries transformations from
1326
619
  */
1327
- functions: Array<ViewGenerateTableDataParams.Function>;
620
+ functions: Array<FunctionIdentifier>;
1328
621
 
1329
622
  /**
1330
623
  * Name of the view
@@ -1334,7 +627,7 @@ export interface ViewGenerateTableDataParams {
1334
627
  /**
1335
628
  * Time window for filtering transformations in a view
1336
629
  */
1337
- timeWindow: ViewGenerateTableDataParams.TimeWindow;
630
+ timeWindow: TimeWindow;
1338
631
 
1339
632
  /**
1340
633
  * Description of the view
@@ -1352,126 +645,15 @@ export interface ViewGenerateTableDataParams {
1352
645
  offset?: number | null;
1353
646
  }
1354
647
 
1355
- export namespace ViewGenerateTableDataParams {
1356
- /**
1357
- * An aggregation definition for a view
1358
- */
1359
- export interface Aggregation {
1360
- /**
1361
- * Aggregation function to apply to a view column
1362
- */
1363
- function: 'count' | 'count_distinct' | 'sum' | 'average' | 'min' | 'max';
1364
-
1365
- /**
1366
- * Name of the aggregation
1367
- */
1368
- name: string;
1369
-
1370
- /**
1371
- * Name of the column to aggregate (required for count_distinct, sum, average, min,
1372
- * max functions)
1373
- */
1374
- aggregateColumnName?: string | null;
1375
-
1376
- /**
1377
- * How to display the aggregation results
1378
- */
1379
- displayType?: 'table' | 'bar_chart' | 'pie_chart';
1380
-
1381
- /**
1382
- * Name of the column to group by (optional, for grouped aggregations)
1383
- */
1384
- groupByColumnName?: string | null;
1385
- }
1386
-
1387
- /**
1388
- * A column definition in a view
1389
- */
1390
- export interface Column {
1391
- /**
1392
- * Order in which this column should be displayed (0-based index)
1393
- */
1394
- displayOrderIndex: number;
1395
-
1396
- /**
1397
- * Name of the column
1398
- */
1399
- name: string;
1400
-
1401
- /**
1402
- * JSON path to the value in the transformation output schema (e.g.,
1403
- * ["invoiceDetails", "invoiceNumber"])
1404
- */
1405
- valueSchemaPath: Array<string>;
1406
- }
1407
-
1408
- /**
1409
- * A filter to apply to a view column
1410
- */
1411
- export interface Filter {
1412
- /**
1413
- * Name of the column to filter on
1414
- */
1415
- columnName: string;
1416
-
1417
- /**
1418
- * Type of filter to apply to a view column
1419
- */
1420
- filterType:
1421
- | 'equals_string'
1422
- | 'equals_number'
1423
- | 'less_than_number'
1424
- | 'less_than_equal_number'
1425
- | 'greater_than_number'
1426
- | 'greater_than_equal_number'
1427
- | 'is_null'
1428
- | 'is_not_null';
1429
-
1430
- /**
1431
- * Numeric value for the filter (required for number filter types)
1432
- */
1433
- number?: number | null;
1434
-
1435
- /**
1436
- * String value for the filter (required for string filter types)
1437
- */
1438
- string?: string | null;
1439
- }
1440
-
1441
- export interface Function {
1442
- /**
1443
- * Unique identifier of function. Provide either id or name, not both.
1444
- */
1445
- id?: string;
1446
-
1447
- /**
1448
- * Name of function. Must be UNIQUE on a per-environment basis. Provide either id
1449
- * or name, not both.
1450
- */
1451
- name?: string;
1452
- }
1453
-
1454
- /**
1455
- * Time window for filtering transformations in a view
1456
- */
1457
- export interface TimeWindow {
1458
- /**
1459
- * End of the time window in ISO 8601 (RFC 3339) format in UTC
1460
- */
1461
- end: string;
1462
-
1463
- /**
1464
- * Start of the time window in ISO 8601 (RFC 3339) format in UTC
1465
- */
1466
- start: string;
1467
- }
1468
- }
1469
-
1470
648
  export declare namespace Views {
1471
649
  export {
1472
- type ViewCreateResponse as ViewCreateResponse,
1473
- type ViewRetrieveResponse as ViewRetrieveResponse,
1474
- type ViewUpdateResponse as ViewUpdateResponse,
650
+ type FunctionIdentifier as FunctionIdentifier,
651
+ type TimeWindow as TimeWindow,
652
+ type View as View,
653
+ type ViewAggregation as ViewAggregation,
654
+ type ViewColumn as ViewColumn,
655
+ type ViewCreate as ViewCreate,
656
+ type ViewFilter as ViewFilter,
1475
657
  type ViewListResponse as ViewListResponse,
1476
658
  type ViewGenerateAggregationDataResponse as ViewGenerateAggregationDataResponse,
1477
659
  type ViewGenerateTableDataResponse as ViewGenerateTableDataResponse,