@salesforce/lds-adapters-cdp-personalization-service 1.380.0-dev2 → 1.380.0-dev20
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/cdp-personalization-service.js +1636 -547
- package/dist/es/es2018/types/src/generated/adapters/createPersonalizationExperiencesConfig.d.ts +25 -0
- package/dist/es/es2018/types/src/generated/adapters/deletePersonalizationExperienceConfig.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/adapters/getPersonalizationExperienceConfig.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/adapters/getPersonalizationExperiencesConfigs.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/adapters/updatePersonalizationExperienceConfig.d.ts +26 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +5 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +9 -1
- package/dist/es/es2018/types/src/generated/resources/deletePersonalizationExternalAppsPersonalizationExperienceConfigsByIdOrAppSourceIdOrNameAndNameParam.d.ts +13 -0
- package/dist/es/es2018/types/src/generated/resources/getPersonalizationExternalAppsPersonalizationExperienceConfigsByIdOrAppSourceIdOrName.d.ts +19 -0
- package/dist/es/es2018/types/src/generated/resources/getPersonalizationExternalAppsPersonalizationExperienceConfigsByIdOrAppSourceIdOrNameAndNameParam.d.ts +17 -0
- package/dist/es/es2018/types/src/generated/resources/postPersonalizationExternalAppsPersonalizationExperienceConfigsByIdOrAppSourceIdOrName.d.ts +24 -0
- package/dist/es/es2018/types/src/generated/resources/putPersonalizationExternalAppsPersonalizationExperienceConfigsByIdOrAppSourceIdOrNameAndNameParam.d.ts +25 -0
- package/dist/es/es2018/types/src/generated/types/PersonalizationExperienceConfigCollectionInputRepresentation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/PersonalizationExperienceConfigCollectionRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/PersonalizationExperienceConfigInputRepresentation.d.ts +56 -0
- package/dist/es/es2018/types/src/generated/types/PersonalizationExperienceConfigRepresentation.d.ts +77 -0
- package/dist/es/es2018/types/src/generated/types/PersonalizationPaginatedResponseBaseRepresentation.d.ts +35 -0
- package/dist/es/es2018/types/src/raml-artifacts/resources/deletePersonalizationExternalAppsPersonalizationExperienceConfigsByIdOrAppSourceIdOrNameAndNameParam/createResourceRequest.d.ts +3 -0
- package/dist/es/es2018/types/src/raml-artifacts/resources/getPersonalizationExternalAppsPersonalizationExperienceConfigsByIdOrAppSourceIdOrNameAndNameParam/createResourceRequest.d.ts +3 -0
- package/dist/es/es2018/types/src/raml-artifacts/resources/putPersonalizationExternalAppsPersonalizationExperienceConfigsByIdOrAppSourceIdOrNameAndNameParam/createResourceRequest.d.ts +3 -0
- package/package.json +15 -4
- package/sfdc/index.js +3672 -2506
- package/src/raml/api.raml +214 -0
- package/src/raml/luvio.raml +35 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$f, typeCheckConfig as typeCheckConfig$f, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$7 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -148,7 +148,7 @@ function createLink(ref) {
|
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
function validate$
|
|
151
|
+
function validate$n(obj, path = 'PersonalizationAttributeValueInputRepresentation') {
|
|
152
152
|
const v_error = (() => {
|
|
153
153
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
154
154
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -239,7 +239,7 @@ function validate$k(obj, path = 'PersonalizationAttributeValueInputRepresentatio
|
|
|
239
239
|
return v_error === undefined ? null : v_error;
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
-
function validate$
|
|
242
|
+
function validate$m(obj, path = 'PersonalizationDecisionInputRepresentation') {
|
|
243
243
|
const v_error = (() => {
|
|
244
244
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
245
245
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -253,7 +253,7 @@ function validate$j(obj, path = 'PersonalizationDecisionInputRepresentation') {
|
|
|
253
253
|
for (let i = 0; i < obj_attributeValues.length; i++) {
|
|
254
254
|
const obj_attributeValues_item = obj_attributeValues[i];
|
|
255
255
|
const path_attributeValues_item = path_attributeValues + '[' + i + ']';
|
|
256
|
-
const referencepath_attributeValues_itemValidationError = validate$
|
|
256
|
+
const referencepath_attributeValues_itemValidationError = validate$n(obj_attributeValues_item, path_attributeValues_item);
|
|
257
257
|
if (referencepath_attributeValues_itemValidationError !== null) {
|
|
258
258
|
let message = 'Object doesn\'t match PersonalizationAttributeValueInputRepresentation (at "' + path_attributeValues_item + '")\n';
|
|
259
259
|
message += referencepath_attributeValues_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -427,8 +427,8 @@ function validate$j(obj, path = 'PersonalizationDecisionInputRepresentation') {
|
|
|
427
427
|
return v_error === undefined ? null : v_error;
|
|
428
428
|
}
|
|
429
429
|
|
|
430
|
-
const VERSION$
|
|
431
|
-
function validate$
|
|
430
|
+
const VERSION$e = "52ea9c14b7a747a28cedbcff0e7ab169";
|
|
431
|
+
function validate$l(obj, path = 'PersonalizationAttributeValueRepresentation') {
|
|
432
432
|
const v_error = (() => {
|
|
433
433
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
434
434
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -514,10 +514,10 @@ function validate$i(obj, path = 'PersonalizationAttributeValueRepresentation') {
|
|
|
514
514
|
})();
|
|
515
515
|
return v_error === undefined ? null : v_error;
|
|
516
516
|
}
|
|
517
|
-
const select$
|
|
517
|
+
const select$q = function PersonalizationAttributeValueRepresentationSelect() {
|
|
518
518
|
return {
|
|
519
519
|
kind: 'Fragment',
|
|
520
|
-
version: VERSION$
|
|
520
|
+
version: VERSION$e,
|
|
521
521
|
private: [],
|
|
522
522
|
selections: [
|
|
523
523
|
{
|
|
@@ -535,7 +535,7 @@ const select$k = function PersonalizationAttributeValueRepresentationSelect() {
|
|
|
535
535
|
]
|
|
536
536
|
};
|
|
537
537
|
};
|
|
538
|
-
function equals$
|
|
538
|
+
function equals$f(existing, incoming) {
|
|
539
539
|
const existing_attributeEnum = existing.attributeEnum;
|
|
540
540
|
const incoming_attributeEnum = incoming.attributeEnum;
|
|
541
541
|
if (!(existing_attributeEnum === incoming_attributeEnum)) {
|
|
@@ -554,7 +554,7 @@ function equals$c(existing, incoming) {
|
|
|
554
554
|
return true;
|
|
555
555
|
}
|
|
556
556
|
|
|
557
|
-
function validate$
|
|
557
|
+
function validate$k(obj, path = 'FiltersWrapRepresentation') {
|
|
558
558
|
const v_error = (() => {
|
|
559
559
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
560
560
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -633,7 +633,7 @@ function validate$h(obj, path = 'FiltersWrapRepresentation') {
|
|
|
633
633
|
return v_error === undefined ? null : v_error;
|
|
634
634
|
}
|
|
635
635
|
|
|
636
|
-
function validate$
|
|
636
|
+
function validate$j(obj, path = 'SubjectRepresentation') {
|
|
637
637
|
const v_error = (() => {
|
|
638
638
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
639
639
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -752,8 +752,8 @@ function validate$g(obj, path = 'SubjectRepresentation') {
|
|
|
752
752
|
return v_error === undefined ? null : v_error;
|
|
753
753
|
}
|
|
754
754
|
|
|
755
|
-
const VERSION$
|
|
756
|
-
function validate$
|
|
755
|
+
const VERSION$d = "089c2877ffa367e376fe74f8d358ffa8";
|
|
756
|
+
function validate$i(obj, path = 'FilterRepresentation') {
|
|
757
757
|
const v_error = (() => {
|
|
758
758
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
759
759
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -791,7 +791,7 @@ function validate$f(obj, path = 'FilterRepresentation') {
|
|
|
791
791
|
const path_comparison = path + '.comparison';
|
|
792
792
|
let obj_comparison_union0 = null;
|
|
793
793
|
const obj_comparison_union0_error = (() => {
|
|
794
|
-
const referencepath_comparisonValidationError = validate$
|
|
794
|
+
const referencepath_comparisonValidationError = validate$i(obj_comparison, path_comparison);
|
|
795
795
|
if (referencepath_comparisonValidationError !== null) {
|
|
796
796
|
let message = 'Object doesn\'t match FilterRepresentation (at "' + path_comparison + '")\n';
|
|
797
797
|
message += referencepath_comparisonValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -822,7 +822,7 @@ function validate$f(obj, path = 'FilterRepresentation') {
|
|
|
822
822
|
const path_filter = path + '.filter';
|
|
823
823
|
let obj_filter_union0 = null;
|
|
824
824
|
const obj_filter_union0_error = (() => {
|
|
825
|
-
const referencepath_filterValidationError = validate$
|
|
825
|
+
const referencepath_filterValidationError = validate$k(obj_filter, path_filter);
|
|
826
826
|
if (referencepath_filterValidationError !== null) {
|
|
827
827
|
let message = 'Object doesn\'t match FiltersWrapRepresentation (at "' + path_filter + '")\n';
|
|
828
828
|
message += referencepath_filterValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -859,7 +859,7 @@ function validate$f(obj, path = 'FilterRepresentation') {
|
|
|
859
859
|
const path_filters_item = path_filters + '[' + i + ']';
|
|
860
860
|
let obj_filters_item_union0 = null;
|
|
861
861
|
const obj_filters_item_union0_error = (() => {
|
|
862
|
-
const referencepath_filters_itemValidationError = validate$
|
|
862
|
+
const referencepath_filters_itemValidationError = validate$i(obj_filters_item, path_filters_item);
|
|
863
863
|
if (referencepath_filters_itemValidationError !== null) {
|
|
864
864
|
let message = 'Object doesn\'t match FilterRepresentation (at "' + path_filters_item + '")\n';
|
|
865
865
|
message += referencepath_filters_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -919,7 +919,7 @@ function validate$f(obj, path = 'FilterRepresentation') {
|
|
|
919
919
|
const path_metric = path + '.metric';
|
|
920
920
|
let obj_metric_union0 = null;
|
|
921
921
|
const obj_metric_union0_error = (() => {
|
|
922
|
-
const referencepath_metricValidationError = validate$
|
|
922
|
+
const referencepath_metricValidationError = validate$j(obj_metric, path_metric);
|
|
923
923
|
if (referencepath_metricValidationError !== null) {
|
|
924
924
|
let message = 'Object doesn\'t match SubjectRepresentation (at "' + path_metric + '")\n';
|
|
925
925
|
message += referencepath_metricValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -988,7 +988,7 @@ function validate$f(obj, path = 'FilterRepresentation') {
|
|
|
988
988
|
for (let i = 0; i < obj_path_item.length; i++) {
|
|
989
989
|
const obj_path_item_item = obj_path_item[i];
|
|
990
990
|
const path_path_item_item = path_path_item + '[' + i + ']';
|
|
991
|
-
const referencepath_path_item_itemValidationError = validate$
|
|
991
|
+
const referencepath_path_item_itemValidationError = validate$j(obj_path_item_item, path_path_item_item);
|
|
992
992
|
if (referencepath_path_item_itemValidationError !== null) {
|
|
993
993
|
let message = 'Object doesn\'t match SubjectRepresentation (at "' + path_path_item_item + '")\n';
|
|
994
994
|
message += referencepath_path_item_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1086,7 +1086,7 @@ function validate$f(obj, path = 'FilterRepresentation') {
|
|
|
1086
1086
|
const path_subject = path + '.subject';
|
|
1087
1087
|
let obj_subject_union0 = null;
|
|
1088
1088
|
const obj_subject_union0_error = (() => {
|
|
1089
|
-
const referencepath_subjectValidationError = validate$
|
|
1089
|
+
const referencepath_subjectValidationError = validate$j(obj_subject, path_subject);
|
|
1090
1090
|
if (referencepath_subjectValidationError !== null) {
|
|
1091
1091
|
let message = 'Object doesn\'t match SubjectRepresentation (at "' + path_subject + '")\n';
|
|
1092
1092
|
message += referencepath_subjectValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1185,48 +1185,48 @@ function validate$f(obj, path = 'FilterRepresentation') {
|
|
|
1185
1185
|
})();
|
|
1186
1186
|
return v_error === undefined ? null : v_error;
|
|
1187
1187
|
}
|
|
1188
|
-
const RepresentationType$
|
|
1189
|
-
function normalize$
|
|
1188
|
+
const RepresentationType$9 = 'FilterRepresentation';
|
|
1189
|
+
function normalize$9(input, existing, path, luvio, store, timestamp) {
|
|
1190
1190
|
return input;
|
|
1191
1191
|
}
|
|
1192
|
-
const select$
|
|
1192
|
+
const select$p = function FilterRepresentationSelect() {
|
|
1193
1193
|
return {
|
|
1194
1194
|
kind: 'Fragment',
|
|
1195
|
-
version: VERSION$
|
|
1195
|
+
version: VERSION$d,
|
|
1196
1196
|
private: [],
|
|
1197
1197
|
opaque: true
|
|
1198
1198
|
};
|
|
1199
1199
|
};
|
|
1200
|
-
function equals$
|
|
1200
|
+
function equals$e(existing, incoming) {
|
|
1201
1201
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1202
1202
|
return false;
|
|
1203
1203
|
}
|
|
1204
1204
|
return true;
|
|
1205
1205
|
}
|
|
1206
|
-
const ingest$
|
|
1206
|
+
const ingest$9 = function FilterRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1207
1207
|
if (process.env.NODE_ENV !== 'production') {
|
|
1208
|
-
const validateError = validate$
|
|
1208
|
+
const validateError = validate$i(input);
|
|
1209
1209
|
if (validateError !== null) {
|
|
1210
1210
|
throw validateError;
|
|
1211
1211
|
}
|
|
1212
1212
|
}
|
|
1213
1213
|
const key = path.fullPath;
|
|
1214
1214
|
const ttlToUse = path.ttl;
|
|
1215
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1215
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$9, "personalization-service", VERSION$d, RepresentationType$9, equals$e);
|
|
1216
1216
|
return createLink(key);
|
|
1217
1217
|
};
|
|
1218
|
-
function getTypeCacheKeys$
|
|
1218
|
+
function getTypeCacheKeys$9(rootKeySet, luvio, input, fullPathFactory) {
|
|
1219
1219
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1220
1220
|
const rootKey = fullPathFactory();
|
|
1221
1221
|
rootKeySet.set(rootKey, {
|
|
1222
1222
|
namespace: keyPrefix,
|
|
1223
|
-
representationName: RepresentationType$
|
|
1223
|
+
representationName: RepresentationType$9,
|
|
1224
1224
|
mergeable: false
|
|
1225
1225
|
});
|
|
1226
1226
|
}
|
|
1227
1227
|
|
|
1228
|
-
const VERSION$
|
|
1229
|
-
function validate$
|
|
1228
|
+
const VERSION$c = "ea475f10b4c028f8b97a44af1cf0be14";
|
|
1229
|
+
function validate$h(obj, path = 'CriteriaRepresentation') {
|
|
1230
1230
|
const v_error = (() => {
|
|
1231
1231
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1232
1232
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1256,14 +1256,14 @@ function validate$e(obj, path = 'CriteriaRepresentation') {
|
|
|
1256
1256
|
})();
|
|
1257
1257
|
return v_error === undefined ? null : v_error;
|
|
1258
1258
|
}
|
|
1259
|
-
const RepresentationType$
|
|
1260
|
-
function normalize$
|
|
1259
|
+
const RepresentationType$8 = 'CriteriaRepresentation';
|
|
1260
|
+
function normalize$8(input, existing, path, luvio, store, timestamp) {
|
|
1261
1261
|
const input_filters = input.filters;
|
|
1262
1262
|
const input_filters_id = path.fullPath + '__filters';
|
|
1263
1263
|
for (let i = 0; i < input_filters.length; i++) {
|
|
1264
1264
|
const input_filters_item = input_filters[i];
|
|
1265
1265
|
let input_filters_item_id = input_filters_id + '__' + i;
|
|
1266
|
-
input_filters[i] = ingest$
|
|
1266
|
+
input_filters[i] = ingest$9(input_filters_item, {
|
|
1267
1267
|
fullPath: input_filters_item_id,
|
|
1268
1268
|
propertyName: i,
|
|
1269
1269
|
parent: {
|
|
@@ -1276,17 +1276,17 @@ function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
|
1276
1276
|
}
|
|
1277
1277
|
return input;
|
|
1278
1278
|
}
|
|
1279
|
-
const select$
|
|
1279
|
+
const select$o = function CriteriaRepresentationSelect() {
|
|
1280
1280
|
return {
|
|
1281
1281
|
kind: 'Fragment',
|
|
1282
|
-
version: VERSION$
|
|
1282
|
+
version: VERSION$c,
|
|
1283
1283
|
private: [],
|
|
1284
1284
|
selections: [
|
|
1285
1285
|
{
|
|
1286
1286
|
name: 'filters',
|
|
1287
1287
|
kind: 'Link',
|
|
1288
1288
|
plural: true,
|
|
1289
|
-
fragment: select$
|
|
1289
|
+
fragment: select$p()
|
|
1290
1290
|
},
|
|
1291
1291
|
{
|
|
1292
1292
|
name: 'operator',
|
|
@@ -1299,7 +1299,7 @@ const select$i = function CriteriaRepresentationSelect() {
|
|
|
1299
1299
|
]
|
|
1300
1300
|
};
|
|
1301
1301
|
};
|
|
1302
|
-
function equals$
|
|
1302
|
+
function equals$d(existing, incoming) {
|
|
1303
1303
|
const existing_operator = existing.operator;
|
|
1304
1304
|
const incoming_operator = incoming.operator;
|
|
1305
1305
|
if (!(existing_operator === incoming_operator)) {
|
|
@@ -1322,34 +1322,34 @@ function equals$a(existing, incoming) {
|
|
|
1322
1322
|
}
|
|
1323
1323
|
return true;
|
|
1324
1324
|
}
|
|
1325
|
-
const ingest$
|
|
1325
|
+
const ingest$8 = function CriteriaRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1326
1326
|
if (process.env.NODE_ENV !== 'production') {
|
|
1327
|
-
const validateError = validate$
|
|
1327
|
+
const validateError = validate$h(input);
|
|
1328
1328
|
if (validateError !== null) {
|
|
1329
1329
|
throw validateError;
|
|
1330
1330
|
}
|
|
1331
1331
|
}
|
|
1332
1332
|
const key = path.fullPath;
|
|
1333
1333
|
const ttlToUse = path.ttl;
|
|
1334
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1334
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$8, "personalization-service", VERSION$c, RepresentationType$8, equals$d);
|
|
1335
1335
|
return createLink(key);
|
|
1336
1336
|
};
|
|
1337
|
-
function getTypeCacheKeys$
|
|
1337
|
+
function getTypeCacheKeys$8(rootKeySet, luvio, input, fullPathFactory) {
|
|
1338
1338
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1339
1339
|
const rootKey = fullPathFactory();
|
|
1340
1340
|
rootKeySet.set(rootKey, {
|
|
1341
1341
|
namespace: keyPrefix,
|
|
1342
|
-
representationName: RepresentationType$
|
|
1342
|
+
representationName: RepresentationType$8,
|
|
1343
1343
|
mergeable: false
|
|
1344
1344
|
});
|
|
1345
1345
|
const input_filters_length = input.filters.length;
|
|
1346
1346
|
for (let i = 0; i < input_filters_length; i++) {
|
|
1347
|
-
getTypeCacheKeys$
|
|
1347
|
+
getTypeCacheKeys$9(rootKeySet, luvio, input.filters[i], () => '');
|
|
1348
1348
|
}
|
|
1349
1349
|
}
|
|
1350
1350
|
|
|
1351
|
-
const VERSION$
|
|
1352
|
-
function validate$
|
|
1351
|
+
const VERSION$b = "265767af783b296f5f902d6ed447b168";
|
|
1352
|
+
function validate$g(obj, path = 'PersonalizationDecisionRepresentation') {
|
|
1353
1353
|
const v_error = (() => {
|
|
1354
1354
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1355
1355
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1362,7 +1362,7 @@ function validate$d(obj, path = 'PersonalizationDecisionRepresentation') {
|
|
|
1362
1362
|
for (let i = 0; i < obj_attributeValues.length; i++) {
|
|
1363
1363
|
const obj_attributeValues_item = obj_attributeValues[i];
|
|
1364
1364
|
const path_attributeValues_item = path_attributeValues + '[' + i + ']';
|
|
1365
|
-
const referencepath_attributeValues_itemValidationError = validate$
|
|
1365
|
+
const referencepath_attributeValues_itemValidationError = validate$l(obj_attributeValues_item, path_attributeValues_item);
|
|
1366
1366
|
if (referencepath_attributeValues_itemValidationError !== null) {
|
|
1367
1367
|
let message = 'Object doesn\'t match PersonalizationAttributeValueRepresentation (at "' + path_attributeValues_item + '")\n';
|
|
1368
1368
|
message += referencepath_attributeValues_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1684,12 +1684,12 @@ function validate$d(obj, path = 'PersonalizationDecisionRepresentation') {
|
|
|
1684
1684
|
})();
|
|
1685
1685
|
return v_error === undefined ? null : v_error;
|
|
1686
1686
|
}
|
|
1687
|
-
const RepresentationType$
|
|
1688
|
-
function normalize$
|
|
1687
|
+
const RepresentationType$7 = 'PersonalizationDecisionRepresentation';
|
|
1688
|
+
function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
1689
1689
|
const input_criteria = input.criteria;
|
|
1690
1690
|
const input_criteria_id = path.fullPath + '__criteria';
|
|
1691
1691
|
if (!Array.isArray(input_criteria) && input_criteria !== null && typeof input_criteria === 'object') {
|
|
1692
|
-
input.criteria = ingest$
|
|
1692
|
+
input.criteria = ingest$8(input_criteria, {
|
|
1693
1693
|
fullPath: input_criteria_id,
|
|
1694
1694
|
propertyName: 'criteria',
|
|
1695
1695
|
parent: {
|
|
@@ -1702,11 +1702,11 @@ function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
|
1702
1702
|
}
|
|
1703
1703
|
return input;
|
|
1704
1704
|
}
|
|
1705
|
-
const select$
|
|
1706
|
-
const { selections: PersonalizationAttributeValueRepresentation__selections, opaque: PersonalizationAttributeValueRepresentation__opaque, } = select$
|
|
1705
|
+
const select$n = function PersonalizationDecisionRepresentationSelect() {
|
|
1706
|
+
const { selections: PersonalizationAttributeValueRepresentation__selections, opaque: PersonalizationAttributeValueRepresentation__opaque, } = select$q();
|
|
1707
1707
|
return {
|
|
1708
1708
|
kind: 'Fragment',
|
|
1709
|
-
version: VERSION$
|
|
1709
|
+
version: VERSION$b,
|
|
1710
1710
|
private: [],
|
|
1711
1711
|
selections: [
|
|
1712
1712
|
{
|
|
@@ -1727,7 +1727,7 @@ const select$h = function PersonalizationDecisionRepresentationSelect() {
|
|
|
1727
1727
|
name: 'criteria',
|
|
1728
1728
|
kind: 'Link',
|
|
1729
1729
|
nullable: true,
|
|
1730
|
-
fragment: select$
|
|
1730
|
+
fragment: select$o()
|
|
1731
1731
|
},
|
|
1732
1732
|
{
|
|
1733
1733
|
name: 'description',
|
|
@@ -1768,11 +1768,11 @@ const select$h = function PersonalizationDecisionRepresentationSelect() {
|
|
|
1768
1768
|
]
|
|
1769
1769
|
};
|
|
1770
1770
|
};
|
|
1771
|
-
function equals$
|
|
1771
|
+
function equals$c(existing, incoming) {
|
|
1772
1772
|
const existing_attributeValues = existing.attributeValues;
|
|
1773
1773
|
const incoming_attributeValues = incoming.attributeValues;
|
|
1774
1774
|
const equals_attributeValues_items = equalsArray(existing_attributeValues, incoming_attributeValues, (existing_attributeValues_item, incoming_attributeValues_item) => {
|
|
1775
|
-
if (!(equals$
|
|
1775
|
+
if (!(equals$f(existing_attributeValues_item, incoming_attributeValues_item))) {
|
|
1776
1776
|
return false;
|
|
1777
1777
|
}
|
|
1778
1778
|
});
|
|
@@ -1846,34 +1846,34 @@ function equals$9(existing, incoming) {
|
|
|
1846
1846
|
}
|
|
1847
1847
|
return true;
|
|
1848
1848
|
}
|
|
1849
|
-
const ingest$
|
|
1849
|
+
const ingest$7 = function PersonalizationDecisionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1850
1850
|
if (process.env.NODE_ENV !== 'production') {
|
|
1851
|
-
const validateError = validate$
|
|
1851
|
+
const validateError = validate$g(input);
|
|
1852
1852
|
if (validateError !== null) {
|
|
1853
1853
|
throw validateError;
|
|
1854
1854
|
}
|
|
1855
1855
|
}
|
|
1856
1856
|
const key = path.fullPath;
|
|
1857
1857
|
const ttlToUse = path.ttl;
|
|
1858
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1858
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$7, "personalization-service", VERSION$b, RepresentationType$7, equals$c);
|
|
1859
1859
|
return createLink(key);
|
|
1860
1860
|
};
|
|
1861
|
-
function getTypeCacheKeys$
|
|
1861
|
+
function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
|
|
1862
1862
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1863
1863
|
const rootKey = fullPathFactory();
|
|
1864
1864
|
rootKeySet.set(rootKey, {
|
|
1865
1865
|
namespace: keyPrefix,
|
|
1866
|
-
representationName: RepresentationType$
|
|
1866
|
+
representationName: RepresentationType$7,
|
|
1867
1867
|
mergeable: false
|
|
1868
1868
|
});
|
|
1869
1869
|
if (!Array.isArray(input.criteria) && input.criteria !== null && typeof input.criteria === 'object') {
|
|
1870
|
-
getTypeCacheKeys$
|
|
1870
|
+
getTypeCacheKeys$8(rootKeySet, luvio, input.criteria, () => rootKey + "__" + "criteria");
|
|
1871
1871
|
}
|
|
1872
1872
|
}
|
|
1873
1873
|
|
|
1874
|
-
const TTL$
|
|
1875
|
-
const VERSION$
|
|
1876
|
-
function validate$
|
|
1874
|
+
const TTL$7 = 600;
|
|
1875
|
+
const VERSION$a = "e5643ca13ef54c890c9177275a053de3";
|
|
1876
|
+
function validate$f(obj, path = 'PersonalizationPointRepresentation') {
|
|
1877
1877
|
const v_error = (() => {
|
|
1878
1878
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1879
1879
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2350,23 +2350,23 @@ function validate$c(obj, path = 'PersonalizationPointRepresentation') {
|
|
|
2350
2350
|
})();
|
|
2351
2351
|
return v_error === undefined ? null : v_error;
|
|
2352
2352
|
}
|
|
2353
|
-
const RepresentationType$
|
|
2354
|
-
function keyBuilder$
|
|
2355
|
-
return keyPrefix + '::' + RepresentationType$
|
|
2353
|
+
const RepresentationType$6 = 'PersonalizationPointRepresentation';
|
|
2354
|
+
function keyBuilder$j(luvio, config) {
|
|
2355
|
+
return keyPrefix + '::' + RepresentationType$6 + ':' + (config.id === null ? '' : config.id);
|
|
2356
2356
|
}
|
|
2357
|
-
function keyBuilderFromType$
|
|
2357
|
+
function keyBuilderFromType$2(luvio, object) {
|
|
2358
2358
|
const keyParams = {
|
|
2359
2359
|
id: object.name
|
|
2360
2360
|
};
|
|
2361
|
-
return keyBuilder$
|
|
2361
|
+
return keyBuilder$j(luvio, keyParams);
|
|
2362
2362
|
}
|
|
2363
|
-
function normalize$
|
|
2363
|
+
function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
2364
2364
|
const input_decisions = input.decisions;
|
|
2365
2365
|
const input_decisions_id = path.fullPath + '__decisions';
|
|
2366
2366
|
for (let i = 0; i < input_decisions.length; i++) {
|
|
2367
2367
|
const input_decisions_item = input_decisions[i];
|
|
2368
2368
|
let input_decisions_item_id = input_decisions_id + '__' + i;
|
|
2369
|
-
input_decisions[i] = ingest$
|
|
2369
|
+
input_decisions[i] = ingest$7(input_decisions_item, {
|
|
2370
2370
|
fullPath: input_decisions_item_id,
|
|
2371
2371
|
propertyName: i,
|
|
2372
2372
|
parent: {
|
|
@@ -2379,10 +2379,10 @@ function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
|
2379
2379
|
}
|
|
2380
2380
|
return input;
|
|
2381
2381
|
}
|
|
2382
|
-
const select$
|
|
2382
|
+
const select$m = function PersonalizationPointRepresentationSelect() {
|
|
2383
2383
|
return {
|
|
2384
2384
|
kind: 'Fragment',
|
|
2385
|
-
version: VERSION$
|
|
2385
|
+
version: VERSION$a,
|
|
2386
2386
|
private: [],
|
|
2387
2387
|
selections: [
|
|
2388
2388
|
{
|
|
@@ -2405,7 +2405,7 @@ const select$g = function PersonalizationPointRepresentationSelect() {
|
|
|
2405
2405
|
name: 'decisions',
|
|
2406
2406
|
kind: 'Link',
|
|
2407
2407
|
plural: true,
|
|
2408
|
-
fragment: select$
|
|
2408
|
+
fragment: select$n()
|
|
2409
2409
|
},
|
|
2410
2410
|
{
|
|
2411
2411
|
name: 'description',
|
|
@@ -2474,7 +2474,7 @@ const select$g = function PersonalizationPointRepresentationSelect() {
|
|
|
2474
2474
|
]
|
|
2475
2475
|
};
|
|
2476
2476
|
};
|
|
2477
|
-
function equals$
|
|
2477
|
+
function equals$b(existing, incoming) {
|
|
2478
2478
|
const existing_isAuthenticationRequired = existing.isAuthenticationRequired;
|
|
2479
2479
|
const incoming_isAuthenticationRequired = incoming.isAuthenticationRequired;
|
|
2480
2480
|
if (!(existing_isAuthenticationRequired === incoming_isAuthenticationRequired)) {
|
|
@@ -2587,45 +2587,45 @@ function equals$8(existing, incoming) {
|
|
|
2587
2587
|
}
|
|
2588
2588
|
return true;
|
|
2589
2589
|
}
|
|
2590
|
-
const ingest$
|
|
2590
|
+
const ingest$6 = function PersonalizationPointRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2591
2591
|
if (process.env.NODE_ENV !== 'production') {
|
|
2592
|
-
const validateError = validate$
|
|
2592
|
+
const validateError = validate$f(input);
|
|
2593
2593
|
if (validateError !== null) {
|
|
2594
2594
|
throw validateError;
|
|
2595
2595
|
}
|
|
2596
2596
|
}
|
|
2597
|
-
const key = keyBuilderFromType$
|
|
2598
|
-
const ttlToUse = TTL$
|
|
2599
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
2597
|
+
const key = keyBuilderFromType$2(luvio, input);
|
|
2598
|
+
const ttlToUse = TTL$7;
|
|
2599
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "personalization-service", VERSION$a, RepresentationType$6, equals$b);
|
|
2600
2600
|
return createLink(key);
|
|
2601
2601
|
};
|
|
2602
|
-
function getTypeCacheKeys$
|
|
2602
|
+
function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
|
|
2603
2603
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2604
|
-
const rootKey = keyBuilderFromType$
|
|
2604
|
+
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
2605
2605
|
rootKeySet.set(rootKey, {
|
|
2606
2606
|
namespace: keyPrefix,
|
|
2607
|
-
representationName: RepresentationType$
|
|
2607
|
+
representationName: RepresentationType$6,
|
|
2608
2608
|
mergeable: false
|
|
2609
2609
|
});
|
|
2610
2610
|
const input_decisions_length = input.decisions.length;
|
|
2611
2611
|
for (let i = 0; i < input_decisions_length; i++) {
|
|
2612
|
-
getTypeCacheKeys$
|
|
2612
|
+
getTypeCacheKeys$7(rootKeySet, luvio, input.decisions[i], () => '');
|
|
2613
2613
|
}
|
|
2614
2614
|
}
|
|
2615
2615
|
|
|
2616
|
-
function select$
|
|
2617
|
-
return select$
|
|
2616
|
+
function select$l(luvio, params) {
|
|
2617
|
+
return select$m();
|
|
2618
2618
|
}
|
|
2619
|
-
function getResponseCacheKeys$
|
|
2620
|
-
getTypeCacheKeys$
|
|
2619
|
+
function getResponseCacheKeys$e(storeKeyMap, luvio, resourceParams, response) {
|
|
2620
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response);
|
|
2621
2621
|
}
|
|
2622
|
-
function ingestSuccess$
|
|
2622
|
+
function ingestSuccess$b(luvio, resourceParams, response) {
|
|
2623
2623
|
const { body } = response;
|
|
2624
|
-
const key = keyBuilderFromType$
|
|
2625
|
-
luvio.storeIngest(key, ingest$
|
|
2624
|
+
const key = keyBuilderFromType$2(luvio, body);
|
|
2625
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
2626
2626
|
const snapshot = luvio.storeLookup({
|
|
2627
2627
|
recordId: key,
|
|
2628
|
-
node: select$
|
|
2628
|
+
node: select$l(),
|
|
2629
2629
|
variables: {},
|
|
2630
2630
|
});
|
|
2631
2631
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2636,7 +2636,7 @@ function ingestSuccess$7(luvio, resourceParams, response) {
|
|
|
2636
2636
|
deepFreeze(snapshot.data);
|
|
2637
2637
|
return snapshot;
|
|
2638
2638
|
}
|
|
2639
|
-
function createResourceRequest$
|
|
2639
|
+
function createResourceRequest$h(config) {
|
|
2640
2640
|
const headers = {};
|
|
2641
2641
|
return {
|
|
2642
2642
|
baseUri: '/services/data/v65.0',
|
|
@@ -2650,7 +2650,7 @@ function createResourceRequest$9(config) {
|
|
|
2650
2650
|
};
|
|
2651
2651
|
}
|
|
2652
2652
|
|
|
2653
|
-
const adapterName$
|
|
2653
|
+
const adapterName$e = 'createPersonalizationPoint';
|
|
2654
2654
|
const createPersonalizationPoint_ConfigPropertyMetadata = [
|
|
2655
2655
|
generateParamConfigMetadata('description', false, 2 /* Body */, 4 /* Unsupported */),
|
|
2656
2656
|
generateParamConfigMetadata('label', true, 2 /* Body */, 4 /* Unsupported */),
|
|
@@ -2667,11 +2667,11 @@ const createPersonalizationPoint_ConfigPropertyMetadata = [
|
|
|
2667
2667
|
generateParamConfigMetadata('isAuthenticationRequired', true, 2 /* Body */, 1 /* Boolean */),
|
|
2668
2668
|
generateParamConfigMetadata('sourceRecordId', false, 2 /* Body */, 4 /* Unsupported */),
|
|
2669
2669
|
];
|
|
2670
|
-
const createPersonalizationPoint_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
2671
|
-
const createResourceParams$
|
|
2672
|
-
function typeCheckConfig$
|
|
2670
|
+
const createPersonalizationPoint_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$e, createPersonalizationPoint_ConfigPropertyMetadata);
|
|
2671
|
+
const createResourceParams$e = /*#__PURE__*/ createResourceParams$f(createPersonalizationPoint_ConfigPropertyMetadata);
|
|
2672
|
+
function typeCheckConfig$e(untrustedConfig) {
|
|
2673
2673
|
const config = {};
|
|
2674
|
-
typeCheckConfig$
|
|
2674
|
+
typeCheckConfig$f(untrustedConfig, config, createPersonalizationPoint_ConfigPropertyMetadata);
|
|
2675
2675
|
const untrustedConfig_description = untrustedConfig.description;
|
|
2676
2676
|
if (typeof untrustedConfig_description === 'string') {
|
|
2677
2677
|
config.description = untrustedConfig_description;
|
|
@@ -2712,7 +2712,7 @@ function typeCheckConfig$9(untrustedConfig) {
|
|
|
2712
2712
|
const untrustedConfig_decisions_array = [];
|
|
2713
2713
|
for (let i = 0, arrayLength = untrustedConfig_decisions.length; i < arrayLength; i++) {
|
|
2714
2714
|
const untrustedConfig_decisions_item = untrustedConfig_decisions[i];
|
|
2715
|
-
const referencePersonalizationDecisionInputRepresentationValidationError = validate$
|
|
2715
|
+
const referencePersonalizationDecisionInputRepresentationValidationError = validate$m(untrustedConfig_decisions_item);
|
|
2716
2716
|
if (referencePersonalizationDecisionInputRepresentationValidationError === null) {
|
|
2717
2717
|
untrustedConfig_decisions_array.push(untrustedConfig_decisions_item);
|
|
2718
2718
|
}
|
|
@@ -2763,30 +2763,30 @@ function typeCheckConfig$9(untrustedConfig) {
|
|
|
2763
2763
|
}
|
|
2764
2764
|
return config;
|
|
2765
2765
|
}
|
|
2766
|
-
function validateAdapterConfig$
|
|
2766
|
+
function validateAdapterConfig$e(untrustedConfig, configPropertyNames) {
|
|
2767
2767
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2768
2768
|
return null;
|
|
2769
2769
|
}
|
|
2770
2770
|
if (process.env.NODE_ENV !== 'production') {
|
|
2771
2771
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2772
2772
|
}
|
|
2773
|
-
const config = typeCheckConfig$
|
|
2773
|
+
const config = typeCheckConfig$e(untrustedConfig);
|
|
2774
2774
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2775
2775
|
return null;
|
|
2776
2776
|
}
|
|
2777
2777
|
return config;
|
|
2778
2778
|
}
|
|
2779
|
-
function buildNetworkSnapshot$
|
|
2780
|
-
const resourceParams = createResourceParams$
|
|
2781
|
-
const request = createResourceRequest$
|
|
2779
|
+
function buildNetworkSnapshot$e(luvio, config, options) {
|
|
2780
|
+
const resourceParams = createResourceParams$e(config);
|
|
2781
|
+
const request = createResourceRequest$h(resourceParams);
|
|
2782
2782
|
return luvio.dispatchResourceRequest(request, options)
|
|
2783
2783
|
.then((response) => {
|
|
2784
2784
|
return luvio.handleSuccessResponse(() => {
|
|
2785
|
-
const snapshot = ingestSuccess$
|
|
2785
|
+
const snapshot = ingestSuccess$b(luvio, resourceParams, response);
|
|
2786
2786
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2787
2787
|
}, () => {
|
|
2788
2788
|
const cache = new StoreKeyMap();
|
|
2789
|
-
getResponseCacheKeys$
|
|
2789
|
+
getResponseCacheKeys$e(cache, luvio, resourceParams, response.body);
|
|
2790
2790
|
return cache;
|
|
2791
2791
|
});
|
|
2792
2792
|
}, (response) => {
|
|
@@ -2796,33 +2796,33 @@ function buildNetworkSnapshot$9(luvio, config, options) {
|
|
|
2796
2796
|
}
|
|
2797
2797
|
const createPersonalizationPointAdapterFactory = (luvio) => {
|
|
2798
2798
|
return function createPersonalizationPoint(untrustedConfig) {
|
|
2799
|
-
const config = validateAdapterConfig$
|
|
2799
|
+
const config = validateAdapterConfig$e(untrustedConfig, createPersonalizationPoint_ConfigPropertyNames);
|
|
2800
2800
|
// Invalid or incomplete config
|
|
2801
2801
|
if (config === null) {
|
|
2802
2802
|
throw new Error('Invalid config for "createPersonalizationPoint"');
|
|
2803
2803
|
}
|
|
2804
|
-
return buildNetworkSnapshot$
|
|
2804
|
+
return buildNetworkSnapshot$e(luvio, config);
|
|
2805
2805
|
};
|
|
2806
2806
|
};
|
|
2807
2807
|
|
|
2808
|
-
function keyBuilder$
|
|
2809
|
-
return keyBuilder$
|
|
2808
|
+
function keyBuilder$i(luvio, params) {
|
|
2809
|
+
return keyBuilder$j(luvio, {
|
|
2810
2810
|
id: params.urlParams.idOrName
|
|
2811
2811
|
});
|
|
2812
2812
|
}
|
|
2813
|
-
function getResponseCacheKeys$
|
|
2814
|
-
const key = keyBuilder$
|
|
2813
|
+
function getResponseCacheKeys$d(cacheKeyMap, luvio, resourceParams) {
|
|
2814
|
+
const key = keyBuilder$i(luvio, resourceParams);
|
|
2815
2815
|
cacheKeyMap.set(key, {
|
|
2816
2816
|
namespace: keyPrefix,
|
|
2817
|
-
representationName: RepresentationType$
|
|
2817
|
+
representationName: RepresentationType$6,
|
|
2818
2818
|
mergeable: false
|
|
2819
2819
|
});
|
|
2820
2820
|
}
|
|
2821
|
-
function evictSuccess$
|
|
2822
|
-
const key = keyBuilder$
|
|
2821
|
+
function evictSuccess$2(luvio, resourceParams) {
|
|
2822
|
+
const key = keyBuilder$i(luvio, resourceParams);
|
|
2823
2823
|
luvio.storeEvict(key);
|
|
2824
2824
|
}
|
|
2825
|
-
function createResourceRequest$
|
|
2825
|
+
function createResourceRequest$g(config) {
|
|
2826
2826
|
const headers = {};
|
|
2827
2827
|
return {
|
|
2828
2828
|
baseUri: '/services/data/v65.0',
|
|
@@ -2836,41 +2836,41 @@ function createResourceRequest$8(config) {
|
|
|
2836
2836
|
};
|
|
2837
2837
|
}
|
|
2838
2838
|
|
|
2839
|
-
const adapterName$
|
|
2839
|
+
const adapterName$d = 'deletePersonalizationPoint';
|
|
2840
2840
|
const deletePersonalizationPoint_ConfigPropertyMetadata = [
|
|
2841
2841
|
generateParamConfigMetadata('idOrName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2842
2842
|
];
|
|
2843
|
-
const deletePersonalizationPoint_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
2844
|
-
const createResourceParams$
|
|
2845
|
-
function typeCheckConfig$
|
|
2843
|
+
const deletePersonalizationPoint_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$d, deletePersonalizationPoint_ConfigPropertyMetadata);
|
|
2844
|
+
const createResourceParams$d = /*#__PURE__*/ createResourceParams$f(deletePersonalizationPoint_ConfigPropertyMetadata);
|
|
2845
|
+
function typeCheckConfig$d(untrustedConfig) {
|
|
2846
2846
|
const config = {};
|
|
2847
|
-
typeCheckConfig$
|
|
2847
|
+
typeCheckConfig$f(untrustedConfig, config, deletePersonalizationPoint_ConfigPropertyMetadata);
|
|
2848
2848
|
return config;
|
|
2849
2849
|
}
|
|
2850
|
-
function validateAdapterConfig$
|
|
2850
|
+
function validateAdapterConfig$d(untrustedConfig, configPropertyNames) {
|
|
2851
2851
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2852
2852
|
return null;
|
|
2853
2853
|
}
|
|
2854
2854
|
if (process.env.NODE_ENV !== 'production') {
|
|
2855
2855
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2856
2856
|
}
|
|
2857
|
-
const config = typeCheckConfig$
|
|
2857
|
+
const config = typeCheckConfig$d(untrustedConfig);
|
|
2858
2858
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2859
2859
|
return null;
|
|
2860
2860
|
}
|
|
2861
2861
|
return config;
|
|
2862
2862
|
}
|
|
2863
|
-
function buildNetworkSnapshot$
|
|
2864
|
-
const resourceParams = createResourceParams$
|
|
2865
|
-
const request = createResourceRequest$
|
|
2863
|
+
function buildNetworkSnapshot$d(luvio, config, options) {
|
|
2864
|
+
const resourceParams = createResourceParams$d(config);
|
|
2865
|
+
const request = createResourceRequest$g(resourceParams);
|
|
2866
2866
|
return luvio.dispatchResourceRequest(request, options)
|
|
2867
2867
|
.then(() => {
|
|
2868
2868
|
return luvio.handleSuccessResponse(() => {
|
|
2869
|
-
evictSuccess$
|
|
2869
|
+
evictSuccess$2(luvio, resourceParams);
|
|
2870
2870
|
return luvio.storeBroadcast();
|
|
2871
2871
|
}, () => {
|
|
2872
2872
|
const cache = new StoreKeyMap();
|
|
2873
|
-
getResponseCacheKeys$
|
|
2873
|
+
getResponseCacheKeys$d(cache, luvio, resourceParams);
|
|
2874
2874
|
return cache;
|
|
2875
2875
|
});
|
|
2876
2876
|
}, (response) => {
|
|
@@ -2880,33 +2880,33 @@ function buildNetworkSnapshot$8(luvio, config, options) {
|
|
|
2880
2880
|
}
|
|
2881
2881
|
const deletePersonalizationPointAdapterFactory = (luvio) => {
|
|
2882
2882
|
return function personalizationServicedeletePersonalizationPoint(untrustedConfig) {
|
|
2883
|
-
const config = validateAdapterConfig$
|
|
2883
|
+
const config = validateAdapterConfig$d(untrustedConfig, deletePersonalizationPoint_ConfigPropertyNames);
|
|
2884
2884
|
// Invalid or incomplete config
|
|
2885
2885
|
if (config === null) {
|
|
2886
|
-
throw new Error(`Invalid config for "${adapterName$
|
|
2886
|
+
throw new Error(`Invalid config for "${adapterName$d}"`);
|
|
2887
2887
|
}
|
|
2888
|
-
return buildNetworkSnapshot$
|
|
2888
|
+
return buildNetworkSnapshot$d(luvio, config);
|
|
2889
2889
|
};
|
|
2890
2890
|
};
|
|
2891
2891
|
|
|
2892
|
-
function select$
|
|
2893
|
-
return select$
|
|
2892
|
+
function select$k(luvio, params) {
|
|
2893
|
+
return select$m();
|
|
2894
2894
|
}
|
|
2895
|
-
function keyBuilder$
|
|
2896
|
-
return keyBuilder$
|
|
2895
|
+
function keyBuilder$h(luvio, params) {
|
|
2896
|
+
return keyBuilder$j(luvio, {
|
|
2897
2897
|
id: params.urlParams.idOrName
|
|
2898
2898
|
});
|
|
2899
2899
|
}
|
|
2900
|
-
function getResponseCacheKeys$
|
|
2901
|
-
getTypeCacheKeys$
|
|
2900
|
+
function getResponseCacheKeys$c(storeKeyMap, luvio, resourceParams, response) {
|
|
2901
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response);
|
|
2902
2902
|
}
|
|
2903
|
-
function ingestSuccess$
|
|
2903
|
+
function ingestSuccess$a(luvio, resourceParams, response, snapshotRefresh) {
|
|
2904
2904
|
const { body } = response;
|
|
2905
|
-
const key = keyBuilder$
|
|
2906
|
-
luvio.storeIngest(key, ingest$
|
|
2905
|
+
const key = keyBuilder$h(luvio, resourceParams);
|
|
2906
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
2907
2907
|
const snapshot = luvio.storeLookup({
|
|
2908
2908
|
recordId: key,
|
|
2909
|
-
node: select$
|
|
2909
|
+
node: select$k(),
|
|
2910
2910
|
variables: {},
|
|
2911
2911
|
}, snapshotRefresh);
|
|
2912
2912
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2917,19 +2917,19 @@ function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
2917
2917
|
deepFreeze(snapshot.data);
|
|
2918
2918
|
return snapshot;
|
|
2919
2919
|
}
|
|
2920
|
-
function ingestError$
|
|
2921
|
-
const key = keyBuilder$
|
|
2920
|
+
function ingestError$6(luvio, params, error, snapshotRefresh) {
|
|
2921
|
+
const key = keyBuilder$h(luvio, params);
|
|
2922
2922
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2923
2923
|
const storeMetadataParams = {
|
|
2924
|
-
ttl: TTL$
|
|
2924
|
+
ttl: TTL$7,
|
|
2925
2925
|
namespace: keyPrefix,
|
|
2926
|
-
version: VERSION$
|
|
2927
|
-
representationName: RepresentationType$
|
|
2926
|
+
version: VERSION$a,
|
|
2927
|
+
representationName: RepresentationType$6
|
|
2928
2928
|
};
|
|
2929
2929
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
2930
2930
|
return errorSnapshot;
|
|
2931
2931
|
}
|
|
2932
|
-
function createResourceRequest$
|
|
2932
|
+
function createResourceRequest$f(config) {
|
|
2933
2933
|
const headers = {};
|
|
2934
2934
|
return {
|
|
2935
2935
|
baseUri: '/services/data/v65.0',
|
|
@@ -2943,105 +2943,105 @@ function createResourceRequest$7(config) {
|
|
|
2943
2943
|
};
|
|
2944
2944
|
}
|
|
2945
2945
|
|
|
2946
|
-
const adapterName$
|
|
2946
|
+
const adapterName$c = 'getPersonalizationPoint';
|
|
2947
2947
|
const getPersonalizationPoint_ConfigPropertyMetadata = [
|
|
2948
2948
|
generateParamConfigMetadata('idOrName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2949
2949
|
];
|
|
2950
|
-
const getPersonalizationPoint_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
2951
|
-
const createResourceParams$
|
|
2952
|
-
function keyBuilder$
|
|
2953
|
-
const resourceParams = createResourceParams$
|
|
2954
|
-
return keyBuilder$
|
|
2950
|
+
const getPersonalizationPoint_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$c, getPersonalizationPoint_ConfigPropertyMetadata);
|
|
2951
|
+
const createResourceParams$c = /*#__PURE__*/ createResourceParams$f(getPersonalizationPoint_ConfigPropertyMetadata);
|
|
2952
|
+
function keyBuilder$g(luvio, config) {
|
|
2953
|
+
const resourceParams = createResourceParams$c(config);
|
|
2954
|
+
return keyBuilder$h(luvio, resourceParams);
|
|
2955
2955
|
}
|
|
2956
|
-
function typeCheckConfig$
|
|
2956
|
+
function typeCheckConfig$c(untrustedConfig) {
|
|
2957
2957
|
const config = {};
|
|
2958
|
-
typeCheckConfig$
|
|
2958
|
+
typeCheckConfig$f(untrustedConfig, config, getPersonalizationPoint_ConfigPropertyMetadata);
|
|
2959
2959
|
return config;
|
|
2960
2960
|
}
|
|
2961
|
-
function validateAdapterConfig$
|
|
2961
|
+
function validateAdapterConfig$c(untrustedConfig, configPropertyNames) {
|
|
2962
2962
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2963
2963
|
return null;
|
|
2964
2964
|
}
|
|
2965
2965
|
if (process.env.NODE_ENV !== 'production') {
|
|
2966
2966
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2967
2967
|
}
|
|
2968
|
-
const config = typeCheckConfig$
|
|
2968
|
+
const config = typeCheckConfig$c(untrustedConfig);
|
|
2969
2969
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2970
2970
|
return null;
|
|
2971
2971
|
}
|
|
2972
2972
|
return config;
|
|
2973
2973
|
}
|
|
2974
|
-
function adapterFragment$
|
|
2975
|
-
createResourceParams$
|
|
2976
|
-
return select$
|
|
2974
|
+
function adapterFragment$6(luvio, config) {
|
|
2975
|
+
createResourceParams$c(config);
|
|
2976
|
+
return select$k();
|
|
2977
2977
|
}
|
|
2978
|
-
function onFetchResponseSuccess$
|
|
2979
|
-
const snapshot = ingestSuccess$
|
|
2978
|
+
function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
|
|
2979
|
+
const snapshot = ingestSuccess$a(luvio, resourceParams, response, {
|
|
2980
2980
|
config,
|
|
2981
|
-
resolve: () => buildNetworkSnapshot$
|
|
2981
|
+
resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
|
|
2982
2982
|
});
|
|
2983
2983
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2984
2984
|
}
|
|
2985
|
-
function onFetchResponseError$
|
|
2986
|
-
const snapshot = ingestError$
|
|
2985
|
+
function onFetchResponseError$6(luvio, config, resourceParams, response) {
|
|
2986
|
+
const snapshot = ingestError$6(luvio, resourceParams, response, {
|
|
2987
2987
|
config,
|
|
2988
|
-
resolve: () => buildNetworkSnapshot$
|
|
2988
|
+
resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
|
|
2989
2989
|
});
|
|
2990
2990
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2991
2991
|
}
|
|
2992
|
-
function buildNetworkSnapshot$
|
|
2993
|
-
const resourceParams = createResourceParams$
|
|
2994
|
-
const request = createResourceRequest$
|
|
2992
|
+
function buildNetworkSnapshot$c(luvio, config, options) {
|
|
2993
|
+
const resourceParams = createResourceParams$c(config);
|
|
2994
|
+
const request = createResourceRequest$f(resourceParams);
|
|
2995
2995
|
return luvio.dispatchResourceRequest(request, options)
|
|
2996
2996
|
.then((response) => {
|
|
2997
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
2997
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => {
|
|
2998
2998
|
const cache = new StoreKeyMap();
|
|
2999
|
-
getResponseCacheKeys$
|
|
2999
|
+
getResponseCacheKeys$c(cache, luvio, resourceParams, response.body);
|
|
3000
3000
|
return cache;
|
|
3001
3001
|
});
|
|
3002
3002
|
}, (response) => {
|
|
3003
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
3003
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$6(luvio, config, resourceParams, response));
|
|
3004
3004
|
});
|
|
3005
3005
|
}
|
|
3006
|
-
function buildNetworkSnapshotCachePolicy$
|
|
3007
|
-
return buildNetworkSnapshotCachePolicy$
|
|
3006
|
+
function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext) {
|
|
3007
|
+
return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$c, undefined, false);
|
|
3008
3008
|
}
|
|
3009
|
-
function buildCachedSnapshotCachePolicy$
|
|
3009
|
+
function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
|
|
3010
3010
|
const { luvio, config } = context;
|
|
3011
3011
|
const selector = {
|
|
3012
|
-
recordId: keyBuilder$
|
|
3013
|
-
node: adapterFragment$
|
|
3012
|
+
recordId: keyBuilder$g(luvio, config),
|
|
3013
|
+
node: adapterFragment$6(luvio, config),
|
|
3014
3014
|
variables: {},
|
|
3015
3015
|
};
|
|
3016
3016
|
const cacheSnapshot = storeLookup(selector, {
|
|
3017
3017
|
config,
|
|
3018
|
-
resolve: () => buildNetworkSnapshot$
|
|
3018
|
+
resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
|
|
3019
3019
|
});
|
|
3020
3020
|
return cacheSnapshot;
|
|
3021
3021
|
}
|
|
3022
3022
|
const getPersonalizationPointAdapterFactory = (luvio) => function personalizationService__getPersonalizationPoint(untrustedConfig, requestContext) {
|
|
3023
|
-
const config = validateAdapterConfig$
|
|
3023
|
+
const config = validateAdapterConfig$c(untrustedConfig, getPersonalizationPoint_ConfigPropertyNames);
|
|
3024
3024
|
// Invalid or incomplete config
|
|
3025
3025
|
if (config === null) {
|
|
3026
3026
|
return null;
|
|
3027
3027
|
}
|
|
3028
3028
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3029
|
-
buildCachedSnapshotCachePolicy$
|
|
3029
|
+
buildCachedSnapshotCachePolicy$6, buildNetworkSnapshotCachePolicy$6);
|
|
3030
3030
|
};
|
|
3031
3031
|
|
|
3032
|
-
function select$
|
|
3033
|
-
return select$
|
|
3032
|
+
function select$j(luvio, params) {
|
|
3033
|
+
return select$m();
|
|
3034
3034
|
}
|
|
3035
|
-
function getResponseCacheKeys$
|
|
3036
|
-
getTypeCacheKeys$
|
|
3035
|
+
function getResponseCacheKeys$b(storeKeyMap, luvio, resourceParams, response) {
|
|
3036
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response);
|
|
3037
3037
|
}
|
|
3038
|
-
function ingestSuccess$
|
|
3038
|
+
function ingestSuccess$9(luvio, resourceParams, response) {
|
|
3039
3039
|
const { body } = response;
|
|
3040
|
-
const key = keyBuilderFromType$
|
|
3041
|
-
luvio.storeIngest(key, ingest$
|
|
3040
|
+
const key = keyBuilderFromType$2(luvio, body);
|
|
3041
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
3042
3042
|
const snapshot = luvio.storeLookup({
|
|
3043
3043
|
recordId: key,
|
|
3044
|
-
node: select$
|
|
3044
|
+
node: select$j(),
|
|
3045
3045
|
variables: {},
|
|
3046
3046
|
});
|
|
3047
3047
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3052,7 +3052,7 @@ function ingestSuccess$5(luvio, resourceParams, response) {
|
|
|
3052
3052
|
deepFreeze(snapshot.data);
|
|
3053
3053
|
return snapshot;
|
|
3054
3054
|
}
|
|
3055
|
-
function createResourceRequest$
|
|
3055
|
+
function createResourceRequest$e(config) {
|
|
3056
3056
|
const headers = {};
|
|
3057
3057
|
return {
|
|
3058
3058
|
baseUri: '/services/data/v65.0',
|
|
@@ -3066,7 +3066,7 @@ function createResourceRequest$6(config) {
|
|
|
3066
3066
|
};
|
|
3067
3067
|
}
|
|
3068
3068
|
|
|
3069
|
-
const adapterName$
|
|
3069
|
+
const adapterName$b = 'updatePersonalizationPoint';
|
|
3070
3070
|
const updatePersonalizationPoint_ConfigPropertyMetadata = [
|
|
3071
3071
|
generateParamConfigMetadata('idOrName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3072
3072
|
generateParamConfigMetadata('description', false, 2 /* Body */, 4 /* Unsupported */),
|
|
@@ -3084,11 +3084,11 @@ const updatePersonalizationPoint_ConfigPropertyMetadata = [
|
|
|
3084
3084
|
generateParamConfigMetadata('isAuthenticationRequired', true, 2 /* Body */, 1 /* Boolean */),
|
|
3085
3085
|
generateParamConfigMetadata('sourceRecordId', false, 2 /* Body */, 4 /* Unsupported */),
|
|
3086
3086
|
];
|
|
3087
|
-
const updatePersonalizationPoint_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3088
|
-
const createResourceParams$
|
|
3089
|
-
function typeCheckConfig$
|
|
3087
|
+
const updatePersonalizationPoint_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$b, updatePersonalizationPoint_ConfigPropertyMetadata);
|
|
3088
|
+
const createResourceParams$b = /*#__PURE__*/ createResourceParams$f(updatePersonalizationPoint_ConfigPropertyMetadata);
|
|
3089
|
+
function typeCheckConfig$b(untrustedConfig) {
|
|
3090
3090
|
const config = {};
|
|
3091
|
-
typeCheckConfig$
|
|
3091
|
+
typeCheckConfig$f(untrustedConfig, config, updatePersonalizationPoint_ConfigPropertyMetadata);
|
|
3092
3092
|
const untrustedConfig_description = untrustedConfig.description;
|
|
3093
3093
|
if (typeof untrustedConfig_description === 'string') {
|
|
3094
3094
|
config.description = untrustedConfig_description;
|
|
@@ -3129,7 +3129,7 @@ function typeCheckConfig$6(untrustedConfig) {
|
|
|
3129
3129
|
const untrustedConfig_decisions_array = [];
|
|
3130
3130
|
for (let i = 0, arrayLength = untrustedConfig_decisions.length; i < arrayLength; i++) {
|
|
3131
3131
|
const untrustedConfig_decisions_item = untrustedConfig_decisions[i];
|
|
3132
|
-
const referencePersonalizationDecisionInputRepresentationValidationError = validate$
|
|
3132
|
+
const referencePersonalizationDecisionInputRepresentationValidationError = validate$m(untrustedConfig_decisions_item);
|
|
3133
3133
|
if (referencePersonalizationDecisionInputRepresentationValidationError === null) {
|
|
3134
3134
|
untrustedConfig_decisions_array.push(untrustedConfig_decisions_item);
|
|
3135
3135
|
}
|
|
@@ -3180,30 +3180,30 @@ function typeCheckConfig$6(untrustedConfig) {
|
|
|
3180
3180
|
}
|
|
3181
3181
|
return config;
|
|
3182
3182
|
}
|
|
3183
|
-
function validateAdapterConfig$
|
|
3183
|
+
function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
|
|
3184
3184
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3185
3185
|
return null;
|
|
3186
3186
|
}
|
|
3187
3187
|
if (process.env.NODE_ENV !== 'production') {
|
|
3188
3188
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3189
3189
|
}
|
|
3190
|
-
const config = typeCheckConfig$
|
|
3190
|
+
const config = typeCheckConfig$b(untrustedConfig);
|
|
3191
3191
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3192
3192
|
return null;
|
|
3193
3193
|
}
|
|
3194
3194
|
return config;
|
|
3195
3195
|
}
|
|
3196
|
-
function buildNetworkSnapshot$
|
|
3197
|
-
const resourceParams = createResourceParams$
|
|
3198
|
-
const request = createResourceRequest$
|
|
3196
|
+
function buildNetworkSnapshot$b(luvio, config, options) {
|
|
3197
|
+
const resourceParams = createResourceParams$b(config);
|
|
3198
|
+
const request = createResourceRequest$e(resourceParams);
|
|
3199
3199
|
return luvio.dispatchResourceRequest(request, options)
|
|
3200
3200
|
.then((response) => {
|
|
3201
3201
|
return luvio.handleSuccessResponse(() => {
|
|
3202
|
-
const snapshot = ingestSuccess$
|
|
3202
|
+
const snapshot = ingestSuccess$9(luvio, resourceParams, response);
|
|
3203
3203
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3204
3204
|
}, () => {
|
|
3205
3205
|
const cache = new StoreKeyMap();
|
|
3206
|
-
getResponseCacheKeys$
|
|
3206
|
+
getResponseCacheKeys$b(cache, luvio, resourceParams, response.body);
|
|
3207
3207
|
return cache;
|
|
3208
3208
|
});
|
|
3209
3209
|
}, (response) => {
|
|
@@ -3213,16 +3213,16 @@ function buildNetworkSnapshot$6(luvio, config, options) {
|
|
|
3213
3213
|
}
|
|
3214
3214
|
const updatePersonalizationPointAdapterFactory = (luvio) => {
|
|
3215
3215
|
return function updatePersonalizationPoint(untrustedConfig) {
|
|
3216
|
-
const config = validateAdapterConfig$
|
|
3216
|
+
const config = validateAdapterConfig$b(untrustedConfig, updatePersonalizationPoint_ConfigPropertyNames);
|
|
3217
3217
|
// Invalid or incomplete config
|
|
3218
3218
|
if (config === null) {
|
|
3219
3219
|
throw new Error('Invalid config for "updatePersonalizationPoint"');
|
|
3220
3220
|
}
|
|
3221
|
-
return buildNetworkSnapshot$
|
|
3221
|
+
return buildNetworkSnapshot$b(luvio, config);
|
|
3222
3222
|
};
|
|
3223
3223
|
};
|
|
3224
3224
|
|
|
3225
|
-
function validate$
|
|
3225
|
+
function validate$e(obj, path = 'PersonalizationAttributeInputRepresentation') {
|
|
3226
3226
|
const v_error = (() => {
|
|
3227
3227
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3228
3228
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3269,8 +3269,8 @@ function validate$b(obj, path = 'PersonalizationAttributeInputRepresentation') {
|
|
|
3269
3269
|
return v_error === undefined ? null : v_error;
|
|
3270
3270
|
}
|
|
3271
3271
|
|
|
3272
|
-
const VERSION$
|
|
3273
|
-
function validate$
|
|
3272
|
+
const VERSION$9 = "014064b188ff923423af6301d64be36a";
|
|
3273
|
+
function validate$d(obj, path = 'PersonalizationAttributeRepresentation') {
|
|
3274
3274
|
const v_error = (() => {
|
|
3275
3275
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3276
3276
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3365,10 +3365,10 @@ function validate$a(obj, path = 'PersonalizationAttributeRepresentation') {
|
|
|
3365
3365
|
})();
|
|
3366
3366
|
return v_error === undefined ? null : v_error;
|
|
3367
3367
|
}
|
|
3368
|
-
const select$
|
|
3368
|
+
const select$i = function PersonalizationAttributeRepresentationSelect() {
|
|
3369
3369
|
return {
|
|
3370
3370
|
kind: 'Fragment',
|
|
3371
|
-
version: VERSION$
|
|
3371
|
+
version: VERSION$9,
|
|
3372
3372
|
private: [],
|
|
3373
3373
|
selections: [
|
|
3374
3374
|
{
|
|
@@ -3410,7 +3410,7 @@ const select$c = function PersonalizationAttributeRepresentationSelect() {
|
|
|
3410
3410
|
]
|
|
3411
3411
|
};
|
|
3412
3412
|
};
|
|
3413
|
-
function equals$
|
|
3413
|
+
function equals$a(existing, incoming) {
|
|
3414
3414
|
const existing_createdById = existing.createdById;
|
|
3415
3415
|
const incoming_createdById = incoming.createdById;
|
|
3416
3416
|
if (!(existing_createdById === incoming_createdById)) {
|
|
@@ -3459,9 +3459,9 @@ function equals$7(existing, incoming) {
|
|
|
3459
3459
|
return true;
|
|
3460
3460
|
}
|
|
3461
3461
|
|
|
3462
|
-
const TTL$
|
|
3463
|
-
const VERSION$
|
|
3464
|
-
function validate$
|
|
3462
|
+
const TTL$6 = 600;
|
|
3463
|
+
const VERSION$8 = "25740f87643de6fdae570c77bbec7377";
|
|
3464
|
+
function validate$c(obj, path = 'PersonalizationSchemaRepresentation') {
|
|
3465
3465
|
const v_error = (() => {
|
|
3466
3466
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3467
3467
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3474,7 +3474,7 @@ function validate$9(obj, path = 'PersonalizationSchemaRepresentation') {
|
|
|
3474
3474
|
for (let i = 0; i < obj_attributes.length; i++) {
|
|
3475
3475
|
const obj_attributes_item = obj_attributes[i];
|
|
3476
3476
|
const path_attributes_item = path_attributes + '[' + i + ']';
|
|
3477
|
-
const referencepath_attributes_itemValidationError = validate$
|
|
3477
|
+
const referencepath_attributes_itemValidationError = validate$d(obj_attributes_item, path_attributes_item);
|
|
3478
3478
|
if (referencepath_attributes_itemValidationError !== null) {
|
|
3479
3479
|
let message = 'Object doesn\'t match PersonalizationAttributeRepresentation (at "' + path_attributes_item + '")\n';
|
|
3480
3480
|
message += referencepath_attributes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -3619,24 +3619,24 @@ function validate$9(obj, path = 'PersonalizationSchemaRepresentation') {
|
|
|
3619
3619
|
})();
|
|
3620
3620
|
return v_error === undefined ? null : v_error;
|
|
3621
3621
|
}
|
|
3622
|
-
const RepresentationType$
|
|
3623
|
-
function keyBuilder$
|
|
3624
|
-
return keyPrefix + '::' + RepresentationType$
|
|
3622
|
+
const RepresentationType$5 = 'PersonalizationSchemaRepresentation';
|
|
3623
|
+
function keyBuilder$f(luvio, config) {
|
|
3624
|
+
return keyPrefix + '::' + RepresentationType$5 + ':' + config.id;
|
|
3625
3625
|
}
|
|
3626
|
-
function keyBuilderFromType(luvio, object) {
|
|
3626
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
3627
3627
|
const keyParams = {
|
|
3628
3628
|
id: object.name
|
|
3629
3629
|
};
|
|
3630
|
-
return keyBuilder$
|
|
3630
|
+
return keyBuilder$f(luvio, keyParams);
|
|
3631
3631
|
}
|
|
3632
|
-
function normalize$
|
|
3632
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
3633
3633
|
return input;
|
|
3634
3634
|
}
|
|
3635
|
-
const select$
|
|
3636
|
-
const { selections: PersonalizationAttributeRepresentation__selections, opaque: PersonalizationAttributeRepresentation__opaque, } = select$
|
|
3635
|
+
const select$h = function PersonalizationSchemaRepresentationSelect() {
|
|
3636
|
+
const { selections: PersonalizationAttributeRepresentation__selections, opaque: PersonalizationAttributeRepresentation__opaque, } = select$i();
|
|
3637
3637
|
return {
|
|
3638
3638
|
kind: 'Fragment',
|
|
3639
|
-
version: VERSION$
|
|
3639
|
+
version: VERSION$8,
|
|
3640
3640
|
private: [],
|
|
3641
3641
|
selections: [
|
|
3642
3642
|
{
|
|
@@ -3701,7 +3701,7 @@ const select$b = function PersonalizationSchemaRepresentationSelect() {
|
|
|
3701
3701
|
]
|
|
3702
3702
|
};
|
|
3703
3703
|
};
|
|
3704
|
-
function equals$
|
|
3704
|
+
function equals$9(existing, incoming) {
|
|
3705
3705
|
const existing_createdById = existing.createdById;
|
|
3706
3706
|
const incoming_createdById = incoming.createdById;
|
|
3707
3707
|
if (!(existing_createdById === incoming_createdById)) {
|
|
@@ -3755,7 +3755,7 @@ function equals$6(existing, incoming) {
|
|
|
3755
3755
|
const existing_attributes = existing.attributes;
|
|
3756
3756
|
const incoming_attributes = incoming.attributes;
|
|
3757
3757
|
const equals_attributes_items = equalsArray(existing_attributes, incoming_attributes, (existing_attributes_item, incoming_attributes_item) => {
|
|
3758
|
-
if (!(equals$
|
|
3758
|
+
if (!(equals$a(existing_attributes_item, incoming_attributes_item))) {
|
|
3759
3759
|
return false;
|
|
3760
3760
|
}
|
|
3761
3761
|
});
|
|
@@ -3784,41 +3784,41 @@ function equals$6(existing, incoming) {
|
|
|
3784
3784
|
}
|
|
3785
3785
|
return true;
|
|
3786
3786
|
}
|
|
3787
|
-
const ingest$
|
|
3787
|
+
const ingest$5 = function PersonalizationSchemaRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3788
3788
|
if (process.env.NODE_ENV !== 'production') {
|
|
3789
|
-
const validateError = validate$
|
|
3789
|
+
const validateError = validate$c(input);
|
|
3790
3790
|
if (validateError !== null) {
|
|
3791
3791
|
throw validateError;
|
|
3792
3792
|
}
|
|
3793
3793
|
}
|
|
3794
|
-
const key = keyBuilderFromType(luvio, input);
|
|
3795
|
-
const ttlToUse = TTL$
|
|
3796
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
3794
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
3795
|
+
const ttlToUse = TTL$6;
|
|
3796
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "personalization-service", VERSION$8, RepresentationType$5, equals$9);
|
|
3797
3797
|
return createLink(key);
|
|
3798
3798
|
};
|
|
3799
|
-
function getTypeCacheKeys$
|
|
3799
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
3800
3800
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3801
|
-
const rootKey = keyBuilderFromType(luvio, input);
|
|
3801
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
3802
3802
|
rootKeySet.set(rootKey, {
|
|
3803
3803
|
namespace: keyPrefix,
|
|
3804
|
-
representationName: RepresentationType$
|
|
3804
|
+
representationName: RepresentationType$5,
|
|
3805
3805
|
mergeable: false
|
|
3806
3806
|
});
|
|
3807
3807
|
}
|
|
3808
3808
|
|
|
3809
|
-
function select$
|
|
3810
|
-
return select$
|
|
3809
|
+
function select$g(luvio, params) {
|
|
3810
|
+
return select$h();
|
|
3811
3811
|
}
|
|
3812
|
-
function getResponseCacheKeys$
|
|
3813
|
-
getTypeCacheKeys$
|
|
3812
|
+
function getResponseCacheKeys$a(storeKeyMap, luvio, resourceParams, response) {
|
|
3813
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response);
|
|
3814
3814
|
}
|
|
3815
|
-
function ingestSuccess$
|
|
3815
|
+
function ingestSuccess$8(luvio, resourceParams, response) {
|
|
3816
3816
|
const { body } = response;
|
|
3817
|
-
const key = keyBuilderFromType(luvio, body);
|
|
3818
|
-
luvio.storeIngest(key, ingest$
|
|
3817
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
3818
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
3819
3819
|
const snapshot = luvio.storeLookup({
|
|
3820
3820
|
recordId: key,
|
|
3821
|
-
node: select$
|
|
3821
|
+
node: select$g(),
|
|
3822
3822
|
variables: {},
|
|
3823
3823
|
});
|
|
3824
3824
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3829,7 +3829,7 @@ function ingestSuccess$4(luvio, resourceParams, response) {
|
|
|
3829
3829
|
deepFreeze(snapshot.data);
|
|
3830
3830
|
return snapshot;
|
|
3831
3831
|
}
|
|
3832
|
-
function createResourceRequest$
|
|
3832
|
+
function createResourceRequest$d(config) {
|
|
3833
3833
|
const headers = {};
|
|
3834
3834
|
return {
|
|
3835
3835
|
baseUri: '/services/data/v65.0',
|
|
@@ -3843,7 +3843,7 @@ function createResourceRequest$5(config) {
|
|
|
3843
3843
|
};
|
|
3844
3844
|
}
|
|
3845
3845
|
|
|
3846
|
-
const adapterName$
|
|
3846
|
+
const adapterName$a = 'createPersonalizationSchema';
|
|
3847
3847
|
const createPersonalizationSchema_ConfigPropertyMetadata = [
|
|
3848
3848
|
generateParamConfigMetadata('description', true, 2 /* Body */, 4 /* Unsupported */),
|
|
3849
3849
|
generateParamConfigMetadata('label', true, 2 /* Body */, 4 /* Unsupported */),
|
|
@@ -3854,11 +3854,11 @@ const createPersonalizationSchema_ConfigPropertyMetadata = [
|
|
|
3854
3854
|
generateParamConfigMetadata('dataSpaceName', true, 2 /* Body */, 0 /* String */),
|
|
3855
3855
|
generateParamConfigMetadata('personalizationType', true, 2 /* Body */, 0 /* String */),
|
|
3856
3856
|
];
|
|
3857
|
-
const createPersonalizationSchema_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3858
|
-
const createResourceParams$
|
|
3859
|
-
function typeCheckConfig$
|
|
3857
|
+
const createPersonalizationSchema_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$a, createPersonalizationSchema_ConfigPropertyMetadata);
|
|
3858
|
+
const createResourceParams$a = /*#__PURE__*/ createResourceParams$f(createPersonalizationSchema_ConfigPropertyMetadata);
|
|
3859
|
+
function typeCheckConfig$a(untrustedConfig) {
|
|
3860
3860
|
const config = {};
|
|
3861
|
-
typeCheckConfig$
|
|
3861
|
+
typeCheckConfig$f(untrustedConfig, config, createPersonalizationSchema_ConfigPropertyMetadata);
|
|
3862
3862
|
const untrustedConfig_description = untrustedConfig.description;
|
|
3863
3863
|
if (typeof untrustedConfig_description === 'string') {
|
|
3864
3864
|
config.description = untrustedConfig_description;
|
|
@@ -3885,7 +3885,7 @@ function typeCheckConfig$5(untrustedConfig) {
|
|
|
3885
3885
|
const untrustedConfig_attributes_array = [];
|
|
3886
3886
|
for (let i = 0, arrayLength = untrustedConfig_attributes.length; i < arrayLength; i++) {
|
|
3887
3887
|
const untrustedConfig_attributes_item = untrustedConfig_attributes[i];
|
|
3888
|
-
const referencePersonalizationAttributeInputRepresentationValidationError = validate$
|
|
3888
|
+
const referencePersonalizationAttributeInputRepresentationValidationError = validate$e(untrustedConfig_attributes_item);
|
|
3889
3889
|
if (referencePersonalizationAttributeInputRepresentationValidationError === null) {
|
|
3890
3890
|
untrustedConfig_attributes_array.push(untrustedConfig_attributes_item);
|
|
3891
3891
|
}
|
|
@@ -3915,30 +3915,30 @@ function typeCheckConfig$5(untrustedConfig) {
|
|
|
3915
3915
|
}
|
|
3916
3916
|
return config;
|
|
3917
3917
|
}
|
|
3918
|
-
function validateAdapterConfig$
|
|
3918
|
+
function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
|
|
3919
3919
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3920
3920
|
return null;
|
|
3921
3921
|
}
|
|
3922
3922
|
if (process.env.NODE_ENV !== 'production') {
|
|
3923
3923
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3924
3924
|
}
|
|
3925
|
-
const config = typeCheckConfig$
|
|
3925
|
+
const config = typeCheckConfig$a(untrustedConfig);
|
|
3926
3926
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3927
3927
|
return null;
|
|
3928
3928
|
}
|
|
3929
3929
|
return config;
|
|
3930
3930
|
}
|
|
3931
|
-
function buildNetworkSnapshot$
|
|
3932
|
-
const resourceParams = createResourceParams$
|
|
3933
|
-
const request = createResourceRequest$
|
|
3931
|
+
function buildNetworkSnapshot$a(luvio, config, options) {
|
|
3932
|
+
const resourceParams = createResourceParams$a(config);
|
|
3933
|
+
const request = createResourceRequest$d(resourceParams);
|
|
3934
3934
|
return luvio.dispatchResourceRequest(request, options)
|
|
3935
3935
|
.then((response) => {
|
|
3936
3936
|
return luvio.handleSuccessResponse(() => {
|
|
3937
|
-
const snapshot = ingestSuccess$
|
|
3937
|
+
const snapshot = ingestSuccess$8(luvio, resourceParams, response);
|
|
3938
3938
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3939
3939
|
}, () => {
|
|
3940
3940
|
const cache = new StoreKeyMap();
|
|
3941
|
-
getResponseCacheKeys$
|
|
3941
|
+
getResponseCacheKeys$a(cache, luvio, resourceParams, response.body);
|
|
3942
3942
|
return cache;
|
|
3943
3943
|
});
|
|
3944
3944
|
}, (response) => {
|
|
@@ -3948,33 +3948,33 @@ function buildNetworkSnapshot$5(luvio, config, options) {
|
|
|
3948
3948
|
}
|
|
3949
3949
|
const createPersonalizationSchemaAdapterFactory = (luvio) => {
|
|
3950
3950
|
return function createPersonalizationSchema(untrustedConfig) {
|
|
3951
|
-
const config = validateAdapterConfig$
|
|
3951
|
+
const config = validateAdapterConfig$a(untrustedConfig, createPersonalizationSchema_ConfigPropertyNames);
|
|
3952
3952
|
// Invalid or incomplete config
|
|
3953
3953
|
if (config === null) {
|
|
3954
3954
|
throw new Error('Invalid config for "createPersonalizationSchema"');
|
|
3955
3955
|
}
|
|
3956
|
-
return buildNetworkSnapshot$
|
|
3956
|
+
return buildNetworkSnapshot$a(luvio, config);
|
|
3957
3957
|
};
|
|
3958
3958
|
};
|
|
3959
3959
|
|
|
3960
|
-
function keyBuilder$
|
|
3961
|
-
return keyBuilder$
|
|
3960
|
+
function keyBuilder$e(luvio, params) {
|
|
3961
|
+
return keyBuilder$f(luvio, {
|
|
3962
3962
|
id: params.urlParams.idOrName
|
|
3963
3963
|
});
|
|
3964
3964
|
}
|
|
3965
|
-
function getResponseCacheKeys$
|
|
3966
|
-
const key = keyBuilder$
|
|
3965
|
+
function getResponseCacheKeys$9(cacheKeyMap, luvio, resourceParams) {
|
|
3966
|
+
const key = keyBuilder$e(luvio, resourceParams);
|
|
3967
3967
|
cacheKeyMap.set(key, {
|
|
3968
3968
|
namespace: keyPrefix,
|
|
3969
|
-
representationName: RepresentationType$
|
|
3969
|
+
representationName: RepresentationType$5,
|
|
3970
3970
|
mergeable: false
|
|
3971
3971
|
});
|
|
3972
3972
|
}
|
|
3973
|
-
function evictSuccess(luvio, resourceParams) {
|
|
3974
|
-
const key = keyBuilder$
|
|
3973
|
+
function evictSuccess$1(luvio, resourceParams) {
|
|
3974
|
+
const key = keyBuilder$e(luvio, resourceParams);
|
|
3975
3975
|
luvio.storeEvict(key);
|
|
3976
3976
|
}
|
|
3977
|
-
function createResourceRequest$
|
|
3977
|
+
function createResourceRequest$c(config) {
|
|
3978
3978
|
const headers = {};
|
|
3979
3979
|
return {
|
|
3980
3980
|
baseUri: '/services/data/v65.0',
|
|
@@ -3988,41 +3988,41 @@ function createResourceRequest$4(config) {
|
|
|
3988
3988
|
};
|
|
3989
3989
|
}
|
|
3990
3990
|
|
|
3991
|
-
const adapterName$
|
|
3991
|
+
const adapterName$9 = 'deletePersonalizationSchema';
|
|
3992
3992
|
const deletePersonalizationSchema_ConfigPropertyMetadata = [
|
|
3993
3993
|
generateParamConfigMetadata('idOrName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3994
3994
|
];
|
|
3995
|
-
const deletePersonalizationSchema_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3996
|
-
const createResourceParams$
|
|
3997
|
-
function typeCheckConfig$
|
|
3995
|
+
const deletePersonalizationSchema_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, deletePersonalizationSchema_ConfigPropertyMetadata);
|
|
3996
|
+
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$f(deletePersonalizationSchema_ConfigPropertyMetadata);
|
|
3997
|
+
function typeCheckConfig$9(untrustedConfig) {
|
|
3998
3998
|
const config = {};
|
|
3999
|
-
typeCheckConfig$
|
|
3999
|
+
typeCheckConfig$f(untrustedConfig, config, deletePersonalizationSchema_ConfigPropertyMetadata);
|
|
4000
4000
|
return config;
|
|
4001
4001
|
}
|
|
4002
|
-
function validateAdapterConfig$
|
|
4002
|
+
function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
|
|
4003
4003
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4004
4004
|
return null;
|
|
4005
4005
|
}
|
|
4006
4006
|
if (process.env.NODE_ENV !== 'production') {
|
|
4007
4007
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4008
4008
|
}
|
|
4009
|
-
const config = typeCheckConfig$
|
|
4009
|
+
const config = typeCheckConfig$9(untrustedConfig);
|
|
4010
4010
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4011
4011
|
return null;
|
|
4012
4012
|
}
|
|
4013
4013
|
return config;
|
|
4014
4014
|
}
|
|
4015
|
-
function buildNetworkSnapshot$
|
|
4016
|
-
const resourceParams = createResourceParams$
|
|
4017
|
-
const request = createResourceRequest$
|
|
4015
|
+
function buildNetworkSnapshot$9(luvio, config, options) {
|
|
4016
|
+
const resourceParams = createResourceParams$9(config);
|
|
4017
|
+
const request = createResourceRequest$c(resourceParams);
|
|
4018
4018
|
return luvio.dispatchResourceRequest(request, options)
|
|
4019
4019
|
.then(() => {
|
|
4020
4020
|
return luvio.handleSuccessResponse(() => {
|
|
4021
|
-
evictSuccess(luvio, resourceParams);
|
|
4021
|
+
evictSuccess$1(luvio, resourceParams);
|
|
4022
4022
|
return luvio.storeBroadcast();
|
|
4023
4023
|
}, () => {
|
|
4024
4024
|
const cache = new StoreKeyMap();
|
|
4025
|
-
getResponseCacheKeys$
|
|
4025
|
+
getResponseCacheKeys$9(cache, luvio, resourceParams);
|
|
4026
4026
|
return cache;
|
|
4027
4027
|
});
|
|
4028
4028
|
}, (response) => {
|
|
@@ -4032,33 +4032,33 @@ function buildNetworkSnapshot$4(luvio, config, options) {
|
|
|
4032
4032
|
}
|
|
4033
4033
|
const deletePersonalizationSchemaAdapterFactory = (luvio) => {
|
|
4034
4034
|
return function personalizationServicedeletePersonalizationSchema(untrustedConfig) {
|
|
4035
|
-
const config = validateAdapterConfig$
|
|
4035
|
+
const config = validateAdapterConfig$9(untrustedConfig, deletePersonalizationSchema_ConfigPropertyNames);
|
|
4036
4036
|
// Invalid or incomplete config
|
|
4037
4037
|
if (config === null) {
|
|
4038
|
-
throw new Error(`Invalid config for "${adapterName$
|
|
4038
|
+
throw new Error(`Invalid config for "${adapterName$9}"`);
|
|
4039
4039
|
}
|
|
4040
|
-
return buildNetworkSnapshot$
|
|
4040
|
+
return buildNetworkSnapshot$9(luvio, config);
|
|
4041
4041
|
};
|
|
4042
4042
|
};
|
|
4043
4043
|
|
|
4044
|
-
function select$
|
|
4045
|
-
return select$
|
|
4044
|
+
function select$f(luvio, params) {
|
|
4045
|
+
return select$h();
|
|
4046
4046
|
}
|
|
4047
|
-
function keyBuilder$
|
|
4048
|
-
return keyBuilder$
|
|
4047
|
+
function keyBuilder$d(luvio, params) {
|
|
4048
|
+
return keyBuilder$f(luvio, {
|
|
4049
4049
|
id: params.urlParams.idOrName
|
|
4050
4050
|
});
|
|
4051
4051
|
}
|
|
4052
|
-
function getResponseCacheKeys$
|
|
4053
|
-
getTypeCacheKeys$
|
|
4052
|
+
function getResponseCacheKeys$8(storeKeyMap, luvio, resourceParams, response) {
|
|
4053
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response);
|
|
4054
4054
|
}
|
|
4055
|
-
function ingestSuccess$
|
|
4055
|
+
function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
4056
4056
|
const { body } = response;
|
|
4057
|
-
const key = keyBuilder$
|
|
4058
|
-
luvio.storeIngest(key, ingest$
|
|
4057
|
+
const key = keyBuilder$d(luvio, resourceParams);
|
|
4058
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
4059
4059
|
const snapshot = luvio.storeLookup({
|
|
4060
4060
|
recordId: key,
|
|
4061
|
-
node: select$
|
|
4061
|
+
node: select$f(),
|
|
4062
4062
|
variables: {},
|
|
4063
4063
|
}, snapshotRefresh);
|
|
4064
4064
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4069,19 +4069,19 @@ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
4069
4069
|
deepFreeze(snapshot.data);
|
|
4070
4070
|
return snapshot;
|
|
4071
4071
|
}
|
|
4072
|
-
function ingestError$
|
|
4073
|
-
const key = keyBuilder$
|
|
4072
|
+
function ingestError$5(luvio, params, error, snapshotRefresh) {
|
|
4073
|
+
const key = keyBuilder$d(luvio, params);
|
|
4074
4074
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
4075
4075
|
const storeMetadataParams = {
|
|
4076
|
-
ttl: TTL$
|
|
4076
|
+
ttl: TTL$6,
|
|
4077
4077
|
namespace: keyPrefix,
|
|
4078
|
-
version: VERSION$
|
|
4079
|
-
representationName: RepresentationType$
|
|
4078
|
+
version: VERSION$8,
|
|
4079
|
+
representationName: RepresentationType$5
|
|
4080
4080
|
};
|
|
4081
4081
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4082
4082
|
return errorSnapshot;
|
|
4083
4083
|
}
|
|
4084
|
-
function createResourceRequest$
|
|
4084
|
+
function createResourceRequest$b(config) {
|
|
4085
4085
|
const headers = {};
|
|
4086
4086
|
return {
|
|
4087
4087
|
baseUri: '/services/data/v65.0',
|
|
@@ -4095,94 +4095,94 @@ function createResourceRequest$3(config) {
|
|
|
4095
4095
|
};
|
|
4096
4096
|
}
|
|
4097
4097
|
|
|
4098
|
-
const adapterName$
|
|
4098
|
+
const adapterName$8 = 'getPersonalizationSchema';
|
|
4099
4099
|
const getPersonalizationSchema_ConfigPropertyMetadata = [
|
|
4100
4100
|
generateParamConfigMetadata('idOrName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4101
4101
|
];
|
|
4102
|
-
const getPersonalizationSchema_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
4103
|
-
const createResourceParams$
|
|
4104
|
-
function keyBuilder$
|
|
4105
|
-
const resourceParams = createResourceParams$
|
|
4106
|
-
return keyBuilder$
|
|
4102
|
+
const getPersonalizationSchema_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, getPersonalizationSchema_ConfigPropertyMetadata);
|
|
4103
|
+
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$f(getPersonalizationSchema_ConfigPropertyMetadata);
|
|
4104
|
+
function keyBuilder$c(luvio, config) {
|
|
4105
|
+
const resourceParams = createResourceParams$8(config);
|
|
4106
|
+
return keyBuilder$d(luvio, resourceParams);
|
|
4107
4107
|
}
|
|
4108
|
-
function typeCheckConfig$
|
|
4108
|
+
function typeCheckConfig$8(untrustedConfig) {
|
|
4109
4109
|
const config = {};
|
|
4110
|
-
typeCheckConfig$
|
|
4110
|
+
typeCheckConfig$f(untrustedConfig, config, getPersonalizationSchema_ConfigPropertyMetadata);
|
|
4111
4111
|
return config;
|
|
4112
4112
|
}
|
|
4113
|
-
function validateAdapterConfig$
|
|
4113
|
+
function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
|
|
4114
4114
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4115
4115
|
return null;
|
|
4116
4116
|
}
|
|
4117
4117
|
if (process.env.NODE_ENV !== 'production') {
|
|
4118
4118
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4119
4119
|
}
|
|
4120
|
-
const config = typeCheckConfig$
|
|
4120
|
+
const config = typeCheckConfig$8(untrustedConfig);
|
|
4121
4121
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4122
4122
|
return null;
|
|
4123
4123
|
}
|
|
4124
4124
|
return config;
|
|
4125
4125
|
}
|
|
4126
|
-
function adapterFragment$
|
|
4127
|
-
createResourceParams$
|
|
4128
|
-
return select$
|
|
4126
|
+
function adapterFragment$5(luvio, config) {
|
|
4127
|
+
createResourceParams$8(config);
|
|
4128
|
+
return select$f();
|
|
4129
4129
|
}
|
|
4130
|
-
function onFetchResponseSuccess$
|
|
4131
|
-
const snapshot = ingestSuccess$
|
|
4130
|
+
function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
|
|
4131
|
+
const snapshot = ingestSuccess$7(luvio, resourceParams, response, {
|
|
4132
4132
|
config,
|
|
4133
|
-
resolve: () => buildNetworkSnapshot$
|
|
4133
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
4134
4134
|
});
|
|
4135
4135
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4136
4136
|
}
|
|
4137
|
-
function onFetchResponseError$
|
|
4138
|
-
const snapshot = ingestError$
|
|
4137
|
+
function onFetchResponseError$5(luvio, config, resourceParams, response) {
|
|
4138
|
+
const snapshot = ingestError$5(luvio, resourceParams, response, {
|
|
4139
4139
|
config,
|
|
4140
|
-
resolve: () => buildNetworkSnapshot$
|
|
4140
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
4141
4141
|
});
|
|
4142
4142
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4143
4143
|
}
|
|
4144
|
-
function buildNetworkSnapshot$
|
|
4145
|
-
const resourceParams = createResourceParams$
|
|
4146
|
-
const request = createResourceRequest$
|
|
4144
|
+
function buildNetworkSnapshot$8(luvio, config, options) {
|
|
4145
|
+
const resourceParams = createResourceParams$8(config);
|
|
4146
|
+
const request = createResourceRequest$b(resourceParams);
|
|
4147
4147
|
return luvio.dispatchResourceRequest(request, options)
|
|
4148
4148
|
.then((response) => {
|
|
4149
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
4149
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => {
|
|
4150
4150
|
const cache = new StoreKeyMap();
|
|
4151
|
-
getResponseCacheKeys$
|
|
4151
|
+
getResponseCacheKeys$8(cache, luvio, resourceParams, response.body);
|
|
4152
4152
|
return cache;
|
|
4153
4153
|
});
|
|
4154
4154
|
}, (response) => {
|
|
4155
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
4155
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$5(luvio, config, resourceParams, response));
|
|
4156
4156
|
});
|
|
4157
4157
|
}
|
|
4158
|
-
function buildNetworkSnapshotCachePolicy$
|
|
4159
|
-
return buildNetworkSnapshotCachePolicy$
|
|
4158
|
+
function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
|
|
4159
|
+
return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$8, undefined, false);
|
|
4160
4160
|
}
|
|
4161
|
-
function buildCachedSnapshotCachePolicy$
|
|
4161
|
+
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
4162
4162
|
const { luvio, config } = context;
|
|
4163
4163
|
const selector = {
|
|
4164
|
-
recordId: keyBuilder$
|
|
4165
|
-
node: adapterFragment$
|
|
4164
|
+
recordId: keyBuilder$c(luvio, config),
|
|
4165
|
+
node: adapterFragment$5(luvio, config),
|
|
4166
4166
|
variables: {},
|
|
4167
4167
|
};
|
|
4168
4168
|
const cacheSnapshot = storeLookup(selector, {
|
|
4169
4169
|
config,
|
|
4170
|
-
resolve: () => buildNetworkSnapshot$
|
|
4170
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
4171
4171
|
});
|
|
4172
4172
|
return cacheSnapshot;
|
|
4173
4173
|
}
|
|
4174
4174
|
const getPersonalizationSchemaAdapterFactory = (luvio) => function personalizationService__getPersonalizationSchema(untrustedConfig, requestContext) {
|
|
4175
|
-
const config = validateAdapterConfig$
|
|
4175
|
+
const config = validateAdapterConfig$8(untrustedConfig, getPersonalizationSchema_ConfigPropertyNames);
|
|
4176
4176
|
// Invalid or incomplete config
|
|
4177
4177
|
if (config === null) {
|
|
4178
4178
|
return null;
|
|
4179
4179
|
}
|
|
4180
4180
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
4181
|
-
buildCachedSnapshotCachePolicy$
|
|
4181
|
+
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
|
|
4182
4182
|
};
|
|
4183
4183
|
|
|
4184
|
-
const VERSION$
|
|
4185
|
-
function validate$
|
|
4184
|
+
const VERSION$7 = "4140d8b5bf494d4e8f3ef8713b0ffd7d";
|
|
4185
|
+
function validate$b(obj, path = 'PersonalizationRecommenderJobRepresentation') {
|
|
4186
4186
|
const v_error = (() => {
|
|
4187
4187
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4188
4188
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -4232,10 +4232,10 @@ function validate$8(obj, path = 'PersonalizationRecommenderJobRepresentation') {
|
|
|
4232
4232
|
})();
|
|
4233
4233
|
return v_error === undefined ? null : v_error;
|
|
4234
4234
|
}
|
|
4235
|
-
const select$
|
|
4235
|
+
const select$e = function PersonalizationRecommenderJobRepresentationSelect() {
|
|
4236
4236
|
return {
|
|
4237
4237
|
kind: 'Fragment',
|
|
4238
|
-
version: VERSION$
|
|
4238
|
+
version: VERSION$7,
|
|
4239
4239
|
private: [],
|
|
4240
4240
|
selections: [
|
|
4241
4241
|
{
|
|
@@ -4271,7 +4271,7 @@ const select$8 = function PersonalizationRecommenderJobRepresentationSelect() {
|
|
|
4271
4271
|
]
|
|
4272
4272
|
};
|
|
4273
4273
|
};
|
|
4274
|
-
function equals$
|
|
4274
|
+
function equals$8(existing, incoming) {
|
|
4275
4275
|
const existing_errorCode = existing.errorCode;
|
|
4276
4276
|
const incoming_errorCode = incoming.errorCode;
|
|
4277
4277
|
// if at least one of these optionals is defined
|
|
@@ -4353,9 +4353,9 @@ function equals$5(existing, incoming) {
|
|
|
4353
4353
|
return true;
|
|
4354
4354
|
}
|
|
4355
4355
|
|
|
4356
|
-
const TTL$
|
|
4357
|
-
const VERSION$
|
|
4358
|
-
function validate$
|
|
4356
|
+
const TTL$5 = 600;
|
|
4357
|
+
const VERSION$6 = "2fab2250d4ed5adcbb1a5c19a64cd765";
|
|
4358
|
+
function validate$a(obj, path = 'PersonalizationRecommenderJobCollectionRepresentation') {
|
|
4359
4359
|
const v_error = (() => {
|
|
4360
4360
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4361
4361
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -4376,7 +4376,7 @@ function validate$7(obj, path = 'PersonalizationRecommenderJobCollectionRepresen
|
|
|
4376
4376
|
for (let i = 0; i < obj_jobs.length; i++) {
|
|
4377
4377
|
const obj_jobs_item = obj_jobs[i];
|
|
4378
4378
|
const path_jobs_item = path_jobs + '[' + i + ']';
|
|
4379
|
-
const referencepath_jobs_itemValidationError = validate$
|
|
4379
|
+
const referencepath_jobs_itemValidationError = validate$b(obj_jobs_item, path_jobs_item);
|
|
4380
4380
|
if (referencepath_jobs_itemValidationError !== null) {
|
|
4381
4381
|
let message = 'Object doesn\'t match PersonalizationRecommenderJobRepresentation (at "' + path_jobs_item + '")\n';
|
|
4382
4382
|
message += referencepath_jobs_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -4394,15 +4394,15 @@ function validate$7(obj, path = 'PersonalizationRecommenderJobCollectionRepresen
|
|
|
4394
4394
|
})();
|
|
4395
4395
|
return v_error === undefined ? null : v_error;
|
|
4396
4396
|
}
|
|
4397
|
-
const RepresentationType$
|
|
4398
|
-
function normalize$
|
|
4397
|
+
const RepresentationType$4 = 'PersonalizationRecommenderJobCollectionRepresentation';
|
|
4398
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
4399
4399
|
return input;
|
|
4400
4400
|
}
|
|
4401
|
-
const select$
|
|
4402
|
-
const { selections: PersonalizationRecommenderJobRepresentation__selections, opaque: PersonalizationRecommenderJobRepresentation__opaque, } = select$
|
|
4401
|
+
const select$d = function PersonalizationRecommenderJobCollectionRepresentationSelect() {
|
|
4402
|
+
const { selections: PersonalizationRecommenderJobRepresentation__selections, opaque: PersonalizationRecommenderJobRepresentation__opaque, } = select$e();
|
|
4403
4403
|
return {
|
|
4404
4404
|
kind: 'Fragment',
|
|
4405
|
-
version: VERSION$
|
|
4405
|
+
version: VERSION$6,
|
|
4406
4406
|
private: [],
|
|
4407
4407
|
selections: [
|
|
4408
4408
|
{
|
|
@@ -4425,7 +4425,7 @@ const select$7 = function PersonalizationRecommenderJobCollectionRepresentationS
|
|
|
4425
4425
|
]
|
|
4426
4426
|
};
|
|
4427
4427
|
};
|
|
4428
|
-
function equals$
|
|
4428
|
+
function equals$7(existing, incoming) {
|
|
4429
4429
|
const existing_currentPageUrl = existing.currentPageUrl;
|
|
4430
4430
|
const incoming_currentPageUrl = incoming.currentPageUrl;
|
|
4431
4431
|
// if at least one of these optionals is defined
|
|
@@ -4462,7 +4462,7 @@ function equals$4(existing, incoming) {
|
|
|
4462
4462
|
return false;
|
|
4463
4463
|
}
|
|
4464
4464
|
const equals_jobs_items = equalsArray(existing_jobs, incoming_jobs, (existing_jobs_item, incoming_jobs_item) => {
|
|
4465
|
-
if (!(equals$
|
|
4465
|
+
if (!(equals$8(existing_jobs_item, incoming_jobs_item))) {
|
|
4466
4466
|
return false;
|
|
4467
4467
|
}
|
|
4468
4468
|
});
|
|
@@ -4472,44 +4472,44 @@ function equals$4(existing, incoming) {
|
|
|
4472
4472
|
}
|
|
4473
4473
|
return true;
|
|
4474
4474
|
}
|
|
4475
|
-
const ingest$
|
|
4475
|
+
const ingest$4 = function PersonalizationRecommenderJobCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
4476
4476
|
if (process.env.NODE_ENV !== 'production') {
|
|
4477
|
-
const validateError = validate$
|
|
4477
|
+
const validateError = validate$a(input);
|
|
4478
4478
|
if (validateError !== null) {
|
|
4479
4479
|
throw validateError;
|
|
4480
4480
|
}
|
|
4481
4481
|
}
|
|
4482
4482
|
const key = path.fullPath;
|
|
4483
|
-
const ttlToUse = TTL$
|
|
4484
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
4483
|
+
const ttlToUse = TTL$5;
|
|
4484
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "personalization-service", VERSION$6, RepresentationType$4, equals$7);
|
|
4485
4485
|
return createLink(key);
|
|
4486
4486
|
};
|
|
4487
|
-
function getTypeCacheKeys$
|
|
4487
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
4488
4488
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
4489
4489
|
const rootKey = fullPathFactory();
|
|
4490
4490
|
rootKeySet.set(rootKey, {
|
|
4491
4491
|
namespace: keyPrefix,
|
|
4492
|
-
representationName: RepresentationType$
|
|
4492
|
+
representationName: RepresentationType$4,
|
|
4493
4493
|
mergeable: false
|
|
4494
4494
|
});
|
|
4495
4495
|
}
|
|
4496
4496
|
|
|
4497
|
-
function select$
|
|
4498
|
-
return select$
|
|
4497
|
+
function select$c(luvio, params) {
|
|
4498
|
+
return select$d();
|
|
4499
4499
|
}
|
|
4500
|
-
function keyBuilder$
|
|
4500
|
+
function keyBuilder$b(luvio, params) {
|
|
4501
4501
|
return keyPrefix + '::PersonalizationRecommenderJobCollectionRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'idOrName:' + params.urlParams.idOrName + ')';
|
|
4502
4502
|
}
|
|
4503
|
-
function getResponseCacheKeys$
|
|
4504
|
-
getTypeCacheKeys$
|
|
4503
|
+
function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
|
|
4504
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$b(luvio, resourceParams));
|
|
4505
4505
|
}
|
|
4506
|
-
function ingestSuccess$
|
|
4506
|
+
function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
4507
4507
|
const { body } = response;
|
|
4508
|
-
const key = keyBuilder$
|
|
4509
|
-
luvio.storeIngest(key, ingest$
|
|
4508
|
+
const key = keyBuilder$b(luvio, resourceParams);
|
|
4509
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
4510
4510
|
const snapshot = luvio.storeLookup({
|
|
4511
4511
|
recordId: key,
|
|
4512
|
-
node: select$
|
|
4512
|
+
node: select$c(),
|
|
4513
4513
|
variables: {},
|
|
4514
4514
|
}, snapshotRefresh);
|
|
4515
4515
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4520,19 +4520,19 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
4520
4520
|
deepFreeze(snapshot.data);
|
|
4521
4521
|
return snapshot;
|
|
4522
4522
|
}
|
|
4523
|
-
function ingestError$
|
|
4524
|
-
const key = keyBuilder$
|
|
4523
|
+
function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
4524
|
+
const key = keyBuilder$b(luvio, params);
|
|
4525
4525
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
4526
4526
|
const storeMetadataParams = {
|
|
4527
|
-
ttl: TTL$
|
|
4527
|
+
ttl: TTL$5,
|
|
4528
4528
|
namespace: keyPrefix,
|
|
4529
|
-
version: VERSION$
|
|
4530
|
-
representationName: RepresentationType$
|
|
4529
|
+
version: VERSION$6,
|
|
4530
|
+
representationName: RepresentationType$4
|
|
4531
4531
|
};
|
|
4532
4532
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4533
4533
|
return errorSnapshot;
|
|
4534
4534
|
}
|
|
4535
|
-
function createResourceRequest$
|
|
4535
|
+
function createResourceRequest$a(config) {
|
|
4536
4536
|
const headers = {};
|
|
4537
4537
|
return {
|
|
4538
4538
|
baseUri: '/services/data/v65.0',
|
|
@@ -4546,95 +4546,95 @@ function createResourceRequest$2(config) {
|
|
|
4546
4546
|
};
|
|
4547
4547
|
}
|
|
4548
4548
|
|
|
4549
|
-
const adapterName$
|
|
4549
|
+
const adapterName$7 = 'getTrainingHistory';
|
|
4550
4550
|
const getTrainingHistory_ConfigPropertyMetadata = [
|
|
4551
4551
|
generateParamConfigMetadata('idOrName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4552
4552
|
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
4553
4553
|
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
4554
4554
|
];
|
|
4555
|
-
const getTrainingHistory_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
4556
|
-
const createResourceParams$
|
|
4557
|
-
function keyBuilder$
|
|
4558
|
-
const resourceParams = createResourceParams$
|
|
4559
|
-
return keyBuilder$
|
|
4555
|
+
const getTrainingHistory_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, getTrainingHistory_ConfigPropertyMetadata);
|
|
4556
|
+
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$f(getTrainingHistory_ConfigPropertyMetadata);
|
|
4557
|
+
function keyBuilder$a(luvio, config) {
|
|
4558
|
+
const resourceParams = createResourceParams$7(config);
|
|
4559
|
+
return keyBuilder$b(luvio, resourceParams);
|
|
4560
4560
|
}
|
|
4561
|
-
function typeCheckConfig$
|
|
4561
|
+
function typeCheckConfig$7(untrustedConfig) {
|
|
4562
4562
|
const config = {};
|
|
4563
|
-
typeCheckConfig$
|
|
4563
|
+
typeCheckConfig$f(untrustedConfig, config, getTrainingHistory_ConfigPropertyMetadata);
|
|
4564
4564
|
return config;
|
|
4565
4565
|
}
|
|
4566
|
-
function validateAdapterConfig$
|
|
4566
|
+
function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
|
|
4567
4567
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4568
4568
|
return null;
|
|
4569
4569
|
}
|
|
4570
4570
|
if (process.env.NODE_ENV !== 'production') {
|
|
4571
4571
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4572
4572
|
}
|
|
4573
|
-
const config = typeCheckConfig$
|
|
4573
|
+
const config = typeCheckConfig$7(untrustedConfig);
|
|
4574
4574
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4575
4575
|
return null;
|
|
4576
4576
|
}
|
|
4577
4577
|
return config;
|
|
4578
4578
|
}
|
|
4579
|
-
function adapterFragment$
|
|
4580
|
-
createResourceParams$
|
|
4581
|
-
return select$
|
|
4579
|
+
function adapterFragment$4(luvio, config) {
|
|
4580
|
+
createResourceParams$7(config);
|
|
4581
|
+
return select$c();
|
|
4582
4582
|
}
|
|
4583
|
-
function onFetchResponseSuccess$
|
|
4584
|
-
const snapshot = ingestSuccess$
|
|
4583
|
+
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
4584
|
+
const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
|
|
4585
4585
|
config,
|
|
4586
|
-
resolve: () => buildNetworkSnapshot$
|
|
4586
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
4587
4587
|
});
|
|
4588
4588
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4589
4589
|
}
|
|
4590
|
-
function onFetchResponseError$
|
|
4591
|
-
const snapshot = ingestError$
|
|
4590
|
+
function onFetchResponseError$4(luvio, config, resourceParams, response) {
|
|
4591
|
+
const snapshot = ingestError$4(luvio, resourceParams, response, {
|
|
4592
4592
|
config,
|
|
4593
|
-
resolve: () => buildNetworkSnapshot$
|
|
4593
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
4594
4594
|
});
|
|
4595
4595
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4596
4596
|
}
|
|
4597
|
-
function buildNetworkSnapshot$
|
|
4598
|
-
const resourceParams = createResourceParams$
|
|
4599
|
-
const request = createResourceRequest$
|
|
4597
|
+
function buildNetworkSnapshot$7(luvio, config, options) {
|
|
4598
|
+
const resourceParams = createResourceParams$7(config);
|
|
4599
|
+
const request = createResourceRequest$a(resourceParams);
|
|
4600
4600
|
return luvio.dispatchResourceRequest(request, options)
|
|
4601
4601
|
.then((response) => {
|
|
4602
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
4602
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
|
|
4603
4603
|
const cache = new StoreKeyMap();
|
|
4604
|
-
getResponseCacheKeys$
|
|
4604
|
+
getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
|
|
4605
4605
|
return cache;
|
|
4606
4606
|
});
|
|
4607
4607
|
}, (response) => {
|
|
4608
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
4608
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
|
|
4609
4609
|
});
|
|
4610
4610
|
}
|
|
4611
|
-
function buildNetworkSnapshotCachePolicy$
|
|
4612
|
-
return buildNetworkSnapshotCachePolicy$
|
|
4611
|
+
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
4612
|
+
return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$7, undefined, false);
|
|
4613
4613
|
}
|
|
4614
|
-
function buildCachedSnapshotCachePolicy$
|
|
4614
|
+
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
4615
4615
|
const { luvio, config } = context;
|
|
4616
4616
|
const selector = {
|
|
4617
|
-
recordId: keyBuilder$
|
|
4618
|
-
node: adapterFragment$
|
|
4617
|
+
recordId: keyBuilder$a(luvio, config),
|
|
4618
|
+
node: adapterFragment$4(luvio, config),
|
|
4619
4619
|
variables: {},
|
|
4620
4620
|
};
|
|
4621
4621
|
const cacheSnapshot = storeLookup(selector, {
|
|
4622
4622
|
config,
|
|
4623
|
-
resolve: () => buildNetworkSnapshot$
|
|
4623
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
4624
4624
|
});
|
|
4625
4625
|
return cacheSnapshot;
|
|
4626
4626
|
}
|
|
4627
4627
|
const getTrainingHistoryAdapterFactory = (luvio) => function personalizationService__getTrainingHistory(untrustedConfig, requestContext) {
|
|
4628
|
-
const config = validateAdapterConfig$
|
|
4628
|
+
const config = validateAdapterConfig$7(untrustedConfig, getTrainingHistory_ConfigPropertyNames);
|
|
4629
4629
|
// Invalid or incomplete config
|
|
4630
4630
|
if (config === null) {
|
|
4631
4631
|
return null;
|
|
4632
4632
|
}
|
|
4633
4633
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
4634
|
-
buildCachedSnapshotCachePolicy$
|
|
4634
|
+
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
|
|
4635
4635
|
};
|
|
4636
4636
|
|
|
4637
|
-
function validate$
|
|
4637
|
+
function validate$9(obj, path = 'AnchorReferenceRepresentation') {
|
|
4638
4638
|
const v_error = (() => {
|
|
4639
4639
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4640
4640
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -4653,7 +4653,7 @@ function validate$6(obj, path = 'AnchorReferenceRepresentation') {
|
|
|
4653
4653
|
return v_error === undefined ? null : v_error;
|
|
4654
4654
|
}
|
|
4655
4655
|
|
|
4656
|
-
function validate$
|
|
4656
|
+
function validate$8(obj, path = 'RuleGroupInputRepresentation2') {
|
|
4657
4657
|
const v_error = (() => {
|
|
4658
4658
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4659
4659
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -4679,7 +4679,7 @@ function validate$5(obj, path = 'RuleGroupInputRepresentation2') {
|
|
|
4679
4679
|
return v_error === undefined ? null : v_error;
|
|
4680
4680
|
}
|
|
4681
4681
|
|
|
4682
|
-
function validate$
|
|
4682
|
+
function validate$7(obj, path = 'RuleGroupInputRepresentation') {
|
|
4683
4683
|
const v_error = (() => {
|
|
4684
4684
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4685
4685
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -4705,9 +4705,9 @@ function validate$4(obj, path = 'RuleGroupInputRepresentation') {
|
|
|
4705
4705
|
return v_error === undefined ? null : v_error;
|
|
4706
4706
|
}
|
|
4707
4707
|
|
|
4708
|
-
const TTL$
|
|
4709
|
-
const VERSION$
|
|
4710
|
-
function validate$
|
|
4708
|
+
const TTL$4 = 600;
|
|
4709
|
+
const VERSION$5 = "03b72d395296cf8da94dcea60a4830e8";
|
|
4710
|
+
function validate$6(obj, path = 'PersonalizationRecommenderSimulateActionRepresentation') {
|
|
4711
4711
|
const v_error = (() => {
|
|
4712
4712
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4713
4713
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -4720,14 +4720,14 @@ function validate$3(obj, path = 'PersonalizationRecommenderSimulateActionReprese
|
|
|
4720
4720
|
})();
|
|
4721
4721
|
return v_error === undefined ? null : v_error;
|
|
4722
4722
|
}
|
|
4723
|
-
const RepresentationType$
|
|
4724
|
-
function normalize$
|
|
4723
|
+
const RepresentationType$3 = 'PersonalizationRecommenderSimulateActionRepresentation';
|
|
4724
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
4725
4725
|
return input;
|
|
4726
4726
|
}
|
|
4727
|
-
const select$
|
|
4727
|
+
const select$b = function PersonalizationRecommenderSimulateActionRepresentationSelect() {
|
|
4728
4728
|
return {
|
|
4729
4729
|
kind: 'Fragment',
|
|
4730
|
-
version: VERSION$
|
|
4730
|
+
version: VERSION$5,
|
|
4731
4731
|
private: [],
|
|
4732
4732
|
selections: [
|
|
4733
4733
|
{
|
|
@@ -4738,7 +4738,7 @@ const select$5 = function PersonalizationRecommenderSimulateActionRepresentation
|
|
|
4738
4738
|
]
|
|
4739
4739
|
};
|
|
4740
4740
|
};
|
|
4741
|
-
function equals$
|
|
4741
|
+
function equals$6(existing, incoming) {
|
|
4742
4742
|
const existing_recommendations = existing.recommendations;
|
|
4743
4743
|
const incoming_recommendations = incoming.recommendations;
|
|
4744
4744
|
if (JSONStringify(incoming_recommendations) !== JSONStringify(existing_recommendations)) {
|
|
@@ -4746,45 +4746,45 @@ function equals$3(existing, incoming) {
|
|
|
4746
4746
|
}
|
|
4747
4747
|
return true;
|
|
4748
4748
|
}
|
|
4749
|
-
const ingest$
|
|
4749
|
+
const ingest$3 = function PersonalizationRecommenderSimulateActionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
4750
4750
|
if (process.env.NODE_ENV !== 'production') {
|
|
4751
|
-
const validateError = validate$
|
|
4751
|
+
const validateError = validate$6(input);
|
|
4752
4752
|
if (validateError !== null) {
|
|
4753
4753
|
throw validateError;
|
|
4754
4754
|
}
|
|
4755
4755
|
}
|
|
4756
4756
|
const key = path.fullPath;
|
|
4757
|
-
const ttlToUse = TTL$
|
|
4758
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
4757
|
+
const ttlToUse = TTL$4;
|
|
4758
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "personalization-service", VERSION$5, RepresentationType$3, equals$6);
|
|
4759
4759
|
return createLink(key);
|
|
4760
4760
|
};
|
|
4761
|
-
function getTypeCacheKeys$
|
|
4761
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
4762
4762
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
4763
4763
|
const rootKey = fullPathFactory();
|
|
4764
4764
|
rootKeySet.set(rootKey, {
|
|
4765
4765
|
namespace: keyPrefix,
|
|
4766
|
-
representationName: RepresentationType$
|
|
4766
|
+
representationName: RepresentationType$3,
|
|
4767
4767
|
mergeable: false
|
|
4768
4768
|
});
|
|
4769
4769
|
}
|
|
4770
4770
|
|
|
4771
|
-
function select$
|
|
4772
|
-
return select$
|
|
4771
|
+
function select$a(luvio, params) {
|
|
4772
|
+
return select$b();
|
|
4773
4773
|
}
|
|
4774
|
-
function keyBuilder$
|
|
4774
|
+
function keyBuilder$9(luvio, params) {
|
|
4775
4775
|
var _a, _b, _c, _d, _e, _f;
|
|
4776
4776
|
return keyPrefix + '::PersonalizationRecommenderSimulateActionRepresentation:(' + 'idOrName:' + params.urlParams.idOrName + ',' + (params.body.anchors === undefined ? undefined : ('[' + params.body.anchors.map(element => 'anchors.dmoName:' + element.dmoName + '::' + 'anchors.id:' + element.id).join(',') + ']')) + '::' + (((_a = params.body.excludeFilters) === null || _a === void 0 ? void 0 : _a.operator) === undefined ? 'excludeFilters.operator' : 'excludeFilters.operator:' + ((_b = params.body.excludeFilters) === null || _b === void 0 ? void 0 : _b.operator)) + '::' + '[' + ((_c = params.body.excludeFilters) === null || _c === void 0 ? void 0 : _c.rules.map(element => stableJSONStringify(element)).join(',')) + ']' + '::' + (((_d = params.body.includeFilters) === null || _d === void 0 ? void 0 : _d.operator) === undefined ? 'includeFilters.operator' : 'includeFilters.operator:' + ((_e = params.body.includeFilters) === null || _e === void 0 ? void 0 : _e.operator)) + '::' + '[' + ((_f = params.body.includeFilters) === null || _f === void 0 ? void 0 : _f.rules.map(element => stableJSONStringify(element)).join(',')) + ']' + '::' + (params.body.individualId === undefined ? 'individualId' : 'individualId:' + params.body.individualId) + ')';
|
|
4777
4777
|
}
|
|
4778
|
-
function getResponseCacheKeys$
|
|
4779
|
-
getTypeCacheKeys$
|
|
4778
|
+
function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
|
|
4779
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$9(luvio, resourceParams));
|
|
4780
4780
|
}
|
|
4781
|
-
function ingestSuccess$
|
|
4781
|
+
function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
4782
4782
|
const { body } = response;
|
|
4783
|
-
const key = keyBuilder$
|
|
4784
|
-
luvio.storeIngest(key, ingest$
|
|
4783
|
+
const key = keyBuilder$9(luvio, resourceParams);
|
|
4784
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
4785
4785
|
const snapshot = luvio.storeLookup({
|
|
4786
4786
|
recordId: key,
|
|
4787
|
-
node: select$
|
|
4787
|
+
node: select$a(),
|
|
4788
4788
|
variables: {},
|
|
4789
4789
|
}, snapshotRefresh);
|
|
4790
4790
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4795,19 +4795,19 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
4795
4795
|
deepFreeze(snapshot.data);
|
|
4796
4796
|
return snapshot;
|
|
4797
4797
|
}
|
|
4798
|
-
function ingestError$
|
|
4799
|
-
const key = keyBuilder$
|
|
4798
|
+
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
4799
|
+
const key = keyBuilder$9(luvio, params);
|
|
4800
4800
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
4801
4801
|
const storeMetadataParams = {
|
|
4802
|
-
ttl: TTL$
|
|
4802
|
+
ttl: TTL$4,
|
|
4803
4803
|
namespace: keyPrefix,
|
|
4804
|
-
version: VERSION$
|
|
4805
|
-
representationName: RepresentationType$
|
|
4804
|
+
version: VERSION$5,
|
|
4805
|
+
representationName: RepresentationType$3
|
|
4806
4806
|
};
|
|
4807
4807
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4808
4808
|
return errorSnapshot;
|
|
4809
4809
|
}
|
|
4810
|
-
function createResourceRequest$
|
|
4810
|
+
function createResourceRequest$9(config) {
|
|
4811
4811
|
const headers = {};
|
|
4812
4812
|
return {
|
|
4813
4813
|
baseUri: '/services/data/v65.0',
|
|
@@ -4821,7 +4821,7 @@ function createResourceRequest$1(config) {
|
|
|
4821
4821
|
};
|
|
4822
4822
|
}
|
|
4823
4823
|
|
|
4824
|
-
const adapterName$
|
|
4824
|
+
const adapterName$6 = 'postPersonalizationRecommenderSimulateAction';
|
|
4825
4825
|
const postPersonalizationRecommenderSimulateAction_ConfigPropertyMetadata = [
|
|
4826
4826
|
generateParamConfigMetadata('idOrName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4827
4827
|
generateParamConfigMetadata('anchors', false, 2 /* Body */, 4 /* Unsupported */, true),
|
|
@@ -4829,21 +4829,21 @@ const postPersonalizationRecommenderSimulateAction_ConfigPropertyMetadata = [
|
|
|
4829
4829
|
generateParamConfigMetadata('includeFilters', false, 2 /* Body */, 4 /* Unsupported */),
|
|
4830
4830
|
generateParamConfigMetadata('individualId', false, 2 /* Body */, 4 /* Unsupported */),
|
|
4831
4831
|
];
|
|
4832
|
-
const postPersonalizationRecommenderSimulateAction_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
4833
|
-
const createResourceParams$
|
|
4834
|
-
function keyBuilder$
|
|
4835
|
-
const resourceParams = createResourceParams$
|
|
4836
|
-
return keyBuilder$
|
|
4832
|
+
const postPersonalizationRecommenderSimulateAction_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, postPersonalizationRecommenderSimulateAction_ConfigPropertyMetadata);
|
|
4833
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$f(postPersonalizationRecommenderSimulateAction_ConfigPropertyMetadata);
|
|
4834
|
+
function keyBuilder$8(luvio, config) {
|
|
4835
|
+
const resourceParams = createResourceParams$6(config);
|
|
4836
|
+
return keyBuilder$9(luvio, resourceParams);
|
|
4837
4837
|
}
|
|
4838
|
-
function typeCheckConfig$
|
|
4838
|
+
function typeCheckConfig$6(untrustedConfig) {
|
|
4839
4839
|
const config = {};
|
|
4840
|
-
typeCheckConfig$
|
|
4840
|
+
typeCheckConfig$f(untrustedConfig, config, postPersonalizationRecommenderSimulateAction_ConfigPropertyMetadata);
|
|
4841
4841
|
const untrustedConfig_anchors = untrustedConfig.anchors;
|
|
4842
4842
|
if (ArrayIsArray$1(untrustedConfig_anchors)) {
|
|
4843
4843
|
const untrustedConfig_anchors_array = [];
|
|
4844
4844
|
for (let i = 0, arrayLength = untrustedConfig_anchors.length; i < arrayLength; i++) {
|
|
4845
4845
|
const untrustedConfig_anchors_item = untrustedConfig_anchors[i];
|
|
4846
|
-
const referenceAnchorReferenceRepresentationValidationError = validate$
|
|
4846
|
+
const referenceAnchorReferenceRepresentationValidationError = validate$9(untrustedConfig_anchors_item);
|
|
4847
4847
|
if (referenceAnchorReferenceRepresentationValidationError === null) {
|
|
4848
4848
|
untrustedConfig_anchors_array.push(untrustedConfig_anchors_item);
|
|
4849
4849
|
}
|
|
@@ -4851,12 +4851,12 @@ function typeCheckConfig$1(untrustedConfig) {
|
|
|
4851
4851
|
config.anchors = untrustedConfig_anchors_array;
|
|
4852
4852
|
}
|
|
4853
4853
|
const untrustedConfig_excludeFilters = untrustedConfig.excludeFilters;
|
|
4854
|
-
const referenceRuleGroupInputRepresentation2ValidationError = validate$
|
|
4854
|
+
const referenceRuleGroupInputRepresentation2ValidationError = validate$8(untrustedConfig_excludeFilters);
|
|
4855
4855
|
if (referenceRuleGroupInputRepresentation2ValidationError === null) {
|
|
4856
4856
|
config.excludeFilters = untrustedConfig_excludeFilters;
|
|
4857
4857
|
}
|
|
4858
4858
|
const untrustedConfig_includeFilters = untrustedConfig.includeFilters;
|
|
4859
|
-
const referenceRuleGroupInputRepresentationValidationError = validate$
|
|
4859
|
+
const referenceRuleGroupInputRepresentationValidationError = validate$7(untrustedConfig_includeFilters);
|
|
4860
4860
|
if (referenceRuleGroupInputRepresentationValidationError === null) {
|
|
4861
4861
|
config.includeFilters = untrustedConfig_includeFilters;
|
|
4862
4862
|
}
|
|
@@ -4869,79 +4869,79 @@ function typeCheckConfig$1(untrustedConfig) {
|
|
|
4869
4869
|
}
|
|
4870
4870
|
return config;
|
|
4871
4871
|
}
|
|
4872
|
-
function validateAdapterConfig$
|
|
4872
|
+
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
4873
4873
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4874
4874
|
return null;
|
|
4875
4875
|
}
|
|
4876
4876
|
if (process.env.NODE_ENV !== 'production') {
|
|
4877
4877
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4878
4878
|
}
|
|
4879
|
-
const config = typeCheckConfig$
|
|
4879
|
+
const config = typeCheckConfig$6(untrustedConfig);
|
|
4880
4880
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4881
4881
|
return null;
|
|
4882
4882
|
}
|
|
4883
4883
|
return config;
|
|
4884
4884
|
}
|
|
4885
|
-
function adapterFragment$
|
|
4886
|
-
createResourceParams$
|
|
4887
|
-
return select$
|
|
4885
|
+
function adapterFragment$3(luvio, config) {
|
|
4886
|
+
createResourceParams$6(config);
|
|
4887
|
+
return select$a();
|
|
4888
4888
|
}
|
|
4889
|
-
function onFetchResponseSuccess$
|
|
4890
|
-
const snapshot = ingestSuccess$
|
|
4889
|
+
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
4890
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
|
|
4891
4891
|
config,
|
|
4892
|
-
resolve: () => buildNetworkSnapshot$
|
|
4892
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
4893
4893
|
});
|
|
4894
4894
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4895
4895
|
}
|
|
4896
|
-
function onFetchResponseError$
|
|
4897
|
-
const snapshot = ingestError$
|
|
4896
|
+
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
4897
|
+
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
4898
4898
|
config,
|
|
4899
|
-
resolve: () => buildNetworkSnapshot$
|
|
4899
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
4900
4900
|
});
|
|
4901
4901
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4902
4902
|
}
|
|
4903
|
-
function buildNetworkSnapshot$
|
|
4904
|
-
const resourceParams = createResourceParams$
|
|
4905
|
-
const request = createResourceRequest$
|
|
4903
|
+
function buildNetworkSnapshot$6(luvio, config, options) {
|
|
4904
|
+
const resourceParams = createResourceParams$6(config);
|
|
4905
|
+
const request = createResourceRequest$9(resourceParams);
|
|
4906
4906
|
return luvio.dispatchResourceRequest(request, options)
|
|
4907
4907
|
.then((response) => {
|
|
4908
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
4908
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
4909
4909
|
const cache = new StoreKeyMap();
|
|
4910
|
-
getResponseCacheKeys$
|
|
4910
|
+
getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
|
|
4911
4911
|
return cache;
|
|
4912
4912
|
});
|
|
4913
4913
|
}, (response) => {
|
|
4914
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
4914
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
|
|
4915
4915
|
});
|
|
4916
4916
|
}
|
|
4917
|
-
function buildNetworkSnapshotCachePolicy$
|
|
4918
|
-
return buildNetworkSnapshotCachePolicy$
|
|
4917
|
+
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
4918
|
+
return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, 'get', false);
|
|
4919
4919
|
}
|
|
4920
|
-
function buildCachedSnapshotCachePolicy$
|
|
4920
|
+
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
4921
4921
|
const { luvio, config } = context;
|
|
4922
4922
|
const selector = {
|
|
4923
|
-
recordId: keyBuilder$
|
|
4924
|
-
node: adapterFragment$
|
|
4923
|
+
recordId: keyBuilder$8(luvio, config),
|
|
4924
|
+
node: adapterFragment$3(luvio, config),
|
|
4925
4925
|
variables: {},
|
|
4926
4926
|
};
|
|
4927
4927
|
const cacheSnapshot = storeLookup(selector, {
|
|
4928
4928
|
config,
|
|
4929
|
-
resolve: () => buildNetworkSnapshot$
|
|
4929
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
4930
4930
|
});
|
|
4931
4931
|
return cacheSnapshot;
|
|
4932
4932
|
}
|
|
4933
4933
|
const postPersonalizationRecommenderSimulateActionAdapterFactory = (luvio) => function personalizationService__postPersonalizationRecommenderSimulateAction(untrustedConfig, requestContext) {
|
|
4934
|
-
const config = validateAdapterConfig$
|
|
4934
|
+
const config = validateAdapterConfig$6(untrustedConfig, postPersonalizationRecommenderSimulateAction_ConfigPropertyNames);
|
|
4935
4935
|
// Invalid or incomplete config
|
|
4936
4936
|
if (config === null) {
|
|
4937
4937
|
return null;
|
|
4938
4938
|
}
|
|
4939
4939
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
4940
|
-
buildCachedSnapshotCachePolicy$
|
|
4940
|
+
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
4941
4941
|
};
|
|
4942
4942
|
|
|
4943
|
-
const VERSION$
|
|
4944
|
-
function validate$
|
|
4943
|
+
const VERSION$4 = "e68c48ce57702a3f1e8ca445bbbcbbcf";
|
|
4944
|
+
function validate$5(obj, path = 'PersonalizationDataMlModelInputFeatureRepresentation') {
|
|
4945
4945
|
const v_error = (() => {
|
|
4946
4946
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4947
4947
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -4964,10 +4964,10 @@ function validate$2(obj, path = 'PersonalizationDataMlModelInputFeatureRepresent
|
|
|
4964
4964
|
})();
|
|
4965
4965
|
return v_error === undefined ? null : v_error;
|
|
4966
4966
|
}
|
|
4967
|
-
const select$
|
|
4967
|
+
const select$9 = function PersonalizationDataMlModelInputFeatureRepresentationSelect() {
|
|
4968
4968
|
return {
|
|
4969
4969
|
kind: 'Fragment',
|
|
4970
|
-
version: VERSION$
|
|
4970
|
+
version: VERSION$4,
|
|
4971
4971
|
private: [],
|
|
4972
4972
|
selections: [
|
|
4973
4973
|
{
|
|
@@ -4987,7 +4987,7 @@ const select$3 = function PersonalizationDataMlModelInputFeatureRepresentationSe
|
|
|
4987
4987
|
]
|
|
4988
4988
|
};
|
|
4989
4989
|
};
|
|
4990
|
-
function equals$
|
|
4990
|
+
function equals$5(existing, incoming) {
|
|
4991
4991
|
const existing_type = existing.type;
|
|
4992
4992
|
const incoming_type = incoming.type;
|
|
4993
4993
|
if (!(existing_type === incoming_type)) {
|
|
@@ -5006,8 +5006,8 @@ function equals$2(existing, incoming) {
|
|
|
5006
5006
|
return true;
|
|
5007
5007
|
}
|
|
5008
5008
|
|
|
5009
|
-
const VERSION$
|
|
5010
|
-
function validate$
|
|
5009
|
+
const VERSION$3 = "d1b90f3586125de94a321fae68717c07";
|
|
5010
|
+
function validate$4(obj, path = 'PersonalizationDataMlModelRepresentation') {
|
|
5011
5011
|
const v_error = (() => {
|
|
5012
5012
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
5013
5013
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -5020,7 +5020,7 @@ function validate$1(obj, path = 'PersonalizationDataMlModelRepresentation') {
|
|
|
5020
5020
|
for (let i = 0; i < obj_dataMlModelInputs.length; i++) {
|
|
5021
5021
|
const obj_dataMlModelInputs_item = obj_dataMlModelInputs[i];
|
|
5022
5022
|
const path_dataMlModelInputs_item = path_dataMlModelInputs + '[' + i + ']';
|
|
5023
|
-
const referencepath_dataMlModelInputs_itemValidationError = validate$
|
|
5023
|
+
const referencepath_dataMlModelInputs_itemValidationError = validate$5(obj_dataMlModelInputs_item, path_dataMlModelInputs_item);
|
|
5024
5024
|
if (referencepath_dataMlModelInputs_itemValidationError !== null) {
|
|
5025
5025
|
let message = 'Object doesn\'t match PersonalizationDataMlModelInputFeatureRepresentation (at "' + path_dataMlModelInputs_item + '")\n';
|
|
5026
5026
|
message += referencepath_dataMlModelInputs_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -5065,11 +5065,11 @@ function validate$1(obj, path = 'PersonalizationDataMlModelRepresentation') {
|
|
|
5065
5065
|
})();
|
|
5066
5066
|
return v_error === undefined ? null : v_error;
|
|
5067
5067
|
}
|
|
5068
|
-
const select$
|
|
5069
|
-
const { selections: PersonalizationDataMlModelInputFeatureRepresentation__selections, opaque: PersonalizationDataMlModelInputFeatureRepresentation__opaque, } = select$
|
|
5068
|
+
const select$8 = function PersonalizationDataMlModelRepresentationSelect() {
|
|
5069
|
+
const { selections: PersonalizationDataMlModelInputFeatureRepresentation__selections, opaque: PersonalizationDataMlModelInputFeatureRepresentation__opaque, } = select$9();
|
|
5070
5070
|
return {
|
|
5071
5071
|
kind: 'Fragment',
|
|
5072
|
-
version: VERSION$
|
|
5072
|
+
version: VERSION$3,
|
|
5073
5073
|
private: [],
|
|
5074
5074
|
selections: [
|
|
5075
5075
|
{
|
|
@@ -5111,7 +5111,7 @@ const select$2 = function PersonalizationDataMlModelRepresentationSelect() {
|
|
|
5111
5111
|
]
|
|
5112
5112
|
};
|
|
5113
5113
|
};
|
|
5114
|
-
function equals$
|
|
5114
|
+
function equals$4(existing, incoming) {
|
|
5115
5115
|
const existing_dataSpaceName = existing.dataSpaceName;
|
|
5116
5116
|
const incoming_dataSpaceName = incoming.dataSpaceName;
|
|
5117
5117
|
if (!(existing_dataSpaceName === incoming_dataSpaceName)) {
|
|
@@ -5140,7 +5140,7 @@ function equals$1(existing, incoming) {
|
|
|
5140
5140
|
const existing_dataMlModelInputs = existing.dataMlModelInputs;
|
|
5141
5141
|
const incoming_dataMlModelInputs = incoming.dataMlModelInputs;
|
|
5142
5142
|
const equals_dataMlModelInputs_items = equalsArray(existing_dataMlModelInputs, incoming_dataMlModelInputs, (existing_dataMlModelInputs_item, incoming_dataMlModelInputs_item) => {
|
|
5143
|
-
if (!(equals$
|
|
5143
|
+
if (!(equals$5(existing_dataMlModelInputs_item, incoming_dataMlModelInputs_item))) {
|
|
5144
5144
|
return false;
|
|
5145
5145
|
}
|
|
5146
5146
|
});
|
|
@@ -5160,9 +5160,9 @@ function equals$1(existing, incoming) {
|
|
|
5160
5160
|
return true;
|
|
5161
5161
|
}
|
|
5162
5162
|
|
|
5163
|
-
const TTL = 600;
|
|
5164
|
-
const VERSION = "9dbc0875b97dc0f9ec2f23b3481be0b8";
|
|
5165
|
-
function validate(obj, path = 'PersonalizationDataMlModelCollectionRepresentation') {
|
|
5163
|
+
const TTL$3 = 600;
|
|
5164
|
+
const VERSION$2 = "9dbc0875b97dc0f9ec2f23b3481be0b8";
|
|
5165
|
+
function validate$3(obj, path = 'PersonalizationDataMlModelCollectionRepresentation') {
|
|
5166
5166
|
const v_error = (() => {
|
|
5167
5167
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
5168
5168
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -5175,7 +5175,7 @@ function validate(obj, path = 'PersonalizationDataMlModelCollectionRepresentatio
|
|
|
5175
5175
|
for (let i = 0; i < obj_personalizationDataMlModels.length; i++) {
|
|
5176
5176
|
const obj_personalizationDataMlModels_item = obj_personalizationDataMlModels[i];
|
|
5177
5177
|
const path_personalizationDataMlModels_item = path_personalizationDataMlModels + '[' + i + ']';
|
|
5178
|
-
const referencepath_personalizationDataMlModels_itemValidationError = validate$
|
|
5178
|
+
const referencepath_personalizationDataMlModels_itemValidationError = validate$4(obj_personalizationDataMlModels_item, path_personalizationDataMlModels_item);
|
|
5179
5179
|
if (referencepath_personalizationDataMlModels_itemValidationError !== null) {
|
|
5180
5180
|
let message = 'Object doesn\'t match PersonalizationDataMlModelRepresentation (at "' + path_personalizationDataMlModels_item + '")\n';
|
|
5181
5181
|
message += referencepath_personalizationDataMlModels_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -5185,15 +5185,15 @@ function validate(obj, path = 'PersonalizationDataMlModelCollectionRepresentatio
|
|
|
5185
5185
|
})();
|
|
5186
5186
|
return v_error === undefined ? null : v_error;
|
|
5187
5187
|
}
|
|
5188
|
-
const RepresentationType = 'PersonalizationDataMlModelCollectionRepresentation';
|
|
5189
|
-
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
5188
|
+
const RepresentationType$2 = 'PersonalizationDataMlModelCollectionRepresentation';
|
|
5189
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
5190
5190
|
return input;
|
|
5191
5191
|
}
|
|
5192
|
-
const select$
|
|
5193
|
-
const { selections: PersonalizationDataMlModelRepresentation__selections, opaque: PersonalizationDataMlModelRepresentation__opaque, } = select$
|
|
5192
|
+
const select$7 = function PersonalizationDataMlModelCollectionRepresentationSelect() {
|
|
5193
|
+
const { selections: PersonalizationDataMlModelRepresentation__selections, opaque: PersonalizationDataMlModelRepresentation__opaque, } = select$8();
|
|
5194
5194
|
return {
|
|
5195
5195
|
kind: 'Fragment',
|
|
5196
|
-
version: VERSION,
|
|
5196
|
+
version: VERSION$2,
|
|
5197
5197
|
private: [],
|
|
5198
5198
|
selections: [
|
|
5199
5199
|
{
|
|
@@ -5205,11 +5205,11 @@ const select$1 = function PersonalizationDataMlModelCollectionRepresentationSele
|
|
|
5205
5205
|
]
|
|
5206
5206
|
};
|
|
5207
5207
|
};
|
|
5208
|
-
function equals(existing, incoming) {
|
|
5208
|
+
function equals$3(existing, incoming) {
|
|
5209
5209
|
const existing_personalizationDataMlModels = existing.personalizationDataMlModels;
|
|
5210
5210
|
const incoming_personalizationDataMlModels = incoming.personalizationDataMlModels;
|
|
5211
5211
|
const equals_personalizationDataMlModels_items = equalsArray(existing_personalizationDataMlModels, incoming_personalizationDataMlModels, (existing_personalizationDataMlModels_item, incoming_personalizationDataMlModels_item) => {
|
|
5212
|
-
if (!(equals$
|
|
5212
|
+
if (!(equals$4(existing_personalizationDataMlModels_item, incoming_personalizationDataMlModels_item))) {
|
|
5213
5213
|
return false;
|
|
5214
5214
|
}
|
|
5215
5215
|
});
|
|
@@ -5218,44 +5218,44 @@ function equals(existing, incoming) {
|
|
|
5218
5218
|
}
|
|
5219
5219
|
return true;
|
|
5220
5220
|
}
|
|
5221
|
-
const ingest = function PersonalizationDataMlModelCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
5221
|
+
const ingest$2 = function PersonalizationDataMlModelCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
5222
5222
|
if (process.env.NODE_ENV !== 'production') {
|
|
5223
|
-
const validateError = validate(input);
|
|
5223
|
+
const validateError = validate$3(input);
|
|
5224
5224
|
if (validateError !== null) {
|
|
5225
5225
|
throw validateError;
|
|
5226
5226
|
}
|
|
5227
5227
|
}
|
|
5228
5228
|
const key = path.fullPath;
|
|
5229
|
-
const ttlToUse = TTL;
|
|
5230
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "personalization-service", VERSION, RepresentationType, equals);
|
|
5229
|
+
const ttlToUse = TTL$3;
|
|
5230
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "personalization-service", VERSION$2, RepresentationType$2, equals$3);
|
|
5231
5231
|
return createLink(key);
|
|
5232
5232
|
};
|
|
5233
|
-
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
5233
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
5234
5234
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
5235
5235
|
const rootKey = fullPathFactory();
|
|
5236
5236
|
rootKeySet.set(rootKey, {
|
|
5237
5237
|
namespace: keyPrefix,
|
|
5238
|
-
representationName: RepresentationType,
|
|
5238
|
+
representationName: RepresentationType$2,
|
|
5239
5239
|
mergeable: false
|
|
5240
5240
|
});
|
|
5241
5241
|
}
|
|
5242
5242
|
|
|
5243
|
-
function select(luvio, params) {
|
|
5244
|
-
return select$
|
|
5243
|
+
function select$6(luvio, params) {
|
|
5244
|
+
return select$7();
|
|
5245
5245
|
}
|
|
5246
|
-
function keyBuilder$
|
|
5246
|
+
function keyBuilder$7(luvio, params) {
|
|
5247
5247
|
return keyPrefix + '::PersonalizationDataMlModelCollectionRepresentation:(' + 'dataSpaceName:' + params.queryParams.dataSpaceName + ',' + 'limit:' + params.queryParams.limit + ',' + 'mlConfiguredModelName:' + params.queryParams.mlConfiguredModelName + ',' + 'offset:' + params.queryParams.offset + ',' + 'profileDataGraphName:' + params.queryParams.profileDataGraphName + ',' + 'status:' + params.queryParams.status + ')';
|
|
5248
5248
|
}
|
|
5249
|
-
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
5250
|
-
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$
|
|
5249
|
+
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
5250
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$7(luvio, resourceParams));
|
|
5251
5251
|
}
|
|
5252
|
-
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
5252
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
5253
5253
|
const { body } = response;
|
|
5254
|
-
const key = keyBuilder$
|
|
5255
|
-
luvio.storeIngest(key, ingest, body);
|
|
5254
|
+
const key = keyBuilder$7(luvio, resourceParams);
|
|
5255
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
5256
5256
|
const snapshot = luvio.storeLookup({
|
|
5257
5257
|
recordId: key,
|
|
5258
|
-
node: select(),
|
|
5258
|
+
node: select$6(),
|
|
5259
5259
|
variables: {},
|
|
5260
5260
|
}, snapshotRefresh);
|
|
5261
5261
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -5266,19 +5266,19 @@ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
5266
5266
|
deepFreeze(snapshot.data);
|
|
5267
5267
|
return snapshot;
|
|
5268
5268
|
}
|
|
5269
|
-
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
5270
|
-
const key = keyBuilder$
|
|
5269
|
+
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
5270
|
+
const key = keyBuilder$7(luvio, params);
|
|
5271
5271
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
5272
5272
|
const storeMetadataParams = {
|
|
5273
|
-
ttl: TTL,
|
|
5273
|
+
ttl: TTL$3,
|
|
5274
5274
|
namespace: keyPrefix,
|
|
5275
|
-
version: VERSION,
|
|
5276
|
-
representationName: RepresentationType
|
|
5275
|
+
version: VERSION$2,
|
|
5276
|
+
representationName: RepresentationType$2
|
|
5277
5277
|
};
|
|
5278
5278
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
5279
5279
|
return errorSnapshot;
|
|
5280
5280
|
}
|
|
5281
|
-
function createResourceRequest(config) {
|
|
5281
|
+
function createResourceRequest$8(config) {
|
|
5282
5282
|
const headers = {};
|
|
5283
5283
|
return {
|
|
5284
5284
|
baseUri: '/services/data/v65.0',
|
|
@@ -5292,7 +5292,7 @@ function createResourceRequest(config) {
|
|
|
5292
5292
|
};
|
|
5293
5293
|
}
|
|
5294
5294
|
|
|
5295
|
-
const adapterName = 'getPersonalizationEsModelMapping';
|
|
5295
|
+
const adapterName$5 = 'getPersonalizationEsModelMapping';
|
|
5296
5296
|
const getPersonalizationEsModelMapping_ConfigPropertyMetadata = [
|
|
5297
5297
|
generateParamConfigMetadata('dataSpaceName', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5298
5298
|
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
@@ -5301,86 +5301,1175 @@ const getPersonalizationEsModelMapping_ConfigPropertyMetadata = [
|
|
|
5301
5301
|
generateParamConfigMetadata('profileDataGraphName', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5302
5302
|
generateParamConfigMetadata('status', false, 1 /* QueryParameter */, 0 /* String */),
|
|
5303
5303
|
];
|
|
5304
|
-
const getPersonalizationEsModelMapping_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getPersonalizationEsModelMapping_ConfigPropertyMetadata);
|
|
5305
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
5306
|
-
function keyBuilder(luvio, config) {
|
|
5307
|
-
const resourceParams = createResourceParams(config);
|
|
5308
|
-
return keyBuilder$
|
|
5304
|
+
const getPersonalizationEsModelMapping_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getPersonalizationEsModelMapping_ConfigPropertyMetadata);
|
|
5305
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$f(getPersonalizationEsModelMapping_ConfigPropertyMetadata);
|
|
5306
|
+
function keyBuilder$6(luvio, config) {
|
|
5307
|
+
const resourceParams = createResourceParams$5(config);
|
|
5308
|
+
return keyBuilder$7(luvio, resourceParams);
|
|
5309
5309
|
}
|
|
5310
|
-
function typeCheckConfig(untrustedConfig) {
|
|
5310
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
5311
5311
|
const config = {};
|
|
5312
|
-
typeCheckConfig$
|
|
5312
|
+
typeCheckConfig$f(untrustedConfig, config, getPersonalizationEsModelMapping_ConfigPropertyMetadata);
|
|
5313
5313
|
return config;
|
|
5314
5314
|
}
|
|
5315
|
-
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
5315
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
5316
5316
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
5317
5317
|
return null;
|
|
5318
5318
|
}
|
|
5319
5319
|
if (process.env.NODE_ENV !== 'production') {
|
|
5320
5320
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
5321
5321
|
}
|
|
5322
|
-
const config = typeCheckConfig(untrustedConfig);
|
|
5322
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
5323
5323
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
5324
5324
|
return null;
|
|
5325
5325
|
}
|
|
5326
5326
|
return config;
|
|
5327
5327
|
}
|
|
5328
|
-
function adapterFragment(luvio, config) {
|
|
5329
|
-
createResourceParams(config);
|
|
5330
|
-
return select();
|
|
5328
|
+
function adapterFragment$2(luvio, config) {
|
|
5329
|
+
createResourceParams$5(config);
|
|
5330
|
+
return select$6();
|
|
5331
5331
|
}
|
|
5332
|
-
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
5333
|
-
const snapshot = ingestSuccess(luvio, resourceParams, response, {
|
|
5332
|
+
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
5333
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
5334
5334
|
config,
|
|
5335
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
5335
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
5336
5336
|
});
|
|
5337
5337
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
5338
5338
|
}
|
|
5339
|
-
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
5340
|
-
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
5339
|
+
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
5340
|
+
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
5341
5341
|
config,
|
|
5342
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
5342
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
5343
5343
|
});
|
|
5344
5344
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
5345
5345
|
}
|
|
5346
|
-
function buildNetworkSnapshot(luvio, config, options) {
|
|
5347
|
-
const resourceParams = createResourceParams(config);
|
|
5348
|
-
const request = createResourceRequest(resourceParams);
|
|
5346
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
5347
|
+
const resourceParams = createResourceParams$5(config);
|
|
5348
|
+
const request = createResourceRequest$8(resourceParams);
|
|
5349
5349
|
return luvio.dispatchResourceRequest(request, options)
|
|
5350
5350
|
.then((response) => {
|
|
5351
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
5351
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
5352
5352
|
const cache = new StoreKeyMap();
|
|
5353
|
-
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
5353
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
|
|
5354
5354
|
return cache;
|
|
5355
5355
|
});
|
|
5356
5356
|
}, (response) => {
|
|
5357
|
-
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
5357
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
|
|
5358
5358
|
});
|
|
5359
5359
|
}
|
|
5360
|
-
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
5361
|
-
return buildNetworkSnapshotCachePolicy$
|
|
5360
|
+
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
5361
|
+
return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
|
|
5362
5362
|
}
|
|
5363
|
-
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
5363
|
+
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
5364
5364
|
const { luvio, config } = context;
|
|
5365
5365
|
const selector = {
|
|
5366
|
-
recordId: keyBuilder(luvio, config),
|
|
5367
|
-
node: adapterFragment(luvio, config),
|
|
5366
|
+
recordId: keyBuilder$6(luvio, config),
|
|
5367
|
+
node: adapterFragment$2(luvio, config),
|
|
5368
5368
|
variables: {},
|
|
5369
5369
|
};
|
|
5370
5370
|
const cacheSnapshot = storeLookup(selector, {
|
|
5371
5371
|
config,
|
|
5372
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
5372
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
5373
5373
|
});
|
|
5374
5374
|
return cacheSnapshot;
|
|
5375
5375
|
}
|
|
5376
5376
|
const getPersonalizationEsModelMappingAdapterFactory = (luvio) => function personalizationService__getPersonalizationEsModelMapping(untrustedConfig, requestContext) {
|
|
5377
|
-
const config = validateAdapterConfig(untrustedConfig, getPersonalizationEsModelMapping_ConfigPropertyNames);
|
|
5377
|
+
const config = validateAdapterConfig$5(untrustedConfig, getPersonalizationEsModelMapping_ConfigPropertyNames);
|
|
5378
5378
|
// Invalid or incomplete config
|
|
5379
5379
|
if (config === null) {
|
|
5380
5380
|
return null;
|
|
5381
5381
|
}
|
|
5382
5382
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
5383
|
-
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
5383
|
+
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
5384
|
+
};
|
|
5385
|
+
|
|
5386
|
+
const TTL$2 = 600;
|
|
5387
|
+
function validate$2(obj, path = 'PersonalizationPaginatedResponseBaseRepresentation') {
|
|
5388
|
+
const v_error = (() => {
|
|
5389
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
5390
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
5391
|
+
}
|
|
5392
|
+
const obj_currentPageUrl = obj.currentPageUrl;
|
|
5393
|
+
const path_currentPageUrl = path + '.currentPageUrl';
|
|
5394
|
+
if (typeof obj_currentPageUrl !== 'string') {
|
|
5395
|
+
return new TypeError('Expected "string" but received "' + typeof obj_currentPageUrl + '" (at "' + path_currentPageUrl + '")');
|
|
5396
|
+
}
|
|
5397
|
+
const obj_nextPageUrl = obj.nextPageUrl;
|
|
5398
|
+
const path_nextPageUrl = path + '.nextPageUrl';
|
|
5399
|
+
if (typeof obj_nextPageUrl !== 'string') {
|
|
5400
|
+
return new TypeError('Expected "string" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
|
|
5401
|
+
}
|
|
5402
|
+
const obj_totalSize = obj.totalSize;
|
|
5403
|
+
const path_totalSize = path + '.totalSize';
|
|
5404
|
+
if (typeof obj_totalSize !== 'number' || (typeof obj_totalSize === 'number' && Math.floor(obj_totalSize) !== obj_totalSize)) {
|
|
5405
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_totalSize + '" (at "' + path_totalSize + '")');
|
|
5406
|
+
}
|
|
5407
|
+
})();
|
|
5408
|
+
return v_error === undefined ? null : v_error;
|
|
5409
|
+
}
|
|
5410
|
+
function equals$2(existing, incoming) {
|
|
5411
|
+
const existing_totalSize = existing.totalSize;
|
|
5412
|
+
const incoming_totalSize = incoming.totalSize;
|
|
5413
|
+
if (!(existing_totalSize === incoming_totalSize)) {
|
|
5414
|
+
return false;
|
|
5415
|
+
}
|
|
5416
|
+
const existing_currentPageUrl = existing.currentPageUrl;
|
|
5417
|
+
const incoming_currentPageUrl = incoming.currentPageUrl;
|
|
5418
|
+
if (!(existing_currentPageUrl === incoming_currentPageUrl)) {
|
|
5419
|
+
return false;
|
|
5420
|
+
}
|
|
5421
|
+
const existing_nextPageUrl = existing.nextPageUrl;
|
|
5422
|
+
const incoming_nextPageUrl = incoming.nextPageUrl;
|
|
5423
|
+
if (!(existing_nextPageUrl === incoming_nextPageUrl)) {
|
|
5424
|
+
return false;
|
|
5425
|
+
}
|
|
5426
|
+
return true;
|
|
5427
|
+
}
|
|
5428
|
+
|
|
5429
|
+
const TTL$1 = 600;
|
|
5430
|
+
const VERSION$1 = "ad7582d1e3c4e2d227351115537d8590";
|
|
5431
|
+
function validate$1(obj, path = 'PersonalizationExperienceConfigRepresentation') {
|
|
5432
|
+
const v_error = (() => {
|
|
5433
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
5434
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
5435
|
+
}
|
|
5436
|
+
if (obj.createdById !== undefined) {
|
|
5437
|
+
const obj_createdById = obj.createdById;
|
|
5438
|
+
const path_createdById = path + '.createdById';
|
|
5439
|
+
if (typeof obj_createdById !== 'string') {
|
|
5440
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdById + '" (at "' + path_createdById + '")');
|
|
5441
|
+
}
|
|
5442
|
+
}
|
|
5443
|
+
if (obj.createdDate !== undefined) {
|
|
5444
|
+
const obj_createdDate = obj.createdDate;
|
|
5445
|
+
const path_createdDate = path + '.createdDate';
|
|
5446
|
+
if (typeof obj_createdDate !== 'string') {
|
|
5447
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
5448
|
+
}
|
|
5449
|
+
}
|
|
5450
|
+
const obj_dataProvider = obj.dataProvider;
|
|
5451
|
+
const path_dataProvider = path + '.dataProvider';
|
|
5452
|
+
if (obj_dataProvider === undefined) {
|
|
5453
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_dataProvider + '" (at "' + path_dataProvider + '")');
|
|
5454
|
+
}
|
|
5455
|
+
if (obj.description !== undefined) {
|
|
5456
|
+
const obj_description = obj.description;
|
|
5457
|
+
const path_description = path + '.description';
|
|
5458
|
+
if (typeof obj_description !== 'string') {
|
|
5459
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
5460
|
+
}
|
|
5461
|
+
}
|
|
5462
|
+
const obj_displayUrl = obj.displayUrl;
|
|
5463
|
+
const path_displayUrl = path + '.displayUrl';
|
|
5464
|
+
if (typeof obj_displayUrl !== 'string') {
|
|
5465
|
+
return new TypeError('Expected "string" but received "' + typeof obj_displayUrl + '" (at "' + path_displayUrl + '")');
|
|
5466
|
+
}
|
|
5467
|
+
if (obj.id !== undefined) {
|
|
5468
|
+
const obj_id = obj.id;
|
|
5469
|
+
const path_id = path + '.id';
|
|
5470
|
+
if (typeof obj_id !== 'string') {
|
|
5471
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
5472
|
+
}
|
|
5473
|
+
}
|
|
5474
|
+
const obj_isEnabled = obj.isEnabled;
|
|
5475
|
+
const path_isEnabled = path + '.isEnabled';
|
|
5476
|
+
if (typeof obj_isEnabled !== 'boolean') {
|
|
5477
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isEnabled + '" (at "' + path_isEnabled + '")');
|
|
5478
|
+
}
|
|
5479
|
+
if (obj.label !== undefined) {
|
|
5480
|
+
const obj_label = obj.label;
|
|
5481
|
+
const path_label = path + '.label';
|
|
5482
|
+
if (typeof obj_label !== 'string') {
|
|
5483
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
5484
|
+
}
|
|
5485
|
+
}
|
|
5486
|
+
if (obj.lastModifiedById !== undefined) {
|
|
5487
|
+
const obj_lastModifiedById = obj.lastModifiedById;
|
|
5488
|
+
const path_lastModifiedById = path + '.lastModifiedById';
|
|
5489
|
+
if (typeof obj_lastModifiedById !== 'string') {
|
|
5490
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedById + '" (at "' + path_lastModifiedById + '")');
|
|
5491
|
+
}
|
|
5492
|
+
}
|
|
5493
|
+
if (obj.lastModifiedDate !== undefined) {
|
|
5494
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
5495
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
5496
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
5497
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
5498
|
+
}
|
|
5499
|
+
}
|
|
5500
|
+
const obj_name = obj.name;
|
|
5501
|
+
const path_name = path + '.name';
|
|
5502
|
+
if (typeof obj_name !== 'string') {
|
|
5503
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
5504
|
+
}
|
|
5505
|
+
if (obj.publishedDate !== undefined) {
|
|
5506
|
+
const obj_publishedDate = obj.publishedDate;
|
|
5507
|
+
const path_publishedDate = path + '.publishedDate';
|
|
5508
|
+
if (typeof obj_publishedDate !== 'string') {
|
|
5509
|
+
return new TypeError('Expected "string" but received "' + typeof obj_publishedDate + '" (at "' + path_publishedDate + '")');
|
|
5510
|
+
}
|
|
5511
|
+
}
|
|
5512
|
+
const obj_sourceMatchers = obj.sourceMatchers;
|
|
5513
|
+
const path_sourceMatchers = path + '.sourceMatchers';
|
|
5514
|
+
if (!ArrayIsArray(obj_sourceMatchers)) {
|
|
5515
|
+
return new TypeError('Expected "array" but received "' + typeof obj_sourceMatchers + '" (at "' + path_sourceMatchers + '")');
|
|
5516
|
+
}
|
|
5517
|
+
for (let i = 0; i < obj_sourceMatchers.length; i++) {
|
|
5518
|
+
const obj_sourceMatchers_item = obj_sourceMatchers[i];
|
|
5519
|
+
const path_sourceMatchers_item = path_sourceMatchers + '[' + i + ']';
|
|
5520
|
+
if (obj_sourceMatchers_item === undefined) {
|
|
5521
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_sourceMatchers_item + '" (at "' + path_sourceMatchers_item + '")');
|
|
5522
|
+
}
|
|
5523
|
+
}
|
|
5524
|
+
const obj_transformationConfig = obj.transformationConfig;
|
|
5525
|
+
const path_transformationConfig = path + '.transformationConfig';
|
|
5526
|
+
if (obj_transformationConfig === undefined) {
|
|
5527
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_transformationConfig + '" (at "' + path_transformationConfig + '")');
|
|
5528
|
+
}
|
|
5529
|
+
})();
|
|
5530
|
+
return v_error === undefined ? null : v_error;
|
|
5531
|
+
}
|
|
5532
|
+
const RepresentationType$1 = 'PersonalizationExperienceConfigRepresentation';
|
|
5533
|
+
function keyBuilder$5(luvio, config) {
|
|
5534
|
+
return keyPrefix + '::' + RepresentationType$1 + ':' + config.id;
|
|
5535
|
+
}
|
|
5536
|
+
function keyBuilderFromType(luvio, object) {
|
|
5537
|
+
const keyParams = {
|
|
5538
|
+
id: object.name
|
|
5539
|
+
};
|
|
5540
|
+
return keyBuilder$5(luvio, keyParams);
|
|
5541
|
+
}
|
|
5542
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
5543
|
+
return input;
|
|
5544
|
+
}
|
|
5545
|
+
const select$5 = function PersonalizationExperienceConfigRepresentationSelect() {
|
|
5546
|
+
return {
|
|
5547
|
+
kind: 'Fragment',
|
|
5548
|
+
version: VERSION$1,
|
|
5549
|
+
private: [],
|
|
5550
|
+
selections: [
|
|
5551
|
+
{
|
|
5552
|
+
name: 'createdById',
|
|
5553
|
+
kind: 'Scalar',
|
|
5554
|
+
required: false
|
|
5555
|
+
},
|
|
5556
|
+
{
|
|
5557
|
+
name: 'createdDate',
|
|
5558
|
+
kind: 'Scalar',
|
|
5559
|
+
required: false
|
|
5560
|
+
},
|
|
5561
|
+
{
|
|
5562
|
+
name: 'dataProvider',
|
|
5563
|
+
kind: 'Object',
|
|
5564
|
+
// any
|
|
5565
|
+
},
|
|
5566
|
+
{
|
|
5567
|
+
name: 'description',
|
|
5568
|
+
kind: 'Scalar',
|
|
5569
|
+
required: false
|
|
5570
|
+
},
|
|
5571
|
+
{
|
|
5572
|
+
name: 'displayUrl',
|
|
5573
|
+
kind: 'Scalar'
|
|
5574
|
+
},
|
|
5575
|
+
{
|
|
5576
|
+
name: 'id',
|
|
5577
|
+
kind: 'Scalar',
|
|
5578
|
+
required: false
|
|
5579
|
+
},
|
|
5580
|
+
{
|
|
5581
|
+
name: 'isEnabled',
|
|
5582
|
+
kind: 'Scalar'
|
|
5583
|
+
},
|
|
5584
|
+
{
|
|
5585
|
+
name: 'label',
|
|
5586
|
+
kind: 'Scalar',
|
|
5587
|
+
required: false
|
|
5588
|
+
},
|
|
5589
|
+
{
|
|
5590
|
+
name: 'lastModifiedById',
|
|
5591
|
+
kind: 'Scalar',
|
|
5592
|
+
required: false
|
|
5593
|
+
},
|
|
5594
|
+
{
|
|
5595
|
+
name: 'lastModifiedDate',
|
|
5596
|
+
kind: 'Scalar',
|
|
5597
|
+
required: false
|
|
5598
|
+
},
|
|
5599
|
+
{
|
|
5600
|
+
name: 'name',
|
|
5601
|
+
kind: 'Scalar'
|
|
5602
|
+
},
|
|
5603
|
+
{
|
|
5604
|
+
name: 'publishedDate',
|
|
5605
|
+
kind: 'Scalar',
|
|
5606
|
+
required: false
|
|
5607
|
+
},
|
|
5608
|
+
{
|
|
5609
|
+
name: 'sourceMatchers',
|
|
5610
|
+
kind: 'Object',
|
|
5611
|
+
// any
|
|
5612
|
+
},
|
|
5613
|
+
{
|
|
5614
|
+
name: 'transformationConfig',
|
|
5615
|
+
kind: 'Object',
|
|
5616
|
+
// any
|
|
5617
|
+
}
|
|
5618
|
+
]
|
|
5619
|
+
};
|
|
5620
|
+
};
|
|
5621
|
+
function equals$1(existing, incoming) {
|
|
5622
|
+
const existing_isEnabled = existing.isEnabled;
|
|
5623
|
+
const incoming_isEnabled = incoming.isEnabled;
|
|
5624
|
+
if (!(existing_isEnabled === incoming_isEnabled)) {
|
|
5625
|
+
return false;
|
|
5626
|
+
}
|
|
5627
|
+
const existing_createdById = existing.createdById;
|
|
5628
|
+
const incoming_createdById = incoming.createdById;
|
|
5629
|
+
// if at least one of these optionals is defined
|
|
5630
|
+
if (existing_createdById !== undefined || incoming_createdById !== undefined) {
|
|
5631
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
5632
|
+
// not equal
|
|
5633
|
+
if (existing_createdById === undefined || incoming_createdById === undefined) {
|
|
5634
|
+
return false;
|
|
5635
|
+
}
|
|
5636
|
+
if (!(existing_createdById === incoming_createdById)) {
|
|
5637
|
+
return false;
|
|
5638
|
+
}
|
|
5639
|
+
}
|
|
5640
|
+
const existing_createdDate = existing.createdDate;
|
|
5641
|
+
const incoming_createdDate = incoming.createdDate;
|
|
5642
|
+
// if at least one of these optionals is defined
|
|
5643
|
+
if (existing_createdDate !== undefined || incoming_createdDate !== undefined) {
|
|
5644
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
5645
|
+
// not equal
|
|
5646
|
+
if (existing_createdDate === undefined || incoming_createdDate === undefined) {
|
|
5647
|
+
return false;
|
|
5648
|
+
}
|
|
5649
|
+
if (!(existing_createdDate === incoming_createdDate)) {
|
|
5650
|
+
return false;
|
|
5651
|
+
}
|
|
5652
|
+
}
|
|
5653
|
+
const existing_description = existing.description;
|
|
5654
|
+
const incoming_description = incoming.description;
|
|
5655
|
+
// if at least one of these optionals is defined
|
|
5656
|
+
if (existing_description !== undefined || incoming_description !== undefined) {
|
|
5657
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
5658
|
+
// not equal
|
|
5659
|
+
if (existing_description === undefined || incoming_description === undefined) {
|
|
5660
|
+
return false;
|
|
5661
|
+
}
|
|
5662
|
+
if (!(existing_description === incoming_description)) {
|
|
5663
|
+
return false;
|
|
5664
|
+
}
|
|
5665
|
+
}
|
|
5666
|
+
const existing_displayUrl = existing.displayUrl;
|
|
5667
|
+
const incoming_displayUrl = incoming.displayUrl;
|
|
5668
|
+
if (!(existing_displayUrl === incoming_displayUrl)) {
|
|
5669
|
+
return false;
|
|
5670
|
+
}
|
|
5671
|
+
const existing_id = existing.id;
|
|
5672
|
+
const incoming_id = incoming.id;
|
|
5673
|
+
// if at least one of these optionals is defined
|
|
5674
|
+
if (existing_id !== undefined || incoming_id !== undefined) {
|
|
5675
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
5676
|
+
// not equal
|
|
5677
|
+
if (existing_id === undefined || incoming_id === undefined) {
|
|
5678
|
+
return false;
|
|
5679
|
+
}
|
|
5680
|
+
if (!(existing_id === incoming_id)) {
|
|
5681
|
+
return false;
|
|
5682
|
+
}
|
|
5683
|
+
}
|
|
5684
|
+
const existing_label = existing.label;
|
|
5685
|
+
const incoming_label = incoming.label;
|
|
5686
|
+
// if at least one of these optionals is defined
|
|
5687
|
+
if (existing_label !== undefined || incoming_label !== undefined) {
|
|
5688
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
5689
|
+
// not equal
|
|
5690
|
+
if (existing_label === undefined || incoming_label === undefined) {
|
|
5691
|
+
return false;
|
|
5692
|
+
}
|
|
5693
|
+
if (!(existing_label === incoming_label)) {
|
|
5694
|
+
return false;
|
|
5695
|
+
}
|
|
5696
|
+
}
|
|
5697
|
+
const existing_lastModifiedById = existing.lastModifiedById;
|
|
5698
|
+
const incoming_lastModifiedById = incoming.lastModifiedById;
|
|
5699
|
+
// if at least one of these optionals is defined
|
|
5700
|
+
if (existing_lastModifiedById !== undefined || incoming_lastModifiedById !== undefined) {
|
|
5701
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
5702
|
+
// not equal
|
|
5703
|
+
if (existing_lastModifiedById === undefined || incoming_lastModifiedById === undefined) {
|
|
5704
|
+
return false;
|
|
5705
|
+
}
|
|
5706
|
+
if (!(existing_lastModifiedById === incoming_lastModifiedById)) {
|
|
5707
|
+
return false;
|
|
5708
|
+
}
|
|
5709
|
+
}
|
|
5710
|
+
const existing_lastModifiedDate = existing.lastModifiedDate;
|
|
5711
|
+
const incoming_lastModifiedDate = incoming.lastModifiedDate;
|
|
5712
|
+
// if at least one of these optionals is defined
|
|
5713
|
+
if (existing_lastModifiedDate !== undefined || incoming_lastModifiedDate !== undefined) {
|
|
5714
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
5715
|
+
// not equal
|
|
5716
|
+
if (existing_lastModifiedDate === undefined || incoming_lastModifiedDate === undefined) {
|
|
5717
|
+
return false;
|
|
5718
|
+
}
|
|
5719
|
+
if (!(existing_lastModifiedDate === incoming_lastModifiedDate)) {
|
|
5720
|
+
return false;
|
|
5721
|
+
}
|
|
5722
|
+
}
|
|
5723
|
+
const existing_name = existing.name;
|
|
5724
|
+
const incoming_name = incoming.name;
|
|
5725
|
+
if (!(existing_name === incoming_name)) {
|
|
5726
|
+
return false;
|
|
5727
|
+
}
|
|
5728
|
+
const existing_publishedDate = existing.publishedDate;
|
|
5729
|
+
const incoming_publishedDate = incoming.publishedDate;
|
|
5730
|
+
// if at least one of these optionals is defined
|
|
5731
|
+
if (existing_publishedDate !== undefined || incoming_publishedDate !== undefined) {
|
|
5732
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
5733
|
+
// not equal
|
|
5734
|
+
if (existing_publishedDate === undefined || incoming_publishedDate === undefined) {
|
|
5735
|
+
return false;
|
|
5736
|
+
}
|
|
5737
|
+
if (!(existing_publishedDate === incoming_publishedDate)) {
|
|
5738
|
+
return false;
|
|
5739
|
+
}
|
|
5740
|
+
}
|
|
5741
|
+
const existing_dataProvider = existing.dataProvider;
|
|
5742
|
+
const incoming_dataProvider = incoming.dataProvider;
|
|
5743
|
+
if (JSONStringify(incoming_dataProvider) !== JSONStringify(existing_dataProvider)) {
|
|
5744
|
+
return false;
|
|
5745
|
+
}
|
|
5746
|
+
const existing_sourceMatchers = existing.sourceMatchers;
|
|
5747
|
+
const incoming_sourceMatchers = incoming.sourceMatchers;
|
|
5748
|
+
const equals_sourceMatchers_items = equalsArray(existing_sourceMatchers, incoming_sourceMatchers, (existing_sourceMatchers_item, incoming_sourceMatchers_item) => {
|
|
5749
|
+
if (JSONStringify(incoming_sourceMatchers_item) !== JSONStringify(existing_sourceMatchers_item)) {
|
|
5750
|
+
return false;
|
|
5751
|
+
}
|
|
5752
|
+
});
|
|
5753
|
+
if (equals_sourceMatchers_items === false) {
|
|
5754
|
+
return false;
|
|
5755
|
+
}
|
|
5756
|
+
const existing_transformationConfig = existing.transformationConfig;
|
|
5757
|
+
const incoming_transformationConfig = incoming.transformationConfig;
|
|
5758
|
+
if (JSONStringify(incoming_transformationConfig) !== JSONStringify(existing_transformationConfig)) {
|
|
5759
|
+
return false;
|
|
5760
|
+
}
|
|
5761
|
+
return true;
|
|
5762
|
+
}
|
|
5763
|
+
const ingest$1 = function PersonalizationExperienceConfigRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
5764
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5765
|
+
const validateError = validate$1(input);
|
|
5766
|
+
if (validateError !== null) {
|
|
5767
|
+
throw validateError;
|
|
5768
|
+
}
|
|
5769
|
+
}
|
|
5770
|
+
const key = keyBuilderFromType(luvio, input);
|
|
5771
|
+
const ttlToUse = TTL$1;
|
|
5772
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "personalization-service", VERSION$1, RepresentationType$1, equals$1);
|
|
5773
|
+
return createLink(key);
|
|
5774
|
+
};
|
|
5775
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
5776
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
5777
|
+
const rootKey = keyBuilderFromType(luvio, input);
|
|
5778
|
+
rootKeySet.set(rootKey, {
|
|
5779
|
+
namespace: keyPrefix,
|
|
5780
|
+
representationName: RepresentationType$1,
|
|
5781
|
+
mergeable: false
|
|
5782
|
+
});
|
|
5783
|
+
}
|
|
5784
|
+
|
|
5785
|
+
const TTL = 600;
|
|
5786
|
+
const VERSION = "5a309503b3f17d6589909be7f5f9d4a8";
|
|
5787
|
+
function validate(obj, path = 'PersonalizationExperienceConfigCollectionRepresentation') {
|
|
5788
|
+
const validatePersonalizationPaginatedResponseBaseRepresentation_validateError = validate$2(obj, path);
|
|
5789
|
+
if (validatePersonalizationPaginatedResponseBaseRepresentation_validateError !== null) {
|
|
5790
|
+
return validatePersonalizationPaginatedResponseBaseRepresentation_validateError;
|
|
5791
|
+
}
|
|
5792
|
+
const v_error = (() => {
|
|
5793
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
5794
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
5795
|
+
}
|
|
5796
|
+
const obj_personalizationExperienceConfigs = obj.personalizationExperienceConfigs;
|
|
5797
|
+
const path_personalizationExperienceConfigs = path + '.personalizationExperienceConfigs';
|
|
5798
|
+
if (!ArrayIsArray(obj_personalizationExperienceConfigs)) {
|
|
5799
|
+
return new TypeError('Expected "array" but received "' + typeof obj_personalizationExperienceConfigs + '" (at "' + path_personalizationExperienceConfigs + '")');
|
|
5800
|
+
}
|
|
5801
|
+
for (let i = 0; i < obj_personalizationExperienceConfigs.length; i++) {
|
|
5802
|
+
const obj_personalizationExperienceConfigs_item = obj_personalizationExperienceConfigs[i];
|
|
5803
|
+
const path_personalizationExperienceConfigs_item = path_personalizationExperienceConfigs + '[' + i + ']';
|
|
5804
|
+
const referencepath_personalizationExperienceConfigs_itemValidationError = validate$1(obj_personalizationExperienceConfigs_item, path_personalizationExperienceConfigs_item);
|
|
5805
|
+
if (referencepath_personalizationExperienceConfigs_itemValidationError !== null) {
|
|
5806
|
+
let message = 'Object doesn\'t match PersonalizationExperienceConfigRepresentation (at "' + path_personalizationExperienceConfigs_item + '")\n';
|
|
5807
|
+
message += referencepath_personalizationExperienceConfigs_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
5808
|
+
return new TypeError(message);
|
|
5809
|
+
}
|
|
5810
|
+
}
|
|
5811
|
+
})();
|
|
5812
|
+
return v_error === undefined ? null : v_error;
|
|
5813
|
+
}
|
|
5814
|
+
const RepresentationType = 'PersonalizationExperienceConfigCollectionRepresentation';
|
|
5815
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
5816
|
+
return input;
|
|
5817
|
+
}
|
|
5818
|
+
const select$4 = function PersonalizationExperienceConfigCollectionRepresentationSelect() {
|
|
5819
|
+
return {
|
|
5820
|
+
kind: 'Fragment',
|
|
5821
|
+
version: VERSION,
|
|
5822
|
+
private: [],
|
|
5823
|
+
opaque: true
|
|
5824
|
+
};
|
|
5825
|
+
};
|
|
5826
|
+
function equals(existing, incoming) {
|
|
5827
|
+
if (equals$2(existing, incoming) === false) {
|
|
5828
|
+
return false;
|
|
5829
|
+
}
|
|
5830
|
+
const existing_personalizationExperienceConfigs = existing.personalizationExperienceConfigs;
|
|
5831
|
+
const incoming_personalizationExperienceConfigs = incoming.personalizationExperienceConfigs;
|
|
5832
|
+
const equals_personalizationExperienceConfigs_items = equalsArray(existing_personalizationExperienceConfigs, incoming_personalizationExperienceConfigs, (existing_personalizationExperienceConfigs_item, incoming_personalizationExperienceConfigs_item) => {
|
|
5833
|
+
if (!(equals$1(existing_personalizationExperienceConfigs_item, incoming_personalizationExperienceConfigs_item))) {
|
|
5834
|
+
return false;
|
|
5835
|
+
}
|
|
5836
|
+
});
|
|
5837
|
+
if (equals_personalizationExperienceConfigs_items === false) {
|
|
5838
|
+
return false;
|
|
5839
|
+
}
|
|
5840
|
+
return true;
|
|
5841
|
+
}
|
|
5842
|
+
const ingest = function PersonalizationExperienceConfigCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
5843
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5844
|
+
const validateError = validate(input);
|
|
5845
|
+
if (validateError !== null) {
|
|
5846
|
+
throw validateError;
|
|
5847
|
+
}
|
|
5848
|
+
}
|
|
5849
|
+
const key = path.fullPath;
|
|
5850
|
+
const ttlToUse = TTL$2;
|
|
5851
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "personalization-service", VERSION, RepresentationType, equals);
|
|
5852
|
+
return createLink(key);
|
|
5853
|
+
};
|
|
5854
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
5855
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
5856
|
+
const rootKey = fullPathFactory();
|
|
5857
|
+
rootKeySet.set(rootKey, {
|
|
5858
|
+
namespace: keyPrefix,
|
|
5859
|
+
representationName: RepresentationType,
|
|
5860
|
+
mergeable: false
|
|
5861
|
+
});
|
|
5862
|
+
}
|
|
5863
|
+
|
|
5864
|
+
function select$3(luvio, params) {
|
|
5865
|
+
return select$4();
|
|
5866
|
+
}
|
|
5867
|
+
function keyBuilder$4(luvio, params) {
|
|
5868
|
+
return keyPrefix + '::PersonalizationExperienceConfigCollectionRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'idOrAppSourceIdOrName:' + params.urlParams.idOrAppSourceIdOrName + ')';
|
|
5869
|
+
}
|
|
5870
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
5871
|
+
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$4(luvio, resourceParams));
|
|
5872
|
+
}
|
|
5873
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
5874
|
+
const { body } = response;
|
|
5875
|
+
const key = keyBuilder$4(luvio, resourceParams);
|
|
5876
|
+
luvio.storeIngest(key, ingest, body);
|
|
5877
|
+
const snapshot = luvio.storeLookup({
|
|
5878
|
+
recordId: key,
|
|
5879
|
+
node: select$3(),
|
|
5880
|
+
variables: {},
|
|
5881
|
+
}, snapshotRefresh);
|
|
5882
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5883
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
5884
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
5885
|
+
}
|
|
5886
|
+
}
|
|
5887
|
+
deepFreeze(snapshot.data);
|
|
5888
|
+
return snapshot;
|
|
5889
|
+
}
|
|
5890
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
5891
|
+
const key = keyBuilder$4(luvio, params);
|
|
5892
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
5893
|
+
const storeMetadataParams = {
|
|
5894
|
+
ttl: TTL,
|
|
5895
|
+
namespace: keyPrefix,
|
|
5896
|
+
version: VERSION,
|
|
5897
|
+
representationName: RepresentationType
|
|
5898
|
+
};
|
|
5899
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
5900
|
+
return errorSnapshot;
|
|
5901
|
+
}
|
|
5902
|
+
function createResourceRequest$7(config) {
|
|
5903
|
+
const headers = {};
|
|
5904
|
+
return {
|
|
5905
|
+
baseUri: '/services/data/v65.0',
|
|
5906
|
+
basePath: '/personalization/external-apps/' + config.urlParams.idOrAppSourceIdOrName + '/personalization-experience-configs',
|
|
5907
|
+
method: 'get',
|
|
5908
|
+
body: null,
|
|
5909
|
+
urlParams: config.urlParams,
|
|
5910
|
+
queryParams: config.queryParams,
|
|
5911
|
+
headers,
|
|
5912
|
+
priority: 'normal',
|
|
5913
|
+
};
|
|
5914
|
+
}
|
|
5915
|
+
|
|
5916
|
+
const adapterName$4 = 'getPersonalizationExperiencesConfigs';
|
|
5917
|
+
const getPersonalizationExperiencesConfigs_ConfigPropertyMetadata = [
|
|
5918
|
+
generateParamConfigMetadata('idOrAppSourceIdOrName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
5919
|
+
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
5920
|
+
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
5921
|
+
];
|
|
5922
|
+
const getPersonalizationExperiencesConfigs_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getPersonalizationExperiencesConfigs_ConfigPropertyMetadata);
|
|
5923
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$f(getPersonalizationExperiencesConfigs_ConfigPropertyMetadata);
|
|
5924
|
+
function keyBuilder$3(luvio, config) {
|
|
5925
|
+
const resourceParams = createResourceParams$4(config);
|
|
5926
|
+
return keyBuilder$4(luvio, resourceParams);
|
|
5927
|
+
}
|
|
5928
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
5929
|
+
const config = {};
|
|
5930
|
+
typeCheckConfig$f(untrustedConfig, config, getPersonalizationExperiencesConfigs_ConfigPropertyMetadata);
|
|
5931
|
+
return config;
|
|
5932
|
+
}
|
|
5933
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
5934
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
5935
|
+
return null;
|
|
5936
|
+
}
|
|
5937
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5938
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
5939
|
+
}
|
|
5940
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
5941
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
5942
|
+
return null;
|
|
5943
|
+
}
|
|
5944
|
+
return config;
|
|
5945
|
+
}
|
|
5946
|
+
function adapterFragment$1(luvio, config) {
|
|
5947
|
+
createResourceParams$4(config);
|
|
5948
|
+
return select$3();
|
|
5949
|
+
}
|
|
5950
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
5951
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
5952
|
+
config,
|
|
5953
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
5954
|
+
});
|
|
5955
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
5956
|
+
}
|
|
5957
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
5958
|
+
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
5959
|
+
config,
|
|
5960
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
5961
|
+
});
|
|
5962
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
5963
|
+
}
|
|
5964
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
5965
|
+
const resourceParams = createResourceParams$4(config);
|
|
5966
|
+
const request = createResourceRequest$7(resourceParams);
|
|
5967
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
5968
|
+
.then((response) => {
|
|
5969
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
5970
|
+
const cache = new StoreKeyMap();
|
|
5971
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
5972
|
+
return cache;
|
|
5973
|
+
});
|
|
5974
|
+
}, (response) => {
|
|
5975
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
5976
|
+
});
|
|
5977
|
+
}
|
|
5978
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
5979
|
+
return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
|
|
5980
|
+
}
|
|
5981
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
5982
|
+
const { luvio, config } = context;
|
|
5983
|
+
const selector = {
|
|
5984
|
+
recordId: keyBuilder$3(luvio, config),
|
|
5985
|
+
node: adapterFragment$1(luvio, config),
|
|
5986
|
+
variables: {},
|
|
5987
|
+
};
|
|
5988
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
5989
|
+
config,
|
|
5990
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
5991
|
+
});
|
|
5992
|
+
return cacheSnapshot;
|
|
5993
|
+
}
|
|
5994
|
+
const getPersonalizationExperiencesConfigsAdapterFactory = (luvio) => function personalizationService__getPersonalizationExperiencesConfigs(untrustedConfig, requestContext) {
|
|
5995
|
+
const config = validateAdapterConfig$4(untrustedConfig, getPersonalizationExperiencesConfigs_ConfigPropertyNames);
|
|
5996
|
+
// Invalid or incomplete config
|
|
5997
|
+
if (config === null) {
|
|
5998
|
+
return null;
|
|
5999
|
+
}
|
|
6000
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
6001
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
6002
|
+
};
|
|
6003
|
+
|
|
6004
|
+
function select$2(luvio, params) {
|
|
6005
|
+
return select$5();
|
|
6006
|
+
}
|
|
6007
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
6008
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
6009
|
+
}
|
|
6010
|
+
function ingestSuccess$2(luvio, resourceParams, response) {
|
|
6011
|
+
const { body } = response;
|
|
6012
|
+
const key = keyBuilderFromType(luvio, body);
|
|
6013
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
6014
|
+
const snapshot = luvio.storeLookup({
|
|
6015
|
+
recordId: key,
|
|
6016
|
+
node: select$2(),
|
|
6017
|
+
variables: {},
|
|
6018
|
+
});
|
|
6019
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
6020
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
6021
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
6022
|
+
}
|
|
6023
|
+
}
|
|
6024
|
+
deepFreeze(snapshot.data);
|
|
6025
|
+
return snapshot;
|
|
6026
|
+
}
|
|
6027
|
+
function createResourceRequest$6(config) {
|
|
6028
|
+
const headers = {};
|
|
6029
|
+
return {
|
|
6030
|
+
baseUri: '/services/data/v65.0',
|
|
6031
|
+
basePath: '/personalization/external-apps/' + config.urlParams.idOrAppSourceIdOrName + '/personalization-experience-configs',
|
|
6032
|
+
method: 'post',
|
|
6033
|
+
body: config.body,
|
|
6034
|
+
urlParams: config.urlParams,
|
|
6035
|
+
queryParams: {},
|
|
6036
|
+
headers,
|
|
6037
|
+
priority: 'normal',
|
|
6038
|
+
};
|
|
6039
|
+
}
|
|
6040
|
+
|
|
6041
|
+
const adapterName$3 = 'createPersonalizationExperiencesConfig';
|
|
6042
|
+
const createPersonalizationExperiencesConfig_ConfigPropertyMetadata = [
|
|
6043
|
+
generateParamConfigMetadata('idOrAppSourceIdOrName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
6044
|
+
generateParamConfigMetadata('dataProvider', true, 2 /* Body */, 4 /* Unsupported */),
|
|
6045
|
+
generateParamConfigMetadata('description', true, 2 /* Body */, 0 /* String */),
|
|
6046
|
+
generateParamConfigMetadata('displayUrl', true, 2 /* Body */, 0 /* String */),
|
|
6047
|
+
generateParamConfigMetadata('isEnabled', true, 2 /* Body */, 1 /* Boolean */),
|
|
6048
|
+
generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
|
|
6049
|
+
generateParamConfigMetadata('lastModifiedDate', false, 2 /* Body */, 0 /* String */),
|
|
6050
|
+
generateParamConfigMetadata('name', true, 2 /* Body */, 0 /* String */),
|
|
6051
|
+
generateParamConfigMetadata('publishedDate', false, 2 /* Body */, 0 /* String */),
|
|
6052
|
+
generateParamConfigMetadata('sourceMatchers', true, 2 /* Body */, 4 /* Unsupported */, true),
|
|
6053
|
+
generateParamConfigMetadata('transformationConfig', true, 2 /* Body */, 4 /* Unsupported */),
|
|
6054
|
+
];
|
|
6055
|
+
const createPersonalizationExperiencesConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, createPersonalizationExperiencesConfig_ConfigPropertyMetadata);
|
|
6056
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$f(createPersonalizationExperiencesConfig_ConfigPropertyMetadata);
|
|
6057
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
6058
|
+
const config = {};
|
|
6059
|
+
typeCheckConfig$f(untrustedConfig, config, createPersonalizationExperiencesConfig_ConfigPropertyMetadata);
|
|
6060
|
+
const untrustedConfig_dataProvider = untrustedConfig.dataProvider;
|
|
6061
|
+
config.dataProvider = untrustedConfig_dataProvider;
|
|
6062
|
+
const untrustedConfig_sourceMatchers = untrustedConfig.sourceMatchers;
|
|
6063
|
+
if (ArrayIsArray$1(untrustedConfig_sourceMatchers)) {
|
|
6064
|
+
const untrustedConfig_sourceMatchers_array = [];
|
|
6065
|
+
for (let i = 0, arrayLength = untrustedConfig_sourceMatchers.length; i < arrayLength; i++) {
|
|
6066
|
+
const untrustedConfig_sourceMatchers_item = untrustedConfig_sourceMatchers[i];
|
|
6067
|
+
untrustedConfig_sourceMatchers_array.push(untrustedConfig_sourceMatchers_item);
|
|
6068
|
+
}
|
|
6069
|
+
config.sourceMatchers = untrustedConfig_sourceMatchers_array;
|
|
6070
|
+
}
|
|
6071
|
+
const untrustedConfig_transformationConfig = untrustedConfig.transformationConfig;
|
|
6072
|
+
config.transformationConfig = untrustedConfig_transformationConfig;
|
|
6073
|
+
return config;
|
|
6074
|
+
}
|
|
6075
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
6076
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
6077
|
+
return null;
|
|
6078
|
+
}
|
|
6079
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
6080
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
6081
|
+
}
|
|
6082
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
6083
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
6084
|
+
return null;
|
|
6085
|
+
}
|
|
6086
|
+
return config;
|
|
6087
|
+
}
|
|
6088
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
6089
|
+
const resourceParams = createResourceParams$3(config);
|
|
6090
|
+
const request = createResourceRequest$6(resourceParams);
|
|
6091
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
6092
|
+
.then((response) => {
|
|
6093
|
+
return luvio.handleSuccessResponse(() => {
|
|
6094
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response);
|
|
6095
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
6096
|
+
}, () => {
|
|
6097
|
+
const cache = new StoreKeyMap();
|
|
6098
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
6099
|
+
return cache;
|
|
6100
|
+
});
|
|
6101
|
+
}, (response) => {
|
|
6102
|
+
deepFreeze(response);
|
|
6103
|
+
throw response;
|
|
6104
|
+
});
|
|
6105
|
+
}
|
|
6106
|
+
const createPersonalizationExperiencesConfigAdapterFactory = (luvio) => {
|
|
6107
|
+
return function createPersonalizationExperiencesConfig(untrustedConfig) {
|
|
6108
|
+
const config = validateAdapterConfig$3(untrustedConfig, createPersonalizationExperiencesConfig_ConfigPropertyNames);
|
|
6109
|
+
// Invalid or incomplete config
|
|
6110
|
+
if (config === null) {
|
|
6111
|
+
throw new Error('Invalid config for "createPersonalizationExperiencesConfig"');
|
|
6112
|
+
}
|
|
6113
|
+
return buildNetworkSnapshot$3(luvio, config);
|
|
6114
|
+
};
|
|
6115
|
+
};
|
|
6116
|
+
|
|
6117
|
+
function keyBuilder$2(luvio, params) {
|
|
6118
|
+
return keyBuilder$5(luvio, {
|
|
6119
|
+
id: params.urlParams.nameParam
|
|
6120
|
+
});
|
|
6121
|
+
}
|
|
6122
|
+
function getResponseCacheKeys$2(cacheKeyMap, luvio, resourceParams) {
|
|
6123
|
+
const key = keyBuilder$2(luvio, resourceParams);
|
|
6124
|
+
cacheKeyMap.set(key, {
|
|
6125
|
+
namespace: keyPrefix,
|
|
6126
|
+
representationName: RepresentationType$1,
|
|
6127
|
+
mergeable: false
|
|
6128
|
+
});
|
|
6129
|
+
}
|
|
6130
|
+
function evictSuccess(luvio, resourceParams) {
|
|
6131
|
+
const key = keyBuilder$2(luvio, resourceParams);
|
|
6132
|
+
luvio.storeEvict(key);
|
|
6133
|
+
}
|
|
6134
|
+
function createResourceRequest$5(config) {
|
|
6135
|
+
const headers = {};
|
|
6136
|
+
return {
|
|
6137
|
+
baseUri: '/services/data/v65.0',
|
|
6138
|
+
basePath: '/personalization/external-apps/' + config.urlParams.idOrAppSourceIdOrName + '/personalization-experience-configs/' + config.urlParams.nameParam + '',
|
|
6139
|
+
method: 'delete',
|
|
6140
|
+
body: null,
|
|
6141
|
+
urlParams: config.urlParams,
|
|
6142
|
+
queryParams: {},
|
|
6143
|
+
headers,
|
|
6144
|
+
priority: 'normal',
|
|
6145
|
+
};
|
|
6146
|
+
}
|
|
6147
|
+
|
|
6148
|
+
function createResourceRequest$4(config) {
|
|
6149
|
+
const result = createResourceRequest$5(config);
|
|
6150
|
+
result.urlParams.name = result.urlParams.nameParam;
|
|
6151
|
+
return result;
|
|
6152
|
+
}
|
|
6153
|
+
|
|
6154
|
+
const adapterName$2 = 'deletePersonalizationExperienceConfig';
|
|
6155
|
+
const deletePersonalizationExperienceConfig_ConfigPropertyMetadata = [
|
|
6156
|
+
generateParamConfigMetadata('idOrAppSourceIdOrName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
6157
|
+
generateParamConfigMetadata('nameParam', true, 0 /* UrlParameter */, 0 /* String */),
|
|
6158
|
+
];
|
|
6159
|
+
const deletePersonalizationExperienceConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, deletePersonalizationExperienceConfig_ConfigPropertyMetadata);
|
|
6160
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$f(deletePersonalizationExperienceConfig_ConfigPropertyMetadata);
|
|
6161
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
6162
|
+
const config = {};
|
|
6163
|
+
typeCheckConfig$f(untrustedConfig, config, deletePersonalizationExperienceConfig_ConfigPropertyMetadata);
|
|
6164
|
+
return config;
|
|
6165
|
+
}
|
|
6166
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
6167
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
6168
|
+
return null;
|
|
6169
|
+
}
|
|
6170
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
6171
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
6172
|
+
}
|
|
6173
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
6174
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
6175
|
+
return null;
|
|
6176
|
+
}
|
|
6177
|
+
return config;
|
|
6178
|
+
}
|
|
6179
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
6180
|
+
const resourceParams = createResourceParams$2(config);
|
|
6181
|
+
const request = createResourceRequest$4(resourceParams);
|
|
6182
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
6183
|
+
.then(() => {
|
|
6184
|
+
return luvio.handleSuccessResponse(() => {
|
|
6185
|
+
evictSuccess(luvio, resourceParams);
|
|
6186
|
+
return luvio.storeBroadcast();
|
|
6187
|
+
}, () => {
|
|
6188
|
+
const cache = new StoreKeyMap();
|
|
6189
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams);
|
|
6190
|
+
return cache;
|
|
6191
|
+
});
|
|
6192
|
+
}, (response) => {
|
|
6193
|
+
deepFreeze(response);
|
|
6194
|
+
throw response;
|
|
6195
|
+
});
|
|
6196
|
+
}
|
|
6197
|
+
const deletePersonalizationExperienceConfigAdapterFactory = (luvio) => {
|
|
6198
|
+
return function personalizationServicedeletePersonalizationExperienceConfig(untrustedConfig) {
|
|
6199
|
+
const config = validateAdapterConfig$2(untrustedConfig, deletePersonalizationExperienceConfig_ConfigPropertyNames);
|
|
6200
|
+
// Invalid or incomplete config
|
|
6201
|
+
if (config === null) {
|
|
6202
|
+
throw new Error(`Invalid config for "${adapterName$2}"`);
|
|
6203
|
+
}
|
|
6204
|
+
return buildNetworkSnapshot$2(luvio, config);
|
|
6205
|
+
};
|
|
6206
|
+
};
|
|
6207
|
+
|
|
6208
|
+
function createResourceRequest$3(config) {
|
|
6209
|
+
const result = createResourceRequest$2(config);
|
|
6210
|
+
result.urlParams.name = result.urlParams.nameParam;
|
|
6211
|
+
return result;
|
|
6212
|
+
}
|
|
6213
|
+
|
|
6214
|
+
function select$1(luvio, params) {
|
|
6215
|
+
return select$5();
|
|
6216
|
+
}
|
|
6217
|
+
function keyBuilder$1(luvio, params) {
|
|
6218
|
+
return keyBuilder$5(luvio, {
|
|
6219
|
+
id: params.urlParams.nameParam
|
|
6220
|
+
});
|
|
6221
|
+
}
|
|
6222
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
6223
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
6224
|
+
}
|
|
6225
|
+
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
6226
|
+
const { body } = response;
|
|
6227
|
+
const key = keyBuilder$1(luvio, resourceParams);
|
|
6228
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
6229
|
+
const snapshot = luvio.storeLookup({
|
|
6230
|
+
recordId: key,
|
|
6231
|
+
node: select$1(),
|
|
6232
|
+
variables: {},
|
|
6233
|
+
}, snapshotRefresh);
|
|
6234
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
6235
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
6236
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
6237
|
+
}
|
|
6238
|
+
}
|
|
6239
|
+
deepFreeze(snapshot.data);
|
|
6240
|
+
return snapshot;
|
|
6241
|
+
}
|
|
6242
|
+
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
6243
|
+
const key = keyBuilder$1(luvio, params);
|
|
6244
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
6245
|
+
const storeMetadataParams = {
|
|
6246
|
+
ttl: TTL$1,
|
|
6247
|
+
namespace: keyPrefix,
|
|
6248
|
+
version: VERSION$1,
|
|
6249
|
+
representationName: RepresentationType$1
|
|
6250
|
+
};
|
|
6251
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
6252
|
+
return errorSnapshot;
|
|
6253
|
+
}
|
|
6254
|
+
function createResourceRequest$2(config) {
|
|
6255
|
+
const headers = {};
|
|
6256
|
+
return {
|
|
6257
|
+
baseUri: '/services/data/v65.0',
|
|
6258
|
+
basePath: '/personalization/external-apps/' + config.urlParams.idOrAppSourceIdOrName + '/personalization-experience-configs/' + config.urlParams.nameParam + '',
|
|
6259
|
+
method: 'get',
|
|
6260
|
+
body: null,
|
|
6261
|
+
urlParams: config.urlParams,
|
|
6262
|
+
queryParams: {},
|
|
6263
|
+
headers,
|
|
6264
|
+
priority: 'normal',
|
|
6265
|
+
};
|
|
6266
|
+
}
|
|
6267
|
+
|
|
6268
|
+
const adapterName$1 = 'getPersonalizationExperienceConfig';
|
|
6269
|
+
const getPersonalizationExperienceConfig_ConfigPropertyMetadata = [
|
|
6270
|
+
generateParamConfigMetadata('idOrAppSourceIdOrName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
6271
|
+
generateParamConfigMetadata('nameParam', true, 0 /* UrlParameter */, 0 /* String */),
|
|
6272
|
+
];
|
|
6273
|
+
const getPersonalizationExperienceConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getPersonalizationExperienceConfig_ConfigPropertyMetadata);
|
|
6274
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$f(getPersonalizationExperienceConfig_ConfigPropertyMetadata);
|
|
6275
|
+
function keyBuilder(luvio, config) {
|
|
6276
|
+
const resourceParams = createResourceParams$1(config);
|
|
6277
|
+
return keyBuilder$1(luvio, resourceParams);
|
|
6278
|
+
}
|
|
6279
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
6280
|
+
const config = {};
|
|
6281
|
+
typeCheckConfig$f(untrustedConfig, config, getPersonalizationExperienceConfig_ConfigPropertyMetadata);
|
|
6282
|
+
return config;
|
|
6283
|
+
}
|
|
6284
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
6285
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
6286
|
+
return null;
|
|
6287
|
+
}
|
|
6288
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
6289
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
6290
|
+
}
|
|
6291
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
6292
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
6293
|
+
return null;
|
|
6294
|
+
}
|
|
6295
|
+
return config;
|
|
6296
|
+
}
|
|
6297
|
+
function adapterFragment(luvio, config) {
|
|
6298
|
+
createResourceParams$1(config);
|
|
6299
|
+
return select$1();
|
|
6300
|
+
}
|
|
6301
|
+
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
6302
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
|
|
6303
|
+
config,
|
|
6304
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
6305
|
+
});
|
|
6306
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
6307
|
+
}
|
|
6308
|
+
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
6309
|
+
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
6310
|
+
config,
|
|
6311
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
6312
|
+
});
|
|
6313
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
6314
|
+
}
|
|
6315
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
6316
|
+
const resourceParams = createResourceParams$1(config);
|
|
6317
|
+
const request = createResourceRequest$3(resourceParams);
|
|
6318
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
6319
|
+
.then((response) => {
|
|
6320
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
6321
|
+
const cache = new StoreKeyMap();
|
|
6322
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
6323
|
+
return cache;
|
|
6324
|
+
});
|
|
6325
|
+
}, (response) => {
|
|
6326
|
+
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
6327
|
+
});
|
|
6328
|
+
}
|
|
6329
|
+
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
6330
|
+
return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
6331
|
+
}
|
|
6332
|
+
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
6333
|
+
const { luvio, config } = context;
|
|
6334
|
+
const selector = {
|
|
6335
|
+
recordId: keyBuilder(luvio, config),
|
|
6336
|
+
node: adapterFragment(luvio, config),
|
|
6337
|
+
variables: {},
|
|
6338
|
+
};
|
|
6339
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
6340
|
+
config,
|
|
6341
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
6342
|
+
});
|
|
6343
|
+
return cacheSnapshot;
|
|
6344
|
+
}
|
|
6345
|
+
const getPersonalizationExperienceConfigAdapterFactory = (luvio) => function personalizationService__getPersonalizationExperienceConfig(untrustedConfig, requestContext) {
|
|
6346
|
+
const config = validateAdapterConfig$1(untrustedConfig, getPersonalizationExperienceConfig_ConfigPropertyNames);
|
|
6347
|
+
// Invalid or incomplete config
|
|
6348
|
+
if (config === null) {
|
|
6349
|
+
return null;
|
|
6350
|
+
}
|
|
6351
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
6352
|
+
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
6353
|
+
};
|
|
6354
|
+
|
|
6355
|
+
function select(luvio, params) {
|
|
6356
|
+
return select$5();
|
|
6357
|
+
}
|
|
6358
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
6359
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
6360
|
+
}
|
|
6361
|
+
function ingestSuccess(luvio, resourceParams, response) {
|
|
6362
|
+
const { body } = response;
|
|
6363
|
+
const key = keyBuilderFromType(luvio, body);
|
|
6364
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
6365
|
+
const snapshot = luvio.storeLookup({
|
|
6366
|
+
recordId: key,
|
|
6367
|
+
node: select(),
|
|
6368
|
+
variables: {},
|
|
6369
|
+
});
|
|
6370
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
6371
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
6372
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
6373
|
+
}
|
|
6374
|
+
}
|
|
6375
|
+
deepFreeze(snapshot.data);
|
|
6376
|
+
return snapshot;
|
|
6377
|
+
}
|
|
6378
|
+
function createResourceRequest$1(config) {
|
|
6379
|
+
const headers = {};
|
|
6380
|
+
return {
|
|
6381
|
+
baseUri: '/services/data/v65.0',
|
|
6382
|
+
basePath: '/personalization/external-apps/' + config.urlParams.idOrAppSourceIdOrName + '/personalization-experience-configs/' + config.urlParams.nameParam + '',
|
|
6383
|
+
method: 'put',
|
|
6384
|
+
body: config.body,
|
|
6385
|
+
urlParams: config.urlParams,
|
|
6386
|
+
queryParams: {},
|
|
6387
|
+
headers,
|
|
6388
|
+
priority: 'normal',
|
|
6389
|
+
};
|
|
6390
|
+
}
|
|
6391
|
+
|
|
6392
|
+
function createResourceRequest(config) {
|
|
6393
|
+
const result = createResourceRequest$1(config);
|
|
6394
|
+
result.urlParams.name = result.urlParams.nameParam;
|
|
6395
|
+
return result;
|
|
6396
|
+
}
|
|
6397
|
+
|
|
6398
|
+
const adapterName = 'updatePersonalizationExperienceConfig';
|
|
6399
|
+
const updatePersonalizationExperienceConfig_ConfigPropertyMetadata = [
|
|
6400
|
+
generateParamConfigMetadata('idOrAppSourceIdOrName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
6401
|
+
generateParamConfigMetadata('nameParam', true, 0 /* UrlParameter */, 0 /* String */),
|
|
6402
|
+
generateParamConfigMetadata('dataProvider', true, 2 /* Body */, 4 /* Unsupported */),
|
|
6403
|
+
generateParamConfigMetadata('description', true, 2 /* Body */, 0 /* String */),
|
|
6404
|
+
generateParamConfigMetadata('displayUrl', true, 2 /* Body */, 0 /* String */),
|
|
6405
|
+
generateParamConfigMetadata('isEnabled', true, 2 /* Body */, 1 /* Boolean */),
|
|
6406
|
+
generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
|
|
6407
|
+
generateParamConfigMetadata('lastModifiedDate', false, 2 /* Body */, 0 /* String */),
|
|
6408
|
+
generateParamConfigMetadata('name', true, 2 /* Body */, 0 /* String */),
|
|
6409
|
+
generateParamConfigMetadata('publishedDate', false, 2 /* Body */, 0 /* String */),
|
|
6410
|
+
generateParamConfigMetadata('sourceMatchers', true, 2 /* Body */, 4 /* Unsupported */, true),
|
|
6411
|
+
generateParamConfigMetadata('transformationConfig', true, 2 /* Body */, 4 /* Unsupported */),
|
|
6412
|
+
];
|
|
6413
|
+
const updatePersonalizationExperienceConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, updatePersonalizationExperienceConfig_ConfigPropertyMetadata);
|
|
6414
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$f(updatePersonalizationExperienceConfig_ConfigPropertyMetadata);
|
|
6415
|
+
function typeCheckConfig(untrustedConfig) {
|
|
6416
|
+
const config = {};
|
|
6417
|
+
typeCheckConfig$f(untrustedConfig, config, updatePersonalizationExperienceConfig_ConfigPropertyMetadata);
|
|
6418
|
+
const untrustedConfig_dataProvider = untrustedConfig.dataProvider;
|
|
6419
|
+
config.dataProvider = untrustedConfig_dataProvider;
|
|
6420
|
+
const untrustedConfig_sourceMatchers = untrustedConfig.sourceMatchers;
|
|
6421
|
+
if (ArrayIsArray$1(untrustedConfig_sourceMatchers)) {
|
|
6422
|
+
const untrustedConfig_sourceMatchers_array = [];
|
|
6423
|
+
for (let i = 0, arrayLength = untrustedConfig_sourceMatchers.length; i < arrayLength; i++) {
|
|
6424
|
+
const untrustedConfig_sourceMatchers_item = untrustedConfig_sourceMatchers[i];
|
|
6425
|
+
untrustedConfig_sourceMatchers_array.push(untrustedConfig_sourceMatchers_item);
|
|
6426
|
+
}
|
|
6427
|
+
config.sourceMatchers = untrustedConfig_sourceMatchers_array;
|
|
6428
|
+
}
|
|
6429
|
+
const untrustedConfig_transformationConfig = untrustedConfig.transformationConfig;
|
|
6430
|
+
config.transformationConfig = untrustedConfig_transformationConfig;
|
|
6431
|
+
return config;
|
|
6432
|
+
}
|
|
6433
|
+
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
6434
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
6435
|
+
return null;
|
|
6436
|
+
}
|
|
6437
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
6438
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
6439
|
+
}
|
|
6440
|
+
const config = typeCheckConfig(untrustedConfig);
|
|
6441
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
6442
|
+
return null;
|
|
6443
|
+
}
|
|
6444
|
+
return config;
|
|
6445
|
+
}
|
|
6446
|
+
function buildNetworkSnapshot(luvio, config, options) {
|
|
6447
|
+
const resourceParams = createResourceParams(config);
|
|
6448
|
+
const request = createResourceRequest(resourceParams);
|
|
6449
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
6450
|
+
.then((response) => {
|
|
6451
|
+
return luvio.handleSuccessResponse(() => {
|
|
6452
|
+
const snapshot = ingestSuccess(luvio, resourceParams, response);
|
|
6453
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
6454
|
+
}, () => {
|
|
6455
|
+
const cache = new StoreKeyMap();
|
|
6456
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
6457
|
+
return cache;
|
|
6458
|
+
});
|
|
6459
|
+
}, (response) => {
|
|
6460
|
+
deepFreeze(response);
|
|
6461
|
+
throw response;
|
|
6462
|
+
});
|
|
6463
|
+
}
|
|
6464
|
+
const updatePersonalizationExperienceConfigAdapterFactory = (luvio) => {
|
|
6465
|
+
return function updatePersonalizationExperienceConfig(untrustedConfig) {
|
|
6466
|
+
const config = validateAdapterConfig(untrustedConfig, updatePersonalizationExperienceConfig_ConfigPropertyNames);
|
|
6467
|
+
// Invalid or incomplete config
|
|
6468
|
+
if (config === null) {
|
|
6469
|
+
throw new Error('Invalid config for "updatePersonalizationExperienceConfig"');
|
|
6470
|
+
}
|
|
6471
|
+
return buildNetworkSnapshot(luvio, config);
|
|
6472
|
+
};
|
|
5384
6473
|
};
|
|
5385
6474
|
|
|
5386
|
-
export { createPersonalizationPointAdapterFactory, createPersonalizationSchemaAdapterFactory, deletePersonalizationPointAdapterFactory, deletePersonalizationSchemaAdapterFactory, getPersonalizationEsModelMappingAdapterFactory, getPersonalizationPointAdapterFactory, getPersonalizationSchemaAdapterFactory, getTrainingHistoryAdapterFactory, postPersonalizationRecommenderSimulateActionAdapterFactory, updatePersonalizationPointAdapterFactory };
|
|
6475
|
+
export { createPersonalizationExperiencesConfigAdapterFactory, createPersonalizationPointAdapterFactory, createPersonalizationSchemaAdapterFactory, deletePersonalizationExperienceConfigAdapterFactory, deletePersonalizationPointAdapterFactory, deletePersonalizationSchemaAdapterFactory, getPersonalizationEsModelMappingAdapterFactory, getPersonalizationExperienceConfigAdapterFactory, getPersonalizationExperiencesConfigsAdapterFactory, getPersonalizationPointAdapterFactory, getPersonalizationSchemaAdapterFactory, getTrainingHistoryAdapterFactory, postPersonalizationRecommenderSimulateActionAdapterFactory, updatePersonalizationExperienceConfigAdapterFactory, updatePersonalizationPointAdapterFactory };
|