@salesforce/lds-adapters-platform-learning-content 1.212.1 → 1.213.1

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$9, 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 = 'LearningContentPlatform';
52
70
 
53
71
  const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
@@ -694,26 +712,8 @@ const ingest$b = function FeaturedItemRepresentationIngest(input, path, luvio, s
694
712
  }
695
713
  }
696
714
  const key = keyBuilderFromType$6(luvio, input);
697
- const existingRecord = store.readEntry(key);
698
715
  const ttlToUse = TTL$6;
699
- let incomingRecord = normalize$b(input, store.readEntry(key), {
700
- fullPath: key,
701
- parent: path.parent,
702
- propertyName: path.propertyName,
703
- ttl: ttlToUse
704
- });
705
- if (existingRecord === undefined || equals$e(existingRecord, incomingRecord) === false) {
706
- luvio.storePublish(key, incomingRecord);
707
- }
708
- {
709
- const storeMetadataParams = {
710
- ttl: ttlToUse,
711
- namespace: "LearningContentPlatform",
712
- version: VERSION$e,
713
- representationName: RepresentationType$b,
714
- };
715
- luvio.publishStoreMetadata(key, storeMetadataParams);
716
- }
716
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$b, "LearningContentPlatform", VERSION$e, RepresentationType$b, equals$e);
717
717
  return createLink(key);
718
718
  };
719
719
  function getTypeCacheKeys$b(rootKeySet, luvio, input, fullPathFactory) {
@@ -763,7 +763,7 @@ function normalize$a(input, existing, path, luvio, store, timestamp) {
763
763
  existing: existing,
764
764
  },
765
765
  ttl: path.ttl
766
- }, luvio, store);
766
+ }, luvio, store, timestamp);
767
767
  }
768
768
  return input;
769
769
  }
@@ -803,26 +803,8 @@ const ingest$a = function FeaturedItemRecommendedListRepresentationIngest(input,
803
803
  }
804
804
  }
805
805
  const key = path.fullPath;
806
- const existingRecord = store.readEntry(key);
807
806
  const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
808
- let incomingRecord = normalize$a(input, store.readEntry(key), {
809
- fullPath: key,
810
- parent: path.parent,
811
- propertyName: path.propertyName,
812
- ttl: ttlToUse
813
- }, luvio, store);
814
- if (existingRecord === undefined || equals$d(existingRecord, incomingRecord) === false) {
815
- luvio.storePublish(key, incomingRecord);
816
- }
817
- if (ttlToUse !== undefined) {
818
- const storeMetadataParams = {
819
- ttl: ttlToUse,
820
- namespace: "LearningContentPlatform",
821
- version: VERSION$d,
822
- representationName: RepresentationType$a,
823
- };
824
- luvio.publishStoreMetadata(key, storeMetadataParams);
825
- }
807
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$a, "LearningContentPlatform", VERSION$d, RepresentationType$a, equals$d);
826
808
  return createLink(key);
827
809
  };
828
810
  function getTypeCacheKeys$a(rootKeySet, luvio, input, fullPathFactory) {
@@ -885,13 +867,12 @@ function createResourceRequest$9(config) {
885
867
  };
886
868
  }
887
869
 
888
- const getFeaturedItemsRecommendedList_ConfigPropertyNames = {
889
- displayName: 'getFeaturedItemsRecommendedList',
890
- parameters: {
891
- required: ['appId', 'context'],
892
- optional: []
893
- }
894
- };
870
+ const adapterName$9 = 'getFeaturedItemsRecommendedList';
871
+ const getFeaturedItemsRecommendedList_ConfigPropertyMetadata = [
872
+ generateParamConfigMetadata('appId', true),
873
+ generateParamConfigMetadata('context', true),
874
+ ];
875
+ const getFeaturedItemsRecommendedList_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, getFeaturedItemsRecommendedList_ConfigPropertyMetadata);
895
876
  function createResourceParams$9(config) {
896
877
  const resourceParams = {
897
878
  queryParams: {
@@ -958,21 +939,7 @@ function buildNetworkSnapshot$9(luvio, config, options) {
958
939
  });
959
940
  }
960
941
  function buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext) {
961
- const { luvio, config } = context;
962
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
963
- const dispatchOptions = {
964
- resourceRequestContext: {
965
- requestCorrelator,
966
- luvioRequestMethod: undefined,
967
- },
968
- eventObservers
969
- };
970
- if (networkPriority !== 'normal') {
971
- dispatchOptions.overrides = {
972
- priority: networkPriority
973
- };
974
- }
975
- return buildNetworkSnapshot$9(luvio, config, dispatchOptions);
942
+ return buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext, buildNetworkSnapshot$9, undefined, false);
976
943
  }
