@salesforce/lds-adapters-cms-delivery 1.213.0 → 1.213.2

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.
@@ -4,7 +4,7 @@
4
4
  * For full license text, see the LICENSE.txt file
5
5
  */
6
6
 
7
- import { serializeStructuredKey, deepFreeze, typeCheckScalars, StoreKeyMap, typeCheckArrayOfScalars } from '@luvio/engine';
7
+ import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$6, typeCheckScalars, StoreKeyMap, typeCheckArrayOfScalars } from '@luvio/engine';
8
8
 
9
9
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
10
  const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
@@ -48,6 +48,24 @@ const snapshotRefreshOptions = {
48
48
  },
49
49
  }
50
50
  };
51
+ function generateParamConfigMetadata(name, required, coerceFn) {
52
+ return {
53
+ name,
54
+ required,
55
+ coerceFn,
56
+ };
57
+ }
58
+ function buildAdapterValidationConfig(displayName, paramsMeta) {
59
+ const required = paramsMeta.filter(p => p.required).map(p => p.name);
60
+ const optional = paramsMeta.filter(p => !p.required).map(p => p.name);
61
+ return {
62
+ displayName,
63
+ parameters: {
64
+ required,
65
+ optional,
66
+ }
67
+ };
68
+ }
51
69
  const keyPrefix = 'CMS';
52
70
 
53
71
  const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
@@ -305,26 +323,8 @@ const ingest$4 = function ManagedContentCollectionItemsRepresentationIngest(inpu
305
323
  }
306
324
  }
307
325
  const key = path.fullPath;
308
- const existingRecord = store.readEntry(key);
309
326
  const ttlToUse = TTL$3;
310
- let incomingRecord = normalize$4(input, store.readEntry(key), {
311
- fullPath: key,
312
- parent: path.parent,
313
- propertyName: path.propertyName,
314
- ttl: ttlToUse
315
- });
316
- if (existingRecord === undefined || equals$4(existingRecord, incomingRecord) === false) {
317
- luvio.storePublish(key, incomingRecord);
318
- }
319
- {
320
- const storeMetadataParams = {
321
- ttl: ttlToUse,
322
- namespace: "CMS",
323
- version: VERSION$4,
324
- representationName: RepresentationType$4,
325
- };
326
- luvio.publishStoreMetadata(key, storeMetadataParams);
327
- }
327
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "CMS", VERSION$4, RepresentationType$4, equals$4);
328
328
  return createLink(key);
329
329
  };
330
330
  function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
@@ -399,13 +399,13 @@ function onFetchResponseSuccess$9(luvio, config, resourceParams, response) {
399
399
  return onFetchResponseSuccess$8(luvio, config, updatedResourceParams, response);
400
400
  }
401
401
 
402
- const getCollectionItemsForChannel_ConfigPropertyNames = {
403
- displayName: 'getCollectionItemsForChannel',
404
- parameters: {
405
- required: ['channelId', 'collectionKeyOrId'],
406
- optional: ['language']
407
- }
408
- };
402
+ const adapterName$5 = 'getCollectionItemsForChannel';
403
+ const getCollectionItemsForChannel_ConfigPropertyMetadata = [
404
+ generateParamConfigMetadata('channelId', true),
405
+ generateParamConfigMetadata('collectionKeyOrId', true),
406
+ generateParamConfigMetadata('language', false),
407
+ ];
408
+ const getCollectionItemsForChannel_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getCollectionItemsForChannel_ConfigPropertyMetadata);
409
409
  function createResourceParams$5(config) {
410
410
  const resourceParams = {
411
411
  urlParams: {
@@ -476,21 +476,7 @@ function buildNetworkSnapshot$5(luvio, config, options) {
476
476
  });
477
477
  }
478
478
  function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
479
- const { luvio, config } = context;
480
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
481
- const dispatchOptions = {
482
- resourceRequestContext: {
483
- requestCorrelator,
484
- luvioRequestMethod: undefined,
485
- },
486
- eventObservers
487
- };
488
- if (networkPriority !== 'normal') {
489
- dispatchOptions.overrides = {
490
- priority: networkPriority
491
- };
492
- }
493
- return buildNetworkSnapshot$5(luvio, config, dispatchOptions);
479
+ return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
494
480
  }
495
481
  function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
496
482
  const { luvio, config } = context;
@@ -625,26 +611,8 @@ const ingest$3 = function ManagedContentCollectionMetadataRepresentationIngest(i
625
611
  }
626
612
  }
627
613
  const key = path.fullPath;
628
- const existingRecord = store.readEntry(key);
629
614
  const ttlToUse = TTL$2;
630
- let incomingRecord = normalize$3(input, store.readEntry(key), {
631
- fullPath: key,
632
- parent: path.parent,
633
- propertyName: path.propertyName,
634
- ttl: ttlToUse
635
- });
636
- if (existingRecord === undefined || equals$3(existingRecord, incomingRecord) === false) {
637
- luvio.storePublish(key, incomingRecord);
638
- }
639
- {
640
- const storeMetadataParams = {
641
- ttl: ttlToUse,
642
- namespace: "CMS",
643
- version: VERSION$3,
644
- representationName: RepresentationType$3,
645
- };
646
- luvio.publishStoreMetadata(key, storeMetadataParams);
647
- }
615
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "CMS", VERSION$3, RepresentationType$3, equals$3);
648
616
  return createLink(key);
649
617
  };
650
618
  function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
@@ -719,13 +687,14 @@ function onFetchResponseSuccess$7(luvio, config, resourceParams, response) {
719
687
  return onFetchResponseSuccess$6(luvio, config, updatedResourceParams, response);
720
688
  }
721
689
 
722
- const getCollectionMetadataForChannel_ConfigPropertyNames = {
723
- displayName: 'getCollectionMetadataForChannel',
724
- parameters: {
725
- required: ['channelId', 'collectionKeyOrId'],
726
- optional: ['expandMetadata', 'language']
727
- }
728
- };
690
+ const adapterName$4 = 'getCollectionMetadataForChannel';
691
+ const getCollectionMetadataForChannel_ConfigPropertyMetadata = [
692
+ generateParamConfigMetadata('channelId', true),
693
+ generateParamConfigMetadata('collectionKeyOrId', true),
694
+ generateParamConfigMetadata('expandMetadata', false),
695
+ generateParamConfigMetadata('language', false),
696
+ ];
697
+ const getCollectionMetadataForChannel_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getCollectionMetadataForChannel_ConfigPropertyMetadata);
729
698
  function createResourceParams$4(config) {
730
699
  const resourceParams = {
731
700
  urlParams: {
@@ -797,21 +766,7 @@ function buildNetworkSnapshot$4(luvio, config, options) {
797
766
  });
798
767
  }
799
768
  function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
800
- const { luvio, config } = context;
801
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
802
- const dispatchOptions = {
803
- resourceRequestContext: {
804
- requestCorrelator,
805
- luvioRequestMethod: undefined,
806
- },
807
- eventObservers
808
- };
809
- if (networkPriority !== 'normal') {
810
- dispatchOptions.overrides = {
811
- priority: networkPriority
812
- };
813
- }
814
- return buildNetworkSnapshot$4(luvio, config, dispatchOptions);
769
+ return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
815
770
  }
