@salesforce/lds-adapters-industries-epc 1.265.0 → 1.266.0-dev2
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/industries-epc.js +617 -329
- package/dist/es/es2018/types/src/generated/adapters/getConfigRuleMetadata.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +3 -1
- package/dist/es/es2018/types/src/generated/resources/getConnectPcmConfigurationRuleConfigRuleMetadataByUsageTypeAndUsageSubType.d.ts +19 -0
- package/dist/es/es2018/types/src/generated/types/ConfigRuleHashColumnInfoOutputRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/ConfigRuleHashColumnsInfoOutputRepresentation.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/ConfigRuleMetadataOutputRepresentation.d.ts +46 -0
- package/package.json +6 -5
- package/sfdc/index.js +418 -118
- package/src/raml/api.raml +73 -0
- package/src/raml/luvio.raml +7 -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$7, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$5, typeCheckConfig as typeCheckConfig$7 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -92,7 +92,7 @@ function createLink(ref) {
|
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
function validate$
|
|
95
|
+
function validate$s(obj, path = 'DeactivateInputRepresentation') {
|
|
96
96
|
const v_error = (() => {
|
|
97
97
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
98
98
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -125,7 +125,7 @@ function validate$p(obj, path = 'DeactivateInputRepresentation') {
|
|
|
125
125
|
return v_error === undefined ? null : v_error;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
function validate$
|
|
128
|
+
function validate$r(obj, path = 'ErrorOutputRepresentation') {
|
|
129
129
|
const v_error = (() => {
|
|
130
130
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
131
131
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -156,9 +156,9 @@ function validate$o(obj, path = 'ErrorOutputRepresentation') {
|
|
|
156
156
|
return v_error === undefined ? null : v_error;
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
const TTL$
|
|
160
|
-
const VERSION$
|
|
161
|
-
function validate$
|
|
159
|
+
const TTL$5 = 6000;
|
|
160
|
+
const VERSION$7 = "67abdeaa299bae24f468fd2e78cd1e1e";
|
|
161
|
+
function validate$q(obj, path = 'RecordIdMapOutputRepresentation') {
|
|
162
162
|
const v_error = (() => {
|
|
163
163
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
164
164
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -171,7 +171,7 @@ function validate$n(obj, path = 'RecordIdMapOutputRepresentation') {
|
|
|
171
171
|
for (let i = 0; i < obj_errors.length; i++) {
|
|
172
172
|
const obj_errors_item = obj_errors[i];
|
|
173
173
|
const path_errors_item = path_errors + '[' + i + ']';
|
|
174
|
-
const referencepath_errors_itemValidationError = validate$
|
|
174
|
+
const referencepath_errors_itemValidationError = validate$r(obj_errors_item, path_errors_item);
|
|
175
175
|
if (referencepath_errors_itemValidationError !== null) {
|
|
176
176
|
let message = 'Object doesn\'t match ErrorOutputRepresentation (at "' + path_errors_item + '")\n';
|
|
177
177
|
message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -186,68 +186,68 @@ function validate$n(obj, path = 'RecordIdMapOutputRepresentation') {
|
|
|
186
186
|
})();
|
|
187
187
|
return v_error === undefined ? null : v_error;
|
|
188
188
|
}
|
|
189
|
-
const RepresentationType$
|
|
190
|
-
function keyBuilder$
|
|
191
|
-
return keyPrefix + '::' + RepresentationType$
|
|
189
|
+
const RepresentationType$6 = 'RecordIdMapOutputRepresentation';
|
|
190
|
+
function keyBuilder$b(luvio, config) {
|
|
191
|
+
return keyPrefix + '::' + RepresentationType$6 + ':' + config.message;
|
|
192
192
|
}
|
|
193
193
|
function keyBuilderFromType$1(luvio, object) {
|
|
194
194
|
const keyParams = {
|
|
195
195
|
message: object.status
|
|
196
196
|
};
|
|
197
|
-
return keyBuilder$
|
|
197
|
+
return keyBuilder$b(luvio, keyParams);
|
|
198
198
|
}
|
|
199
|
-
function normalize$
|
|
199
|
+
function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
200
200
|
return input;
|
|
201
201
|
}
|
|
202
|
-
const select$
|
|
202
|
+
const select$e = function RecordIdMapOutputRepresentationSelect() {
|
|
203
203
|
return {
|
|
204
204
|
kind: 'Fragment',
|
|
205
|
-
version: VERSION$
|
|
205
|
+
version: VERSION$7,
|
|
206
206
|
private: [],
|
|
207
207
|
opaque: true
|
|
208
208
|
};
|
|
209
209
|
};
|
|
210
|
-
function equals$
|
|
210
|
+
function equals$7(existing, incoming) {
|
|
211
211
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
212
212
|
return false;
|
|
213
213
|
}
|
|
214
214
|
return true;
|
|
215
215
|
}
|
|
216
|
-
const ingest$
|
|
216
|
+
const ingest$6 = function RecordIdMapOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
217
217
|
if (process.env.NODE_ENV !== 'production') {
|
|
218
|
-
const validateError = validate$
|
|
218
|
+
const validateError = validate$q(input);
|
|
219
219
|
if (validateError !== null) {
|
|
220
220
|
throw validateError;
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
const key = keyBuilderFromType$1(luvio, input);
|
|
224
|
-
const ttlToUse = TTL$
|
|
225
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
224
|
+
const ttlToUse = TTL$5;
|
|
225
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "epc", VERSION$7, RepresentationType$6, equals$7);
|
|
226
226
|
return createLink(key);
|
|
227
227
|
};
|
|
228
|
-
function getTypeCacheKeys$
|
|
228
|
+
function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
|
|
229
229
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
230
230
|
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
231
231
|
rootKeySet.set(rootKey, {
|
|
232
232
|
namespace: keyPrefix,
|
|
233
|
-
representationName: RepresentationType$
|
|
233
|
+
representationName: RepresentationType$6,
|
|
234
234
|
mergeable: false
|
|
235
235
|
});
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
function select$
|
|
239
|
-
return select$
|
|
238
|
+
function select$d(luvio, params) {
|
|
239
|
+
return select$e();
|
|
240
240
|
}
|
|
241
|
-
function getResponseCacheKeys$
|
|
242
|
-
getTypeCacheKeys$
|
|
241
|
+
function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
|
|
242
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response);
|
|
243
243
|
}
|
|
244
|
-
function ingestSuccess$
|
|
244
|
+
function ingestSuccess$6(luvio, resourceParams, response) {
|
|
245
245
|
const { body } = response;
|
|
246
246
|
const key = keyBuilderFromType$1(luvio, body);
|
|
247
|
-
luvio.storeIngest(key, ingest$
|
|
247
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
248
248
|
const snapshot = luvio.storeLookup({
|
|
249
249
|
recordId: key,
|
|
250
|
-
node: select$
|
|
250
|
+
node: select$d(),
|
|
251
251
|
variables: {},
|
|
252
252
|
});
|
|
253
253
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -258,7 +258,7 @@ function ingestSuccess$5(luvio, resourceParams, response) {
|
|
|
258
258
|
deepFreeze(snapshot.data);
|
|
259
259
|
return snapshot;
|
|
260
260
|
}
|
|
261
|
-
function createResourceRequest$
|
|
261
|
+
function createResourceRequest$6(config) {
|
|
262
262
|
const headers = {};
|
|
263
263
|
return {
|
|
264
264
|
baseUri: '/services/data/v60.0',
|
|
@@ -272,45 +272,45 @@ function createResourceRequest$5(config) {
|
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
-
const adapterName$
|
|
275
|
+
const adapterName$6 = 'deactivate';
|
|
276
276
|
const deactivate_ConfigPropertyMetadata = [
|
|
277
277
|
generateParamConfigMetadata('deactivateInputPayload', true, 2 /* Body */, 4 /* Unsupported */),
|
|
278
278
|
];
|
|
279
|
-
const deactivate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
280
|
-
const createResourceParams$
|
|
281
|
-
function typeCheckConfig$
|
|
279
|
+
const deactivate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, deactivate_ConfigPropertyMetadata);
|
|
280
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$7(deactivate_ConfigPropertyMetadata);
|
|
281
|
+
function typeCheckConfig$6(untrustedConfig) {
|
|
282
282
|
const config = {};
|
|
283
283
|
const untrustedConfig_deactivateInputPayload = untrustedConfig.deactivateInputPayload;
|
|
284
|
-
const referenceDeactivateInputRepresentationValidationError = validate$
|
|
284
|
+
const referenceDeactivateInputRepresentationValidationError = validate$s(untrustedConfig_deactivateInputPayload);
|
|
285
285
|
if (referenceDeactivateInputRepresentationValidationError === null) {
|
|
286
286
|
config.deactivateInputPayload = untrustedConfig_deactivateInputPayload;
|
|
287
287
|
}
|
|
288
288
|
return config;
|
|
289
289
|
}
|
|
290
|
-
function validateAdapterConfig$
|
|
290
|
+
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
291
291
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
292
292
|
return null;
|
|
293
293
|
}
|
|
294
294
|
if (process.env.NODE_ENV !== 'production') {
|
|
295
295
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
296
296
|
}
|
|
297
|
-
const config = typeCheckConfig$
|
|
297
|
+
const config = typeCheckConfig$6(untrustedConfig);
|
|
298
298
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
299
299
|
return null;
|
|
300
300
|
}
|
|
301
301
|
return config;
|
|
302
302
|
}
|
|
303
|
-
function buildNetworkSnapshot$
|
|
304
|
-
const resourceParams = createResourceParams$
|
|
305
|
-
const request = createResourceRequest$
|
|
303
|
+
function buildNetworkSnapshot$6(luvio, config, options) {
|
|
304
|
+
const resourceParams = createResourceParams$6(config);
|
|
305
|
+
const request = createResourceRequest$6(resourceParams);
|
|
306
306
|
return luvio.dispatchResourceRequest(request, options)
|
|
307
307
|
.then((response) => {
|
|
308
308
|
return luvio.handleSuccessResponse(() => {
|
|
309
|
-
const snapshot = ingestSuccess$
|
|
309
|
+
const snapshot = ingestSuccess$6(luvio, resourceParams, response);
|
|
310
310
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
311
311
|
}, () => {
|
|
312
312
|
const cache = new StoreKeyMap();
|
|
313
|
-
getResponseCacheKeys$
|
|
313
|
+
getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
|
|
314
314
|
return cache;
|
|
315
315
|
});
|
|
316
316
|
}, (response) => {
|
|
@@ -320,16 +320,16 @@ function buildNetworkSnapshot$5(luvio, config, options) {
|
|
|
320
320
|
}
|
|
321
321
|
const deactivateAdapterFactory = (luvio) => {
|
|
322
322
|
return function deactivate(untrustedConfig) {
|
|
323
|
-
const config = validateAdapterConfig$
|
|
323
|
+
const config = validateAdapterConfig$6(untrustedConfig, deactivate_ConfigPropertyNames);
|
|
324
324
|
// Invalid or incomplete config
|
|
325
325
|
if (config === null) {
|
|
326
326
|
throw new Error('Invalid config for "deactivate"');
|
|
327
327
|
}
|
|
328
|
-
return buildNetworkSnapshot$
|
|
328
|
+
return buildNetworkSnapshot$6(luvio, config);
|
|
329
329
|
};
|
|
330
330
|
};
|
|
331
331
|
|
|
332
|
-
function validate$
|
|
332
|
+
function validate$p(obj, path = 'ProductAttributeDefinitionListInputRepresentation') {
|
|
333
333
|
const v_error = (() => {
|
|
334
334
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
335
335
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -350,7 +350,7 @@ function validate$m(obj, path = 'ProductAttributeDefinitionListInputRepresentati
|
|
|
350
350
|
return v_error === undefined ? null : v_error;
|
|
351
351
|
}
|
|
352
352
|
|
|
353
|
-
function validate$
|
|
353
|
+
function validate$o(obj, path = 'ProductAttributeDefinitionRepresentation') {
|
|
354
354
|
const v_error = (() => {
|
|
355
355
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
356
356
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -373,9 +373,9 @@ function validate$l(obj, path = 'ProductAttributeDefinitionRepresentation') {
|
|
|
373
373
|
return v_error === undefined ? null : v_error;
|
|
374
374
|
}
|
|
375
375
|
|
|
376
|
-
const TTL$
|
|
377
|
-
const VERSION$
|
|
378
|
-
function validate$
|
|
376
|
+
const TTL$4 = 6000;
|
|
377
|
+
const VERSION$6 = "e67d3c8569b9667eac98cc1a9840041c";
|
|
378
|
+
function validate$n(obj, path = 'ProductAttributeDefinitionListRepresentation') {
|
|
379
379
|
const v_error = (() => {
|
|
380
380
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
381
381
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -388,7 +388,7 @@ function validate$k(obj, path = 'ProductAttributeDefinitionListRepresentation')
|
|
|
388
388
|
for (let i = 0; i < obj_data.length; i++) {
|
|
389
389
|
const obj_data_item = obj_data[i];
|
|
390
390
|
const path_data_item = path_data + '[' + i + ']';
|
|
391
|
-
const referencepath_data_itemValidationError = validate$
|
|
391
|
+
const referencepath_data_itemValidationError = validate$o(obj_data_item, path_data_item);
|
|
392
392
|
if (referencepath_data_itemValidationError !== null) {
|
|
393
393
|
let message = 'Object doesn\'t match ProductAttributeDefinitionRepresentation (at "' + path_data_item + '")\n';
|
|
394
394
|
message += referencepath_data_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -403,68 +403,68 @@ function validate$k(obj, path = 'ProductAttributeDefinitionListRepresentation')
|
|
|
403
403
|
})();
|
|
404
404
|
return v_error === undefined ? null : v_error;
|
|
405
405
|
}
|
|
406
|
-
const RepresentationType$
|
|
407
|
-
function keyBuilder$
|
|
408
|
-
return keyPrefix + '::' + RepresentationType$
|
|
406
|
+
const RepresentationType$5 = 'ProductAttributeDefinitionListRepresentation';
|
|
407
|
+
function keyBuilder$a(luvio, config) {
|
|
408
|
+
return keyPrefix + '::' + RepresentationType$5 + ':' + config.message;
|
|
409
409
|
}
|
|
410
410
|
function keyBuilderFromType(luvio, object) {
|
|
411
411
|
const keyParams = {
|
|
412
412
|
message: object.message
|
|
413
413
|
};
|
|
414
|
-
return keyBuilder$
|
|
414
|
+
return keyBuilder$a(luvio, keyParams);
|
|
415
415
|
}
|
|
416
|
-
function normalize$
|
|
416
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
417
417
|
return input;
|
|
418
418
|
}
|
|
419
|
-
const select$
|
|
419
|
+
const select$c = function ProductAttributeDefinitionListRepresentationSelect() {
|
|
420
420
|
return {
|
|
421
421
|
kind: 'Fragment',
|
|
422
|
-
version: VERSION$
|
|
422
|
+
version: VERSION$6,
|
|
423
423
|
private: [],
|
|
424
424
|
opaque: true
|
|
425
425
|
};
|
|
426
426
|
};
|
|
427
|
-
function equals$
|
|
427
|
+
function equals$6(existing, incoming) {
|
|
428
428
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
429
429
|
return false;
|
|
430
430
|
}
|
|
431
431
|
return true;
|
|
432
432
|
}
|
|
433
|
-
const ingest$
|
|
433
|
+
const ingest$5 = function ProductAttributeDefinitionListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
434
434
|
if (process.env.NODE_ENV !== 'production') {
|
|
435
|
-
const validateError = validate$
|
|
435
|
+
const validateError = validate$n(input);
|
|
436
436
|
if (validateError !== null) {
|
|
437
437
|
throw validateError;
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
const key = keyBuilderFromType(luvio, input);
|
|
441
|
-
const ttlToUse = TTL$
|
|
442
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
441
|
+
const ttlToUse = TTL$4;
|
|
442
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "epc", VERSION$6, RepresentationType$5, equals$6);
|
|
443
443
|
return createLink(key);
|
|
444
444
|
};
|
|
445
|
-
function getTypeCacheKeys$
|
|
445
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
446
446
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
447
447
|
const rootKey = keyBuilderFromType(luvio, input);
|
|
448
448
|
rootKeySet.set(rootKey, {
|
|
449
449
|
namespace: keyPrefix,
|
|
450
|
-
representationName: RepresentationType$
|
|
450
|
+
representationName: RepresentationType$5,
|
|
451
451
|
mergeable: false
|
|
452
452
|
});
|
|
453
453
|
}
|
|
454
454
|
|
|
455
|
-
function select$
|
|
456
|
-
return select$
|
|
455
|
+
function select$b(luvio, params) {
|
|
456
|
+
return select$c();
|
|
457
457
|
}
|
|
458
|
-
function getResponseCacheKeys$
|
|
459
|
-
getTypeCacheKeys$
|
|
458
|
+
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
459
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response);
|
|
460
460
|
}
|
|
461
|
-
function ingestSuccess$
|
|
461
|
+
function ingestSuccess$5(luvio, resourceParams, response) {
|
|
462
462
|
const { body } = response;
|
|
463
463
|
const key = keyBuilderFromType(luvio, body);
|
|
464
|
-
luvio.storeIngest(key, ingest$
|
|
464
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
465
465
|
const snapshot = luvio.storeLookup({
|
|
466
466
|
recordId: key,
|
|
467
|
-
node: select$
|
|
467
|
+
node: select$b(),
|
|
468
468
|
variables: {},
|
|
469
469
|
});
|
|
470
470
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -475,7 +475,7 @@ function ingestSuccess$4(luvio, resourceParams, response) {
|
|
|
475
475
|
deepFreeze(snapshot.data);
|
|
476
476
|
return snapshot;
|
|
477
477
|
}
|
|
478
|
-
function createResourceRequest$
|
|
478
|
+
function createResourceRequest$5(config) {
|
|
479
479
|
const headers = {};
|
|
480
480
|
return {
|
|
481
481
|
baseUri: '/services/data/v60.0',
|
|
@@ -489,45 +489,45 @@ function createResourceRequest$4(config) {
|
|
|
489
489
|
};
|
|
490
490
|
}
|
|
491
491
|
|
|
492
|
-
const adapterName$
|
|
492
|
+
const adapterName$5 = 'createProductAttributeDefinition';
|
|
493
493
|
const createProductAttributeDefinition_ConfigPropertyMetadata = [
|
|
494
494
|
generateParamConfigMetadata('productAttributeDefinitionListInputPayload', true, 2 /* Body */, 4 /* Unsupported */),
|
|
495
495
|
];
|
|
496
|
-
const createProductAttributeDefinition_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
497
|
-
const createResourceParams$
|
|
498
|
-
function typeCheckConfig$
|
|
496
|
+
const createProductAttributeDefinition_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, createProductAttributeDefinition_ConfigPropertyMetadata);
|
|
497
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$7(createProductAttributeDefinition_ConfigPropertyMetadata);
|
|
498
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
499
499
|
const config = {};
|
|
500
500
|
const untrustedConfig_productAttributeDefinitionListInputPayload = untrustedConfig.productAttributeDefinitionListInputPayload;
|
|
501
|
-
const referenceProductAttributeDefinitionListInputRepresentationValidationError = validate$
|
|
501
|
+
const referenceProductAttributeDefinitionListInputRepresentationValidationError = validate$p(untrustedConfig_productAttributeDefinitionListInputPayload);
|
|
502
502
|
if (referenceProductAttributeDefinitionListInputRepresentationValidationError === null) {
|
|
503
503
|
config.productAttributeDefinitionListInputPayload = untrustedConfig_productAttributeDefinitionListInputPayload;
|
|
504
504
|
}
|
|
505
505
|
return config;
|
|
506
506
|
}
|
|
507
|
-
function validateAdapterConfig$
|
|
507
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
508
508
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
509
509
|
return null;
|
|
510
510
|
}
|
|
511
511
|
if (process.env.NODE_ENV !== 'production') {
|
|
512
512
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
513
513
|
}
|
|
514
|
-
const config = typeCheckConfig$
|
|
514
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
515
515
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
516
516
|
return null;
|
|
517
517
|
}
|
|
518
518
|
return config;
|
|
519
519
|
}
|
|
520
|
-
function buildNetworkSnapshot$
|
|
521
|
-
const resourceParams = createResourceParams$
|
|
522
|
-
const request = createResourceRequest$
|
|
520
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
521
|
+
const resourceParams = createResourceParams$5(config);
|
|
522
|
+
const request = createResourceRequest$5(resourceParams);
|
|
523
523
|
return luvio.dispatchResourceRequest(request, options)
|
|
524
524
|
.then((response) => {
|
|
525
525
|
return luvio.handleSuccessResponse(() => {
|
|
526
|
-
const snapshot = ingestSuccess$
|
|
526
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response);
|
|
527
527
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
528
528
|
}, () => {
|
|
529
529
|
const cache = new StoreKeyMap();
|
|
530
|
-
getResponseCacheKeys$
|
|
530
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
|
|
531
531
|
return cache;
|
|
532
532
|
});
|
|
533
533
|
}, (response) => {
|
|
@@ -537,16 +537,16 @@ function buildNetworkSnapshot$4(luvio, config, options) {
|
|
|
537
537
|
}
|
|
538
538
|
const createProductAttributeDefinitionAdapterFactory = (luvio) => {
|
|
539
539
|
return function createProductAttributeDefinition(untrustedConfig) {
|
|
540
|
-
const config = validateAdapterConfig$
|
|
540
|
+
const config = validateAdapterConfig$5(untrustedConfig, createProductAttributeDefinition_ConfigPropertyNames);
|
|
541
541
|
// Invalid or incomplete config
|
|
542
542
|
if (config === null) {
|
|
543
543
|
throw new Error('Invalid config for "createProductAttributeDefinition"');
|
|
544
544
|
}
|
|
545
|
-
return buildNetworkSnapshot$
|
|
545
|
+
return buildNetworkSnapshot$5(luvio, config);
|
|
546
546
|
};
|
|
547
547
|
};
|
|
548
548
|
|
|
549
|
-
function validate$
|
|
549
|
+
function validate$m(obj, path = 'ProductFlowConnectRepresentation') {
|
|
550
550
|
const v_error = (() => {
|
|
551
551
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
552
552
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -562,8 +562,8 @@ function validate$j(obj, path = 'ProductFlowConnectRepresentation') {
|
|
|
562
562
|
return v_error === undefined ? null : v_error;
|
|
563
563
|
}
|
|
564
564
|
|
|
565
|
-
const VERSION$
|
|
566
|
-
function validate$
|
|
565
|
+
const VERSION$5 = "9e839ceea7c6caa2747b4d3170bd209d";
|
|
566
|
+
function validate$l(obj, path = 'Status') {
|
|
567
567
|
const v_error = (() => {
|
|
568
568
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
569
569
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -585,10 +585,10 @@ function validate$i(obj, path = 'Status') {
|
|
|
585
585
|
})();
|
|
586
586
|
return v_error === undefined ? null : v_error;
|
|
587
587
|
}
|
|
588
|
-
const select$
|
|
588
|
+
const select$a = function StatusSelect() {
|
|
589
589
|
return {
|
|
590
590
|
kind: 'Fragment',
|
|
591
|
-
version: VERSION$
|
|
591
|
+
version: VERSION$5,
|
|
592
592
|
private: [],
|
|
593
593
|
selections: [
|
|
594
594
|
{
|
|
@@ -604,7 +604,7 @@ const select$8 = function StatusSelect() {
|
|
|
604
604
|
]
|
|
605
605
|
};
|
|
606
606
|
};
|
|
607
|
-
function equals$
|
|
607
|
+
function equals$5(existing, incoming) {
|
|
608
608
|
const existing_code = existing.code;
|
|
609
609
|
const incoming_code = incoming.code;
|
|
610
610
|
// if at least one of these optionals is defined
|
|
@@ -634,9 +634,9 @@ function equals$4(existing, incoming) {
|
|
|
634
634
|
return true;
|
|
635
635
|
}
|
|
636
636
|
|
|
637
|
-
const TTL$
|
|
638
|
-
const VERSION$
|
|
639
|
-
function validate$
|
|
637
|
+
const TTL$3 = 6000;
|
|
638
|
+
const VERSION$4 = "a75aed3c640fb969c24561ef4f8cb169";
|
|
639
|
+
function validate$k(obj, path = 'ProductFlowOutputRepresentation') {
|
|
640
640
|
const v_error = (() => {
|
|
641
641
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
642
642
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -651,7 +651,7 @@ function validate$h(obj, path = 'ProductFlowOutputRepresentation') {
|
|
|
651
651
|
if (obj.productFlow !== undefined) {
|
|
652
652
|
const obj_productFlow = obj.productFlow;
|
|
653
653
|
const path_productFlow = path + '.productFlow';
|
|
654
|
-
const referencepath_productFlowValidationError = validate$
|
|
654
|
+
const referencepath_productFlowValidationError = validate$m(obj_productFlow, path_productFlow);
|
|
655
655
|
if (referencepath_productFlowValidationError !== null) {
|
|
656
656
|
let message = 'Object doesn\'t match ProductFlowConnectRepresentation (at "' + path_productFlow + '")\n';
|
|
657
657
|
message += referencepath_productFlowValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -661,7 +661,7 @@ function validate$h(obj, path = 'ProductFlowOutputRepresentation') {
|
|
|
661
661
|
if (obj.status !== undefined) {
|
|
662
662
|
const obj_status = obj.status;
|
|
663
663
|
const path_status = path + '.status';
|
|
664
|
-
const referencepath_statusValidationError = validate$
|
|
664
|
+
const referencepath_statusValidationError = validate$l(obj_status, path_status);
|
|
665
665
|
if (referencepath_statusValidationError !== null) {
|
|
666
666
|
let message = 'Object doesn\'t match Status (at "' + path_status + '")\n';
|
|
667
667
|
message += referencepath_statusValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -671,62 +671,62 @@ function validate$h(obj, path = 'ProductFlowOutputRepresentation') {
|
|
|
671
671
|
})();
|
|
672
672
|
return v_error === undefined ? null : v_error;
|
|
673
673
|
}
|
|
674
|
-
const RepresentationType$
|
|
675
|
-
function normalize$
|
|
674
|
+
const RepresentationType$4 = 'ProductFlowOutputRepresentation';
|
|
675
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
676
676
|
return input;
|
|
677
677
|
}
|
|
678
|
-
const select$
|
|
678
|
+
const select$9 = function ProductFlowOutputRepresentationSelect() {
|
|
679
679
|
return {
|
|
680
680
|
kind: 'Fragment',
|
|
681
|
-
version: VERSION$
|
|
681
|
+
version: VERSION$4,
|
|
682
682
|
private: [],
|
|
683
683
|
opaque: true
|
|
684
684
|
};
|
|
685
685
|
};
|
|
686
|
-
function equals$
|
|
686
|
+
function equals$4(existing, incoming) {
|
|
687
687
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
688
688
|
return false;
|
|
689
689
|
}
|
|
690
690
|
return true;
|
|
691
691
|
}
|
|
692
|
-
const ingest$
|
|
692
|
+
const ingest$4 = function ProductFlowOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
693
693
|
if (process.env.NODE_ENV !== 'production') {
|
|
694
|
-
const validateError = validate$
|
|
694
|
+
const validateError = validate$k(input);
|
|
695
695
|
if (validateError !== null) {
|
|
696
696
|
throw validateError;
|
|
697
697
|
}
|
|
698
698
|
}
|
|
699
699
|
const key = path.fullPath;
|
|
700
|
-
const ttlToUse = TTL$
|
|
701
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
700
|
+
const ttlToUse = TTL$3;
|
|
701
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "epc", VERSION$4, RepresentationType$4, equals$4);
|
|
702
702
|
return createLink(key);
|
|
703
703
|
};
|
|
704
|
-
function getTypeCacheKeys$
|
|
704
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
705
705
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
706
706
|
const rootKey = fullPathFactory();
|
|
707
707
|
rootKeySet.set(rootKey, {
|
|
708
708
|
namespace: keyPrefix,
|
|
709
|
-
representationName: RepresentationType$
|
|
709
|
+
representationName: RepresentationType$4,
|
|
710
710
|
mergeable: false
|
|
711
711
|
});
|
|
712
712
|
}
|
|
713
713
|
|
|
714
|
-
function select$
|
|
715
|
-
return select$
|
|
714
|
+
function select$8(luvio, params) {
|
|
715
|
+
return select$9();
|
|
716
716
|
}
|
|
717
|
-
function keyBuilder$
|
|
717
|
+
function keyBuilder$9(luvio, params) {
|
|
718
718
|
return keyPrefix + '::ProductFlowOutputRepresentation:(' + 'correlationId:' + params.queryParams.correlationId + ',' + 'productId:' + params.urlParams.productId + ')';
|
|
719
719
|
}
|
|
720
|
-
function getResponseCacheKeys$
|
|
721
|
-
getTypeCacheKeys$
|
|
720
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
721
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$9(luvio, resourceParams));
|
|
722
722
|
}
|
|
723
|
-
function ingestSuccess$
|
|
723
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
724
724
|
const { body } = response;
|
|
725
|
-
const key = keyBuilder$
|
|
726
|
-
luvio.storeIngest(key, ingest$
|
|
725
|
+
const key = keyBuilder$9(luvio, resourceParams);
|
|
726
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
727
727
|
const snapshot = luvio.storeLookup({
|
|
728
728
|
recordId: key,
|
|
729
|
-
node: select$
|
|
729
|
+
node: select$8(),
|
|
730
730
|
variables: {},
|
|
731
731
|
}, snapshotRefresh);
|
|
732
732
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -737,19 +737,19 @@ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
737
737
|
deepFreeze(snapshot.data);
|
|
738
738
|
return snapshot;
|
|
739
739
|
}
|
|
740
|
-
function ingestError$
|
|
741
|
-
const key = keyBuilder$
|
|
740
|
+
function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
741
|
+
const key = keyBuilder$9(luvio, params);
|
|
742
742
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
743
743
|
const storeMetadataParams = {
|
|
744
|
-
ttl: TTL$
|
|
744
|
+
ttl: TTL$3,
|
|
745
745
|
namespace: keyPrefix,
|
|
746
|
-
version: VERSION$
|
|
747
|
-
representationName: RepresentationType$
|
|
746
|
+
version: VERSION$4,
|
|
747
|
+
representationName: RepresentationType$4
|
|
748
748
|
};
|
|
749
749
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
750
750
|
return errorSnapshot;
|
|
751
751
|
}
|
|
752
|
-
function createResourceRequest$
|
|
752
|
+
function createResourceRequest$4(config) {
|
|
753
753
|
const headers = {};
|
|
754
754
|
return {
|
|
755
755
|
baseUri: '/services/data/v60.0',
|
|
@@ -763,94 +763,94 @@ function createResourceRequest$3(config) {
|
|
|
763
763
|
};
|
|
764
764
|
}
|
|
765
765
|
|
|
766
|
-
const adapterName$
|
|
766
|
+
const adapterName$4 = 'getProductFlowByProductId';
|
|
767
767
|
const getProductFlowByProductId_ConfigPropertyMetadata = [
|
|
768
768
|
generateParamConfigMetadata('productId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
769
769
|
generateParamConfigMetadata('correlationId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
770
770
|
];
|
|
771
|
-
const getProductFlowByProductId_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
772
|
-
const createResourceParams$
|
|
773
|
-
function keyBuilder$
|
|
774
|
-
const resourceParams = createResourceParams$
|
|
775
|
-
return keyBuilder$
|
|
771
|
+
const getProductFlowByProductId_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getProductFlowByProductId_ConfigPropertyMetadata);
|
|
772
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$7(getProductFlowByProductId_ConfigPropertyMetadata);
|
|
773
|
+
function keyBuilder$8(luvio, config) {
|
|
774
|
+
const resourceParams = createResourceParams$4(config);
|
|
775
|
+
return keyBuilder$9(luvio, resourceParams);
|
|
776
776
|
}
|
|
777
|
-
function typeCheckConfig$
|
|
777
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
778
778
|
const config = {};
|
|
779
|
-
typeCheckConfig$
|
|
779
|
+
typeCheckConfig$7(untrustedConfig, config, getProductFlowByProductId_ConfigPropertyMetadata);
|
|
780
780
|
return config;
|
|
781
781
|
}
|
|
782
|
-
function validateAdapterConfig$
|
|
782
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
783
783
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
784
784
|
return null;
|
|
785
785
|
}
|
|
786
786
|
if (process.env.NODE_ENV !== 'production') {
|
|
787
787
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
788
788
|
}
|
|
789
|
-
const config = typeCheckConfig$
|
|
789
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
790
790
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
791
791
|
return null;
|
|
792
792
|
}
|
|
793
793
|
return config;
|
|
794
794
|
}
|
|
795
|
-
function adapterFragment$
|
|
796
|
-
createResourceParams$
|
|
797
|
-
return select$
|
|
795
|
+
function adapterFragment$4(luvio, config) {
|
|
796
|
+
createResourceParams$4(config);
|
|
797
|
+
return select$8();
|
|
798
798
|
}
|
|
799
|
-
function onFetchResponseSuccess$
|
|
800
|
-
const snapshot = ingestSuccess$
|
|
799
|
+
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
800
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
801
801
|
config,
|
|
802
|
-
resolve: () => buildNetworkSnapshot$
|
|
802
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
803
803
|
});
|
|
804
804
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
805
805
|
}
|
|
806
|
-
function onFetchResponseError$
|
|
807
|
-
const snapshot = ingestError$
|
|
806
|
+
function onFetchResponseError$4(luvio, config, resourceParams, response) {
|
|
807
|
+
const snapshot = ingestError$4(luvio, resourceParams, response, {
|
|
808
808
|
config,
|
|
809
|
-
resolve: () => buildNetworkSnapshot$
|
|
809
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
810
810
|
});
|
|
811
811
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
812
812
|
}
|
|
813
|
-
function buildNetworkSnapshot$
|
|
814
|
-
const resourceParams = createResourceParams$
|
|
815
|
-
const request = createResourceRequest$
|
|
813
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
814
|
+
const resourceParams = createResourceParams$4(config);
|
|
815
|
+
const request = createResourceRequest$4(resourceParams);
|
|
816
816
|
return luvio.dispatchResourceRequest(request, options)
|
|
817
817
|
.then((response) => {
|
|
818
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
818
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
|
|
819
819
|
const cache = new StoreKeyMap();
|
|
820
|
-
getResponseCacheKeys$
|
|
820
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
821
821
|
return cache;
|
|
822
822
|
});
|
|
823
823
|
}, (response) => {
|
|
824
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
824
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
|
|
825
825
|
});
|
|
826
826
|
}
|
|
827
|
-
function buildNetworkSnapshotCachePolicy$
|
|
828
|
-
return buildNetworkSnapshotCachePolicy$
|
|
827
|
+
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
828
|
+
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
|
|
829
829
|
}
|
|
830
|
-
function buildCachedSnapshotCachePolicy$
|
|
830
|
+
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
831
831
|
const { luvio, config } = context;
|
|
832
832
|
const selector = {
|
|
833
|
-
recordId: keyBuilder$
|
|
834
|
-
node: adapterFragment$
|
|
833
|
+
recordId: keyBuilder$8(luvio, config),
|
|
834
|
+
node: adapterFragment$4(luvio, config),
|
|
835
835
|
variables: {},
|
|
836
836
|
};
|
|
837
837
|
const cacheSnapshot = storeLookup(selector, {
|
|
838
838
|
config,
|
|
839
|
-
resolve: () => buildNetworkSnapshot$
|
|
839
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
840
840
|
});
|
|
841
841
|
return cacheSnapshot;
|
|
842
842
|
}
|
|
843
843
|
const getProductFlowByProductIdAdapterFactory = (luvio) => function epc__getProductFlowByProductId(untrustedConfig, requestContext) {
|
|
844
|
-
const config = validateAdapterConfig$
|
|
844
|
+
const config = validateAdapterConfig$4(untrustedConfig, getProductFlowByProductId_ConfigPropertyNames);
|
|
845
845
|
// Invalid or incomplete config
|
|
846
846
|
if (config === null) {
|
|
847
847
|
return null;
|
|
848
848
|
}
|
|
849
849
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
850
|
-
buildCachedSnapshotCachePolicy$
|
|
850
|
+
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
|
|
851
851
|
};
|
|
852
852
|
|
|
853
|
-
function validate$
|
|
853
|
+
function validate$j(obj, path = 'AttributePicklistValueOutputRepresentation') {
|
|
854
854
|
const v_error = (() => {
|
|
855
855
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
856
856
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -929,7 +929,7 @@ function validate$g(obj, path = 'AttributePicklistValueOutputRepresentation') {
|
|
|
929
929
|
return v_error === undefined ? null : v_error;
|
|
930
930
|
}
|
|
931
931
|
|
|
932
|
-
function validate$
|
|
932
|
+
function validate$i(obj, path = 'AttributePicklistOutputRepresentation') {
|
|
933
933
|
const v_error = (() => {
|
|
934
934
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
935
935
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -978,7 +978,7 @@ function validate$f(obj, path = 'AttributePicklistOutputRepresentation') {
|
|
|
978
978
|
for (let i = 0; i < obj_values.length; i++) {
|
|
979
979
|
const obj_values_item = obj_values[i];
|
|
980
980
|
const path_values_item = path_values + '[' + i + ']';
|
|
981
|
-
const referencepath_values_itemValidationError = validate$
|
|
981
|
+
const referencepath_values_itemValidationError = validate$j(obj_values_item, path_values_item);
|
|
982
982
|
if (referencepath_values_itemValidationError !== null) {
|
|
983
983
|
let message = 'Object doesn\'t match AttributePicklistValueOutputRepresentation (at "' + path_values_item + '")\n';
|
|
984
984
|
message += referencepath_values_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -990,7 +990,7 @@ function validate$f(obj, path = 'AttributePicklistOutputRepresentation') {
|
|
|
990
990
|
return v_error === undefined ? null : v_error;
|
|
991
991
|
}
|
|
992
992
|
|
|
993
|
-
function validate$
|
|
993
|
+
function validate$h(obj, path = 'AttributeDefinitionOutputRepresentation') {
|
|
994
994
|
const v_error = (() => {
|
|
995
995
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
996
996
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1110,7 +1110,7 @@ function validate$e(obj, path = 'AttributeDefinitionOutputRepresentation') {
|
|
|
1110
1110
|
if (obj.picklist !== undefined) {
|
|
1111
1111
|
const obj_picklist = obj.picklist;
|
|
1112
1112
|
const path_picklist = path + '.picklist';
|
|
1113
|
-
const referencepath_picklistValidationError = validate$
|
|
1113
|
+
const referencepath_picklistValidationError = validate$i(obj_picklist, path_picklist);
|
|
1114
1114
|
if (referencepath_picklistValidationError !== null) {
|
|
1115
1115
|
let message = 'Object doesn\'t match AttributePicklistOutputRepresentation (at "' + path_picklist + '")\n';
|
|
1116
1116
|
message += referencepath_picklistValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1128,7 +1128,7 @@ function validate$e(obj, path = 'AttributeDefinitionOutputRepresentation') {
|
|
|
1128
1128
|
return v_error === undefined ? null : v_error;
|
|
1129
1129
|
}
|
|
1130
1130
|
|
|
1131
|
-
function validate$
|
|
1131
|
+
function validate$g(obj, path = 'AttributeCategoryOutputRepresentation') {
|
|
1132
1132
|
const v_error = (() => {
|
|
1133
1133
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1134
1134
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1142,7 +1142,7 @@ function validate$d(obj, path = 'AttributeCategoryOutputRepresentation') {
|
|
|
1142
1142
|
for (let i = 0; i < obj_attributes.length; i++) {
|
|
1143
1143
|
const obj_attributes_item = obj_attributes[i];
|
|
1144
1144
|
const path_attributes_item = path_attributes + '[' + i + ']';
|
|
1145
|
-
const referencepath_attributes_itemValidationError = validate$
|
|
1145
|
+
const referencepath_attributes_itemValidationError = validate$h(obj_attributes_item, path_attributes_item);
|
|
1146
1146
|
if (referencepath_attributes_itemValidationError !== null) {
|
|
1147
1147
|
let message = 'Object doesn\'t match AttributeDefinitionOutputRepresentation (at "' + path_attributes_item + '")\n';
|
|
1148
1148
|
message += referencepath_attributes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1175,7 +1175,7 @@ function validate$d(obj, path = 'AttributeCategoryOutputRepresentation') {
|
|
|
1175
1175
|
return v_error === undefined ? null : v_error;
|
|
1176
1176
|
}
|
|
1177
1177
|
|
|
1178
|
-
function validate$
|
|
1178
|
+
function validate$f(obj, path = 'PricingModelOutputRepresentation') {
|
|
1179
1179
|
const v_error = (() => {
|
|
1180
1180
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1181
1181
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1226,7 +1226,7 @@ function validate$c(obj, path = 'PricingModelOutputRepresentation') {
|
|
|
1226
1226
|
return v_error === undefined ? null : v_error;
|
|
1227
1227
|
}
|
|
1228
1228
|
|
|
1229
|
-
function validate$
|
|
1229
|
+
function validate$e(obj, path = 'PriceOutputRepresentation') {
|
|
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 + '")');
|
|
@@ -1262,7 +1262,7 @@ function validate$b(obj, path = 'PriceOutputRepresentation') {
|
|
|
1262
1262
|
if (obj.pricingModel !== undefined) {
|
|
1263
1263
|
const obj_pricingModel = obj.pricingModel;
|
|
1264
1264
|
const path_pricingModel = path + '.pricingModel';
|
|
1265
|
-
const referencepath_pricingModelValidationError = validate$
|
|
1265
|
+
const referencepath_pricingModelValidationError = validate$f(obj_pricingModel, path_pricingModel);
|
|
1266
1266
|
if (referencepath_pricingModelValidationError !== null) {
|
|
1267
1267
|
let message = 'Object doesn\'t match PricingModelOutputRepresentation (at "' + path_pricingModel + '")\n';
|
|
1268
1268
|
message += referencepath_pricingModelValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1280,7 +1280,7 @@ function validate$b(obj, path = 'PriceOutputRepresentation') {
|
|
|
1280
1280
|
return v_error === undefined ? null : v_error;
|
|
1281
1281
|
}
|
|
1282
1282
|
|
|
1283
|
-
function validate$
|
|
1283
|
+
function validate$d(obj, path = 'ProductClassificationOutputRepresentation') {
|
|
1284
1284
|
const v_error = (() => {
|
|
1285
1285
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1286
1286
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1296,7 +1296,7 @@ function validate$a(obj, path = 'ProductClassificationOutputRepresentation') {
|
|
|
1296
1296
|
return v_error === undefined ? null : v_error;
|
|
1297
1297
|
}
|
|
1298
1298
|
|
|
1299
|
-
function validate$
|
|
1299
|
+
function validate$c(obj, path = 'ProductComponentGroupOutputRepresentation') {
|
|
1300
1300
|
const v_error = (() => {
|
|
1301
1301
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1302
1302
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1375,7 +1375,7 @@ function validate$9(obj, path = 'ProductComponentGroupOutputRepresentation') {
|
|
|
1375
1375
|
return v_error === undefined ? null : v_error;
|
|
1376
1376
|
}
|
|
1377
1377
|
|
|
1378
|
-
function validate$
|
|
1378
|
+
function validate$b(obj, path = 'ProductSpecificationTypeOutputRepresentation') {
|
|
1379
1379
|
const v_error = (() => {
|
|
1380
1380
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1381
1381
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1391,7 +1391,7 @@ function validate$8(obj, path = 'ProductSpecificationTypeOutputRepresentation')
|
|
|
1391
1391
|
return v_error === undefined ? null : v_error;
|
|
1392
1392
|
}
|
|
1393
1393
|
|
|
1394
|
-
function validate$
|
|
1394
|
+
function validate$a(obj, path = 'QuantityInfo') {
|
|
1395
1395
|
const v_error = (() => {
|
|
1396
1396
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1397
1397
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1409,9 +1409,9 @@ function validate$7(obj, path = 'QuantityInfo') {
|
|
|
1409
1409
|
return v_error === undefined ? null : v_error;
|
|
1410
1410
|
}
|
|
1411
1411
|
|
|
1412
|
-
const TTL$
|
|
1413
|
-
const VERSION$
|
|
1414
|
-
function validate$
|
|
1412
|
+
const TTL$2 = 6000;
|
|
1413
|
+
const VERSION$3 = "38ee0d8d67cda562ff19dd5273e07d95";
|
|
1414
|
+
function validate$9(obj, path = 'ProductOutputRepresentation') {
|
|
1415
1415
|
const v_error = (() => {
|
|
1416
1416
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1417
1417
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1425,7 +1425,7 @@ function validate$6(obj, path = 'ProductOutputRepresentation') {
|
|
|
1425
1425
|
for (let i = 0; i < obj_attributeCategory.length; i++) {
|
|
1426
1426
|
const obj_attributeCategory_item = obj_attributeCategory[i];
|
|
1427
1427
|
const path_attributeCategory_item = path_attributeCategory + '[' + i + ']';
|
|
1428
|
-
const referencepath_attributeCategory_itemValidationError = validate$
|
|
1428
|
+
const referencepath_attributeCategory_itemValidationError = validate$g(obj_attributeCategory_item, path_attributeCategory_item);
|
|
1429
1429
|
if (referencepath_attributeCategory_itemValidationError !== null) {
|
|
1430
1430
|
let message = 'Object doesn\'t match AttributeCategoryOutputRepresentation (at "' + path_attributeCategory_item + '")\n';
|
|
1431
1431
|
message += referencepath_attributeCategory_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1442,7 +1442,7 @@ function validate$6(obj, path = 'ProductOutputRepresentation') {
|
|
|
1442
1442
|
for (let i = 0; i < obj_attributes.length; i++) {
|
|
1443
1443
|
const obj_attributes_item = obj_attributes[i];
|
|
1444
1444
|
const path_attributes_item = path_attributes + '[' + i + ']';
|
|
1445
|
-
const referencepath_attributes_itemValidationError = validate$
|
|
1445
|
+
const referencepath_attributes_itemValidationError = validate$h(obj_attributes_item, path_attributes_item);
|
|
1446
1446
|
if (referencepath_attributes_itemValidationError !== null) {
|
|
1447
1447
|
let message = 'Object doesn\'t match AttributeDefinitionOutputRepresentation (at "' + path_attributes_item + '")\n';
|
|
1448
1448
|
message += referencepath_attributes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1466,7 +1466,7 @@ function validate$6(obj, path = 'ProductOutputRepresentation') {
|
|
|
1466
1466
|
for (let i = 0; i < obj_childProducts.length; i++) {
|
|
1467
1467
|
const obj_childProducts_item = obj_childProducts[i];
|
|
1468
1468
|
const path_childProducts_item = path_childProducts + '[' + i + ']';
|
|
1469
|
-
const referencepath_childProducts_itemValidationError = validate$
|
|
1469
|
+
const referencepath_childProducts_itemValidationError = validate$9(obj_childProducts_item, path_childProducts_item);
|
|
1470
1470
|
if (referencepath_childProducts_itemValidationError !== null) {
|
|
1471
1471
|
let message = 'Object doesn\'t match ProductOutputRepresentation (at "' + path_childProducts_item + '")\n';
|
|
1472
1472
|
message += referencepath_childProducts_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1539,7 +1539,7 @@ function validate$6(obj, path = 'ProductOutputRepresentation') {
|
|
|
1539
1539
|
for (let i = 0; i < obj_prices.length; i++) {
|
|
1540
1540
|
const obj_prices_item = obj_prices[i];
|
|
1541
1541
|
const path_prices_item = path_prices + '[' + i + ']';
|
|
1542
|
-
const referencepath_prices_itemValidationError = validate$
|
|
1542
|
+
const referencepath_prices_itemValidationError = validate$e(obj_prices_item, path_prices_item);
|
|
1543
1543
|
if (referencepath_prices_itemValidationError !== null) {
|
|
1544
1544
|
let message = 'Object doesn\'t match PriceOutputRepresentation (at "' + path_prices_item + '")\n';
|
|
1545
1545
|
message += referencepath_prices_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1550,7 +1550,7 @@ function validate$6(obj, path = 'ProductOutputRepresentation') {
|
|
|
1550
1550
|
if (obj.productClassification !== undefined) {
|
|
1551
1551
|
const obj_productClassification = obj.productClassification;
|
|
1552
1552
|
const path_productClassification = path + '.productClassification';
|
|
1553
|
-
const referencepath_productClassificationValidationError = validate$
|
|
1553
|
+
const referencepath_productClassificationValidationError = validate$d(obj_productClassification, path_productClassification);
|
|
1554
1554
|
if (referencepath_productClassificationValidationError !== null) {
|
|
1555
1555
|
let message = 'Object doesn\'t match ProductClassificationOutputRepresentation (at "' + path_productClassification + '")\n';
|
|
1556
1556
|
message += referencepath_productClassificationValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1573,7 +1573,7 @@ function validate$6(obj, path = 'ProductOutputRepresentation') {
|
|
|
1573
1573
|
for (let i = 0; i < obj_productComponentGroups.length; i++) {
|
|
1574
1574
|
const obj_productComponentGroups_item = obj_productComponentGroups[i];
|
|
1575
1575
|
const path_productComponentGroups_item = path_productComponentGroups + '[' + i + ']';
|
|
1576
|
-
const referencepath_productComponentGroups_itemValidationError = validate$
|
|
1576
|
+
const referencepath_productComponentGroups_itemValidationError = validate$c(obj_productComponentGroups_item, path_productComponentGroups_item);
|
|
1577
1577
|
if (referencepath_productComponentGroups_itemValidationError !== null) {
|
|
1578
1578
|
let message = 'Object doesn\'t match ProductComponentGroupOutputRepresentation (at "' + path_productComponentGroups_item + '")\n';
|
|
1579
1579
|
message += referencepath_productComponentGroups_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1584,7 +1584,7 @@ function validate$6(obj, path = 'ProductOutputRepresentation') {
|
|
|
1584
1584
|
if (obj.productSpecificationType !== undefined) {
|
|
1585
1585
|
const obj_productSpecificationType = obj.productSpecificationType;
|
|
1586
1586
|
const path_productSpecificationType = path + '.productSpecificationType';
|
|
1587
|
-
const referencepath_productSpecificationTypeValidationError = validate$
|
|
1587
|
+
const referencepath_productSpecificationTypeValidationError = validate$b(obj_productSpecificationType, path_productSpecificationType);
|
|
1588
1588
|
if (referencepath_productSpecificationTypeValidationError !== null) {
|
|
1589
1589
|
let message = 'Object doesn\'t match ProductSpecificationTypeOutputRepresentation (at "' + path_productSpecificationType + '")\n';
|
|
1590
1590
|
message += referencepath_productSpecificationTypeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1594,7 +1594,7 @@ function validate$6(obj, path = 'ProductOutputRepresentation') {
|
|
|
1594
1594
|
if (obj.quantityInfo !== undefined) {
|
|
1595
1595
|
const obj_quantityInfo = obj.quantityInfo;
|
|
1596
1596
|
const path_quantityInfo = path + '.quantityInfo';
|
|
1597
|
-
const referencepath_quantityInfoValidationError = validate$
|
|
1597
|
+
const referencepath_quantityInfoValidationError = validate$a(obj_quantityInfo, path_quantityInfo);
|
|
1598
1598
|
if (referencepath_quantityInfoValidationError !== null) {
|
|
1599
1599
|
let message = 'Object doesn\'t match QuantityInfo (at "' + path_quantityInfo + '")\n';
|
|
1600
1600
|
message += referencepath_quantityInfoValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1604,62 +1604,62 @@ function validate$6(obj, path = 'ProductOutputRepresentation') {
|
|
|
1604
1604
|
})();
|
|
1605
1605
|
return v_error === undefined ? null : v_error;
|
|
1606
1606
|
}
|
|
1607
|
-
const RepresentationType$
|
|
1608
|
-
function normalize$
|
|
1607
|
+
const RepresentationType$3 = 'ProductOutputRepresentation';
|
|
1608
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
1609
1609
|
return input;
|
|
1610
1610
|
}
|
|
1611
|
-
const select$
|
|
1611
|
+
const select$7 = function ProductOutputRepresentationSelect() {
|
|
1612
1612
|
return {
|
|
1613
1613
|
kind: 'Fragment',
|
|
1614
|
-
version: VERSION$
|
|
1614
|
+
version: VERSION$3,
|
|
1615
1615
|
private: [],
|
|
1616
1616
|
opaque: true
|
|
1617
1617
|
};
|
|
1618
1618
|
};
|
|
1619
|
-
function equals$
|
|
1619
|
+
function equals$3(existing, incoming) {
|
|
1620
1620
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1621
1621
|
return false;
|
|
1622
1622
|
}
|
|
1623
1623
|
return true;
|
|
1624
1624
|
}
|
|
1625
|
-
const ingest$
|
|
1625
|
+
const ingest$3 = function ProductOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1626
1626
|
if (process.env.NODE_ENV !== 'production') {
|
|
1627
|
-
const validateError = validate$
|
|
1627
|
+
const validateError = validate$9(input);
|
|
1628
1628
|
if (validateError !== null) {
|
|
1629
1629
|
throw validateError;
|
|
1630
1630
|
}
|
|
1631
1631
|
}
|
|
1632
1632
|
const key = path.fullPath;
|
|
1633
|
-
const ttlToUse = TTL$
|
|
1634
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1633
|
+
const ttlToUse = TTL$2;
|
|
1634
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "epc", VERSION$3, RepresentationType$3, equals$3);
|
|
1635
1635
|
return createLink(key);
|
|
1636
1636
|
};
|
|
1637
|
-
function getTypeCacheKeys$
|
|
1637
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
1638
1638
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1639
1639
|
const rootKey = fullPathFactory();
|
|
1640
1640
|
rootKeySet.set(rootKey, {
|
|
1641
1641
|
namespace: keyPrefix,
|
|
1642
|
-
representationName: RepresentationType$
|
|
1642
|
+
representationName: RepresentationType$3,
|
|
1643
1643
|
mergeable: false
|
|
1644
1644
|
});
|
|
1645
1645
|
}
|
|
1646
1646
|
|
|
1647
|
-
function select$
|
|
1648
|
-
return select$
|
|
1647
|
+
function select$6(luvio, params) {
|
|
1648
|
+
return select$7();
|
|
1649
1649
|
}
|
|
1650
|
-
function keyBuilder$
|
|
1650
|
+
function keyBuilder$7(luvio, params) {
|
|
1651
1651
|
return keyPrefix + '::ProductOutputRepresentation:(' + 'correlationId:' + params.queryParams.correlationId + ',' + 'isPriceImpacting:' + params.queryParams.isPriceImpacting + ',' + 'productId:' + params.urlParams.productId + ')';
|
|
1652
1652
|
}
|
|
1653
|
-
function getResponseCacheKeys$
|
|
1654
|
-
getTypeCacheKeys$
|
|
1653
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
1654
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$7(luvio, resourceParams));
|
|
1655
1655
|
}
|
|
1656
|
-
function ingestSuccess$
|
|
1656
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
1657
1657
|
const { body } = response;
|
|
1658
|
-
const key = keyBuilder$
|
|
1659
|
-
luvio.storeIngest(key, ingest$
|
|
1658
|
+
const key = keyBuilder$7(luvio, resourceParams);
|
|
1659
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
1660
1660
|
const snapshot = luvio.storeLookup({
|
|
1661
1661
|
recordId: key,
|
|
1662
|
-
node: select$
|
|
1662
|
+
node: select$6(),
|
|
1663
1663
|
variables: {},
|
|
1664
1664
|
}, snapshotRefresh);
|
|
1665
1665
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1670,19 +1670,19 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1670
1670
|
deepFreeze(snapshot.data);
|
|
1671
1671
|
return snapshot;
|
|
1672
1672
|
}
|
|
1673
|
-
function ingestError$
|
|
1674
|
-
const key = keyBuilder$
|
|
1673
|
+
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
1674
|
+
const key = keyBuilder$7(luvio, params);
|
|
1675
1675
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1676
1676
|
const storeMetadataParams = {
|
|
1677
|
-
ttl: TTL$
|
|
1677
|
+
ttl: TTL$2,
|
|
1678
1678
|
namespace: keyPrefix,
|
|
1679
|
-
version: VERSION$
|
|
1680
|
-
representationName: RepresentationType$
|
|
1679
|
+
version: VERSION$3,
|
|
1680
|
+
representationName: RepresentationType$3
|
|
1681
1681
|
};
|
|
1682
1682
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1683
1683
|
return errorSnapshot;
|
|
1684
1684
|
}
|
|
1685
|
-
function createResourceRequest$
|
|
1685
|
+
function createResourceRequest$3(config) {
|
|
1686
1686
|
const headers = {};
|
|
1687
1687
|
return {
|
|
1688
1688
|
baseUri: '/services/data/v60.0',
|
|
@@ -1696,96 +1696,96 @@ function createResourceRequest$2(config) {
|
|
|
1696
1696
|
};
|
|
1697
1697
|
}
|
|
1698
1698
|
|
|
1699
|
-
const adapterName$
|
|
1699
|
+
const adapterName$3 = 'getProductAttributesByProductId';
|
|
1700
1700
|
const getProductAttributesByProductId_ConfigPropertyMetadata = [
|
|
1701
1701
|
generateParamConfigMetadata('productId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1702
1702
|
generateParamConfigMetadata('correlationId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1703
1703
|
generateParamConfigMetadata('isPriceImpacting', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
1704
1704
|
];
|
|
1705
|
-
const getProductAttributesByProductId_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1706
|
-
const createResourceParams$
|
|
1707
|
-
function keyBuilder$
|
|
1708
|
-
const resourceParams = createResourceParams$
|
|
1709
|
-
return keyBuilder$
|
|
1705
|
+
const getProductAttributesByProductId_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getProductAttributesByProductId_ConfigPropertyMetadata);
|
|
1706
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$7(getProductAttributesByProductId_ConfigPropertyMetadata);
|
|
1707
|
+
function keyBuilder$6(luvio, config) {
|
|
1708
|
+
const resourceParams = createResourceParams$3(config);
|
|
1709
|
+
return keyBuilder$7(luvio, resourceParams);
|
|
1710
1710
|
}
|
|
1711
|
-
function typeCheckConfig$
|
|
1711
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
1712
1712
|
const config = {};
|
|
1713
|
-
typeCheckConfig$
|
|
1713
|
+
typeCheckConfig$7(untrustedConfig, config, getProductAttributesByProductId_ConfigPropertyMetadata);
|
|
1714
1714
|
return config;
|
|
1715
1715
|
}
|
|
1716
|
-
function validateAdapterConfig$
|
|
1716
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
1717
1717
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1718
1718
|
return null;
|
|
1719
1719
|
}
|
|
1720
1720
|
if (process.env.NODE_ENV !== 'production') {
|
|
1721
1721
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1722
1722
|
}
|
|
1723
|
-
const config = typeCheckConfig$
|
|
1723
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
1724
1724
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1725
1725
|
return null;
|
|
1726
1726
|
}
|
|
1727
1727
|
return config;
|
|
1728
1728
|
}
|
|
1729
|
-
function adapterFragment$
|
|
1730
|
-
createResourceParams$
|
|
1731
|
-
return select$
|
|
1729
|
+
function adapterFragment$3(luvio, config) {
|
|
1730
|
+
createResourceParams$3(config);
|
|
1731
|
+
return select$6();
|
|
1732
1732
|
}
|
|
1733
|
-
function onFetchResponseSuccess$
|
|
1734
|
-
const snapshot = ingestSuccess$
|
|
1733
|
+
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
1734
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
1735
1735
|
config,
|
|
1736
|
-
resolve: () => buildNetworkSnapshot$
|
|
1736
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1737
1737
|
});
|
|
1738
1738
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1739
1739
|
}
|
|
1740
|
-
function onFetchResponseError$
|
|
1741
|
-
const snapshot = ingestError$
|
|
1740
|
+
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
1741
|
+
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
1742
1742
|
config,
|
|
1743
|
-
resolve: () => buildNetworkSnapshot$
|
|
1743
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1744
1744
|
});
|
|
1745
1745
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1746
1746
|
}
|
|
1747
|
-
function buildNetworkSnapshot$
|
|
1748
|
-
const resourceParams = createResourceParams$
|
|
1749
|
-
const request = createResourceRequest$
|
|
1747
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
1748
|
+
const resourceParams = createResourceParams$3(config);
|
|
1749
|
+
const request = createResourceRequest$3(resourceParams);
|
|
1750
1750
|
return luvio.dispatchResourceRequest(request, options)
|
|
1751
1751
|
.then((response) => {
|
|
1752
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
1752
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
1753
1753
|
const cache = new StoreKeyMap();
|
|
1754
|
-
getResponseCacheKeys$
|
|
1754
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
1755
1755
|
return cache;
|
|
1756
1756
|
});
|
|
1757
1757
|
}, (response) => {
|
|
1758
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
1758
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
|
|
1759
1759
|
});
|
|
1760
1760
|
}
|
|
1761
|
-
function buildNetworkSnapshotCachePolicy$
|
|
1762
|
-
return buildNetworkSnapshotCachePolicy$
|
|
1761
|
+
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
1762
|
+
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
1763
1763
|
}
|
|
1764
|
-
function buildCachedSnapshotCachePolicy$
|
|
1764
|
+
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
1765
1765
|
const { luvio, config } = context;
|
|
1766
1766
|
const selector = {
|
|
1767
|
-
recordId: keyBuilder$
|
|
1768
|
-
node: adapterFragment$
|
|
1767
|
+
recordId: keyBuilder$6(luvio, config),
|
|
1768
|
+
node: adapterFragment$3(luvio, config),
|
|
1769
1769
|
variables: {},
|
|
1770
1770
|
};
|
|
1771
1771
|
const cacheSnapshot = storeLookup(selector, {
|
|
1772
1772
|
config,
|
|
1773
|
-
resolve: () => buildNetworkSnapshot$
|
|
1773
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1774
1774
|
});
|
|
1775
1775
|
return cacheSnapshot;
|
|
1776
1776
|
}
|
|
1777
1777
|
const getProductAttributesByProductIdAdapterFactory = (luvio) => function epc__getProductAttributesByProductId(untrustedConfig, requestContext) {
|
|
1778
|
-
const config = validateAdapterConfig$
|
|
1778
|
+
const config = validateAdapterConfig$3(untrustedConfig, getProductAttributesByProductId_ConfigPropertyNames);
|
|
1779
1779
|
// Invalid or incomplete config
|
|
1780
1780
|
if (config === null) {
|
|
1781
1781
|
return null;
|
|
1782
1782
|
}
|
|
1783
1783
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1784
|
-
buildCachedSnapshotCachePolicy$
|
|
1784
|
+
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
1785
1785
|
};
|
|
1786
1786
|
|
|
1787
|
-
const VERSION$
|
|
1788
|
-
function validate$
|
|
1787
|
+
const VERSION$2 = "dc3572320bc5b04b2f7f9fd7c6ee1281";
|
|
1788
|
+
function validate$8(obj, path = 'ProductsOutputRepresentation') {
|
|
1789
1789
|
const v_error = (() => {
|
|
1790
1790
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1791
1791
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1821,7 +1821,7 @@ function validate$5(obj, path = 'ProductsOutputRepresentation') {
|
|
|
1821
1821
|
if (obj.status !== undefined) {
|
|
1822
1822
|
const obj_status = obj.status;
|
|
1823
1823
|
const path_status = path + '.status';
|
|
1824
|
-
const referencepath_statusValidationError = validate$
|
|
1824
|
+
const referencepath_statusValidationError = validate$l(obj_status, path_status);
|
|
1825
1825
|
if (referencepath_statusValidationError !== null) {
|
|
1826
1826
|
let message = 'Object doesn\'t match Status (at "' + path_status + '")\n';
|
|
1827
1827
|
message += referencepath_statusValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1831,15 +1831,15 @@ function validate$5(obj, path = 'ProductsOutputRepresentation') {
|
|
|
1831
1831
|
})();
|
|
1832
1832
|
return v_error === undefined ? null : v_error;
|
|
1833
1833
|
}
|
|
1834
|
-
const RepresentationType$
|
|
1835
|
-
function normalize$
|
|
1834
|
+
const RepresentationType$2 = 'ProductsOutputRepresentation';
|
|
1835
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
1836
1836
|
const input_products = input.products;
|
|
1837
1837
|
const input_products_id = path.fullPath + '__products';
|
|
1838
1838
|
if (input_products !== undefined) {
|
|
1839
1839
|
for (let i = 0; i < input_products.length; i++) {
|
|
1840
1840
|
const input_products_item = input_products[i];
|
|
1841
1841
|
let input_products_item_id = input_products_id + '__' + i;
|
|
1842
|
-
input_products[i] = ingest$
|
|
1842
|
+
input_products[i] = ingest$3(input_products_item, {
|
|
1843
1843
|
fullPath: input_products_item_id,
|
|
1844
1844
|
propertyName: i,
|
|
1845
1845
|
parent: {
|
|
@@ -1853,11 +1853,11 @@ function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
|
1853
1853
|
}
|
|
1854
1854
|
return input;
|
|
1855
1855
|
}
|
|
1856
|
-
const select$
|
|
1857
|
-
const { selections: Status__selections, opaque: Status__opaque, } = select$
|
|
1856
|
+
const select$5 = function ProductsOutputRepresentationSelect() {
|
|
1857
|
+
const { selections: Status__selections, opaque: Status__opaque, } = select$a();
|
|
1858
1858
|
return {
|
|
1859
1859
|
kind: 'Fragment',
|
|
1860
|
-
version: VERSION$
|
|
1860
|
+
version: VERSION$2,
|
|
1861
1861
|
private: [],
|
|
1862
1862
|
selections: [
|
|
1863
1863
|
{
|
|
@@ -1875,7 +1875,7 @@ const select$3 = function ProductsOutputRepresentationSelect() {
|
|
|
1875
1875
|
kind: 'Link',
|
|
1876
1876
|
plural: true,
|
|
1877
1877
|
required: false,
|
|
1878
|
-
fragment: select$
|
|
1878
|
+
fragment: select$7()
|
|
1879
1879
|
},
|
|
1880
1880
|
{
|
|
1881
1881
|
name: 'status',
|
|
@@ -1886,7 +1886,7 @@ const select$3 = function ProductsOutputRepresentationSelect() {
|
|
|
1886
1886
|
]
|
|
1887
1887
|
};
|
|
1888
1888
|
};
|
|
1889
|
-
function equals$
|
|
1889
|
+
function equals$2(existing, incoming) {
|
|
1890
1890
|
const existing_count = existing.count;
|
|
1891
1891
|
const incoming_count = incoming.count;
|
|
1892
1892
|
// if at least one of these optionals is defined
|
|
@@ -1940,56 +1940,56 @@ function equals$1(existing, incoming) {
|
|
|
1940
1940
|
if (existing_status === undefined || incoming_status === undefined) {
|
|
1941
1941
|
return false;
|
|
1942
1942
|
}
|
|
1943
|
-
if (!(equals$
|
|
1943
|
+
if (!(equals$5(existing_status, incoming_status))) {
|
|
1944
1944
|
return false;
|
|
1945
1945
|
}
|
|
1946
1946
|
}
|
|
1947
1947
|
return true;
|
|
1948
1948
|
}
|
|
1949
|
-
const ingest$
|
|
1949
|
+
const ingest$2 = function ProductsOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1950
1950
|
if (process.env.NODE_ENV !== 'production') {
|
|
1951
|
-
const validateError = validate$
|
|
1951
|
+
const validateError = validate$8(input);
|
|
1952
1952
|
if (validateError !== null) {
|
|
1953
1953
|
throw validateError;
|
|
1954
1954
|
}
|
|
1955
1955
|
}
|
|
1956
1956
|
const key = path.fullPath;
|
|
1957
1957
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 360000;
|
|
1958
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1958
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "epc", VERSION$2, RepresentationType$2, equals$2);
|
|
1959
1959
|
return createLink(key);
|
|
1960
1960
|
};
|
|
1961
|
-
function getTypeCacheKeys$
|
|
1961
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
1962
1962
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1963
1963
|
const rootKey = fullPathFactory();
|
|
1964
1964
|
rootKeySet.set(rootKey, {
|
|
1965
1965
|
namespace: keyPrefix,
|
|
1966
|
-
representationName: RepresentationType$
|
|
1966
|
+
representationName: RepresentationType$2,
|
|
1967
1967
|
mergeable: false
|
|
1968
1968
|
});
|
|
1969
1969
|
if (input.products !== undefined) {
|
|
1970
1970
|
const input_products_length = input.products.length;
|
|
1971
1971
|
for (let i = 0; i < input_products_length; i++) {
|
|
1972
|
-
getTypeCacheKeys$
|
|
1972
|
+
getTypeCacheKeys$3(rootKeySet, luvio, input.products[i], () => '');
|
|
1973
1973
|
}
|
|
1974
1974
|
}
|
|
1975
1975
|
}
|
|
1976
1976
|
|
|
1977
|
-
function select$
|
|
1978
|
-
return select$
|
|
1977
|
+
function select$4(luvio, params) {
|
|
1978
|
+
return select$5();
|
|
1979
1979
|
}
|
|
1980
|
-
function keyBuilder$
|
|
1980
|
+
function keyBuilder$5(luvio, params) {
|
|
1981
1981
|
return keyPrefix + '::ProductsOutputRepresentation:(' + 'correlationId:' + params.queryParams.correlationId + ',' + 'productId:' + params.urlParams.productId + ')';
|
|
1982
1982
|
}
|
|
1983
|
-
function getResponseCacheKeys$
|
|
1984
|
-
getTypeCacheKeys$
|
|
1983
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
1984
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$5(luvio, resourceParams));
|
|
1985
1985
|
}
|
|
1986
|
-
function ingestSuccess$
|
|
1986
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
1987
1987
|
const { body } = response;
|
|
1988
|
-
const key = keyBuilder$
|
|
1989
|
-
luvio.storeIngest(key, ingest$
|
|
1988
|
+
const key = keyBuilder$5(luvio, resourceParams);
|
|
1989
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
1990
1990
|
const snapshot = luvio.storeLookup({
|
|
1991
1991
|
recordId: key,
|
|
1992
|
-
node: select$
|
|
1992
|
+
node: select$4(),
|
|
1993
1993
|
variables: {},
|
|
1994
1994
|
}, snapshotRefresh);
|
|
1995
1995
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2000,13 +2000,13 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
2000
2000
|
deepFreeze(snapshot.data);
|
|
2001
2001
|
return snapshot;
|
|
2002
2002
|
}
|
|
2003
|
-
function ingestError$
|
|
2004
|
-
const key = keyBuilder$
|
|
2003
|
+
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
2004
|
+
const key = keyBuilder$5(luvio, params);
|
|
2005
2005
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2006
2006
|
luvio.storeIngestError(key, errorSnapshot);
|
|
2007
2007
|
return errorSnapshot;
|
|
2008
2008
|
}
|
|
2009
|
-
function createResourceRequest$
|
|
2009
|
+
function createResourceRequest$2(config) {
|
|
2010
2010
|
const headers = {};
|
|
2011
2011
|
return {
|
|
2012
2012
|
baseUri: '/services/data/v60.0',
|
|
@@ -2020,94 +2020,94 @@ function createResourceRequest$1(config) {
|
|
|
2020
2020
|
};
|
|
2021
2021
|
}
|
|
2022
2022
|
|
|
2023
|
-
const adapterName$
|
|
2023
|
+
const adapterName$2 = 'getProductById';
|
|
2024
2024
|
const getProductById_ConfigPropertyMetadata = [
|
|
2025
2025
|
generateParamConfigMetadata('productId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2026
2026
|
generateParamConfigMetadata('correlationId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2027
2027
|
];
|
|
2028
|
-
const getProductById_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
2029
|
-
const createResourceParams$
|
|
2030
|
-
function keyBuilder$
|
|
2031
|
-
const resourceParams = createResourceParams$
|
|
2032
|
-
return keyBuilder$
|
|
2028
|
+
const getProductById_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getProductById_ConfigPropertyMetadata);
|
|
2029
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$7(getProductById_ConfigPropertyMetadata);
|
|
2030
|
+
function keyBuilder$4(luvio, config) {
|
|
2031
|
+
const resourceParams = createResourceParams$2(config);
|
|
2032
|
+
return keyBuilder$5(luvio, resourceParams);
|
|
2033
2033
|
}
|
|
2034
|
-
function typeCheckConfig$
|
|
2034
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
2035
2035
|
const config = {};
|
|
2036
|
-
typeCheckConfig$
|
|
2036
|
+
typeCheckConfig$7(untrustedConfig, config, getProductById_ConfigPropertyMetadata);
|
|
2037
2037
|
return config;
|
|
2038
2038
|
}
|
|
2039
|
-
function validateAdapterConfig$
|
|
2039
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
2040
2040
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2041
2041
|
return null;
|
|
2042
2042
|
}
|
|
2043
2043
|
if (process.env.NODE_ENV !== 'production') {
|
|
2044
2044
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2045
2045
|
}
|
|
2046
|
-
const config = typeCheckConfig$
|
|
2046
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
2047
2047
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2048
2048
|
return null;
|
|
2049
2049
|
}
|
|
2050
2050
|
return config;
|
|
2051
2051
|
}
|
|
2052
|
-
function adapterFragment$
|
|
2053
|
-
createResourceParams$
|
|
2054
|
-
return select$
|
|
2052
|
+
function adapterFragment$2(luvio, config) {
|
|
2053
|
+
createResourceParams$2(config);
|
|
2054
|
+
return select$4();
|
|
2055
2055
|
}
|
|
2056
|
-
function onFetchResponseSuccess$
|
|
2057
|
-
const snapshot = ingestSuccess$
|
|
2056
|
+
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
2057
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
2058
2058
|
config,
|
|
2059
|
-
resolve: () => buildNetworkSnapshot$
|
|
2059
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
2060
2060
|
});
|
|
2061
2061
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2062
2062
|
}
|
|
2063
|
-
function onFetchResponseError$
|
|
2064
|
-
const snapshot = ingestError$
|
|
2063
|
+
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
2064
|
+
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
2065
2065
|
config,
|
|
2066
|
-
resolve: () => buildNetworkSnapshot$
|
|
2066
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
2067
2067
|
});
|
|
2068
2068
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2069
2069
|
}
|
|
2070
|
-
function buildNetworkSnapshot$
|
|
2071
|
-
const resourceParams = createResourceParams$
|
|
2072
|
-
const request = createResourceRequest$
|
|
2070
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
2071
|
+
const resourceParams = createResourceParams$2(config);
|
|
2072
|
+
const request = createResourceRequest$2(resourceParams);
|
|
2073
2073
|
return luvio.dispatchResourceRequest(request, options)
|
|
2074
2074
|
.then((response) => {
|
|
2075
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
2075
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
2076
2076
|
const cache = new StoreKeyMap();
|
|
2077
|
-
getResponseCacheKeys$
|
|
2077
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
2078
2078
|
return cache;
|
|
2079
2079
|
});
|
|
2080
2080
|
}, (response) => {
|
|
2081
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
2081
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
|
|
2082
2082
|
});
|
|
2083
2083
|
}
|
|
2084
|
-
function buildNetworkSnapshotCachePolicy$
|
|
2085
|
-
return buildNetworkSnapshotCachePolicy$
|
|
2084
|
+
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
2085
|
+
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
2086
2086
|
}
|
|
2087
|
-
function buildCachedSnapshotCachePolicy$
|
|
2087
|
+
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
2088
2088
|
const { luvio, config } = context;
|
|
2089
2089
|
const selector = {
|
|
2090
|
-
recordId: keyBuilder$
|
|
2091
|
-
node: adapterFragment$
|
|
2090
|
+
recordId: keyBuilder$4(luvio, config),
|
|
2091
|
+
node: adapterFragment$2(luvio, config),
|
|
2092
2092
|
variables: {},
|
|
2093
2093
|
};
|
|
2094
2094
|
const cacheSnapshot = storeLookup(selector, {
|
|
2095
2095
|
config,
|
|
2096
|
-
resolve: () => buildNetworkSnapshot$
|
|
2096
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
2097
2097
|
});
|
|
2098
2098
|
return cacheSnapshot;
|
|
2099
2099
|
}
|
|
2100
2100
|
const getProductByIdAdapterFactory = (luvio) => function epc__getProductById(untrustedConfig, requestContext) {
|
|
2101
|
-
const config = validateAdapterConfig$
|
|
2101
|
+
const config = validateAdapterConfig$2(untrustedConfig, getProductById_ConfigPropertyNames);
|
|
2102
2102
|
// Invalid or incomplete config
|
|
2103
2103
|
if (config === null) {
|
|
2104
2104
|
return null;
|
|
2105
2105
|
}
|
|
2106
2106
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2107
|
-
buildCachedSnapshotCachePolicy$
|
|
2107
|
+
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
2108
2108
|
};
|
|
2109
2109
|
|
|
2110
|
-
function validate$
|
|
2110
|
+
function validate$7(obj, path = 'ContextFieldInfoOutputRepresentation') {
|
|
2111
2111
|
const v_error = (() => {
|
|
2112
2112
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2113
2113
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2158,7 +2158,7 @@ function validate$4(obj, path = 'ContextFieldInfoOutputRepresentation') {
|
|
|
2158
2158
|
return v_error === undefined ? null : v_error;
|
|
2159
2159
|
}
|
|
2160
2160
|
|
|
2161
|
-
function validate$
|
|
2161
|
+
function validate$6(obj, path = 'ContextFieldsInfoOutputRepresentation') {
|
|
2162
2162
|
const v_error = (() => {
|
|
2163
2163
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2164
2164
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2171,7 +2171,7 @@ function validate$3(obj, path = 'ContextFieldsInfoOutputRepresentation') {
|
|
|
2171
2171
|
for (let i = 0; i < obj_contextFieldsInfo.length; i++) {
|
|
2172
2172
|
const obj_contextFieldsInfo_item = obj_contextFieldsInfo[i];
|
|
2173
2173
|
const path_contextFieldsInfo_item = path_contextFieldsInfo + '[' + i + ']';
|
|
2174
|
-
const referencepath_contextFieldsInfo_itemValidationError = validate$
|
|
2174
|
+
const referencepath_contextFieldsInfo_itemValidationError = validate$7(obj_contextFieldsInfo_item, path_contextFieldsInfo_item);
|
|
2175
2175
|
if (referencepath_contextFieldsInfo_itemValidationError !== null) {
|
|
2176
2176
|
let message = 'Object doesn\'t match ContextFieldInfoOutputRepresentation (at "' + path_contextFieldsInfo_item + '")\n';
|
|
2177
2177
|
message += referencepath_contextFieldsInfo_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2182,7 +2182,7 @@ function validate$3(obj, path = 'ContextFieldsInfoOutputRepresentation') {
|
|
|
2182
2182
|
return v_error === undefined ? null : v_error;
|
|
2183
2183
|
}
|
|
2184
2184
|
|
|
2185
|
-
function validate$
|
|
2185
|
+
function validate$5(obj, path = 'ContextNodeInfoOutputRepresentation') {
|
|
2186
2186
|
const v_error = (() => {
|
|
2187
2187
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2188
2188
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2197,7 +2197,7 @@ function validate$2(obj, path = 'ContextNodeInfoOutputRepresentation') {
|
|
|
2197
2197
|
if (obj.childNodes !== undefined) {
|
|
2198
2198
|
const obj_childNodes = obj.childNodes;
|
|
2199
2199
|
const path_childNodes = path + '.childNodes';
|
|
2200
|
-
const referencepath_childNodesValidationError = validate$
|
|
2200
|
+
const referencepath_childNodesValidationError = validate$4(obj_childNodes, path_childNodes);
|
|
2201
2201
|
if (referencepath_childNodesValidationError !== null) {
|
|
2202
2202
|
let message = 'Object doesn\'t match ContextNodesInfoOutputRepresentation (at "' + path_childNodes + '")\n';
|
|
2203
2203
|
message += referencepath_childNodesValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2207,7 +2207,7 @@ function validate$2(obj, path = 'ContextNodeInfoOutputRepresentation') {
|
|
|
2207
2207
|
if (obj.fields !== undefined) {
|
|
2208
2208
|
const obj_fields = obj.fields;
|
|
2209
2209
|
const path_fields = path + '.fields';
|
|
2210
|
-
const referencepath_fieldsValidationError = validate$
|
|
2210
|
+
const referencepath_fieldsValidationError = validate$6(obj_fields, path_fields);
|
|
2211
2211
|
if (referencepath_fieldsValidationError !== null) {
|
|
2212
2212
|
let message = 'Object doesn\'t match ContextFieldsInfoOutputRepresentation (at "' + path_fields + '")\n';
|
|
2213
2213
|
message += referencepath_fieldsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2239,7 +2239,7 @@ function validate$2(obj, path = 'ContextNodeInfoOutputRepresentation') {
|
|
|
2239
2239
|
return v_error === undefined ? null : v_error;
|
|
2240
2240
|
}
|
|
2241
2241
|
|
|
2242
|
-
function validate$
|
|
2242
|
+
function validate$4(obj, path = 'ContextNodesInfoOutputRepresentation') {
|
|
2243
2243
|
const v_error = (() => {
|
|
2244
2244
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2245
2245
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2252,7 +2252,7 @@ function validate$1(obj, path = 'ContextNodesInfoOutputRepresentation') {
|
|
|
2252
2252
|
for (let i = 0; i < obj_contextNodesInfo.length; i++) {
|
|
2253
2253
|
const obj_contextNodesInfo_item = obj_contextNodesInfo[i];
|
|
2254
2254
|
const path_contextNodesInfo_item = path_contextNodesInfo + '[' + i + ']';
|
|
2255
|
-
const referencepath_contextNodesInfo_itemValidationError = validate$
|
|
2255
|
+
const referencepath_contextNodesInfo_itemValidationError = validate$5(obj_contextNodesInfo_item, path_contextNodesInfo_item);
|
|
2256
2256
|
if (referencepath_contextNodesInfo_itemValidationError !== null) {
|
|
2257
2257
|
let message = 'Object doesn\'t match ContextNodeInfoOutputRepresentation (at "' + path_contextNodesInfo_item + '")\n';
|
|
2258
2258
|
message += referencepath_contextNodesInfo_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2263,13 +2263,300 @@ function validate$1(obj, path = 'ContextNodesInfoOutputRepresentation') {
|
|
|
2263
2263
|
return v_error === undefined ? null : v_error;
|
|
2264
2264
|
}
|
|
2265
2265
|
|
|
2266
|
+
const TTL$1 = 6000;
|
|
2267
|
+
const VERSION$1 = "0e533503a3df0b0f709f7ff83f175d06";
|
|
2268
|
+
function validate$3(obj, path = 'ContextDefinitionOutputRepresentation') {
|
|
2269
|
+
const v_error = (() => {
|
|
2270
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2271
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2272
|
+
}
|
|
2273
|
+
if (obj.contextDefinitionId !== undefined) {
|
|
2274
|
+
const obj_contextDefinitionId = obj.contextDefinitionId;
|
|
2275
|
+
const path_contextDefinitionId = path + '.contextDefinitionId';
|
|
2276
|
+
if (typeof obj_contextDefinitionId !== 'string') {
|
|
2277
|
+
return new TypeError('Expected "string" but received "' + typeof obj_contextDefinitionId + '" (at "' + path_contextDefinitionId + '")');
|
|
2278
|
+
}
|
|
2279
|
+
}
|
|
2280
|
+
if (obj.contextDefinitionName !== undefined) {
|
|
2281
|
+
const obj_contextDefinitionName = obj.contextDefinitionName;
|
|
2282
|
+
const path_contextDefinitionName = path + '.contextDefinitionName';
|
|
2283
|
+
if (typeof obj_contextDefinitionName !== 'string') {
|
|
2284
|
+
return new TypeError('Expected "string" but received "' + typeof obj_contextDefinitionName + '" (at "' + path_contextDefinitionName + '")');
|
|
2285
|
+
}
|
|
2286
|
+
}
|
|
2287
|
+
if (obj.contextNodes !== undefined) {
|
|
2288
|
+
const obj_contextNodes = obj.contextNodes;
|
|
2289
|
+
const path_contextNodes = path + '.contextNodes';
|
|
2290
|
+
const referencepath_contextNodesValidationError = validate$4(obj_contextNodes, path_contextNodes);
|
|
2291
|
+
if (referencepath_contextNodesValidationError !== null) {
|
|
2292
|
+
let message = 'Object doesn\'t match ContextNodesInfoOutputRepresentation (at "' + path_contextNodes + '")\n';
|
|
2293
|
+
message += referencepath_contextNodesValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2294
|
+
return new TypeError(message);
|
|
2295
|
+
}
|
|
2296
|
+
}
|
|
2297
|
+
if (obj.correlationId !== undefined) {
|
|
2298
|
+
const obj_correlationId = obj.correlationId;
|
|
2299
|
+
const path_correlationId = path + '.correlationId';
|
|
2300
|
+
if (typeof obj_correlationId !== 'string') {
|
|
2301
|
+
return new TypeError('Expected "string" but received "' + typeof obj_correlationId + '" (at "' + path_correlationId + '")');
|
|
2302
|
+
}
|
|
2303
|
+
}
|
|
2304
|
+
if (obj.status !== undefined) {
|
|
2305
|
+
const obj_status = obj.status;
|
|
2306
|
+
const path_status = path + '.status';
|
|
2307
|
+
const referencepath_statusValidationError = validate$l(obj_status, path_status);
|
|
2308
|
+
if (referencepath_statusValidationError !== null) {
|
|
2309
|
+
let message = 'Object doesn\'t match Status (at "' + path_status + '")\n';
|
|
2310
|
+
message += referencepath_statusValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2311
|
+
return new TypeError(message);
|
|
2312
|
+
}
|
|
2313
|
+
}
|
|
2314
|
+
})();
|
|
2315
|
+
return v_error === undefined ? null : v_error;
|
|
2316
|
+
}
|
|
2317
|
+
const RepresentationType$1 = 'ContextDefinitionOutputRepresentation';
|
|
2318
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
2319
|
+
return input;
|
|
2320
|
+
}
|
|
2321
|
+
const select$3 = function ContextDefinitionOutputRepresentationSelect() {
|
|
2322
|
+
return {
|
|
2323
|
+
kind: 'Fragment',
|
|
2324
|
+
version: VERSION$1,
|
|
2325
|
+
private: [],
|
|
2326
|
+
opaque: true
|
|
2327
|
+
};
|
|
2328
|
+
};
|
|
2329
|
+
function equals$1(existing, incoming) {
|
|
2330
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
2331
|
+
return false;
|
|
2332
|
+
}
|
|
2333
|
+
return true;
|
|
2334
|
+
}
|
|
2335
|
+
const ingest$1 = function ContextDefinitionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2336
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2337
|
+
const validateError = validate$3(input);
|
|
2338
|
+
if (validateError !== null) {
|
|
2339
|
+
throw validateError;
|
|
2340
|
+
}
|
|
2341
|
+
}
|
|
2342
|
+
const key = path.fullPath;
|
|
2343
|
+
const ttlToUse = TTL$1;
|
|
2344
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "epc", VERSION$1, RepresentationType$1, equals$1);
|
|
2345
|
+
return createLink(key);
|
|
2346
|
+
};
|
|
2347
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
2348
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2349
|
+
const rootKey = fullPathFactory();
|
|
2350
|
+
rootKeySet.set(rootKey, {
|
|
2351
|
+
namespace: keyPrefix,
|
|
2352
|
+
representationName: RepresentationType$1,
|
|
2353
|
+
mergeable: false
|
|
2354
|
+
});
|
|
2355
|
+
}
|
|
2356
|
+
|
|
2357
|
+
function select$2(luvio, params) {
|
|
2358
|
+
return select$3();
|
|
2359
|
+
}
|
|
2360
|
+
function keyBuilder$3(luvio, params) {
|
|
2361
|
+
return keyPrefix + '::ContextDefinitionOutputRepresentation:(' + 'correlationId:' + params.queryParams.correlationId + ',' + 'contextDefinitionId:' + params.urlParams.contextDefinitionId + ')';
|
|
2362
|
+
}
|
|
2363
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
2364
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
|
|
2365
|
+
}
|
|
2366
|
+
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
2367
|
+
const { body } = response;
|
|
2368
|
+
const key = keyBuilder$3(luvio, resourceParams);
|
|
2369
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
2370
|
+
const snapshot = luvio.storeLookup({
|
|
2371
|
+
recordId: key,
|
|
2372
|
+
node: select$2(),
|
|
2373
|
+
variables: {},
|
|
2374
|
+
}, snapshotRefresh);
|
|
2375
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2376
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
2377
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
2378
|
+
}
|
|
2379
|
+
}
|
|
2380
|
+
deepFreeze(snapshot.data);
|
|
2381
|
+
return snapshot;
|
|
2382
|
+
}
|
|
2383
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
2384
|
+
const key = keyBuilder$3(luvio, params);
|
|
2385
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2386
|
+
const storeMetadataParams = {
|
|
2387
|
+
ttl: TTL$1,
|
|
2388
|
+
namespace: keyPrefix,
|
|
2389
|
+
version: VERSION$1,
|
|
2390
|
+
representationName: RepresentationType$1
|
|
2391
|
+
};
|
|
2392
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
2393
|
+
return errorSnapshot;
|
|
2394
|
+
}
|
|
2395
|
+
function createResourceRequest$1(config) {
|
|
2396
|
+
const headers = {};
|
|
2397
|
+
return {
|
|
2398
|
+
baseUri: '/services/data/v60.0',
|
|
2399
|
+
basePath: '/connect/pcm/configurationRule/context-definition/' + config.urlParams.contextDefinitionId + '',
|
|
2400
|
+
method: 'get',
|
|
2401
|
+
body: null,
|
|
2402
|
+
urlParams: config.urlParams,
|
|
2403
|
+
queryParams: config.queryParams,
|
|
2404
|
+
headers,
|
|
2405
|
+
priority: 'normal',
|
|
2406
|
+
};
|
|
2407
|
+
}
|
|
2408
|
+
|
|
2409
|
+
const adapterName$1 = 'getContextDefinitionInfoById';
|
|
2410
|
+
const getContextDefinitionInfoById_ConfigPropertyMetadata = [
|
|
2411
|
+
generateParamConfigMetadata('contextDefinitionId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2412
|
+
generateParamConfigMetadata('correlationId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2413
|
+
];
|
|
2414
|
+
const getContextDefinitionInfoById_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getContextDefinitionInfoById_ConfigPropertyMetadata);
|
|
2415
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$7(getContextDefinitionInfoById_ConfigPropertyMetadata);
|
|
2416
|
+
function keyBuilder$2(luvio, config) {
|
|
2417
|
+
const resourceParams = createResourceParams$1(config);
|
|
2418
|
+
return keyBuilder$3(luvio, resourceParams);
|
|
2419
|
+
}
|
|
2420
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
2421
|
+
const config = {};
|
|
2422
|
+
typeCheckConfig$7(untrustedConfig, config, getContextDefinitionInfoById_ConfigPropertyMetadata);
|
|
2423
|
+
return config;
|
|
2424
|
+
}
|
|
2425
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
2426
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
2427
|
+
return null;
|
|
2428
|
+
}
|
|
2429
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2430
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
2431
|
+
}
|
|
2432
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
2433
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2434
|
+
return null;
|
|
2435
|
+
}
|
|
2436
|
+
return config;
|
|
2437
|
+
}
|
|
2438
|
+
function adapterFragment$1(luvio, config) {
|
|
2439
|
+
createResourceParams$1(config);
|
|
2440
|
+
return select$2();
|
|
2441
|
+
}
|
|
2442
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
2443
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
|
|
2444
|
+
config,
|
|
2445
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
2446
|
+
});
|
|
2447
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2448
|
+
}
|
|
2449
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
2450
|
+
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
2451
|
+
config,
|
|
2452
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
2453
|
+
});
|
|
2454
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2455
|
+
}
|
|
2456
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
2457
|
+
const resourceParams = createResourceParams$1(config);
|
|
2458
|
+
const request = createResourceRequest$1(resourceParams);
|
|
2459
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
2460
|
+
.then((response) => {
|
|
2461
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
2462
|
+
const cache = new StoreKeyMap();
|
|
2463
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
2464
|
+
return cache;
|
|
2465
|
+
});
|
|
2466
|
+
}, (response) => {
|
|
2467
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
2468
|
+
});
|
|
2469
|
+
}
|
|
2470
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
2471
|
+
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
2472
|
+
}
|
|
2473
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
2474
|
+
const { luvio, config } = context;
|
|
2475
|
+
const selector = {
|
|
2476
|
+
recordId: keyBuilder$2(luvio, config),
|
|
2477
|
+
node: adapterFragment$1(luvio, config),
|
|
2478
|
+
variables: {},
|
|
2479
|
+
};
|
|
2480
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
2481
|
+
config,
|
|
2482
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
2483
|
+
});
|
|
2484
|
+
return cacheSnapshot;
|
|
2485
|
+
}
|
|
2486
|
+
const getContextDefinitionInfoByIdAdapterFactory = (luvio) => function epc__getContextDefinitionInfoById(untrustedConfig, requestContext) {
|
|
2487
|
+
const config = validateAdapterConfig$1(untrustedConfig, getContextDefinitionInfoById_ConfigPropertyNames);
|
|
2488
|
+
// Invalid or incomplete config
|
|
2489
|
+
if (config === null) {
|
|
2490
|
+
return null;
|
|
2491
|
+
}
|
|
2492
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2493
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
2494
|
+
};
|
|
2495
|
+
|
|
2496
|
+
function validate$2(obj, path = 'ConfigRuleHashColumnInfoOutputRepresentation') {
|
|
2497
|
+
const v_error = (() => {
|
|
2498
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2499
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2500
|
+
}
|
|
2501
|
+
if (obj.datatype !== undefined) {
|
|
2502
|
+
const obj_datatype = obj.datatype;
|
|
2503
|
+
const path_datatype = path + '.datatype';
|
|
2504
|
+
if (typeof obj_datatype !== 'string') {
|
|
2505
|
+
return new TypeError('Expected "string" but received "' + typeof obj_datatype + '" (at "' + path_datatype + '")');
|
|
2506
|
+
}
|
|
2507
|
+
}
|
|
2508
|
+
if (obj.title !== undefined) {
|
|
2509
|
+
const obj_title = obj.title;
|
|
2510
|
+
const path_title = path + '.title';
|
|
2511
|
+
if (typeof obj_title !== 'string') {
|
|
2512
|
+
return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
|
|
2513
|
+
}
|
|
2514
|
+
}
|
|
2515
|
+
})();
|
|
2516
|
+
return v_error === undefined ? null : v_error;
|
|
2517
|
+
}
|
|
2518
|
+
|
|
2519
|
+
function validate$1(obj, path = 'ConfigRuleHashColumnsInfoOutputRepresentation') {
|
|
2520
|
+
const v_error = (() => {
|
|
2521
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2522
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2523
|
+
}
|
|
2524
|
+
const obj_configRuleHashColumnsInfo = obj.configRuleHashColumnsInfo;
|
|
2525
|
+
const path_configRuleHashColumnsInfo = path + '.configRuleHashColumnsInfo';
|
|
2526
|
+
if (!ArrayIsArray(obj_configRuleHashColumnsInfo)) {
|
|
2527
|
+
return new TypeError('Expected "array" but received "' + typeof obj_configRuleHashColumnsInfo + '" (at "' + path_configRuleHashColumnsInfo + '")');
|
|
2528
|
+
}
|
|
2529
|
+
for (let i = 0; i < obj_configRuleHashColumnsInfo.length; i++) {
|
|
2530
|
+
const obj_configRuleHashColumnsInfo_item = obj_configRuleHashColumnsInfo[i];
|
|
2531
|
+
const path_configRuleHashColumnsInfo_item = path_configRuleHashColumnsInfo + '[' + i + ']';
|
|
2532
|
+
const referencepath_configRuleHashColumnsInfo_itemValidationError = validate$2(obj_configRuleHashColumnsInfo_item, path_configRuleHashColumnsInfo_item);
|
|
2533
|
+
if (referencepath_configRuleHashColumnsInfo_itemValidationError !== null) {
|
|
2534
|
+
let message = 'Object doesn\'t match ConfigRuleHashColumnInfoOutputRepresentation (at "' + path_configRuleHashColumnsInfo_item + '")\n';
|
|
2535
|
+
message += referencepath_configRuleHashColumnsInfo_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2536
|
+
return new TypeError(message);
|
|
2537
|
+
}
|
|
2538
|
+
}
|
|
2539
|
+
})();
|
|
2540
|
+
return v_error === undefined ? null : v_error;
|
|
2541
|
+
}
|
|
2542
|
+
|
|
2266
2543
|
const TTL = 6000;
|
|
2267
|
-
const VERSION = "
|
|
2268
|
-
function validate(obj, path = '
|
|
2544
|
+
const VERSION = "a6f17b790f912a982a35bff584a89eb6";
|
|
2545
|
+
function validate(obj, path = 'ConfigRuleMetadataOutputRepresentation') {
|
|
2269
2546
|
const v_error = (() => {
|
|
2270
2547
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2271
2548
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2272
2549
|
}
|
|
2550
|
+
if (obj.configRuleHashColumns !== undefined) {
|
|
2551
|
+
const obj_configRuleHashColumns = obj.configRuleHashColumns;
|
|
2552
|
+
const path_configRuleHashColumns = path + '.configRuleHashColumns';
|
|
2553
|
+
const referencepath_configRuleHashColumnsValidationError = validate$1(obj_configRuleHashColumns, path_configRuleHashColumns);
|
|
2554
|
+
if (referencepath_configRuleHashColumnsValidationError !== null) {
|
|
2555
|
+
let message = 'Object doesn\'t match ConfigRuleHashColumnsInfoOutputRepresentation (at "' + path_configRuleHashColumns + '")\n';
|
|
2556
|
+
message += referencepath_configRuleHashColumnsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2557
|
+
return new TypeError(message);
|
|
2558
|
+
}
|
|
2559
|
+
}
|
|
2273
2560
|
if (obj.contextDefinitionId !== undefined) {
|
|
2274
2561
|
const obj_contextDefinitionId = obj.contextDefinitionId;
|
|
2275
2562
|
const path_contextDefinitionId = path + '.contextDefinitionId';
|
|
@@ -2287,7 +2574,7 @@ function validate(obj, path = 'ContextDefinitionOutputRepresentation') {
|
|
|
2287
2574
|
if (obj.contextNodes !== undefined) {
|
|
2288
2575
|
const obj_contextNodes = obj.contextNodes;
|
|
2289
2576
|
const path_contextNodes = path + '.contextNodes';
|
|
2290
|
-
const referencepath_contextNodesValidationError = validate$
|
|
2577
|
+
const referencepath_contextNodesValidationError = validate$4(obj_contextNodes, path_contextNodes);
|
|
2291
2578
|
if (referencepath_contextNodesValidationError !== null) {
|
|
2292
2579
|
let message = 'Object doesn\'t match ContextNodesInfoOutputRepresentation (at "' + path_contextNodes + '")\n';
|
|
2293
2580
|
message += referencepath_contextNodesValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2304,7 +2591,7 @@ function validate(obj, path = 'ContextDefinitionOutputRepresentation') {
|
|
|
2304
2591
|
if (obj.status !== undefined) {
|
|
2305
2592
|
const obj_status = obj.status;
|
|
2306
2593
|
const path_status = path + '.status';
|
|
2307
|
-
const referencepath_statusValidationError = validate$
|
|
2594
|
+
const referencepath_statusValidationError = validate$l(obj_status, path_status);
|
|
2308
2595
|
if (referencepath_statusValidationError !== null) {
|
|
2309
2596
|
let message = 'Object doesn\'t match Status (at "' + path_status + '")\n';
|
|
2310
2597
|
message += referencepath_statusValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2314,11 +2601,11 @@ function validate(obj, path = 'ContextDefinitionOutputRepresentation') {
|
|
|
2314
2601
|
})();
|
|
2315
2602
|
return v_error === undefined ? null : v_error;
|
|
2316
2603
|
}
|
|
2317
|
-
const RepresentationType = '
|
|
2604
|
+
const RepresentationType = 'ConfigRuleMetadataOutputRepresentation';
|
|
2318
2605
|
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
2319
2606
|
return input;
|
|
2320
2607
|
}
|
|
2321
|
-
const select$1 = function
|
|
2608
|
+
const select$1 = function ConfigRuleMetadataOutputRepresentationSelect() {
|
|
2322
2609
|
return {
|
|
2323
2610
|
kind: 'Fragment',
|
|
2324
2611
|
version: VERSION,
|
|
@@ -2332,7 +2619,7 @@ function equals(existing, incoming) {
|
|
|
2332
2619
|
}
|
|
2333
2620
|
return true;
|
|
2334
2621
|
}
|
|
2335
|
-
const ingest = function
|
|
2622
|
+
const ingest = function ConfigRuleMetadataOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2336
2623
|
if (process.env.NODE_ENV !== 'production') {
|
|
2337
2624
|
const validateError = validate(input);
|
|
2338
2625
|
if (validateError !== null) {
|
|
@@ -2358,7 +2645,7 @@ function select(luvio, params) {
|
|
|
2358
2645
|
return select$1();
|
|
2359
2646
|
}
|
|
2360
2647
|
function keyBuilder$1(luvio, params) {
|
|
2361
|
-
return keyPrefix + '::
|
|
2648
|
+
return keyPrefix + '::ConfigRuleMetadataOutputRepresentation:(' + 'correlationId:' + params.queryParams.correlationId + ',' + 'usageType:' + params.urlParams.usageType + ',' + 'usageSubType:' + params.urlParams.usageSubType + ')';
|
|
2362
2649
|
}
|
|
2363
2650
|
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
2364
2651
|
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
@@ -2396,7 +2683,7 @@ function createResourceRequest(config) {
|
|
|
2396
2683
|
const headers = {};
|
|
2397
2684
|
return {
|
|
2398
2685
|
baseUri: '/services/data/v60.0',
|
|
2399
|
-
basePath: '/connect/pcm/configurationRule/
|
|
2686
|
+
basePath: '/connect/pcm/configurationRule/config-rule-metadata/' + config.urlParams.usageType + '/' + config.urlParams.usageSubType + '',
|
|
2400
2687
|
method: 'get',
|
|
2401
2688
|
body: null,
|
|
2402
2689
|
urlParams: config.urlParams,
|
|
@@ -2406,20 +2693,21 @@ function createResourceRequest(config) {
|
|
|
2406
2693
|
};
|
|
2407
2694
|
}
|
|
2408
2695
|
|
|
2409
|
-
const adapterName = '
|
|
2410
|
-
const
|
|
2411
|
-
generateParamConfigMetadata('
|
|
2696
|
+
const adapterName = 'getConfigRuleMetadata';
|
|
2697
|
+
const getConfigRuleMetadata_ConfigPropertyMetadata = [
|
|
2698
|
+
generateParamConfigMetadata('usageType', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2699
|
+
generateParamConfigMetadata('usageSubType', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2412
2700
|
generateParamConfigMetadata('correlationId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2413
2701
|
];
|
|
2414
|
-
const
|
|
2415
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
2702
|
+
const getConfigRuleMetadata_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getConfigRuleMetadata_ConfigPropertyMetadata);
|
|
2703
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$7(getConfigRuleMetadata_ConfigPropertyMetadata);
|
|
2416
2704
|
function keyBuilder(luvio, config) {
|
|
2417
2705
|
const resourceParams = createResourceParams(config);
|
|
2418
2706
|
return keyBuilder$1(luvio, resourceParams);
|
|
2419
2707
|
}
|
|
2420
2708
|
function typeCheckConfig(untrustedConfig) {
|
|
2421
2709
|
const config = {};
|
|
2422
|
-
typeCheckConfig$
|
|
2710
|
+
typeCheckConfig$7(untrustedConfig, config, getConfigRuleMetadata_ConfigPropertyMetadata);
|
|
2423
2711
|
return config;
|
|
2424
2712
|
}
|
|
2425
2713
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
@@ -2468,7 +2756,7 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
2468
2756
|
});
|
|
2469
2757
|
}
|
|
2470
2758
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
2471
|
-
return buildNetworkSnapshotCachePolicy$
|
|
2759
|
+
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
2472
2760
|
}
|
|
2473
2761
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
2474
2762
|
const { luvio, config } = context;
|
|
@@ -2483,8 +2771,8 @@ function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
|
2483
2771
|
});
|
|
2484
2772
|
return cacheSnapshot;
|
|
2485
2773
|
}
|
|
2486
|
-
const
|
|
2487
|
-
const config = validateAdapterConfig(untrustedConfig,
|
|
2774
|
+
const getConfigRuleMetadataAdapterFactory = (luvio) => function epc__getConfigRuleMetadata(untrustedConfig, requestContext) {
|
|
2775
|
+
const config = validateAdapterConfig(untrustedConfig, getConfigRuleMetadata_ConfigPropertyNames);
|
|
2488
2776
|
// Invalid or incomplete config
|
|
2489
2777
|
if (config === null) {
|
|
2490
2778
|
return null;
|
|
@@ -2493,4 +2781,4 @@ const getContextDefinitionInfoByIdAdapterFactory = (luvio) => function epc__getC
|
|
|
2493
2781
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
2494
2782
|
};
|
|
2495
2783
|
|
|
2496
|
-
export { createProductAttributeDefinitionAdapterFactory, deactivateAdapterFactory, getContextDefinitionInfoByIdAdapterFactory, getProductAttributesByProductIdAdapterFactory, getProductByIdAdapterFactory, getProductFlowByProductIdAdapterFactory };
|
|
2784
|
+
export { createProductAttributeDefinitionAdapterFactory, deactivateAdapterFactory, getConfigRuleMetadataAdapterFactory, getContextDefinitionInfoByIdAdapterFactory, getProductAttributesByProductIdAdapterFactory, getProductByIdAdapterFactory, getProductFlowByProductIdAdapterFactory };
|