@salesforce/lds-adapters-service-ecm 1.328.0 → 1.329.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/service-ecm.js +360 -128
- package/dist/es/es2018/types/src/generated/adapters/updateEpcCategories.d.ts +17 -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/patchConnectCatalogCategoriesByCatalogId.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/types/CategoriesInputRepresentation.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/CategoryAndParentErrorOutputRepresentation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/CategoryAndParentOutputRepresentation.d.ts +48 -0
- package/dist/es/es2018/types/src/generated/types/CategoryInput.d.ts +31 -0
- package/package.json +3 -3
- package/sfdc/index.js +424 -189
- package/src/raml/api.raml +66 -0
- package/src/raml/luvio.raml +9 -0
package/sfdc/index.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
15
|
import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
|
|
16
16
|
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
17
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$
|
|
17
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$5, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2, typeCheckConfig as typeCheckConfig$5 } from 'force/luvioEngine';
|
|
18
18
|
|
|
19
19
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
20
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -159,7 +159,7 @@ function createLink(ref) {
|
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
function validate$
|
|
162
|
+
function validate$a(obj, path = 'CatalogItemCreateInputRepresentation') {
|
|
163
163
|
const v_error = (() => {
|
|
164
164
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
165
165
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -168,8 +168,8 @@ function validate$7(obj, path = 'CatalogItemCreateInputRepresentation') {
|
|
|
168
168
|
return v_error === undefined ? null : v_error;
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
const VERSION$
|
|
172
|
-
function validate$
|
|
171
|
+
const VERSION$5 = "984f5657f237c67c169022cb991d17de";
|
|
172
|
+
function validate$9(obj, path = 'CatalogItemAttributeOutputRepresentation') {
|
|
173
173
|
const v_error = (() => {
|
|
174
174
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
175
175
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -222,10 +222,10 @@ function validate$6(obj, path = 'CatalogItemAttributeOutputRepresentation') {
|
|
|
222
222
|
})();
|
|
223
223
|
return v_error === undefined ? null : v_error;
|
|
224
224
|
}
|
|
225
|
-
const select$
|
|
225
|
+
const select$a = function CatalogItemAttributeOutputRepresentationSelect() {
|
|
226
226
|
return {
|
|
227
227
|
kind: 'Fragment',
|
|
228
|
-
version: VERSION$
|
|
228
|
+
version: VERSION$5,
|
|
229
229
|
private: [],
|
|
230
230
|
selections: [
|
|
231
231
|
{
|
|
@@ -267,7 +267,7 @@ const select$8 = function CatalogItemAttributeOutputRepresentationSelect() {
|
|
|
267
267
|
]
|
|
268
268
|
};
|
|
269
269
|
};
|
|
270
|
-
function equals$
|
|
270
|
+
function equals$5(existing, incoming) {
|
|
271
271
|
const existing_isHidden = existing.isHidden;
|
|
272
272
|
const incoming_isHidden = incoming.isHidden;
|
|
273
273
|
if (!(existing_isHidden === incoming_isHidden)) {
|
|
@@ -316,8 +316,8 @@ function equals$4(existing, incoming) {
|
|
|
316
316
|
return true;
|
|
317
317
|
}
|
|
318
318
|
|
|
319
|
-
const VERSION$
|
|
320
|
-
function validate$
|
|
319
|
+
const VERSION$4 = "a629c7f39e6f7bfcb57e38849c46ba98";
|
|
320
|
+
function validate$8(obj, path = 'FulfillmentFlowOutputRepresentation') {
|
|
321
321
|
const v_error = (() => {
|
|
322
322
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
323
323
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -335,10 +335,10 @@ function validate$5(obj, path = 'FulfillmentFlowOutputRepresentation') {
|
|
|
335
335
|
})();
|
|
336
336
|
return v_error === undefined ? null : v_error;
|
|
337
337
|
}
|
|
338
|
-
const select$
|
|
338
|
+
const select$9 = function FulfillmentFlowOutputRepresentationSelect() {
|
|
339
339
|
return {
|
|
340
340
|
kind: 'Fragment',
|
|
341
|
-
version: VERSION$
|
|
341
|
+
version: VERSION$4,
|
|
342
342
|
private: [],
|
|
343
343
|
selections: [
|
|
344
344
|
{
|
|
@@ -352,7 +352,7 @@ const select$7 = function FulfillmentFlowOutputRepresentationSelect() {
|
|
|
352
352
|
]
|
|
353
353
|
};
|
|
354
354
|
};
|
|
355
|
-
function equals$
|
|
355
|
+
function equals$4(existing, incoming) {
|
|
356
356
|
const existing_id = existing.id;
|
|
357
357
|
const incoming_id = incoming.id;
|
|
358
358
|
if (!(existing_id === incoming_id)) {
|
|
@@ -366,8 +366,8 @@ function equals$3(existing, incoming) {
|
|
|
366
366
|
return true;
|
|
367
367
|
}
|
|
368
368
|
|
|
369
|
-
const VERSION$
|
|
370
|
-
function validate$
|
|
369
|
+
const VERSION$3 = "d0fe6f2d5b8246f10afe4067d3721d5b";
|
|
370
|
+
function validate$7(obj, path = 'IntakeFormOutputRepresentation') {
|
|
371
371
|
const v_error = (() => {
|
|
372
372
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
373
373
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -385,10 +385,10 @@ function validate$4(obj, path = 'IntakeFormOutputRepresentation') {
|
|
|
385
385
|
})();
|
|
386
386
|
return v_error === undefined ? null : v_error;
|
|
387
387
|
}
|
|
388
|
-
const select$
|
|
388
|
+
const select$8 = function IntakeFormOutputRepresentationSelect() {
|
|
389
389
|
return {
|
|
390
390
|
kind: 'Fragment',
|
|
391
|
-
version: VERSION$
|
|
391
|
+
version: VERSION$3,
|
|
392
392
|
private: [],
|
|
393
393
|
selections: [
|
|
394
394
|
{
|
|
@@ -402,7 +402,7 @@ const select$6 = function IntakeFormOutputRepresentationSelect() {
|
|
|
402
402
|
]
|
|
403
403
|
};
|
|
404
404
|
};
|
|
405
|
-
function equals$
|
|
405
|
+
function equals$3(existing, incoming) {
|
|
406
406
|
const existing_id = existing.id;
|
|
407
407
|
const incoming_id = incoming.id;
|
|
408
408
|
if (!(existing_id === incoming_id)) {
|
|
@@ -416,9 +416,9 @@ function equals$2(existing, incoming) {
|
|
|
416
416
|
return true;
|
|
417
417
|
}
|
|
418
418
|
|
|
419
|
-
const TTL$
|
|
420
|
-
const VERSION$
|
|
421
|
-
function validate$
|
|
419
|
+
const TTL$2 = 6000;
|
|
420
|
+
const VERSION$2 = "d0103a1b0725c5c2006308b12e54542c";
|
|
421
|
+
function validate$6(obj, path = 'CatalogItemOutputRepresentation') {
|
|
422
422
|
const v_error = (() => {
|
|
423
423
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
424
424
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -443,7 +443,7 @@ function validate$3(obj, path = 'CatalogItemOutputRepresentation') {
|
|
|
443
443
|
for (let i = 0; i < obj_attributes.length; i++) {
|
|
444
444
|
const obj_attributes_item = obj_attributes[i];
|
|
445
445
|
const path_attributes_item = path_attributes + '[' + i + ']';
|
|
446
|
-
const referencepath_attributes_itemValidationError = validate$
|
|
446
|
+
const referencepath_attributes_itemValidationError = validate$9(obj_attributes_item, path_attributes_item);
|
|
447
447
|
if (referencepath_attributes_itemValidationError !== null) {
|
|
448
448
|
let message = 'Object doesn\'t match CatalogItemAttributeOutputRepresentation (at "' + path_attributes_item + '")\n';
|
|
449
449
|
message += referencepath_attributes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -479,7 +479,7 @@ function validate$3(obj, path = 'CatalogItemOutputRepresentation') {
|
|
|
479
479
|
}
|
|
480
480
|
const obj_fulfillmentFlow = obj.fulfillmentFlow;
|
|
481
481
|
const path_fulfillmentFlow = path + '.fulfillmentFlow';
|
|
482
|
-
const referencepath_fulfillmentFlowValidationError = validate$
|
|
482
|
+
const referencepath_fulfillmentFlowValidationError = validate$8(obj_fulfillmentFlow, path_fulfillmentFlow);
|
|
483
483
|
if (referencepath_fulfillmentFlowValidationError !== null) {
|
|
484
484
|
let message = 'Object doesn\'t match FulfillmentFlowOutputRepresentation (at "' + path_fulfillmentFlow + '")\n';
|
|
485
485
|
message += referencepath_fulfillmentFlowValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -487,7 +487,7 @@ function validate$3(obj, path = 'CatalogItemOutputRepresentation') {
|
|
|
487
487
|
}
|
|
488
488
|
const obj_intakeForm = obj.intakeForm;
|
|
489
489
|
const path_intakeForm = path + '.intakeForm';
|
|
490
|
-
const referencepath_intakeFormValidationError = validate$
|
|
490
|
+
const referencepath_intakeFormValidationError = validate$7(obj_intakeForm, path_intakeForm);
|
|
491
491
|
if (referencepath_intakeFormValidationError !== null) {
|
|
492
492
|
let message = 'Object doesn\'t match IntakeFormOutputRepresentation (at "' + path_intakeForm + '")\n';
|
|
493
493
|
message += referencepath_intakeFormValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -535,26 +535,26 @@ function validate$3(obj, path = 'CatalogItemOutputRepresentation') {
|
|
|
535
535
|
})();
|
|
536
536
|
return v_error === undefined ? null : v_error;
|
|
537
537
|
}
|
|
538
|
-
const RepresentationType$
|
|
539
|
-
function keyBuilder$
|
|
540
|
-
return keyPrefix + '::' + RepresentationType$
|
|
538
|
+
const RepresentationType$2 = 'CatalogItemOutputRepresentation';
|
|
539
|
+
function keyBuilder$5(luvio, config) {
|
|
540
|
+
return keyPrefix + '::' + RepresentationType$2 + ':' + config.catalogItemId;
|
|
541
541
|
}
|
|
542
|
-
function keyBuilderFromType(luvio, object) {
|
|
542
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
543
543
|
const keyParams = {
|
|
544
544
|
catalogItemId: object.catalogItemId
|
|
545
545
|
};
|
|
546
|
-
return keyBuilder$
|
|
546
|
+
return keyBuilder$5(luvio, keyParams);
|
|
547
547
|
}
|
|
548
|
-
function normalize$
|
|
548
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
549
549
|
return input;
|
|
550
550
|
}
|
|
551
|
-
const select$
|
|
552
|
-
const { selections: CatalogItemAttributeOutputRepresentation__selections, opaque: CatalogItemAttributeOutputRepresentation__opaque, } = select$
|
|
553
|
-
const { selections: FulfillmentFlowOutputRepresentation__selections, opaque: FulfillmentFlowOutputRepresentation__opaque, } = select$
|
|
554
|
-
const { selections: IntakeFormOutputRepresentation__selections, opaque: IntakeFormOutputRepresentation__opaque, } = select$
|
|
551
|
+
const select$7 = function CatalogItemOutputRepresentationSelect() {
|
|
552
|
+
const { selections: CatalogItemAttributeOutputRepresentation__selections, opaque: CatalogItemAttributeOutputRepresentation__opaque, } = select$a();
|
|
553
|
+
const { selections: FulfillmentFlowOutputRepresentation__selections, opaque: FulfillmentFlowOutputRepresentation__opaque, } = select$9();
|
|
554
|
+
const { selections: IntakeFormOutputRepresentation__selections, opaque: IntakeFormOutputRepresentation__opaque, } = select$8();
|
|
555
555
|
return {
|
|
556
556
|
kind: 'Fragment',
|
|
557
|
-
version: VERSION$
|
|
557
|
+
version: VERSION$2,
|
|
558
558
|
private: [],
|
|
559
559
|
selections: [
|
|
560
560
|
{
|
|
@@ -620,7 +620,7 @@ const select$5 = function CatalogItemOutputRepresentationSelect() {
|
|
|
620
620
|
]
|
|
621
621
|
};
|
|
622
622
|
};
|
|
623
|
-
function equals$
|
|
623
|
+
function equals$2(existing, incoming) {
|
|
624
624
|
const existing_isActive = existing.isActive;
|
|
625
625
|
const incoming_isActive = incoming.isActive;
|
|
626
626
|
if (!(existing_isActive === incoming_isActive)) {
|
|
@@ -664,7 +664,7 @@ function equals$1(existing, incoming) {
|
|
|
664
664
|
const existing_attributes = existing.attributes;
|
|
665
665
|
const incoming_attributes = incoming.attributes;
|
|
666
666
|
const equals_attributes_items = equalsArray(existing_attributes, incoming_attributes, (existing_attributes_item, incoming_attributes_item) => {
|
|
667
|
-
if (!(equals$
|
|
667
|
+
if (!(equals$5(existing_attributes_item, incoming_attributes_item))) {
|
|
668
668
|
return false;
|
|
669
669
|
}
|
|
670
670
|
});
|
|
@@ -683,12 +683,12 @@ function equals$1(existing, incoming) {
|
|
|
683
683
|
}
|
|
684
684
|
const existing_fulfillmentFlow = existing.fulfillmentFlow;
|
|
685
685
|
const incoming_fulfillmentFlow = incoming.fulfillmentFlow;
|
|
686
|
-
if (!(equals$
|
|
686
|
+
if (!(equals$4(existing_fulfillmentFlow, incoming_fulfillmentFlow))) {
|
|
687
687
|
return false;
|
|
688
688
|
}
|
|
689
689
|
const existing_intakeForm = existing.intakeForm;
|
|
690
690
|
const incoming_intakeForm = incoming.intakeForm;
|
|
691
|
-
if (!(equals$
|
|
691
|
+
if (!(equals$3(existing_intakeForm, incoming_intakeForm))) {
|
|
692
692
|
return false;
|
|
693
693
|
}
|
|
694
694
|
const existing_integrations = existing.integrations;
|
|
@@ -713,41 +713,41 @@ function equals$1(existing, incoming) {
|
|
|
713
713
|
}
|
|
714
714
|
return true;
|
|
715
715
|
}
|
|
716
|
-
const ingest$
|
|
716
|
+
const ingest$2 = function CatalogItemOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
717
717
|
if (process.env.NODE_ENV !== 'production') {
|
|
718
|
-
const validateError = validate$
|
|
718
|
+
const validateError = validate$6(input);
|
|
719
719
|
if (validateError !== null) {
|
|
720
720
|
throw validateError;
|
|
721
721
|
}
|
|
722
722
|
}
|
|
723
|
-
const key = keyBuilderFromType(luvio, input);
|
|
724
|
-
const ttlToUse = TTL$
|
|
725
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
723
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
724
|
+
const ttlToUse = TTL$2;
|
|
725
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "ecm", VERSION$2, RepresentationType$2, equals$2);
|
|
726
726
|
return createLink(key);
|
|
727
727
|
};
|
|
728
|
-
function getTypeCacheKeys$
|
|
728
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
729
729
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
730
|
-
const rootKey = keyBuilderFromType(luvio, input);
|
|
730
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
731
731
|
rootKeySet.set(rootKey, {
|
|
732
732
|
namespace: keyPrefix,
|
|
733
|
-
representationName: RepresentationType$
|
|
733
|
+
representationName: RepresentationType$2,
|
|
734
734
|
mergeable: false
|
|
735
735
|
});
|
|
736
736
|
}
|
|
737
737
|
|
|
738
|
-
function select$
|
|
739
|
-
return select$
|
|
738
|
+
function select$6(luvio, params) {
|
|
739
|
+
return select$7();
|
|
740
740
|
}
|
|
741
|
-
function getResponseCacheKeys$
|
|
742
|
-
getTypeCacheKeys$
|
|
741
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
742
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
743
743
|
}
|
|
744
|
-
function ingestSuccess$
|
|
744
|
+
function ingestSuccess$4(luvio, resourceParams, response) {
|
|
745
745
|
const { body } = response;
|
|
746
|
-
const key = keyBuilderFromType(luvio, body);
|
|
747
|
-
luvio.storeIngest(key, ingest$
|
|
746
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
747
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
748
748
|
const snapshot = luvio.storeLookup({
|
|
749
749
|
recordId: key,
|
|
750
|
-
node: select$
|
|
750
|
+
node: select$6(),
|
|
751
751
|
variables: {},
|
|
752
752
|
});
|
|
753
753
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -758,7 +758,7 @@ function ingestSuccess$3(luvio, resourceParams, response) {
|
|
|
758
758
|
deepFreeze(snapshot.data);
|
|
759
759
|
return snapshot;
|
|
760
760
|
}
|
|
761
|
-
function createResourceRequest$
|
|
761
|
+
function createResourceRequest$4(config) {
|
|
762
762
|
const headers = {};
|
|
763
763
|
return {
|
|
764
764
|
baseUri: '/services/data/v63.0',
|
|
@@ -772,45 +772,45 @@ function createResourceRequest$3(config) {
|
|
|
772
772
|
};
|
|
773
773
|
}
|
|
774
774
|
|
|
775
|
-
const adapterName$
|
|
775
|
+
const adapterName$4 = 'createCatalogItem';
|
|
776
776
|
const createCatalogItem_ConfigPropertyMetadata = [
|
|
777
777
|
generateParamConfigMetadata('catalogItemCreateInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
778
778
|
];
|
|
779
|
-
const createCatalogItem_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
780
|
-
const createResourceParams$
|
|
781
|
-
function typeCheckConfig$
|
|
779
|
+
const createCatalogItem_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, createCatalogItem_ConfigPropertyMetadata);
|
|
780
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$5(createCatalogItem_ConfigPropertyMetadata);
|
|
781
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
782
782
|
const config = {};
|
|
783
783
|
const untrustedConfig_catalogItemCreateInput = untrustedConfig.catalogItemCreateInput;
|
|
784
|
-
const referenceCatalogItemCreateInputRepresentationValidationError = validate$
|
|
784
|
+
const referenceCatalogItemCreateInputRepresentationValidationError = validate$a(untrustedConfig_catalogItemCreateInput);
|
|
785
785
|
if (referenceCatalogItemCreateInputRepresentationValidationError === null) {
|
|
786
786
|
config.catalogItemCreateInput = untrustedConfig_catalogItemCreateInput;
|
|
787
787
|
}
|
|
788
788
|
return config;
|
|
789
789
|
}
|
|
790
|
-
function validateAdapterConfig$
|
|
790
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
791
791
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
792
792
|
return null;
|
|
793
793
|
}
|
|
794
794
|
if (process.env.NODE_ENV !== 'production') {
|
|
795
795
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
796
796
|
}
|
|
797
|
-
const config = typeCheckConfig$
|
|
797
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
798
798
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
799
799
|
return null;
|
|
800
800
|
}
|
|
801
801
|
return config;
|
|
802
802
|
}
|
|
803
|
-
function buildNetworkSnapshot$
|
|
804
|
-
const resourceParams = createResourceParams$
|
|
805
|
-
const request = createResourceRequest$
|
|
803
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
804
|
+
const resourceParams = createResourceParams$4(config);
|
|
805
|
+
const request = createResourceRequest$4(resourceParams);
|
|
806
806
|
return luvio.dispatchResourceRequest(request, options)
|
|
807
807
|
.then((response) => {
|
|
808
808
|
return luvio.handleSuccessResponse(() => {
|
|
809
|
-
const snapshot = ingestSuccess$
|
|
809
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response);
|
|
810
810
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
811
811
|
}, () => {
|
|
812
812
|
const cache = new StoreKeyMap();
|
|
813
|
-
getResponseCacheKeys$
|
|
813
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
814
814
|
return cache;
|
|
815
815
|
});
|
|
816
816
|
}, (response) => {
|
|
@@ -820,16 +820,16 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
820
820
|
}
|
|
821
821
|
const createCatalogItemAdapterFactory = (luvio) => {
|
|
822
822
|
return function createCatalogItem(untrustedConfig) {
|
|
823
|
-
const config = validateAdapterConfig$
|
|
823
|
+
const config = validateAdapterConfig$4(untrustedConfig, createCatalogItem_ConfigPropertyNames);
|
|
824
824
|
// Invalid or incomplete config
|
|
825
825
|
if (config === null) {
|
|
826
826
|
throw new Error('Invalid config for "createCatalogItem"');
|
|
827
827
|
}
|
|
828
|
-
return buildNetworkSnapshot$
|
|
828
|
+
return buildNetworkSnapshot$4(luvio, config);
|
|
829
829
|
};
|
|
830
830
|
};
|
|
831
831
|
|
|
832
|
-
function validate$
|
|
832
|
+
function validate$5(obj, path = 'ServiceAutomationOutputRecordRepresentation') {
|
|
833
833
|
const v_error = (() => {
|
|
834
834
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
835
835
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -852,9 +852,9 @@ function validate$2(obj, path = 'ServiceAutomationOutputRecordRepresentation') {
|
|
|
852
852
|
return v_error === undefined ? null : v_error;
|
|
853
853
|
}
|
|
854
854
|
|
|
855
|
-
const TTL = 6000;
|
|
856
|
-
const VERSION = "7860ae260a600243129acb4ea01e75be";
|
|
857
|
-
function validate$
|
|
855
|
+
const TTL$1 = 6000;
|
|
856
|
+
const VERSION$1 = "7860ae260a600243129acb4ea01e75be";
|
|
857
|
+
function validate$4(obj, path = 'ServiceAutomationDepOutputRepresentation') {
|
|
858
858
|
const v_error = (() => {
|
|
859
859
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
860
860
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -872,7 +872,7 @@ function validate$1(obj, path = 'ServiceAutomationDepOutputRepresentation') {
|
|
|
872
872
|
for (let i = 0; i < obj_records.length; i++) {
|
|
873
873
|
const obj_records_item = obj_records[i];
|
|
874
874
|
const path_records_item = path_records + '[' + i + ']';
|
|
875
|
-
const referencepath_records_itemValidationError = validate$
|
|
875
|
+
const referencepath_records_itemValidationError = validate$5(obj_records_item, path_records_item);
|
|
876
876
|
if (referencepath_records_itemValidationError !== null) {
|
|
877
877
|
let message = 'Object doesn\'t match ServiceAutomationOutputRecordRepresentation (at "' + path_records_item + '")\n';
|
|
878
878
|
message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -882,62 +882,62 @@ function validate$1(obj, path = 'ServiceAutomationDepOutputRepresentation') {
|
|
|
882
882
|
})();
|
|
883
883
|
return v_error === undefined ? null : v_error;
|
|
884
884
|
}
|
|
885
|
-
const RepresentationType = 'ServiceAutomationDepOutputRepresentation';
|
|
886
|
-
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
885
|
+
const RepresentationType$1 = 'ServiceAutomationDepOutputRepresentation';
|
|
886
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
887
887
|
return input;
|
|
888
888
|
}
|
|
889
|
-
const select$
|
|
889
|
+
const select$5 = function ServiceAutomationDepOutputRepresentationSelect() {
|
|
890
890
|
return {
|
|
891
891
|
kind: 'Fragment',
|
|
892
|
-
version: VERSION,
|
|
892
|
+
version: VERSION$1,
|
|
893
893
|
private: [],
|
|
894
894
|
opaque: true
|
|
895
895
|
};
|
|
896
896
|
};
|
|
897
|
-
function equals(existing, incoming) {
|
|
897
|
+
function equals$1(existing, incoming) {
|
|
898
898
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
899
899
|
return false;
|
|
900
900
|
}
|
|
901
901
|
return true;
|
|
902
902
|
}
|
|
903
|
-
const ingest = function ServiceAutomationDepOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
903
|
+
const ingest$1 = function ServiceAutomationDepOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
904
904
|
if (process.env.NODE_ENV !== 'production') {
|
|
905
|
-
const validateError = validate$
|
|
905
|
+
const validateError = validate$4(input);
|
|
906
906
|
if (validateError !== null) {
|
|
907
907
|
throw validateError;
|
|
908
908
|
}
|
|
909
909
|
}
|
|
910
910
|
const key = path.fullPath;
|
|
911
|
-
const ttlToUse = TTL;
|
|
912
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "ecm", VERSION, RepresentationType, equals);
|
|
911
|
+
const ttlToUse = TTL$1;
|
|
912
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "ecm", VERSION$1, RepresentationType$1, equals$1);
|
|
913
913
|
return createLink(key);
|
|
914
914
|
};
|
|
915
|
-
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
915
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
916
916
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
917
917
|
const rootKey = fullPathFactory();
|
|
918
918
|
rootKeySet.set(rootKey, {
|
|
919
919
|
namespace: keyPrefix,
|
|
920
|
-
representationName: RepresentationType,
|
|
920
|
+
representationName: RepresentationType$1,
|
|
921
921
|
mergeable: false
|
|
922
922
|
});
|
|
923
923
|
}
|
|
924
924
|
|
|
925
|
-
function select$
|
|
926
|
-
return select$
|
|
925
|
+
function select$4(luvio, params) {
|
|
926
|
+
return select$5();
|
|
927
927
|
}
|
|
928
|
-
function keyBuilder$
|
|
928
|
+
function keyBuilder$4(luvio, params) {
|
|
929
929
|
return keyPrefix + '::ServiceAutomationDepOutputRepresentation:(' + 'entityName:' + params.body.entityName + '::' + 'fields:' + params.body.fields + '::' + '[' + params.body.filters.map(element => stableJSONStringify(element)).join(',') + ']' + '::' + (params.body.limit === undefined ? 'limit' : 'limit:' + params.body.limit) + ')';
|
|
930
930
|
}
|
|
931
|
-
function getResponseCacheKeys$
|
|
932
|
-
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$
|
|
931
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
932
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$4(luvio, resourceParams));
|
|
933
933
|
}
|
|
934
|
-
function ingestSuccess$
|
|
934
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
935
935
|
const { body } = response;
|
|
936
|
-
const key = keyBuilder$
|
|
937
|
-
luvio.storeIngest(key, ingest, body);
|
|
936
|
+
const key = keyBuilder$4(luvio, resourceParams);
|
|
937
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
938
938
|
const snapshot = luvio.storeLookup({
|
|
939
939
|
recordId: key,
|
|
940
|
-
node: select$
|
|
940
|
+
node: select$4(),
|
|
941
941
|
variables: {},
|
|
942
942
|
}, snapshotRefresh);
|
|
943
943
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -949,18 +949,18 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
949
949
|
return snapshot;
|
|
950
950
|
}
|
|
951
951
|
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
952
|
-
const key = keyBuilder$
|
|
952
|
+
const key = keyBuilder$4(luvio, params);
|
|
953
953
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
954
954
|
const storeMetadataParams = {
|
|
955
|
-
ttl: TTL,
|
|
955
|
+
ttl: TTL$1,
|
|
956
956
|
namespace: keyPrefix,
|
|
957
|
-
version: VERSION,
|
|
958
|
-
representationName: RepresentationType
|
|
957
|
+
version: VERSION$1,
|
|
958
|
+
representationName: RepresentationType$1
|
|
959
959
|
};
|
|
960
960
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
961
961
|
return errorSnapshot;
|
|
962
962
|
}
|
|
963
|
-
function createResourceRequest$
|
|
963
|
+
function createResourceRequest$3(config) {
|
|
964
964
|
const headers = {};
|
|
965
965
|
return {
|
|
966
966
|
baseUri: '/services/data/v63.0',
|
|
@@ -974,22 +974,22 @@ function createResourceRequest$2(config) {
|
|
|
974
974
|
};
|
|
975
975
|
}
|
|
976
976
|
|
|
977
|
-
const adapterName$
|
|
977
|
+
const adapterName$3 = 'getAllServiceAutomationDep';
|
|
978
978
|
const getAllServiceAutomationDep_ConfigPropertyMetadata = [
|
|
979
979
|
generateParamConfigMetadata('entityName', true, 2 /* Body */, 0 /* String */),
|
|
980
980
|
generateParamConfigMetadata('fields', true, 2 /* Body */, 0 /* String */, true),
|
|
981
981
|
generateParamConfigMetadata('filters', true, 2 /* Body */, 4 /* Unsupported */, true),
|
|
982
982
|
generateParamConfigMetadata('limit', false, 2 /* Body */, 4 /* Unsupported */),
|
|
983
983
|
];
|
|
984
|
-
const getAllServiceAutomationDep_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
985
|
-
const createResourceParams$
|
|
986
|
-
function keyBuilder$
|
|
987
|
-
const resourceParams = createResourceParams$
|
|
988
|
-
return keyBuilder$
|
|
984
|
+
const getAllServiceAutomationDep_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getAllServiceAutomationDep_ConfigPropertyMetadata);
|
|
985
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$5(getAllServiceAutomationDep_ConfigPropertyMetadata);
|
|
986
|
+
function keyBuilder$3(luvio, config) {
|
|
987
|
+
const resourceParams = createResourceParams$3(config);
|
|
988
|
+
return keyBuilder$4(luvio, resourceParams);
|
|
989
989
|
}
|
|
990
|
-
function typeCheckConfig$
|
|
990
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
991
991
|
const config = {};
|
|
992
|
-
typeCheckConfig$
|
|
992
|
+
typeCheckConfig$5(untrustedConfig, config, getAllServiceAutomationDep_ConfigPropertyMetadata);
|
|
993
993
|
const untrustedConfig_filters = untrustedConfig.filters;
|
|
994
994
|
if (ArrayIsArray$1(untrustedConfig_filters)) {
|
|
995
995
|
const untrustedConfig_filters_array = [];
|
|
@@ -1013,45 +1013,45 @@ function typeCheckConfig$2(untrustedConfig) {
|
|
|
1013
1013
|
}
|
|
1014
1014
|
return config;
|
|
1015
1015
|
}
|
|
1016
|
-
function validateAdapterConfig$
|
|
1016
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
1017
1017
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1018
1018
|
return null;
|
|
1019
1019
|
}
|
|
1020
1020
|
if (process.env.NODE_ENV !== 'production') {
|
|
1021
1021
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1022
1022
|
}
|
|
1023
|
-
const config = typeCheckConfig$
|
|
1023
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
1024
1024
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1025
1025
|
return null;
|
|
1026
1026
|
}
|
|
1027
1027
|
return config;
|
|
1028
1028
|
}
|
|
1029
1029
|
function adapterFragment$1(luvio, config) {
|
|
1030
|
-
createResourceParams$
|
|
1031
|
-
return select$
|
|
1030
|
+
createResourceParams$3(config);
|
|
1031
|
+
return select$4();
|
|
1032
1032
|
}
|
|
1033
1033
|
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
1034
|
-
const snapshot = ingestSuccess$
|
|
1034
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
1035
1035
|
config,
|
|
1036
|
-
resolve: () => buildNetworkSnapshot$
|
|
1036
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1037
1037
|
});
|
|
1038
1038
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1039
1039
|
}
|
|
1040
1040
|
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
1041
1041
|
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
1042
1042
|
config,
|
|
1043
|
-
resolve: () => buildNetworkSnapshot$
|
|
1043
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1044
1044
|
});
|
|
1045
1045
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1046
1046
|
}
|
|
1047
|
-
function buildNetworkSnapshot$
|
|
1048
|
-
const resourceParams = createResourceParams$
|
|
1049
|
-
const request = createResourceRequest$
|
|
1047
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
1048
|
+
const resourceParams = createResourceParams$3(config);
|
|
1049
|
+
const request = createResourceRequest$3(resourceParams);
|
|
1050
1050
|
return luvio.dispatchResourceRequest(request, options)
|
|
1051
1051
|
.then((response) => {
|
|
1052
1052
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
1053
1053
|
const cache = new StoreKeyMap();
|
|
1054
|
-
getResponseCacheKeys$
|
|
1054
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
1055
1055
|
return cache;
|
|
1056
1056
|
});
|
|
1057
1057
|
}, (response) => {
|
|
@@ -1059,23 +1059,23 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
1059
1059
|
});
|
|
1060
1060
|
}
|
|
1061
1061
|
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
1062
|
-
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
1062
|
+
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, 'get', false);
|
|
1063
1063
|
}
|
|
1064
1064
|
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
1065
1065
|
const { luvio, config } = context;
|
|
1066
1066
|
const selector = {
|
|
1067
|
-
recordId: keyBuilder$
|
|
1067
|
+
recordId: keyBuilder$3(luvio, config),
|
|
1068
1068
|
node: adapterFragment$1(luvio, config),
|
|
1069
1069
|
variables: {},
|
|
1070
1070
|
};
|
|
1071
1071
|
const cacheSnapshot = storeLookup(selector, {
|
|
1072
1072
|
config,
|
|
1073
|
-
resolve: () => buildNetworkSnapshot$
|
|
1073
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1074
1074
|
});
|
|
1075
1075
|
return cacheSnapshot;
|
|
1076
1076
|
}
|
|
1077
1077
|
const getAllServiceAutomationDepAdapterFactory = (luvio) => function ecm__getAllServiceAutomationDep(untrustedConfig, requestContext) {
|
|
1078
|
-
const config = validateAdapterConfig$
|
|
1078
|
+
const config = validateAdapterConfig$3(untrustedConfig, getAllServiceAutomationDep_ConfigPropertyNames);
|
|
1079
1079
|
// Invalid or incomplete config
|
|
1080
1080
|
if (config === null) {
|
|
1081
1081
|
return null;
|
|
@@ -1084,24 +1084,24 @@ const getAllServiceAutomationDepAdapterFactory = (luvio) => function ecm__getAll
|
|
|
1084
1084
|
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
1085
1085
|
};
|
|
1086
1086
|
|
|
1087
|
-
function select$
|
|
1088
|
-
return select$
|
|
1087
|
+
function select$3(luvio, params) {
|
|
1088
|
+
return select$7();
|
|
1089
1089
|
}
|
|
1090
|
-
function keyBuilder$
|
|
1091
|
-
return keyBuilder$
|
|
1090
|
+
function keyBuilder$2(luvio, params) {
|
|
1091
|
+
return keyBuilder$5(luvio, {
|
|
1092
1092
|
catalogItemId: params.urlParams.catalogItemId
|
|
1093
1093
|
});
|
|
1094
1094
|
}
|
|
1095
|
-
function getResponseCacheKeys$
|
|
1096
|
-
getTypeCacheKeys$
|
|
1095
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
1096
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
1097
1097
|
}
|
|
1098
|
-
function ingestSuccess$
|
|
1098
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
1099
1099
|
const { body } = response;
|
|
1100
|
-
const key = keyBuilder$
|
|
1101
|
-
luvio.storeIngest(key, ingest$
|
|
1100
|
+
const key = keyBuilder$2(luvio, resourceParams);
|
|
1101
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
1102
1102
|
const snapshot = luvio.storeLookup({
|
|
1103
1103
|
recordId: key,
|
|
1104
|
-
node: select$
|
|
1104
|
+
node: select$3(),
|
|
1105
1105
|
variables: {},
|
|
1106
1106
|
}, snapshotRefresh);
|
|
1107
1107
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1113,18 +1113,18 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1113
1113
|
return snapshot;
|
|
1114
1114
|
}
|
|
1115
1115
|
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
1116
|
-
const key = keyBuilder$
|
|
1116
|
+
const key = keyBuilder$2(luvio, params);
|
|
1117
1117
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1118
1118
|
const storeMetadataParams = {
|
|
1119
|
-
ttl: TTL$
|
|
1119
|
+
ttl: TTL$2,
|
|
1120
1120
|
namespace: keyPrefix,
|
|
1121
|
-
version: VERSION$
|
|
1122
|
-
representationName: RepresentationType$
|
|
1121
|
+
version: VERSION$2,
|
|
1122
|
+
representationName: RepresentationType$2
|
|
1123
1123
|
};
|
|
1124
1124
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1125
1125
|
return errorSnapshot;
|
|
1126
1126
|
}
|
|
1127
|
-
function createResourceRequest$
|
|
1127
|
+
function createResourceRequest$2(config) {
|
|
1128
1128
|
const headers = {};
|
|
1129
1129
|
return {
|
|
1130
1130
|
baseUri: '/services/data/v63.0',
|
|
@@ -1142,63 +1142,63 @@ function createResourceRequestFromRepresentation(representation) {
|
|
|
1142
1142
|
urlParams: {},
|
|
1143
1143
|
};
|
|
1144
1144
|
config.urlParams.catalogItemId = representation.catalogItemId;
|
|
1145
|
-
return createResourceRequest$
|
|
1145
|
+
return createResourceRequest$2(config);
|
|
1146
1146
|
}
|
|
1147
1147
|
|
|
1148
|
-
const adapterName$
|
|
1148
|
+
const adapterName$2 = 'getCatalogItem';
|
|
1149
1149
|
const getCatalogItem_ConfigPropertyMetadata = [
|
|
1150
1150
|
generateParamConfigMetadata('catalogItemId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1151
1151
|
];
|
|
1152
|
-
const getCatalogItem_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1153
|
-
const createResourceParams$
|
|
1154
|
-
function keyBuilder(luvio, config) {
|
|
1155
|
-
const resourceParams = createResourceParams$
|
|
1156
|
-
return keyBuilder$
|
|
1152
|
+
const getCatalogItem_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getCatalogItem_ConfigPropertyMetadata);
|
|
1153
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$5(getCatalogItem_ConfigPropertyMetadata);
|
|
1154
|
+
function keyBuilder$1(luvio, config) {
|
|
1155
|
+
const resourceParams = createResourceParams$2(config);
|
|
1156
|
+
return keyBuilder$2(luvio, resourceParams);
|
|
1157
1157
|
}
|
|
1158
|
-
function typeCheckConfig$
|
|
1158
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
1159
1159
|
const config = {};
|
|
1160
|
-
typeCheckConfig$
|
|
1160
|
+
typeCheckConfig$5(untrustedConfig, config, getCatalogItem_ConfigPropertyMetadata);
|
|
1161
1161
|
return config;
|
|
1162
1162
|
}
|
|
1163
|
-
function validateAdapterConfig$
|
|
1163
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
1164
1164
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1165
1165
|
return null;
|
|
1166
1166
|
}
|
|
1167
1167
|
if (process.env.NODE_ENV !== 'production') {
|
|
1168
1168
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1169
1169
|
}
|
|
1170
|
-
const config = typeCheckConfig$
|
|
1170
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
1171
1171
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1172
1172
|
return null;
|
|
1173
1173
|
}
|
|
1174
1174
|
return config;
|
|
1175
1175
|
}
|
|
1176
1176
|
function adapterFragment(luvio, config) {
|
|
1177
|
-
createResourceParams$
|
|
1178
|
-
return select$
|
|
1177
|
+
createResourceParams$2(config);
|
|
1178
|
+
return select$3();
|
|
1179
1179
|
}
|
|
1180
1180
|
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
1181
|
-
const snapshot = ingestSuccess$
|
|
1181
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
1182
1182
|
config,
|
|
1183
|
-
resolve: () => buildNetworkSnapshot$
|
|
1183
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1184
1184
|
});
|
|
1185
1185
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1186
1186
|
}
|
|
1187
1187
|
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
1188
1188
|
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
1189
1189
|
config,
|
|
1190
|
-
resolve: () => buildNetworkSnapshot$
|
|
1190
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1191
1191
|
});
|
|
1192
1192
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1193
1193
|
}
|
|
1194
|
-
function buildNetworkSnapshot$
|
|
1195
|
-
const resourceParams = createResourceParams$
|
|
1196
|
-
const request = createResourceRequest$
|
|
1194
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
1195
|
+
const resourceParams = createResourceParams$2(config);
|
|
1196
|
+
const request = createResourceRequest$2(resourceParams);
|
|
1197
1197
|
return luvio.dispatchResourceRequest(request, options)
|
|
1198
1198
|
.then((response) => {
|
|
1199
1199
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
1200
1200
|
const cache = new StoreKeyMap();
|
|
1201
|
-
getResponseCacheKeys$
|
|
1201
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
1202
1202
|
return cache;
|
|
1203
1203
|
});
|
|
1204
1204
|
}, (response) => {
|
|
@@ -1206,23 +1206,23 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
1206
1206
|
});
|
|
1207
1207
|
}
|
|
1208
1208
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
1209
|
-
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
1209
|
+
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
1210
1210
|
}
|
|
1211
1211
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
1212
1212
|
const { luvio, config } = context;
|
|
1213
1213
|
const selector = {
|
|
1214
|
-
recordId: keyBuilder(luvio, config),
|
|
1214
|
+
recordId: keyBuilder$1(luvio, config),
|
|
1215
1215
|
node: adapterFragment(luvio, config),
|
|
1216
1216
|
variables: {},
|
|
1217
1217
|
};
|
|
1218
1218
|
const cacheSnapshot = storeLookup(selector, {
|
|
1219
1219
|
config,
|
|
1220
|
-
resolve: () => buildNetworkSnapshot$
|
|
1220
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1221
1221
|
});
|
|
1222
1222
|
return cacheSnapshot;
|
|
1223
1223
|
}
|
|
1224
1224
|
const getCatalogItemAdapterFactory = (luvio) => function ecm__getCatalogItem(untrustedConfig, requestContext) {
|
|
1225
|
-
const config = validateAdapterConfig$
|
|
1225
|
+
const config = validateAdapterConfig$2(untrustedConfig, getCatalogItem_ConfigPropertyNames);
|
|
1226
1226
|
// Invalid or incomplete config
|
|
1227
1227
|
if (config === null) {
|
|
1228
1228
|
return null;
|
|
@@ -1232,7 +1232,7 @@ const getCatalogItemAdapterFactory = (luvio) => function ecm__getCatalogItem(unt
|
|
|
1232
1232
|
};
|
|
1233
1233
|
const notifyChangeFactory = (luvio, options) => {
|
|
1234
1234
|
return function getConnectCatalogCatalogItemByCatalogItemIdNotifyChange(configs) {
|
|
1235
|
-
const keys = configs.map(c => keyBuilder$
|
|
1235
|
+
const keys = configs.map(c => keyBuilder$5(luvio, c));
|
|
1236
1236
|
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
1237
1237
|
for (let i = 0, len = entries.length; i < len; i++) {
|
|
1238
1238
|
const { key, record: val } = entries[i];
|
|
@@ -1241,21 +1241,21 @@ const notifyChangeFactory = (luvio, options) => {
|
|
|
1241
1241
|
.then((response) => {
|
|
1242
1242
|
return luvio.handleSuccessResponse(() => {
|
|
1243
1243
|
const { body } = response;
|
|
1244
|
-
luvio.storeIngest(key, ingest$
|
|
1244
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
1245
1245
|
return luvio.storeBroadcast();
|
|
1246
1246
|
}, () => {
|
|
1247
1247
|
const cache = new StoreKeyMap();
|
|
1248
|
-
getTypeCacheKeys$
|
|
1248
|
+
getTypeCacheKeys$2(cache, luvio, response.body);
|
|
1249
1249
|
return cache;
|
|
1250
1250
|
});
|
|
1251
1251
|
}, (error) => {
|
|
1252
1252
|
return luvio.handleErrorResponse(() => {
|
|
1253
1253
|
const errorSnapshot = luvio.errorSnapshot(error);
|
|
1254
1254
|
luvio.storeIngestError(key, errorSnapshot, {
|
|
1255
|
-
ttl: TTL$
|
|
1255
|
+
ttl: TTL$2,
|
|
1256
1256
|
namespace: keyPrefix,
|
|
1257
|
-
version: VERSION$
|
|
1258
|
-
representationName: RepresentationType$
|
|
1257
|
+
version: VERSION$2,
|
|
1258
|
+
representationName: RepresentationType$2
|
|
1259
1259
|
});
|
|
1260
1260
|
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
1261
1261
|
});
|
|
@@ -1265,7 +1265,7 @@ const notifyChangeFactory = (luvio, options) => {
|
|
|
1265
1265
|
};
|
|
1266
1266
|
};
|
|
1267
1267
|
|
|
1268
|
-
function validate(obj, path = 'CatalogItemUpdateInputRepresentation') {
|
|
1268
|
+
function validate$3(obj, path = 'CatalogItemUpdateInputRepresentation') {
|
|
1269
1269
|
const v_error = (() => {
|
|
1270
1270
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1271
1271
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1279,19 +1279,19 @@ function validate(obj, path = 'CatalogItemUpdateInputRepresentation') {
|
|
|
1279
1279
|
return v_error === undefined ? null : v_error;
|
|
1280
1280
|
}
|
|
1281
1281
|
|
|
1282
|
-
function select(luvio, params) {
|
|
1283
|
-
return select$
|
|
1282
|
+
function select$2(luvio, params) {
|
|
1283
|
+
return select$7();
|
|
1284
1284
|
}
|
|
1285
|
-
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
1286
|
-
getTypeCacheKeys$
|
|
1285
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
1286
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
1287
1287
|
}
|
|
1288
|
-
function ingestSuccess(luvio, resourceParams, response) {
|
|
1288
|
+
function ingestSuccess$1(luvio, resourceParams, response) {
|
|
1289
1289
|
const { body } = response;
|
|
1290
|
-
const key = keyBuilderFromType(luvio, body);
|
|
1291
|
-
luvio.storeIngest(key, ingest$
|
|
1290
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
1291
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
1292
1292
|
const snapshot = luvio.storeLookup({
|
|
1293
1293
|
recordId: key,
|
|
1294
|
-
node: select(),
|
|
1294
|
+
node: select$2(),
|
|
1295
1295
|
variables: {},
|
|
1296
1296
|
});
|
|
1297
1297
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1302,7 +1302,7 @@ function ingestSuccess(luvio, resourceParams, response) {
|
|
|
1302
1302
|
deepFreeze(snapshot.data);
|
|
1303
1303
|
return snapshot;
|
|
1304
1304
|
}
|
|
1305
|
-
function createResourceRequest(config) {
|
|
1305
|
+
function createResourceRequest$1(config) {
|
|
1306
1306
|
const headers = {};
|
|
1307
1307
|
return {
|
|
1308
1308
|
baseUri: '/services/data/v63.0',
|
|
@@ -1316,23 +1316,255 @@ function createResourceRequest(config) {
|
|
|
1316
1316
|
};
|
|
1317
1317
|
}
|
|
1318
1318
|
|
|
1319
|
-
const adapterName = 'updateCatalogItem';
|
|
1319
|
+
const adapterName$1 = 'updateCatalogItem';
|
|
1320
1320
|
const updateCatalogItem_ConfigPropertyMetadata = [
|
|
1321
1321
|
generateParamConfigMetadata('catalogItemId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1322
1322
|
generateParamConfigMetadata('catalogItemUpdateInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1323
1323
|
];
|
|
1324
|
-
const updateCatalogItem_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, updateCatalogItem_ConfigPropertyMetadata);
|
|
1325
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
1326
|
-
function typeCheckConfig(untrustedConfig) {
|
|
1324
|
+
const updateCatalogItem_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, updateCatalogItem_ConfigPropertyMetadata);
|
|
1325
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$5(updateCatalogItem_ConfigPropertyMetadata);
|
|
1326
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
1327
1327
|
const config = {};
|
|
1328
|
-
typeCheckConfig$
|
|
1328
|
+
typeCheckConfig$5(untrustedConfig, config, updateCatalogItem_ConfigPropertyMetadata);
|
|
1329
1329
|
const untrustedConfig_catalogItemUpdateInput = untrustedConfig.catalogItemUpdateInput;
|
|
1330
|
-
const referenceCatalogItemUpdateInputRepresentationValidationError = validate(untrustedConfig_catalogItemUpdateInput);
|
|
1330
|
+
const referenceCatalogItemUpdateInputRepresentationValidationError = validate$3(untrustedConfig_catalogItemUpdateInput);
|
|
1331
1331
|
if (referenceCatalogItemUpdateInputRepresentationValidationError === null) {
|
|
1332
1332
|
config.catalogItemUpdateInput = untrustedConfig_catalogItemUpdateInput;
|
|
1333
1333
|
}
|
|
1334
1334
|
return config;
|
|
1335
1335
|
}
|
|
1336
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
1337
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1338
|
+
return null;
|
|
1339
|
+
}
|
|
1340
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1341
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1342
|
+
}
|
|
1343
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
1344
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1345
|
+
return null;
|
|
1346
|
+
}
|
|
1347
|
+
return config;
|
|
1348
|
+
}
|
|
1349
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
1350
|
+
const resourceParams = createResourceParams$1(config);
|
|
1351
|
+
const request = createResourceRequest$1(resourceParams);
|
|
1352
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1353
|
+
.then((response) => {
|
|
1354
|
+
return luvio.handleSuccessResponse(() => {
|
|
1355
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response);
|
|
1356
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1357
|
+
}, () => {
|
|
1358
|
+
const cache = new StoreKeyMap();
|
|
1359
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
1360
|
+
return cache;
|
|
1361
|
+
});
|
|
1362
|
+
}, (response) => {
|
|
1363
|
+
deepFreeze(response);
|
|
1364
|
+
throw response;
|
|
1365
|
+
});
|
|
1366
|
+
}
|
|
1367
|
+
const updateCatalogItemAdapterFactory = (luvio) => {
|
|
1368
|
+
return function updateCatalogItem(untrustedConfig) {
|
|
1369
|
+
const config = validateAdapterConfig$1(untrustedConfig, updateCatalogItem_ConfigPropertyNames);
|
|
1370
|
+
// Invalid or incomplete config
|
|
1371
|
+
if (config === null) {
|
|
1372
|
+
throw new Error('Invalid config for "updateCatalogItem"');
|
|
1373
|
+
}
|
|
1374
|
+
return buildNetworkSnapshot$1(luvio, config);
|
|
1375
|
+
};
|
|
1376
|
+
};
|
|
1377
|
+
|
|
1378
|
+
function validate$2(obj, path = 'CategoryInput') {
|
|
1379
|
+
const v_error = (() => {
|
|
1380
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1381
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1382
|
+
}
|
|
1383
|
+
const obj_categoryId = obj.categoryId;
|
|
1384
|
+
const path_categoryId = path + '.categoryId';
|
|
1385
|
+
if (typeof obj_categoryId !== 'string') {
|
|
1386
|
+
return new TypeError('Expected "string" but received "' + typeof obj_categoryId + '" (at "' + path_categoryId + '")');
|
|
1387
|
+
}
|
|
1388
|
+
const obj_parentCategoryId = obj.parentCategoryId;
|
|
1389
|
+
const path_parentCategoryId = path + '.parentCategoryId';
|
|
1390
|
+
if (typeof obj_parentCategoryId !== 'string') {
|
|
1391
|
+
return new TypeError('Expected "string" but received "' + typeof obj_parentCategoryId + '" (at "' + path_parentCategoryId + '")');
|
|
1392
|
+
}
|
|
1393
|
+
})();
|
|
1394
|
+
return v_error === undefined ? null : v_error;
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1397
|
+
function validate$1(obj, path = 'CategoryAndParentErrorOutputRepresentation') {
|
|
1398
|
+
const v_error = (() => {
|
|
1399
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1400
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1401
|
+
}
|
|
1402
|
+
const obj_errorMessageList = obj.errorMessageList;
|
|
1403
|
+
const path_errorMessageList = path + '.errorMessageList';
|
|
1404
|
+
if (!ArrayIsArray(obj_errorMessageList)) {
|
|
1405
|
+
return new TypeError('Expected "array" but received "' + typeof obj_errorMessageList + '" (at "' + path_errorMessageList + '")');
|
|
1406
|
+
}
|
|
1407
|
+
for (let i = 0; i < obj_errorMessageList.length; i++) {
|
|
1408
|
+
const obj_errorMessageList_item = obj_errorMessageList[i];
|
|
1409
|
+
const path_errorMessageList_item = path_errorMessageList + '[' + i + ']';
|
|
1410
|
+
if (typeof obj_errorMessageList_item !== 'string') {
|
|
1411
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errorMessageList_item + '" (at "' + path_errorMessageList_item + '")');
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
})();
|
|
1415
|
+
return v_error === undefined ? null : v_error;
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
const TTL = 6000;
|
|
1419
|
+
const VERSION = "fe841039450a703d6b90e94658dd230f";
|
|
1420
|
+
function validate(obj, path = 'CategoryAndParentOutputRepresentation') {
|
|
1421
|
+
const v_error = (() => {
|
|
1422
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1423
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1424
|
+
}
|
|
1425
|
+
const obj_catalogId = obj.catalogId;
|
|
1426
|
+
const path_catalogId = path + '.catalogId';
|
|
1427
|
+
if (typeof obj_catalogId !== 'string') {
|
|
1428
|
+
return new TypeError('Expected "string" but received "' + typeof obj_catalogId + '" (at "' + path_catalogId + '")');
|
|
1429
|
+
}
|
|
1430
|
+
const obj_errors = obj.errors;
|
|
1431
|
+
const path_errors = path + '.errors';
|
|
1432
|
+
if (!ArrayIsArray(obj_errors)) {
|
|
1433
|
+
return new TypeError('Expected "array" but received "' + typeof obj_errors + '" (at "' + path_errors + '")');
|
|
1434
|
+
}
|
|
1435
|
+
for (let i = 0; i < obj_errors.length; i++) {
|
|
1436
|
+
const obj_errors_item = obj_errors[i];
|
|
1437
|
+
const path_errors_item = path_errors + '[' + i + ']';
|
|
1438
|
+
const referencepath_errors_itemValidationError = validate$1(obj_errors_item, path_errors_item);
|
|
1439
|
+
if (referencepath_errors_itemValidationError !== null) {
|
|
1440
|
+
let message = 'Object doesn\'t match CategoryAndParentErrorOutputRepresentation (at "' + path_errors_item + '")\n';
|
|
1441
|
+
message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1442
|
+
return new TypeError(message);
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1445
|
+
const obj_message = obj.message;
|
|
1446
|
+
const path_message = path + '.message';
|
|
1447
|
+
if (typeof obj_message !== 'string') {
|
|
1448
|
+
return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
|
|
1449
|
+
}
|
|
1450
|
+
const obj_status = obj.status;
|
|
1451
|
+
const path_status = path + '.status';
|
|
1452
|
+
if (typeof obj_status !== 'string') {
|
|
1453
|
+
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
1454
|
+
}
|
|
1455
|
+
})();
|
|
1456
|
+
return v_error === undefined ? null : v_error;
|
|
1457
|
+
}
|
|
1458
|
+
const RepresentationType = 'CategoryAndParentOutputRepresentation';
|
|
1459
|
+
function keyBuilder(luvio, config) {
|
|
1460
|
+
return keyPrefix + '::' + RepresentationType + ':' + config.id;
|
|
1461
|
+
}
|
|
1462
|
+
function keyBuilderFromType(luvio, object) {
|
|
1463
|
+
const keyParams = {
|
|
1464
|
+
id: object.catalogId
|
|
1465
|
+
};
|
|
1466
|
+
return keyBuilder(luvio, keyParams);
|
|
1467
|
+
}
|
|
1468
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
1469
|
+
return input;
|
|
1470
|
+
}
|
|
1471
|
+
const select$1 = function CategoryAndParentOutputRepresentationSelect() {
|
|
1472
|
+
return {
|
|
1473
|
+
kind: 'Fragment',
|
|
1474
|
+
version: VERSION,
|
|
1475
|
+
private: [],
|
|
1476
|
+
opaque: true
|
|
1477
|
+
};
|
|
1478
|
+
};
|
|
1479
|
+
function equals(existing, incoming) {
|
|
1480
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1481
|
+
return false;
|
|
1482
|
+
}
|
|
1483
|
+
return true;
|
|
1484
|
+
}
|
|
1485
|
+
const ingest = function CategoryAndParentOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1486
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1487
|
+
const validateError = validate(input);
|
|
1488
|
+
if (validateError !== null) {
|
|
1489
|
+
throw validateError;
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1492
|
+
const key = keyBuilderFromType(luvio, input);
|
|
1493
|
+
const ttlToUse = TTL;
|
|
1494
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "ecm", VERSION, RepresentationType, equals);
|
|
1495
|
+
return createLink(key);
|
|
1496
|
+
};
|
|
1497
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
1498
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1499
|
+
const rootKey = keyBuilderFromType(luvio, input);
|
|
1500
|
+
rootKeySet.set(rootKey, {
|
|
1501
|
+
namespace: keyPrefix,
|
|
1502
|
+
representationName: RepresentationType,
|
|
1503
|
+
mergeable: false
|
|
1504
|
+
});
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1507
|
+
function select(luvio, params) {
|
|
1508
|
+
return select$1();
|
|
1509
|
+
}
|
|
1510
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
1511
|
+
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
1512
|
+
}
|
|
1513
|
+
function ingestSuccess(luvio, resourceParams, response) {
|
|
1514
|
+
const { body } = response;
|
|
1515
|
+
const key = keyBuilderFromType(luvio, body);
|
|
1516
|
+
luvio.storeIngest(key, ingest, body);
|
|
1517
|
+
const snapshot = luvio.storeLookup({
|
|
1518
|
+
recordId: key,
|
|
1519
|
+
node: select(),
|
|
1520
|
+
variables: {},
|
|
1521
|
+
});
|
|
1522
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1523
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1524
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
deepFreeze(snapshot.data);
|
|
1528
|
+
return snapshot;
|
|
1529
|
+
}
|
|
1530
|
+
function createResourceRequest(config) {
|
|
1531
|
+
const headers = {};
|
|
1532
|
+
return {
|
|
1533
|
+
baseUri: '/services/data/v63.0',
|
|
1534
|
+
basePath: '/connect/catalog/' + config.urlParams.catalogId + '/categories',
|
|
1535
|
+
method: 'patch',
|
|
1536
|
+
body: config.body,
|
|
1537
|
+
urlParams: config.urlParams,
|
|
1538
|
+
queryParams: {},
|
|
1539
|
+
headers,
|
|
1540
|
+
priority: 'normal',
|
|
1541
|
+
};
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
const adapterName = 'updateEpcCategories';
|
|
1545
|
+
const updateEpcCategories_ConfigPropertyMetadata = [
|
|
1546
|
+
generateParamConfigMetadata('catalogId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1547
|
+
generateParamConfigMetadata('categories', true, 2 /* Body */, 4 /* Unsupported */, true),
|
|
1548
|
+
];
|
|
1549
|
+
const updateEpcCategories_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, updateEpcCategories_ConfigPropertyMetadata);
|
|
1550
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$5(updateEpcCategories_ConfigPropertyMetadata);
|
|
1551
|
+
function typeCheckConfig(untrustedConfig) {
|
|
1552
|
+
const config = {};
|
|
1553
|
+
typeCheckConfig$5(untrustedConfig, config, updateEpcCategories_ConfigPropertyMetadata);
|
|
1554
|
+
const untrustedConfig_categories = untrustedConfig.categories;
|
|
1555
|
+
if (ArrayIsArray$1(untrustedConfig_categories)) {
|
|
1556
|
+
const untrustedConfig_categories_array = [];
|
|
1557
|
+
for (let i = 0, arrayLength = untrustedConfig_categories.length; i < arrayLength; i++) {
|
|
1558
|
+
const untrustedConfig_categories_item = untrustedConfig_categories[i];
|
|
1559
|
+
const referenceCategoryInputValidationError = validate$2(untrustedConfig_categories_item);
|
|
1560
|
+
if (referenceCategoryInputValidationError === null) {
|
|
1561
|
+
untrustedConfig_categories_array.push(untrustedConfig_categories_item);
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
config.categories = untrustedConfig_categories_array;
|
|
1565
|
+
}
|
|
1566
|
+
return config;
|
|
1567
|
+
}
|
|
1336
1568
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
1337
1569
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1338
1570
|
return null;
|
|
@@ -1364,12 +1596,12 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
1364
1596
|
throw response;
|
|
1365
1597
|
});
|
|
1366
1598
|
}
|
|
1367
|
-
const
|
|
1368
|
-
return function
|
|
1369
|
-
const config = validateAdapterConfig(untrustedConfig,
|
|
1599
|
+
const updateEpcCategoriesAdapterFactory = (luvio) => {
|
|
1600
|
+
return function updateEpcCategories(untrustedConfig) {
|
|
1601
|
+
const config = validateAdapterConfig(untrustedConfig, updateEpcCategories_ConfigPropertyNames);
|
|
1370
1602
|
// Invalid or incomplete config
|
|
1371
1603
|
if (config === null) {
|
|
1372
|
-
throw new Error('Invalid config for "
|
|
1604
|
+
throw new Error('Invalid config for "updateEpcCategories"');
|
|
1373
1605
|
}
|
|
1374
1606
|
return buildNetworkSnapshot(luvio, config);
|
|
1375
1607
|
};
|
|
@@ -1380,6 +1612,7 @@ let getAllServiceAutomationDep;
|
|
|
1380
1612
|
let getCatalogItem;
|
|
1381
1613
|
let getCatalogItemNotifyChange;
|
|
1382
1614
|
let updateCatalogItem;
|
|
1615
|
+
let updateEpcCategories;
|
|
1383
1616
|
// Imperative GET Adapters
|
|
1384
1617
|
let getAllServiceAutomationDep_imperative;
|
|
1385
1618
|
let getCatalogItem_imperative;
|
|
@@ -1404,6 +1637,7 @@ function bindExportsTo(luvio) {
|
|
|
1404
1637
|
getCatalogItem: createWireAdapterConstructor(luvio, getCatalogItem_ldsAdapter, getCatalogItemMetadata),
|
|
1405
1638
|
getCatalogItemNotifyChange: createLDSAdapter(luvio, 'getCatalogItemNotifyChange', notifyChangeFactory),
|
|
1406
1639
|
updateCatalogItem: unwrapSnapshotData(updateCatalogItemAdapterFactory),
|
|
1640
|
+
updateEpcCategories: unwrapSnapshotData(updateEpcCategoriesAdapterFactory),
|
|
1407
1641
|
// Imperative GET Adapters
|
|
1408
1642
|
getAllServiceAutomationDep_imperative: createImperativeAdapter(luvio, getAllServiceAutomationDep_ldsAdapter, getAllServiceAutomationDepMetadata),
|
|
1409
1643
|
getCatalogItem_imperative: createImperativeAdapter(luvio, getCatalogItem_ldsAdapter, getCatalogItemMetadata),
|
|
@@ -1417,10 +1651,11 @@ withDefaultLuvio((luvio) => {
|
|
|
1417
1651
|
getCatalogItem,
|
|
1418
1652
|
getCatalogItemNotifyChange,
|
|
1419
1653
|
updateCatalogItem,
|
|
1654
|
+
updateEpcCategories,
|
|
1420
1655
|
getAllServiceAutomationDep_imperative,
|
|
1421
1656
|
getCatalogItem_imperative,
|
|
1422
1657
|
} = bindExportsTo(luvio));
|
|
1423
1658
|
});
|
|
1424
1659
|
|
|
1425
|
-
export { createCatalogItem, getAllServiceAutomationDep, getAllServiceAutomationDep_imperative, getCatalogItem, getCatalogItemNotifyChange, getCatalogItem_imperative, updateCatalogItem };
|
|
1426
|
-
// version: 1.
|
|
1660
|
+
export { createCatalogItem, getAllServiceAutomationDep, getAllServiceAutomationDep_imperative, getCatalogItem, getCatalogItemNotifyChange, getCatalogItem_imperative, updateCatalogItem, updateEpcCategories };
|
|
1661
|
+
// version: 1.329.0-beac2bb064
|