816
771
  function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
817
772
  const { luvio, config } = context;
@@ -1152,26 +1107,8 @@ const ingest$2 = function ManagedContentVersionCollectionRepresentationIngest(in
1152
1107
  }
1153
1108
  }
1154
1109
  const key = path.fullPath;
1155
- const existingRecord = store.readEntry(key);
1156
1110
  const ttlToUse = TTL$1;
1157
- let incomingRecord = normalize$2(input, store.readEntry(key), {
1158
- fullPath: key,
1159
- parent: path.parent,
1160
- propertyName: path.propertyName,
1161
- ttl: ttlToUse
1162
- });
1163
- if (existingRecord === undefined || equals$2(existingRecord, incomingRecord) === false) {
1164
- luvio.storePublish(key, incomingRecord);
1165
- }
1166
- {
1167
- const storeMetadataParams = {
1168
- ttl: ttlToUse,
1169
- namespace: "CMS",
1170
- version: VERSION$2,
1171
- representationName: RepresentationType$2,
1172
- };
1173
- luvio.publishStoreMetadata(key, storeMetadataParams);
1174
- }
1111
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "CMS", VERSION$2, RepresentationType$2, equals$2);
1175
1112
  return createLink(key);
1176
1113
  };
1177
1114
  function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
@@ -1236,13 +1173,19 @@ function createResourceRequest$3(config) {
1236
1173
  };
1237
1174
  }
1238
1175
 
1239
- const listContent_ConfigPropertyNames = {
1240
- displayName: 'listContent',
1241
- parameters: {
1242
- required: ['communityId'],
1243
- optional: ['contentKeys', 'language', 'managedContentIds', 'managedContentType', 'page', 'pageSize', 'showAbsoluteUrl', 'topics']
1244
- }
1245
- };
1176
+ const adapterName$3 = 'listContent';
1177
+ const listContent_ConfigPropertyMetadata = [
1178
+ generateParamConfigMetadata('communityId', true),
1179
+ generateParamConfigMetadata('contentKeys', false),
1180
+ generateParamConfigMetadata('language', false),
1181
+ generateParamConfigMetadata('managedContentIds', false),
1182
+ generateParamConfigMetadata('managedContentType', false),
1183
+ generateParamConfigMetadata('page', false),
1184
+ generateParamConfigMetadata('pageSize', false),
1185
+ generateParamConfigMetadata('showAbsoluteUrl', false),
1186
+ generateParamConfigMetadata('topics', false),
1187
+ ];
1188
+ const listContent_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, listContent_ConfigPropertyMetadata);
1246
1189
  function createResourceParams$3(config) {
1247
1190
  const resourceParams = {
1248
1191
  urlParams: {
@@ -1321,21 +1264,7 @@ function buildNetworkSnapshot$3(luvio, config, options) {
1321
1264
  });
1322
1265
  }
1323
1266
  function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
1324
- const { luvio, config } = context;
1325
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
1326
- const dispatchOptions = {
1327
- resourceRequestContext: {
1328
- requestCorrelator,
1329
- luvioRequestMethod: undefined,
1330
- },
1331
- eventObservers
1332
- };
1333
- if (networkPriority !== 'normal') {
1334
- dispatchOptions.overrides = {
1335
- priority: networkPriority
1336
- };
1337
- }
1338
- return buildNetworkSnapshot$3(luvio, config, dispatchOptions);
1267
+ return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
1339
1268
  }
1340
1269
  function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
1341
1270
  const { luvio, config } = context;
@@ -1518,26 +1447,8 @@ const ingest$1 = function ManagedContentVersionInternalRepresentationIngest(inpu
1518
1447
  }
1519
1448
  }
1520
1449
  const key = path.fullPath;
1521
- const existingRecord = store.readEntry(key);
1522
1450
  const ttlToUse = TTL;
1523
- let incomingRecord = normalize$1(input, store.readEntry(key), {
1524
- fullPath: key,
1525
- parent: path.parent,
1526
- propertyName: path.propertyName,
1527
- ttl: ttlToUse
1528
- });
1529
- if (existingRecord === undefined || equals$1(existingRecord, incomingRecord) === false) {
1530
- luvio.storePublish(key, incomingRecord);
1531
- }
1532
- {
1533
- const storeMetadataParams = {
1534
- ttl: ttlToUse,
1535
- namespace: "CMS",
1536
- version: VERSION$1,
1537
- representationName: RepresentationType$1,
1538
- };
1539
- luvio.publishStoreMetadata(key, storeMetadataParams);
1540
- }
1451
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "CMS", VERSION$1, RepresentationType$1, equals$1);
1541
1452
  return createLink(key);
1542
1453
  };
1543
1454
  function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
@@ -1592,7 +1503,7 @@ function normalize(input, existing, path, luvio, store, timestamp) {
1592
1503
  existing: existing,
1593
1504
  },
1594
1505
  ttl: path.ttl
1595
- }, luvio, store);
1506
+ }, luvio, store, timestamp);
1596
1507
  }
1597
1508
  return input;
1598
1509
  }
@@ -1641,26 +1552,8 @@ const ingest = function ManagedContentVersionInternalCollectionRepresentationIng
1641
1552
  }
1642
1553
  }
1643
1554
  const key = path.fullPath;
1644
- const existingRecord = store.readEntry(key);
1645
1555
  const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
1646
- let incomingRecord = normalize(input, store.readEntry(key), {
1647
- fullPath: key,
1648
- parent: path.parent,
1649
- propertyName: path.propertyName,
1650
- ttl: ttlToUse
1651
- }, luvio, store);
1652
- if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
1653
- luvio.storePublish(key, incomingRecord);
1654
- }
1655
- if (ttlToUse !== undefined) {
1656
- const storeMetadataParams = {
1657
- ttl: ttlToUse,
1658
- namespace: "CMS",
1659
- version: VERSION,
1660
- representationName: RepresentationType,
1661
- };
1662
- luvio.publishStoreMetadata(key, storeMetadataParams);
1663
- }
1556
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "CMS", VERSION, RepresentationType, equals);
1664
1557
  return createLink(key);
