@salesforce/lds-adapters-platform-learning-content 1.136.8 → 1.138.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.
@@ -91,9 +91,9 @@ function createLink(ref) {
91
91
  };
92
92
  }
93
93
 
94
- const TTL$9 = 15000;
95
- const VERSION$j = "b489f9f2cbdc91a04dd15b4d467b6760";
96
- function validate$k(obj, path = 'FeaturedItemRepresentation') {
94
+ const TTL$8 = 15000;
95
+ const VERSION$h = "b489f9f2cbdc91a04dd15b4d467b6760";
96
+ function validate$i(obj, path = 'FeaturedItemRepresentation') {
97
97
  const v_error = (() => {
98
98
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
99
99
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -490,23 +490,23 @@ function validate$k(obj, path = 'FeaturedItemRepresentation') {
490
490
  })();
491
491
  return v_error === undefined ? null : v_error;
492
492
  }
493
- const RepresentationType$f = 'FeaturedItemRepresentation';
494
- function keyBuilder$x(luvio, config) {
495
- return keyPrefix + '::' + RepresentationType$f + ':' + config.id;
493
+ const RepresentationType$e = 'FeaturedItemRepresentation';
494
+ function keyBuilder$u(luvio, config) {
495
+ return keyPrefix + '::' + RepresentationType$e + ':' + config.id;
496
496
  }
497
- function keyBuilderFromType$9(luvio, object) {
497
+ function keyBuilderFromType$8(luvio, object) {
498
498
  const keyParams = {
499
499
  id: object.id
500
500
  };
501
- return keyBuilder$x(luvio, keyParams);
501
+ return keyBuilder$u(luvio, keyParams);
502
502
  }
503
- function normalize$f(input, existing, path, luvio, store, timestamp) {
503
+ function normalize$e(input, existing, path, luvio, store, timestamp) {
504
504
  return input;
505
505
  }
506
- const select$w = function FeaturedItemRepresentationSelect() {
506
+ const select$t = function FeaturedItemRepresentationSelect() {
507
507
  return {
508
508
  kind: 'Fragment',
509
- version: VERSION$j,
509
+ version: VERSION$h,
510
510
  private: [],
511
511
  selections: [
512
512
  {
@@ -588,7 +588,7 @@ const select$w = function FeaturedItemRepresentationSelect() {
588
588
  ]
589
589
  };
590
590
  };
591
- function equals$j(existing, incoming) {
591
+ function equals$h(existing, incoming) {
592
592
  const existing_description = existing.description;
593
593
  const incoming_description = incoming.description;
594
594
  if (!(existing_description === incoming_description)) {
@@ -686,50 +686,50 @@ function equals$j(existing, incoming) {
686
686
  }
687
687
  return true;
688
688
  }
689
- const ingest$f = function FeaturedItemRepresentationIngest(input, path, luvio, store, timestamp) {
689
+ const ingest$e = function FeaturedItemRepresentationIngest(input, path, luvio, store, timestamp) {
690
690
  if (process.env.NODE_ENV !== 'production') {
691
- const validateError = validate$k(input);
691
+ const validateError = validate$i(input);
692
692
  if (validateError !== null) {
693
693
  throw validateError;
694
694
  }
695
695
  }
696
- const key = keyBuilderFromType$9(luvio, input);
696
+ const key = keyBuilderFromType$8(luvio, input);
697
697
  const existingRecord = store.readEntry(key);
698
- const ttlToUse = TTL$9;
699
- let incomingRecord = normalize$f(input, store.readEntry(key), {
698
+ const ttlToUse = TTL$8;
699
+ let incomingRecord = normalize$e(input, store.readEntry(key), {
700
700
  fullPath: key,
701
701
  parent: path.parent,
702
702
  propertyName: path.propertyName,
703
703
  ttl: ttlToUse
704
704
  });
705
- if (existingRecord === undefined || equals$j(existingRecord, incomingRecord) === false) {
705
+ if (existingRecord === undefined || equals$h(existingRecord, incomingRecord) === false) {
706
706
  luvio.storePublish(key, incomingRecord);
707
707
  }
708
708
  {
709
709
  const storeMetadataParams = {
710
710
  ttl: ttlToUse,
711
711
  namespace: "LearningContentPlatform",
712
- version: VERSION$j,
713
- representationName: RepresentationType$f,
712
+ version: VERSION$h,
713
+ representationName: RepresentationType$e,
714
714
  };
715
715
  luvio.publishStoreMetadata(key, storeMetadataParams);
716
716
  }
717
717
  return createLink(key);
718
718
  };
719
- function getTypeCacheKeys$f(luvio, input, fullPathFactory) {
719
+ function getTypeCacheKeys$e(luvio, input, fullPathFactory) {
720
720
  const rootKeySet = new StoreKeyMap();
721
721
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
722
- const rootKey = keyBuilderFromType$9(luvio, input);
722
+ const rootKey = keyBuilderFromType$8(luvio, input);
723
723
  rootKeySet.set(rootKey, {
724
724
  namespace: keyPrefix,
725
- representationName: RepresentationType$f,
725
+ representationName: RepresentationType$e,
726
726
  mergeable: false
727
727
  });
728
728
  return rootKeySet;
729
729
  }
730
730
 
731
- const VERSION$i = "94c7194d9578589364c6efd021226634";
732
- function validate$j(obj, path = 'FeaturedItemRecommendedListRepresentation') {
731
+ const VERSION$g = "94c7194d9578589364c6efd021226634";
732
+ function validate$h(obj, path = 'FeaturedItemRecommendedListRepresentation') {
733
733
  const v_error = (() => {
734
734
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
735
735
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -749,14 +749,14 @@ function validate$j(obj, path = 'FeaturedItemRecommendedListRepresentation') {
749
749
  })();
750
750
  return v_error === undefined ? null : v_error;
751
751
  }
752
- const RepresentationType$e = 'FeaturedItemRecommendedListRepresentation';
753
- function normalize$e(input, existing, path, luvio, store, timestamp) {
752
+ const RepresentationType$d = 'FeaturedItemRecommendedListRepresentation';
753
+ function normalize$d(input, existing, path, luvio, store, timestamp) {
754
754
  const input_recommendedList = input.recommendedList;
755
755
  const input_recommendedList_id = path.fullPath + '__recommendedList';
756
756
  for (let i = 0; i < input_recommendedList.length; i++) {
757
757
  const input_recommendedList_item = input_recommendedList[i];
758
758
  let input_recommendedList_item_id = input_recommendedList_id + '__' + i;
759
- input_recommendedList[i] = ingest$f(input_recommendedList_item, {
759
+ input_recommendedList[i] = ingest$e(input_recommendedList_item, {
760
760
  fullPath: input_recommendedList_item_id,
761
761
  propertyName: i,
762
762
  parent: {
@@ -769,22 +769,22 @@ function normalize$e(input, existing, path, luvio, store, timestamp) {
769
769
  }
770
770
  return input;
771
771
  }
772
- const select$v = function FeaturedItemRecommendedListRepresentationSelect() {
772
+ const select$s = function FeaturedItemRecommendedListRepresentationSelect() {
773
773
  return {
774
774
  kind: 'Fragment',
775
- version: VERSION$i,
775
+ version: VERSION$g,
776
776
  private: [],
777
777
  selections: [
778
778
  {
779
779
  name: 'recommendedList',
780
780
  kind: 'Link',
781
781
  plural: true,
782
- fragment: select$w()
782
+ fragment: select$t()
783
783
  }
784
784
  ]
785
785
  };
786
786
  };
787
- function equals$i(existing, incoming) {
787
+ function equals$g(existing, incoming) {
788
788
  const existing_recommendedList = existing.recommendedList;
789
789
  const incoming_recommendedList = incoming.recommendedList;
790
790
  const equals_recommendedList_items = equalsArray(existing_recommendedList, incoming_recommendedList, (existing_recommendedList_item, incoming_recommendedList_item) => {
@@ -797,9 +797,9 @@ function equals$i(existing, incoming) {
797
797
  }
798
798
  return true;
799
799
  }
800
- const ingest$e = function FeaturedItemRecommendedListRepresentationIngest(input, path, luvio, store, timestamp) {
800
+ const ingest$d = function FeaturedItemRecommendedListRepresentationIngest(input, path, luvio, store, timestamp) {
801
801
  if (process.env.NODE_ENV !== 'production') {
802
- const validateError = validate$j(input);
802
+ const validateError = validate$h(input);
803
803
  if (validateError !== null) {
804
804
  throw validateError;
805
805
  }
@@ -807,58 +807,58 @@ const ingest$e = function FeaturedItemRecommendedListRepresentationIngest(input,
807
807
  const key = path.fullPath;
808
808
  const existingRecord = store.readEntry(key);
809
809
  const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
810
- let incomingRecord = normalize$e(input, store.readEntry(key), {
810
+ let incomingRecord = normalize$d(input, store.readEntry(key), {
811
811
  fullPath: key,
812
812
  parent: path.parent,
813
813
  propertyName: path.propertyName,
814
814
  ttl: ttlToUse
815
815
  }, luvio, store);
816
- if (existingRecord === undefined || equals$i(existingRecord, incomingRecord) === false) {
816
+ if (existingRecord === undefined || equals$g(existingRecord, incomingRecord) === false) {
817
817
  luvio.storePublish(key, incomingRecord);
818
818
  }
819
819
  if (ttlToUse !== undefined) {
820
820
  const storeMetadataParams = {
821
821
  ttl: ttlToUse,
822
822
  namespace: "LearningContentPlatform",
823
- version: VERSION$i,
824
- representationName: RepresentationType$e,
823
+ version: VERSION$g,
824
+ representationName: RepresentationType$d,
825
825
  };
826
826
  luvio.publishStoreMetadata(key, storeMetadataParams);
827
827
  }
828
828
  return createLink(key);
829
829
  };
830
- function getTypeCacheKeys$e(luvio, input, fullPathFactory) {
830
+ function getTypeCacheKeys$d(luvio, input, fullPathFactory) {
831
831
  const rootKeySet = new StoreKeyMap();
832
832
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
833
833
  const rootKey = fullPathFactory();
834
834
  rootKeySet.set(rootKey, {
835
835
  namespace: keyPrefix,
836
- representationName: RepresentationType$e,
836
+ representationName: RepresentationType$d,
837
837
  mergeable: false
838
838
  });
839
839
  const input_recommendedList_length = input.recommendedList.length;
840
840
  for (let i = 0; i < input_recommendedList_length; i++) {
841
- rootKeySet.merge(getTypeCacheKeys$f(luvio, input.recommendedList[i]));
841
+ rootKeySet.merge(getTypeCacheKeys$e(luvio, input.recommendedList[i]));
842
842
  }
843
843
  return rootKeySet;
844
844
  }
845
845
 
846
- function select$u(luvio, params) {
847
- return select$v();
846
+ function select$r(luvio, params) {
847
+ return select$s();
848
848
  }
849
- function keyBuilder$w(luvio, params) {
849
+ function keyBuilder$t(luvio, params) {
850
850
  return keyPrefix + '::FeaturedItemRecommendedListRepresentation:(' + 'appId:' + params.queryParams.appId + ',' + 'context:' + params.queryParams.context + ')';
851
851
  }
852
- function getResponseCacheKeys$c(luvio, resourceParams, response) {
853
- return getTypeCacheKeys$e(luvio, response, () => keyBuilder$w(luvio, resourceParams));
852
+ function getResponseCacheKeys$b(luvio, resourceParams, response) {
853
+ return getTypeCacheKeys$d(luvio, response, () => keyBuilder$t(luvio, resourceParams));
854
854
  }
855
- function ingestSuccess$c(luvio, resourceParams, response, snapshotRefresh) {
855
+ function ingestSuccess$b(luvio, resourceParams, response, snapshotRefresh) {
856
856
  const { body } = response;
857
- const key = keyBuilder$w(luvio, resourceParams);
858
- luvio.storeIngest(key, ingest$e, body);
857
+ const key = keyBuilder$t(luvio, resourceParams);
858
+ luvio.storeIngest(key, ingest$d, body);
859
859
  const snapshot = luvio.storeLookup({
860
860
  recordId: key,
861
- node: select$u(),
861
+ node: select$r(),
862
862
  variables: {},
863
863
  }, snapshotRefresh);
864
864
  if (process.env.NODE_ENV !== 'production') {
@@ -869,13 +869,13 @@ function ingestSuccess$c(luvio, resourceParams, response, snapshotRefresh) {
869
869
  deepFreeze(snapshot.data);
870
870
  return snapshot;
871
871
  }
872
- function ingestError$b(luvio, params, error, snapshotRefresh) {
873
- const key = keyBuilder$w(luvio, params);
872
+ function ingestError$a(luvio, params, error, snapshotRefresh) {
873
+ const key = keyBuilder$t(luvio, params);
874
874
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
875
875
  luvio.storeIngestError(key, errorSnapshot);
876
876
  return errorSnapshot;
877
877
  }
878
- function createResourceRequest$c(config) {
878
+ function createResourceRequest$b(config) {
879
879
  const headers = {};
880
880
  return {
881
881
  baseUri: '/services/data/v59.0',
@@ -896,7 +896,7 @@ const getFeaturedItemsRecommendedList_ConfigPropertyNames = {
896
896
  optional: []
897
897
  }
898
898
  };
899
- function createResourceParams$c(config) {
899
+ function createResourceParams$b(config) {
900
900
  const resourceParams = {
901
901
  queryParams: {
902
902
  appId: config.appId, context: config.context
@@ -904,11 +904,11 @@ function createResourceParams$c(config) {
904
904
  };
905
905
  return resourceParams;
906
906
  }
907
- function keyBuilder$v(luvio, config) {
908
- const resourceParams = createResourceParams$c(config);
909
- return keyBuilder$w(luvio, resourceParams);
907
+ function keyBuilder$s(luvio, config) {
908
+ const resourceParams = createResourceParams$b(config);
909
+ return keyBuilder$t(luvio, resourceParams);
910
910
  }
911
- function typeCheckConfig$c(untrustedConfig) {
911
+ function typeCheckConfig$b(untrustedConfig) {
912
912
  const config = {};
913
913
  const untrustedConfig_appId = untrustedConfig.appId;
914
914
  if (typeof untrustedConfig_appId === 'string') {
@@ -920,48 +920,48 @@ function typeCheckConfig$c(untrustedConfig) {
920
920
  }
921
921
  return config;
922
922
  }
923
- function validateAdapterConfig$c(untrustedConfig, configPropertyNames) {
923
+ function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
924
924
  if (!untrustedIsObject(untrustedConfig)) {
925
925
  return null;
926
926
  }
927
927
  if (process.env.NODE_ENV !== 'production') {
928
928
  validateConfig(untrustedConfig, configPropertyNames);
929
929
  }
930
- const config = typeCheckConfig$c(untrustedConfig);
930
+ const config = typeCheckConfig$b(untrustedConfig);
931
931
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
932
932
  return null;
933
933
  }
934
934
  return config;
935
935
  }
936
- function adapterFragment$b(luvio, config) {
937
- createResourceParams$c(config);
938
- return select$u();
936
+ function adapterFragment$a(luvio, config) {
937
+ createResourceParams$b(config);
938
+ return select$r();
939
939
  }
940
- function onFetchResponseSuccess$b(luvio, config, resourceParams, response) {
941
- const snapshot = ingestSuccess$c(luvio, resourceParams, response, {
940
+ function onFetchResponseSuccess$a(luvio, config, resourceParams, response) {
941
+ const snapshot = ingestSuccess$b(luvio, resourceParams, response, {
942
942
  config,
943
- resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
943
+ resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
944
944
  });
945
945
  return luvio.storeBroadcast().then(() => snapshot);
946
946
  }
947
- function onFetchResponseError$b(luvio, config, resourceParams, response) {
948
- const snapshot = ingestError$b(luvio, resourceParams, response, {
947
+ function onFetchResponseError$a(luvio, config, resourceParams, response) {
948
+ const snapshot = ingestError$a(luvio, resourceParams, response, {
949
949
  config,
950
- resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
950
+ resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
951
951
  });
952
952
  return luvio.storeBroadcast().then(() => snapshot);
953
953
  }
954
- function buildNetworkSnapshot$c(luvio, config, options) {
955
- const resourceParams = createResourceParams$c(config);
956
- const request = createResourceRequest$c(resourceParams);
954
+ function buildNetworkSnapshot$b(luvio, config, options) {
955
+ const resourceParams = createResourceParams$b(config);
956
+ const request = createResourceRequest$b(resourceParams);
957
957
  return luvio.dispatchResourceRequest(request, options)
958
958
  .then((response) => {
959
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$b(luvio, config, resourceParams, response), () => getResponseCacheKeys$c(luvio, resourceParams, response.body));
959
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$a(luvio, config, resourceParams, response), () => getResponseCacheKeys$b(luvio, resourceParams, response.body));
960
960
  }, (response) => {
961
- return luvio.handleErrorResponse(() => onFetchResponseError$b(luvio, config, resourceParams, response));
961
+ return luvio.handleErrorResponse(() => onFetchResponseError$a(luvio, config, resourceParams, response));
962
962
  });
963
963
  }
964
- function buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext) {
964
+ function buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext) {
965
965
  const { luvio, config } = context;
966
966
  const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
967
967
  const dispatchOptions = {
@@ -976,33 +976,33 @@ function buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext
976
976
  priority: networkPriority
977
977
  };
978
978
  }
979
- return buildNetworkSnapshot$c(luvio, config, dispatchOptions);
979
+ return buildNetworkSnapshot$b(luvio, config, dispatchOptions);
980
980
  }
981
- function buildCachedSnapshotCachePolicy$b(context, storeLookup) {
981
+ function buildCachedSnapshotCachePolicy$a(context, storeLookup) {
982
982
  const { luvio, config } = context;
983
983
  const selector = {
984
- recordId: keyBuilder$v(luvio, config),
985
- node: adapterFragment$b(luvio, config),
984
+ recordId: keyBuilder$s(luvio, config),
985
+ node: adapterFragment$a(luvio, config),
986
986
  variables: {},
987
987
  };
988
988
  const cacheSnapshot = storeLookup(selector, {
989
989
  config,
990
- resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
990
+ resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
991
991
  });
992
992
  return cacheSnapshot;
993
993
  }
994
994
  const getFeaturedItemsRecommendedListAdapterFactory = (luvio) => function LearningContentPlatform__getFeaturedItemsRecommendedList(untrustedConfig, requestContext) {
995
- const config = validateAdapterConfig$c(untrustedConfig, getFeaturedItemsRecommendedList_ConfigPropertyNames);
995
+ const config = validateAdapterConfig$b(untrustedConfig, getFeaturedItemsRecommendedList_ConfigPropertyNames);
996
996
  // Invalid or incomplete config
997
997
  if (config === null) {
998
998
  return null;
999
999
  }
1000
1000
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1001
- buildCachedSnapshotCachePolicy$b, buildNetworkSnapshotCachePolicy$b);
1001
+ buildCachedSnapshotCachePolicy$a, buildNetworkSnapshotCachePolicy$a);
1002
1002
  };
1003
1003
 
1004
- const VERSION$h = "5d7adb55f43466f61c4837ebf27eab61";
1005
- function validate$i(obj, path = 'FeaturedItemRelatedListRepresentation') {
1004
+ const VERSION$f = "5d7adb55f43466f61c4837ebf27eab61";
1005
+ function validate$g(obj, path = 'FeaturedItemRelatedListRepresentation') {
1006
1006
  const v_error = (() => {
1007
1007
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1008
1008
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1022,14 +1022,14 @@ function validate$i(obj, path = 'FeaturedItemRelatedListRepresentation') {
1022
1022
  })();
1023
1023
  return v_error === undefined ? null : v_error;
1024
1024
  }
1025
- const RepresentationType$d = 'FeaturedItemRelatedListRepresentation';
1026
- function normalize$d(input, existing, path, luvio, store, timestamp) {
1025
+ const RepresentationType$c = 'FeaturedItemRelatedListRepresentation';
1026
+ function normalize$c(input, existing, path, luvio, store, timestamp) {
1027
1027
  const input_relatedList = input.relatedList;
1028
1028
  const input_relatedList_id = path.fullPath + '__relatedList';
1029
1029
  for (let i = 0; i < input_relatedList.length; i++) {
1030
1030
  const input_relatedList_item = input_relatedList[i];
1031
1031
  let input_relatedList_item_id = input_relatedList_id + '__' + i;
1032
- input_relatedList[i] = ingest$f(input_relatedList_item, {
1032
+ input_relatedList[i] = ingest$e(input_relatedList_item, {
1033
1033
  fullPath: input_relatedList_item_id,
1034
1034
  propertyName: i,
1035
1035
  parent: {
@@ -1042,22 +1042,22 @@ function normalize$d(input, existing, path, luvio, store, timestamp) {
1042
1042
  }
1043
1043
  return input;
1044
1044
  }
1045
- const select$t = function FeaturedItemRelatedListRepresentationSelect() {
1045
+ const select$q = function FeaturedItemRelatedListRepresentationSelect() {
1046
1046
  return {
1047
1047
  kind: 'Fragment',
1048
- version: VERSION$h,
1048
+ version: VERSION$f,
1049
1049
  private: [],
1050
1050
  selections: [
1051
1051
  {
1052
1052
  name: 'relatedList',
1053
1053
  kind: 'Link',
1054
1054
  plural: true,
1055
- fragment: select$w()
1055
+ fragment: select$t()
1056
1056
  }
1057
1057
  ]
1058
1058
  };
1059
1059
  };
1060
- function equals$h(existing, incoming) {
1060
+ function equals$f(existing, incoming) {
1061
1061
  const existing_relatedList = existing.relatedList;
1062
1062
  const incoming_relatedList = incoming.relatedList;
1063
1063
  const equals_relatedList_items = equalsArray(existing_relatedList, incoming_relatedList, (existing_relatedList_item, incoming_relatedList_item) => {
@@ -1070,9 +1070,9 @@ function equals$h(existing, incoming) {
1070
1070
  }
1071
1071
  return true;
1072
1072
  }
1073
- const ingest$d = function FeaturedItemRelatedListRepresentationIngest(input, path, luvio, store, timestamp) {
1073
+ const ingest$c = function FeaturedItemRelatedListRepresentationIngest(input, path, luvio, store, timestamp) {
1074
1074
  if (process.env.NODE_ENV !== 'production') {
1075
- const validateError = validate$i(input);
1075
+ const validateError = validate$g(input);
1076
1076
  if (validateError !== null) {
1077
1077
  throw validateError;
1078
1078
  }
@@ -1080,58 +1080,58 @@ const ingest$d = function FeaturedItemRelatedListRepresentationIngest(input, pat
1080
1080
  const key = path.fullPath;
1081
1081
  const existingRecord = store.readEntry(key);
1082
1082
  const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
1083
- let incomingRecord = normalize$d(input, store.readEntry(key), {
1083
+ let incomingRecord = normalize$c(input, store.readEntry(key), {
1084
1084
  fullPath: key,
1085
1085
  parent: path.parent,
1086
1086
  propertyName: path.propertyName,
1087
1087
  ttl: ttlToUse
1088
1088
  }, luvio, store);
1089
- if (existingRecord === undefined || equals$h(existingRecord, incomingRecord) === false) {
1089
+ if (existingRecord === undefined || equals$f(existingRecord, incomingRecord) === false) {
1090
1090
  luvio.storePublish(key, incomingRecord);
1091
1091
  }
1092
1092
  if (ttlToUse !== undefined) {
1093
1093
  const storeMetadataParams = {
1094
1094
  ttl: ttlToUse,
1095
1095
  namespace: "LearningContentPlatform",
1096
- version: VERSION$h,
1097
- representationName: RepresentationType$d,
1096
+ version: VERSION$f,
1097
+ representationName: RepresentationType$c,
1098
1098
  };
1099
1099
  luvio.publishStoreMetadata(key, storeMetadataParams);
1100
1100
  }
1101
1101
  return createLink(key);
1102
1102
  };
1103
- function getTypeCacheKeys$d(luvio, input, fullPathFactory) {
1103
+ function getTypeCacheKeys$c(luvio, input, fullPathFactory) {
1104
1104
  const rootKeySet = new StoreKeyMap();
1105
1105
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1106
1106
  const rootKey = fullPathFactory();
1107
1107
  rootKeySet.set(rootKey, {
1108
1108
  namespace: keyPrefix,
1109
- representationName: RepresentationType$d,
1109
+ representationName: RepresentationType$c,
1110
1110
  mergeable: false
1111
1111
  });
1112
1112
  const input_relatedList_length = input.relatedList.length;
1113
1113
  for (let i = 0; i < input_relatedList_length; i++) {
1114
- rootKeySet.merge(getTypeCacheKeys$f(luvio, input.relatedList[i]));
1114
+ rootKeySet.merge(getTypeCacheKeys$e(luvio, input.relatedList[i]));
1115
1115
  }
1116
1116
  return rootKeySet;
1117
1117
  }
1118
1118
 
1119
- function select$s(luvio, params) {
1120
- return select$t();
1119
+ function select$p(luvio, params) {
1120
+ return select$q();
1121
1121
  }
1122
- function keyBuilder$u(luvio, params) {
1122
+ function keyBuilder$r(luvio, params) {
1123
1123
  return keyPrefix + '::FeaturedItemRelatedListRepresentation:(' + 'appId:' + params.queryParams.appId + ',' + 'pageRef:' + params.queryParams.pageRef + ')';
1124
1124
  }
1125
- function getResponseCacheKeys$b(luvio, resourceParams, response) {
1126
- return getTypeCacheKeys$d(luvio, response, () => keyBuilder$u(luvio, resourceParams));
1125
+ function getResponseCacheKeys$a(luvio, resourceParams, response) {
1126
+ return getTypeCacheKeys$c(luvio, response, () => keyBuilder$r(luvio, resourceParams));
1127
1127
  }
1128
- function ingestSuccess$b(luvio, resourceParams, response, snapshotRefresh) {
1128
+ function ingestSuccess$a(luvio, resourceParams, response, snapshotRefresh) {
1129
1129
  const { body } = response;
1130
- const key = keyBuilder$u(luvio, resourceParams);
1131
- luvio.storeIngest(key, ingest$d, body);
1130
+ const key = keyBuilder$r(luvio, resourceParams);
1131
+ luvio.storeIngest(key, ingest$c, body);
1132
1132
  const snapshot = luvio.storeLookup({
1133
1133
  recordId: key,
1134
- node: select$s(),
1134
+ node: select$p(),
1135
1135
  variables: {},
1136
1136
  }, snapshotRefresh);
1137
1137
  if (process.env.NODE_ENV !== 'production') {
@@ -1142,13 +1142,13 @@ function ingestSuccess$b(luvio, resourceParams, response, snapshotRefresh) {
1142
1142
  deepFreeze(snapshot.data);
1143
1143
  return snapshot;
1144
1144
  }
1145
- function ingestError$a(luvio, params, error, snapshotRefresh) {
1146
- const key = keyBuilder$u(luvio, params);
1145
+ function ingestError$9(luvio, params, error, snapshotRefresh) {
1146
+ const key = keyBuilder$r(luvio, params);
1147
1147
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1148
1148
  luvio.storeIngestError(key, errorSnapshot);
1149
1149
  return errorSnapshot;
1150
1150
  }
1151
- function createResourceRequest$b(config) {
1151
+ function createResourceRequest$a(config) {
1152
1152
  const headers = {};
1153
1153
  return {
1154
1154
  baseUri: '/services/data/v59.0',
@@ -1169,7 +1169,7 @@ const getFeaturedItemsRelatedList_ConfigPropertyNames = {
1169
1169
  optional: []
1170
1170
  }
1171
1171
  };
1172
- function createResourceParams$b(config) {
1172
+ function createResourceParams$a(config) {
1173
1173
  const resourceParams = {
1174
1174
  queryParams: {
1175
1175
  appId: config.appId, pageRef: config.pageRef
@@ -1177,11 +1177,11 @@ function createResourceParams$b(config) {
1177
1177
  };
1178
1178
  return resourceParams;
1179
1179
  }
1180
- function keyBuilder$t(luvio, config) {
1181
- const resourceParams = createResourceParams$b(config);
1182
- return keyBuilder$u(luvio, resourceParams);
1180
+ function keyBuilder$q(luvio, config) {
1181
+ const resourceParams = createResourceParams$a(config);
1182
+ return keyBuilder$r(luvio, resourceParams);
1183
1183
  }
1184
- function typeCheckConfig$b(untrustedConfig) {
1184
+ function typeCheckConfig$a(untrustedConfig) {
1185
1185
  const config = {};
1186
1186
  const untrustedConfig_appId = untrustedConfig.appId;
1187
1187
  if (typeof untrustedConfig_appId === 'string') {
@@ -1193,473 +1193,6 @@ function typeCheckConfig$b(untrustedConfig) {
1193
1193
  }
1194
1194
  return config;
1195
1195
  }
1196
- function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
1197
- if (!untrustedIsObject(untrustedConfig)) {
1198
- return null;
1199
- }
1200
- if (process.env.NODE_ENV !== 'production') {
1201
- validateConfig(untrustedConfig, configPropertyNames);
1202
- }
1203
- const config = typeCheckConfig$b(untrustedConfig);
1204
- if (!areRequiredParametersPresent(config, configPropertyNames)) {
1205
- return null;
1206
- }
1207
- return config;
1208
- }
1209
- function adapterFragment$a(luvio, config) {
1210
- createResourceParams$b(config);
1211
- return select$s();
1212
- }
1213
- function onFetchResponseSuccess$a(luvio, config, resourceParams, response) {
1214
- const snapshot = ingestSuccess$b(luvio, resourceParams, response, {
1215
- config,
1216
- resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
1217
- });
1218
- return luvio.storeBroadcast().then(() => snapshot);
1219
- }
1220
- function onFetchResponseError$a(luvio, config, resourceParams, response) {
1221
- const snapshot = ingestError$a(luvio, resourceParams, response, {
1222
- config,
1223
- resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
1224
- });
1225
- return luvio.storeBroadcast().then(() => snapshot);
1226
- }
1227
- function buildNetworkSnapshot$b(luvio, config, options) {
1228
- const resourceParams = createResourceParams$b(config);
1229
- const request = createResourceRequest$b(resourceParams);
1230
- return luvio.dispatchResourceRequest(request, options)
1231
- .then((response) => {
1232
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$a(luvio, config, resourceParams, response), () => getResponseCacheKeys$b(luvio, resourceParams, response.body));
1233
- }, (response) => {
1234
- return luvio.handleErrorResponse(() => onFetchResponseError$a(luvio, config, resourceParams, response));
1235
- });
1236
- }
1237
- function buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext) {
1238
- const { luvio, config } = context;
1239
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
1240
- const dispatchOptions = {
1241
- resourceRequestContext: {
1242
- requestCorrelator,
1243
- luvioRequestMethod: undefined,
1244
- },
1245
- eventObservers
1246
- };
1247
- if (networkPriority !== 'normal') {
1248
- dispatchOptions.overrides = {
1249
- priority: networkPriority
1250
- };
1251
- }
1252
- return buildNetworkSnapshot$b(luvio, config, dispatchOptions);
1253
- }
1254
- function buildCachedSnapshotCachePolicy$a(context, storeLookup) {
1255
- const { luvio, config } = context;
1256
- const selector = {
1257
- recordId: keyBuilder$t(luvio, config),
1258
- node: adapterFragment$a(luvio, config),
1259
- variables: {},
1260
- };
1261
- const cacheSnapshot = storeLookup(selector, {
1262
- config,
1263
- resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
1264
- });
1265
- return cacheSnapshot;
1266
- }
1267
- const getFeaturedItemsRelatedListAdapterFactory = (luvio) => function LearningContentPlatform__getFeaturedItemsRelatedList(untrustedConfig, requestContext) {
1268
- const config = validateAdapterConfig$b(untrustedConfig, getFeaturedItemsRelatedList_ConfigPropertyNames);
1269
- // Invalid or incomplete config
1270
- if (config === null) {
1271
- return null;
1272
- }
1273
- return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1274
- buildCachedSnapshotCachePolicy$a, buildNetworkSnapshotCachePolicy$a);
1275
- };
1276
-
1277
- const VERSION$g = "a415abdc6f1eb9f80ab2e7981189f769";
1278
- function validate$h(obj, path = 'SurveyQuestionResponseRepresetation') {
1279
- const v_error = (() => {
1280
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1281
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1282
- }
1283
- obj.avgScore;
1284
- const obj_isRatingResponse = obj.isRatingResponse;
1285
- const path_isRatingResponse = path + '.isRatingResponse';
1286
- if (typeof obj_isRatingResponse !== 'boolean') {
1287
- return new TypeError('Expected "boolean" but received "' + typeof obj_isRatingResponse + '" (at "' + path_isRatingResponse + '")');
1288
- }
1289
- const obj_questionDescription = obj.questionDescription;
1290
- const path_questionDescription = path + '.questionDescription';
1291
- if (typeof obj_questionDescription !== 'string') {
1292
- return new TypeError('Expected "string" but received "' + typeof obj_questionDescription + '" (at "' + path_questionDescription + '")');
1293
- }
1294
- const obj_questionId = obj.questionId;
1295
- const path_questionId = path + '.questionId';
1296
- if (typeof obj_questionId !== 'string') {
1297
- return new TypeError('Expected "string" but received "' + typeof obj_questionId + '" (at "' + path_questionId + '")');
1298
- }
1299
- const obj_questionName = obj.questionName;
1300
- const path_questionName = path + '.questionName';
1301
- if (typeof obj_questionName !== 'string') {
1302
- return new TypeError('Expected "string" but received "' + typeof obj_questionName + '" (at "' + path_questionName + '")');
1303
- }
1304
- const obj_ratingValues = obj.ratingValues;
1305
- const path_ratingValues = path + '.ratingValues';
1306
- if (!ArrayIsArray(obj_ratingValues)) {
1307
- return new TypeError('Expected "array" but received "' + typeof obj_ratingValues + '" (at "' + path_ratingValues + '")');
1308
- }
1309
- for (let i = 0; i < obj_ratingValues.length; i++) {
1310
- const obj_ratingValues_item = obj_ratingValues[i];
1311
- const path_ratingValues_item = path_ratingValues + '[' + i + ']';
1312
- if (typeof obj_ratingValues_item !== 'number' || (typeof obj_ratingValues_item === 'number' && Math.floor(obj_ratingValues_item) !== obj_ratingValues_item)) {
1313
- return new TypeError('Expected "integer" but received "' + typeof obj_ratingValues_item + '" (at "' + path_ratingValues_item + '")');
1314
- }
1315
- }
1316
- const obj_textValues = obj.textValues;
1317
- const path_textValues = path + '.textValues';
1318
- if (typeof obj_textValues !== 'object' || ArrayIsArray(obj_textValues) || obj_textValues === null) {
1319
- return new TypeError('Expected "object" but received "' + typeof obj_textValues + '" (at "' + path_textValues + '")');
1320
- }
1321
- const obj_textValues_keys = ObjectKeys(obj_textValues);
1322
- for (let i = 0; i < obj_textValues_keys.length; i++) {
1323
- const key = obj_textValues_keys[i];
1324
- const obj_textValues_prop = obj_textValues[key];
1325
- const path_textValues_prop = path_textValues + '["' + key + '"]';
1326
- if (typeof obj_textValues_prop !== 'string') {
1327
- return new TypeError('Expected "string" but received "' + typeof obj_textValues_prop + '" (at "' + path_textValues_prop + '")');
1328
- }
1329
- }
1330
- })();
1331
- return v_error === undefined ? null : v_error;
1332
- }
1333
- const select$r = function SurveyQuestionResponseRepresetationSelect() {
1334
- return {
1335
- kind: 'Fragment',
1336
- version: VERSION$g,
1337
- private: [],
1338
- selections: [
1339
- {
1340
- name: 'avgScore',
1341
- kind: 'Scalar'
1342
- },
1343
- {
1344
- name: 'isRatingResponse',
1345
- kind: 'Scalar'
1346
- },
1347
- {
1348
- name: 'questionDescription',
1349
- kind: 'Scalar'
1350
- },
1351
- {
1352
- name: 'questionId',
1353
- kind: 'Scalar'
1354
- },
1355
- {
1356
- name: 'questionName',
1357
- kind: 'Scalar'
1358
- },
1359
- {
1360
- name: 'ratingValues',
1361
- kind: 'Scalar',
1362
- plural: true
1363
- },
1364
- {
1365
- name: 'textValues',
1366
- kind: 'Scalar',
1367
- map: true
1368
- }
1369
- ]
1370
- };
1371
- };
1372
- function equals$g(existing, incoming) {
1373
- const existing_isRatingResponse = existing.isRatingResponse;
1374
- const incoming_isRatingResponse = incoming.isRatingResponse;
1375
- if (!(existing_isRatingResponse === incoming_isRatingResponse)) {
1376
- return false;
1377
- }
1378
- const existing_questionDescription = existing.questionDescription;
1379
- const incoming_questionDescription = incoming.questionDescription;
1380
- if (!(existing_questionDescription === incoming_questionDescription)) {
1381
- return false;
1382
- }
1383
- const existing_questionId = existing.questionId;
1384
- const incoming_questionId = incoming.questionId;
1385
- if (!(existing_questionId === incoming_questionId)) {
1386
- return false;
1387
- }
1388
- const existing_questionName = existing.questionName;
1389
- const incoming_questionName = incoming.questionName;
1390
- if (!(existing_questionName === incoming_questionName)) {
1391
- return false;
1392
- }
1393
- const existing_avgScore = existing.avgScore;
1394
- const incoming_avgScore = incoming.avgScore;
1395
- if (!(existing_avgScore === incoming_avgScore)) {
1396
- return false;
1397
- }
1398
- const existing_ratingValues = existing.ratingValues;
1399
- const incoming_ratingValues = incoming.ratingValues;
1400
- const equals_ratingValues_items = equalsArray(existing_ratingValues, incoming_ratingValues, (existing_ratingValues_item, incoming_ratingValues_item) => {
1401
- if (!(existing_ratingValues_item === incoming_ratingValues_item)) {
1402
- return false;
1403
- }
1404
- });
1405
- if (equals_ratingValues_items === false) {
1406
- return false;
1407
- }
1408
- const existing_textValues = existing.textValues;
1409
- const incoming_textValues = incoming.textValues;
1410
- const equals_textValues_props = equalsObject(existing_textValues, incoming_textValues, (existing_textValues_prop, incoming_textValues_prop) => {
1411
- if (!(existing_textValues_prop === incoming_textValues_prop)) {
1412
- return false;
1413
- }
1414
- });
1415
- if (equals_textValues_props === false) {
1416
- return false;
1417
- }
1418
- return true;
1419
- }
1420
-
1421
- const TTL$8 = 15000;
1422
- const VERSION$f = "49558b95e59b76b07748b6f259ebe54d";
1423
- function validate$g(obj, path = 'FeedbackResultRepresentation') {
1424
- const v_error = (() => {
1425
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1426
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1427
- }
1428
- const obj_isFeedbackRequestSubmitted = obj.isFeedbackRequestSubmitted;
1429
- const path_isFeedbackRequestSubmitted = path + '.isFeedbackRequestSubmitted';
1430
- if (typeof obj_isFeedbackRequestSubmitted !== 'boolean') {
1431
- return new TypeError('Expected "boolean" but received "' + typeof obj_isFeedbackRequestSubmitted + '" (at "' + path_isFeedbackRequestSubmitted + '")');
1432
- }
1433
- const obj_isFeedbackResultReturned = obj.isFeedbackResultReturned;
1434
- const path_isFeedbackResultReturned = path + '.isFeedbackResultReturned';
1435
- if (typeof obj_isFeedbackResultReturned !== 'boolean') {
1436
- return new TypeError('Expected "boolean" but received "' + typeof obj_isFeedbackResultReturned + '" (at "' + path_isFeedbackResultReturned + '")');
1437
- }
1438
- const obj_learningItemId = obj.learningItemId;
1439
- const path_learningItemId = path + '.learningItemId';
1440
- if (typeof obj_learningItemId !== 'string') {
1441
- return new TypeError('Expected "string" but received "' + typeof obj_learningItemId + '" (at "' + path_learningItemId + '")');
1442
- }
1443
- const obj_surveyQuestionResponseRepresetationList = obj.surveyQuestionResponseRepresetationList;
1444
- const path_surveyQuestionResponseRepresetationList = path + '.surveyQuestionResponseRepresetationList';
1445
- if (!ArrayIsArray(obj_surveyQuestionResponseRepresetationList)) {
1446
- return new TypeError('Expected "array" but received "' + typeof obj_surveyQuestionResponseRepresetationList + '" (at "' + path_surveyQuestionResponseRepresetationList + '")');
1447
- }
1448
- for (let i = 0; i < obj_surveyQuestionResponseRepresetationList.length; i++) {
1449
- const obj_surveyQuestionResponseRepresetationList_item = obj_surveyQuestionResponseRepresetationList[i];
1450
- const path_surveyQuestionResponseRepresetationList_item = path_surveyQuestionResponseRepresetationList + '[' + i + ']';
1451
- const referencepath_surveyQuestionResponseRepresetationList_itemValidationError = validate$h(obj_surveyQuestionResponseRepresetationList_item, path_surveyQuestionResponseRepresetationList_item);
1452
- if (referencepath_surveyQuestionResponseRepresetationList_itemValidationError !== null) {
1453
- let message = 'Object doesn\'t match SurveyQuestionResponseRepresetation (at "' + path_surveyQuestionResponseRepresetationList_item + '")\n';
1454
- message += referencepath_surveyQuestionResponseRepresetationList_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1455
- return new TypeError(message);
1456
- }
1457
- }
1458
- obj.totalAvgScore;
1459
- })();
1460
- return v_error === undefined ? null : v_error;
1461
- }
1462
- const RepresentationType$c = 'FeedbackResultRepresentation';
1463
- function keyBuilder$s(luvio, config) {
1464
- return keyPrefix + '::' + RepresentationType$c + ':' + config.learning_item_id;
1465
- }
1466
- function keyBuilderFromType$8(luvio, object) {
1467
- const keyParams = {
1468
- learning_item_id: object.learningItemId
1469
- };
1470
- return keyBuilder$s(luvio, keyParams);
1471
- }
1472
- function normalize$c(input, existing, path, luvio, store, timestamp) {
1473
- return input;
1474
- }
1475
- const select$q = function FeedbackResultRepresentationSelect() {
1476
- const { selections: SurveyQuestionResponseRepresetation__selections, opaque: SurveyQuestionResponseRepresetation__opaque, } = select$r();
1477
- return {
1478
- kind: 'Fragment',
1479
- version: VERSION$f,
1480
- private: [],
1481
- selections: [
1482
- {
1483
- name: 'isFeedbackRequestSubmitted',
1484
- kind: 'Scalar'
1485
- },
1486
- {
1487
- name: 'isFeedbackResultReturned',
1488
- kind: 'Scalar'
1489
- },
1490
- {
1491
- name: 'learningItemId',
1492
- kind: 'Scalar'
1493
- },
1494
- {
1495
- name: 'surveyQuestionResponseRepresetationList',
1496
- kind: 'Object',
1497
- plural: true,
1498
- selections: SurveyQuestionResponseRepresetation__selections
1499
- },
1500
- {
1501
- name: 'totalAvgScore',
1502
- kind: 'Scalar'
1503
- }
1504
- ]
1505
- };
1506
- };
1507
- function equals$f(existing, incoming) {
1508
- const existing_isFeedbackRequestSubmitted = existing.isFeedbackRequestSubmitted;
1509
- const incoming_isFeedbackRequestSubmitted = incoming.isFeedbackRequestSubmitted;
1510
- if (!(existing_isFeedbackRequestSubmitted === incoming_isFeedbackRequestSubmitted)) {
1511
- return false;
1512
- }
1513
- const existing_isFeedbackResultReturned = existing.isFeedbackResultReturned;
1514
- const incoming_isFeedbackResultReturned = incoming.isFeedbackResultReturned;
1515
- if (!(existing_isFeedbackResultReturned === incoming_isFeedbackResultReturned)) {
1516
- return false;
1517
- }
1518
- const existing_learningItemId = existing.learningItemId;
1519
- const incoming_learningItemId = incoming.learningItemId;
1520
- if (!(existing_learningItemId === incoming_learningItemId)) {
1521
- return false;
1522
- }
1523
- const existing_totalAvgScore = existing.totalAvgScore;
1524
- const incoming_totalAvgScore = incoming.totalAvgScore;
1525
- if (!(existing_totalAvgScore === incoming_totalAvgScore)) {
1526
- return false;
1527
- }
1528
- const existing_surveyQuestionResponseRepresetationList = existing.surveyQuestionResponseRepresetationList;
1529
- const incoming_surveyQuestionResponseRepresetationList = incoming.surveyQuestionResponseRepresetationList;
1530
- const equals_surveyQuestionResponseRepresetationList_items = equalsArray(existing_surveyQuestionResponseRepresetationList, incoming_surveyQuestionResponseRepresetationList, (existing_surveyQuestionResponseRepresetationList_item, incoming_surveyQuestionResponseRepresetationList_item) => {
1531
- if (!(equals$g(existing_surveyQuestionResponseRepresetationList_item, incoming_surveyQuestionResponseRepresetationList_item))) {
1532
- return false;
1533
- }
1534
- });
1535
- if (equals_surveyQuestionResponseRepresetationList_items === false) {
1536
- return false;
1537
- }
1538
- return true;
1539
- }
1540
- const ingest$c = function FeedbackResultRepresentationIngest(input, path, luvio, store, timestamp) {
1541
- if (process.env.NODE_ENV !== 'production') {
1542
- const validateError = validate$g(input);
1543
- if (validateError !== null) {
1544
- throw validateError;
1545
- }
1546
- }
1547
- const key = keyBuilderFromType$8(luvio, input);
1548
- const existingRecord = store.readEntry(key);
1549
- const ttlToUse = TTL$8;
1550
- let incomingRecord = normalize$c(input, store.readEntry(key), {
1551
- fullPath: key,
1552
- parent: path.parent,
1553
- propertyName: path.propertyName,
1554
- ttl: ttlToUse
1555
- });
1556
- if (existingRecord === undefined || equals$f(existingRecord, incomingRecord) === false) {
1557
- luvio.storePublish(key, incomingRecord);
1558
- }
1559
- {
1560
- const storeMetadataParams = {
1561
- ttl: ttlToUse,
1562
- namespace: "LearningContentPlatform",
1563
- version: VERSION$f,
1564
- representationName: RepresentationType$c,
1565
- };
1566
- luvio.publishStoreMetadata(key, storeMetadataParams);
1567
- }
1568
- return createLink(key);
1569
- };
1570
- function getTypeCacheKeys$c(luvio, input, fullPathFactory) {
1571
- const rootKeySet = new StoreKeyMap();
1572
- // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1573
- const rootKey = keyBuilderFromType$8(luvio, input);
1574
- rootKeySet.set(rootKey, {
1575
- namespace: keyPrefix,
1576
- representationName: RepresentationType$c,
1577
- mergeable: false
1578
- });
1579
- return rootKeySet;
1580
- }
1581
-
1582
- function select$p(luvio, params) {
1583
- return select$q();
1584
- }
1585
- function keyBuilder$r(luvio, params) {
1586
- return keyBuilder$s(luvio, {
1587
- learning_item_id: params.urlParams.learningItemId
1588
- });
1589
- }
1590
- function getResponseCacheKeys$a(luvio, resourceParams, response) {
1591
- return getTypeCacheKeys$c(luvio, response);
1592
- }
1593
- function ingestSuccess$a(luvio, resourceParams, response, snapshotRefresh) {
1594
- const { body } = response;
1595
- const key = keyBuilder$r(luvio, resourceParams);
1596
- luvio.storeIngest(key, ingest$c, body);
1597
- const snapshot = luvio.storeLookup({
1598
- recordId: key,
1599
- node: select$p(),
1600
- variables: {},
1601
- }, snapshotRefresh);
1602
- if (process.env.NODE_ENV !== 'production') {
1603
- if (snapshot.state !== 'Fulfilled') {
1604
- throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1605
- }
1606
- }
1607
- deepFreeze(snapshot.data);
1608
- return snapshot;
1609
- }
1610
- function ingestError$9(luvio, params, error, snapshotRefresh) {
1611
- const key = keyBuilder$r(luvio, params);
1612
- const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1613
- const storeMetadataParams = {
1614
- ttl: TTL$8,
1615
- namespace: keyPrefix,
1616
- version: VERSION$f,
1617
- representationName: RepresentationType$c
1618
- };
1619
- luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1620
- return errorSnapshot;
1621
- }
1622
- function createResourceRequest$a(config) {
1623
- const headers = {};
1624
- return {
1625
- baseUri: '/services/data/v59.0',
1626
- basePath: '/learning-content-platform/learning/feedbackresult/' + config.urlParams.learningItemId + '',
1627
- method: 'get',
1628
- body: null,
1629
- urlParams: config.urlParams,
1630
- queryParams: {},
1631
- headers,
1632
- priority: 'normal',
1633
- };
1634
- }
1635
-
1636
- const getFeedbackResult_ConfigPropertyNames = {
1637
- displayName: 'getFeedbackResult',
1638
- parameters: {
1639
- required: ['learningItemId'],
1640
- optional: []
1641
- }
1642
- };
1643
- function createResourceParams$a(config) {
1644
- const resourceParams = {
1645
- urlParams: {
1646
- learningItemId: config.learningItemId
1647
- }
1648
- };
1649
- return resourceParams;
1650
- }
1651
- function keyBuilder$q(luvio, config) {
1652
- const resourceParams = createResourceParams$a(config);
1653
- return keyBuilder$r(luvio, resourceParams);
1654
- }
1655
- function typeCheckConfig$a(untrustedConfig) {
1656
- const config = {};
1657
- const untrustedConfig_learningItemId = untrustedConfig.learningItemId;
1658
- if (typeof untrustedConfig_learningItemId === 'string') {
1659
- config.learningItemId = untrustedConfig_learningItemId;
1660
- }
1661
- return config;
1662
- }
1663
1196
  function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
1664
1197
  if (!untrustedIsObject(untrustedConfig)) {
1665
1198
  return null;
@@ -1731,8 +1264,8 @@ function buildCachedSnapshotCachePolicy$9(context, storeLookup) {
1731
1264
  });
1732
1265
  return cacheSnapshot;
1733
1266
  }
1734
- const getFeedbackResultAdapterFactory = (luvio) => function LearningContentPlatform__getFeedbackResult(untrustedConfig, requestContext) {
1735
- const config = validateAdapterConfig$a(untrustedConfig, getFeedbackResult_ConfigPropertyNames);
1267
+ const getFeaturedItemsRelatedListAdapterFactory = (luvio) => function LearningContentPlatform__getFeaturedItemsRelatedList(untrustedConfig, requestContext) {
1268
+ const config = validateAdapterConfig$a(untrustedConfig, getFeaturedItemsRelatedList_ConfigPropertyNames);
1736
1269
  // Invalid or incomplete config
1737
1270
  if (config === null) {
1738
1271
  return null;
@@ -2153,7 +1686,7 @@ function normalize$9(input, existing, path, luvio, store, timestamp) {
2153
1686
  for (let i = 0; i < input_results.length; i++) {
2154
1687
  const input_results_item = input_results[i];
2155
1688
  let input_results_item_id = input_results_id + '__' + i;
2156
- input_results[i] = ingest$f(input_results_item, {
1689
+ input_results[i] = ingest$e(input_results_item, {
2157
1690
  fullPath: input_results_item_id,
2158
1691
  propertyName: i,
2159
1692
  parent: {
@@ -2176,7 +1709,7 @@ const select$l = function LearningSearchResultsRepresentationSelect() {
2176
1709
  name: 'results',
2177
1710
  kind: 'Link',
2178
1711
  plural: true,
2179
- fragment: select$w()
1712
+ fragment: select$t()
2180
1713
  },
2181
1714
  {
2182
1715
  name: 'totalResults',
@@ -2253,7 +1786,7 @@ function getTypeCacheKeys$9(luvio, input, fullPathFactory) {
2253
1786
  });
2254
1787
  const input_results_length = input.results.length;
2255
1788
  for (let i = 0; i < input_results_length; i++) {
2256
- rootKeySet.merge(getTypeCacheKeys$f(luvio, input.results[i]));
1789
+ rootKeySet.merge(getTypeCacheKeys$e(luvio, input.results[i]));
2257
1790
  }
2258
1791
  return rootKeySet;
2259
1792
  }
@@ -6444,4 +5977,4 @@ const getTextLessonAdapterFactory = (luvio) => function LearningContentPlatform_
6444
5977
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
6445
5978
  };
6446
5979
 
6447
- export { evaluateLearningItemAdapterFactory, getFeaturedItemsRecommendedListAdapterFactory, getFeaturedItemsRelatedListAdapterFactory, getFeedbackResultAdapterFactory, getLearningConfigAdapterFactory, getLearningItemProgressAdapterFactory, getLearningItemsListAdapterFactory, getLearningModelAdapterFactory, getLearningPracticeAdapterFactory, getLearningSearchDescribeAdapterFactory, getLearningSearchResultsAdapterFactory, getModuleAdapterFactory, getTextLessonAdapterFactory };
5980
+ export { evaluateLearningItemAdapterFactory, getFeaturedItemsRecommendedListAdapterFactory, getFeaturedItemsRelatedListAdapterFactory, getLearningConfigAdapterFactory, getLearningItemProgressAdapterFactory, getLearningItemsListAdapterFactory, getLearningModelAdapterFactory, getLearningPracticeAdapterFactory, getLearningSearchDescribeAdapterFactory, getLearningSearchResultsAdapterFactory, getModuleAdapterFactory, getTextLessonAdapterFactory };