977
944
  function buildCachedSnapshotCachePolicy$8(context, storeLookup) {
978
945
  const { luvio, config } = context;
@@ -1034,7 +1001,7 @@ function normalize$9(input, existing, path, luvio, store, timestamp) {
1034
1001
  existing: existing,
1035
1002
  },
1036
1003
  ttl: path.ttl
1037
- }, luvio, store);
1004
+ }, luvio, store, timestamp);
1038
1005
  }
1039
1006
  return input;
1040
1007
  }
@@ -1074,26 +1041,8 @@ const ingest$9 = function FeaturedItemRelatedListRepresentationIngest(input, pat
1074
1041
  }
1075
1042
  }
1076
1043
  const key = path.fullPath;
1077
- const existingRecord = store.readEntry(key);
1078
1044
  const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
1079
- let incomingRecord = normalize$9(input, store.readEntry(key), {
1080
- fullPath: key,
1081
- parent: path.parent,
1082
- propertyName: path.propertyName,
1083
- ttl: ttlToUse
1084
- }, luvio, store);
1085
- if (existingRecord === undefined || equals$c(existingRecord, incomingRecord) === false) {
1086
- luvio.storePublish(key, incomingRecord);
1087
- }
1088
- if (ttlToUse !== undefined) {
1089
- const storeMetadataParams = {
1090
- ttl: ttlToUse,
1091
- namespace: "LearningContentPlatform",
1092
- version: VERSION$c,
1093
- representationName: RepresentationType$9,
1094
- };
1095
- luvio.publishStoreMetadata(key, storeMetadataParams);
1096
- }
1045
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$9, "LearningContentPlatform", VERSION$c, RepresentationType$9, equals$c);
1097
1046
  return createLink(key);
1098
1047
  };
1099
1048
  function getTypeCacheKeys$9(rootKeySet, luvio, input, fullPathFactory) {
@@ -1156,13 +1105,12 @@ function createResourceRequest$8(config) {
1156
1105
  };
1157
1106
  }
1158
1107
 
1159
- const getFeaturedItemsRelatedList_ConfigPropertyNames = {
1160
- displayName: 'getFeaturedItemsRelatedList',
1161
- parameters: {
1162
- required: ['appId', 'pageRef'],
1163
- optional: []
1164
- }
1165
- };
1108
+ const adapterName$8 = 'getFeaturedItemsRelatedList';
1109
+ const getFeaturedItemsRelatedList_ConfigPropertyMetadata = [
1110
+ generateParamConfigMetadata('appId', true),
1111
+ generateParamConfigMetadata('pageRef', true),
1112
+ ];
1113
+ const getFeaturedItemsRelatedList_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, getFeaturedItemsRelatedList_ConfigPropertyMetadata);
1166
1114
  function createResourceParams$8(config) {
1167
1115
  const resourceParams = {
1168
1116
  queryParams: {
@@ -1229,21 +1177,7 @@ function buildNetworkSnapshot$8(luvio, config, options) {
1229
1177
  });
1230
1178
  }
1231
1179
  function buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext) {
1232
- const { luvio, config } = context;
1233
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
1234
- const dispatchOptions = {
1235
- resourceRequestContext: {
1236
- requestCorrelator,
1237
- luvioRequestMethod: undefined,
1238
- },
1239
- eventObservers
1240
- };
1241
- if (networkPriority !== 'normal') {
1242
- dispatchOptions.overrides = {
1243
- priority: networkPriority
1244
- };
1245
- }
1246
- return buildNetworkSnapshot$8(luvio, config, dispatchOptions);
1180
+ return buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext, buildNetworkSnapshot$8, undefined, false);
1247
1181
  }