1665
1558
  };
1666
1559
  function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
@@ -1723,13 +1616,21 @@ function createResourceRequest$2(config) {
1723
1616
  };
1724
1617
  }
1725
1618
 
1726
- const listContentInternal_ConfigPropertyNames = {
1727
- displayName: 'listContentInternal',
1728
- parameters: {
1729
- required: ['communityId'],
1730
- optional: ['collectionName', 'contentKeys', 'language', 'managedContentIds', 'managedContentType', 'page', 'pageSize', 'queryTerm', 'topics', 'urlNameInList']
1731
- }
1732
- };
1619
+ const adapterName$2 = 'listContentInternal';
1620
+ const listContentInternal_ConfigPropertyMetadata = [
1621
+ generateParamConfigMetadata('communityId', true),
1622
+ generateParamConfigMetadata('collectionName', false),
1623
+ generateParamConfigMetadata('contentKeys', false),
1624
+ generateParamConfigMetadata('language', false),
1625
+ generateParamConfigMetadata('managedContentIds', false),
1626
+ generateParamConfigMetadata('managedContentType', false),
1627
+ generateParamConfigMetadata('page', false),
1628
+ generateParamConfigMetadata('pageSize', false),
1629
+ generateParamConfigMetadata('queryTerm', false),
1630
+ generateParamConfigMetadata('topics', false),
1631
+ generateParamConfigMetadata('urlNameInList', false),
1632
+ ];
1633
+ const listContentInternal_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, listContentInternal_ConfigPropertyMetadata);
1733
1634
  function createResourceParams$2(config) {
1734
1635
  const resourceParams = {
1735
1636
  urlParams: {
@@ -1810,21 +1711,7 @@ function buildNetworkSnapshot$2(luvio, config, options) {
1810
1711
  });
1811
1712
  }
1812
1713
  function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
1813
- const { luvio, config } = context;
1814
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
1815
- const dispatchOptions = {
1816
- resourceRequestContext: {
1817
- requestCorrelator,
1818
- luvioRequestMethod: undefined,
1819
- },
1820
- eventObservers
1821
- };
1822
- if (networkPriority !== 'normal') {
1823
- dispatchOptions.overrides = {
1824
- priority: networkPriority
1825
- };
1826
- }
1827
- return buildNetworkSnapshot$2(luvio, config, dispatchOptions);
1714
+ return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
1828
1715
  }
1829
1716
  function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
1830
1717
  const { luvio, config } = context;
@@ -1911,13 +1798,13 @@ function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
1911
1798
  return onFetchResponseSuccess$2(luvio, config, updatedResourceParams, response);
1912
1799
  }
1913
1800
 
1914
- const getCollectionItemsForSite_ConfigPropertyNames = {
1915
- displayName: 'getCollectionItemsForSite',
1916
- parameters: {
1917
- required: ['collectionKeyOrId', 'siteId'],
1918
- optional: ['language']
1919
- }
1920
- };
1801
+ const adapterName$1 = 'getCollectionItemsForSite';
1802
+ const getCollectionItemsForSite_ConfigPropertyMetadata = [
1803
+ generateParamConfigMetadata('collectionKeyOrId', true),
1804
+ generateParamConfigMetadata('siteId', true),
1805
+ generateParamConfigMetadata('language', false),
1806
+ ];
1807
+ const getCollectionItemsForSite_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getCollectionItemsForSite_ConfigPropertyMetadata);
1921
1808
  function createResourceParams$1(config) {
1922
1809
  const resourceParams = {
1923
1810
  urlParams: {
@@ -1988,21 +1875,7 @@ function buildNetworkSnapshot$1(luvio, config, options) {
1988
1875
  });
1989
1876
  }
1990
1877
  function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
1991
- const { luvio, config } = context;
1992
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
1993
- const dispatchOptions = {
1994
- resourceRequestContext: {
1995
- requestCorrelator,
1996
- luvioRequestMethod: undefined,
1997
- },
1998
- eventObservers
1999
- };
2000
- if (networkPriority !== 'normal') {
2001
- dispatchOptions.overrides = {
2002
- priority: networkPriority
2003
- };
2004
- }
2005
- return buildNetworkSnapshot$1(luvio, config, dispatchOptions);
1878
+ return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
2006
1879
  }
2007
1880
  function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
2008
1881
  const { luvio, config } = context;
@@ -2089,13 +1962,14 @@ function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
2089
1962
  return onFetchResponseSuccess(luvio, config, updatedResourceParams, response);
2090
1963
  }
2091
1964
 
2092
- const getCollectionMetadataForSite_ConfigPropertyNames = {
2093
- displayName: 'getCollectionMetadataForSite',
2094
- parameters: {
2095
- required: ['collectionKeyOrId', 'siteId'],
2096
- optional: ['expandMetadata', 'language']
2097
- }
2098
- };
1965
+ const adapterName = 'getCollectionMetadataForSite';
1966
+ const getCollectionMetadataForSite_ConfigPropertyMetadata = [
1967
+ generateParamConfigMetadata('collectionKeyOrId', true),
1968
+ generateParamConfigMetadata('siteId', true),
1969
+ generateParamConfigMetadata('expandMetadata', false),
1970
+ generateParamConfigMetadata('language', false),
1971
+ ];
1972
+ const getCollectionMetadataForSite_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getCollectionMetadataForSite_ConfigPropertyMetadata);
2099
1973
  function createResourceParams(config) {
2100
1974
  const resourceParams = {
2101
1975
  urlParams: {
@@ -2167,21 +2041,7 @@ function buildNetworkSnapshot(luvio, config, options) {
2167
2041
  });
2168
2042
  }
2169
2043
  function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
2170
- const { luvio, config } = context;
2171
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
2172
- const dispatchOptions = {
2173
- resourceRequestContext: {
2174
- requestCorrelator,
2175
- luvioRequestMethod: undefined,
2176
- },
2177
- eventObservers
2178
- };
2179
- if (networkPriority !== 'normal') {
2180
- dispatchOptions.overrides = {
2181
- priority: networkPriority
2182
- };
2183
- }
2184
- return buildNetworkSnapshot(luvio, config, dispatchOptions);
2044
+ return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
2185
2045
  }
