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
@@ -51,7 +51,7 @@ export declare class Views extends APIResource {
51
51
  * The new view is created at `versionNum: 1`. Subsequent updates produce new
52
52
  * versions; the version-1 configuration remains addressable.
53
53
  */
54
- create(body: ViewCreateParams, options?: RequestOptions): APIPromise<ViewCreateResponse>;
54
+ create(body: ViewCreateParams, options?: RequestOptions): APIPromise<View>;
55
55
  /**
56
56
  * **Retrieve a view by ID.**
57
57
  *
@@ -59,7 +59,7 @@ export declare class Views extends APIResource {
59
59
  * list of versions on the View object and re-request with the desired version
60
60
  * pinned (versions are immutable once created).
61
61
  */
62
- retrieve(viewID: string, options?: RequestOptions): APIPromise<ViewRetrieveResponse>;
62
+ retrieve(viewID: string, options?: RequestOptions): APIPromise<View>;
63
63
  /**
64
64
  * **Update a view. Updates create a new version.**
65
65
  *
@@ -67,7 +67,7 @@ export declare class Views extends APIResource {
67
67
  * fully replacing — pass the complete view body, not a patch. The version number
68
68
  * is auto-incremented.
69
69
  */
70
- update(viewID: string, body: ViewUpdateParams, options?: RequestOptions): APIPromise<ViewUpdateResponse>;
70
+ update(viewID: string, body: ViewUpdateParams, options?: RequestOptions): APIPromise<View>;
71
71
  /**
72
72
  * **List views in the current environment, optionally filtered by the functions
73
73
  * they read from.**
@@ -117,19 +117,43 @@ export declare class Views extends APIResource {
117
117
  */
118
118
  generateTableData(body: ViewGenerateTableDataParams, options?: RequestOptions): APIPromise<ViewGenerateTableDataResponse>;
119
119
  }
120
+ export interface FunctionIdentifier {
121
+ /**
122
+ * Unique identifier of function. Provide either id or name, not both.
123
+ */
124
+ id?: string;
125
+ /**
126
+ * Name of function. Must be UNIQUE on a per-environment basis. Provide either id
127
+ * or name, not both.
128
+ */
129
+ name?: string;
130
+ }
131
+ /**
132
+ * Time window for filtering transformations in a view
133
+ */
134
+ export interface TimeWindow {
135
+ /**
136
+ * End of the time window in ISO 8601 (RFC 3339) format in UTC
137
+ */
138
+ end: string;
139
+ /**
140
+ * Start of the time window in ISO 8601 (RFC 3339) format in UTC
141
+ */
142
+ start: string;
143
+ }
120
144
  /**
121
145
  * A view is a table visualization of transformations that allows customers to have
122
146
  * insight into their transformations
123
147
  */
