@salesforce/lds-adapters-sfap-analytics-insights 1.307.0 → 1.308.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.
@@ -92,7 +92,7 @@ function createLink(ref) {
92
92
  };
93
93
  }
94
94
 
95
- function validate$s(obj, path = 'MetricMetadata') {
95
+ function validate$u(obj, path = 'MetricMetadata') {
96
96
  const v_error = (() => {
97
97
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
98
98
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -115,7 +115,7 @@ function validate$s(obj, path = 'MetricMetadata') {
115
115
  return v_error === undefined ? null : v_error;
116
116
  }
117
117
 
118
- function validate$r(obj, path = 'ExtensionOptions') {
118
+ function validate$t(obj, path = 'ExtensionOptions') {
119
119
  const v_error = (() => {
120
120
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
121
121
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -145,7 +145,7 @@ function validate$r(obj, path = 'ExtensionOptions') {
145
145
  return v_error === undefined ? null : v_error;
146
146
  }
147
147
 
148
- function validate$q(obj, path = 'InsightsOptions_InsightSetting') {
148
+ function validate$s(obj, path = 'InsightsOptions_InsightSetting') {
149
149
  const v_error = (() => {
150
150
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
151
151
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -168,7 +168,7 @@ function validate$q(obj, path = 'InsightsOptions_InsightSetting') {
168
168
  return v_error === undefined ? null : v_error;
169
169
  }
170
170
 
171
- function validate$p(obj, path = 'InsightsOptions') {
171
+ function validate$r(obj, path = 'InsightsOptions') {
172
172
  const v_error = (() => {
173
173
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
174
174
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -182,7 +182,7 @@ function validate$p(obj, path = 'InsightsOptions') {
182
182
  for (let i = 0; i < obj_settings.length; i++) {
183
183
  const obj_settings_item = obj_settings[i];
184
184
  const path_settings_item = path_settings + '[' + i + ']';
185
- const referencepath_settings_itemValidationError = validate$q(obj_settings_item, path_settings_item);
185
+ const referencepath_settings_itemValidationError = validate$s(obj_settings_item, path_settings_item);
186
186
  if (referencepath_settings_itemValidationError !== null) {
187
187
  let message = 'Object doesn\'t match InsightsOptions_InsightSetting (at "' + path_settings_item + '")\n';
188
188
  message += referencepath_settings_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -194,7 +194,7 @@ function validate$p(obj, path = 'InsightsOptions') {
194
194
  return v_error === undefined ? null : v_error;
195
195
  }
196
196
 
197
- function validate$o(obj, path = 'CategoricalFilterOptions') {
197
+ function validate$q(obj, path = 'CategoricalFilterOptions') {
198
198
  const v_error = (() => {
199
199
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
200
200
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -231,7 +231,7 @@ function validate$o(obj, path = 'CategoricalFilterOptions') {
231
231
  return v_error === undefined ? null : v_error;
232
232
  }
233
233
 
234
- function validate$n(obj, path = 'FieldId') {
234
+ function validate$p(obj, path = 'FieldId') {
235
235
  const v_error = (() => {
236
236
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
237
237
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -261,7 +261,7 @@ function validate$n(obj, path = 'FieldId') {
261
261
  return v_error === undefined ? null : v_error;
262
262
  }
263
263
 
264
- function validate$m(obj, path = 'RangeFilterOptions') {
264
+ function validate$o(obj, path = 'RangeFilterOptions') {
265
265
  const v_error = (() => {
266
266
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
267
267
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -305,7 +305,7 @@ function validate$m(obj, path = 'RangeFilterOptions') {
305
305
  return v_error === undefined ? null : v_error;
306
306
  }
307
307
 
308
- function validate$l(obj, path = 'RelativeDate') {
308
+ function validate$n(obj, path = 'RelativeDate') {
309
309
  const v_error = (() => {
310
310
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
311
311
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -335,7 +335,7 @@ function validate$l(obj, path = 'RelativeDate') {
335
335
  return v_error === undefined ? null : v_error;
336
336
  }
337
337
 
338
- function validate$k(obj, path = 'RelativeDateFilterOptions') {
338
+ function validate$m(obj, path = 'RelativeDateFilterOptions') {
339
339
  const v_error = (() => {
340
340
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
341
341
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -349,7 +349,7 @@ function validate$k(obj, path = 'RelativeDateFilterOptions') {
349
349
  }
350
350
  const obj_max = obj.max;
351
351
  const path_max = path + '.max';
352
- const referencepath_maxValidationError = validate$l(obj_max, path_max);
352
+ const referencepath_maxValidationError = validate$n(obj_max, path_max);
353
353
  if (referencepath_maxValidationError !== null) {
354
354
  let message = 'Object doesn\'t match RelativeDate (at "' + path_max + '")\n';
355
355
  message += referencepath_maxValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -357,7 +357,7 @@ function validate$k(obj, path = 'RelativeDateFilterOptions') {
357
357
  }
358
358
  const obj_min = obj.min;
359
359
  const path_min = path + '.min';
360
- const referencepath_minValidationError = validate$l(obj_min, path_min);
360
+ const referencepath_minValidationError = validate$n(obj_min, path_min);
361
361
  if (referencepath_minValidationError !== null) {
362
362
  let message = 'Object doesn\'t match RelativeDate (at "' + path_min + '")\n';
363
363
  message += referencepath_minValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -367,14 +367,14 @@ function validate$k(obj, path = 'RelativeDateFilterOptions') {
367
367
  return v_error === undefined ? null : v_error;
368
368
  }
369
369
 
370
- function validate$j(obj, path = 'Filter') {
370
+ function validate$l(obj, path = 'Filter') {
371
371
  const v_error = (() => {
372
372
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
373
373
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
374
374
  }
375
375
  const obj_categoricalFilterOptions = obj.categoricalFilterOptions;
376
376
  const path_categoricalFilterOptions = path + '.categoricalFilterOptions';
377
- const referencepath_categoricalFilterOptionsValidationError = validate$o(obj_categoricalFilterOptions, path_categoricalFilterOptions);
377
+ const referencepath_categoricalFilterOptionsValidationError = validate$q(obj_categoricalFilterOptions, path_categoricalFilterOptions);
378
378
  if (referencepath_categoricalFilterOptionsValidationError !== null) {
379
379
  let message = 'Object doesn\'t match CategoricalFilterOptions (at "' + path_categoricalFilterOptions + '")\n';
380
380
  message += referencepath_categoricalFilterOptionsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -382,7 +382,7 @@ function validate$j(obj, path = 'Filter') {
382
382
  }
383
383
  const obj_field = obj.field;
384
384
  const path_field = path + '.field';
385
- const referencepath_fieldValidationError = validate$n(obj_field, path_field);
385
+ const referencepath_fieldValidationError = validate$p(obj_field, path_field);
386
386
  if (referencepath_fieldValidationError !== null) {
387
387
  let message = 'Object doesn\'t match FieldId (at "' + path_field + '")\n';
388
388
  message += referencepath_fieldValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -390,7 +390,7 @@ function validate$j(obj, path = 'Filter') {
390
390
  }
391
391
  const obj_rangeFilterOptions = obj.rangeFilterOptions;
392
392
  const path_rangeFilterOptions = path + '.rangeFilterOptions';
393
- const referencepath_rangeFilterOptionsValidationError = validate$m(obj_rangeFilterOptions, path_rangeFilterOptions);
393
+ const referencepath_rangeFilterOptionsValidationError = validate$o(obj_rangeFilterOptions, path_rangeFilterOptions);
394
394
  if (referencepath_rangeFilterOptionsValidationError !== null) {
395
395
  let message = 'Object doesn\'t match RangeFilterOptions (at "' + path_rangeFilterOptions + '")\n';
396
396
  message += referencepath_rangeFilterOptionsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -398,7 +398,7 @@ function validate$j(obj, path = 'Filter') {
398
398
  }
399
399
  const obj_relativeDateFilterOptions = obj.relativeDateFilterOptions;
400
400
  const path_relativeDateFilterOptions = path + '.relativeDateFilterOptions';
401
- const referencepath_relativeDateFilterOptionsValidationError = validate$k(obj_relativeDateFilterOptions, path_relativeDateFilterOptions);
401
+ const referencepath_relativeDateFilterOptionsValidationError = validate$m(obj_relativeDateFilterOptions, path_relativeDateFilterOptions);
402
402
  if (referencepath_relativeDateFilterOptionsValidationError !== null) {
403
403
  let message = 'Object doesn\'t match RelativeDateFilterOptions (at "' + path_relativeDateFilterOptions + '")\n';
404
404
  message += referencepath_relativeDateFilterOptionsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -415,7 +415,7 @@ function validate$j(obj, path = 'Filter') {
415
415
  return v_error === undefined ? null : v_error;
416
416
  }
417
417
 
418
- function validate$i(obj, path = 'MeasurementPeriod') {
418
+ function validate$k(obj, path = 'MeasurementPeriod') {
419
419
  const v_error = (() => {
420
420
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
421
421
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -438,11 +438,44 @@ function validate$i(obj, path = 'MeasurementPeriod') {
438
438
  return v_error === undefined ? null : v_error;
439
439
  }
440
440
 
441
- function validate$h(obj, path = 'MetricInstance') {
441
+ function validate$j(obj, path = 'SemanticFilter') {
442
+ const v_error = (() => {
443
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
444
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
445
+ }
446
+ const obj_fieldName = obj.fieldName;
447
+ const path_fieldName = path + '.fieldName';
448
+ if (typeof obj_fieldName !== 'string') {
449
+ return new TypeError('Expected "string" but received "' + typeof obj_fieldName + '" (at "' + path_fieldName + '")');
450
+ }
451
+ const obj_operator = obj.operator;
452
+ const path_operator = path + '.operator';
453
+ if (typeof obj_operator !== 'string') {
454
+ return new TypeError('Expected "string" but received "' + typeof obj_operator + '" (at "' + path_operator + '")');
455
+ }
456
+ if (obj.value !== undefined) {
457
+ const obj_value = obj.value;
458
+ const path_value = path + '.value';
459
+ if (typeof obj_value !== 'string') {
460
+ return new TypeError('Expected "string" but received "' + typeof obj_value + '" (at "' + path_value + '")');
461
+ }
462
+ }
463
+ })();
464
+ return v_error === undefined ? null : v_error;
465
+ }
466
+
467
+ function validate$i(obj, path = 'FlattenFilter') {
442
468
  const v_error = (() => {
443
469
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
444
470
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
445
471
  }
472
+ if (obj.filterLogic !== undefined) {
473
+ const obj_filterLogic = obj.filterLogic;
474
+ const path_filterLogic = path + '.filterLogic';
475
+ if (typeof obj_filterLogic !== 'string') {
476
+ return new TypeError('Expected "string" but received "' + typeof obj_filterLogic + '" (at "' + path_filterLogic + '")');
477
+ }
478
+ }
446
479
  if (obj.filters !== undefined) {
447
480
  const obj_filters = obj.filters;
448
481
  const path_filters = path + '.filters';
@@ -453,6 +486,32 @@ function validate$h(obj, path = 'MetricInstance') {
453
486
  const obj_filters_item = obj_filters[i];
454
487
  const path_filters_item = path_filters + '[' + i + ']';
455
488
  const referencepath_filters_itemValidationError = validate$j(obj_filters_item, path_filters_item);
489
+ if (referencepath_filters_itemValidationError !== null) {
490
+ let message = 'Object doesn\'t match SemanticFilter (at "' + path_filters_item + '")\n';
491
+ message += referencepath_filters_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
492
+ return new TypeError(message);
493
+ }
494
+ }
495
+ }
496
+ })();
497
+ return v_error === undefined ? null : v_error;
498
+ }
499
+
500
+ function validate$h(obj, path = 'MetricInstance') {
501
+ const v_error = (() => {
502
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
503
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
504
+ }
505
+ if (obj.filters !== undefined) {
506
+ const obj_filters = obj.filters;
507
+ const path_filters = path + '.filters';
508
+ if (!ArrayIsArray(obj_filters)) {
509
+ return new TypeError('Expected "array" but received "' + typeof obj_filters + '" (at "' + path_filters + '")');
510
+ }
511
+ for (let i = 0; i < obj_filters.length; i++) {
512
+ const obj_filters_item = obj_filters[i];
513
+ const path_filters_item = path_filters + '[' + i + ']';
514
+ const referencepath_filters_itemValidationError = validate$l(obj_filters_item, path_filters_item);
456
515
  if (referencepath_filters_itemValidationError !== null) {
457
516
  let message = 'Object doesn\'t match Filter (at "' + path_filters_item + '")\n';
458
517
  message += referencepath_filters_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -462,12 +521,20 @@ function validate$h(obj, path = 'MetricInstance') {
462
521
  }
463
522
  const obj_measurementPeriod = obj.measurementPeriod;
464
523
  const path_measurementPeriod = path + '.measurementPeriod';
465
- const referencepath_measurementPeriodValidationError = validate$i(obj_measurementPeriod, path_measurementPeriod);
524
+ const referencepath_measurementPeriodValidationError = validate$k(obj_measurementPeriod, path_measurementPeriod);
466
525
  if (referencepath_measurementPeriodValidationError !== null) {
467
526
  let message = 'Object doesn\'t match MeasurementPeriod (at "' + path_measurementPeriod + '")\n';
468
527
  message += referencepath_measurementPeriodValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
469
528
  return new TypeError(message);
470
529
  }
530
+ const obj_semanticFilter = obj.semanticFilter;
531
+ const path_semanticFilter = path + '.semanticFilter';
532
+ const referencepath_semanticFilterValidationError = validate$i(obj_semanticFilter, path_semanticFilter);
533
+ if (referencepath_semanticFilterValidationError !== null) {
534
+ let message = 'Object doesn\'t match FlattenFilter (at "' + path_semanticFilter + '")\n';
535
+ message += referencepath_semanticFilterValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
536
+ return new TypeError(message);
537
+ }
471
538
  })();
472
539
  return v_error === undefined ? null : v_error;
473
540
  }
@@ -502,7 +569,7 @@ function validate$f(obj, path = 'Measure') {
502
569
  }
503
570
  const obj_field = obj.field;
504
571
  const path_field = path + '.field';
505
- const referencepath_fieldValidationError = validate$n(obj_field, path_field);
572
+ const referencepath_fieldValidationError = validate$p(obj_field, path_field);
506
573
  if (referencepath_fieldValidationError !== null) {
507
574
  let message = 'Object doesn\'t match FieldId (at "' + path_field + '")\n';
508
575
  message += referencepath_fieldValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -535,7 +602,7 @@ function validate$d(obj, path = 'TimeDimension') {
535
602
  }
536
603
  const obj_field = obj.field;
537
604
  const path_field = path + '.field';
538
- const referencepath_fieldValidationError = validate$n(obj_field, path_field);
605
+ const referencepath_fieldValidationError = validate$p(obj_field, path_field);
539
606
  if (referencepath_fieldValidationError !== null) {
540
607
  let message = 'Object doesn\'t match FieldId (at "' + path_field + '")\n';
541
608
  message += referencepath_fieldValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -567,7 +634,7 @@ function validate$c(obj, path = 'MetricDefinition') {
567
634
  for (let i = 0; i < obj_filters.length; i++) {
568
635
  const obj_filters_item = obj_filters[i];
569
636
  const path_filters_item = path_filters + '[' + i + ']';
570
- const referencepath_filters_itemValidationError = validate$j(obj_filters_item, path_filters_item);
637
+ const referencepath_filters_itemValidationError = validate$l(obj_filters_item, path_filters_item);
571
638
  if (referencepath_filters_itemValidationError !== null) {
572
639
  let message = 'Object doesn\'t match Filter (at "' + path_filters_item + '")\n';
573
640
  message += referencepath_filters_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -598,6 +665,13 @@ function validate$c(obj, path = 'MetricDefinition') {
598
665
  message += referencepath_semanticDataModelValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
599
666
  return new TypeError(message);
600
667
  }
668
+ if (obj.semanticFilter !== undefined) {
669
+ const obj_semanticFilter = obj.semanticFilter;
670
+ const path_semanticFilter = path + '.semanticFilter';
671
+ if (obj_semanticFilter === undefined) {
672
+ return new TypeError('Expected "defined" but received "' + typeof obj_semanticFilter + '" (at "' + path_semanticFilter + '")');
673
+ }
674
+ }
601
675
  const obj_timeDimension = obj.timeDimension;
602
676
  const path_timeDimension = path + '.timeDimension';
603
677
  const referencepath_timeDimensionValidationError = validate$d(obj_timeDimension, path_timeDimension);
@@ -671,7 +745,7 @@ function validate$9(obj, path = 'InputMetric') {
671
745
  }
672
746
  const obj_extensionOptions = obj.extensionOptions;
673
747
  const path_extensionOptions = path + '.extensionOptions';
674
- const referencepath_extensionOptionsValidationError = validate$r(obj_extensionOptions, path_extensionOptions);
748
+ const referencepath_extensionOptionsValidationError = validate$t(obj_extensionOptions, path_extensionOptions);
675
749
  if (referencepath_extensionOptionsValidationError !== null) {
676
750
  let message = 'Object doesn\'t match ExtensionOptions (at "' + path_extensionOptions + '")\n';
677
751
  message += referencepath_extensionOptionsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -679,7 +753,7 @@ function validate$9(obj, path = 'InputMetric') {
679
753
  }
680
754
  const obj_insightsOptions = obj.insightsOptions;
681
755
  const path_insightsOptions = path + '.insightsOptions';
682
- const referencepath_insightsOptionsValidationError = validate$p(obj_insightsOptions, path_insightsOptions);
756
+ const referencepath_insightsOptionsValidationError = validate$r(obj_insightsOptions, path_insightsOptions);
683
757
  if (referencepath_insightsOptionsValidationError !== null) {
684
758
  let message = 'Object doesn\'t match InsightsOptions (at "' + path_insightsOptions + '")\n';
685
759
  message += referencepath_insightsOptionsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -720,7 +794,7 @@ function validate$8(obj, path = 'InsightBundleInput') {
720
794
  }
721
795
  const obj_metadata = obj.metadata;
722
796
  const path_metadata = path + '.metadata';
723
- const referencepath_metadataValidationError = validate$s(obj_metadata, path_metadata);
797
+ const referencepath_metadataValidationError = validate$u(obj_metadata, path_metadata);
724
798
  if (referencepath_metadataValidationError !== null) {
725
799
  let message = 'Object doesn\'t match MetricMetadata (at "' + path_metadata + '")\n';
726
800
  message += referencepath_metadataValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -1332,7 +1406,7 @@ function typeCheckConfig$2(untrustedConfig) {
1332
1406
  config.semanticDataModel = untrustedConfig_semanticDataModel;
1333
1407
  }
1334
1408
  const untrustedConfig_field = untrustedConfig.field;
1335
- const referenceFieldIdValidationError = validate$n(untrustedConfig_field);
1409
+ const referenceFieldIdValidationError = validate$p(untrustedConfig_field);
1336
1410
  if (referenceFieldIdValidationError === null) {
1337
1411
  config.field = untrustedConfig_field;
1338
1412
  }
@@ -1341,7 +1415,7 @@ function typeCheckConfig$2(untrustedConfig) {
1341
1415
  const untrustedConfig_filters_array = [];
1342
1416
  for (let i = 0, arrayLength = untrustedConfig_filters.length; i < arrayLength; i++) {
1343
1417
  const untrustedConfig_filters_item = untrustedConfig_filters[i];
1344
- const referenceFilterValidationError = validate$j(untrustedConfig_filters_item);
1418
+ const referenceFilterValidationError = validate$l(untrustedConfig_filters_item);
1345
1419
  if (referenceFilterValidationError === null) {
1346
1420
  untrustedConfig_filters_array.push(untrustedConfig_filters_item);
1347
1421
  }
@@ -0,0 +1,30 @@
1
+ import { SemanticFilter as SemanticFilter_SemanticFilter } from './SemanticFilter';
2
+ import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
3
+ export declare const VERSION = "920e5737090106db96fb34f40ade9b4d";
4
+ export declare function validate(obj: any, path?: string): TypeError | null;
5
+ export declare const RepresentationType: string;
6
+ export declare function normalize(input: FlattenFilter, existing: FlattenFilterNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): FlattenFilterNormalized;
7
+ export declare const select: () => $64$luvio_engine_FragmentSelection;
8
+ export declare function equals(existing: FlattenFilterNormalized, incoming: FlattenFilterNormalized): boolean;
9
+ export declare const ingest: $64$luvio_engine_ResourceIngest;
10
+ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: FlattenFilter, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
11
+ /**
12
+ *
13
+ *
14
+ * Keys:
15
+ * (none)
16
+ */
17
+ export interface FlattenFilterNormalized {
18
+ filterLogic?: string;
19
+ filters?: Array<SemanticFilter_SemanticFilter>;
20
+ }
21
+ /**
22
+ *
23
+ *
24
+ * Keys:
25
+ * (none)
26
+ */
27
+ export interface FlattenFilter {
28
+ filterLogic?: string;
29
+ filters?: Array<SemanticFilter_SemanticFilter>;
30
+ }
@@ -4,7 +4,7 @@ import { Measure as Measure_Measure } from './Measure';
4
4
  import { SemanticDataModel as SemanticDataModel_SemanticDataModel } from './SemanticDataModel';
5
5
  import { TimeDimension as TimeDimension_TimeDimension } from './TimeDimension';
6
6
  import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
7
- export declare const VERSION = "dd749bc6a7b56f6633c095a95ab14ad4";
7
+ export declare const VERSION = "e156cbf582a79a24d3adf89dc5042036";
8
8
  export declare function validate(obj: any, path?: string): TypeError | null;
9
9
  export declare const RepresentationType: string;
10
10
  export declare function normalize(input: MetricDefinition, existing: MetricDefinitionNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): MetricDefinitionNormalized;
@@ -24,6 +24,8 @@ export interface MetricDefinitionNormalized {
24
24
  measure: Measure_Measure;
25
25
  runningTotal?: boolean;
26
26
  semanticDataModel: SemanticDataModel_SemanticDataModel;
27
+ /** The 'filters' and 'semantic_filters' will be ANDed together */
28
+ semanticFilter?: unknown;
27
29
  timeDimension: TimeDimension_TimeDimension;
28
30
  }
29
31
  /**
@@ -38,5 +40,6 @@ export interface MetricDefinition {
38
40
  measure: Measure_Measure;
39
41
  runningTotal?: boolean;
40
42
  semanticDataModel: SemanticDataModel_SemanticDataModel;
43
+ semanticFilter?: unknown;
41
44
  timeDimension: TimeDimension_TimeDimension;
42
45
  }
@@ -1,7 +1,8 @@
1
1
  import { Filter as Filter_Filter } from './Filter';
2
2
  import { MeasurementPeriod as MeasurementPeriod_MeasurementPeriod } from './MeasurementPeriod';
3
+ import { FlattenFilter as FlattenFilter_FlattenFilter } from './FlattenFilter';
3
4
  import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
4
- export declare const VERSION = "7abf85f174d75383d4d75f422be00d3f";
5
+ export declare const VERSION = "ae8534424e3347a90f57b6f349cf1c9d";
5
6
  export declare function validate(obj: any, path?: string): TypeError | null;
6
7
  export declare const RepresentationType: string;
7
8
  export declare function normalize(input: MetricInstance, existing: MetricInstanceNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): MetricInstanceNormalized;
@@ -16,8 +17,10 @@ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableSto
16
17
  * (none)
17
18
  */
18
19
  export interface MetricInstanceNormalized {
20
+ /** The 'filters' and 'semantic_filters' will be ANDed together */
19
21
  filters?: Array<Filter_Filter>;
20
22
  measurementPeriod: MeasurementPeriod_MeasurementPeriod;
23
+ semanticFilter: FlattenFilter_FlattenFilter;
21
24
  }
22
25
  /**
23
26
  *
@@ -28,4 +31,5 @@ export interface MetricInstanceNormalized {
28
31
  export interface MetricInstance {
29
32
  filters?: Array<Filter_Filter>;
30
33
  measurementPeriod: MeasurementPeriod_MeasurementPeriod;
34
+ semanticFilter: FlattenFilter_FlattenFilter;
31
35
  }
@@ -0,0 +1,31 @@
1
+ import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
2
+ export declare const VERSION = "9e95a37f516d75b92b6a5242e60d737b";
3
+ export declare function validate(obj: any, path?: string): TypeError | null;
4
+ export declare const RepresentationType: string;
5
+ export declare function normalize(input: SemanticFilter, existing: SemanticFilterNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): SemanticFilterNormalized;
6
+ export declare const select: () => $64$luvio_engine_FragmentSelection;
7
+ export declare function equals(existing: SemanticFilterNormalized, incoming: SemanticFilterNormalized): boolean;
8
+ export declare const ingest: $64$luvio_engine_ResourceIngest;
9
+ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: SemanticFilter, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
10
+ /**
11
+ * Message representing Semantic Filter.
12
+ *
13
+ * Keys:
14
+ * (none)
15
+ */
16
+ export interface SemanticFilterNormalized {
17
+ fieldName: string;
18
+ operator: string;
19
+ value?: string;
20
+ }
21
+ /**
22
+ * Message representing Semantic Filter.
23
+ *
24
+ * Keys:
25
+ * (none)
26
+ */
27
+ export interface SemanticFilter {
28
+ fieldName: string;
29
+ operator: string;
30
+ value?: string;
31
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-sfap-analytics-insights",
3
- "version": "1.307.0",
3
+ "version": "1.308.0",
4
4
  "description": "APIs for generating insights about metrics",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "dist/es/es2018/sfap-analytics-insights.js",
@@ -40,10 +40,10 @@
40
40
  "test:unit": "jest"
41
41
  },
42
42
  "dependencies": {
43
- "@salesforce/lds-bindings": "^1.307.0"
43
+ "@salesforce/lds-bindings": "^1.308.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@salesforce/lds-compiler-plugins": "^1.307.0"
46
+ "@salesforce/lds-compiler-plugins": "^1.308.0"
47
47
  },
48
48
  "nx": {
49
49
  "targets": {
package/sfdc/index.js CHANGED
@@ -102,7 +102,7 @@ function createLink(ref) {
102
102
  };
103
103
  }
104
104
 
105
- function validate$s(obj, path = 'MetricMetadata') {
105
+ function validate$u(obj, path = 'MetricMetadata') {
106
106
  const v_error = (() => {
107
107
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
108
108
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -125,7 +125,7 @@ function validate$s(obj, path = 'MetricMetadata') {
125
125
  return v_error === undefined ? null : v_error;
126
126
  }
127
127
 
128
- function validate$r(obj, path = 'ExtensionOptions') {
128
+ function validate$t(obj, path = 'ExtensionOptions') {
129
129
  const v_error = (() => {
130
130
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
131
131
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -155,7 +155,7 @@ function validate$r(obj, path = 'ExtensionOptions') {
155
155
  return v_error === undefined ? null : v_error;
156
156
  }
157
157
 
158
- function validate$q(obj, path = 'InsightsOptions_InsightSetting') {
158
+ function validate$s(obj, path = 'InsightsOptions_InsightSetting') {
159
159
  const v_error = (() => {
160
160
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
161
161
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -178,7 +178,7 @@ function validate$q(obj, path = 'InsightsOptions_InsightSetting') {
178
178
  return v_error === undefined ? null : v_error;
179
179
  }
180
180
 
181
- function validate$p(obj, path = 'InsightsOptions') {
181
+ function validate$r(obj, path = 'InsightsOptions') {
182
182
  const v_error = (() => {
183
183
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
184
184
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -192,7 +192,7 @@ function validate$p(obj, path = 'InsightsOptions') {
192
192
  for (let i = 0; i < obj_settings.length; i++) {
193
193
  const obj_settings_item = obj_settings[i];
194
194
  const path_settings_item = path_settings + '[' + i + ']';
195
- const referencepath_settings_itemValidationError = validate$q(obj_settings_item, path_settings_item);
195
+ const referencepath_settings_itemValidationError = validate$s(obj_settings_item, path_settings_item);
196
196
  if (referencepath_settings_itemValidationError !== null) {
197
197
  let message = 'Object doesn\'t match InsightsOptions_InsightSetting (at "' + path_settings_item + '")\n';
198
198
  message += referencepath_settings_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -204,7 +204,7 @@ function validate$p(obj, path = 'InsightsOptions') {
204
204
  return v_error === undefined ? null : v_error;
205
205
  }
206
206
 
207
- function validate$o(obj, path = 'CategoricalFilterOptions') {
207
+ function validate$q(obj, path = 'CategoricalFilterOptions') {
208
208
  const v_error = (() => {
209
209
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
210
210
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -241,7 +241,7 @@ function validate$o(obj, path = 'CategoricalFilterOptions') {
241
241
  return v_error === undefined ? null : v_error;
242
242
  }
243
243
 
244
- function validate$n(obj, path = 'FieldId') {
244
+ function validate$p(obj, path = 'FieldId') {
245
245
  const v_error = (() => {
246
246
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
247
247
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -271,7 +271,7 @@ function validate$n(obj, path = 'FieldId') {
271
271
  return v_error === undefined ? null : v_error;
272
272
  }
273
273
 
274
- function validate$m(obj, path = 'RangeFilterOptions') {
274
+ function validate$o(obj, path = 'RangeFilterOptions') {
275
275
  const v_error = (() => {
276
276
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
277
277
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -315,7 +315,7 @@ function validate$m(obj, path = 'RangeFilterOptions') {
315
315
  return v_error === undefined ? null : v_error;
316
316
  }
317
317
 
318
- function validate$l(obj, path = 'RelativeDate') {
318
+ function validate$n(obj, path = 'RelativeDate') {
319
319
  const v_error = (() => {
320
320
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
321
321
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -345,7 +345,7 @@ function validate$l(obj, path = 'RelativeDate') {
345
345
  return v_error === undefined ? null : v_error;
346
346
  }
347
347
 
348
- function validate$k(obj, path = 'RelativeDateFilterOptions') {
348
+ function validate$m(obj, path = 'RelativeDateFilterOptions') {
349
349
  const v_error = (() => {
350
350
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
351
351
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -359,7 +359,7 @@ function validate$k(obj, path = 'RelativeDateFilterOptions') {
359
359
  }
360
360
  const obj_max = obj.max;
361
361
  const path_max = path + '.max';
362
- const referencepath_maxValidationError = validate$l(obj_max, path_max);
362
+ const referencepath_maxValidationError = validate$n(obj_max, path_max);
363
363
  if (referencepath_maxValidationError !== null) {
364
364
  let message = 'Object doesn\'t match RelativeDate (at "' + path_max + '")\n';
365
365
  message += referencepath_maxValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -367,7 +367,7 @@ function validate$k(obj, path = 'RelativeDateFilterOptions') {
367
367
  }
368
368
  const obj_min = obj.min;
369
369
  const path_min = path + '.min';
370
- const referencepath_minValidationError = validate$l(obj_min, path_min);
370
+ const referencepath_minValidationError = validate$n(obj_min, path_min);
371
371
  if (referencepath_minValidationError !== null) {
372
372
  let message = 'Object doesn\'t match RelativeDate (at "' + path_min + '")\n';
373
373
  message += referencepath_minValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -377,14 +377,14 @@ function validate$k(obj, path = 'RelativeDateFilterOptions') {
377
377
  return v_error === undefined ? null : v_error;
378
378
  }
379
379
 
380
- function validate$j(obj, path = 'Filter') {
380
+ function validate$l(obj, path = 'Filter') {
381
381
  const v_error = (() => {
382
382
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
383
383
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
384
384
  }
385
385
  const obj_categoricalFilterOptions = obj.categoricalFilterOptions;
386
386
  const path_categoricalFilterOptions = path + '.categoricalFilterOptions';
387
- const referencepath_categoricalFilterOptionsValidationError = validate$o(obj_categoricalFilterOptions, path_categoricalFilterOptions);
387
+ const referencepath_categoricalFilterOptionsValidationError = validate$q(obj_categoricalFilterOptions, path_categoricalFilterOptions);
388
388
  if (referencepath_categoricalFilterOptionsValidationError !== null) {
389
389
  let message = 'Object doesn\'t match CategoricalFilterOptions (at "' + path_categoricalFilterOptions + '")\n';
390
390
  message += referencepath_categoricalFilterOptionsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -392,7 +392,7 @@ function validate$j(obj, path = 'Filter') {
392
392
  }
393
393
  const obj_field = obj.field;
394
394
  const path_field = path + '.field';
395
- const referencepath_fieldValidationError = validate$n(obj_field, path_field);
395
+ const referencepath_fieldValidationError = validate$p(obj_field, path_field);
396
396
  if (referencepath_fieldValidationError !== null) {
397
397
  let message = 'Object doesn\'t match FieldId (at "' + path_field + '")\n';
398
398
  message += referencepath_fieldValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -400,7 +400,7 @@ function validate$j(obj, path = 'Filter') {
400
400
  }
401
401
  const obj_rangeFilterOptions = obj.rangeFilterOptions;
402
402
  const path_rangeFilterOptions = path + '.rangeFilterOptions';
403
- const referencepath_rangeFilterOptionsValidationError = validate$m(obj_rangeFilterOptions, path_rangeFilterOptions);
403
+ const referencepath_rangeFilterOptionsValidationError = validate$o(obj_rangeFilterOptions, path_rangeFilterOptions);
404
404
  if (referencepath_rangeFilterOptionsValidationError !== null) {
405
405
  let message = 'Object doesn\'t match RangeFilterOptions (at "' + path_rangeFilterOptions + '")\n';
406
406
  message += referencepath_rangeFilterOptionsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -408,7 +408,7 @@ function validate$j(obj, path = 'Filter') {
408
408
  }
409
409
  const obj_relativeDateFilterOptions = obj.relativeDateFilterOptions;
410
410
  const path_relativeDateFilterOptions = path + '.relativeDateFilterOptions';
411
- const referencepath_relativeDateFilterOptionsValidationError = validate$k(obj_relativeDateFilterOptions, path_relativeDateFilterOptions);
411
+ const referencepath_relativeDateFilterOptionsValidationError = validate$m(obj_relativeDateFilterOptions, path_relativeDateFilterOptions);
412
412
  if (referencepath_relativeDateFilterOptionsValidationError !== null) {
413
413
  let message = 'Object doesn\'t match RelativeDateFilterOptions (at "' + path_relativeDateFilterOptions + '")\n';
414
414
  message += referencepath_relativeDateFilterOptionsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -425,7 +425,7 @@ function validate$j(obj, path = 'Filter') {
425
425
  return v_error === undefined ? null : v_error;
426
426
  }
427
427
 
428
- function validate$i(obj, path = 'MeasurementPeriod') {
428
+ function validate$k(obj, path = 'MeasurementPeriod') {
429
429
  const v_error = (() => {
430
430
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
431
431
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -448,11 +448,44 @@ function validate$i(obj, path = 'MeasurementPeriod') {
448
448
  return v_error === undefined ? null : v_error;
449
449
  }
450
450
 
451
- function validate$h(obj, path = 'MetricInstance') {
451
+ function validate$j(obj, path = 'SemanticFilter') {
452
+ const v_error = (() => {
453
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
454
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
455
+ }
456
+ const obj_fieldName = obj.fieldName;
457
+ const path_fieldName = path + '.fieldName';
458
+ if (typeof obj_fieldName !== 'string') {
459
+ return new TypeError('Expected "string" but received "' + typeof obj_fieldName + '" (at "' + path_fieldName + '")');
460
+ }
461
+ const obj_operator = obj.operator;
462
+ const path_operator = path + '.operator';
463
+ if (typeof obj_operator !== 'string') {
464
+ return new TypeError('Expected "string" but received "' + typeof obj_operator + '" (at "' + path_operator + '")');
465
+ }
466
+ if (obj.value !== undefined) {
467
+ const obj_value = obj.value;
468
+ const path_value = path + '.value';
469
+ if (typeof obj_value !== 'string') {
470
+ return new TypeError('Expected "string" but received "' + typeof obj_value + '" (at "' + path_value + '")');
471
+ }
472
+ }
473
+ })();
474
+ return v_error === undefined ? null : v_error;
475
+ }
476
+
477
+ function validate$i(obj, path = 'FlattenFilter') {
452
478
  const v_error = (() => {
453
479
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
454
480
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
455
481
  }
482
+ if (obj.filterLogic !== undefined) {
483
+ const obj_filterLogic = obj.filterLogic;
484
+ const path_filterLogic = path + '.filterLogic';
485
+ if (typeof obj_filterLogic !== 'string') {
486
+ return new TypeError('Expected "string" but received "' + typeof obj_filterLogic + '" (at "' + path_filterLogic + '")');
487
+ }
488
+ }
456
489
  if (obj.filters !== undefined) {
457
490
  const obj_filters = obj.filters;
458
491
  const path_filters = path + '.filters';
@@ -463,6 +496,32 @@ function validate$h(obj, path = 'MetricInstance') {
463
496
  const obj_filters_item = obj_filters[i];
464
497
  const path_filters_item = path_filters + '[' + i + ']';
465
498
  const referencepath_filters_itemValidationError = validate$j(obj_filters_item, path_filters_item);
499
+ if (referencepath_filters_itemValidationError !== null) {
500
+ let message = 'Object doesn\'t match SemanticFilter (at "' + path_filters_item + '")\n';
501
+ message += referencepath_filters_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
502
+ return new TypeError(message);
503
+ }
504
+ }
505
+ }
506
+ })();
507
+ return v_error === undefined ? null : v_error;
508
+ }
509
+
510
+ function validate$h(obj, path = 'MetricInstance') {
511
+ const v_error = (() => {
512
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
513
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
514
+ }
515
+ if (obj.filters !== undefined) {
516
+ const obj_filters = obj.filters;
517
+ const path_filters = path + '.filters';
518
+ if (!ArrayIsArray(obj_filters)) {
519
+ return new TypeError('Expected "array" but received "' + typeof obj_filters + '" (at "' + path_filters + '")');
520
+ }
521
+ for (let i = 0; i < obj_filters.length; i++) {
522
+ const obj_filters_item = obj_filters[i];
523
+ const path_filters_item = path_filters + '[' + i + ']';
524
+ const referencepath_filters_itemValidationError = validate$l(obj_filters_item, path_filters_item);
466
525
  if (referencepath_filters_itemValidationError !== null) {
467
526
  let message = 'Object doesn\'t match Filter (at "' + path_filters_item + '")\n';
468
527
  message += referencepath_filters_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -472,12 +531,20 @@ function validate$h(obj, path = 'MetricInstance') {
472
531
  }
473
532
  const obj_measurementPeriod = obj.measurementPeriod;
474
533
  const path_measurementPeriod = path + '.measurementPeriod';
475
- const referencepath_measurementPeriodValidationError = validate$i(obj_measurementPeriod, path_measurementPeriod);
534
+ const referencepath_measurementPeriodValidationError = validate$k(obj_measurementPeriod, path_measurementPeriod);
476
535
  if (referencepath_measurementPeriodValidationError !== null) {
477
536
  let message = 'Object doesn\'t match MeasurementPeriod (at "' + path_measurementPeriod + '")\n';
478
537
  message += referencepath_measurementPeriodValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
479
538
  return new TypeError(message);
480
539
  }
540
+ const obj_semanticFilter = obj.semanticFilter;
541
+ const path_semanticFilter = path + '.semanticFilter';
542
+ const referencepath_semanticFilterValidationError = validate$i(obj_semanticFilter, path_semanticFilter);
543
+ if (referencepath_semanticFilterValidationError !== null) {
544
+ let message = 'Object doesn\'t match FlattenFilter (at "' + path_semanticFilter + '")\n';
545
+ message += referencepath_semanticFilterValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
546
+ return new TypeError(message);
547
+ }
481
548
  })();
482
549
  return v_error === undefined ? null : v_error;
483
550
  }
@@ -512,7 +579,7 @@ function validate$f(obj, path = 'Measure') {
512
579
  }
513
580
  const obj_field = obj.field;
514
581
  const path_field = path + '.field';
515
- const referencepath_fieldValidationError = validate$n(obj_field, path_field);
582
+ const referencepath_fieldValidationError = validate$p(obj_field, path_field);
516
583
  if (referencepath_fieldValidationError !== null) {
517
584
  let message = 'Object doesn\'t match FieldId (at "' + path_field + '")\n';
518
585
  message += referencepath_fieldValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -545,7 +612,7 @@ function validate$d(obj, path = 'TimeDimension') {
545
612
  }
546
613
  const obj_field = obj.field;
547
614
  const path_field = path + '.field';
548
- const referencepath_fieldValidationError = validate$n(obj_field, path_field);
615
+ const referencepath_fieldValidationError = validate$p(obj_field, path_field);
549
616
  if (referencepath_fieldValidationError !== null) {
550
617
  let message = 'Object doesn\'t match FieldId (at "' + path_field + '")\n';
551
618
  message += referencepath_fieldValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -577,7 +644,7 @@ function validate$c(obj, path = 'MetricDefinition') {
577
644
  for (let i = 0; i < obj_filters.length; i++) {
578
645
  const obj_filters_item = obj_filters[i];
579
646
  const path_filters_item = path_filters + '[' + i + ']';
580
- const referencepath_filters_itemValidationError = validate$j(obj_filters_item, path_filters_item);
647
+ const referencepath_filters_itemValidationError = validate$l(obj_filters_item, path_filters_item);
581
648
  if (referencepath_filters_itemValidationError !== null) {
582
649
  let message = 'Object doesn\'t match Filter (at "' + path_filters_item + '")\n';
583
650
  message += referencepath_filters_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -608,6 +675,13 @@ function validate$c(obj, path = 'MetricDefinition') {
608
675
  message += referencepath_semanticDataModelValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
609
676
  return new TypeError(message);
610
677
  }
678
+ if (obj.semanticFilter !== undefined) {
679
+ const obj_semanticFilter = obj.semanticFilter;
680
+ const path_semanticFilter = path + '.semanticFilter';
681
+ if (obj_semanticFilter === undefined) {
682
+ return new TypeError('Expected "defined" but received "' + typeof obj_semanticFilter + '" (at "' + path_semanticFilter + '")');
683
+ }
684
+ }
611
685
  const obj_timeDimension = obj.timeDimension;
612
686
  const path_timeDimension = path + '.timeDimension';
613
687
  const referencepath_timeDimensionValidationError = validate$d(obj_timeDimension, path_timeDimension);
@@ -681,7 +755,7 @@ function validate$9(obj, path = 'InputMetric') {
681
755
  }
682
756
  const obj_extensionOptions = obj.extensionOptions;
683
757
  const path_extensionOptions = path + '.extensionOptions';
684
- const referencepath_extensionOptionsValidationError = validate$r(obj_extensionOptions, path_extensionOptions);
758
+ const referencepath_extensionOptionsValidationError = validate$t(obj_extensionOptions, path_extensionOptions);
685
759
  if (referencepath_extensionOptionsValidationError !== null) {
686
760
  let message = 'Object doesn\'t match ExtensionOptions (at "' + path_extensionOptions + '")\n';
687
761
  message += referencepath_extensionOptionsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -689,7 +763,7 @@ function validate$9(obj, path = 'InputMetric') {
689
763
  }
690
764
  const obj_insightsOptions = obj.insightsOptions;
691
765
  const path_insightsOptions = path + '.insightsOptions';
692
- const referencepath_insightsOptionsValidationError = validate$p(obj_insightsOptions, path_insightsOptions);
766
+ const referencepath_insightsOptionsValidationError = validate$r(obj_insightsOptions, path_insightsOptions);
693
767
  if (referencepath_insightsOptionsValidationError !== null) {
694
768
  let message = 'Object doesn\'t match InsightsOptions (at "' + path_insightsOptions + '")\n';
695
769
  message += referencepath_insightsOptionsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -730,7 +804,7 @@ function validate$8(obj, path = 'InsightBundleInput') {
730
804
  }
731
805
  const obj_metadata = obj.metadata;
732
806
  const path_metadata = path + '.metadata';
733
- const referencepath_metadataValidationError = validate$s(obj_metadata, path_metadata);
807
+ const referencepath_metadataValidationError = validate$u(obj_metadata, path_metadata);
734
808
  if (referencepath_metadataValidationError !== null) {
735
809
  let message = 'Object doesn\'t match MetricMetadata (at "' + path_metadata + '")\n';
736
810
  message += referencepath_metadataValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -2028,7 +2102,7 @@ function typeCheckConfig(untrustedConfig) {
2028
2102
  config.semanticDataModel = untrustedConfig_semanticDataModel;
2029
2103
  }
2030
2104
  const untrustedConfig_field = untrustedConfig.field;
2031
- const referenceFieldIdValidationError = validate$n(untrustedConfig_field);
2105
+ const referenceFieldIdValidationError = validate$p(untrustedConfig_field);
2032
2106
  if (referenceFieldIdValidationError === null) {
2033
2107
  config.field = untrustedConfig_field;
2034
2108
  }
@@ -2037,7 +2111,7 @@ function typeCheckConfig(untrustedConfig) {
2037
2111
  const untrustedConfig_filters_array = [];
2038
2112
  for (let i = 0, arrayLength = untrustedConfig_filters.length; i < arrayLength; i++) {
2039
2113
  const untrustedConfig_filters_item = untrustedConfig_filters[i];
2040
- const referenceFilterValidationError = validate$j(untrustedConfig_filters_item);
2114
+ const referenceFilterValidationError = validate$l(untrustedConfig_filters_item);
2041
2115
  if (referenceFilterValidationError === null) {
2042
2116
  untrustedConfig_filters_array.push(untrustedConfig_filters_item);
2043
2117
  }
@@ -2127,4 +2201,4 @@ withDefaultLuvio((luvio) => {
2127
2201
  });
2128
2202
 
2129
2203
  export { createInsightsBatch, generateInsights, getInsightsBatch, getInsightsBatchNotifyChange, getInsightsBatch_imperative, getMetricFilterValues };
2130
- // version: 1.307.0-1e4b921353
2204
+ // version: 1.308.0-e148a73d6a
package/src/raml/api.raml CHANGED
@@ -146,6 +146,12 @@ types:
146
146
  runningTotal:
147
147
  type: boolean
148
148
  required: false
149
+ semanticFilter:
150
+ description: The 'filters' and 'semantic_filters' will be ANDed together
151
+ (amf-and):
152
+ - FlattenFilter
153
+ type: any
154
+ required: false
149
155
  MeasurementPeriod:
150
156
  type: object
151
157
  properties:
@@ -315,9 +321,11 @@ types:
315
321
  properties:
316
322
  measurementPeriod: MeasurementPeriod
317
323
  filters:
324
+ description: The 'filters' and 'semantic_filters' will be ANDed together
318
325
  type: array
319
326
  items: Filter
320
327
  required: false
328
+ semanticFilter: FlattenFilter
321
329
  BatchInput:
322
330
  type: object
323
331
  properties:
@@ -398,6 +406,16 @@ types:
398
406
  - InsightBundleOptions
399
407
  type: any
400
408
  required: false
409
+ FlattenFilter:
410
+ type: object
411
+ properties:
412
+ filterLogic:
413
+ type: string
414
+ required: false
415
+ filters:
416
+ type: array
417
+ items: SemanticFilter
418
+ required: false
401
419
  InsightFeedbackMetadata:
402
420
  type: object
403
421
  properties:
@@ -679,6 +697,78 @@ types:
679
697
  type: array
680
698
  items: Filter
681
699
  required: false
700
+ SemanticFilter:
701
+ description: Message representing Semantic Filter.
702
+ type: object
703
+ properties:
704
+ fieldName:
705
+ type: string
706
+ required: true
707
+ operator:
708
+ enum:
709
+ - SEMANTIC_FILTER_OPERATOR_TYPE_UNSPECIFIED
710
+ - Equals
711
+ - DoesNotEquals
712
+ - EqualsIgnoreCase
713
+ - NotEqualsToIgnoreCase
714
+ - Between
715
+ - LessThan
716
+ - LessThanOrEqualTo
717
+ - GreaterThan
718
+ - GreaterThanOrEqualTo
719
+ - IsEmpty
720
+ - IsNotEmpty
721
+ - Contains
722
+ - ContainsIgnoreCase
723
+ - NotContains
724
+ - NotContainsIgnoreCase
725
+ - StartsWith
726
+ - StartsWithIgnoreCase
727
+ - DoesNotStartWith
728
+ - DoesNotStartWithIgnoreCase
729
+ - EndsWith
730
+ - EndsWithIgnoreCase
731
+ - DoesNotEndWith
732
+ - DoesNotEndWithIgnoreCase
733
+ - IsNull
734
+ - IsNotNull
735
+ - LastNDays
736
+ - NextNDays
737
+ - PreviousWeek
738
+ - CurrentWeek
739
+ - NextWeek
740
+ - PreviousMonth
741
+ - CurrentMonth
742
+ - NextMonth
743
+ - PreviousQuarter
744
+ - CurrentQuarter
745
+ - NextQuarter
746
+ - PreviousYear
747
+ - CurrentYear
748
+ - NextYear
749
+ - PreviousFiscalQuarter
750
+ - CurrentFiscalQuarter
751
+ - NextFiscalQuarter
752
+ - PreviousFiscalYear
753
+ - CurrentFiscalYear
754
+ - NextFiscalYear
755
+ - PreviousMonthToDate
756
+ - CurrentMonthToDate
757
+ - PreviousQuarterToDate
758
+ - CurrentQuarterToDate
759
+ - PreviousYearToDate
760
+ - CurrentYearToDate
761
+ - PreviousFiscalQuarterToDate
762
+ - CurrentFiscalQuarterToDate
763
+ - PreviousFiscalYearToDate
764
+ - CurrentFiscalYearToDate
765
+ - Values
766
+ type: string
767
+ (amf-format): enum
768
+ required: true
769
+ value:
770
+ type: string
771
+ required: false
682
772
  Summary:
683
773
  type: object
684
774
  properties: