@salesforce/lds-adapters-industries-decisiontable 1.294.0 → 1.296.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/sfdc/index.js CHANGED
@@ -14,10 +14,10 @@
14
14
  /* proxy-compat-disable */
15
15
  import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
16
16
  import { withDefaultLuvio } from 'force/ldsEngine';
17
- import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$3, typeCheckConfig as typeCheckConfig$3, StoreKeyMap, createResourceParams as createResourceParams$3 } from 'force/luvioEngine';
17
+ import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$3, typeCheckConfig as typeCheckConfig$4, StoreKeyMap, createResourceParams as createResourceParams$4 } from 'force/luvioEngine';
18
18
 
19
19
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
20
- const { keys: ObjectKeys, create: ObjectCreate } = Object;
20
+ const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
21
21
  const { isArray: ArrayIsArray$1 } = Array;
22
22
  /**
23
23
  * Validates an adapter config is well-formed.
@@ -41,7 +41,7 @@ function validateConfig(config, adapter, oneOf) {
41
41
  throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
42
42
  }
43
43
  const supported = required.concat(optional);
44
- if (ObjectKeys(config).some(key => !supported.includes(key))) {
44
+ if (ObjectKeys$1(config).some(key => !supported.includes(key))) {
45
45
  throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
46
46
  }
47
47
  }
@@ -81,6 +81,7 @@ function buildAdapterValidationConfig(displayName, paramsMeta) {
81
81
  }
82
82
  const keyPrefix = 'DecisionTable';
83
83
 
84
+ const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
84
85
  const { isArray: ArrayIsArray } = Array;
85
86
  const { stringify: JSONStringify } = JSON;
86
87
  function createLink(ref) {
@@ -89,7 +90,7 @@ function createLink(ref) {
89
90
  };
90
91
  }
91
92
 
92
- function validate$9(obj, path = 'DecisionTableParameterOutputRepresentation') {
93
+ function validate$b(obj, path = 'DecisionTableParameterOutputRepresentation') {
93
94
  const v_error = (() => {
94
95
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
95
96
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -189,7 +190,7 @@ function validate$9(obj, path = 'DecisionTableParameterOutputRepresentation') {
189
190
  return v_error === undefined ? null : v_error;
190
191
  }
191
192
 
192
- function validate$8(obj, path = 'DecisionTableSourceCriteriaOutputRepresentation') {
193
+ function validate$a(obj, path = 'DecisionTableSourceCriteriaOutputRepresentation') {
193
194
  const v_error = (() => {
194
195
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
195
196
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -233,7 +234,7 @@ function validate$8(obj, path = 'DecisionTableSourceCriteriaOutputRepresentation
233
234
  return v_error === undefined ? null : v_error;
234
235
  }
235
236
 
236
- function validate$7(obj, path = 'DecisionTableDefinitionOutputRepresentation') {
237
+ function validate$9(obj, path = 'DecisionTableDefinitionOutputRepresentation') {
237
238
  const v_error = (() => {
238
239
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
239
240
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -295,7 +296,7 @@ function validate$7(obj, path = 'DecisionTableDefinitionOutputRepresentation') {
295
296
  for (let i = 0; i < obj_parameters.length; i++) {
296
297
  const obj_parameters_item = obj_parameters[i];
297
298
  const path_parameters_item = path_parameters + '[' + i + ']';
298
- const referencepath_parameters_itemValidationError = validate$9(obj_parameters_item, path_parameters_item);
299
+ const referencepath_parameters_itemValidationError = validate$b(obj_parameters_item, path_parameters_item);
299
300
  if (referencepath_parameters_itemValidationError !== null) {
300
301
  let message = 'Object doesn\'t match DecisionTableParameterOutputRepresentation (at "' + path_parameters_item + '")\n';
301
302
  message += referencepath_parameters_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -317,7 +318,7 @@ function validate$7(obj, path = 'DecisionTableDefinitionOutputRepresentation') {
317
318
  for (let i = 0; i < obj_sourceCriteria.length; i++) {
318
319
  const obj_sourceCriteria_item = obj_sourceCriteria[i];
319
320
  const path_sourceCriteria_item = path_sourceCriteria + '[' + i + ']';
320
- const referencepath_sourceCriteria_itemValidationError = validate$8(obj_sourceCriteria_item, path_sourceCriteria_item);
321
+ const referencepath_sourceCriteria_itemValidationError = validate$a(obj_sourceCriteria_item, path_sourceCriteria_item);
321
322
  if (referencepath_sourceCriteria_itemValidationError !== null) {
322
323
  let message = 'Object doesn\'t match DecisionTableSourceCriteriaOutputRepresentation (at "' + path_sourceCriteria_item + '")\n';
323
324
  message += referencepath_sourceCriteria_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -363,9 +364,9 @@ function validate$7(obj, path = 'DecisionTableDefinitionOutputRepresentation') {
363
364
  return v_error === undefined ? null : v_error;
364
365
  }
365
366
 
366
- const TTL$2 = 1000;
367
- const VERSION$2 = "21435364536c593ed8b8972af7d154d5";
368
- function validate$6(obj, path = 'DecisionTableOutputRepresentation') {
367
+ const TTL$3 = 1000;
368
+ const VERSION$3 = "21435364536c593ed8b8972af7d154d5";
369
+ function validate$8(obj, path = 'DecisionTableOutputRepresentation') {
369
370
  const v_error = (() => {
370
371
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
371
372
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -379,7 +380,7 @@ function validate$6(obj, path = 'DecisionTableOutputRepresentation') {
379
380
  }
380
381
  const obj_decisionTable = obj.decisionTable;
381
382
  const path_decisionTable = path + '.decisionTable';
382
- const referencepath_decisionTableValidationError = validate$7(obj_decisionTable, path_decisionTable);
383
+ const referencepath_decisionTableValidationError = validate$9(obj_decisionTable, path_decisionTable);
383
384
  if (referencepath_decisionTableValidationError !== null) {
384
385
  let message = 'Object doesn\'t match DecisionTableDefinitionOutputRepresentation (at "' + path_decisionTable + '")\n';
385
386
  message += referencepath_decisionTableValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -402,62 +403,62 @@ function validate$6(obj, path = 'DecisionTableOutputRepresentation') {
402
403
  })();
403
404
  return v_error === undefined ? null : v_error;
404
405
  }
405
- const RepresentationType$2 = 'DecisionTableOutputRepresentation';
406
- function normalize$2(input, existing, path, luvio, store, timestamp) {
406
+ const RepresentationType$3 = 'DecisionTableOutputRepresentation';
407
+ function normalize$3(input, existing, path, luvio, store, timestamp) {
407
408
  return input;
408
409
  }
409
- const select$5 = function DecisionTableOutputRepresentationSelect() {
410
+ const select$7 = function DecisionTableOutputRepresentationSelect() {
410
411
  return {
411
412
  kind: 'Fragment',
412
- version: VERSION$2,
413
+ version: VERSION$3,
413
414
  private: [],
414
415
  opaque: true
415
416
  };
416
417
  };
417
- function equals$2(existing, incoming) {
418
+ function equals$3(existing, incoming) {
418
419
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
419
420
  return false;
420
421
  }
421
422
  return true;
422
423
  }
423
- const ingest$2 = function DecisionTableOutputRepresentationIngest(input, path, luvio, store, timestamp) {
424
+ const ingest$3 = function DecisionTableOutputRepresentationIngest(input, path, luvio, store, timestamp) {
424
425
  if (process.env.NODE_ENV !== 'production') {
425
- const validateError = validate$6(input);
426
+ const validateError = validate$8(input);
426
427
  if (validateError !== null) {
427
428
  throw validateError;
428
429
  }
429
430
  }
430
431
  const key = path.fullPath;
431
- const ttlToUse = TTL$2;
432
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "DecisionTable", VERSION$2, RepresentationType$2, equals$2);
432
+ const ttlToUse = TTL$3;
433
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "DecisionTable", VERSION$3, RepresentationType$3, equals$3);
433
434
  return createLink(key);
434
435
  };
435
- function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
436
+ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
436
437
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
437
438
  const rootKey = fullPathFactory();
438
439
  rootKeySet.set(rootKey, {
439
440
  namespace: keyPrefix,
440
- representationName: RepresentationType$2,
441
+ representationName: RepresentationType$3,
441
442
  mergeable: false
442
443
  });
443
444
  }
444
445
 
445
- function select$4(luvio, params) {
446
- return select$5();
446
+ function select$6(luvio, params) {
447
+ return select$7();
447
448
  }
448
- function keyBuilder$5(luvio, params) {
449
+ function keyBuilder$6(luvio, params) {
449
450
  return keyPrefix + '::DecisionTableOutputRepresentation:(' + 'decisionTableId:' + params.urlParams.decisionTableId + ')';
450
451
  }
451
- function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
452
- getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$5(luvio, resourceParams));
452
+ function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
453
+ getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$6(luvio, resourceParams));
453
454
  }
454
- function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
455
+ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
455
456
  const { body } = response;
456
- const key = keyBuilder$5(luvio, resourceParams);
457
- luvio.storeIngest(key, ingest$2, body);
457
+ const key = keyBuilder$6(luvio, resourceParams);
458
+ luvio.storeIngest(key, ingest$3, body);
458
459
  const snapshot = luvio.storeLookup({
459
460
  recordId: key,
460
- node: select$4(),
461
+ node: select$6(),
461
462
  variables: {},
462
463
  }, snapshotRefresh);
463
464
  if (process.env.NODE_ENV !== 'production') {
@@ -469,18 +470,18 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
469
470
  return snapshot;
470
471
  }
471
472
  function ingestError$2(luvio, params, error, snapshotRefresh) {
472
- const key = keyBuilder$5(luvio, params);
473
+ const key = keyBuilder$6(luvio, params);
473
474
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
474
475
  const storeMetadataParams = {
475
- ttl: TTL$2,
476
+ ttl: TTL$3,
476
477
  namespace: keyPrefix,
477
- version: VERSION$2,
478
- representationName: RepresentationType$2
478
+ version: VERSION$3,
479
+ representationName: RepresentationType$3
479
480
  };
480
481
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
481
482
  return errorSnapshot;
482
483
  }
483
- function createResourceRequest$2(config) {
484
+ function createResourceRequest$3(config) {
484
485
  const headers = {};
485
486
  return {
486
487
  baseUri: '/services/data/v62.0',
@@ -494,60 +495,60 @@ function createResourceRequest$2(config) {
494
495
  };
495
496
  }
496
497
 
497
- const adapterName$2 = 'getDecisionTable';
498
+ const adapterName$3 = 'getDecisionTable';
498
499
  const getDecisionTable_ConfigPropertyMetadata = [
499
500
  generateParamConfigMetadata('decisionTableId', true, 0 /* UrlParameter */, 0 /* String */),
