@salesforce/lds-adapters-industries-epc 1.245.0 → 1.247.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/dist/es/es2018/industries-epc.js +660 -274
  2. package/dist/es/es2018/types/src/generated/adapters/createProductAttributeDefinition.d.ts +2 -2
  3. package/dist/es/es2018/types/src/generated/adapters/deactivate.d.ts +2 -2
  4. package/dist/es/es2018/types/src/generated/adapters/getContextDefinitionInfoById.d.ts +28 -0
  5. package/dist/es/es2018/types/src/generated/adapters/getProductAttributesByProductId.d.ts +4 -4
  6. package/dist/es/es2018/types/src/generated/adapters/getProductById.d.ts +4 -4
  7. package/dist/es/es2018/types/src/generated/adapters/getProductFlowByProductId.d.ts +4 -4
  8. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +1 -0
  9. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +3 -1
  10. package/dist/es/es2018/types/src/generated/resources/getConnectPcmConfigurationRuleContextDefinitionByContextDefinitionId.d.ts +18 -0
  11. package/dist/es/es2018/types/src/generated/types/ContextDefinitionOutputRepresentation.d.ts +42 -0
  12. package/dist/es/es2018/types/src/generated/types/ContextFieldInfoOutputRepresentation.d.ts +43 -0
  13. package/dist/es/es2018/types/src/generated/types/ContextFieldsInfoOutputRepresentation.d.ts +29 -0
  14. package/dist/es/es2018/types/src/generated/types/ContextNodeInfoOutputRepresentation.d.ts +44 -0
  15. package/dist/es/es2018/types/src/generated/types/ContextNodesInfoOutputRepresentation.d.ts +29 -0
  16. package/package.json +10 -6
  17. package/sfdc/index.js +606 -212
  18. package/src/raml/api.raml +114 -1
  19. package/src/raml/luvio.raml +8 -1
  20. /package/dist/es/es2018/types/src/generated/resources/{getConnectEpcProductAttributesByProductId.d.ts → getConnectPcmProductAttributesByProductId.d.ts} +0 -0
  21. /package/dist/es/es2018/types/src/generated/resources/{getConnectEpcProductsByProductId.d.ts → getConnectPcmProductsByProductId.d.ts} +0 -0
  22. /package/dist/es/es2018/types/src/generated/resources/{getConnectEpcProductsFlowByProductId.d.ts → getConnectPcmProductsFlowByProductId.d.ts} +0 -0
  23. /package/dist/es/es2018/types/src/generated/resources/{patchConnectEpcActionsDeactivate.d.ts → patchConnectPcmActionsDeactivate.d.ts} +0 -0
  24. /package/dist/es/es2018/types/src/generated/resources/{postConnectEpcProductAttributeDefinition.d.ts → postConnectPcmProductAttributeDefinition.d.ts} +0 -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$5, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$3, typeCheckConfig as typeCheckConfig$5 } from '@luvio/engine';
