@salesforce/lds-adapters-platform-learning-content 1.132.0 → 1.133.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.
@@ -109,9 +109,9 @@ function createLink(ref) {
109
109
  };
110
110
  }
111
111
 
112
- const TTL$8 = 15000;
113
- const VERSION$h = "b489f9f2cbdc91a04dd15b4d467b6760";
114
- function validate$i(obj, path = 'FeaturedItemRepresentation') {
112
+ const TTL$9 = 15000;
113
+ const VERSION$j = "b489f9f2cbdc91a04dd15b4d467b6760";
114
+ function validate$k(obj, path = 'FeaturedItemRepresentation') {
115
115
  const v_error = (() => {
116
116
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
117
117
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -508,23 +508,23 @@ function validate$i(obj, path = 'FeaturedItemRepresentation') {
508
508
  })();
509
509
  return v_error === undefined ? null : v_error;
510
510
  }
511
- const RepresentationType$e = 'FeaturedItemRepresentation';
512
- function keyBuilder$u(luvio, config) {
513
- return keyPrefix + '::' + RepresentationType$e + ':' + config.id;
511
+ const RepresentationType$f = 'FeaturedItemRepresentation';
512
+ function keyBuilder$x(luvio, config) {
513
+ return keyPrefix + '::' + RepresentationType$f + ':' + config.id;
514
514
  }
515
- function keyBuilderFromType$8(luvio, object) {
515
+ function keyBuilderFromType$9(luvio, object) {
516
516
  const keyParams = {
517
517
  id: object.id
518
518
  };
519
- return keyBuilder$u(luvio, keyParams);
519
+ return keyBuilder$x(luvio, keyParams);
520
520
  }
521
- function normalize$e(input, existing, path, luvio, store, timestamp) {
521
+ function normalize$f(input, existing, path, luvio, store, timestamp) {
522
522
  return input;
523
523
  }
524
- const select$t = function FeaturedItemRepresentationSelect() {
524
+ const select$w = function FeaturedItemRepresentationSelect() {
525
525
  return {
526
526
  kind: 'Fragment',
527
- version: VERSION$h,
527
+ version: VERSION$j,
528
528
  private: [],
529
529
  selections: [
530
530
  {
@@ -606,7 +606,7 @@ const select$t = function FeaturedItemRepresentationSelect() {
606
606
  ]
607
607
  };
608
608
  };
609
- function equals$h(existing, incoming) {
609
+ function equals$j(existing, incoming) {
610
610
  const existing_description = existing.description;
611
611
  const incoming_description = incoming.description;
612
612
  if (!(existing_description === incoming_description)) {
@@ -704,50 +704,50 @@ function equals$h(existing, incoming) {
704
704
  }
705
705
  return true;
706
706
  }
707
- const ingest$e = function FeaturedItemRepresentationIngest(input, path, luvio, store, timestamp) {
707
+ const ingest$f = function FeaturedItemRepresentationIngest(input, path, luvio, store, timestamp) {
708
708
  if (process.env.NODE_ENV !== 'production') {
709
- const validateError = validate$i(input);
709
+ const validateError = validate$k(input);
710
710
  if (validateError !== null) {
711
711
  throw validateError;
712
712
  }
713
713
  }
714
- const key = keyBuilderFromType$8(luvio, input);
714
+ const key = keyBuilderFromType$9(luvio, input);
715
715
  const existingRecord = store.readEntry(key);
716
- const ttlToUse = TTL$8;
717
- let incomingRecord = normalize$e(input, store.readEntry(key), {
716
+ const ttlToUse = TTL$9;
717
+ let incomingRecord = normalize$f(input, store.readEntry(key), {
718
718
  fullPath: key,
719
719
  parent: path.parent,
720
720
  propertyName: path.propertyName,
721
721
  ttl: ttlToUse
722
722
  });
723
- if (existingRecord === undefined || equals$h(existingRecord, incomingRecord) === false) {
723
+ if (existingRecord === undefined || equals$j(existingRecord, incomingRecord) === false) {
724
724
  luvio.storePublish(key, incomingRecord);
725
725
  }
726
726
  {
727
727
  const storeMetadataParams = {
728
728
  ttl: ttlToUse,
729
729
  namespace: "LearningContentPlatform",
730
- version: VERSION$h,
731
- representationName: RepresentationType$e,
730
+ version: VERSION$j,
731
+ representationName: RepresentationType$f,
732
732
  };
733
733
  luvio.publishStoreMetadata(key, storeMetadataParams);
734
734
  }
735
735
  return createLink(key);
736
736
  };
737
- function getTypeCacheKeys$e(luvio, input, fullPathFactory) {
737
+ function getTypeCacheKeys$f(luvio, input, fullPathFactory) {
738
738
  const rootKeySet = new StoreKeyMap();
739
739
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
740
- const rootKey = keyBuilderFromType$8(luvio, input);
740
+ const rootKey = keyBuilderFromType$9(luvio, input);
741
741
  rootKeySet.set(rootKey, {
742
742
  namespace: keyPrefix,
743
- representationName: RepresentationType$e,
743
+ representationName: RepresentationType$f,
744
744
  mergeable: false
745
745
  });
746
746
  return rootKeySet;
747
747
  }
748
748
 
749
- const VERSION$g = "94c7194d9578589364c6efd021226634";
750
- function validate$h(obj, path = 'FeaturedItemRecommendedListRepresentation') {
749
+ const VERSION$i = "94c7194d9578589364c6efd021226634";
750
+ function validate$j(obj, path = 'FeaturedItemRecommendedListRepresentation') {
751
751
  const v_error = (() => {
752
752
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
753
753
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -767,14 +767,14 @@ function validate$h(obj, path = 'FeaturedItemRecommendedListRepresentation') {
767
767
  })();
768
768
  return v_error === undefined ? null : v_error;
769
769
  }
770
- const RepresentationType$d = 'FeaturedItemRecommendedListRepresentation';
771
- function normalize$d(input, existing, path, luvio, store, timestamp) {
770
+ const RepresentationType$e = 'FeaturedItemRecommendedListRepresentation';
771
+ function normalize$e(input, existing, path, luvio, store, timestamp) {
772
772
  const input_recommendedList = input.recommendedList;
773
773
  const input_recommendedList_id = path.fullPath + '__recommendedList';
774
774
  for (let i = 0; i < input_recommendedList.length; i++) {
775
775
  const input_recommendedList_item = input_recommendedList[i];
776
776
  let input_recommendedList_item_id = input_recommendedList_id + '__' + i;
777
- input_recommendedList[i] = ingest$e(input_recommendedList_item, {
777
+ input_recommendedList[i] = ingest$f(input_recommendedList_item, {
778
778
  fullPath: input_recommendedList_item_id,
779
779
  propertyName: i,
780
780
  parent: {
@@ -787,22 +787,22 @@ function normalize$d(input, existing, path, luvio, store, timestamp) {
787
787
  }
788
788
  return input;
789
789
  }
790
- const select$s = function FeaturedItemRecommendedListRepresentationSelect() {
790
+ const select$v = function FeaturedItemRecommendedListRepresentationSelect() {
791
791
  return {
792
792
  kind: 'Fragment',
793
- version: VERSION$g,
793
+ version: VERSION$i,
794
794
  private: [],
795
795
  selections: [
796
796
  {
797
797
  name: 'recommendedList',
798
798
  kind: 'Link',
799
799
  plural: true,
800
- fragment: select$t()
800
+ fragment: select$w()
801
801
  }
802
802
  ]
803
803
  };
804
804
  };
805
- function equals$g(existing, incoming) {
805
+ function equals$i(existing, incoming) {
806
806
  const existing_recommendedList = existing.recommendedList;
807
807
  const incoming_recommendedList = incoming.recommendedList;
808
808
  const equals_recommendedList_items = equalsArray(existing_recommendedList, incoming_recommendedList, (existing_recommendedList_item, incoming_recommendedList_item) => {
@@ -815,9 +815,9 @@ function equals$g(existing, incoming) {
815
815
  }
816
816
  return true;
817
817
  }
818
- const ingest$d = function FeaturedItemRecommendedListRepresentationIngest(input, path, luvio, store, timestamp) {
818
+ const ingest$e = function FeaturedItemRecommendedListRepresentationIngest(input, path, luvio, store, timestamp) {
819
819
  if (process.env.NODE_ENV !== 'production') {
820
- const validateError = validate$h(input);
820
+ const validateError = validate$j(input);
821
821
  if (validateError !== null) {
822
822
  throw validateError;
823
823
  }
@@ -825,58 +825,58 @@ const ingest$d = function FeaturedItemRecommendedListRepresentationIngest(input,
825
825
  const key = path.fullPath;
826
826
  const existingRecord = store.readEntry(key);
827
827
  const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
828
- let incomingRecord = normalize$d(input, store.readEntry(key), {
828
+ let incomingRecord = normalize$e(input, store.readEntry(key), {
829
829
  fullPath: key,
830
830
  parent: path.parent,
831
831
  propertyName: path.propertyName,
832
832
  ttl: ttlToUse
833
833
  }, luvio, store);
834
- if (existingRecord === undefined || equals$g(existingRecord, incomingRecord) === false) {
834
+ if (existingRecord === undefined || equals$i(existingRecord, incomingRecord) === false) {
835
835
  luvio.storePublish(key, incomingRecord);
836
836
  }
837
837
  if (ttlToUse !== undefined) {
838
838
  const storeMetadataParams = {
839
839
  ttl: ttlToUse,
840
840
  namespace: "LearningContentPlatform",
841
- version: VERSION$g,
842
- representationName: RepresentationType$d,
841
+ version: VERSION$i,
842
+ representationName: RepresentationType$e,
843
843
  };
844
844
  luvio.publishStoreMetadata(key, storeMetadataParams);
845
845
  }
846
846
  return createLink(key);
847
847
  };
848
- function getTypeCacheKeys$d(luvio, input, fullPathFactory) {
848
+ function getTypeCacheKeys$e(luvio, input, fullPathFactory) {
849
849
  const rootKeySet = new StoreKeyMap();
850
850
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
851
851
  const rootKey = fullPathFactory();
852
852
  rootKeySet.set(rootKey, {
853
853
  namespace: keyPrefix,
854
- representationName: RepresentationType$d,
854
+ representationName: RepresentationType$e,
855
855
  mergeable: false
856
856
  });
857
857
  const input_recommendedList_length = input.recommendedList.length;
858
858
  for (let i = 0; i < input_recommendedList_length; i++) {
859
- rootKeySet.merge(getTypeCacheKeys$e(luvio, input.recommendedList[i]));
859
+ rootKeySet.merge(getTypeCacheKeys$f(luvio, input.recommendedList[i]));
860
860
  }
861
861
  return rootKeySet;
862
862
  }
863
863
 
864
- function select$r(luvio, params) {
865
- return select$s();
864
+ function select$u(luvio, params) {
865
+ return select$v();
866
866
  }
867
- function keyBuilder$t(luvio, params) {
867
+ function keyBuilder$w(luvio, params) {
868
868
  return keyPrefix + '::FeaturedItemRecommendedListRepresentation:(' + 'appId:' + params.queryParams.appId + ',' + 'context:' + params.queryParams.context + ')';
869
869
  }
870
- function getResponseCacheKeys$b(luvio, resourceParams, response) {
871
- return getTypeCacheKeys$d(luvio, response, () => keyBuilder$t(luvio, resourceParams));
870
+ function getResponseCacheKeys$c(luvio, resourceParams, response) {
871
+ return getTypeCacheKeys$e(luvio, response, () => keyBuilder$w(luvio, resourceParams));
872
872
  }
873
- function ingestSuccess$b(luvio, resourceParams, response, snapshotRefresh) {
873
+ function ingestSuccess$c(luvio, resourceParams, response, snapshotRefresh) {
874
874
  const { body } = response;
875
- const key = keyBuilder$t(luvio, resourceParams);
876
- luvio.storeIngest(key, ingest$d, body);
875
+ const key = keyBuilder$w(luvio, resourceParams);
876
+ luvio.storeIngest(key, ingest$e, body);
877
877
  const snapshot = luvio.storeLookup({
878
878
  recordId: key,
879
- node: select$r(),
879
+ node: select$u(),
880
880
  variables: {},
881
881
  }, snapshotRefresh);
882
882
  if (process.env.NODE_ENV !== 'production') {
@@ -886,13 +886,13 @@ function ingestSuccess$b(luvio, resourceParams, response, snapshotRefresh) {
886
886
  }
887
887
  return snapshot;
888
888
  }
889
- function ingestError$a(luvio, params, error, snapshotRefresh) {
890
- const key = keyBuilder$t(luvio, params);
889
+ function ingestError$b(luvio, params, error, snapshotRefresh) {
890
+ const key = keyBuilder$w(luvio, params);
891
891
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
892
892
  luvio.storeIngestError(key, errorSnapshot);
893
893
  return errorSnapshot;
894
894
  }
895
- function createResourceRequest$b(config) {
895
+ function createResourceRequest$c(config) {
896
896
  const headers = {};
897
897
  return {
898
898
  baseUri: '/services/data/v58.0',
@@ -913,7 +913,7 @@ const getFeaturedItemsRecommendedList_ConfigPropertyNames = {
913
913
  optional: []
914
914
  }
915
915
  };
916
- function createResourceParams$b(config) {
916
+ function createResourceParams$c(config) {
917
917
  const resourceParams = {
918
918
  queryParams: {
919
919
  appId: config.appId, context: config.context
@@ -921,11 +921,11 @@ function createResourceParams$b(config) {
921
921
  };
922
922
  return resourceParams;
923
923
  }
924
- function keyBuilder$s(luvio, config) {
925
- const resourceParams = createResourceParams$b(config);
926
- return keyBuilder$t(luvio, resourceParams);
924
+ function keyBuilder$v(luvio, config) {
925
+ const resourceParams = createResourceParams$c(config);
926
+ return keyBuilder$w(luvio, resourceParams);
927
927
  }
928
- function typeCheckConfig$b(untrustedConfig) {
928
+ function typeCheckConfig$c(untrustedConfig) {
929
929
  const config = {};
930
930
  const untrustedConfig_appId = untrustedConfig.appId;
931
931
  if (typeof untrustedConfig_appId === 'string') {
@@ -937,48 +937,48 @@ function typeCheckConfig$b(untrustedConfig) {
937
937
  }
938
938
  return config;
939
939
  }
940
- function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
940
+ function validateAdapterConfig$c(untrustedConfig, configPropertyNames) {
941
941
  if (!untrustedIsObject(untrustedConfig)) {
942
942
  return null;
943
943
  }
944
944
  if (process.env.NODE_ENV !== 'production') {
945
945
  validateConfig(untrustedConfig, configPropertyNames);
946
946
  }
947
- const config = typeCheckConfig$b(untrustedConfig);
947
+ const config = typeCheckConfig$c(untrustedConfig);
948
948
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
949
949
  return null;
950
950
  }
951
951
  return config;
952
952
  }
953
- function adapterFragment$a(luvio, config) {
954
- createResourceParams$b(config);
955
- return select$r();
953
+ function adapterFragment$b(luvio, config) {
954
+ createResourceParams$c(config);
955
+ return select$u();
956
956
  }
957
- function onFetchResponseSuccess$a(luvio, config, resourceParams, response) {
958
- const snapshot = ingestSuccess$b(luvio, resourceParams, response, {
957
+ function onFetchResponseSuccess$b(luvio, config, resourceParams, response) {
958
+ const snapshot = ingestSuccess$c(luvio, resourceParams, response, {
959
959
  config,
960
- resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
960
+ resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
961
961
  });
962
962
  return luvio.storeBroadcast().then(() => snapshot);
963
963
  }
964
- function onFetchResponseError$a(luvio, config, resourceParams, response) {
965
- const snapshot = ingestError$a(luvio, resourceParams, response, {
964
+ function onFetchResponseError$b(luvio, config, resourceParams, response) {
965
+ const snapshot = ingestError$b(luvio, resourceParams, response, {
966
966
  config,
967
- resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
967
+ resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
968
968
  });
969
969
  return luvio.storeBroadcast().then(() => snapshot);
970
970
  }
971
- function buildNetworkSnapshot$b(luvio, config, options) {
972
- const resourceParams = createResourceParams$b(config);
973
- const request = createResourceRequest$b(resourceParams);
971
+ function buildNetworkSnapshot$c(luvio, config, options) {
972
+ const resourceParams = createResourceParams$c(config);
973
+ const request = createResourceRequest$c(resourceParams);
974
974
  return luvio.dispatchResourceRequest(request, options)
975
975
  .then((response) => {
976
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$a(luvio, config, resourceParams, response), () => getResponseCacheKeys$b(luvio, resourceParams, response.body));
976
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$b(luvio, config, resourceParams, response), () => getResponseCacheKeys$c(luvio, resourceParams, response.body));
977
977
  }, (response) => {
978
- return luvio.handleErrorResponse(() => onFetchResponseError$a(luvio, config, resourceParams, response));
978
+ return luvio.handleErrorResponse(() => onFetchResponseError$b(luvio, config, resourceParams, response));
979
979
  });
980
980
  }
981
- function buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext) {
981
+ function buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext) {
982
982
  const { luvio, config } = context;
983
983
  const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
984
984
  const dispatchOptions = {
@@ -993,33 +993,33 @@ function buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext
993
993
  priority: networkPriority
994
994
  };
995
995
  }
996
- return buildNetworkSnapshot$b(luvio, config, dispatchOptions);
996
+ return buildNetworkSnapshot$c(luvio, config, dispatchOptions);
997
997
  }
998
- function buildCachedSnapshotCachePolicy$a(context, storeLookup) {
998
+ function buildCachedSnapshotCachePolicy$b(context, storeLookup) {
999
999
  const { luvio, config } = context;
1000
1000
  const selector = {
1001
- recordId: keyBuilder$s(luvio, config),
1002
- node: adapterFragment$a(luvio, config),
1001
+ recordId: keyBuilder$v(luvio, config),
1002
+ node: adapterFragment$b(luvio, config),
1003
1003
  variables: {},
1004
1004
  };
1005
1005
  const cacheSnapshot = storeLookup(selector, {
1006
1006
  config,
1007
- resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
1007
+ resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
1008
1008
  });
1009
1009
  return cacheSnapshot;
1010
1010
  }
1011
1011
  const getFeaturedItemsRecommendedListAdapterFactory = (luvio) => function LearningContentPlatform__getFeaturedItemsRecommendedList(untrustedConfig, requestContext) {
1012
- const config = validateAdapterConfig$b(untrustedConfig, getFeaturedItemsRecommendedList_ConfigPropertyNames);
1012
+ const config = validateAdapterConfig$c(untrustedConfig, getFeaturedItemsRecommendedList_ConfigPropertyNames);
1013
1013
  // Invalid or incomplete config
1014
1014
  if (config === null) {
1015
1015
  return null;
1016
1016
  }
1017
1017
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1018
- buildCachedSnapshotCachePolicy$a, buildNetworkSnapshotCachePolicy$a);
1018
+ buildCachedSnapshotCachePolicy$b, buildNetworkSnapshotCachePolicy$b);
1019
1019
  };
1020
1020
 
1021
- const VERSION$f = "5d7adb55f43466f61c4837ebf27eab61";
1022
- function validate$g(obj, path = 'FeaturedItemRelatedListRepresentation') {
1021
+ const VERSION$h = "5d7adb55f43466f61c4837ebf27eab61";
1022
+ function validate$i(obj, path = 'FeaturedItemRelatedListRepresentation') {
1023
1023
  const v_error = (() => {
1024
1024
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1025
1025
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1039,14 +1039,14 @@ function validate$g(obj, path = 'FeaturedItemRelatedListRepresentation') {
1039
1039
  })();
1040
1040
  return v_error === undefined ? null : v_error;
1041
1041
  }
1042
- const RepresentationType$c = 'FeaturedItemRelatedListRepresentation';
1043
- function normalize$c(input, existing, path, luvio, store, timestamp) {
1042
+ const RepresentationType$d = 'FeaturedItemRelatedListRepresentation';
1043
+ function normalize$d(input, existing, path, luvio, store, timestamp) {
1044
1044
  const input_relatedList = input.relatedList;
1045
1045
  const input_relatedList_id = path.fullPath + '__relatedList';
1046
1046
  for (let i = 0; i < input_relatedList.length; i++) {
1047
1047
  const input_relatedList_item = input_relatedList[i];
1048
1048
  let input_relatedList_item_id = input_relatedList_id + '__' + i;
1049
- input_relatedList[i] = ingest$e(input_relatedList_item, {
1049
+ input_relatedList[i] = ingest$f(input_relatedList_item, {
1050
1050
  fullPath: input_relatedList_item_id,
1051
1051
  propertyName: i,
1052
1052
  parent: {
@@ -1059,22 +1059,22 @@ function normalize$c(input, existing, path, luvio, store, timestamp) {
1059
1059
  }
1060
1060
  return input;
1061
1061
  }
1062
- const select$q = function FeaturedItemRelatedListRepresentationSelect() {
1062
+ const select$t = function FeaturedItemRelatedListRepresentationSelect() {
1063
1063
  return {
1064
1064
  kind: 'Fragment',
1065
- version: VERSION$f,
1065
+ version: VERSION$h,
1066
1066
  private: [],
1067
1067
  selections: [
1068
1068
  {
1069
1069
  name: 'relatedList',
1070
1070
  kind: 'Link',
1071
1071
  plural: true,
1072
- fragment: select$t()
1072
+ fragment: select$w()
1073
1073
  }
1074
1074
  ]
1075
1075
  };
1076
1076
  };
1077
- function equals$f(existing, incoming) {
1077
+ function equals$h(existing, incoming) {
1078
1078
  const existing_relatedList = existing.relatedList;
1079
1079
  const incoming_relatedList = incoming.relatedList;
1080
1080
  const equals_relatedList_items = equalsArray(existing_relatedList, incoming_relatedList, (existing_relatedList_item, incoming_relatedList_item) => {
@@ -1087,9 +1087,9 @@ function equals$f(existing, incoming) {
1087
1087
  }
1088
1088
  return true;
1089
1089
  }
1090
- const ingest$c = function FeaturedItemRelatedListRepresentationIngest(input, path, luvio, store, timestamp) {
1090
+ const ingest$d = function FeaturedItemRelatedListRepresentationIngest(input, path, luvio, store, timestamp) {
1091
1091
  if (process.env.NODE_ENV !== 'production') {
1092
- const validateError = validate$g(input);
1092
+ const validateError = validate$i(input);
1093
1093
  if (validateError !== null) {
1094
1094
  throw validateError;
1095
1095
  }
@@ -1097,58 +1097,58 @@ const ingest$c = function FeaturedItemRelatedListRepresentationIngest(input, pat
1097
1097
  const key = path.fullPath;
1098
1098
  const existingRecord = store.readEntry(key);
1099
1099
  const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
1100
- let incomingRecord = normalize$c(input, store.readEntry(key), {
1100
+ let incomingRecord = normalize$d(input, store.readEntry(key), {
1101
1101
  fullPath: key,
1102
1102
  parent: path.parent,
1103
1103
  propertyName: path.propertyName,
1104
1104
  ttl: ttlToUse
1105
1105
  }, luvio, store);
1106
- if (existingRecord === undefined || equals$f(existingRecord, incomingRecord) === false) {
1106
+ if (existingRecord === undefined || equals$h(existingRecord, incomingRecord) === false) {
1107
1107
  luvio.storePublish(key, incomingRecord);
1108
1108
  }
1109
1109
  if (ttlToUse !== undefined) {
1110
1110
  const storeMetadataParams = {
1111
1111
  ttl: ttlToUse,
1112
1112
  namespace: "LearningContentPlatform",
1113
- version: VERSION$f,
1114
- representationName: RepresentationType$c,
1113
+ version: VERSION$h,
1114
+ representationName: RepresentationType$d,
1115
1115
  };
1116
1116
  luvio.publishStoreMetadata(key, storeMetadataParams);
1117
1117
  }
1118
1118
  return createLink(key);
1119
1119
  };
1120
- function getTypeCacheKeys$c(luvio, input, fullPathFactory) {
1120
+ function getTypeCacheKeys$d(luvio, input, fullPathFactory) {
1121
1121
  const rootKeySet = new StoreKeyMap();
1122
1122
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1123
1123
  const rootKey = fullPathFactory();
1124
1124
  rootKeySet.set(rootKey, {
1125
1125
  namespace: keyPrefix,
1126
- representationName: RepresentationType$c,
1126
+ representationName: RepresentationType$d,
1127
1127
  mergeable: false
1128
1128
  });
1129
1129
  const input_relatedList_length = input.relatedList.length;
1130
1130
  for (let i = 0; i < input_relatedList_length; i++) {
1131
- rootKeySet.merge(getTypeCacheKeys$e(luvio, input.relatedList[i]));
1131
+ rootKeySet.merge(getTypeCacheKeys$f(luvio, input.relatedList[i]));
1132
1132
  }
1133
1133
  return rootKeySet;
1134
1134
  }
1135
1135
 
1136
- function select$p(luvio, params) {
1137
- return select$q();
1136
+ function select$s(luvio, params) {
1137
+ return select$t();
1138
1138
  }
1139
- function keyBuilder$r(luvio, params) {
1139
+ function keyBuilder$u(luvio, params) {
1140
1140
  return keyPrefix + '::FeaturedItemRelatedListRepresentation:(' + 'appId:' + params.queryParams.appId + ',' + 'pageRef:' + params.queryParams.pageRef + ')';
1141
1141
  }
1142
- function getResponseCacheKeys$a(luvio, resourceParams, response) {
1143
- return getTypeCacheKeys$c(luvio, response, () => keyBuilder$r(luvio, resourceParams));
1142
+ function getResponseCacheKeys$b(luvio, resourceParams, response) {
1143
+ return getTypeCacheKeys$d(luvio, response, () => keyBuilder$u(luvio, resourceParams));
1144
1144
  }
1145
- function ingestSuccess$a(luvio, resourceParams, response, snapshotRefresh) {
1145
+ function ingestSuccess$b(luvio, resourceParams, response, snapshotRefresh) {
1146
1146
  const { body } = response;
1147
- const key = keyBuilder$r(luvio, resourceParams);
1148
- luvio.storeIngest(key, ingest$c, body);
1147
+ const key = keyBuilder$u(luvio, resourceParams);
1148
+ luvio.storeIngest(key, ingest$d, body);
1149
1149
  const snapshot = luvio.storeLookup({
1150
1150
  recordId: key,
1151
- node: select$p(),
1151
+ node: select$s(),
1152
1152
  variables: {},
1153
1153
  }, snapshotRefresh);
1154
1154
  if (process.env.NODE_ENV !== 'production') {
@@ -1158,13 +1158,13 @@ function ingestSuccess$a(luvio, resourceParams, response, snapshotRefresh) {
1158
1158
  }
1159
1159
  return snapshot;
1160
1160
  }
1161
- function ingestError$9(luvio, params, error, snapshotRefresh) {
1162
- const key = keyBuilder$r(luvio, params);
1161
+ function ingestError$a(luvio, params, error, snapshotRefresh) {
1162
+ const key = keyBuilder$u(luvio, params);
1163
1163
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1164
1164
  luvio.storeIngestError(key, errorSnapshot);
1165
1165
  return errorSnapshot;
1166
1166
  }
1167
- function createResourceRequest$a(config) {
1167
+ function createResourceRequest$b(config) {
1168
1168
  const headers = {};
1169
1169
  return {
1170
1170
  baseUri: '/services/data/v58.0',
@@ -1185,7 +1185,7 @@ const getFeaturedItemsRelatedList_ConfigPropertyNames = {
1185
1185
  optional: []
1186
1186
  }
1187
1187
  };
1188
- function createResourceParams$a(config) {
1188
+ function createResourceParams$b(config) {
1189
1189
  const resourceParams = {
1190
1190
  queryParams: {
1191
1191
  appId: config.appId, pageRef: config.pageRef
@@ -1193,11 +1193,11 @@ function createResourceParams$a(config) {
1193
1193
  };
1194
1194
  return resourceParams;
1195
1195
  }
1196
- function keyBuilder$q(luvio, config) {
1197
- const resourceParams = createResourceParams$a(config);
1198
- return keyBuilder$r(luvio, resourceParams);
1196
+ function keyBuilder$t(luvio, config) {
1197
+ const resourceParams = createResourceParams$b(config);
1198
+ return keyBuilder$u(luvio, resourceParams);
1199
1199
  }
1200
- function typeCheckConfig$a(untrustedConfig) {
1200
+ function typeCheckConfig$b(untrustedConfig) {
1201
1201
  const config = {};
1202
1202
  const untrustedConfig_appId = untrustedConfig.appId;
1203
1203
  if (typeof untrustedConfig_appId === 'string') {
@@ -1209,6 +1209,472 @@ function typeCheckConfig$a(untrustedConfig) {
1209
1209
  }
1210
1210
  return config;
1211
1211
  }
1212
+ function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
1213
+ if (!untrustedIsObject(untrustedConfig)) {
1214
+ return null;
1215
+ }
1216
+ if (process.env.NODE_ENV !== 'production') {
1217
+ validateConfig(untrustedConfig, configPropertyNames);
1218
+ }
1219
+ const config = typeCheckConfig$b(untrustedConfig);
1220
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1221
+ return null;
1222
+ }
1223
+ return config;
1224
+ }
1225
+ function adapterFragment$a(luvio, config) {
1226
+ createResourceParams$b(config);
1227
+ return select$s();
1228
+ }
1229
+ function onFetchResponseSuccess$a(luvio, config, resourceParams, response) {
1230
+ const snapshot = ingestSuccess$b(luvio, resourceParams, response, {
1231
+ config,
1232
+ resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
1233
+ });
1234
+ return luvio.storeBroadcast().then(() => snapshot);
1235
+ }
1236
+ function onFetchResponseError$a(luvio, config, resourceParams, response) {
1237
+ const snapshot = ingestError$a(luvio, resourceParams, response, {
1238
+ config,
1239
+ resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
1240
+ });
1241
+ return luvio.storeBroadcast().then(() => snapshot);
1242
+ }
1243
+ function buildNetworkSnapshot$b(luvio, config, options) {
1244
+ const resourceParams = createResourceParams$b(config);
1245
+ const request = createResourceRequest$b(resourceParams);
1246
+ return luvio.dispatchResourceRequest(request, options)
1247
+ .then((response) => {
1248
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$a(luvio, config, resourceParams, response), () => getResponseCacheKeys$b(luvio, resourceParams, response.body));
1249
+ }, (response) => {
1250
+ return luvio.handleErrorResponse(() => onFetchResponseError$a(luvio, config, resourceParams, response));
1251
+ });
1252
+ }
1253
+ function buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext) {
1254
+ const { luvio, config } = context;
1255
+ const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
1256
+ const dispatchOptions = {
1257
+ resourceRequestContext: {
1258
+ requestCorrelator,
1259
+ luvioRequestMethod: undefined,
1260
+ },
1261
+ eventObservers
1262
+ };
1263
+ if (networkPriority !== 'normal') {
1264
+ dispatchOptions.overrides = {
1265
+ priority: networkPriority
1266
+ };
1267
+ }
1268
+ return buildNetworkSnapshot$b(luvio, config, dispatchOptions);
1269
+ }
1270
+ function buildCachedSnapshotCachePolicy$a(context, storeLookup) {
1271
+ const { luvio, config } = context;
1272
+ const selector = {
1273
+ recordId: keyBuilder$t(luvio, config),
1274
+ node: adapterFragment$a(luvio, config),
1275
+ variables: {},
1276
+ };
1277
+ const cacheSnapshot = storeLookup(selector, {
1278
+ config,
1279
+ resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
1280
+ });
1281
+ return cacheSnapshot;
1282
+ }
1283
+ const getFeaturedItemsRelatedListAdapterFactory = (luvio) => function LearningContentPlatform__getFeaturedItemsRelatedList(untrustedConfig, requestContext) {
1284
+ const config = validateAdapterConfig$b(untrustedConfig, getFeaturedItemsRelatedList_ConfigPropertyNames);
1285
+ // Invalid or incomplete config
1286
+ if (config === null) {
1287
+ return null;
1288
+ }
1289
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1290
+ buildCachedSnapshotCachePolicy$a, buildNetworkSnapshotCachePolicy$a);
1291
+ };
1292
+
1293
+ const VERSION$g = "a415abdc6f1eb9f80ab2e7981189f769";
1294
+ function validate$h(obj, path = 'SurveyQuestionResponseRepresetation') {
1295
+ const v_error = (() => {
1296
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1297
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1298
+ }
1299
+ obj.avgScore;
1300
+ const obj_isRatingResponse = obj.isRatingResponse;
1301
+ const path_isRatingResponse = path + '.isRatingResponse';
1302
+ if (typeof obj_isRatingResponse !== 'boolean') {
1303
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isRatingResponse + '" (at "' + path_isRatingResponse + '")');
1304
+ }
1305
+ const obj_questionDescription = obj.questionDescription;
1306
+ const path_questionDescription = path + '.questionDescription';
1307
+ if (typeof obj_questionDescription !== 'string') {
1308
+ return new TypeError('Expected "string" but received "' + typeof obj_questionDescription + '" (at "' + path_questionDescription + '")');
1309
+ }
1310
+ const obj_questionId = obj.questionId;
1311
+ const path_questionId = path + '.questionId';
1312
+ if (typeof obj_questionId !== 'string') {
1313
+ return new TypeError('Expected "string" but received "' + typeof obj_questionId + '" (at "' + path_questionId + '")');
1314
+ }
1315
+ const obj_questionName = obj.questionName;
1316
+ const path_questionName = path + '.questionName';
1317
+ if (typeof obj_questionName !== 'string') {
1318
+ return new TypeError('Expected "string" but received "' + typeof obj_questionName + '" (at "' + path_questionName + '")');
1319
+ }
1320
+ const obj_ratingValues = obj.ratingValues;
1321
+ const path_ratingValues = path + '.ratingValues';
1322
+ if (!ArrayIsArray(obj_ratingValues)) {
1323
+ return new TypeError('Expected "array" but received "' + typeof obj_ratingValues + '" (at "' + path_ratingValues + '")');
1324
+ }
1325
+ for (let i = 0; i < obj_ratingValues.length; i++) {
1326
+ const obj_ratingValues_item = obj_ratingValues[i];
1327
+ const path_ratingValues_item = path_ratingValues + '[' + i + ']';
1328
+ if (typeof obj_ratingValues_item !== 'number' || (typeof obj_ratingValues_item === 'number' && Math.floor(obj_ratingValues_item) !== obj_ratingValues_item)) {
1329
+ return new TypeError('Expected "integer" but received "' + typeof obj_ratingValues_item + '" (at "' + path_ratingValues_item + '")');
1330
+ }
1331
+ }
1332
+ const obj_textValues = obj.textValues;
1333
+ const path_textValues = path + '.textValues';
1334
+ if (typeof obj_textValues !== 'object' || ArrayIsArray(obj_textValues) || obj_textValues === null) {
1335
+ return new TypeError('Expected "object" but received "' + typeof obj_textValues + '" (at "' + path_textValues + '")');
1336
+ }
1337
+ const obj_textValues_keys = ObjectKeys(obj_textValues);
1338
+ for (let i = 0; i < obj_textValues_keys.length; i++) {
1339
+ const key = obj_textValues_keys[i];
1340
+ const obj_textValues_prop = obj_textValues[key];
1341
+ const path_textValues_prop = path_textValues + '["' + key + '"]';
1342
+ if (typeof obj_textValues_prop !== 'string') {
1343
+ return new TypeError('Expected "string" but received "' + typeof obj_textValues_prop + '" (at "' + path_textValues_prop + '")');
1344
+ }
1345
+ }
1346
+ })();
1347
+ return v_error === undefined ? null : v_error;
1348
+ }
1349
+ const select$r = function SurveyQuestionResponseRepresetationSelect() {
1350
+ return {
1351
+ kind: 'Fragment',
1352
+ version: VERSION$g,
1353
+ private: [],
1354
+ selections: [
1355
+ {
1356
+ name: 'avgScore',
1357
+ kind: 'Scalar'
1358
+ },
1359
+ {
1360
+ name: 'isRatingResponse',
1361
+ kind: 'Scalar'
1362
+ },
1363
+ {
1364
+ name: 'questionDescription',
1365
+ kind: 'Scalar'
1366
+ },
1367
+ {
1368
+ name: 'questionId',
1369
+ kind: 'Scalar'
1370
+ },
1371
+ {
1372
+ name: 'questionName',
1373
+ kind: 'Scalar'
1374
+ },
1375
+ {
1376
+ name: 'ratingValues',
1377
+ kind: 'Scalar',
1378
+ plural: true
1379
+ },
1380
+ {
1381
+ name: 'textValues',
1382
+ kind: 'Scalar',
1383
+ map: true
1384
+ }
1385
+ ]
1386
+ };
1387
+ };
1388
+ function equals$g(existing, incoming) {
1389
+ const existing_isRatingResponse = existing.isRatingResponse;
1390
+ const incoming_isRatingResponse = incoming.isRatingResponse;
1391
+ if (!(existing_isRatingResponse === incoming_isRatingResponse)) {
1392
+ return false;
1393
+ }
1394
+ const existing_questionDescription = existing.questionDescription;
1395
+ const incoming_questionDescription = incoming.questionDescription;
1396
+ if (!(existing_questionDescription === incoming_questionDescription)) {
1397
+ return false;
1398
+ }
1399
+ const existing_questionId = existing.questionId;
1400
+ const incoming_questionId = incoming.questionId;
1401
+ if (!(existing_questionId === incoming_questionId)) {
1402
+ return false;
1403
+ }
1404
+ const existing_questionName = existing.questionName;
1405
+ const incoming_questionName = incoming.questionName;
1406
+ if (!(existing_questionName === incoming_questionName)) {
1407
+ return false;
1408
+ }
1409
+ const existing_avgScore = existing.avgScore;
1410
+ const incoming_avgScore = incoming.avgScore;
1411
+ if (!(existing_avgScore === incoming_avgScore)) {
1412
+ return false;
1413
+ }
1414
+ const existing_ratingValues = existing.ratingValues;
1415
+ const incoming_ratingValues = incoming.ratingValues;
1416
+ const equals_ratingValues_items = equalsArray(existing_ratingValues, incoming_ratingValues, (existing_ratingValues_item, incoming_ratingValues_item) => {
1417
+ if (!(existing_ratingValues_item === incoming_ratingValues_item)) {
1418
+ return false;
1419
+ }
1420
+ });
1421
+ if (equals_ratingValues_items === false) {
1422
+ return false;
1423
+ }
1424
+ const existing_textValues = existing.textValues;
1425
+ const incoming_textValues = incoming.textValues;
1426
+ const equals_textValues_props = equalsObject(existing_textValues, incoming_textValues, (existing_textValues_prop, incoming_textValues_prop) => {
1427
+ if (!(existing_textValues_prop === incoming_textValues_prop)) {
1428
+ return false;
1429
+ }
1430
+ });
1431
+ if (equals_textValues_props === false) {
1432
+ return false;
1433
+ }
1434
+ return true;
1435
+ }
1436
+
1437
+ const TTL$8 = 15000;
1438
+ const VERSION$f = "49558b95e59b76b07748b6f259ebe54d";
1439
+ function validate$g(obj, path = 'FeedbackResultRepresentation') {
1440
+ const v_error = (() => {
1441
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1442
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1443
+ }
1444
+ const obj_isFeedbackRequestSubmitted = obj.isFeedbackRequestSubmitted;
1445
+ const path_isFeedbackRequestSubmitted = path + '.isFeedbackRequestSubmitted';
1446
+ if (typeof obj_isFeedbackRequestSubmitted !== 'boolean') {
1447
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isFeedbackRequestSubmitted + '" (at "' + path_isFeedbackRequestSubmitted + '")');
1448
+ }
1449
+ const obj_isFeedbackResultReturned = obj.isFeedbackResultReturned;
1450
+ const path_isFeedbackResultReturned = path + '.isFeedbackResultReturned';
1451
+ if (typeof obj_isFeedbackResultReturned !== 'boolean') {
1452
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isFeedbackResultReturned + '" (at "' + path_isFeedbackResultReturned + '")');
1453
+ }
1454
+ const obj_learningItemId = obj.learningItemId;
1455
+ const path_learningItemId = path + '.learningItemId';
1456
+ if (typeof obj_learningItemId !== 'string') {
1457
+ return new TypeError('Expected "string" but received "' + typeof obj_learningItemId + '" (at "' + path_learningItemId + '")');
1458
+ }
1459
+ const obj_surveyQuestionResponseRepresetationList = obj.surveyQuestionResponseRepresetationList;
1460
+ const path_surveyQuestionResponseRepresetationList = path + '.surveyQuestionResponseRepresetationList';
1461
+ if (!ArrayIsArray(obj_surveyQuestionResponseRepresetationList)) {
1462
+ return new TypeError('Expected "array" but received "' + typeof obj_surveyQuestionResponseRepresetationList + '" (at "' + path_surveyQuestionResponseRepresetationList + '")');
1463
+ }
1464
+ for (let i = 0; i < obj_surveyQuestionResponseRepresetationList.length; i++) {
1465
+ const obj_surveyQuestionResponseRepresetationList_item = obj_surveyQuestionResponseRepresetationList[i];
1466
+ const path_surveyQuestionResponseRepresetationList_item = path_surveyQuestionResponseRepresetationList + '[' + i + ']';
1467
+ const referencepath_surveyQuestionResponseRepresetationList_itemValidationError = validate$h(obj_surveyQuestionResponseRepresetationList_item, path_surveyQuestionResponseRepresetationList_item);
1468
+ if (referencepath_surveyQuestionResponseRepresetationList_itemValidationError !== null) {
1469
+ let message = 'Object doesn\'t match SurveyQuestionResponseRepresetation (at "' + path_surveyQuestionResponseRepresetationList_item + '")\n';
1470
+ message += referencepath_surveyQuestionResponseRepresetationList_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1471
+ return new TypeError(message);
1472
+ }
1473
+ }
1474
+ obj.totalAvgScore;
1475
+ })();
1476
+ return v_error === undefined ? null : v_error;
1477
+ }
1478
+ const RepresentationType$c = 'FeedbackResultRepresentation';
1479
+ function keyBuilder$s(luvio, config) {
1480
+ return keyPrefix + '::' + RepresentationType$c + ':' + config.learning_item_id;
1481
+ }
1482
+ function keyBuilderFromType$8(luvio, object) {
1483
+ const keyParams = {
1484
+ learning_item_id: object.learningItemId
1485
+ };
1486
+ return keyBuilder$s(luvio, keyParams);
1487
+ }
1488
+ function normalize$c(input, existing, path, luvio, store, timestamp) {
1489
+ return input;
1490
+ }
1491
+ const select$q = function FeedbackResultRepresentationSelect() {
1492
+ const { selections: SurveyQuestionResponseRepresetation__selections, opaque: SurveyQuestionResponseRepresetation__opaque, } = select$r();
1493
+ return {
1494
+ kind: 'Fragment',
1495
+ version: VERSION$f,
1496
+ private: [],
1497
+ selections: [
1498
+ {
1499
+ name: 'isFeedbackRequestSubmitted',
1500
+ kind: 'Scalar'
1501
+ },
1502
+ {
1503
+ name: 'isFeedbackResultReturned',
1504
+ kind: 'Scalar'
1505
+ },
1506
+ {
1507
+ name: 'learningItemId',
1508
+ kind: 'Scalar'
1509
+ },
1510
+ {
1511
+ name: 'surveyQuestionResponseRepresetationList',
1512
+ kind: 'Object',
1513
+ plural: true,
1514
+ selections: SurveyQuestionResponseRepresetation__selections
1515
+ },
1516
+ {
1517
+ name: 'totalAvgScore',
1518
+ kind: 'Scalar'
1519
+ }
1520
+ ]
1521
+ };
1522
+ };
1523
+ function equals$f(existing, incoming) {
1524
+ const existing_isFeedbackRequestSubmitted = existing.isFeedbackRequestSubmitted;
1525
+ const incoming_isFeedbackRequestSubmitted = incoming.isFeedbackRequestSubmitted;
1526
+ if (!(existing_isFeedbackRequestSubmitted === incoming_isFeedbackRequestSubmitted)) {
1527
+ return false;
1528
+ }
1529
+ const existing_isFeedbackResultReturned = existing.isFeedbackResultReturned;
1530
+ const incoming_isFeedbackResultReturned = incoming.isFeedbackResultReturned;
1531
+ if (!(existing_isFeedbackResultReturned === incoming_isFeedbackResultReturned)) {
1532
+ return false;
1533
+ }
1534
+ const existing_learningItemId = existing.learningItemId;
1535
+ const incoming_learningItemId = incoming.learningItemId;
1536
+ if (!(existing_learningItemId === incoming_learningItemId)) {
1537
+ return false;
1538
+ }
1539
+ const existing_totalAvgScore = existing.totalAvgScore;
1540
+ const incoming_totalAvgScore = incoming.totalAvgScore;
1541
+ if (!(existing_totalAvgScore === incoming_totalAvgScore)) {
1542
+ return false;
1543
+ }
1544
+ const existing_surveyQuestionResponseRepresetationList = existing.surveyQuestionResponseRepresetationList;
1545
+ const incoming_surveyQuestionResponseRepresetationList = incoming.surveyQuestionResponseRepresetationList;
1546
+ const equals_surveyQuestionResponseRepresetationList_items = equalsArray(existing_surveyQuestionResponseRepresetationList, incoming_surveyQuestionResponseRepresetationList, (existing_surveyQuestionResponseRepresetationList_item, incoming_surveyQuestionResponseRepresetationList_item) => {
1547
+ if (!(equals$g(existing_surveyQuestionResponseRepresetationList_item, incoming_surveyQuestionResponseRepresetationList_item))) {
1548
+ return false;
1549
+ }
1550
+ });
1551
+ if (equals_surveyQuestionResponseRepresetationList_items === false) {
1552
+ return false;
1553
+ }
1554
+ return true;
1555
+ }
1556
+ const ingest$c = function FeedbackResultRepresentationIngest(input, path, luvio, store, timestamp) {
1557
+ if (process.env.NODE_ENV !== 'production') {
1558
+ const validateError = validate$g(input);
1559
+ if (validateError !== null) {
1560
+ throw validateError;
1561
+ }
1562
+ }
1563
+ const key = keyBuilderFromType$8(luvio, input);
1564
+ const existingRecord = store.readEntry(key);
1565
+ const ttlToUse = TTL$8;
1566
+ let incomingRecord = normalize$c(input, store.readEntry(key), {
1567
+ fullPath: key,
1568
+ parent: path.parent,
1569
+ propertyName: path.propertyName,
1570
+ ttl: ttlToUse
1571
+ });
1572
+ if (existingRecord === undefined || equals$f(existingRecord, incomingRecord) === false) {
1573
+ luvio.storePublish(key, incomingRecord);
1574
+ }
1575
+ {
1576
+ const storeMetadataParams = {
1577
+ ttl: ttlToUse,
1578
+ namespace: "LearningContentPlatform",
1579
+ version: VERSION$f,
1580
+ representationName: RepresentationType$c,
1581
+ };
1582
+ luvio.publishStoreMetadata(key, storeMetadataParams);
1583
+ }
1584
+ return createLink(key);
1585
+ };
1586
+ function getTypeCacheKeys$c(luvio, input, fullPathFactory) {
1587
+ const rootKeySet = new StoreKeyMap();
1588
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1589
+ const rootKey = keyBuilderFromType$8(luvio, input);
1590
+ rootKeySet.set(rootKey, {
1591
+ namespace: keyPrefix,
1592
+ representationName: RepresentationType$c,
1593
+ mergeable: false
1594
+ });
1595
+ return rootKeySet;
1596
+ }
1597
+
1598
+ function select$p(luvio, params) {
1599
+ return select$q();
1600
+ }
1601
+ function keyBuilder$r(luvio, params) {
1602
+ return keyBuilder$s(luvio, {
1603
+ learning_item_id: params.urlParams.learningItemId
1604
+ });
1605
+ }
1606
+ function getResponseCacheKeys$a(luvio, resourceParams, response) {
1607
+ return getTypeCacheKeys$c(luvio, response);
1608
+ }
1609
+ function ingestSuccess$a(luvio, resourceParams, response, snapshotRefresh) {
1610
+ const { body } = response;
1611
+ const key = keyBuilder$r(luvio, resourceParams);
1612
+ luvio.storeIngest(key, ingest$c, body);
1613
+ const snapshot = luvio.storeLookup({
1614
+ recordId: key,
1615
+ node: select$p(),
1616
+ variables: {},
1617
+ }, snapshotRefresh);
1618
+ if (process.env.NODE_ENV !== 'production') {
1619
+ if (snapshot.state !== 'Fulfilled') {
1620
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1621
+ }
1622
+ }
1623
+ return snapshot;
1624
+ }
1625
+ function ingestError$9(luvio, params, error, snapshotRefresh) {
1626
+ const key = keyBuilder$r(luvio, params);
1627
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1628
+ const storeMetadataParams = {
1629
+ ttl: TTL$8,
1630
+ namespace: keyPrefix,
1631
+ version: VERSION$f,
1632
+ representationName: RepresentationType$c
1633
+ };
1634
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1635
+ return errorSnapshot;
1636
+ }
1637
+ function createResourceRequest$a(config) {
1638
+ const headers = {};
1639
+ return {
1640
+ baseUri: '/services/data/v58.0',
1641
+ basePath: '/learning-content-platform/learning/feedbackresult/' + config.urlParams.learningItemId + '',
1642
+ method: 'get',
1643
+ body: null,
1644
+ urlParams: config.urlParams,
1645
+ queryParams: {},
1646
+ headers,
1647
+ priority: 'normal',
1648
+ };
1649
+ }
1650
+
1651
+ const getFeedbackResult_ConfigPropertyNames = {
1652
+ displayName: 'getFeedbackResult',
1653
+ parameters: {
1654
+ required: ['learningItemId'],
1655
+ optional: []
1656
+ }
1657
+ };
1658
+ function createResourceParams$a(config) {
1659
+ const resourceParams = {
1660
+ urlParams: {
1661
+ learningItemId: config.learningItemId
1662
+ }
1663
+ };
1664
+ return resourceParams;
1665
+ }
1666
+ function keyBuilder$q(luvio, config) {
1667
+ const resourceParams = createResourceParams$a(config);
1668
+ return keyBuilder$r(luvio, resourceParams);
1669
+ }
1670
+ function typeCheckConfig$a(untrustedConfig) {
1671
+ const config = {};
1672
+ const untrustedConfig_learningItemId = untrustedConfig.learningItemId;
1673
+ if (typeof untrustedConfig_learningItemId === 'string') {
1674
+ config.learningItemId = untrustedConfig_learningItemId;
1675
+ }
1676
+ return config;
1677
+ }
1212
1678
  function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
1213
1679
  if (!untrustedIsObject(untrustedConfig)) {
1214
1680
  return null;
@@ -1280,8 +1746,8 @@ function buildCachedSnapshotCachePolicy$9(context, storeLookup) {
1280
1746
  });
1281
1747
  return cacheSnapshot;
1282
1748
  }
1283
- const getFeaturedItemsRelatedListAdapterFactory = (luvio) => function LearningContentPlatform__getFeaturedItemsRelatedList(untrustedConfig, requestContext) {
1284
- const config = validateAdapterConfig$a(untrustedConfig, getFeaturedItemsRelatedList_ConfigPropertyNames);
1749
+ const getFeedbackResultAdapterFactory = (luvio) => function LearningContentPlatform__getFeedbackResult(untrustedConfig, requestContext) {
1750
+ const config = validateAdapterConfig$a(untrustedConfig, getFeedbackResult_ConfigPropertyNames);
1285
1751
  // Invalid or incomplete config
1286
1752
  if (config === null) {
1287
1753
  return null;
@@ -1701,7 +2167,7 @@ function normalize$9(input, existing, path, luvio, store, timestamp) {
1701
2167
  for (let i = 0; i < input_results.length; i++) {
1702
2168
  const input_results_item = input_results[i];
1703
2169
  let input_results_item_id = input_results_id + '__' + i;
1704
- input_results[i] = ingest$e(input_results_item, {
2170
+ input_results[i] = ingest$f(input_results_item, {
1705
2171
  fullPath: input_results_item_id,
1706
2172
  propertyName: i,
1707
2173
  parent: {
@@ -1724,7 +2190,7 @@ const select$l = function LearningSearchResultsRepresentationSelect() {
1724
2190
  name: 'results',
1725
2191
  kind: 'Link',
1726
2192
  plural: true,
1727
- fragment: select$t()
2193
+ fragment: select$w()
1728
2194
  },
1729
2195
  {
1730
2196
  name: 'totalResults',
@@ -1801,7 +2267,7 @@ function getTypeCacheKeys$9(luvio, input, fullPathFactory) {
1801
2267
  });
1802
2268
  const input_results_length = input.results.length;
1803
2269
  for (let i = 0; i < input_results_length; i++) {
1804
- rootKeySet.merge(getTypeCacheKeys$e(luvio, input.results[i]));
2270
+ rootKeySet.merge(getTypeCacheKeys$f(luvio, input.results[i]));
1805
2271
  }
1806
2272
  return rootKeySet;
1807
2273
  }
@@ -5983,4 +6449,4 @@ const getTextLessonAdapterFactory = (luvio) => function LearningContentPlatform_
5983
6449
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
5984
6450
  };
5985
6451
 
5986
- export { evaluateLearningItemAdapterFactory, getFeaturedItemsRecommendedListAdapterFactory, getFeaturedItemsRelatedListAdapterFactory, getLearningConfigAdapterFactory, getLearningItemProgressAdapterFactory, getLearningItemsListAdapterFactory, getLearningModelAdapterFactory, getLearningPracticeAdapterFactory, getLearningSearchDescribeAdapterFactory, getLearningSearchResultsAdapterFactory, getModuleAdapterFactory, getTextLessonAdapterFactory };
6452
+ export { evaluateLearningItemAdapterFactory, getFeaturedItemsRecommendedListAdapterFactory, getFeaturedItemsRelatedListAdapterFactory, getFeedbackResultAdapterFactory, getLearningConfigAdapterFactory, getLearningItemProgressAdapterFactory, getLearningItemsListAdapterFactory, getLearningModelAdapterFactory, getLearningPracticeAdapterFactory, getLearningSearchDescribeAdapterFactory, getLearningSearchResultsAdapterFactory, getModuleAdapterFactory, getTextLessonAdapterFactory };