500
501
  ];
501
- const getDecisionTable_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getDecisionTable_ConfigPropertyMetadata);
502
- const createResourceParams$2 = /*#__PURE__*/ createResourceParams$3(getDecisionTable_ConfigPropertyMetadata);
503
- function keyBuilder$4(luvio, config) {
504
- const resourceParams = createResourceParams$2(config);
505
- return keyBuilder$5(luvio, resourceParams);
502
+ const getDecisionTable_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getDecisionTable_ConfigPropertyMetadata);
503
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$4(getDecisionTable_ConfigPropertyMetadata);
504
+ function keyBuilder$5(luvio, config) {
505
+ const resourceParams = createResourceParams$3(config);
506
+ return keyBuilder$6(luvio, resourceParams);
506
507
  }
507
- function typeCheckConfig$2(untrustedConfig) {
508
+ function typeCheckConfig$3(untrustedConfig) {
508
509
  const config = {};
509
- typeCheckConfig$3(untrustedConfig, config, getDecisionTable_ConfigPropertyMetadata);
510
+ typeCheckConfig$4(untrustedConfig, config, getDecisionTable_ConfigPropertyMetadata);
510
511
  return config;
511
512
  }
512
- function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
513
+ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
513
514
  if (!untrustedIsObject(untrustedConfig)) {
514
515
  return null;
515
516
  }
516
517
  if (process.env.NODE_ENV !== 'production') {
517
518
  validateConfig(untrustedConfig, configPropertyNames);
518
519
  }
519
- const config = typeCheckConfig$2(untrustedConfig);
520
+ const config = typeCheckConfig$3(untrustedConfig);
520
521
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
521
522
  return null;
522
523
  }
523
524
  return config;
524
525
  }
525
526
  function adapterFragment$2(luvio, config) {
526
- createResourceParams$2(config);
527
- return select$4();
527
+ createResourceParams$3(config);
528
+ return select$6();
528
529
  }
529
530
  function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
530
- const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
531
+ const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
531
532
  config,
532
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
533
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
533
534
  });
534
535
  return luvio.storeBroadcast().then(() => snapshot);
535
536
  }
536
537
  function onFetchResponseError$2(luvio, config, resourceParams, response) {
537
538
  const snapshot = ingestError$2(luvio, resourceParams, response, {
538
539
  config,
539
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
540
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
540
541
  });
541
542
  return luvio.storeBroadcast().then(() => snapshot);
542
543
  }
543
- function buildNetworkSnapshot$2(luvio, config, options) {
544
- const resourceParams = createResourceParams$2(config);
545
- const request = createResourceRequest$2(resourceParams);
544
+ function buildNetworkSnapshot$3(luvio, config, options) {
545
+ const resourceParams = createResourceParams$3(config);
546
+ const request = createResourceRequest$3(resourceParams);
546
547
  return luvio.dispatchResourceRequest(request, options)
547
548
  .then((response) => {
548
549
  return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
549
550
  const cache = new StoreKeyMap();
550
- getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
551
+ getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
551
552
  return cache;
552
553
  });
553
554
  }, (response) => {
@@ -555,23 +556,23 @@ function buildNetworkSnapshot$2(luvio, config, options) {
555
556
  });
556
557
  }
557
558
  function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