1248
1182
  function buildCachedSnapshotCachePolicy$7(context, storeLookup) {
1249
1183
  const { luvio, config } = context;
@@ -1343,26 +1277,8 @@ const ingest$8 = function LearningConfigRepresentationIngest(input, path, luvio,
1343
1277
  }
1344
1278
  }
1345
1279
  const key = path.fullPath;
1346
- const existingRecord = store.readEntry(key);
1347
1280
  const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
1348
- let incomingRecord = normalize$8(input, store.readEntry(key), {
1349
- fullPath: key,
1350
- parent: path.parent,
1351
- propertyName: path.propertyName,
1352
- ttl: ttlToUse
1353
- });
1354
- if (existingRecord === undefined || equals$b(existingRecord, incomingRecord) === false) {
1355
- luvio.storePublish(key, incomingRecord);
1356
- }
1357
- if (ttlToUse !== undefined) {
1358
- const storeMetadataParams = {
1359
- ttl: ttlToUse,
1360
- namespace: "LearningContentPlatform",
1361
- version: VERSION$b,
1362
- representationName: RepresentationType$8,
1363
- };
1364
- luvio.publishStoreMetadata(key, storeMetadataParams);
1365
- }
1281
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$8, "LearningContentPlatform", VERSION$b, RepresentationType$8, equals$b);
1366
1282
  return createLink(key);
1367
1283
  };
1368
1284
  function getTypeCacheKeys$8(rootKeySet, luvio, input, fullPathFactory) {
@@ -1421,13 +1337,9 @@ function createResourceRequest$7(config) {
1421
1337
  };
1422
1338
  }
1423
1339
 
1424
- const getLearningConfig_ConfigPropertyNames = {
1425
- displayName: 'getLearningConfig',
1426
- parameters: {
1427
- required: [],
1428
- optional: []
1429
- }
1430
- };
1340
+ const adapterName$7 = 'getLearningConfig';
1341
+ const getLearningConfig_ConfigPropertyMetadata = [];
1342
+ const getLearningConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, getLearningConfig_ConfigPropertyMetadata);
1431
1343
  function createResourceParams$7(config) {
1432
1344
  const resourceParams = {};
1433
1345
  return resourceParams;
@@ -1484,21 +1396,7 @@ function buildNetworkSnapshot$7(luvio, config, options) {
1484
1396
  });
1485
1397
  }
1486
1398
  function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext) {
1487
- const { luvio, config } = context;
1488
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
1489
- const dispatchOptions = {
1490
- resourceRequestContext: {
1491
- requestCorrelator,
1492
- luvioRequestMethod: undefined,
1493
- },
1494
- eventObservers
1495
- };
1496
- if (networkPriority !== 'normal') {
1497
- dispatchOptions.overrides = {
1498
- priority: networkPriority
1499
- };
1500
- }
1501
- return buildNetworkSnapshot$7(luvio, config, dispatchOptions);
1399
+ return buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext, buildNetworkSnapshot$7, undefined, false);
1502
1400
  }
1503
1401
  function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
1504
1402
  const { luvio, config } = context;
@@ -1961,26 +1859,8 @@ const ingest$7 = function LearningItemRepresentationIngest(input, path, luvio, s
1961
1859
  }
1962
1860
  }
1963
1861
  const key = keyBuilderFromType$5(luvio, input);
1964
- const existingRecord = store.readEntry(key);
1965
1862
  const ttlToUse = TTL$5;
1966
- let incomingRecord = normalize$7(input, store.readEntry(key), {
1967
- fullPath: key,
1968
- parent: path.parent,
1969
- propertyName: path.propertyName,
1970
- ttl: ttlToUse
1971
- });
1972
- if (existingRecord === undefined || equals$a(existingRecord, incomingRecord) === false) {
1973
- luvio.storePublish(key, incomingRecord);
1974
- }
1975
- {
1976
- const storeMetadataParams = {
1977
- ttl: ttlToUse,
1978
- namespace: "LearningContentPlatform",
1979
- version: VERSION$a,
1980
- representationName: RepresentationType$7,
1981
- };
1982
- luvio.publishStoreMetadata(key, storeMetadataParams);
1983
- }
1863
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$7, "LearningContentPlatform", VERSION$a, RepresentationType$7, equals$a);
1984
1864
  return createLink(key);