2186
2046
  function buildCachedSnapshotCachePolicy(context, storeLookup) {
2187
2047
  const { luvio, config } = context;
@@ -1,4 +1,4 @@
1
- import { Adapter as $64$luvio_engine_Adapter, Snapshot as $64$luvio_engine_Snapshot, UnfulfilledSnapshot as $64$luvio_engine_UnfulfilledSnapshot } from '@luvio/engine';
1
+ import { Adapter as $64$luvio_engine_Adapter, Snapshot as $64$luvio_engine_Snapshot, UnfulfilledSnapshot as $64$luvio_engine_UnfulfilledSnapshot, AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata } from '@luvio/engine';
2
2
  export declare const ObjectPrototypeHasOwnProperty: (v: PropertyKey) => boolean;
3
3
  declare const ObjectKeys: {
4
4
  (o: object): string[];
@@ -57,4 +57,6 @@ export declare const snapshotRefreshOptions: {
57
57
  export declare function stableJSONStringify(node: any): string | undefined;
58
58
  export declare function getFetchResponseStatusText(status: number): string;
59
59
  export declare function isUnfulfilledSnapshot<T, U>(snapshot: $64$luvio_engine_Snapshot<T, U>): snapshot is $64$luvio_engine_UnfulfilledSnapshot<T, U>;
60
+ export declare function generateParamConfigMetadata(name: string, required: boolean, coerceFn?: (v: unknown) => unknown): $64$luvio_engine_AdapterConfigMetadata;
61
+ export declare function buildAdapterValidationConfig(displayName: string, paramsMeta: $64$luvio_engine_AdapterConfigMetadata[]): AdapterValidationConfig;
60
62
  export declare const keyPrefix = "CMS";
@@ -1,8 +1,9 @@
1
- import { AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig, Untrusted as adapter$45$utils_Untrusted } from './adapter-utils';
1
+ import { AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata, Luvio as $64$luvio_engine_Luvio, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Fragment as $64$luvio_engine_Fragment, Snapshot as $64$luvio_engine_Snapshot, FetchResponse as $64$luvio_engine_FetchResponse, ErrorResponse as $64$luvio_engine_ErrorResponse, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, CoercedAdapterRequestContext as $64$luvio_engine_CoercedAdapterRequestContext, StoreLookup as $64$luvio_engine_StoreLookup, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
2
+ import { Untrusted as adapter$45$utils_Untrusted, AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig } from './adapter-utils';
2
3
  import { ResourceRequestConfig as resources_getConnectCmsDeliveryChannelsCollectionsByChannelIdAndCollectionKeyOrId_ResourceRequestConfig } from '../resources/getConnectCmsDeliveryChannelsCollectionsByChannelIdAndCollectionKeyOrId';
3
- import { Luvio as $64$luvio_engine_Luvio, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Fragment as $64$luvio_engine_Fragment, Snapshot as $64$luvio_engine_Snapshot, FetchResponse as $64$luvio_engine_FetchResponse, ErrorResponse as $64$luvio_engine_ErrorResponse, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, CoercedAdapterRequestContext as $64$luvio_engine_CoercedAdapterRequestContext, StoreLookup as $64$luvio_engine_StoreLookup, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
4
4
  import { ManagedContentCollectionItemsRepresentation as types_ManagedContentCollectionItemsRepresentation_ManagedContentCollectionItemsRepresentation } from '../types/ManagedContentCollectionItemsRepresentation';
5
5
  export declare const adapterName = "getCollectionItemsForChannel";
6
+ export declare const getCollectionItemsForChannel_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
6
7
  export declare const getCollectionItemsForChannel_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
7
8
  export interface GetCollectionItemsForChannelConfig {
8
9
  channelId: string;
@@ -1,8 +1,9 @@
1
- import { AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig, Untrusted as adapter$45$utils_Untrusted } from './adapter-utils';
1
+ import { AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata, Luvio as $64$luvio_engine_Luvio, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Fragment as $64$luvio_engine_Fragment, Snapshot as $64$luvio_engine_Snapshot, FetchResponse as $64$luvio_engine_FetchResponse, ErrorResponse as $64$luvio_engine_ErrorResponse, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, CoercedAdapterRequestContext as $64$luvio_engine_CoercedAdapterRequestContext, StoreLookup as $64$luvio_engine_StoreLookup, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
2
+ import { Untrusted as adapter$45$utils_Untrusted, AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig } from './adapter-utils';
2
3
  import { ResourceRequestConfig as resources_getConnectSitesCmsDeliveryCollectionsByCollectionKeyOrIdAndSiteId_ResourceRequestConfig } from '../resources/getConnectSitesCmsDeliveryCollectionsByCollectionKeyOrIdAndSiteId';
3
- import { Luvio as $64$luvio_engine_Luvio, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Fragment as $64$luvio_engine_Fragment, Snapshot as $64$luvio_engine_Snapshot, FetchResponse as $64$luvio_engine_FetchResponse, ErrorResponse as $64$luvio_engine_ErrorResponse, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, CoercedAdapterRequestContext as $64$luvio_engine_CoercedAdapterRequestContext, StoreLookup as $64$luvio_engine_StoreLookup, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
4
4
  import { ManagedContentCollectionItemsRepresentation as types_ManagedContentCollectionItemsRepresentation_ManagedContentCollectionItemsRepresentation } from '../types/ManagedContentCollectionItemsRepresentation';
5
5
  export declare const adapterName = "getCollectionItemsForSite";
6
+ export declare const getCollectionItemsForSite_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
6
7
  export declare const getCollectionItemsForSite_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
7
8
  export interface GetCollectionItemsForSiteConfig {
8
9
  collectionKeyOrId: string;
@@ -1,8 +1,9 @@
1
- import { AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig, Untrusted as adapter$45$utils_Untrusted } from './adapter-utils';
1
+ import { AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata, Luvio as $64$luvio_engine_Luvio, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Fragment as $64$luvio_engine_Fragment, Snapshot as $64$luvio_engine_Snapshot, FetchResponse as $64$luvio_engine_FetchResponse, ErrorResponse as $64$luvio_engine_ErrorResponse, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, CoercedAdapterRequestContext as $64$luvio_engine_CoercedAdapterRequestContext, StoreLookup as $64$luvio_engine_StoreLookup, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
2
+ import { Untrusted as adapter$45$utils_Untrusted, AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig } from './adapter-utils';
2
3
  import { ResourceRequestConfig as resources_getConnectCmsDeliveryChannelsCollectionsMetadataByChannelIdAndCollectionKeyOrId_ResourceRequestConfig } from '../resources/getConnectCmsDeliveryChannelsCollectionsMetadataByChannelIdAndCollectionKeyOrId';
3
- import { Luvio as $64$luvio_engine_Luvio, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Fragment as $64$luvio_engine_Fragment, Snapshot as $64$luvio_engine_Snapshot, FetchResponse as $64$luvio_engine_FetchResponse, ErrorResponse as $64$luvio_engine_ErrorResponse, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, CoercedAdapterRequestContext as $64$luvio_engine_CoercedAdapterRequestContext, StoreLookup as $64$luvio_engine_StoreLookup, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
4
4
  import { ManagedContentCollectionMetadataRepresentation as types_ManagedContentCollectionMetadataRepresentation_ManagedContentCollectionMetadataRepresentation } from '../types/ManagedContentCollectionMetadataRepresentation';
5
5
  export declare const adapterName = "getCollectionMetadataForChannel";
6
+ export declare const getCollectionMetadataForChannel_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
6
7
  export declare const getCollectionMetadataForChannel_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
7
8
  export interface GetCollectionMetadataForChannelConfig {
8
9
  channelId: string;
@@ -1,8 +1,9 @@
1
- import { AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig, Untrusted as adapter$45$utils_Untrusted } from './adapter-utils';
1
+ import { AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata, Luvio as $64$luvio_engine_Luvio, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Fragment as $64$luvio_engine_Fragment, Snapshot as $64$luvio_engine_Snapshot, FetchResponse as $64$luvio_engine_FetchResponse, ErrorResponse as $64$luvio_engine_ErrorResponse, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, CoercedAdapterRequestContext as $64$luvio_engine_CoercedAdapterRequestContext, StoreLookup as $64$luvio_engine_StoreLookup, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
2
+ import { Untrusted as adapter$45$utils_Untrusted, AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig } from './adapter-utils';
2
3
  import { ResourceRequestConfig as resources_getConnectSitesCmsDeliveryCollectionsMetadataByCollectionKeyOrIdAndSiteId_ResourceRequestConfig } from '../resources/getConnectSitesCmsDeliveryCollectionsMetadataByCollectionKeyOrIdAndSiteId';
3
- import { Luvio as $64$luvio_engine_Luvio, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Fragment as $64$luvio_engine_Fragment, Snapshot as $64$luvio_engine_Snapshot, FetchResponse as $64$luvio_engine_FetchResponse, ErrorResponse as $64$luvio_engine_ErrorResponse, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, CoercedAdapterRequestContext as $64$luvio_engine_CoercedAdapterRequestContext, StoreLookup as $64$luvio_engine_StoreLookup, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
4
4
  import { ManagedContentCollectionMetadataRepresentation as types_ManagedContentCollectionMetadataRepresentation_ManagedContentCollectionMetadataRepresentation } from '../types/ManagedContentCollectionMetadataRepresentation';
5
5
  export declare const adapterName = "getCollectionMetadataForSite";
6
+ export declare const getCollectionMetadataForSite_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
6
7
  export declare const getCollectionMetadataForSite_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
7
8
  export interface GetCollectionMetadataForSiteConfig {
8
9
  collectionKeyOrId: string;
@@ -1,8 +1,9 @@
1
- import { AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig, Untrusted as adapter$45$utils_Untrusted } from './adapter-utils';
1
+ import { AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata, Luvio as $64$luvio_engine_Luvio, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Fragment as $64$luvio_engine_Fragment, Snapshot as $64$luvio_engine_Snapshot, FetchResponse as $64$luvio_engine_FetchResponse, ErrorResponse as $64$luvio_engine_ErrorResponse, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, CoercedAdapterRequestContext as $64$luvio_engine_CoercedAdapterRequestContext, StoreLookup as $64$luvio_engine_StoreLookup, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
2
+ import { Untrusted as adapter$45$utils_Untrusted, AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig } from './adapter-utils';
2
3
  import { ResourceRequestConfig as resources_getConnectCommunitiesManagedContentDeliveryByCommunityId_ResourceRequestConfig } from '../resources/getConnectCommunitiesManagedContentDeliveryByCommunityId';
3
- import { Luvio as $64$luvio_engine_Luvio, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Fragment as $64$luvio_engine_Fragment, Snapshot as $64$luvio_engine_Snapshot, FetchResponse as $64$luvio_engine_FetchResponse, ErrorResponse as $64$luvio_engine_ErrorResponse, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, CoercedAdapterRequestContext as $64$luvio_engine_CoercedAdapterRequestContext, StoreLookup as $64$luvio_engine_StoreLookup, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
4
4
  import { ManagedContentVersionCollectionRepresentation as types_ManagedContentVersionCollectionRepresentation_ManagedContentVersionCollectionRepresentation } from '../types/ManagedContentVersionCollectionRepresentation';
5
5
  export declare const adapterName = "listContent";
6
+ export declare const listContent_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
6
7
  export declare const listContent_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
7
8
  export interface ListContentConfig {
8
9
  communityId: string;
@@ -1,8 +1,9 @@
1
- import { AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig, Untrusted as adapter$45$utils_Untrusted } from './adapter-utils';
1
+ import { AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata, Luvio as $64$luvio_engine_Luvio, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Fragment as $64$luvio_engine_Fragment, Snapshot as $64$luvio_engine_Snapshot, FetchResponse as $64$luvio_engine_FetchResponse, ErrorResponse as $64$luvio_engine_ErrorResponse, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, CoercedAdapterRequestContext as $64$luvio_engine_CoercedAdapterRequestContext, StoreLookup as $64$luvio_engine_StoreLookup, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
2
+ import { Untrusted as adapter$45$utils_Untrusted, AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig } from './adapter-utils';
2
3
  import { ResourceRequestConfig as resources_getConnectCommunitiesManagedContentDeliveryContentsByCommunityId_ResourceRequestConfig } from '../resources/getConnectCommunitiesManagedContentDeliveryContentsByCommunityId';
3
- import { Luvio as $64$luvio_engine_Luvio, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Fragment as $64$luvio_engine_Fragment, Snapshot as $64$luvio_engine_Snapshot, FetchResponse as $64$luvio_engine_FetchResponse, ErrorResponse as $64$luvio_engine_ErrorResponse, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, CoercedAdapterRequestContext as $64$luvio_engine_CoercedAdapterRequestContext, StoreLookup as $64$luvio_engine_StoreLookup, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
4
4
  import { ManagedContentVersionInternalCollectionRepresentation as types_ManagedContentVersionInternalCollectionRepresentation_ManagedContentVersionInternalCollectionRepresentation } from '../types/ManagedContentVersionInternalCollectionRepresentation';
5
5
  export declare const adapterName = "listContentInternal";
6
+ export declare const listContentInternal_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
6
7
  export declare const listContentInternal_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
7
8
  export interface ListContentInternalConfig {
8
9
  communityId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-cms-delivery",
3
- "version": "1.213.0",
3
+ "version": "1.213.2",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "Wire adapters for CMS endpoints",
6
6
  "main": "dist/es/es2018/cms-delivery.js",
package/sfdc/index.js CHANGED
@@ -14,7 +14,7 @@
14
14
  /* proxy-compat-disable */
15
15
  import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
16
16
  import { withDefaultLuvio } from 'force/ldsEngine';
17
- import { serializeStructuredKey, deepFreeze, typeCheckScalars, StoreKeyMap, typeCheckArrayOfScalars } from 'force/luvioEngine';
17
+ import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$6, typeCheckScalars, StoreKeyMap, typeCheckArrayOfScalars } from 'force/luvioEngine';
18
18
 
19
19
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
20
20
  const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
@@ -58,6 +58,24 @@ const snapshotRefreshOptions = {
58
58
  },
59
59
  }
60
60
  };
61
+ function generateParamConfigMetadata(name, required, coerceFn) {
62
+ return {
63
+ name,
64
+ required,
65
+ coerceFn,
66
+ };
67
+ }
68
+ function buildAdapterValidationConfig(displayName, paramsMeta) {
69
+ const required = paramsMeta.filter(p => p.required).map(p => p.name);
70
+ const optional = paramsMeta.filter(p => !p.required).map(p => p.name);
71
+ return {
72
+ displayName,
73
+ parameters: {
74
+ required,
75
+ optional,
76
+ }
77
+ };
78
+ }
61
79
  const keyPrefix = 'CMS';
62
80
 
63
81
  const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
@@ -315,26 +333,8 @@ const ingest$4 = function ManagedContentCollectionItemsRepresentationIngest(inpu
315
333
  }
316
334
  }
317
335
  const key = path.fullPath;
318
- const existingRecord = store.readEntry(key);
319
336
  const ttlToUse = TTL$3;
320
- let incomingRecord = normalize$4(input, store.readEntry(key), {
321
- fullPath: key,
322
- parent: path.parent,
323
- propertyName: path.propertyName,
324
- ttl: ttlToUse
325
- });
326
- if (existingRecord === undefined || equals$4(existingRecord, incomingRecord) === false) {
327
- luvio.storePublish(key, incomingRecord);
328
- }
329
- {
330
- const storeMetadataParams = {
331
- ttl: ttlToUse,
332
- namespace: "CMS",
333
- version: VERSION$4,
334
- representationName: RepresentationType$4,
335
- };
336
- luvio.publishStoreMetadata(key, storeMetadataParams);
337
- }
337
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "CMS", VERSION$4, RepresentationType$4, equals$4);
338
338
  return createLink(key);
339
339
  };
340
340
  function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
@@ -409,13 +409,13 @@ function onFetchResponseSuccess$9(luvio, config, resourceParams, response) {
409
409
  return onFetchResponseSuccess$8(luvio, config, updatedResourceParams, response);
410
410
  }
411
411
 
412
- const getCollectionItemsForChannel_ConfigPropertyNames = {
413
- displayName: 'getCollectionItemsForChannel',
414
- parameters: {
415
- required: ['channelId', 'collectionKeyOrId'],
416
- optional: ['language']
417
- }
418
- };
412
+ const adapterName$5 = 'getCollectionItemsForChannel';
413
+ const getCollectionItemsForChannel_ConfigPropertyMetadata = [
414
+ generateParamConfigMetadata('channelId', true),
415
+ generateParamConfigMetadata('collectionKeyOrId', true),
416
+ generateParamConfigMetadata('language', false),
417
+ ];
418
+ const getCollectionItemsForChannel_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getCollectionItemsForChannel_ConfigPropertyMetadata);
419
419
  function createResourceParams$5(config) {
420
420
  const resourceParams = {
421
421
  urlParams: {
@@ -486,21 +486,7 @@ function buildNetworkSnapshot$5(luvio, config, options) {
486
486
  });
487
487
  }
488
488
  function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
489
- const { luvio, config } = context;
490
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
491
- const dispatchOptions = {
492
- resourceRequestContext: {
493
- requestCorrelator,
494
- luvioRequestMethod: undefined,
495
- },
496
- eventObservers
497
- };
498
- if (networkPriority !== 'normal') {
499
- dispatchOptions.overrides = {
500
- priority: networkPriority
501
- };
502
- }
503
- return buildNetworkSnapshot$5(luvio, config, dispatchOptions);
489
+ return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
504
490
  }
505
491
  function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
506
492
  const { luvio, config } = context;
@@ -587,13 +573,13 @@ function onFetchResponseSuccess$7(luvio, config, resourceParams, response) {
587
573
  return onFetchResponseSuccess$6(luvio, config, updatedResourceParams, response);
588
574
  }
589
575
 
590
- const getCollectionItemsForSite_ConfigPropertyNames = {
591
- displayName: 'getCollectionItemsForSite',
592
- parameters: {
593
- required: ['collectionKeyOrId', 'siteId'],
594
- optional: ['language']
595
- }
596
- };
576
+ const adapterName$4 = 'getCollectionItemsForSite';
577
+ const getCollectionItemsForSite_ConfigPropertyMetadata = [
578
+ generateParamConfigMetadata('collectionKeyOrId', true),
579
+ generateParamConfigMetadata('siteId', true),
580
+ generateParamConfigMetadata('language', false),
581
+ ];
582
+ const getCollectionItemsForSite_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getCollectionItemsForSite_ConfigPropertyMetadata);
597
583
  function createResourceParams$4(config) {
598
584
  const resourceParams = {
599
585
  urlParams: {
@@ -664,21 +650,7 @@ function buildNetworkSnapshot$4(luvio, config, options) {
664
650
  });
665
651
  }
666
652
  function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
667
- const { luvio, config } = context;
668
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
669
- const dispatchOptions = {
670
- resourceRequestContext: {
671
- requestCorrelator,
672
- luvioRequestMethod: undefined,
673
- },
674
- eventObservers
675
- };
676
- if (networkPriority !== 'normal') {
677
- dispatchOptions.overrides = {
678
- priority: networkPriority
679
- };
680
- }
681
- return buildNetworkSnapshot$4(luvio, config, dispatchOptions);
653
+ return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
682
654
  }
683
655
  function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
684
656
  const { luvio, config } = context;
@@ -813,26 +785,8 @@ const ingest$3 = function ManagedContentCollectionMetadataRepresentationIngest(i
813
785
  }
814
786
  }
815
787
  const key = path.fullPath;
816
- const existingRecord = store.readEntry(key);
817
788
  const ttlToUse = TTL$2;
818
- let incomingRecord = normalize$3(input, store.readEntry(key), {
819
- fullPath: key,
820
- parent: path.parent,
821
- propertyName: path.propertyName,
822
- ttl: ttlToUse
823
- });
824
- if (existingRecord === undefined || equals$3(existingRecord, incomingRecord) === false) {
825
- luvio.storePublish(key, incomingRecord);
826
- }
827
- {
828
- const storeMetadataParams = {
829
- ttl: ttlToUse,
830
- namespace: "CMS",
831
- version: VERSION$3,
832
- representationName: RepresentationType$3,
833
- };
834
- luvio.publishStoreMetadata(key, storeMetadataParams);
835
- }
789
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "CMS", VERSION$3, RepresentationType$3, equals$3);
836
790
  return createLink(key);
837
791
  };
838
792
  function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
@@ -907,13 +861,14 @@ function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
907
861
  return onFetchResponseSuccess$4(luvio, config, updatedResourceParams, response);
908
862
  }
909
863
 
910
- const getCollectionMetadataForChannel_ConfigPropertyNames = {
911
- displayName: 'getCollectionMetadataForChannel',
912
- parameters: {
913
- required: ['channelId', 'collectionKeyOrId'],
914
- optional: ['expandMetadata', 'language']
915
- }
916
- };
864
+ const adapterName$3 = 'getCollectionMetadataForChannel';
865
+ const getCollectionMetadataForChannel_ConfigPropertyMetadata = [
866
+ generateParamConfigMetadata('channelId', true),
867
+ generateParamConfigMetadata('collectionKeyOrId', true),
868
+ generateParamConfigMetadata('expandMetadata', false),
869
+ generateParamConfigMetadata('language', false),
870
+ ];
871
+ const getCollectionMetadataForChannel_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getCollectionMetadataForChannel_ConfigPropertyMetadata);
917
872
  function createResourceParams$3(config) {
918
873
  const resourceParams = {
919
874
  urlParams: {
@@ -985,21 +940,7 @@ function buildNetworkSnapshot$3(luvio, config, options) {
985
940
  });
986
941
  }
987
942
  function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
988
- const { luvio, config } = context;
989
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
990
- const dispatchOptions = {
991
- resourceRequestContext: {
992
- requestCorrelator,
993
- luvioRequestMethod: undefined,
994
- },
995
- eventObservers
996
- };
997
- if (networkPriority !== 'normal') {
998
- dispatchOptions.overrides = {
999
- priority: networkPriority
1000
- };
1001
- }
1002
- return buildNetworkSnapshot$3(luvio, config, dispatchOptions);
943
+ return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
1003
944
  }
1004
945
  function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
1005
946
  const { luvio, config } = context;
@@ -1086,13 +1027,14 @@ function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
1086
1027
  return onFetchResponseSuccess$2(luvio, config, updatedResourceParams, response);
1087
1028
  }
1088
1029
 
1089
- const getCollectionMetadataForSite_ConfigPropertyNames = {
1090
- displayName: 'getCollectionMetadataForSite',
1091
- parameters: {
1092
- required: ['collectionKeyOrId', 'siteId'],
1093
- optional: ['expandMetadata', 'language']
1094
- }
1095
- };
1030
+ const adapterName$2 = 'getCollectionMetadataForSite';
1031
+ const getCollectionMetadataForSite_ConfigPropertyMetadata = [
1032
+ generateParamConfigMetadata('collectionKeyOrId', true),
1033
+ generateParamConfigMetadata('siteId', true),
1034
+ generateParamConfigMetadata('expandMetadata', false),
1035
+ generateParamConfigMetadata('language', false),
1036
+ ];
1037
+ const getCollectionMetadataForSite_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getCollectionMetadataForSite_ConfigPropertyMetadata);
1096
1038
  function createResourceParams$2(config) {
1097
1039
  const resourceParams = {
1098
1040
  urlParams: {
@@ -1164,21 +1106,7 @@ function buildNetworkSnapshot$2(luvio, config, options) {
1164
1106
  });
1165
1107
  }
1166
1108
  function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
1167
- const { luvio, config } = context;
1168
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
1169
- const dispatchOptions = {
1170
- resourceRequestContext: {
1171
- requestCorrelator,
1172
- luvioRequestMethod: undefined,
1173
- },
1174
- eventObservers
1175
- };
1176
- if (networkPriority !== 'normal') {
1177
- dispatchOptions.overrides = {
1178
- priority: networkPriority
1179
- };
1180
- }
1181
- return buildNetworkSnapshot$2(luvio, config, dispatchOptions);
1109
+ return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
1182
1110
  }
1183
1111
  function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
1184
1112
  const { luvio, config } = context;
@@ -1519,26 +1447,8 @@ const ingest$2 = function ManagedContentVersionCollectionRepresentationIngest(in
1519
1447
  }
1520
1448
  }
1521
1449
  const key = path.fullPath;
1522
- const existingRecord = store.readEntry(key);
1523
1450
  const ttlToUse = TTL$1;
1524
- let incomingRecord = normalize$2(input, store.readEntry(key), {
1525
- fullPath: key,
1526
- parent: path.parent,
1527
- propertyName: path.propertyName,
1528
- ttl: ttlToUse
1529
- });
1530
- if (existingRecord === undefined || equals$2(existingRecord, incomingRecord) === false) {
1531
- luvio.storePublish(key, incomingRecord);
1532
- }
1533
- {
1534
- const storeMetadataParams = {
1535
- ttl: ttlToUse,
1536
- namespace: "CMS",
1537
- version: VERSION$2,
1538
- representationName: RepresentationType$2,
1539
- };
1540
- luvio.publishStoreMetadata(key, storeMetadataParams);
1541
- }
1451
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "CMS", VERSION$2, RepresentationType$2, equals$2);
1542
1452
  return createLink(key);
1543
1453
  };
1544
1454
  function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
@@ -1603,13 +1513,19 @@ function createResourceRequest$1(config) {
1603
1513
  };
1604
1514
  }
1605
1515
 
1606
- const listContent_ConfigPropertyNames = {
1607
- displayName: 'listContent',
1608
- parameters: {
1609
- required: ['communityId'],
1610
- optional: ['contentKeys', 'language', 'managedContentIds', 'managedContentType', 'page', 'pageSize', 'showAbsoluteUrl', 'topics']
1611
- }
1612
- };
1516
+ const adapterName$1 = 'listContent';
1517
+ const listContent_ConfigPropertyMetadata = [
1518
+ generateParamConfigMetadata('communityId', true),
1519
+ generateParamConfigMetadata('contentKeys', false),
1520
+ generateParamConfigMetadata('language', false),
1521
+ generateParamConfigMetadata('managedContentIds', false),
1522
+ generateParamConfigMetadata('managedContentType', false),
1523
+ generateParamConfigMetadata('page', false),
1524
+ generateParamConfigMetadata('pageSize', false),
1525
+ generateParamConfigMetadata('showAbsoluteUrl', false),
1526
+ generateParamConfigMetadata('topics', false),
1527
+ ];
1528
+ const listContent_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, listContent_ConfigPropertyMetadata);
1613
1529
  function createResourceParams$1(config) {
1614
1530
  const resourceParams = {
1615
1531
  urlParams: {
@@ -1688,21 +1604,7 @@ function buildNetworkSnapshot$1(luvio, config, options) {
1688
1604
  });
1689
1605
  }
1690
1606
  function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
1691
- const { luvio, config } = context;
1692
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
1693
- const dispatchOptions = {
1694
- resourceRequestContext: {
1695
- requestCorrelator,
1696
- luvioRequestMethod: undefined,
1697
- },
1698
- eventObservers
1699
- };
1700
- if (networkPriority !== 'normal') {
1701
- dispatchOptions.overrides = {
1702
- priority: networkPriority
1703
- };
1704
- }
1705
- return buildNetworkSnapshot$1(luvio, config, dispatchOptions);
1607
+ return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
1706
1608
  }
1707
1609
  function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
1708
1610
  const { luvio, config } = context;
@@ -1885,26 +1787,8 @@ const ingest$1 = function ManagedContentVersionInternalRepresentationIngest(inpu
1885
1787
  }
1886
1788
  }