558
- return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
559
+ return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
559
560
  }
560
561
  function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
561
562
  const { luvio, config } = context;
562
563
  const selector = {
563
- recordId: keyBuilder$4(luvio, config),
564
+ recordId: keyBuilder$5(luvio, config),
564
565
  node: adapterFragment$2(luvio, config),
565
566
  variables: {},
566
567
  };
567
568
  const cacheSnapshot = storeLookup(selector, {
568
569
  config,
569
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
570
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
570
571
  });
571
572
  return cacheSnapshot;
572
573
  }
573
574
  const getDecisionTableAdapterFactory = (luvio) => function DecisionTable__getDecisionTable(untrustedConfig, requestContext) {
574
- const config = validateAdapterConfig$2(untrustedConfig, getDecisionTable_ConfigPropertyNames);
575
+ const config = validateAdapterConfig$3(untrustedConfig, getDecisionTable_ConfigPropertyNames);
575
576
  // Invalid or incomplete config
576
577
  if (config === null) {
577
578
  return null;
@@ -580,7 +581,7 @@ const getDecisionTableAdapterFactory = (luvio) => function DecisionTable__getDec
580
581
  buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
581
582
  };
582
583
 
583
- function validate$5(obj, path = 'ErrorParametersOutputRepresentation') {
584
+ function validate$7(obj, path = 'ErrorParametersOutputRepresentation') {
584
585
  const v_error = (() => {
585
586
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
586
587
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -603,7 +604,7 @@ function validate$5(obj, path = 'ErrorParametersOutputRepresentation') {
603
604
  return v_error === undefined ? null : v_error;
604
605
  }
605
606
 
606
- function validate$4(obj, path = 'ErrorTargetsOutputRepresentation') {
607
+ function validate$6(obj, path = 'ErrorTargetsOutputRepresentation') {
607
608
  const v_error = (() => {
608
609
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
609
610
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -626,7 +627,7 @@ function validate$4(obj, path = 'ErrorTargetsOutputRepresentation') {
626
627
  return v_error === undefined ? null : v_error;
627
628
  }
628
629
 
629
- function validate$3(obj, path = 'ErrorOutputRepresentation') {
630
+ function validate$5(obj, path = 'ErrorOutputRepresentation') {
630
631
  const v_error = (() => {
631
632
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
632
633
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -661,7 +662,7 @@ function validate$3(obj, path = 'ErrorOutputRepresentation') {
661
662
  for (let i = 0; i < obj_parameters.length; i++) {
662
663
  const obj_parameters_item = obj_parameters[i];
663
664
  const path_parameters_item = path_parameters + '[' + i + ']';
664
- const referencepath_parameters_itemValidationError = validate$5(obj_parameters_item, path_parameters_item);
665
+ const referencepath_parameters_itemValidationError = validate$7(obj_parameters_item, path_parameters_item);
665
666
  if (referencepath_parameters_itemValidationError !== null) {
666
667
  let message = 'Object doesn\'t match ErrorParametersOutputRepresentation (at "' + path_parameters_item + '")\n';
667
668
  message += referencepath_parameters_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -678,7 +679,7 @@ function validate$3(obj, path = 'ErrorOutputRepresentation') {
678
679
  for (let i = 0; i < obj_targets.length; i++) {
679
680
  const obj_targets_item = obj_targets[i];
680
681
  const path_targets_item = path_targets + '[' + i + ']';
681
- const referencepath_targets_itemValidationError = validate$4(obj_targets_item, path_targets_item);
682
+ const referencepath_targets_itemValidationError = validate$6(obj_targets_item, path_targets_item);
682
683
  if (referencepath_targets_itemValidationError !== null) {
683
684
  let message = 'Object doesn\'t match ErrorTargetsOutputRepresentation (at "' + path_targets_item + '")\n';
684
685
  message += referencepath_targets_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -690,9 +691,9 @@ function validate$3(obj, path = 'ErrorOutputRepresentation') {
690
691
  return v_error === undefined ? null : v_error;
691
692
  }
692
693
 
693
- const TTL$1 = 1000;
694
- const VERSION$1 = "9a106f486843ccdb3e85594fb33ef97f";
695
- function validate$2(obj, path = 'DecisionTableTemplateDefinitionOutputRepresentation') {
694
+ const TTL$2 = 1000;
695
+ const VERSION$2 = "9a106f486843ccdb3e85594fb33ef97f";
696
+ function validate$4(obj, path = 'DecisionTableTemplateDefinitionOutputRepresentation') {
696
697
  const v_error = (() => {
697
698
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
698
699
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -700,7 +701,7 @@ function validate$2(obj, path = 'DecisionTableTemplateDefinitionOutputRepresenta
700
701
  if (obj.decisionTableTemplate !== undefined) {
701
702
  const obj_decisionTableTemplate = obj.decisionTableTemplate;
702
703
  const path_decisionTableTemplate = path + '.decisionTableTemplate';
703
- const referencepath_decisionTableTemplateValidationError = validate$7(obj_decisionTableTemplate, path_decisionTableTemplate);
704
+ const referencepath_decisionTableTemplateValidationError = validate$9(obj_decisionTableTemplate, path_decisionTableTemplate);
704
705
  if (referencepath_decisionTableTemplateValidationError !== null) {
705
706
  let message = 'Object doesn\'t match DecisionTableDefinitionOutputRepresentation (at "' + path_decisionTableTemplate + '")\n';
706
707
  message += referencepath_decisionTableTemplateValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -716,7 +717,7 @@ function validate$2(obj, path = 'DecisionTableTemplateDefinitionOutputRepresenta
716
717
  for (let i = 0; i < obj_errors.length; i++) {
717
718
  const obj_errors_item = obj_errors[i];
718
719
  const path_errors_item = path_errors + '[' + i + ']';
719
- const referencepath_errors_itemValidationError = validate$3(obj_errors_item, path_errors_item);
720
+ const referencepath_errors_itemValidationError = validate$5(obj_errors_item, path_errors_item);
720
721
  if (referencepath_errors_itemValidationError !== null) {
721
722
  let message = 'Object doesn\'t match ErrorOutputRepresentation (at "' + path_errors_item + '")\n';
722
723
  message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -727,62 +728,62 @@ function validate$2(obj, path = 'DecisionTableTemplateDefinitionOutputRepresenta
727
728
  })();
728
729
  return v_error === undefined ? null : v_error;
729
730
  }
730
- const RepresentationType$1 = 'DecisionTableTemplateDefinitionOutputRepresentation';
731
- function normalize$1(input, existing, path, luvio, store, timestamp) {
731
+ const RepresentationType$2 = 'DecisionTableTemplateDefinitionOutputRepresentation';
732
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
732
733
  return input;
733
734
  }
734
- const select$3 = function DecisionTableTemplateDefinitionOutputRepresentationSelect() {
735
+ const select$5 = function DecisionTableTemplateDefinitionOutputRepresentationSelect() {
735
736
  return {
736
737
  kind: 'Fragment',
737
- version: VERSION$1,
738
+ version: VERSION$2,
738
739
  private: [],
739
740
  opaque: true
740
741
  };
741
742
  };
742
- function equals$1(existing, incoming) {
743
+ function equals$2(existing, incoming) {
743
744
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
744
745
  return false;
745
746
  }
746
747
  return true;
747
748
  }
748
- const ingest$1 = function DecisionTableTemplateDefinitionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
749
+ const ingest$2 = function DecisionTableTemplateDefinitionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
749
750
  if (process.env.NODE_ENV !== 'production') {
750
- const validateError = validate$2(input);
751
+ const validateError = validate$4(input);
751
752
  if (validateError !== null) {
752
753
  throw validateError;
753
754
  }
754
755
  }
755
756
  const key = path.fullPath;
756
- const ttlToUse = TTL$1;
757
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "DecisionTable", VERSION$1, RepresentationType$1, equals$1);
757
+ const ttlToUse = TTL$2;
758
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "DecisionTable", VERSION$2, RepresentationType$2, equals$2);
758
759
  return createLink(key);
759
760
  };
760
- function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
761
+ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
761
762
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
762
763
  const rootKey = fullPathFactory();
763
764
  rootKeySet.set(rootKey, {
764
765
  namespace: keyPrefix,
765
- representationName: RepresentationType$1,
766
+ representationName: RepresentationType$2,
766
767
  mergeable: false
767
768
  });
768
769
  }
769
770
 
770
- function select$2(luvio, params) {
771
- return select$3();
771
+ function select$4(luvio, params) {
772
+ return select$5();
772
773
  }
773
- function keyBuilder$3(luvio, params) {
774
+ function keyBuilder$4(luvio, params) {
774
775
  return keyPrefix + '::DecisionTableTemplateDefinitionOutputRepresentation:(' + 'templateName:' + params.urlParams.templateName + ')';
775
776
  }
776
- function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
777
- getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
777
+ function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
778
+ getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$4(luvio, resourceParams));
778
779
  }
779
- function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
780
+ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
780
781
  const { body } = response;
781
- const key = keyBuilder$3(luvio, resourceParams);
782
- luvio.storeIngest(key, ingest$1, body);
782
+ const key = keyBuilder$4(luvio, resourceParams);
783
+ luvio.storeIngest(key, ingest$2, body);
783
784
  const snapshot = luvio.storeLookup({
784
785
  recordId: key,
785
- node: select$2(),
786
+ node: select$4(),
786
787
  variables: {},
787
788
  }, snapshotRefresh);
788
789
  if (process.env.NODE_ENV !== 'production') {
@@ -794,18 +795,18 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
794
795
  return snapshot;
795
796
  }
796
797
  function ingestError$1(luvio, params, error, snapshotRefresh) {
797
- const key = keyBuilder$3(luvio, params);
798
+ const key = keyBuilder$4(luvio, params);
798
799
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
799
800
  const storeMetadataParams = {
800
- ttl: TTL$1,
801
+ ttl: TTL$2,
801
802
  namespace: keyPrefix,
802
- version: VERSION$1,
803
- representationName: RepresentationType$1
803
+ version: VERSION$2,
804
+ representationName: RepresentationType$2
804
805
  };
805
806
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
806
807
  return errorSnapshot;
807
808
  }
808
- function createResourceRequest$1(config) {
809
+ function createResourceRequest$2(config) {
809
810
  const headers = {};
810
811
  return {
811
812
  baseUri: '/services/data/v62.0',
@@ -819,60 +820,60 @@ function createResourceRequest$1(config) {
819
820
  };
820
821
  }
821
822
 
822
- const adapterName$1 = 'getDecisionTableTemplate';
823
+ const adapterName$2 = 'getDecisionTableTemplate';
823
824
  const getDecisionTableTemplate_ConfigPropertyMetadata = [
824
825
  generateParamConfigMetadata('templateName', true, 0 /* UrlParameter */, 0 /* String */),
825
826
  ];
826
- const getDecisionTableTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getDecisionTableTemplate_ConfigPropertyMetadata);
827
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(getDecisionTableTemplate_ConfigPropertyMetadata);
828
- function keyBuilder$2(luvio, config) {
829
- const resourceParams = createResourceParams$1(config);
830
- return keyBuilder$3(luvio, resourceParams);
827
+ const getDecisionTableTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getDecisionTableTemplate_ConfigPropertyMetadata);
828
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$4(getDecisionTableTemplate_ConfigPropertyMetadata);
829
+ function keyBuilder$3(luvio, config) {
830
+ const resourceParams = createResourceParams$2(config);
831
+ return keyBuilder$4(luvio, resourceParams);
831
832
  }
832
- function typeCheckConfig$1(untrustedConfig) {
833
+ function typeCheckConfig$2(untrustedConfig) {
833
834
  const config = {};
834
- typeCheckConfig$3(untrustedConfig, config, getDecisionTableTemplate_ConfigPropertyMetadata);
835
+ typeCheckConfig$4(untrustedConfig, config, getDecisionTableTemplate_ConfigPropertyMetadata);
835
836
  return config;
836
837
  }
837
- function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
838
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
838
839
  if (!untrustedIsObject(untrustedConfig)) {
839
840
  return null;
840
841
  }
841
842
  if (process.env.NODE_ENV !== 'production') {
842
843
  validateConfig(untrustedConfig, configPropertyNames);
843
844
  }
844
- const config = typeCheckConfig$1(untrustedConfig);
845
+ const config = typeCheckConfig$2(untrustedConfig);
845
846
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
846
847
  return null;
847
848
  }
848
849
  return config;
849
850
  }
850
851
  function adapterFragment$1(luvio, config) {
851
- createResourceParams$1(config);
852
- return select$2();
852
+ createResourceParams$2(config);
853
+ return select$4();
853
854
  }
854
855
  function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
855
- const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
856
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
856
857
  config,
857
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
858
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
858
859
  });
859
860
  return luvio.storeBroadcast().then(() => snapshot);
860
861
  }
861
862
  function onFetchResponseError$1(luvio, config, resourceParams, response) {
862
863
  const snapshot = ingestError$1(luvio, resourceParams, response, {
863
864
  config,
864
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
865
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
865
866
  });
866
867
  return luvio.storeBroadcast().then(() => snapshot);
867
868
  }
868
- function buildNetworkSnapshot$1(luvio, config, options) {
869
- const resourceParams = createResourceParams$1(config);
870
- const request = createResourceRequest$1(resourceParams);
869
+ function buildNetworkSnapshot$2(luvio, config, options) {
870
+ const resourceParams = createResourceParams$2(config);
871
+ const request = createResourceRequest$2(resourceParams);
871
872
  return luvio.dispatchResourceRequest(request, options)
872
873
  .then((response) => {
873
874
  return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
874
875
  const cache = new StoreKeyMap();
875
- getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
876
+ getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
876
877
  return cache;
877
878
  });
878
879
  }, (response) => {
@@ -880,23 +881,23 @@ function buildNetworkSnapshot$1(luvio, config, options) {
880
881
  });
881
882
  }
882
883
  function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
883
- return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
884
+ return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
884
885
  }
885
886
  function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
886
887
  const { luvio, config } = context;
887
888
  const selector = {
888
- recordId: keyBuilder$2(luvio, config),
889
+ recordId: keyBuilder$3(luvio, config),
889
890
  node: adapterFragment$1(luvio, config),
890
891
  variables: {},
891
892
  };
892
893
  const cacheSnapshot = storeLookup(selector, {
893
894
  config,
894
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
895
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
895
896
  });
896
897
  return cacheSnapshot;
897
898
  }
898
899
  const getDecisionTableTemplateAdapterFactory = (luvio) => function DecisionTable__getDecisionTableTemplate(untrustedConfig, requestContext) {
899
- const config = validateAdapterConfig$1(untrustedConfig, getDecisionTableTemplate_ConfigPropertyNames);
900
+ const config = validateAdapterConfig$2(untrustedConfig, getDecisionTableTemplate_ConfigPropertyNames);
900
901
  // Invalid or incomplete config
901
902
  if (config === null) {
902
903
  return null;
@@ -905,7 +906,7 @@ const getDecisionTableTemplateAdapterFactory = (luvio) => function DecisionTable
905
906
  buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
906
907
  };
907
908
 
908
- function validate$1(obj, path = 'DecisionTableTemplateOutputRepresentation') {
909
+ function validate$3(obj, path = 'DecisionTableTemplateOutputRepresentation') {
909
910
  const v_error = (() => {
910
911
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
911
912
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -935,9 +936,9 @@ function validate$1(obj, path = 'DecisionTableTemplateOutputRepresentation') {
935
936
  return v_error === undefined ? null : v_error;
936
937
  }
937
938
 
938
- const TTL = 1000;
939
- const VERSION = "a2891bd122ab9f728d5937bf70b9f600";
940
- function validate(obj, path = 'DecisionTableTemplatesListOutputRepresentation') {
939
+ const TTL$1 = 1000;
940
+ const VERSION$1 = "a2891bd122ab9f728d5937bf70b9f600";
941
+ function validate$2(obj, path = 'DecisionTableTemplatesListOutputRepresentation') {
941
942
  const v_error = (() => {
942
943
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
943
944
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -951,7 +952,7 @@ function validate(obj, path = 'DecisionTableTemplatesListOutputRepresentation')
951
952
  for (let i = 0; i < obj_decisionTableTemplates.length; i++) {
952
953
  const obj_decisionTableTemplates_item = obj_decisionTableTemplates[i];
953
954
  const path_decisionTableTemplates_item = path_decisionTableTemplates + '[' + i + ']';
954
- const referencepath_decisionTableTemplates_itemValidationError = validate$1(obj_decisionTableTemplates_item, path_decisionTableTemplates_item);
955
+ const referencepath_decisionTableTemplates_itemValidationError = validate$3(obj_decisionTableTemplates_item, path_decisionTableTemplates_item);
955
956
  if (referencepath_decisionTableTemplates_itemValidationError !== null) {
956
957
  let message = 'Object doesn\'t match DecisionTableTemplateOutputRepresentation (at "' + path_decisionTableTemplates_item + '")\n';
957
958
  message += referencepath_decisionTableTemplates_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -968,7 +969,7 @@ function validate(obj, path = 'DecisionTableTemplatesListOutputRepresentation')
968
969
  for (let i = 0; i < obj_errors.length; i++) {
969
970
  const obj_errors_item = obj_errors[i];
970
971
  const path_errors_item = path_errors + '[' + i + ']';
971
- const referencepath_errors_itemValidationError = validate$3(obj_errors_item, path_errors_item);
972
+ const referencepath_errors_itemValidationError = validate$5(obj_errors_item, path_errors_item);
972
973
  if (referencepath_errors_itemValidationError !== null) {
973
974
  let message = 'Object doesn\'t match ErrorOutputRepresentation (at "' + path_errors_item + '")\n';
974
975
  message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -979,62 +980,62 @@ function validate(obj, path = 'DecisionTableTemplatesListOutputRepresentation')
979
980
  })();
980
981
  return v_error === undefined ? null : v_error;
981
982
  }
982
- const RepresentationType = 'DecisionTableTemplatesListOutputRepresentation';
983
- function normalize(input, existing, path, luvio, store, timestamp) {
983
+ const RepresentationType$1 = 'DecisionTableTemplatesListOutputRepresentation';
984
+ function normalize$1(input, existing, path, luvio, store, timestamp) {
984
985
  return input;
985
986
  }
986
- const select$1 = function DecisionTableTemplatesListOutputRepresentationSelect() {
987
+ const select$3 = function DecisionTableTemplatesListOutputRepresentationSelect() {
987
988
  return {
988
989
  kind: 'Fragment',
989
- version: VERSION,
990
+ version: VERSION$1,
990
991
  private: [],
991
992
  opaque: true
992
993
  };
993
994
  };
994
- function equals(existing, incoming) {
995
+ function equals$1(existing, incoming) {
995
996
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
996
997
  return false;
997
998
  }
998
999
  return true;
999
1000
  }
1000
- const ingest = function DecisionTableTemplatesListOutputRepresentationIngest(input, path, luvio, store, timestamp) {
1001
+ const ingest$1 = function DecisionTableTemplatesListOutputRepresentationIngest(input, path, luvio, store, timestamp) {
1001
1002
  if (process.env.NODE_ENV !== 'production') {
1002
- const validateError = validate(input);
1003
+ const validateError = validate$2(input);
1003
1004
  if (validateError !== null) {
1004
1005
  throw validateError;
1005
1006
  }
1006
1007
  }
1007
1008
  const key = path.fullPath;
1008
- const ttlToUse = TTL;
1009
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "DecisionTable", VERSION, RepresentationType, equals);
1009
+ const ttlToUse = TTL$1;
1010
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "DecisionTable", VERSION$1, RepresentationType$1, equals$1);
1010
1011
  return createLink(key);
1011
1012
  };
1012
- function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
1013
+ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
1013
1014
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1014
1015
  const rootKey = fullPathFactory();
1015
1016
  rootKeySet.set(rootKey, {
1016
1017
  namespace: keyPrefix,
1017
- representationName: RepresentationType,
1018
+ representationName: RepresentationType$1,
1018
1019
  mergeable: false
1019
1020
  });
1020
1021
  }
1021
1022
 
1022
- function select(luvio, params) {
1023
- return select$1();
1023
+ function select$2(luvio, params) {
1024
+ return select$3();
1024
1025
  }
1025
- function keyBuilder$1(luvio, params) {
1026
+ function keyBuilder$2(luvio, params) {
1026
1027
  return keyPrefix + '::DecisionTableTemplatesListOutputRepresentation:(' + 'usageType:' + params.queryParams.usageType + ')';
1027
1028
  }
1028
- function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
1029
- getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
1029
+ function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
1030
+ getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$2(luvio, resourceParams));
1030
1031
  }
1031
- function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
1032
+ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
1032
1033
  const { body } = response;
1033
- const key = keyBuilder$1(luvio, resourceParams);
1034
- luvio.storeIngest(key, ingest, body);
1034
+ const key = keyBuilder$2(luvio, resourceParams);
1035
+ luvio.storeIngest(key, ingest$1, body);
1035
1036
  const snapshot = luvio.storeLookup({
1036
1037
  recordId: key,
1037
- node: select(),
1038
+ node: select$2(),
1038
1039
  variables: {},
1039
1040
  }, snapshotRefresh);
1040
1041
  if (process.env.NODE_ENV !== 'production') {
@@ -1046,18 +1047,18 @@ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
1046
1047
  return snapshot;
1047
1048
  }
1048
1049
  function ingestError(luvio, params, error, snapshotRefresh) {
1049
- const key = keyBuilder$1(luvio, params);
1050
+ const key = keyBuilder$2(luvio, params);
1050
1051
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1051
1052
  const storeMetadataParams = {
1052
- ttl: TTL,
1053
+ ttl: TTL$1,
1053
1054
  namespace: keyPrefix,
1054
- version: VERSION,
1055
- representationName: RepresentationType
1055
+ version: VERSION$1,
1056
+ representationName: RepresentationType$1
1056
1057
  };
1057
1058
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1058
1059
  return errorSnapshot;
1059
1060
  }
1060
- function createResourceRequest(config) {
1061
+ function createResourceRequest$1(config) {
1061
1062
  const headers = {};
1062
1063
  return {
1063
1064
  baseUri: '/services/data/v62.0',
@@ -1071,60 +1072,60 @@ function createResourceRequest(config) {
1071
1072
  };
1072
1073
  }
1073
1074
 
1074
- const adapterName = 'getDecisionTableTemplateList';
1075
+ const adapterName$1 = 'getDecisionTableTemplateList';
1075
1076
  const getDecisionTableTemplateList_ConfigPropertyMetadata = [
1076
1077
  generateParamConfigMetadata('usageType', false, 1 /* QueryParameter */, 0 /* String */),
1077
1078
  ];
1078
- const getDecisionTableTemplateList_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getDecisionTableTemplateList_ConfigPropertyMetadata);
1079
- const createResourceParams = /*#__PURE__*/ createResourceParams$3(getDecisionTableTemplateList_ConfigPropertyMetadata);
1080
- function keyBuilder(luvio, config) {
1081
- const resourceParams = createResourceParams(config);
1082
- return keyBuilder$1(luvio, resourceParams);
1079
+ const getDecisionTableTemplateList_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getDecisionTableTemplateList_ConfigPropertyMetadata);
1080
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$4(getDecisionTableTemplateList_ConfigPropertyMetadata);
1081
+ function keyBuilder$1(luvio, config) {
1082
+ const resourceParams = createResourceParams$1(config);
1083
+ return keyBuilder$2(luvio, resourceParams);
1083
1084
  }
1084
- function typeCheckConfig(untrustedConfig) {
1085
+ function typeCheckConfig$1(untrustedConfig) {
1085
1086
  const config = {};
1086
- typeCheckConfig$3(untrustedConfig, config, getDecisionTableTemplateList_ConfigPropertyMetadata);
1087
+ typeCheckConfig$4(untrustedConfig, config, getDecisionTableTemplateList_ConfigPropertyMetadata);
1087
1088
  return config;
1088
1089
  }
1089
- function validateAdapterConfig(untrustedConfig, configPropertyNames) {
1090
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
1090
1091
  if (!untrustedIsObject(untrustedConfig)) {
1091
1092
  return null;
1092
1093
  }
1093
1094
  if (process.env.NODE_ENV !== 'production') {
1094
1095
  validateConfig(untrustedConfig, configPropertyNames);
1095
1096
  }
1096
- const config = typeCheckConfig(untrustedConfig);
1097
+ const config = typeCheckConfig$1(untrustedConfig);
1097
1098
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1098
1099
  return null;
1099
1100
  }
1100
1101
  return config;
1101
1102
  }
1102
1103
  function adapterFragment(luvio, config) {
1103
- createResourceParams(config);
1104
- return select();
1104
+ createResourceParams$1(config);
1105
+ return select$2();
1105
1106
  }
1106
1107
  function onFetchResponseSuccess(luvio, config, resourceParams, response) {
1107
- const snapshot = ingestSuccess(luvio, resourceParams, response, {
1108
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
1108
1109
  config,
1109
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
1110
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1110
1111
  });
1111
1112
  return luvio.storeBroadcast().then(() => snapshot);
1112
1113
  }
1113
1114
  function onFetchResponseError(luvio, config, resourceParams, response) {
1114
1115
  const snapshot = ingestError(luvio, resourceParams, response, {
1115
1116
  config,
1116
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
1117
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1117
1118
  });
1118
1119
  return luvio.storeBroadcast().then(() => snapshot);
1119
1120
  }
1120
- function buildNetworkSnapshot(luvio, config, options) {
1121
- const resourceParams = createResourceParams(config);
1122
- const request = createResourceRequest(resourceParams);
1121
+ function buildNetworkSnapshot$1(luvio, config, options) {
1122
+ const resourceParams = createResourceParams$1(config);
1123
+ const request = createResourceRequest$1(resourceParams);
1123
1124
  return luvio.dispatchResourceRequest(request, options)
1124
1125
  .then((response) => {
1125
1126
  return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
1126
1127
  const cache = new StoreKeyMap();
1127
- getResponseCacheKeys(cache, luvio, resourceParams, response.body);
1128
+ getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
1128
1129
  return cache;
1129
1130
  });
1130
1131
  }, (response) => {
@@ -1132,23 +1133,23 @@ function buildNetworkSnapshot(luvio, config, options) {
1132
1133
  });
1133
1134
  }
1134
1135
  function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
1135
- return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
1136
+ return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
1136
1137
  }
1137
1138
  function buildCachedSnapshotCachePolicy(context, storeLookup) {
1138
1139
  const { luvio, config } = context;
1139
1140
  const selector = {
1140
- recordId: keyBuilder(luvio, config),
1141
+ recordId: keyBuilder$1(luvio, config),
1141
1142
  node: adapterFragment(luvio, config),
1142
1143
  variables: {},
1143
1144
  };
1144
1145
  const cacheSnapshot = storeLookup(selector, {
1145
1146
  config,
1146
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
1147
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1147
1148
  });
1148
1149
  return cacheSnapshot;
1149
1150
  }
1150
1151
  const getDecisionTableTemplateListAdapterFactory = (luvio) => function DecisionTable__getDecisionTableTemplateList(untrustedConfig, requestContext) {
1151
- const config = validateAdapterConfig(untrustedConfig, getDecisionTableTemplateList_ConfigPropertyNames);
1152
+ const config = validateAdapterConfig$1(untrustedConfig, getDecisionTableTemplateList_ConfigPropertyNames);
1152
1153
  // Invalid or incomplete config
1153
1154
  if (config === null) {
1154
1155
  return null;
@@ -1157,9 +1158,243 @@ const getDecisionTableTemplateListAdapterFactory = (luvio) => function DecisionT
1157
1158
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
1158
1159
  };
1159
1160
 
1161
+ function validate$1(obj, path = 'DecisionTableRowInputRepresentation') {
1162
+ const v_error = (() => {
1163
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1164
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1165
+ }
1166
+ const obj_action = obj.action;
1167
+ const path_action = path + '.action';
1168
+ if (typeof obj_action !== 'string') {
1169
+ return new TypeError('Expected "string" but received "' + typeof obj_action + '" (at "' + path_action + '")');
1170
+ }
1171
+ const obj_id = obj.id;
1172
+ const path_id = path + '.id';
1173
+ if (typeof obj_id !== 'string') {
1174
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
1175
+ }
1176
+ const obj_name = obj.name;
1177
+ const path_name = path + '.name';
1178
+ if (typeof obj_name !== 'string') {
1179
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
1180
+ }
1181
+ const obj_rowData = obj.rowData;
1182
+ const path_rowData = path + '.rowData';
1183
+ if (typeof obj_rowData !== 'object' || ArrayIsArray(obj_rowData) || obj_rowData === null) {
1184
+ return new TypeError('Expected "object" but received "' + typeof obj_rowData + '" (at "' + path_rowData + '")');
1185
+ }
1186
+ const obj_rowData_keys = ObjectKeys(obj_rowData);
1187
+ for (let i = 0; i < obj_rowData_keys.length; i++) {
1188
+ const key = obj_rowData_keys[i];
1189
+ const obj_rowData_prop = obj_rowData[key];
1190
+ const path_rowData_prop = path_rowData + '["' + key + '"]';
1191
+ if (typeof obj_rowData_prop !== 'object' || ArrayIsArray(obj_rowData_prop) || obj_rowData_prop === null) {
1192
+ return new TypeError('Expected "object" but received "' + typeof obj_rowData_prop + '" (at "' + path_rowData_prop + '")');
1193
+ }
1194
+ }
1195
+ })();
1196
+ return v_error === undefined ? null : v_error;
1197
+ }
1198
+
1199
+ const TTL = 1000;
1200
+ const VERSION = "b20786da88bc707d39693989566d86c6";
1201
+ function validate(obj, path = 'DecisionTableDataOutputRepresentation') {
1202
+ const v_error = (() => {
1203
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1204
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1205
+ }
1206
+ if (obj.errorFileId !== undefined) {
1207
+ const obj_errorFileId = obj.errorFileId;
1208
+ const path_errorFileId = path + '.errorFileId';
1209
+ if (typeof obj_errorFileId !== 'string') {
1210
+ return new TypeError('Expected "string" but received "' + typeof obj_errorFileId + '" (at "' + path_errorFileId + '")');
1211
+ }
1212
+ }
1213
+ if (obj.errors !== undefined) {
1214
+ const obj_errors = obj.errors;
1215
+ const path_errors = path + '.errors';
1216
+ if (!ArrayIsArray(obj_errors)) {
1217
+ return new TypeError('Expected "array" but received "' + typeof obj_errors + '" (at "' + path_errors + '")');
1218
+ }
1219
+ for (let i = 0; i < obj_errors.length; i++) {
1220
+ const obj_errors_item = obj_errors[i];
1221
+ const path_errors_item = path_errors + '[' + i + ']';
1222
+ if (typeof obj_errors_item !== 'string') {
1223
+ return new TypeError('Expected "string" but received "' + typeof obj_errors_item + '" (at "' + path_errors_item + '")');
1224
+ }
1225
+ }
1226
+ }
1227
+ const obj_message = obj.message;
1228
+ const path_message = path + '.message';
1229
+ if (typeof obj_message !== 'string') {
1230
+ return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
1231
+ }
1232
+ const obj_success = obj.success;
1233
+ const path_success = path + '.success';
1234
+ if (typeof obj_success !== 'boolean') {
1235
+ return new TypeError('Expected "boolean" but received "' + typeof obj_success + '" (at "' + path_success + '")');
1236
+ }
1237
+ })();
1238
+ return v_error === undefined ? null : v_error;
1239
+ }
1240
+ const RepresentationType = 'DecisionTableDataOutputRepresentation';
1241
+ function keyBuilder(luvio, config) {
1242
+ return keyPrefix + '::' + RepresentationType + ':' + config.success;
1243
+ }
1244
+ function keyBuilderFromType(luvio, object) {
1245
+ const keyParams = {
1246
+ success: object.success
1247
+ };
1248
+ return keyBuilder(luvio, keyParams);
1249
+ }
1250
+ function normalize(input, existing, path, luvio, store, timestamp) {
1251
+ return input;
1252
+ }
1253
+ const select$1 = function DecisionTableDataOutputRepresentationSelect() {
1254
+ return {
1255
+ kind: 'Fragment',
1256
+ version: VERSION,
1257
+ private: [],
1258
+ opaque: true
1259
+ };
1260
+ };
1261
+ function equals(existing, incoming) {
1262
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
1263
+ return false;
1264
+ }
1265
+ return true;
1266
+ }
1267
+ const ingest = function DecisionTableDataOutputRepresentationIngest(input, path, luvio, store, timestamp) {
1268
+ if (process.env.NODE_ENV !== 'production') {
1269
+ const validateError = validate(input);
1270
+ if (validateError !== null) {
1271
+ throw validateError;
1272
+ }
1273
+ }
1274
+ const key = keyBuilderFromType(luvio, input);
1275
+ const ttlToUse = TTL;
1276
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "DecisionTable", VERSION, RepresentationType, equals);
1277
+ return createLink(key);
1278
+ };
1279
+ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
1280
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1281
+ const rootKey = keyBuilderFromType(luvio, input);
1282
+ rootKeySet.set(rootKey, {
1283
+ namespace: keyPrefix,
1284
+ representationName: RepresentationType,
1285
+ mergeable: false
1286
+ });
1287
+ }
1288
+
1289
+ function select(luvio, params) {
1290
+ return select$1();
1291
+ }
1292
+ function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
1293
+ getTypeCacheKeys(storeKeyMap, luvio, response);
1294
+ }
1295
+ function ingestSuccess(luvio, resourceParams, response) {
1296
+ const { body } = response;
1297
+ const key = keyBuilderFromType(luvio, body);
1298
+ luvio.storeIngest(key, ingest, body);
1299
+ const snapshot = luvio.storeLookup({
1300
+ recordId: key,
1301
+ node: select(),
1302
+ variables: {},
1303
+ });
1304
+ if (process.env.NODE_ENV !== 'production') {
1305
+ if (snapshot.state !== 'Fulfilled') {
1306
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1307
+ }
1308
+ }
1309
+ deepFreeze(snapshot.data);
1310
+ return snapshot;
1311
+ }
1312
+ function createResourceRequest(config) {
1313
+ const headers = {};
1314
+ return {
1315
+ baseUri: '/services/data/v62.0',
1316
+ basePath: '/connect/business-rules/decision-table/' + config.urlParams.decisionTableId + '/data',
1317
+ method: 'post',
1318
+ body: config.body,
1319
+ urlParams: config.urlParams,
1320
+ queryParams: {},
1321
+ headers,
1322
+ priority: 'normal',
1323
+ };
1324
+ }
1325
+
1326
+ const adapterName = 'postDecisionTableRows';
1327
+ const postDecisionTableRows_ConfigPropertyMetadata = [
1328
+ generateParamConfigMetadata('decisionTableId', true, 0 /* UrlParameter */, 0 /* String */),
1329
+ generateParamConfigMetadata('deleteAllRows', false, 2 /* Body */, 1 /* Boolean */),
1330
+ generateParamConfigMetadata('fileId', false, 2 /* Body */, 0 /* String */),
1331
+ generateParamConfigMetadata('rows', false, 2 /* Body */, 4 /* Unsupported */, true),
1332
+ ];
1333
+ const postDecisionTableRows_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, postDecisionTableRows_ConfigPropertyMetadata);
1334
+ const createResourceParams = /*#__PURE__*/ createResourceParams$4(postDecisionTableRows_ConfigPropertyMetadata);
1335
+ function typeCheckConfig(untrustedConfig) {
1336
+ const config = {};
1337
+ typeCheckConfig$4(untrustedConfig, config, postDecisionTableRows_ConfigPropertyMetadata);
1338
+ const untrustedConfig_rows = untrustedConfig.rows;
1339
+ if (ArrayIsArray$1(untrustedConfig_rows)) {
1340
+ const untrustedConfig_rows_array = [];
1341
+ for (let i = 0, arrayLength = untrustedConfig_rows.length; i < arrayLength; i++) {
1342
+ const untrustedConfig_rows_item = untrustedConfig_rows[i];
1343
+ const referenceDecisionTableRowInputRepresentationValidationError = validate$1(untrustedConfig_rows_item);
1344
+ if (referenceDecisionTableRowInputRepresentationValidationError === null) {
1345
+ untrustedConfig_rows_array.push(untrustedConfig_rows_item);
1346
+ }
1347
+ }
1348
+ config.rows = untrustedConfig_rows_array;
1349
+ }
1350
+ return config;
1351
+ }
1352
+ function validateAdapterConfig(untrustedConfig, configPropertyNames) {
1353
+ if (!untrustedIsObject(untrustedConfig)) {
1354
+ return null;
1355
+ }
1356
+ if (process.env.NODE_ENV !== 'production') {
1357
+ validateConfig(untrustedConfig, configPropertyNames);
1358
+ }
1359
+ const config = typeCheckConfig(untrustedConfig);
1360
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1361
+ return null;
1362
+ }
1363
+ return config;
1364
+ }
1365
+ function buildNetworkSnapshot(luvio, config, options) {
1366
+ const resourceParams = createResourceParams(config);
1367
+ const request = createResourceRequest(resourceParams);
1368
+ return luvio.dispatchResourceRequest(request, options)
1369
+ .then((response) => {
1370
+ return luvio.handleSuccessResponse(() => {
1371
+ const snapshot = ingestSuccess(luvio, resourceParams, response);
1372
+ return luvio.storeBroadcast().then(() => snapshot);
1373
+ }, () => {
1374
+ const cache = new StoreKeyMap();
1375
+ getResponseCacheKeys(cache, luvio, resourceParams, response.body);
1376
+ return cache;
1377
+ });
1378
+ }, (response) => {
1379
+ deepFreeze(response);
1380
+ throw response;
1381
+ });
1382
+ }
1383
+ const postDecisionTableRowsAdapterFactory = (luvio) => {
1384
+ return function postDecisionTableRows(untrustedConfig) {
1385
+ const config = validateAdapterConfig(untrustedConfig, postDecisionTableRows_ConfigPropertyNames);
1386
+ // Invalid or incomplete config
1387
+ if (config === null) {
1388
+ throw new Error('Invalid config for "postDecisionTableRows"');
1389
+ }
1390
+ return buildNetworkSnapshot(luvio, config);
1391
+ };
1392
+ };
1393
+
1160
1394
  let getDecisionTable;
1161
1395
  let getDecisionTableTemplate;
1162
1396
  let getDecisionTableTemplateList;
1397
+ let postDecisionTableRows;
1163
1398
  // Imperative GET Adapters
1164
1399
  let getDecisionTable_imperative;
1165
1400
  let getDecisionTableTemplate_imperative;
@@ -1186,10 +1421,15 @@ function bindExportsTo(luvio) {
1186
1421
  const getDecisionTable_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getDecisionTable', getDecisionTableAdapterFactory), getDecisionTableMetadata);
1187
1422
  const getDecisionTableTemplate_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getDecisionTableTemplate', getDecisionTableTemplateAdapterFactory), getDecisionTableTemplateMetadata);
1188
1423
  const getDecisionTableTemplateList_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getDecisionTableTemplateList', getDecisionTableTemplateListAdapterFactory), getDecisionTableTemplateListMetadata);
1424
+ function unwrapSnapshotData(factory) {
1425
+ const adapter = factory(luvio);
1426
+ return (config) => adapter(config).then((snapshot) => snapshot.data);
1427
+ }
1189
1428
  return {
1190
1429
  getDecisionTable: createWireAdapterConstructor(luvio, getDecisionTable_ldsAdapter, getDecisionTableMetadata),
1191
1430
  getDecisionTableTemplate: createWireAdapterConstructor(luvio, getDecisionTableTemplate_ldsAdapter, getDecisionTableTemplateMetadata),
1192
1431
  getDecisionTableTemplateList: createWireAdapterConstructor(luvio, getDecisionTableTemplateList_ldsAdapter, getDecisionTableTemplateListMetadata),
1432
+ postDecisionTableRows: unwrapSnapshotData(postDecisionTableRowsAdapterFactory),
1193
1433
  // Imperative GET Adapters
1194
1434
  getDecisionTable_imperative: createImperativeAdapter(luvio, getDecisionTable_ldsAdapter, getDecisionTableMetadata),
1195
1435
  getDecisionTableTemplate_imperative: createImperativeAdapter(luvio, getDecisionTableTemplate_ldsAdapter, getDecisionTableTemplateMetadata),
@@ -1202,11 +1442,12 @@ withDefaultLuvio((luvio) => {
1202
1442
  getDecisionTable,
1203
1443
  getDecisionTableTemplate,
1204
1444
  getDecisionTableTemplateList,
1445
+ postDecisionTableRows,
1205
1446
  getDecisionTable_imperative,
1206
1447
  getDecisionTableTemplate_imperative,
1207
1448
  getDecisionTableTemplateList_imperative,
1208
1449
  } = bindExportsTo(luvio));
1209
1450
  });
1210
1451
 
1211
- export { getDecisionTable, getDecisionTableTemplate, getDecisionTableTemplateList, getDecisionTableTemplateList_imperative, getDecisionTableTemplate_imperative, getDecisionTable_imperative };
1212
- // version: 1.294.0-e7eb16228
1452
+ export { getDecisionTable, getDecisionTableTemplate, getDecisionTableTemplateList, getDecisionTableTemplateList_imperative, getDecisionTableTemplate_imperative, getDecisionTable_imperative, postDecisionTableRows };
1453
+ // version: 1.296.0-b5e933418