1985
1865
  };
1986
1866
  function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
@@ -2030,7 +1910,7 @@ function normalize$6(input, existing, path, luvio, store, timestamp) {
2030
1910
  existing: existing,
2031
1911
  },
2032
1912
  ttl: path.ttl
2033
- }, luvio, store);
1913
+ }, luvio, store, timestamp);
2034
1914
  }
2035
1915
  return input;
2036
1916
  }
@@ -2070,26 +1950,8 @@ const ingest$6 = function LearningItemListRepresentationIngest(input, path, luvi
2070
1950
  }
2071
1951
  }
2072
1952
  const key = path.fullPath;
2073
- const existingRecord = store.readEntry(key);
2074
1953
  const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
2075
- let incomingRecord = normalize$6(input, store.readEntry(key), {
2076
- fullPath: key,
2077
- parent: path.parent,
2078
- propertyName: path.propertyName,
2079
- ttl: ttlToUse
2080
- }, luvio, store);
2081
- if (existingRecord === undefined || equals$9(existingRecord, incomingRecord) === false) {
2082
- luvio.storePublish(key, incomingRecord);
2083
- }
2084
- if (ttlToUse !== undefined) {
2085
- const storeMetadataParams = {
2086
- ttl: ttlToUse,
2087
- namespace: "LearningContentPlatform",
2088
- version: VERSION$9,
2089
- representationName: RepresentationType$6,
2090
- };
2091
- luvio.publishStoreMetadata(key, storeMetadataParams);
2092
- }
1954
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "LearningContentPlatform", VERSION$9, RepresentationType$6, equals$9);
2093
1955
  return createLink(key);
2094
1956
  };
2095
1957
  function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
@@ -2152,13 +2014,11 @@ function createResourceRequest$6(config) {
2152
2014
  };
2153
2015
  }
2154
2016
 
2155
- const getLearningItemsList_ConfigPropertyNames = {
2156
- displayName: 'getLearningItemsList',
2157
- parameters: {
2158
- required: [],
2159
- optional: ['learningItemIds']
2160
- }
2161
- };
2017
+ const adapterName$6 = 'getLearningItemsList';
2018
+ const getLearningItemsList_ConfigPropertyMetadata = [
2019
+ generateParamConfigMetadata('learningItemIds', false),
2020
+ ];
2021
+ const getLearningItemsList_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, getLearningItemsList_ConfigPropertyMetadata);
2162
2022
  function createResourceParams$6(config) {
2163
2023
  const resourceParams = {
2164
2024
  queryParams: {
@@ -2224,21 +2084,7 @@ function buildNetworkSnapshot$6(luvio, config, options) {
2224
2084
  });
2225
2085
  }
2226
2086
  function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
2227
- const { luvio, config } = context;
2228
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
2229
- const dispatchOptions = {
2230
- resourceRequestContext: {
2231
- requestCorrelator,
2232
- luvioRequestMethod: undefined,
2233
- },
2234
- eventObservers
2235
- };
2236
- if (networkPriority !== 'normal') {
2237
- dispatchOptions.overrides = {
2238
- priority: networkPriority
2239
- };
2240
- }
2241
- return buildNetworkSnapshot$6(luvio, config, dispatchOptions);
2087
+ return buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, undefined, false);
2242
2088
  }
2243
2089
  function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
2244
2090
  const { luvio, config } = context;
@@ -2404,26 +2250,8 @@ const ingest$5 = function LearningItemProgressRepresentationIngest(input, path,
2404
2250
  }
2405
2251
  }
2406
2252
  const key = keyBuilderFromType$4(luvio, input);
2407
- const existingRecord = store.readEntry(key);
2408
2253
  const ttlToUse = TTL$4;