1887
1789
  const key = path.fullPath;
1888
- const existingRecord = store.readEntry(key);
1889
1790
  const ttlToUse = TTL;
1890
- let incomingRecord = normalize$1(input, store.readEntry(key), {
1891
- fullPath: key,
1892
- parent: path.parent,
1893
- propertyName: path.propertyName,
1894
- ttl: ttlToUse
1895
- });
1896
- if (existingRecord === undefined || equals$1(existingRecord, incomingRecord) === false) {
1897
- luvio.storePublish(key, incomingRecord);
1898
- }
1899
- {
1900
- const storeMetadataParams = {
1901
- ttl: ttlToUse,
1902
- namespace: "CMS",
1903
- version: VERSION$1,
1904
- representationName: RepresentationType$1,
1905
- };
1906
- luvio.publishStoreMetadata(key, storeMetadataParams);
1907
- }
1791
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "CMS", VERSION$1, RepresentationType$1, equals$1);
1908
1792
  return createLink(key);
1909
1793
  };
1910
1794
  function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
@@ -1959,7 +1843,7 @@ function normalize(input, existing, path, luvio, store, timestamp) {
1959
1843
  existing: existing,
1960
1844
  },
1961
1845
  ttl: path.ttl
1962
- }, luvio, store);
1846
+ }, luvio, store, timestamp);
1963
1847
  }