7
+ import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$6, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$4, typeCheckConfig as typeCheckConfig$6 } 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$k(obj, path = 'DeactivateInputRepresentation') {
95
+ function validate$p(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$k(obj, path = 'DeactivateInputRepresentation') {
125
125
  return v_error === undefined ? null : v_error;
126
126
  }
127
127
 
128
- function validate$j(obj, path = 'ErrorOutputRepresentation') {
128
+ function validate$o(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$j(obj, path = 'ErrorOutputRepresentation') {
156
156
  return v_error === undefined ? null : v_error;
157
157
  }
158
158
 
159
- const TTL$3 = 6000;
160
- const VERSION$5 = "67abdeaa299bae24f468fd2e78cd1e1e";
161
- function validate$i(obj, path = 'RecordIdMapOutputRepresentation') {
159
+ const TTL$4 = 6000;
160
+ const VERSION$6 = "67abdeaa299bae24f468fd2e78cd1e1e";
161
+ function validate$n(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$i(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$j(obj_errors_item, path_errors_item);
174
+ const referencepath_errors_itemValidationError = validate$o(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$i(obj, path = 'RecordIdMapOutputRepresentation') {
186
186
  })();
187
187
  return v_error === undefined ? null : v_error;
188
188
  }
189
- const RepresentationType$4 = 'RecordIdMapOutputRepresentation';
190
- function keyBuilder$7(luvio, config) {
191
- return keyPrefix + '::' + RepresentationType$4 + ':' + config.message;
189
+ const RepresentationType$5 = 'RecordIdMapOutputRepresentation';
190
+ function keyBuilder$9(luvio, config) {
191
+ return keyPrefix + '::' + RepresentationType$5 + ':' + 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$7(luvio, keyParams);
197
+ return keyBuilder$9(luvio, keyParams);
198
198
  }
199
- function normalize$4(input, existing, path, luvio, store, timestamp) {
199
+ function normalize$5(input, existing, path, luvio, store, timestamp) {
200
200
  return input;
201
201
  }
202
- const select$a = function RecordIdMapOutputRepresentationSelect() {
202
+ const select$c = function RecordIdMapOutputRepresentationSelect() {
203
203
  return {
204
204
  kind: 'Fragment',
205
- version: VERSION$5,
205
+ version: VERSION$6,
206
206
  private: [],
207
207
  opaque: true
208
208
  };
209
209
  };
210
- function equals$5(existing, incoming) {
210
+ function equals$6(existing, incoming) {
211
211
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
212
212
  return false;
213
213
  }
214
214
  return true;
215
215
  }
216
- const ingest$4 = function RecordIdMapOutputRepresentationIngest(input, path, luvio, store, timestamp) {
216
+ const ingest$5 = function RecordIdMapOutputRepresentationIngest(input, path, luvio, store, timestamp) {
217
217
  if (process.env.NODE_ENV !== 'production') {
218
- const validateError = validate$i(input);
218
+ const validateError = validate$n(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$3;
225
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "epc", VERSION$5, RepresentationType$4, equals$5);
224
+ const ttlToUse = TTL$4;
225
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "epc", VERSION$6, RepresentationType$5, equals$6);
226
226
  return createLink(key);
227
227
  };
228
- function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
228
+ function getTypeCacheKeys$5(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$4,
233
+ representationName: RepresentationType$5,
234
234
  mergeable: false
235
235
  });
236
236
  }
237
237
 
238
- function select$9(luvio, params) {
239
- return select$a();
238
+ function select$b(luvio, params) {
239
+ return select$c();
240
240
  }
241
- function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
242
- getTypeCacheKeys$4(storeKeyMap, luvio, response);
241
+ function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
242
+ getTypeCacheKeys$5(storeKeyMap, luvio, response);
243
243
  }
244
- function ingestSuccess$4(luvio, resourceParams, response) {
244
+ function ingestSuccess$5(luvio, resourceParams, response) {
245
245
  const { body } = response;
246
246
  const key = keyBuilderFromType$1(luvio, body);
247
- luvio.storeIngest(key, ingest$4, body);
247
+ luvio.storeIngest(key, ingest$5, body);
248
248
  const snapshot = luvio.storeLookup({
249
249
  recordId: key,
250
- node: select$9(),
250
+ node: select$b(),
251
251
  variables: {},
252
252
  });
253
253
  if (process.env.NODE_ENV !== 'production') {
@@ -258,11 +258,11 @@ function ingestSuccess$4(luvio, resourceParams, response) {
258
258
  deepFreeze(snapshot.data);
259
259
  return snapshot;
260
260
  }
261
- function createResourceRequest$4(config) {
261
+ function createResourceRequest$5(config) {
262
262
  const headers = {};
263
263
  return {
264
264
  baseUri: '/services/data/v60.0',
265
- basePath: '/connect/epc/actions/deactivate',
265
+ basePath: '/connect/pcm/actions/deactivate',
266
266
  method: 'patch',
267
267
  body: config.body,
268
268
  urlParams: {},
@@ -272,45 +272,45 @@ function createResourceRequest$4(config) {
272
272
  };
273
273
  }
274
274
 
275
- const adapterName$4 = 'deactivate';
275
+ const adapterName$5 = 'deactivate';
276
276
  const deactivate_ConfigPropertyMetadata = [
277
277
  generateParamConfigMetadata('deactivateInputPayload', true, 2 /* Body */, 4 /* Unsupported */),
278
278
  ];
279
- const deactivate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, deactivate_ConfigPropertyMetadata);
280
- const createResourceParams$4 = /*#__PURE__*/ createResourceParams$5(deactivate_ConfigPropertyMetadata);
281
- function typeCheckConfig$4(untrustedConfig) {
279
+ const deactivate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, deactivate_ConfigPropertyMetadata);
280
+ const createResourceParams$5 = /*#__PURE__*/ createResourceParams$6(deactivate_ConfigPropertyMetadata);
281
+ function typeCheckConfig$5(untrustedConfig) {
282
282
  const config = {};
283
283
  const untrustedConfig_deactivateInputPayload = untrustedConfig.deactivateInputPayload;
284
- const referenceDeactivateInputRepresentationValidationError = validate$k(untrustedConfig_deactivateInputPayload);
284
+ const referenceDeactivateInputRepresentationValidationError = validate$p(untrustedConfig_deactivateInputPayload);
285
285
  if (referenceDeactivateInputRepresentationValidationError === null) {
286
286
  config.deactivateInputPayload = untrustedConfig_deactivateInputPayload;
287
287
  }
288
288
  return config;
289
289
  }
290
- function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
290
+ function validateAdapterConfig$5(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$4(untrustedConfig);
297
+ const config = typeCheckConfig$5(untrustedConfig);
298
298
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
299
299
  return null;
300
300
  }
301
301
  return config;
302
302
  }
303
- function buildNetworkSnapshot$4(luvio, config, options) {
304
- const resourceParams = createResourceParams$4(config);
305
- const request = createResourceRequest$4(resourceParams);
303
+ function buildNetworkSnapshot$5(luvio, config, options) {
304
+ const resourceParams = createResourceParams$5(config);
305
+ const request = createResourceRequest$5(resourceParams);
306
306
  return luvio.dispatchResourceRequest(request, options)
307
307
  .then((response) => {
308
308
  return luvio.handleSuccessResponse(() => {
309
- const snapshot = ingestSuccess$4(luvio, resourceParams, response);
309
+ const snapshot = ingestSuccess$5(luvio, resourceParams, response);
310
310
  return luvio.storeBroadcast().then(() => snapshot);
311
311
  }, () => {
312
312
  const cache = new StoreKeyMap();
313
- getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
313
+ getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
314
314
  return cache;
315
315
  });
316
316
  }, (response) => {
@@ -320,16 +320,16 @@ function buildNetworkSnapshot$4(luvio, config, options) {
320
320
  }
321
321
  const deactivateAdapterFactory = (luvio) => {
322
322
  return function deactivate(untrustedConfig) {
323
- const config = validateAdapterConfig$4(untrustedConfig, deactivate_ConfigPropertyNames);
323
+ const config = validateAdapterConfig$5(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$4(luvio, config);
328
+ return buildNetworkSnapshot$5(luvio, config);
329
329
  };
330
330
  };
331
331
 
332
- function validate$h(obj, path = 'ProductAttributeDefinitionListInputRepresentation') {
332
+ function validate$m(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$h(obj, path = 'ProductAttributeDefinitionListInputRepresentati
350
350
  return v_error === undefined ? null : v_error;
351
351
  }
352
352
 
353
- function validate$g(obj, path = 'ProductAttributeDefinitionRepresentation') {
353
+ function validate$l(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$g(obj, path = 'ProductAttributeDefinitionRepresentation') {
373
373
  return v_error === undefined ? null : v_error;
374
374
  }
375
375
 
376
- const TTL$2 = 6000;
377
- const VERSION$4 = "e67d3c8569b9667eac98cc1a9840041c";
378
- function validate$f(obj, path = 'ProductAttributeDefinitionListRepresentation') {
376
+ const TTL$3 = 6000;
377
+ const VERSION$5 = "e67d3c8569b9667eac98cc1a9840041c";
378
+ function validate$k(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$f(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$g(obj_data_item, path_data_item);
391
+ const referencepath_data_itemValidationError = validate$l(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$f(obj, path = 'ProductAttributeDefinitionListRepresentation')
403
403
  })();
404
404
  return v_error === undefined ? null : v_error;
405
405
  }
406
- const RepresentationType$3 = 'ProductAttributeDefinitionListRepresentation';
407
- function keyBuilder$6(luvio, config) {
408
- return keyPrefix + '::' + RepresentationType$3 + ':' + config.message;
406
+ const RepresentationType$4 = 'ProductAttributeDefinitionListRepresentation';
407
+ function keyBuilder$8(luvio, config) {
408
+ return keyPrefix + '::' + RepresentationType$4 + ':' + config.message;
409
409
  }
410
410
  function keyBuilderFromType(luvio, object) {
411
411
  const keyParams = {
412
412
  message: object.message
413
413
  };
414
- return keyBuilder$6(luvio, keyParams);
414
+ return keyBuilder$8(luvio, keyParams);
415
415
  }
416
- function normalize$3(input, existing, path, luvio, store, timestamp) {
416
+ function normalize$4(input, existing, path, luvio, store, timestamp) {
417
417
  return input;
418
418
  }
419
- const select$8 = function ProductAttributeDefinitionListRepresentationSelect() {
419
+ const select$a = function ProductAttributeDefinitionListRepresentationSelect() {
420
420
  return {
421
421
  kind: 'Fragment',
422
- version: VERSION$4,
422
+ version: VERSION$5,
423
423
  private: [],
424
424
  opaque: true
425
425
  };
426
426
  };
427
- function equals$4(existing, incoming) {
427
+ function equals$5(existing, incoming) {
428
428
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
429
429
  return false;
430
430
  }
431
431
  return true;
432
432
  }
433
- const ingest$3 = function ProductAttributeDefinitionListRepresentationIngest(input, path, luvio, store, timestamp) {
433
+ const ingest$4 = function ProductAttributeDefinitionListRepresentationIngest(input, path, luvio, store, timestamp) {
434
434
  if (process.env.NODE_ENV !== 'production') {
435
- const validateError = validate$f(input);
435
+ const validateError = validate$k(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$2;
442
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "epc", VERSION$4, RepresentationType$3, equals$4);
441
+ const ttlToUse = TTL$3;
442
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "epc", VERSION$5, RepresentationType$4, equals$5);
443
443
  return createLink(key);
444
444
  };
445
- function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
445
+ function getTypeCacheKeys$4(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$3,
450
+ representationName: RepresentationType$4,
451
451
  mergeable: false
452
452
  });
453
453
  }
454
454
 
455
- function select$7(luvio, params) {
456
- return select$8();
455
+ function select$9(luvio, params) {
456
+ return select$a();
457
457
  }
458
- function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
459
- getTypeCacheKeys$3(storeKeyMap, luvio, response);
458
+ function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
459
+ getTypeCacheKeys$4(storeKeyMap, luvio, response);
460
460
  }
461
- function ingestSuccess$3(luvio, resourceParams, response) {
461
+ function ingestSuccess$4(luvio, resourceParams, response) {
462
462
  const { body } = response;
463
463
  const key = keyBuilderFromType(luvio, body);
464
- luvio.storeIngest(key, ingest$3, body);
464
+ luvio.storeIngest(key, ingest$4, body);
465
465
  const snapshot = luvio.storeLookup({
466
466
  recordId: key,
467
- node: select$7(),
467
+ node: select$9(),
468
468
  variables: {},
469
469
  });
470
470
  if (process.env.NODE_ENV !== 'production') {
@@ -475,11 +475,11 @@ function ingestSuccess$3(luvio, resourceParams, response) {
475
475
  deepFreeze(snapshot.data);
476
476
  return snapshot;
477
477
  }
478
- function createResourceRequest$3(config) {
478
+ function createResourceRequest$4(config) {
479
479
  const headers = {};
480
480
  return {
481
481
  baseUri: '/services/data/v60.0',
482
- basePath: '/connect/epc/product-attribute-definition',
482
+ basePath: '/connect/pcm/product-attribute-definition',
483
483
  method: 'post',
484
484
  body: config.body,
485
485
  urlParams: {},
@@ -489,45 +489,45 @@ function createResourceRequest$3(config) {
489
489
  };
490
490
  }
491
491
 
492
- const adapterName$3 = 'createProductAttributeDefinition';
492
+ const adapterName$4 = 'createProductAttributeDefinition';
493
493
  const createProductAttributeDefinition_ConfigPropertyMetadata = [
494
494
  generateParamConfigMetadata('productAttributeDefinitionListInputPayload', true, 2 /* Body */, 4 /* Unsupported */),
495
495
  ];
496
- const createProductAttributeDefinition_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, createProductAttributeDefinition_ConfigPropertyMetadata);
497
- const createResourceParams$3 = /*#__PURE__*/ createResourceParams$5(createProductAttributeDefinition_ConfigPropertyMetadata);
498
- function typeCheckConfig$3(untrustedConfig) {
496
+ const createProductAttributeDefinition_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, createProductAttributeDefinition_ConfigPropertyMetadata);
497
+ const createResourceParams$4 = /*#__PURE__*/ createResourceParams$6(createProductAttributeDefinition_ConfigPropertyMetadata);
498
+ function typeCheckConfig$4(untrustedConfig) {
499
499
  const config = {};
500
500
  const untrustedConfig_productAttributeDefinitionListInputPayload = untrustedConfig.productAttributeDefinitionListInputPayload;
501
- const referenceProductAttributeDefinitionListInputRepresentationValidationError = validate$h(untrustedConfig_productAttributeDefinitionListInputPayload);
501
+ const referenceProductAttributeDefinitionListInputRepresentationValidationError = validate$m(untrustedConfig_productAttributeDefinitionListInputPayload);
502
502
  if (referenceProductAttributeDefinitionListInputRepresentationValidationError === null) {
503
503
  config.productAttributeDefinitionListInputPayload = untrustedConfig_productAttributeDefinitionListInputPayload;
504
504
  }
505
505
  return config;
506
506
  }
507
- function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
507
+ function validateAdapterConfig$4(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$3(untrustedConfig);
514
+ const config = typeCheckConfig$4(untrustedConfig);
515
515
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
516
516
  return null;
517
517
  }
518
518
  return config;
519
519
  }
520
- function buildNetworkSnapshot$3(luvio, config, options) {
521
- const resourceParams = createResourceParams$3(config);
522
- const request = createResourceRequest$3(resourceParams);
520
+ function buildNetworkSnapshot$4(luvio, config, options) {
521
+ const resourceParams = createResourceParams$4(config);
522
+ const request = createResourceRequest$4(resourceParams);
523
523
  return luvio.dispatchResourceRequest(request, options)
524
524
  .then((response) => {
525
525
  return luvio.handleSuccessResponse(() => {
526
- const snapshot = ingestSuccess$3(luvio, resourceParams, response);
526
+ const snapshot = ingestSuccess$4(luvio, resourceParams, response);
527
527
  return luvio.storeBroadcast().then(() => snapshot);
528
528
  }, () => {
529
529
  const cache = new StoreKeyMap();
530
- getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
530
+ getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
531
531
  return cache;
532
532
  });
533
533
  }, (response) => {
@@ -537,16 +537,16 @@ function buildNetworkSnapshot$3(luvio, config, options) {
537
537
  }
538
538
  const createProductAttributeDefinitionAdapterFactory = (luvio) => {
539
539
  return function createProductAttributeDefinition(untrustedConfig) {
540
- const config = validateAdapterConfig$3(untrustedConfig, createProductAttributeDefinition_ConfigPropertyNames);
540
+ const config = validateAdapterConfig$4(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$3(luvio, config);
545
+ return buildNetworkSnapshot$4(luvio, config);
546
546
  };
547
547
  };
548
548
 
549
- function validate$e(obj, path = 'ProductFlowConnectRepresentation') {
549
+ function validate$j(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$e(obj, path = 'ProductFlowConnectRepresentation') {
562
562
  return v_error === undefined ? null : v_error;
563
563
  }
564
564
 
565
- const VERSION$3 = "9e839ceea7c6caa2747b4d3170bd209d";
566
- function validate$d(obj, path = 'Status') {
565
+ const VERSION$4 = "9e839ceea7c6caa2747b4d3170bd209d";
566
+ function validate$i(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$d(obj, path = 'Status') {
585
585
  })();
586
586
  return v_error === undefined ? null : v_error;
587
587
  }
588
- const select$6 = function StatusSelect() {
588
+ const select$8 = function StatusSelect() {
589
589
  return {
590
590
  kind: 'Fragment',
591
- version: VERSION$3,
591
+ version: VERSION$4,
592
592
  private: [],
593
593
  selections: [
594
594
  {
@@ -604,7 +604,7 @@ const select$6 = function StatusSelect() {
604
604
  ]
605
605
  };
606
606
  };
607
- function equals$3(existing, incoming) {
607
+ function equals$4(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$3(existing, incoming) {
634
634
  return true;
635
635
  }
636
636
 
637
- const TTL$1 = 6000;
638
- const VERSION$2 = "a75aed3c640fb969c24561ef4f8cb169";
639
- function validate$c(obj, path = 'ProductFlowOutputRepresentation') {
637
+ const TTL$2 = 6000;
638
+ const VERSION$3 = "a75aed3c640fb969c24561ef4f8cb169";
639
+ function validate$h(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$c(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$e(obj_productFlow, path_productFlow);
654
+ const referencepath_productFlowValidationError = validate$j(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$c(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$d(obj_status, path_status);
664
+ const referencepath_statusValidationError = validate$i(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$c(obj, path = 'ProductFlowOutputRepresentation') {
671
671
  })();
672
672
  return v_error === undefined ? null : v_error;
673
673
  }
674
- const RepresentationType$2 = 'ProductFlowOutputRepresentation';
675
- function normalize$2(input, existing, path, luvio, store, timestamp) {
674
+ const RepresentationType$3 = 'ProductFlowOutputRepresentation';
675
+ function normalize$3(input, existing, path, luvio, store, timestamp) {
676
676
  return input;
677
677
  }
678
- const select$5 = function ProductFlowOutputRepresentationSelect() {
678
+ const select$7 = function ProductFlowOutputRepresentationSelect() {
679
679
  return {
680
680
  kind: 'Fragment',
681
- version: VERSION$2,
681
+ version: VERSION$3,
682
682
  private: [],
683
683
  opaque: true
684
684
  };
685
685
  };
686
- function equals$2(existing, incoming) {
686
+ function equals$3(existing, incoming) {
687
687
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
688
688
  return false;
689
689
  }
690
690
  return true;
691
691
  }
692
- const ingest$2 = function ProductFlowOutputRepresentationIngest(input, path, luvio, store, timestamp) {
692
+ const ingest$3 = function ProductFlowOutputRepresentationIngest(input, path, luvio, store, timestamp) {
693
693
  if (process.env.NODE_ENV !== 'production') {
694
- const validateError = validate$c(input);
694
+ const validateError = validate$h(input);
695
695
  if (validateError !== null) {
696
696
  throw validateError;
697
697
  }
698
698
  }
699
699
  const key = path.fullPath;
700
- const ttlToUse = TTL$1;
701
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "epc", VERSION$2, RepresentationType$2, equals$2);
700
+ const ttlToUse = TTL$2;
701
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "epc", VERSION$3, RepresentationType$3, equals$3);
702
702
  return createLink(key);
703
703
  };
704
- function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
704
+ function getTypeCacheKeys$3(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$2,
709
+ representationName: RepresentationType$3,
710
710
  mergeable: false
711
711
  });
712
712
  }
713
713
 
714
- function select$4(luvio, params) {
715
- return select$5();
714
+ function select$6(luvio, params) {
715
+ return select$7();
716
716
  }
717
- function keyBuilder$5(luvio, params) {
717
+ function keyBuilder$7(luvio, params) {
718
718
  return keyPrefix + '::ProductFlowOutputRepresentation:(' + 'correlationId:' + params.queryParams.correlationId + ',' + 'productId:' + params.urlParams.productId + ')';
719
719
  }
720
- function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
721
- getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$5(luvio, resourceParams));
720
+ function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
721
+ getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$7(luvio, resourceParams));
722
722
  }
723
- function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
723
+ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
724
724
  const { body } = response;
725
- const key = keyBuilder$5(luvio, resourceParams);
726
- luvio.storeIngest(key, ingest$2, body);
725
+ const key = keyBuilder$7(luvio, resourceParams);
726
+ luvio.storeIngest(key, ingest$3, body);
727
727
  const snapshot = luvio.storeLookup({
728
728
  recordId: key,
729
- node: select$4(),
729
+ node: select$6(),
730
730
  variables: {},
731
731
  }, snapshotRefresh);
732
732
  if (process.env.NODE_ENV !== 'production') {
@@ -737,23 +737,23 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
737
737
  deepFreeze(snapshot.data);
738
738
  return snapshot;
739
739
  }
740
- function ingestError$2(luvio, params, error, snapshotRefresh) {
741
- const key = keyBuilder$5(luvio, params);
740
+ function ingestError$3(luvio, params, error, snapshotRefresh) {
741
+ const key = keyBuilder$7(luvio, params);
742
742
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
743
743
  const storeMetadataParams = {
744
- ttl: TTL$1,
744
+ ttl: TTL$2,
745
745
  namespace: keyPrefix,
746
- version: VERSION$2,
747
- representationName: RepresentationType$2
746
+ version: VERSION$3,
747
+ representationName: RepresentationType$3
748
748
  };
749
749
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
750
750
  return errorSnapshot;
751
751
  }
752
- function createResourceRequest$2(config) {
752
+ function createResourceRequest$3(config) {
753
753
  const headers = {};
754
754
  return {
755
755
  baseUri: '/services/data/v60.0',
756
- basePath: '/connect/epc/products/' + config.urlParams.productId + '/flow',
756
+ basePath: '/connect/pcm/products/' + config.urlParams.productId + '/flow',
757
757
  method: 'get',
758
758
  body: null,
759
759
  urlParams: config.urlParams,
@@ -763,94 +763,94 @@ function createResourceRequest$2(config) {
763
763
  };
764
764
  }
765
765
 
766
- const adapterName$2 = 'getProductFlowByProductId';
766
+ const adapterName$3 = '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$2, getProductFlowByProductId_ConfigPropertyMetadata);
772
- const createResourceParams$2 = /*#__PURE__*/ createResourceParams$5(getProductFlowByProductId_ConfigPropertyMetadata);
773
- function keyBuilder$4(luvio, config) {
774
- const resourceParams = createResourceParams$2(config);
775
- return keyBuilder$5(luvio, resourceParams);
771
+ const getProductFlowByProductId_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getProductFlowByProductId_ConfigPropertyMetadata);
772
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$6(getProductFlowByProductId_ConfigPropertyMetadata);
773
+ function keyBuilder$6(luvio, config) {
774
+ const resourceParams = createResourceParams$3(config);
775
+ return keyBuilder$7(luvio, resourceParams);
776
776
  }
777
- function typeCheckConfig$2(untrustedConfig) {
777
+ function typeCheckConfig$3(untrustedConfig) {
778
778
  const config = {};
779
- typeCheckConfig$5(untrustedConfig, config, getProductFlowByProductId_ConfigPropertyMetadata);
779
+ typeCheckConfig$6(untrustedConfig, config, getProductFlowByProductId_ConfigPropertyMetadata);
780
780
  return config;
781
781
  }
782
- function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
782
+ function validateAdapterConfig$3(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$2(untrustedConfig);
789
+ const config = typeCheckConfig$3(untrustedConfig);
790
790
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
791
791
  return null;
792
792
  }
793
793
  return config;
794
794
  }
795
- function adapterFragment$2(luvio, config) {
796
- createResourceParams$2(config);
797
- return select$4();
795
+ function adapterFragment$3(luvio, config) {
796
+ createResourceParams$3(config);
797
+ return select$6();
798
798
  }
799
- function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
800
- const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
799
+ function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
800
+ const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
801
801
  config,
802
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
802
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
803
803
  });
804
804
  return luvio.storeBroadcast().then(() => snapshot);
805
805
  }
806
- function onFetchResponseError$2(luvio, config, resourceParams, response) {
807
- const snapshot = ingestError$2(luvio, resourceParams, response, {
806
+ function onFetchResponseError$3(luvio, config, resourceParams, response) {
807
+ const snapshot = ingestError$3(luvio, resourceParams, response, {
808
808
  config,
809
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
809
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
810
810
  });
811
811
  return luvio.storeBroadcast().then(() => snapshot);
812
812
  }
813
- function buildNetworkSnapshot$2(luvio, config, options) {
814
- const resourceParams = createResourceParams$2(config);
815
- const request = createResourceRequest$2(resourceParams);
813
+ function buildNetworkSnapshot$3(luvio, config, options) {
814
+ const resourceParams = createResourceParams$3(config);
815
+ const request = createResourceRequest$3(resourceParams);
816
816
  return luvio.dispatchResourceRequest(request, options)
817
817
  .then((response) => {
818
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
818
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
819
819
  const cache = new StoreKeyMap();
820
- getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
820
+ getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
821
821
  return cache;
822
822
  });
823
823
  }, (response) => {
824
- return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
824
+ return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
825
825
  });
826
826
  }
827
- function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
828
- return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
827
+ function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
828
+ return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
829
829
  }
830
- function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
830
+ function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
831
831
  const { luvio, config } = context;
832
832
  const selector = {
833
- recordId: keyBuilder$4(luvio, config),
834
- node: adapterFragment$2(luvio, config),
833
+ recordId: keyBuilder$6(luvio, config),
834
+ node: adapterFragment$3(luvio, config),
835
835
  variables: {},
836
836
  };
837
837
  const cacheSnapshot = storeLookup(selector, {
838
838
  config,
839
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
839
+ resolve: () => buildNetworkSnapshot$3(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$2(untrustedConfig, getProductFlowByProductId_ConfigPropertyNames);
844
+ const config = validateAdapterConfig$3(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$2, buildNetworkSnapshotCachePolicy$2);
850
+ buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
851
851
  };
852
852
 
853
- function validate$b(obj, path = 'AttributePicklistValueOutputRepresentation') {
853
+ function validate$g(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$b(obj, path = 'AttributePicklistValueOutputRepresentation') {
929
929
  return v_error === undefined ? null : v_error;
930
930
  }
931
931
 
932
- function validate$a(obj, path = 'AttributePicklistOutputRepresentation') {
932
+ function validate$f(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$a(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$b(obj_values_item, path_values_item);
981
+ const referencepath_values_itemValidationError = validate$g(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$a(obj, path = 'AttributePicklistOutputRepresentation') {
990
990
  return v_error === undefined ? null : v_error;
991
991
  }
992
992
 
993
- function validate$9(obj, path = 'AttributeDefinitionOutputRepresentation') {
993
+ function validate$e(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$9(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$a(obj_picklist, path_picklist);
1113
+ const referencepath_picklistValidationError = validate$f(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$9(obj, path = 'AttributeDefinitionOutputRepresentation') {
1128
1128
  return v_error === undefined ? null : v_error;
1129
1129
  }
1130
1130
 
1131
- function validate$8(obj, path = 'AttributeCategoryOutputRepresentation') {
1131
+ function validate$d(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$8(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$9(obj_attributes_item, path_attributes_item);
1145
+ const referencepath_attributes_itemValidationError = validate$e(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$8(obj, path = 'AttributeCategoryOutputRepresentation') {
1175
1175
  return v_error === undefined ? null : v_error;
1176
1176
  }
1177
1177
 
1178
- function validate$7(obj, path = 'PricingModelOutputRepresentation') {
1178
+ function validate$c(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$7(obj, path = 'PricingModelOutputRepresentation') {
1226
1226
  return v_error === undefined ? null : v_error;
1227
1227
  }
1228
1228
 
1229
- function validate$6(obj, path = 'PriceOutputRepresentation') {
1229
+ function validate$b(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$6(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$7(obj_pricingModel, path_pricingModel);
1265
+ const referencepath_pricingModelValidationError = validate$c(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$6(obj, path = 'PriceOutputRepresentation') {
1280
1280
  return v_error === undefined ? null : v_error;
1281
1281
  }
1282
1282
 
1283
- function validate$5(obj, path = 'ProductClassificationOutputRepresentation') {
1283
+ function validate$a(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$5(obj, path = 'ProductClassificationOutputRepresentation') {
1296
1296
  return v_error === undefined ? null : v_error;
1297
1297
  }
1298
1298
 
1299
- function validate$4(obj, path = 'ProductComponentGroupOutputRepresentation') {
1299
+ function validate$9(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$4(obj, path = 'ProductComponentGroupOutputRepresentation') {
1375
1375
  return v_error === undefined ? null : v_error;
1376
1376
  }
1377
1377
 
1378
- function validate$3(obj, path = 'ProductSpecificationTypeOutputRepresentation') {
1378
+ function validate$8(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$3(obj, path = 'ProductSpecificationTypeOutputRepresentation')
1391
1391
  return v_error === undefined ? null : v_error;
1392
1392
  }
1393
1393
 
1394
- function validate$2(obj, path = 'QuantityInfo') {
1394
+ function validate$7(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$2(obj, path = 'QuantityInfo') {
1409
1409
  return v_error === undefined ? null : v_error;
1410
1410
  }
1411
1411
 
1412
- const TTL = 6000;
1413
- const VERSION$1 = "38ee0d8d67cda562ff19dd5273e07d95";
1414
- function validate$1(obj, path = 'ProductOutputRepresentation') {
1412
+ const TTL$1 = 6000;
1413
+ const VERSION$2 = "38ee0d8d67cda562ff19dd5273e07d95";
1414
+ function validate$6(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$1(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$8(obj_attributeCategory_item, path_attributeCategory_item);
1428
+ const referencepath_attributeCategory_itemValidationError = validate$d(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$1(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$9(obj_attributes_item, path_attributes_item);
1445
+ const referencepath_attributes_itemValidationError = validate$e(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$1(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$1(obj_childProducts_item, path_childProducts_item);
1469
+ const referencepath_childProducts_itemValidationError = validate$6(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$1(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$6(obj_prices_item, path_prices_item);
1542
+ const referencepath_prices_itemValidationError = validate$b(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$1(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$5(obj_productClassification, path_productClassification);
1553
+ const referencepath_productClassificationValidationError = validate$a(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$1(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$4(obj_productComponentGroups_item, path_productComponentGroups_item);
1576
+ const referencepath_productComponentGroups_itemValidationError = validate$9(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$1(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$3(obj_productSpecificationType, path_productSpecificationType);
1587
+ const referencepath_productSpecificationTypeValidationError = validate$8(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$1(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$2(obj_quantityInfo, path_quantityInfo);
1597
+ const referencepath_quantityInfoValidationError = validate$7(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$1(obj, path = 'ProductOutputRepresentation') {
1604
1604
  })();
1605
1605
  return v_error === undefined ? null : v_error;
1606
1606
  }
1607
- const RepresentationType$1 = 'ProductOutputRepresentation';
1608
- function normalize$1(input, existing, path, luvio, store, timestamp) {
1607
+ const RepresentationType$2 = 'ProductOutputRepresentation';
1608
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
1609
1609
  return input;
1610
1610
  }
1611
- const select$3 = function ProductOutputRepresentationSelect() {
1611
+ const select$5 = function ProductOutputRepresentationSelect() {
1612
1612
  return {
1613
1613
  kind: 'Fragment',
1614
- version: VERSION$1,
1614
+ version: VERSION$2,
1615
1615
  private: [],
1616
1616
  opaque: true
1617
1617
  };
1618
1618
  };
1619
- function equals$1(existing, incoming) {
1619
+ function equals$2(existing, incoming) {
1620
1620
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
1621
1621
  return false;
1622
1622
  }
1623
1623
  return true;
1624
1624
  }
1625
- const ingest$1 = function ProductOutputRepresentationIngest(input, path, luvio, store, timestamp) {
1625
+ const ingest$2 = function ProductOutputRepresentationIngest(input, path, luvio, store, timestamp) {
1626
1626
  if (process.env.NODE_ENV !== 'production') {
1627
- const validateError = validate$1(input);
1627
+ const validateError = validate$6(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$1, "epc", VERSION$1, RepresentationType$1, equals$1);
1633
+ const ttlToUse = TTL$1;
1634
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "epc", VERSION$2, RepresentationType$2, equals$2);
1635
1635
  return createLink(key);
1636
1636
  };
1637
- function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
1637
+ function getTypeCacheKeys$2(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$1,
1642
+ representationName: RepresentationType$2,
1643
1643
  mergeable: false
1644
1644
  });
1645
1645
  }
1646
1646
 
1647
- function select$2(luvio, params) {
1648
- return select$3();
1647
+ function select$4(luvio, params) {
1648
+ return select$5();
1649
1649
  }
1650
- function keyBuilder$3(luvio, params) {
1650
+ function keyBuilder$5(luvio, params) {
1651
1651
  return keyPrefix + '::ProductOutputRepresentation:(' + 'correlationId:' + params.queryParams.correlationId + ',' + 'isPriceImpacting:' + params.queryParams.isPriceImpacting + ',' + 'productId:' + params.urlParams.productId + ')';
1652
1652
  }
1653
- function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
1654
- getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
1653
+ function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
1654
+ getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$5(luvio, resourceParams));
1655
1655
  }
1656
- function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
1656
+ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
1657
1657
  const { body } = response;
1658
- const key = keyBuilder$3(luvio, resourceParams);
1659
- luvio.storeIngest(key, ingest$1, body);
1658
+ const key = keyBuilder$5(luvio, resourceParams);
1659
+ luvio.storeIngest(key, ingest$2, body);
1660
1660
  const snapshot = luvio.storeLookup({
1661
1661
  recordId: key,
1662
- node: select$2(),
1662
+ node: select$4(),
1663
1663
  variables: {},
1664
1664
  }, snapshotRefresh);
1665
1665
  if (process.env.NODE_ENV !== 'production') {
@@ -1670,23 +1670,23 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
1670
1670
  deepFreeze(snapshot.data);
1671
1671
  return snapshot;
1672
1672
  }
1673
- function ingestError$1(luvio, params, error, snapshotRefresh) {
1674
- const key = keyBuilder$3(luvio, params);
1673
+ function ingestError$2(luvio, params, error, snapshotRefresh) {
1674
+ const key = keyBuilder$5(luvio, params);
1675
1675
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1676
1676
  const storeMetadataParams = {
1677
- ttl: TTL,
1677
+ ttl: TTL$1,
1678
1678
  namespace: keyPrefix,
1679
- version: VERSION$1,
1680
- representationName: RepresentationType$1
1679
+ version: VERSION$2,
1680
+ representationName: RepresentationType$2
1681
1681
  };
1682
1682
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1683
1683
  return errorSnapshot;
1684
1684
  }
1685
- function createResourceRequest$1(config) {
1685
+ function createResourceRequest$2(config) {
1686
1686
  const headers = {};
1687
1687
  return {
1688
1688
  baseUri: '/services/data/v60.0',
1689
- basePath: '/connect/epc/product/' + config.urlParams.productId + '/attributes',
1689
+ basePath: '/connect/pcm/product/' + config.urlParams.productId + '/attributes',
1690
1690
  method: 'get',
1691
1691
  body: null,
1692
1692
  urlParams: config.urlParams,
@@ -1696,96 +1696,96 @@ function createResourceRequest$1(config) {
1696
1696
  };
1697
1697
  }
1698
1698
 
1699
- const adapterName$1 = 'getProductAttributesByProductId';
1699
+ const adapterName$2 = '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$1, getProductAttributesByProductId_ConfigPropertyMetadata);
1706
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$5(getProductAttributesByProductId_ConfigPropertyMetadata);
1707
- function keyBuilder$2(luvio, config) {
1708
- const resourceParams = createResourceParams$1(config);
1709
- return keyBuilder$3(luvio, resourceParams);
1705
+ const getProductAttributesByProductId_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getProductAttributesByProductId_ConfigPropertyMetadata);
1706
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$6(getProductAttributesByProductId_ConfigPropertyMetadata);
1707
+ function keyBuilder$4(luvio, config) {
1708
+ const resourceParams = createResourceParams$2(config);
1709
+ return keyBuilder$5(luvio, resourceParams);
1710
1710
  }
1711
- function typeCheckConfig$1(untrustedConfig) {
1711
+ function typeCheckConfig$2(untrustedConfig) {
1712
1712
  const config = {};
1713
- typeCheckConfig$5(untrustedConfig, config, getProductAttributesByProductId_ConfigPropertyMetadata);
1713
+ typeCheckConfig$6(untrustedConfig, config, getProductAttributesByProductId_ConfigPropertyMetadata);
1714
1714
  return config;
1715
1715
  }
1716
- function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
1716
+ function validateAdapterConfig$2(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$1(untrustedConfig);
1723
+ const config = typeCheckConfig$2(untrustedConfig);
1724
1724
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1725
1725
  return null;
1726
1726
  }
1727
1727
  return config;
1728
1728
  }
1729
- function adapterFragment$1(luvio, config) {
1730
- createResourceParams$1(config);
1731
- return select$2();
1729
+ function adapterFragment$2(luvio, config) {
1730
+ createResourceParams$2(config);
1731
+ return select$4();
1732
1732
  }
1733
- function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
1734
- const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
1733
+ function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
1734
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
1735
1735
  config,
1736
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1736
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1737
1737
  });
1738
1738
  return luvio.storeBroadcast().then(() => snapshot);
1739
1739
  }
1740
- function onFetchResponseError$1(luvio, config, resourceParams, response) {
1741
- const snapshot = ingestError$1(luvio, resourceParams, response, {
1740
+ function onFetchResponseError$2(luvio, config, resourceParams, response) {
1741
+ const snapshot = ingestError$2(luvio, resourceParams, response, {
1742
1742
  config,
1743
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1743
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1744
1744
  });
1745
1745
  return luvio.storeBroadcast().then(() => snapshot);
1746
1746
  }
1747
- function buildNetworkSnapshot$1(luvio, config, options) {
1748
- const resourceParams = createResourceParams$1(config);
1749
- const request = createResourceRequest$1(resourceParams);
1747
+ function buildNetworkSnapshot$2(luvio, config, options) {
1748
+ const resourceParams = createResourceParams$2(config);
1749
+ const request = createResourceRequest$2(resourceParams);
1750
1750
  return luvio.dispatchResourceRequest(request, options)
1751
1751
  .then((response) => {
1752
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
1752
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
1753
1753
  const cache = new StoreKeyMap();
1754
- getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
1754
+ getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
1755
1755
  return cache;
1756
1756
  });
1757
1757
  }, (response) => {
1758
- return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
1758
+ return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
1759
1759
  });
1760
1760
  }
1761
- function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
1762
- return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
1761
+ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
1762
+ return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
1763
1763
  }
1764
- function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
1764
+ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
1765
1765
  const { luvio, config } = context;
1766
1766
  const selector = {
1767
- recordId: keyBuilder$2(luvio, config),
1768
- node: adapterFragment$1(luvio, config),
1767
+ recordId: keyBuilder$4(luvio, config),
1768
+ node: adapterFragment$2(luvio, config),
1769
1769
  variables: {},
1770
1770
  };
1771
1771
  const cacheSnapshot = storeLookup(selector, {
1772
1772
  config,
1773
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1773
+ resolve: () => buildNetworkSnapshot$2(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$1(untrustedConfig, getProductAttributesByProductId_ConfigPropertyNames);
1778
+ const config = validateAdapterConfig$2(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$1, buildNetworkSnapshotCachePolicy$1);
1784
+ buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
1785
1785
  };
1786
1786
 
1787
- const VERSION = "dc3572320bc5b04b2f7f9fd7c6ee1281";
1788
- function validate(obj, path = 'ProductsOutputRepresentation') {
1787
+ const VERSION$1 = "dc3572320bc5b04b2f7f9fd7c6ee1281";
1788
+ function validate$5(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(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$d(obj_status, path_status);
1824
+ const referencepath_statusValidationError = validate$i(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(obj, path = 'ProductsOutputRepresentation') {
1831
1831
  })();
1832
1832
  return v_error === undefined ? null : v_error;
1833
1833
  }
1834
- const RepresentationType = 'ProductsOutputRepresentation';
1835
- function normalize(input, existing, path, luvio, store, timestamp) {
1834
+ const RepresentationType$1 = 'ProductsOutputRepresentation';
1835
+ function normalize$1(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$1(input_products_item, {
1842
+ input_products[i] = ingest$2(input_products_item, {
1843
1843
  fullPath: input_products_item_id,
1844
1844
  propertyName: i,
1845
1845
  parent: {
@@ -1853,11 +1853,11 @@ function normalize(input, existing, path, luvio, store, timestamp) {
1853
1853
  }
1854
1854
  return input;
1855
1855
  }
1856
- const select$1 = function ProductsOutputRepresentationSelect() {
1857
- const { selections: Status__selections, opaque: Status__opaque, } = select$6();
1856
+ const select$3 = function ProductsOutputRepresentationSelect() {
1857
+ const { selections: Status__selections, opaque: Status__opaque, } = select$8();
1858
1858
  return {
1859
1859
  kind: 'Fragment',
1860
- version: VERSION,
1860
+ version: VERSION$1,
1861
1861
  private: [],
1862
1862
  selections: [
1863
1863
  {
@@ -1875,7 +1875,7 @@ const select$1 = function ProductsOutputRepresentationSelect() {
1875
1875
  kind: 'Link',
1876
1876
  plural: true,
1877
1877
  required: false,
1878
- fragment: select$3()
1878
+ fragment: select$5()
1879
1879
  },
1880
1880
  {
1881
1881
  name: 'status',
@@ -1886,7 +1886,7 @@ const select$1 = function ProductsOutputRepresentationSelect() {
1886
1886
  ]
1887
1887
  };
1888
1888
  };
1889
- function equals(existing, incoming) {
1889
+ function equals$1(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,45 +1940,425 @@ function equals(existing, incoming) {
1940
1940
  if (existing_status === undefined || incoming_status === undefined) {
1941
1941
  return false;
1942
1942
  }
1943
- if (!(equals$3(existing_status, incoming_status))) {
1943
+ if (!(equals$4(existing_status, incoming_status))) {
1944
1944
  return false;
1945
1945
  }
1946
1946
  }
1947
1947
  return true;
1948
1948
  }
1949
- const ingest = function ProductsOutputRepresentationIngest(input, path, luvio, store, timestamp) {
1949
+ const ingest$1 = function ProductsOutputRepresentationIngest(input, path, luvio, store, timestamp) {
1950
1950
  if (process.env.NODE_ENV !== 'production') {
1951
- const validateError = validate(input);
1951
+ const validateError = validate$5(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, "epc", VERSION, RepresentationType, equals);
1958
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "epc", VERSION$1, RepresentationType$1, equals$1);
1959
1959
  return createLink(key);
1960
1960
  };
1961
- function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
1961
+ function getTypeCacheKeys$1(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$1,
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$1(rootKeySet, luvio, input.products[i], () => '');
1972
+ getTypeCacheKeys$2(rootKeySet, luvio, input.products[i], () => '');
1973
1973
  }
1974
1974
  }
1975
1975
  }
1976
1976
 
1977
+ function select$2(luvio, params) {
1978
+ return select$3();
1979
+ }
1980
+ function keyBuilder$3(luvio, params) {
1981
+ return keyPrefix + '::ProductsOutputRepresentation:(' + 'correlationId:' + params.queryParams.correlationId + ',' + 'productId:' + params.urlParams.productId + ')';
1982
+ }
1983
+ function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
1984
+ getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
1985
+ }
1986
+ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
1987
+ const { body } = response;
1988
+ const key = keyBuilder$3(luvio, resourceParams);
1989
+ luvio.storeIngest(key, ingest$1, body);
1990
+ const snapshot = luvio.storeLookup({
1991
+ recordId: key,
1992
+ node: select$2(),
1993
+ variables: {},
1994
+ }, snapshotRefresh);
1995
+ if (process.env.NODE_ENV !== 'production') {
1996
+ if (snapshot.state !== 'Fulfilled') {
1997
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1998
+ }
1999
+ }
2000
+ deepFreeze(snapshot.data);
2001
+ return snapshot;
2002
+ }
2003
+ function ingestError$1(luvio, params, error, snapshotRefresh) {
2004
+ const key = keyBuilder$3(luvio, params);
2005
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
2006
+ luvio.storeIngestError(key, errorSnapshot);
2007
+ return errorSnapshot;
2008
+ }
2009
+ function createResourceRequest$1(config) {
2010
+ const headers = {};
2011
+ return {
2012
+ baseUri: '/services/data/v60.0',
2013
+ basePath: '/connect/pcm/products/' + config.urlParams.productId + '',
2014
+ method: 'get',
2015
+ body: null,
2016
+ urlParams: config.urlParams,
2017
+ queryParams: config.queryParams,
2018
+ headers,
2019
+ priority: 'normal',
2020
+ };
2021
+ }
2022
+
2023
+ const adapterName$1 = 'getProductById';
2024
+ const getProductById_ConfigPropertyMetadata = [
2025
+ generateParamConfigMetadata('productId', true, 0 /* UrlParameter */, 0 /* String */),
2026
+ generateParamConfigMetadata('correlationId', false, 1 /* QueryParameter */, 0 /* String */),
2027
+ ];
2028
+ const getProductById_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getProductById_ConfigPropertyMetadata);
2029
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$6(getProductById_ConfigPropertyMetadata);
2030
+ function keyBuilder$2(luvio, config) {
2031
+ const resourceParams = createResourceParams$1(config);
2032
+ return keyBuilder$3(luvio, resourceParams);
2033
+ }
2034
+ function typeCheckConfig$1(untrustedConfig) {
2035
+ const config = {};
2036
+ typeCheckConfig$6(untrustedConfig, config, getProductById_ConfigPropertyMetadata);
2037
+ return config;
2038
+ }
2039
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
2040
+ if (!untrustedIsObject(untrustedConfig)) {
2041
+ return null;
2042
+ }
2043
+ if (process.env.NODE_ENV !== 'production') {
2044
+ validateConfig(untrustedConfig, configPropertyNames);
2045
+ }
2046
+ const config = typeCheckConfig$1(untrustedConfig);
2047
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
2048
+ return null;
2049
+ }
2050
+ return config;
2051
+ }
2052
+ function adapterFragment$1(luvio, config) {
2053
+ createResourceParams$1(config);
2054
+ return select$2();
2055
+ }
2056
+ function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
2057
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
2058
+ config,
2059
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
2060
+ });
2061
+ return luvio.storeBroadcast().then(() => snapshot);
2062
+ }
2063
+ function onFetchResponseError$1(luvio, config, resourceParams, response) {
2064
+ const snapshot = ingestError$1(luvio, resourceParams, response, {
2065
+ config,
2066
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
2067
+ });
2068
+ return luvio.storeBroadcast().then(() => snapshot);
2069
+ }
2070
+ function buildNetworkSnapshot$1(luvio, config, options) {
2071
+ const resourceParams = createResourceParams$1(config);
2072
+ const request = createResourceRequest$1(resourceParams);
2073
+ return luvio.dispatchResourceRequest(request, options)
2074
+ .then((response) => {
2075
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
2076
+ const cache = new StoreKeyMap();
2077
+ getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
2078
+ return cache;
2079
+ });
2080
+ }, (response) => {
2081
+ return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
2082
+ });
2083
+ }
2084
+ function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
2085
+ return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
2086
+ }
2087
+ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
2088
+ const { luvio, config } = context;
2089
+ const selector = {
2090
+ recordId: keyBuilder$2(luvio, config),
2091
+ node: adapterFragment$1(luvio, config),
2092
+ variables: {},
2093
+ };
2094
+ const cacheSnapshot = storeLookup(selector, {
2095
+ config,
2096
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
2097
+ });
2098
+ return cacheSnapshot;
2099
+ }
2100
+ const getProductByIdAdapterFactory = (luvio) => function epc__getProductById(untrustedConfig, requestContext) {
2101
+ const config = validateAdapterConfig$1(untrustedConfig, getProductById_ConfigPropertyNames);
2102
+ // Invalid or incomplete config
2103
+ if (config === null) {
2104
+ return null;
2105
+ }
2106
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
2107
+ buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
2108
+ };
2109
+
2110
+ function validate$4(obj, path = 'ContextFieldInfoOutputRepresentation') {
2111
+ const v_error = (() => {
2112
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2113
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2114
+ }
2115
+ if (obj.apiName !== undefined) {
2116
+ const obj_apiName = obj.apiName;
2117
+ const path_apiName = path + '.apiName';
2118
+ if (typeof obj_apiName !== 'string') {
2119
+ return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
2120
+ }
2121
+ }
2122
+ if (obj.dataType !== undefined) {
2123
+ const obj_dataType = obj.dataType;
2124
+ const path_dataType = path + '.dataType';
2125
+ if (typeof obj_dataType !== 'string') {
2126
+ return new TypeError('Expected "string" but received "' + typeof obj_dataType + '" (at "' + path_dataType + '")');
2127
+ }
2128
+ }
2129
+ if (obj.fieldType !== undefined) {
2130
+ const obj_fieldType = obj.fieldType;
2131
+ const path_fieldType = path + '.fieldType';
2132
+ if (typeof obj_fieldType !== 'string') {
2133
+ return new TypeError('Expected "string" but received "' + typeof obj_fieldType + '" (at "' + path_fieldType + '")');
2134
+ }
2135
+ }
2136
+ if (obj.name !== undefined) {
2137
+ const obj_name = obj.name;
2138
+ const path_name = path + '.name';
2139
+ if (typeof obj_name !== 'string') {
2140
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
2141
+ }
2142
+ }
2143
+ if (obj.parentNodeName !== undefined) {
2144
+ const obj_parentNodeName = obj.parentNodeName;
2145
+ const path_parentNodeName = path + '.parentNodeName';
2146
+ if (typeof obj_parentNodeName !== 'string') {
2147
+ return new TypeError('Expected "string" but received "' + typeof obj_parentNodeName + '" (at "' + path_parentNodeName + '")');
2148
+ }
2149
+ }
2150
+ if (obj.path !== undefined) {
2151
+ const obj_path = obj.path;
2152
+ const path_path = path + '.path';
2153
+ if (typeof obj_path !== 'string') {
2154
+ return new TypeError('Expected "string" but received "' + typeof obj_path + '" (at "' + path_path + '")');
2155
+ }
2156
+ }
2157
+ })();
2158
+ return v_error === undefined ? null : v_error;
2159
+ }
2160
+
2161
+ function validate$3(obj, path = 'ContextFieldsInfoOutputRepresentation') {
2162
+ const v_error = (() => {
2163
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2164
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2165
+ }
2166
+ const obj_contextFieldsInfo = obj.contextFieldsInfo;
2167
+ const path_contextFieldsInfo = path + '.contextFieldsInfo';
2168
+ if (!ArrayIsArray(obj_contextFieldsInfo)) {
2169
+ return new TypeError('Expected "array" but received "' + typeof obj_contextFieldsInfo + '" (at "' + path_contextFieldsInfo + '")');
2170
+ }
2171
+ for (let i = 0; i < obj_contextFieldsInfo.length; i++) {
2172
+ const obj_contextFieldsInfo_item = obj_contextFieldsInfo[i];
2173
+ const path_contextFieldsInfo_item = path_contextFieldsInfo + '[' + i + ']';
2174
+ const referencepath_contextFieldsInfo_itemValidationError = validate$4(obj_contextFieldsInfo_item, path_contextFieldsInfo_item);
2175
+ if (referencepath_contextFieldsInfo_itemValidationError !== null) {
2176
+ let message = 'Object doesn\'t match ContextFieldInfoOutputRepresentation (at "' + path_contextFieldsInfo_item + '")\n';
2177
+ message += referencepath_contextFieldsInfo_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2178
+ return new TypeError(message);
2179
+ }
2180
+ }
2181
+ })();
2182
+ return v_error === undefined ? null : v_error;
2183
+ }
2184
+
2185
+ function validate$2(obj, path = 'ContextNodeInfoOutputRepresentation') {
2186
+ const v_error = (() => {
2187
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2188
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2189
+ }
2190
+ if (obj.apiName !== undefined) {
2191
+ const obj_apiName = obj.apiName;
2192
+ const path_apiName = path + '.apiName';
2193
+ if (typeof obj_apiName !== 'string') {
2194
+ return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
2195
+ }
2196
+ }
2197
+ if (obj.childNodes !== undefined) {
2198
+ const obj_childNodes = obj.childNodes;
2199
+ const path_childNodes = path + '.childNodes';
2200
+ const referencepath_childNodesValidationError = validate$1(obj_childNodes, path_childNodes);
2201
+ if (referencepath_childNodesValidationError !== null) {
2202
+ let message = 'Object doesn\'t match ContextNodesInfoOutputRepresentation (at "' + path_childNodes + '")\n';
2203
+ message += referencepath_childNodesValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2204
+ return new TypeError(message);
2205
+ }
2206
+ }
2207
+ if (obj.fields !== undefined) {
2208
+ const obj_fields = obj.fields;
2209
+ const path_fields = path + '.fields';
2210
+ const referencepath_fieldsValidationError = validate$3(obj_fields, path_fields);
2211
+ if (referencepath_fieldsValidationError !== null) {
2212
+ let message = 'Object doesn\'t match ContextFieldsInfoOutputRepresentation (at "' + path_fields + '")\n';
2213
+ message += referencepath_fieldsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2214
+ return new TypeError(message);
2215
+ }
2216
+ }
2217
+ if (obj.name !== undefined) {
2218
+ const obj_name = obj.name;
2219
+ const path_name = path + '.name';
2220
+ if (typeof obj_name !== 'string') {
2221
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
2222
+ }
2223
+ }
2224
+ if (obj.parentNodeName !== undefined) {
2225
+ const obj_parentNodeName = obj.parentNodeName;
2226
+ const path_parentNodeName = path + '.parentNodeName';
2227
+ if (typeof obj_parentNodeName !== 'string') {
2228
+ return new TypeError('Expected "string" but received "' + typeof obj_parentNodeName + '" (at "' + path_parentNodeName + '")');
2229
+ }
2230
+ }
2231
+ if (obj.path !== undefined) {
2232
+ const obj_path = obj.path;
2233
+ const path_path = path + '.path';
2234
+ if (typeof obj_path !== 'string') {
2235
+ return new TypeError('Expected "string" but received "' + typeof obj_path + '" (at "' + path_path + '")');
2236
+ }
2237
+ }
2238
+ })();
2239
+ return v_error === undefined ? null : v_error;
2240
+ }
2241
+
2242
+ function validate$1(obj, path = 'ContextNodesInfoOutputRepresentation') {
2243
+ const v_error = (() => {
2244
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2245
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2246
+ }
2247
+ const obj_contextNodesInfo = obj.contextNodesInfo;
2248
+ const path_contextNodesInfo = path + '.contextNodesInfo';
2249
+ if (!ArrayIsArray(obj_contextNodesInfo)) {
2250
+ return new TypeError('Expected "array" but received "' + typeof obj_contextNodesInfo + '" (at "' + path_contextNodesInfo + '")');
2251
+ }
2252
+ for (let i = 0; i < obj_contextNodesInfo.length; i++) {
2253
+ const obj_contextNodesInfo_item = obj_contextNodesInfo[i];
2254
+ const path_contextNodesInfo_item = path_contextNodesInfo + '[' + i + ']';
2255
+ const referencepath_contextNodesInfo_itemValidationError = validate$2(obj_contextNodesInfo_item, path_contextNodesInfo_item);
2256
+ if (referencepath_contextNodesInfo_itemValidationError !== null) {
2257
+ let message = 'Object doesn\'t match ContextNodeInfoOutputRepresentation (at "' + path_contextNodesInfo_item + '")\n';
2258
+ message += referencepath_contextNodesInfo_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2259
+ return new TypeError(message);
2260
+ }
2261
+ }
2262
+ })();
2263
+ return v_error === undefined ? null : v_error;
2264
+ }
2265
+
2266
+ const TTL = 6000;
2267
+ const VERSION = "0e533503a3df0b0f709f7ff83f175d06";
2268
+ function validate(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$1(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$i(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 = 'ContextDefinitionOutputRepresentation';
2318
+ function normalize(input, existing, path, luvio, store, timestamp) {
2319
+ return input;
2320
+ }
2321
+ const select$1 = function ContextDefinitionOutputRepresentationSelect() {
2322
+ return {
2323
+ kind: 'Fragment',
2324
+ version: VERSION,
2325
+ private: [],
2326
+ opaque: true
2327
+ };
2328
+ };
2329
+ function equals(existing, incoming) {
2330
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
2331
+ return false;
2332
+ }
2333
+ return true;
2334
+ }
2335
+ const ingest = function ContextDefinitionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
2336
+ if (process.env.NODE_ENV !== 'production') {
2337
+ const validateError = validate(input);
2338
+ if (validateError !== null) {
2339
+ throw validateError;
2340
+ }
2341
+ }
2342
+ const key = path.fullPath;
2343
+ const ttlToUse = TTL;
2344
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "epc", VERSION, RepresentationType, equals);
2345
+ return createLink(key);
2346
+ };
2347
+ function getTypeCacheKeys(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,
2353
+ mergeable: false
2354
+ });
2355
+ }
2356
+
1977
2357
  function select(luvio, params) {
1978
2358
  return select$1();
1979
2359
  }
1980
2360
  function keyBuilder$1(luvio, params) {
1981
- return keyPrefix + '::ProductsOutputRepresentation:(' + 'correlationId:' + params.queryParams.correlationId + ',' + 'productId:' + params.urlParams.productId + ')';
2361
+ return keyPrefix + '::ContextDefinitionOutputRepresentation:(' + 'correlationId:' + params.queryParams.correlationId + ',' + 'contextDefinitionId:' + params.urlParams.contextDefinitionId + ')';
1982
2362
  }
1983
2363
  function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
1984
2364
  getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
@@ -2003,14 +2383,20 @@ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
2003
2383
  function ingestError(luvio, params, error, snapshotRefresh) {
2004
2384
  const key = keyBuilder$1(luvio, params);
2005
2385
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
2006
- luvio.storeIngestError(key, errorSnapshot);
2386
+ const storeMetadataParams = {
2387
+ ttl: TTL,
2388
+ namespace: keyPrefix,
2389
+ version: VERSION,
2390
+ representationName: RepresentationType
2391
+ };
2392
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
2007
2393
  return errorSnapshot;
2008
2394
  }
2009
2395
  function createResourceRequest(config) {
2010
2396
  const headers = {};
2011
2397
  return {
2012
2398
  baseUri: '/services/data/v60.0',
2013
- basePath: '/connect/epc/products/' + config.urlParams.productId + '',
2399
+ basePath: '/connect/pcm/configurationRule/context-definition/' + config.urlParams.contextDefinitionId + '',
2014
2400
  method: 'get',
2015
2401
  body: null,
2016
2402
  urlParams: config.urlParams,
@@ -2020,20 +2406,20 @@ function createResourceRequest(config) {
2020
2406
  };
2021
2407
  }
2022
2408
 
2023
- const adapterName = 'getProductById';
2024
- const getProductById_ConfigPropertyMetadata = [
2025
- generateParamConfigMetadata('productId', true, 0 /* UrlParameter */, 0 /* String */),
2409
+ const adapterName = 'getContextDefinitionInfoById';
2410
+ const getContextDefinitionInfoById_ConfigPropertyMetadata = [
2411
+ generateParamConfigMetadata('contextDefinitionId', true, 0 /* UrlParameter */, 0 /* String */),
2026
2412
  generateParamConfigMetadata('correlationId', false, 1 /* QueryParameter */, 0 /* String */),
2027
2413
  ];
2028
- const getProductById_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getProductById_ConfigPropertyMetadata);
2029
- const createResourceParams = /*#__PURE__*/ createResourceParams$5(getProductById_ConfigPropertyMetadata);
2414
+ const getContextDefinitionInfoById_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getContextDefinitionInfoById_ConfigPropertyMetadata);
2415
+ const createResourceParams = /*#__PURE__*/ createResourceParams$6(getContextDefinitionInfoById_ConfigPropertyMetadata);
2030
2416
  function keyBuilder(luvio, config) {
2031
2417
  const resourceParams = createResourceParams(config);
2032
2418
  return keyBuilder$1(luvio, resourceParams);
2033
2419
  }
2034
2420
  function typeCheckConfig(untrustedConfig) {
2035
2421
  const config = {};
2036
- typeCheckConfig$5(untrustedConfig, config, getProductById_ConfigPropertyMetadata);
2422
+ typeCheckConfig$6(untrustedConfig, config, getContextDefinitionInfoById_ConfigPropertyMetadata);
2037
2423
  return config;
2038
2424
  }
2039
2425
  function validateAdapterConfig(untrustedConfig, configPropertyNames) {
@@ -2082,7 +2468,7 @@ function buildNetworkSnapshot(luvio, config, options) {
2082
2468
  });
2083
2469
  }
2084
2470
  function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
2085
- return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
2471
+ return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
2086
2472
  }
2087
2473
  function buildCachedSnapshotCachePolicy(context, storeLookup) {
2088
2474
  const { luvio, config } = context;
@@ -2097,8 +2483,8 @@ function buildCachedSnapshotCachePolicy(context, storeLookup) {
2097
2483
  });
2098
2484
  return cacheSnapshot;
2099
2485
  }
2100
- const getProductByIdAdapterFactory = (luvio) => function epc__getProductById(untrustedConfig, requestContext) {
2101
- const config = validateAdapterConfig(untrustedConfig, getProductById_ConfigPropertyNames);
2486
+ const getContextDefinitionInfoByIdAdapterFactory = (luvio) => function epc__getContextDefinitionInfoById(untrustedConfig, requestContext) {
2487
+ const config = validateAdapterConfig(untrustedConfig, getContextDefinitionInfoById_ConfigPropertyNames);
2102
2488
  // Invalid or incomplete config
2103
2489
  if (config === null) {
2104
2490
  return null;
@@ -2107,4 +2493,4 @@ const getProductByIdAdapterFactory = (luvio) => function epc__getProductById(unt
2107
2493
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
2108
2494
  };
2109
2495
 
2110
- export { createProductAttributeDefinitionAdapterFactory, deactivateAdapterFactory, getProductAttributesByProductIdAdapterFactory, getProductByIdAdapterFactory, getProductFlowByProductIdAdapterFactory };
2496
+ export { createProductAttributeDefinitionAdapterFactory, deactivateAdapterFactory, getContextDefinitionInfoByIdAdapterFactory, getProductAttributesByProductIdAdapterFactory, getProductByIdAdapterFactory, getProductFlowByProductIdAdapterFactory };