2409
- let incomingRecord = normalize$5(input, store.readEntry(key), {
2410
- fullPath: key,
2411
- parent: path.parent,
2412
- propertyName: path.propertyName,
2413
- ttl: ttlToUse
2414
- });
2415
- if (existingRecord === undefined || equals$8(existingRecord, incomingRecord) === false) {
2416
- luvio.storePublish(key, incomingRecord);
2417
- }
2418
- {
2419
- const storeMetadataParams = {
2420
- ttl: ttlToUse,
2421
- namespace: "LearningContentPlatform",
2422
- version: VERSION$8,
2423
- representationName: RepresentationType$5,
2424
- };
2425
- luvio.publishStoreMetadata(key, storeMetadataParams);
2426
- }
2254
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "LearningContentPlatform", VERSION$8, RepresentationType$5, equals$8);
2427
2255
  return createLink(key);
2428
2256
  };
2429
2257
  function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
@@ -2473,7 +2301,7 @@ function normalize$4(input, existing, path, luvio, store, timestamp) {
2473
2301
  existing: existing,
2474
2302
  },
2475
2303
  ttl: path.ttl
2476
- }, luvio, store);
2304
+ }, luvio, store, timestamp);
2477
2305
  }
2478
2306
  return input;
2479
2307
  }
@@ -2513,26 +2341,8 @@ const ingest$4 = function LearningItemProgressListRepresentationIngest(input, pa
2513
2341
  }
2514
2342
  }
2515
2343
  const key = path.fullPath;
2516
- const existingRecord = store.readEntry(key);
2517
2344
  const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
2518
- let incomingRecord = normalize$4(input, store.readEntry(key), {
2519
- fullPath: key,
2520
- parent: path.parent,
2521
- propertyName: path.propertyName,
2522
- ttl: ttlToUse
2523
- }, luvio, store);
2524
- if (existingRecord === undefined || equals$7(existingRecord, incomingRecord) === false) {
2525
- luvio.storePublish(key, incomingRecord);
2526
- }
2527
- if (ttlToUse !== undefined) {
2528
- const storeMetadataParams = {
2529
- ttl: ttlToUse,
2530
- namespace: "LearningContentPlatform",
2531
- version: VERSION$7,
2532
- representationName: RepresentationType$4,
2533
- };
2534
- luvio.publishStoreMetadata(key, storeMetadataParams);
2535
- }
2345
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "LearningContentPlatform", VERSION$7, RepresentationType$4, equals$7);
2536
2346
  return createLink(key);
2537
2347
  };
2538
2348
  function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
@@ -2595,13 +2405,11 @@ function createResourceRequest$5(config) {
2595
2405
  };
2596
2406
  }
2597
2407
 
2598
- const getLearningItemProgress_ConfigPropertyNames = {
2599
- displayName: 'getLearningItemProgress',
2600
- parameters: {
2601
- required: [],
2602
- optional: ['learningItemIds']
2603
- }
2604
- };
2408
+ const adapterName$5 = 'getLearningItemProgress';
2409
+ const getLearningItemProgress_ConfigPropertyMetadata = [
2410
+ generateParamConfigMetadata('learningItemIds', false),
2411
+ ];
2412
+ const getLearningItemProgress_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getLearningItemProgress_ConfigPropertyMetadata);
2605
2413
  function createResourceParams$5(config) {
2606
2414
  const resourceParams = {
2607
2415
  queryParams: {
@@ -2667,21 +2475,7 @@ function buildNetworkSnapshot$5(luvio, config, options) {
2667
2475
  });
2668
2476
  }
2669
2477
  function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
2670
- const { luvio, config } = context;
2671
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
2672
- const dispatchOptions = {
2673
- resourceRequestContext: {
2674
- requestCorrelator,
2675
- luvioRequestMethod: undefined,
2676
- },
2677
- eventObservers
2678
- };
2679
- if (networkPriority !== 'normal') {
2680
- dispatchOptions.overrides = {
2681
- priority: networkPriority
2682
- };
2683
- }
2684
- return buildNetworkSnapshot$5(luvio, config, dispatchOptions);
2478
+ return buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
2685
2479
  }