1964
1848
  return input;
1965
1849
  }
@@ -2008,26 +1892,8 @@ const ingest = function ManagedContentVersionInternalCollectionRepresentationIng
2008
1892
  }
2009
1893
  }
2010
1894
  const key = path.fullPath;
2011
- const existingRecord = store.readEntry(key);
2012
1895
  const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
2013
- let incomingRecord = normalize(input, store.readEntry(key), {
2014
- fullPath: key,
2015
- parent: path.parent,
2016
- propertyName: path.propertyName,
2017
- ttl: ttlToUse
2018
- }, luvio, store);
2019
- if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
2020
- luvio.storePublish(key, incomingRecord);
2021
- }
2022
- if (ttlToUse !== undefined) {
2023
- const storeMetadataParams = {
2024
- ttl: ttlToUse,
2025
- namespace: "CMS",
2026
- version: VERSION,
2027
- representationName: RepresentationType,
2028
- };
2029
- luvio.publishStoreMetadata(key, storeMetadataParams);
2030
- }
1896
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "CMS", VERSION, RepresentationType, equals);
2031
1897
  return createLink(key);
2032
1898
  };
2033
1899
  function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
@@ -2090,13 +1956,21 @@ function createResourceRequest(config) {
2090
1956
  };
2091
1957
  }
