@salesforce/lds-adapters-industries-cpq 1.302.0 → 1.303.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/industries-cpq.js +569 -181
- package/dist/es/es2018/types/src/generated/adapters/guidedSelectionProductList.d.ts +41 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +2 -1
- package/dist/es/es2018/types/src/generated/resources/postConnectCpqProductsGuidedSelection.d.ts +38 -0
- package/dist/es/es2018/types/src/generated/types/GuidedSelectionInputRepresentation.d.ts +100 -0
- package/dist/es/es2018/types/src/generated/types/GuidedSelectionOutputRepresentation.d.ts +67 -0
- package/dist/es/es2018/types/src/generated/types/GuidedSelectionSearchTermInputRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/GuidedSelectionSearchTermOutputRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/RelatedObjectFilterInputRepresentation.d.ts +32 -0
- package/package.json +4 -4
- package/sfdc/index.js +934 -543
- package/src/raml/api.raml +204 -0
- package/src/raml/luvio.raml +9 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$i, typeCheckConfig as typeCheckConfig$i, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -93,7 +93,7 @@ function createLink(ref) {
|
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
function validate$
|
|
96
|
+
function validate$V(obj, path = 'PreviewInputRepresentation') {
|
|
97
97
|
const v_error = (() => {
|
|
98
98
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
99
99
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -153,8 +153,8 @@ function validate$R(obj, path = 'PreviewInputRepresentation') {
|
|
|
153
153
|
return v_error === undefined ? null : v_error;
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
const VERSION$
|
|
157
|
-
function validate$
|
|
156
|
+
const VERSION$l = "16ee7e6452adaa7a1a8e36a1238a4b85";
|
|
157
|
+
function validate$U(obj, path = 'CpqMessageOutputRepresentation') {
|
|
158
158
|
const v_error = (() => {
|
|
159
159
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
160
160
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -190,10 +190,10 @@ function validate$Q(obj, path = 'CpqMessageOutputRepresentation') {
|
|
|
190
190
|
})();
|
|
191
191
|
return v_error === undefined ? null : v_error;
|
|
192
192
|
}
|
|
193
|
-
const select$
|
|
193
|
+
const select$D = function CpqMessageOutputRepresentationSelect() {
|
|
194
194
|
return {
|
|
195
195
|
kind: 'Fragment',
|
|
196
|
-
version: VERSION$
|
|
196
|
+
version: VERSION$l,
|
|
197
197
|
private: [],
|
|
198
198
|
selections: [
|
|
199
199
|
{
|
|
@@ -219,7 +219,7 @@ const select$B = function CpqMessageOutputRepresentationSelect() {
|
|
|
219
219
|
]
|
|
220
220
|
};
|
|
221
221
|
};
|
|
222
|
-
function equals$
|
|
222
|
+
function equals$l(existing, incoming) {
|
|
223
223
|
const existing_code = existing.code;
|
|
224
224
|
const incoming_code = incoming.code;
|
|
225
225
|
// if at least one of these optionals is defined
|
|
@@ -275,8 +275,8 @@ function equals$k(existing, incoming) {
|
|
|
275
275
|
return true;
|
|
276
276
|
}
|
|
277
277
|
|
|
278
|
-
const VERSION$
|
|
279
|
-
function validate$
|
|
278
|
+
const VERSION$k = "2927abd89d0e76012000aa604b583b6d";
|
|
279
|
+
function validate$T(obj, path = 'ApiStatusOutputRepresentation') {
|
|
280
280
|
const v_error = (() => {
|
|
281
281
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
282
282
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -290,7 +290,7 @@ function validate$P(obj, path = 'ApiStatusOutputRepresentation') {
|
|
|
290
290
|
for (let i = 0; i < obj_messages.length; i++) {
|
|
291
291
|
const obj_messages_item = obj_messages[i];
|
|
292
292
|
const path_messages_item = path_messages + '[' + i + ']';
|
|
293
|
-
const referencepath_messages_itemValidationError = validate$
|
|
293
|
+
const referencepath_messages_itemValidationError = validate$U(obj_messages_item, path_messages_item);
|
|
294
294
|
if (referencepath_messages_itemValidationError !== null) {
|
|
295
295
|
let message = 'Object doesn\'t match CpqMessageOutputRepresentation (at "' + path_messages_item + '")\n';
|
|
296
296
|
message += referencepath_messages_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -313,11 +313,11 @@ function validate$P(obj, path = 'ApiStatusOutputRepresentation') {
|
|
|
313
313
|
})();
|
|
314
314
|
return v_error === undefined ? null : v_error;
|
|
315
315
|
}
|
|
316
|
-
const select$
|
|
317
|
-
const { selections: CpqMessageOutputRepresentation__selections, opaque: CpqMessageOutputRepresentation__opaque, } = select$
|
|
316
|
+
const select$C = function ApiStatusOutputRepresentationSelect() {
|
|
317
|
+
const { selections: CpqMessageOutputRepresentation__selections, opaque: CpqMessageOutputRepresentation__opaque, } = select$D();
|
|
318
318
|
return {
|
|
319
319
|
kind: 'Fragment',
|
|
320
|
-
version: VERSION$
|
|
320
|
+
version: VERSION$k,
|
|
321
321
|
private: [],
|
|
322
322
|
selections: [
|
|
323
323
|
{
|
|
@@ -339,7 +339,7 @@ const select$A = function ApiStatusOutputRepresentationSelect() {
|
|
|
339
339
|
]
|
|
340
340
|
};
|
|
341
341
|
};
|
|
342
|
-
function equals$
|
|
342
|
+
function equals$k(existing, incoming) {
|
|
343
343
|
const existing_statusCode = existing.statusCode;
|
|
344
344
|
const incoming_statusCode = incoming.statusCode;
|
|
345
345
|
if (!(existing_statusCode === incoming_statusCode)) {
|
|
@@ -368,7 +368,7 @@ function equals$j(existing, incoming) {
|
|
|
368
368
|
return false;
|
|
369
369
|
}
|
|
370
370
|
const equals_messages_items = equalsArray(existing_messages, incoming_messages, (existing_messages_item, incoming_messages_item) => {
|
|
371
|
-
if (!(equals$
|
|
371
|
+
if (!(equals$l(existing_messages_item, incoming_messages_item))) {
|
|
372
372
|
return false;
|
|
373
373
|
}
|
|
374
374
|
});
|
|
@@ -379,16 +379,16 @@ function equals$j(existing, incoming) {
|
|
|
379
379
|
return true;
|
|
380
380
|
}
|
|
381
381
|
|
|
382
|
-
const TTL$
|
|
383
|
-
const VERSION$
|
|
384
|
-
function validate$
|
|
382
|
+
const TTL$b = 1000;
|
|
383
|
+
const VERSION$j = "0dec45c09b18523023bddd12cc806a3d";
|
|
384
|
+
function validate$S(obj, path = 'CpqBaseListOutputRepresentation') {
|
|
385
385
|
const v_error = (() => {
|
|
386
386
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
387
387
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
388
388
|
}
|
|
389
389
|
const obj_apiStatus = obj.apiStatus;
|
|
390
390
|
const path_apiStatus = path + '.apiStatus';
|
|
391
|
-
const referencepath_apiStatusValidationError = validate$
|
|
391
|
+
const referencepath_apiStatusValidationError = validate$T(obj_apiStatus, path_apiStatus);
|
|
392
392
|
if (referencepath_apiStatusValidationError !== null) {
|
|
393
393
|
let message = 'Object doesn\'t match ApiStatusOutputRepresentation (at "' + path_apiStatus + '")\n';
|
|
394
394
|
message += referencepath_apiStatusValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -442,68 +442,68 @@ function validate$O(obj, path = 'CpqBaseListOutputRepresentation') {
|
|
|
442
442
|
})();
|
|
443
443
|
return v_error === undefined ? null : v_error;
|
|
444
444
|
}
|
|
445
|
-
const RepresentationType$
|
|
446
|
-
function keyBuilder$
|
|
447
|
-
return keyPrefix + '::' + RepresentationType$
|
|
445
|
+
const RepresentationType$c = 'CpqBaseListOutputRepresentation';
|
|
446
|
+
function keyBuilder$d(luvio, config) {
|
|
447
|
+
return keyPrefix + '::' + RepresentationType$c + ':' + config.message;
|
|
448
448
|
}
|
|
449
|
-
function keyBuilderFromType$
|
|
449
|
+
function keyBuilderFromType$b(luvio, object) {
|
|
450
450
|
const keyParams = {
|
|
451
451
|
message: object.apiStatus.statusCode
|
|
452
452
|
};
|
|
453
|
-
return keyBuilder$
|
|
453
|
+
return keyBuilder$d(luvio, keyParams);
|
|
454
454
|
}
|
|
455
|
-
function normalize$
|
|
455
|
+
function normalize$c(input, existing, path, luvio, store, timestamp) {
|
|
456
456
|
return input;
|
|
457
457
|
}
|
|
458
|
-
const select$
|
|
458
|
+
const select$B = function CpqBaseListOutputRepresentationSelect() {
|
|
459
459
|
return {
|
|
460
460
|
kind: 'Fragment',
|
|
461
|
-
version: VERSION$
|
|
461
|
+
version: VERSION$j,
|
|
462
462
|
private: [],
|
|
463
463
|
opaque: true
|
|
464
464
|
};
|
|
465
465
|
};
|
|
466
|
-
function equals$
|
|
466
|
+
function equals$j(existing, incoming) {
|
|
467
467
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
468
468
|
return false;
|
|
469
469
|
}
|
|
470
470
|
return true;
|
|
471
471
|
}
|
|
472
|
-
const ingest$
|
|
472
|
+
const ingest$c = function CpqBaseListOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
473
473
|
if (process.env.NODE_ENV !== 'production') {
|
|
474
|
-
const validateError = validate$
|
|
474
|
+
const validateError = validate$S(input);
|
|
475
475
|
if (validateError !== null) {
|
|
476
476
|
throw validateError;
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
|
-
const key = keyBuilderFromType$
|
|
480
|
-
const ttlToUse = TTL$
|
|
481
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
479
|
+
const key = keyBuilderFromType$b(luvio, input);
|
|
480
|
+
const ttlToUse = TTL$b;
|
|
481
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$c, "cpq", VERSION$j, RepresentationType$c, equals$j);
|
|
482
482
|
return createLink(key);
|
|
483
483
|
};
|
|
484
|
-
function getTypeCacheKeys$
|
|
484
|
+
function getTypeCacheKeys$c(rootKeySet, luvio, input, fullPathFactory) {
|
|
485
485
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
486
|
-
const rootKey = keyBuilderFromType$
|
|
486
|
+
const rootKey = keyBuilderFromType$b(luvio, input);
|
|
487
487
|
rootKeySet.set(rootKey, {
|
|
488
488
|
namespace: keyPrefix,
|
|
489
|
-
representationName: RepresentationType$
|
|
489
|
+
representationName: RepresentationType$c,
|
|
490
490
|
mergeable: false
|
|
491
491
|
});
|
|
492
492
|
}
|
|
493
493
|
|
|
494
|
-
function select$
|
|
495
|
-
return select$
|
|
494
|
+
function select$A(luvio, params) {
|
|
495
|
+
return select$B();
|
|
496
496
|
}
|
|
497
|
-
function getResponseCacheKeys$
|
|
498
|
-
getTypeCacheKeys$
|
|
497
|
+
function getResponseCacheKeys$h(storeKeyMap, luvio, resourceParams, response) {
|
|
498
|
+
getTypeCacheKeys$c(storeKeyMap, luvio, response);
|
|
499
499
|
}
|
|
500
|
-
function ingestSuccess$
|
|
500
|
+
function ingestSuccess$h(luvio, resourceParams, response) {
|
|
501
501
|
const { body } = response;
|
|
502
|
-
const key = keyBuilderFromType$
|
|
503
|
-
luvio.storeIngest(key, ingest$
|
|
502
|
+
const key = keyBuilderFromType$b(luvio, body);
|
|
503
|
+
luvio.storeIngest(key, ingest$c, body);
|
|
504
504
|
const snapshot = luvio.storeLookup({
|
|
505
505
|
recordId: key,
|
|
506
|
-
node: select$
|
|
506
|
+
node: select$A(),
|
|
507
507
|
variables: {},
|
|
508
508
|
});
|
|
509
509
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -514,7 +514,7 @@ function ingestSuccess$g(luvio, resourceParams, response) {
|
|
|
514
514
|
deepFreeze(snapshot.data);
|
|
515
515
|
return snapshot;
|
|
516
516
|
}
|
|
517
|
-
function createResourceRequest$
|
|
517
|
+
function createResourceRequest$h(config) {
|
|
518
518
|
const headers = {};
|
|
519
519
|
return {
|
|
520
520
|
baseUri: '/services/data/v62.0',
|
|
@@ -528,45 +528,45 @@ function createResourceRequest$g(config) {
|
|
|
528
528
|
};
|
|
529
529
|
}
|
|
530
530
|
|
|
531
|
-
const adapterName$
|
|
531
|
+
const adapterName$h = 'preview';
|
|
532
532
|
const preview_ConfigPropertyMetadata = [
|
|
533
533
|
generateParamConfigMetadata('previewInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
534
534
|
];
|
|
535
|
-
const preview_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
536
|
-
const createResourceParams$
|
|
537
|
-
function typeCheckConfig$
|
|
535
|
+
const preview_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$h, preview_ConfigPropertyMetadata);
|
|
536
|
+
const createResourceParams$h = /*#__PURE__*/ createResourceParams$i(preview_ConfigPropertyMetadata);
|
|
537
|
+
function typeCheckConfig$h(untrustedConfig) {
|
|
538
538
|
const config = {};
|
|
539
539
|
const untrustedConfig_previewInput = untrustedConfig.previewInput;
|
|
540
|
-
const referencePreviewInputRepresentationValidationError = validate$
|
|
540
|
+
const referencePreviewInputRepresentationValidationError = validate$V(untrustedConfig_previewInput);
|
|
541
541
|
if (referencePreviewInputRepresentationValidationError === null) {
|
|
542
542
|
config.previewInput = untrustedConfig_previewInput;
|
|
543
543
|
}
|
|
544
544
|
return config;
|
|
545
545
|
}
|
|
546
|
-
function validateAdapterConfig$
|
|
546
|
+
function validateAdapterConfig$h(untrustedConfig, configPropertyNames) {
|
|
547
547
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
548
548
|
return null;
|
|
549
549
|
}
|
|
550
550
|
if (process.env.NODE_ENV !== 'production') {
|
|
551
551
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
552
552
|
}
|
|
553
|
-
const config = typeCheckConfig$
|
|
553
|
+
const config = typeCheckConfig$h(untrustedConfig);
|
|
554
554
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
555
555
|
return null;
|
|
556
556
|
}
|
|
557
557
|
return config;
|
|
558
558
|
}
|
|
559
|
-
function buildNetworkSnapshot$
|
|
560
|
-
const resourceParams = createResourceParams$
|
|
561
|
-
const request = createResourceRequest$
|
|
559
|
+
function buildNetworkSnapshot$h(luvio, config, options) {
|
|
560
|
+
const resourceParams = createResourceParams$h(config);
|
|
561
|
+
const request = createResourceRequest$h(resourceParams);
|
|
562
562
|
return luvio.dispatchResourceRequest(request, options)
|
|
563
563
|
.then((response) => {
|
|
564
564
|
return luvio.handleSuccessResponse(() => {
|
|
565
|
-
const snapshot = ingestSuccess$
|
|
565
|
+
const snapshot = ingestSuccess$h(luvio, resourceParams, response);
|
|
566
566
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
567
567
|
}, () => {
|
|
568
568
|
const cache = new StoreKeyMap();
|
|
569
|
-
getResponseCacheKeys$
|
|
569
|
+
getResponseCacheKeys$h(cache, luvio, resourceParams, response.body);
|
|
570
570
|
return cache;
|
|
571
571
|
});
|
|
572
572
|
}, (response) => {
|
|
@@ -576,16 +576,16 @@ function buildNetworkSnapshot$g(luvio, config, options) {
|
|
|
576
576
|
}
|
|
577
577
|
const previewAdapterFactory = (luvio) => {
|
|
578
578
|
return function preview(untrustedConfig) {
|
|
579
|
-
const config = validateAdapterConfig$
|
|
579
|
+
const config = validateAdapterConfig$h(untrustedConfig, preview_ConfigPropertyNames);
|
|
580
580
|
// Invalid or incomplete config
|
|
581
581
|
if (config === null) {
|
|
582
582
|
throw new Error('Invalid config for "preview"');
|
|
583
583
|
}
|
|
584
|
-
return buildNetworkSnapshot$
|
|
584
|
+
return buildNetworkSnapshot$h(luvio, config);
|
|
585
585
|
};
|
|
586
586
|
};
|
|
587
587
|
|
|
588
|
-
function validate$
|
|
588
|
+
function validate$R(obj, path = 'ProductListInputRepresentation') {
|
|
589
589
|
const v_error = (() => {
|
|
590
590
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
591
591
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -676,8 +676,380 @@ function validate$N(obj, path = 'ProductListInputRepresentation') {
|
|
|
676
676
|
return v_error === undefined ? null : v_error;
|
|
677
677
|
}
|
|
678
678
|
|
|
679
|
+
function select$z(luvio, params) {
|
|
680
|
+
return select$B();
|
|
681
|
+
}
|
|
682
|
+
function getResponseCacheKeys$g(storeKeyMap, luvio, resourceParams, response) {
|
|
683
|
+
getTypeCacheKeys$c(storeKeyMap, luvio, response);
|
|
684
|
+
}
|
|
685
|
+
function ingestSuccess$g(luvio, resourceParams, response) {
|
|
686
|
+
const { body } = response;
|
|
687
|
+
const key = keyBuilderFromType$b(luvio, body);
|
|
688
|
+
luvio.storeIngest(key, ingest$c, body);
|
|
689
|
+
const snapshot = luvio.storeLookup({
|
|
690
|
+
recordId: key,
|
|
691
|
+
node: select$z(),
|
|
692
|
+
variables: {},
|
|
693
|
+
});
|
|
694
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
695
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
696
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
deepFreeze(snapshot.data);
|
|
700
|
+
return snapshot;
|
|
701
|
+
}
|
|
702
|
+
function createResourceRequest$g(config) {
|
|
703
|
+
const headers = {};
|
|
704
|
+
return {
|
|
705
|
+
baseUri: '/services/data/v62.0',
|
|
706
|
+
basePath: '/connect/cpq/products',
|
|
707
|
+
method: 'post',
|
|
708
|
+
body: config.body,
|
|
709
|
+
urlParams: {},
|
|
710
|
+
queryParams: {},
|
|
711
|
+
headers,
|
|
712
|
+
priority: 'normal',
|
|
713
|
+
};
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
const adapterName$g = 'productList';
|
|
717
|
+
const productList_ConfigPropertyMetadata = [
|
|
718
|
+
generateParamConfigMetadata('requestBody', true, 2 /* Body */, 4 /* Unsupported */),
|
|
719
|
+
];
|
|
720
|
+
const productList_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$g, productList_ConfigPropertyMetadata);
|
|
721
|
+
const createResourceParams$g = /*#__PURE__*/ createResourceParams$i(productList_ConfigPropertyMetadata);
|
|
722
|
+
function typeCheckConfig$g(untrustedConfig) {
|
|
723
|
+
const config = {};
|
|
724
|
+
const untrustedConfig_requestBody = untrustedConfig.requestBody;
|
|
725
|
+
const referenceProductListInputRepresentationValidationError = validate$R(untrustedConfig_requestBody);
|
|
726
|
+
if (referenceProductListInputRepresentationValidationError === null) {
|
|
727
|
+
config.requestBody = untrustedConfig_requestBody;
|
|
728
|
+
}
|
|
729
|
+
return config;
|
|
730
|
+
}
|
|
731
|
+
function validateAdapterConfig$g(untrustedConfig, configPropertyNames) {
|
|
732
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
733
|
+
return null;
|
|
734
|
+
}
|
|
735
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
736
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
737
|
+
}
|
|
738
|
+
const config = typeCheckConfig$g(untrustedConfig);
|
|
739
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
740
|
+
return null;
|
|
741
|
+
}
|
|
742
|
+
return config;
|
|
743
|
+
}
|
|
744
|
+
function buildNetworkSnapshot$g(luvio, config, options) {
|
|
745
|
+
const resourceParams = createResourceParams$g(config);
|
|
746
|
+
const request = createResourceRequest$g(resourceParams);
|
|
747
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
748
|
+
.then((response) => {
|
|
749
|
+
return luvio.handleSuccessResponse(() => {
|
|
750
|
+
const snapshot = ingestSuccess$g(luvio, resourceParams, response);
|
|
751
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
752
|
+
}, () => {
|
|
753
|
+
const cache = new StoreKeyMap();
|
|
754
|
+
getResponseCacheKeys$g(cache, luvio, resourceParams, response.body);
|
|
755
|
+
return cache;
|
|
756
|
+
});
|
|
757
|
+
}, (response) => {
|
|
758
|
+
deepFreeze(response);
|
|
759
|
+
throw response;
|
|
760
|
+
});
|
|
761
|
+
}
|
|
762
|
+
const productListAdapterFactory = (luvio) => {
|
|
763
|
+
return function productList(untrustedConfig) {
|
|
764
|
+
const config = validateAdapterConfig$g(untrustedConfig, productList_ConfigPropertyNames);
|
|
765
|
+
// Invalid or incomplete config
|
|
766
|
+
if (config === null) {
|
|
767
|
+
throw new Error('Invalid config for "productList"');
|
|
768
|
+
}
|
|
769
|
+
return buildNetworkSnapshot$g(luvio, config);
|
|
770
|
+
};
|
|
771
|
+
};
|
|
772
|
+
|
|
773
|
+
function validate$Q(obj, path = 'FilterCriteriaInputRepresentation') {
|
|
774
|
+
const v_error = (() => {
|
|
775
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
776
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
777
|
+
}
|
|
778
|
+
const obj_operator = obj.operator;
|
|
779
|
+
const path_operator = path + '.operator';
|
|
780
|
+
if (typeof obj_operator !== 'string') {
|
|
781
|
+
return new TypeError('Expected "string" but received "' + typeof obj_operator + '" (at "' + path_operator + '")');
|
|
782
|
+
}
|
|
783
|
+
const obj_property = obj.property;
|
|
784
|
+
const path_property = path + '.property';
|
|
785
|
+
if (typeof obj_property !== 'string') {
|
|
786
|
+
return new TypeError('Expected "string" but received "' + typeof obj_property + '" (at "' + path_property + '")');
|
|
787
|
+
}
|
|
788
|
+
const obj_value = obj.value;
|
|
789
|
+
const path_value = path + '.value';
|
|
790
|
+
if (obj_value === undefined) {
|
|
791
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_value + '" (at "' + path_value + '")');
|
|
792
|
+
}
|
|
793
|
+
})();
|
|
794
|
+
return v_error === undefined ? null : v_error;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
function validate$P(obj, path = 'FilterInputRepresentation') {
|
|
798
|
+
const v_error = (() => {
|
|
799
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
800
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
801
|
+
}
|
|
802
|
+
const obj_criteria = obj.criteria;
|
|
803
|
+
const path_criteria = path + '.criteria';
|
|
804
|
+
if (!ArrayIsArray(obj_criteria)) {
|
|
805
|
+
return new TypeError('Expected "array" but received "' + typeof obj_criteria + '" (at "' + path_criteria + '")');
|
|
806
|
+
}
|
|
807
|
+
for (let i = 0; i < obj_criteria.length; i++) {
|
|
808
|
+
const obj_criteria_item = obj_criteria[i];
|
|
809
|
+
const path_criteria_item = path_criteria + '[' + i + ']';
|
|
810
|
+
const referencepath_criteria_itemValidationError = validate$Q(obj_criteria_item, path_criteria_item);
|
|
811
|
+
if (referencepath_criteria_itemValidationError !== null) {
|
|
812
|
+
let message = 'Object doesn\'t match FilterCriteriaInputRepresentation (at "' + path_criteria_item + '")\n';
|
|
813
|
+
message += referencepath_criteria_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
814
|
+
return new TypeError(message);
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
})();
|
|
818
|
+
return v_error === undefined ? null : v_error;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
function validate$O(obj, path = 'RelatedObjectFilterInputRepresentation') {
|
|
822
|
+
const v_error = (() => {
|
|
823
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
824
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
825
|
+
}
|
|
826
|
+
const obj_criteria = obj.criteria;
|
|
827
|
+
const path_criteria = path + '.criteria';
|
|
828
|
+
if (!ArrayIsArray(obj_criteria)) {
|
|
829
|
+
return new TypeError('Expected "array" but received "' + typeof obj_criteria + '" (at "' + path_criteria + '")');
|
|
830
|
+
}
|
|
831
|
+
for (let i = 0; i < obj_criteria.length; i++) {
|
|
832
|
+
const obj_criteria_item = obj_criteria[i];
|
|
833
|
+
const path_criteria_item = path_criteria + '[' + i + ']';
|
|
834
|
+
const referencepath_criteria_itemValidationError = validate$Q(obj_criteria_item, path_criteria_item);
|
|
835
|
+
if (referencepath_criteria_itemValidationError !== null) {
|
|
836
|
+
let message = 'Object doesn\'t match FilterCriteriaInputRepresentation (at "' + path_criteria_item + '")\n';
|
|
837
|
+
message += referencepath_criteria_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
838
|
+
return new TypeError(message);
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
const obj_objectName = obj.objectName;
|
|
842
|
+
const path_objectName = path + '.objectName';
|
|
843
|
+
if (typeof obj_objectName !== 'string') {
|
|
844
|
+
return new TypeError('Expected "string" but received "' + typeof obj_objectName + '" (at "' + path_objectName + '")');
|
|
845
|
+
}
|
|
846
|
+
})();
|
|
847
|
+
return v_error === undefined ? null : v_error;
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
function validate$N(obj, path = 'GuidedSelectionSearchTermInputRepresentation') {
|
|
851
|
+
const v_error = (() => {
|
|
852
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
853
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
854
|
+
}
|
|
855
|
+
if (obj.tags !== undefined) {
|
|
856
|
+
const obj_tags = obj.tags;
|
|
857
|
+
const path_tags = path + '.tags';
|
|
858
|
+
if (!ArrayIsArray(obj_tags)) {
|
|
859
|
+
return new TypeError('Expected "array" but received "' + typeof obj_tags + '" (at "' + path_tags + '")');
|
|
860
|
+
}
|
|
861
|
+
for (let i = 0; i < obj_tags.length; i++) {
|
|
862
|
+
const obj_tags_item = obj_tags[i];
|
|
863
|
+
const path_tags_item = path_tags + '[' + i + ']';
|
|
864
|
+
if (typeof obj_tags_item !== 'string') {
|
|
865
|
+
return new TypeError('Expected "string" but received "' + typeof obj_tags_item + '" (at "' + path_tags_item + '")');
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
if (obj.term !== undefined) {
|
|
870
|
+
const obj_term = obj.term;
|
|
871
|
+
const path_term = path + '.term';
|
|
872
|
+
if (typeof obj_term !== 'string') {
|
|
873
|
+
return new TypeError('Expected "string" but received "' + typeof obj_term + '" (at "' + path_term + '")');
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
})();
|
|
877
|
+
return v_error === undefined ? null : v_error;
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
function validate$M(obj, path = 'GuidedSelectionSearchTermOutputRepresentation') {
|
|
881
|
+
const v_error = (() => {
|
|
882
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
883
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
884
|
+
}
|
|
885
|
+
const obj_tags = obj.tags;
|
|
886
|
+
const path_tags = path + '.tags';
|
|
887
|
+
if (!ArrayIsArray(obj_tags)) {
|
|
888
|
+
return new TypeError('Expected "array" but received "' + typeof obj_tags + '" (at "' + path_tags + '")');
|
|
889
|
+
}
|
|
890
|
+
for (let i = 0; i < obj_tags.length; i++) {
|
|
891
|
+
const obj_tags_item = obj_tags[i];
|
|
892
|
+
const path_tags_item = path_tags + '[' + i + ']';
|
|
893
|
+
if (typeof obj_tags_item !== 'string') {
|
|
894
|
+
return new TypeError('Expected "string" but received "' + typeof obj_tags_item + '" (at "' + path_tags_item + '")');
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
const obj_term = obj.term;
|
|
898
|
+
const path_term = path + '.term';
|
|
899
|
+
if (typeof obj_term !== 'string') {
|
|
900
|
+
return new TypeError('Expected "string" but received "' + typeof obj_term + '" (at "' + path_term + '")');
|
|
901
|
+
}
|
|
902
|
+
})();
|
|
903
|
+
return v_error === undefined ? null : v_error;
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
const TTL$a = 1000;
|
|
907
|
+
const VERSION$i = "59b55511c24a0471c3f3a7aa8c21c5c1";
|
|
908
|
+
function validate$L(obj, path = 'GuidedSelectionOutputRepresentation') {
|
|
909
|
+
const v_error = (() => {
|
|
910
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
911
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
912
|
+
}
|
|
913
|
+
const obj_apiStatus = obj.apiStatus;
|
|
914
|
+
const path_apiStatus = path + '.apiStatus';
|
|
915
|
+
const referencepath_apiStatusValidationError = validate$T(obj_apiStatus, path_apiStatus);
|
|
916
|
+
if (referencepath_apiStatusValidationError !== null) {
|
|
917
|
+
let message = 'Object doesn\'t match ApiStatusOutputRepresentation (at "' + path_apiStatus + '")\n';
|
|
918
|
+
message += referencepath_apiStatusValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
919
|
+
return new TypeError(message);
|
|
920
|
+
}
|
|
921
|
+
if (obj.contextId !== undefined) {
|
|
922
|
+
const obj_contextId = obj.contextId;
|
|
923
|
+
const path_contextId = path + '.contextId';
|
|
924
|
+
if (typeof obj_contextId !== 'string') {
|
|
925
|
+
return new TypeError('Expected "string" but received "' + typeof obj_contextId + '" (at "' + path_contextId + '")');
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
if (obj.correlationId !== undefined) {
|
|
929
|
+
const obj_correlationId = obj.correlationId;
|
|
930
|
+
const path_correlationId = path + '.correlationId';
|
|
931
|
+
if (typeof obj_correlationId !== 'string') {
|
|
932
|
+
return new TypeError('Expected "string" but received "' + typeof obj_correlationId + '" (at "' + path_correlationId + '")');
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
if (obj.cursor !== undefined) {
|
|
936
|
+
const obj_cursor = obj.cursor;
|
|
937
|
+
const path_cursor = path + '.cursor';
|
|
938
|
+
if (typeof obj_cursor !== 'string') {
|
|
939
|
+
return new TypeError('Expected "string" but received "' + typeof obj_cursor + '" (at "' + path_cursor + '")');
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
if (obj.limit !== undefined) {
|
|
943
|
+
const obj_limit = obj.limit;
|
|
944
|
+
const path_limit = path + '.limit';
|
|
945
|
+
if (typeof obj_limit !== 'number' || (typeof obj_limit === 'number' && Math.floor(obj_limit) !== obj_limit)) {
|
|
946
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_limit + '" (at "' + path_limit + '")');
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
if (obj.offSet !== undefined) {
|
|
950
|
+
const obj_offSet = obj.offSet;
|
|
951
|
+
const path_offSet = path + '.offSet';
|
|
952
|
+
if (typeof obj_offSet !== 'number' || (typeof obj_offSet === 'number' && Math.floor(obj_offSet) !== obj_offSet)) {
|
|
953
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_offSet + '" (at "' + path_offSet + '")');
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
const obj_result = obj.result;
|
|
957
|
+
const path_result = path + '.result';
|
|
958
|
+
if (!ArrayIsArray(obj_result)) {
|
|
959
|
+
return new TypeError('Expected "array" but received "' + typeof obj_result + '" (at "' + path_result + '")');
|
|
960
|
+
}
|
|
961
|
+
for (let i = 0; i < obj_result.length; i++) {
|
|
962
|
+
const obj_result_item = obj_result[i];
|
|
963
|
+
const path_result_item = path_result + '[' + i + ']';
|
|
964
|
+
if (typeof obj_result_item !== 'object' || ArrayIsArray(obj_result_item) || obj_result_item === null) {
|
|
965
|
+
return new TypeError('Expected "object" but received "' + typeof obj_result_item + '" (at "' + path_result_item + '")');
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
if (obj.searchTerms !== undefined) {
|
|
969
|
+
const obj_searchTerms = obj.searchTerms;
|
|
970
|
+
const path_searchTerms = path + '.searchTerms';
|
|
971
|
+
if (!ArrayIsArray(obj_searchTerms)) {
|
|
972
|
+
return new TypeError('Expected "array" but received "' + typeof obj_searchTerms + '" (at "' + path_searchTerms + '")');
|
|
973
|
+
}
|
|
974
|
+
for (let i = 0; i < obj_searchTerms.length; i++) {
|
|
975
|
+
const obj_searchTerms_item = obj_searchTerms[i];
|
|
976
|
+
const path_searchTerms_item = path_searchTerms + '[' + i + ']';
|
|
977
|
+
const referencepath_searchTerms_itemValidationError = validate$M(obj_searchTerms_item, path_searchTerms_item);
|
|
978
|
+
if (referencepath_searchTerms_itemValidationError !== null) {
|
|
979
|
+
let message = 'Object doesn\'t match GuidedSelectionSearchTermOutputRepresentation (at "' + path_searchTerms_item + '")\n';
|
|
980
|
+
message += referencepath_searchTerms_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
981
|
+
return new TypeError(message);
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
if (obj.total !== undefined) {
|
|
986
|
+
const obj_total = obj.total;
|
|
987
|
+
const path_total = path + '.total';
|
|
988
|
+
if (typeof obj_total !== 'number' || (typeof obj_total === 'number' && Math.floor(obj_total) !== obj_total)) {
|
|
989
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_total + '" (at "' + path_total + '")');
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
if (obj.userContext !== undefined) {
|
|
993
|
+
const obj_userContext = obj.userContext;
|
|
994
|
+
const path_userContext = path + '.userContext';
|
|
995
|
+
if (typeof obj_userContext !== 'object' || ArrayIsArray(obj_userContext) || obj_userContext === null) {
|
|
996
|
+
return new TypeError('Expected "object" but received "' + typeof obj_userContext + '" (at "' + path_userContext + '")');
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
})();
|
|
1000
|
+
return v_error === undefined ? null : v_error;
|
|
1001
|
+
}
|
|
1002
|
+
const RepresentationType$b = 'GuidedSelectionOutputRepresentation';
|
|
1003
|
+
function keyBuilder$c(luvio, config) {
|
|
1004
|
+
return keyPrefix + '::' + RepresentationType$b + ':' + config.message;
|
|
1005
|
+
}
|
|
1006
|
+
function keyBuilderFromType$a(luvio, object) {
|
|
1007
|
+
const keyParams = {
|
|
1008
|
+
message: object.apiStatus.statusCode
|
|
1009
|
+
};
|
|
1010
|
+
return keyBuilder$c(luvio, keyParams);
|
|
1011
|
+
}
|
|
1012
|
+
function normalize$b(input, existing, path, luvio, store, timestamp) {
|
|
1013
|
+
return input;
|
|
1014
|
+
}
|
|
1015
|
+
const select$y = function GuidedSelectionOutputRepresentationSelect() {
|
|
1016
|
+
return {
|
|
1017
|
+
kind: 'Fragment',
|
|
1018
|
+
version: VERSION$i,
|
|
1019
|
+
private: [],
|
|
1020
|
+
opaque: true
|
|
1021
|
+
};
|
|
1022
|
+
};
|
|
1023
|
+
function equals$i(existing, incoming) {
|
|
1024
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1025
|
+
return false;
|
|
1026
|
+
}
|
|
1027
|
+
return true;
|
|
1028
|
+
}
|
|
1029
|
+
const ingest$b = function GuidedSelectionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1030
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1031
|
+
const validateError = validate$L(input);
|
|
1032
|
+
if (validateError !== null) {
|
|
1033
|
+
throw validateError;
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
const key = keyBuilderFromType$a(luvio, input);
|
|
1037
|
+
const ttlToUse = TTL$a;
|
|
1038
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$b, "cpq", VERSION$i, RepresentationType$b, equals$i);
|
|
1039
|
+
return createLink(key);
|
|
1040
|
+
};
|
|
1041
|
+
function getTypeCacheKeys$b(rootKeySet, luvio, input, fullPathFactory) {
|
|
1042
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1043
|
+
const rootKey = keyBuilderFromType$a(luvio, input);
|
|
1044
|
+
rootKeySet.set(rootKey, {
|
|
1045
|
+
namespace: keyPrefix,
|
|
1046
|
+
representationName: RepresentationType$b,
|
|
1047
|
+
mergeable: false
|
|
1048
|
+
});
|
|
1049
|
+
}
|
|
1050
|
+
|
|
679
1051
|
function select$x(luvio, params) {
|
|
680
|
-
return select$
|
|
1052
|
+
return select$y();
|
|
681
1053
|
}
|
|
682
1054
|
function getResponseCacheKeys$f(storeKeyMap, luvio, resourceParams, response) {
|
|
683
1055
|
getTypeCacheKeys$b(storeKeyMap, luvio, response);
|
|
@@ -703,7 +1075,7 @@ function createResourceRequest$f(config) {
|
|
|
703
1075
|
const headers = {};
|
|
704
1076
|
return {
|
|
705
1077
|
baseUri: '/services/data/v62.0',
|
|
706
|
-
basePath: '/connect/cpq/products',
|
|
1078
|
+
basePath: '/connect/cpq/products/guided-selection',
|
|
707
1079
|
method: 'post',
|
|
708
1080
|
body: config.body,
|
|
709
1081
|
urlParams: {},
|
|
@@ -713,18 +1085,82 @@ function createResourceRequest$f(config) {
|
|
|
713
1085
|
};
|
|
714
1086
|
}
|
|
715
1087
|
|
|
716
|
-
const adapterName$f = '
|
|
717
|
-
const
|
|
718
|
-
generateParamConfigMetadata('
|
|
1088
|
+
const adapterName$f = 'guidedSelectionProductList';
|
|
1089
|
+
const guidedSelectionProductList_ConfigPropertyMetadata = [
|
|
1090
|
+
generateParamConfigMetadata('additionalContextData', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1091
|
+
generateParamConfigMetadata('additionalFields', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1092
|
+
generateParamConfigMetadata('catalogId', false, 2 /* Body */, 0 /* String */),
|
|
1093
|
+
generateParamConfigMetadata('categoryId', false, 2 /* Body */, 0 /* String */),
|
|
1094
|
+
generateParamConfigMetadata('contextDefinition', false, 2 /* Body */, 0 /* String */),
|
|
1095
|
+
generateParamConfigMetadata('contextMapping', false, 2 /* Body */, 0 /* String */),
|
|
1096
|
+
generateParamConfigMetadata('correlationId', false, 2 /* Body */, 0 /* String */),
|
|
1097
|
+
generateParamConfigMetadata('currencyCode', false, 2 /* Body */, 0 /* String */),
|
|
1098
|
+
generateParamConfigMetadata('cursor', false, 2 /* Body */, 0 /* String */),
|
|
1099
|
+
generateParamConfigMetadata('enablePricing', false, 2 /* Body */, 1 /* Boolean */),
|
|
1100
|
+
generateParamConfigMetadata('enableQualification', false, 2 /* Body */, 1 /* Boolean */),
|
|
1101
|
+
generateParamConfigMetadata('filter', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1102
|
+
generateParamConfigMetadata('includeCatalogDetails', false, 2 /* Body */, 1 /* Boolean */),
|
|
1103
|
+
generateParamConfigMetadata('limit', false, 2 /* Body */, 3 /* Integer */),
|
|
1104
|
+
generateParamConfigMetadata('offset', false, 2 /* Body */, 3 /* Integer */),
|
|
1105
|
+
generateParamConfigMetadata('orderBy', false, 2 /* Body */, 0 /* String */, true),
|
|
1106
|
+
generateParamConfigMetadata('priceBookId', false, 2 /* Body */, 0 /* String */),
|
|
1107
|
+
generateParamConfigMetadata('pricingProcedure', false, 2 /* Body */, 0 /* String */),
|
|
1108
|
+
generateParamConfigMetadata('productClassificationId', false, 2 /* Body */, 0 /* String */),
|
|
1109
|
+
generateParamConfigMetadata('qualificationProcedure', false, 2 /* Body */, 0 /* String */),
|
|
1110
|
+
generateParamConfigMetadata('relatedObjectFilters', false, 2 /* Body */, 4 /* Unsupported */, true),
|
|
1111
|
+
generateParamConfigMetadata('userContext', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1112
|
+
generateParamConfigMetadata('guidedSelectionResponseId', false, 2 /* Body */, 0 /* String */),
|
|
1113
|
+
generateParamConfigMetadata('searchTerms', false, 2 /* Body */, 4 /* Unsupported */, true),
|
|
719
1114
|
];
|
|
720
|
-
const
|
|
721
|
-
const createResourceParams$f = /*#__PURE__*/ createResourceParams$
|
|
1115
|
+
const guidedSelectionProductList_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$f, guidedSelectionProductList_ConfigPropertyMetadata);
|
|
1116
|
+
const createResourceParams$f = /*#__PURE__*/ createResourceParams$i(guidedSelectionProductList_ConfigPropertyMetadata);
|
|
722
1117
|
function typeCheckConfig$f(untrustedConfig) {
|
|
723
1118
|
const config = {};
|
|
724
|
-
|
|
725
|
-
const
|
|
726
|
-
|
|
727
|
-
|
|
1119
|
+
typeCheckConfig$i(untrustedConfig, config, guidedSelectionProductList_ConfigPropertyMetadata);
|
|
1120
|
+
const untrustedConfig_additionalContextData = untrustedConfig.additionalContextData;
|
|
1121
|
+
config.additionalContextData = untrustedConfig_additionalContextData;
|
|
1122
|
+
const untrustedConfig_additionalFields = untrustedConfig.additionalFields;
|
|
1123
|
+
if (untrustedIsObject(untrustedConfig_additionalFields)) {
|
|
1124
|
+
const untrustedConfig_additionalFields_object = {};
|
|
1125
|
+
if (untrustedConfig_additionalFields_object !== undefined && Object.keys(untrustedConfig_additionalFields_object).length >= 0) {
|
|
1126
|
+
config.additionalFields = untrustedConfig_additionalFields_object;
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
const untrustedConfig_filter = untrustedConfig.filter;
|
|
1130
|
+
const referenceFilterInputRepresentationValidationError = validate$P(untrustedConfig_filter);
|
|
1131
|
+
if (referenceFilterInputRepresentationValidationError === null) {
|
|
1132
|
+
config.filter = untrustedConfig_filter;
|
|
1133
|
+
}
|
|
1134
|
+
const untrustedConfig_relatedObjectFilters = untrustedConfig.relatedObjectFilters;
|
|
1135
|
+
if (ArrayIsArray$1(untrustedConfig_relatedObjectFilters)) {
|
|
1136
|
+
const untrustedConfig_relatedObjectFilters_array = [];
|
|
1137
|
+
for (let i = 0, arrayLength = untrustedConfig_relatedObjectFilters.length; i < arrayLength; i++) {
|
|
1138
|
+
const untrustedConfig_relatedObjectFilters_item = untrustedConfig_relatedObjectFilters[i];
|
|
1139
|
+
const referenceRelatedObjectFilterInputRepresentationValidationError = validate$O(untrustedConfig_relatedObjectFilters_item);
|
|
1140
|
+
if (referenceRelatedObjectFilterInputRepresentationValidationError === null) {
|
|
1141
|
+
untrustedConfig_relatedObjectFilters_array.push(untrustedConfig_relatedObjectFilters_item);
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
config.relatedObjectFilters = untrustedConfig_relatedObjectFilters_array;
|
|
1145
|
+
}
|
|
1146
|
+
const untrustedConfig_userContext = untrustedConfig.userContext;
|
|
1147
|
+
if (untrustedIsObject(untrustedConfig_userContext)) {
|
|
1148
|
+
const untrustedConfig_userContext_object = {};
|
|
1149
|
+
if (untrustedConfig_userContext_object !== undefined && Object.keys(untrustedConfig_userContext_object).length >= 0) {
|
|
1150
|
+
config.userContext = untrustedConfig_userContext_object;
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1153
|
+
const untrustedConfig_searchTerms = untrustedConfig.searchTerms;
|
|
1154
|
+
if (ArrayIsArray$1(untrustedConfig_searchTerms)) {
|
|
1155
|
+
const untrustedConfig_searchTerms_array = [];
|
|
1156
|
+
for (let i = 0, arrayLength = untrustedConfig_searchTerms.length; i < arrayLength; i++) {
|
|
1157
|
+
const untrustedConfig_searchTerms_item = untrustedConfig_searchTerms[i];
|
|
1158
|
+
const referenceGuidedSelectionSearchTermInputRepresentationValidationError = validate$N(untrustedConfig_searchTerms_item);
|
|
1159
|
+
if (referenceGuidedSelectionSearchTermInputRepresentationValidationError === null) {
|
|
1160
|
+
untrustedConfig_searchTerms_array.push(untrustedConfig_searchTerms_item);
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
config.searchTerms = untrustedConfig_searchTerms_array;
|
|
728
1164
|
}
|
|
729
1165
|
return config;
|
|
730
1166
|
}
|
|
@@ -759,18 +1195,18 @@ function buildNetworkSnapshot$f(luvio, config, options) {
|
|
|
759
1195
|
throw response;
|
|
760
1196
|
});
|
|
761
1197
|
}
|
|
762
|
-
const
|
|
763
|
-
return function
|
|
764
|
-
const config = validateAdapterConfig$f(untrustedConfig,
|
|
1198
|
+
const guidedSelectionProductListAdapterFactory = (luvio) => {
|
|
1199
|
+
return function guidedSelectionProductList(untrustedConfig) {
|
|
1200
|
+
const config = validateAdapterConfig$f(untrustedConfig, guidedSelectionProductList_ConfigPropertyNames);
|
|
765
1201
|
// Invalid or incomplete config
|
|
766
1202
|
if (config === null) {
|
|
767
|
-
throw new Error('Invalid config for "
|
|
1203
|
+
throw new Error('Invalid config for "guidedSelectionProductList"');
|
|
768
1204
|
}
|
|
769
1205
|
return buildNetworkSnapshot$f(luvio, config);
|
|
770
1206
|
};
|
|
771
1207
|
};
|
|
772
1208
|
|
|
773
|
-
function validate$
|
|
1209
|
+
function validate$K(obj, path = 'SearchProductsInputRepresentation') {
|
|
774
1210
|
const v_error = (() => {
|
|
775
1211
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
776
1212
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -869,15 +1305,15 @@ function validate$M(obj, path = 'SearchProductsInputRepresentation') {
|
|
|
869
1305
|
}
|
|
870
1306
|
|
|
871
1307
|
function select$w(luvio, params) {
|
|
872
|
-
return select$
|
|
1308
|
+
return select$B();
|
|
873
1309
|
}
|
|
874
1310
|
function getResponseCacheKeys$e(storeKeyMap, luvio, resourceParams, response) {
|
|
875
|
-
getTypeCacheKeys$
|
|
1311
|
+
getTypeCacheKeys$c(storeKeyMap, luvio, response);
|
|
876
1312
|
}
|
|
877
1313
|
function ingestSuccess$e(luvio, resourceParams, response) {
|
|
878
1314
|
const { body } = response;
|
|
879
|
-
const key = keyBuilderFromType$
|
|
880
|
-
luvio.storeIngest(key, ingest$
|
|
1315
|
+
const key = keyBuilderFromType$b(luvio, body);
|
|
1316
|
+
luvio.storeIngest(key, ingest$c, body);
|
|
881
1317
|
const snapshot = luvio.storeLookup({
|
|
882
1318
|
recordId: key,
|
|
883
1319
|
node: select$w(),
|
|
@@ -910,11 +1346,11 @@ const searchProductList_ConfigPropertyMetadata = [
|
|
|
910
1346
|
generateParamConfigMetadata('requestBody', true, 2 /* Body */, 4 /* Unsupported */),
|
|
911
1347
|
];
|
|
912
1348
|
const searchProductList_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$e, searchProductList_ConfigPropertyMetadata);
|
|
913
|
-
const createResourceParams$e = /*#__PURE__*/ createResourceParams$
|
|
1349
|
+
const createResourceParams$e = /*#__PURE__*/ createResourceParams$i(searchProductList_ConfigPropertyMetadata);
|
|
914
1350
|
function typeCheckConfig$e(untrustedConfig) {
|
|
915
1351
|
const config = {};
|
|
916
1352
|
const untrustedConfig_requestBody = untrustedConfig.requestBody;
|
|
917
|
-
const referenceSearchProductsInputRepresentationValidationError = validate$
|
|
1353
|
+
const referenceSearchProductsInputRepresentationValidationError = validate$K(untrustedConfig_requestBody);
|
|
918
1354
|
if (referenceSearchProductsInputRepresentationValidationError === null) {
|
|
919
1355
|
config.requestBody = untrustedConfig_requestBody;
|
|
920
1356
|
}
|
|
@@ -962,7 +1398,7 @@ const searchProductListAdapterFactory = (luvio) => {
|
|
|
962
1398
|
};
|
|
963
1399
|
};
|
|
964
1400
|
|
|
965
|
-
function validate$
|
|
1401
|
+
function validate$J(obj, path = 'ProductDataInput') {
|
|
966
1402
|
const v_error = (() => {
|
|
967
1403
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
968
1404
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -985,14 +1421,14 @@ function validate$L(obj, path = 'ProductDataInput') {
|
|
|
985
1421
|
|
|
986
1422
|
const TTL$9 = 1000;
|
|
987
1423
|
const VERSION$h = "7d789beb75307985bad3ddf01d82b242";
|
|
988
|
-
function validate$
|
|
1424
|
+
function validate$I(obj, path = 'CpqBaseBulkDetailsOutput') {
|
|
989
1425
|
const v_error = (() => {
|
|
990
1426
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
991
1427
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
992
1428
|
}
|
|
993
1429
|
const obj_apiStatus = obj.apiStatus;
|
|
994
1430
|
const path_apiStatus = path + '.apiStatus';
|
|
995
|
-
const referencepath_apiStatusValidationError = validate$
|
|
1431
|
+
const referencepath_apiStatusValidationError = validate$T(obj_apiStatus, path_apiStatus);
|
|
996
1432
|
if (referencepath_apiStatusValidationError !== null) {
|
|
997
1433
|
let message = 'Object doesn\'t match ApiStatusOutputRepresentation (at "' + path_apiStatus + '")\n';
|
|
998
1434
|
message += referencepath_apiStatusValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1063,7 +1499,7 @@ function equals$h(existing, incoming) {
|
|
|
1063
1499
|
}
|
|
1064
1500
|
const ingest$a = function CpqBaseBulkDetailsOutputIngest(input, path, luvio, store, timestamp) {
|
|
1065
1501
|
if (process.env.NODE_ENV !== 'production') {
|
|
1066
|
-
const validateError = validate$
|
|
1502
|
+
const validateError = validate$I(input);
|
|
1067
1503
|
if (validateError !== null) {
|
|
1068
1504
|
throw validateError;
|
|
1069
1505
|
}
|
|
@@ -1137,10 +1573,10 @@ const bulkProductDetails_ConfigPropertyMetadata = [
|
|
|
1137
1573
|
generateParamConfigMetadata('qualificationProcedure', false, 2 /* Body */, 0 /* String */),
|
|
1138
1574
|
];
|
|
1139
1575
|
const bulkProductDetails_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$d, bulkProductDetails_ConfigPropertyMetadata);
|
|
1140
|
-
const createResourceParams$d = /*#__PURE__*/ createResourceParams$
|
|
1576
|
+
const createResourceParams$d = /*#__PURE__*/ createResourceParams$i(bulkProductDetails_ConfigPropertyMetadata);
|
|
1141
1577
|
function typeCheckConfig$d(untrustedConfig) {
|
|
1142
1578
|
const config = {};
|
|
1143
|
-
typeCheckConfig$
|
|
1579
|
+
typeCheckConfig$i(untrustedConfig, config, bulkProductDetails_ConfigPropertyMetadata);
|
|
1144
1580
|
const untrustedConfig_additionalFields = untrustedConfig.additionalFields;
|
|
1145
1581
|
if (untrustedIsObject(untrustedConfig_additionalFields)) {
|
|
1146
1582
|
const untrustedConfig_additionalFields_object = {};
|
|
@@ -1153,7 +1589,7 @@ function typeCheckConfig$d(untrustedConfig) {
|
|
|
1153
1589
|
const untrustedConfig_productData_array = [];
|
|
1154
1590
|
for (let i = 0, arrayLength = untrustedConfig_productData.length; i < arrayLength; i++) {
|
|
1155
1591
|
const untrustedConfig_productData_item = untrustedConfig_productData[i];
|
|
1156
|
-
const referenceProductDataInputValidationError = validate$
|
|
1592
|
+
const referenceProductDataInputValidationError = validate$J(untrustedConfig_productData_item);
|
|
1157
1593
|
if (referenceProductDataInputValidationError === null) {
|
|
1158
1594
|
untrustedConfig_productData_array.push(untrustedConfig_productData_item);
|
|
1159
1595
|
}
|
|
@@ -1211,7 +1647,7 @@ const bulkProductDetailsAdapterFactory = (luvio) => {
|
|
|
1211
1647
|
};
|
|
1212
1648
|
};
|
|
1213
1649
|
|
|
1214
|
-
function validate$
|
|
1650
|
+
function validate$H(obj, path = 'ProductDetailsInputRepresentation') {
|
|
1215
1651
|
const v_error = (() => {
|
|
1216
1652
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1217
1653
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1262,14 +1698,14 @@ function validate$J(obj, path = 'ProductDetailsInputRepresentation') {
|
|
|
1262
1698
|
|
|
1263
1699
|
const TTL$8 = 1000;
|
|
1264
1700
|
const VERSION$g = "6e77a7585bc4d094518eb201471d85ea";
|
|
1265
|
-
function validate$
|
|
1701
|
+
function validate$G(obj, path = 'CpqBaseDetailsOutputRepresentation') {
|
|
1266
1702
|
const v_error = (() => {
|
|
1267
1703
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1268
1704
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1269
1705
|
}
|
|
1270
1706
|
const obj_apiStatus = obj.apiStatus;
|
|
1271
1707
|
const path_apiStatus = path + '.apiStatus';
|
|
1272
|
-
const referencepath_apiStatusValidationError = validate$
|
|
1708
|
+
const referencepath_apiStatusValidationError = validate$T(obj_apiStatus, path_apiStatus);
|
|
1273
1709
|
if (referencepath_apiStatusValidationError !== null) {
|
|
1274
1710
|
let message = 'Object doesn\'t match ApiStatusOutputRepresentation (at "' + path_apiStatus + '")\n';
|
|
1275
1711
|
message += referencepath_apiStatusValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1317,7 +1753,7 @@ function equals$g(existing, incoming) {
|
|
|
1317
1753
|
}
|
|
1318
1754
|
const ingest$9 = function CpqBaseDetailsOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1319
1755
|
if (process.env.NODE_ENV !== 'production') {
|
|
1320
|
-
const validateError = validate$
|
|
1756
|
+
const validateError = validate$G(input);
|
|
1321
1757
|
if (validateError !== null) {
|
|
1322
1758
|
throw validateError;
|
|
1323
1759
|
}
|
|
@@ -1380,12 +1816,12 @@ const productDetails_ConfigPropertyMetadata = [
|
|
|
1380
1816
|
generateParamConfigMetadata('requestBody', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1381
1817
|
];
|
|
1382
1818
|
const productDetails_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$c, productDetails_ConfigPropertyMetadata);
|
|
1383
|
-
const createResourceParams$c = /*#__PURE__*/ createResourceParams$
|
|
1819
|
+
const createResourceParams$c = /*#__PURE__*/ createResourceParams$i(productDetails_ConfigPropertyMetadata);
|
|
1384
1820
|
function typeCheckConfig$c(untrustedConfig) {
|
|
1385
1821
|
const config = {};
|
|
1386
|
-
typeCheckConfig$
|
|
1822
|
+
typeCheckConfig$i(untrustedConfig, config, productDetails_ConfigPropertyMetadata);
|
|
1387
1823
|
const untrustedConfig_requestBody = untrustedConfig.requestBody;
|
|
1388
|
-
const referenceProductDetailsInputRepresentationValidationError = validate$
|
|
1824
|
+
const referenceProductDetailsInputRepresentationValidationError = validate$H(untrustedConfig_requestBody);
|
|
1389
1825
|
if (referenceProductDetailsInputRepresentationValidationError === null) {
|
|
1390
1826
|
config.requestBody = untrustedConfig_requestBody;
|
|
1391
1827
|
}
|
|
@@ -1433,64 +1869,16 @@ const productDetailsAdapterFactory = (luvio) => {
|
|
|
1433
1869
|
};
|
|
1434
1870
|
};
|
|
1435
1871
|
|
|
1436
|
-
function validate$H(obj, path = 'FilterCriteriaInputRepresentation') {
|
|
1437
|
-
const v_error = (() => {
|
|
1438
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1439
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1440
|
-
}
|
|
1441
|
-
const obj_operator = obj.operator;
|
|
1442
|
-
const path_operator = path + '.operator';
|
|
1443
|
-
if (typeof obj_operator !== 'string') {
|
|
1444
|
-
return new TypeError('Expected "string" but received "' + typeof obj_operator + '" (at "' + path_operator + '")');
|
|
1445
|
-
}
|
|
1446
|
-
const obj_property = obj.property;
|
|
1447
|
-
const path_property = path + '.property';
|
|
1448
|
-
if (typeof obj_property !== 'string') {
|
|
1449
|
-
return new TypeError('Expected "string" but received "' + typeof obj_property + '" (at "' + path_property + '")');
|
|
1450
|
-
}
|
|
1451
|
-
const obj_value = obj.value;
|
|
1452
|
-
const path_value = path + '.value';
|
|
1453
|
-
if (obj_value === undefined) {
|
|
1454
|
-
return new TypeError('Expected "defined" but received "' + typeof obj_value + '" (at "' + path_value + '")');
|
|
1455
|
-
}
|
|
1456
|
-
})();
|
|
1457
|
-
return v_error === undefined ? null : v_error;
|
|
1458
|
-
}
|
|
1459
|
-
|
|
1460
|
-
function validate$G(obj, path = 'FilterInputRepresentation') {
|
|
1461
|
-
const v_error = (() => {
|
|
1462
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1463
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1464
|
-
}
|
|
1465
|
-
const obj_criteria = obj.criteria;
|
|
1466
|
-
const path_criteria = path + '.criteria';
|
|
1467
|
-
if (!ArrayIsArray(obj_criteria)) {
|
|
1468
|
-
return new TypeError('Expected "array" but received "' + typeof obj_criteria + '" (at "' + path_criteria + '")');
|
|
1469
|
-
}
|
|
1470
|
-
for (let i = 0; i < obj_criteria.length; i++) {
|
|
1471
|
-
const obj_criteria_item = obj_criteria[i];
|
|
1472
|
-
const path_criteria_item = path_criteria + '[' + i + ']';
|
|
1473
|
-
const referencepath_criteria_itemValidationError = validate$H(obj_criteria_item, path_criteria_item);
|
|
1474
|
-
if (referencepath_criteria_itemValidationError !== null) {
|
|
1475
|
-
let message = 'Object doesn\'t match FilterCriteriaInputRepresentation (at "' + path_criteria_item + '")\n';
|
|
1476
|
-
message += referencepath_criteria_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1477
|
-
return new TypeError(message);
|
|
1478
|
-
}
|
|
1479
|
-
}
|
|
1480
|
-
})();
|
|
1481
|
-
return v_error === undefined ? null : v_error;
|
|
1482
|
-
}
|
|
1483
|
-
|
|
1484
1872
|
function select$r(luvio, params) {
|
|
1485
|
-
return select$
|
|
1873
|
+
return select$B();
|
|
1486
1874
|
}
|
|
1487
1875
|
function getResponseCacheKeys$b(storeKeyMap, luvio, resourceParams, response) {
|
|
1488
|
-
getTypeCacheKeys$
|
|
1876
|
+
getTypeCacheKeys$c(storeKeyMap, luvio, response);
|
|
1489
1877
|
}
|
|
1490
1878
|
function ingestSuccess$b(luvio, resourceParams, response) {
|
|
1491
1879
|
const { body } = response;
|
|
1492
|
-
const key = keyBuilderFromType$
|
|
1493
|
-
luvio.storeIngest(key, ingest$
|
|
1880
|
+
const key = keyBuilderFromType$b(luvio, body);
|
|
1881
|
+
luvio.storeIngest(key, ingest$c, body);
|
|
1494
1882
|
const snapshot = luvio.storeLookup({
|
|
1495
1883
|
recordId: key,
|
|
1496
1884
|
node: select$r(),
|
|
@@ -1534,14 +1922,14 @@ const categoryList_ConfigPropertyMetadata = [
|
|
|
1534
1922
|
generateParamConfigMetadata('userContext', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1535
1923
|
];
|
|
1536
1924
|
const categoryList_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$b, categoryList_ConfigPropertyMetadata);
|
|
1537
|
-
const createResourceParams$b = /*#__PURE__*/ createResourceParams$
|
|
1925
|
+
const createResourceParams$b = /*#__PURE__*/ createResourceParams$i(categoryList_ConfigPropertyMetadata);
|
|
1538
1926
|
function typeCheckConfig$b(untrustedConfig) {
|
|
1539
1927
|
const config = {};
|
|
1540
|
-
typeCheckConfig$
|
|
1928
|
+
typeCheckConfig$i(untrustedConfig, config, categoryList_ConfigPropertyMetadata);
|
|
1541
1929
|
const untrustedConfig_additionalContextData = untrustedConfig.additionalContextData;
|
|
1542
1930
|
config.additionalContextData = untrustedConfig_additionalContextData;
|
|
1543
1931
|
const untrustedConfig_filter = untrustedConfig.filter;
|
|
1544
|
-
const referenceFilterInputRepresentationValidationError = validate$
|
|
1932
|
+
const referenceFilterInputRepresentationValidationError = validate$P(untrustedConfig_filter);
|
|
1545
1933
|
if (referenceFilterInputRepresentationValidationError === null) {
|
|
1546
1934
|
config.filter = untrustedConfig_filter;
|
|
1547
1935
|
}
|
|
@@ -1656,14 +2044,14 @@ const categoryDetails_ConfigPropertyMetadata = [
|
|
|
1656
2044
|
generateParamConfigMetadata('userContext', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1657
2045
|
];
|
|
1658
2046
|
const categoryDetails_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$a, categoryDetails_ConfigPropertyMetadata);
|
|
1659
|
-
const createResourceParams$a = /*#__PURE__*/ createResourceParams$
|
|
2047
|
+
const createResourceParams$a = /*#__PURE__*/ createResourceParams$i(categoryDetails_ConfigPropertyMetadata);
|
|
1660
2048
|
function typeCheckConfig$a(untrustedConfig) {
|
|
1661
2049
|
const config = {};
|
|
1662
|
-
typeCheckConfig$
|
|
2050
|
+
typeCheckConfig$i(untrustedConfig, config, categoryDetails_ConfigPropertyMetadata);
|
|
1663
2051
|
const untrustedConfig_additionalContextData = untrustedConfig.additionalContextData;
|
|
1664
2052
|
config.additionalContextData = untrustedConfig_additionalContextData;
|
|
1665
2053
|
const untrustedConfig_filter = untrustedConfig.filter;
|
|
1666
|
-
const referenceFilterInputRepresentationValidationError = validate$
|
|
2054
|
+
const referenceFilterInputRepresentationValidationError = validate$P(untrustedConfig_filter);
|
|
1667
2055
|
if (referenceFilterInputRepresentationValidationError === null) {
|
|
1668
2056
|
config.filter = untrustedConfig_filter;
|
|
1669
2057
|
}
|
|
@@ -1804,7 +2192,7 @@ function validate$E(obj, path = 'CreateCartOutputRepresentation') {
|
|
|
1804
2192
|
}
|
|
1805
2193
|
const obj_apiStatus = obj.apiStatus;
|
|
1806
2194
|
const path_apiStatus = path + '.apiStatus';
|
|
1807
|
-
const referencepath_apiStatusValidationError = validate$
|
|
2195
|
+
const referencepath_apiStatusValidationError = validate$T(obj_apiStatus, path_apiStatus);
|
|
1808
2196
|
if (referencepath_apiStatusValidationError !== null) {
|
|
1809
2197
|
let message = 'Object doesn\'t match ApiStatusOutputRepresentation (at "' + path_apiStatus + '")\n';
|
|
1810
2198
|
message += referencepath_apiStatusValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1911,7 +2299,7 @@ const createCart_ConfigPropertyMetadata = [
|
|
|
1911
2299
|
generateParamConfigMetadata('createCartRequestPayload', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1912
2300
|
];
|
|
1913
2301
|
const createCart_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, createCart_ConfigPropertyMetadata);
|
|
1914
|
-
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$
|
|
2302
|
+
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$i(createCart_ConfigPropertyMetadata);
|
|
1915
2303
|
function typeCheckConfig$9(untrustedConfig) {
|
|
1916
2304
|
const config = {};
|
|
1917
2305
|
const untrustedConfig_createCartRequestPayload = untrustedConfig.createCartRequestPayload;
|
|
@@ -3946,7 +4334,7 @@ function validate$w(obj, path = 'GetCartOutputRepresentation') {
|
|
|
3946
4334
|
}
|
|
3947
4335
|
const obj_apiStatus = obj.apiStatus;
|
|
3948
4336
|
const path_apiStatus = path + '.apiStatus';
|
|
3949
|
-
const referencepath_apiStatusValidationError = validate$
|
|
4337
|
+
const referencepath_apiStatusValidationError = validate$T(obj_apiStatus, path_apiStatus);
|
|
3950
4338
|
if (referencepath_apiStatusValidationError !== null) {
|
|
3951
4339
|
let message = 'Object doesn\'t match ApiStatusOutputRepresentation (at "' + path_apiStatus + '")\n';
|
|
3952
4340
|
message += referencepath_apiStatusValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -3994,7 +4382,7 @@ function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
|
3994
4382
|
return input;
|
|
3995
4383
|
}
|
|
3996
4384
|
const select$g = function GetCartOutputRepresentationSelect() {
|
|
3997
|
-
const { selections: ApiStatusOutputRepresentation__selections, opaque: ApiStatusOutputRepresentation__opaque, } = select$
|
|
4385
|
+
const { selections: ApiStatusOutputRepresentation__selections, opaque: ApiStatusOutputRepresentation__opaque, } = select$C();
|
|
3998
4386
|
const { selections: CartItemsOutputRepresentation__selections, opaque: CartItemsOutputRepresentation__opaque, } = select$i();
|
|
3999
4387
|
const { selections: PricingTotalOutputRepresentation__selections, opaque: PricingTotalOutputRepresentation__opaque, } = select$h();
|
|
4000
4388
|
return {
|
|
@@ -4044,7 +4432,7 @@ function equals$7(existing, incoming) {
|
|
|
4044
4432
|
}
|
|
4045
4433
|
const existing_apiStatus = existing.apiStatus;
|
|
4046
4434
|
const incoming_apiStatus = incoming.apiStatus;
|
|
4047
|
-
if (!(equals$
|
|
4435
|
+
if (!(equals$k(existing_apiStatus, incoming_apiStatus))) {
|
|
4048
4436
|
return false;
|
|
4049
4437
|
}
|
|
4050
4438
|
const existing_cartItems = existing.cartItems;
|
|
@@ -4153,14 +4541,14 @@ const getCart_ConfigPropertyMetadata = [
|
|
|
4153
4541
|
generateParamConfigMetadata('cartId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4154
4542
|
];
|
|
4155
4543
|
const getCart_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, getCart_ConfigPropertyMetadata);
|
|
4156
|
-
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$
|
|
4544
|
+
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$i(getCart_ConfigPropertyMetadata);
|
|
4157
4545
|
function keyBuilder$7(luvio, config) {
|
|
4158
4546
|
const resourceParams = createResourceParams$8(config);
|
|
4159
4547
|
return keyBuilder$8(luvio, resourceParams);
|
|
4160
4548
|
}
|
|
4161
4549
|
function typeCheckConfig$8(untrustedConfig) {
|
|
4162
4550
|
const config = {};
|
|
4163
|
-
typeCheckConfig$
|
|
4551
|
+
typeCheckConfig$i(untrustedConfig, config, getCart_ConfigPropertyMetadata);
|
|
4164
4552
|
return config;
|
|
4165
4553
|
}
|
|
4166
4554
|
function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
|
|
@@ -4389,7 +4777,7 @@ function validate$s(obj, path = 'UpdateCartOutputRepresentation') {
|
|
|
4389
4777
|
}
|
|
4390
4778
|
const obj_apiStatus = obj.apiStatus;
|
|
4391
4779
|
const path_apiStatus = path + '.apiStatus';
|
|
4392
|
-
const referencepath_apiStatusValidationError = validate$
|
|
4780
|
+
const referencepath_apiStatusValidationError = validate$T(obj_apiStatus, path_apiStatus);
|
|
4393
4781
|
if (referencepath_apiStatusValidationError !== null) {
|
|
4394
4782
|
let message = 'Object doesn\'t match ApiStatusOutputRepresentation (at "' + path_apiStatus + '")\n';
|
|
4395
4783
|
message += referencepath_apiStatusValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -4498,10 +4886,10 @@ const updateCart_ConfigPropertyMetadata = [
|
|
|
4498
4886
|
generateParamConfigMetadata('requestBody', true, 2 /* Body */, 4 /* Unsupported */),
|
|
4499
4887
|
];
|
|
4500
4888
|
const updateCart_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, updateCart_ConfigPropertyMetadata);
|
|
4501
|
-
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$
|
|
4889
|
+
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$i(updateCart_ConfigPropertyMetadata);
|
|
4502
4890
|
function typeCheckConfig$7(untrustedConfig) {
|
|
4503
4891
|
const config = {};
|
|
4504
|
-
typeCheckConfig$
|
|
4892
|
+
typeCheckConfig$i(untrustedConfig, config, updateCart_ConfigPropertyMetadata);
|
|
4505
4893
|
const untrustedConfig_requestBody = untrustedConfig.requestBody;
|
|
4506
4894
|
const referenceUpdateCartInputRepresentationValidationError = validate$v(untrustedConfig_requestBody);
|
|
4507
4895
|
if (referenceUpdateCartInputRepresentationValidationError === null) {
|
|
@@ -4597,7 +4985,7 @@ function validate$q(obj, path = 'UpdateCartItemsOutputRepresentation') {
|
|
|
4597
4985
|
}
|
|
4598
4986
|
const obj_apiStatus = obj.apiStatus;
|
|
4599
4987
|
const path_apiStatus = path + '.apiStatus';
|
|
4600
|
-
const referencepath_apiStatusValidationError = validate$
|
|
4988
|
+
const referencepath_apiStatusValidationError = validate$T(obj_apiStatus, path_apiStatus);
|
|
4601
4989
|
if (referencepath_apiStatusValidationError !== null) {
|
|
4602
4990
|
let message = 'Object doesn\'t match ApiStatusOutputRepresentation (at "' + path_apiStatus + '")\n';
|
|
4603
4991
|
message += referencepath_apiStatusValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -4705,10 +5093,10 @@ const updateCartItems_ConfigPropertyMetadata = [
|
|
|
4705
5093
|
generateParamConfigMetadata('requestBody', true, 2 /* Body */, 4 /* Unsupported */),
|
|
4706
5094
|
];
|
|
4707
5095
|
const updateCartItems_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, updateCartItems_ConfigPropertyMetadata);
|
|
4708
|
-
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$
|
|
5096
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$i(updateCartItems_ConfigPropertyMetadata);
|
|
4709
5097
|
function typeCheckConfig$6(untrustedConfig) {
|
|
4710
5098
|
const config = {};
|
|
4711
|
-
typeCheckConfig$
|
|
5099
|
+
typeCheckConfig$i(untrustedConfig, config, updateCartItems_ConfigPropertyMetadata);
|
|
4712
5100
|
const untrustedConfig_requestBody = untrustedConfig.requestBody;
|
|
4713
5101
|
const referenceUpdateCartItemsInputRepresentationValidationError = validate$r(untrustedConfig_requestBody);
|
|
4714
5102
|
if (referenceUpdateCartItemsInputRepresentationValidationError === null) {
|
|
@@ -4804,7 +5192,7 @@ function validate$o(obj, path = 'CreateCartItemsOutputRepresentation') {
|
|
|
4804
5192
|
}
|
|
4805
5193
|
const obj_apiStatus = obj.apiStatus;
|
|
4806
5194
|
const path_apiStatus = path + '.apiStatus';
|
|
4807
|
-
const referencepath_apiStatusValidationError = validate$
|
|
5195
|
+
const referencepath_apiStatusValidationError = validate$T(obj_apiStatus, path_apiStatus);
|
|
4808
5196
|
if (referencepath_apiStatusValidationError !== null) {
|
|
4809
5197
|
let message = 'Object doesn\'t match ApiStatusOutputRepresentation (at "' + path_apiStatus + '")\n';
|
|
4810
5198
|
message += referencepath_apiStatusValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -4912,10 +5300,10 @@ const createCartItems_ConfigPropertyMetadata = [
|
|
|
4912
5300
|
generateParamConfigMetadata('requestBody', true, 2 /* Body */, 4 /* Unsupported */),
|
|
4913
5301
|
];
|
|
4914
5302
|
const createCartItems_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, createCartItems_ConfigPropertyMetadata);
|
|
4915
|
-
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$
|
|
5303
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$i(createCartItems_ConfigPropertyMetadata);
|
|
4916
5304
|
function typeCheckConfig$5(untrustedConfig) {
|
|
4917
5305
|
const config = {};
|
|
4918
|
-
typeCheckConfig$
|
|
5306
|
+
typeCheckConfig$i(untrustedConfig, config, createCartItems_ConfigPropertyMetadata);
|
|
4919
5307
|
const untrustedConfig_requestBody = untrustedConfig.requestBody;
|
|
4920
5308
|
const referenceCreateCartItemsInputRepresentationValidationError = validate$p(untrustedConfig_requestBody);
|
|
4921
5309
|
if (referenceCreateCartItemsInputRepresentationValidationError === null) {
|
|
@@ -5011,7 +5399,7 @@ function validate$m(obj, path = 'CartPricingTotalOutputRepresentation') {
|
|
|
5011
5399
|
}
|
|
5012
5400
|
const obj_apiStatus = obj.apiStatus;
|
|
5013
5401
|
const path_apiStatus = path + '.apiStatus';
|
|
5014
|
-
const referencepath_apiStatusValidationError = validate$
|
|
5402
|
+
const referencepath_apiStatusValidationError = validate$T(obj_apiStatus, path_apiStatus);
|
|
5015
5403
|
if (referencepath_apiStatusValidationError !== null) {
|
|
5016
5404
|
let message = 'Object doesn\'t match ApiStatusOutputRepresentation (at "' + path_apiStatus + '")\n';
|
|
5017
5405
|
message += referencepath_apiStatusValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -5136,10 +5524,10 @@ const priceCart_ConfigPropertyMetadata = [
|
|
|
5136
5524
|
generateParamConfigMetadata('requestBody', true, 2 /* Body */, 4 /* Unsupported */),
|
|
5137
5525
|
];
|
|
5138
5526
|
const priceCart_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, priceCart_ConfigPropertyMetadata);
|
|
5139
|
-
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$
|
|
5527
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$i(priceCart_ConfigPropertyMetadata);
|
|
5140
5528
|
function typeCheckConfig$4(untrustedConfig) {
|
|
5141
5529
|
const config = {};
|
|
5142
|
-
typeCheckConfig$
|
|
5530
|
+
typeCheckConfig$i(untrustedConfig, config, priceCart_ConfigPropertyMetadata);
|
|
5143
5531
|
const untrustedConfig_requestBody = untrustedConfig.requestBody;
|
|
5144
5532
|
const referencePriceCartInputRepresentationValidationError = validate$n(untrustedConfig_requestBody);
|
|
5145
5533
|
if (referencePriceCartInputRepresentationValidationError === null) {
|
|
@@ -6916,7 +7304,7 @@ const configure_ConfigPropertyMetadata = [
|
|
|
6916
7304
|
generateParamConfigMetadata('configuratorInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
6917
7305
|
];
|
|
6918
7306
|
const configure_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, configure_ConfigPropertyMetadata);
|
|
6919
|
-
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$
|
|
7307
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$i(configure_ConfigPropertyMetadata);
|
|
6920
7308
|
function typeCheckConfig$3(untrustedConfig) {
|
|
6921
7309
|
const config = {};
|
|
6922
7310
|
const untrustedConfig_configuratorInput = untrustedConfig.configuratorInput;
|
|
@@ -7128,10 +7516,10 @@ const createRule_ConfigPropertyMetadata = [
|
|
|
7128
7516
|
generateParamConfigMetadata('usageSubType', false, 2 /* Body */, 4 /* Unsupported */),
|
|
7129
7517
|
];
|
|
7130
7518
|
const createRule_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, createRule_ConfigPropertyMetadata);
|
|
7131
|
-
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$
|
|
7519
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$i(createRule_ConfigPropertyMetadata);
|
|
7132
7520
|
function typeCheckConfig$2(untrustedConfig) {
|
|
7133
7521
|
const config = {};
|
|
7134
|
-
typeCheckConfig$
|
|
7522
|
+
typeCheckConfig$i(untrustedConfig, config, createRule_ConfigPropertyMetadata);
|
|
7135
7523
|
const untrustedConfig_actions = untrustedConfig.actions;
|
|
7136
7524
|
if (ArrayIsArray$1(untrustedConfig_actions)) {
|
|
7137
7525
|
const untrustedConfig_actions_array = [];
|
|
@@ -7269,10 +7657,10 @@ const updateRule_ConfigPropertyMetadata = [
|
|
|
7269
7657
|
generateParamConfigMetadata('usageSubType', false, 2 /* Body */, 4 /* Unsupported */),
|
|
7270
7658
|
];
|
|
7271
7659
|
const updateRule_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, updateRule_ConfigPropertyMetadata);
|
|
7272
|
-
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$
|
|
7660
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$i(updateRule_ConfigPropertyMetadata);
|
|
7273
7661
|
function typeCheckConfig$1(untrustedConfig) {
|
|
7274
7662
|
const config = {};
|
|
7275
|
-
typeCheckConfig$
|
|
7663
|
+
typeCheckConfig$i(untrustedConfig, config, updateRule_ConfigPropertyMetadata);
|
|
7276
7664
|
const untrustedConfig_actions = untrustedConfig.actions;
|
|
7277
7665
|
if (ArrayIsArray$1(untrustedConfig_actions)) {
|
|
7278
7666
|
const untrustedConfig_actions_array = [];
|
|
@@ -7474,10 +7862,10 @@ const validateRule_ConfigPropertyMetadata = [
|
|
|
7474
7862
|
generateParamConfigMetadata('productConfigurationRuleId', true, 2 /* Body */, 0 /* String */),
|
|
7475
7863
|
];
|
|
7476
7864
|
const validateRule_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, validateRule_ConfigPropertyMetadata);
|
|
7477
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
7865
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$i(validateRule_ConfigPropertyMetadata);
|
|
7478
7866
|
function typeCheckConfig(untrustedConfig) {
|
|
7479
7867
|
const config = {};
|
|
7480
|
-
typeCheckConfig$
|
|
7868
|
+
typeCheckConfig$i(untrustedConfig, config, validateRule_ConfigPropertyMetadata);
|
|
7481
7869
|
return config;
|
|
7482
7870
|
}
|
|
7483
7871
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
@@ -7522,4 +7910,4 @@ const validateRuleAdapterFactory = (luvio) => {
|
|
|
7522
7910
|
};
|
|
7523
7911
|
};
|
|
7524
7912
|
|
|
7525
|
-
export { bulkProductDetailsAdapterFactory, categoryDetailsAdapterFactory, categoryListAdapterFactory, configureAdapterFactory, createCartAdapterFactory, createCartItemsAdapterFactory, createRuleAdapterFactory, getCartAdapterFactory, previewAdapterFactory, priceCartAdapterFactory, productDetailsAdapterFactory, productListAdapterFactory, searchProductListAdapterFactory, updateCartAdapterFactory, updateCartItemsAdapterFactory, updateRuleAdapterFactory, validateRuleAdapterFactory };
|
|
7913
|
+
export { bulkProductDetailsAdapterFactory, categoryDetailsAdapterFactory, categoryListAdapterFactory, configureAdapterFactory, createCartAdapterFactory, createCartItemsAdapterFactory, createRuleAdapterFactory, getCartAdapterFactory, guidedSelectionProductListAdapterFactory, previewAdapterFactory, priceCartAdapterFactory, productDetailsAdapterFactory, productListAdapterFactory, searchProductListAdapterFactory, updateCartAdapterFactory, updateCartItemsAdapterFactory, updateRuleAdapterFactory, validateRuleAdapterFactory };
|