2686
2480
  function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
2687
2481
  const { luvio, config } = context;
@@ -3495,26 +3289,8 @@ const ingest$3 = function LearningModelOutputRepresentationIngest(input, path, l
3495
3289
  }
3496
3290
  }
3497
3291
  const key = keyBuilderFromType$3(luvio, input);
3498
- const existingRecord = store.readEntry(key);
3499
3292
  const ttlToUse = TTL$3;
3500
- let incomingRecord = normalize$3(input, store.readEntry(key), {
3501
- fullPath: key,
3502
- parent: path.parent,
3503
- propertyName: path.propertyName,
3504
- ttl: ttlToUse
3505
- });
3506
- if (existingRecord === undefined || equals$5(existingRecord, incomingRecord) === false) {
3507
- luvio.storePublish(key, incomingRecord);
3508
- }
3509
- {
3510
- const storeMetadataParams = {
3511
- ttl: ttlToUse,
3512
- namespace: "LearningContentPlatform",
3513
- version: VERSION$5,
3514
- representationName: RepresentationType$3,
3515
- };
3516
- luvio.publishStoreMetadata(key, storeMetadataParams);
3517
- }
3293
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "LearningContentPlatform", VERSION$5, RepresentationType$3, equals$5);
3518
3294
  return createLink(key);
3519
3295
  };
3520
3296
  function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
@@ -3581,13 +3357,11 @@ function createResourceRequest$4(config) {
3581
3357
  };
3582
3358
  }
3583
3359
 
3584
- const getLearningModel_ConfigPropertyNames = {
3585
- displayName: 'getLearningModel',
3586
- parameters: {
3587
- required: ['learningItemId'],
3588
- optional: []
3589
- }
3590
- };
3360
+ const adapterName$4 = 'getLearningModel';
3361
+ const getLearningModel_ConfigPropertyMetadata = [
3362
+ generateParamConfigMetadata('learningItemId', true),
3363
+ ];
3364
+ const getLearningModel_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getLearningModel_ConfigPropertyMetadata);
3591
3365
  function createResourceParams$4(config) {
3592
3366
  const resourceParams = {
3593
3367
  urlParams: {
@@ -3653,21 +3427,7 @@ function buildNetworkSnapshot$4(luvio, config, options) {
3653
3427
  });
3654
3428
  }
3655
3429
  function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
3656
- const { luvio, config } = context;
3657
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
3658
- const dispatchOptions = {
3659
- resourceRequestContext: {
3660
- requestCorrelator,
3661
- luvioRequestMethod: undefined,
3662
- },
3663
- eventObservers
3664
- };
3665
- if (networkPriority !== 'normal') {
3666
- dispatchOptions.overrides = {
3667
- priority: networkPriority
3668
- };
3669
- }
3670
- return buildNetworkSnapshot$4(luvio, config, dispatchOptions);
3430
+ return buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
3671
3431
  }
3672
3432
  function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
3673
3433
  const { luvio, config } = context;
@@ -4230,26 +3990,8 @@ const ingest$2 = function TrailheadModuleRepresentationIngest(input, path, luvio
4230
3990
  }
4231
3991
  }
4232
3992
  const key = keyBuilderFromType$2(luvio, input);
4233
- const existingRecord = store.readEntry(key);
4234
3993
  const ttlToUse = TTL$2;
4235
- let incomingRecord = normalize$2(input, store.readEntry(key), {
4236
- fullPath: key,
4237
- parent: path.parent,
4238
- propertyName: path.propertyName,
4239
- ttl: ttlToUse
4240
- });
4241
- if (existingRecord === undefined || equals$3(existingRecord, incomingRecord) === false) {
4242
- luvio.storePublish(key, incomingRecord);
4243
- }
4244
- {
4245
- const storeMetadataParams = {
4246
- ttl: ttlToUse,
4247
- namespace: "LearningContentPlatform",
4248
- version: VERSION$3,
4249
- representationName: RepresentationType$2,
4250
- };
4251
- luvio.publishStoreMetadata(key, storeMetadataParams);
4252
- }
3994
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "LearningContentPlatform", VERSION$3, RepresentationType$2, equals$3);
4253
3995
  return createLink(key);
