@salesforce/lds-adapters-service-ecm 1.327.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 +371 -132
- package/dist/es/es2018/types/src/generated/adapters/getAllServiceAutomationDep.d.ts +1 -1
- 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/resources/postConnectServiceAutomation.d.ts +1 -1
- 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/dist/es/es2018/types/src/generated/types/ServiceAutomationDepReadInputRepresentation.d.ts +3 -3
- package/dist/es/es2018/types/src/generated/types/ServiceAutomationOutputRecordRepresentation.d.ts +3 -3
- package/package.json +3 -3
- package/sfdc/index.js +435 -193
- package/src/raml/api.raml +69 -2
- 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$5, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2, typeCheckConfig as typeCheckConfig$5 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -149,7 +149,7 @@ function createLink(ref) {
|
|
|
149
149
|
};
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
function validate$
|
|
152
|
+
function validate$a(obj, path = 'CatalogItemCreateInputRepresentation') {
|
|
153
153
|
const v_error = (() => {
|
|
154
154
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
155
155
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -158,8 +158,8 @@ function validate$7(obj, path = 'CatalogItemCreateInputRepresentation') {
|
|
|
158
158
|
return v_error === undefined ? null : v_error;
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
const VERSION$
|
|
162
|
-
function validate$
|
|
161
|
+
const VERSION$5 = "984f5657f237c67c169022cb991d17de";
|
|
162
|
+
function validate$9(obj, path = 'CatalogItemAttributeOutputRepresentation') {
|
|
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 + '")');
|
|
@@ -212,10 +212,10 @@ function validate$6(obj, path = 'CatalogItemAttributeOutputRepresentation') {
|
|
|
212
212
|
})();
|
|
213
213
|
return v_error === undefined ? null : v_error;
|
|
214
214
|
}
|
|
215
|
-
const select$
|
|
215
|
+
const select$a = function CatalogItemAttributeOutputRepresentationSelect() {
|
|
216
216
|
return {
|
|
217
217
|
kind: 'Fragment',
|
|
218
|
-
version: VERSION$
|
|
218
|
+
version: VERSION$5,
|
|
219
219
|
private: [],
|
|
220
220
|
selections: [
|
|
221
221
|
{
|
|
@@ -257,7 +257,7 @@ const select$8 = function CatalogItemAttributeOutputRepresentationSelect() {
|
|
|
257
257
|
]
|
|
258
258
|
};
|
|
259
259
|
};
|
|
260
|
-
function equals$
|
|
260
|
+
function equals$5(existing, incoming) {
|
|
261
261
|
const existing_isHidden = existing.isHidden;
|
|
262
262
|
const incoming_isHidden = incoming.isHidden;
|
|
263
263
|
if (!(existing_isHidden === incoming_isHidden)) {
|
|
@@ -306,8 +306,8 @@ function equals$4(existing, incoming) {
|
|
|
306
306
|
return true;
|
|
307
307
|
}
|
|
308
308
|
|
|
309
|
-
const VERSION$
|
|
310
|
-
function validate$
|
|
309
|
+
const VERSION$4 = "a629c7f39e6f7bfcb57e38849c46ba98";
|
|
310
|
+
function validate$8(obj, path = 'FulfillmentFlowOutputRepresentation') {
|
|
311
311
|
const v_error = (() => {
|
|
312
312
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
313
313
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -325,10 +325,10 @@ function validate$5(obj, path = 'FulfillmentFlowOutputRepresentation') {
|
|
|
325
325
|
})();
|
|
326
326
|
return v_error === undefined ? null : v_error;
|
|
327
327
|
}
|
|
328
|
-
const select$
|
|
328
|
+
const select$9 = function FulfillmentFlowOutputRepresentationSelect() {
|
|
329
329
|
return {
|
|
330
330
|
kind: 'Fragment',
|
|
331
|
-
version: VERSION$
|
|
331
|
+
version: VERSION$4,
|
|
332
332
|
private: [],
|
|
333
333
|
selections: [
|
|
334
334
|
{
|
|
@@ -342,7 +342,7 @@ const select$7 = function FulfillmentFlowOutputRepresentationSelect() {
|
|
|
342
342
|
]
|
|
343
343
|
};
|
|
344
344
|
};
|
|
345
|
-
function equals$
|
|
345
|
+
function equals$4(existing, incoming) {
|
|
346
346
|
const existing_id = existing.id;
|
|
347
347
|
const incoming_id = incoming.id;
|
|
348
348
|
if (!(existing_id === incoming_id)) {
|
|
@@ -356,8 +356,8 @@ function equals$3(existing, incoming) {
|
|
|
356
356
|
return true;
|
|
357
357
|
}
|
|
358
358
|
|
|
359
|
-
const VERSION$
|
|
360
|
-
function validate$
|
|
359
|
+
const VERSION$3 = "d0fe6f2d5b8246f10afe4067d3721d5b";
|
|
360
|
+
function validate$7(obj, path = 'IntakeFormOutputRepresentation') {
|
|
361
361
|
const v_error = (() => {
|
|
362
362
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
363
363
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -375,10 +375,10 @@ function validate$4(obj, path = 'IntakeFormOutputRepresentation') {
|
|
|
375
375
|
})();
|
|
376
376
|
return v_error === undefined ? null : v_error;
|
|
377
377
|
}
|
|
378
|
-
const select$
|
|
378
|
+
const select$8 = function IntakeFormOutputRepresentationSelect() {
|
|
379
379
|
return {
|
|
380
380
|
kind: 'Fragment',
|
|
381
|
-
version: VERSION$
|
|
381
|
+
version: VERSION$3,
|
|
382
382
|
private: [],
|
|
383
383
|
selections: [
|
|
384
384
|
{
|
|
@@ -392,7 +392,7 @@ const select$6 = function IntakeFormOutputRepresentationSelect() {
|
|
|
392
392
|
]
|
|
393
393
|
};
|
|
394
394
|
};
|
|
395
|
-
function equals$
|
|
395
|
+
function equals$3(existing, incoming) {
|
|
396
396
|
const existing_id = existing.id;
|
|
397
397
|
const incoming_id = incoming.id;
|
|
398
398
|
if (!(existing_id === incoming_id)) {
|
|
@@ -406,9 +406,9 @@ function equals$2(existing, incoming) {
|
|
|
406
406
|
return true;
|
|
407
407
|
}
|
|
408
408
|
|
|
409
|
-
const TTL$
|
|
410
|
-
const VERSION$
|
|
411
|
-
function validate$
|
|
409
|
+
const TTL$2 = 6000;
|
|
410
|
+
const VERSION$2 = "d0103a1b0725c5c2006308b12e54542c";
|
|
411
|
+
function validate$6(obj, path = 'CatalogItemOutputRepresentation') {
|
|
412
412
|
const v_error = (() => {
|
|
413
413
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
414
414
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -433,7 +433,7 @@ function validate$3(obj, path = 'CatalogItemOutputRepresentation') {
|
|
|
433
433
|
for (let i = 0; i < obj_attributes.length; i++) {
|
|
434
434
|
const obj_attributes_item = obj_attributes[i];
|
|
435
435
|
const path_attributes_item = path_attributes + '[' + i + ']';
|
|
436
|
-
const referencepath_attributes_itemValidationError = validate$
|
|
436
|
+
const referencepath_attributes_itemValidationError = validate$9(obj_attributes_item, path_attributes_item);
|
|
437
437
|
if (referencepath_attributes_itemValidationError !== null) {
|
|
438
438
|
let message = 'Object doesn\'t match CatalogItemAttributeOutputRepresentation (at "' + path_attributes_item + '")\n';
|
|
439
439
|
message += referencepath_attributes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -469,7 +469,7 @@ function validate$3(obj, path = 'CatalogItemOutputRepresentation') {
|
|
|
469
469
|
}
|
|
470
470
|
const obj_fulfillmentFlow = obj.fulfillmentFlow;
|
|
471
471
|
const path_fulfillmentFlow = path + '.fulfillmentFlow';
|
|
472
|
-
const referencepath_fulfillmentFlowValidationError = validate$
|
|
472
|
+
const referencepath_fulfillmentFlowValidationError = validate$8(obj_fulfillmentFlow, path_fulfillmentFlow);
|
|
473
473
|
if (referencepath_fulfillmentFlowValidationError !== null) {
|
|
474
474
|
let message = 'Object doesn\'t match FulfillmentFlowOutputRepresentation (at "' + path_fulfillmentFlow + '")\n';
|
|
475
475
|
message += referencepath_fulfillmentFlowValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -477,7 +477,7 @@ function validate$3(obj, path = 'CatalogItemOutputRepresentation') {
|
|
|
477
477
|
}
|
|
478
478
|
const obj_intakeForm = obj.intakeForm;
|
|
479
479
|
const path_intakeForm = path + '.intakeForm';
|
|
480
|
-
const referencepath_intakeFormValidationError = validate$
|
|
480
|
+
const referencepath_intakeFormValidationError = validate$7(obj_intakeForm, path_intakeForm);
|
|
481
481
|
if (referencepath_intakeFormValidationError !== null) {
|
|
482
482
|
let message = 'Object doesn\'t match IntakeFormOutputRepresentation (at "' + path_intakeForm + '")\n';
|
|
483
483
|
message += referencepath_intakeFormValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -525,26 +525,26 @@ function validate$3(obj, path = 'CatalogItemOutputRepresentation') {
|
|
|
525
525
|
})();
|
|
526
526
|
return v_error === undefined ? null : v_error;
|
|
527
527
|
}
|
|
528
|
-
const RepresentationType$
|
|
529
|
-
function keyBuilder$
|
|
530
|
-
return keyPrefix + '::' + RepresentationType$
|
|
528
|
+
const RepresentationType$2 = 'CatalogItemOutputRepresentation';
|
|
529
|
+
function keyBuilder$5(luvio, config) {
|
|
530
|
+
return keyPrefix + '::' + RepresentationType$2 + ':' + config.catalogItemId;
|
|
531
531
|
}
|
|
532
|
-
function keyBuilderFromType(luvio, object) {
|
|
532
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
533
533
|
const keyParams = {
|
|
534
534
|
catalogItemId: object.catalogItemId
|
|
535
535
|
};
|
|
536
|
-
return keyBuilder$
|
|
536
|
+
return keyBuilder$5(luvio, keyParams);
|
|
537
537
|
}
|
|
538
|
-
function normalize$
|
|
538
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
539
539
|
return input;
|
|
540
540
|
}
|
|
541
|
-
const select$
|
|
542
|
-
const { selections: CatalogItemAttributeOutputRepresentation__selections, opaque: CatalogItemAttributeOutputRepresentation__opaque, } = select$
|
|
543
|
-
const { selections: FulfillmentFlowOutputRepresentation__selections, opaque: FulfillmentFlowOutputRepresentation__opaque, } = select$
|
|
544
|
-
const { selections: IntakeFormOutputRepresentation__selections, opaque: IntakeFormOutputRepresentation__opaque, } = select$
|
|
541
|
+
const select$7 = function CatalogItemOutputRepresentationSelect() {
|
|
542
|
+
const { selections: CatalogItemAttributeOutputRepresentation__selections, opaque: CatalogItemAttributeOutputRepresentation__opaque, } = select$a();
|
|
543
|
+
const { selections: FulfillmentFlowOutputRepresentation__selections, opaque: FulfillmentFlowOutputRepresentation__opaque, } = select$9();
|
|
544
|
+
const { selections: IntakeFormOutputRepresentation__selections, opaque: IntakeFormOutputRepresentation__opaque, } = select$8();
|
|
545
545
|
return {
|
|
546
546
|
kind: 'Fragment',
|
|
547
|
-
version: VERSION$
|
|
547
|
+
version: VERSION$2,
|
|
548
548
|
private: [],
|
|
549
549
|
selections: [
|
|
550
550
|
{
|
|
@@ -610,7 +610,7 @@ const select$5 = function CatalogItemOutputRepresentationSelect() {
|
|
|
610
610
|
]
|
|
611
611
|
};
|
|
612
612
|
};
|
|
613
|
-
function equals$
|
|
613
|
+
function equals$2(existing, incoming) {
|
|
614
614
|
const existing_isActive = existing.isActive;
|
|
615
615
|
const incoming_isActive = incoming.isActive;
|
|
616
616
|
if (!(existing_isActive === incoming_isActive)) {
|
|
@@ -654,7 +654,7 @@ function equals$1(existing, incoming) {
|
|
|
654
654
|
const existing_attributes = existing.attributes;
|
|
655
655
|
const incoming_attributes = incoming.attributes;
|
|
656
656
|
const equals_attributes_items = equalsArray(existing_attributes, incoming_attributes, (existing_attributes_item, incoming_attributes_item) => {
|
|
657
|
-
if (!(equals$
|
|
657
|
+
if (!(equals$5(existing_attributes_item, incoming_attributes_item))) {
|
|
658
658
|
return false;
|
|
659
659
|
}
|
|
660
660
|
});
|
|
@@ -673,12 +673,12 @@ function equals$1(existing, incoming) {
|
|
|
673
673
|
}
|
|
674
674
|
const existing_fulfillmentFlow = existing.fulfillmentFlow;
|
|
675
675
|
const incoming_fulfillmentFlow = incoming.fulfillmentFlow;
|
|
676
|
-
if (!(equals$
|
|
676
|
+
if (!(equals$4(existing_fulfillmentFlow, incoming_fulfillmentFlow))) {
|
|
677
677
|
return false;
|
|
678
678
|
}
|
|
679
679
|
const existing_intakeForm = existing.intakeForm;
|
|
680
680
|
const incoming_intakeForm = incoming.intakeForm;
|
|
681
|
-
if (!(equals$
|
|
681
|
+
if (!(equals$3(existing_intakeForm, incoming_intakeForm))) {
|
|
682
682
|
return false;
|
|
683
683
|
}
|
|
684
684
|
const existing_integrations = existing.integrations;
|
|
@@ -703,41 +703,41 @@ function equals$1(existing, incoming) {
|
|
|
703
703
|
}
|
|
704
704
|
return true;
|
|
705
705
|
}
|
|
706
|
-
const ingest$
|
|
706
|
+
const ingest$2 = function CatalogItemOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
707
707
|
if (process.env.NODE_ENV !== 'production') {
|
|
708
|
-
const validateError = validate$
|
|
708
|
+
const validateError = validate$6(input);
|
|
709
709
|
if (validateError !== null) {
|
|
710
710
|
throw validateError;
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
|
-
const key = keyBuilderFromType(luvio, input);
|
|
714
|
-
const ttlToUse = TTL$
|
|
715
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
713
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
714
|
+
const ttlToUse = TTL$2;
|
|
715
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "ecm", VERSION$2, RepresentationType$2, equals$2);
|
|
716
716
|
return createLink(key);
|
|
717
717
|
};
|
|
718
|
-
function getTypeCacheKeys$
|
|
718
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
719
719
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
720
|
-
const rootKey = keyBuilderFromType(luvio, input);
|
|
720
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
721
721
|
rootKeySet.set(rootKey, {
|
|
722
722
|
namespace: keyPrefix,
|
|
723
|
-
representationName: RepresentationType$
|
|
723
|
+
representationName: RepresentationType$2,
|
|
724
724
|
mergeable: false
|
|
725
725
|
});
|
|
726
726
|
}
|
|
727
727
|
|
|
728
|
-
function select$
|
|
729
|
-
return select$
|
|
728
|
+
function select$6(luvio, params) {
|
|
729
|
+
return select$7();
|
|
730
730
|
}
|
|
731
|
-
function getResponseCacheKeys$
|
|
732
|
-
getTypeCacheKeys$
|
|
731
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
732
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
733
733
|
}
|
|
734
|
-
function ingestSuccess$
|
|
734
|
+
function ingestSuccess$4(luvio, resourceParams, response) {
|
|
735
735
|
const { body } = response;
|
|
736
|
-
const key = keyBuilderFromType(luvio, body);
|
|
737
|
-
luvio.storeIngest(key, ingest$
|
|
736
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
737
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
738
738
|
const snapshot = luvio.storeLookup({
|
|
739
739
|
recordId: key,
|
|
740
|
-
node: select$
|
|
740
|
+
node: select$6(),
|
|
741
741
|
variables: {},
|
|
742
742
|
});
|
|
743
743
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -748,7 +748,7 @@ function ingestSuccess$3(luvio, resourceParams, response) {
|
|
|
748
748
|
deepFreeze(snapshot.data);
|
|
749
749
|
return snapshot;
|
|
750
750
|
}
|
|
751
|
-
function createResourceRequest$
|
|
751
|
+
function createResourceRequest$4(config) {
|
|
752
752
|
const headers = {};
|
|
753
753
|
return {
|
|
754
754
|
baseUri: '/services/data/v63.0',
|
|
@@ -762,45 +762,45 @@ function createResourceRequest$3(config) {
|
|
|
762
762
|
};
|
|
763
763
|
}
|
|
764
764
|
|
|
765
|
-
const adapterName$
|
|
765
|
+
const adapterName$4 = 'createCatalogItem';
|
|
766
766
|
const createCatalogItem_ConfigPropertyMetadata = [
|
|
767
767
|
generateParamConfigMetadata('catalogItemCreateInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
768
768
|
];
|
|
769
|
-
const createCatalogItem_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
770
|
-
const createResourceParams$
|
|
771
|
-
function typeCheckConfig$
|
|
769
|
+
const createCatalogItem_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, createCatalogItem_ConfigPropertyMetadata);
|
|
770
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$5(createCatalogItem_ConfigPropertyMetadata);
|
|
771
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
772
772
|
const config = {};
|
|
773
773
|
const untrustedConfig_catalogItemCreateInput = untrustedConfig.catalogItemCreateInput;
|
|
774
|
-
const referenceCatalogItemCreateInputRepresentationValidationError = validate$
|
|
774
|
+
const referenceCatalogItemCreateInputRepresentationValidationError = validate$a(untrustedConfig_catalogItemCreateInput);
|
|
775
775
|
if (referenceCatalogItemCreateInputRepresentationValidationError === null) {
|
|
776
776
|
config.catalogItemCreateInput = untrustedConfig_catalogItemCreateInput;
|
|
777
777
|
}
|
|
778
778
|
return config;
|
|
779
779
|
}
|
|
780
|
-
function validateAdapterConfig$
|
|
780
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
781
781
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
782
782
|
return null;
|
|
783
783
|
}
|
|
784
784
|
if (process.env.NODE_ENV !== 'production') {
|
|
785
785
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
786
786
|
}
|
|
787
|
-
const config = typeCheckConfig$
|
|
787
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
788
788
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
789
789
|
return null;
|
|
790
790
|
}
|
|
791
791
|
return config;
|
|
792
792
|
}
|
|
793
|
-
function buildNetworkSnapshot$
|
|
794
|
-
const resourceParams = createResourceParams$
|
|
795
|
-
const request = createResourceRequest$
|
|
793
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
794
|
+
const resourceParams = createResourceParams$4(config);
|
|
795
|
+
const request = createResourceRequest$4(resourceParams);
|
|
796
796
|
return luvio.dispatchResourceRequest(request, options)
|
|
797
797
|
.then((response) => {
|
|
798
798
|
return luvio.handleSuccessResponse(() => {
|
|
799
|
-
const snapshot = ingestSuccess$
|
|
799
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response);
|
|
800
800
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
801
801
|
}, () => {
|
|
802
802
|
const cache = new StoreKeyMap();
|
|
803
|
-
getResponseCacheKeys$
|
|
803
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
804
804
|
return cache;
|
|
805
805
|
});
|
|
806
806
|
}, (response) => {
|
|
@@ -810,33 +810,33 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
810
810
|
}
|
|
811
811
|
const createCatalogItemAdapterFactory = (luvio) => {
|
|
812
812
|
return function createCatalogItem(untrustedConfig) {
|
|
813
|
-
const config = validateAdapterConfig$
|
|
813
|
+
const config = validateAdapterConfig$4(untrustedConfig, createCatalogItem_ConfigPropertyNames);
|
|
814
814
|
// Invalid or incomplete config
|
|
815
815
|
if (config === null) {
|
|
816
816
|
throw new Error('Invalid config for "createCatalogItem"');
|
|
817
817
|
}
|
|
818
|
-
return buildNetworkSnapshot$
|
|
818
|
+
return buildNetworkSnapshot$4(luvio, config);
|
|
819
819
|
};
|
|
820
820
|
};
|
|
821
821
|
|
|
822
|
-
function select$
|
|
823
|
-
return select$
|
|
822
|
+
function select$5(luvio, params) {
|
|
823
|
+
return select$7();
|
|
824
824
|
}
|
|
825
|
-
function keyBuilder$
|
|
826
|
-
return keyBuilder$
|
|
825
|
+
function keyBuilder$4(luvio, params) {
|
|
826
|
+
return keyBuilder$5(luvio, {
|
|
827
827
|
catalogItemId: params.urlParams.catalogItemId
|
|
828
828
|
});
|
|
829
829
|
}
|
|
830
|
-
function getResponseCacheKeys$
|
|
831
|
-
getTypeCacheKeys$
|
|
830
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
831
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
832
832
|
}
|
|
833
|
-
function ingestSuccess$
|
|
833
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
834
834
|
const { body } = response;
|
|
835
|
-
const key = keyBuilder$
|
|
836
|
-
luvio.storeIngest(key, ingest$
|
|
835
|
+
const key = keyBuilder$4(luvio, resourceParams);
|
|
836
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
837
837
|
const snapshot = luvio.storeLookup({
|
|
838
838
|
recordId: key,
|
|
839
|
-
node: select$
|
|
839
|
+
node: select$5(),
|
|
840
840
|
variables: {},
|
|
841
841
|
}, snapshotRefresh);
|
|
842
842
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -848,18 +848,18 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
848
848
|
return snapshot;
|
|
849
849
|
}
|
|
850
850
|
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
851
|
-
const key = keyBuilder$
|
|
851
|
+
const key = keyBuilder$4(luvio, params);
|
|
852
852
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
853
853
|
const storeMetadataParams = {
|
|
854
|
-
ttl: TTL$
|
|
854
|
+
ttl: TTL$2,
|
|
855
855
|
namespace: keyPrefix,
|
|
856
|
-
version: VERSION$
|
|
857
|
-
representationName: RepresentationType$
|
|
856
|
+
version: VERSION$2,
|
|
857
|
+
representationName: RepresentationType$2
|
|
858
858
|
};
|
|
859
859
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
860
860
|
return errorSnapshot;
|
|
861
861
|
}
|
|
862
|
-
function createResourceRequest$
|
|
862
|
+
function createResourceRequest$3(config) {
|
|
863
863
|
const headers = {};
|
|
864
864
|
return {
|
|
865
865
|
baseUri: '/services/data/v63.0',
|
|
@@ -873,60 +873,60 @@ function createResourceRequest$2(config) {
|
|
|
873
873
|
};
|
|
874
874
|
}
|
|
875
875
|
|
|
876
|
-
const adapterName$
|
|
876
|
+
const adapterName$3 = 'getCatalogItem';
|
|
877
877
|
const getCatalogItem_ConfigPropertyMetadata = [
|
|
878
878
|
generateParamConfigMetadata('catalogItemId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
879
879
|
];
|
|
880
|
-
const getCatalogItem_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
881
|
-
const createResourceParams$
|
|
882
|
-
function keyBuilder$
|
|
883
|
-
const resourceParams = createResourceParams$
|
|
884
|
-
return keyBuilder$
|
|
880
|
+
const getCatalogItem_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getCatalogItem_ConfigPropertyMetadata);
|
|
881
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$5(getCatalogItem_ConfigPropertyMetadata);
|
|
882
|
+
function keyBuilder$3(luvio, config) {
|
|
883
|
+
const resourceParams = createResourceParams$3(config);
|
|
884
|
+
return keyBuilder$4(luvio, resourceParams);
|
|
885
885
|
}
|
|
886
|
-
function typeCheckConfig$
|
|
886
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
887
887
|
const config = {};
|
|
888
|
-
typeCheckConfig$
|
|
888
|
+
typeCheckConfig$5(untrustedConfig, config, getCatalogItem_ConfigPropertyMetadata);
|
|
889
889
|
return config;
|
|
890
890
|
}
|
|
891
|
-
function validateAdapterConfig$
|
|
891
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
892
892
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
893
893
|
return null;
|
|
894
894
|
}
|
|
895
895
|
if (process.env.NODE_ENV !== 'production') {
|
|
896
896
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
897
897
|
}
|
|
898
|
-
const config = typeCheckConfig$
|
|
898
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
899
899
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
900
900
|
return null;
|
|
901
901
|
}
|
|
902
902
|
return config;
|
|
903
903
|
}
|
|
904
904
|
function adapterFragment$1(luvio, config) {
|
|
905
|
-
createResourceParams$
|
|
906
|
-
return select$
|
|
905
|
+
createResourceParams$3(config);
|
|
906
|
+
return select$5();
|
|
907
907
|
}
|
|
908
908
|
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
909
|
-
const snapshot = ingestSuccess$
|
|
909
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
910
910
|
config,
|
|
911
|
-
resolve: () => buildNetworkSnapshot$
|
|
911
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
912
912
|
});
|
|
913
913
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
914
914
|
}
|
|
915
915
|
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
916
916
|
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
917
917
|
config,
|
|
918
|
-
resolve: () => buildNetworkSnapshot$
|
|
918
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
919
919
|
});
|
|
920
920
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
921
921
|
}
|
|
922
|
-
function buildNetworkSnapshot$
|
|
923
|
-
const resourceParams = createResourceParams$
|
|
924
|
-
const request = createResourceRequest$
|
|
922
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
923
|
+
const resourceParams = createResourceParams$3(config);
|
|
924
|
+
const request = createResourceRequest$3(resourceParams);
|
|
925
925
|
return luvio.dispatchResourceRequest(request, options)
|
|
926
926
|
.then((response) => {
|
|
927
927
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
928
928
|
const cache = new StoreKeyMap();
|
|
929
|
-
getResponseCacheKeys$
|
|
929
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
930
930
|
return cache;
|
|
931
931
|
});
|
|
932
932
|
}, (response) => {
|
|
@@ -934,23 +934,23 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
934
934
|
});
|
|
935
935
|
}
|
|
936
936
|
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
937
|
-
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
937
|
+
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
938
938
|
}
|
|
939
939
|
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
940
940
|
const { luvio, config } = context;
|
|
941
941
|
const selector = {
|
|
942
|
-
recordId: keyBuilder$
|
|
942
|
+
recordId: keyBuilder$3(luvio, config),
|
|
943
943
|
node: adapterFragment$1(luvio, config),
|
|
944
944
|
variables: {},
|
|
945
945
|
};
|
|
946
946
|
const cacheSnapshot = storeLookup(selector, {
|
|
947
947
|
config,
|
|
948
|
-
resolve: () => buildNetworkSnapshot$
|
|
948
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
949
949
|
});
|
|
950
950
|
return cacheSnapshot;
|
|
951
951
|
}
|
|
952
952
|
const getCatalogItemAdapterFactory = (luvio) => function ecm__getCatalogItem(untrustedConfig, requestContext) {
|
|
953
|
-
const config = validateAdapterConfig$
|
|
953
|
+
const config = validateAdapterConfig$3(untrustedConfig, getCatalogItem_ConfigPropertyNames);
|
|
954
954
|
// Invalid or incomplete config
|
|
955
955
|
if (config === null) {
|
|
956
956
|
return null;
|
|
@@ -959,7 +959,7 @@ const getCatalogItemAdapterFactory = (luvio) => function ecm__getCatalogItem(unt
|
|
|
959
959
|
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
960
960
|
};
|
|
961
961
|
|
|
962
|
-
function validate$
|
|
962
|
+
function validate$5(obj, path = 'CatalogItemUpdateInputRepresentation') {
|
|
963
963
|
const v_error = (() => {
|
|
964
964
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
965
965
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -973,8 +973,233 @@ function validate$2(obj, path = 'CatalogItemUpdateInputRepresentation') {
|
|
|
973
973
|
return v_error === undefined ? null : v_error;
|
|
974
974
|
}
|
|
975
975
|
|
|
976
|
+
function select$4(luvio, params) {
|
|
977
|
+
return select$7();
|
|
978
|
+
}
|
|
979
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
980
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
981
|
+
}
|
|
982
|
+
function ingestSuccess$2(luvio, resourceParams, response) {
|
|
983
|
+
const { body } = response;
|
|
984
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
985
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
986
|
+
const snapshot = luvio.storeLookup({
|
|
987
|
+
recordId: key,
|
|
988
|
+
node: select$4(),
|
|
989
|
+
variables: {},
|
|
990
|
+
});
|
|
991
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
992
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
993
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
deepFreeze(snapshot.data);
|
|
997
|
+
return snapshot;
|
|
998
|
+
}
|
|
999
|
+
function createResourceRequest$2(config) {
|
|
1000
|
+
const headers = {};
|
|
1001
|
+
return {
|
|
1002
|
+
baseUri: '/services/data/v63.0',
|
|
1003
|
+
basePath: '/connect/catalog/catalog-item/' + config.urlParams.catalogItemId + '',
|
|
1004
|
+
method: 'patch',
|
|
1005
|
+
body: config.body,
|
|
1006
|
+
urlParams: config.urlParams,
|
|
1007
|
+
queryParams: {},
|
|
1008
|
+
headers,
|
|
1009
|
+
priority: 'normal',
|
|
1010
|
+
};
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
const adapterName$2 = 'updateCatalogItem';
|
|
1014
|
+
const updateCatalogItem_ConfigPropertyMetadata = [
|
|
1015
|
+
generateParamConfigMetadata('catalogItemId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1016
|
+
generateParamConfigMetadata('catalogItemUpdateInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1017
|
+
];
|
|
1018
|
+
const updateCatalogItem_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, updateCatalogItem_ConfigPropertyMetadata);
|
|
1019
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$5(updateCatalogItem_ConfigPropertyMetadata);
|
|
1020
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
1021
|
+
const config = {};
|
|
1022
|
+
typeCheckConfig$5(untrustedConfig, config, updateCatalogItem_ConfigPropertyMetadata);
|
|
1023
|
+
const untrustedConfig_catalogItemUpdateInput = untrustedConfig.catalogItemUpdateInput;
|
|
1024
|
+
const referenceCatalogItemUpdateInputRepresentationValidationError = validate$5(untrustedConfig_catalogItemUpdateInput);
|
|
1025
|
+
if (referenceCatalogItemUpdateInputRepresentationValidationError === null) {
|
|
1026
|
+
config.catalogItemUpdateInput = untrustedConfig_catalogItemUpdateInput;
|
|
1027
|
+
}
|
|
1028
|
+
return config;
|
|
1029
|
+
}
|
|
1030
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
1031
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1032
|
+
return null;
|
|
1033
|
+
}
|
|
1034
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1035
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1036
|
+
}
|
|
1037
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
1038
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1039
|
+
return null;
|
|
1040
|
+
}
|
|
1041
|
+
return config;
|
|
1042
|
+
}
|
|
1043
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
1044
|
+
const resourceParams = createResourceParams$2(config);
|
|
1045
|
+
const request = createResourceRequest$2(resourceParams);
|
|
1046
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1047
|
+
.then((response) => {
|
|
1048
|
+
return luvio.handleSuccessResponse(() => {
|
|
1049
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response);
|
|
1050
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1051
|
+
}, () => {
|
|
1052
|
+
const cache = new StoreKeyMap();
|
|
1053
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
1054
|
+
return cache;
|
|
1055
|
+
});
|
|
1056
|
+
}, (response) => {
|
|
1057
|
+
deepFreeze(response);
|
|
1058
|
+
throw response;
|
|
1059
|
+
});
|
|
1060
|
+
}
|
|
1061
|
+
const updateCatalogItemAdapterFactory = (luvio) => {
|
|
1062
|
+
return function updateCatalogItem(untrustedConfig) {
|
|
1063
|
+
const config = validateAdapterConfig$2(untrustedConfig, updateCatalogItem_ConfigPropertyNames);
|
|
1064
|
+
// Invalid or incomplete config
|
|
1065
|
+
if (config === null) {
|
|
1066
|
+
throw new Error('Invalid config for "updateCatalogItem"');
|
|
1067
|
+
}
|
|
1068
|
+
return buildNetworkSnapshot$2(luvio, config);
|
|
1069
|
+
};
|
|
1070
|
+
};
|
|
1071
|
+
|
|
1072
|
+
function validate$4(obj, path = 'CategoryInput') {
|
|
1073
|
+
const v_error = (() => {
|
|
1074
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1075
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1076
|
+
}
|
|
1077
|
+
const obj_categoryId = obj.categoryId;
|
|
1078
|
+
const path_categoryId = path + '.categoryId';
|
|
1079
|
+
if (typeof obj_categoryId !== 'string') {
|
|
1080
|
+
return new TypeError('Expected "string" but received "' + typeof obj_categoryId + '" (at "' + path_categoryId + '")');
|
|
1081
|
+
}
|
|
1082
|
+
const obj_parentCategoryId = obj.parentCategoryId;
|
|
1083
|
+
const path_parentCategoryId = path + '.parentCategoryId';
|
|
1084
|
+
if (typeof obj_parentCategoryId !== 'string') {
|
|
1085
|
+
return new TypeError('Expected "string" but received "' + typeof obj_parentCategoryId + '" (at "' + path_parentCategoryId + '")');
|
|
1086
|
+
}
|
|
1087
|
+
})();
|
|
1088
|
+
return v_error === undefined ? null : v_error;
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
function validate$3(obj, path = 'CategoryAndParentErrorOutputRepresentation') {
|
|
1092
|
+
const v_error = (() => {
|
|
1093
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1094
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1095
|
+
}
|
|
1096
|
+
const obj_errorMessageList = obj.errorMessageList;
|
|
1097
|
+
const path_errorMessageList = path + '.errorMessageList';
|
|
1098
|
+
if (!ArrayIsArray(obj_errorMessageList)) {
|
|
1099
|
+
return new TypeError('Expected "array" but received "' + typeof obj_errorMessageList + '" (at "' + path_errorMessageList + '")');
|
|
1100
|
+
}
|
|
1101
|
+
for (let i = 0; i < obj_errorMessageList.length; i++) {
|
|
1102
|
+
const obj_errorMessageList_item = obj_errorMessageList[i];
|
|
1103
|
+
const path_errorMessageList_item = path_errorMessageList + '[' + i + ']';
|
|
1104
|
+
if (typeof obj_errorMessageList_item !== 'string') {
|
|
1105
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errorMessageList_item + '" (at "' + path_errorMessageList_item + '")');
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
})();
|
|
1109
|
+
return v_error === undefined ? null : v_error;
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
const TTL$1 = 6000;
|
|
1113
|
+
const VERSION$1 = "fe841039450a703d6b90e94658dd230f";
|
|
1114
|
+
function validate$2(obj, path = 'CategoryAndParentOutputRepresentation') {
|
|
1115
|
+
const v_error = (() => {
|
|
1116
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1117
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1118
|
+
}
|
|
1119
|
+
const obj_catalogId = obj.catalogId;
|
|
1120
|
+
const path_catalogId = path + '.catalogId';
|
|
1121
|
+
if (typeof obj_catalogId !== 'string') {
|
|
1122
|
+
return new TypeError('Expected "string" but received "' + typeof obj_catalogId + '" (at "' + path_catalogId + '")');
|
|
1123
|
+
}
|
|
1124
|
+
const obj_errors = obj.errors;
|
|
1125
|
+
const path_errors = path + '.errors';
|
|
1126
|
+
if (!ArrayIsArray(obj_errors)) {
|
|
1127
|
+
return new TypeError('Expected "array" but received "' + typeof obj_errors + '" (at "' + path_errors + '")');
|
|
1128
|
+
}
|
|
1129
|
+
for (let i = 0; i < obj_errors.length; i++) {
|
|
1130
|
+
const obj_errors_item = obj_errors[i];
|
|
1131
|
+
const path_errors_item = path_errors + '[' + i + ']';
|
|
1132
|
+
const referencepath_errors_itemValidationError = validate$3(obj_errors_item, path_errors_item);
|
|
1133
|
+
if (referencepath_errors_itemValidationError !== null) {
|
|
1134
|
+
let message = 'Object doesn\'t match CategoryAndParentErrorOutputRepresentation (at "' + path_errors_item + '")\n';
|
|
1135
|
+
message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1136
|
+
return new TypeError(message);
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
const obj_message = obj.message;
|
|
1140
|
+
const path_message = path + '.message';
|
|
1141
|
+
if (typeof obj_message !== 'string') {
|
|
1142
|
+
return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
|
|
1143
|
+
}
|
|
1144
|
+
const obj_status = obj.status;
|
|
1145
|
+
const path_status = path + '.status';
|
|
1146
|
+
if (typeof obj_status !== 'string') {
|
|
1147
|
+
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
1148
|
+
}
|
|
1149
|
+
})();
|
|
1150
|
+
return v_error === undefined ? null : v_error;
|
|
1151
|
+
}
|
|
1152
|
+
const RepresentationType$1 = 'CategoryAndParentOutputRepresentation';
|
|
1153
|
+
function keyBuilder$2(luvio, config) {
|
|
1154
|
+
return keyPrefix + '::' + RepresentationType$1 + ':' + config.id;
|
|
1155
|
+
}
|
|
1156
|
+
function keyBuilderFromType(luvio, object) {
|
|
1157
|
+
const keyParams = {
|
|
1158
|
+
id: object.catalogId
|
|
1159
|
+
};
|
|
1160
|
+
return keyBuilder$2(luvio, keyParams);
|
|
1161
|
+
}
|
|
1162
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
1163
|
+
return input;
|
|
1164
|
+
}
|
|
1165
|
+
const select$3 = function CategoryAndParentOutputRepresentationSelect() {
|
|
1166
|
+
return {
|
|
1167
|
+
kind: 'Fragment',
|
|
1168
|
+
version: VERSION$1,
|
|
1169
|
+
private: [],
|
|
1170
|
+
opaque: true
|
|
1171
|
+
};
|
|
1172
|
+
};
|
|
1173
|
+
function equals$1(existing, incoming) {
|
|
1174
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1175
|
+
return false;
|
|
1176
|
+
}
|
|
1177
|
+
return true;
|
|
1178
|
+
}
|
|
1179
|
+
const ingest$1 = function CategoryAndParentOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1180
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1181
|
+
const validateError = validate$2(input);
|
|
1182
|
+
if (validateError !== null) {
|
|
1183
|
+
throw validateError;
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
const key = keyBuilderFromType(luvio, input);
|
|
1187
|
+
const ttlToUse = TTL$1;
|
|
1188
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "ecm", VERSION$1, RepresentationType$1, equals$1);
|
|
1189
|
+
return createLink(key);
|
|
1190
|
+
};
|
|
1191
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
1192
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1193
|
+
const rootKey = keyBuilderFromType(luvio, input);
|
|
1194
|
+
rootKeySet.set(rootKey, {
|
|
1195
|
+
namespace: keyPrefix,
|
|
1196
|
+
representationName: RepresentationType$1,
|
|
1197
|
+
mergeable: false
|
|
1198
|
+
});
|
|
1199
|
+
}
|
|
1200
|
+
|
|
976
1201
|
function select$2(luvio, params) {
|
|
977
|
-
return select$
|
|
1202
|
+
return select$3();
|
|
978
1203
|
}
|
|
979
1204
|
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
980
1205
|
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
@@ -1000,7 +1225,7 @@ function createResourceRequest$1(config) {
|
|
|
1000
1225
|
const headers = {};
|
|
1001
1226
|
return {
|
|
1002
1227
|
baseUri: '/services/data/v63.0',
|
|
1003
|
-
basePath: '/connect/catalog/
|
|
1228
|
+
basePath: '/connect/catalog/' + config.urlParams.catalogId + '/categories',
|
|
1004
1229
|
method: 'patch',
|
|
1005
1230
|
body: config.body,
|
|
1006
1231
|
urlParams: config.urlParams,
|
|
@@ -1010,20 +1235,27 @@ function createResourceRequest$1(config) {
|
|
|
1010
1235
|
};
|
|
1011
1236
|
}
|
|
1012
1237
|
|
|
1013
|
-
const adapterName$1 = '
|
|
1014
|
-
const
|
|
1015
|
-
generateParamConfigMetadata('
|
|
1016
|
-
generateParamConfigMetadata('
|
|
1238
|
+
const adapterName$1 = 'updateEpcCategories';
|
|
1239
|
+
const updateEpcCategories_ConfigPropertyMetadata = [
|
|
1240
|
+
generateParamConfigMetadata('catalogId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1241
|
+
generateParamConfigMetadata('categories', true, 2 /* Body */, 4 /* Unsupported */, true),
|
|
1017
1242
|
];
|
|
1018
|
-
const
|
|
1019
|
-
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$
|
|
1243
|
+
const updateEpcCategories_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, updateEpcCategories_ConfigPropertyMetadata);
|
|
1244
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$5(updateEpcCategories_ConfigPropertyMetadata);
|
|
1020
1245
|
function typeCheckConfig$1(untrustedConfig) {
|
|
1021
1246
|
const config = {};
|
|
1022
|
-
typeCheckConfig$
|
|
1023
|
-
const
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1247
|
+
typeCheckConfig$5(untrustedConfig, config, updateEpcCategories_ConfigPropertyMetadata);
|
|
1248
|
+
const untrustedConfig_categories = untrustedConfig.categories;
|
|
1249
|
+
if (ArrayIsArray$1(untrustedConfig_categories)) {
|
|
1250
|
+
const untrustedConfig_categories_array = [];
|
|
1251
|
+
for (let i = 0, arrayLength = untrustedConfig_categories.length; i < arrayLength; i++) {
|
|
1252
|
+
const untrustedConfig_categories_item = untrustedConfig_categories[i];
|
|
1253
|
+
const referenceCategoryInputValidationError = validate$4(untrustedConfig_categories_item);
|
|
1254
|
+
if (referenceCategoryInputValidationError === null) {
|
|
1255
|
+
untrustedConfig_categories_array.push(untrustedConfig_categories_item);
|
|
1256
|
+
}
|
|
1257
|
+
}
|
|
1258
|
+
config.categories = untrustedConfig_categories_array;
|
|
1027
1259
|
}
|
|
1028
1260
|
return config;
|
|
1029
1261
|
}
|
|
@@ -1058,12 +1290,12 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
1058
1290
|
throw response;
|
|
1059
1291
|
});
|
|
1060
1292
|
}
|
|
1061
|
-
const
|
|
1062
|
-
return function
|
|
1063
|
-
const config = validateAdapterConfig$1(untrustedConfig,
|
|
1293
|
+
const updateEpcCategoriesAdapterFactory = (luvio) => {
|
|
1294
|
+
return function updateEpcCategories(untrustedConfig) {
|
|
1295
|
+
const config = validateAdapterConfig$1(untrustedConfig, updateEpcCategories_ConfigPropertyNames);
|
|
1064
1296
|
// Invalid or incomplete config
|
|
1065
1297
|
if (config === null) {
|
|
1066
|
-
throw new Error('Invalid config for "
|
|
1298
|
+
throw new Error('Invalid config for "updateEpcCategories"');
|
|
1067
1299
|
}
|
|
1068
1300
|
return buildNetworkSnapshot$1(luvio, config);
|
|
1069
1301
|
};
|
|
@@ -1084,8 +1316,8 @@ function validate$1(obj, path = 'ServiceAutomationOutputRecordRepresentation') {
|
|
|
1084
1316
|
const key = obj_fields_keys[i];
|
|
1085
1317
|
const obj_fields_prop = obj_fields[key];
|
|
1086
1318
|
const path_fields_prop = path_fields + '["' + key + '"]';
|
|
1087
|
-
if (
|
|
1088
|
-
return new TypeError('Expected "
|
|
1319
|
+
if (obj_fields_prop === undefined) {
|
|
1320
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_fields_prop + '" (at "' + path_fields_prop + '")');
|
|
1089
1321
|
}
|
|
1090
1322
|
}
|
|
1091
1323
|
})();
|
|
@@ -1166,7 +1398,7 @@ function select(luvio, params) {
|
|
|
1166
1398
|
return select$1();
|
|
1167
1399
|
}
|
|
1168
1400
|
function keyBuilder$1(luvio, params) {
|
|
1169
|
-
return keyPrefix + '::ServiceAutomationDepOutputRepresentation:(' + 'entityName:' + params.body.entityName + '::' + 'fields:' + params.body.fields + '::' + '[' + params.body.filters.map(element => stableJSONStringify(element)).join(',') + ']' + '::' + 'limit:' + params.body.limit + ')';
|
|
1401
|
+
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) + ')';
|
|
1170
1402
|
}
|
|
1171
1403
|
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
1172
1404
|
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
@@ -1219,17 +1451,17 @@ const getAllServiceAutomationDep_ConfigPropertyMetadata = [
|
|
|
1219
1451
|
generateParamConfigMetadata('entityName', true, 2 /* Body */, 0 /* String */),
|
|
1220
1452
|
generateParamConfigMetadata('fields', true, 2 /* Body */, 0 /* String */, true),
|
|
1221
1453
|
generateParamConfigMetadata('filters', true, 2 /* Body */, 4 /* Unsupported */, true),
|
|
1222
|
-
generateParamConfigMetadata('limit',
|
|
1454
|
+
generateParamConfigMetadata('limit', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1223
1455
|
];
|
|
1224
1456
|
const getAllServiceAutomationDep_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getAllServiceAutomationDep_ConfigPropertyMetadata);
|
|
1225
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
1457
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$5(getAllServiceAutomationDep_ConfigPropertyMetadata);
|
|
1226
1458
|
function keyBuilder(luvio, config) {
|
|
1227
1459
|
const resourceParams = createResourceParams(config);
|
|
1228
1460
|
return keyBuilder$1(luvio, resourceParams);
|
|
1229
1461
|
}
|
|
1230
1462
|
function typeCheckConfig(untrustedConfig) {
|
|
1231
1463
|
const config = {};
|
|
1232
|
-
typeCheckConfig$
|
|
1464
|
+
typeCheckConfig$5(untrustedConfig, config, getAllServiceAutomationDep_ConfigPropertyMetadata);
|
|
1233
1465
|
const untrustedConfig_filters = untrustedConfig.filters;
|
|
1234
1466
|
if (ArrayIsArray$1(untrustedConfig_filters)) {
|
|
1235
1467
|
const untrustedConfig_filters_array = [];
|
|
@@ -1244,6 +1476,13 @@ function typeCheckConfig(untrustedConfig) {
|
|
|
1244
1476
|
}
|
|
1245
1477
|
config.filters = untrustedConfig_filters_array;
|
|
1246
1478
|
}
|
|
1479
|
+
const untrustedConfig_limit = untrustedConfig.limit;
|
|
1480
|
+
if (typeof untrustedConfig_limit === 'number' && Math.floor(untrustedConfig_limit) === untrustedConfig_limit) {
|
|
1481
|
+
config.limit = untrustedConfig_limit;
|
|
1482
|
+
}
|
|
1483
|
+
if (untrustedConfig_limit === null) {
|
|
1484
|
+
config.limit = untrustedConfig_limit;
|
|
1485
|
+
}
|
|
1247
1486
|
return config;
|
|
1248
1487
|
}
|
|
1249
1488
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
@@ -1317,4 +1556,4 @@ const getAllServiceAutomationDepAdapterFactory = (luvio) => function ecm__getAll
|
|
|
1317
1556
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
1318
1557
|
};
|
|
1319
1558
|
|
|
1320
|
-
export { createCatalogItemAdapterFactory, getAllServiceAutomationDepAdapterFactory, getCatalogItemAdapterFactory, updateCatalogItemAdapterFactory };
|
|
1559
|
+
export { createCatalogItemAdapterFactory, getAllServiceAutomationDepAdapterFactory, getCatalogItemAdapterFactory, updateCatalogItemAdapterFactory, updateEpcCategoriesAdapterFactory };
|