@salesforce/lds-adapters-cms-authoring 1.102.0 → 1.103.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/cms-authoring.js +1254 -840
- package/dist/types/src/generated/adapters/getManagedContentSpace.d.ts +27 -0
- package/dist/types/src/generated/adapters/patchManagedContentSpace.d.ts +22 -0
- package/dist/types/src/generated/artifacts/main.d.ts +2 -0
- package/dist/types/src/generated/artifacts/sfdc.d.ts +5 -1
- package/dist/types/src/generated/resources/getConnectCmsSpacesByContentSpaceId.d.ts +1 -0
- package/dist/types/src/generated/resources/patchConnectCmsSpacesByContentSpaceId.d.ts +4 -1
- package/dist/types/src/generated/types/ManagedContentSpaceCollectionRepresentation.d.ts +3 -3
- package/dist/types/src/generated/types/ManagedContentSpaceRepresentation.d.ts +18 -5
- package/dist/umd/es2018/cms-authoring.js +1255 -839
- package/dist/umd/es5/cms-authoring.js +1255 -839
- package/package.json +3 -3
- package/sfdc/index.js +1106 -641
- package/src/raml/api.raml +3 -0
- package/src/raml/luvio.raml +14 -0
|
@@ -219,8 +219,8 @@ function deepFreeze$t(input) {
|
|
|
219
219
|
ObjectFreeze(input);
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
-
const TTL$
|
|
223
|
-
const VERSION$
|
|
222
|
+
const TTL$f = 1000;
|
|
223
|
+
const VERSION$f = "ca653daea9600118e6167b9b4ff4d07c";
|
|
224
224
|
function validate$A(obj, path = 'ManagedContentDeploymentRepresentation') {
|
|
225
225
|
const v_error = (() => {
|
|
226
226
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -405,28 +405,28 @@ function validate$A(obj, path = 'ManagedContentDeploymentRepresentation') {
|
|
|
405
405
|
})();
|
|
406
406
|
return v_error === undefined ? null : v_error;
|
|
407
407
|
}
|
|
408
|
-
const RepresentationType$
|
|
409
|
-
function keyBuilder$
|
|
410
|
-
return keyPrefix + '::' + RepresentationType$
|
|
408
|
+
const RepresentationType$f = 'ManagedContentDeploymentRepresentation';
|
|
409
|
+
function keyBuilder$w(luvio, config) {
|
|
410
|
+
return keyPrefix + '::' + RepresentationType$f + ':' + config.id;
|
|
411
411
|
}
|
|
412
|
-
function keyBuilderFromType$
|
|
412
|
+
function keyBuilderFromType$9(luvio, object) {
|
|
413
413
|
const keyParams = {
|
|
414
414
|
id: object.deploymentId
|
|
415
415
|
};
|
|
416
|
-
return keyBuilder$
|
|
416
|
+
return keyBuilder$w(luvio, keyParams);
|
|
417
417
|
}
|
|
418
|
-
function normalize$
|
|
418
|
+
function normalize$f(input, existing, path, luvio, store, timestamp) {
|
|
419
419
|
return input;
|
|
420
420
|
}
|
|
421
|
-
const select$
|
|
421
|
+
const select$A = function ManagedContentDeploymentRepresentationSelect() {
|
|
422
422
|
return {
|
|
423
423
|
kind: 'Fragment',
|
|
424
|
-
version: VERSION$
|
|
424
|
+
version: VERSION$f,
|
|
425
425
|
private: [],
|
|
426
426
|
opaque: true
|
|
427
427
|
};
|
|
428
428
|
};
|
|
429
|
-
function equals$
|
|
429
|
+
function equals$f(existing, incoming) {
|
|
430
430
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
431
431
|
return false;
|
|
432
432
|
}
|
|
@@ -441,62 +441,62 @@ function deepFreeze$s(input) {
|
|
|
441
441
|
ObjectFreeze(input_deploymentItems);
|
|
442
442
|
ObjectFreeze(input);
|
|
443
443
|
}
|
|
444
|
-
const ingest$
|
|
444
|
+
const ingest$f = function ManagedContentDeploymentRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
445
445
|
if (process.env.NODE_ENV !== 'production') {
|
|
446
446
|
const validateError = validate$A(input);
|
|
447
447
|
if (validateError !== null) {
|
|
448
448
|
throw validateError;
|
|
449
449
|
}
|
|
450
450
|
}
|
|
451
|
-
const key = keyBuilderFromType$
|
|
451
|
+
const key = keyBuilderFromType$9(luvio, input);
|
|
452
452
|
const existingRecord = store.readEntry(key);
|
|
453
|
-
const ttlToUse = TTL$
|
|
454
|
-
let incomingRecord = normalize$
|
|
453
|
+
const ttlToUse = TTL$f;
|
|
454
|
+
let incomingRecord = normalize$f(input, store.readEntry(key), {
|
|
455
455
|
fullPath: key,
|
|
456
456
|
parent: path.parent,
|
|
457
457
|
propertyName: path.propertyName,
|
|
458
458
|
ttl: ttlToUse
|
|
459
459
|
});
|
|
460
460
|
deepFreeze$s(input);
|
|
461
|
-
if (existingRecord === undefined || equals$
|
|
461
|
+
if (existingRecord === undefined || equals$f(existingRecord, incomingRecord) === false) {
|
|
462
462
|
luvio.storePublish(key, incomingRecord);
|
|
463
463
|
}
|
|
464
464
|
{
|
|
465
465
|
const storeMetadataParams = {
|
|
466
466
|
ttl: ttlToUse,
|
|
467
467
|
namespace: "CMSAuthoring",
|
|
468
|
-
version: VERSION$
|
|
469
|
-
representationName: RepresentationType$
|
|
468
|
+
version: VERSION$f,
|
|
469
|
+
representationName: RepresentationType$f,
|
|
470
470
|
};
|
|
471
471
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
472
472
|
}
|
|
473
473
|
return createLink(key);
|
|
474
474
|
};
|
|
475
|
-
function getTypeCacheKeys$
|
|
475
|
+
function getTypeCacheKeys$f(luvio, input, fullPathFactory) {
|
|
476
476
|
const rootKeySet = new StoreKeyMap();
|
|
477
477
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
478
|
-
const rootKey = keyBuilderFromType$
|
|
478
|
+
const rootKey = keyBuilderFromType$9(luvio, input);
|
|
479
479
|
rootKeySet.set(rootKey, {
|
|
480
480
|
namespace: keyPrefix,
|
|
481
|
-
representationName: RepresentationType$
|
|
481
|
+
representationName: RepresentationType$f,
|
|
482
482
|
mergeable: false
|
|
483
483
|
});
|
|
484
484
|
return rootKeySet;
|
|
485
485
|
}
|
|
486
486
|
|
|
487
|
-
function select$
|
|
488
|
-
return select$
|
|
487
|
+
function select$z(luvio, params) {
|
|
488
|
+
return select$A();
|
|
489
489
|
}
|
|
490
|
-
function getResponseCacheKeys$
|
|
491
|
-
return getTypeCacheKeys$
|
|
490
|
+
function getResponseCacheKeys$l(luvio, resourceParams, response) {
|
|
491
|
+
return getTypeCacheKeys$f(luvio, response);
|
|
492
492
|
}
|
|
493
|
-
function ingestSuccess$
|
|
493
|
+
function ingestSuccess$l(luvio, resourceParams, response) {
|
|
494
494
|
const { body } = response;
|
|
495
|
-
const key = keyBuilderFromType$
|
|
496
|
-
luvio.storeIngest(key, ingest$
|
|
495
|
+
const key = keyBuilderFromType$9(luvio, body);
|
|
496
|
+
luvio.storeIngest(key, ingest$f, body);
|
|
497
497
|
const snapshot = luvio.storeLookup({
|
|
498
498
|
recordId: key,
|
|
499
|
-
node: select$
|
|
499
|
+
node: select$z(),
|
|
500
500
|
variables: {},
|
|
501
501
|
});
|
|
502
502
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -506,7 +506,7 @@ function ingestSuccess$j(luvio, resourceParams, response) {
|
|
|
506
506
|
}
|
|
507
507
|
return snapshot;
|
|
508
508
|
}
|
|
509
|
-
function createResourceRequest$
|
|
509
|
+
function createResourceRequest$l(config) {
|
|
510
510
|
const headers = {};
|
|
511
511
|
return {
|
|
512
512
|
baseUri: '/services/data/v58.0',
|
|
@@ -527,7 +527,7 @@ const createDeployment_ConfigPropertyNames = {
|
|
|
527
527
|
optional: []
|
|
528
528
|
}
|
|
529
529
|
};
|
|
530
|
-
function createResourceParams$
|
|
530
|
+
function createResourceParams$l(config) {
|
|
531
531
|
const resourceParams = {
|
|
532
532
|
body: {
|
|
533
533
|
DeploymentInput: config.DeploymentInput
|
|
@@ -535,7 +535,7 @@ function createResourceParams$j(config) {
|
|
|
535
535
|
};
|
|
536
536
|
return resourceParams;
|
|
537
537
|
}
|
|
538
|
-
function typeCheckConfig$
|
|
538
|
+
function typeCheckConfig$l(untrustedConfig) {
|
|
539
539
|
const config = {};
|
|
540
540
|
const untrustedConfig_DeploymentInput = untrustedConfig.DeploymentInput;
|
|
541
541
|
const referenceManagedContentDeploymentInputRepresentationValidationError = validate$C(untrustedConfig_DeploymentInput);
|
|
@@ -544,28 +544,28 @@ function typeCheckConfig$j(untrustedConfig) {
|
|
|
544
544
|
}
|
|
545
545
|
return config;
|
|
546
546
|
}
|
|
547
|
-
function validateAdapterConfig$
|
|
547
|
+
function validateAdapterConfig$l(untrustedConfig, configPropertyNames) {
|
|
548
548
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
549
549
|
return null;
|
|
550
550
|
}
|
|
551
551
|
if (process.env.NODE_ENV !== 'production') {
|
|
552
552
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
553
553
|
}
|
|
554
|
-
const config = typeCheckConfig$
|
|
554
|
+
const config = typeCheckConfig$l(untrustedConfig);
|
|
555
555
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
556
556
|
return null;
|
|
557
557
|
}
|
|
558
558
|
return config;
|
|
559
559
|
}
|
|
560
|
-
function buildNetworkSnapshot$
|
|
561
|
-
const resourceParams = createResourceParams$
|
|
562
|
-
const request = createResourceRequest$
|
|
560
|
+
function buildNetworkSnapshot$l(luvio, config, options) {
|
|
561
|
+
const resourceParams = createResourceParams$l(config);
|
|
562
|
+
const request = createResourceRequest$l(resourceParams);
|
|
563
563
|
return luvio.dispatchResourceRequest(request, options)
|
|
564
564
|
.then((response) => {
|
|
565
565
|
return luvio.handleSuccessResponse(() => {
|
|
566
|
-
const snapshot = ingestSuccess$
|
|
566
|
+
const snapshot = ingestSuccess$l(luvio, resourceParams, response);
|
|
567
567
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
568
|
-
}, () => getResponseCacheKeys$
|
|
568
|
+
}, () => getResponseCacheKeys$l(luvio, resourceParams, response.body));
|
|
569
569
|
}, (response) => {
|
|
570
570
|
deepFreeze$u(response);
|
|
571
571
|
throw response;
|
|
@@ -573,12 +573,12 @@ function buildNetworkSnapshot$j(luvio, config, options) {
|
|
|
573
573
|
}
|
|
574
574
|
const createDeploymentAdapterFactory = (luvio) => {
|
|
575
575
|
return function createDeployment(untrustedConfig) {
|
|
576
|
-
const config = validateAdapterConfig$
|
|
576
|
+
const config = validateAdapterConfig$l(untrustedConfig, createDeployment_ConfigPropertyNames);
|
|
577
577
|
// Invalid or incomplete config
|
|
578
578
|
if (config === null) {
|
|
579
579
|
throw new Error('Invalid config for "createDeployment"');
|
|
580
580
|
}
|
|
581
|
-
return buildNetworkSnapshot$
|
|
581
|
+
return buildNetworkSnapshot$l(luvio, config);
|
|
582
582
|
};
|
|
583
583
|
};
|
|
584
584
|
|
|
@@ -683,8 +683,8 @@ function deepFreeze$p(input) {
|
|
|
683
683
|
ObjectFreeze(input);
|
|
684
684
|
}
|
|
685
685
|
|
|
686
|
-
const TTL$
|
|
687
|
-
const VERSION$
|
|
686
|
+
const TTL$e = 100;
|
|
687
|
+
const VERSION$e = "eeea454f1268ece5c3e24c986688b876";
|
|
688
688
|
function validate$w(obj, path = 'ManagedContentCollectionDetailRepresentation') {
|
|
689
689
|
const v_error = (() => {
|
|
690
690
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -756,30 +756,30 @@ function validate$w(obj, path = 'ManagedContentCollectionDetailRepresentation')
|
|
|
756
756
|
})();
|
|
757
757
|
return v_error === undefined ? null : v_error;
|
|
758
758
|
}
|
|
759
|
-
const RepresentationType$
|
|
760
|
-
function keyBuilder$
|
|
761
|
-
return keyPrefix + '::' + RepresentationType$
|
|
759
|
+
const RepresentationType$e = 'ManagedContentCollectionDetailRepresentation';
|
|
760
|
+
function keyBuilder$v(luvio, config) {
|
|
761
|
+
return keyPrefix + '::' + RepresentationType$e + ':' + config.collection_key + ':' + config.language + ':' + config.version;
|
|
762
762
|
}
|
|
763
|
-
function keyBuilderFromType$
|
|
763
|
+
function keyBuilderFromType$8(luvio, object) {
|
|
764
764
|
const keyParams = {
|
|
765
765
|
collection_key: object.collectionKey,
|
|
766
766
|
language: object.language,
|
|
767
767
|
version: object.versionNumber
|
|
768
768
|
};
|
|
769
|
-
return keyBuilder$
|
|
769
|
+
return keyBuilder$v(luvio, keyParams);
|
|
770
770
|
}
|
|
771
|
-
function normalize$
|
|
771
|
+
function normalize$e(input, existing, path, luvio, store, timestamp) {
|
|
772
772
|
return input;
|
|
773
773
|
}
|
|
774
|
-
const select$
|
|
774
|
+
const select$y = function ManagedContentCollectionDetailRepresentationSelect() {
|
|
775
775
|
return {
|
|
776
776
|
kind: 'Fragment',
|
|
777
|
-
version: VERSION$
|
|
777
|
+
version: VERSION$e,
|
|
778
778
|
private: [],
|
|
779
779
|
opaque: true
|
|
780
780
|
};
|
|
781
781
|
};
|
|
782
|
-
function equals$
|
|
782
|
+
function equals$e(existing, incoming) {
|
|
783
783
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
784
784
|
return false;
|
|
785
785
|
}
|
|
@@ -796,69 +796,69 @@ function deepFreeze$o(input) {
|
|
|
796
796
|
ObjectFreeze(input_items);
|
|
797
797
|
ObjectFreeze(input);
|
|
798
798
|
}
|
|
799
|
-
const ingest$
|
|
799
|
+
const ingest$e = function ManagedContentCollectionDetailRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
800
800
|
if (process.env.NODE_ENV !== 'production') {
|
|
801
801
|
const validateError = validate$w(input);
|
|
802
802
|
if (validateError !== null) {
|
|
803
803
|
throw validateError;
|
|
804
804
|
}
|
|
805
805
|
}
|
|
806
|
-
const key = keyBuilderFromType$
|
|
806
|
+
const key = keyBuilderFromType$8(luvio, input);
|
|
807
807
|
const existingRecord = store.readEntry(key);
|
|
808
|
-
const ttlToUse = TTL$
|
|
809
|
-
let incomingRecord = normalize$
|
|
808
|
+
const ttlToUse = TTL$e;
|
|
809
|
+
let incomingRecord = normalize$e(input, store.readEntry(key), {
|
|
810
810
|
fullPath: key,
|
|
811
811
|
parent: path.parent,
|
|
812
812
|
propertyName: path.propertyName,
|
|
813
813
|
ttl: ttlToUse
|
|
814
814
|
});
|
|
815
815
|
deepFreeze$o(input);
|
|
816
|
-
if (existingRecord === undefined || equals$
|
|
816
|
+
if (existingRecord === undefined || equals$e(existingRecord, incomingRecord) === false) {
|
|
817
817
|
luvio.storePublish(key, incomingRecord);
|
|
818
818
|
}
|
|
819
819
|
{
|
|
820
820
|
const storeMetadataParams = {
|
|
821
821
|
ttl: ttlToUse,
|
|
822
822
|
namespace: "CMSAuthoring",
|
|
823
|
-
version: VERSION$
|
|
824
|
-
representationName: RepresentationType$
|
|
823
|
+
version: VERSION$e,
|
|
824
|
+
representationName: RepresentationType$e,
|
|
825
825
|
};
|
|
826
826
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
827
827
|
}
|
|
828
828
|
return createLink(key);
|
|
829
829
|
};
|
|
830
|
-
function getTypeCacheKeys$
|
|
830
|
+
function getTypeCacheKeys$e(luvio, input, fullPathFactory) {
|
|
831
831
|
const rootKeySet = new StoreKeyMap();
|
|
832
832
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
833
|
-
const rootKey = keyBuilderFromType$
|
|
833
|
+
const rootKey = keyBuilderFromType$8(luvio, input);
|
|
834
834
|
rootKeySet.set(rootKey, {
|
|
835
835
|
namespace: keyPrefix,
|
|
836
|
-
representationName: RepresentationType$
|
|
836
|
+
representationName: RepresentationType$e,
|
|
837
837
|
mergeable: false
|
|
838
838
|
});
|
|
839
839
|
return rootKeySet;
|
|
840
840
|
}
|
|
841
841
|
|
|
842
|
-
function select$
|
|
843
|
-
return select$
|
|
842
|
+
function select$x(luvio, params) {
|
|
843
|
+
return select$y();
|
|
844
844
|
}
|
|
845
|
-
function keyBuilder$
|
|
846
|
-
return keyBuilder$
|
|
845
|
+
function keyBuilder$u(luvio, params) {
|
|
846
|
+
return keyBuilder$v(luvio, {
|
|
847
847
|
collection_key: params.urlParams.collectionKeyOrId,
|
|
848
848
|
language: params.queryParams.language || '',
|
|
849
849
|
version: params.queryParams.version || ''
|
|
850
850
|
});
|
|
851
851
|
}
|
|
852
|
-
function getResponseCacheKeys$
|
|
853
|
-
return getTypeCacheKeys$
|
|
852
|
+
function getResponseCacheKeys$k(luvio, resourceParams, response) {
|
|
853
|
+
return getTypeCacheKeys$e(luvio, response);
|
|
854
854
|
}
|
|
855
|
-
function ingestSuccess$
|
|
855
|
+
function ingestSuccess$k(luvio, resourceParams, response, snapshotRefresh) {
|
|
856
856
|
const { body } = response;
|
|
857
|
-
const key = keyBuilder$
|
|
858
|
-
luvio.storeIngest(key, ingest$
|
|
857
|
+
const key = keyBuilder$u(luvio, resourceParams);
|
|
858
|
+
luvio.storeIngest(key, ingest$e, body);
|
|
859
859
|
const snapshot = luvio.storeLookup({
|
|
860
860
|
recordId: key,
|
|
861
|
-
node: select$
|
|
861
|
+
node: select$x(),
|
|
862
862
|
variables: {},
|
|
863
863
|
}, snapshotRefresh);
|
|
864
864
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -868,19 +868,19 @@ function ingestSuccess$i(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
868
868
|
}
|
|
869
869
|
return snapshot;
|
|
870
870
|
}
|
|
871
|
-
function ingestError$
|
|
872
|
-
const key = keyBuilder$
|
|
871
|
+
function ingestError$a(luvio, params, error, snapshotRefresh) {
|
|
872
|
+
const key = keyBuilder$u(luvio, params);
|
|
873
873
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
874
874
|
const storeMetadataParams = {
|
|
875
|
-
ttl: TTL$
|
|
875
|
+
ttl: TTL$e,
|
|
876
876
|
namespace: keyPrefix,
|
|
877
|
-
version: VERSION$
|
|
878
|
-
representationName: RepresentationType$
|
|
877
|
+
version: VERSION$e,
|
|
878
|
+
representationName: RepresentationType$e
|
|
879
879
|
};
|
|
880
880
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
881
881
|
return errorSnapshot;
|
|
882
882
|
}
|
|
883
|
-
function createResourceRequest$
|
|
883
|
+
function createResourceRequest$k(config) {
|
|
884
884
|
const headers = {};
|
|
885
885
|
return {
|
|
886
886
|
baseUri: '/services/data/v58.0',
|
|
@@ -894,7 +894,7 @@ function createResourceRequest$i(config) {
|
|
|
894
894
|
};
|
|
895
895
|
}
|
|
896
896
|
|
|
897
|
-
function onFetchResponseSuccess$
|
|
897
|
+
function onFetchResponseSuccess$c(luvio, config, resourceParams, response) {
|
|
898
898
|
let updatedResourceParams = resourceParams;
|
|
899
899
|
// If language is not provided in request resource params, use language from the response
|
|
900
900
|
// and update the response params. As this resource params will be used to build a cache key.
|
|
@@ -906,7 +906,7 @@ function onFetchResponseSuccess$b(luvio, config, resourceParams, response) {
|
|
|
906
906
|
if (updatedResourceParams.queryParams.version === undefined) {
|
|
907
907
|
updatedResourceParams.queryParams.version = response.body.versionNumber;
|
|
908
908
|
}
|
|
909
|
-
return onFetchResponseSuccess$
|
|
909
|
+
return onFetchResponseSuccess$b(luvio, config, updatedResourceParams, response);
|
|
910
910
|
}
|
|
911
911
|
|
|
912
912
|
const getCollectionItems_ConfigPropertyNames = {
|
|
@@ -916,7 +916,7 @@ const getCollectionItems_ConfigPropertyNames = {
|
|
|
916
916
|
optional: ['language', 'version']
|
|
917
917
|
}
|
|
918
918
|
};
|
|
919
|
-
function createResourceParams$
|
|
919
|
+
function createResourceParams$k(config) {
|
|
920
920
|
const resourceParams = {
|
|
921
921
|
urlParams: {
|
|
922
922
|
collectionKeyOrId: config.collectionKeyOrId
|
|
@@ -927,11 +927,11 @@ function createResourceParams$i(config) {
|
|
|
927
927
|
};
|
|
928
928
|
return resourceParams;
|
|
929
929
|
}
|
|
930
|
-
function keyBuilder$
|
|
931
|
-
const resourceParams = createResourceParams$
|
|
932
|
-
return keyBuilder$
|
|
930
|
+
function keyBuilder$t(luvio, config) {
|
|
931
|
+
const resourceParams = createResourceParams$k(config);
|
|
932
|
+
return keyBuilder$u(luvio, resourceParams);
|
|
933
933
|
}
|
|
934
|
-
function typeCheckConfig$
|
|
934
|
+
function typeCheckConfig$k(untrustedConfig) {
|
|
935
935
|
const config = {};
|
|
936
936
|
const untrustedConfig_collectionKeyOrId = untrustedConfig.collectionKeyOrId;
|
|
937
937
|
if (typeof untrustedConfig_collectionKeyOrId === 'string') {
|
|
@@ -947,48 +947,48 @@ function typeCheckConfig$i(untrustedConfig) {
|
|
|
947
947
|
}
|
|
948
948
|
return config;
|
|
949
949
|
}
|
|
950
|
-
function validateAdapterConfig$
|
|
950
|
+
function validateAdapterConfig$k(untrustedConfig, configPropertyNames) {
|
|
951
951
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
952
952
|
return null;
|
|
953
953
|
}
|
|
954
954
|
if (process.env.NODE_ENV !== 'production') {
|
|
955
955
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
956
956
|
}
|
|
957
|
-
const config = typeCheckConfig$
|
|
957
|
+
const config = typeCheckConfig$k(untrustedConfig);
|
|
958
958
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
959
959
|
return null;
|
|
960
960
|
}
|
|
961
961
|
return config;
|
|
962
962
|
}
|
|
963
|
-
function adapterFragment$
|
|
964
|
-
createResourceParams$
|
|
965
|
-
return select$
|
|
963
|
+
function adapterFragment$a(luvio, config) {
|
|
964
|
+
createResourceParams$k(config);
|
|
965
|
+
return select$x();
|
|
966
966
|
}
|
|
967
|
-
function onFetchResponseSuccess$
|
|
968
|
-
const snapshot = ingestSuccess$
|
|
967
|
+
function onFetchResponseSuccess$b(luvio, config, resourceParams, response) {
|
|
968
|
+
const snapshot = ingestSuccess$k(luvio, resourceParams, response, {
|
|
969
969
|
config,
|
|
970
|
-
resolve: () => buildNetworkSnapshot$
|
|
970
|
+
resolve: () => buildNetworkSnapshot$k(luvio, config, snapshotRefreshOptions)
|
|
971
971
|
});
|
|
972
972
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
973
973
|
}
|
|
974
|
-
function onFetchResponseError$
|
|
975
|
-
const snapshot = ingestError$
|
|
974
|
+
function onFetchResponseError$a(luvio, config, resourceParams, response) {
|
|
975
|
+
const snapshot = ingestError$a(luvio, resourceParams, response, {
|
|
976
976
|
config,
|
|
977
|
-
resolve: () => buildNetworkSnapshot$
|
|
977
|
+
resolve: () => buildNetworkSnapshot$k(luvio, config, snapshotRefreshOptions)
|
|
978
978
|
});
|
|
979
979
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
980
980
|
}
|
|
981
|
-
function buildNetworkSnapshot$
|
|
982
|
-
const resourceParams = createResourceParams$
|
|
983
|
-
const request = createResourceRequest$
|
|
981
|
+
function buildNetworkSnapshot$k(luvio, config, options) {
|
|
982
|
+
const resourceParams = createResourceParams$k(config);
|
|
983
|
+
const request = createResourceRequest$k(resourceParams);
|
|
984
984
|
return luvio.dispatchResourceRequest(request, options)
|
|
985
985
|
.then((response) => {
|
|
986
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
986
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$c(luvio, config, resourceParams, response), () => getResponseCacheKeys$k(luvio, resourceParams, response.body));
|
|
987
987
|
}, (response) => {
|
|
988
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
988
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$a(luvio, config, resourceParams, response));
|
|
989
989
|
});
|
|
990
990
|
}
|
|
991
|
-
function buildNetworkSnapshotCachePolicy$
|
|
991
|
+
function buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext) {
|
|
992
992
|
const { luvio, config } = context;
|
|
993
993
|
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
994
994
|
const dispatchOptions = {
|
|
@@ -1003,29 +1003,29 @@ function buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext
|
|
|
1003
1003
|
priority: networkPriority
|
|
1004
1004
|
};
|
|
1005
1005
|
}
|
|
1006
|
-
return buildNetworkSnapshot$
|
|
1006
|
+
return buildNetworkSnapshot$k(luvio, config, dispatchOptions);
|
|
1007
1007
|
}
|
|
1008
|
-
function buildCachedSnapshotCachePolicy$
|
|
1008
|
+
function buildCachedSnapshotCachePolicy$a(context, storeLookup) {
|
|
1009
1009
|
const { luvio, config } = context;
|
|
1010
1010
|
const selector = {
|
|
1011
|
-
recordId: keyBuilder$
|
|
1012
|
-
node: adapterFragment$
|
|
1011
|
+
recordId: keyBuilder$t(luvio, config),
|
|
1012
|
+
node: adapterFragment$a(luvio, config),
|
|
1013
1013
|
variables: {},
|
|
1014
1014
|
};
|
|
1015
1015
|
const cacheSnapshot = storeLookup(selector, {
|
|
1016
1016
|
config,
|
|
1017
|
-
resolve: () => buildNetworkSnapshot$
|
|
1017
|
+
resolve: () => buildNetworkSnapshot$k(luvio, config, snapshotRefreshOptions)
|
|
1018
1018
|
});
|
|
1019
1019
|
return cacheSnapshot;
|
|
1020
1020
|
}
|
|
1021
1021
|
const getCollectionItemsAdapterFactory = (luvio) => function CMSAuthoring__getCollectionItems(untrustedConfig, requestContext) {
|
|
1022
|
-
const config = validateAdapterConfig$
|
|
1022
|
+
const config = validateAdapterConfig$k(untrustedConfig, getCollectionItems_ConfigPropertyNames);
|
|
1023
1023
|
// Invalid or incomplete config
|
|
1024
1024
|
if (config === null) {
|
|
1025
1025
|
return null;
|
|
1026
1026
|
}
|
|
1027
1027
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1028
|
-
buildCachedSnapshotCachePolicy$
|
|
1028
|
+
buildCachedSnapshotCachePolicy$a, buildNetworkSnapshotCachePolicy$a);
|
|
1029
1029
|
};
|
|
1030
1030
|
|
|
1031
1031
|
function validate$v(obj, path = 'ManagedContentTranslationV2RequestInputRep') {
|
|
@@ -1098,8 +1098,8 @@ function validate$v(obj, path = 'ManagedContentTranslationV2RequestInputRep') {
|
|
|
1098
1098
|
return v_error === undefined ? null : v_error;
|
|
1099
1099
|
}
|
|
1100
1100
|
|
|
1101
|
-
const TTL$
|
|
1102
|
-
const VERSION$
|
|
1101
|
+
const TTL$d = 100;
|
|
1102
|
+
const VERSION$d = "52e643b998d6763482c6d74542b38408";
|
|
1103
1103
|
function validate$u(obj, path = 'ManagedContentTranslationV2Representation') {
|
|
1104
1104
|
const v_error = (() => {
|
|
1105
1105
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -1257,28 +1257,28 @@ function validate$u(obj, path = 'ManagedContentTranslationV2Representation') {
|
|
|
1257
1257
|
})();
|
|
1258
1258
|
return v_error === undefined ? null : v_error;
|
|
1259
1259
|
}
|
|
1260
|
-
const RepresentationType$
|
|
1261
|
-
function keyBuilder$
|
|
1262
|
-
return keyPrefix + '::' + RepresentationType$
|
|
1260
|
+
const RepresentationType$d = 'ManagedContentTranslationV2Representation';
|
|
1261
|
+
function keyBuilder$s(luvio, config) {
|
|
1262
|
+
return keyPrefix + '::' + RepresentationType$d + ':' + config.id;
|
|
1263
1263
|
}
|
|
1264
|
-
function keyBuilderFromType$
|
|
1264
|
+
function keyBuilderFromType$7(luvio, object) {
|
|
1265
1265
|
const keyParams = {
|
|
1266
1266
|
id: object.id
|
|
1267
1267
|
};
|
|
1268
|
-
return keyBuilder$
|
|
1268
|
+
return keyBuilder$s(luvio, keyParams);
|
|
1269
1269
|
}
|
|
1270
|
-
function normalize$
|
|
1270
|
+
function normalize$d(input, existing, path, luvio, store, timestamp) {
|
|
1271
1271
|
return input;
|
|
1272
1272
|
}
|
|
1273
|
-
const select$
|
|
1273
|
+
const select$w = function ManagedContentTranslationV2RepresentationSelect() {
|
|
1274
1274
|
return {
|
|
1275
1275
|
kind: 'Fragment',
|
|
1276
|
-
version: VERSION$
|
|
1276
|
+
version: VERSION$d,
|
|
1277
1277
|
private: [],
|
|
1278
1278
|
opaque: true
|
|
1279
1279
|
};
|
|
1280
1280
|
};
|
|
1281
|
-
function equals$
|
|
1281
|
+
function equals$d(existing, incoming) {
|
|
1282
1282
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1283
1283
|
return false;
|
|
1284
1284
|
}
|
|
@@ -1287,62 +1287,62 @@ function equals$c(existing, incoming) {
|
|
|
1287
1287
|
function deepFreeze$n(input) {
|
|
1288
1288
|
ObjectFreeze(input);
|
|
1289
1289
|
}
|
|
1290
|
-
const ingest$
|
|
1290
|
+
const ingest$d = function ManagedContentTranslationV2RepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1291
1291
|
if (process.env.NODE_ENV !== 'production') {
|
|
1292
1292
|
const validateError = validate$u(input);
|
|
1293
1293
|
if (validateError !== null) {
|
|
1294
1294
|
throw validateError;
|
|
1295
1295
|
}
|
|
1296
1296
|
}
|
|
1297
|
-
const key = keyBuilderFromType$
|
|
1297
|
+
const key = keyBuilderFromType$7(luvio, input);
|
|
1298
1298
|
const existingRecord = store.readEntry(key);
|
|
1299
|
-
const ttlToUse = TTL$
|
|
1300
|
-
let incomingRecord = normalize$
|
|
1299
|
+
const ttlToUse = TTL$d;
|
|
1300
|
+
let incomingRecord = normalize$d(input, store.readEntry(key), {
|
|
1301
1301
|
fullPath: key,
|
|
1302
1302
|
parent: path.parent,
|
|
1303
1303
|
propertyName: path.propertyName,
|
|
1304
1304
|
ttl: ttlToUse
|
|
1305
1305
|
});
|
|
1306
1306
|
deepFreeze$n(input);
|
|
1307
|
-
if (existingRecord === undefined || equals$
|
|
1307
|
+
if (existingRecord === undefined || equals$d(existingRecord, incomingRecord) === false) {
|
|
1308
1308
|
luvio.storePublish(key, incomingRecord);
|
|
1309
1309
|
}
|
|
1310
1310
|
{
|
|
1311
1311
|
const storeMetadataParams = {
|
|
1312
1312
|
ttl: ttlToUse,
|
|
1313
1313
|
namespace: "CMSAuthoring",
|
|
1314
|
-
version: VERSION$
|
|
1315
|
-
representationName: RepresentationType$
|
|
1314
|
+
version: VERSION$d,
|
|
1315
|
+
representationName: RepresentationType$d,
|
|
1316
1316
|
};
|
|
1317
1317
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
1318
1318
|
}
|
|
1319
1319
|
return createLink(key);
|
|
1320
1320
|
};
|
|
1321
|
-
function getTypeCacheKeys$
|
|
1321
|
+
function getTypeCacheKeys$d(luvio, input, fullPathFactory) {
|
|
1322
1322
|
const rootKeySet = new StoreKeyMap();
|
|
1323
1323
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1324
|
-
const rootKey = keyBuilderFromType$
|
|
1324
|
+
const rootKey = keyBuilderFromType$7(luvio, input);
|
|
1325
1325
|
rootKeySet.set(rootKey, {
|
|
1326
1326
|
namespace: keyPrefix,
|
|
1327
|
-
representationName: RepresentationType$
|
|
1327
|
+
representationName: RepresentationType$d,
|
|
1328
1328
|
mergeable: false
|
|
1329
1329
|
});
|
|
1330
1330
|
return rootKeySet;
|
|
1331
1331
|
}
|
|
1332
1332
|
|
|
1333
|
-
function select$
|
|
1334
|
-
return select$
|
|
1333
|
+
function select$v(luvio, params) {
|
|
1334
|
+
return select$w();
|
|
1335
1335
|
}
|
|
1336
|
-
function getResponseCacheKeys$
|
|
1337
|
-
return getTypeCacheKeys$
|
|
1336
|
+
function getResponseCacheKeys$j(luvio, resourceParams, response) {
|
|
1337
|
+
return getTypeCacheKeys$d(luvio, response);
|
|
1338
1338
|
}
|
|
1339
|
-
function ingestSuccess$
|
|
1339
|
+
function ingestSuccess$j(luvio, resourceParams, response) {
|
|
1340
1340
|
const { body } = response;
|
|
1341
|
-
const key = keyBuilderFromType$
|
|
1342
|
-
luvio.storeIngest(key, ingest$
|
|
1341
|
+
const key = keyBuilderFromType$7(luvio, body);
|
|
1342
|
+
luvio.storeIngest(key, ingest$d, body);
|
|
1343
1343
|
const snapshot = luvio.storeLookup({
|
|
1344
1344
|
recordId: key,
|
|
1345
|
-
node: select$
|
|
1345
|
+
node: select$v(),
|
|
1346
1346
|
variables: {},
|
|
1347
1347
|
});
|
|
1348
1348
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1352,7 +1352,7 @@ function ingestSuccess$h(luvio, resourceParams, response) {
|
|
|
1352
1352
|
}
|
|
1353
1353
|
return snapshot;
|
|
1354
1354
|
}
|
|
1355
|
-
function createResourceRequest$
|
|
1355
|
+
function createResourceRequest$j(config) {
|
|
1356
1356
|
const headers = {};
|
|
1357
1357
|
return {
|
|
1358
1358
|
baseUri: '/services/data/v58.0',
|
|
@@ -1373,7 +1373,7 @@ const createTranslationV2Job_ConfigPropertyNames = {
|
|
|
1373
1373
|
optional: []
|
|
1374
1374
|
}
|
|
1375
1375
|
};
|
|
1376
|
-
function createResourceParams$
|
|
1376
|
+
function createResourceParams$j(config) {
|
|
1377
1377
|
const resourceParams = {
|
|
1378
1378
|
urlParams: {
|
|
1379
1379
|
contentSpaceId: config.contentSpaceId
|
|
@@ -1384,7 +1384,7 @@ function createResourceParams$h(config) {
|
|
|
1384
1384
|
};
|
|
1385
1385
|
return resourceParams;
|
|
1386
1386
|
}
|
|
1387
|
-
function typeCheckConfig$
|
|
1387
|
+
function typeCheckConfig$j(untrustedConfig) {
|
|
1388
1388
|
const config = {};
|
|
1389
1389
|
const untrustedConfig_contentSpaceId = untrustedConfig.contentSpaceId;
|
|
1390
1390
|
if (typeof untrustedConfig_contentSpaceId === 'string') {
|
|
@@ -1397,28 +1397,28 @@ function typeCheckConfig$h(untrustedConfig) {
|
|
|
1397
1397
|
}
|
|
1398
1398
|
return config;
|
|
1399
1399
|
}
|
|
1400
|
-
function validateAdapterConfig$
|
|
1400
|
+
function validateAdapterConfig$j(untrustedConfig, configPropertyNames) {
|
|
1401
1401
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1402
1402
|
return null;
|
|
1403
1403
|
}
|
|
1404
1404
|
if (process.env.NODE_ENV !== 'production') {
|
|
1405
1405
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1406
1406
|
}
|
|
1407
|
-
const config = typeCheckConfig$
|
|
1407
|
+
const config = typeCheckConfig$j(untrustedConfig);
|
|
1408
1408
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1409
1409
|
return null;
|
|
1410
1410
|
}
|
|
1411
1411
|
return config;
|
|
1412
1412
|
}
|
|
1413
|
-
function buildNetworkSnapshot$
|
|
1414
|
-
const resourceParams = createResourceParams$
|
|
1415
|
-
const request = createResourceRequest$
|
|
1413
|
+
function buildNetworkSnapshot$j(luvio, config, options) {
|
|
1414
|
+
const resourceParams = createResourceParams$j(config);
|
|
1415
|
+
const request = createResourceRequest$j(resourceParams);
|
|
1416
1416
|
return luvio.dispatchResourceRequest(request, options)
|
|
1417
1417
|
.then((response) => {
|
|
1418
1418
|
return luvio.handleSuccessResponse(() => {
|
|
1419
|
-
const snapshot = ingestSuccess$
|
|
1419
|
+
const snapshot = ingestSuccess$j(luvio, resourceParams, response);
|
|
1420
1420
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1421
|
-
}, () => getResponseCacheKeys$
|
|
1421
|
+
}, () => getResponseCacheKeys$j(luvio, resourceParams, response.body));
|
|
1422
1422
|
}, (response) => {
|
|
1423
1423
|
deepFreeze$u(response);
|
|
1424
1424
|
throw response;
|
|
@@ -1426,12 +1426,12 @@ function buildNetworkSnapshot$h(luvio, config, options) {
|
|
|
1426
1426
|
}
|
|
1427
1427
|
const createTranslationV2JobAdapterFactory = (luvio) => {
|
|
1428
1428
|
return function createTranslationV2Job(untrustedConfig) {
|
|
1429
|
-
const config = validateAdapterConfig$
|
|
1429
|
+
const config = validateAdapterConfig$j(untrustedConfig, createTranslationV2Job_ConfigPropertyNames);
|
|
1430
1430
|
// Invalid or incomplete config
|
|
1431
1431
|
if (config === null) {
|
|
1432
1432
|
throw new Error('Invalid config for "createTranslationV2Job"');
|
|
1433
1433
|
}
|
|
1434
|
-
return buildNetworkSnapshot$
|
|
1434
|
+
return buildNetworkSnapshot$j(luvio, config);
|
|
1435
1435
|
};
|
|
1436
1436
|
};
|
|
1437
1437
|
|
|
@@ -1573,8 +1573,8 @@ function deepFreeze$j(input) {
|
|
|
1573
1573
|
ObjectFreeze(input);
|
|
1574
1574
|
}
|
|
1575
1575
|
|
|
1576
|
-
const TTL$
|
|
1577
|
-
const VERSION$
|
|
1576
|
+
const TTL$c = 100;
|
|
1577
|
+
const VERSION$c = "c04d826180efa7be6ad6764b5928469e";
|
|
1578
1578
|
function validate$o(obj, path = 'ManagedContentDocumentRepresentation') {
|
|
1579
1579
|
const v_error = (() => {
|
|
1580
1580
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -1749,30 +1749,30 @@ function validate$o(obj, path = 'ManagedContentDocumentRepresentation') {
|
|
|
1749
1749
|
})();
|
|
1750
1750
|
return v_error === undefined ? null : v_error;
|
|
1751
1751
|
}
|
|
1752
|
-
const RepresentationType$
|
|
1753
|
-
function keyBuilder$
|
|
1754
|
-
return keyPrefix + '::' + RepresentationType$
|
|
1752
|
+
const RepresentationType$c = 'ManagedContentDocumentRepresentation';
|
|
1753
|
+
function keyBuilder$r(luvio, config) {
|
|
1754
|
+
return keyPrefix + '::' + RepresentationType$c + ':' + config.content_key + ':' + config.language + ':' + config.version;
|
|
1755
1755
|
}
|
|
1756
|
-
function keyBuilderFromType$
|
|
1756
|
+
function keyBuilderFromType$6(luvio, object) {
|
|
1757
1757
|
const keyParams = {
|
|
1758
1758
|
content_key: object.contentKey,
|
|
1759
1759
|
language: object.language,
|
|
1760
1760
|
version: object.version
|
|
1761
1761
|
};
|
|
1762
|
-
return keyBuilder$
|
|
1762
|
+
return keyBuilder$r(luvio, keyParams);
|
|
1763
1763
|
}
|
|
1764
|
-
function normalize$
|
|
1764
|
+
function normalize$c(input, existing, path, luvio, store, timestamp) {
|
|
1765
1765
|
return input;
|
|
1766
1766
|
}
|
|
1767
|
-
const select$
|
|
1767
|
+
const select$u = function ManagedContentDocumentRepresentationSelect() {
|
|
1768
1768
|
return {
|
|
1769
1769
|
kind: 'Fragment',
|
|
1770
|
-
version: VERSION$
|
|
1770
|
+
version: VERSION$c,
|
|
1771
1771
|
private: [],
|
|
1772
1772
|
opaque: true
|
|
1773
1773
|
};
|
|
1774
1774
|
};
|
|
1775
|
-
function equals$
|
|
1775
|
+
function equals$c(existing, incoming) {
|
|
1776
1776
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1777
1777
|
return false;
|
|
1778
1778
|
}
|
|
@@ -1806,62 +1806,62 @@ function deepFreeze$i(input) {
|
|
|
1806
1806
|
}
|
|
1807
1807
|
ObjectFreeze(input);
|
|
1808
1808
|
}
|
|
1809
|
-
const ingest$
|
|
1809
|
+
const ingest$c = function ManagedContentDocumentRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1810
1810
|
if (process.env.NODE_ENV !== 'production') {
|
|
1811
1811
|
const validateError = validate$o(input);
|
|
1812
1812
|
if (validateError !== null) {
|
|
1813
1813
|
throw validateError;
|
|
1814
1814
|
}
|
|
1815
1815
|
}
|
|
1816
|
-
const key = keyBuilderFromType$
|
|
1816
|
+
const key = keyBuilderFromType$6(luvio, input);
|
|
1817
1817
|
const existingRecord = store.readEntry(key);
|
|
1818
|
-
const ttlToUse = TTL$
|
|
1819
|
-
let incomingRecord = normalize$
|
|
1818
|
+
const ttlToUse = TTL$c;
|
|
1819
|
+
let incomingRecord = normalize$c(input, store.readEntry(key), {
|
|
1820
1820
|
fullPath: key,
|
|
1821
1821
|
parent: path.parent,
|
|
1822
1822
|
propertyName: path.propertyName,
|
|
1823
1823
|
ttl: ttlToUse
|
|
1824
1824
|
});
|
|
1825
1825
|
deepFreeze$i(input);
|
|
1826
|
-
if (existingRecord === undefined || equals$
|
|
1826
|
+
if (existingRecord === undefined || equals$c(existingRecord, incomingRecord) === false) {
|
|
1827
1827
|
luvio.storePublish(key, incomingRecord);
|
|
1828
1828
|
}
|
|
1829
1829
|
{
|
|
1830
1830
|
const storeMetadataParams = {
|
|
1831
1831
|
ttl: ttlToUse,
|
|
1832
1832
|
namespace: "CMSAuthoring",
|
|
1833
|
-
version: VERSION$
|
|
1834
|
-
representationName: RepresentationType$
|
|
1833
|
+
version: VERSION$c,
|
|
1834
|
+
representationName: RepresentationType$c,
|
|
1835
1835
|
};
|
|
1836
1836
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
1837
1837
|
}
|
|
1838
1838
|
return createLink(key);
|
|
1839
1839
|
};
|
|
1840
|
-
function getTypeCacheKeys$
|
|
1840
|
+
function getTypeCacheKeys$c(luvio, input, fullPathFactory) {
|
|
1841
1841
|
const rootKeySet = new StoreKeyMap();
|
|
1842
1842
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1843
|
-
const rootKey = keyBuilderFromType$
|
|
1843
|
+
const rootKey = keyBuilderFromType$6(luvio, input);
|
|
1844
1844
|
rootKeySet.set(rootKey, {
|
|
1845
1845
|
namespace: keyPrefix,
|
|
1846
|
-
representationName: RepresentationType$
|
|
1846
|
+
representationName: RepresentationType$c,
|
|
1847
1847
|
mergeable: false
|
|
1848
1848
|
});
|
|
1849
1849
|
return rootKeySet;
|
|
1850
1850
|
}
|
|
1851
1851
|
|
|
1852
|
-
function select$
|
|
1853
|
-
return select$
|
|
1852
|
+
function select$t(luvio, params) {
|
|
1853
|
+
return select$u();
|
|
1854
1854
|
}
|
|
1855
|
-
function getResponseCacheKeys$
|
|
1856
|
-
return getTypeCacheKeys$
|
|
1855
|
+
function getResponseCacheKeys$i(luvio, resourceParams, response) {
|
|
1856
|
+
return getTypeCacheKeys$c(luvio, response);
|
|
1857
1857
|
}
|
|
1858
|
-
function ingestSuccess$
|
|
1858
|
+
function ingestSuccess$i(luvio, resourceParams, response) {
|
|
1859
1859
|
const { body } = response;
|
|
1860
|
-
const key = keyBuilderFromType$
|
|
1861
|
-
luvio.storeIngest(key, ingest$
|
|
1860
|
+
const key = keyBuilderFromType$6(luvio, body);
|
|
1861
|
+
luvio.storeIngest(key, ingest$c, body);
|
|
1862
1862
|
const snapshot = luvio.storeLookup({
|
|
1863
1863
|
recordId: key,
|
|
1864
|
-
node: select$
|
|
1864
|
+
node: select$t(),
|
|
1865
1865
|
variables: {},
|
|
1866
1866
|
});
|
|
1867
1867
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1871,7 +1871,7 @@ function ingestSuccess$g(luvio, resourceParams, response) {
|
|
|
1871
1871
|
}
|
|
1872
1872
|
return snapshot;
|
|
1873
1873
|
}
|
|
1874
|
-
function createResourceRequest$
|
|
1874
|
+
function createResourceRequest$i(config) {
|
|
1875
1875
|
const headers = {};
|
|
1876
1876
|
return {
|
|
1877
1877
|
baseUri: '/services/data/v58.0',
|
|
@@ -1885,11 +1885,11 @@ function createResourceRequest$g(config) {
|
|
|
1885
1885
|
};
|
|
1886
1886
|
}
|
|
1887
1887
|
|
|
1888
|
-
function ingestSuccess$
|
|
1888
|
+
function ingestSuccess$h(luvio, resourceParams, response) {
|
|
1889
1889
|
// Version can come either from versionNumber field in case of v2 content, or managedContentVersionId field in case of v1 content.
|
|
1890
1890
|
response.body.version = (response.body.versionNumber ||
|
|
1891
1891
|
response.body.managedContentVersionId);
|
|
1892
|
-
return ingestSuccess$
|
|
1892
|
+
return ingestSuccess$i(luvio, resourceParams, response);
|
|
1893
1893
|
}
|
|
1894
1894
|
|
|
1895
1895
|
const createManagedContent_ConfigPropertyNames = {
|
|
@@ -1899,7 +1899,7 @@ const createManagedContent_ConfigPropertyNames = {
|
|
|
1899
1899
|
optional: []
|
|
1900
1900
|
}
|
|
1901
1901
|
};
|
|
1902
|
-
function createResourceParams$
|
|
1902
|
+
function createResourceParams$i(config) {
|
|
1903
1903
|
const resourceParams = {
|
|
1904
1904
|
body: {
|
|
1905
1905
|
ManagedContentInputParam: config.ManagedContentInputParam
|
|
@@ -1907,7 +1907,7 @@ function createResourceParams$g(config) {
|
|
|
1907
1907
|
};
|
|
1908
1908
|
return resourceParams;
|
|
1909
1909
|
}
|
|
1910
|
-
function typeCheckConfig$
|
|
1910
|
+
function typeCheckConfig$i(untrustedConfig) {
|
|
1911
1911
|
const config = {};
|
|
1912
1912
|
const untrustedConfig_ManagedContentInputParam = untrustedConfig.ManagedContentInputParam;
|
|
1913
1913
|
const referenceManagedContentInputRepresentationValidationError = validate$t(untrustedConfig_ManagedContentInputParam);
|
|
@@ -1916,28 +1916,28 @@ function typeCheckConfig$g(untrustedConfig) {
|
|
|
1916
1916
|
}
|
|
1917
1917
|
return config;
|
|
1918
1918
|
}
|
|
1919
|
-
function validateAdapterConfig$
|
|
1919
|
+
function validateAdapterConfig$i(untrustedConfig, configPropertyNames) {
|
|
1920
1920
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1921
1921
|
return null;
|
|
1922
1922
|
}
|
|
1923
1923
|
if (process.env.NODE_ENV !== 'production') {
|
|
1924
1924
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1925
1925
|
}
|
|
1926
|
-
const config = typeCheckConfig$
|
|
1926
|
+
const config = typeCheckConfig$i(untrustedConfig);
|
|
1927
1927
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1928
1928
|
return null;
|
|
1929
1929
|
}
|
|
1930
1930
|
return config;
|
|
1931
1931
|
}
|
|
1932
|
-
function buildNetworkSnapshot$
|
|
1933
|
-
const resourceParams = createResourceParams$
|
|
1934
|
-
const request = createResourceRequest$
|
|
1932
|
+
function buildNetworkSnapshot$i(luvio, config, options) {
|
|
1933
|
+
const resourceParams = createResourceParams$i(config);
|
|
1934
|
+
const request = createResourceRequest$i(resourceParams);
|
|
1935
1935
|
return luvio.dispatchResourceRequest(request, options)
|
|
1936
1936
|
.then((response) => {
|
|
1937
1937
|
return luvio.handleSuccessResponse(() => {
|
|
1938
|
-
const snapshot = ingestSuccess$
|
|
1938
|
+
const snapshot = ingestSuccess$h(luvio, resourceParams, response);
|
|
1939
1939
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1940
|
-
}, () => getResponseCacheKeys$
|
|
1940
|
+
}, () => getResponseCacheKeys$i(luvio, resourceParams, response.body));
|
|
1941
1941
|
}, (response) => {
|
|
1942
1942
|
deepFreeze$u(response);
|
|
1943
1943
|
throw response;
|
|
@@ -1945,12 +1945,12 @@ function buildNetworkSnapshot$g(luvio, config, options) {
|
|
|
1945
1945
|
}
|
|
1946
1946
|
const createManagedContentAdapterFactory = (luvio) => {
|
|
1947
1947
|
return function createManagedContent(untrustedConfig) {
|
|
1948
|
-
const config = validateAdapterConfig$
|
|
1948
|
+
const config = validateAdapterConfig$i(untrustedConfig, createManagedContent_ConfigPropertyNames);
|
|
1949
1949
|
// Invalid or incomplete config
|
|
1950
1950
|
if (config === null) {
|
|
1951
1951
|
throw new Error('Invalid config for "createManagedContent"');
|
|
1952
1952
|
}
|
|
1953
|
-
return buildNetworkSnapshot$
|
|
1953
|
+
return buildNetworkSnapshot$i(luvio, config);
|
|
1954
1954
|
};
|
|
1955
1955
|
};
|
|
1956
1956
|
|
|
@@ -2005,8 +2005,8 @@ function validate$n(obj, path = 'ManagedContentPublishInputRepresentation') {
|
|
|
2005
2005
|
return v_error === undefined ? null : v_error;
|
|
2006
2006
|
}
|
|
2007
2007
|
|
|
2008
|
-
const TTL$
|
|
2009
|
-
const VERSION$
|
|
2008
|
+
const TTL$b = 100;
|
|
2009
|
+
const VERSION$b = "789bce2e581ff7969982fbf2ffbfd9a5";
|
|
2010
2010
|
function validate$m(obj, path = 'ManagedContentPublishOutputRepresentation') {
|
|
2011
2011
|
const v_error = (() => {
|
|
2012
2012
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -2072,28 +2072,28 @@ function validate$m(obj, path = 'ManagedContentPublishOutputRepresentation') {
|
|
|
2072
2072
|
})();
|
|
2073
2073
|
return v_error === undefined ? null : v_error;
|
|
2074
2074
|
}
|
|
2075
|
-
const RepresentationType$
|
|
2076
|
-
function keyBuilder$
|
|
2077
|
-
return keyPrefix + '::' + RepresentationType$
|
|
2075
|
+
const RepresentationType$b = 'ManagedContentPublishOutputRepresentation';
|
|
2076
|
+
function keyBuilder$q(luvio, config) {
|
|
2077
|
+
return keyPrefix + '::' + RepresentationType$b + ':' + config.id;
|
|
2078
2078
|
}
|
|
2079
|
-
function keyBuilderFromType$
|
|
2079
|
+
function keyBuilderFromType$5(luvio, object) {
|
|
2080
2080
|
const keyParams = {
|
|
2081
2081
|
id: object.deploymentId
|
|
2082
2082
|
};
|
|
2083
|
-
return keyBuilder$
|
|
2083
|
+
return keyBuilder$q(luvio, keyParams);
|
|
2084
2084
|
}
|
|
2085
|
-
function normalize$
|
|
2085
|
+
function normalize$b(input, existing, path, luvio, store, timestamp) {
|
|
2086
2086
|
return input;
|
|
2087
2087
|
}
|
|
2088
|
-
const select$
|
|
2088
|
+
const select$s = function ManagedContentPublishOutputRepresentationSelect() {
|
|
2089
2089
|
return {
|
|
2090
2090
|
kind: 'Fragment',
|
|
2091
|
-
version: VERSION$
|
|
2091
|
+
version: VERSION$b,
|
|
2092
2092
|
private: [],
|
|
2093
2093
|
opaque: true
|
|
2094
2094
|
};
|
|
2095
2095
|
};
|
|
2096
|
-
function equals$
|
|
2096
|
+
function equals$b(existing, incoming) {
|
|
2097
2097
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
2098
2098
|
return false;
|
|
2099
2099
|
}
|
|
@@ -2102,62 +2102,62 @@ function equals$a(existing, incoming) {
|
|
|
2102
2102
|
function deepFreeze$h(input) {
|
|
2103
2103
|
ObjectFreeze(input);
|
|
2104
2104
|
}
|
|
2105
|
-
const ingest$
|
|
2105
|
+
const ingest$b = function ManagedContentPublishOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2106
2106
|
if (process.env.NODE_ENV !== 'production') {
|
|
2107
2107
|
const validateError = validate$m(input);
|
|
2108
2108
|
if (validateError !== null) {
|
|
2109
2109
|
throw validateError;
|
|
2110
2110
|
}
|
|
2111
2111
|
}
|
|
2112
|
-
const key = keyBuilderFromType$
|
|
2112
|
+
const key = keyBuilderFromType$5(luvio, input);
|
|
2113
2113
|
const existingRecord = store.readEntry(key);
|
|
2114
|
-
const ttlToUse = TTL$
|
|
2115
|
-
let incomingRecord = normalize$
|
|
2114
|
+
const ttlToUse = TTL$b;
|
|
2115
|
+
let incomingRecord = normalize$b(input, store.readEntry(key), {
|
|
2116
2116
|
fullPath: key,
|
|
2117
2117
|
parent: path.parent,
|
|
2118
2118
|
propertyName: path.propertyName,
|
|
2119
2119
|
ttl: ttlToUse
|
|
2120
2120
|
});
|
|
2121
2121
|
deepFreeze$h(input);
|
|
2122
|
-
if (existingRecord === undefined || equals$
|
|
2122
|
+
if (existingRecord === undefined || equals$b(existingRecord, incomingRecord) === false) {
|
|
2123
2123
|
luvio.storePublish(key, incomingRecord);
|
|
2124
2124
|
}
|
|
2125
2125
|
{
|
|
2126
2126
|
const storeMetadataParams = {
|
|
2127
2127
|
ttl: ttlToUse,
|
|
2128
2128
|
namespace: "CMSAuthoring",
|
|
2129
|
-
version: VERSION$
|
|
2130
|
-
representationName: RepresentationType$
|
|
2129
|
+
version: VERSION$b,
|
|
2130
|
+
representationName: RepresentationType$b,
|
|
2131
2131
|
};
|
|
2132
2132
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
2133
2133
|
}
|
|
2134
2134
|
return createLink(key);
|
|
2135
2135
|
};
|
|
2136
|
-
function getTypeCacheKeys$
|
|
2136
|
+
function getTypeCacheKeys$b(luvio, input, fullPathFactory) {
|
|
2137
2137
|
const rootKeySet = new StoreKeyMap();
|
|
2138
2138
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2139
|
-
const rootKey = keyBuilderFromType$
|
|
2139
|
+
const rootKey = keyBuilderFromType$5(luvio, input);
|
|
2140
2140
|
rootKeySet.set(rootKey, {
|
|
2141
2141
|
namespace: keyPrefix,
|
|
2142
|
-
representationName: RepresentationType$
|
|
2142
|
+
representationName: RepresentationType$b,
|
|
2143
2143
|
mergeable: false
|
|
2144
2144
|
});
|
|
2145
2145
|
return rootKeySet;
|
|
2146
2146
|
}
|
|
2147
2147
|
|
|
2148
|
-
function select$
|
|
2149
|
-
return select$
|
|
2148
|
+
function select$r(luvio, params) {
|
|
2149
|
+
return select$s();
|
|
2150
2150
|
}
|
|
2151
|
-
function getResponseCacheKeys$
|
|
2152
|
-
return getTypeCacheKeys$
|
|
2151
|
+
function getResponseCacheKeys$h(luvio, resourceParams, response) {
|
|
2152
|
+
return getTypeCacheKeys$b(luvio, response);
|
|
2153
2153
|
}
|
|
2154
|
-
function ingestSuccess$
|
|
2154
|
+
function ingestSuccess$g(luvio, resourceParams, response) {
|
|
2155
2155
|
const { body } = response;
|
|
2156
|
-
const key = keyBuilderFromType$
|
|
2157
|
-
luvio.storeIngest(key, ingest$
|
|
2156
|
+
const key = keyBuilderFromType$5(luvio, body);
|
|
2157
|
+
luvio.storeIngest(key, ingest$b, body);
|
|
2158
2158
|
const snapshot = luvio.storeLookup({
|
|
2159
2159
|
recordId: key,
|
|
2160
|
-
node: select$
|
|
2160
|
+
node: select$r(),
|
|
2161
2161
|
variables: {},
|
|
2162
2162
|
});
|
|
2163
2163
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2167,7 +2167,7 @@ function ingestSuccess$e(luvio, resourceParams, response) {
|
|
|
2167
2167
|
}
|
|
2168
2168
|
return snapshot;
|
|
2169
2169
|
}
|
|
2170
|
-
function createResourceRequest$
|
|
2170
|
+
function createResourceRequest$h(config) {
|
|
2171
2171
|
const headers = {};
|
|
2172
2172
|
return {
|
|
2173
2173
|
baseUri: '/services/data/v58.0',
|
|
@@ -2188,7 +2188,7 @@ const publishManagedContent_ConfigPropertyNames = {
|
|
|
2188
2188
|
optional: []
|
|
2189
2189
|
}
|
|
2190
2190
|
};
|
|
2191
|
-
function createResourceParams$
|
|
2191
|
+
function createResourceParams$h(config) {
|
|
2192
2192
|
const resourceParams = {
|
|
2193
2193
|
body: {
|
|
2194
2194
|
publishInput: config.publishInput
|
|
@@ -2196,7 +2196,7 @@ function createResourceParams$f(config) {
|
|
|
2196
2196
|
};
|
|
2197
2197
|
return resourceParams;
|
|
2198
2198
|
}
|
|
2199
|
-
function typeCheckConfig$
|
|
2199
|
+
function typeCheckConfig$h(untrustedConfig) {
|
|
2200
2200
|
const config = {};
|
|
2201
2201
|
const untrustedConfig_publishInput = untrustedConfig.publishInput;
|
|
2202
2202
|
const referenceManagedContentPublishInputRepresentationValidationError = validate$n(untrustedConfig_publishInput);
|
|
@@ -2205,28 +2205,28 @@ function typeCheckConfig$f(untrustedConfig) {
|
|
|
2205
2205
|
}
|
|
2206
2206
|
return config;
|
|
2207
2207
|
}
|
|
2208
|
-
function validateAdapterConfig$
|
|
2208
|
+
function validateAdapterConfig$h(untrustedConfig, configPropertyNames) {
|
|
2209
2209
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2210
2210
|
return null;
|
|
2211
2211
|
}
|
|
2212
2212
|
if (process.env.NODE_ENV !== 'production') {
|
|
2213
2213
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2214
2214
|
}
|
|
2215
|
-
const config = typeCheckConfig$
|
|
2215
|
+
const config = typeCheckConfig$h(untrustedConfig);
|
|
2216
2216
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2217
2217
|
return null;
|
|
2218
2218
|
}
|
|
2219
2219
|
return config;
|
|
2220
2220
|
}
|
|
2221
|
-
function buildNetworkSnapshot$
|
|
2222
|
-
const resourceParams = createResourceParams$
|
|
2223
|
-
const request = createResourceRequest$
|
|
2221
|
+
function buildNetworkSnapshot$h(luvio, config, options) {
|
|
2222
|
+
const resourceParams = createResourceParams$h(config);
|
|
2223
|
+
const request = createResourceRequest$h(resourceParams);
|
|
2224
2224
|
return luvio.dispatchResourceRequest(request, options)
|
|
2225
2225
|
.then((response) => {
|
|
2226
2226
|
return luvio.handleSuccessResponse(() => {
|
|
2227
|
-
const snapshot = ingestSuccess$
|
|
2227
|
+
const snapshot = ingestSuccess$g(luvio, resourceParams, response);
|
|
2228
2228
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2229
|
-
}, () => getResponseCacheKeys$
|
|
2229
|
+
}, () => getResponseCacheKeys$h(luvio, resourceParams, response.body));
|
|
2230
2230
|
}, (response) => {
|
|
2231
2231
|
deepFreeze$u(response);
|
|
2232
2232
|
throw response;
|
|
@@ -2234,12 +2234,12 @@ function buildNetworkSnapshot$f(luvio, config, options) {
|
|
|
2234
2234
|
}
|
|
2235
2235
|
const publishManagedContentAdapterFactory = (luvio) => {
|
|
2236
2236
|
return function publishManagedContent(untrustedConfig) {
|
|
2237
|
-
const config = validateAdapterConfig$
|
|
2237
|
+
const config = validateAdapterConfig$h(untrustedConfig, publishManagedContent_ConfigPropertyNames);
|
|
2238
2238
|
// Invalid or incomplete config
|
|
2239
2239
|
if (config === null) {
|
|
2240
2240
|
throw new Error('Invalid config for "publishManagedContent"');
|
|
2241
2241
|
}
|
|
2242
|
-
return buildNetworkSnapshot$
|
|
2242
|
+
return buildNetworkSnapshot$h(luvio, config);
|
|
2243
2243
|
};
|
|
2244
2244
|
};
|
|
2245
2245
|
|
|
@@ -2287,8 +2287,8 @@ function validate$l(obj, path = 'ManagedContentUnpublishInputRepresentation') {
|
|
|
2287
2287
|
return v_error === undefined ? null : v_error;
|
|
2288
2288
|
}
|
|
2289
2289
|
|
|
2290
|
-
const TTL$
|
|
2291
|
-
const VERSION$
|
|
2290
|
+
const TTL$a = 100;
|
|
2291
|
+
const VERSION$a = "2f473ff12e87a4fc2336695104ab8567";
|
|
2292
2292
|
function validate$k(obj, path = 'ManagedContentUnpublishOutputRepresentation') {
|
|
2293
2293
|
const v_error = (() => {
|
|
2294
2294
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -2354,28 +2354,28 @@ function validate$k(obj, path = 'ManagedContentUnpublishOutputRepresentation') {
|
|
|
2354
2354
|
})();
|
|
2355
2355
|
return v_error === undefined ? null : v_error;
|
|
2356
2356
|
}
|
|
2357
|
-
const RepresentationType$
|
|
2358
|
-
function keyBuilder$
|
|
2359
|
-
return keyPrefix + '::' + RepresentationType$
|
|
2357
|
+
const RepresentationType$a = 'ManagedContentUnpublishOutputRepresentation';
|
|
2358
|
+
function keyBuilder$p(luvio, config) {
|
|
2359
|
+
return keyPrefix + '::' + RepresentationType$a + ':' + config.id;
|
|
2360
2360
|
}
|
|
2361
|
-
function keyBuilderFromType$
|
|
2361
|
+
function keyBuilderFromType$4(luvio, object) {
|
|
2362
2362
|
const keyParams = {
|
|
2363
2363
|
id: object.deploymentId
|
|
2364
2364
|
};
|
|
2365
|
-
return keyBuilder$
|
|
2365
|
+
return keyBuilder$p(luvio, keyParams);
|
|
2366
2366
|
}
|
|
2367
|
-
function normalize$
|
|
2367
|
+
function normalize$a(input, existing, path, luvio, store, timestamp) {
|
|
2368
2368
|
return input;
|
|
2369
2369
|
}
|
|
2370
|
-
const select$
|
|
2370
|
+
const select$q = function ManagedContentUnpublishOutputRepresentationSelect() {
|
|
2371
2371
|
return {
|
|
2372
2372
|
kind: 'Fragment',
|
|
2373
|
-
version: VERSION$
|
|
2373
|
+
version: VERSION$a,
|
|
2374
2374
|
private: [],
|
|
2375
2375
|
opaque: true
|
|
2376
2376
|
};
|
|
2377
2377
|
};
|
|
2378
|
-
function equals$
|
|
2378
|
+
function equals$a(existing, incoming) {
|
|
2379
2379
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
2380
2380
|
return false;
|
|
2381
2381
|
}
|
|
@@ -2384,62 +2384,62 @@ function equals$9(existing, incoming) {
|
|
|
2384
2384
|
function deepFreeze$g(input) {
|
|
2385
2385
|
ObjectFreeze(input);
|
|
2386
2386
|
}
|
|
2387
|
-
const ingest$
|
|
2387
|
+
const ingest$a = function ManagedContentUnpublishOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2388
2388
|
if (process.env.NODE_ENV !== 'production') {
|
|
2389
2389
|
const validateError = validate$k(input);
|
|
2390
2390
|
if (validateError !== null) {
|
|
2391
2391
|
throw validateError;
|
|
2392
2392
|
}
|
|
2393
2393
|
}
|
|
2394
|
-
const key = keyBuilderFromType$
|
|
2394
|
+
const key = keyBuilderFromType$4(luvio, input);
|
|
2395
2395
|
const existingRecord = store.readEntry(key);
|
|
2396
|
-
const ttlToUse = TTL$
|
|
2397
|
-
let incomingRecord = normalize$
|
|
2396
|
+
const ttlToUse = TTL$a;
|
|
2397
|
+
let incomingRecord = normalize$a(input, store.readEntry(key), {
|
|
2398
2398
|
fullPath: key,
|
|
2399
2399
|
parent: path.parent,
|
|
2400
2400
|
propertyName: path.propertyName,
|
|
2401
2401
|
ttl: ttlToUse
|
|
2402
2402
|
});
|
|
2403
2403
|
deepFreeze$g(input);
|
|
2404
|
-
if (existingRecord === undefined || equals$
|
|
2404
|
+
if (existingRecord === undefined || equals$a(existingRecord, incomingRecord) === false) {
|
|
2405
2405
|
luvio.storePublish(key, incomingRecord);
|
|
2406
2406
|
}
|
|
2407
2407
|
{
|
|
2408
2408
|
const storeMetadataParams = {
|
|
2409
2409
|
ttl: ttlToUse,
|
|
2410
2410
|
namespace: "CMSAuthoring",
|
|
2411
|
-
version: VERSION$
|
|
2412
|
-
representationName: RepresentationType$
|
|
2411
|
+
version: VERSION$a,
|
|
2412
|
+
representationName: RepresentationType$a,
|
|
2413
2413
|
};
|
|
2414
2414
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
2415
2415
|
}
|
|
2416
2416
|
return createLink(key);
|
|
2417
2417
|
};
|
|
2418
|
-
function getTypeCacheKeys$
|
|
2418
|
+
function getTypeCacheKeys$a(luvio, input, fullPathFactory) {
|
|
2419
2419
|
const rootKeySet = new StoreKeyMap();
|
|
2420
2420
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2421
|
-
const rootKey = keyBuilderFromType$
|
|
2421
|
+
const rootKey = keyBuilderFromType$4(luvio, input);
|
|
2422
2422
|
rootKeySet.set(rootKey, {
|
|
2423
2423
|
namespace: keyPrefix,
|
|
2424
|
-
representationName: RepresentationType$
|
|
2424
|
+
representationName: RepresentationType$a,
|
|
2425
2425
|
mergeable: false
|
|
2426
2426
|
});
|
|
2427
2427
|
return rootKeySet;
|
|
2428
2428
|
}
|
|
2429
2429
|
|
|
2430
|
-
function select$
|
|
2431
|
-
return select$
|
|
2430
|
+
function select$p(luvio, params) {
|
|
2431
|
+
return select$q();
|
|
2432
2432
|
}
|
|
2433
|
-
function getResponseCacheKeys$
|
|
2434
|
-
return getTypeCacheKeys$
|
|
2433
|
+
function getResponseCacheKeys$g(luvio, resourceParams, response) {
|
|
2434
|
+
return getTypeCacheKeys$a(luvio, response);
|
|
2435
2435
|
}
|
|
2436
|
-
function ingestSuccess$
|
|
2436
|
+
function ingestSuccess$f(luvio, resourceParams, response) {
|
|
2437
2437
|
const { body } = response;
|
|
2438
|
-
const key = keyBuilderFromType$
|
|
2439
|
-
luvio.storeIngest(key, ingest$
|
|
2438
|
+
const key = keyBuilderFromType$4(luvio, body);
|
|
2439
|
+
luvio.storeIngest(key, ingest$a, body);
|
|
2440
2440
|
const snapshot = luvio.storeLookup({
|
|
2441
2441
|
recordId: key,
|
|
2442
|
-
node: select$
|
|
2442
|
+
node: select$p(),
|
|
2443
2443
|
variables: {},
|
|
2444
2444
|
});
|
|
2445
2445
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2449,7 +2449,7 @@ function ingestSuccess$d(luvio, resourceParams, response) {
|
|
|
2449
2449
|
}
|
|
2450
2450
|
return snapshot;
|
|
2451
2451
|
}
|
|
2452
|
-
function createResourceRequest$
|
|
2452
|
+
function createResourceRequest$g(config) {
|
|
2453
2453
|
const headers = {};
|
|
2454
2454
|
return {
|
|
2455
2455
|
baseUri: '/services/data/v58.0',
|
|
@@ -2470,7 +2470,7 @@ const unpublishManagedContent_ConfigPropertyNames = {
|
|
|
2470
2470
|
optional: []
|
|
2471
2471
|
}
|
|
2472
2472
|
};
|
|
2473
|
-
function createResourceParams$
|
|
2473
|
+
function createResourceParams$g(config) {
|
|
2474
2474
|
const resourceParams = {
|
|
2475
2475
|
body: {
|
|
2476
2476
|
unpublishInput: config.unpublishInput
|
|
@@ -2478,7 +2478,7 @@ function createResourceParams$e(config) {
|
|
|
2478
2478
|
};
|
|
2479
2479
|
return resourceParams;
|
|
2480
2480
|
}
|
|
2481
|
-
function typeCheckConfig$
|
|
2481
|
+
function typeCheckConfig$g(untrustedConfig) {
|
|
2482
2482
|
const config = {};
|
|
2483
2483
|
const untrustedConfig_unpublishInput = untrustedConfig.unpublishInput;
|
|
2484
2484
|
const referenceManagedContentUnpublishInputRepresentationValidationError = validate$l(untrustedConfig_unpublishInput);
|
|
@@ -2487,28 +2487,28 @@ function typeCheckConfig$e(untrustedConfig) {
|
|
|
2487
2487
|
}
|
|
2488
2488
|
return config;
|
|
2489
2489
|
}
|
|
2490
|
-
function validateAdapterConfig$
|
|
2490
|
+
function validateAdapterConfig$g(untrustedConfig, configPropertyNames) {
|
|
2491
2491
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2492
2492
|
return null;
|
|
2493
2493
|
}
|
|
2494
2494
|
if (process.env.NODE_ENV !== 'production') {
|
|
2495
2495
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2496
2496
|
}
|
|
2497
|
-
const config = typeCheckConfig$
|
|
2497
|
+
const config = typeCheckConfig$g(untrustedConfig);
|
|
2498
2498
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2499
2499
|
return null;
|
|
2500
2500
|
}
|
|
2501
2501
|
return config;
|
|
2502
2502
|
}
|
|
2503
|
-
function buildNetworkSnapshot$
|
|
2504
|
-
const resourceParams = createResourceParams$
|
|
2505
|
-
const request = createResourceRequest$
|
|
2503
|
+
function buildNetworkSnapshot$g(luvio, config, options) {
|
|
2504
|
+
const resourceParams = createResourceParams$g(config);
|
|
2505
|
+
const request = createResourceRequest$g(resourceParams);
|
|
2506
2506
|
return luvio.dispatchResourceRequest(request, options)
|
|
2507
2507
|
.then((response) => {
|
|
2508
2508
|
return luvio.handleSuccessResponse(() => {
|
|
2509
|
-
const snapshot = ingestSuccess$
|
|
2509
|
+
const snapshot = ingestSuccess$f(luvio, resourceParams, response);
|
|
2510
2510
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2511
|
-
}, () => getResponseCacheKeys$
|
|
2511
|
+
}, () => getResponseCacheKeys$g(luvio, resourceParams, response.body));
|
|
2512
2512
|
}, (response) => {
|
|
2513
2513
|
deepFreeze$u(response);
|
|
2514
2514
|
throw response;
|
|
@@ -2516,12 +2516,12 @@ function buildNetworkSnapshot$e(luvio, config, options) {
|
|
|
2516
2516
|
}
|
|
2517
2517
|
const unpublishManagedContentAdapterFactory = (luvio) => {
|
|
2518
2518
|
return function unpublishManagedContent(untrustedConfig) {
|
|
2519
|
-
const config = validateAdapterConfig$
|
|
2519
|
+
const config = validateAdapterConfig$g(untrustedConfig, unpublishManagedContent_ConfigPropertyNames);
|
|
2520
2520
|
// Invalid or incomplete config
|
|
2521
2521
|
if (config === null) {
|
|
2522
2522
|
throw new Error('Invalid config for "unpublishManagedContent"');
|
|
2523
2523
|
}
|
|
2524
|
-
return buildNetworkSnapshot$
|
|
2524
|
+
return buildNetworkSnapshot$g(luvio, config);
|
|
2525
2525
|
};
|
|
2526
2526
|
};
|
|
2527
2527
|
|
|
@@ -2572,8 +2572,8 @@ function validate$j(obj, path = 'ManagedContentVariantInputRepresentation') {
|
|
|
2572
2572
|
return v_error === undefined ? null : v_error;
|
|
2573
2573
|
}
|
|
2574
2574
|
|
|
2575
|
-
const TTL$
|
|
2576
|
-
const VERSION$
|
|
2575
|
+
const TTL$9 = 3600000;
|
|
2576
|
+
const VERSION$9 = "7752c6a8bb6b113a02bfde83f39e5957";
|
|
2577
2577
|
function validate$i(obj, path = 'ManagedContentVariantRepresentation') {
|
|
2578
2578
|
const v_error = (() => {
|
|
2579
2579
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -2694,28 +2694,28 @@ function validate$i(obj, path = 'ManagedContentVariantRepresentation') {
|
|
|
2694
2694
|
})();
|
|
2695
2695
|
return v_error === undefined ? null : v_error;
|
|
2696
2696
|
}
|
|
2697
|
-
const RepresentationType$
|
|
2698
|
-
function keyBuilder$
|
|
2699
|
-
return keyPrefix + '::' + RepresentationType$
|
|
2697
|
+
const RepresentationType$9 = 'ManagedContentVariantRepresentation';
|
|
2698
|
+
function keyBuilder$o(luvio, config) {
|
|
2699
|
+
return keyPrefix + '::' + RepresentationType$9 + ':' + config.id;
|
|
2700
2700
|
}
|
|
2701
|
-
function keyBuilderFromType$
|
|
2701
|
+
function keyBuilderFromType$3(luvio, object) {
|
|
2702
2702
|
const keyParams = {
|
|
2703
2703
|
id: object.managedContentVariantId
|
|
2704
2704
|
};
|
|
2705
|
-
return keyBuilder$
|
|
2705
|
+
return keyBuilder$o(luvio, keyParams);
|
|
2706
2706
|
}
|
|
2707
|
-
function normalize$
|
|
2707
|
+
function normalize$9(input, existing, path, luvio, store, timestamp) {
|
|
2708
2708
|
return input;
|
|
2709
2709
|
}
|
|
2710
|
-
const select$
|
|
2710
|
+
const select$o = function ManagedContentVariantRepresentationSelect() {
|
|
2711
2711
|
return {
|
|
2712
2712
|
kind: 'Fragment',
|
|
2713
|
-
version: VERSION$
|
|
2713
|
+
version: VERSION$9,
|
|
2714
2714
|
private: [],
|
|
2715
2715
|
opaque: true
|
|
2716
2716
|
};
|
|
2717
2717
|
};
|
|
2718
|
-
function equals$
|
|
2718
|
+
function equals$9(existing, incoming) {
|
|
2719
2719
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
2720
2720
|
return false;
|
|
2721
2721
|
}
|
|
@@ -2745,62 +2745,62 @@ function deepFreeze$f(input) {
|
|
|
2745
2745
|
deepFreeze$j(input_status);
|
|
2746
2746
|
ObjectFreeze(input);
|
|
2747
2747
|
}
|
|
2748
|
-
const ingest$
|
|
2748
|
+
const ingest$9 = function ManagedContentVariantRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2749
2749
|
if (process.env.NODE_ENV !== 'production') {
|
|
2750
2750
|
const validateError = validate$i(input);
|
|
2751
2751
|
if (validateError !== null) {
|
|
2752
2752
|
throw validateError;
|
|
2753
2753
|
}
|
|
2754
2754
|
}
|
|
2755
|
-
const key = keyBuilderFromType$
|
|
2755
|
+
const key = keyBuilderFromType$3(luvio, input);
|
|
2756
2756
|
const existingRecord = store.readEntry(key);
|
|
2757
|
-
const ttlToUse = TTL$
|
|
2758
|
-
let incomingRecord = normalize$
|
|
2757
|
+
const ttlToUse = TTL$9;
|
|
2758
|
+
let incomingRecord = normalize$9(input, store.readEntry(key), {
|
|
2759
2759
|
fullPath: key,
|
|
2760
2760
|
parent: path.parent,
|
|
2761
2761
|
propertyName: path.propertyName,
|
|
2762
2762
|
ttl: ttlToUse
|
|
2763
2763
|
});
|
|
2764
2764
|
deepFreeze$f(input);
|
|
2765
|
-
if (existingRecord === undefined || equals$
|
|
2765
|
+
if (existingRecord === undefined || equals$9(existingRecord, incomingRecord) === false) {
|
|
2766
2766
|
luvio.storePublish(key, incomingRecord);
|
|
2767
2767
|
}
|
|
2768
2768
|
{
|
|
2769
2769
|
const storeMetadataParams = {
|
|
2770
2770
|
ttl: ttlToUse,
|
|
2771
2771
|
namespace: "CMSAuthoring",
|
|
2772
|
-
version: VERSION$
|
|
2773
|
-
representationName: RepresentationType$
|
|
2772
|
+
version: VERSION$9,
|
|
2773
|
+
representationName: RepresentationType$9,
|
|
2774
2774
|
};
|
|
2775
2775
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
2776
2776
|
}
|
|
2777
2777
|
return createLink(key);
|
|
2778
2778
|
};
|
|
2779
|
-
function getTypeCacheKeys$
|
|
2779
|
+
function getTypeCacheKeys$9(luvio, input, fullPathFactory) {
|
|
2780
2780
|
const rootKeySet = new StoreKeyMap();
|
|
2781
2781
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2782
|
-
const rootKey = keyBuilderFromType$
|
|
2782
|
+
const rootKey = keyBuilderFromType$3(luvio, input);
|
|
2783
2783
|
rootKeySet.set(rootKey, {
|
|
2784
2784
|
namespace: keyPrefix,
|
|
2785
|
-
representationName: RepresentationType$
|
|
2785
|
+
representationName: RepresentationType$9,
|
|
2786
2786
|
mergeable: false
|
|
2787
2787
|
});
|
|
2788
2788
|
return rootKeySet;
|
|
2789
2789
|
}
|
|
2790
2790
|
|
|
2791
|
-
function select$
|
|
2792
|
-
return select$
|
|
2791
|
+
function select$n(luvio, params) {
|
|
2792
|
+
return select$o();
|
|
2793
2793
|
}
|
|
2794
|
-
function getResponseCacheKeys$
|
|
2795
|
-
return getTypeCacheKeys$
|
|
2794
|
+
function getResponseCacheKeys$f(luvio, resourceParams, response) {
|
|
2795
|
+
return getTypeCacheKeys$9(luvio, response);
|
|
2796
2796
|
}
|
|
2797
|
-
function ingestSuccess$
|
|
2797
|
+
function ingestSuccess$e(luvio, resourceParams, response) {
|
|
2798
2798
|
const { body } = response;
|
|
2799
|
-
const key = keyBuilderFromType$
|
|
2800
|
-
luvio.storeIngest(key, ingest$
|
|
2799
|
+
const key = keyBuilderFromType$3(luvio, body);
|
|
2800
|
+
luvio.storeIngest(key, ingest$9, body);
|
|
2801
2801
|
const snapshot = luvio.storeLookup({
|
|
2802
2802
|
recordId: key,
|
|
2803
|
-
node: select$
|
|
2803
|
+
node: select$n(),
|
|
2804
2804
|
variables: {},
|
|
2805
2805
|
});
|
|
2806
2806
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2810,7 +2810,7 @@ function ingestSuccess$c(luvio, resourceParams, response) {
|
|
|
2810
2810
|
}
|
|
2811
2811
|
return snapshot;
|
|
2812
2812
|
}
|
|
2813
|
-
function createResourceRequest$
|
|
2813
|
+
function createResourceRequest$f(config) {
|
|
2814
2814
|
const headers = {};
|
|
2815
2815
|
return {
|
|
2816
2816
|
baseUri: '/services/data/v58.0',
|
|
@@ -2831,7 +2831,7 @@ const createManagedContentVariant_ConfigPropertyNames = {
|
|
|
2831
2831
|
optional: []
|
|
2832
2832
|
}
|
|
2833
2833
|
};
|
|
2834
|
-
function createResourceParams$
|
|
2834
|
+
function createResourceParams$f(config) {
|
|
2835
2835
|
const resourceParams = {
|
|
2836
2836
|
body: {
|
|
2837
2837
|
managedContentVariantInputParam: config.managedContentVariantInputParam
|
|
@@ -2839,7 +2839,7 @@ function createResourceParams$d(config) {
|
|
|
2839
2839
|
};
|
|
2840
2840
|
return resourceParams;
|
|
2841
2841
|
}
|
|
2842
|
-
function typeCheckConfig$
|
|
2842
|
+
function typeCheckConfig$f(untrustedConfig) {
|
|
2843
2843
|
const config = {};
|
|
2844
2844
|
const untrustedConfig_managedContentVariantInputParam = untrustedConfig.managedContentVariantInputParam;
|
|
2845
2845
|
const referenceManagedContentVariantInputRepresentationValidationError = validate$j(untrustedConfig_managedContentVariantInputParam);
|
|
@@ -2848,28 +2848,28 @@ function typeCheckConfig$d(untrustedConfig) {
|
|
|
2848
2848
|
}
|
|
2849
2849
|
return config;
|
|
2850
2850
|
}
|
|
2851
|
-
function validateAdapterConfig$
|
|
2851
|
+
function validateAdapterConfig$f(untrustedConfig, configPropertyNames) {
|
|
2852
2852
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2853
2853
|
return null;
|
|
2854
2854
|
}
|
|
2855
2855
|
if (process.env.NODE_ENV !== 'production') {
|
|
2856
2856
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2857
2857
|
}
|
|
2858
|
-
const config = typeCheckConfig$
|
|
2858
|
+
const config = typeCheckConfig$f(untrustedConfig);
|
|
2859
2859
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2860
2860
|
return null;
|
|
2861
2861
|
}
|
|
2862
2862
|
return config;
|
|
2863
2863
|
}
|
|
2864
|
-
function buildNetworkSnapshot$
|
|
2865
|
-
const resourceParams = createResourceParams$
|
|
2866
|
-
const request = createResourceRequest$
|
|
2864
|
+
function buildNetworkSnapshot$f(luvio, config, options) {
|
|
2865
|
+
const resourceParams = createResourceParams$f(config);
|
|
2866
|
+
const request = createResourceRequest$f(resourceParams);
|
|
2867
2867
|
return luvio.dispatchResourceRequest(request, options)
|
|
2868
2868
|
.then((response) => {
|
|
2869
2869
|
return luvio.handleSuccessResponse(() => {
|
|
2870
|
-
const snapshot = ingestSuccess$
|
|
2870
|
+
const snapshot = ingestSuccess$e(luvio, resourceParams, response);
|
|
2871
2871
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2872
|
-
}, () => getResponseCacheKeys$
|
|
2872
|
+
}, () => getResponseCacheKeys$f(luvio, resourceParams, response.body));
|
|
2873
2873
|
}, (response) => {
|
|
2874
2874
|
deepFreeze$u(response);
|
|
2875
2875
|
throw response;
|
|
@@ -2877,35 +2877,35 @@ function buildNetworkSnapshot$d(luvio, config, options) {
|
|
|
2877
2877
|
}
|
|
2878
2878
|
const createManagedContentVariantAdapterFactory = (luvio) => {
|
|
2879
2879
|
return function createManagedContentVariant(untrustedConfig) {
|
|
2880
|
-
const config = validateAdapterConfig$
|
|
2880
|
+
const config = validateAdapterConfig$f(untrustedConfig, createManagedContentVariant_ConfigPropertyNames);
|
|
2881
2881
|
// Invalid or incomplete config
|
|
2882
2882
|
if (config === null) {
|
|
2883
2883
|
throw new Error('Invalid config for "createManagedContentVariant"');
|
|
2884
2884
|
}
|
|
2885
|
-
return buildNetworkSnapshot$
|
|
2885
|
+
return buildNetworkSnapshot$f(luvio, config);
|
|
2886
2886
|
};
|
|
2887
2887
|
};
|
|
2888
2888
|
|
|
2889
|
-
function keyBuilder$
|
|
2890
|
-
return keyBuilder$
|
|
2889
|
+
function keyBuilder$n(luvio, params) {
|
|
2890
|
+
return keyBuilder$o(luvio, {
|
|
2891
2891
|
id: params.urlParams.variantId
|
|
2892
2892
|
});
|
|
2893
2893
|
}
|
|
2894
|
-
function getResponseCacheKeys$
|
|
2895
|
-
const key = keyBuilder$
|
|
2894
|
+
function getResponseCacheKeys$e(luvio, resourceParams) {
|
|
2895
|
+
const key = keyBuilder$n(luvio, resourceParams);
|
|
2896
2896
|
const cacheKeyMap = new StoreKeyMap();
|
|
2897
2897
|
cacheKeyMap.set(key, {
|
|
2898
2898
|
namespace: keyPrefix,
|
|
2899
|
-
representationName: RepresentationType$
|
|
2899
|
+
representationName: RepresentationType$9,
|
|
2900
2900
|
mergeable: false
|
|
2901
2901
|
});
|
|
2902
2902
|
return cacheKeyMap;
|
|
2903
2903
|
}
|
|
2904
2904
|
function evictSuccess(luvio, resourceParams) {
|
|
2905
|
-
const key = keyBuilder$
|
|
2905
|
+
const key = keyBuilder$n(luvio, resourceParams);
|
|
2906
2906
|
luvio.storeEvict(key);
|
|
2907
2907
|
}
|
|
2908
|
-
function createResourceRequest$
|
|
2908
|
+
function createResourceRequest$e(config) {
|
|
2909
2909
|
const headers = {};
|
|
2910
2910
|
return {
|
|
2911
2911
|
baseUri: '/services/data/v58.0',
|
|
@@ -2927,7 +2927,7 @@ const deleteManagedContentVariant_ConfigPropertyNames = {
|
|
|
2927
2927
|
optional: []
|
|
2928
2928
|
}
|
|
2929
2929
|
};
|
|
2930
|
-
function createResourceParams$
|
|
2930
|
+
function createResourceParams$e(config) {
|
|
2931
2931
|
const resourceParams = {
|
|
2932
2932
|
urlParams: {
|
|
2933
2933
|
variantId: config.variantId
|
|
@@ -2935,7 +2935,7 @@ function createResourceParams$c(config) {
|
|
|
2935
2935
|
};
|
|
2936
2936
|
return resourceParams;
|
|
2937
2937
|
}
|
|
2938
|
-
function typeCheckConfig$
|
|
2938
|
+
function typeCheckConfig$e(untrustedConfig) {
|
|
2939
2939
|
const config = {};
|
|
2940
2940
|
const untrustedConfig_variantId = untrustedConfig.variantId;
|
|
2941
2941
|
if (typeof untrustedConfig_variantId === 'string') {
|
|
@@ -2943,28 +2943,28 @@ function typeCheckConfig$c(untrustedConfig) {
|
|
|
2943
2943
|
}
|
|
2944
2944
|
return config;
|
|
2945
2945
|
}
|
|
2946
|
-
function validateAdapterConfig$
|
|
2946
|
+
function validateAdapterConfig$e(untrustedConfig, configPropertyNames) {
|
|
2947
2947
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2948
2948
|
return null;
|
|
2949
2949
|
}
|
|
2950
2950
|
if (process.env.NODE_ENV !== 'production') {
|
|
2951
2951
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2952
2952
|
}
|
|
2953
|
-
const config = typeCheckConfig$
|
|
2953
|
+
const config = typeCheckConfig$e(untrustedConfig);
|
|
2954
2954
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2955
2955
|
return null;
|
|
2956
2956
|
}
|
|
2957
2957
|
return config;
|
|
2958
2958
|
}
|
|
2959
|
-
function buildNetworkSnapshot$
|
|
2960
|
-
const resourceParams = createResourceParams$
|
|
2961
|
-
const request = createResourceRequest$
|
|
2959
|
+
function buildNetworkSnapshot$e(luvio, config, options) {
|
|
2960
|
+
const resourceParams = createResourceParams$e(config);
|
|
2961
|
+
const request = createResourceRequest$e(resourceParams);
|
|
2962
2962
|
return luvio.dispatchResourceRequest(request, options)
|
|
2963
2963
|
.then(() => {
|
|
2964
2964
|
return luvio.handleSuccessResponse(() => {
|
|
2965
2965
|
evictSuccess(luvio, resourceParams);
|
|
2966
2966
|
return luvio.storeBroadcast();
|
|
2967
|
-
}, () => getResponseCacheKeys$
|
|
2967
|
+
}, () => getResponseCacheKeys$e(luvio, resourceParams));
|
|
2968
2968
|
}, (response) => {
|
|
2969
2969
|
deepFreeze$u(response);
|
|
2970
2970
|
throw response;
|
|
@@ -2972,33 +2972,33 @@ function buildNetworkSnapshot$c(luvio, config, options) {
|
|
|
2972
2972
|
}
|
|
2973
2973
|
const deleteManagedContentVariantAdapterFactory = (luvio) => {
|
|
2974
2974
|
return function CMSAuthoringdeleteManagedContentVariant(untrustedConfig) {
|
|
2975
|
-
const config = validateAdapterConfig$
|
|
2975
|
+
const config = validateAdapterConfig$e(untrustedConfig, deleteManagedContentVariant_ConfigPropertyNames);
|
|
2976
2976
|
// Invalid or incomplete config
|
|
2977
2977
|
if (config === null) {
|
|
2978
2978
|
throw new Error(`Invalid config for "${adapterName}"`);
|
|
2979
2979
|
}
|
|
2980
|
-
return buildNetworkSnapshot$
|
|
2980
|
+
return buildNetworkSnapshot$e(luvio, config);
|
|
2981
2981
|
};
|
|
2982
2982
|
};
|
|
2983
2983
|
|
|
2984
|
-
function select$
|
|
2985
|
-
return select$
|
|
2984
|
+
function select$m(luvio, params) {
|
|
2985
|
+
return select$o();
|
|
2986
2986
|
}
|
|
2987
|
-
function keyBuilder$
|
|
2988
|
-
return keyBuilder$
|
|
2987
|
+
function keyBuilder$m(luvio, params) {
|
|
2988
|
+
return keyBuilder$o(luvio, {
|
|
2989
2989
|
id: params.urlParams.variantId
|
|
2990
2990
|
});
|
|
2991
2991
|
}
|
|
2992
|
-
function getResponseCacheKeys$
|
|
2993
|
-
return getTypeCacheKeys$
|
|
2992
|
+
function getResponseCacheKeys$d(luvio, resourceParams, response) {
|
|
2993
|
+
return getTypeCacheKeys$9(luvio, response);
|
|
2994
2994
|
}
|
|
2995
|
-
function ingestSuccess$
|
|
2995
|
+
function ingestSuccess$d(luvio, resourceParams, response, snapshotRefresh) {
|
|
2996
2996
|
const { body } = response;
|
|
2997
|
-
const key = keyBuilder$
|
|
2998
|
-
luvio.storeIngest(key, ingest$
|
|
2997
|
+
const key = keyBuilder$m(luvio, resourceParams);
|
|
2998
|
+
luvio.storeIngest(key, ingest$9, body);
|
|
2999
2999
|
const snapshot = luvio.storeLookup({
|
|
3000
3000
|
recordId: key,
|
|
3001
|
-
node: select$
|
|
3001
|
+
node: select$m(),
|
|
3002
3002
|
variables: {},
|
|
3003
3003
|
}, snapshotRefresh);
|
|
3004
3004
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3008,19 +3008,19 @@ function ingestSuccess$b(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
3008
3008
|
}
|
|
3009
3009
|
return snapshot;
|
|
3010
3010
|
}
|
|
3011
|
-
function ingestError$
|
|
3012
|
-
const key = keyBuilder$
|
|
3011
|
+
function ingestError$9(luvio, params, error, snapshotRefresh) {
|
|
3012
|
+
const key = keyBuilder$m(luvio, params);
|
|
3013
3013
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3014
3014
|
const storeMetadataParams = {
|
|
3015
|
-
ttl: TTL$
|
|
3015
|
+
ttl: TTL$9,
|
|
3016
3016
|
namespace: keyPrefix,
|
|
3017
|
-
version: VERSION$
|
|
3018
|
-
representationName: RepresentationType$
|
|
3017
|
+
version: VERSION$9,
|
|
3018
|
+
representationName: RepresentationType$9
|
|
3019
3019
|
};
|
|
3020
3020
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3021
3021
|
return errorSnapshot;
|
|
3022
3022
|
}
|
|
3023
|
-
function createResourceRequest$
|
|
3023
|
+
function createResourceRequest$d(config) {
|
|
3024
3024
|
const headers = {};
|
|
3025
3025
|
return {
|
|
3026
3026
|
baseUri: '/services/data/v58.0',
|
|
@@ -3041,7 +3041,7 @@ const getManagedContentVariant_ConfigPropertyNames = {
|
|
|
3041
3041
|
optional: []
|
|
3042
3042
|
}
|
|
3043
3043
|
};
|
|
3044
|
-
function createResourceParams$
|
|
3044
|
+
function createResourceParams$d(config) {
|
|
3045
3045
|
const resourceParams = {
|
|
3046
3046
|
urlParams: {
|
|
3047
3047
|
variantId: config.variantId
|
|
@@ -3049,11 +3049,11 @@ function createResourceParams$b(config) {
|
|
|
3049
3049
|
};
|
|
3050
3050
|
return resourceParams;
|
|
3051
3051
|
}
|
|
3052
|
-
function keyBuilder$
|
|
3053
|
-
const resourceParams = createResourceParams$
|
|
3054
|
-
return keyBuilder$
|
|
3052
|
+
function keyBuilder$l(luvio, config) {
|
|
3053
|
+
const resourceParams = createResourceParams$d(config);
|
|
3054
|
+
return keyBuilder$m(luvio, resourceParams);
|
|
3055
3055
|
}
|
|
3056
|
-
function typeCheckConfig$
|
|
3056
|
+
function typeCheckConfig$d(untrustedConfig) {
|
|
3057
3057
|
const config = {};
|
|
3058
3058
|
const untrustedConfig_variantId = untrustedConfig.variantId;
|
|
3059
3059
|
if (typeof untrustedConfig_variantId === 'string') {
|
|
@@ -3061,48 +3061,48 @@ function typeCheckConfig$b(untrustedConfig) {
|
|
|
3061
3061
|
}
|
|
3062
3062
|
return config;
|
|
3063
3063
|
}
|
|
3064
|
-
function validateAdapterConfig$
|
|
3064
|
+
function validateAdapterConfig$d(untrustedConfig, configPropertyNames) {
|
|
3065
3065
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3066
3066
|
return null;
|
|
3067
3067
|
}
|
|
3068
3068
|
if (process.env.NODE_ENV !== 'production') {
|
|
3069
3069
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3070
3070
|
}
|
|
3071
|
-
const config = typeCheckConfig$
|
|
3071
|
+
const config = typeCheckConfig$d(untrustedConfig);
|
|
3072
3072
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3073
3073
|
return null;
|
|
3074
3074
|
}
|
|
3075
3075
|
return config;
|
|
3076
3076
|
}
|
|
3077
|
-
function adapterFragment$
|
|
3078
|
-
createResourceParams$
|
|
3079
|
-
return select$
|
|
3077
|
+
function adapterFragment$9(luvio, config) {
|
|
3078
|
+
createResourceParams$d(config);
|
|
3079
|
+
return select$m();
|
|
3080
3080
|
}
|
|
3081
|
-
function onFetchResponseSuccess$
|
|
3082
|
-
const snapshot = ingestSuccess$
|
|
3081
|
+
function onFetchResponseSuccess$a(luvio, config, resourceParams, response) {
|
|
3082
|
+
const snapshot = ingestSuccess$d(luvio, resourceParams, response, {
|
|
3083
3083
|
config,
|
|
3084
|
-
resolve: () => buildNetworkSnapshot$
|
|
3084
|
+
resolve: () => buildNetworkSnapshot$d(luvio, config, snapshotRefreshOptions)
|
|
3085
3085
|
});
|
|
3086
3086
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3087
3087
|
}
|
|
3088
|
-
function onFetchResponseError$
|
|
3089
|
-
const snapshot = ingestError$
|
|
3088
|
+
function onFetchResponseError$9(luvio, config, resourceParams, response) {
|
|
3089
|
+
const snapshot = ingestError$9(luvio, resourceParams, response, {
|
|
3090
3090
|
config,
|
|
3091
|
-
resolve: () => buildNetworkSnapshot$
|
|
3091
|
+
resolve: () => buildNetworkSnapshot$d(luvio, config, snapshotRefreshOptions)
|
|
3092
3092
|
});
|
|
3093
3093
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3094
3094
|
}
|
|
3095
|
-
function buildNetworkSnapshot$
|
|
3096
|
-
const resourceParams = createResourceParams$
|
|
3097
|
-
const request = createResourceRequest$
|
|
3095
|
+
function buildNetworkSnapshot$d(luvio, config, options) {
|
|
3096
|
+
const resourceParams = createResourceParams$d(config);
|
|
3097
|
+
const request = createResourceRequest$d(resourceParams);
|
|
3098
3098
|
return luvio.dispatchResourceRequest(request, options)
|
|
3099
3099
|
.then((response) => {
|
|
3100
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
3100
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$a(luvio, config, resourceParams, response), () => getResponseCacheKeys$d(luvio, resourceParams, response.body));
|
|
3101
3101
|
}, (response) => {
|
|
3102
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
3102
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$9(luvio, config, resourceParams, response));
|
|
3103
3103
|
});
|
|
3104
3104
|
}
|
|
3105
|
-
function buildNetworkSnapshotCachePolicy$
|
|
3105
|
+
function buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext) {
|
|
3106
3106
|
const { luvio, config } = context;
|
|
3107
3107
|
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
3108
3108
|
const dispatchOptions = {
|
|
@@ -3117,29 +3117,29 @@ function buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext
|
|
|
3117
3117
|
priority: networkPriority
|
|
3118
3118
|
};
|
|
3119
3119
|
}
|
|
3120
|
-
return buildNetworkSnapshot$
|
|
3120
|
+
return buildNetworkSnapshot$d(luvio, config, dispatchOptions);
|
|
3121
3121
|
}
|
|
3122
|
-
function buildCachedSnapshotCachePolicy$
|
|
3122
|
+
function buildCachedSnapshotCachePolicy$9(context, storeLookup) {
|
|
3123
3123
|
const { luvio, config } = context;
|
|
3124
3124
|
const selector = {
|
|
3125
|
-
recordId: keyBuilder$
|
|
3126
|
-
node: adapterFragment$
|
|
3125
|
+
recordId: keyBuilder$l(luvio, config),
|
|
3126
|
+
node: adapterFragment$9(luvio, config),
|
|
3127
3127
|
variables: {},
|
|
3128
3128
|
};
|
|
3129
3129
|
const cacheSnapshot = storeLookup(selector, {
|
|
3130
3130
|
config,
|
|
3131
|
-
resolve: () => buildNetworkSnapshot$
|
|
3131
|
+
resolve: () => buildNetworkSnapshot$d(luvio, config, snapshotRefreshOptions)
|
|
3132
3132
|
});
|
|
3133
3133
|
return cacheSnapshot;
|
|
3134
3134
|
}
|
|
3135
3135
|
const getManagedContentVariantAdapterFactory = (luvio) => function CMSAuthoring__getManagedContentVariant(untrustedConfig, requestContext) {
|
|
3136
|
-
const config = validateAdapterConfig$
|
|
3136
|
+
const config = validateAdapterConfig$d(untrustedConfig, getManagedContentVariant_ConfigPropertyNames);
|
|
3137
3137
|
// Invalid or incomplete config
|
|
3138
3138
|
if (config === null) {
|
|
3139
3139
|
return null;
|
|
3140
3140
|
}
|
|
3141
3141
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3142
|
-
buildCachedSnapshotCachePolicy$
|
|
3142
|
+
buildCachedSnapshotCachePolicy$9, buildNetworkSnapshotCachePolicy$9);
|
|
3143
3143
|
};
|
|
3144
3144
|
|
|
3145
3145
|
function validate$h(obj, path = 'ManagedContentVariantUpdateInputRepresentation') {
|
|
@@ -3175,19 +3175,19 @@ function validate$h(obj, path = 'ManagedContentVariantUpdateInputRepresentation'
|
|
|
3175
3175
|
return v_error === undefined ? null : v_error;
|
|
3176
3176
|
}
|
|
3177
3177
|
|
|
3178
|
-
function select$
|
|
3179
|
-
return select$
|
|
3178
|
+
function select$l(luvio, params) {
|
|
3179
|
+
return select$o();
|
|
3180
3180
|
}
|
|
3181
|
-
function getResponseCacheKeys$
|
|
3182
|
-
return getTypeCacheKeys$
|
|
3181
|
+
function getResponseCacheKeys$c(luvio, resourceParams, response) {
|
|
3182
|
+
return getTypeCacheKeys$9(luvio, response);
|
|
3183
3183
|
}
|
|
3184
|
-
function ingestSuccess$
|
|
3184
|
+
function ingestSuccess$c(luvio, resourceParams, response) {
|
|
3185
3185
|
const { body } = response;
|
|
3186
|
-
const key = keyBuilderFromType$
|
|
3187
|
-
luvio.storeIngest(key, ingest$
|
|
3186
|
+
const key = keyBuilderFromType$3(luvio, body);
|
|
3187
|
+
luvio.storeIngest(key, ingest$9, body);
|
|
3188
3188
|
const snapshot = luvio.storeLookup({
|
|
3189
3189
|
recordId: key,
|
|
3190
|
-
node: select$
|
|
3190
|
+
node: select$l(),
|
|
3191
3191
|
variables: {},
|
|
3192
3192
|
});
|
|
3193
3193
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3197,7 +3197,7 @@ function ingestSuccess$a(luvio, resourceParams, response) {
|
|
|
3197
3197
|
}
|
|
3198
3198
|
return snapshot;
|
|
3199
3199
|
}
|
|
3200
|
-
function createResourceRequest$
|
|
3200
|
+
function createResourceRequest$c(config) {
|
|
3201
3201
|
const headers = {};
|
|
3202
3202
|
return {
|
|
3203
3203
|
baseUri: '/services/data/v58.0',
|
|
@@ -3218,7 +3218,7 @@ const replaceManagedContentVariant_ConfigPropertyNames = {
|
|
|
3218
3218
|
optional: []
|
|
3219
3219
|
}
|
|
3220
3220
|
};
|
|
3221
|
-
function createResourceParams$
|
|
3221
|
+
function createResourceParams$c(config) {
|
|
3222
3222
|
const resourceParams = {
|
|
3223
3223
|
urlParams: {
|
|
3224
3224
|
variantId: config.variantId
|
|
@@ -3229,7 +3229,7 @@ function createResourceParams$a(config) {
|
|
|
3229
3229
|
};
|
|
3230
3230
|
return resourceParams;
|
|
3231
3231
|
}
|
|
3232
|
-
function typeCheckConfig$
|
|
3232
|
+
function typeCheckConfig$c(untrustedConfig) {
|
|
3233
3233
|
const config = {};
|
|
3234
3234
|
const untrustedConfig_variantId = untrustedConfig.variantId;
|
|
3235
3235
|
if (typeof untrustedConfig_variantId === 'string') {
|
|
@@ -3242,28 +3242,28 @@ function typeCheckConfig$a(untrustedConfig) {
|
|
|
3242
3242
|
}
|
|
3243
3243
|
return config;
|
|
3244
3244
|
}
|
|
3245
|
-
function validateAdapterConfig$
|
|
3245
|
+
function validateAdapterConfig$c(untrustedConfig, configPropertyNames) {
|
|
3246
3246
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3247
3247
|
return null;
|
|
3248
3248
|
}
|
|
3249
3249
|
if (process.env.NODE_ENV !== 'production') {
|
|
3250
3250
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3251
3251
|
}
|
|
3252
|
-
const config = typeCheckConfig$
|
|
3252
|
+
const config = typeCheckConfig$c(untrustedConfig);
|
|
3253
3253
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3254
3254
|
return null;
|
|
3255
3255
|
}
|
|
3256
3256
|
return config;
|
|
3257
3257
|
}
|
|
3258
|
-
function buildNetworkSnapshot$
|
|
3259
|
-
const resourceParams = createResourceParams$
|
|
3260
|
-
const request = createResourceRequest$
|
|
3258
|
+
function buildNetworkSnapshot$c(luvio, config, options) {
|
|
3259
|
+
const resourceParams = createResourceParams$c(config);
|
|
3260
|
+
const request = createResourceRequest$c(resourceParams);
|
|
3261
3261
|
return luvio.dispatchResourceRequest(request, options)
|
|
3262
3262
|
.then((response) => {
|
|
3263
3263
|
return luvio.handleSuccessResponse(() => {
|
|
3264
|
-
const snapshot = ingestSuccess$
|
|
3264
|
+
const snapshot = ingestSuccess$c(luvio, resourceParams, response);
|
|
3265
3265
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3266
|
-
}, () => getResponseCacheKeys$
|
|
3266
|
+
}, () => getResponseCacheKeys$c(luvio, resourceParams, response.body));
|
|
3267
3267
|
}, (response) => {
|
|
3268
3268
|
deepFreeze$u(response);
|
|
3269
3269
|
throw response;
|
|
@@ -3271,12 +3271,12 @@ function buildNetworkSnapshot$a(luvio, config, options) {
|
|
|
3271
3271
|
}
|
|
3272
3272
|
const replaceManagedContentVariantAdapterFactory = (luvio) => {
|
|
3273
3273
|
return function replaceManagedContentVariant(untrustedConfig) {
|
|
3274
|
-
const config = validateAdapterConfig$
|
|
3274
|
+
const config = validateAdapterConfig$c(untrustedConfig, replaceManagedContentVariant_ConfigPropertyNames);
|
|
3275
3275
|
// Invalid or incomplete config
|
|
3276
3276
|
if (config === null) {
|
|
3277
3277
|
throw new Error('Invalid config for "replaceManagedContentVariant"');
|
|
3278
3278
|
}
|
|
3279
|
-
return buildNetworkSnapshot$
|
|
3279
|
+
return buildNetworkSnapshot$c(luvio, config);
|
|
3280
3280
|
};
|
|
3281
3281
|
};
|
|
3282
3282
|
|
|
@@ -3347,8 +3347,8 @@ function deepFreeze$e(input) {
|
|
|
3347
3347
|
ObjectFreeze(input);
|
|
3348
3348
|
}
|
|
3349
3349
|
|
|
3350
|
-
const TTL$
|
|
3351
|
-
const VERSION$
|
|
3350
|
+
const TTL$8 = 100;
|
|
3351
|
+
const VERSION$8 = "993f4fe3a5b12699f037079dbe30610b";
|
|
3352
3352
|
function validate$f(obj, path = 'ManagedContentVariantVersionCollectionRepresentation') {
|
|
3353
3353
|
const v_error = (() => {
|
|
3354
3354
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -3389,28 +3389,28 @@ function validate$f(obj, path = 'ManagedContentVariantVersionCollectionRepresent
|
|
|
3389
3389
|
})();
|
|
3390
3390
|
return v_error === undefined ? null : v_error;
|
|
3391
3391
|
}
|
|
3392
|
-
const RepresentationType$
|
|
3393
|
-
function keyBuilder$
|
|
3394
|
-
return keyPrefix + '::' + RepresentationType$
|
|
3392
|
+
const RepresentationType$8 = 'ManagedContentVariantVersionCollectionRepresentation';
|
|
3393
|
+
function keyBuilder$k(luvio, config) {
|
|
3394
|
+
return keyPrefix + '::' + RepresentationType$8 + ':' + config.variantId;
|
|
3395
3395
|
}
|
|
3396
|
-
function keyBuilderFromType$
|
|
3396
|
+
function keyBuilderFromType$2(luvio, object) {
|
|
3397
3397
|
const keyParams = {
|
|
3398
3398
|
variantId: object.managedContentVariantId
|
|
3399
3399
|
};
|
|
3400
|
-
return keyBuilder$
|
|
3400
|
+
return keyBuilder$k(luvio, keyParams);
|
|
3401
3401
|
}
|
|
3402
|
-
function normalize$
|
|
3402
|
+
function normalize$8(input, existing, path, luvio, store, timestamp) {
|
|
3403
3403
|
return input;
|
|
3404
3404
|
}
|
|
3405
|
-
const select$
|
|
3405
|
+
const select$k = function ManagedContentVariantVersionCollectionRepresentationSelect() {
|
|
3406
3406
|
return {
|
|
3407
3407
|
kind: 'Fragment',
|
|
3408
|
-
version: VERSION$
|
|
3408
|
+
version: VERSION$8,
|
|
3409
3409
|
private: [],
|
|
3410
3410
|
opaque: true
|
|
3411
3411
|
};
|
|
3412
3412
|
};
|
|
3413
|
-
function equals$
|
|
3413
|
+
function equals$8(existing, incoming) {
|
|
3414
3414
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
3415
3415
|
return false;
|
|
3416
3416
|
}
|
|
@@ -3425,67 +3425,67 @@ function deepFreeze$d(input) {
|
|
|
3425
3425
|
ObjectFreeze(input_versions);
|
|
3426
3426
|
ObjectFreeze(input);
|
|
3427
3427
|
}
|
|
3428
|
-
const ingest$
|
|
3428
|
+
const ingest$8 = function ManagedContentVariantVersionCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3429
3429
|
if (process.env.NODE_ENV !== 'production') {
|
|
3430
3430
|
const validateError = validate$f(input);
|
|
3431
3431
|
if (validateError !== null) {
|
|
3432
3432
|
throw validateError;
|
|
3433
3433
|
}
|
|
3434
3434
|
}
|
|
3435
|
-
const key = keyBuilderFromType$
|
|
3435
|
+
const key = keyBuilderFromType$2(luvio, input);
|
|
3436
3436
|
const existingRecord = store.readEntry(key);
|
|
3437
|
-
const ttlToUse = TTL$
|
|
3438
|
-
let incomingRecord = normalize$
|
|
3437
|
+
const ttlToUse = TTL$8;
|
|
3438
|
+
let incomingRecord = normalize$8(input, store.readEntry(key), {
|
|
3439
3439
|
fullPath: key,
|
|
3440
3440
|
parent: path.parent,
|
|
3441
3441
|
propertyName: path.propertyName,
|
|
3442
3442
|
ttl: ttlToUse
|
|
3443
3443
|
});
|
|
3444
3444
|
deepFreeze$d(input);
|
|
3445
|
-
if (existingRecord === undefined || equals$
|
|
3445
|
+
if (existingRecord === undefined || equals$8(existingRecord, incomingRecord) === false) {
|
|
3446
3446
|
luvio.storePublish(key, incomingRecord);
|
|
3447
3447
|
}
|
|
3448
3448
|
{
|
|
3449
3449
|
const storeMetadataParams = {
|
|
3450
3450
|
ttl: ttlToUse,
|
|
3451
3451
|
namespace: "CMSAuthoring",
|
|
3452
|
-
version: VERSION$
|
|
3453
|
-
representationName: RepresentationType$
|
|
3452
|
+
version: VERSION$8,
|
|
3453
|
+
representationName: RepresentationType$8,
|
|
3454
3454
|
};
|
|
3455
3455
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
3456
3456
|
}
|
|
3457
3457
|
return createLink(key);
|
|
3458
3458
|
};
|
|
3459
|
-
function getTypeCacheKeys$
|
|
3459
|
+
function getTypeCacheKeys$8(luvio, input, fullPathFactory) {
|
|
3460
3460
|
const rootKeySet = new StoreKeyMap();
|
|
3461
3461
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3462
|
-
const rootKey = keyBuilderFromType$
|
|
3462
|
+
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
3463
3463
|
rootKeySet.set(rootKey, {
|
|
3464
3464
|
namespace: keyPrefix,
|
|
3465
|
-
representationName: RepresentationType$
|
|
3465
|
+
representationName: RepresentationType$8,
|
|
3466
3466
|
mergeable: false
|
|
3467
3467
|
});
|
|
3468
3468
|
return rootKeySet;
|
|
3469
3469
|
}
|
|
3470
3470
|
|
|
3471
|
-
function select$
|
|
3472
|
-
return select$
|
|
3471
|
+
function select$j(luvio, params) {
|
|
3472
|
+
return select$k();
|
|
3473
3473
|
}
|
|
3474
|
-
function keyBuilder$
|
|
3475
|
-
return keyBuilder$
|
|
3474
|
+
function keyBuilder$j(luvio, params) {
|
|
3475
|
+
return keyBuilder$k(luvio, {
|
|
3476
3476
|
variantId: params.urlParams.variantId
|
|
3477
3477
|
});
|
|
3478
3478
|
}
|
|
3479
|
-
function getResponseCacheKeys$
|
|
3480
|
-
return getTypeCacheKeys$
|
|
3479
|
+
function getResponseCacheKeys$b(luvio, resourceParams, response) {
|
|
3480
|
+
return getTypeCacheKeys$8(luvio, response);
|
|
3481
3481
|
}
|
|
3482
|
-
function ingestSuccess$
|
|
3482
|
+
function ingestSuccess$b(luvio, resourceParams, response, snapshotRefresh) {
|
|
3483
3483
|
const { body } = response;
|
|
3484
|
-
const key = keyBuilder$
|
|
3485
|
-
luvio.storeIngest(key, ingest$
|
|
3484
|
+
const key = keyBuilder$j(luvio, resourceParams);
|
|
3485
|
+
luvio.storeIngest(key, ingest$8, body);
|
|
3486
3486
|
const snapshot = luvio.storeLookup({
|
|
3487
3487
|
recordId: key,
|
|
3488
|
-
node: select$
|
|
3488
|
+
node: select$j(),
|
|
3489
3489
|
variables: {},
|
|
3490
3490
|
}, snapshotRefresh);
|
|
3491
3491
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3495,19 +3495,19 @@ function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
3495
3495
|
}
|
|
3496
3496
|
return snapshot;
|
|
3497
3497
|
}
|
|
3498
|
-
function ingestError$
|
|
3499
|
-
const key = keyBuilder$
|
|
3498
|
+
function ingestError$8(luvio, params, error, snapshotRefresh) {
|
|
3499
|
+
const key = keyBuilder$j(luvio, params);
|
|
3500
3500
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3501
3501
|
const storeMetadataParams = {
|
|
3502
|
-
ttl: TTL$
|
|
3502
|
+
ttl: TTL$8,
|
|
3503
3503
|
namespace: keyPrefix,
|
|
3504
|
-
version: VERSION$
|
|
3505
|
-
representationName: RepresentationType$
|
|
3504
|
+
version: VERSION$8,
|
|
3505
|
+
representationName: RepresentationType$8
|
|
3506
3506
|
};
|
|
3507
3507
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3508
3508
|
return errorSnapshot;
|
|
3509
3509
|
}
|
|
3510
|
-
function createResourceRequest$
|
|
3510
|
+
function createResourceRequest$b(config) {
|
|
3511
3511
|
const headers = {};
|
|
3512
3512
|
return {
|
|
3513
3513
|
baseUri: '/services/data/v58.0',
|
|
@@ -3528,7 +3528,7 @@ const getManagedContentVariantVersions_ConfigPropertyNames = {
|
|
|
3528
3528
|
optional: ['page', 'pageSize', 'status']
|
|
3529
3529
|
}
|
|
3530
3530
|
};
|
|
3531
|
-
function createResourceParams$
|
|
3531
|
+
function createResourceParams$b(config) {
|
|
3532
3532
|
const resourceParams = {
|
|
3533
3533
|
urlParams: {
|
|
3534
3534
|
variantId: config.variantId
|
|
@@ -3539,11 +3539,11 @@ function createResourceParams$9(config) {
|
|
|
3539
3539
|
};
|
|
3540
3540
|
return resourceParams;
|
|
3541
3541
|
}
|
|
3542
|
-
function keyBuilder$
|
|
3543
|
-
const resourceParams = createResourceParams$
|
|
3544
|
-
return keyBuilder$
|
|
3542
|
+
function keyBuilder$i(luvio, config) {
|
|
3543
|
+
const resourceParams = createResourceParams$b(config);
|
|
3544
|
+
return keyBuilder$j(luvio, resourceParams);
|
|
3545
3545
|
}
|
|
3546
|
-
function typeCheckConfig$
|
|
3546
|
+
function typeCheckConfig$b(untrustedConfig) {
|
|
3547
3547
|
const config = {};
|
|
3548
3548
|
const untrustedConfig_variantId = untrustedConfig.variantId;
|
|
3549
3549
|
if (typeof untrustedConfig_variantId === 'string') {
|
|
@@ -3570,48 +3570,48 @@ function typeCheckConfig$9(untrustedConfig) {
|
|
|
3570
3570
|
}
|
|
3571
3571
|
return config;
|
|
3572
3572
|
}
|
|
3573
|
-
function validateAdapterConfig$
|
|
3573
|
+
function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
|
|
3574
3574
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3575
3575
|
return null;
|
|
3576
3576
|
}
|
|
3577
3577
|
if (process.env.NODE_ENV !== 'production') {
|
|
3578
3578
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3579
3579
|
}
|
|
3580
|
-
const config = typeCheckConfig$
|
|
3580
|
+
const config = typeCheckConfig$b(untrustedConfig);
|
|
3581
3581
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3582
3582
|
return null;
|
|
3583
3583
|
}
|
|
3584
3584
|
return config;
|
|
3585
3585
|
}
|
|
3586
|
-
function adapterFragment$
|
|
3587
|
-
createResourceParams$
|
|
3588
|
-
return select$
|
|
3586
|
+
function adapterFragment$8(luvio, config) {
|
|
3587
|
+
createResourceParams$b(config);
|
|
3588
|
+
return select$j();
|
|
3589
3589
|
}
|
|
3590
|
-
function onFetchResponseSuccess$
|
|
3591
|
-
const snapshot = ingestSuccess$
|
|
3590
|
+
function onFetchResponseSuccess$9(luvio, config, resourceParams, response) {
|
|
3591
|
+
const snapshot = ingestSuccess$b(luvio, resourceParams, response, {
|
|
3592
3592
|
config,
|
|
3593
|
-
resolve: () => buildNetworkSnapshot$
|
|
3593
|
+
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
3594
3594
|
});
|
|
3595
3595
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3596
3596
|
}
|
|
3597
|
-
function onFetchResponseError$
|
|
3598
|
-
const snapshot = ingestError$
|
|
3597
|
+
function onFetchResponseError$8(luvio, config, resourceParams, response) {
|
|
3598
|
+
const snapshot = ingestError$8(luvio, resourceParams, response, {
|
|
3599
3599
|
config,
|
|
3600
|
-
resolve: () => buildNetworkSnapshot$
|
|
3600
|
+
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
3601
3601
|
});
|
|
3602
3602
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3603
3603
|
}
|
|
3604
|
-
function buildNetworkSnapshot$
|
|
3605
|
-
const resourceParams = createResourceParams$
|
|
3606
|
-
const request = createResourceRequest$
|
|
3604
|
+
function buildNetworkSnapshot$b(luvio, config, options) {
|
|
3605
|
+
const resourceParams = createResourceParams$b(config);
|
|
3606
|
+
const request = createResourceRequest$b(resourceParams);
|
|
3607
3607
|
return luvio.dispatchResourceRequest(request, options)
|
|
3608
3608
|
.then((response) => {
|
|
3609
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
3609
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$9(luvio, config, resourceParams, response), () => getResponseCacheKeys$b(luvio, resourceParams, response.body));
|
|
3610
3610
|
}, (response) => {
|
|
3611
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
3611
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$8(luvio, config, resourceParams, response));
|
|
3612
3612
|
});
|
|
3613
3613
|
}
|
|
3614
|
-
function buildNetworkSnapshotCachePolicy$
|
|
3614
|
+
function buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext) {
|
|
3615
3615
|
const { luvio, config } = context;
|
|
3616
3616
|
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
3617
3617
|
const dispatchOptions = {
|
|
@@ -3626,51 +3626,51 @@ function buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext
|
|
|
3626
3626
|
priority: networkPriority
|
|
3627
3627
|
};
|
|
3628
3628
|
}
|
|
3629
|
-
return buildNetworkSnapshot$
|
|
3629
|
+
return buildNetworkSnapshot$b(luvio, config, dispatchOptions);
|
|
3630
3630
|
}
|
|
3631
|
-
function buildCachedSnapshotCachePolicy$
|
|
3631
|
+
function buildCachedSnapshotCachePolicy$8(context, storeLookup) {
|
|
3632
3632
|
const { luvio, config } = context;
|
|
3633
3633
|
const selector = {
|
|
3634
|
-
recordId: keyBuilder$
|
|
3635
|
-
node: adapterFragment$
|
|
3634
|
+
recordId: keyBuilder$i(luvio, config),
|
|
3635
|
+
node: adapterFragment$8(luvio, config),
|
|
3636
3636
|
variables: {},
|
|
3637
3637
|
};
|
|
3638
3638
|
const cacheSnapshot = storeLookup(selector, {
|
|
3639
3639
|
config,
|
|
3640
|
-
resolve: () => buildNetworkSnapshot$
|
|
3640
|
+
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
3641
3641
|
});
|
|
3642
3642
|
return cacheSnapshot;
|
|
3643
3643
|
}
|
|
3644
3644
|
const getManagedContentVariantVersionsAdapterFactory = (luvio) => function CMSAuthoring__getManagedContentVariantVersions(untrustedConfig, requestContext) {
|
|
3645
|
-
const config = validateAdapterConfig$
|
|
3645
|
+
const config = validateAdapterConfig$b(untrustedConfig, getManagedContentVariantVersions_ConfigPropertyNames);
|
|
3646
3646
|
// Invalid or incomplete config
|
|
3647
3647
|
if (config === null) {
|
|
3648
3648
|
return null;
|
|
3649
3649
|
}
|
|
3650
3650
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3651
|
-
buildCachedSnapshotCachePolicy$
|
|
3651
|
+
buildCachedSnapshotCachePolicy$8, buildNetworkSnapshotCachePolicy$8);
|
|
3652
3652
|
};
|
|
3653
3653
|
|
|
3654
|
-
function select$
|
|
3655
|
-
return select$
|
|
3654
|
+
function select$i(luvio, params) {
|
|
3655
|
+
return select$u();
|
|
3656
3656
|
}
|
|
3657
|
-
function keyBuilder$
|
|
3658
|
-
return keyBuilder$
|
|
3657
|
+
function keyBuilder$h(luvio, params) {
|
|
3658
|
+
return keyBuilder$r(luvio, {
|
|
3659
3659
|
content_key: params.urlParams.contentKeyOrId,
|
|
3660
3660
|
language: params.queryParams.language || '',
|
|
3661
3661
|
version: params.queryParams.version || ''
|
|
3662
3662
|
});
|
|
3663
3663
|
}
|
|
3664
|
-
function getResponseCacheKeys$
|
|
3665
|
-
return getTypeCacheKeys$
|
|
3664
|
+
function getResponseCacheKeys$a(luvio, resourceParams, response) {
|
|
3665
|
+
return getTypeCacheKeys$c(luvio, response);
|
|
3666
3666
|
}
|
|
3667
|
-
function ingestSuccess$
|
|
3667
|
+
function ingestSuccess$a(luvio, resourceParams, response, snapshotRefresh) {
|
|
3668
3668
|
const { body } = response;
|
|
3669
|
-
const key = keyBuilder$
|
|
3670
|
-
luvio.storeIngest(key, ingest$
|
|
3669
|
+
const key = keyBuilder$h(luvio, resourceParams);
|
|
3670
|
+
luvio.storeIngest(key, ingest$c, body);
|
|
3671
3671
|
const snapshot = luvio.storeLookup({
|
|
3672
3672
|
recordId: key,
|
|
3673
|
-
node: select$
|
|
3673
|
+
node: select$i(),
|
|
3674
3674
|
variables: {},
|
|
3675
3675
|
}, snapshotRefresh);
|
|
3676
3676
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3680,19 +3680,19 @@ function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
3680
3680
|
}
|
|
3681
3681
|
return snapshot;
|
|
3682
3682
|
}
|
|
3683
|
-
function ingestError$
|
|
3684
|
-
const key = keyBuilder$
|
|
3683
|
+
function ingestError$7(luvio, params, error, snapshotRefresh) {
|
|
3684
|
+
const key = keyBuilder$h(luvio, params);
|
|
3685
3685
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3686
3686
|
const storeMetadataParams = {
|
|
3687
|
-
ttl: TTL$
|
|
3687
|
+
ttl: TTL$c,
|
|
3688
3688
|
namespace: keyPrefix,
|
|
3689
|
-
version: VERSION$
|
|
3690
|
-
representationName: RepresentationType$
|
|
3689
|
+
version: VERSION$c,
|
|
3690
|
+
representationName: RepresentationType$c
|
|
3691
3691
|
};
|
|
3692
3692
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3693
3693
|
return errorSnapshot;
|
|
3694
3694
|
}
|
|
3695
|
-
function createResourceRequest$
|
|
3695
|
+
function createResourceRequest$a(config) {
|
|
3696
3696
|
const headers = {};
|
|
3697
3697
|
return {
|
|
3698
3698
|
baseUri: '/services/data/v58.0',
|
|
@@ -3706,7 +3706,7 @@ function createResourceRequest$8(config) {
|
|
|
3706
3706
|
};
|
|
3707
3707
|
}
|
|
3708
3708
|
|
|
3709
|
-
function onFetchResponseSuccess$
|
|
3709
|
+
function onFetchResponseSuccess$8(luvio, config, resourceParams, response) {
|
|
3710
3710
|
var _a;
|
|
3711
3711
|
// Version can come either from versionNumber field in case of v2 content,
|
|
3712
3712
|
// or managedContentVersionId field in case of v1 content.
|
|
@@ -3755,7 +3755,7 @@ function onFetchResponseSuccess$7(luvio, config, resourceParams, response) {
|
|
|
3755
3755
|
// since this resource params are used to build a cache key to verify that
|
|
3756
3756
|
// data was ingested into cache.
|
|
3757
3757
|
(_a = resourceParams.queryParams).version || (_a.version = response.body.version);
|
|
3758
|
-
return onFetchResponseSuccess$
|
|
3758
|
+
return onFetchResponseSuccess$7(luvio, config, resourceParams, response);
|
|
3759
3759
|
}
|
|
3760
3760
|
|
|
3761
3761
|
const getManagedContent_ConfigPropertyNames = {
|
|
@@ -3765,7 +3765,7 @@ const getManagedContent_ConfigPropertyNames = {
|
|
|
3765
3765
|
optional: ['language', 'version']
|
|
3766
3766
|
}
|
|
3767
3767
|
};
|
|
3768
|
-
function createResourceParams$
|
|
3768
|
+
function createResourceParams$a(config) {
|
|
3769
3769
|
const resourceParams = {
|
|
3770
3770
|
urlParams: {
|
|
3771
3771
|
contentKeyOrId: config.contentKeyOrId
|
|
@@ -3776,11 +3776,11 @@ function createResourceParams$8(config) {
|
|
|
3776
3776
|
};
|
|
3777
3777
|
return resourceParams;
|
|
3778
3778
|
}
|
|
3779
|
-
function keyBuilder$
|
|
3780
|
-
const resourceParams = createResourceParams$
|
|
3781
|
-
return keyBuilder$
|
|
3779
|
+
function keyBuilder$g(luvio, config) {
|
|
3780
|
+
const resourceParams = createResourceParams$a(config);
|
|
3781
|
+
return keyBuilder$h(luvio, resourceParams);
|
|
3782
3782
|
}
|
|
3783
|
-
function typeCheckConfig$
|
|
3783
|
+
function typeCheckConfig$a(untrustedConfig) {
|
|
3784
3784
|
const config = {};
|
|
3785
3785
|
const untrustedConfig_contentKeyOrId = untrustedConfig.contentKeyOrId;
|
|
3786
3786
|
if (typeof untrustedConfig_contentKeyOrId === 'string') {
|
|
@@ -3796,48 +3796,48 @@ function typeCheckConfig$8(untrustedConfig) {
|
|
|
3796
3796
|
}
|
|
3797
3797
|
return config;
|
|
3798
3798
|
}
|
|
3799
|
-
function validateAdapterConfig$
|
|
3799
|
+
function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
|
|
3800
3800
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3801
3801
|
return null;
|
|
3802
3802
|
}
|
|
3803
3803
|
if (process.env.NODE_ENV !== 'production') {
|
|
3804
3804
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3805
3805
|
}
|
|
3806
|
-
const config = typeCheckConfig$
|
|
3806
|
+
const config = typeCheckConfig$a(untrustedConfig);
|
|
3807
3807
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3808
3808
|
return null;
|
|
3809
3809
|
}
|
|
3810
3810
|
return config;
|
|
3811
3811
|
}
|
|
3812
|
-
function adapterFragment$
|
|
3813
|
-
createResourceParams$
|
|
3814
|
-
return select$
|
|
3812
|
+
function adapterFragment$7(luvio, config) {
|
|
3813
|
+
createResourceParams$a(config);
|
|
3814
|
+
return select$i();
|
|
3815
3815
|
}
|
|
3816
|
-
function onFetchResponseSuccess$
|
|
3817
|
-
const snapshot = ingestSuccess$
|
|
3816
|
+
function onFetchResponseSuccess$7(luvio, config, resourceParams, response) {
|
|
3817
|
+
const snapshot = ingestSuccess$a(luvio, resourceParams, response, {
|
|
3818
3818
|
config,
|
|
3819
|
-
resolve: () => buildNetworkSnapshot$
|
|
3819
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
3820
3820
|
});
|
|
3821
3821
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3822
3822
|
}
|
|
3823
|
-
function onFetchResponseError$
|
|
3824
|
-
const snapshot = ingestError$
|
|
3823
|
+
function onFetchResponseError$7(luvio, config, resourceParams, response) {
|
|
3824
|
+
const snapshot = ingestError$7(luvio, resourceParams, response, {
|
|
3825
3825
|
config,
|
|
3826
|
-
resolve: () => buildNetworkSnapshot$
|
|
3826
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
3827
3827
|
});
|
|
3828
3828
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3829
3829
|
}
|
|
3830
|
-
function buildNetworkSnapshot$
|
|
3831
|
-
const resourceParams = createResourceParams$
|
|
3832
|
-
const request = createResourceRequest$
|
|
3830
|
+
function buildNetworkSnapshot$a(luvio, config, options) {
|
|
3831
|
+
const resourceParams = createResourceParams$a(config);
|
|
3832
|
+
const request = createResourceRequest$a(resourceParams);
|
|
3833
3833
|
return luvio.dispatchResourceRequest(request, options)
|
|
3834
3834
|
.then((response) => {
|
|
3835
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
3835
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$8(luvio, config, resourceParams, response), () => getResponseCacheKeys$a(luvio, resourceParams, response.body));
|
|
3836
3836
|
}, (response) => {
|
|
3837
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
3837
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$7(luvio, config, resourceParams, response));
|
|
3838
3838
|
});
|
|
3839
3839
|
}
|
|
3840
|
-
function buildNetworkSnapshotCachePolicy$
|
|
3840
|
+
function buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext) {
|
|
3841
3841
|
const { luvio, config } = context;
|
|
3842
3842
|
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
3843
3843
|
const dispatchOptions = {
|
|
@@ -3852,33 +3852,33 @@ function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext
|
|
|
3852
3852
|
priority: networkPriority
|
|
3853
3853
|
};
|
|
3854
3854
|
}
|
|
3855
|
-
return buildNetworkSnapshot$
|
|
3855
|
+
return buildNetworkSnapshot$a(luvio, config, dispatchOptions);
|
|
3856
3856
|
}
|
|
3857
|
-
function buildCachedSnapshotCachePolicy$
|
|
3857
|
+
function buildCachedSnapshotCachePolicy$7(context, storeLookup) {
|
|
3858
3858
|
const { luvio, config } = context;
|
|
3859
3859
|
const selector = {
|
|
3860
|
-
recordId: keyBuilder$
|
|
3861
|
-
node: adapterFragment$
|
|
3860
|
+
recordId: keyBuilder$g(luvio, config),
|
|
3861
|
+
node: adapterFragment$7(luvio, config),
|
|
3862
3862
|
variables: {},
|
|
3863
3863
|
};
|
|
3864
3864
|
const cacheSnapshot = storeLookup(selector, {
|
|
3865
3865
|
config,
|
|
3866
|
-
resolve: () => buildNetworkSnapshot$
|
|
3866
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
3867
3867
|
});
|
|
3868
3868
|
return cacheSnapshot;
|
|
3869
3869
|
}
|
|
3870
3870
|
const getManagedContentAdapterFactory = (luvio) => function CMSAuthoring__getManagedContent(untrustedConfig, requestContext) {
|
|
3871
|
-
const config = validateAdapterConfig$
|
|
3871
|
+
const config = validateAdapterConfig$a(untrustedConfig, getManagedContent_ConfigPropertyNames);
|
|
3872
3872
|
// Invalid or incomplete config
|
|
3873
3873
|
if (config === null) {
|
|
3874
3874
|
return null;
|
|
3875
3875
|
}
|
|
3876
3876
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3877
|
-
buildCachedSnapshotCachePolicy$
|
|
3877
|
+
buildCachedSnapshotCachePolicy$7, buildNetworkSnapshotCachePolicy$7);
|
|
3878
3878
|
};
|
|
3879
3879
|
|
|
3880
|
-
const TTL$
|
|
3881
|
-
const VERSION$
|
|
3880
|
+
const TTL$7 = 1000;
|
|
3881
|
+
const VERSION$7 = "98edee4f058ced93570a7b0ce2293672";
|
|
3882
3882
|
function validate$e(obj, path = 'ManagedContentRenditionRepresentation') {
|
|
3883
3883
|
const v_error = (() => {
|
|
3884
3884
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -3930,19 +3930,19 @@ function validate$e(obj, path = 'ManagedContentRenditionRepresentation') {
|
|
|
3930
3930
|
})();
|
|
3931
3931
|
return v_error === undefined ? null : v_error;
|
|
3932
3932
|
}
|
|
3933
|
-
const RepresentationType$
|
|
3934
|
-
function normalize$
|
|
3933
|
+
const RepresentationType$7 = 'ManagedContentRenditionRepresentation';
|
|
3934
|
+
function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
3935
3935
|
return input;
|
|
3936
3936
|
}
|
|
3937
|
-
const select$
|
|
3937
|
+
const select$h = function ManagedContentRenditionRepresentationSelect() {
|
|
3938
3938
|
return {
|
|
3939
3939
|
kind: 'Fragment',
|
|
3940
|
-
version: VERSION$
|
|
3940
|
+
version: VERSION$7,
|
|
3941
3941
|
private: [],
|
|
3942
3942
|
opaque: true
|
|
3943
3943
|
};
|
|
3944
3944
|
};
|
|
3945
|
-
function equals$
|
|
3945
|
+
function equals$7(existing, incoming) {
|
|
3946
3946
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
3947
3947
|
return false;
|
|
3948
3948
|
}
|
|
@@ -3969,7 +3969,7 @@ function deepFreeze$c(input) {
|
|
|
3969
3969
|
ObjectFreeze(input_renditionSchema);
|
|
3970
3970
|
ObjectFreeze(input);
|
|
3971
3971
|
}
|
|
3972
|
-
const ingest$
|
|
3972
|
+
const ingest$7 = function ManagedContentRenditionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3973
3973
|
if (process.env.NODE_ENV !== 'production') {
|
|
3974
3974
|
const validateError = validate$e(input);
|
|
3975
3975
|
if (validateError !== null) {
|
|
@@ -3978,56 +3978,56 @@ const ingest$6 = function ManagedContentRenditionRepresentationIngest(input, pat
|
|
|
3978
3978
|
}
|
|
3979
3979
|
const key = path.fullPath;
|
|
3980
3980
|
const existingRecord = store.readEntry(key);
|
|
3981
|
-
const ttlToUse = TTL$
|
|
3982
|
-
let incomingRecord = normalize$
|
|
3981
|
+
const ttlToUse = TTL$7;
|
|
3982
|
+
let incomingRecord = normalize$7(input, store.readEntry(key), {
|
|
3983
3983
|
fullPath: key,
|
|
3984
3984
|
parent: path.parent,
|
|
3985
3985
|
propertyName: path.propertyName,
|
|
3986
3986
|
ttl: ttlToUse
|
|
3987
3987
|
});
|
|
3988
3988
|
deepFreeze$c(input);
|
|
3989
|
-
if (existingRecord === undefined || equals$
|
|
3989
|
+
if (existingRecord === undefined || equals$7(existingRecord, incomingRecord) === false) {
|
|
3990
3990
|
luvio.storePublish(key, incomingRecord);
|
|
3991
3991
|
}
|
|
3992
3992
|
{
|
|
3993
3993
|
const storeMetadataParams = {
|
|
3994
3994
|
ttl: ttlToUse,
|
|
3995
3995
|
namespace: "CMSAuthoring",
|
|
3996
|
-
version: VERSION$
|
|
3997
|
-
representationName: RepresentationType$
|
|
3996
|
+
version: VERSION$7,
|
|
3997
|
+
representationName: RepresentationType$7,
|
|
3998
3998
|
};
|
|
3999
3999
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
4000
4000
|
}
|
|
4001
4001
|
return createLink(key);
|
|
4002
4002
|
};
|
|
4003
|
-
function getTypeCacheKeys$
|
|
4003
|
+
function getTypeCacheKeys$7(luvio, input, fullPathFactory) {
|
|
4004
4004
|
const rootKeySet = new StoreKeyMap();
|
|
4005
4005
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
4006
4006
|
const rootKey = fullPathFactory();
|
|
4007
4007
|
rootKeySet.set(rootKey, {
|
|
4008
4008
|
namespace: keyPrefix,
|
|
4009
|
-
representationName: RepresentationType$
|
|
4009
|
+
representationName: RepresentationType$7,
|
|
4010
4010
|
mergeable: false
|
|
4011
4011
|
});
|
|
4012
4012
|
return rootKeySet;
|
|
4013
4013
|
}
|
|
4014
4014
|
|
|
4015
|
-
function select$
|
|
4016
|
-
return select$
|
|
4015
|
+
function select$g(luvio, params) {
|
|
4016
|
+
return select$h();
|
|
4017
4017
|
}
|
|
4018
|
-
function keyBuilder$
|
|
4018
|
+
function keyBuilder$f(luvio, params) {
|
|
4019
4019
|
return keyPrefix + '::ManagedContentRenditionRepresentation:(' + 'channelIdOrApiName:' + params.queryParams.channelIdOrApiName + ',' + 'language:' + params.queryParams.language + ',' + 'version:' + params.queryParams.version + ',' + 'contentKeyOrId:' + params.urlParams.contentKeyOrId + ',' + 'renditionType:' + params.urlParams.renditionType + ')';
|
|
4020
4020
|
}
|
|
4021
|
-
function getResponseCacheKeys$
|
|
4022
|
-
return getTypeCacheKeys$
|
|
4021
|
+
function getResponseCacheKeys$9(luvio, resourceParams, response) {
|
|
4022
|
+
return getTypeCacheKeys$7(luvio, response, () => keyBuilder$f(luvio, resourceParams));
|
|
4023
4023
|
}
|
|
4024
|
-
function ingestSuccess$
|
|
4024
|
+
function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
|
|
4025
4025
|
const { body } = response;
|
|
4026
|
-
const key = keyBuilder$
|
|
4027
|
-
luvio.storeIngest(key, ingest$
|
|
4026
|
+
const key = keyBuilder$f(luvio, resourceParams);
|
|
4027
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
4028
4028
|
const snapshot = luvio.storeLookup({
|
|
4029
4029
|
recordId: key,
|
|
4030
|
-
node: select$
|
|
4030
|
+
node: select$g(),
|
|
4031
4031
|
variables: {},
|
|
4032
4032
|
}, snapshotRefresh);
|
|
4033
4033
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4037,19 +4037,19 @@ function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
4037
4037
|
}
|
|
4038
4038
|
return snapshot;
|
|
4039
4039
|
}
|
|
4040
|
-
function ingestError$
|
|
4041
|
-
const key = keyBuilder$
|
|
4040
|
+
function ingestError$6(luvio, params, error, snapshotRefresh) {
|
|
4041
|
+
const key = keyBuilder$f(luvio, params);
|
|
4042
4042
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
4043
4043
|
const storeMetadataParams = {
|
|
4044
|
-
ttl: TTL$
|
|
4044
|
+
ttl: TTL$7,
|
|
4045
4045
|
namespace: keyPrefix,
|
|
4046
|
-
version: VERSION$
|
|
4047
|
-
representationName: RepresentationType$
|
|
4046
|
+
version: VERSION$7,
|
|
4047
|
+
representationName: RepresentationType$7
|
|
4048
4048
|
};
|
|
4049
4049
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4050
4050
|
return errorSnapshot;
|
|
4051
4051
|
}
|
|
4052
|
-
function createResourceRequest$
|
|
4052
|
+
function createResourceRequest$9(config) {
|
|
4053
4053
|
const headers = {};
|
|
4054
4054
|
return {
|
|
4055
4055
|
baseUri: '/services/data/v58.0',
|
|
@@ -4070,7 +4070,7 @@ const getManagedContentVariantRendition_ConfigPropertyNames = {
|
|
|
4070
4070
|
optional: ['channelIdOrApiName', 'language', 'version']
|
|
4071
4071
|
}
|
|
4072
4072
|
};
|
|
4073
|
-
function createResourceParams$
|
|
4073
|
+
function createResourceParams$9(config) {
|
|
4074
4074
|
const resourceParams = {
|
|
4075
4075
|
urlParams: {
|
|
4076
4076
|
contentKeyOrId: config.contentKeyOrId, renditionType: config.renditionType
|
|
@@ -4081,11 +4081,11 @@ function createResourceParams$7(config) {
|
|
|
4081
4081
|
};
|
|
4082
4082
|
return resourceParams;
|
|
4083
4083
|
}
|
|
4084
|
-
function keyBuilder$
|
|
4085
|
-
const resourceParams = createResourceParams$
|
|
4086
|
-
return keyBuilder$
|
|
4084
|
+
function keyBuilder$e(luvio, config) {
|
|
4085
|
+
const resourceParams = createResourceParams$9(config);
|
|
4086
|
+
return keyBuilder$f(luvio, resourceParams);
|
|
4087
4087
|
}
|
|
4088
|
-
function typeCheckConfig$
|
|
4088
|
+
function typeCheckConfig$9(untrustedConfig) {
|
|
4089
4089
|
const config = {};
|
|
4090
4090
|
const untrustedConfig_contentKeyOrId = untrustedConfig.contentKeyOrId;
|
|
4091
4091
|
if (typeof untrustedConfig_contentKeyOrId === 'string') {
|
|
@@ -4109,48 +4109,48 @@ function typeCheckConfig$7(untrustedConfig) {
|
|
|
4109
4109
|
}
|
|
4110
4110
|
return config;
|
|
4111
4111
|
}
|
|
4112
|
-
function validateAdapterConfig$
|
|
4112
|
+
function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
|
|
4113
4113
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4114
4114
|
return null;
|
|
4115
4115
|
}
|
|
4116
4116
|
if (process.env.NODE_ENV !== 'production') {
|
|
4117
4117
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4118
4118
|
}
|
|
4119
|
-
const config = typeCheckConfig$
|
|
4119
|
+
const config = typeCheckConfig$9(untrustedConfig);
|
|
4120
4120
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4121
4121
|
return null;
|
|
4122
4122
|
}
|
|
4123
4123
|
return config;
|
|
4124
4124
|
}
|
|
4125
|
-
function adapterFragment$
|
|
4126
|
-
createResourceParams$
|
|
4127
|
-
return select$
|
|
4125
|
+
function adapterFragment$6(luvio, config) {
|
|
4126
|
+
createResourceParams$9(config);
|
|
4127
|
+
return select$g();
|
|
4128
4128
|
}
|
|
4129
|
-
function onFetchResponseSuccess$
|
|
4130
|
-
const snapshot = ingestSuccess$
|
|
4129
|
+
function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
|
|
4130
|
+
const snapshot = ingestSuccess$9(luvio, resourceParams, response, {
|
|
4131
4131
|
config,
|
|
4132
|
-
resolve: () => buildNetworkSnapshot$
|
|
4132
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
4133
4133
|
});
|
|
4134
4134
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4135
4135
|
}
|
|
4136
|
-
function onFetchResponseError$
|
|
4137
|
-
const snapshot = ingestError$
|
|
4136
|
+
function onFetchResponseError$6(luvio, config, resourceParams, response) {
|
|
4137
|
+
const snapshot = ingestError$6(luvio, resourceParams, response, {
|
|
4138
4138
|
config,
|
|
4139
|
-
resolve: () => buildNetworkSnapshot$
|
|
4139
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
4140
4140
|
});
|
|
4141
4141
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4142
4142
|
}
|
|
4143
|
-
function buildNetworkSnapshot$
|
|
4144
|
-
const resourceParams = createResourceParams$
|
|
4145
|
-
const request = createResourceRequest$
|
|
4143
|
+
function buildNetworkSnapshot$9(luvio, config, options) {
|
|
4144
|
+
const resourceParams = createResourceParams$9(config);
|
|
4145
|
+
const request = createResourceRequest$9(resourceParams);
|
|
4146
4146
|
return luvio.dispatchResourceRequest(request, options)
|
|
4147
4147
|
.then((response) => {
|
|
4148
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
4148
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => getResponseCacheKeys$9(luvio, resourceParams, response.body));
|
|
4149
4149
|
}, (response) => {
|
|
4150
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
4150
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$6(luvio, config, resourceParams, response));
|
|
4151
4151
|
});
|
|
4152
4152
|
}
|
|
4153
|
-
function buildNetworkSnapshotCachePolicy$
|
|
4153
|
+
function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext) {
|
|
4154
4154
|
const { luvio, config } = context;
|
|
4155
4155
|
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
4156
4156
|
const dispatchOptions = {
|
|
@@ -4165,29 +4165,29 @@ function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext
|
|
|
4165
4165
|
priority: networkPriority
|
|
4166
4166
|
};
|
|
4167
4167
|
}
|
|
4168
|
-
return buildNetworkSnapshot$
|
|
4168
|
+
return buildNetworkSnapshot$9(luvio, config, dispatchOptions);
|
|
4169
4169
|
}
|
|
4170
|
-
function buildCachedSnapshotCachePolicy$
|
|
4170
|
+
function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
|
|
4171
4171
|
const { luvio, config } = context;
|
|
4172
4172
|
const selector = {
|
|
4173
|
-
recordId: keyBuilder$
|
|
4174
|
-
node: adapterFragment$
|
|
4173
|
+
recordId: keyBuilder$e(luvio, config),
|
|
4174
|
+
node: adapterFragment$6(luvio, config),
|
|
4175
4175
|
variables: {},
|
|
4176
4176
|
};
|
|
4177
4177
|
const cacheSnapshot = storeLookup(selector, {
|
|
4178
4178
|
config,
|
|
4179
|
-
resolve: () => buildNetworkSnapshot$
|
|
4179
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
4180
4180
|
});
|
|
4181
4181
|
return cacheSnapshot;
|
|
4182
4182
|
}
|
|
4183
4183
|
const getManagedContentVariantRenditionAdapterFactory = (luvio) => function CMSAuthoring__getManagedContentVariantRendition(untrustedConfig, requestContext) {
|
|
4184
|
-
const config = validateAdapterConfig$
|
|
4184
|
+
const config = validateAdapterConfig$9(untrustedConfig, getManagedContentVariantRendition_ConfigPropertyNames);
|
|
4185
4185
|
// Invalid or incomplete config
|
|
4186
4186
|
if (config === null) {
|
|
4187
4187
|
return null;
|
|
4188
4188
|
}
|
|
4189
4189
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
4190
|
-
buildCachedSnapshotCachePolicy$
|
|
4190
|
+
buildCachedSnapshotCachePolicy$6, buildNetworkSnapshotCachePolicy$6);
|
|
4191
4191
|
};
|
|
4192
4192
|
|
|
4193
4193
|
function validate$d(obj, path = 'AbstractManagedContentReferencedByItemRepresentation') {
|
|
@@ -4262,8 +4262,8 @@ function deepFreeze$b(input) {
|
|
|
4262
4262
|
ObjectFreeze(input);
|
|
4263
4263
|
}
|
|
4264
4264
|
|
|
4265
|
-
const TTL$
|
|
4266
|
-
const VERSION$
|
|
4265
|
+
const TTL$6 = 100;
|
|
4266
|
+
const VERSION$6 = "c297f5edbe1b51eadd89e68f176520ba";
|
|
4267
4267
|
function validate$c(obj, path = 'ManagedContentReferencedByCollectionRepresentation') {
|
|
4268
4268
|
const v_error = (() => {
|
|
4269
4269
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -4323,19 +4323,19 @@ function validate$c(obj, path = 'ManagedContentReferencedByCollectionRepresentat
|
|
|
4323
4323
|
})();
|
|
4324
4324
|
return v_error === undefined ? null : v_error;
|
|
4325
4325
|
}
|
|
4326
|
-
const RepresentationType$
|
|
4327
|
-
function normalize$
|
|
4326
|
+
const RepresentationType$6 = 'ManagedContentReferencedByCollectionRepresentation';
|
|
4327
|
+
function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
4328
4328
|
return input;
|
|
4329
4329
|
}
|
|
4330
|
-
const select$
|
|
4330
|
+
const select$f = function ManagedContentReferencedByCollectionRepresentationSelect() {
|
|
4331
4331
|
return {
|
|
4332
4332
|
kind: 'Fragment',
|
|
4333
|
-
version: VERSION$
|
|
4333
|
+
version: VERSION$6,
|
|
4334
4334
|
private: [],
|
|
4335
4335
|
opaque: true
|
|
4336
4336
|
};
|
|
4337
4337
|
};
|
|
4338
|
-
function equals$
|
|
4338
|
+
function equals$6(existing, incoming) {
|
|
4339
4339
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
4340
4340
|
return false;
|
|
4341
4341
|
}
|
|
@@ -4350,7 +4350,7 @@ function deepFreeze$a(input) {
|
|
|
4350
4350
|
ObjectFreeze(input_referencedBy);
|
|
4351
4351
|
ObjectFreeze(input);
|
|
4352
4352
|
}
|
|
4353
|
-
const ingest$
|
|
4353
|
+
const ingest$6 = function ManagedContentReferencedByCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
4354
4354
|
if (process.env.NODE_ENV !== 'production') {
|
|
4355
4355
|
const validateError = validate$c(input);
|
|
4356
4356
|
if (validateError !== null) {
|
|
@@ -4359,56 +4359,56 @@ const ingest$5 = function ManagedContentReferencedByCollectionRepresentationInge
|
|
|
4359
4359
|
}
|
|
4360
4360
|
const key = path.fullPath;
|
|
4361
4361
|
const existingRecord = store.readEntry(key);
|
|
4362
|
-
const ttlToUse = TTL$
|
|
4363
|
-
let incomingRecord = normalize$
|
|
4362
|
+
const ttlToUse = TTL$6;
|
|
4363
|
+
let incomingRecord = normalize$6(input, store.readEntry(key), {
|
|
4364
4364
|
fullPath: key,
|
|
4365
4365
|
parent: path.parent,
|
|
4366
4366
|
propertyName: path.propertyName,
|
|
4367
4367
|
ttl: ttlToUse
|
|
4368
4368
|
});
|
|
4369
4369
|
deepFreeze$a(input);
|
|
4370
|
-
if (existingRecord === undefined || equals$
|
|
4370
|
+
if (existingRecord === undefined || equals$6(existingRecord, incomingRecord) === false) {
|
|
4371
4371
|
luvio.storePublish(key, incomingRecord);
|
|
4372
4372
|
}
|
|
4373
4373
|
{
|
|
4374
4374
|
const storeMetadataParams = {
|
|
4375
4375
|
ttl: ttlToUse,
|
|
4376
4376
|
namespace: "CMSAuthoring",
|
|
4377
|
-
version: VERSION$
|
|
4378
|
-
representationName: RepresentationType$
|
|
4377
|
+
version: VERSION$6,
|
|
4378
|
+
representationName: RepresentationType$6,
|
|
4379
4379
|
};
|
|
4380
4380
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
4381
4381
|
}
|
|
4382
4382
|
return createLink(key);
|
|
4383
4383
|
};
|
|
4384
|
-
function getTypeCacheKeys$
|
|
4384
|
+
function getTypeCacheKeys$6(luvio, input, fullPathFactory) {
|
|
4385
4385
|
const rootKeySet = new StoreKeyMap();
|
|
4386
4386
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
4387
4387
|
const rootKey = fullPathFactory();
|
|
4388
4388
|
rootKeySet.set(rootKey, {
|
|
4389
4389
|
namespace: keyPrefix,
|
|
4390
|
-
representationName: RepresentationType$
|
|
4390
|
+
representationName: RepresentationType$6,
|
|
4391
4391
|
mergeable: false
|
|
4392
4392
|
});
|
|
4393
4393
|
return rootKeySet;
|
|
4394
4394
|
}
|
|
4395
4395
|
|
|
4396
|
-
function select$
|
|
4397
|
-
return select$
|
|
4396
|
+
function select$e(luvio, params) {
|
|
4397
|
+
return select$f();
|
|
4398
4398
|
}
|
|
4399
|
-
function keyBuilder$
|
|
4399
|
+
function keyBuilder$d(luvio, params) {
|
|
4400
4400
|
return keyPrefix + '::ManagedContentReferencedByCollectionRepresentation:(' + 'includeReferenceDetails:' + params.queryParams.includeReferenceDetails + ',' + 'page:' + params.queryParams.page + ',' + 'pageSize:' + params.queryParams.pageSize + ',' + 'referenceType:' + params.queryParams.referenceType + ',' + 'contentKeyOrId:' + params.urlParams.contentKeyOrId + ')';
|
|
4401
4401
|
}
|
|
4402
|
-
function getResponseCacheKeys$
|
|
4403
|
-
return getTypeCacheKeys$
|
|
4402
|
+
function getResponseCacheKeys$8(luvio, resourceParams, response) {
|
|
4403
|
+
return getTypeCacheKeys$6(luvio, response, () => keyBuilder$d(luvio, resourceParams));
|
|
4404
4404
|
}
|
|
4405
|
-
function ingestSuccess$
|
|
4405
|
+
function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
|
|
4406
4406
|
const { body } = response;
|
|
4407
|
-
const key = keyBuilder$
|
|
4408
|
-
luvio.storeIngest(key, ingest$
|
|
4407
|
+
const key = keyBuilder$d(luvio, resourceParams);
|
|
4408
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
4409
4409
|
const snapshot = luvio.storeLookup({
|
|
4410
4410
|
recordId: key,
|
|
4411
|
-
node: select$
|
|
4411
|
+
node: select$e(),
|
|
4412
4412
|
variables: {},
|
|
4413
4413
|
}, snapshotRefresh);
|
|
4414
4414
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4418,19 +4418,19 @@ function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
4418
4418
|
}
|
|
4419
4419
|
return snapshot;
|
|
4420
4420
|
}
|
|
4421
|
-
function ingestError$
|
|
4422
|
-
const key = keyBuilder$
|
|
4421
|
+
function ingestError$5(luvio, params, error, snapshotRefresh) {
|
|
4422
|
+
const key = keyBuilder$d(luvio, params);
|
|
4423
4423
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
4424
4424
|
const storeMetadataParams = {
|
|
4425
|
-
ttl: TTL$
|
|
4425
|
+
ttl: TTL$6,
|
|
4426
4426
|
namespace: keyPrefix,
|
|
4427
|
-
version: VERSION$
|
|
4428
|
-
representationName: RepresentationType$
|
|
4427
|
+
version: VERSION$6,
|
|
4428
|
+
representationName: RepresentationType$6
|
|
4429
4429
|
};
|
|
4430
4430
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4431
4431
|
return errorSnapshot;
|
|
4432
4432
|
}
|
|
4433
|
-
function createResourceRequest$
|
|
4433
|
+
function createResourceRequest$8(config) {
|
|
4434
4434
|
const headers = {};
|
|
4435
4435
|
return {
|
|
4436
4436
|
baseUri: '/services/data/v58.0',
|
|
@@ -4451,7 +4451,7 @@ const getManagedContentReferencedBy_ConfigPropertyNames = {
|
|
|
4451
4451
|
optional: ['includeReferenceDetails', 'page', 'pageSize', 'referenceType']
|
|
4452
4452
|
}
|
|
4453
4453
|
};
|
|
4454
|
-
function createResourceParams$
|
|
4454
|
+
function createResourceParams$8(config) {
|
|
4455
4455
|
const resourceParams = {
|
|
4456
4456
|
urlParams: {
|
|
4457
4457
|
contentKeyOrId: config.contentKeyOrId
|
|
@@ -4462,11 +4462,11 @@ function createResourceParams$6(config) {
|
|
|
4462
4462
|
};
|
|
4463
4463
|
return resourceParams;
|
|
4464
4464
|
}
|
|
4465
|
-
function keyBuilder$
|
|
4466
|
-
const resourceParams = createResourceParams$
|
|
4467
|
-
return keyBuilder$
|
|
4465
|
+
function keyBuilder$c(luvio, config) {
|
|
4466
|
+
const resourceParams = createResourceParams$8(config);
|
|
4467
|
+
return keyBuilder$d(luvio, resourceParams);
|
|
4468
4468
|
}
|
|
4469
|
-
function typeCheckConfig$
|
|
4469
|
+
function typeCheckConfig$8(untrustedConfig) {
|
|
4470
4470
|
const config = {};
|
|
4471
4471
|
const untrustedConfig_contentKeyOrId = untrustedConfig.contentKeyOrId;
|
|
4472
4472
|
if (typeof untrustedConfig_contentKeyOrId === 'string') {
|
|
@@ -4490,48 +4490,48 @@ function typeCheckConfig$6(untrustedConfig) {
|
|
|
4490
4490
|
}
|
|
4491
4491
|
return config;
|
|
4492
4492
|
}
|
|
4493
|
-
function validateAdapterConfig$
|
|
4493
|
+
function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
|
|
4494
4494
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4495
4495
|
return null;
|
|
4496
4496
|
}
|
|
4497
4497
|
if (process.env.NODE_ENV !== 'production') {
|
|
4498
4498
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4499
4499
|
}
|
|
4500
|
-
const config = typeCheckConfig$
|
|
4500
|
+
const config = typeCheckConfig$8(untrustedConfig);
|
|
4501
4501
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4502
4502
|
return null;
|
|
4503
4503
|
}
|
|
4504
4504
|
return config;
|
|
4505
4505
|
}
|
|
4506
|
-
function adapterFragment$
|
|
4507
|
-
createResourceParams$
|
|
4508
|
-
return select$
|
|
4506
|
+
function adapterFragment$5(luvio, config) {
|
|
4507
|
+
createResourceParams$8(config);
|
|
4508
|
+
return select$e();
|
|
4509
4509
|
}
|
|
4510
|
-
function onFetchResponseSuccess$
|
|
4511
|
-
const snapshot = ingestSuccess$
|
|
4510
|
+
function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
|
|
4511
|
+
const snapshot = ingestSuccess$8(luvio, resourceParams, response, {
|
|
4512
4512
|
config,
|
|
4513
|
-
resolve: () => buildNetworkSnapshot$
|
|
4513
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
4514
4514
|
});
|
|
4515
4515
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4516
4516
|
}
|
|
4517
|
-
function onFetchResponseError$
|
|
4518
|
-
const snapshot = ingestError$
|
|
4517
|
+
function onFetchResponseError$5(luvio, config, resourceParams, response) {
|
|
4518
|
+
const snapshot = ingestError$5(luvio, resourceParams, response, {
|
|
4519
4519
|
config,
|
|
4520
|
-
resolve: () => buildNetworkSnapshot$
|
|
4520
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
4521
4521
|
});
|
|
4522
4522
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4523
4523
|
}
|
|
4524
|
-
function buildNetworkSnapshot$
|
|
4525
|
-
const resourceParams = createResourceParams$
|
|
4526
|
-
const request = createResourceRequest$
|
|
4524
|
+
function buildNetworkSnapshot$8(luvio, config, options) {
|
|
4525
|
+
const resourceParams = createResourceParams$8(config);
|
|
4526
|
+
const request = createResourceRequest$8(resourceParams);
|
|
4527
4527
|
return luvio.dispatchResourceRequest(request, options)
|
|
4528
4528
|
.then((response) => {
|
|
4529
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
4529
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => getResponseCacheKeys$8(luvio, resourceParams, response.body));
|
|
4530
4530
|
}, (response) => {
|
|
4531
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
4531
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$5(luvio, config, resourceParams, response));
|
|
4532
4532
|
});
|
|
4533
4533
|
}
|
|
4534
|
-
function buildNetworkSnapshotCachePolicy$
|
|
4534
|
+
function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
|
|
4535
4535
|
const { luvio, config } = context;
|
|
4536
4536
|
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
4537
4537
|
const dispatchOptions = {
|
|
@@ -4546,29 +4546,29 @@ function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext
|
|
|
4546
4546
|
priority: networkPriority
|
|
4547
4547
|
};
|
|
4548
4548
|
}
|
|
4549
|
-
return buildNetworkSnapshot$
|
|
4549
|
+
return buildNetworkSnapshot$8(luvio, config, dispatchOptions);
|
|
4550
4550
|
}
|
|
4551
|
-
function buildCachedSnapshotCachePolicy$
|
|
4551
|
+
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
4552
4552
|
const { luvio, config } = context;
|
|
4553
4553
|
const selector = {
|
|
4554
|
-
recordId: keyBuilder$
|
|
4555
|
-
node: adapterFragment$
|
|
4554
|
+
recordId: keyBuilder$c(luvio, config),
|
|
4555
|
+
node: adapterFragment$5(luvio, config),
|
|
4556
4556
|
variables: {},
|
|
4557
4557
|
};
|
|
4558
4558
|
const cacheSnapshot = storeLookup(selector, {
|
|
4559
4559
|
config,
|
|
4560
|
-
resolve: () => buildNetworkSnapshot$
|
|
4560
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
4561
4561
|
});
|
|
4562
4562
|
return cacheSnapshot;
|
|
4563
4563
|
}
|
|
4564
4564
|
const getManagedContentReferencedByAdapterFactory = (luvio) => function CMSAuthoring__getManagedContentReferencedBy(untrustedConfig, requestContext) {
|
|
4565
|
-
const config = validateAdapterConfig$
|
|
4565
|
+
const config = validateAdapterConfig$8(untrustedConfig, getManagedContentReferencedBy_ConfigPropertyNames);
|
|
4566
4566
|
// Invalid or incomplete config
|
|
4567
4567
|
if (config === null) {
|
|
4568
4568
|
return null;
|
|
4569
4569
|
}
|
|
4570
4570
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
4571
|
-
buildCachedSnapshotCachePolicy$
|
|
4571
|
+
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
|
|
4572
4572
|
};
|
|
4573
4573
|
|
|
4574
4574
|
function validate$b(obj, path = 'ManagedContentLanguageSummaryRepresentation') {
|
|
@@ -4690,8 +4690,8 @@ function deepFreeze$8(input) {
|
|
|
4690
4690
|
ObjectFreeze(input);
|
|
4691
4691
|
}
|
|
4692
4692
|
|
|
4693
|
-
const TTL$
|
|
4694
|
-
const VERSION$
|
|
4693
|
+
const TTL$5 = 100;
|
|
4694
|
+
const VERSION$5 = "944ebf1d8e72c74b2d0a208b3dfa8326";
|
|
4695
4695
|
function validate$9(obj, path = 'ManagedContentVariantReferencesCollectionRepresentation') {
|
|
4696
4696
|
const v_error = (() => {
|
|
4697
4697
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -4724,19 +4724,19 @@ function validate$9(obj, path = 'ManagedContentVariantReferencesCollectionRepres
|
|
|
4724
4724
|
})();
|
|
4725
4725
|
return v_error === undefined ? null : v_error;
|
|
4726
4726
|
}
|
|
4727
|
-
const RepresentationType$
|
|
4728
|
-
function normalize$
|
|
4727
|
+
const RepresentationType$5 = 'ManagedContentVariantReferencesCollectionRepresentation';
|
|
4728
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
4729
4729
|
return input;
|
|
4730
4730
|
}
|
|
4731
|
-
const select$
|
|
4731
|
+
const select$d = function ManagedContentVariantReferencesCollectionRepresentationSelect() {
|
|
4732
4732
|
return {
|
|
4733
4733
|
kind: 'Fragment',
|
|
4734
|
-
version: VERSION$
|
|
4734
|
+
version: VERSION$5,
|
|
4735
4735
|
private: [],
|
|
4736
4736
|
opaque: true
|
|
4737
4737
|
};
|
|
4738
4738
|
};
|
|
4739
|
-
function equals$
|
|
4739
|
+
function equals$5(existing, incoming) {
|
|
4740
4740
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
4741
4741
|
return false;
|
|
4742
4742
|
}
|
|
@@ -4758,7 +4758,7 @@ function deepFreeze$7(input) {
|
|
|
4758
4758
|
ObjectFreeze(input_referenceVariants);
|
|
4759
4759
|
ObjectFreeze(input);
|
|
4760
4760
|
}
|
|
4761
|
-
const ingest$
|
|
4761
|
+
const ingest$5 = function ManagedContentVariantReferencesCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
4762
4762
|
if (process.env.NODE_ENV !== 'production') {
|
|
4763
4763
|
const validateError = validate$9(input);
|
|
4764
4764
|
if (validateError !== null) {
|
|
@@ -4767,56 +4767,56 @@ const ingest$4 = function ManagedContentVariantReferencesCollectionRepresentatio
|
|
|
4767
4767
|
}
|
|
4768
4768
|
const key = path.fullPath;
|
|
4769
4769
|
const existingRecord = store.readEntry(key);
|
|
4770
|
-
const ttlToUse = TTL$
|
|
4771
|
-
let incomingRecord = normalize$
|
|
4770
|
+
const ttlToUse = TTL$5;
|
|
4771
|
+
let incomingRecord = normalize$5(input, store.readEntry(key), {
|
|
4772
4772
|
fullPath: key,
|
|
4773
4773
|
parent: path.parent,
|
|
4774
4774
|
propertyName: path.propertyName,
|
|
4775
4775
|
ttl: ttlToUse
|
|
4776
4776
|
});
|
|
4777
4777
|
deepFreeze$7(input);
|
|
4778
|
-
if (existingRecord === undefined || equals$
|
|
4778
|
+
if (existingRecord === undefined || equals$5(existingRecord, incomingRecord) === false) {
|
|
4779
4779
|
luvio.storePublish(key, incomingRecord);
|
|
4780
4780
|
}
|
|
4781
4781
|
{
|
|
4782
4782
|
const storeMetadataParams = {
|
|
4783
4783
|
ttl: ttlToUse,
|
|
4784
4784
|
namespace: "CMSAuthoring",
|
|
4785
|
-
version: VERSION$
|
|
4786
|
-
representationName: RepresentationType$
|
|
4785
|
+
version: VERSION$5,
|
|
4786
|
+
representationName: RepresentationType$5,
|
|
4787
4787
|
};
|
|
4788
4788
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
4789
4789
|
}
|
|
4790
4790
|
return createLink(key);
|
|
4791
4791
|
};
|
|
4792
|
-
function getTypeCacheKeys$
|
|
4792
|
+
function getTypeCacheKeys$5(luvio, input, fullPathFactory) {
|
|
4793
4793
|
const rootKeySet = new StoreKeyMap();
|
|
4794
4794
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
4795
4795
|
const rootKey = fullPathFactory();
|
|
4796
4796
|
rootKeySet.set(rootKey, {
|
|
4797
4797
|
namespace: keyPrefix,
|
|
4798
|
-
representationName: RepresentationType$
|
|
4798
|
+
representationName: RepresentationType$5,
|
|
4799
4799
|
mergeable: false
|
|
4800
4800
|
});
|
|
4801
4801
|
return rootKeySet;
|
|
4802
4802
|
}
|
|
4803
4803
|
|
|
4804
|
-
function select$
|
|
4805
|
-
return select$
|
|
4804
|
+
function select$c(luvio, params) {
|
|
4805
|
+
return select$d();
|
|
4806
4806
|
}
|
|
4807
|
-
function keyBuilder$
|
|
4807
|
+
function keyBuilder$b(luvio, params) {
|
|
4808
4808
|
return keyPrefix + '::ManagedContentVariantReferencesCollectionRepresentation:(' + 'variantIds:' + params.queryParams.variantIds + ',' + 'contentKeyOrId:' + params.urlParams.contentKeyOrId + ')';
|
|
4809
4809
|
}
|
|
4810
|
-
function getResponseCacheKeys$
|
|
4811
|
-
return getTypeCacheKeys$
|
|
4810
|
+
function getResponseCacheKeys$7(luvio, resourceParams, response) {
|
|
4811
|
+
return getTypeCacheKeys$5(luvio, response, () => keyBuilder$b(luvio, resourceParams));
|
|
4812
4812
|
}
|
|
4813
|
-
function ingestSuccess$
|
|
4813
|
+
function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
4814
4814
|
const { body } = response;
|
|
4815
|
-
const key = keyBuilder$
|
|
4816
|
-
luvio.storeIngest(key, ingest$
|
|
4815
|
+
const key = keyBuilder$b(luvio, resourceParams);
|
|
4816
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
4817
4817
|
const snapshot = luvio.storeLookup({
|
|
4818
4818
|
recordId: key,
|
|
4819
|
-
node: select$
|
|
4819
|
+
node: select$c(),
|
|
4820
4820
|
variables: {},
|
|
4821
4821
|
}, snapshotRefresh);
|
|
4822
4822
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4826,19 +4826,19 @@ function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
4826
4826
|
}
|
|
4827
4827
|
return snapshot;
|
|
4828
4828
|
}
|
|
4829
|
-
function ingestError$
|
|
4830
|
-
const key = keyBuilder$
|
|
4829
|
+
function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
4830
|
+
const key = keyBuilder$b(luvio, params);
|
|
4831
4831
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
4832
4832
|
const storeMetadataParams = {
|
|
4833
|
-
ttl: TTL$
|
|
4833
|
+
ttl: TTL$5,
|
|
4834
4834
|
namespace: keyPrefix,
|
|
4835
|
-
version: VERSION$
|
|
4836
|
-
representationName: RepresentationType$
|
|
4835
|
+
version: VERSION$5,
|
|
4836
|
+
representationName: RepresentationType$5
|
|
4837
4837
|
};
|
|
4838
4838
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4839
4839
|
return errorSnapshot;
|
|
4840
4840
|
}
|
|
4841
|
-
function createResourceRequest$
|
|
4841
|
+
function createResourceRequest$7(config) {
|
|
4842
4842
|
const headers = {};
|
|
4843
4843
|
return {
|
|
4844
4844
|
baseUri: '/services/data/v58.0',
|
|
@@ -4859,7 +4859,7 @@ const getManagedContentVariantReferences_ConfigPropertyNames = {
|
|
|
4859
4859
|
optional: ['variantIds']
|
|
4860
4860
|
}
|
|
4861
4861
|
};
|
|
4862
|
-
function createResourceParams$
|
|
4862
|
+
function createResourceParams$7(config) {
|
|
4863
4863
|
const resourceParams = {
|
|
4864
4864
|
urlParams: {
|
|
4865
4865
|
contentKeyOrId: config.contentKeyOrId
|
|
@@ -4870,11 +4870,11 @@ function createResourceParams$5(config) {
|
|
|
4870
4870
|
};
|
|
4871
4871
|
return resourceParams;
|
|
4872
4872
|
}
|
|
4873
|
-
function keyBuilder$
|
|
4874
|
-
const resourceParams = createResourceParams$
|
|
4875
|
-
return keyBuilder$
|
|
4873
|
+
function keyBuilder$a(luvio, config) {
|
|
4874
|
+
const resourceParams = createResourceParams$7(config);
|
|
4875
|
+
return keyBuilder$b(luvio, resourceParams);
|
|
4876
4876
|
}
|
|
4877
|
-
function typeCheckConfig$
|
|
4877
|
+
function typeCheckConfig$7(untrustedConfig) {
|
|
4878
4878
|
const config = {};
|
|
4879
4879
|
const untrustedConfig_contentKeyOrId = untrustedConfig.contentKeyOrId;
|
|
4880
4880
|
if (typeof untrustedConfig_contentKeyOrId === 'string') {
|
|
@@ -4893,48 +4893,48 @@ function typeCheckConfig$5(untrustedConfig) {
|
|
|
4893
4893
|
}
|
|
4894
4894
|
return config;
|
|
4895
4895
|
}
|
|
4896
|
-
function validateAdapterConfig$
|
|
4896
|
+
function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
|
|
4897
4897
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4898
4898
|
return null;
|
|
4899
4899
|
}
|
|
4900
4900
|
if (process.env.NODE_ENV !== 'production') {
|
|
4901
4901
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4902
4902
|
}
|
|
4903
|
-
const config = typeCheckConfig$
|
|
4903
|
+
const config = typeCheckConfig$7(untrustedConfig);
|
|
4904
4904
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4905
4905
|
return null;
|
|
4906
4906
|
}
|
|
4907
4907
|
return config;
|
|
4908
4908
|
}
|
|
4909
|
-
function adapterFragment$
|
|
4910
|
-
createResourceParams$
|
|
4911
|
-
return select$
|
|
4909
|
+
function adapterFragment$4(luvio, config) {
|
|
4910
|
+
createResourceParams$7(config);
|
|
4911
|
+
return select$c();
|
|
4912
4912
|
}
|
|
4913
|
-
function onFetchResponseSuccess$
|
|
4914
|
-
const snapshot = ingestSuccess$
|
|
4913
|
+
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
4914
|
+
const snapshot = ingestSuccess$7(luvio, resourceParams, response, {
|
|
4915
4915
|
config,
|
|
4916
|
-
resolve: () => buildNetworkSnapshot$
|
|
4916
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
4917
4917
|
});
|
|
4918
4918
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4919
4919
|
}
|
|
4920
|
-
function onFetchResponseError$
|
|
4921
|
-
const snapshot = ingestError$
|
|
4920
|
+
function onFetchResponseError$4(luvio, config, resourceParams, response) {
|
|
4921
|
+
const snapshot = ingestError$4(luvio, resourceParams, response, {
|
|
4922
4922
|
config,
|
|
4923
|
-
resolve: () => buildNetworkSnapshot$
|
|
4923
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
4924
4924
|
});
|
|
4925
4925
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4926
4926
|
}
|
|
4927
|
-
function buildNetworkSnapshot$
|
|
4928
|
-
const resourceParams = createResourceParams$
|
|
4929
|
-
const request = createResourceRequest$
|
|
4927
|
+
function buildNetworkSnapshot$7(luvio, config, options) {
|
|
4928
|
+
const resourceParams = createResourceParams$7(config);
|
|
4929
|
+
const request = createResourceRequest$7(resourceParams);
|
|
4930
4930
|
return luvio.dispatchResourceRequest(request, options)
|
|
4931
4931
|
.then((response) => {
|
|
4932
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
4932
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => getResponseCacheKeys$7(luvio, resourceParams, response.body));
|
|
4933
4933
|
}, (response) => {
|
|
4934
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
4934
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
|
|
4935
4935
|
});
|
|
4936
4936
|
}
|
|
4937
|
-
function buildNetworkSnapshotCachePolicy$
|
|
4937
|
+
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
4938
4938
|
const { luvio, config } = context;
|
|
4939
4939
|
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
4940
4940
|
const dispatchOptions = {
|
|
@@ -4949,29 +4949,29 @@ function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext
|
|
|
4949
4949
|
priority: networkPriority
|
|
4950
4950
|
};
|
|
4951
4951
|
}
|
|
4952
|
-
return buildNetworkSnapshot$
|
|
4952
|
+
return buildNetworkSnapshot$7(luvio, config, dispatchOptions);
|
|
4953
4953
|
}
|
|
4954
|
-
function buildCachedSnapshotCachePolicy$
|
|
4954
|
+
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
4955
4955
|
const { luvio, config } = context;
|
|
4956
4956
|
const selector = {
|
|
4957
|
-
recordId: keyBuilder$
|
|
4958
|
-
node: adapterFragment$
|
|
4957
|
+
recordId: keyBuilder$a(luvio, config),
|
|
4958
|
+
node: adapterFragment$4(luvio, config),
|
|
4959
4959
|
variables: {},
|
|
4960
4960
|
};
|
|
4961
4961
|
const cacheSnapshot = storeLookup(selector, {
|
|
4962
4962
|
config,
|
|
4963
|
-
resolve: () => buildNetworkSnapshot$
|
|
4963
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
4964
4964
|
});
|
|
4965
4965
|
return cacheSnapshot;
|
|
4966
4966
|
}
|
|
4967
4967
|
const getManagedContentVariantReferencesAdapterFactory = (luvio) => function CMSAuthoring__getManagedContentVariantReferences(untrustedConfig, requestContext) {
|
|
4968
|
-
const config = validateAdapterConfig$
|
|
4968
|
+
const config = validateAdapterConfig$7(untrustedConfig, getManagedContentVariantReferences_ConfigPropertyNames);
|
|
4969
4969
|
// Invalid or incomplete config
|
|
4970
4970
|
if (config === null) {
|
|
4971
4971
|
return null;
|
|
4972
4972
|
}
|
|
4973
4973
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
4974
|
-
buildCachedSnapshotCachePolicy$
|
|
4974
|
+
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
|
|
4975
4975
|
};
|
|
4976
4976
|
|
|
4977
4977
|
function validate$8(obj, path = 'ManagedContentSpaceFolderItemRepresentation') {
|
|
@@ -5094,8 +5094,8 @@ function deepFreeze$6(input) {
|
|
|
5094
5094
|
ObjectFreeze(input);
|
|
5095
5095
|
}
|
|
5096
5096
|
|
|
5097
|
-
const TTL$
|
|
5098
|
-
const VERSION$
|
|
5097
|
+
const TTL$4 = 100;
|
|
5098
|
+
const VERSION$4 = "e85b8f02eca0f2e88859e6f3a061e56b";
|
|
5099
5099
|
function validate$7(obj, path = 'ManagedContentSpaceFolderItemCollectionRepresentation') {
|
|
5100
5100
|
const v_error = (() => {
|
|
5101
5101
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -5150,19 +5150,19 @@ function validate$7(obj, path = 'ManagedContentSpaceFolderItemCollectionRepresen
|
|
|
5150
5150
|
})();
|
|
5151
5151
|
return v_error === undefined ? null : v_error;
|
|
5152
5152
|
}
|
|
5153
|
-
const RepresentationType$
|
|
5154
|
-
function normalize$
|
|
5153
|
+
const RepresentationType$4 = 'ManagedContentSpaceFolderItemCollectionRepresentation';
|
|
5154
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
5155
5155
|
return input;
|
|
5156
5156
|
}
|
|
5157
|
-
const select$
|
|
5157
|
+
const select$b = function ManagedContentSpaceFolderItemCollectionRepresentationSelect() {
|
|
5158
5158
|
return {
|
|
5159
5159
|
kind: 'Fragment',
|
|
5160
|
-
version: VERSION$
|
|
5160
|
+
version: VERSION$4,
|
|
5161
5161
|
private: [],
|
|
5162
5162
|
opaque: true
|
|
5163
5163
|
};
|
|
5164
5164
|
};
|
|
5165
|
-
function equals$
|
|
5165
|
+
function equals$4(existing, incoming) {
|
|
5166
5166
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
5167
5167
|
return false;
|
|
5168
5168
|
}
|
|
@@ -5177,7 +5177,7 @@ function deepFreeze$5(input) {
|
|
|
5177
5177
|
ObjectFreeze(input_folderItems);
|
|
5178
5178
|
ObjectFreeze(input);
|
|
5179
5179
|
}
|
|
5180
|
-
const ingest$
|
|
5180
|
+
const ingest$4 = function ManagedContentSpaceFolderItemCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
5181
5181
|
if (process.env.NODE_ENV !== 'production') {
|
|
5182
5182
|
const validateError = validate$7(input);
|
|
5183
5183
|
if (validateError !== null) {
|
|
@@ -5186,56 +5186,56 @@ const ingest$3 = function ManagedContentSpaceFolderItemCollectionRepresentationI
|
|
|
5186
5186
|
}
|
|
5187
5187
|
const key = path.fullPath;
|
|
5188
5188
|
const existingRecord = store.readEntry(key);
|
|
5189
|
-
const ttlToUse = TTL$
|
|
5190
|
-
let incomingRecord = normalize$
|
|
5189
|
+
const ttlToUse = TTL$4;
|
|
5190
|
+
let incomingRecord = normalize$4(input, store.readEntry(key), {
|
|
5191
5191
|
fullPath: key,
|
|
5192
5192
|
parent: path.parent,
|
|
5193
5193
|
propertyName: path.propertyName,
|
|
5194
5194
|
ttl: ttlToUse
|
|
5195
5195
|
});
|
|
5196
5196
|
deepFreeze$5(input);
|
|
5197
|
-
if (existingRecord === undefined || equals$
|
|
5197
|
+
if (existingRecord === undefined || equals$4(existingRecord, incomingRecord) === false) {
|
|
5198
5198
|
luvio.storePublish(key, incomingRecord);
|
|
5199
5199
|
}
|
|
5200
5200
|
{
|
|
5201
5201
|
const storeMetadataParams = {
|
|
5202
5202
|
ttl: ttlToUse,
|
|
5203
5203
|
namespace: "CMSAuthoring",
|
|
5204
|
-
version: VERSION$
|
|
5205
|
-
representationName: RepresentationType$
|
|
5204
|
+
version: VERSION$4,
|
|
5205
|
+
representationName: RepresentationType$4,
|
|
5206
5206
|
};
|
|
5207
5207
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
5208
5208
|
}
|
|
5209
5209
|
return createLink(key);
|
|
5210
5210
|
};
|
|
5211
|
-
function getTypeCacheKeys$
|
|
5211
|
+
function getTypeCacheKeys$4(luvio, input, fullPathFactory) {
|
|
5212
5212
|
const rootKeySet = new StoreKeyMap();
|
|
5213
5213
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
5214
5214
|
const rootKey = fullPathFactory();
|
|
5215
5215
|
rootKeySet.set(rootKey, {
|
|
5216
5216
|
namespace: keyPrefix,
|
|
5217
|
-
representationName: RepresentationType$
|
|
5217
|
+
representationName: RepresentationType$4,
|
|
5218
5218
|
mergeable: false
|
|
5219
5219
|
});
|
|
5220
5220
|
return rootKeySet;
|
|
5221
5221
|
}
|
|
5222
5222
|
|
|
5223
|
-
function select$
|
|
5224
|
-
return select$
|
|
5223
|
+
function select$a(luvio, params) {
|
|
5224
|
+
return select$b();
|
|
5225
5225
|
}
|
|
5226
|
-
function keyBuilder$
|
|
5226
|
+
function keyBuilder$9(luvio, params) {
|
|
5227
5227
|
return keyPrefix + '::ManagedContentSpaceFolderItemCollectionRepresentation:(' + 'contentType:' + params.queryParams.contentType + ',' + 'contentTypeFilter:' + params.queryParams.contentTypeFilter + ',' + 'contentTypes:' + params.queryParams.contentTypes + ',' + 'filter:' + params.queryParams.filter + ',' + 'page:' + params.queryParams.page + ',' + 'pageSize:' + params.queryParams.pageSize + ',' + 'queryTerm:' + params.queryParams.queryTerm + ',' + 'showPublishedOnly:' + params.queryParams.showPublishedOnly + ',' + 'sortBy:' + params.queryParams.sortBy + ',' + 'sortOrder:' + params.queryParams.sortOrder + ',' + 'folderId:' + params.urlParams.folderId + ')';
|
|
5228
5228
|
}
|
|
5229
|
-
function getResponseCacheKeys$
|
|
5230
|
-
return getTypeCacheKeys$
|
|
5229
|
+
function getResponseCacheKeys$6(luvio, resourceParams, response) {
|
|
5230
|
+
return getTypeCacheKeys$4(luvio, response, () => keyBuilder$9(luvio, resourceParams));
|
|
5231
5231
|
}
|
|
5232
|
-
function ingestSuccess$
|
|
5232
|
+
function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
5233
5233
|
const { body } = response;
|
|
5234
|
-
const key = keyBuilder$
|
|
5235
|
-
luvio.storeIngest(key, ingest$
|
|
5234
|
+
const key = keyBuilder$9(luvio, resourceParams);
|
|
5235
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
5236
5236
|
const snapshot = luvio.storeLookup({
|
|
5237
5237
|
recordId: key,
|
|
5238
|
-
node: select$
|
|
5238
|
+
node: select$a(),
|
|
5239
5239
|
variables: {},
|
|
5240
5240
|
}, snapshotRefresh);
|
|
5241
5241
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -5245,19 +5245,19 @@ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
5245
5245
|
}
|
|
5246
5246
|
return snapshot;
|
|
5247
5247
|
}
|
|
5248
|
-
function ingestError$
|
|
5249
|
-
const key = keyBuilder$
|
|
5248
|
+
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
5249
|
+
const key = keyBuilder$9(luvio, params);
|
|
5250
5250
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
5251
5251
|
const storeMetadataParams = {
|
|
5252
|
-
ttl: TTL$
|
|
5252
|
+
ttl: TTL$4,
|
|
5253
5253
|
namespace: keyPrefix,
|
|
5254
|
-
version: VERSION$
|
|
5255
|
-
representationName: RepresentationType$
|
|
5254
|
+
version: VERSION$4,
|
|
5255
|
+
representationName: RepresentationType$4
|
|
5256
5256
|
};
|
|
5257
5257
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
5258
5258
|
return errorSnapshot;
|
|
5259
5259
|
}
|
|
5260
|
-
function createResourceRequest$
|
|
5260
|
+
function createResourceRequest$6(config) {
|
|
5261
5261
|
const headers = {};
|
|
5262
5262
|
return {
|
|
5263
5263
|
baseUri: '/services/data/v58.0',
|
|
@@ -5278,7 +5278,7 @@ const getManagedContentByFolderId_ConfigPropertyNames = {
|
|
|
5278
5278
|
optional: ['contentType', 'contentTypeFilter', 'contentTypes', 'filter', 'page', 'pageSize', 'queryTerm', 'showPublishedOnly', 'sortBy', 'sortOrder']
|
|
5279
5279
|
}
|
|
5280
5280
|
};
|
|
5281
|
-
function createResourceParams$
|
|
5281
|
+
function createResourceParams$6(config) {
|
|
5282
5282
|
const resourceParams = {
|
|
5283
5283
|
urlParams: {
|
|
5284
5284
|
folderId: config.folderId
|
|
@@ -5289,11 +5289,11 @@ function createResourceParams$4(config) {
|
|
|
5289
5289
|
};
|
|
5290
5290
|
return resourceParams;
|
|
5291
5291
|
}
|
|
5292
|
-
function keyBuilder$
|
|
5293
|
-
const resourceParams = createResourceParams$
|
|
5294
|
-
return keyBuilder$
|
|
5292
|
+
function keyBuilder$8(luvio, config) {
|
|
5293
|
+
const resourceParams = createResourceParams$6(config);
|
|
5294
|
+
return keyBuilder$9(luvio, resourceParams);
|
|
5295
5295
|
}
|
|
5296
|
-
function typeCheckConfig$
|
|
5296
|
+
function typeCheckConfig$6(untrustedConfig) {
|
|
5297
5297
|
const config = {};
|
|
5298
5298
|
const untrustedConfig_folderId = untrustedConfig.folderId;
|
|
5299
5299
|
if (typeof untrustedConfig_folderId === 'string') {
|
|
@@ -5348,48 +5348,48 @@ function typeCheckConfig$4(untrustedConfig) {
|
|
|
5348
5348
|
}
|
|
5349
5349
|
return config;
|
|
5350
5350
|
}
|
|
5351
|
-
function validateAdapterConfig$
|
|
5351
|
+
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
5352
5352
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
5353
5353
|
return null;
|
|
5354
5354
|
}
|
|
5355
5355
|
if (process.env.NODE_ENV !== 'production') {
|
|
5356
5356
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
5357
5357
|
}
|
|
5358
|
-
const config = typeCheckConfig$
|
|
5358
|
+
const config = typeCheckConfig$6(untrustedConfig);
|
|
5359
5359
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
5360
5360
|
return null;
|
|
5361
5361
|
}
|
|
5362
5362
|
return config;
|
|
5363
5363
|
}
|
|
5364
|
-
function adapterFragment$
|
|
5365
|
-
createResourceParams$
|
|
5366
|
-
return select$
|
|
5364
|
+
function adapterFragment$3(luvio, config) {
|
|
5365
|
+
createResourceParams$6(config);
|
|
5366
|
+
return select$a();
|
|
5367
5367
|
}
|
|
5368
|
-
function onFetchResponseSuccess$
|
|
5369
|
-
const snapshot = ingestSuccess$
|
|
5368
|
+
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
5369
|
+
const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
|
|
5370
5370
|
config,
|
|
5371
|
-
resolve: () => buildNetworkSnapshot$
|
|
5371
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
5372
5372
|
});
|
|
5373
5373
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
5374
5374
|
}
|
|
5375
|
-
function onFetchResponseError$
|
|
5376
|
-
const snapshot = ingestError$
|
|
5375
|
+
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
5376
|
+
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
5377
5377
|
config,
|
|
5378
|
-
resolve: () => buildNetworkSnapshot$
|
|
5378
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
5379
5379
|
});
|
|
5380
5380
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
5381
5381
|
}
|
|
5382
|
-
function buildNetworkSnapshot$
|
|
5383
|
-
const resourceParams = createResourceParams$
|
|
5384
|
-
const request = createResourceRequest$
|
|
5382
|
+
function buildNetworkSnapshot$6(luvio, config, options) {
|
|
5383
|
+
const resourceParams = createResourceParams$6(config);
|
|
5384
|
+
const request = createResourceRequest$6(resourceParams);
|
|
5385
5385
|
return luvio.dispatchResourceRequest(request, options)
|
|
5386
5386
|
.then((response) => {
|
|
5387
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
5387
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => getResponseCacheKeys$6(luvio, resourceParams, response.body));
|
|
5388
5388
|
}, (response) => {
|
|
5389
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
5389
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
|
|
5390
5390
|
});
|
|
5391
5391
|
}
|
|
5392
|
-
function buildNetworkSnapshotCachePolicy$
|
|
5392
|
+
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
5393
5393
|
const { luvio, config } = context;
|
|
5394
5394
|
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
5395
5395
|
const dispatchOptions = {
|
|
@@ -5404,29 +5404,29 @@ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext
|
|
|
5404
5404
|
priority: networkPriority
|
|
5405
5405
|
};
|
|
5406
5406
|
}
|
|
5407
|
-
return buildNetworkSnapshot$
|
|
5407
|
+
return buildNetworkSnapshot$6(luvio, config, dispatchOptions);
|
|
5408
5408
|
}
|
|
5409
|
-
function buildCachedSnapshotCachePolicy$
|
|
5409
|
+
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
5410
5410
|
const { luvio, config } = context;
|
|
5411
5411
|
const selector = {
|
|
5412
|
-
recordId: keyBuilder$
|
|
5413
|
-
node: adapterFragment$
|
|
5412
|
+
recordId: keyBuilder$8(luvio, config),
|
|
5413
|
+
node: adapterFragment$3(luvio, config),
|
|
5414
5414
|
variables: {},
|
|
5415
5415
|
};
|
|
5416
5416
|
const cacheSnapshot = storeLookup(selector, {
|
|
5417
5417
|
config,
|
|
5418
|
-
resolve: () => buildNetworkSnapshot$
|
|
5418
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
5419
5419
|
});
|
|
5420
5420
|
return cacheSnapshot;
|
|
5421
5421
|
}
|
|
5422
5422
|
const getManagedContentByFolderIdAdapterFactory = (luvio) => function CMSAuthoring__getManagedContentByFolderId(untrustedConfig, requestContext) {
|
|
5423
|
-
const config = validateAdapterConfig$
|
|
5423
|
+
const config = validateAdapterConfig$6(untrustedConfig, getManagedContentByFolderId_ConfigPropertyNames);
|
|
5424
5424
|
// Invalid or incomplete config
|
|
5425
5425
|
if (config === null) {
|
|
5426
5426
|
return null;
|
|
5427
5427
|
}
|
|
5428
5428
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
5429
|
-
buildCachedSnapshotCachePolicy$
|
|
5429
|
+
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
5430
5430
|
};
|
|
5431
5431
|
|
|
5432
5432
|
function validate$6(obj, path = 'AbstractManagedContentSearchResultRepresentation') {
|
|
@@ -5496,8 +5496,8 @@ function deepFreeze$4(input) {
|
|
|
5496
5496
|
ObjectFreeze(input);
|
|
5497
5497
|
}
|
|
5498
5498
|
|
|
5499
|
-
const TTL$
|
|
5500
|
-
const VERSION$
|
|
5499
|
+
const TTL$3 = 100;
|
|
5500
|
+
const VERSION$3 = "bbcdc04e5d094f6f8048bc2863d86527";
|
|
5501
5501
|
function validate$5(obj, path = 'ManagedContentSearchResultItemsCollectionRepresentation') {
|
|
5502
5502
|
const v_error = (() => {
|
|
5503
5503
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -5536,19 +5536,19 @@ function validate$5(obj, path = 'ManagedContentSearchResultItemsCollectionRepres
|
|
|
5536
5536
|
})();
|
|
5537
5537
|
return v_error === undefined ? null : v_error;
|
|
5538
5538
|
}
|
|
5539
|
-
const RepresentationType$
|
|
5540
|
-
function normalize$
|
|
5539
|
+
const RepresentationType$3 = 'ManagedContentSearchResultItemsCollectionRepresentation';
|
|
5540
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
5541
5541
|
return input;
|
|
5542
5542
|
}
|
|
5543
|
-
const select$
|
|
5543
|
+
const select$9 = function ManagedContentSearchResultItemsCollectionRepresentationSelect() {
|
|
5544
5544
|
return {
|
|
5545
5545
|
kind: 'Fragment',
|
|
5546
|
-
version: VERSION$
|
|
5546
|
+
version: VERSION$3,
|
|
5547
5547
|
private: [],
|
|
5548
5548
|
opaque: true
|
|
5549
5549
|
};
|
|
5550
5550
|
};
|
|
5551
|
-
function equals$
|
|
5551
|
+
function equals$3(existing, incoming) {
|
|
5552
5552
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
5553
5553
|
return false;
|
|
5554
5554
|
}
|
|
@@ -5563,7 +5563,7 @@ function deepFreeze$3(input) {
|
|
|
5563
5563
|
ObjectFreeze(input_items);
|
|
5564
5564
|
ObjectFreeze(input);
|
|
5565
5565
|
}
|
|
5566
|
-
const ingest$
|
|
5566
|
+
const ingest$3 = function ManagedContentSearchResultItemsCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
5567
5567
|
if (process.env.NODE_ENV !== 'production') {
|
|
5568
5568
|
const validateError = validate$5(input);
|
|
5569
5569
|
if (validateError !== null) {
|
|
@@ -5572,56 +5572,56 @@ const ingest$2 = function ManagedContentSearchResultItemsCollectionRepresentatio
|
|
|
5572
5572
|
}
|
|
5573
5573
|
const key = path.fullPath;
|
|
5574
5574
|
const existingRecord = store.readEntry(key);
|
|
5575
|
-
const ttlToUse = TTL$
|
|
5576
|
-
let incomingRecord = normalize$
|
|
5575
|
+
const ttlToUse = TTL$3;
|
|
5576
|
+
let incomingRecord = normalize$3(input, store.readEntry(key), {
|
|
5577
5577
|
fullPath: key,
|
|
5578
5578
|
parent: path.parent,
|
|
5579
5579
|
propertyName: path.propertyName,
|
|
5580
5580
|
ttl: ttlToUse
|
|
5581
5581
|
});
|
|
5582
5582
|
deepFreeze$3(input);
|
|
5583
|
-
if (existingRecord === undefined || equals$
|
|
5583
|
+
if (existingRecord === undefined || equals$3(existingRecord, incomingRecord) === false) {
|
|
5584
5584
|
luvio.storePublish(key, incomingRecord);
|
|
5585
5585
|
}
|
|
5586
5586
|
{
|
|
5587
5587
|
const storeMetadataParams = {
|
|
5588
5588
|
ttl: ttlToUse,
|
|
5589
5589
|
namespace: "CMSAuthoring",
|
|
5590
|
-
version: VERSION$
|
|
5591
|
-
representationName: RepresentationType$
|
|
5590
|
+
version: VERSION$3,
|
|
5591
|
+
representationName: RepresentationType$3,
|
|
5592
5592
|
};
|
|
5593
5593
|
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
5594
5594
|
}
|
|
5595
5595
|
return createLink(key);
|
|
5596
5596
|
};
|
|
5597
|
-
function getTypeCacheKeys$
|
|
5597
|
+
function getTypeCacheKeys$3(luvio, input, fullPathFactory) {
|
|
5598
5598
|
const rootKeySet = new StoreKeyMap();
|
|
5599
5599
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
5600
5600
|
const rootKey = fullPathFactory();
|
|
5601
5601
|
rootKeySet.set(rootKey, {
|
|
5602
5602
|
namespace: keyPrefix,
|
|
5603
|
-
representationName: RepresentationType$
|
|
5603
|
+
representationName: RepresentationType$3,
|
|
5604
5604
|
mergeable: false
|
|
5605
5605
|
});
|
|
5606
5606
|
return rootKeySet;
|
|
5607
5607
|
}
|
|
5608
5608
|
|
|
5609
|
-
function select$
|
|
5610
|
-
return select$
|
|
5609
|
+
function select$8(luvio, params) {
|
|
5610
|
+
return select$9();
|
|
5611
5611
|
}
|
|
5612
|
-
function keyBuilder$
|
|
5612
|
+
function keyBuilder$7(luvio, params) {
|
|
5613
5613
|
return keyPrefix + '::ManagedContentSearchResultItemsCollectionRepresentation:(' + 'contentSpaceOrFolderIds:' + params.queryParams.contentSpaceOrFolderIds + ',' + 'contentTypeFQN:' + params.queryParams.contentTypeFQN + ',' + 'languages:' + params.queryParams.languages + ',' + 'page:' + params.queryParams.page + ',' + 'pageSize:' + params.queryParams.pageSize + ',' + 'queryTerm:' + params.queryParams.queryTerm + ',' + 'scope:' + params.queryParams.scope + ')';
|
|
5614
5614
|
}
|
|
5615
|
-
function getResponseCacheKeys$
|
|
5616
|
-
return getTypeCacheKeys$
|
|
5615
|
+
function getResponseCacheKeys$5(luvio, resourceParams, response) {
|
|
5616
|
+
return getTypeCacheKeys$3(luvio, response, () => keyBuilder$7(luvio, resourceParams));
|
|
5617
5617
|
}
|
|
5618
|
-
function ingestSuccess$
|
|
5618
|
+
function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
5619
5619
|
const { body } = response;
|
|
5620
|
-
const key = keyBuilder$
|
|
5621
|
-
luvio.storeIngest(key, ingest$
|
|
5620
|
+
const key = keyBuilder$7(luvio, resourceParams);
|
|
5621
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
5622
5622
|
const snapshot = luvio.storeLookup({
|
|
5623
5623
|
recordId: key,
|
|
5624
|
-
node: select$
|
|
5624
|
+
node: select$8(),
|
|
5625
5625
|
variables: {},
|
|
5626
5626
|
}, snapshotRefresh);
|
|
5627
5627
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -5631,19 +5631,19 @@ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
5631
5631
|
}
|
|
5632
5632
|
return snapshot;
|
|
5633
5633
|
}
|
|
5634
|
-
function ingestError$
|
|
5635
|
-
const key = keyBuilder$
|
|
5634
|
+
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
5635
|
+
const key = keyBuilder$7(luvio, params);
|
|
5636
5636
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
5637
5637
|
const storeMetadataParams = {
|
|
5638
|
-
ttl: TTL$
|
|
5638
|
+
ttl: TTL$3,
|
|
5639
5639
|
namespace: keyPrefix,
|
|
5640
|
-
version: VERSION$
|
|
5641
|
-
representationName: RepresentationType$
|
|
5640
|
+
version: VERSION$3,
|
|
5641
|
+
representationName: RepresentationType$3
|
|
5642
5642
|
};
|
|
5643
5643
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
5644
5644
|
return errorSnapshot;
|
|
5645
5645
|
}
|
|
5646
|
-
function createResourceRequest$
|
|
5646
|
+
function createResourceRequest$5(config) {
|
|
5647
5647
|
const headers = {};
|
|
5648
5648
|
return {
|
|
5649
5649
|
baseUri: '/services/data/v58.0',
|
|
@@ -5664,7 +5664,7 @@ const getSearchResults_ConfigPropertyNames = {
|
|
|
5664
5664
|
optional: ['contentSpaceOrFolderIds', 'contentTypeFQN', 'languages', 'page', 'pageSize', 'scope']
|
|
5665
5665
|
}
|
|
5666
5666
|
};
|
|
5667
|
-
function createResourceParams$
|
|
5667
|
+
function createResourceParams$5(config) {
|
|
5668
5668
|
const resourceParams = {
|
|
5669
5669
|
queryParams: {
|
|
5670
5670
|
contentSpaceOrFolderIds: config.contentSpaceOrFolderIds, contentTypeFQN: config.contentTypeFQN, languages: config.languages, page: config.page, pageSize: config.pageSize, queryTerm: config.queryTerm, scope: config.scope
|
|
@@ -5672,11 +5672,11 @@ function createResourceParams$3(config) {
|
|
|
5672
5672
|
};
|
|
5673
5673
|
return resourceParams;
|
|
5674
5674
|
}
|
|
5675
|
-
function keyBuilder$
|
|
5676
|
-
const resourceParams = createResourceParams$
|
|
5677
|
-
return keyBuilder$
|
|
5675
|
+
function keyBuilder$6(luvio, config) {
|
|
5676
|
+
const resourceParams = createResourceParams$5(config);
|
|
5677
|
+
return keyBuilder$7(luvio, resourceParams);
|
|
5678
5678
|
}
|
|
5679
|
-
function typeCheckConfig$
|
|
5679
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
5680
5680
|
const config = {};
|
|
5681
5681
|
const untrustedConfig_contentSpaceOrFolderIds = untrustedConfig.contentSpaceOrFolderIds;
|
|
5682
5682
|
if (ArrayIsArray$1(untrustedConfig_contentSpaceOrFolderIds)) {
|
|
@@ -5722,48 +5722,48 @@ function typeCheckConfig$3(untrustedConfig) {
|
|
|
5722
5722
|
}
|
|
5723
5723
|
return config;
|
|
5724
5724
|
}
|
|
5725
|
-
function validateAdapterConfig$
|
|
5725
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
5726
5726
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
5727
5727
|
return null;
|
|
5728
5728
|
}
|
|
5729
5729
|
if (process.env.NODE_ENV !== 'production') {
|
|
5730
5730
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
5731
5731
|
}
|
|
5732
|
-
const config = typeCheckConfig$
|
|
5732
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
5733
5733
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
5734
5734
|
return null;
|
|
5735
5735
|
}
|
|
5736
5736
|
return config;
|
|
5737
5737
|
}
|
|
5738
|
-
function adapterFragment$
|
|
5739
|
-
createResourceParams$
|
|
5740
|
-
return select$
|
|
5738
|
+
function adapterFragment$2(luvio, config) {
|
|
5739
|
+
createResourceParams$5(config);
|
|
5740
|
+
return select$8();
|
|
5741
5741
|
}
|
|
5742
|
-
function onFetchResponseSuccess$
|
|
5743
|
-
const snapshot = ingestSuccess$
|
|
5742
|
+
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
5743
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
|
|
5744
5744
|
config,
|
|
5745
|
-
resolve: () => buildNetworkSnapshot$
|
|
5745
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
5746
5746
|
});
|
|
5747
5747
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
5748
5748
|
}
|
|
5749
|
-
function onFetchResponseError$
|
|
5750
|
-
const snapshot = ingestError$
|
|
5749
|
+
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
5750
|
+
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
5751
5751
|
config,
|
|
5752
|
-
resolve: () => buildNetworkSnapshot$
|
|
5752
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
5753
5753
|
});
|
|
5754
5754
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
5755
5755
|
}
|
|
5756
|
-
function buildNetworkSnapshot$
|
|
5757
|
-
const resourceParams = createResourceParams$
|
|
5758
|
-
const request = createResourceRequest$
|
|
5756
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
5757
|
+
const resourceParams = createResourceParams$5(config);
|
|
5758
|
+
const request = createResourceRequest$5(resourceParams);
|
|
5759
5759
|
return luvio.dispatchResourceRequest(request, options)
|
|
5760
5760
|
.then((response) => {
|
|
5761
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
5761
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => getResponseCacheKeys$5(luvio, resourceParams, response.body));
|
|
5762
5762
|
}, (response) => {
|
|
5763
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
5763
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
|
|
5764
5764
|
});
|
|
5765
5765
|
}
|
|
5766
|
-
function buildNetworkSnapshotCachePolicy$
|
|
5766
|
+
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
5767
5767
|
const { luvio, config } = context;
|
|
5768
5768
|
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
5769
5769
|
const dispatchOptions = {
|
|
@@ -5778,31 +5778,33 @@ function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext
|
|
|
5778
5778
|
priority: networkPriority
|
|
5779
5779
|
};
|
|
5780
5780
|
}
|
|
5781
|
-
return buildNetworkSnapshot$
|
|
5781
|
+
return buildNetworkSnapshot$5(luvio, config, dispatchOptions);
|
|
5782
5782
|
}
|
|
5783
|
-
function buildCachedSnapshotCachePolicy$
|
|
5783
|
+
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
5784
5784
|
const { luvio, config } = context;
|
|
5785
5785
|
const selector = {
|
|
5786
|
-
recordId: keyBuilder$
|
|
5787
|
-
node: adapterFragment$
|
|
5786
|
+
recordId: keyBuilder$6(luvio, config),
|
|
5787
|
+
node: adapterFragment$2(luvio, config),
|
|
5788
5788
|
variables: {},
|
|
5789
5789
|
};
|
|
5790
5790
|
const cacheSnapshot = storeLookup(selector, {
|
|
5791
5791
|
config,
|
|
5792
|
-
resolve: () => buildNetworkSnapshot$
|
|
5792
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
5793
5793
|
});
|
|
5794
5794
|
return cacheSnapshot;
|
|
5795
5795
|
}
|
|
5796
5796
|
const getSearchResultsAdapterFactory = (luvio) => function CMSAuthoring__getSearchResults(untrustedConfig, requestContext) {
|
|
5797
|
-
const config = validateAdapterConfig$
|
|
5797
|
+
const config = validateAdapterConfig$5(untrustedConfig, getSearchResults_ConfigPropertyNames);
|
|
5798
5798
|
// Invalid or incomplete config
|
|
5799
5799
|
if (config === null) {
|
|
5800
5800
|
return null;
|
|
5801
5801
|
}
|
|
5802
5802
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
5803
|
-
buildCachedSnapshotCachePolicy$
|
|
5803
|
+
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
5804
5804
|
};
|
|
5805
5805
|
|
|
5806
|
+
const TTL$2 = 100;
|
|
5807
|
+
const VERSION$2 = "72679343637cbdd587e2f087852030d7";
|
|
5806
5808
|
function validate$4(obj, path = 'ManagedContentSpaceRepresentation') {
|
|
5807
5809
|
const v_error = (() => {
|
|
5808
5810
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -5833,6 +5835,32 @@ function validate$4(obj, path = 'ManagedContentSpaceRepresentation') {
|
|
|
5833
5835
|
if (typeof obj_id !== 'string') {
|
|
5834
5836
|
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
5835
5837
|
}
|
|
5838
|
+
const obj_isOrchestratorModuleInstalled = obj.isOrchestratorModuleInstalled;
|
|
5839
|
+
const path_isOrchestratorModuleInstalled = path + '.isOrchestratorModuleInstalled';
|
|
5840
|
+
let obj_isOrchestratorModuleInstalled_union0 = null;
|
|
5841
|
+
const obj_isOrchestratorModuleInstalled_union0_error = (() => {
|
|
5842
|
+
if (typeof obj_isOrchestratorModuleInstalled !== 'boolean') {
|
|
5843
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isOrchestratorModuleInstalled + '" (at "' + path_isOrchestratorModuleInstalled + '")');
|
|
5844
|
+
}
|
|
5845
|
+
})();
|
|
5846
|
+
if (obj_isOrchestratorModuleInstalled_union0_error != null) {
|
|
5847
|
+
obj_isOrchestratorModuleInstalled_union0 = obj_isOrchestratorModuleInstalled_union0_error.message;
|
|
5848
|
+
}
|
|
5849
|
+
let obj_isOrchestratorModuleInstalled_union1 = null;
|
|
5850
|
+
const obj_isOrchestratorModuleInstalled_union1_error = (() => {
|
|
5851
|
+
if (obj_isOrchestratorModuleInstalled !== null) {
|
|
5852
|
+
return new TypeError('Expected "null" but received "' + typeof obj_isOrchestratorModuleInstalled + '" (at "' + path_isOrchestratorModuleInstalled + '")');
|
|
5853
|
+
}
|
|
5854
|
+
})();
|
|
5855
|
+
if (obj_isOrchestratorModuleInstalled_union1_error != null) {
|
|
5856
|
+
obj_isOrchestratorModuleInstalled_union1 = obj_isOrchestratorModuleInstalled_union1_error.message;
|
|
5857
|
+
}
|
|
5858
|
+
if (obj_isOrchestratorModuleInstalled_union0 && obj_isOrchestratorModuleInstalled_union1) {
|
|
5859
|
+
let message = 'Object doesn\'t match union (at "' + path_isOrchestratorModuleInstalled + '")';
|
|
5860
|
+
message += '\n' + obj_isOrchestratorModuleInstalled_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
5861
|
+
message += '\n' + obj_isOrchestratorModuleInstalled_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
5862
|
+
return new TypeError(message);
|
|
5863
|
+
}
|
|
5836
5864
|
if (obj.isSpaceV2 !== undefined) {
|
|
5837
5865
|
const obj_isSpaceV2 = obj.isSpaceV2;
|
|
5838
5866
|
const path_isSpaceV2 = path + '.isSpaceV2';
|
|
@@ -5877,16 +5905,85 @@ function validate$4(obj, path = 'ManagedContentSpaceRepresentation') {
|
|
|
5877
5905
|
})();
|
|
5878
5906
|
return v_error === undefined ? null : v_error;
|
|
5879
5907
|
}
|
|
5908
|
+
const RepresentationType$2 = 'ManagedContentSpaceRepresentation';
|
|
5909
|
+
function keyBuilder$5(luvio, config) {
|
|
5910
|
+
return keyPrefix + '::' + RepresentationType$2 + ':' + config.id;
|
|
5911
|
+
}
|
|
5912
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
5913
|
+
const keyParams = {
|
|
5914
|
+
id: object.id
|
|
5915
|
+
};
|
|
5916
|
+
return keyBuilder$5(luvio, keyParams);
|
|
5917
|
+
}
|
|
5918
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
5919
|
+
return input;
|
|
5920
|
+
}
|
|
5921
|
+
const select$7 = function ManagedContentSpaceRepresentationSelect() {
|
|
5922
|
+
return {
|
|
5923
|
+
kind: 'Fragment',
|
|
5924
|
+
version: VERSION$2,
|
|
5925
|
+
private: [],
|
|
5926
|
+
opaque: true
|
|
5927
|
+
};
|
|
5928
|
+
};
|
|
5929
|
+
function equals$2(existing, incoming) {
|
|
5930
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
5931
|
+
return false;
|
|
5932
|
+
}
|
|
5933
|
+
return true;
|
|
5934
|
+
}
|
|
5880
5935
|
function deepFreeze$2(input) {
|
|
5881
5936
|
const input_supportedLanguages = input.supportedLanguages;
|
|
5882
5937
|
if (input_supportedLanguages !== undefined) {
|
|
5883
5938
|
ObjectFreeze(input_supportedLanguages);
|
|
5884
5939
|
}
|
|
5885
5940
|
ObjectFreeze(input);
|
|
5941
|
+
}
|
|
5942
|
+
const ingest$2 = function ManagedContentSpaceRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
5943
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5944
|
+
const validateError = validate$4(input);
|
|
5945
|
+
if (validateError !== null) {
|
|
5946
|
+
throw validateError;
|
|
5947
|
+
}
|
|
5948
|
+
}
|
|
5949
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
5950
|
+
const existingRecord = store.readEntry(key);
|
|
5951
|
+
const ttlToUse = TTL$2;
|
|
5952
|
+
let incomingRecord = normalize$2(input, store.readEntry(key), {
|
|
5953
|
+
fullPath: key,
|
|
5954
|
+
parent: path.parent,
|
|
5955
|
+
propertyName: path.propertyName,
|
|
5956
|
+
ttl: ttlToUse
|
|
5957
|
+
});
|
|
5958
|
+
deepFreeze$2(input);
|
|
5959
|
+
if (existingRecord === undefined || equals$2(existingRecord, incomingRecord) === false) {
|
|
5960
|
+
luvio.storePublish(key, incomingRecord);
|
|
5961
|
+
}
|
|
5962
|
+
{
|
|
5963
|
+
const storeMetadataParams = {
|
|
5964
|
+
ttl: ttlToUse,
|
|
5965
|
+
namespace: "CMSAuthoring",
|
|
5966
|
+
version: VERSION$2,
|
|
5967
|
+
representationName: RepresentationType$2,
|
|
5968
|
+
};
|
|
5969
|
+
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
5970
|
+
}
|
|
5971
|
+
return createLink(key);
|
|
5972
|
+
};
|
|
5973
|
+
function getTypeCacheKeys$2(luvio, input, fullPathFactory) {
|
|
5974
|
+
const rootKeySet = new StoreKeyMap();
|
|
5975
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
5976
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
5977
|
+
rootKeySet.set(rootKey, {
|
|
5978
|
+
namespace: keyPrefix,
|
|
5979
|
+
representationName: RepresentationType$2,
|
|
5980
|
+
mergeable: false
|
|
5981
|
+
});
|
|
5982
|
+
return rootKeySet;
|
|
5886
5983
|
}
|
|
5887
5984
|
|
|
5888
5985
|
const TTL$1 = 100;
|
|
5889
|
-
const VERSION$1 = "
|
|
5986
|
+
const VERSION$1 = "292efba3a426b62d2af39a38fd3464b0";
|
|
5890
5987
|
function validate$3(obj, path = 'ManagedContentSpaceCollectionRepresentation') {
|
|
5891
5988
|
const v_error = (() => {
|
|
5892
5989
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -5914,7 +6011,7 @@ const RepresentationType$1 = 'ManagedContentSpaceCollectionRepresentation';
|
|
|
5914
6011
|
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
5915
6012
|
return input;
|
|
5916
6013
|
}
|
|
5917
|
-
const select$
|
|
6014
|
+
const select$6 = function ManagedContentSpaceCollectionRepresentationSelect() {
|
|
5918
6015
|
return {
|
|
5919
6016
|
kind: 'Fragment',
|
|
5920
6017
|
version: VERSION$1,
|
|
@@ -5980,22 +6077,22 @@ function getTypeCacheKeys$1(luvio, input, fullPathFactory) {
|
|
|
5980
6077
|
return rootKeySet;
|
|
5981
6078
|
}
|
|
5982
6079
|
|
|
5983
|
-
function select$
|
|
5984
|
-
return select$
|
|
6080
|
+
function select$5(luvio, params) {
|
|
6081
|
+
return select$6();
|
|
5985
6082
|
}
|
|
5986
|
-
function keyBuilder$
|
|
6083
|
+
function keyBuilder$4(luvio, params) {
|
|
5987
6084
|
return keyPrefix + '::ManagedContentSpaceCollectionRepresentation:(' + 'page:' + params.queryParams.page + ',' + 'pageSize:' + params.queryParams.pageSize + ')';
|
|
5988
6085
|
}
|
|
5989
|
-
function getResponseCacheKeys$
|
|
5990
|
-
return getTypeCacheKeys$1(luvio, response, () => keyBuilder$
|
|
6086
|
+
function getResponseCacheKeys$4(luvio, resourceParams, response) {
|
|
6087
|
+
return getTypeCacheKeys$1(luvio, response, () => keyBuilder$4(luvio, resourceParams));
|
|
5991
6088
|
}
|
|
5992
|
-
function ingestSuccess$
|
|
6089
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
5993
6090
|
const { body } = response;
|
|
5994
|
-
const key = keyBuilder$
|
|
6091
|
+
const key = keyBuilder$4(luvio, resourceParams);
|
|
5995
6092
|
luvio.storeIngest(key, ingest$1, body);
|
|
5996
6093
|
const snapshot = luvio.storeLookup({
|
|
5997
6094
|
recordId: key,
|
|
5998
|
-
node: select$
|
|
6095
|
+
node: select$5(),
|
|
5999
6096
|
variables: {},
|
|
6000
6097
|
}, snapshotRefresh);
|
|
6001
6098
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -6005,8 +6102,8 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
6005
6102
|
}
|
|
6006
6103
|
return snapshot;
|
|
6007
6104
|
}
|
|
6008
|
-
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
6009
|
-
const key = keyBuilder$
|
|
6105
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
6106
|
+
const key = keyBuilder$4(luvio, params);
|
|
6010
6107
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
6011
6108
|
const storeMetadataParams = {
|
|
6012
6109
|
ttl: TTL$1,
|
|
@@ -6017,7 +6114,7 @@ function ingestError(luvio, params, error, snapshotRefresh) {
|
|
|
6017
6114
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
6018
6115
|
return errorSnapshot;
|
|
6019
6116
|
}
|
|
6020
|
-
function createResourceRequest$
|
|
6117
|
+
function createResourceRequest$4(config) {
|
|
6021
6118
|
const headers = {};
|
|
6022
6119
|
return {
|
|
6023
6120
|
baseUri: '/services/data/v58.0',
|
|
@@ -6038,7 +6135,7 @@ const getManagedContentSpaces_ConfigPropertyNames = {
|
|
|
6038
6135
|
optional: ['page', 'pageSize']
|
|
6039
6136
|
}
|
|
6040
6137
|
};
|
|
6041
|
-
function createResourceParams$
|
|
6138
|
+
function createResourceParams$4(config) {
|
|
6042
6139
|
const resourceParams = {
|
|
6043
6140
|
queryParams: {
|
|
6044
6141
|
page: config.page, pageSize: config.pageSize
|
|
@@ -6046,11 +6143,11 @@ function createResourceParams$2(config) {
|
|
|
6046
6143
|
};
|
|
6047
6144
|
return resourceParams;
|
|
6048
6145
|
}
|
|
6049
|
-
function keyBuilder$
|
|
6050
|
-
const resourceParams = createResourceParams$
|
|
6051
|
-
return keyBuilder$
|
|
6146
|
+
function keyBuilder$3(luvio, config) {
|
|
6147
|
+
const resourceParams = createResourceParams$4(config);
|
|
6148
|
+
return keyBuilder$4(luvio, resourceParams);
|
|
6052
6149
|
}
|
|
6053
|
-
function typeCheckConfig$
|
|
6150
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
6054
6151
|
const config = {};
|
|
6055
6152
|
const untrustedConfig_page = untrustedConfig.page;
|
|
6056
6153
|
if (typeof untrustedConfig_page === 'number' && Math.floor(untrustedConfig_page) === untrustedConfig_page) {
|
|
@@ -6062,43 +6159,204 @@ function typeCheckConfig$2(untrustedConfig) {
|
|
|
6062
6159
|
}
|
|
6063
6160
|
return config;
|
|
6064
6161
|
}
|
|
6065
|
-
function validateAdapterConfig$
|
|
6162
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
6066
6163
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
6067
6164
|
return null;
|
|
6068
6165
|
}
|
|
6069
6166
|
if (process.env.NODE_ENV !== 'production') {
|
|
6070
6167
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
6071
6168
|
}
|
|
6072
|
-
const config = typeCheckConfig$
|
|
6169
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
6170
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
6171
|
+
return null;
|
|
6172
|
+
}
|
|
6173
|
+
return config;
|
|
6174
|
+
}
|
|
6175
|
+
function adapterFragment$1(luvio, config) {
|
|
6176
|
+
createResourceParams$4(config);
|
|
6177
|
+
return select$5();
|
|
6178
|
+
}
|
|
6179
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
6180
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
6181
|
+
config,
|
|
6182
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
6183
|
+
});
|
|
6184
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
6185
|
+
}
|
|
6186
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
6187
|
+
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
6188
|
+
config,
|
|
6189
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
6190
|
+
});
|
|
6191
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
6192
|
+
}
|
|
6193
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
6194
|
+
const resourceParams = createResourceParams$4(config);
|
|
6195
|
+
const request = createResourceRequest$4(resourceParams);
|
|
6196
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
6197
|
+
.then((response) => {
|
|
6198
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => getResponseCacheKeys$4(luvio, resourceParams, response.body));
|
|
6199
|
+
}, (response) => {
|
|
6200
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
6201
|
+
});
|
|
6202
|
+
}
|
|
6203
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
6204
|
+
const { luvio, config } = context;
|
|
6205
|
+
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
6206
|
+
const dispatchOptions = {
|
|
6207
|
+
resourceRequestContext: {
|
|
6208
|
+
requestCorrelator,
|
|
6209
|
+
luvioRequestMethod: undefined,
|
|
6210
|
+
},
|
|
6211
|
+
eventObservers
|
|
6212
|
+
};
|
|
6213
|
+
if (networkPriority !== 'normal') {
|
|
6214
|
+
dispatchOptions.overrides = {
|
|
6215
|
+
priority: networkPriority
|
|
6216
|
+
};
|
|
6217
|
+
}
|
|
6218
|
+
return buildNetworkSnapshot$4(luvio, config, dispatchOptions);
|
|
6219
|
+
}
|
|
6220
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
6221
|
+
const { luvio, config } = context;
|
|
6222
|
+
const selector = {
|
|
6223
|
+
recordId: keyBuilder$3(luvio, config),
|
|
6224
|
+
node: adapterFragment$1(luvio, config),
|
|
6225
|
+
variables: {},
|
|
6226
|
+
};
|
|
6227
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
6228
|
+
config,
|
|
6229
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
6230
|
+
});
|
|
6231
|
+
return cacheSnapshot;
|
|
6232
|
+
}
|
|
6233
|
+
const getManagedContentSpacesAdapterFactory = (luvio) => function CMSAuthoring__getManagedContentSpaces(untrustedConfig, requestContext) {
|
|
6234
|
+
const config = validateAdapterConfig$4(untrustedConfig, getManagedContentSpaces_ConfigPropertyNames);
|
|
6235
|
+
// Invalid or incomplete config
|
|
6236
|
+
if (config === null) {
|
|
6237
|
+
return null;
|
|
6238
|
+
}
|
|
6239
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
6240
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
6241
|
+
};
|
|
6242
|
+
|
|
6243
|
+
function select$4(luvio, params) {
|
|
6244
|
+
return select$7();
|
|
6245
|
+
}
|
|
6246
|
+
function keyBuilder$2(luvio, params) {
|
|
6247
|
+
return keyBuilder$5(luvio, {
|
|
6248
|
+
id: params.urlParams.contentSpaceId
|
|
6249
|
+
});
|
|
6250
|
+
}
|
|
6251
|
+
function getResponseCacheKeys$3(luvio, resourceParams, response) {
|
|
6252
|
+
return getTypeCacheKeys$2(luvio, response);
|
|
6253
|
+
}
|
|
6254
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
6255
|
+
const { body } = response;
|
|
6256
|
+
const key = keyBuilder$2(luvio, resourceParams);
|
|
6257
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
6258
|
+
const snapshot = luvio.storeLookup({
|
|
6259
|
+
recordId: key,
|
|
6260
|
+
node: select$4(),
|
|
6261
|
+
variables: {},
|
|
6262
|
+
}, snapshotRefresh);
|
|
6263
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
6264
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
6265
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
6266
|
+
}
|
|
6267
|
+
}
|
|
6268
|
+
return snapshot;
|
|
6269
|
+
}
|
|
6270
|
+
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
6271
|
+
const key = keyBuilder$2(luvio, params);
|
|
6272
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
6273
|
+
const storeMetadataParams = {
|
|
6274
|
+
ttl: TTL$2,
|
|
6275
|
+
namespace: keyPrefix,
|
|
6276
|
+
version: VERSION$2,
|
|
6277
|
+
representationName: RepresentationType$2
|
|
6278
|
+
};
|
|
6279
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
6280
|
+
return errorSnapshot;
|
|
6281
|
+
}
|
|
6282
|
+
function createResourceRequest$3(config) {
|
|
6283
|
+
const headers = {};
|
|
6284
|
+
return {
|
|
6285
|
+
baseUri: '/services/data/v58.0',
|
|
6286
|
+
basePath: '/connect/cms/spaces/' + config.urlParams.contentSpaceId + '',
|
|
6287
|
+
method: 'get',
|
|
6288
|
+
body: null,
|
|
6289
|
+
urlParams: config.urlParams,
|
|
6290
|
+
queryParams: {},
|
|
6291
|
+
headers,
|
|
6292
|
+
priority: 'normal',
|
|
6293
|
+
};
|
|
6294
|
+
}
|
|
6295
|
+
|
|
6296
|
+
const getManagedContentSpace_ConfigPropertyNames = {
|
|
6297
|
+
displayName: 'getManagedContentSpace',
|
|
6298
|
+
parameters: {
|
|
6299
|
+
required: ['contentSpaceId'],
|
|
6300
|
+
optional: []
|
|
6301
|
+
}
|
|
6302
|
+
};
|
|
6303
|
+
function createResourceParams$3(config) {
|
|
6304
|
+
const resourceParams = {
|
|
6305
|
+
urlParams: {
|
|
6306
|
+
contentSpaceId: config.contentSpaceId
|
|
6307
|
+
}
|
|
6308
|
+
};
|
|
6309
|
+
return resourceParams;
|
|
6310
|
+
}
|
|
6311
|
+
function keyBuilder$1(luvio, config) {
|
|
6312
|
+
const resourceParams = createResourceParams$3(config);
|
|
6313
|
+
return keyBuilder$2(luvio, resourceParams);
|
|
6314
|
+
}
|
|
6315
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
6316
|
+
const config = {};
|
|
6317
|
+
const untrustedConfig_contentSpaceId = untrustedConfig.contentSpaceId;
|
|
6318
|
+
if (typeof untrustedConfig_contentSpaceId === 'string') {
|
|
6319
|
+
config.contentSpaceId = untrustedConfig_contentSpaceId;
|
|
6320
|
+
}
|
|
6321
|
+
return config;
|
|
6322
|
+
}
|
|
6323
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
6324
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
6325
|
+
return null;
|
|
6326
|
+
}
|
|
6327
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
6328
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
6329
|
+
}
|
|
6330
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
6073
6331
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
6074
6332
|
return null;
|
|
6075
6333
|
}
|
|
6076
6334
|
return config;
|
|
6077
6335
|
}
|
|
6078
6336
|
function adapterFragment(luvio, config) {
|
|
6079
|
-
createResourceParams$
|
|
6080
|
-
return select$
|
|
6337
|
+
createResourceParams$3(config);
|
|
6338
|
+
return select$4();
|
|
6081
6339
|
}
|
|
6082
6340
|
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
6083
|
-
const snapshot = ingestSuccess$
|
|
6341
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
6084
6342
|
config,
|
|
6085
|
-
resolve: () => buildNetworkSnapshot$
|
|
6343
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
6086
6344
|
});
|
|
6087
6345
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
6088
6346
|
}
|
|
6089
6347
|
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
6090
6348
|
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
6091
6349
|
config,
|
|
6092
|
-
resolve: () => buildNetworkSnapshot$
|
|
6350
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
6093
6351
|
});
|
|
6094
6352
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
6095
6353
|
}
|
|
6096
|
-
function buildNetworkSnapshot$
|
|
6097
|
-
const resourceParams = createResourceParams$
|
|
6098
|
-
const request = createResourceRequest$
|
|
6354
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
6355
|
+
const resourceParams = createResourceParams$3(config);
|
|
6356
|
+
const request = createResourceRequest$3(resourceParams);
|
|
6099
6357
|
return luvio.dispatchResourceRequest(request, options)
|
|
6100
6358
|
.then((response) => {
|
|
6101
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => getResponseCacheKeys$
|
|
6359
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => getResponseCacheKeys$3(luvio, resourceParams, response.body));
|
|
6102
6360
|
}, (response) => {
|
|
6103
6361
|
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
6104
6362
|
});
|
|
@@ -6118,7 +6376,7 @@ function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext)
|
|
|
6118
6376
|
priority: networkPriority
|
|
6119
6377
|
};
|
|
6120
6378
|
}
|
|
6121
|
-
return buildNetworkSnapshot$
|
|
6379
|
+
return buildNetworkSnapshot$3(luvio, config, dispatchOptions);
|
|
6122
6380
|
}
|
|
6123
6381
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
6124
6382
|
const { luvio, config } = context;
|
|
@@ -6129,12 +6387,12 @@ function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
|
6129
6387
|
};
|
|
6130
6388
|
const cacheSnapshot = storeLookup(selector, {
|
|
6131
6389
|
config,
|
|
6132
|
-
resolve: () => buildNetworkSnapshot$
|
|
6390
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
6133
6391
|
});
|
|
6134
6392
|
return cacheSnapshot;
|
|
6135
6393
|
}
|
|
6136
|
-
const
|
|
6137
|
-
const config = validateAdapterConfig$
|
|
6394
|
+
const getManagedContentSpaceAdapterFactory = (luvio) => function CMSAuthoring__getManagedContentSpace(untrustedConfig, requestContext) {
|
|
6395
|
+
const config = validateAdapterConfig$3(untrustedConfig, getManagedContentSpace_ConfigPropertyNames);
|
|
6138
6396
|
// Invalid or incomplete config
|
|
6139
6397
|
if (config === null) {
|
|
6140
6398
|
return null;
|
|
@@ -6143,6 +6401,162 @@ const getManagedContentSpacesAdapterFactory = (luvio) => function CMSAuthoring__
|
|
|
6143
6401
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
6144
6402
|
};
|
|
6145
6403
|
|
|
6404
|
+
function select$3(luvio, params) {
|
|
6405
|
+
return select$7();
|
|
6406
|
+
}
|
|
6407
|
+
function getResponseCacheKeys$2(luvio, resourceParams, response) {
|
|
6408
|
+
return getTypeCacheKeys$2(luvio, response);
|
|
6409
|
+
}
|
|
6410
|
+
function ingestSuccess$2(luvio, resourceParams, response) {
|
|
6411
|
+
const { body } = response;
|
|
6412
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
6413
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
6414
|
+
const snapshot = luvio.storeLookup({
|
|
6415
|
+
recordId: key,
|
|
6416
|
+
node: select$3(),
|
|
6417
|
+
variables: {},
|
|
6418
|
+
});
|
|
6419
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
6420
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
6421
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
6422
|
+
}
|
|
6423
|
+
}
|
|
6424
|
+
return snapshot;
|
|
6425
|
+
}
|
|
6426
|
+
function createResourceRequest$2(config) {
|
|
6427
|
+
const headers = {};
|
|
6428
|
+
return {
|
|
6429
|
+
baseUri: '/services/data/v58.0',
|
|
6430
|
+
basePath: '/connect/cms/spaces/' + config.urlParams.contentSpaceId + '',
|
|
6431
|
+
method: 'patch',
|
|
6432
|
+
body: config.body,
|
|
6433
|
+
urlParams: config.urlParams,
|
|
6434
|
+
queryParams: {},
|
|
6435
|
+
headers,
|
|
6436
|
+
priority: 'normal',
|
|
6437
|
+
};
|
|
6438
|
+
}
|
|
6439
|
+
|
|
6440
|
+
const patchManagedContentSpace_ConfigPropertyNames = {
|
|
6441
|
+
displayName: 'patchManagedContentSpace',
|
|
6442
|
+
parameters: {
|
|
6443
|
+
required: ['contentSpaceId', 'channels', 'collaborators', 'defaultLanguage', 'description', 'isSpaceV2', 'isUndeletable', 'name', 'supportedLanguages'],
|
|
6444
|
+
optional: []
|
|
6445
|
+
}
|
|
6446
|
+
};
|
|
6447
|
+
function createResourceParams$2(config) {
|
|
6448
|
+
const resourceParams = {
|
|
6449
|
+
urlParams: {
|
|
6450
|
+
contentSpaceId: config.contentSpaceId
|
|
6451
|
+
},
|
|
6452
|
+
body: {
|
|
6453
|
+
channels: config.channels, collaborators: config.collaborators, defaultLanguage: config.defaultLanguage, description: config.description, isSpaceV2: config.isSpaceV2, isUndeletable: config.isUndeletable, name: config.name, supportedLanguages: config.supportedLanguages
|
|
6454
|
+
}
|
|
6455
|
+
};
|
|
6456
|
+
return resourceParams;
|
|
6457
|
+
}
|
|
6458
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
6459
|
+
const config = {};
|
|
6460
|
+
const untrustedConfig_contentSpaceId = untrustedConfig.contentSpaceId;
|
|
6461
|
+
if (typeof untrustedConfig_contentSpaceId === 'string') {
|
|
6462
|
+
config.contentSpaceId = untrustedConfig_contentSpaceId;
|
|
6463
|
+
}
|
|
6464
|
+
const untrustedConfig_channels = untrustedConfig.channels;
|
|
6465
|
+
if (ArrayIsArray$1(untrustedConfig_channels)) {
|
|
6466
|
+
const untrustedConfig_channels_array = [];
|
|
6467
|
+
for (let i = 0, arrayLength = untrustedConfig_channels.length; i < arrayLength; i++) {
|
|
6468
|
+
const untrustedConfig_channels_item = untrustedConfig_channels[i];
|
|
6469
|
+
if (typeof untrustedConfig_channels_item === 'string') {
|
|
6470
|
+
untrustedConfig_channels_array.push(untrustedConfig_channels_item);
|
|
6471
|
+
}
|
|
6472
|
+
}
|
|
6473
|
+
config.channels = untrustedConfig_channels_array;
|
|
6474
|
+
}
|
|
6475
|
+
const untrustedConfig_collaborators = untrustedConfig.collaborators;
|
|
6476
|
+
if (ArrayIsArray$1(untrustedConfig_collaborators)) {
|
|
6477
|
+
const untrustedConfig_collaborators_array = [];
|
|
6478
|
+
for (let i = 0, arrayLength = untrustedConfig_collaborators.length; i < arrayLength; i++) {
|
|
6479
|
+
const untrustedConfig_collaborators_item = untrustedConfig_collaborators[i];
|
|
6480
|
+
if (untrustedIsObject(untrustedConfig_collaborators_item)) {
|
|
6481
|
+
const untrustedConfig_collaborators_item_object = {};
|
|
6482
|
+
if (untrustedConfig_collaborators_item_object !== undefined && Object.keys(untrustedConfig_collaborators_item_object).length >= 0) {
|
|
6483
|
+
untrustedConfig_collaborators_array.push(untrustedConfig_collaborators_item_object);
|
|
6484
|
+
}
|
|
6485
|
+
}
|
|
6486
|
+
}
|
|
6487
|
+
config.collaborators = untrustedConfig_collaborators_array;
|
|
6488
|
+
}
|
|
6489
|
+
const untrustedConfig_defaultLanguage = untrustedConfig.defaultLanguage;
|
|
6490
|
+
if (typeof untrustedConfig_defaultLanguage === 'string') {
|
|
6491
|
+
config.defaultLanguage = untrustedConfig_defaultLanguage;
|
|
6492
|
+
}
|
|
6493
|
+
const untrustedConfig_description = untrustedConfig.description;
|
|
6494
|
+
if (typeof untrustedConfig_description === 'string') {
|
|
6495
|
+
config.description = untrustedConfig_description;
|
|
6496
|
+
}
|
|
6497
|
+
const untrustedConfig_isSpaceV2 = untrustedConfig.isSpaceV2;
|
|
6498
|
+
if (typeof untrustedConfig_isSpaceV2 === 'boolean') {
|
|
6499
|
+
config.isSpaceV2 = untrustedConfig_isSpaceV2;
|
|
6500
|
+
}
|
|
6501
|
+
const untrustedConfig_isUndeletable = untrustedConfig.isUndeletable;
|
|
6502
|
+
if (typeof untrustedConfig_isUndeletable === 'boolean') {
|
|
6503
|
+
config.isUndeletable = untrustedConfig_isUndeletable;
|
|
6504
|
+
}
|
|
6505
|
+
const untrustedConfig_name = untrustedConfig.name;
|
|
6506
|
+
if (typeof untrustedConfig_name === 'string') {
|
|
6507
|
+
config.name = untrustedConfig_name;
|
|
6508
|
+
}
|
|
6509
|
+
const untrustedConfig_supportedLanguages = untrustedConfig.supportedLanguages;
|
|
6510
|
+
if (ArrayIsArray$1(untrustedConfig_supportedLanguages)) {
|
|
6511
|
+
const untrustedConfig_supportedLanguages_array = [];
|
|
6512
|
+
for (let i = 0, arrayLength = untrustedConfig_supportedLanguages.length; i < arrayLength; i++) {
|
|
6513
|
+
const untrustedConfig_supportedLanguages_item = untrustedConfig_supportedLanguages[i];
|
|
6514
|
+
if (typeof untrustedConfig_supportedLanguages_item === 'string') {
|
|
6515
|
+
untrustedConfig_supportedLanguages_array.push(untrustedConfig_supportedLanguages_item);
|
|
6516
|
+
}
|
|
6517
|
+
}
|
|
6518
|
+
config.supportedLanguages = untrustedConfig_supportedLanguages_array;
|
|
6519
|
+
}
|
|
6520
|
+
return config;
|
|
6521
|
+
}
|
|
6522
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
6523
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
6524
|
+
return null;
|
|
6525
|
+
}
|
|
6526
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
6527
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
6528
|
+
}
|
|
6529
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
6530
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
6531
|
+
return null;
|
|
6532
|
+
}
|
|
6533
|
+
return config;
|
|
6534
|
+
}
|
|
6535
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
6536
|
+
const resourceParams = createResourceParams$2(config);
|
|
6537
|
+
const request = createResourceRequest$2(resourceParams);
|
|
6538
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
6539
|
+
.then((response) => {
|
|
6540
|
+
return luvio.handleSuccessResponse(() => {
|
|
6541
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response);
|
|
6542
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
6543
|
+
}, () => getResponseCacheKeys$2(luvio, resourceParams, response.body));
|
|
6544
|
+
}, (response) => {
|
|
6545
|
+
deepFreeze$u(response);
|
|
6546
|
+
throw response;
|
|
6547
|
+
});
|
|
6548
|
+
}
|
|
6549
|
+
const patchManagedContentSpaceAdapterFactory = (luvio) => {
|
|
6550
|
+
return function patchManagedContentSpace(untrustedConfig) {
|
|
6551
|
+
const config = validateAdapterConfig$2(untrustedConfig, patchManagedContentSpace_ConfigPropertyNames);
|
|
6552
|
+
// Invalid or incomplete config
|
|
6553
|
+
if (config === null) {
|
|
6554
|
+
throw new Error('Invalid config for "patchManagedContentSpace"');
|
|
6555
|
+
}
|
|
6556
|
+
return buildNetworkSnapshot$2(luvio, config);
|
|
6557
|
+
};
|
|
6558
|
+
};
|
|
6559
|
+
|
|
6146
6560
|
function validate$2(obj, path = 'ManagedContentExportContentV2JobRequestInputRepresentation') {
|
|
6147
6561
|
const v_error = (() => {
|
|
6148
6562
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -6657,4 +7071,4 @@ const createManagedContentImportV2JobAdapterFactory = (luvio) => {
|
|
|
6657
7071
|
};
|
|
6658
7072
|
};
|
|
6659
7073
|
|
|
6660
|
-
export { createDeploymentAdapterFactory, createManagedContentAdapterFactory, createManagedContentExportV2JobAdapterFactory, createManagedContentImportV2JobAdapterFactory, createManagedContentVariantAdapterFactory, createTranslationV2JobAdapterFactory, deleteManagedContentVariantAdapterFactory, getCollectionItemsAdapterFactory, getManagedContentAdapterFactory, getManagedContentByFolderIdAdapterFactory, getManagedContentReferencedByAdapterFactory, getManagedContentSpacesAdapterFactory, getManagedContentVariantAdapterFactory, getManagedContentVariantReferencesAdapterFactory, getManagedContentVariantRenditionAdapterFactory, getManagedContentVariantVersionsAdapterFactory, getSearchResultsAdapterFactory, publishManagedContentAdapterFactory, replaceManagedContentVariantAdapterFactory, unpublishManagedContentAdapterFactory };
|
|
7074
|
+
export { createDeploymentAdapterFactory, createManagedContentAdapterFactory, createManagedContentExportV2JobAdapterFactory, createManagedContentImportV2JobAdapterFactory, createManagedContentVariantAdapterFactory, createTranslationV2JobAdapterFactory, deleteManagedContentVariantAdapterFactory, getCollectionItemsAdapterFactory, getManagedContentAdapterFactory, getManagedContentByFolderIdAdapterFactory, getManagedContentReferencedByAdapterFactory, getManagedContentSpaceAdapterFactory, getManagedContentSpacesAdapterFactory, getManagedContentVariantAdapterFactory, getManagedContentVariantReferencesAdapterFactory, getManagedContentVariantRenditionAdapterFactory, getManagedContentVariantVersionsAdapterFactory, getSearchResultsAdapterFactory, patchManagedContentSpaceAdapterFactory, publishManagedContentAdapterFactory, replaceManagedContentVariantAdapterFactory, unpublishManagedContentAdapterFactory };
|