@salesforce/lds-adapters-service-network-data-category 1.262.4 → 1.264.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/es2018/service-network-data-category.js +394 -330
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +0 -1
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +1 -2
- package/dist/es/es2018/types/src/generated/types/LightningKnowledgeArticleVersionRepresentation.d.ts +3 -3
- package/dist/es/es2018/types/src/generated/types/NetworkDataCategoryRepresentation.d.ts +4 -2
- package/package.json +4 -4
- package/sfdc/index.js +93 -32
- package/src/raml/api.raml +6 -1
- package/src/raml/luvio.raml +0 -4
|
@@ -510,7 +510,7 @@ const getServiceCatalogItemsAdapterFactory = (luvio) => function NetworkDataCate
|
|
|
510
510
|
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
|
|
511
511
|
};
|
|
512
512
|
|
|
513
|
-
const VERSION$6 = "
|
|
513
|
+
const VERSION$6 = "cddad6e33054c6b9860f0ea60265869e";
|
|
514
514
|
function validate$7(obj, path = 'NetworkDataCategoryRepresentation') {
|
|
515
515
|
const v_error = (() => {
|
|
516
516
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -570,6 +570,34 @@ function validate$7(obj, path = 'NetworkDataCategoryRepresentation') {
|
|
|
570
570
|
message += '\n' + obj_categoryName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
571
571
|
return new TypeError(message);
|
|
572
572
|
}
|
|
573
|
+
if (obj.categoryOrGroupLabel !== undefined) {
|
|
574
|
+
const obj_categoryOrGroupLabel = obj.categoryOrGroupLabel;
|
|
575
|
+
const path_categoryOrGroupLabel = path + '.categoryOrGroupLabel';
|
|
576
|
+
let obj_categoryOrGroupLabel_union0 = null;
|
|
577
|
+
const obj_categoryOrGroupLabel_union0_error = (() => {
|
|
578
|
+
if (typeof obj_categoryOrGroupLabel !== 'string') {
|
|
579
|
+
return new TypeError('Expected "string" but received "' + typeof obj_categoryOrGroupLabel + '" (at "' + path_categoryOrGroupLabel + '")');
|
|
580
|
+
}
|
|
581
|
+
})();
|
|
582
|
+
if (obj_categoryOrGroupLabel_union0_error != null) {
|
|
583
|
+
obj_categoryOrGroupLabel_union0 = obj_categoryOrGroupLabel_union0_error.message;
|
|
584
|
+
}
|
|
585
|
+
let obj_categoryOrGroupLabel_union1 = null;
|
|
586
|
+
const obj_categoryOrGroupLabel_union1_error = (() => {
|
|
587
|
+
if (obj_categoryOrGroupLabel !== null) {
|
|
588
|
+
return new TypeError('Expected "null" but received "' + typeof obj_categoryOrGroupLabel + '" (at "' + path_categoryOrGroupLabel + '")');
|
|
589
|
+
}
|
|
590
|
+
})();
|
|
591
|
+
if (obj_categoryOrGroupLabel_union1_error != null) {
|
|
592
|
+
obj_categoryOrGroupLabel_union1 = obj_categoryOrGroupLabel_union1_error.message;
|
|
593
|
+
}
|
|
594
|
+
if (obj_categoryOrGroupLabel_union0 && obj_categoryOrGroupLabel_union1) {
|
|
595
|
+
let message = 'Object doesn\'t match union (at "' + path_categoryOrGroupLabel + '")';
|
|
596
|
+
message += '\n' + obj_categoryOrGroupLabel_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
597
|
+
message += '\n' + obj_categoryOrGroupLabel_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
598
|
+
return new TypeError(message);
|
|
599
|
+
}
|
|
600
|
+
}
|
|
573
601
|
const obj_childCategories = obj.childCategories;
|
|
574
602
|
const path_childCategories = path + '.childCategories';
|
|
575
603
|
if (!ArrayIsArray(obj_childCategories)) {
|
|
@@ -730,6 +758,11 @@ const select$d = function NetworkDataCategoryRepresentationSelect() {
|
|
|
730
758
|
name: 'categoryName',
|
|
731
759
|
kind: 'Scalar'
|
|
732
760
|
},
|
|
761
|
+
{
|
|
762
|
+
name: 'categoryOrGroupLabel',
|
|
763
|
+
kind: 'Scalar',
|
|
764
|
+
required: false
|
|
765
|
+
},
|
|
733
766
|
{
|
|
734
767
|
name: 'childCategories',
|
|
735
768
|
kind: 'Object',
|
|
@@ -786,6 +819,19 @@ function equals$6(existing, incoming) {
|
|
|
786
819
|
if (!(existing_categoryName === incoming_categoryName)) {
|
|
787
820
|
return false;
|
|
788
821
|
}
|
|
822
|
+
const existing_categoryOrGroupLabel = existing.categoryOrGroupLabel;
|
|
823
|
+
const incoming_categoryOrGroupLabel = incoming.categoryOrGroupLabel;
|
|
824
|
+
// if at least one of these optionals is defined
|
|
825
|
+
if (existing_categoryOrGroupLabel !== undefined || incoming_categoryOrGroupLabel !== undefined) {
|
|
826
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
827
|
+
// not equal
|
|
828
|
+
if (existing_categoryOrGroupLabel === undefined || incoming_categoryOrGroupLabel === undefined) {
|
|
829
|
+
return false;
|
|
830
|
+
}
|
|
831
|
+
if (!(existing_categoryOrGroupLabel === incoming_categoryOrGroupLabel)) {
|
|
832
|
+
return false;
|
|
833
|
+
}
|
|
834
|
+
}
|
|
789
835
|
const existing_childCategories = existing.childCategories;
|
|
790
836
|
const incoming_childCategories = incoming.childCategories;
|
|
791
837
|
const equals_childCategories_items = equalsArray(existing_childCategories, incoming_childCategories, (existing_childCategories_item, incoming_childCategories_item) => {
|
|
@@ -871,20 +917,6 @@ function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
871
917
|
mergeable: false
|
|
872
918
|
});
|
|
873
919
|
}
|
|
874
|
-
const notifyUpdateAvailableFactory$1 = (luvio) => {
|
|
875
|
-
return function notifyNetworkDataCategoryRepresentationUpdateAvailable(configs) {
|
|
876
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
877
|
-
const requiredKeyParams = ['id'];
|
|
878
|
-
configs.forEach(config => {
|
|
879
|
-
if (false === requiredKeyParams.every(req => req in config)) {
|
|
880
|
-
throw new Error(`one of the configs did not contain all required parameters: ${JSONStringify(ObjectKeys(config))}`);
|
|
881
|
-
}
|
|
882
|
-
});
|
|
883
|
-
}
|
|
884
|
-
const keys = configs.map(c => keyBuilder$c(luvio, c));
|
|
885
|
-
return luvio.notifyStoreUpdateAvailable(keys);
|
|
886
|
-
};
|
|
887
|
-
};
|
|
888
920
|
|
|
889
921
|
function select$c(luvio, params) {
|
|
890
922
|
return select$d();
|
|
@@ -923,9 +955,230 @@ function createResourceRequest$6(config) {
|
|
|
923
955
|
};
|
|
924
956
|
}
|
|
925
957
|
|
|
958
|
+
const VERSION$5 = "15c619f1c41ed55ac3d19e24eb94542b";
|
|
959
|
+
function validate$6(obj, path = 'NetworkDataCategoryGroupRepresentation') {
|
|
960
|
+
const v_error = (() => {
|
|
961
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
962
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
963
|
+
}
|
|
964
|
+
const obj_categoryGroupName = obj.categoryGroupName;
|
|
965
|
+
const path_categoryGroupName = path + '.categoryGroupName';
|
|
966
|
+
if (typeof obj_categoryGroupName !== 'string') {
|
|
967
|
+
return new TypeError('Expected "string" but received "' + typeof obj_categoryGroupName + '" (at "' + path_categoryGroupName + '")');
|
|
968
|
+
}
|
|
969
|
+
const obj_rootCategory = obj.rootCategory;
|
|
970
|
+
const path_rootCategory = path + '.rootCategory';
|
|
971
|
+
if (typeof obj_rootCategory !== 'object') {
|
|
972
|
+
return new TypeError('Expected "object" but received "' + typeof obj_rootCategory + '" (at "' + path_rootCategory + '")');
|
|
973
|
+
}
|
|
974
|
+
})();
|
|
975
|
+
return v_error === undefined ? null : v_error;
|
|
976
|
+
}
|
|
977
|
+
const RepresentationType$4 = 'NetworkDataCategoryGroupRepresentation';
|
|
978
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
979
|
+
const input_rootCategory = input.rootCategory;
|
|
980
|
+
const input_rootCategory_id = path.fullPath + '__rootCategory';
|
|
981
|
+
input.rootCategory = ingest$5(input_rootCategory, {
|
|
982
|
+
fullPath: input_rootCategory_id,
|
|
983
|
+
propertyName: 'rootCategory',
|
|
984
|
+
parent: {
|
|
985
|
+
data: input,
|
|
986
|
+
key: path.fullPath,
|
|
987
|
+
existing: existing,
|
|
988
|
+
},
|
|
989
|
+
ttl: path.ttl
|
|
990
|
+
}, luvio, store, timestamp);
|
|
991
|
+
return input;
|
|
992
|
+
}
|
|
993
|
+
const select$b = function NetworkDataCategoryGroupRepresentationSelect() {
|
|
994
|
+
return {
|
|
995
|
+
kind: 'Fragment',
|
|
996
|
+
version: VERSION$5,
|
|
997
|
+
private: [],
|
|
998
|
+
selections: [
|
|
999
|
+
{
|
|
1000
|
+
name: 'categoryGroupName',
|
|
1001
|
+
kind: 'Scalar'
|
|
1002
|
+
},
|
|
1003
|
+
{
|
|
1004
|
+
name: 'rootCategory',
|
|
1005
|
+
kind: 'Link',
|
|
1006
|
+
fragment: select$d()
|
|
1007
|
+
}
|
|
1008
|
+
]
|
|
1009
|
+
};
|
|
1010
|
+
};
|
|
1011
|
+
function equals$5(existing, incoming) {
|
|
1012
|
+
const existing_categoryGroupName = existing.categoryGroupName;
|
|
1013
|
+
const incoming_categoryGroupName = incoming.categoryGroupName;
|
|
1014
|
+
if (!(existing_categoryGroupName === incoming_categoryGroupName)) {
|
|
1015
|
+
return false;
|
|
1016
|
+
}
|
|
1017
|
+
const existing_rootCategory = existing.rootCategory;
|
|
1018
|
+
const incoming_rootCategory = incoming.rootCategory;
|
|
1019
|
+
if (!(existing_rootCategory.__ref === incoming_rootCategory.__ref)) {
|
|
1020
|
+
return false;
|
|
1021
|
+
}
|
|
1022
|
+
return true;
|
|
1023
|
+
}
|
|
1024
|
+
const ingest$4 = function NetworkDataCategoryGroupRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1025
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1026
|
+
const validateError = validate$6(input);
|
|
1027
|
+
if (validateError !== null) {
|
|
1028
|
+
throw validateError;
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
const key = path.fullPath;
|
|
1032
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 900000;
|
|
1033
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "NetworkDataCategory", VERSION$5, RepresentationType$4, equals$5);
|
|
1034
|
+
return createLink(key);
|
|
1035
|
+
};
|
|
1036
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
1037
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1038
|
+
const rootKey = fullPathFactory();
|
|
1039
|
+
rootKeySet.set(rootKey, {
|
|
1040
|
+
namespace: keyPrefix,
|
|
1041
|
+
representationName: RepresentationType$4,
|
|
1042
|
+
mergeable: false
|
|
1043
|
+
});
|
|
1044
|
+
getTypeCacheKeys$5(rootKeySet, luvio, input.rootCategory);
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
const VERSION$4 = "5e66b8759100556a58fea2ff97dab767";
|
|
1048
|
+
function validate$5(obj, path = 'NetworkDataCategoryTreeRepresentation') {
|
|
1049
|
+
const v_error = (() => {
|
|
1050
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1051
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1052
|
+
}
|
|
1053
|
+
const obj_communityId = obj.communityId;
|
|
1054
|
+
const path_communityId = path + '.communityId';
|
|
1055
|
+
if (typeof obj_communityId !== 'string') {
|
|
1056
|
+
return new TypeError('Expected "string" but received "' + typeof obj_communityId + '" (at "' + path_communityId + '")');
|
|
1057
|
+
}
|
|
1058
|
+
const obj_dataCategoryGroups = obj.dataCategoryGroups;
|
|
1059
|
+
const path_dataCategoryGroups = path + '.dataCategoryGroups';
|
|
1060
|
+
if (!ArrayIsArray(obj_dataCategoryGroups)) {
|
|
1061
|
+
return new TypeError('Expected "array" but received "' + typeof obj_dataCategoryGroups + '" (at "' + path_dataCategoryGroups + '")');
|
|
1062
|
+
}
|
|
1063
|
+
for (let i = 0; i < obj_dataCategoryGroups.length; i++) {
|
|
1064
|
+
const obj_dataCategoryGroups_item = obj_dataCategoryGroups[i];
|
|
1065
|
+
const path_dataCategoryGroups_item = path_dataCategoryGroups + '[' + i + ']';
|
|
1066
|
+
if (typeof obj_dataCategoryGroups_item !== 'object') {
|
|
1067
|
+
return new TypeError('Expected "object" but received "' + typeof obj_dataCategoryGroups_item + '" (at "' + path_dataCategoryGroups_item + '")');
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
})();
|
|
1071
|
+
return v_error === undefined ? null : v_error;
|
|
1072
|
+
}
|
|
1073
|
+
const RepresentationType$3 = 'NetworkDataCategoryTreeRepresentation';
|
|
1074
|
+
function keyBuilder$b(luvio, config) {
|
|
1075
|
+
return keyPrefix + '::' + RepresentationType$3 + ':' + config.communityId;
|
|
1076
|
+
}
|
|
1077
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
1078
|
+
const keyParams = {
|
|
1079
|
+
communityId: object.communityId
|
|
1080
|
+
};
|
|
1081
|
+
return keyBuilder$b(luvio, keyParams);
|
|
1082
|
+
}
|
|
1083
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
1084
|
+
const input_dataCategoryGroups = input.dataCategoryGroups;
|
|
1085
|
+
const input_dataCategoryGroups_id = path.fullPath + '__dataCategoryGroups';
|
|
1086
|
+
for (let i = 0; i < input_dataCategoryGroups.length; i++) {
|
|
1087
|
+
const input_dataCategoryGroups_item = input_dataCategoryGroups[i];
|
|
1088
|
+
let input_dataCategoryGroups_item_id = input_dataCategoryGroups_id + '__' + i;
|
|
1089
|
+
input_dataCategoryGroups[i] = ingest$4(input_dataCategoryGroups_item, {
|
|
1090
|
+
fullPath: input_dataCategoryGroups_item_id,
|
|
1091
|
+
propertyName: i,
|
|
1092
|
+
parent: {
|
|
1093
|
+
data: input,
|
|
1094
|
+
key: path.fullPath,
|
|
1095
|
+
existing: existing,
|
|
1096
|
+
},
|
|
1097
|
+
ttl: path.ttl
|
|
1098
|
+
}, luvio, store, timestamp);
|
|
1099
|
+
}
|
|
1100
|
+
return input;
|
|
1101
|
+
}
|
|
1102
|
+
const select$a = function NetworkDataCategoryTreeRepresentationSelect() {
|
|
1103
|
+
return {
|
|
1104
|
+
kind: 'Fragment',
|
|
1105
|
+
version: VERSION$4,
|
|
1106
|
+
private: [],
|
|
1107
|
+
selections: [
|
|
1108
|
+
{
|
|
1109
|
+
name: 'communityId',
|
|
1110
|
+
kind: 'Scalar'
|
|
1111
|
+
},
|
|
1112
|
+
{
|
|
1113
|
+
name: 'dataCategoryGroups',
|
|
1114
|
+
kind: 'Link',
|
|
1115
|
+
plural: true,
|
|
1116
|
+
fragment: select$b()
|
|
1117
|
+
}
|
|
1118
|
+
]
|
|
1119
|
+
};
|
|
1120
|
+
};
|
|
1121
|
+
function equals$4(existing, incoming) {
|
|
1122
|
+
const existing_communityId = existing.communityId;
|
|
1123
|
+
const incoming_communityId = incoming.communityId;
|
|
1124
|
+
if (!(existing_communityId === incoming_communityId)) {
|
|
1125
|
+
return false;
|
|
1126
|
+
}
|
|
1127
|
+
const existing_dataCategoryGroups = existing.dataCategoryGroups;
|
|
1128
|
+
const incoming_dataCategoryGroups = incoming.dataCategoryGroups;
|
|
1129
|
+
const equals_dataCategoryGroups_items = equalsArray(existing_dataCategoryGroups, incoming_dataCategoryGroups, (existing_dataCategoryGroups_item, incoming_dataCategoryGroups_item) => {
|
|
1130
|
+
if (!(existing_dataCategoryGroups_item.__ref === incoming_dataCategoryGroups_item.__ref)) {
|
|
1131
|
+
return false;
|
|
1132
|
+
}
|
|
1133
|
+
});
|
|
1134
|
+
if (equals_dataCategoryGroups_items === false) {
|
|
1135
|
+
return false;
|
|
1136
|
+
}
|
|
1137
|
+
return true;
|
|
1138
|
+
}
|
|
1139
|
+
const ingest$3 = function NetworkDataCategoryTreeRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1140
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1141
|
+
const validateError = validate$5(input);
|
|
1142
|
+
if (validateError !== null) {
|
|
1143
|
+
throw validateError;
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
1147
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 900000;
|
|
1148
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "NetworkDataCategory", VERSION$4, RepresentationType$3, equals$4);
|
|
1149
|
+
return createLink(key);
|
|
1150
|
+
};
|
|
1151
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
1152
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1153
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
1154
|
+
rootKeySet.set(rootKey, {
|
|
1155
|
+
namespace: keyPrefix,
|
|
1156
|
+
representationName: RepresentationType$3,
|
|
1157
|
+
mergeable: false
|
|
1158
|
+
});
|
|
1159
|
+
const input_dataCategoryGroups_length = input.dataCategoryGroups.length;
|
|
1160
|
+
for (let i = 0; i < input_dataCategoryGroups_length; i++) {
|
|
1161
|
+
getTypeCacheKeys$4(rootKeySet, luvio, input.dataCategoryGroups[i], () => '');
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
const notifyUpdateAvailableFactory = (luvio) => {
|
|
1165
|
+
return function notifyNetworkDataCategoryTreeRepresentationUpdateAvailable(configs) {
|
|
1166
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1167
|
+
const requiredKeyParams = ['communityId'];
|
|
1168
|
+
configs.forEach(config => {
|
|
1169
|
+
if (false === requiredKeyParams.every(req => req in config)) {
|
|
1170
|
+
throw new Error(`one of the configs did not contain all required parameters: ${JSONStringify(ObjectKeys(config))}`);
|
|
1171
|
+
}
|
|
1172
|
+
});
|
|
1173
|
+
}
|
|
1174
|
+
const keys = configs.map(c => keyBuilder$b(luvio, c));
|
|
1175
|
+
return luvio.notifyStoreUpdateAvailable(keys);
|
|
1176
|
+
};
|
|
1177
|
+
};
|
|
1178
|
+
|
|
926
1179
|
function buildNetworkSnapshot$8(luvio, config) {
|
|
927
1180
|
return buildNetworkSnapshot$7(luvio, config).then((result) => {
|
|
928
|
-
notifyUpdateAvailableFactory
|
|
1181
|
+
notifyUpdateAvailableFactory(luvio)([{ communityId: config.communityId }]);
|
|
929
1182
|
return result;
|
|
930
1183
|
});
|
|
931
1184
|
}
|
|
@@ -986,22 +1239,22 @@ const updateNetworkDataCategoryAdapterFactory = (luvio) => {
|
|
|
986
1239
|
};
|
|
987
1240
|
};
|
|
988
1241
|
|
|
989
|
-
function select$
|
|
1242
|
+
function select$9(luvio, params) {
|
|
990
1243
|
return select$f();
|
|
991
1244
|
}
|
|
992
|
-
function keyBuilder$
|
|
1245
|
+
function keyBuilder$a(luvio, params) {
|
|
993
1246
|
return keyPrefix + '::ServiceCatalogItemCollectionRepresentation:(' + 'pageSize:' + params.queryParams.pageSize + ',' + 'pageNumber:' + params.queryParams.pageNumber + ',' + 'sortOrder:' + params.queryParams.sortOrder + ',' + 'sortedBy:' + params.queryParams.sortedBy + ',' + 'networkDataCategoryId:' + params.urlParams.networkDataCategoryId + ',' + 'communityId:' + params.urlParams.communityId + ')';
|
|
994
1247
|
}
|
|
995
1248
|
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
996
|
-
getTypeCacheKeys$6(storeKeyMap, luvio, response, () => keyBuilder$
|
|
1249
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response, () => keyBuilder$a(luvio, resourceParams));
|
|
997
1250
|
}
|
|
998
1251
|
function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
999
1252
|
const { body } = response;
|
|
1000
|
-
const key = keyBuilder$
|
|
1253
|
+
const key = keyBuilder$a(luvio, resourceParams);
|
|
1001
1254
|
luvio.storeIngest(key, ingest$6, body);
|
|
1002
1255
|
const snapshot = luvio.storeLookup({
|
|
1003
1256
|
recordId: key,
|
|
1004
|
-
node: select$
|
|
1257
|
+
node: select$9(),
|
|
1005
1258
|
variables: {},
|
|
1006
1259
|
}, snapshotRefresh);
|
|
1007
1260
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1013,7 +1266,7 @@ function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1013
1266
|
return snapshot;
|
|
1014
1267
|
}
|
|
1015
1268
|
function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
1016
|
-
const key = keyBuilder$
|
|
1269
|
+
const key = keyBuilder$a(luvio, params);
|
|
1017
1270
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1018
1271
|
luvio.storeIngestError(key, errorSnapshot);
|
|
1019
1272
|
return errorSnapshot;
|
|
@@ -1043,9 +1296,9 @@ const getServiceCatalogItemsForCommunity_ConfigPropertyMetadata = [
|
|
|
1043
1296
|
];
|
|
1044
1297
|
const getServiceCatalogItemsForCommunity_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getServiceCatalogItemsForCommunity_ConfigPropertyMetadata);
|
|
1045
1298
|
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$8(getServiceCatalogItemsForCommunity_ConfigPropertyMetadata);
|
|
1046
|
-
function keyBuilder$
|
|
1299
|
+
function keyBuilder$9(luvio, config) {
|
|
1047
1300
|
const resourceParams = createResourceParams$5(config);
|
|
1048
|
-
return keyBuilder$
|
|
1301
|
+
return keyBuilder$a(luvio, resourceParams);
|
|
1049
1302
|
}
|
|
1050
1303
|
function typeCheckConfig$5(untrustedConfig) {
|
|
1051
1304
|
const config = {};
|
|
@@ -1067,7 +1320,7 @@ function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
|
1067
1320
|
}
|
|
1068
1321
|
function adapterFragment$4(luvio, config) {
|
|
1069
1322
|
createResourceParams$5(config);
|
|
1070
|
-
return select$
|
|
1323
|
+
return select$9();
|
|
1071
1324
|
}
|
|
1072
1325
|
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
1073
1326
|
const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
|
|
@@ -1103,7 +1356,7 @@ function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext
|
|
|
1103
1356
|
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
1104
1357
|
const { luvio, config } = context;
|
|
1105
1358
|
const selector = {
|
|
1106
|
-
recordId: keyBuilder$
|
|
1359
|
+
recordId: keyBuilder$9(luvio, config),
|
|
1107
1360
|
node: adapterFragment$4(luvio, config),
|
|
1108
1361
|
variables: {},
|
|
1109
1362
|
};
|
|
@@ -1123,8 +1376,8 @@ const getServiceCatalogItemsForCommunityAdapterFactory = (luvio) => function Net
|
|
|
1123
1376
|
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
|
|
1124
1377
|
};
|
|
1125
1378
|
|
|
1126
|
-
const VERSION$
|
|
1127
|
-
function validate$
|
|
1379
|
+
const VERSION$3 = "1579429bf94d94aa9fe7ba4906607811";
|
|
1380
|
+
function validate$4(obj, path = 'LightningKnowledgeArticleVersionRepresentation') {
|
|
1128
1381
|
const v_error = (() => {
|
|
1129
1382
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1130
1383
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1144,10 +1397,33 @@ function validate$6(obj, path = 'LightningKnowledgeArticleVersionRepresentation'
|
|
|
1144
1397
|
if (typeof obj_lastPublishedDate !== 'string') {
|
|
1145
1398
|
return new TypeError('Expected "string" but received "' + typeof obj_lastPublishedDate + '" (at "' + path_lastPublishedDate + '")');
|
|
1146
1399
|
}
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1400
|
+
if (obj.summary !== undefined) {
|
|
1401
|
+
const obj_summary = obj.summary;
|
|
1402
|
+
const path_summary = path + '.summary';
|
|
1403
|
+
let obj_summary_union0 = null;
|
|
1404
|
+
const obj_summary_union0_error = (() => {
|
|
1405
|
+
if (typeof obj_summary !== 'string') {
|
|
1406
|
+
return new TypeError('Expected "string" but received "' + typeof obj_summary + '" (at "' + path_summary + '")');
|
|
1407
|
+
}
|
|
1408
|
+
})();
|
|
1409
|
+
if (obj_summary_union0_error != null) {
|
|
1410
|
+
obj_summary_union0 = obj_summary_union0_error.message;
|
|
1411
|
+
}
|
|
1412
|
+
let obj_summary_union1 = null;
|
|
1413
|
+
const obj_summary_union1_error = (() => {
|
|
1414
|
+
if (obj_summary !== null) {
|
|
1415
|
+
return new TypeError('Expected "null" but received "' + typeof obj_summary + '" (at "' + path_summary + '")');
|
|
1416
|
+
}
|
|
1417
|
+
})();
|
|
1418
|
+
if (obj_summary_union1_error != null) {
|
|
1419
|
+
obj_summary_union1 = obj_summary_union1_error.message;
|
|
1420
|
+
}
|
|
1421
|
+
if (obj_summary_union0 && obj_summary_union1) {
|
|
1422
|
+
let message = 'Object doesn\'t match union (at "' + path_summary + '")';
|
|
1423
|
+
message += '\n' + obj_summary_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1424
|
+
message += '\n' + obj_summary_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1425
|
+
return new TypeError(message);
|
|
1426
|
+
}
|
|
1151
1427
|
}
|
|
1152
1428
|
const obj_title = obj.title;
|
|
1153
1429
|
const path_title = path + '.title';
|
|
@@ -1162,10 +1438,10 @@ function validate$6(obj, path = 'LightningKnowledgeArticleVersionRepresentation'
|
|
|
1162
1438
|
})();
|
|
1163
1439
|
return v_error === undefined ? null : v_error;
|
|
1164
1440
|
}
|
|
1165
|
-
const select$
|
|
1441
|
+
const select$8 = function LightningKnowledgeArticleVersionRepresentationSelect() {
|
|
1166
1442
|
return {
|
|
1167
1443
|
kind: 'Fragment',
|
|
1168
|
-
version: VERSION$
|
|
1444
|
+
version: VERSION$3,
|
|
1169
1445
|
private: [],
|
|
1170
1446
|
selections: [
|
|
1171
1447
|
{
|
|
@@ -1182,7 +1458,8 @@ const select$a = function LightningKnowledgeArticleVersionRepresentationSelect()
|
|
|
1182
1458
|
},
|
|
1183
1459
|
{
|
|
1184
1460
|
name: 'summary',
|
|
1185
|
-
kind: 'Scalar'
|
|
1461
|
+
kind: 'Scalar',
|
|
1462
|
+
required: false
|
|
1186
1463
|
},
|
|
1187
1464
|
{
|
|
1188
1465
|
name: 'title',
|
|
@@ -1195,7 +1472,7 @@ const select$a = function LightningKnowledgeArticleVersionRepresentationSelect()
|
|
|
1195
1472
|
]
|
|
1196
1473
|
};
|
|
1197
1474
|
};
|
|
1198
|
-
function equals$
|
|
1475
|
+
function equals$3(existing, incoming) {
|
|
1199
1476
|
const existing_id = existing.id;
|
|
1200
1477
|
const incoming_id = incoming.id;
|
|
1201
1478
|
if (!(existing_id === incoming_id)) {
|
|
@@ -1211,11 +1488,6 @@ function equals$5(existing, incoming) {
|
|
|
1211
1488
|
if (!(existing_lastPublishedDate === incoming_lastPublishedDate)) {
|
|
1212
1489
|
return false;
|
|
1213
1490
|
}
|
|
1214
|
-
const existing_summary = existing.summary;
|
|
1215
|
-
const incoming_summary = incoming.summary;
|
|
1216
|
-
if (!(existing_summary === incoming_summary)) {
|
|
1217
|
-
return false;
|
|
1218
|
-
}
|
|
1219
1491
|
const existing_title = existing.title;
|
|
1220
1492
|
const incoming_title = incoming.title;
|
|
1221
1493
|
if (!(existing_title === incoming_title)) {
|
|
@@ -1226,11 +1498,24 @@ function equals$5(existing, incoming) {
|
|
|
1226
1498
|
if (!(existing_urlName === incoming_urlName)) {
|
|
1227
1499
|
return false;
|
|
1228
1500
|
}
|
|
1501
|
+
const existing_summary = existing.summary;
|
|
1502
|
+
const incoming_summary = incoming.summary;
|
|
1503
|
+
// if at least one of these optionals is defined
|
|
1504
|
+
if (existing_summary !== undefined || incoming_summary !== undefined) {
|
|
1505
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1506
|
+
// not equal
|
|
1507
|
+
if (existing_summary === undefined || incoming_summary === undefined) {
|
|
1508
|
+
return false;
|
|
1509
|
+
}
|
|
1510
|
+
if (!(existing_summary === incoming_summary)) {
|
|
1511
|
+
return false;
|
|
1512
|
+
}
|
|
1513
|
+
}
|
|
1229
1514
|
return true;
|
|
1230
1515
|
}
|
|
1231
1516
|
|
|
1232
|
-
const VERSION$
|
|
1233
|
-
function validate$
|
|
1517
|
+
const VERSION$2 = "6e0f7ad284b0bacd2260182b92f0e398";
|
|
1518
|
+
function validate$3(obj, path = 'LightningKnowledgeArticleVersionCollectionRepresentation') {
|
|
1234
1519
|
const v_error = (() => {
|
|
1235
1520
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1236
1521
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1271,7 +1556,7 @@ function validate$5(obj, path = 'LightningKnowledgeArticleVersionCollectionRepre
|
|
|
1271
1556
|
for (let i = 0; i < obj_items.length; i++) {
|
|
1272
1557
|
const obj_items_item = obj_items[i];
|
|
1273
1558
|
const path_items_item = path_items + '[' + i + ']';
|
|
1274
|
-
const referencepath_items_itemValidationError = validate$
|
|
1559
|
+
const referencepath_items_itemValidationError = validate$4(obj_items_item, path_items_item);
|
|
1275
1560
|
if (referencepath_items_itemValidationError !== null) {
|
|
1276
1561
|
let message = 'Object doesn\'t match LightningKnowledgeArticleVersionRepresentation (at "' + path_items_item + '")\n';
|
|
1277
1562
|
message += referencepath_items_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1281,15 +1566,15 @@ function validate$5(obj, path = 'LightningKnowledgeArticleVersionCollectionRepre
|
|
|
1281
1566
|
})();
|
|
1282
1567
|
return v_error === undefined ? null : v_error;
|
|
1283
1568
|
}
|
|
1284
|
-
const RepresentationType$
|
|
1285
|
-
function normalize$
|
|
1569
|
+
const RepresentationType$2 = 'LightningKnowledgeArticleVersionCollectionRepresentation';
|
|
1570
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
1286
1571
|
return input;
|
|
1287
1572
|
}
|
|
1288
|
-
const select$
|
|
1289
|
-
const { selections: LightningKnowledgeArticleVersionRepresentation__selections, opaque: LightningKnowledgeArticleVersionRepresentation__opaque, } = select$
|
|
1573
|
+
const select$7 = function LightningKnowledgeArticleVersionCollectionRepresentationSelect() {
|
|
1574
|
+
const { selections: LightningKnowledgeArticleVersionRepresentation__selections, opaque: LightningKnowledgeArticleVersionRepresentation__opaque, } = select$8();
|
|
1290
1575
|
return {
|
|
1291
1576
|
kind: 'Fragment',
|
|
1292
|
-
version: VERSION$
|
|
1577
|
+
version: VERSION$2,
|
|
1293
1578
|
private: [],
|
|
1294
1579
|
selections: [
|
|
1295
1580
|
{
|
|
@@ -1306,7 +1591,7 @@ const select$9 = function LightningKnowledgeArticleVersionCollectionRepresentati
|
|
|
1306
1591
|
]
|
|
1307
1592
|
};
|
|
1308
1593
|
};
|
|
1309
|
-
function equals$
|
|
1594
|
+
function equals$2(existing, incoming) {
|
|
1310
1595
|
const existing_baseUrl = existing.baseUrl;
|
|
1311
1596
|
const incoming_baseUrl = incoming.baseUrl;
|
|
1312
1597
|
// if at least one of these optionals is defined
|
|
@@ -1323,7 +1608,7 @@ function equals$4(existing, incoming) {
|
|
|
1323
1608
|
const existing_items = existing.items;
|
|
1324
1609
|
const incoming_items = incoming.items;
|
|
1325
1610
|
const equals_items_items = equalsArray(existing_items, incoming_items, (existing_items_item, incoming_items_item) => {
|
|
1326
|
-
if (!(equals$
|
|
1611
|
+
if (!(equals$3(existing_items_item, incoming_items_item))) {
|
|
1327
1612
|
return false;
|
|
1328
1613
|
}
|
|
1329
1614
|
});
|
|
@@ -1332,44 +1617,44 @@ function equals$4(existing, incoming) {
|
|
|
1332
1617
|
}
|
|
1333
1618
|
return true;
|
|
1334
1619
|
}
|
|
1335
|
-
const ingest$
|
|
1620
|
+
const ingest$2 = function LightningKnowledgeArticleVersionCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1336
1621
|
if (process.env.NODE_ENV !== 'production') {
|
|
1337
|
-
const validateError = validate$
|
|
1622
|
+
const validateError = validate$3(input);
|
|
1338
1623
|
if (validateError !== null) {
|
|
1339
1624
|
throw validateError;
|
|
1340
1625
|
}
|
|
1341
1626
|
}
|
|
1342
1627
|
const key = path.fullPath;
|
|
1343
1628
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 900000;
|
|
1344
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1629
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "NetworkDataCategory", VERSION$2, RepresentationType$2, equals$2);
|
|
1345
1630
|
return createLink(key);
|
|
1346
1631
|
};
|
|
1347
|
-
function getTypeCacheKeys$
|
|
1632
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
1348
1633
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1349
1634
|
const rootKey = fullPathFactory();
|
|
1350
1635
|
rootKeySet.set(rootKey, {
|
|
1351
1636
|
namespace: keyPrefix,
|
|
1352
|
-
representationName: RepresentationType$
|
|
1637
|
+
representationName: RepresentationType$2,
|
|
1353
1638
|
mergeable: false
|
|
1354
1639
|
});
|
|
1355
1640
|
}
|
|
1356
1641
|
|
|
1357
|
-
function select$
|
|
1358
|
-
return select$
|
|
1642
|
+
function select$6(luvio, params) {
|
|
1643
|
+
return select$7();
|
|
1359
1644
|
}
|
|
1360
|
-
function keyBuilder$
|
|
1645
|
+
function keyBuilder$8(luvio, params) {
|
|
1361
1646
|
return keyPrefix + '::LightningKnowledgeArticleVersionCollectionRepresentation:(' + 'language:' + params.queryParams.language + ',' + 'pageNumber:' + params.queryParams.pageNumber + ',' + 'pageSize:' + params.queryParams.pageSize + ',' + 'sortOrder:' + params.queryParams.sortOrder + ',' + 'sortedBy:' + params.queryParams.sortedBy + ',' + 'networkDataCategoryId:' + params.urlParams.networkDataCategoryId + ',' + 'communityId:' + params.urlParams.communityId + ')';
|
|
1362
1647
|
}
|
|
1363
1648
|
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
1364
|
-
getTypeCacheKeys$
|
|
1649
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$8(luvio, resourceParams));
|
|
1365
1650
|
}
|
|
1366
1651
|
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
1367
1652
|
const { body } = response;
|
|
1368
|
-
const key = keyBuilder$
|
|
1369
|
-
luvio.storeIngest(key, ingest$
|
|
1653
|
+
const key = keyBuilder$8(luvio, resourceParams);
|
|
1654
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
1370
1655
|
const snapshot = luvio.storeLookup({
|
|
1371
1656
|
recordId: key,
|
|
1372
|
-
node: select$
|
|
1657
|
+
node: select$6(),
|
|
1373
1658
|
variables: {},
|
|
1374
1659
|
}, snapshotRefresh);
|
|
1375
1660
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1381,7 +1666,7 @@ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1381
1666
|
return snapshot;
|
|
1382
1667
|
}
|
|
1383
1668
|
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
1384
|
-
const key = keyBuilder$
|
|
1669
|
+
const key = keyBuilder$8(luvio, params);
|
|
1385
1670
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1386
1671
|
luvio.storeIngestError(key, errorSnapshot);
|
|
1387
1672
|
return errorSnapshot;
|
|
@@ -1412,9 +1697,9 @@ const getArticlesForCategory_ConfigPropertyMetadata = [
|
|
|
1412
1697
|
];
|
|
1413
1698
|
const getArticlesForCategory_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getArticlesForCategory_ConfigPropertyMetadata);
|
|
1414
1699
|
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$8(getArticlesForCategory_ConfigPropertyMetadata);
|
|
1415
|
-
function keyBuilder$
|
|
1700
|
+
function keyBuilder$7(luvio, config) {
|
|
1416
1701
|
const resourceParams = createResourceParams$4(config);
|
|
1417
|
-
return keyBuilder$
|
|
1702
|
+
return keyBuilder$8(luvio, resourceParams);
|
|
1418
1703
|
}
|
|
1419
1704
|
function typeCheckConfig$4(untrustedConfig) {
|
|
1420
1705
|
const config = {};
|
|
@@ -1436,7 +1721,7 @@ function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
|
1436
1721
|
}
|
|
1437
1722
|
function adapterFragment$3(luvio, config) {
|
|
1438
1723
|
createResourceParams$4(config);
|
|
1439
|
-
return select$
|
|
1724
|
+
return select$6();
|
|
1440
1725
|
}
|
|
1441
1726
|
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
1442
1727
|
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
@@ -1472,7 +1757,7 @@ function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext
|
|
|
1472
1757
|
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
1473
1758
|
const { luvio, config } = context;
|
|
1474
1759
|
const selector = {
|
|
1475
|
-
recordId: keyBuilder$
|
|
1760
|
+
recordId: keyBuilder$7(luvio, config),
|
|
1476
1761
|
node: adapterFragment$3(luvio, config),
|
|
1477
1762
|
variables: {},
|
|
1478
1763
|
};
|
|
@@ -1492,8 +1777,8 @@ const getArticlesForCategoryAdapterFactory = (luvio) => function NetworkDataCate
|
|
|
1492
1777
|
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
1493
1778
|
};
|
|
1494
1779
|
|
|
1495
|
-
const VERSION$
|
|
1496
|
-
function validate$
|
|
1780
|
+
const VERSION$1 = "55e759666b11e19f41045930d9ac0dd6";
|
|
1781
|
+
function validate$2(obj, path = 'NetworkDataCategoryCollectionRepresentation') {
|
|
1497
1782
|
const v_error = (() => {
|
|
1498
1783
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1499
1784
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1541,8 +1826,8 @@ function validate$4(obj, path = 'NetworkDataCategoryCollectionRepresentation') {
|
|
|
1541
1826
|
})();
|
|
1542
1827
|
return v_error === undefined ? null : v_error;
|
|
1543
1828
|
}
|
|
1544
|
-
const RepresentationType$
|
|
1545
|
-
function normalize$
|
|
1829
|
+
const RepresentationType$1 = 'NetworkDataCategoryCollectionRepresentation';
|
|
1830
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
1546
1831
|
const input_networkDataCategories = input.networkDataCategories;
|
|
1547
1832
|
const input_networkDataCategories_id = path.fullPath + '__networkDataCategories';
|
|
1548
1833
|
for (let i = 0; i < input_networkDataCategories.length; i++) {
|
|
@@ -1561,10 +1846,10 @@ function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
|
1561
1846
|
}
|
|
1562
1847
|
return input;
|
|
1563
1848
|
}
|
|
1564
|
-
const select$
|
|
1849
|
+
const select$5 = function NetworkDataCategoryCollectionRepresentationSelect() {
|
|
1565
1850
|
return {
|
|
1566
1851
|
kind: 'Fragment',
|
|
1567
|
-
version: VERSION$
|
|
1852
|
+
version: VERSION$1,
|
|
1568
1853
|
private: [],
|
|
1569
1854
|
selections: [
|
|
1570
1855
|
{
|
|
@@ -1581,7 +1866,7 @@ const select$7 = function NetworkDataCategoryCollectionRepresentationSelect() {
|
|
|
1581
1866
|
]
|
|
1582
1867
|
};
|
|
1583
1868
|
};
|
|
1584
|
-
function equals$
|
|
1869
|
+
function equals$1(existing, incoming) {
|
|
1585
1870
|
const existing_baseUrl = existing.baseUrl;
|
|
1586
1871
|
const incoming_baseUrl = incoming.baseUrl;
|
|
1587
1872
|
// if at least one of these optionals is defined
|
|
@@ -1607,24 +1892,24 @@ function equals$3(existing, incoming) {
|
|
|
1607
1892
|
}
|
|
1608
1893
|
return true;
|
|
1609
1894
|
}
|
|
1610
|
-
const ingest$
|
|
1895
|
+
const ingest$1 = function NetworkDataCategoryCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1611
1896
|
if (process.env.NODE_ENV !== 'production') {
|
|
1612
|
-
const validateError = validate$
|
|
1897
|
+
const validateError = validate$2(input);
|
|
1613
1898
|
if (validateError !== null) {
|
|
1614
1899
|
throw validateError;
|
|
1615
1900
|
}
|
|
1616
1901
|
}
|
|
1617
1902
|
const key = path.fullPath;
|
|
1618
1903
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 900000;
|
|
1619
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1904
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "NetworkDataCategory", VERSION$1, RepresentationType$1, equals$1);
|
|
1620
1905
|
return createLink(key);
|
|
1621
1906
|
};
|
|
1622
|
-
function getTypeCacheKeys$
|
|
1907
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
1623
1908
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1624
1909
|
const rootKey = fullPathFactory();
|
|
1625
1910
|
rootKeySet.set(rootKey, {
|
|
1626
1911
|
namespace: keyPrefix,
|
|
1627
|
-
representationName: RepresentationType$
|
|
1912
|
+
representationName: RepresentationType$1,
|
|
1628
1913
|
mergeable: false
|
|
1629
1914
|
});
|
|
1630
1915
|
const input_networkDataCategories_length = input.networkDataCategories.length;
|
|
@@ -1633,22 +1918,22 @@ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
1633
1918
|
}
|
|
1634
1919
|
}
|
|
1635
1920
|
|
|
1636
|
-
function select$
|
|
1637
|
-
return select$
|
|
1921
|
+
function select$4(luvio, params) {
|
|
1922
|
+
return select$5();
|
|
1638
1923
|
}
|
|
1639
|
-
function keyBuilder$
|
|
1924
|
+
function keyBuilder$6(luvio, params) {
|
|
1640
1925
|
return keyPrefix + '::NetworkDataCategoryCollectionRepresentation:(' + 'language:' + params.queryParams.language + ',' + 'communityId:' + params.urlParams.communityId + ',' + 'networkDataCategoryId:' + params.urlParams.networkDataCategoryId + ')';
|
|
1641
1926
|
}
|
|
1642
1927
|
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
1643
|
-
getTypeCacheKeys$
|
|
1928
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$6(luvio, resourceParams));
|
|
1644
1929
|
}
|
|
1645
1930
|
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
1646
1931
|
const { body } = response;
|
|
1647
|
-
const key = keyBuilder$
|
|
1648
|
-
luvio.storeIngest(key, ingest$
|
|
1932
|
+
const key = keyBuilder$6(luvio, resourceParams);
|
|
1933
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
1649
1934
|
const snapshot = luvio.storeLookup({
|
|
1650
1935
|
recordId: key,
|
|
1651
|
-
node: select$
|
|
1936
|
+
node: select$4(),
|
|
1652
1937
|
variables: {},
|
|
1653
1938
|
}, snapshotRefresh);
|
|
1654
1939
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1660,7 +1945,7 @@ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1660
1945
|
return snapshot;
|
|
1661
1946
|
}
|
|
1662
1947
|
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
1663
|
-
const key = keyBuilder$
|
|
1948
|
+
const key = keyBuilder$6(luvio, params);
|
|
1664
1949
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1665
1950
|
luvio.storeIngestError(key, errorSnapshot);
|
|
1666
1951
|
return errorSnapshot;
|
|
@@ -1687,9 +1972,9 @@ const getParentNetworkDataCategoryPath_ConfigPropertyMetadata = [
|
|
|
1687
1972
|
];
|
|
1688
1973
|
const getParentNetworkDataCategoryPath_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getParentNetworkDataCategoryPath_ConfigPropertyMetadata);
|
|
1689
1974
|
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$8(getParentNetworkDataCategoryPath_ConfigPropertyMetadata);
|
|
1690
|
-
function keyBuilder$
|
|
1975
|
+
function keyBuilder$5(luvio, config) {
|
|
1691
1976
|
const resourceParams = createResourceParams$3(config);
|
|
1692
|
-
return keyBuilder$
|
|
1977
|
+
return keyBuilder$6(luvio, resourceParams);
|
|
1693
1978
|
}
|
|
1694
1979
|
function typeCheckConfig$3(untrustedConfig) {
|
|
1695
1980
|
const config = {};
|
|
@@ -1711,7 +1996,7 @@ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
|
1711
1996
|
}
|
|
1712
1997
|
function adapterFragment$2(luvio, config) {
|
|
1713
1998
|
createResourceParams$3(config);
|
|
1714
|
-
return select$
|
|
1999
|
+
return select$4();
|
|
1715
2000
|
}
|
|
1716
2001
|
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
1717
2002
|
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
@@ -1747,7 +2032,7 @@ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext
|
|
|
1747
2032
|
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
1748
2033
|
const { luvio, config } = context;
|
|
1749
2034
|
const selector = {
|
|
1750
|
-
recordId: keyBuilder$
|
|
2035
|
+
recordId: keyBuilder$5(luvio, config),
|
|
1751
2036
|
node: adapterFragment$2(luvio, config),
|
|
1752
2037
|
variables: {},
|
|
1753
2038
|
};
|
|
@@ -1767,22 +2052,22 @@ const getParentNetworkDataCategoryPathAdapterFactory = (luvio) => function Netwo
|
|
|
1767
2052
|
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
1768
2053
|
};
|
|
1769
2054
|
|
|
1770
|
-
function select$
|
|
1771
|
-
return select$
|
|
2055
|
+
function select$3(luvio, params) {
|
|
2056
|
+
return select$5();
|
|
1772
2057
|
}
|
|
1773
|
-
function keyBuilder$
|
|
2058
|
+
function keyBuilder$4(luvio, params) {
|
|
1774
2059
|
return keyPrefix + '::NetworkDataCategoryCollectionRepresentation:(' + 'language:' + params.queryParams.language + ',' + 'pageNumber:' + params.queryParams.pageNumber + ',' + 'pageSize:' + params.queryParams.pageSize + ',' + 'sortOrder:' + params.queryParams.sortOrder + ',' + 'sortedBy:' + params.queryParams.sortedBy + ',' + 'communityId:' + params.urlParams.communityId + ',' + 'networkDataCategoryId:' + params.urlParams.networkDataCategoryId + ')';
|
|
1775
2060
|
}
|
|
1776
2061
|
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
1777
|
-
getTypeCacheKeys$
|
|
2062
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$4(luvio, resourceParams));
|
|
1778
2063
|
}
|
|
1779
2064
|
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
1780
2065
|
const { body } = response;
|
|
1781
|
-
const key = keyBuilder$
|
|
1782
|
-
luvio.storeIngest(key, ingest$
|
|
2066
|
+
const key = keyBuilder$4(luvio, resourceParams);
|
|
2067
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
1783
2068
|
const snapshot = luvio.storeLookup({
|
|
1784
2069
|
recordId: key,
|
|
1785
|
-
node: select$
|
|
2070
|
+
node: select$3(),
|
|
1786
2071
|
variables: {},
|
|
1787
2072
|
}, snapshotRefresh);
|
|
1788
2073
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1794,7 +2079,7 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1794
2079
|
return snapshot;
|
|
1795
2080
|
}
|
|
1796
2081
|
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
1797
|
-
const key = keyBuilder$
|
|
2082
|
+
const key = keyBuilder$4(luvio, params);
|
|
1798
2083
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1799
2084
|
luvio.storeIngestError(key, errorSnapshot);
|
|
1800
2085
|
return errorSnapshot;
|
|
@@ -1825,9 +2110,9 @@ const getChildCategories_ConfigPropertyMetadata = [
|
|
|
1825
2110
|
];
|
|
1826
2111
|
const getChildCategories_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getChildCategories_ConfigPropertyMetadata);
|
|
1827
2112
|
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$8(getChildCategories_ConfigPropertyMetadata);
|
|
1828
|
-
function keyBuilder$
|
|
2113
|
+
function keyBuilder$3(luvio, config) {
|
|
1829
2114
|
const resourceParams = createResourceParams$2(config);
|
|
1830
|
-
return keyBuilder$
|
|
2115
|
+
return keyBuilder$4(luvio, resourceParams);
|
|
1831
2116
|
}
|
|
1832
2117
|
function typeCheckConfig$2(untrustedConfig) {
|
|
1833
2118
|
const config = {};
|
|
@@ -1849,7 +2134,7 @@ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
|
1849
2134
|
}
|
|
1850
2135
|
function adapterFragment$1(luvio, config) {
|
|
1851
2136
|
createResourceParams$2(config);
|
|
1852
|
-
return select$
|
|
2137
|
+
return select$3();
|
|
1853
2138
|
}
|
|
1854
2139
|
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
1855
2140
|
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
@@ -1885,7 +2170,7 @@ function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext
|
|
|
1885
2170
|
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
1886
2171
|
const { luvio, config } = context;
|
|
1887
2172
|
const selector = {
|
|
1888
|
-
recordId: keyBuilder$
|
|
2173
|
+
recordId: keyBuilder$3(luvio, config),
|
|
1889
2174
|
node: adapterFragment$1(luvio, config),
|
|
1890
2175
|
variables: {},
|
|
1891
2176
|
};
|
|
@@ -1905,242 +2190,21 @@ const getChildCategoriesAdapterFactory = (luvio) => function NetworkDataCategory
|
|
|
1905
2190
|
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
1906
2191
|
};
|
|
1907
2192
|
|
|
1908
|
-
const VERSION$2 = "15c619f1c41ed55ac3d19e24eb94542b";
|
|
1909
|
-
function validate$3(obj, path = 'NetworkDataCategoryGroupRepresentation') {
|
|
1910
|
-
const v_error = (() => {
|
|
1911
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1912
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1913
|
-
}
|
|
1914
|
-
const obj_categoryGroupName = obj.categoryGroupName;
|
|
1915
|
-
const path_categoryGroupName = path + '.categoryGroupName';
|
|
1916
|
-
if (typeof obj_categoryGroupName !== 'string') {
|
|
1917
|
-
return new TypeError('Expected "string" but received "' + typeof obj_categoryGroupName + '" (at "' + path_categoryGroupName + '")');
|
|
1918
|
-
}
|
|
1919
|
-
const obj_rootCategory = obj.rootCategory;
|
|
1920
|
-
const path_rootCategory = path + '.rootCategory';
|
|
1921
|
-
if (typeof obj_rootCategory !== 'object') {
|
|
1922
|
-
return new TypeError('Expected "object" but received "' + typeof obj_rootCategory + '" (at "' + path_rootCategory + '")');
|
|
1923
|
-
}
|
|
1924
|
-
})();
|
|
1925
|
-
return v_error === undefined ? null : v_error;
|
|
1926
|
-
}
|
|
1927
|
-
const RepresentationType$2 = 'NetworkDataCategoryGroupRepresentation';
|
|
1928
|
-
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
1929
|
-
const input_rootCategory = input.rootCategory;
|
|
1930
|
-
const input_rootCategory_id = path.fullPath + '__rootCategory';
|
|
1931
|
-
input.rootCategory = ingest$5(input_rootCategory, {
|
|
1932
|
-
fullPath: input_rootCategory_id,
|
|
1933
|
-
propertyName: 'rootCategory',
|
|
1934
|
-
parent: {
|
|
1935
|
-
data: input,
|
|
1936
|
-
key: path.fullPath,
|
|
1937
|
-
existing: existing,
|
|
1938
|
-
},
|
|
1939
|
-
ttl: path.ttl
|
|
1940
|
-
}, luvio, store, timestamp);
|
|
1941
|
-
return input;
|
|
1942
|
-
}
|
|
1943
|
-
const select$4 = function NetworkDataCategoryGroupRepresentationSelect() {
|
|
1944
|
-
return {
|
|
1945
|
-
kind: 'Fragment',
|
|
1946
|
-
version: VERSION$2,
|
|
1947
|
-
private: [],
|
|
1948
|
-
selections: [
|
|
1949
|
-
{
|
|
1950
|
-
name: 'categoryGroupName',
|
|
1951
|
-
kind: 'Scalar'
|
|
1952
|
-
},
|
|
1953
|
-
{
|
|
1954
|
-
name: 'rootCategory',
|
|
1955
|
-
kind: 'Link',
|
|
1956
|
-
fragment: select$d()
|
|
1957
|
-
}
|
|
1958
|
-
]
|
|
1959
|
-
};
|
|
1960
|
-
};
|
|
1961
|
-
function equals$2(existing, incoming) {
|
|
1962
|
-
const existing_categoryGroupName = existing.categoryGroupName;
|
|
1963
|
-
const incoming_categoryGroupName = incoming.categoryGroupName;
|
|
1964
|
-
if (!(existing_categoryGroupName === incoming_categoryGroupName)) {
|
|
1965
|
-
return false;
|
|
1966
|
-
}
|
|
1967
|
-
const existing_rootCategory = existing.rootCategory;
|
|
1968
|
-
const incoming_rootCategory = incoming.rootCategory;
|
|
1969
|
-
if (!(existing_rootCategory.__ref === incoming_rootCategory.__ref)) {
|
|
1970
|
-
return false;
|
|
1971
|
-
}
|
|
1972
|
-
return true;
|
|
1973
|
-
}
|
|
1974
|
-
const ingest$2 = function NetworkDataCategoryGroupRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1975
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1976
|
-
const validateError = validate$3(input);
|
|
1977
|
-
if (validateError !== null) {
|
|
1978
|
-
throw validateError;
|
|
1979
|
-
}
|
|
1980
|
-
}
|
|
1981
|
-
const key = path.fullPath;
|
|
1982
|
-
const ttlToUse = path.ttl !== undefined ? path.ttl : 900000;
|
|
1983
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "NetworkDataCategory", VERSION$2, RepresentationType$2, equals$2);
|
|
1984
|
-
return createLink(key);
|
|
1985
|
-
};
|
|
1986
|
-
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
1987
|
-
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1988
|
-
const rootKey = fullPathFactory();
|
|
1989
|
-
rootKeySet.set(rootKey, {
|
|
1990
|
-
namespace: keyPrefix,
|
|
1991
|
-
representationName: RepresentationType$2,
|
|
1992
|
-
mergeable: false
|
|
1993
|
-
});
|
|
1994
|
-
getTypeCacheKeys$5(rootKeySet, luvio, input.rootCategory);
|
|
1995
|
-
}
|
|
1996
|
-
|
|
1997
|
-
const VERSION$1 = "5e66b8759100556a58fea2ff97dab767";
|
|
1998
|
-
function validate$2(obj, path = 'NetworkDataCategoryTreeRepresentation') {
|
|
1999
|
-
const v_error = (() => {
|
|
2000
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2001
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2002
|
-
}
|
|
2003
|
-
const obj_communityId = obj.communityId;
|
|
2004
|
-
const path_communityId = path + '.communityId';
|
|
2005
|
-
if (typeof obj_communityId !== 'string') {
|
|
2006
|
-
return new TypeError('Expected "string" but received "' + typeof obj_communityId + '" (at "' + path_communityId + '")');
|
|
2007
|
-
}
|
|
2008
|
-
const obj_dataCategoryGroups = obj.dataCategoryGroups;
|
|
2009
|
-
const path_dataCategoryGroups = path + '.dataCategoryGroups';
|
|
2010
|
-
if (!ArrayIsArray(obj_dataCategoryGroups)) {
|
|
2011
|
-
return new TypeError('Expected "array" but received "' + typeof obj_dataCategoryGroups + '" (at "' + path_dataCategoryGroups + '")');
|
|
2012
|
-
}
|
|
2013
|
-
for (let i = 0; i < obj_dataCategoryGroups.length; i++) {
|
|
2014
|
-
const obj_dataCategoryGroups_item = obj_dataCategoryGroups[i];
|
|
2015
|
-
const path_dataCategoryGroups_item = path_dataCategoryGroups + '[' + i + ']';
|
|
2016
|
-
if (typeof obj_dataCategoryGroups_item !== 'object') {
|
|
2017
|
-
return new TypeError('Expected "object" but received "' + typeof obj_dataCategoryGroups_item + '" (at "' + path_dataCategoryGroups_item + '")');
|
|
2018
|
-
}
|
|
2019
|
-
}
|
|
2020
|
-
})();
|
|
2021
|
-
return v_error === undefined ? null : v_error;
|
|
2022
|
-
}
|
|
2023
|
-
const RepresentationType$1 = 'NetworkDataCategoryTreeRepresentation';
|
|
2024
|
-
function keyBuilder$3(luvio, config) {
|
|
2025
|
-
return keyPrefix + '::' + RepresentationType$1 + ':' + config.communityId;
|
|
2026
|
-
}
|
|
2027
|
-
function keyBuilderFromType$1(luvio, object) {
|
|
2028
|
-
const keyParams = {
|
|
2029
|
-
communityId: object.communityId
|
|
2030
|
-
};
|
|
2031
|
-
return keyBuilder$3(luvio, keyParams);
|
|
2032
|
-
}
|
|
2033
|
-
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
2034
|
-
const input_dataCategoryGroups = input.dataCategoryGroups;
|
|
2035
|
-
const input_dataCategoryGroups_id = path.fullPath + '__dataCategoryGroups';
|
|
2036
|
-
for (let i = 0; i < input_dataCategoryGroups.length; i++) {
|
|
2037
|
-
const input_dataCategoryGroups_item = input_dataCategoryGroups[i];
|
|
2038
|
-
let input_dataCategoryGroups_item_id = input_dataCategoryGroups_id + '__' + i;
|
|
2039
|
-
input_dataCategoryGroups[i] = ingest$2(input_dataCategoryGroups_item, {
|
|
2040
|
-
fullPath: input_dataCategoryGroups_item_id,
|
|
2041
|
-
propertyName: i,
|
|
2042
|
-
parent: {
|
|
2043
|
-
data: input,
|
|
2044
|
-
key: path.fullPath,
|
|
2045
|
-
existing: existing,
|
|
2046
|
-
},
|
|
2047
|
-
ttl: path.ttl
|
|
2048
|
-
}, luvio, store, timestamp);
|
|
2049
|
-
}
|
|
2050
|
-
return input;
|
|
2051
|
-
}
|
|
2052
|
-
const select$3 = function NetworkDataCategoryTreeRepresentationSelect() {
|
|
2053
|
-
return {
|
|
2054
|
-
kind: 'Fragment',
|
|
2055
|
-
version: VERSION$1,
|
|
2056
|
-
private: [],
|
|
2057
|
-
selections: [
|
|
2058
|
-
{
|
|
2059
|
-
name: 'communityId',
|
|
2060
|
-
kind: 'Scalar'
|
|
2061
|
-
},
|
|
2062
|
-
{
|
|
2063
|
-
name: 'dataCategoryGroups',
|
|
2064
|
-
kind: 'Link',
|
|
2065
|
-
plural: true,
|
|
2066
|
-
fragment: select$4()
|
|
2067
|
-
}
|
|
2068
|
-
]
|
|
2069
|
-
};
|
|
2070
|
-
};
|
|
2071
|
-
function equals$1(existing, incoming) {
|
|
2072
|
-
const existing_communityId = existing.communityId;
|
|
2073
|
-
const incoming_communityId = incoming.communityId;
|
|
2074
|
-
if (!(existing_communityId === incoming_communityId)) {
|
|
2075
|
-
return false;
|
|
2076
|
-
}
|
|
2077
|
-
const existing_dataCategoryGroups = existing.dataCategoryGroups;
|
|
2078
|
-
const incoming_dataCategoryGroups = incoming.dataCategoryGroups;
|
|
2079
|
-
const equals_dataCategoryGroups_items = equalsArray(existing_dataCategoryGroups, incoming_dataCategoryGroups, (existing_dataCategoryGroups_item, incoming_dataCategoryGroups_item) => {
|
|
2080
|
-
if (!(existing_dataCategoryGroups_item.__ref === incoming_dataCategoryGroups_item.__ref)) {
|
|
2081
|
-
return false;
|
|
2082
|
-
}
|
|
2083
|
-
});
|
|
2084
|
-
if (equals_dataCategoryGroups_items === false) {
|
|
2085
|
-
return false;
|
|
2086
|
-
}
|
|
2087
|
-
return true;
|
|
2088
|
-
}
|
|
2089
|
-
const ingest$1 = function NetworkDataCategoryTreeRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2090
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
2091
|
-
const validateError = validate$2(input);
|
|
2092
|
-
if (validateError !== null) {
|
|
2093
|
-
throw validateError;
|
|
2094
|
-
}
|
|
2095
|
-
}
|
|
2096
|
-
const key = keyBuilderFromType$1(luvio, input);
|
|
2097
|
-
const ttlToUse = path.ttl !== undefined ? path.ttl : 900000;
|
|
2098
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "NetworkDataCategory", VERSION$1, RepresentationType$1, equals$1);
|
|
2099
|
-
return createLink(key);
|
|
2100
|
-
};
|
|
2101
|
-
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
2102
|
-
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2103
|
-
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
2104
|
-
rootKeySet.set(rootKey, {
|
|
2105
|
-
namespace: keyPrefix,
|
|
2106
|
-
representationName: RepresentationType$1,
|
|
2107
|
-
mergeable: false
|
|
2108
|
-
});
|
|
2109
|
-
const input_dataCategoryGroups_length = input.dataCategoryGroups.length;
|
|
2110
|
-
for (let i = 0; i < input_dataCategoryGroups_length; i++) {
|
|
2111
|
-
getTypeCacheKeys$2(rootKeySet, luvio, input.dataCategoryGroups[i], () => '');
|
|
2112
|
-
}
|
|
2113
|
-
}
|
|
2114
|
-
const notifyUpdateAvailableFactory = (luvio) => {
|
|
2115
|
-
return function notifyNetworkDataCategoryTreeRepresentationUpdateAvailable(configs) {
|
|
2116
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
2117
|
-
const requiredKeyParams = ['communityId'];
|
|
2118
|
-
configs.forEach(config => {
|
|
2119
|
-
if (false === requiredKeyParams.every(req => req in config)) {
|
|
2120
|
-
throw new Error(`one of the configs did not contain all required parameters: ${JSONStringify(ObjectKeys(config))}`);
|
|
2121
|
-
}
|
|
2122
|
-
});
|
|
2123
|
-
}
|
|
2124
|
-
const keys = configs.map(c => keyBuilder$3(luvio, c));
|
|
2125
|
-
return luvio.notifyStoreUpdateAvailable(keys);
|
|
2126
|
-
};
|
|
2127
|
-
};
|
|
2128
|
-
|
|
2129
2193
|
function select$2(luvio, params) {
|
|
2130
|
-
return select$
|
|
2194
|
+
return select$a();
|
|
2131
2195
|
}
|
|
2132
2196
|
function keyBuilder$2(luvio, params) {
|
|
2133
|
-
return keyBuilder$
|
|
2197
|
+
return keyBuilder$b(luvio, {
|
|
2134
2198
|
communityId: params.urlParams.communityId
|
|
2135
2199
|
});
|
|
2136
2200
|
}
|
|
2137
2201
|
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
2138
|
-
getTypeCacheKeys$
|
|
2202
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response);
|
|
2139
2203
|
}
|
|
2140
2204
|
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
2141
2205
|
const { body } = response;
|
|
2142
2206
|
const key = keyBuilder$2(luvio, resourceParams);
|
|
2143
|
-
luvio.storeIngest(key, ingest$
|
|
2207
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
2144
2208
|
const snapshot = luvio.storeLookup({
|
|
2145
2209
|
recordId: key,
|
|
2146
2210
|
node: select$2(),
|
|
@@ -2447,4 +2511,4 @@ const updateNetworkDataCategoriesAdapterFactory = (luvio) => {
|
|
|
2447
2511
|
};
|
|
2448
2512
|
};
|
|
2449
2513
|
|
|
2450
|
-
export { getArticlesForCategoryAdapterFactory, getChildCategoriesAdapterFactory, getNetworkDataCategoriesAdapterFactory, getParentNetworkDataCategoryPathAdapterFactory, getServiceCatalogItemsAdapterFactory, getServiceCatalogItemsForCommunityAdapterFactory, notifyUpdateAvailableFactory
|
|
2514
|
+
export { getArticlesForCategoryAdapterFactory, getChildCategoriesAdapterFactory, getNetworkDataCategoriesAdapterFactory, getParentNetworkDataCategoryPathAdapterFactory, getServiceCatalogItemsAdapterFactory, getServiceCatalogItemsForCommunityAdapterFactory, notifyUpdateAvailableFactory as notifyNetworkDataCategoryTreeRepresentationUpdateAvailableFactory, updateNetworkDataCategoriesAdapterFactory, updateNetworkDataCategoryAdapterFactory };
|