@salesforce/lds-adapters-cdp-personalization-service 1.303.0 → 1.305.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/es2018/cdp-personalization-service.js +979 -168
- package/dist/es/es2018/types/src/generated/adapters/createPersonalizationPoint.d.ts +4 -4
- package/dist/es/es2018/types/src/generated/adapters/updatePersonalizationPoint.d.ts +4 -4
- package/dist/es/es2018/types/src/generated/resources/postPersonalizationPersonalizationPoints.d.ts +4 -4
- package/dist/es/es2018/types/src/generated/resources/putPersonalizationPersonalizationPointsByIdOrName.d.ts +4 -4
- package/dist/es/es2018/types/src/generated/types/CriteriaRepresentation.d.ts +44 -0
- package/dist/es/es2018/types/src/generated/types/FilterRepresentation.d.ts +66 -0
- package/dist/es/es2018/types/src/generated/types/FiltersWrapRepresentation.d.ts +44 -0
- package/dist/es/es2018/types/src/generated/types/PersonalizationAttributeInputRepresentation.d.ts +3 -3
- package/dist/es/es2018/types/src/generated/types/PersonalizationAttributeValueInputRepresentation.d.ts +5 -5
- package/dist/es/es2018/types/src/generated/types/PersonalizationDecisionInputRepresentation.d.ts +7 -7
- package/dist/es/es2018/types/src/generated/types/PersonalizationDecisionRepresentation.d.ts +14 -4
- package/dist/es/es2018/types/src/generated/types/PersonalizationPointInputRepresentation.d.ts +9 -9
- package/dist/es/es2018/types/src/generated/types/PersonalizationPointRepresentation.d.ts +12 -3
- package/dist/es/es2018/types/src/generated/types/SubjectRepresentation.d.ts +37 -0
- package/package.json +3 -3
- package/sfdc/index.js +980 -169
- package/src/raml/api.raml +126 -1
- package/src/raml/luvio.raml +2 -0
|
@@ -72,6 +72,7 @@ function buildAdapterValidationConfig(displayName, paramsMeta) {
|
|
|
72
72
|
const keyPrefix = 'personalization-service';
|
|
73
73
|
|
|
74
74
|
const { isArray: ArrayIsArray } = Array;
|
|
75
|
+
const { stringify: JSONStringify } = JSON;
|
|
75
76
|
function equalsArray(a, b, equalsItem) {
|
|
76
77
|
const aLength = a.length;
|
|
77
78
|
const bLength = b.length;
|
|
@@ -91,62 +92,66 @@ function createLink(ref) {
|
|
|
91
92
|
};
|
|
92
93
|
}
|
|
93
94
|
|
|
94
|
-
function validate$
|
|
95
|
+
function validate$b(obj, path = 'PersonalizationAttributeValueInputRepresentation') {
|
|
95
96
|
const v_error = (() => {
|
|
96
97
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
97
98
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
98
99
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
const obj_attributeName = obj.attributeName;
|
|
126
|
-
const path_attributeName = path + '.attributeName';
|
|
127
|
-
let obj_attributeName_union0 = null;
|
|
128
|
-
const obj_attributeName_union0_error = (() => {
|
|
129
|
-
if (typeof obj_attributeName !== 'string') {
|
|
130
|
-
return new TypeError('Expected "string" but received "' + typeof obj_attributeName + '" (at "' + path_attributeName + '")');
|
|
100
|
+
if (obj.attributeEnum !== undefined) {
|
|
101
|
+
const obj_attributeEnum = obj.attributeEnum;
|
|
102
|
+
const path_attributeEnum = path + '.attributeEnum';
|
|
103
|
+
let obj_attributeEnum_union0 = null;
|
|
104
|
+
const obj_attributeEnum_union0_error = (() => {
|
|
105
|
+
if (typeof obj_attributeEnum !== 'string') {
|
|
106
|
+
return new TypeError('Expected "string" but received "' + typeof obj_attributeEnum + '" (at "' + path_attributeEnum + '")');
|
|
107
|
+
}
|
|
108
|
+
})();
|
|
109
|
+
if (obj_attributeEnum_union0_error != null) {
|
|
110
|
+
obj_attributeEnum_union0 = obj_attributeEnum_union0_error.message;
|
|
111
|
+
}
|
|
112
|
+
let obj_attributeEnum_union1 = null;
|
|
113
|
+
const obj_attributeEnum_union1_error = (() => {
|
|
114
|
+
if (obj_attributeEnum !== null) {
|
|
115
|
+
return new TypeError('Expected "null" but received "' + typeof obj_attributeEnum + '" (at "' + path_attributeEnum + '")');
|
|
116
|
+
}
|
|
117
|
+
})();
|
|
118
|
+
if (obj_attributeEnum_union1_error != null) {
|
|
119
|
+
obj_attributeEnum_union1 = obj_attributeEnum_union1_error.message;
|
|
120
|
+
}
|
|
121
|
+
if (obj_attributeEnum_union0 && obj_attributeEnum_union1) {
|
|
122
|
+
let message = 'Object doesn\'t match union (at "' + path_attributeEnum + '")';
|
|
123
|
+
message += '\n' + obj_attributeEnum_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
124
|
+
message += '\n' + obj_attributeEnum_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
125
|
+
return new TypeError(message);
|
|
131
126
|
}
|
|
132
|
-
})();
|
|
133
|
-
if (obj_attributeName_union0_error != null) {
|
|
134
|
-
obj_attributeName_union0 = obj_attributeName_union0_error.message;
|
|
135
127
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
128
|
+
if (obj.attributeName !== undefined) {
|
|
129
|
+
const obj_attributeName = obj.attributeName;
|
|
130
|
+
const path_attributeName = path + '.attributeName';
|
|
131
|
+
let obj_attributeName_union0 = null;
|
|
132
|
+
const obj_attributeName_union0_error = (() => {
|
|
133
|
+
if (typeof obj_attributeName !== 'string') {
|
|
134
|
+
return new TypeError('Expected "string" but received "' + typeof obj_attributeName + '" (at "' + path_attributeName + '")');
|
|
135
|
+
}
|
|
136
|
+
})();
|
|
137
|
+
if (obj_attributeName_union0_error != null) {
|
|
138
|
+
obj_attributeName_union0 = obj_attributeName_union0_error.message;
|
|
139
|
+
}
|
|
140
|
+
let obj_attributeName_union1 = null;
|
|
141
|
+
const obj_attributeName_union1_error = (() => {
|
|
142
|
+
if (obj_attributeName !== null) {
|
|
143
|
+
return new TypeError('Expected "null" but received "' + typeof obj_attributeName + '" (at "' + path_attributeName + '")');
|
|
144
|
+
}
|
|
145
|
+
})();
|
|
146
|
+
if (obj_attributeName_union1_error != null) {
|
|
147
|
+
obj_attributeName_union1 = obj_attributeName_union1_error.message;
|
|
148
|
+
}
|
|
149
|
+
if (obj_attributeName_union0 && obj_attributeName_union1) {
|
|
150
|
+
let message = 'Object doesn\'t match union (at "' + path_attributeName + '")';
|
|
151
|
+
message += '\n' + obj_attributeName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
152
|
+
message += '\n' + obj_attributeName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
153
|
+
return new TypeError(message);
|
|
140
154
|
}
|
|
141
|
-
})();
|
|
142
|
-
if (obj_attributeName_union1_error != null) {
|
|
143
|
-
obj_attributeName_union1 = obj_attributeName_union1_error.message;
|
|
144
|
-
}
|
|
145
|
-
if (obj_attributeName_union0 && obj_attributeName_union1) {
|
|
146
|
-
let message = 'Object doesn\'t match union (at "' + path_attributeName + '")';
|
|
147
|
-
message += '\n' + obj_attributeName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
148
|
-
message += '\n' + obj_attributeName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
149
|
-
return new TypeError(message);
|
|
150
155
|
}
|
|
151
156
|
const obj_value = obj.value;
|
|
152
157
|
const path_value = path + '.value';
|
|
@@ -178,24 +183,26 @@ function validate$7(obj, path = 'PersonalizationAttributeValueInputRepresentatio
|
|
|
178
183
|
return v_error === undefined ? null : v_error;
|
|
179
184
|
}
|
|
180
185
|
|
|
181
|
-
function validate$
|
|
186
|
+
function validate$a(obj, path = 'PersonalizationDecisionInputRepresentation') {
|
|
182
187
|
const v_error = (() => {
|
|
183
188
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
184
189
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
185
190
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
191
|
+
if (obj.attributeValues !== undefined) {
|
|
192
|
+
const obj_attributeValues = obj.attributeValues;
|
|
193
|
+
const path_attributeValues = path + '.attributeValues';
|
|
194
|
+
if (!ArrayIsArray(obj_attributeValues)) {
|
|
195
|
+
return new TypeError('Expected "array" but received "' + typeof obj_attributeValues + '" (at "' + path_attributeValues + '")');
|
|
196
|
+
}
|
|
197
|
+
for (let i = 0; i < obj_attributeValues.length; i++) {
|
|
198
|
+
const obj_attributeValues_item = obj_attributeValues[i];
|
|
199
|
+
const path_attributeValues_item = path_attributeValues + '[' + i + ']';
|
|
200
|
+
const referencepath_attributeValues_itemValidationError = validate$b(obj_attributeValues_item, path_attributeValues_item);
|
|
201
|
+
if (referencepath_attributeValues_itemValidationError !== null) {
|
|
202
|
+
let message = 'Object doesn\'t match PersonalizationAttributeValueInputRepresentation (at "' + path_attributeValues_item + '")\n';
|
|
203
|
+
message += referencepath_attributeValues_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
204
|
+
return new TypeError(message);
|
|
205
|
+
}
|
|
199
206
|
}
|
|
200
207
|
}
|
|
201
208
|
const obj_criteria = obj.criteria;
|
|
@@ -224,31 +231,33 @@ function validate$6(obj, path = 'PersonalizationDecisionInputRepresentation') {
|
|
|
224
231
|
message += '\n' + obj_criteria_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
225
232
|
return new TypeError(message);
|
|
226
233
|
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
234
|
+
if (obj.description !== undefined) {
|
|
235
|
+
const obj_description = obj.description;
|
|
236
|
+
const path_description = path + '.description';
|
|
237
|
+
let obj_description_union0 = null;
|
|
238
|
+
const obj_description_union0_error = (() => {
|
|
239
|
+
if (typeof obj_description !== 'string') {
|
|
240
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
241
|
+
}
|
|
242
|
+
})();
|
|
243
|
+
if (obj_description_union0_error != null) {
|
|
244
|
+
obj_description_union0 = obj_description_union0_error.message;
|
|
245
|
+
}
|
|
246
|
+
let obj_description_union1 = null;
|
|
247
|
+
const obj_description_union1_error = (() => {
|
|
248
|
+
if (obj_description !== null) {
|
|
249
|
+
return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
250
|
+
}
|
|
251
|
+
})();
|
|
252
|
+
if (obj_description_union1_error != null) {
|
|
253
|
+
obj_description_union1 = obj_description_union1_error.message;
|
|
254
|
+
}
|
|
255
|
+
if (obj_description_union0 && obj_description_union1) {
|
|
256
|
+
let message = 'Object doesn\'t match union (at "' + path_description + '")';
|
|
257
|
+
message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
258
|
+
message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
259
|
+
return new TypeError(message);
|
|
242
260
|
}
|
|
243
|
-
})();
|
|
244
|
-
if (obj_description_union1_error != null) {
|
|
245
|
-
obj_description_union1 = obj_description_union1_error.message;
|
|
246
|
-
}
|
|
247
|
-
if (obj_description_union0 && obj_description_union1) {
|
|
248
|
-
let message = 'Object doesn\'t match union (at "' + path_description + '")';
|
|
249
|
-
message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
250
|
-
message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
251
|
-
return new TypeError(message);
|
|
252
261
|
}
|
|
253
262
|
const obj_label = obj.label;
|
|
254
263
|
const path_label = path + '.label';
|
|
@@ -302,38 +311,40 @@ function validate$6(obj, path = 'PersonalizationDecisionInputRepresentation') {
|
|
|
302
311
|
message += '\n' + obj_name_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
303
312
|
return new TypeError(message);
|
|
304
313
|
}
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
314
|
+
if (obj.personalizerName !== undefined) {
|
|
315
|
+
const obj_personalizerName = obj.personalizerName;
|
|
316
|
+
const path_personalizerName = path + '.personalizerName';
|
|
317
|
+
let obj_personalizerName_union0 = null;
|
|
318
|
+
const obj_personalizerName_union0_error = (() => {
|
|
319
|
+
if (typeof obj_personalizerName !== 'string') {
|
|
320
|
+
return new TypeError('Expected "string" but received "' + typeof obj_personalizerName + '" (at "' + path_personalizerName + '")');
|
|
321
|
+
}
|
|
322
|
+
})();
|
|
323
|
+
if (obj_personalizerName_union0_error != null) {
|
|
324
|
+
obj_personalizerName_union0 = obj_personalizerName_union0_error.message;
|
|
325
|
+
}
|
|
326
|
+
let obj_personalizerName_union1 = null;
|
|
327
|
+
const obj_personalizerName_union1_error = (() => {
|
|
328
|
+
if (obj_personalizerName !== null) {
|
|
329
|
+
return new TypeError('Expected "null" but received "' + typeof obj_personalizerName + '" (at "' + path_personalizerName + '")');
|
|
330
|
+
}
|
|
331
|
+
})();
|
|
332
|
+
if (obj_personalizerName_union1_error != null) {
|
|
333
|
+
obj_personalizerName_union1 = obj_personalizerName_union1_error.message;
|
|
334
|
+
}
|
|
335
|
+
if (obj_personalizerName_union0 && obj_personalizerName_union1) {
|
|
336
|
+
let message = 'Object doesn\'t match union (at "' + path_personalizerName + '")';
|
|
337
|
+
message += '\n' + obj_personalizerName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
338
|
+
message += '\n' + obj_personalizerName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
339
|
+
return new TypeError(message);
|
|
320
340
|
}
|
|
321
|
-
})();
|
|
322
|
-
if (obj_personalizerName_union1_error != null) {
|
|
323
|
-
obj_personalizerName_union1 = obj_personalizerName_union1_error.message;
|
|
324
|
-
}
|
|
325
|
-
if (obj_personalizerName_union0 && obj_personalizerName_union1) {
|
|
326
|
-
let message = 'Object doesn\'t match union (at "' + path_personalizerName + '")';
|
|
327
|
-
message += '\n' + obj_personalizerName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
328
|
-
message += '\n' + obj_personalizerName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
329
|
-
return new TypeError(message);
|
|
330
341
|
}
|
|
331
342
|
})();
|
|
332
343
|
return v_error === undefined ? null : v_error;
|
|
333
344
|
}
|
|
334
345
|
|
|
335
|
-
const VERSION$
|
|
336
|
-
function validate$
|
|
346
|
+
const VERSION$6 = "52ea9c14b7a747a28cedbcff0e7ab169";
|
|
347
|
+
function validate$9(obj, path = 'PersonalizationAttributeValueRepresentation') {
|
|
337
348
|
const v_error = (() => {
|
|
338
349
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
339
350
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -419,10 +430,10 @@ function validate$5(obj, path = 'PersonalizationAttributeValueRepresentation') {
|
|
|
419
430
|
})();
|
|
420
431
|
return v_error === undefined ? null : v_error;
|
|
421
432
|
}
|
|
422
|
-
const select$
|
|
433
|
+
const select$b = function PersonalizationAttributeValueRepresentationSelect() {
|
|
423
434
|
return {
|
|
424
435
|
kind: 'Fragment',
|
|
425
|
-
version: VERSION$
|
|
436
|
+
version: VERSION$6,
|
|
426
437
|
private: [],
|
|
427
438
|
selections: [
|
|
428
439
|
{
|
|
@@ -440,7 +451,7 @@ const select$9 = function PersonalizationAttributeValueRepresentationSelect() {
|
|
|
440
451
|
]
|
|
441
452
|
};
|
|
442
453
|
};
|
|
443
|
-
function equals$
|
|
454
|
+
function equals$6(existing, incoming) {
|
|
444
455
|
const existing_attributeEnum = existing.attributeEnum;
|
|
445
456
|
const incoming_attributeEnum = incoming.attributeEnum;
|
|
446
457
|
if (!(existing_attributeEnum === incoming_attributeEnum)) {
|
|
@@ -459,7 +470,740 @@ function equals$4(existing, incoming) {
|
|
|
459
470
|
return true;
|
|
460
471
|
}
|
|
461
472
|
|
|
462
|
-
|
|
473
|
+
function validate$8(obj, path = 'FiltersWrapRepresentation') {
|
|
474
|
+
const v_error = (() => {
|
|
475
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
476
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
477
|
+
}
|
|
478
|
+
if (obj.filters !== undefined) {
|
|
479
|
+
const obj_filters = obj.filters;
|
|
480
|
+
const path_filters = path + '.filters';
|
|
481
|
+
if (!ArrayIsArray(obj_filters)) {
|
|
482
|
+
return new TypeError('Expected "array" but received "' + typeof obj_filters + '" (at "' + path_filters + '")');
|
|
483
|
+
}
|
|
484
|
+
for (let i = 0; i < obj_filters.length; i++) {
|
|
485
|
+
const obj_filters_item = obj_filters[i];
|
|
486
|
+
const path_filters_item = path_filters + '[' + i + ']';
|
|
487
|
+
if (typeof obj_filters_item !== 'object') {
|
|
488
|
+
return new TypeError('Expected "object" but received "' + typeof obj_filters_item + '" (at "' + path_filters_item + '")');
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
if (obj.operator !== undefined) {
|
|
493
|
+
const obj_operator = obj.operator;
|
|
494
|
+
const path_operator = path + '.operator';
|
|
495
|
+
let obj_operator_union0 = null;
|
|
496
|
+
const obj_operator_union0_error = (() => {
|
|
497
|
+
if (typeof obj_operator !== 'string') {
|
|
498
|
+
return new TypeError('Expected "string" but received "' + typeof obj_operator + '" (at "' + path_operator + '")');
|
|
499
|
+
}
|
|
500
|
+
})();
|
|
501
|
+
if (obj_operator_union0_error != null) {
|
|
502
|
+
obj_operator_union0 = obj_operator_union0_error.message;
|
|
503
|
+
}
|
|
504
|
+
let obj_operator_union1 = null;
|
|
505
|
+
const obj_operator_union1_error = (() => {
|
|
506
|
+
if (obj_operator !== null) {
|
|
507
|
+
return new TypeError('Expected "null" but received "' + typeof obj_operator + '" (at "' + path_operator + '")');
|
|
508
|
+
}
|
|
509
|
+
})();
|
|
510
|
+
if (obj_operator_union1_error != null) {
|
|
511
|
+
obj_operator_union1 = obj_operator_union1_error.message;
|
|
512
|
+
}
|
|
513
|
+
if (obj_operator_union0 && obj_operator_union1) {
|
|
514
|
+
let message = 'Object doesn\'t match union (at "' + path_operator + '")';
|
|
515
|
+
message += '\n' + obj_operator_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
516
|
+
message += '\n' + obj_operator_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
517
|
+
return new TypeError(message);
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
if (obj.type !== undefined) {
|
|
521
|
+
const obj_type = obj.type;
|
|
522
|
+
const path_type = path + '.type';
|
|
523
|
+
let obj_type_union0 = null;
|
|
524
|
+
const obj_type_union0_error = (() => {
|
|
525
|
+
if (typeof obj_type !== 'string') {
|
|
526
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
527
|
+
}
|
|
528
|
+
})();
|
|
529
|
+
if (obj_type_union0_error != null) {
|
|
530
|
+
obj_type_union0 = obj_type_union0_error.message;
|
|
531
|
+
}
|
|
532
|
+
let obj_type_union1 = null;
|
|
533
|
+
const obj_type_union1_error = (() => {
|
|
534
|
+
if (obj_type !== null) {
|
|
535
|
+
return new TypeError('Expected "null" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
536
|
+
}
|
|
537
|
+
})();
|
|
538
|
+
if (obj_type_union1_error != null) {
|
|
539
|
+
obj_type_union1 = obj_type_union1_error.message;
|
|
540
|
+
}
|
|
541
|
+
if (obj_type_union0 && obj_type_union1) {
|
|
542
|
+
let message = 'Object doesn\'t match union (at "' + path_type + '")';
|
|
543
|
+
message += '\n' + obj_type_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
544
|
+
message += '\n' + obj_type_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
545
|
+
return new TypeError(message);
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
})();
|
|
549
|
+
return v_error === undefined ? null : v_error;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
function validate$7(obj, path = 'SubjectRepresentation') {
|
|
553
|
+
const v_error = (() => {
|
|
554
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
555
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
556
|
+
}
|
|
557
|
+
const obj_fieldApiName = obj.fieldApiName;
|
|
558
|
+
const path_fieldApiName = path + '.fieldApiName';
|
|
559
|
+
let obj_fieldApiName_union0 = null;
|
|
560
|
+
const obj_fieldApiName_union0_error = (() => {
|
|
561
|
+
if (typeof obj_fieldApiName !== 'string') {
|
|
562
|
+
return new TypeError('Expected "string" but received "' + typeof obj_fieldApiName + '" (at "' + path_fieldApiName + '")');
|
|
563
|
+
}
|
|
564
|
+
})();
|
|
565
|
+
if (obj_fieldApiName_union0_error != null) {
|
|
566
|
+
obj_fieldApiName_union0 = obj_fieldApiName_union0_error.message;
|
|
567
|
+
}
|
|
568
|
+
let obj_fieldApiName_union1 = null;
|
|
569
|
+
const obj_fieldApiName_union1_error = (() => {
|
|
570
|
+
if (obj_fieldApiName !== null) {
|
|
571
|
+
return new TypeError('Expected "null" but received "' + typeof obj_fieldApiName + '" (at "' + path_fieldApiName + '")');
|
|
572
|
+
}
|
|
573
|
+
})();
|
|
574
|
+
if (obj_fieldApiName_union1_error != null) {
|
|
575
|
+
obj_fieldApiName_union1 = obj_fieldApiName_union1_error.message;
|
|
576
|
+
}
|
|
577
|
+
if (obj_fieldApiName_union0 && obj_fieldApiName_union1) {
|
|
578
|
+
let message = 'Object doesn\'t match union (at "' + path_fieldApiName + '")';
|
|
579
|
+
message += '\n' + obj_fieldApiName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
580
|
+
message += '\n' + obj_fieldApiName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
581
|
+
return new TypeError(message);
|
|
582
|
+
}
|
|
583
|
+
if (obj.fieldLabel !== undefined) {
|
|
584
|
+
const obj_fieldLabel = obj.fieldLabel;
|
|
585
|
+
const path_fieldLabel = path + '.fieldLabel';
|
|
586
|
+
let obj_fieldLabel_union0 = null;
|
|
587
|
+
const obj_fieldLabel_union0_error = (() => {
|
|
588
|
+
if (typeof obj_fieldLabel !== 'string') {
|
|
589
|
+
return new TypeError('Expected "string" but received "' + typeof obj_fieldLabel + '" (at "' + path_fieldLabel + '")');
|
|
590
|
+
}
|
|
591
|
+
})();
|
|
592
|
+
if (obj_fieldLabel_union0_error != null) {
|
|
593
|
+
obj_fieldLabel_union0 = obj_fieldLabel_union0_error.message;
|
|
594
|
+
}
|
|
595
|
+
let obj_fieldLabel_union1 = null;
|
|
596
|
+
const obj_fieldLabel_union1_error = (() => {
|
|
597
|
+
if (obj_fieldLabel !== null) {
|
|
598
|
+
return new TypeError('Expected "null" but received "' + typeof obj_fieldLabel + '" (at "' + path_fieldLabel + '")');
|
|
599
|
+
}
|
|
600
|
+
})();
|
|
601
|
+
if (obj_fieldLabel_union1_error != null) {
|
|
602
|
+
obj_fieldLabel_union1 = obj_fieldLabel_union1_error.message;
|
|
603
|
+
}
|
|
604
|
+
if (obj_fieldLabel_union0 && obj_fieldLabel_union1) {
|
|
605
|
+
let message = 'Object doesn\'t match union (at "' + path_fieldLabel + '")';
|
|
606
|
+
message += '\n' + obj_fieldLabel_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
607
|
+
message += '\n' + obj_fieldLabel_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
608
|
+
return new TypeError(message);
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
const obj_objectApiName = obj.objectApiName;
|
|
612
|
+
const path_objectApiName = path + '.objectApiName';
|
|
613
|
+
let obj_objectApiName_union0 = null;
|
|
614
|
+
const obj_objectApiName_union0_error = (() => {
|
|
615
|
+
if (typeof obj_objectApiName !== 'string') {
|
|
616
|
+
return new TypeError('Expected "string" but received "' + typeof obj_objectApiName + '" (at "' + path_objectApiName + '")');
|
|
617
|
+
}
|
|
618
|
+
})();
|
|
619
|
+
if (obj_objectApiName_union0_error != null) {
|
|
620
|
+
obj_objectApiName_union0 = obj_objectApiName_union0_error.message;
|
|
621
|
+
}
|
|
622
|
+
let obj_objectApiName_union1 = null;
|
|
623
|
+
const obj_objectApiName_union1_error = (() => {
|
|
624
|
+
if (obj_objectApiName !== null) {
|
|
625
|
+
return new TypeError('Expected "null" but received "' + typeof obj_objectApiName + '" (at "' + path_objectApiName + '")');
|
|
626
|
+
}
|
|
627
|
+
})();
|
|
628
|
+
if (obj_objectApiName_union1_error != null) {
|
|
629
|
+
obj_objectApiName_union1 = obj_objectApiName_union1_error.message;
|
|
630
|
+
}
|
|
631
|
+
if (obj_objectApiName_union0 && obj_objectApiName_union1) {
|
|
632
|
+
let message = 'Object doesn\'t match union (at "' + path_objectApiName + '")';
|
|
633
|
+
message += '\n' + obj_objectApiName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
634
|
+
message += '\n' + obj_objectApiName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
635
|
+
return new TypeError(message);
|
|
636
|
+
}
|
|
637
|
+
if (obj.objectLabel !== undefined) {
|
|
638
|
+
const obj_objectLabel = obj.objectLabel;
|
|
639
|
+
const path_objectLabel = path + '.objectLabel';
|
|
640
|
+
let obj_objectLabel_union0 = null;
|
|
641
|
+
const obj_objectLabel_union0_error = (() => {
|
|
642
|
+
if (typeof obj_objectLabel !== 'string') {
|
|
643
|
+
return new TypeError('Expected "string" but received "' + typeof obj_objectLabel + '" (at "' + path_objectLabel + '")');
|
|
644
|
+
}
|
|
645
|
+
})();
|
|
646
|
+
if (obj_objectLabel_union0_error != null) {
|
|
647
|
+
obj_objectLabel_union0 = obj_objectLabel_union0_error.message;
|
|
648
|
+
}
|
|
649
|
+
let obj_objectLabel_union1 = null;
|
|
650
|
+
const obj_objectLabel_union1_error = (() => {
|
|
651
|
+
if (obj_objectLabel !== null) {
|
|
652
|
+
return new TypeError('Expected "null" but received "' + typeof obj_objectLabel + '" (at "' + path_objectLabel + '")');
|
|
653
|
+
}
|
|
654
|
+
})();
|
|
655
|
+
if (obj_objectLabel_union1_error != null) {
|
|
656
|
+
obj_objectLabel_union1 = obj_objectLabel_union1_error.message;
|
|
657
|
+
}
|
|
658
|
+
if (obj_objectLabel_union0 && obj_objectLabel_union1) {
|
|
659
|
+
let message = 'Object doesn\'t match union (at "' + path_objectLabel + '")';
|
|
660
|
+
message += '\n' + obj_objectLabel_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
661
|
+
message += '\n' + obj_objectLabel_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
662
|
+
return new TypeError(message);
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
})();
|
|
666
|
+
return v_error === undefined ? null : v_error;
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
const VERSION$5 = "437fc3300d85b1cb5bc34ec53413937d";
|
|
670
|
+
function validate$6(obj, path = 'FilterRepresentation') {
|
|
671
|
+
const v_error = (() => {
|
|
672
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
673
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
674
|
+
}
|
|
675
|
+
if (obj.aggregateFunction !== undefined) {
|
|
676
|
+
const obj_aggregateFunction = obj.aggregateFunction;
|
|
677
|
+
const path_aggregateFunction = path + '.aggregateFunction';
|
|
678
|
+
let obj_aggregateFunction_union0 = null;
|
|
679
|
+
const obj_aggregateFunction_union0_error = (() => {
|
|
680
|
+
if (typeof obj_aggregateFunction !== 'string') {
|
|
681
|
+
return new TypeError('Expected "string" but received "' + typeof obj_aggregateFunction + '" (at "' + path_aggregateFunction + '")');
|
|
682
|
+
}
|
|
683
|
+
})();
|
|
684
|
+
if (obj_aggregateFunction_union0_error != null) {
|
|
685
|
+
obj_aggregateFunction_union0 = obj_aggregateFunction_union0_error.message;
|
|
686
|
+
}
|
|
687
|
+
let obj_aggregateFunction_union1 = null;
|
|
688
|
+
const obj_aggregateFunction_union1_error = (() => {
|
|
689
|
+
if (obj_aggregateFunction !== null) {
|
|
690
|
+
return new TypeError('Expected "null" but received "' + typeof obj_aggregateFunction + '" (at "' + path_aggregateFunction + '")');
|
|
691
|
+
}
|
|
692
|
+
})();
|
|
693
|
+
if (obj_aggregateFunction_union1_error != null) {
|
|
694
|
+
obj_aggregateFunction_union1 = obj_aggregateFunction_union1_error.message;
|
|
695
|
+
}
|
|
696
|
+
if (obj_aggregateFunction_union0 && obj_aggregateFunction_union1) {
|
|
697
|
+
let message = 'Object doesn\'t match union (at "' + path_aggregateFunction + '")';
|
|
698
|
+
message += '\n' + obj_aggregateFunction_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
699
|
+
message += '\n' + obj_aggregateFunction_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
700
|
+
return new TypeError(message);
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
if (obj.comparison !== undefined) {
|
|
704
|
+
const obj_comparison = obj.comparison;
|
|
705
|
+
const path_comparison = path + '.comparison';
|
|
706
|
+
let obj_comparison_union0 = null;
|
|
707
|
+
const obj_comparison_union0_error = (() => {
|
|
708
|
+
const referencepath_comparisonValidationError = validate$6(obj_comparison, path_comparison);
|
|
709
|
+
if (referencepath_comparisonValidationError !== null) {
|
|
710
|
+
let message = 'Object doesn\'t match FilterRepresentation (at "' + path_comparison + '")\n';
|
|
711
|
+
message += referencepath_comparisonValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
712
|
+
return new TypeError(message);
|
|
713
|
+
}
|
|
714
|
+
})();
|
|
715
|
+
if (obj_comparison_union0_error != null) {
|
|
716
|
+
obj_comparison_union0 = obj_comparison_union0_error.message;
|
|
717
|
+
}
|
|
718
|
+
let obj_comparison_union1 = null;
|
|
719
|
+
const obj_comparison_union1_error = (() => {
|
|
720
|
+
if (obj_comparison !== null) {
|
|
721
|
+
return new TypeError('Expected "null" but received "' + typeof obj_comparison + '" (at "' + path_comparison + '")');
|
|
722
|
+
}
|
|
723
|
+
})();
|
|
724
|
+
if (obj_comparison_union1_error != null) {
|
|
725
|
+
obj_comparison_union1 = obj_comparison_union1_error.message;
|
|
726
|
+
}
|
|
727
|
+
if (obj_comparison_union0 && obj_comparison_union1) {
|
|
728
|
+
let message = 'Object doesn\'t match union (at "' + path_comparison + '")';
|
|
729
|
+
message += '\n' + obj_comparison_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
730
|
+
message += '\n' + obj_comparison_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
731
|
+
return new TypeError(message);
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
if (obj.filter !== undefined) {
|
|
735
|
+
const obj_filter = obj.filter;
|
|
736
|
+
const path_filter = path + '.filter';
|
|
737
|
+
let obj_filter_union0 = null;
|
|
738
|
+
const obj_filter_union0_error = (() => {
|
|
739
|
+
const referencepath_filterValidationError = validate$8(obj_filter, path_filter);
|
|
740
|
+
if (referencepath_filterValidationError !== null) {
|
|
741
|
+
let message = 'Object doesn\'t match FiltersWrapRepresentation (at "' + path_filter + '")\n';
|
|
742
|
+
message += referencepath_filterValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
743
|
+
return new TypeError(message);
|
|
744
|
+
}
|
|
745
|
+
})();
|
|
746
|
+
if (obj_filter_union0_error != null) {
|
|
747
|
+
obj_filter_union0 = obj_filter_union0_error.message;
|
|
748
|
+
}
|
|
749
|
+
let obj_filter_union1 = null;
|
|
750
|
+
const obj_filter_union1_error = (() => {
|
|
751
|
+
if (obj_filter !== null) {
|
|
752
|
+
return new TypeError('Expected "null" but received "' + typeof obj_filter + '" (at "' + path_filter + '")');
|
|
753
|
+
}
|
|
754
|
+
})();
|
|
755
|
+
if (obj_filter_union1_error != null) {
|
|
756
|
+
obj_filter_union1 = obj_filter_union1_error.message;
|
|
757
|
+
}
|
|
758
|
+
if (obj_filter_union0 && obj_filter_union1) {
|
|
759
|
+
let message = 'Object doesn\'t match union (at "' + path_filter + '")';
|
|
760
|
+
message += '\n' + obj_filter_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
761
|
+
message += '\n' + obj_filter_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
762
|
+
return new TypeError(message);
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
if (obj.filters !== undefined) {
|
|
766
|
+
const obj_filters = obj.filters;
|
|
767
|
+
const path_filters = path + '.filters';
|
|
768
|
+
if (!ArrayIsArray(obj_filters)) {
|
|
769
|
+
return new TypeError('Expected "array" but received "' + typeof obj_filters + '" (at "' + path_filters + '")');
|
|
770
|
+
}
|
|
771
|
+
for (let i = 0; i < obj_filters.length; i++) {
|
|
772
|
+
const obj_filters_item = obj_filters[i];
|
|
773
|
+
const path_filters_item = path_filters + '[' + i + ']';
|
|
774
|
+
let obj_filters_item_union0 = null;
|
|
775
|
+
const obj_filters_item_union0_error = (() => {
|
|
776
|
+
const referencepath_filters_itemValidationError = validate$6(obj_filters_item, path_filters_item);
|
|
777
|
+
if (referencepath_filters_itemValidationError !== null) {
|
|
778
|
+
let message = 'Object doesn\'t match FilterRepresentation (at "' + path_filters_item + '")\n';
|
|
779
|
+
message += referencepath_filters_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
780
|
+
return new TypeError(message);
|
|
781
|
+
}
|
|
782
|
+
})();
|
|
783
|
+
if (obj_filters_item_union0_error != null) {
|
|
784
|
+
obj_filters_item_union0 = obj_filters_item_union0_error.message;
|
|
785
|
+
}
|
|
786
|
+
let obj_filters_item_union1 = null;
|
|
787
|
+
const obj_filters_item_union1_error = (() => {
|
|
788
|
+
if (obj_filters_item !== null) {
|
|
789
|
+
return new TypeError('Expected "null" but received "' + typeof obj_filters_item + '" (at "' + path_filters_item + '")');
|
|
790
|
+
}
|
|
791
|
+
})();
|
|
792
|
+
if (obj_filters_item_union1_error != null) {
|
|
793
|
+
obj_filters_item_union1 = obj_filters_item_union1_error.message;
|
|
794
|
+
}
|
|
795
|
+
if (obj_filters_item_union0 && obj_filters_item_union1) {
|
|
796
|
+
let message = 'Object doesn\'t match union (at "' + path_filters_item + '")';
|
|
797
|
+
message += '\n' + obj_filters_item_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
798
|
+
message += '\n' + obj_filters_item_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
799
|
+
return new TypeError(message);
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
if (obj.firstBoundValue !== undefined) {
|
|
804
|
+
const obj_firstBoundValue = obj.firstBoundValue;
|
|
805
|
+
const path_firstBoundValue = path + '.firstBoundValue';
|
|
806
|
+
let obj_firstBoundValue_union0 = null;
|
|
807
|
+
const obj_firstBoundValue_union0_error = (() => {
|
|
808
|
+
if (typeof obj_firstBoundValue !== 'string') {
|
|
809
|
+
return new TypeError('Expected "string" but received "' + typeof obj_firstBoundValue + '" (at "' + path_firstBoundValue + '")');
|
|
810
|
+
}
|
|
811
|
+
})();
|
|
812
|
+
if (obj_firstBoundValue_union0_error != null) {
|
|
813
|
+
obj_firstBoundValue_union0 = obj_firstBoundValue_union0_error.message;
|
|
814
|
+
}
|
|
815
|
+
let obj_firstBoundValue_union1 = null;
|
|
816
|
+
const obj_firstBoundValue_union1_error = (() => {
|
|
817
|
+
if (obj_firstBoundValue !== null) {
|
|
818
|
+
return new TypeError('Expected "null" but received "' + typeof obj_firstBoundValue + '" (at "' + path_firstBoundValue + '")');
|
|
819
|
+
}
|
|
820
|
+
})();
|
|
821
|
+
if (obj_firstBoundValue_union1_error != null) {
|
|
822
|
+
obj_firstBoundValue_union1 = obj_firstBoundValue_union1_error.message;
|
|
823
|
+
}
|
|
824
|
+
if (obj_firstBoundValue_union0 && obj_firstBoundValue_union1) {
|
|
825
|
+
let message = 'Object doesn\'t match union (at "' + path_firstBoundValue + '")';
|
|
826
|
+
message += '\n' + obj_firstBoundValue_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
827
|
+
message += '\n' + obj_firstBoundValue_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
828
|
+
return new TypeError(message);
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
if (obj.operator !== undefined) {
|
|
832
|
+
const obj_operator = obj.operator;
|
|
833
|
+
const path_operator = path + '.operator';
|
|
834
|
+
let obj_operator_union0 = null;
|
|
835
|
+
const obj_operator_union0_error = (() => {
|
|
836
|
+
if (typeof obj_operator !== 'string') {
|
|
837
|
+
return new TypeError('Expected "string" but received "' + typeof obj_operator + '" (at "' + path_operator + '")');
|
|
838
|
+
}
|
|
839
|
+
})();
|
|
840
|
+
if (obj_operator_union0_error != null) {
|
|
841
|
+
obj_operator_union0 = obj_operator_union0_error.message;
|
|
842
|
+
}
|
|
843
|
+
let obj_operator_union1 = null;
|
|
844
|
+
const obj_operator_union1_error = (() => {
|
|
845
|
+
if (obj_operator !== null) {
|
|
846
|
+
return new TypeError('Expected "null" but received "' + typeof obj_operator + '" (at "' + path_operator + '")');
|
|
847
|
+
}
|
|
848
|
+
})();
|
|
849
|
+
if (obj_operator_union1_error != null) {
|
|
850
|
+
obj_operator_union1 = obj_operator_union1_error.message;
|
|
851
|
+
}
|
|
852
|
+
if (obj_operator_union0 && obj_operator_union1) {
|
|
853
|
+
let message = 'Object doesn\'t match union (at "' + path_operator + '")';
|
|
854
|
+
message += '\n' + obj_operator_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
855
|
+
message += '\n' + obj_operator_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
856
|
+
return new TypeError(message);
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
if (obj.path !== undefined) {
|
|
860
|
+
const obj_path = obj.path;
|
|
861
|
+
const path_path = path + '.path';
|
|
862
|
+
if (!ArrayIsArray(obj_path)) {
|
|
863
|
+
return new TypeError('Expected "array" but received "' + typeof obj_path + '" (at "' + path_path + '")');
|
|
864
|
+
}
|
|
865
|
+
for (let i = 0; i < obj_path.length; i++) {
|
|
866
|
+
const obj_path_item = obj_path[i];
|
|
867
|
+
const path_path_item = path_path + '[' + i + ']';
|
|
868
|
+
if (!ArrayIsArray(obj_path_item)) {
|
|
869
|
+
return new TypeError('Expected "array" but received "' + typeof obj_path_item + '" (at "' + path_path_item + '")');
|
|
870
|
+
}
|
|
871
|
+
for (let i = 0; i < obj_path_item.length; i++) {
|
|
872
|
+
const obj_path_item_item = obj_path_item[i];
|
|
873
|
+
const path_path_item_item = path_path_item + '[' + i + ']';
|
|
874
|
+
const referencepath_path_item_itemValidationError = validate$7(obj_path_item_item, path_path_item_item);
|
|
875
|
+
if (referencepath_path_item_itemValidationError !== null) {
|
|
876
|
+
let message = 'Object doesn\'t match SubjectRepresentation (at "' + path_path_item_item + '")\n';
|
|
877
|
+
message += referencepath_path_item_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
878
|
+
return new TypeError(message);
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
if (obj.ruleTimeZone !== undefined) {
|
|
884
|
+
const obj_ruleTimeZone = obj.ruleTimeZone;
|
|
885
|
+
const path_ruleTimeZone = path + '.ruleTimeZone';
|
|
886
|
+
let obj_ruleTimeZone_union0 = null;
|
|
887
|
+
const obj_ruleTimeZone_union0_error = (() => {
|
|
888
|
+
if (typeof obj_ruleTimeZone !== 'string') {
|
|
889
|
+
return new TypeError('Expected "string" but received "' + typeof obj_ruleTimeZone + '" (at "' + path_ruleTimeZone + '")');
|
|
890
|
+
}
|
|
891
|
+
})();
|
|
892
|
+
if (obj_ruleTimeZone_union0_error != null) {
|
|
893
|
+
obj_ruleTimeZone_union0 = obj_ruleTimeZone_union0_error.message;
|
|
894
|
+
}
|
|
895
|
+
let obj_ruleTimeZone_union1 = null;
|
|
896
|
+
const obj_ruleTimeZone_union1_error = (() => {
|
|
897
|
+
if (obj_ruleTimeZone !== null) {
|
|
898
|
+
return new TypeError('Expected "null" but received "' + typeof obj_ruleTimeZone + '" (at "' + path_ruleTimeZone + '")');
|
|
899
|
+
}
|
|
900
|
+
})();
|
|
901
|
+
if (obj_ruleTimeZone_union1_error != null) {
|
|
902
|
+
obj_ruleTimeZone_union1 = obj_ruleTimeZone_union1_error.message;
|
|
903
|
+
}
|
|
904
|
+
if (obj_ruleTimeZone_union0 && obj_ruleTimeZone_union1) {
|
|
905
|
+
let message = 'Object doesn\'t match union (at "' + path_ruleTimeZone + '")';
|
|
906
|
+
message += '\n' + obj_ruleTimeZone_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
907
|
+
message += '\n' + obj_ruleTimeZone_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
908
|
+
return new TypeError(message);
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
if (obj.secondBoundValue !== undefined) {
|
|
912
|
+
const obj_secondBoundValue = obj.secondBoundValue;
|
|
913
|
+
const path_secondBoundValue = path + '.secondBoundValue';
|
|
914
|
+
let obj_secondBoundValue_union0 = null;
|
|
915
|
+
const obj_secondBoundValue_union0_error = (() => {
|
|
916
|
+
if (typeof obj_secondBoundValue !== 'string') {
|
|
917
|
+
return new TypeError('Expected "string" but received "' + typeof obj_secondBoundValue + '" (at "' + path_secondBoundValue + '")');
|
|
918
|
+
}
|
|
919
|
+
})();
|
|
920
|
+
if (obj_secondBoundValue_union0_error != null) {
|
|
921
|
+
obj_secondBoundValue_union0 = obj_secondBoundValue_union0_error.message;
|
|
922
|
+
}
|
|
923
|
+
let obj_secondBoundValue_union1 = null;
|
|
924
|
+
const obj_secondBoundValue_union1_error = (() => {
|
|
925
|
+
if (obj_secondBoundValue !== null) {
|
|
926
|
+
return new TypeError('Expected "null" but received "' + typeof obj_secondBoundValue + '" (at "' + path_secondBoundValue + '")');
|
|
927
|
+
}
|
|
928
|
+
})();
|
|
929
|
+
if (obj_secondBoundValue_union1_error != null) {
|
|
930
|
+
obj_secondBoundValue_union1 = obj_secondBoundValue_union1_error.message;
|
|
931
|
+
}
|
|
932
|
+
if (obj_secondBoundValue_union0 && obj_secondBoundValue_union1) {
|
|
933
|
+
let message = 'Object doesn\'t match union (at "' + path_secondBoundValue + '")';
|
|
934
|
+
message += '\n' + obj_secondBoundValue_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
935
|
+
message += '\n' + obj_secondBoundValue_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
936
|
+
return new TypeError(message);
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
if (obj.subject !== undefined) {
|
|
940
|
+
const obj_subject = obj.subject;
|
|
941
|
+
const path_subject = path + '.subject';
|
|
942
|
+
let obj_subject_union0 = null;
|
|
943
|
+
const obj_subject_union0_error = (() => {
|
|
944
|
+
const referencepath_subjectValidationError = validate$7(obj_subject, path_subject);
|
|
945
|
+
if (referencepath_subjectValidationError !== null) {
|
|
946
|
+
let message = 'Object doesn\'t match SubjectRepresentation (at "' + path_subject + '")\n';
|
|
947
|
+
message += referencepath_subjectValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
948
|
+
return new TypeError(message);
|
|
949
|
+
}
|
|
950
|
+
})();
|
|
951
|
+
if (obj_subject_union0_error != null) {
|
|
952
|
+
obj_subject_union0 = obj_subject_union0_error.message;
|
|
953
|
+
}
|
|
954
|
+
let obj_subject_union1 = null;
|
|
955
|
+
const obj_subject_union1_error = (() => {
|
|
956
|
+
if (obj_subject !== null) {
|
|
957
|
+
return new TypeError('Expected "null" but received "' + typeof obj_subject + '" (at "' + path_subject + '")');
|
|
958
|
+
}
|
|
959
|
+
})();
|
|
960
|
+
if (obj_subject_union1_error != null) {
|
|
961
|
+
obj_subject_union1 = obj_subject_union1_error.message;
|
|
962
|
+
}
|
|
963
|
+
if (obj_subject_union0 && obj_subject_union1) {
|
|
964
|
+
let message = 'Object doesn\'t match union (at "' + path_subject + '")';
|
|
965
|
+
message += '\n' + obj_subject_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
966
|
+
message += '\n' + obj_subject_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
967
|
+
return new TypeError(message);
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
if (obj.type !== undefined) {
|
|
971
|
+
const obj_type = obj.type;
|
|
972
|
+
const path_type = path + '.type';
|
|
973
|
+
let obj_type_union0 = null;
|
|
974
|
+
const obj_type_union0_error = (() => {
|
|
975
|
+
if (typeof obj_type !== 'string') {
|
|
976
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
977
|
+
}
|
|
978
|
+
})();
|
|
979
|
+
if (obj_type_union0_error != null) {
|
|
980
|
+
obj_type_union0 = obj_type_union0_error.message;
|
|
981
|
+
}
|
|
982
|
+
let obj_type_union1 = null;
|
|
983
|
+
const obj_type_union1_error = (() => {
|
|
984
|
+
if (obj_type !== null) {
|
|
985
|
+
return new TypeError('Expected "null" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
986
|
+
}
|
|
987
|
+
})();
|
|
988
|
+
if (obj_type_union1_error != null) {
|
|
989
|
+
obj_type_union1 = obj_type_union1_error.message;
|
|
990
|
+
}
|
|
991
|
+
if (obj_type_union0 && obj_type_union1) {
|
|
992
|
+
let message = 'Object doesn\'t match union (at "' + path_type + '")';
|
|
993
|
+
message += '\n' + obj_type_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
994
|
+
message += '\n' + obj_type_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
995
|
+
return new TypeError(message);
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
if (obj.value !== undefined) {
|
|
999
|
+
const obj_value = obj.value;
|
|
1000
|
+
const path_value = path + '.value';
|
|
1001
|
+
let obj_value_union0 = null;
|
|
1002
|
+
const obj_value_union0_error = (() => {
|
|
1003
|
+
if (typeof obj_value !== 'number' || (typeof obj_value === 'number' && Math.floor(obj_value) !== obj_value)) {
|
|
1004
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_value + '" (at "' + path_value + '")');
|
|
1005
|
+
}
|
|
1006
|
+
})();
|
|
1007
|
+
if (obj_value_union0_error != null) {
|
|
1008
|
+
obj_value_union0 = obj_value_union0_error.message;
|
|
1009
|
+
}
|
|
1010
|
+
let obj_value_union1 = null;
|
|
1011
|
+
const obj_value_union1_error = (() => {
|
|
1012
|
+
if (obj_value !== null) {
|
|
1013
|
+
return new TypeError('Expected "null" but received "' + typeof obj_value + '" (at "' + path_value + '")');
|
|
1014
|
+
}
|
|
1015
|
+
})();
|
|
1016
|
+
if (obj_value_union1_error != null) {
|
|
1017
|
+
obj_value_union1 = obj_value_union1_error.message;
|
|
1018
|
+
}
|
|
1019
|
+
if (obj_value_union0 && obj_value_union1) {
|
|
1020
|
+
let message = 'Object doesn\'t match union (at "' + path_value + '")';
|
|
1021
|
+
message += '\n' + obj_value_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1022
|
+
message += '\n' + obj_value_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1023
|
+
return new TypeError(message);
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
if (obj.values !== undefined) {
|
|
1027
|
+
const obj_values = obj.values;
|
|
1028
|
+
const path_values = path + '.values';
|
|
1029
|
+
if (!ArrayIsArray(obj_values)) {
|
|
1030
|
+
return new TypeError('Expected "array" but received "' + typeof obj_values + '" (at "' + path_values + '")');
|
|
1031
|
+
}
|
|
1032
|
+
for (let i = 0; i < obj_values.length; i++) {
|
|
1033
|
+
const obj_values_item = obj_values[i];
|
|
1034
|
+
const path_values_item = path_values + '[' + i + ']';
|
|
1035
|
+
if (typeof obj_values_item !== 'string') {
|
|
1036
|
+
return new TypeError('Expected "string" but received "' + typeof obj_values_item + '" (at "' + path_values_item + '")');
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
})();
|
|
1041
|
+
return v_error === undefined ? null : v_error;
|
|
1042
|
+
}
|
|
1043
|
+
const RepresentationType$4 = 'FilterRepresentation';
|
|
1044
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
1045
|
+
return input;
|
|
1046
|
+
}
|
|
1047
|
+
const select$a = function FilterRepresentationSelect() {
|
|
1048
|
+
return {
|
|
1049
|
+
kind: 'Fragment',
|
|
1050
|
+
version: VERSION$5,
|
|
1051
|
+
private: [],
|
|
1052
|
+
opaque: true
|
|
1053
|
+
};
|
|
1054
|
+
};
|
|
1055
|
+
function equals$5(existing, incoming) {
|
|
1056
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1057
|
+
return false;
|
|
1058
|
+
}
|
|
1059
|
+
return true;
|
|
1060
|
+
}
|
|
1061
|
+
const ingest$4 = function FilterRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1062
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1063
|
+
const validateError = validate$6(input);
|
|
1064
|
+
if (validateError !== null) {
|
|
1065
|
+
throw validateError;
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
const key = path.fullPath;
|
|
1069
|
+
const ttlToUse = path.ttl;
|
|
1070
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "personalization-service", VERSION$5, RepresentationType$4, equals$5);
|
|
1071
|
+
return createLink(key);
|
|
1072
|
+
};
|
|
1073
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
1074
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1075
|
+
const rootKey = fullPathFactory();
|
|
1076
|
+
rootKeySet.set(rootKey, {
|
|
1077
|
+
namespace: keyPrefix,
|
|
1078
|
+
representationName: RepresentationType$4,
|
|
1079
|
+
mergeable: false
|
|
1080
|
+
});
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
const VERSION$4 = "ea475f10b4c028f8b97a44af1cf0be14";
|
|
1084
|
+
function validate$5(obj, path = 'CriteriaRepresentation') {
|
|
1085
|
+
const v_error = (() => {
|
|
1086
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1087
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1088
|
+
}
|
|
1089
|
+
const obj_filters = obj.filters;
|
|
1090
|
+
const path_filters = path + '.filters';
|
|
1091
|
+
if (!ArrayIsArray(obj_filters)) {
|
|
1092
|
+
return new TypeError('Expected "array" but received "' + typeof obj_filters + '" (at "' + path_filters + '")');
|
|
1093
|
+
}
|
|
1094
|
+
for (let i = 0; i < obj_filters.length; i++) {
|
|
1095
|
+
const obj_filters_item = obj_filters[i];
|
|
1096
|
+
const path_filters_item = path_filters + '[' + i + ']';
|
|
1097
|
+
if (typeof obj_filters_item !== 'object') {
|
|
1098
|
+
return new TypeError('Expected "object" but received "' + typeof obj_filters_item + '" (at "' + path_filters_item + '")');
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
const obj_operator = obj.operator;
|
|
1102
|
+
const path_operator = path + '.operator';
|
|
1103
|
+
if (typeof obj_operator !== 'string') {
|
|
1104
|
+
return new TypeError('Expected "string" but received "' + typeof obj_operator + '" (at "' + path_operator + '")');
|
|
1105
|
+
}
|
|
1106
|
+
const obj_type = obj.type;
|
|
1107
|
+
const path_type = path + '.type';
|
|
1108
|
+
if (typeof obj_type !== 'string') {
|
|
1109
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
1110
|
+
}
|
|
1111
|
+
})();
|
|
1112
|
+
return v_error === undefined ? null : v_error;
|
|
1113
|
+
}
|
|
1114
|
+
const RepresentationType$3 = 'CriteriaRepresentation';
|
|
1115
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
1116
|
+
const input_filters = input.filters;
|
|
1117
|
+
const input_filters_id = path.fullPath + '__filters';
|
|
1118
|
+
for (let i = 0; i < input_filters.length; i++) {
|
|
1119
|
+
const input_filters_item = input_filters[i];
|
|
1120
|
+
let input_filters_item_id = input_filters_id + '__' + i;
|
|
1121
|
+
input_filters[i] = ingest$4(input_filters_item, {
|
|
1122
|
+
fullPath: input_filters_item_id,
|
|
1123
|
+
propertyName: i,
|
|
1124
|
+
parent: {
|
|
1125
|
+
data: input,
|
|
1126
|
+
key: path.fullPath,
|
|
1127
|
+
existing: existing,
|
|
1128
|
+
},
|
|
1129
|
+
ttl: path.ttl
|
|
1130
|
+
}, luvio, store, timestamp);
|
|
1131
|
+
}
|
|
1132
|
+
return input;
|
|
1133
|
+
}
|
|
1134
|
+
const select$9 = function CriteriaRepresentationSelect() {
|
|
1135
|
+
return {
|
|
1136
|
+
kind: 'Fragment',
|
|
1137
|
+
version: VERSION$4,
|
|
1138
|
+
private: [],
|
|
1139
|
+
selections: [
|
|
1140
|
+
{
|
|
1141
|
+
name: 'filters',
|
|
1142
|
+
kind: 'Link',
|
|
1143
|
+
plural: true,
|
|
1144
|
+
fragment: select$a()
|
|
1145
|
+
},
|
|
1146
|
+
{
|
|
1147
|
+
name: 'operator',
|
|
1148
|
+
kind: 'Scalar'
|
|
1149
|
+
},
|
|
1150
|
+
{
|
|
1151
|
+
name: 'type',
|
|
1152
|
+
kind: 'Scalar'
|
|
1153
|
+
}
|
|
1154
|
+
]
|
|
1155
|
+
};
|
|
1156
|
+
};
|
|
1157
|
+
function equals$4(existing, incoming) {
|
|
1158
|
+
const existing_operator = existing.operator;
|
|
1159
|
+
const incoming_operator = incoming.operator;
|
|
1160
|
+
if (!(existing_operator === incoming_operator)) {
|
|
1161
|
+
return false;
|
|
1162
|
+
}
|
|
1163
|
+
const existing_type = existing.type;
|
|
1164
|
+
const incoming_type = incoming.type;
|
|
1165
|
+
if (!(existing_type === incoming_type)) {
|
|
1166
|
+
return false;
|
|
1167
|
+
}
|
|
1168
|
+
const existing_filters = existing.filters;
|
|
1169
|
+
const incoming_filters = incoming.filters;
|
|
1170
|
+
const equals_filters_items = equalsArray(existing_filters, incoming_filters, (existing_filters_item, incoming_filters_item) => {
|
|
1171
|
+
if (!(existing_filters_item.__ref === incoming_filters_item.__ref)) {
|
|
1172
|
+
return false;
|
|
1173
|
+
}
|
|
1174
|
+
});
|
|
1175
|
+
if (equals_filters_items === false) {
|
|
1176
|
+
return false;
|
|
1177
|
+
}
|
|
1178
|
+
return true;
|
|
1179
|
+
}
|
|
1180
|
+
const ingest$3 = function CriteriaRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1181
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1182
|
+
const validateError = validate$5(input);
|
|
1183
|
+
if (validateError !== null) {
|
|
1184
|
+
throw validateError;
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
const key = path.fullPath;
|
|
1188
|
+
const ttlToUse = path.ttl;
|
|
1189
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "personalization-service", VERSION$4, RepresentationType$3, equals$4);
|
|
1190
|
+
return createLink(key);
|
|
1191
|
+
};
|
|
1192
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
1193
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1194
|
+
const rootKey = fullPathFactory();
|
|
1195
|
+
rootKeySet.set(rootKey, {
|
|
1196
|
+
namespace: keyPrefix,
|
|
1197
|
+
representationName: RepresentationType$3,
|
|
1198
|
+
mergeable: false
|
|
1199
|
+
});
|
|
1200
|
+
const input_filters_length = input.filters.length;
|
|
1201
|
+
for (let i = 0; i < input_filters_length; i++) {
|
|
1202
|
+
getTypeCacheKeys$4(rootKeySet, luvio, input.filters[i], () => '');
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
const VERSION$3 = "4c6e23e63e764c028a88f2f6c2f7c6a3";
|
|
463
1207
|
function validate$4(obj, path = 'PersonalizationDecisionRepresentation') {
|
|
464
1208
|
const v_error = (() => {
|
|
465
1209
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -473,7 +1217,7 @@ function validate$4(obj, path = 'PersonalizationDecisionRepresentation') {
|
|
|
473
1217
|
for (let i = 0; i < obj_attributeValues.length; i++) {
|
|
474
1218
|
const obj_attributeValues_item = obj_attributeValues[i];
|
|
475
1219
|
const path_attributeValues_item = path_attributeValues + '[' + i + ']';
|
|
476
|
-
const referencepath_attributeValues_itemValidationError = validate$
|
|
1220
|
+
const referencepath_attributeValues_itemValidationError = validate$9(obj_attributeValues_item, path_attributeValues_item);
|
|
477
1221
|
if (referencepath_attributeValues_itemValidationError !== null) {
|
|
478
1222
|
let message = 'Object doesn\'t match PersonalizationAttributeValueRepresentation (at "' + path_attributeValues_item + '")\n';
|
|
479
1223
|
message += referencepath_attributeValues_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -536,8 +1280,8 @@ function validate$4(obj, path = 'PersonalizationDecisionRepresentation') {
|
|
|
536
1280
|
const path_criteria = path + '.criteria';
|
|
537
1281
|
let obj_criteria_union0 = null;
|
|
538
1282
|
const obj_criteria_union0_error = (() => {
|
|
539
|
-
if (typeof obj_criteria !== '
|
|
540
|
-
return new TypeError('Expected "
|
|
1283
|
+
if (typeof obj_criteria !== 'object') {
|
|
1284
|
+
return new TypeError('Expected "object" but received "' + typeof obj_criteria + '" (at "' + path_criteria + '")');
|
|
541
1285
|
}
|
|
542
1286
|
})();
|
|
543
1287
|
if (obj_criteria_union0_error != null) {
|
|
@@ -769,8 +1513,26 @@ function validate$4(obj, path = 'PersonalizationDecisionRepresentation') {
|
|
|
769
1513
|
})();
|
|
770
1514
|
return v_error === undefined ? null : v_error;
|
|
771
1515
|
}
|
|
1516
|
+
const RepresentationType$2 = 'PersonalizationDecisionRepresentation';
|
|
1517
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
1518
|
+
const input_criteria = input.criteria;
|
|
1519
|
+
const input_criteria_id = path.fullPath + '__criteria';
|
|
1520
|
+
if (input_criteria !== null && typeof input_criteria === 'object') {
|
|
1521
|
+
input.criteria = ingest$3(input_criteria, {
|
|
1522
|
+
fullPath: input_criteria_id,
|
|
1523
|
+
propertyName: 'criteria',
|
|
1524
|
+
parent: {
|
|
1525
|
+
data: input,
|
|
1526
|
+
key: path.fullPath,
|
|
1527
|
+
existing: existing,
|
|
1528
|
+
},
|
|
1529
|
+
ttl: path.ttl
|
|
1530
|
+
}, luvio, store, timestamp);
|
|
1531
|
+
}
|
|
1532
|
+
return input;
|
|
1533
|
+
}
|
|
772
1534
|
const select$8 = function PersonalizationDecisionRepresentationSelect() {
|
|
773
|
-
const { selections: PersonalizationAttributeValueRepresentation__selections, opaque: PersonalizationAttributeValueRepresentation__opaque, } = select$
|
|
1535
|
+
const { selections: PersonalizationAttributeValueRepresentation__selections, opaque: PersonalizationAttributeValueRepresentation__opaque, } = select$b();
|
|
774
1536
|
return {
|
|
775
1537
|
kind: 'Fragment',
|
|
776
1538
|
version: VERSION$3,
|
|
@@ -792,7 +1554,9 @@ const select$8 = function PersonalizationDecisionRepresentationSelect() {
|
|
|
792
1554
|
},
|
|
793
1555
|
{
|
|
794
1556
|
name: 'criteria',
|
|
795
|
-
kind: '
|
|
1557
|
+
kind: 'Link',
|
|
1558
|
+
nullable: true,
|
|
1559
|
+
fragment: select$9()
|
|
796
1560
|
},
|
|
797
1561
|
{
|
|
798
1562
|
name: 'description',
|
|
@@ -833,7 +1597,7 @@ function equals$3(existing, incoming) {
|
|
|
833
1597
|
const existing_attributeValues = existing.attributeValues;
|
|
834
1598
|
const incoming_attributeValues = incoming.attributeValues;
|
|
835
1599
|
const equals_attributeValues_items = equalsArray(existing_attributeValues, incoming_attributeValues, (existing_attributeValues_item, incoming_attributeValues_item) => {
|
|
836
|
-
if (!(equals$
|
|
1600
|
+
if (!(equals$6(existing_attributeValues_item, incoming_attributeValues_item))) {
|
|
837
1601
|
return false;
|
|
838
1602
|
}
|
|
839
1603
|
});
|
|
@@ -852,7 +1616,12 @@ function equals$3(existing, incoming) {
|
|
|
852
1616
|
}
|
|
853
1617
|
const existing_criteria = existing.criteria;
|
|
854
1618
|
const incoming_criteria = incoming.criteria;
|
|
855
|
-
if (!(existing_criteria === incoming_criteria
|
|
1619
|
+
if (!(existing_criteria === incoming_criteria
|
|
1620
|
+
|| (existing_criteria != null &&
|
|
1621
|
+
incoming_criteria != null &&
|
|
1622
|
+
existing_criteria.__ref != null &&
|
|
1623
|
+
incoming_criteria.__ref != null &&
|
|
1624
|
+
existing_criteria.__ref === incoming_criteria.__ref))) {
|
|
856
1625
|
return false;
|
|
857
1626
|
}
|
|
858
1627
|
const existing_description = existing.description;
|
|
@@ -897,9 +1666,33 @@ function equals$3(existing, incoming) {
|
|
|
897
1666
|
}
|
|
898
1667
|
return true;
|
|
899
1668
|
}
|
|
1669
|
+
const ingest$2 = function PersonalizationDecisionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1670
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1671
|
+
const validateError = validate$4(input);
|
|
1672
|
+
if (validateError !== null) {
|
|
1673
|
+
throw validateError;
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
const key = path.fullPath;
|
|
1677
|
+
const ttlToUse = path.ttl;
|
|
1678
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "personalization-service", VERSION$3, RepresentationType$2, equals$3);
|
|
1679
|
+
return createLink(key);
|
|
1680
|
+
};
|
|
1681
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
1682
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1683
|
+
const rootKey = fullPathFactory();
|
|
1684
|
+
rootKeySet.set(rootKey, {
|
|
1685
|
+
namespace: keyPrefix,
|
|
1686
|
+
representationName: RepresentationType$2,
|
|
1687
|
+
mergeable: false
|
|
1688
|
+
});
|
|
1689
|
+
if (input.criteria !== null && typeof input.criteria === 'object') {
|
|
1690
|
+
getTypeCacheKeys$3(rootKeySet, luvio, input.criteria, () => rootKey + "__" + "criteria");
|
|
1691
|
+
}
|
|
1692
|
+
}
|
|
900
1693
|
|
|
901
1694
|
const TTL$1 = 600;
|
|
902
|
-
const VERSION$2 = "
|
|
1695
|
+
const VERSION$2 = "da1bfa46416530ff1aeab78ba84646bb";
|
|
903
1696
|
function validate$3(obj, path = 'PersonalizationPointRepresentation') {
|
|
904
1697
|
const v_error = (() => {
|
|
905
1698
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -1017,11 +1810,8 @@ function validate$3(obj, path = 'PersonalizationPointRepresentation') {
|
|
|
1017
1810
|
for (let i = 0; i < obj_decisions.length; i++) {
|
|
1018
1811
|
const obj_decisions_item = obj_decisions[i];
|
|
1019
1812
|
const path_decisions_item = path_decisions + '[' + i + ']';
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
let message = 'Object doesn\'t match PersonalizationDecisionRepresentation (at "' + path_decisions_item + '")\n';
|
|
1023
|
-
message += referencepath_decisions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1024
|
-
return new TypeError(message);
|
|
1813
|
+
if (typeof obj_decisions_item !== 'object') {
|
|
1814
|
+
return new TypeError('Expected "object" but received "' + typeof obj_decisions_item + '" (at "' + path_decisions_item + '")');
|
|
1025
1815
|
}
|
|
1026
1816
|
}
|
|
1027
1817
|
const obj_description = obj.description;
|
|
@@ -1308,10 +2098,25 @@ function keyBuilderFromType$1(luvio, object) {
|
|
|
1308
2098
|
return keyBuilder$7(luvio, keyParams);
|
|
1309
2099
|
}
|
|
1310
2100
|
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
2101
|
+
const input_decisions = input.decisions;
|
|
2102
|
+
const input_decisions_id = path.fullPath + '__decisions';
|
|
2103
|
+
for (let i = 0; i < input_decisions.length; i++) {
|
|
2104
|
+
const input_decisions_item = input_decisions[i];
|
|
2105
|
+
let input_decisions_item_id = input_decisions_id + '__' + i;
|
|
2106
|
+
input_decisions[i] = ingest$2(input_decisions_item, {
|
|
2107
|
+
fullPath: input_decisions_item_id,
|
|
2108
|
+
propertyName: i,
|
|
2109
|
+
parent: {
|
|
2110
|
+
data: input,
|
|
2111
|
+
key: path.fullPath,
|
|
2112
|
+
existing: existing,
|
|
2113
|
+
},
|
|
2114
|
+
ttl: path.ttl
|
|
2115
|
+
}, luvio, store, timestamp);
|
|
2116
|
+
}
|
|
1311
2117
|
return input;
|
|
1312
2118
|
}
|
|
1313
2119
|
const select$7 = function PersonalizationPointRepresentationSelect() {
|
|
1314
|
-
const { selections: PersonalizationDecisionRepresentation__selections, opaque: PersonalizationDecisionRepresentation__opaque, } = select$8();
|
|
1315
2120
|
return {
|
|
1316
2121
|
kind: 'Fragment',
|
|
1317
2122
|
version: VERSION$2,
|
|
@@ -1335,9 +2140,9 @@ const select$7 = function PersonalizationPointRepresentationSelect() {
|
|
|
1335
2140
|
},
|
|
1336
2141
|
{
|
|
1337
2142
|
name: 'decisions',
|
|
1338
|
-
kind: '
|
|
2143
|
+
kind: 'Link',
|
|
1339
2144
|
plural: true,
|
|
1340
|
-
|
|
2145
|
+
fragment: select$8()
|
|
1341
2146
|
},
|
|
1342
2147
|
{
|
|
1343
2148
|
name: 'description',
|
|
@@ -1424,7 +2229,7 @@ function equals$2(existing, incoming) {
|
|
|
1424
2229
|
const existing_decisions = existing.decisions;
|
|
1425
2230
|
const incoming_decisions = incoming.decisions;
|
|
1426
2231
|
const equals_decisions_items = equalsArray(existing_decisions, incoming_decisions, (existing_decisions_item, incoming_decisions_item) => {
|
|
1427
|
-
if (!(
|
|
2232
|
+
if (!(existing_decisions_item.__ref === incoming_decisions_item.__ref)) {
|
|
1428
2233
|
return false;
|
|
1429
2234
|
}
|
|
1430
2235
|
});
|
|
@@ -1503,6 +2308,10 @@ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
1503
2308
|
representationName: RepresentationType$1,
|
|
1504
2309
|
mergeable: false
|
|
1505
2310
|
});
|
|
2311
|
+
const input_decisions_length = input.decisions.length;
|
|
2312
|
+
for (let i = 0; i < input_decisions_length; i++) {
|
|
2313
|
+
getTypeCacheKeys$2(rootKeySet, luvio, input.decisions[i], () => '');
|
|
2314
|
+
}
|
|
1506
2315
|
}
|
|
1507
2316
|
|
|
1508
2317
|
function select$6(luvio, params) {
|
|
@@ -1544,15 +2353,15 @@ function createResourceRequest$6(config) {
|
|
|
1544
2353
|
|
|
1545
2354
|
const adapterName$6 = 'createPersonalizationPoint';
|
|
1546
2355
|
const createPersonalizationPoint_ConfigPropertyMetadata = [
|
|
1547
|
-
generateParamConfigMetadata('description',
|
|
2356
|
+
generateParamConfigMetadata('description', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1548
2357
|
generateParamConfigMetadata('label', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1549
2358
|
generateParamConfigMetadata('name', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1550
|
-
generateParamConfigMetadata('abnExperimentName',
|
|
2359
|
+
generateParamConfigMetadata('abnExperimentName', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1551
2360
|
generateParamConfigMetadata('dataSpaceName', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1552
2361
|
generateParamConfigMetadata('decisions', true, 2 /* Body */, 4 /* Unsupported */, true),
|
|
1553
2362
|
generateParamConfigMetadata('profileDataGraphName', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1554
|
-
generateParamConfigMetadata('schemaEnum',
|
|
1555
|
-
generateParamConfigMetadata('schemaName',
|
|
2363
|
+
generateParamConfigMetadata('schemaEnum', false, 2 /* Body */, 4 /* Unsupported */),
|
|
2364
|
+
generateParamConfigMetadata('schemaName', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1556
2365
|
generateParamConfigMetadata('source', true, 2 /* Body */, 0 /* String */),
|
|
1557
2366
|
];
|
|
1558
2367
|
const createPersonalizationPoint_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, createPersonalizationPoint_ConfigPropertyMetadata);
|
|
@@ -1600,7 +2409,7 @@ function typeCheckConfig$6(untrustedConfig) {
|
|
|
1600
2409
|
const untrustedConfig_decisions_array = [];
|
|
1601
2410
|
for (let i = 0, arrayLength = untrustedConfig_decisions.length; i < arrayLength; i++) {
|
|
1602
2411
|
const untrustedConfig_decisions_item = untrustedConfig_decisions[i];
|
|
1603
|
-
const referencePersonalizationDecisionInputRepresentationValidationError = validate$
|
|
2412
|
+
const referencePersonalizationDecisionInputRepresentationValidationError = validate$a(untrustedConfig_decisions_item);
|
|
1604
2413
|
if (referencePersonalizationDecisionInputRepresentationValidationError === null) {
|
|
1605
2414
|
untrustedConfig_decisions_array.push(untrustedConfig_decisions_item);
|
|
1606
2415
|
}
|
|
@@ -1936,15 +2745,15 @@ function createResourceRequest$3(config) {
|
|
|
1936
2745
|
const adapterName$3 = 'updatePersonalizationPoint';
|
|
1937
2746
|
const updatePersonalizationPoint_ConfigPropertyMetadata = [
|
|
1938
2747
|
generateParamConfigMetadata('idOrName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1939
|
-
generateParamConfigMetadata('description',
|
|
2748
|
+
generateParamConfigMetadata('description', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1940
2749
|
generateParamConfigMetadata('label', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1941
2750
|
generateParamConfigMetadata('name', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1942
|
-
generateParamConfigMetadata('abnExperimentName',
|
|
2751
|
+
generateParamConfigMetadata('abnExperimentName', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1943
2752
|
generateParamConfigMetadata('dataSpaceName', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1944
2753
|
generateParamConfigMetadata('decisions', true, 2 /* Body */, 4 /* Unsupported */, true),
|
|
1945
2754
|
generateParamConfigMetadata('profileDataGraphName', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1946
|
-
generateParamConfigMetadata('schemaEnum',
|
|
1947
|
-
generateParamConfigMetadata('schemaName',
|
|
2755
|
+
generateParamConfigMetadata('schemaEnum', false, 2 /* Body */, 4 /* Unsupported */),
|
|
2756
|
+
generateParamConfigMetadata('schemaName', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1948
2757
|
generateParamConfigMetadata('source', true, 2 /* Body */, 0 /* String */),
|
|
1949
2758
|
];
|
|
1950
2759
|
const updatePersonalizationPoint_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, updatePersonalizationPoint_ConfigPropertyMetadata);
|
|
@@ -1992,7 +2801,7 @@ function typeCheckConfig$3(untrustedConfig) {
|
|
|
1992
2801
|
const untrustedConfig_decisions_array = [];
|
|
1993
2802
|
for (let i = 0, arrayLength = untrustedConfig_decisions.length; i < arrayLength; i++) {
|
|
1994
2803
|
const untrustedConfig_decisions_item = untrustedConfig_decisions[i];
|
|
1995
|
-
const referencePersonalizationDecisionInputRepresentationValidationError = validate$
|
|
2804
|
+
const referencePersonalizationDecisionInputRepresentationValidationError = validate$a(untrustedConfig_decisions_item);
|
|
1996
2805
|
if (referencePersonalizationDecisionInputRepresentationValidationError === null) {
|
|
1997
2806
|
untrustedConfig_decisions_array.push(untrustedConfig_decisions_item);
|
|
1998
2807
|
}
|
|
@@ -2069,31 +2878,33 @@ function validate$2(obj, path = 'PersonalizationAttributeInputRepresentation') {
|
|
|
2069
2878
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2070
2879
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2071
2880
|
}
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2881
|
+
if (obj.defaultValue !== undefined) {
|
|
2882
|
+
const obj_defaultValue = obj.defaultValue;
|
|
2883
|
+
const path_defaultValue = path + '.defaultValue';
|
|
2884
|
+
let obj_defaultValue_union0 = null;
|
|
2885
|
+
const obj_defaultValue_union0_error = (() => {
|
|
2886
|
+
if (typeof obj_defaultValue !== 'string') {
|
|
2887
|
+
return new TypeError('Expected "string" but received "' + typeof obj_defaultValue + '" (at "' + path_defaultValue + '")');
|
|
2888
|
+
}
|
|
2889
|
+
})();
|
|
2890
|
+
if (obj_defaultValue_union0_error != null) {
|
|
2891
|
+
obj_defaultValue_union0 = obj_defaultValue_union0_error.message;
|
|
2892
|
+
}
|
|
2893
|
+
let obj_defaultValue_union1 = null;
|
|
2894
|
+
const obj_defaultValue_union1_error = (() => {
|
|
2895
|
+
if (obj_defaultValue !== null) {
|
|
2896
|
+
return new TypeError('Expected "null" but received "' + typeof obj_defaultValue + '" (at "' + path_defaultValue + '")');
|
|
2897
|
+
}
|
|
2898
|
+
})();
|
|
2899
|
+
if (obj_defaultValue_union1_error != null) {
|
|
2900
|
+
obj_defaultValue_union1 = obj_defaultValue_union1_error.message;
|
|
2901
|
+
}
|
|
2902
|
+
if (obj_defaultValue_union0 && obj_defaultValue_union1) {
|
|
2903
|
+
let message = 'Object doesn\'t match union (at "' + path_defaultValue + '")';
|
|
2904
|
+
message += '\n' + obj_defaultValue_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2905
|
+
message += '\n' + obj_defaultValue_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2906
|
+
return new TypeError(message);
|
|
2087
2907
|
}
|
|
2088
|
-
})();
|
|
2089
|
-
if (obj_defaultValue_union1_error != null) {
|
|
2090
|
-
obj_defaultValue_union1 = obj_defaultValue_union1_error.message;
|
|
2091
|
-
}
|
|
2092
|
-
if (obj_defaultValue_union0 && obj_defaultValue_union1) {
|
|
2093
|
-
let message = 'Object doesn\'t match union (at "' + path_defaultValue + '")';
|
|
2094
|
-
message += '\n' + obj_defaultValue_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2095
|
-
message += '\n' + obj_defaultValue_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2096
|
-
return new TypeError(message);
|
|
2097
2908
|
}
|
|
2098
2909
|
const obj_label = obj.label;
|
|
2099
2910
|
const path_label = path + '.label';
|