124
- export interface ViewCreateResponse {
148
+ export interface View {
125
149
  /**
126
150
  * List of aggregations defined for the view
127
151
  */
128
- aggregations: Array<ViewCreateResponse.Aggregation>;
152
+ aggregations: Array<ViewAggregation>;
129
153
  /**
130
154
  * List of columns in the view
131
155
  */
132
- columns: Array<ViewCreateResponse.Column>;
156
+ columns: Array<ViewColumn>;
133
157
  /**
134
158
  * Current version number of the view
135
159
  */
@@ -137,11 +161,11 @@ export interface ViewCreateResponse {
137
161
  /**
138
162
  * List of filters applied to the view
139
163
  */
140
- filters: Array<ViewCreateResponse.Filter>;
164
+ filters: Array<ViewFilter>;
141
165
  /**
142
166
  * List of functions that this view queries transformations from
143
167
  */
144
- functions: Array<ViewCreateResponse.Function>;
168
+ functions: Array<FunctionIdentifier>;
145
169
  /**
146
170
  * Name of the view
147
171
  */
@@ -155,315 +179,99 @@ export interface ViewCreateResponse {
155
179
  */
156
180
  description?: string | null;
157
181
  }
158
- export declare namespace ViewCreateResponse {
159
- /**
160
- * An aggregation definition for a view
161
- */
162
- interface Aggregation {
163
- /**
164
- * Aggregation function to apply to a view column
165
- */
166
- function: 'count' | 'count_distinct' | 'sum' | 'average' | 'min' | 'max';
167
- /**
168
- * Name of the aggregation
169
- */
170
- name: string;
171
- /**
172
- * Name of the column to aggregate (required for count_distinct, sum, average, min,
173
- * max functions)
174
- */
175
- aggregateColumnName?: string | null;
176
- /**
177
- * How to display the aggregation results
178
- */
179
- displayType?: 'table' | 'bar_chart' | 'pie_chart';
180
- /**
181
- * Name of the column to group by (optional, for grouped aggregations)
182
- */
183
- groupByColumnName?: string | null;
184
- }
185
- /**
186
- * A column definition in a view
187
- */
188
- interface Column {
189
- /**
190
- * Order in which this column should be displayed (0-based index)
191
- */
192
- displayOrderIndex: number;
193
- /**
194
- * Name of the column
195
- */
196
- name: string;
197
- /**
198
- * JSON path to the value in the transformation output schema (e.g.,
199
- * ["invoiceDetails", "invoiceNumber"])
200
- */
201
- valueSchemaPath: Array<string>;
202
- }
203
- /**
204
- * A filter to apply to a view column
205
- */
206
- interface Filter {
207
- /**
208
- * Name of the column to filter on
209
- */
210
- columnName: string;
211
- /**
212
- * Type of filter to apply to a view column
213
- */
214
- filterType: 'equals_string' | 'equals_number' | 'less_than_number' | 'less_than_equal_number' | 'greater_than_number' | 'greater_than_equal_number' | 'is_null' | 'is_not_null';
215
- /**
216
- * Numeric value for the filter (required for number filter types)
217
- */
218
- number?: number | null;
219
- /**
220
- * String value for the filter (required for string filter types)
221
- */
222
- string?: string | null;
223
- }
224
- interface Function {
225
- /**
226
- * Unique identifier of function. Provide either id or name, not both.
227
- */
228
- id?: string;
229
- /**
230
- * Name of function. Must be UNIQUE on a per-environment basis. Provide either id
231
- * or name, not both.
232
- */
233
- name?: string;
234
- }
235
- }
236
182
  /**
237
- * A view is a table visualization of transformations that allows customers to have
238
- * insight into their transformations
183
+ * An aggregation definition for a view
239
184
  */
240
- export interface ViewRetrieveResponse {
241
- /**
242
- * List of aggregations defined for the view
243
- */
244
- aggregations: Array<ViewRetrieveResponse.Aggregation>;
245
- /**
246
- * List of columns in the view
247
- */
248
- columns: Array<ViewRetrieveResponse.Column>;
249
- /**
250
- * Current version number of the view
251
- */
252
- currentVersionNum: number;
185
+ export interface ViewAggregation {
253
186
  /**
254
- * List of filters applied to the view
187
+ * Aggregation function to apply to a view column
255
188
  */
256
- filters: Array<ViewRetrieveResponse.Filter>;
189
+ function: 'count' | 'count_distinct' | 'sum' | 'average' | 'min' | 'max';
257
190
  /**
258
- * List of functions that this view queries transformations from
191
+ * Name of the aggregation
259
192
  */
260
- functions: Array<ViewRetrieveResponse.Function>;
193
+ name: string;
261
194
  /**
262
- * Name of the view
195
+ * Name of the column to aggregate (required for count_distinct, sum, average, min,
196
+ * max functions)
263
197
  */
264
- name: string;
198
+ aggregateColumnName?: string | null;
265
199
  /**
266
- * Unique identifier of the view
200
+ * How to display the aggregation results
267
201
  */
268
- viewID: string;
202
+ displayType?: 'table' | 'bar_chart' | 'pie_chart';
269
203
  /**
270
- * Description of the view
204
+ * Name of the column to group by (optional, for grouped aggregations)
271
205
  */
272
- description?: string | null;
206
+ groupByColumnName?: string | null;
273
207
  }
274
- export declare namespace ViewRetrieveResponse {
208
+ /**
209
+ * A column definition in a view
210
+ */
211
+ export interface ViewColumn {
275
212
  /**
276
- * An aggregation definition for a view
213
+ * Order in which this column should be displayed (0-based index)
277
214
  */
278
- interface Aggregation {
279
- /**
280
- * Aggregation function to apply to a view column
281
- */
282
- function: 'count' | 'count_distinct' | 'sum' | 'average' | 'min' | 'max';
283
- /**
284
- * Name of the aggregation
285
- */
286
- name: string;
287
- /**
288
- * Name of the column to aggregate (required for count_distinct, sum, average, min,
289
- * max functions)
290
- */
291
- aggregateColumnName?: string | null;
292
- /**
293
- * How to display the aggregation results
294
- */
295
- displayType?: 'table' | 'bar_chart' | 'pie_chart';
296
- /**
297
- * Name of the column to group by (optional, for grouped aggregations)
298
- */
299
- groupByColumnName?: string | null;
300
- }
215
+ displayOrderIndex: number;
301
216
  /**
302
- * A column definition in a view
217
+ * Name of the column
303
218
  */
304
- interface Column {
305
- /**
306
- * Order in which this column should be displayed (0-based index)
307
- */
308
- displayOrderIndex: number;
309
- /**
310
- * Name of the column
311
- */
312
- name: string;
313
- /**
314
- * JSON path to the value in the transformation output schema (e.g.,
315
- * ["invoiceDetails", "invoiceNumber"])
316
- */
317
- valueSchemaPath: Array<string>;
318
- }
219
+ name: string;
319
220
  /**
320
- * A filter to apply to a view column
221
+ * JSON path to the value in the transformation output schema (e.g.,
222
+ * ["invoiceDetails", "invoiceNumber"])
321
223
  */
322
- interface Filter {
323
- /**
324
- * Name of the column to filter on
325
- */
326
- columnName: string;
327
- /**
328
- * Type of filter to apply to a view column
329
- */
330
- filterType: 'equals_string' | 'equals_number' | 'less_than_number' | 'less_than_equal_number' | 'greater_than_number' | 'greater_than_equal_number' | 'is_null' | 'is_not_null';
331
- /**
332
- * Numeric value for the filter (required for number filter types)
333
- */
334
- number?: number | null;
335
- /**
336
- * String value for the filter (required for string filter types)
337
- */
338
- string?: string | null;
339
- }
340
- interface Function {
341
- /**
342
- * Unique identifier of function. Provide either id or name, not both.
343
- */
344
- id?: string;
345
- /**
346
- * Name of function. Must be UNIQUE on a per-environment basis. Provide either id
347
- * or name, not both.
348
- */
349
- name?: string;
350
- }
224
+ valueSchemaPath: Array<string>;
351
225
  }
352
226
  /**
353
- * A view is a table visualization of transformations that allows customers to have
354
- * insight into their transformations
227
+ * Request to create a new view or update an existing view
355
228
  */
356
- export interface ViewUpdateResponse {
229
+ export interface ViewCreate {
357
230
  /**
358
231
  * List of aggregations defined for the view
359
232
  */
360
- aggregations: Array<ViewUpdateResponse.Aggregation>;
233
+ aggregations: Array<ViewAggregation>;
361
234
  /**
362
235
  * List of columns in the view
363
236
  */
364
- columns: Array<ViewUpdateResponse.Column>;
365
- /**
366
- * Current version number of the view
367
- */
368
- currentVersionNum: number;
237
+ columns: Array<ViewColumn>;
369
238
  /**
370
239
  * List of filters applied to the view
371
240
  */
372
- filters: Array<ViewUpdateResponse.Filter>;
241
+ filters: Array<ViewFilter>;
373
242
  /**
374
243
  * List of functions that this view queries transformations from
375
244
  */
376
- functions: Array<ViewUpdateResponse.Function>;
245
+ functions: Array<FunctionIdentifier>;
377
246
  /**
378
247
  * Name of the view
379
248
  */
380
249
  name: string;
381
- /**
382
- * Unique identifier of the view
383
- */
384
- viewID: string;
385
250
  /**
386
251
  * Description of the view
387
252
  */
388
- description?: string | null;
253
+ description?: string;
389
254
  }
390
- export declare namespace ViewUpdateResponse {
255
+ /**
256
+ * A filter to apply to a view column
257
+ */
258
+ export interface ViewFilter {
391
259
  /**
392
- * An aggregation definition for a view
260
+ * Name of the column to filter on
393
261
  */
394
- interface Aggregation {
395
- /**
396
- * Aggregation function to apply to a view column
397
- */
398
- function: 'count' | 'count_distinct' | 'sum' | 'average' | 'min' | 'max';
399
- /**
400
- * Name of the aggregation
401
- */
402
- name: string;
403
- /**
404
- * Name of the column to aggregate (required for count_distinct, sum, average, min,
405
- * max functions)
406
- */
407
- aggregateColumnName?: string | null;
408
- /**
409
- * How to display the aggregation results
410
- */
411
- displayType?: 'table' | 'bar_chart' | 'pie_chart';
412
- /**
413
- * Name of the column to group by (optional, for grouped aggregations)
414
- */
415
- groupByColumnName?: string | null;
416
- }
262
+ columnName: string;
417
263
  /**
418
- * A column definition in a view
264
+ * Type of filter to apply to a view column
419
265
  */
420
- interface Column {
421
- /**
422
- * Order in which this column should be displayed (0-based index)
423
- */
424
- displayOrderIndex: number;
425
- /**
426
- * Name of the column
427
- */
428
- name: string;
429
- /**
430
- * JSON path to the value in the transformation output schema (e.g.,
431
- * ["invoiceDetails", "invoiceNumber"])
432
- */
433
- valueSchemaPath: Array<string>;
434
- }
266
+ filterType: 'equals_string' | 'equals_number' | 'less_than_number' | 'less_than_equal_number' | 'greater_than_number' | 'greater_than_equal_number' | 'is_null' | 'is_not_null';
435
267
  /**
436
- * A filter to apply to a view column
268
+ * Numeric value for the filter (required for number filter types)
437
269
  */
438
- interface Filter {
439
- /**
440
- * Name of the column to filter on
441
- */
442
- columnName: string;
443
- /**
444
- * Type of filter to apply to a view column
445
- */
446
- filterType: 'equals_string' | 'equals_number' | 'less_than_number' | 'less_than_equal_number' | 'greater_than_number' | 'greater_than_equal_number' | 'is_null' | 'is_not_null';
447
- /**
448
- * Numeric value for the filter (required for number filter types)
449
- */
450
- number?: number | null;
451
- /**
452
- * String value for the filter (required for string filter types)
453
- */
454
- string?: string | null;
455
- }
456
- interface Function {
457
- /**
458
- * Unique identifier of function. Provide either id or name, not both.
459
- */
460
- id?: string;
461
- /**
462
- * Name of function. Must be UNIQUE on a per-environment basis. Provide either id
463
- * or name, not both.
464
- */
465
- name?: string;
466
- }
270
+ number?: number | null;
271
+ /**
272
+ * String value for the filter (required for string filter types)
273
+ */
274
+ string?: string | null;
467
275
  }
468
276
  /**
469
277
  * Response containing a list of views
@@ -476,125 +284,7 @@ export interface ViewListResponse {
476
284
  /**
477
285
  * Array of views
478
286
  */
479
- views: Array<ViewListResponse.View>;
480
- }
481
- export declare namespace ViewListResponse {
482
- /**
483
- * A view is a table visualization of transformations that allows customers to have
484
- * insight into their transformations
485
- */
486
- interface View {
487
- /**
488
- * List of aggregations defined for the view
489
- */
490
- aggregations: Array<View.Aggregation>;
491
- /**
492
- * List of columns in the view
493
- */
494
- columns: Array<View.Column>;
495
- /**
496
- * Current version number of the view
497
- */
498
- currentVersionNum: number;
499
- /**
500
- * List of filters applied to the view
501
- */
502
- filters: Array<View.Filter>;
503
- /**
504
- * List of functions that this view queries transformations from
505
- */
506
- functions: Array<View.Function>;
507
- /**
508
- * Name of the view
509
- */
510
- name: string;
511
- /**
512
- * Unique identifier of the view
513
- */
514
- viewID: string;
515
- /**
516
- * Description of the view
517
- */
518
- description?: string | null;
519
- }
520
- namespace View {
521
- /**
522
- * An aggregation definition for a view
523
- */
524
- interface Aggregation {
525
- /**
526
- * Aggregation function to apply to a view column
527
- */
528
- function: 'count' | 'count_distinct' | 'sum' | 'average' | 'min' | 'max';
529
- /**
530
- * Name of the aggregation
531
- */
532
- name: string;
533
- /**
534
- * Name of the column to aggregate (required for count_distinct, sum, average, min,
535
- * max functions)
536
- */
537
- aggregateColumnName?: string | null;
538
- /**
539
- * How to display the aggregation results
540
- */
541
- displayType?: 'table' | 'bar_chart' | 'pie_chart';
542
- /**
543
- * Name of the column to group by (optional, for grouped aggregations)
544
- */
545
- groupByColumnName?: string | null;
546
- }
547
- /**
548
- * A column definition in a view
549
- */
550
- interface Column {
551
- /**
552
- * Order in which this column should be displayed (0-based index)
553
- */
554
- displayOrderIndex: number;
555
- /**
556
- * Name of the column
557
- */
558
- name: string;
559
- /**
560
- * JSON path to the value in the transformation output schema (e.g.,
561
- * ["invoiceDetails", "invoiceNumber"])
562
- */
563
- valueSchemaPath: Array<string>;
564
- }
565
- /**
566
- * A filter to apply to a view column
567
- */
568
- interface Filter {
569
- /**
570
- * Name of the column to filter on
571
- */
572
- columnName: string;
573
- /**
574
- * Type of filter to apply to a view column
575
- */
576
- filterType: 'equals_string' | 'equals_number' | 'less_than_number' | 'less_than_equal_number' | 'greater_than_number' | 'greater_than_equal_number' | 'is_null' | 'is_not_null';
577
- /**
578
- * Numeric value for the filter (required for number filter types)
579
- */
580
- number?: number | null;
581
- /**
582
- * String value for the filter (required for string filter types)
583
- */
584
- string?: string | null;
585
- }
586
- interface Function {
587
- /**
588
- * Unique identifier of function. Provide either id or name, not both.
589
- */
590
- id?: string;
591
- /**
592
- * Name of function. Must be UNIQUE on a per-environment basis. Provide either id
593
- * or name, not both.
594
- */
595
- name?: string;
596
- }
597
- }
287
+ views: Array<View>;
598
288
  }
599
289
  /**
600
290
  * Response containing aggregation data for a view
@@ -683,19 +373,19 @@ export interface ViewCreateParams {
683
373
  /**
684
374
  * List of aggregations defined for the view
685
375
  */
686
- aggregations: Array<ViewCreateParams.Aggregation>;
376
+ aggregations: Array<ViewAggregation>;
687
377
  /**
688
378
  * List of columns in the view
689
379
  */
690
- columns: Array<ViewCreateParams.Column>;
380
+ columns: Array<ViewColumn>;
691
381
  /**
692
382
  * List of filters applied to the view
693
383
  */
694
- filters: Array<ViewCreateParams.Filter>;
384
+ filters: Array<ViewFilter>;
695
385
  /**
696
386
  * List of functions that this view queries transformations from
697
387
  */
698
- functions: Array<ViewCreateParams.Function>;
388
+ functions: Array<FunctionIdentifier>;
699
389
  /**
700
390
  * Name of the view
701
391
  */
@@ -705,101 +395,23 @@ export interface ViewCreateParams {
705
395
  */
706
396
  description?: string;
707
397
  }
708
- export declare namespace ViewCreateParams {
709
- /**
710
- * An aggregation definition for a view
711
- */
712
- interface Aggregation {
713
- /**
714
- * Aggregation function to apply to a view column
715
- */
716
- function: 'count' | 'count_distinct' | 'sum' | 'average' | 'min' | 'max';
717
- /**
718
- * Name of the aggregation
719
- */
720
- name: string;
721
- /**
722
- * Name of the column to aggregate (required for count_distinct, sum, average, min,
723
- * max functions)
724
- */
725
- aggregateColumnName?: string | null;
726
- /**
727
- * How to display the aggregation results
728
- */
729
- displayType?: 'table' | 'bar_chart' | 'pie_chart';
730
- /**
731
- * Name of the column to group by (optional, for grouped aggregations)
732
- */
733
- groupByColumnName?: string | null;
734
- }
735
- /**
736
- * A column definition in a view
737
- */
738
- interface Column {
739
- /**
740
- * Order in which this column should be displayed (0-based index)
741
- */
742
- displayOrderIndex: number;
743
- /**
744
- * Name of the column
745
- */
746
- name: string;
747
- /**
748
- * JSON path to the value in the transformation output schema (e.g.,
749
- * ["invoiceDetails", "invoiceNumber"])
750
- */
751
- valueSchemaPath: Array<string>;
752
- }
753
- /**
754
- * A filter to apply to a view column
755
- */
756
- interface Filter {
757
- /**
758
- * Name of the column to filter on
759
- */
760
- columnName: string;
761
- /**
762
- * Type of filter to apply to a view column
763
- */
764
- filterType: 'equals_string' | 'equals_number' | 'less_than_number' | 'less_than_equal_number' | 'greater_than_number' | 'greater_than_equal_number' | 'is_null' | 'is_not_null';
765
- /**
766
- * Numeric value for the filter (required for number filter types)
767
- */
768
- number?: number | null;
769
- /**
770
- * String value for the filter (required for string filter types)
771
- */
772
- string?: string | null;
773
- }
774
- interface Function {
775
- /**
776
- * Unique identifier of function. Provide either id or name, not both.
777
- */
778
- id?: string;
779
- /**
780
- * Name of function. Must be UNIQUE on a per-environment basis. Provide either id
781
- * or name, not both.
782
- */
783
- name?: string;
784
- }
785
- }
786
398
  export interface ViewUpdateParams {
787
399
  /**
788
400
  * List of aggregations defined for the view
789
401
  */
790
- aggregations: Array<ViewUpdateParams.Aggregation>;
402
+ aggregations: Array<ViewAggregation>;
791
403
  /**
792
404
  * List of columns in the view
793
405
  */
794
- columns: Array<ViewUpdateParams.Column>;
406
+ columns: Array<ViewColumn>;
795
407
  /**
796
408
  * List of filters applied to the view
797
409
  */
798
- filters: Array<ViewUpdateParams.Filter>;
410
+ filters: Array<ViewFilter>;
799
411
  /**
800
412
  * List of functions that this view queries transformations from
801
413
  */
802
- functions: Array<ViewUpdateParams.Function>;
414
+ functions: Array<FunctionIdentifier>;
803
415
  /**
804
416
  * Name of the view
805
417
  */
@@ -809,84 +421,6 @@ export interface ViewUpdateParams {
809
421
  */
810
422
  description?: string;
811
423
  }
812
- export declare namespace ViewUpdateParams {
813
- /**
814
- * An aggregation definition for a view
815
- */
816
- interface Aggregation {
817
- /**
818
- * Aggregation function to apply to a view column
819
- */
820
- function: 'count' | 'count_distinct' | 'sum' | 'average' | 'min' | 'max';
821
- /**
822
- * Name of the aggregation
823
- */
824
- name: string;
825
- /**
826
- * Name of the column to aggregate (required for count_distinct, sum, average, min,
827
- * max functions)
828
- */
829
- aggregateColumnName?: string | null;
830
- /**
831
- * How to display the aggregation results
832
- */
833
- displayType?: 'table' | 'bar_chart' | 'pie_chart';
834
- /**
835
- * Name of the column to group by (optional, for grouped aggregations)
836
- */
837
- groupByColumnName?: string | null;
838
- }
839
- /**
840
- * A column definition in a view
841
- */
842
- interface Column {
843
- /**
844
- * Order in which this column should be displayed (0-based index)
845
- */
846
- displayOrderIndex: number;
847
- /**
848
- * Name of the column
849
- */
850
- name: string;
851
- /**
852
- * JSON path to the value in the transformation output schema (e.g.,
853
- * ["invoiceDetails", "invoiceNumber"])
854
- */
855
- valueSchemaPath: Array<string>;
856
- }
857
- /**
858
- * A filter to apply to a view column
859
- */
860
- interface Filter {
861
- /**
862
- * Name of the column to filter on
863
- */
864
- columnName: string;
865
- /**
866
- * Type of filter to apply to a view column
867
- */
868
- filterType: 'equals_string' | 'equals_number' | 'less_than_number' | 'less_than_equal_number' | 'greater_than_number' | 'greater_than_equal_number' | 'is_null' | 'is_not_null';
869
- /**
870
- * Numeric value for the filter (required for number filter types)
871
- */
872
- number?: number | null;
873
- /**
874
- * String value for the filter (required for string filter types)
875
- */
876
- string?: string | null;
877
- }
878
- interface Function {
879
- /**
880
- * Unique identifier of function. Provide either id or name, not both.
881
- */
882
- id?: string;
883
- /**
884
- * Name of function. Must be UNIQUE on a per-environment basis. Provide either id
885
- * or name, not both.
886
- */
887
- name?: string;
888
- }
889
- }
890
424
  export interface ViewListParams {
891
425
  /**
892
426
  * Cursor — a `viewID` defining your place in the list.
@@ -922,19 +456,19 @@ export interface ViewGenerateAggregationDataParams {
922
456
  /**
923
457
  * List of aggregations defined for the view
924
458
  */
925
- aggregations: Array<ViewGenerateAggregationDataParams.Aggregation>;
459
+ aggregations: Array<ViewAggregation>;
926
460
  /**
927
461
  * List of columns in the view
928
462
  */
929
- columns: Array<ViewGenerateAggregationDataParams.Column>;
463
+ columns: Array<ViewColumn>;
930
464
  /**
931
465
  * List of filters applied to the view
932
466
  */
933
- filters: Array<ViewGenerateAggregationDataParams.Filter>;
467
+ filters: Array<ViewFilter>;
934
468
  /**
935
469
  * List of functions that this view queries transformations from
936
470
  */
937
- functions: Array<ViewGenerateAggregationDataParams.Function>;
471
+ functions: Array<FunctionIdentifier>;
938
472
  /**
939
473
  * Name of the view
940
474
  */
@@ -942,120 +476,29 @@ export interface ViewGenerateAggregationDataParams {
942
476
  /**
943
477
  * Time window for filtering transformations in a view
944
478
  */
945
- timeWindow: ViewGenerateAggregationDataParams.TimeWindow;
479
+ timeWindow: TimeWindow;
946
480
  /**
947
481
  * Description of the view
948
482
  */
949
483
  description?: string;
950
484
  }
951
- export declare namespace ViewGenerateAggregationDataParams {
952
- /**
953
- * An aggregation definition for a view
954
- */
955
- interface Aggregation {
956
- /**
957
- * Aggregation function to apply to a view column
958
- */
959
- function: 'count' | 'count_distinct' | 'sum' | 'average' | 'min' | 'max';
960
- /**
961
- * Name of the aggregation
962
- */
963
- name: string;
964
- /**
965
- * Name of the column to aggregate (required for count_distinct, sum, average, min,
966
- * max functions)
967
- */
968
- aggregateColumnName?: string | null;
969
- /**
970
- * How to display the aggregation results
971
- */
972
- displayType?: 'table' | 'bar_chart' | 'pie_chart';
973
- /**
974
- * Name of the column to group by (optional, for grouped aggregations)
975
- */
976
- groupByColumnName?: string | null;
977
- }
978
- /**
979
- * A column definition in a view
980
- */
981
- interface Column {
982
- /**
983
- * Order in which this column should be displayed (0-based index)
984
- */
985
- displayOrderIndex: number;
986
- /**
987
- * Name of the column
988
- */
989
- name: string;
990
- /**
991
- * JSON path to the value in the transformation output schema (e.g.,
992
- * ["invoiceDetails", "invoiceNumber"])
993
- */
994
- valueSchemaPath: Array<string>;
995
- }
996
- /**
997
- * A filter to apply to a view column
998
- */
999
- interface Filter {
1000
- /**
1001
- * Name of the column to filter on
1002
- */
1003
- columnName: string;
1004
- /**
1005
- * Type of filter to apply to a view column
1006
- */
1007
- filterType: 'equals_string' | 'equals_number' | 'less_than_number' | 'less_than_equal_number' | 'greater_than_number' | 'greater_than_equal_number' | 'is_null' | 'is_not_null';
1008
- /**
1009
- * Numeric value for the filter (required for number filter types)
1010
- */
1011
- number?: number | null;
1012
- /**
1013
- * String value for the filter (required for string filter types)
1014
- */
1015
- string?: string | null;
1016
- }
1017
- interface Function {
1018
- /**
1019
- * Unique identifier of function. Provide either id or name, not both.
1020
- */
1021
- id?: string;
1022
- /**
1023
- * Name of function. Must be UNIQUE on a per-environment basis. Provide either id
1024
- * or name, not both.
1025
- */
1026
- name?: string;
1027
- }
1028
- /**
1029
- * Time window for filtering transformations in a view
1030
- */
1031
- interface TimeWindow {
1032
- /**
1033
- * End of the time window in ISO 8601 (RFC 3339) format in UTC
1034
- */
1035
- end: string;
1036
- /**
1037
- * Start of the time window in ISO 8601 (RFC 3339) format in UTC
1038
- */
1039
- start: string;
1040
- }
1041
- }
1042
485
  export interface ViewGenerateTableDataParams {
1043
486
  /**
1044
487
  * List of aggregations defined for the view
1045
488
  */
1046
- aggregations: Array<ViewGenerateTableDataParams.Aggregation>;
489
+ aggregations: Array<ViewAggregation>;
1047
490
  /**
1048
491
  * List of columns in the view
1049
492
  */
1050
- columns: Array<ViewGenerateTableDataParams.Column>;
493
+ columns: Array<ViewColumn>;
1051
494
  /**
1052
495
  * List of filters applied to the view
1053
496
  */
1054
- filters: Array<ViewGenerateTableDataParams.Filter>;
497
+ filters: Array<ViewFilter>;
1055
498
  /**
1056
499
  * List of functions that this view queries transformations from
1057
500
  */
1058
- functions: Array<ViewGenerateTableDataParams.Function>;
501
+ functions: Array<FunctionIdentifier>;
1059
502
  /**
1060
503
  * Name of the view
1061
504
  */
@@ -1063,7 +506,7 @@ export interface ViewGenerateTableDataParams {
1063
506
  /**
1064
507
  * Time window for filtering transformations in a view
1065
508
  */
1066
- timeWindow: ViewGenerateTableDataParams.TimeWindow;
509
+ timeWindow: TimeWindow;
1067
510
  /**
1068
511
  * Description of the view
1069
512
  */
@@ -1077,98 +520,7 @@ export interface ViewGenerateTableDataParams {
1077
520
  */
1078
521
  offset?: number | null;
1079
522
  }
1080
- export declare namespace ViewGenerateTableDataParams {
1081
- /**
1082
- * An aggregation definition for a view
1083
- */
1084
- interface Aggregation {
1085
- /**
1086
- * Aggregation function to apply to a view column
1087
- */
1088
- function: 'count' | 'count_distinct' | 'sum' | 'average' | 'min' | 'max';
1089
- /**
1090
- * Name of the aggregation
1091
- */
1092
- name: string;
1093
- /**
1094
- * Name of the column to aggregate (required for count_distinct, sum, average, min,
1095
- * max functions)
1096
- */
1097
- aggregateColumnName?: string | null;
1098
- /**
1099
- * How to display the aggregation results
1100
- */
1101
- displayType?: 'table' | 'bar_chart' | 'pie_chart';
1102
- /**
1103
- * Name of the column to group by (optional, for grouped aggregations)
1104
- */
1105
- groupByColumnName?: string | null;
1106
- }
1107
- /**
1108
- * A column definition in a view
1109
- */
1110
- interface Column {
1111
- /**
1112
- * Order in which this column should be displayed (0-based index)
1113
- */
1114
- displayOrderIndex: number;
1115
- /**
1116
- * Name of the column
1117
- */
1118
- name: string;
1119
- /**
1120
- * JSON path to the value in the transformation output schema (e.g.,
1121
- * ["invoiceDetails", "invoiceNumber"])
1122
- */
1123
- valueSchemaPath: Array<string>;
1124
- }
1125
- /**
1126
- * A filter to apply to a view column
1127
- */
1128
- interface Filter {
1129
- /**
1130
- * Name of the column to filter on
1131
- */
1132
- columnName: string;
1133
- /**
1134
- * Type of filter to apply to a view column
1135
- */
1136
- filterType: 'equals_string' | 'equals_number' | 'less_than_number' | 'less_than_equal_number' | 'greater_than_number' | 'greater_than_equal_number' | 'is_null' | 'is_not_null';
1137
- /**
1138
- * Numeric value for the filter (required for number filter types)
1139
- */
1140
- number?: number | null;
1141
- /**
1142
- * String value for the filter (required for string filter types)
1143
- */
1144
- string?: string | null;
1145
- }
1146
- interface Function {
1147
- /**
1148
- * Unique identifier of function. Provide either id or name, not both.
1149
- */
1150
- id?: string;
1151
- /**
1152
- * Name of function. Must be UNIQUE on a per-environment basis. Provide either id
1153
- * or name, not both.
1154
- */
1155
- name?: string;
1156
- }
1157
- /**
1158
- * Time window for filtering transformations in a view
1159
- */
1160
- interface TimeWindow {
1161
- /**
1162
- * End of the time window in ISO 8601 (RFC 3339) format in UTC
1163
- */
1164
- end: string;
1165
- /**
1166
- * Start of the time window in ISO 8601 (RFC 3339) format in UTC
1167
- */
1168
- start: string;
1169
- }
1170
- }
1171
523
  export declare namespace Views {
1172
- export { type ViewCreateResponse as ViewCreateResponse, type ViewRetrieveResponse as ViewRetrieveResponse, type ViewUpdateResponse as ViewUpdateResponse, type ViewListResponse as ViewListResponse, type ViewGenerateAggregationDataResponse as ViewGenerateAggregationDataResponse, type ViewGenerateTableDataResponse as ViewGenerateTableDataResponse, type ViewCreateParams as ViewCreateParams, type ViewUpdateParams as ViewUpdateParams, type ViewListParams as ViewListParams, type ViewGenerateAggregationDataParams as ViewGenerateAggregationDataParams, type ViewGenerateTableDataParams as ViewGenerateTableDataParams, };
524
+ export { type FunctionIdentifier as FunctionIdentifier, type TimeWindow as TimeWindow, type View as View, type ViewAggregation as ViewAggregation, type ViewColumn as ViewColumn, type ViewCreate as ViewCreate, type ViewFilter as ViewFilter, type ViewListResponse as ViewListResponse, type ViewGenerateAggregationDataResponse as ViewGenerateAggregationDataResponse, type ViewGenerateTableDataResponse as ViewGenerateTableDataResponse, type ViewCreateParams as ViewCreateParams, type ViewUpdateParams as ViewUpdateParams, type ViewListParams as ViewListParams, type ViewGenerateAggregationDataParams as ViewGenerateAggregationDataParams, type ViewGenerateTableDataParams as ViewGenerateTableDataParams, };
1173
525
  }
1174
526
  //# sourceMappingURL=views.d.mts.map