4254
3996
  };
4255
3997
  function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
@@ -4316,13 +4058,11 @@ function createResourceRequest$3(config) {
4316
4058
  };
4317
4059
  }
4318
4060
 
4319
- const getModule_ConfigPropertyNames = {
4320
- displayName: 'getModule',
4321
- parameters: {
4322
- required: ['moduleId'],
4323
- optional: []
4324
- }
4325
- };
4061
+ const adapterName$3 = 'getModule';
4062
+ const getModule_ConfigPropertyMetadata = [
4063
+ generateParamConfigMetadata('moduleId', true),
4064
+ ];
4065
+ const getModule_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getModule_ConfigPropertyMetadata);
4326
4066
  function createResourceParams$3(config) {
4327
4067
  const resourceParams = {
4328
4068
  urlParams: {
@@ -4388,21 +4128,7 @@ function buildNetworkSnapshot$3(luvio, config, options) {
4388
4128
  });
4389
4129
  }
4390
4130
  function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
4391
- const { luvio, config } = context;
4392
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
4393
- const dispatchOptions = {
4394
- resourceRequestContext: {
4395
- requestCorrelator,
4396
- luvioRequestMethod: undefined,
4397
- },
4398
- eventObservers
4399
- };
4400
- if (networkPriority !== 'normal') {
4401
- dispatchOptions.overrides = {
4402
- priority: networkPriority
4403
- };
4404
- }
4405
- return buildNetworkSnapshot$3(luvio, config, dispatchOptions);
4131
+ return buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
4406
4132
  }
4407
4133
  function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
4408
4134
  const { luvio, config } = context;
@@ -4540,26 +4266,8 @@ const ingest$1 = function LearningPracticeRepresentationIngest(input, path, luvi
4540
4266
  }
4541
4267
  }
4542
4268
  const key = keyBuilderFromType$1(luvio, input);
4543
- const existingRecord = store.readEntry(key);
4544
4269
  const ttlToUse = TTL$1;
4545
- let incomingRecord = normalize$1(input, store.readEntry(key), {
4546
- fullPath: key,
4547
- parent: path.parent,
4548
- propertyName: path.propertyName,
4549
- ttl: ttlToUse
4550
- });
4551
- if (existingRecord === undefined || equals$2(existingRecord, incomingRecord) === false) {
4552
- luvio.storePublish(key, incomingRecord);
4553
- }
4554
- {
4555
- const storeMetadataParams = {
4556
- ttl: ttlToUse,
4557
- namespace: "LearningContentPlatform",
4558
- version: VERSION$2,
4559
- representationName: RepresentationType$1,
4560
- };
4561
- luvio.publishStoreMetadata(key, storeMetadataParams);
4562
- }
4270
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "LearningContentPlatform", VERSION$2, RepresentationType$1, equals$2);
4563
4271
  return createLink(key);
4564
4272
  };
4565
4273
  function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
@@ -4626,13 +4334,11 @@ function createResourceRequest$2(config) {
4626
4334
  };
4627
4335
  }
4628
4336
 
4629
- const getLearningPractice_ConfigPropertyNames = {
4630
- displayName: 'getLearningPractice',
4631
- parameters: {
4632
- required: ['learningItemId'],
4633
- optional: []
4634
- }
4635
- };
4337
+ const adapterName$2 = 'getLearningPractice';
4338
+ const getLearningPractice_ConfigPropertyMetadata = [
4339
+ generateParamConfigMetadata('learningItemId', true),
4340
+ ];
4341
+ const getLearningPractice_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getLearningPractice_ConfigPropertyMetadata);
4636
4342
  function createResourceParams$2(config) {
4637
4343
  const resourceParams = {
4638
4344
  urlParams: {
@@ -4698,21 +4404,7 @@ function buildNetworkSnapshot$2(luvio, config, options) {
4698
4404
  });
4699
4405
  }
4700
4406
  function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
4701
- const { luvio, config } = context;
4702
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
4703
- const dispatchOptions = {
4704
- resourceRequestContext: {
4705
- requestCorrelator,
4706
- luvioRequestMethod: undefined,
4707
- },
4708
- eventObservers
4709
- };
4710
- if (networkPriority !== 'normal') {
4711
- dispatchOptions.overrides = {
4712
- priority: networkPriority
4713
- };
4714
- }
4715
- return buildNetworkSnapshot$2(luvio, config, dispatchOptions);
4407
+ return buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
4716
4408
  }
