@salesforce/lds-adapters-sfap-analytics-insights 1.314.0 → 1.315.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.
- package/dist/es/es2018/sfap-analytics-insights.js +1276 -139
- package/dist/es/es2018/types/src/generated/adapters/createInsightsBatch.d.ts +2 -1
- package/dist/es/es2018/types/src/generated/adapters/generateInsights.d.ts +4 -2
- package/dist/es/es2018/types/src/generated/adapters/getMetricFilterValues.d.ts +2 -1
- package/dist/es/es2018/types/src/generated/resources/postAnalyticsInsightsV1Batches.d.ts +2 -1
- package/dist/es/es2018/types/src/generated/resources/postAnalyticsInsightsV1FilterValues.d.ts +2 -1
- package/dist/es/es2018/types/src/generated/resources/postAnalyticsInsightsV1GenerateBundle.d.ts +4 -2
- package/dist/es/es2018/types/src/generated/types/BatchOptions.d.ts +7 -5
- package/dist/es/es2018/types/src/generated/types/GenerateInsightBatchRequest.d.ts +4 -3
- package/dist/es/es2018/types/src/generated/types/GenerateInsightBatchResponse.d.ts +4 -3
- package/dist/es/es2018/types/src/generated/types/GenerateInsightBundleRequest.d.ts +7 -7
- package/dist/es/es2018/types/src/generated/types/GenerateInsightBundleResponse.d.ts +4 -3
- package/dist/es/es2018/types/src/generated/types/GetFilterValuesRequest.d.ts +4 -3
- package/dist/es/es2018/types/src/generated/types/GetInsightBatchResponse.d.ts +4 -3
- package/dist/es/es2018/types/src/generated/types/Insight.d.ts +5 -8
- package/dist/es/es2018/types/src/generated/types/MeasurementPeriod.d.ts +7 -9
- package/dist/es/es2018/types/src/generated/types/MetricDefinition.d.ts +4 -4
- package/dist/es/es2018/types/src/generated/types/Overview.d.ts +3 -6
- package/dist/es/es2018/types/src/generated/types/Summary.d.ts +9 -9
- package/package.json +3 -3
- package/sfdc/index.js +1416 -279
- package/src/raml/api.raml +16 -51
package/sfdc/index.js
CHANGED
|
@@ -102,7 +102,7 @@ function createLink(ref) {
|
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
function validate$
|
|
105
|
+
function validate$H(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$u(obj, path = 'MetricMetadata') {
|
|
|
125
125
|
return v_error === undefined ? null : v_error;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
function validate$
|
|
128
|
+
function validate$G(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$t(obj, path = 'ExtensionOptions') {
|
|
|
155
155
|
return v_error === undefined ? null : v_error;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
function validate$
|
|
158
|
+
function validate$F(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$s(obj, path = 'InsightsOptions_InsightSetting') {
|
|
|
178
178
|
return v_error === undefined ? null : v_error;
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
function validate$
|
|
181
|
+
function validate$E(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$r(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$
|
|
195
|
+
const referencepath_settings_itemValidationError = validate$F(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$r(obj, path = 'InsightsOptions') {
|
|
|
204
204
|
return v_error === undefined ? null : v_error;
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
-
function validate$
|
|
207
|
+
function validate$D(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$q(obj, path = 'CategoricalFilterOptions') {
|
|
|
241
241
|
return v_error === undefined ? null : v_error;
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
-
function validate$
|
|
244
|
+
function validate$C(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$p(obj, path = 'FieldId') {
|
|
|
271
271
|
return v_error === undefined ? null : v_error;
|
|
272
272
|
}
|
|
273
273
|
|
|
274
|
-
function validate$
|
|
274
|
+
function validate$B(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$o(obj, path = 'RangeFilterOptions') {
|
|
|
315
315
|
return v_error === undefined ? null : v_error;
|
|
316
316
|
}
|
|
317
317
|
|
|
318
|
-
function validate$
|
|
318
|
+
function validate$A(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$n(obj, path = 'RelativeDate') {
|
|
|
345
345
|
return v_error === undefined ? null : v_error;
|
|
346
346
|
}
|
|
347
347
|
|
|
348
|
-
function validate$
|
|
348
|
+
function validate$z(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$m(obj, path = 'RelativeDateFilterOptions') {
|
|
|
359
359
|
}
|
|
360
360
|
const obj_max = obj.max;
|
|
361
361
|
const path_max = path + '.max';
|
|
362
|
-
const referencepath_maxValidationError = validate$
|
|
362
|
+
const referencepath_maxValidationError = validate$A(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$m(obj, path = 'RelativeDateFilterOptions') {
|
|
|
367
367
|
}
|
|
368
368
|
const obj_min = obj.min;
|
|
369
369
|
const path_min = path + '.min';
|
|
370
|
-
const referencepath_minValidationError = validate$
|
|
370
|
+
const referencepath_minValidationError = validate$A(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$m(obj, path = 'RelativeDateFilterOptions') {
|
|
|
377
377
|
return v_error === undefined ? null : v_error;
|
|
378
378
|
}
|
|
379
379
|
|
|
380
|
-
function validate$
|
|
380
|
+
function validate$y(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$
|
|
387
|
+
const referencepath_categoricalFilterOptionsValidationError = validate$D(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$l(obj, path = 'Filter') {
|
|
|
392
392
|
}
|
|
393
393
|
const obj_field = obj.field;
|
|
394
394
|
const path_field = path + '.field';
|
|
395
|
-
const referencepath_fieldValidationError = validate$
|
|
395
|
+
const referencepath_fieldValidationError = validate$C(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$l(obj, path = 'Filter') {
|
|
|
400
400
|
}
|
|
401
401
|
const obj_rangeFilterOptions = obj.rangeFilterOptions;
|
|
402
402
|
const path_rangeFilterOptions = path + '.rangeFilterOptions';
|
|
403
|
-
const referencepath_rangeFilterOptionsValidationError = validate$
|
|
403
|
+
const referencepath_rangeFilterOptionsValidationError = validate$B(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$l(obj, path = 'Filter') {
|
|
|
408
408
|
}
|
|
409
409
|
const obj_relativeDateFilterOptions = obj.relativeDateFilterOptions;
|
|
410
410
|
const path_relativeDateFilterOptions = path + '.relativeDateFilterOptions';
|
|
411
|
-
const referencepath_relativeDateFilterOptionsValidationError = validate$
|
|
411
|
+
const referencepath_relativeDateFilterOptionsValidationError = validate$z(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,30 @@ function validate$l(obj, path = 'Filter') {
|
|
|
425
425
|
return v_error === undefined ? null : v_error;
|
|
426
426
|
}
|
|
427
427
|
|
|
428
|
-
function validate$
|
|
428
|
+
function validate$x(obj, path = 'RelativePeriod') {
|
|
429
|
+
const v_error = (() => {
|
|
430
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
431
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
432
|
+
}
|
|
433
|
+
if (obj.granularity !== undefined) {
|
|
434
|
+
const obj_granularity = obj.granularity;
|
|
435
|
+
const path_granularity = path + '.granularity';
|
|
436
|
+
if (typeof obj_granularity !== 'string') {
|
|
437
|
+
return new TypeError('Expected "string" but received "' + typeof obj_granularity + '" (at "' + path_granularity + '")');
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
if (obj.range !== undefined) {
|
|
441
|
+
const obj_range = obj.range;
|
|
442
|
+
const path_range = path + '.range';
|
|
443
|
+
if (typeof obj_range !== 'string') {
|
|
444
|
+
return new TypeError('Expected "string" but received "' + typeof obj_range + '" (at "' + path_range + '")');
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
})();
|
|
448
|
+
return v_error === undefined ? null : v_error;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
function validate$w(obj, path = 'MeasurementPeriod') {
|
|
429
452
|
const v_error = (() => {
|
|
430
453
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
431
454
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -433,22 +456,28 @@ function validate$k(obj, path = 'MeasurementPeriod') {
|
|
|
433
456
|
if (obj.filter !== undefined) {
|
|
434
457
|
const obj_filter = obj.filter;
|
|
435
458
|
const path_filter = path + '.filter';
|
|
436
|
-
|
|
437
|
-
|
|
459
|
+
const referencepath_filterValidationError = validate$y(obj_filter, path_filter);
|
|
460
|
+
if (referencepath_filterValidationError !== null) {
|
|
461
|
+
let message = 'Object doesn\'t match Filter (at "' + path_filter + '")\n';
|
|
462
|
+
message += referencepath_filterValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
463
|
+
return new TypeError(message);
|
|
438
464
|
}
|
|
439
465
|
}
|
|
440
466
|
if (obj.relativePeriod !== undefined) {
|
|
441
467
|
const obj_relativePeriod = obj.relativePeriod;
|
|
442
468
|
const path_relativePeriod = path + '.relativePeriod';
|
|
443
|
-
|
|
444
|
-
|
|
469
|
+
const referencepath_relativePeriodValidationError = validate$x(obj_relativePeriod, path_relativePeriod);
|
|
470
|
+
if (referencepath_relativePeriodValidationError !== null) {
|
|
471
|
+
let message = 'Object doesn\'t match RelativePeriod (at "' + path_relativePeriod + '")\n';
|
|
472
|
+
message += referencepath_relativePeriodValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
473
|
+
return new TypeError(message);
|
|
445
474
|
}
|
|
446
475
|
}
|
|
447
476
|
})();
|
|
448
477
|
return v_error === undefined ? null : v_error;
|
|
449
478
|
}
|
|
450
479
|
|
|
451
|
-
function validate$
|
|
480
|
+
function validate$v(obj, path = 'SemanticFilter') {
|
|
452
481
|
const v_error = (() => {
|
|
453
482
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
454
483
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -474,7 +503,7 @@ function validate$j(obj, path = 'SemanticFilter') {
|
|
|
474
503
|
return v_error === undefined ? null : v_error;
|
|
475
504
|
}
|
|
476
505
|
|
|
477
|
-
function validate$
|
|
506
|
+
function validate$u(obj, path = 'FlattenFilter') {
|
|
478
507
|
const v_error = (() => {
|
|
479
508
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
480
509
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -495,7 +524,7 @@ function validate$i(obj, path = 'FlattenFilter') {
|
|
|
495
524
|
for (let i = 0; i < obj_filters.length; i++) {
|
|
496
525
|
const obj_filters_item = obj_filters[i];
|
|
497
526
|
const path_filters_item = path_filters + '[' + i + ']';
|
|
498
|
-
const referencepath_filters_itemValidationError = validate$
|
|
527
|
+
const referencepath_filters_itemValidationError = validate$v(obj_filters_item, path_filters_item);
|
|
499
528
|
if (referencepath_filters_itemValidationError !== null) {
|
|
500
529
|
let message = 'Object doesn\'t match SemanticFilter (at "' + path_filters_item + '")\n';
|
|
501
530
|
message += referencepath_filters_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -507,7 +536,7 @@ function validate$i(obj, path = 'FlattenFilter') {
|
|
|
507
536
|
return v_error === undefined ? null : v_error;
|
|
508
537
|
}
|
|
509
538
|
|
|
510
|
-
function validate$
|
|
539
|
+
function validate$t(obj, path = 'MetricInstance') {
|
|
511
540
|
const v_error = (() => {
|
|
512
541
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
513
542
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -521,7 +550,7 @@ function validate$h(obj, path = 'MetricInstance') {
|
|
|
521
550
|
for (let i = 0; i < obj_filters.length; i++) {
|
|
522
551
|
const obj_filters_item = obj_filters[i];
|
|
523
552
|
const path_filters_item = path_filters + '[' + i + ']';
|
|
524
|
-
const referencepath_filters_itemValidationError = validate$
|
|
553
|
+
const referencepath_filters_itemValidationError = validate$y(obj_filters_item, path_filters_item);
|
|
525
554
|
if (referencepath_filters_itemValidationError !== null) {
|
|
526
555
|
let message = 'Object doesn\'t match Filter (at "' + path_filters_item + '")\n';
|
|
527
556
|
message += referencepath_filters_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -531,7 +560,7 @@ function validate$h(obj, path = 'MetricInstance') {
|
|
|
531
560
|
}
|
|
532
561
|
const obj_measurementPeriod = obj.measurementPeriod;
|
|
533
562
|
const path_measurementPeriod = path + '.measurementPeriod';
|
|
534
|
-
const referencepath_measurementPeriodValidationError = validate$
|
|
563
|
+
const referencepath_measurementPeriodValidationError = validate$w(obj_measurementPeriod, path_measurementPeriod);
|
|
535
564
|
if (referencepath_measurementPeriodValidationError !== null) {
|
|
536
565
|
let message = 'Object doesn\'t match MeasurementPeriod (at "' + path_measurementPeriod + '")\n';
|
|
537
566
|
message += referencepath_measurementPeriodValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -539,7 +568,7 @@ function validate$h(obj, path = 'MetricInstance') {
|
|
|
539
568
|
}
|
|
540
569
|
const obj_semanticFilter = obj.semanticFilter;
|
|
541
570
|
const path_semanticFilter = path + '.semanticFilter';
|
|
542
|
-
const referencepath_semanticFilterValidationError = validate$
|
|
571
|
+
const referencepath_semanticFilterValidationError = validate$u(obj_semanticFilter, path_semanticFilter);
|
|
543
572
|
if (referencepath_semanticFilterValidationError !== null) {
|
|
544
573
|
let message = 'Object doesn\'t match FlattenFilter (at "' + path_semanticFilter + '")\n';
|
|
545
574
|
message += referencepath_semanticFilterValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -549,7 +578,7 @@ function validate$h(obj, path = 'MetricInstance') {
|
|
|
549
578
|
return v_error === undefined ? null : v_error;
|
|
550
579
|
}
|
|
551
580
|
|
|
552
|
-
function validate$
|
|
581
|
+
function validate$s(obj, path = 'CompareConfig') {
|
|
553
582
|
const v_error = (() => {
|
|
554
583
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
555
584
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -565,7 +594,7 @@ function validate$g(obj, path = 'CompareConfig') {
|
|
|
565
594
|
return v_error === undefined ? null : v_error;
|
|
566
595
|
}
|
|
567
596
|
|
|
568
|
-
function validate$
|
|
597
|
+
function validate$r(obj, path = 'Measure') {
|
|
569
598
|
const v_error = (() => {
|
|
570
599
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
571
600
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -579,7 +608,7 @@ function validate$f(obj, path = 'Measure') {
|
|
|
579
608
|
}
|
|
580
609
|
const obj_field = obj.field;
|
|
581
610
|
const path_field = path + '.field';
|
|
582
|
-
const referencepath_fieldValidationError = validate$
|
|
611
|
+
const referencepath_fieldValidationError = validate$C(obj_field, path_field);
|
|
583
612
|
if (referencepath_fieldValidationError !== null) {
|
|
584
613
|
let message = 'Object doesn\'t match FieldId (at "' + path_field + '")\n';
|
|
585
614
|
message += referencepath_fieldValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -589,7 +618,7 @@ function validate$f(obj, path = 'Measure') {
|
|
|
589
618
|
return v_error === undefined ? null : v_error;
|
|
590
619
|
}
|
|
591
620
|
|
|
592
|
-
function validate$
|
|
621
|
+
function validate$q(obj, path = 'SemanticDataModel') {
|
|
593
622
|
const v_error = (() => {
|
|
594
623
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
595
624
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -605,14 +634,14 @@ function validate$e(obj, path = 'SemanticDataModel') {
|
|
|
605
634
|
return v_error === undefined ? null : v_error;
|
|
606
635
|
}
|
|
607
636
|
|
|
608
|
-
function validate$
|
|
637
|
+
function validate$p(obj, path = 'TimeDimension') {
|
|
609
638
|
const v_error = (() => {
|
|
610
639
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
611
640
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
612
641
|
}
|
|
613
642
|
const obj_field = obj.field;
|
|
614
643
|
const path_field = path + '.field';
|
|
615
|
-
const referencepath_fieldValidationError = validate$
|
|
644
|
+
const referencepath_fieldValidationError = validate$C(obj_field, path_field);
|
|
616
645
|
if (referencepath_fieldValidationError !== null) {
|
|
617
646
|
let message = 'Object doesn\'t match FieldId (at "' + path_field + '")\n';
|
|
618
647
|
message += referencepath_fieldValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -622,14 +651,14 @@ function validate$d(obj, path = 'TimeDimension') {
|
|
|
622
651
|
return v_error === undefined ? null : v_error;
|
|
623
652
|
}
|
|
624
653
|
|
|
625
|
-
function validate$
|
|
654
|
+
function validate$o(obj, path = 'MetricDefinition') {
|
|
626
655
|
const v_error = (() => {
|
|
627
656
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
628
657
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
629
658
|
}
|
|
630
659
|
const obj_comparison = obj.comparison;
|
|
631
660
|
const path_comparison = path + '.comparison';
|
|
632
|
-
const referencepath_comparisonValidationError = validate$
|
|
661
|
+
const referencepath_comparisonValidationError = validate$s(obj_comparison, path_comparison);
|
|
633
662
|
if (referencepath_comparisonValidationError !== null) {
|
|
634
663
|
let message = 'Object doesn\'t match CompareConfig (at "' + path_comparison + '")\n';
|
|
635
664
|
message += referencepath_comparisonValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -644,7 +673,7 @@ function validate$c(obj, path = 'MetricDefinition') {
|
|
|
644
673
|
for (let i = 0; i < obj_filters.length; i++) {
|
|
645
674
|
const obj_filters_item = obj_filters[i];
|
|
646
675
|
const path_filters_item = path_filters + '[' + i + ']';
|
|
647
|
-
const referencepath_filters_itemValidationError = validate$
|
|
676
|
+
const referencepath_filters_itemValidationError = validate$y(obj_filters_item, path_filters_item);
|
|
648
677
|
if (referencepath_filters_itemValidationError !== null) {
|
|
649
678
|
let message = 'Object doesn\'t match Filter (at "' + path_filters_item + '")\n';
|
|
650
679
|
message += referencepath_filters_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -654,7 +683,7 @@ function validate$c(obj, path = 'MetricDefinition') {
|
|
|
654
683
|
}
|
|
655
684
|
const obj_measure = obj.measure;
|
|
656
685
|
const path_measure = path + '.measure';
|
|
657
|
-
const referencepath_measureValidationError = validate$
|
|
686
|
+
const referencepath_measureValidationError = validate$r(obj_measure, path_measure);
|
|
658
687
|
if (referencepath_measureValidationError !== null) {
|
|
659
688
|
let message = 'Object doesn\'t match Measure (at "' + path_measure + '")\n';
|
|
660
689
|
message += referencepath_measureValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -669,7 +698,7 @@ function validate$c(obj, path = 'MetricDefinition') {
|
|
|
669
698
|
}
|
|
670
699
|
const obj_semanticDataModel = obj.semanticDataModel;
|
|
671
700
|
const path_semanticDataModel = path + '.semanticDataModel';
|
|
672
|
-
const referencepath_semanticDataModelValidationError = validate$
|
|
701
|
+
const referencepath_semanticDataModelValidationError = validate$q(obj_semanticDataModel, path_semanticDataModel);
|
|
673
702
|
if (referencepath_semanticDataModelValidationError !== null) {
|
|
674
703
|
let message = 'Object doesn\'t match SemanticDataModel (at "' + path_semanticDataModel + '")\n';
|
|
675
704
|
message += referencepath_semanticDataModelValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -678,13 +707,16 @@ function validate$c(obj, path = 'MetricDefinition') {
|
|
|
678
707
|
if (obj.semanticFilter !== undefined) {
|
|
679
708
|
const obj_semanticFilter = obj.semanticFilter;
|
|
680
709
|
const path_semanticFilter = path + '.semanticFilter';
|
|
681
|
-
|
|
682
|
-
|
|
710
|
+
const referencepath_semanticFilterValidationError = validate$u(obj_semanticFilter, path_semanticFilter);
|
|
711
|
+
if (referencepath_semanticFilterValidationError !== null) {
|
|
712
|
+
let message = 'Object doesn\'t match FlattenFilter (at "' + path_semanticFilter + '")\n';
|
|
713
|
+
message += referencepath_semanticFilterValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
714
|
+
return new TypeError(message);
|
|
683
715
|
}
|
|
684
716
|
}
|
|
685
717
|
const obj_timeDimension = obj.timeDimension;
|
|
686
718
|
const path_timeDimension = path + '.timeDimension';
|
|
687
|
-
const referencepath_timeDimensionValidationError = validate$
|
|
719
|
+
const referencepath_timeDimensionValidationError = validate$p(obj_timeDimension, path_timeDimension);
|
|
688
720
|
if (referencepath_timeDimensionValidationError !== null) {
|
|
689
721
|
let message = 'Object doesn\'t match TimeDimension (at "' + path_timeDimension + '")\n';
|
|
690
722
|
message += referencepath_timeDimensionValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -694,7 +726,7 @@ function validate$c(obj, path = 'MetricDefinition') {
|
|
|
694
726
|
return v_error === undefined ? null : v_error;
|
|
695
727
|
}
|
|
696
728
|
|
|
697
|
-
function validate$
|
|
729
|
+
function validate$n(obj, path = 'RepresentationOptions_NumberUnits') {
|
|
698
730
|
const v_error = (() => {
|
|
699
731
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
700
732
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -717,14 +749,14 @@ function validate$b(obj, path = 'RepresentationOptions_NumberUnits') {
|
|
|
717
749
|
return v_error === undefined ? null : v_error;
|
|
718
750
|
}
|
|
719
751
|
|
|
720
|
-
function validate$
|
|
752
|
+
function validate$m(obj, path = 'RepresentationOptions') {
|
|
721
753
|
const v_error = (() => {
|
|
722
754
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
723
755
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
724
756
|
}
|
|
725
757
|
const obj_numberUnits = obj.numberUnits;
|
|
726
758
|
const path_numberUnits = path + '.numberUnits';
|
|
727
|
-
const referencepath_numberUnitsValidationError = validate$
|
|
759
|
+
const referencepath_numberUnitsValidationError = validate$n(obj_numberUnits, path_numberUnits);
|
|
728
760
|
if (referencepath_numberUnitsValidationError !== null) {
|
|
729
761
|
let message = 'Object doesn\'t match RepresentationOptions_NumberUnits (at "' + path_numberUnits + '")\n';
|
|
730
762
|
message += referencepath_numberUnitsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -748,14 +780,14 @@ function validate$a(obj, path = 'RepresentationOptions') {
|
|
|
748
780
|
return v_error === undefined ? null : v_error;
|
|
749
781
|
}
|
|
750
782
|
|
|
751
|
-
function validate$
|
|
783
|
+
function validate$l(obj, path = 'InputMetric') {
|
|
752
784
|
const v_error = (() => {
|
|
753
785
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
754
786
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
755
787
|
}
|
|
756
788
|
const obj_extensionOptions = obj.extensionOptions;
|
|
757
789
|
const path_extensionOptions = path + '.extensionOptions';
|
|
758
|
-
const referencepath_extensionOptionsValidationError = validate$
|
|
790
|
+
const referencepath_extensionOptionsValidationError = validate$G(obj_extensionOptions, path_extensionOptions);
|
|
759
791
|
if (referencepath_extensionOptionsValidationError !== null) {
|
|
760
792
|
let message = 'Object doesn\'t match ExtensionOptions (at "' + path_extensionOptions + '")\n';
|
|
761
793
|
message += referencepath_extensionOptionsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -763,7 +795,7 @@ function validate$9(obj, path = 'InputMetric') {
|
|
|
763
795
|
}
|
|
764
796
|
const obj_insightsOptions = obj.insightsOptions;
|
|
765
797
|
const path_insightsOptions = path + '.insightsOptions';
|
|
766
|
-
const referencepath_insightsOptionsValidationError = validate$
|
|
798
|
+
const referencepath_insightsOptionsValidationError = validate$E(obj_insightsOptions, path_insightsOptions);
|
|
767
799
|
if (referencepath_insightsOptionsValidationError !== null) {
|
|
768
800
|
let message = 'Object doesn\'t match InsightsOptions (at "' + path_insightsOptions + '")\n';
|
|
769
801
|
message += referencepath_insightsOptionsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -771,7 +803,7 @@ function validate$9(obj, path = 'InputMetric') {
|
|
|
771
803
|
}
|
|
772
804
|
const obj_instance = obj.instance;
|
|
773
805
|
const path_instance = path + '.instance';
|
|
774
|
-
const referencepath_instanceValidationError = validate$
|
|
806
|
+
const referencepath_instanceValidationError = validate$t(obj_instance, path_instance);
|
|
775
807
|
if (referencepath_instanceValidationError !== null) {
|
|
776
808
|
let message = 'Object doesn\'t match MetricInstance (at "' + path_instance + '")\n';
|
|
777
809
|
message += referencepath_instanceValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -779,7 +811,7 @@ function validate$9(obj, path = 'InputMetric') {
|
|
|
779
811
|
}
|
|
780
812
|
const obj_metric = obj.metric;
|
|
781
813
|
const path_metric = path + '.metric';
|
|
782
|
-
const referencepath_metricValidationError = validate$
|
|
814
|
+
const referencepath_metricValidationError = validate$o(obj_metric, path_metric);
|
|
783
815
|
if (referencepath_metricValidationError !== null) {
|
|
784
816
|
let message = 'Object doesn\'t match MetricDefinition (at "' + path_metric + '")\n';
|
|
785
817
|
message += referencepath_metricValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -787,7 +819,7 @@ function validate$9(obj, path = 'InputMetric') {
|
|
|
787
819
|
}
|
|
788
820
|
const obj_representationOptions = obj.representationOptions;
|
|
789
821
|
const path_representationOptions = path + '.representationOptions';
|
|
790
|
-
const referencepath_representationOptionsValidationError = validate$
|
|
822
|
+
const referencepath_representationOptionsValidationError = validate$m(obj_representationOptions, path_representationOptions);
|
|
791
823
|
if (referencepath_representationOptionsValidationError !== null) {
|
|
792
824
|
let message = 'Object doesn\'t match RepresentationOptions (at "' + path_representationOptions + '")\n';
|
|
793
825
|
message += referencepath_representationOptionsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -797,14 +829,14 @@ function validate$9(obj, path = 'InputMetric') {
|
|
|
797
829
|
return v_error === undefined ? null : v_error;
|
|
798
830
|
}
|
|
799
831
|
|
|
800
|
-
function validate$
|
|
832
|
+
function validate$k(obj, path = 'InsightBundleInput') {
|
|
801
833
|
const v_error = (() => {
|
|
802
834
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
803
835
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
804
836
|
}
|
|
805
837
|
const obj_metadata = obj.metadata;
|
|
806
838
|
const path_metadata = path + '.metadata';
|
|
807
|
-
const referencepath_metadataValidationError = validate$
|
|
839
|
+
const referencepath_metadataValidationError = validate$H(obj_metadata, path_metadata);
|
|
808
840
|
if (referencepath_metadataValidationError !== null) {
|
|
809
841
|
let message = 'Object doesn\'t match MetricMetadata (at "' + path_metadata + '")\n';
|
|
810
842
|
message += referencepath_metadataValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -812,7 +844,7 @@ function validate$8(obj, path = 'InsightBundleInput') {
|
|
|
812
844
|
}
|
|
813
845
|
const obj_metric = obj.metric;
|
|
814
846
|
const path_metric = path + '.metric';
|
|
815
|
-
const referencepath_metricValidationError = validate$
|
|
847
|
+
const referencepath_metricValidationError = validate$l(obj_metric, path_metric);
|
|
816
848
|
if (referencepath_metricValidationError !== null) {
|
|
817
849
|
let message = 'Object doesn\'t match InputMetric (at "' + path_metric + '")\n';
|
|
818
850
|
message += referencepath_metricValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -822,7 +854,7 @@ function validate$8(obj, path = 'InsightBundleInput') {
|
|
|
822
854
|
return v_error === undefined ? null : v_error;
|
|
823
855
|
}
|
|
824
856
|
|
|
825
|
-
function validate$
|
|
857
|
+
function validate$j(obj, path = 'MetricInstanceInput') {
|
|
826
858
|
const v_error = (() => {
|
|
827
859
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
828
860
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -841,7 +873,7 @@ function validate$7(obj, path = 'MetricInstanceInput') {
|
|
|
841
873
|
return v_error === undefined ? null : v_error;
|
|
842
874
|
}
|
|
843
875
|
|
|
844
|
-
function validate$
|
|
876
|
+
function validate$i(obj, path = 'BatchInput') {
|
|
845
877
|
const v_error = (() => {
|
|
846
878
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
847
879
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -849,7 +881,7 @@ function validate$6(obj, path = 'BatchInput') {
|
|
|
849
881
|
if (obj.bundleInput !== undefined) {
|
|
850
882
|
const obj_bundleInput = obj.bundleInput;
|
|
851
883
|
const path_bundleInput = path + '.bundleInput';
|
|
852
|
-
const referencepath_bundleInputValidationError = validate$
|
|
884
|
+
const referencepath_bundleInputValidationError = validate$k(obj_bundleInput, path_bundleInput);
|
|
853
885
|
if (referencepath_bundleInputValidationError !== null) {
|
|
854
886
|
let message = 'Object doesn\'t match InsightBundleInput (at "' + path_bundleInput + '")\n';
|
|
855
887
|
message += referencepath_bundleInputValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -859,7 +891,7 @@ function validate$6(obj, path = 'BatchInput') {
|
|
|
859
891
|
if (obj.metricInstanceInput !== undefined) {
|
|
860
892
|
const obj_metricInstanceInput = obj.metricInstanceInput;
|
|
861
893
|
const path_metricInstanceInput = path + '.metricInstanceInput';
|
|
862
|
-
const referencepath_metricInstanceInputValidationError = validate$
|
|
894
|
+
const referencepath_metricInstanceInputValidationError = validate$j(obj_metricInstanceInput, path_metricInstanceInput);
|
|
863
895
|
if (referencepath_metricInstanceInputValidationError !== null) {
|
|
864
896
|
let message = 'Object doesn\'t match MetricInstanceInput (at "' + path_metricInstanceInput + '")\n';
|
|
865
897
|
message += referencepath_metricInstanceInputValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -870,8 +902,311 @@ function validate$6(obj, path = 'BatchInput') {
|
|
|
870
902
|
return v_error === undefined ? null : v_error;
|
|
871
903
|
}
|
|
872
904
|
|
|
873
|
-
|
|
874
|
-
|
|
905
|
+
function validate$h(obj, path = 'InsightBundleOptions') {
|
|
906
|
+
const v_error = (() => {
|
|
907
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
908
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
909
|
+
}
|
|
910
|
+
if (obj.now !== undefined) {
|
|
911
|
+
const obj_now = obj.now;
|
|
912
|
+
const path_now = path + '.now';
|
|
913
|
+
if (typeof obj_now !== 'string') {
|
|
914
|
+
return new TypeError('Expected "string" but received "' + typeof obj_now + '" (at "' + path_now + '")');
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
if (obj.outputFormat !== undefined) {
|
|
918
|
+
const obj_outputFormat = obj.outputFormat;
|
|
919
|
+
const path_outputFormat = path + '.outputFormat';
|
|
920
|
+
if (typeof obj_outputFormat !== 'string') {
|
|
921
|
+
return new TypeError('Expected "string" but received "' + typeof obj_outputFormat + '" (at "' + path_outputFormat + '")');
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
if (obj.timeZone !== undefined) {
|
|
925
|
+
const obj_timeZone = obj.timeZone;
|
|
926
|
+
const path_timeZone = path + '.timeZone';
|
|
927
|
+
if (typeof obj_timeZone !== 'string') {
|
|
928
|
+
return new TypeError('Expected "string" but received "' + typeof obj_timeZone + '" (at "' + path_timeZone + '")');
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
})();
|
|
932
|
+
return v_error === undefined ? null : v_error;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
function validate$g(obj, path = 'SummarizationOptions') {
|
|
936
|
+
const v_error = (() => {
|
|
937
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
938
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
939
|
+
}
|
|
940
|
+
if (obj.strategy !== undefined) {
|
|
941
|
+
const obj_strategy = obj.strategy;
|
|
942
|
+
const path_strategy = path + '.strategy';
|
|
943
|
+
if (typeof obj_strategy !== 'string') {
|
|
944
|
+
return new TypeError('Expected "string" but received "' + typeof obj_strategy + '" (at "' + path_strategy + '")');
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
})();
|
|
948
|
+
return v_error === undefined ? null : v_error;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
function validate$f(obj, path = 'BatchOptions') {
|
|
952
|
+
const v_error = (() => {
|
|
953
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
954
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
955
|
+
}
|
|
956
|
+
if (obj.bundle !== undefined) {
|
|
957
|
+
const obj_bundle = obj.bundle;
|
|
958
|
+
const path_bundle = path + '.bundle';
|
|
959
|
+
const referencepath_bundleValidationError = validate$h(obj_bundle, path_bundle);
|
|
960
|
+
if (referencepath_bundleValidationError !== null) {
|
|
961
|
+
let message = 'Object doesn\'t match InsightBundleOptions (at "' + path_bundle + '")\n';
|
|
962
|
+
message += referencepath_bundleValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
963
|
+
return new TypeError(message);
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
if (obj.skipCache !== undefined) {
|
|
967
|
+
const obj_skipCache = obj.skipCache;
|
|
968
|
+
const path_skipCache = path + '.skipCache';
|
|
969
|
+
if (typeof obj_skipCache !== 'boolean') {
|
|
970
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_skipCache + '" (at "' + path_skipCache + '")');
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
if (obj.summarization !== undefined) {
|
|
974
|
+
const obj_summarization = obj.summarization;
|
|
975
|
+
const path_summarization = path + '.summarization';
|
|
976
|
+
const referencepath_summarizationValidationError = validate$g(obj_summarization, path_summarization);
|
|
977
|
+
if (referencepath_summarizationValidationError !== null) {
|
|
978
|
+
let message = 'Object doesn\'t match SummarizationOptions (at "' + path_summarization + '")\n';
|
|
979
|
+
message += referencepath_summarizationValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
980
|
+
return new TypeError(message);
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
})();
|
|
984
|
+
return v_error === undefined ? null : v_error;
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
const VERSION$e = "07a8c889542dbad6f958515513d4e3fb";
|
|
988
|
+
function validate$e(obj, path = 'Error') {
|
|
989
|
+
const v_error = (() => {
|
|
990
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
991
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
992
|
+
}
|
|
993
|
+
if (obj.code !== undefined) {
|
|
994
|
+
const obj_code = obj.code;
|
|
995
|
+
const path_code = path + '.code';
|
|
996
|
+
if (typeof obj_code !== 'string') {
|
|
997
|
+
return new TypeError('Expected "string" but received "' + typeof obj_code + '" (at "' + path_code + '")');
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
if (obj.message !== undefined) {
|
|
1001
|
+
const obj_message = obj.message;
|
|
1002
|
+
const path_message = path + '.message';
|
|
1003
|
+
if (typeof obj_message !== 'string') {
|
|
1004
|
+
return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
})();
|
|
1008
|
+
return v_error === undefined ? null : v_error;
|
|
1009
|
+
}
|
|
1010
|
+
const select$i = function ErrorSelect() {
|
|
1011
|
+
return {
|
|
1012
|
+
kind: 'Fragment',
|
|
1013
|
+
version: VERSION$e,
|
|
1014
|
+
private: [],
|
|
1015
|
+
selections: [
|
|
1016
|
+
{
|
|
1017
|
+
name: 'code',
|
|
1018
|
+
kind: 'Scalar',
|
|
1019
|
+
required: false
|
|
1020
|
+
},
|
|
1021
|
+
{
|
|
1022
|
+
name: 'message',
|
|
1023
|
+
kind: 'Scalar',
|
|
1024
|
+
required: false
|
|
1025
|
+
}
|
|
1026
|
+
]
|
|
1027
|
+
};
|
|
1028
|
+
};
|
|
1029
|
+
function equals$e(existing, incoming) {
|
|
1030
|
+
const existing_code = existing.code;
|
|
1031
|
+
const incoming_code = incoming.code;
|
|
1032
|
+
// if at least one of these optionals is defined
|
|
1033
|
+
if (existing_code !== undefined || incoming_code !== undefined) {
|
|
1034
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1035
|
+
// not equal
|
|
1036
|
+
if (existing_code === undefined || incoming_code === undefined) {
|
|
1037
|
+
return false;
|
|
1038
|
+
}
|
|
1039
|
+
if (!(existing_code === incoming_code)) {
|
|
1040
|
+
return false;
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
const existing_message = existing.message;
|
|
1044
|
+
const incoming_message = incoming.message;
|
|
1045
|
+
// if at least one of these optionals is defined
|
|
1046
|
+
if (existing_message !== undefined || incoming_message !== undefined) {
|
|
1047
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1048
|
+
// not equal
|
|
1049
|
+
if (existing_message === undefined || incoming_message === undefined) {
|
|
1050
|
+
return false;
|
|
1051
|
+
}
|
|
1052
|
+
if (!(existing_message === incoming_message)) {
|
|
1053
|
+
return false;
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
return true;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
const VERSION$d = "c4ce5385f4ed571b518d799c4e627709";
|
|
1060
|
+
function validate$d(obj, path = 'Summary') {
|
|
1061
|
+
const v_error = (() => {
|
|
1062
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1063
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1064
|
+
}
|
|
1065
|
+
const obj_generationId = obj.generationId;
|
|
1066
|
+
const path_generationId = path + '.generationId';
|
|
1067
|
+
if (typeof obj_generationId !== 'string') {
|
|
1068
|
+
return new TypeError('Expected "string" but received "' + typeof obj_generationId + '" (at "' + path_generationId + '")');
|
|
1069
|
+
}
|
|
1070
|
+
const obj_markup = obj.markup;
|
|
1071
|
+
const path_markup = path + '.markup';
|
|
1072
|
+
if (typeof obj_markup !== 'string') {
|
|
1073
|
+
return new TypeError('Expected "string" but received "' + typeof obj_markup + '" (at "' + path_markup + '")');
|
|
1074
|
+
}
|
|
1075
|
+
const obj_strategy = obj.strategy;
|
|
1076
|
+
const path_strategy = path + '.strategy';
|
|
1077
|
+
if (typeof obj_strategy !== 'string') {
|
|
1078
|
+
return new TypeError('Expected "string" but received "' + typeof obj_strategy + '" (at "' + path_strategy + '")');
|
|
1079
|
+
}
|
|
1080
|
+
const obj_timestamp = obj.timestamp;
|
|
1081
|
+
const path_timestamp = path + '.timestamp';
|
|
1082
|
+
if (typeof obj_timestamp !== 'string') {
|
|
1083
|
+
return new TypeError('Expected "string" but received "' + typeof obj_timestamp + '" (at "' + path_timestamp + '")');
|
|
1084
|
+
}
|
|
1085
|
+
})();
|
|
1086
|
+
return v_error === undefined ? null : v_error;
|
|
1087
|
+
}
|
|
1088
|
+
const select$h = function SummarySelect() {
|
|
1089
|
+
return {
|
|
1090
|
+
kind: 'Fragment',
|
|
1091
|
+
version: VERSION$d,
|
|
1092
|
+
private: [],
|
|
1093
|
+
selections: [
|
|
1094
|
+
{
|
|
1095
|
+
name: 'generationId',
|
|
1096
|
+
kind: 'Scalar'
|
|
1097
|
+
},
|
|
1098
|
+
{
|
|
1099
|
+
name: 'markup',
|
|
1100
|
+
kind: 'Scalar'
|
|
1101
|
+
},
|
|
1102
|
+
{
|
|
1103
|
+
name: 'strategy',
|
|
1104
|
+
kind: 'Scalar'
|
|
1105
|
+
},
|
|
1106
|
+
{
|
|
1107
|
+
name: 'timestamp',
|
|
1108
|
+
kind: 'Scalar'
|
|
1109
|
+
}
|
|
1110
|
+
]
|
|
1111
|
+
};
|
|
1112
|
+
};
|
|
1113
|
+
function equals$d(existing, incoming) {
|
|
1114
|
+
const existing_generationId = existing.generationId;
|
|
1115
|
+
const incoming_generationId = incoming.generationId;
|
|
1116
|
+
if (!(existing_generationId === incoming_generationId)) {
|
|
1117
|
+
return false;
|
|
1118
|
+
}
|
|
1119
|
+
const existing_markup = existing.markup;
|
|
1120
|
+
const incoming_markup = incoming.markup;
|
|
1121
|
+
if (!(existing_markup === incoming_markup)) {
|
|
1122
|
+
return false;
|
|
1123
|
+
}
|
|
1124
|
+
const existing_strategy = existing.strategy;
|
|
1125
|
+
const incoming_strategy = incoming.strategy;
|
|
1126
|
+
if (!(existing_strategy === incoming_strategy)) {
|
|
1127
|
+
return false;
|
|
1128
|
+
}
|
|
1129
|
+
const existing_timestamp = existing.timestamp;
|
|
1130
|
+
const incoming_timestamp = incoming.timestamp;
|
|
1131
|
+
if (!(existing_timestamp === incoming_timestamp)) {
|
|
1132
|
+
return false;
|
|
1133
|
+
}
|
|
1134
|
+
return true;
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
const VERSION$c = "fc433e1c68019470090193fa4fdf976f";
|
|
1138
|
+
function validate$c(obj, path = 'SummaryResponse') {
|
|
1139
|
+
const v_error = (() => {
|
|
1140
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1141
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1142
|
+
}
|
|
1143
|
+
if (obj.error !== undefined) {
|
|
1144
|
+
const obj_error = obj.error;
|
|
1145
|
+
const path_error = path + '.error';
|
|
1146
|
+
const referencepath_errorValidationError = validate$e(obj_error, path_error);
|
|
1147
|
+
if (referencepath_errorValidationError !== null) {
|
|
1148
|
+
let message = 'Object doesn\'t match Error (at "' + path_error + '")\n';
|
|
1149
|
+
message += referencepath_errorValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1150
|
+
return new TypeError(message);
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1153
|
+
const obj_result = obj.result;
|
|
1154
|
+
const path_result = path + '.result';
|
|
1155
|
+
const referencepath_resultValidationError = validate$d(obj_result, path_result);
|
|
1156
|
+
if (referencepath_resultValidationError !== null) {
|
|
1157
|
+
let message = 'Object doesn\'t match Summary (at "' + path_result + '")\n';
|
|
1158
|
+
message += referencepath_resultValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1159
|
+
return new TypeError(message);
|
|
1160
|
+
}
|
|
1161
|
+
})();
|
|
1162
|
+
return v_error === undefined ? null : v_error;
|
|
1163
|
+
}
|
|
1164
|
+
const select$g = function SummaryResponseSelect() {
|
|
1165
|
+
const { selections: Error__selections, opaque: Error__opaque, } = select$i();
|
|
1166
|
+
const { selections: Summary__selections, opaque: Summary__opaque, } = select$h();
|
|
1167
|
+
return {
|
|
1168
|
+
kind: 'Fragment',
|
|
1169
|
+
version: VERSION$c,
|
|
1170
|
+
private: [],
|
|
1171
|
+
selections: [
|
|
1172
|
+
{
|
|
1173
|
+
name: 'error',
|
|
1174
|
+
kind: 'Object',
|
|
1175
|
+
selections: Error__selections,
|
|
1176
|
+
required: false
|
|
1177
|
+
},
|
|
1178
|
+
{
|
|
1179
|
+
name: 'result',
|
|
1180
|
+
kind: 'Object',
|
|
1181
|
+
selections: Summary__selections
|
|
1182
|
+
}
|
|
1183
|
+
]
|
|
1184
|
+
};
|
|
1185
|
+
};
|
|
1186
|
+
function equals$c(existing, incoming) {
|
|
1187
|
+
const existing_error = existing.error;
|
|
1188
|
+
const incoming_error = incoming.error;
|
|
1189
|
+
// if at least one of these optionals is defined
|
|
1190
|
+
if (existing_error !== undefined || incoming_error !== undefined) {
|
|
1191
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1192
|
+
// not equal
|
|
1193
|
+
if (existing_error === undefined || incoming_error === undefined) {
|
|
1194
|
+
return false;
|
|
1195
|
+
}
|
|
1196
|
+
if (!(equals$e(existing_error, incoming_error))) {
|
|
1197
|
+
return false;
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
const existing_result = existing.result;
|
|
1201
|
+
const incoming_result = incoming.result;
|
|
1202
|
+
if (!(equals$d(existing_result, incoming_result))) {
|
|
1203
|
+
return false;
|
|
1204
|
+
}
|
|
1205
|
+
return true;
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
const VERSION$b = "18d65084646c870abf335d268675999e";
|
|
1209
|
+
function validate$b(obj, path = 'GenerateInsightBatchResponse') {
|
|
875
1210
|
const v_error = (() => {
|
|
876
1211
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
877
1212
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -888,58 +1223,905 @@ function validate$5(obj, path = 'GenerateInsightBatchResponse') {
|
|
|
888
1223
|
return new TypeError('Expected "boolean" but received "' + typeof obj_generatingSummary + '" (at "' + path_generatingSummary + '")');
|
|
889
1224
|
}
|
|
890
1225
|
}
|
|
891
|
-
if (obj.summary !== undefined) {
|
|
892
|
-
const obj_summary = obj.summary;
|
|
893
|
-
const path_summary = path + '.summary';
|
|
894
|
-
|
|
895
|
-
|
|
1226
|
+
if (obj.summary !== undefined) {
|
|
1227
|
+
const obj_summary = obj.summary;
|
|
1228
|
+
const path_summary = path + '.summary';
|
|
1229
|
+
const referencepath_summaryValidationError = validate$c(obj_summary, path_summary);
|
|
1230
|
+
if (referencepath_summaryValidationError !== null) {
|
|
1231
|
+
let message = 'Object doesn\'t match SummaryResponse (at "' + path_summary + '")\n';
|
|
1232
|
+
message += referencepath_summaryValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1233
|
+
return new TypeError(message);
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
if (obj.timestamp !== undefined) {
|
|
1237
|
+
const obj_timestamp = obj.timestamp;
|
|
1238
|
+
const path_timestamp = path + '.timestamp';
|
|
1239
|
+
if (typeof obj_timestamp !== 'string') {
|
|
1240
|
+
return new TypeError('Expected "string" but received "' + typeof obj_timestamp + '" (at "' + path_timestamp + '")');
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
})();
|
|
1244
|
+
return v_error === undefined ? null : v_error;
|
|
1245
|
+
}
|
|
1246
|
+
const RepresentationType$3 = 'GenerateInsightBatchResponse';
|
|
1247
|
+
function keyBuilder$5(luvio, config) {
|
|
1248
|
+
return keyPrefix + '::' + RepresentationType$3 + ':' + config.batchid;
|
|
1249
|
+
}
|
|
1250
|
+
function keyBuilderFromType$3(luvio, object) {
|
|
1251
|
+
const keyParams = {
|
|
1252
|
+
batchid: object.batchId
|
|
1253
|
+
};
|
|
1254
|
+
return keyBuilder$5(luvio, keyParams);
|
|
1255
|
+
}
|
|
1256
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
1257
|
+
return input;
|
|
1258
|
+
}
|
|
1259
|
+
const select$f = function GenerateInsightBatchResponseSelect() {
|
|
1260
|
+
const { selections: SummaryResponse__selections, opaque: SummaryResponse__opaque, } = select$g();
|
|
1261
|
+
return {
|
|
1262
|
+
kind: 'Fragment',
|
|
1263
|
+
version: VERSION$b,
|
|
1264
|
+
private: [],
|
|
1265
|
+
selections: [
|
|
1266
|
+
{
|
|
1267
|
+
name: 'batchId',
|
|
1268
|
+
kind: 'Scalar'
|
|
1269
|
+
},
|
|
1270
|
+
{
|
|
1271
|
+
name: 'generatingSummary',
|
|
1272
|
+
kind: 'Scalar',
|
|
1273
|
+
required: false
|
|
1274
|
+
},
|
|
1275
|
+
{
|
|
1276
|
+
name: 'summary',
|
|
1277
|
+
kind: 'Object',
|
|
1278
|
+
selections: SummaryResponse__selections,
|
|
1279
|
+
required: false
|
|
1280
|
+
},
|
|
1281
|
+
{
|
|
1282
|
+
name: 'timestamp',
|
|
1283
|
+
kind: 'Scalar',
|
|
1284
|
+
required: false
|
|
1285
|
+
}
|
|
1286
|
+
]
|
|
1287
|
+
};
|
|
1288
|
+
};
|
|
1289
|
+
function equals$b(existing, incoming) {
|
|
1290
|
+
const existing_generatingSummary = existing.generatingSummary;
|
|
1291
|
+
const incoming_generatingSummary = incoming.generatingSummary;
|
|
1292
|
+
// if at least one of these optionals is defined
|
|
1293
|
+
if (existing_generatingSummary !== undefined || incoming_generatingSummary !== undefined) {
|
|
1294
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1295
|
+
// not equal
|
|
1296
|
+
if (existing_generatingSummary === undefined || incoming_generatingSummary === undefined) {
|
|
1297
|
+
return false;
|
|
1298
|
+
}
|
|
1299
|
+
if (!(existing_generatingSummary === incoming_generatingSummary)) {
|
|
1300
|
+
return false;
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
const existing_batchId = existing.batchId;
|
|
1304
|
+
const incoming_batchId = incoming.batchId;
|
|
1305
|
+
if (!(existing_batchId === incoming_batchId)) {
|
|
1306
|
+
return false;
|
|
1307
|
+
}
|
|
1308
|
+
const existing_timestamp = existing.timestamp;
|
|
1309
|
+
const incoming_timestamp = incoming.timestamp;
|
|
1310
|
+
// if at least one of these optionals is defined
|
|
1311
|
+
if (existing_timestamp !== undefined || incoming_timestamp !== undefined) {
|
|
1312
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1313
|
+
// not equal
|
|
1314
|
+
if (existing_timestamp === undefined || incoming_timestamp === undefined) {
|
|
1315
|
+
return false;
|
|
1316
|
+
}
|
|
1317
|
+
if (!(existing_timestamp === incoming_timestamp)) {
|
|
1318
|
+
return false;
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1321
|
+
const existing_summary = existing.summary;
|
|
1322
|
+
const incoming_summary = incoming.summary;
|
|
1323
|
+
// if at least one of these optionals is defined
|
|
1324
|
+
if (existing_summary !== undefined || incoming_summary !== undefined) {
|
|
1325
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1326
|
+
// not equal
|
|
1327
|
+
if (existing_summary === undefined || incoming_summary === undefined) {
|
|
1328
|
+
return false;
|
|
1329
|
+
}
|
|
1330
|
+
if (!(equals$c(existing_summary, incoming_summary))) {
|
|
1331
|
+
return false;
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
return true;
|
|
1335
|
+
}
|
|
1336
|
+
const ingest$3 = function GenerateInsightBatchResponseIngest(input, path, luvio, store, timestamp) {
|
|
1337
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1338
|
+
const validateError = validate$b(input);
|
|
1339
|
+
if (validateError !== null) {
|
|
1340
|
+
throw validateError;
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
const key = keyBuilderFromType$3(luvio, input);
|
|
1344
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 300000;
|
|
1345
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "analytics-insights", VERSION$b, RepresentationType$3, equals$b);
|
|
1346
|
+
return createLink(key);
|
|
1347
|
+
};
|
|
1348
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
1349
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1350
|
+
const rootKey = keyBuilderFromType$3(luvio, input);
|
|
1351
|
+
rootKeySet.set(rootKey, {
|
|
1352
|
+
namespace: keyPrefix,
|
|
1353
|
+
representationName: RepresentationType$3,
|
|
1354
|
+
mergeable: false
|
|
1355
|
+
});
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
function select$e(luvio, params) {
|
|
1359
|
+
return select$f();
|
|
1360
|
+
}
|
|
1361
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
1362
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response);
|
|
1363
|
+
}
|
|
1364
|
+
function ingestSuccess$3(luvio, resourceParams, response) {
|
|
1365
|
+
const { body } = response;
|
|
1366
|
+
const key = keyBuilderFromType$3(luvio, body);
|
|
1367
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
1368
|
+
const snapshot = luvio.storeLookup({
|
|
1369
|
+
recordId: key,
|
|
1370
|
+
node: select$e(),
|
|
1371
|
+
variables: {},
|
|
1372
|
+
});
|
|
1373
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1374
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1375
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
deepFreeze(snapshot.data);
|
|
1379
|
+
return snapshot;
|
|
1380
|
+
}
|
|
1381
|
+
function createResourceRequest$3(config) {
|
|
1382
|
+
const headers = {};
|
|
1383
|
+
return {
|
|
1384
|
+
baseUri: 'api.salesforce.com',
|
|
1385
|
+
basePath: '/analytics/insights/v1/batches',
|
|
1386
|
+
method: 'post',
|
|
1387
|
+
body: config.body,
|
|
1388
|
+
urlParams: {},
|
|
1389
|
+
queryParams: {},
|
|
1390
|
+
headers,
|
|
1391
|
+
priority: 'normal',
|
|
1392
|
+
};
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
const adapterName$3 = 'createInsightsBatch';
|
|
1396
|
+
const createInsightsBatch_ConfigPropertyMetadata = [
|
|
1397
|
+
generateParamConfigMetadata('batchInput', false, 2 /* Body */, 4 /* Unsupported */, true),
|
|
1398
|
+
generateParamConfigMetadata('options', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1399
|
+
];
|
|
1400
|
+
const createInsightsBatch_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, createInsightsBatch_ConfigPropertyMetadata);
|
|
1401
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$4(createInsightsBatch_ConfigPropertyMetadata);
|
|
1402
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
1403
|
+
const config = {};
|
|
1404
|
+
const untrustedConfig_batchInput = untrustedConfig.batchInput;
|
|
1405
|
+
if (ArrayIsArray$1(untrustedConfig_batchInput)) {
|
|
1406
|
+
const untrustedConfig_batchInput_array = [];
|
|
1407
|
+
for (let i = 0, arrayLength = untrustedConfig_batchInput.length; i < arrayLength; i++) {
|
|
1408
|
+
const untrustedConfig_batchInput_item = untrustedConfig_batchInput[i];
|
|
1409
|
+
const referenceBatchInputValidationError = validate$i(untrustedConfig_batchInput_item);
|
|
1410
|
+
if (referenceBatchInputValidationError === null) {
|
|
1411
|
+
untrustedConfig_batchInput_array.push(untrustedConfig_batchInput_item);
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
config.batchInput = untrustedConfig_batchInput_array;
|
|
1415
|
+
}
|
|
1416
|
+
const untrustedConfig_options = untrustedConfig.options;
|
|
1417
|
+
const referenceBatchOptionsValidationError = validate$f(untrustedConfig_options);
|
|
1418
|
+
if (referenceBatchOptionsValidationError === null) {
|
|
1419
|
+
config.options = untrustedConfig_options;
|
|
1420
|
+
}
|
|
1421
|
+
return config;
|
|
1422
|
+
}
|
|
1423
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
1424
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1425
|
+
return null;
|
|
1426
|
+
}
|
|
1427
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1428
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1429
|
+
}
|
|
1430
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
1431
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1432
|
+
return null;
|
|
1433
|
+
}
|
|
1434
|
+
return config;
|
|
1435
|
+
}
|
|
1436
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
1437
|
+
const resourceParams = createResourceParams$3(config);
|
|
1438
|
+
const request = createResourceRequest$3(resourceParams);
|
|
1439
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1440
|
+
.then((response) => {
|
|
1441
|
+
return luvio.handleSuccessResponse(() => {
|
|
1442
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response);
|
|
1443
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1444
|
+
}, () => {
|
|
1445
|
+
const cache = new StoreKeyMap();
|
|
1446
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
1447
|
+
return cache;
|
|
1448
|
+
});
|
|
1449
|
+
}, (response) => {
|
|
1450
|
+
deepFreeze(response);
|
|
1451
|
+
throw response;
|
|
1452
|
+
});
|
|
1453
|
+
}
|
|
1454
|
+
const createInsightsBatchAdapterFactory = (luvio) => {
|
|
1455
|
+
return function createInsightsBatch(untrustedConfig) {
|
|
1456
|
+
const config = validateAdapterConfig$3(untrustedConfig, createInsightsBatch_ConfigPropertyNames);
|
|
1457
|
+
// Invalid or incomplete config
|
|
1458
|
+
if (config === null) {
|
|
1459
|
+
throw new Error('Invalid config for "createInsightsBatch"');
|
|
1460
|
+
}
|
|
1461
|
+
return buildNetworkSnapshot$3(luvio, config);
|
|
1462
|
+
};
|
|
1463
|
+
};
|
|
1464
|
+
|
|
1465
|
+
const VERSION$a = "6b47d2ed35a900956ff58b7d8a527e7f";
|
|
1466
|
+
function validate$a(obj, path = 'InsightFeedbackMetadata') {
|
|
1467
|
+
const v_error = (() => {
|
|
1468
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1469
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1470
|
+
}
|
|
1471
|
+
if (obj.dimensionHash !== undefined) {
|
|
1472
|
+
const obj_dimensionHash = obj.dimensionHash;
|
|
1473
|
+
const path_dimensionHash = path + '.dimensionHash';
|
|
1474
|
+
if (typeof obj_dimensionHash !== 'string') {
|
|
1475
|
+
return new TypeError('Expected "string" but received "' + typeof obj_dimensionHash + '" (at "' + path_dimensionHash + '")');
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
if (obj.score !== undefined) {
|
|
1479
|
+
obj.score;
|
|
1480
|
+
}
|
|
1481
|
+
if (obj.type !== undefined) {
|
|
1482
|
+
const obj_type = obj.type;
|
|
1483
|
+
const path_type = path + '.type';
|
|
1484
|
+
if (typeof obj_type !== 'string') {
|
|
1485
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1488
|
+
})();
|
|
1489
|
+
return v_error === undefined ? null : v_error;
|
|
1490
|
+
}
|
|
1491
|
+
const select$d = function InsightFeedbackMetadataSelect() {
|
|
1492
|
+
return {
|
|
1493
|
+
kind: 'Fragment',
|
|
1494
|
+
version: VERSION$a,
|
|
1495
|
+
private: [],
|
|
1496
|
+
selections: [
|
|
1497
|
+
{
|
|
1498
|
+
name: 'dimensionHash',
|
|
1499
|
+
kind: 'Scalar',
|
|
1500
|
+
required: false
|
|
1501
|
+
},
|
|
1502
|
+
{
|
|
1503
|
+
name: 'score',
|
|
1504
|
+
kind: 'Scalar',
|
|
1505
|
+
required: false
|
|
1506
|
+
},
|
|
1507
|
+
{
|
|
1508
|
+
name: 'type',
|
|
1509
|
+
kind: 'Scalar',
|
|
1510
|
+
required: false
|
|
1511
|
+
}
|
|
1512
|
+
]
|
|
1513
|
+
};
|
|
1514
|
+
};
|
|
1515
|
+
function equals$a(existing, incoming) {
|
|
1516
|
+
const existing_dimensionHash = existing.dimensionHash;
|
|
1517
|
+
const incoming_dimensionHash = incoming.dimensionHash;
|
|
1518
|
+
// if at least one of these optionals is defined
|
|
1519
|
+
if (existing_dimensionHash !== undefined || incoming_dimensionHash !== undefined) {
|
|
1520
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1521
|
+
// not equal
|
|
1522
|
+
if (existing_dimensionHash === undefined || incoming_dimensionHash === undefined) {
|
|
1523
|
+
return false;
|
|
1524
|
+
}
|
|
1525
|
+
if (!(existing_dimensionHash === incoming_dimensionHash)) {
|
|
1526
|
+
return false;
|
|
1527
|
+
}
|
|
1528
|
+
}
|
|
1529
|
+
const existing_type = existing.type;
|
|
1530
|
+
const incoming_type = incoming.type;
|
|
1531
|
+
// if at least one of these optionals is defined
|
|
1532
|
+
if (existing_type !== undefined || incoming_type !== undefined) {
|
|
1533
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1534
|
+
// not equal
|
|
1535
|
+
if (existing_type === undefined || incoming_type === undefined) {
|
|
1536
|
+
return false;
|
|
1537
|
+
}
|
|
1538
|
+
if (!(existing_type === incoming_type)) {
|
|
1539
|
+
return false;
|
|
1540
|
+
}
|
|
1541
|
+
}
|
|
1542
|
+
const existing_score = existing.score;
|
|
1543
|
+
const incoming_score = incoming.score;
|
|
1544
|
+
// if at least one of these optionals is defined
|
|
1545
|
+
if (existing_score !== undefined || incoming_score !== undefined) {
|
|
1546
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1547
|
+
// not equal
|
|
1548
|
+
if (existing_score === undefined || incoming_score === undefined) {
|
|
1549
|
+
return false;
|
|
1550
|
+
}
|
|
1551
|
+
if (!(existing_score === incoming_score)) {
|
|
1552
|
+
return false;
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
return true;
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
const VERSION$9 = "be7014b0043386672b06a22807d7e549";
|
|
1559
|
+
function validate$9(obj, path = 'Insight') {
|
|
1560
|
+
const v_error = (() => {
|
|
1561
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1562
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1563
|
+
}
|
|
1564
|
+
if (obj.characterization !== undefined) {
|
|
1565
|
+
const obj_characterization = obj.characterization;
|
|
1566
|
+
const path_characterization = path + '.characterization';
|
|
1567
|
+
if (typeof obj_characterization !== 'string') {
|
|
1568
|
+
return new TypeError('Expected "string" but received "' + typeof obj_characterization + '" (at "' + path_characterization + '")');
|
|
1569
|
+
}
|
|
1570
|
+
}
|
|
1571
|
+
if (obj.facts !== undefined) {
|
|
1572
|
+
const obj_facts = obj.facts;
|
|
1573
|
+
const path_facts = path + '.facts';
|
|
1574
|
+
if (obj_facts === undefined) {
|
|
1575
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_facts + '" (at "' + path_facts + '")');
|
|
1576
|
+
}
|
|
1577
|
+
}
|
|
1578
|
+
if (obj.id !== undefined) {
|
|
1579
|
+
const obj_id = obj.id;
|
|
1580
|
+
const path_id = path + '.id';
|
|
1581
|
+
if (typeof obj_id !== 'string') {
|
|
1582
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
const obj_insightFeedbackMetadata = obj.insightFeedbackMetadata;
|
|
1586
|
+
const path_insightFeedbackMetadata = path + '.insightFeedbackMetadata';
|
|
1587
|
+
const referencepath_insightFeedbackMetadataValidationError = validate$a(obj_insightFeedbackMetadata, path_insightFeedbackMetadata);
|
|
1588
|
+
if (referencepath_insightFeedbackMetadataValidationError !== null) {
|
|
1589
|
+
let message = 'Object doesn\'t match InsightFeedbackMetadata (at "' + path_insightFeedbackMetadata + '")\n';
|
|
1590
|
+
message += referencepath_insightFeedbackMetadataValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1591
|
+
return new TypeError(message);
|
|
1592
|
+
}
|
|
1593
|
+
if (obj.markup !== undefined) {
|
|
1594
|
+
const obj_markup = obj.markup;
|
|
1595
|
+
const path_markup = path + '.markup';
|
|
1596
|
+
if (typeof obj_markup !== 'string') {
|
|
1597
|
+
return new TypeError('Expected "string" but received "' + typeof obj_markup + '" (at "' + path_markup + '")');
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
if (obj.question !== undefined) {
|
|
1601
|
+
const obj_question = obj.question;
|
|
1602
|
+
const path_question = path + '.question';
|
|
1603
|
+
if (typeof obj_question !== 'string') {
|
|
1604
|
+
return new TypeError('Expected "string" but received "' + typeof obj_question + '" (at "' + path_question + '")');
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
if (obj.score !== undefined) {
|
|
1608
|
+
obj.score;
|
|
1609
|
+
}
|
|
1610
|
+
if (obj.type !== undefined) {
|
|
1611
|
+
const obj_type = obj.type;
|
|
1612
|
+
const path_type = path + '.type';
|
|
1613
|
+
if (typeof obj_type !== 'string') {
|
|
1614
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
if (obj.version !== undefined) {
|
|
1618
|
+
const obj_version = obj.version;
|
|
1619
|
+
const path_version = path + '.version';
|
|
1620
|
+
if (typeof obj_version !== 'number' || (typeof obj_version === 'number' && Math.floor(obj_version) !== obj_version)) {
|
|
1621
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_version + '" (at "' + path_version + '")');
|
|
1622
|
+
}
|
|
1623
|
+
}
|
|
1624
|
+
if (obj.viz !== undefined) {
|
|
1625
|
+
const obj_viz = obj.viz;
|
|
1626
|
+
const path_viz = path + '.viz';
|
|
1627
|
+
if (obj_viz === undefined) {
|
|
1628
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_viz + '" (at "' + path_viz + '")');
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
})();
|
|
1632
|
+
return v_error === undefined ? null : v_error;
|
|
1633
|
+
}
|
|
1634
|
+
const select$c = function InsightSelect() {
|
|
1635
|
+
const { selections: InsightFeedbackMetadata__selections, opaque: InsightFeedbackMetadata__opaque, } = select$d();
|
|
1636
|
+
return {
|
|
1637
|
+
kind: 'Fragment',
|
|
1638
|
+
version: VERSION$9,
|
|
1639
|
+
private: [],
|
|
1640
|
+
selections: [
|
|
1641
|
+
{
|
|
1642
|
+
name: 'characterization',
|
|
1643
|
+
kind: 'Scalar',
|
|
1644
|
+
required: false
|
|
1645
|
+
},
|
|
1646
|
+
{
|
|
1647
|
+
name: 'facts',
|
|
1648
|
+
kind: 'Object',
|
|
1649
|
+
// any
|
|
1650
|
+
},
|
|
1651
|
+
{
|
|
1652
|
+
name: 'id',
|
|
1653
|
+
kind: 'Scalar',
|
|
1654
|
+
required: false
|
|
1655
|
+
},
|
|
1656
|
+
{
|
|
1657
|
+
name: 'insightFeedbackMetadata',
|
|
1658
|
+
kind: 'Object',
|
|
1659
|
+
selections: InsightFeedbackMetadata__selections
|
|
1660
|
+
},
|
|
1661
|
+
{
|
|
1662
|
+
name: 'markup',
|
|
1663
|
+
kind: 'Scalar',
|
|
1664
|
+
required: false
|
|
1665
|
+
},
|
|
1666
|
+
{
|
|
1667
|
+
name: 'question',
|
|
1668
|
+
kind: 'Scalar',
|
|
1669
|
+
required: false
|
|
1670
|
+
},
|
|
1671
|
+
{
|
|
1672
|
+
name: 'score',
|
|
1673
|
+
kind: 'Scalar',
|
|
1674
|
+
required: false
|
|
1675
|
+
},
|
|
1676
|
+
{
|
|
1677
|
+
name: 'type',
|
|
1678
|
+
kind: 'Scalar',
|
|
1679
|
+
required: false
|
|
1680
|
+
},
|
|
1681
|
+
{
|
|
1682
|
+
name: 'version',
|
|
1683
|
+
kind: 'Scalar',
|
|
1684
|
+
required: false
|
|
1685
|
+
},
|
|
1686
|
+
{
|
|
1687
|
+
name: 'viz',
|
|
1688
|
+
kind: 'Object',
|
|
1689
|
+
// any
|
|
1690
|
+
}
|
|
1691
|
+
]
|
|
1692
|
+
};
|
|
1693
|
+
};
|
|
1694
|
+
function equals$9(existing, incoming) {
|
|
1695
|
+
const existing_version = existing.version;
|
|
1696
|
+
const incoming_version = incoming.version;
|
|
1697
|
+
// if at least one of these optionals is defined
|
|
1698
|
+
if (existing_version !== undefined || incoming_version !== undefined) {
|
|
1699
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1700
|
+
// not equal
|
|
1701
|
+
if (existing_version === undefined || incoming_version === undefined) {
|
|
1702
|
+
return false;
|
|
1703
|
+
}
|
|
1704
|
+
if (!(existing_version === incoming_version)) {
|
|
1705
|
+
return false;
|
|
1706
|
+
}
|
|
1707
|
+
}
|
|
1708
|
+
const existing_characterization = existing.characterization;
|
|
1709
|
+
const incoming_characterization = incoming.characterization;
|
|
1710
|
+
// if at least one of these optionals is defined
|
|
1711
|
+
if (existing_characterization !== undefined || incoming_characterization !== undefined) {
|
|
1712
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1713
|
+
// not equal
|
|
1714
|
+
if (existing_characterization === undefined || incoming_characterization === undefined) {
|
|
1715
|
+
return false;
|
|
1716
|
+
}
|
|
1717
|
+
if (!(existing_characterization === incoming_characterization)) {
|
|
1718
|
+
return false;
|
|
1719
|
+
}
|
|
1720
|
+
}
|
|
1721
|
+
const existing_id = existing.id;
|
|
1722
|
+
const incoming_id = incoming.id;
|
|
1723
|
+
// if at least one of these optionals is defined
|
|
1724
|
+
if (existing_id !== undefined || incoming_id !== undefined) {
|
|
1725
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1726
|
+
// not equal
|
|
1727
|
+
if (existing_id === undefined || incoming_id === undefined) {
|
|
1728
|
+
return false;
|
|
1729
|
+
}
|
|
1730
|
+
if (!(existing_id === incoming_id)) {
|
|
1731
|
+
return false;
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
const existing_markup = existing.markup;
|
|
1735
|
+
const incoming_markup = incoming.markup;
|
|
1736
|
+
// if at least one of these optionals is defined
|
|
1737
|
+
if (existing_markup !== undefined || incoming_markup !== undefined) {
|
|
1738
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1739
|
+
// not equal
|
|
1740
|
+
if (existing_markup === undefined || incoming_markup === undefined) {
|
|
1741
|
+
return false;
|
|
1742
|
+
}
|
|
1743
|
+
if (!(existing_markup === incoming_markup)) {
|
|
1744
|
+
return false;
|
|
1745
|
+
}
|
|
1746
|
+
}
|
|
1747
|
+
const existing_question = existing.question;
|
|
1748
|
+
const incoming_question = incoming.question;
|
|
1749
|
+
// if at least one of these optionals is defined
|
|
1750
|
+
if (existing_question !== undefined || incoming_question !== undefined) {
|
|
1751
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1752
|
+
// not equal
|
|
1753
|
+
if (existing_question === undefined || incoming_question === undefined) {
|
|
1754
|
+
return false;
|
|
1755
|
+
}
|
|
1756
|
+
if (!(existing_question === incoming_question)) {
|
|
1757
|
+
return false;
|
|
1758
|
+
}
|
|
1759
|
+
}
|
|
1760
|
+
const existing_type = existing.type;
|
|
1761
|
+
const incoming_type = incoming.type;
|
|
1762
|
+
// if at least one of these optionals is defined
|
|
1763
|
+
if (existing_type !== undefined || incoming_type !== undefined) {
|
|
1764
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1765
|
+
// not equal
|
|
1766
|
+
if (existing_type === undefined || incoming_type === undefined) {
|
|
1767
|
+
return false;
|
|
1768
|
+
}
|
|
1769
|
+
if (!(existing_type === incoming_type)) {
|
|
1770
|
+
return false;
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
const existing_score = existing.score;
|
|
1774
|
+
const incoming_score = incoming.score;
|
|
1775
|
+
// if at least one of these optionals is defined
|
|
1776
|
+
if (existing_score !== undefined || incoming_score !== undefined) {
|
|
1777
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1778
|
+
// not equal
|
|
1779
|
+
if (existing_score === undefined || incoming_score === undefined) {
|
|
1780
|
+
return false;
|
|
1781
|
+
}
|
|
1782
|
+
if (!(existing_score === incoming_score)) {
|
|
1783
|
+
return false;
|
|
1784
|
+
}
|
|
1785
|
+
}
|
|
1786
|
+
const existing_facts = existing.facts;
|
|
1787
|
+
const incoming_facts = incoming.facts;
|
|
1788
|
+
// if at least one of these optionals is defined
|
|
1789
|
+
if (existing_facts !== undefined || incoming_facts !== undefined) {
|
|
1790
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1791
|
+
// not equal
|
|
1792
|
+
if (existing_facts === undefined || incoming_facts === undefined) {
|
|
1793
|
+
return false;
|
|
1794
|
+
}
|
|
1795
|
+
if (JSONStringify(incoming_facts) !== JSONStringify(existing_facts)) {
|
|
1796
|
+
return false;
|
|
1797
|
+
}
|
|
1798
|
+
}
|
|
1799
|
+
const existing_insightFeedbackMetadata = existing.insightFeedbackMetadata;
|
|
1800
|
+
const incoming_insightFeedbackMetadata = incoming.insightFeedbackMetadata;
|
|
1801
|
+
if (!(equals$a(existing_insightFeedbackMetadata, incoming_insightFeedbackMetadata))) {
|
|
1802
|
+
return false;
|
|
1803
|
+
}
|
|
1804
|
+
const existing_viz = existing.viz;
|
|
1805
|
+
const incoming_viz = incoming.viz;
|
|
1806
|
+
// if at least one of these optionals is defined
|
|
1807
|
+
if (existing_viz !== undefined || incoming_viz !== undefined) {
|
|
1808
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1809
|
+
// not equal
|
|
1810
|
+
if (existing_viz === undefined || incoming_viz === undefined) {
|
|
1811
|
+
return false;
|
|
1812
|
+
}
|
|
1813
|
+
if (JSONStringify(incoming_viz) !== JSONStringify(existing_viz)) {
|
|
1814
|
+
return false;
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
return true;
|
|
1818
|
+
}
|
|
1819
|
+
|
|
1820
|
+
const VERSION$8 = "6707f0d0aa09112abbca1db5e32bb172";
|
|
1821
|
+
function validate$8(obj, path = 'InsightResponse') {
|
|
1822
|
+
const v_error = (() => {
|
|
1823
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1824
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1825
|
+
}
|
|
1826
|
+
if (obj.error !== undefined) {
|
|
1827
|
+
const obj_error = obj.error;
|
|
1828
|
+
const path_error = path + '.error';
|
|
1829
|
+
const referencepath_errorValidationError = validate$e(obj_error, path_error);
|
|
1830
|
+
if (referencepath_errorValidationError !== null) {
|
|
1831
|
+
let message = 'Object doesn\'t match Error (at "' + path_error + '")\n';
|
|
1832
|
+
message += referencepath_errorValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1833
|
+
return new TypeError(message);
|
|
1834
|
+
}
|
|
1835
|
+
}
|
|
1836
|
+
if (obj.insightType !== undefined) {
|
|
1837
|
+
const obj_insightType = obj.insightType;
|
|
1838
|
+
const path_insightType = path + '.insightType';
|
|
1839
|
+
if (typeof obj_insightType !== 'string') {
|
|
1840
|
+
return new TypeError('Expected "string" but received "' + typeof obj_insightType + '" (at "' + path_insightType + '")');
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
const obj_result = obj.result;
|
|
1844
|
+
const path_result = path + '.result';
|
|
1845
|
+
const referencepath_resultValidationError = validate$9(obj_result, path_result);
|
|
1846
|
+
if (referencepath_resultValidationError !== null) {
|
|
1847
|
+
let message = 'Object doesn\'t match Insight (at "' + path_result + '")\n';
|
|
1848
|
+
message += referencepath_resultValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1849
|
+
return new TypeError(message);
|
|
1850
|
+
}
|
|
1851
|
+
})();
|
|
1852
|
+
return v_error === undefined ? null : v_error;
|
|
1853
|
+
}
|
|
1854
|
+
const select$b = function InsightResponseSelect() {
|
|
1855
|
+
const { selections: Error__selections, opaque: Error__opaque, } = select$i();
|
|
1856
|
+
const { selections: Insight__selections, opaque: Insight__opaque, } = select$c();
|
|
1857
|
+
return {
|
|
1858
|
+
kind: 'Fragment',
|
|
1859
|
+
version: VERSION$8,
|
|
1860
|
+
private: [],
|
|
1861
|
+
selections: [
|
|
1862
|
+
{
|
|
1863
|
+
name: 'error',
|
|
1864
|
+
kind: 'Object',
|
|
1865
|
+
selections: Error__selections,
|
|
1866
|
+
required: false
|
|
1867
|
+
},
|
|
1868
|
+
{
|
|
1869
|
+
name: 'insightType',
|
|
1870
|
+
kind: 'Scalar',
|
|
1871
|
+
required: false
|
|
1872
|
+
},
|
|
1873
|
+
{
|
|
1874
|
+
name: 'result',
|
|
1875
|
+
kind: 'Object',
|
|
1876
|
+
selections: Insight__selections
|
|
1877
|
+
}
|
|
1878
|
+
]
|
|
1879
|
+
};
|
|
1880
|
+
};
|
|
1881
|
+
function equals$8(existing, incoming) {
|
|
1882
|
+
const existing_insightType = existing.insightType;
|
|
1883
|
+
const incoming_insightType = incoming.insightType;
|
|
1884
|
+
// if at least one of these optionals is defined
|
|
1885
|
+
if (existing_insightType !== undefined || incoming_insightType !== undefined) {
|
|
1886
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1887
|
+
// not equal
|
|
1888
|
+
if (existing_insightType === undefined || incoming_insightType === undefined) {
|
|
1889
|
+
return false;
|
|
1890
|
+
}
|
|
1891
|
+
if (!(existing_insightType === incoming_insightType)) {
|
|
1892
|
+
return false;
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
const existing_error = existing.error;
|
|
1896
|
+
const incoming_error = incoming.error;
|
|
1897
|
+
// if at least one of these optionals is defined
|
|
1898
|
+
if (existing_error !== undefined || incoming_error !== undefined) {
|
|
1899
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1900
|
+
// not equal
|
|
1901
|
+
if (existing_error === undefined || incoming_error === undefined) {
|
|
1902
|
+
return false;
|
|
1903
|
+
}
|
|
1904
|
+
if (!(equals$e(existing_error, incoming_error))) {
|
|
1905
|
+
return false;
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1908
|
+
const existing_result = existing.result;
|
|
1909
|
+
const incoming_result = incoming.result;
|
|
1910
|
+
if (!(equals$9(existing_result, incoming_result))) {
|
|
1911
|
+
return false;
|
|
1912
|
+
}
|
|
1913
|
+
return true;
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
const VERSION$7 = "490320cd71bdb83b6c4dcfe5b2b48b25";
|
|
1917
|
+
function validate$7(obj, path = 'Overview') {
|
|
1918
|
+
const v_error = (() => {
|
|
1919
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1920
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1921
|
+
}
|
|
1922
|
+
if (obj.viz !== undefined) {
|
|
1923
|
+
const obj_viz = obj.viz;
|
|
1924
|
+
const path_viz = path + '.viz';
|
|
1925
|
+
if (obj_viz === undefined) {
|
|
1926
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_viz + '" (at "' + path_viz + '")');
|
|
1927
|
+
}
|
|
1928
|
+
}
|
|
1929
|
+
})();
|
|
1930
|
+
return v_error === undefined ? null : v_error;
|
|
1931
|
+
}
|
|
1932
|
+
const select$a = function OverviewSelect() {
|
|
1933
|
+
return {
|
|
1934
|
+
kind: 'Fragment',
|
|
1935
|
+
version: VERSION$7,
|
|
1936
|
+
private: [],
|
|
1937
|
+
selections: [
|
|
1938
|
+
{
|
|
1939
|
+
name: 'viz',
|
|
1940
|
+
kind: 'Object',
|
|
1941
|
+
// any
|
|
1942
|
+
}
|
|
1943
|
+
]
|
|
1944
|
+
};
|
|
1945
|
+
};
|
|
1946
|
+
function equals$7(existing, incoming) {
|
|
1947
|
+
const existing_viz = existing.viz;
|
|
1948
|
+
const incoming_viz = incoming.viz;
|
|
1949
|
+
// if at least one of these optionals is defined
|
|
1950
|
+
if (existing_viz !== undefined || incoming_viz !== undefined) {
|
|
1951
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1952
|
+
// not equal
|
|
1953
|
+
if (existing_viz === undefined || incoming_viz === undefined) {
|
|
1954
|
+
return false;
|
|
1955
|
+
}
|
|
1956
|
+
if (JSONStringify(incoming_viz) !== JSONStringify(existing_viz)) {
|
|
1957
|
+
return false;
|
|
1958
|
+
}
|
|
1959
|
+
}
|
|
1960
|
+
return true;
|
|
1961
|
+
}
|
|
1962
|
+
|
|
1963
|
+
const VERSION$6 = "ac3296a9832f46fda66420bc753d8c61";
|
|
1964
|
+
function validate$6(obj, path = 'OverviewResponse') {
|
|
1965
|
+
const v_error = (() => {
|
|
1966
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1967
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1968
|
+
}
|
|
1969
|
+
if (obj.error !== undefined) {
|
|
1970
|
+
const obj_error = obj.error;
|
|
1971
|
+
const path_error = path + '.error';
|
|
1972
|
+
const referencepath_errorValidationError = validate$e(obj_error, path_error);
|
|
1973
|
+
if (referencepath_errorValidationError !== null) {
|
|
1974
|
+
let message = 'Object doesn\'t match Error (at "' + path_error + '")\n';
|
|
1975
|
+
message += referencepath_errorValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1976
|
+
return new TypeError(message);
|
|
1977
|
+
}
|
|
1978
|
+
}
|
|
1979
|
+
const obj_result = obj.result;
|
|
1980
|
+
const path_result = path + '.result';
|
|
1981
|
+
const referencepath_resultValidationError = validate$7(obj_result, path_result);
|
|
1982
|
+
if (referencepath_resultValidationError !== null) {
|
|
1983
|
+
let message = 'Object doesn\'t match Overview (at "' + path_result + '")\n';
|
|
1984
|
+
message += referencepath_resultValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1985
|
+
return new TypeError(message);
|
|
1986
|
+
}
|
|
1987
|
+
})();
|
|
1988
|
+
return v_error === undefined ? null : v_error;
|
|
1989
|
+
}
|
|
1990
|
+
const select$9 = function OverviewResponseSelect() {
|
|
1991
|
+
const { selections: Error__selections, opaque: Error__opaque, } = select$i();
|
|
1992
|
+
const { selections: Overview__selections, opaque: Overview__opaque, } = select$a();
|
|
1993
|
+
return {
|
|
1994
|
+
kind: 'Fragment',
|
|
1995
|
+
version: VERSION$6,
|
|
1996
|
+
private: [],
|
|
1997
|
+
selections: [
|
|
1998
|
+
{
|
|
1999
|
+
name: 'error',
|
|
2000
|
+
kind: 'Object',
|
|
2001
|
+
selections: Error__selections,
|
|
2002
|
+
required: false
|
|
2003
|
+
},
|
|
2004
|
+
{
|
|
2005
|
+
name: 'result',
|
|
2006
|
+
kind: 'Object',
|
|
2007
|
+
selections: Overview__selections
|
|
2008
|
+
}
|
|
2009
|
+
]
|
|
2010
|
+
};
|
|
2011
|
+
};
|
|
2012
|
+
function equals$6(existing, incoming) {
|
|
2013
|
+
const existing_error = existing.error;
|
|
2014
|
+
const incoming_error = incoming.error;
|
|
2015
|
+
// if at least one of these optionals is defined
|
|
2016
|
+
if (existing_error !== undefined || incoming_error !== undefined) {
|
|
2017
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2018
|
+
// not equal
|
|
2019
|
+
if (existing_error === undefined || incoming_error === undefined) {
|
|
2020
|
+
return false;
|
|
2021
|
+
}
|
|
2022
|
+
if (!(equals$e(existing_error, incoming_error))) {
|
|
2023
|
+
return false;
|
|
2024
|
+
}
|
|
2025
|
+
}
|
|
2026
|
+
const existing_result = existing.result;
|
|
2027
|
+
const incoming_result = incoming.result;
|
|
2028
|
+
if (!(equals$7(existing_result, incoming_result))) {
|
|
2029
|
+
return false;
|
|
2030
|
+
}
|
|
2031
|
+
return true;
|
|
2032
|
+
}
|
|
2033
|
+
|
|
2034
|
+
const VERSION$5 = "a70a5e68e786c3f38efb73cc0812d394";
|
|
2035
|
+
function validate$5(obj, path = 'InsightGroup') {
|
|
2036
|
+
const v_error = (() => {
|
|
2037
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2038
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2039
|
+
}
|
|
2040
|
+
if (obj.error !== undefined) {
|
|
2041
|
+
const obj_error = obj.error;
|
|
2042
|
+
const path_error = path + '.error';
|
|
2043
|
+
const referencepath_errorValidationError = validate$e(obj_error, path_error);
|
|
2044
|
+
if (referencepath_errorValidationError !== null) {
|
|
2045
|
+
let message = 'Object doesn\'t match Error (at "' + path_error + '")\n';
|
|
2046
|
+
message += referencepath_errorValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2047
|
+
return new TypeError(message);
|
|
2048
|
+
}
|
|
2049
|
+
}
|
|
2050
|
+
if (obj.insights !== undefined) {
|
|
2051
|
+
const obj_insights = obj.insights;
|
|
2052
|
+
const path_insights = path + '.insights';
|
|
2053
|
+
if (!ArrayIsArray(obj_insights)) {
|
|
2054
|
+
return new TypeError('Expected "array" but received "' + typeof obj_insights + '" (at "' + path_insights + '")');
|
|
2055
|
+
}
|
|
2056
|
+
for (let i = 0; i < obj_insights.length; i++) {
|
|
2057
|
+
const obj_insights_item = obj_insights[i];
|
|
2058
|
+
const path_insights_item = path_insights + '[' + i + ']';
|
|
2059
|
+
const referencepath_insights_itemValidationError = validate$8(obj_insights_item, path_insights_item);
|
|
2060
|
+
if (referencepath_insights_itemValidationError !== null) {
|
|
2061
|
+
let message = 'Object doesn\'t match InsightResponse (at "' + path_insights_item + '")\n';
|
|
2062
|
+
message += referencepath_insights_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2063
|
+
return new TypeError(message);
|
|
2064
|
+
}
|
|
2065
|
+
}
|
|
2066
|
+
}
|
|
2067
|
+
if (obj.overviews !== undefined) {
|
|
2068
|
+
const obj_overviews = obj.overviews;
|
|
2069
|
+
const path_overviews = path + '.overviews';
|
|
2070
|
+
if (!ArrayIsArray(obj_overviews)) {
|
|
2071
|
+
return new TypeError('Expected "array" but received "' + typeof obj_overviews + '" (at "' + path_overviews + '")');
|
|
2072
|
+
}
|
|
2073
|
+
for (let i = 0; i < obj_overviews.length; i++) {
|
|
2074
|
+
const obj_overviews_item = obj_overviews[i];
|
|
2075
|
+
const path_overviews_item = path_overviews + '[' + i + ']';
|
|
2076
|
+
const referencepath_overviews_itemValidationError = validate$6(obj_overviews_item, path_overviews_item);
|
|
2077
|
+
if (referencepath_overviews_itemValidationError !== null) {
|
|
2078
|
+
let message = 'Object doesn\'t match OverviewResponse (at "' + path_overviews_item + '")\n';
|
|
2079
|
+
message += referencepath_overviews_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2080
|
+
return new TypeError(message);
|
|
2081
|
+
}
|
|
896
2082
|
}
|
|
897
2083
|
}
|
|
898
|
-
if (obj.
|
|
899
|
-
const
|
|
900
|
-
const
|
|
901
|
-
if (typeof
|
|
902
|
-
return new TypeError('Expected "string" but received "' + typeof
|
|
2084
|
+
if (obj.type !== undefined) {
|
|
2085
|
+
const obj_type = obj.type;
|
|
2086
|
+
const path_type = path + '.type';
|
|
2087
|
+
if (typeof obj_type !== 'string') {
|
|
2088
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
903
2089
|
}
|
|
904
2090
|
}
|
|
905
2091
|
})();
|
|
906
2092
|
return v_error === undefined ? null : v_error;
|
|
907
2093
|
}
|
|
908
|
-
const
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
}
|
|
912
|
-
function keyBuilderFromType$3(luvio, object) {
|
|
913
|
-
const keyParams = {
|
|
914
|
-
batchid: object.batchId
|
|
915
|
-
};
|
|
916
|
-
return keyBuilder$5(luvio, keyParams);
|
|
917
|
-
}
|
|
918
|
-
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
919
|
-
return input;
|
|
920
|
-
}
|
|
921
|
-
const select$9 = function GenerateInsightBatchResponseSelect() {
|
|
2094
|
+
const select$8 = function InsightGroupSelect() {
|
|
2095
|
+
const { selections: Error__selections, opaque: Error__opaque, } = select$i();
|
|
2096
|
+
const { selections: InsightResponse__selections, opaque: InsightResponse__opaque, } = select$b();
|
|
2097
|
+
const { selections: OverviewResponse__selections, opaque: OverviewResponse__opaque, } = select$9();
|
|
922
2098
|
return {
|
|
923
2099
|
kind: 'Fragment',
|
|
924
2100
|
version: VERSION$5,
|
|
925
2101
|
private: [],
|
|
926
2102
|
selections: [
|
|
927
2103
|
{
|
|
928
|
-
name: '
|
|
929
|
-
kind: '
|
|
2104
|
+
name: 'error',
|
|
2105
|
+
kind: 'Object',
|
|
2106
|
+
selections: Error__selections,
|
|
2107
|
+
required: false
|
|
930
2108
|
},
|
|
931
2109
|
{
|
|
932
|
-
name: '
|
|
933
|
-
kind: '
|
|
2110
|
+
name: 'insights',
|
|
2111
|
+
kind: 'Object',
|
|
2112
|
+
plural: true,
|
|
2113
|
+
selections: InsightResponse__selections,
|
|
934
2114
|
required: false
|
|
935
2115
|
},
|
|
936
2116
|
{
|
|
937
|
-
name: '
|
|
2117
|
+
name: 'overviews',
|
|
938
2118
|
kind: 'Object',
|
|
939
|
-
|
|
2119
|
+
plural: true,
|
|
2120
|
+
selections: OverviewResponse__selections,
|
|
2121
|
+
required: false
|
|
940
2122
|
},
|
|
941
2123
|
{
|
|
942
|
-
name: '
|
|
2124
|
+
name: 'type',
|
|
943
2125
|
kind: 'Scalar',
|
|
944
2126
|
required: false
|
|
945
2127
|
}
|
|
@@ -947,251 +2129,187 @@ const select$9 = function GenerateInsightBatchResponseSelect() {
|
|
|
947
2129
|
};
|
|
948
2130
|
};
|
|
949
2131
|
function equals$5(existing, incoming) {
|
|
950
|
-
const
|
|
951
|
-
const
|
|
2132
|
+
const existing_type = existing.type;
|
|
2133
|
+
const incoming_type = incoming.type;
|
|
952
2134
|
// if at least one of these optionals is defined
|
|
953
|
-
if (
|
|
2135
|
+
if (existing_type !== undefined || incoming_type !== undefined) {
|
|
954
2136
|
// if one of these is not defined we know the other is defined and therefore
|
|
955
2137
|
// not equal
|
|
956
|
-
if (
|
|
2138
|
+
if (existing_type === undefined || incoming_type === undefined) {
|
|
957
2139
|
return false;
|
|
958
2140
|
}
|
|
959
|
-
if (!(
|
|
2141
|
+
if (!(existing_type === incoming_type)) {
|
|
960
2142
|
return false;
|
|
961
2143
|
}
|
|
962
2144
|
}
|
|
963
|
-
const
|
|
964
|
-
const
|
|
965
|
-
if (!(existing_batchId === incoming_batchId)) {
|
|
966
|
-
return false;
|
|
967
|
-
}
|
|
968
|
-
const existing_timestamp = existing.timestamp;
|
|
969
|
-
const incoming_timestamp = incoming.timestamp;
|
|
2145
|
+
const existing_error = existing.error;
|
|
2146
|
+
const incoming_error = incoming.error;
|
|
970
2147
|
// if at least one of these optionals is defined
|
|
971
|
-
if (
|
|
2148
|
+
if (existing_error !== undefined || incoming_error !== undefined) {
|
|
972
2149
|
// if one of these is not defined we know the other is defined and therefore
|
|
973
2150
|
// not equal
|
|
974
|
-
if (
|
|
2151
|
+
if (existing_error === undefined || incoming_error === undefined) {
|
|
975
2152
|
return false;
|
|
976
2153
|
}
|
|
977
|
-
if (!(
|
|
2154
|
+
if (!(equals$e(existing_error, incoming_error))) {
|
|
978
2155
|
return false;
|
|
979
2156
|
}
|
|
980
2157
|
}
|
|
981
|
-
const
|
|
982
|
-
const
|
|
2158
|
+
const existing_insights = existing.insights;
|
|
2159
|
+
const incoming_insights = incoming.insights;
|
|
983
2160
|
// if at least one of these optionals is defined
|
|
984
|
-
if (
|
|
2161
|
+
if (existing_insights !== undefined || incoming_insights !== undefined) {
|
|
985
2162
|
// if one of these is not defined we know the other is defined and therefore
|
|
986
2163
|
// not equal
|
|
987
|
-
if (
|
|
2164
|
+
if (existing_insights === undefined || incoming_insights === undefined) {
|
|
988
2165
|
return false;
|
|
989
2166
|
}
|
|
990
|
-
|
|
2167
|
+
const equals_insights_items = equalsArray(existing_insights, incoming_insights, (existing_insights_item, incoming_insights_item) => {
|
|
2168
|
+
if (!(equals$8(existing_insights_item, incoming_insights_item))) {
|
|
2169
|
+
return false;
|
|
2170
|
+
}
|
|
2171
|
+
});
|
|
2172
|
+
if (equals_insights_items === false) {
|
|
991
2173
|
return false;
|
|
992
2174
|
}
|
|
993
2175
|
}
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
if (
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
}
|
|
1003
|
-
const key = keyBuilderFromType$3(luvio, input);
|
|
1004
|
-
const ttlToUse = path.ttl !== undefined ? path.ttl : 300000;
|
|
1005
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "analytics-insights", VERSION$5, RepresentationType$3, equals$5);
|
|
1006
|
-
return createLink(key);
|
|
1007
|
-
};
|
|
1008
|
-
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
1009
|
-
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1010
|
-
const rootKey = keyBuilderFromType$3(luvio, input);
|
|
1011
|
-
rootKeySet.set(rootKey, {
|
|
1012
|
-
namespace: keyPrefix,
|
|
1013
|
-
representationName: RepresentationType$3,
|
|
1014
|
-
mergeable: false
|
|
1015
|
-
});
|
|
1016
|
-
}
|
|
1017
|
-
|
|
1018
|
-
function select$8(luvio, params) {
|
|
1019
|
-
return select$9();
|
|
1020
|
-
}
|
|
1021
|
-
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
1022
|
-
getTypeCacheKeys$3(storeKeyMap, luvio, response);
|
|
1023
|
-
}
|
|
1024
|
-
function ingestSuccess$3(luvio, resourceParams, response) {
|
|
1025
|
-
const { body } = response;
|
|
1026
|
-
const key = keyBuilderFromType$3(luvio, body);
|
|
1027
|
-
luvio.storeIngest(key, ingest$3, body);
|
|
1028
|
-
const snapshot = luvio.storeLookup({
|
|
1029
|
-
recordId: key,
|
|
1030
|
-
node: select$8(),
|
|
1031
|
-
variables: {},
|
|
1032
|
-
});
|
|
1033
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1034
|
-
if (snapshot.state !== 'Fulfilled') {
|
|
1035
|
-
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
2176
|
+
const existing_overviews = existing.overviews;
|
|
2177
|
+
const incoming_overviews = incoming.overviews;
|
|
2178
|
+
// if at least one of these optionals is defined
|
|
2179
|
+
if (existing_overviews !== undefined || incoming_overviews !== undefined) {
|
|
2180
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2181
|
+
// not equal
|
|
2182
|
+
if (existing_overviews === undefined || incoming_overviews === undefined) {
|
|
2183
|
+
return false;
|
|
1036
2184
|
}
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
}
|
|
1041
|
-
function createResourceRequest$3(config) {
|
|
1042
|
-
const headers = {};
|
|
1043
|
-
return {
|
|
1044
|
-
baseUri: 'api.salesforce.com',
|
|
1045
|
-
basePath: '/analytics/insights/v1/batches',
|
|
1046
|
-
method: 'post',
|
|
1047
|
-
body: config.body,
|
|
1048
|
-
urlParams: {},
|
|
1049
|
-
queryParams: {},
|
|
1050
|
-
headers,
|
|
1051
|
-
priority: 'normal',
|
|
1052
|
-
};
|
|
1053
|
-
}
|
|
1054
|
-
|
|
1055
|
-
const adapterName$3 = 'createInsightsBatch';
|
|
1056
|
-
const createInsightsBatch_ConfigPropertyMetadata = [
|
|
1057
|
-
generateParamConfigMetadata('batchInput', false, 2 /* Body */, 4 /* Unsupported */, true),
|
|
1058
|
-
generateParamConfigMetadata('options', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1059
|
-
];
|
|
1060
|
-
const createInsightsBatch_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, createInsightsBatch_ConfigPropertyMetadata);
|
|
1061
|
-
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$4(createInsightsBatch_ConfigPropertyMetadata);
|
|
1062
|
-
function typeCheckConfig$3(untrustedConfig) {
|
|
1063
|
-
const config = {};
|
|
1064
|
-
const untrustedConfig_batchInput = untrustedConfig.batchInput;
|
|
1065
|
-
if (ArrayIsArray$1(untrustedConfig_batchInput)) {
|
|
1066
|
-
const untrustedConfig_batchInput_array = [];
|
|
1067
|
-
for (let i = 0, arrayLength = untrustedConfig_batchInput.length; i < arrayLength; i++) {
|
|
1068
|
-
const untrustedConfig_batchInput_item = untrustedConfig_batchInput[i];
|
|
1069
|
-
const referenceBatchInputValidationError = validate$6(untrustedConfig_batchInput_item);
|
|
1070
|
-
if (referenceBatchInputValidationError === null) {
|
|
1071
|
-
untrustedConfig_batchInput_array.push(untrustedConfig_batchInput_item);
|
|
2185
|
+
const equals_overviews_items = equalsArray(existing_overviews, incoming_overviews, (existing_overviews_item, incoming_overviews_item) => {
|
|
2186
|
+
if (!(equals$6(existing_overviews_item, incoming_overviews_item))) {
|
|
2187
|
+
return false;
|
|
1072
2188
|
}
|
|
2189
|
+
});
|
|
2190
|
+
if (equals_overviews_items === false) {
|
|
2191
|
+
return false;
|
|
1073
2192
|
}
|
|
1074
|
-
config.batchInput = untrustedConfig_batchInput_array;
|
|
1075
|
-
}
|
|
1076
|
-
const untrustedConfig_options = untrustedConfig.options;
|
|
1077
|
-
config.options = untrustedConfig_options;
|
|
1078
|
-
return config;
|
|
1079
|
-
}
|
|
1080
|
-
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
1081
|
-
if (!untrustedIsObject(untrustedConfig)) {
|
|
1082
|
-
return null;
|
|
1083
|
-
}
|
|
1084
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1085
|
-
validateConfig(untrustedConfig, configPropertyNames);
|
|
1086
|
-
}
|
|
1087
|
-
const config = typeCheckConfig$3(untrustedConfig);
|
|
1088
|
-
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1089
|
-
return null;
|
|
1090
2193
|
}
|
|
1091
|
-
return
|
|
1092
|
-
}
|
|
1093
|
-
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
1094
|
-
const resourceParams = createResourceParams$3(config);
|
|
1095
|
-
const request = createResourceRequest$3(resourceParams);
|
|
1096
|
-
return luvio.dispatchResourceRequest(request, options)
|
|
1097
|
-
.then((response) => {
|
|
1098
|
-
return luvio.handleSuccessResponse(() => {
|
|
1099
|
-
const snapshot = ingestSuccess$3(luvio, resourceParams, response);
|
|
1100
|
-
return luvio.storeBroadcast().then(() => snapshot);
|
|
1101
|
-
}, () => {
|
|
1102
|
-
const cache = new StoreKeyMap();
|
|
1103
|
-
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
1104
|
-
return cache;
|
|
1105
|
-
});
|
|
1106
|
-
}, (response) => {
|
|
1107
|
-
deepFreeze(response);
|
|
1108
|
-
throw response;
|
|
1109
|
-
});
|
|
2194
|
+
return true;
|
|
1110
2195
|
}
|
|
1111
|
-
const createInsightsBatchAdapterFactory = (luvio) => {
|
|
1112
|
-
return function createInsightsBatch(untrustedConfig) {
|
|
1113
|
-
const config = validateAdapterConfig$3(untrustedConfig, createInsightsBatch_ConfigPropertyNames);
|
|
1114
|
-
// Invalid or incomplete config
|
|
1115
|
-
if (config === null) {
|
|
1116
|
-
throw new Error('Invalid config for "createInsightsBatch"');
|
|
1117
|
-
}
|
|
1118
|
-
return buildNetworkSnapshot$3(luvio, config);
|
|
1119
|
-
};
|
|
1120
|
-
};
|
|
1121
2196
|
|
|
1122
|
-
const VERSION$4 = "
|
|
1123
|
-
function validate$4(obj, path = '
|
|
2197
|
+
const VERSION$4 = "ccf83d258110a04c1949592c91b69b3b";
|
|
2198
|
+
function validate$4(obj, path = 'InsightBundle') {
|
|
1124
2199
|
const v_error = (() => {
|
|
1125
2200
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1126
2201
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1127
2202
|
}
|
|
1128
|
-
if (obj.
|
|
1129
|
-
const
|
|
1130
|
-
const
|
|
1131
|
-
if (typeof
|
|
1132
|
-
return new TypeError('Expected "string" but received "' + typeof
|
|
2203
|
+
if (obj.characterization !== undefined) {
|
|
2204
|
+
const obj_characterization = obj.characterization;
|
|
2205
|
+
const path_characterization = path + '.characterization';
|
|
2206
|
+
if (typeof obj_characterization !== 'string') {
|
|
2207
|
+
return new TypeError('Expected "string" but received "' + typeof obj_characterization + '" (at "' + path_characterization + '")');
|
|
1133
2208
|
}
|
|
1134
2209
|
}
|
|
1135
|
-
if (obj.
|
|
1136
|
-
const
|
|
1137
|
-
const
|
|
1138
|
-
if (typeof
|
|
1139
|
-
return new TypeError('Expected "
|
|
2210
|
+
if (obj.hasErrors !== undefined) {
|
|
2211
|
+
const obj_hasErrors = obj.hasErrors;
|
|
2212
|
+
const path_hasErrors = path + '.hasErrors';
|
|
2213
|
+
if (typeof obj_hasErrors !== 'boolean') {
|
|
2214
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_hasErrors + '" (at "' + path_hasErrors + '")');
|
|
2215
|
+
}
|
|
2216
|
+
}
|
|
2217
|
+
if (obj.insightGroups !== undefined) {
|
|
2218
|
+
const obj_insightGroups = obj.insightGroups;
|
|
2219
|
+
const path_insightGroups = path + '.insightGroups';
|
|
2220
|
+
if (!ArrayIsArray(obj_insightGroups)) {
|
|
2221
|
+
return new TypeError('Expected "array" but received "' + typeof obj_insightGroups + '" (at "' + path_insightGroups + '")');
|
|
2222
|
+
}
|
|
2223
|
+
for (let i = 0; i < obj_insightGroups.length; i++) {
|
|
2224
|
+
const obj_insightGroups_item = obj_insightGroups[i];
|
|
2225
|
+
const path_insightGroups_item = path_insightGroups + '[' + i + ']';
|
|
2226
|
+
const referencepath_insightGroups_itemValidationError = validate$5(obj_insightGroups_item, path_insightGroups_item);
|
|
2227
|
+
if (referencepath_insightGroups_itemValidationError !== null) {
|
|
2228
|
+
let message = 'Object doesn\'t match InsightGroup (at "' + path_insightGroups_item + '")\n';
|
|
2229
|
+
message += referencepath_insightGroups_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2230
|
+
return new TypeError(message);
|
|
2231
|
+
}
|
|
1140
2232
|
}
|
|
1141
2233
|
}
|
|
1142
2234
|
})();
|
|
1143
2235
|
return v_error === undefined ? null : v_error;
|
|
1144
2236
|
}
|
|
1145
|
-
const select$7 = function
|
|
2237
|
+
const select$7 = function InsightBundleSelect() {
|
|
2238
|
+
const { selections: InsightGroup__selections, opaque: InsightGroup__opaque, } = select$8();
|
|
1146
2239
|
return {
|
|
1147
2240
|
kind: 'Fragment',
|
|
1148
2241
|
version: VERSION$4,
|
|
1149
2242
|
private: [],
|
|
1150
2243
|
selections: [
|
|
1151
2244
|
{
|
|
1152
|
-
name: '
|
|
2245
|
+
name: 'characterization',
|
|
1153
2246
|
kind: 'Scalar',
|
|
1154
2247
|
required: false
|
|
1155
2248
|
},
|
|
1156
2249
|
{
|
|
1157
|
-
name: '
|
|
2250
|
+
name: 'hasErrors',
|
|
1158
2251
|
kind: 'Scalar',
|
|
1159
2252
|
required: false
|
|
2253
|
+
},
|
|
2254
|
+
{
|
|
2255
|
+
name: 'insightGroups',
|
|
2256
|
+
kind: 'Object',
|
|
2257
|
+
plural: true,
|
|
2258
|
+
selections: InsightGroup__selections,
|
|
2259
|
+
required: false
|
|
1160
2260
|
}
|
|
1161
2261
|
]
|
|
1162
2262
|
};
|
|
1163
2263
|
};
|
|
1164
2264
|
function equals$4(existing, incoming) {
|
|
1165
|
-
const
|
|
1166
|
-
const
|
|
2265
|
+
const existing_hasErrors = existing.hasErrors;
|
|
2266
|
+
const incoming_hasErrors = incoming.hasErrors;
|
|
1167
2267
|
// if at least one of these optionals is defined
|
|
1168
|
-
if (
|
|
2268
|
+
if (existing_hasErrors !== undefined || incoming_hasErrors !== undefined) {
|
|
1169
2269
|
// if one of these is not defined we know the other is defined and therefore
|
|
1170
2270
|
// not equal
|
|
1171
|
-
if (
|
|
2271
|
+
if (existing_hasErrors === undefined || incoming_hasErrors === undefined) {
|
|
1172
2272
|
return false;
|
|
1173
2273
|
}
|
|
1174
|
-
if (!(
|
|
2274
|
+
if (!(existing_hasErrors === incoming_hasErrors)) {
|
|
1175
2275
|
return false;
|
|
1176
2276
|
}
|
|
1177
2277
|
}
|
|
1178
|
-
const
|
|
1179
|
-
const
|
|
2278
|
+
const existing_characterization = existing.characterization;
|
|
2279
|
+
const incoming_characterization = incoming.characterization;
|
|
1180
2280
|
// if at least one of these optionals is defined
|
|
1181
|
-
if (
|
|
2281
|
+
if (existing_characterization !== undefined || incoming_characterization !== undefined) {
|
|
1182
2282
|
// if one of these is not defined we know the other is defined and therefore
|
|
1183
2283
|
// not equal
|
|
1184
|
-
if (
|
|
2284
|
+
if (existing_characterization === undefined || incoming_characterization === undefined) {
|
|
1185
2285
|
return false;
|
|
1186
2286
|
}
|
|
1187
|
-
if (!(
|
|
2287
|
+
if (!(existing_characterization === incoming_characterization)) {
|
|
2288
|
+
return false;
|
|
2289
|
+
}
|
|
2290
|
+
}
|
|
2291
|
+
const existing_insightGroups = existing.insightGroups;
|
|
2292
|
+
const incoming_insightGroups = incoming.insightGroups;
|
|
2293
|
+
// if at least one of these optionals is defined
|
|
2294
|
+
if (existing_insightGroups !== undefined || incoming_insightGroups !== undefined) {
|
|
2295
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2296
|
+
// not equal
|
|
2297
|
+
if (existing_insightGroups === undefined || incoming_insightGroups === undefined) {
|
|
2298
|
+
return false;
|
|
2299
|
+
}
|
|
2300
|
+
const equals_insightGroups_items = equalsArray(existing_insightGroups, incoming_insightGroups, (existing_insightGroups_item, incoming_insightGroups_item) => {
|
|
2301
|
+
if (!(equals$5(existing_insightGroups_item, incoming_insightGroups_item))) {
|
|
2302
|
+
return false;
|
|
2303
|
+
}
|
|
2304
|
+
});
|
|
2305
|
+
if (equals_insightGroups_items === false) {
|
|
1188
2306
|
return false;
|
|
1189
2307
|
}
|
|
1190
2308
|
}
|
|
1191
2309
|
return true;
|
|
1192
2310
|
}
|
|
1193
2311
|
|
|
1194
|
-
const VERSION$3 = "
|
|
2312
|
+
const VERSION$3 = "2f50f3271c566971f91d15a361482b6c";
|
|
1195
2313
|
function validate$3(obj, path = 'GenerateInsightBundleResponse') {
|
|
1196
2314
|
const v_error = (() => {
|
|
1197
2315
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -1200,7 +2318,7 @@ function validate$3(obj, path = 'GenerateInsightBundleResponse') {
|
|
|
1200
2318
|
if (obj.error !== undefined) {
|
|
1201
2319
|
const obj_error = obj.error;
|
|
1202
2320
|
const path_error = path + '.error';
|
|
1203
|
-
const referencepath_errorValidationError = validate$
|
|
2321
|
+
const referencepath_errorValidationError = validate$e(obj_error, path_error);
|
|
1204
2322
|
if (referencepath_errorValidationError !== null) {
|
|
1205
2323
|
let message = 'Object doesn\'t match Error (at "' + path_error + '")\n';
|
|
1206
2324
|
message += referencepath_errorValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1210,8 +2328,11 @@ function validate$3(obj, path = 'GenerateInsightBundleResponse') {
|
|
|
1210
2328
|
if (obj.result !== undefined) {
|
|
1211
2329
|
const obj_result = obj.result;
|
|
1212
2330
|
const path_result = path + '.result';
|
|
1213
|
-
|
|
1214
|
-
|
|
2331
|
+
const referencepath_resultValidationError = validate$4(obj_result, path_result);
|
|
2332
|
+
if (referencepath_resultValidationError !== null) {
|
|
2333
|
+
let message = 'Object doesn\'t match InsightBundle (at "' + path_result + '")\n';
|
|
2334
|
+
message += referencepath_resultValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2335
|
+
return new TypeError(message);
|
|
1215
2336
|
}
|
|
1216
2337
|
}
|
|
1217
2338
|
const obj_sdm = obj.sdm;
|
|
@@ -1241,7 +2362,8 @@ function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
|
1241
2362
|
return input;
|
|
1242
2363
|
}
|
|
1243
2364
|
const select$6 = function GenerateInsightBundleResponseSelect() {
|
|
1244
|
-
const { selections: Error__selections, opaque: Error__opaque, } = select$
|
|
2365
|
+
const { selections: Error__selections, opaque: Error__opaque, } = select$i();
|
|
2366
|
+
const { selections: InsightBundle__selections, opaque: InsightBundle__opaque, } = select$7();
|
|
1245
2367
|
return {
|
|
1246
2368
|
kind: 'Fragment',
|
|
1247
2369
|
version: VERSION$3,
|
|
@@ -1256,7 +2378,8 @@ const select$6 = function GenerateInsightBundleResponseSelect() {
|
|
|
1256
2378
|
{
|
|
1257
2379
|
name: 'result',
|
|
1258
2380
|
kind: 'Object',
|
|
1259
|
-
|
|
2381
|
+
selections: InsightBundle__selections,
|
|
2382
|
+
required: false
|
|
1260
2383
|
},
|
|
1261
2384
|
{
|
|
1262
2385
|
name: 'sdm',
|
|
@@ -1289,7 +2412,7 @@ function equals$3(existing, incoming) {
|
|
|
1289
2412
|
if (existing_error === undefined || incoming_error === undefined) {
|
|
1290
2413
|
return false;
|
|
1291
2414
|
}
|
|
1292
|
-
if (!(equals$
|
|
2415
|
+
if (!(equals$e(existing_error, incoming_error))) {
|
|
1293
2416
|
return false;
|
|
1294
2417
|
}
|
|
1295
2418
|
}
|
|
@@ -1302,7 +2425,7 @@ function equals$3(existing, incoming) {
|
|
|
1302
2425
|
if (existing_result === undefined || incoming_result === undefined) {
|
|
1303
2426
|
return false;
|
|
1304
2427
|
}
|
|
1305
|
-
if (
|
|
2428
|
+
if (!(equals$4(existing_result, incoming_result))) {
|
|
1306
2429
|
return false;
|
|
1307
2430
|
}
|
|
1308
2431
|
}
|
|
@@ -1380,9 +2503,15 @@ function typeCheckConfig$2(untrustedConfig) {
|
|
|
1380
2503
|
const config = {};
|
|
1381
2504
|
typeCheckConfig$4(untrustedConfig, config, generateInsights_ConfigPropertyMetadata);
|
|
1382
2505
|
const untrustedConfig_input = untrustedConfig.input;
|
|
1383
|
-
|
|
2506
|
+
const referenceInsightBundleInputValidationError = validate$k(untrustedConfig_input);
|
|
2507
|
+
if (referenceInsightBundleInputValidationError === null) {
|
|
2508
|
+
config.input = untrustedConfig_input;
|
|
2509
|
+
}
|
|
1384
2510
|
const untrustedConfig_options = untrustedConfig.options;
|
|
1385
|
-
|
|
2511
|
+
const referenceInsightBundleOptionsValidationError = validate$h(untrustedConfig_options);
|
|
2512
|
+
if (referenceInsightBundleOptionsValidationError === null) {
|
|
2513
|
+
config.options = untrustedConfig_options;
|
|
2514
|
+
}
|
|
1386
2515
|
return config;
|
|
1387
2516
|
}
|
|
1388
2517
|
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
@@ -1427,7 +2556,7 @@ const generateInsightsAdapterFactory = (luvio) => {
|
|
|
1427
2556
|
};
|
|
1428
2557
|
};
|
|
1429
2558
|
|
|
1430
|
-
const VERSION$2 = "
|
|
2559
|
+
const VERSION$2 = "b3ecf416df1c88948a22534e1143e6d5";
|
|
1431
2560
|
function validate$2(obj, path = 'GetInsightBatchResponse') {
|
|
1432
2561
|
const v_error = (() => {
|
|
1433
2562
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -1469,8 +2598,11 @@ function validate$2(obj, path = 'GetInsightBatchResponse') {
|
|
|
1469
2598
|
if (obj.summary !== undefined) {
|
|
1470
2599
|
const obj_summary = obj.summary;
|
|
1471
2600
|
const path_summary = path + '.summary';
|
|
1472
|
-
|
|
1473
|
-
|
|
2601
|
+
const referencepath_summaryValidationError = validate$c(obj_summary, path_summary);
|
|
2602
|
+
if (referencepath_summaryValidationError !== null) {
|
|
2603
|
+
let message = 'Object doesn\'t match SummaryResponse (at "' + path_summary + '")\n';
|
|
2604
|
+
message += referencepath_summaryValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2605
|
+
return new TypeError(message);
|
|
1474
2606
|
}
|
|
1475
2607
|
}
|
|
1476
2608
|
})();
|
|
@@ -1508,6 +2640,7 @@ function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
|
1508
2640
|
return input;
|
|
1509
2641
|
}
|
|
1510
2642
|
const select$4 = function GetInsightBatchResponseSelect() {
|
|
2643
|
+
const { selections: SummaryResponse__selections, opaque: SummaryResponse__opaque, } = select$g();
|
|
1511
2644
|
return {
|
|
1512
2645
|
kind: 'Fragment',
|
|
1513
2646
|
version: VERSION$2,
|
|
@@ -1537,7 +2670,8 @@ const select$4 = function GetInsightBatchResponseSelect() {
|
|
|
1537
2670
|
{
|
|
1538
2671
|
name: 'summary',
|
|
1539
2672
|
kind: 'Object',
|
|
1540
|
-
|
|
2673
|
+
selections: SummaryResponse__selections,
|
|
2674
|
+
required: false
|
|
1541
2675
|
}
|
|
1542
2676
|
]
|
|
1543
2677
|
};
|
|
@@ -1601,7 +2735,7 @@ function equals$2(existing, incoming) {
|
|
|
1601
2735
|
if (existing_summary === undefined || incoming_summary === undefined) {
|
|
1602
2736
|
return false;
|
|
1603
2737
|
}
|
|
1604
|
-
if (
|
|
2738
|
+
if (!(equals$c(existing_summary, incoming_summary))) {
|
|
1605
2739
|
return false;
|
|
1606
2740
|
}
|
|
1607
2741
|
}
|
|
@@ -2098,12 +3232,12 @@ function typeCheckConfig(untrustedConfig) {
|
|
|
2098
3232
|
const config = {};
|
|
2099
3233
|
typeCheckConfig$4(untrustedConfig, config, getMetricFilterValues_ConfigPropertyMetadata);
|
|
2100
3234
|
const untrustedConfig_semanticDataModel = untrustedConfig.semanticDataModel;
|
|
2101
|
-
const referenceSemanticDataModelValidationError = validate$
|
|
3235
|
+
const referenceSemanticDataModelValidationError = validate$q(untrustedConfig_semanticDataModel);
|
|
2102
3236
|
if (referenceSemanticDataModelValidationError === null) {
|
|
2103
3237
|
config.semanticDataModel = untrustedConfig_semanticDataModel;
|
|
2104
3238
|
}
|
|
2105
3239
|
const untrustedConfig_field = untrustedConfig.field;
|
|
2106
|
-
const referenceFieldIdValidationError = validate$
|
|
3240
|
+
const referenceFieldIdValidationError = validate$C(untrustedConfig_field);
|
|
2107
3241
|
if (referenceFieldIdValidationError === null) {
|
|
2108
3242
|
config.field = untrustedConfig_field;
|
|
2109
3243
|
}
|
|
@@ -2112,7 +3246,7 @@ function typeCheckConfig(untrustedConfig) {
|
|
|
2112
3246
|
const untrustedConfig_filters_array = [];
|
|
2113
3247
|
for (let i = 0, arrayLength = untrustedConfig_filters.length; i < arrayLength; i++) {
|
|
2114
3248
|
const untrustedConfig_filters_item = untrustedConfig_filters[i];
|
|
2115
|
-
const referenceFilterValidationError = validate$
|
|
3249
|
+
const referenceFilterValidationError = validate$y(untrustedConfig_filters_item);
|
|
2116
3250
|
if (referenceFilterValidationError === null) {
|
|
2117
3251
|
untrustedConfig_filters_array.push(untrustedConfig_filters_item);
|
|
2118
3252
|
}
|
|
@@ -2120,7 +3254,10 @@ function typeCheckConfig(untrustedConfig) {
|
|
|
2120
3254
|
config.filters = untrustedConfig_filters_array;
|
|
2121
3255
|
}
|
|
2122
3256
|
const untrustedConfig_semanticFilter = untrustedConfig.semanticFilter;
|
|
2123
|
-
|
|
3257
|
+
const referenceFlattenFilterValidationError = validate$u(untrustedConfig_semanticFilter);
|
|
3258
|
+
if (referenceFlattenFilterValidationError === null) {
|
|
3259
|
+
config.semanticFilter = untrustedConfig_semanticFilter;
|
|
3260
|
+
}
|
|
2124
3261
|
return config;
|
|
2125
3262
|
}
|
|
2126
3263
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
@@ -2204,4 +3341,4 @@ withDefaultLuvio((luvio) => {
|
|
|
2204
3341
|
});
|
|
2205
3342
|
|
|
2206
3343
|
export { createInsightsBatch, generateInsights, getInsightsBatch, getInsightsBatchNotifyChange, getInsightsBatch_imperative, getMetricFilterValues };
|
|
2207
|
-
// version: 1.
|
|
3344
|
+
// version: 1.315.0-b7eff13c6d
|