2092
1958
 
2093
- const listContentInternal_ConfigPropertyNames = {
2094
- displayName: 'listContentInternal',
2095
- parameters: {
2096
- required: ['communityId'],
2097
- optional: ['collectionName', 'contentKeys', 'language', 'managedContentIds', 'managedContentType', 'page', 'pageSize', 'queryTerm', 'topics', 'urlNameInList']
2098
- }
2099
- };
1959
+ const adapterName = 'listContentInternal';
1960
+ const listContentInternal_ConfigPropertyMetadata = [
1961
+ generateParamConfigMetadata('communityId', true),
1962
+ generateParamConfigMetadata('collectionName', false),
1963
+ generateParamConfigMetadata('contentKeys', false),
1964
+ generateParamConfigMetadata('language', false),
1965
+ generateParamConfigMetadata('managedContentIds', false),
1966
+ generateParamConfigMetadata('managedContentType', false),
1967
+ generateParamConfigMetadata('page', false),
1968
+ generateParamConfigMetadata('pageSize', false),
1969
+ generateParamConfigMetadata('queryTerm', false),
1970
+ generateParamConfigMetadata('topics', false),
1971
+ generateParamConfigMetadata('urlNameInList', false),
1972
+ ];
1973
+ const listContentInternal_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, listContentInternal_ConfigPropertyMetadata);
2100
1974
  function createResourceParams(config) {
2101
1975
  const resourceParams = {
2102
1976
  urlParams: {
@@ -2177,21 +2051,7 @@ function buildNetworkSnapshot(luvio, config, options) {
2177
2051
  });
2178
2052
  }
2179
2053
  function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
2180
- const { luvio, config } = context;
2181
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
2182
- const dispatchOptions = {
2183
- resourceRequestContext: {
2184
- requestCorrelator,
2185
- luvioRequestMethod: undefined,
2186
- },
2187
- eventObservers
2188
- };
2189
- if (networkPriority !== 'normal') {
2190
- dispatchOptions.overrides = {
2191
- priority: networkPriority
2192
- };
2193
- }
2194
- return buildNetworkSnapshot(luvio, config, dispatchOptions);
2054
+ return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
2195
2055
  }
2196
2056
  function buildCachedSnapshotCachePolicy(context, storeLookup) {
2197
2057
  const { luvio, config } = context;
@@ -2278,4 +2138,4 @@ withDefaultLuvio((luvio) => {
2278
2138
  });
2279
2139
 
2280
2140
  export { getCollectionItemsForChannel, getCollectionItemsForChannel_imperative, getCollectionItemsForSite, getCollectionItemsForSite_imperative, getCollectionMetadataForChannel, getCollectionMetadataForChannel_imperative, getCollectionMetadataForSite, getCollectionMetadataForSite_imperative, listContent, listContentInternal, listContentInternal_imperative, listContent_imperative };
2281
- // version: 1.213.0-951602080
2141
+ // version: 1.213.2-1eb996209