4717
4409
  function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
4718
4410
  const { luvio, config } = context;
@@ -4804,13 +4496,11 @@ function createResourceRequest$1(config) {
4804
4496
  };
4805
4497
  }
4806
4498
 
4807
- const evaluateLearningItem_ConfigPropertyNames = {
4808
- displayName: 'evaluateLearningItem',
4809
- parameters: {
4810
- required: ['payload'],
4811
- optional: []
4812
- }
4813
- };
4499
+ const adapterName$1 = 'evaluateLearningItem';
4500
+ const evaluateLearningItem_ConfigPropertyMetadata = [
4501
+ generateParamConfigMetadata('payload', true),
4502
+ ];
4503
+ const evaluateLearningItem_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, evaluateLearningItem_ConfigPropertyMetadata);
4814
4504
  function createResourceParams$1(config) {
4815
4505
  const resourceParams = {
4816
4506
  body: {
@@ -5078,26 +4768,8 @@ const ingest = function LearningTextLessonRepresentationIngest(input, path, luvi
5078
4768
  }
5079
4769
  }
5080
4770
  const key = keyBuilderFromType(luvio, input);
5081
- const existingRecord = store.readEntry(key);
5082
4771
  const ttlToUse = TTL;
5083
- let incomingRecord = normalize(input, store.readEntry(key), {
5084
- fullPath: key,
5085
- parent: path.parent,
5086
- propertyName: path.propertyName,
5087
- ttl: ttlToUse
5088
- });
5089
- if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
5090
- luvio.storePublish(key, incomingRecord);
5091
- }
5092
- {
5093
- const storeMetadataParams = {
5094
- ttl: ttlToUse,
5095
- namespace: "LearningContentPlatform",
5096
- version: VERSION,
5097
- representationName: RepresentationType,
5098
- };
5099
- luvio.publishStoreMetadata(key, storeMetadataParams);
5100
- }
4772
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "LearningContentPlatform", VERSION, RepresentationType, equals);
5101
4773
  return createLink(key);
5102
4774
  };
5103
4775
  function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
@@ -5164,13 +4836,11 @@ function createResourceRequest(config) {
5164
4836
  };
5165
4837
  }
5166
4838
 
5167
- const getTextLesson_ConfigPropertyNames = {
5168
- displayName: 'getTextLesson',
5169
- parameters: {
5170
- required: ['learningItemId'],
5171
- optional: []
5172
- }
5173
- };
4839
+ const adapterName = 'getTextLesson';
4840
+ const getTextLesson_ConfigPropertyMetadata = [
4841
+ generateParamConfigMetadata('learningItemId', true),
4842
+ ];
4843
+ const getTextLesson_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getTextLesson_ConfigPropertyMetadata);
5174
4844
  function createResourceParams(config) {
5175
4845
  const resourceParams = {
5176
4846
  urlParams: {
@@ -5236,21 +4906,7 @@ function buildNetworkSnapshot(luvio, config, options) {
5236
4906
  });
5237
4907
  }
5238
4908
  function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
5239
- const { luvio, config } = context;
5240
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
5241
- const dispatchOptions = {
5242
- resourceRequestContext: {
5243
- requestCorrelator,
5244
- luvioRequestMethod: undefined,
5245
- },
5246
- eventObservers
5247
- };
5248
- if (networkPriority !== 'normal') {
5249
- dispatchOptions.overrides = {
5250
- priority: networkPriority
5251
- };
5252
- }
5253
- return buildNetworkSnapshot(luvio, config, dispatchOptions);
4909
+ return buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
5254
4910
  }
5255
4911
  function buildCachedSnapshotCachePolicy(context, storeLookup) {
5256
4912
  const { luvio, config } = context;