@salesforce/lds-adapters-industries-decisiontable 1.298.0 → 1.300.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/es2018/industries-decisiontable.js +596 -354
- package/dist/es/es2018/types/src/generated/adapters/getDecisionTableFile.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/adapters/getDecisionTableRows.d.ts +0 -3
- package/dist/es/es2018/types/src/generated/adapters/postDecisionTableFile.d.ts +17 -0
- package/dist/es/es2018/types/src/generated/adapters/postDecisionTableRows.d.ts +0 -2
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +4 -1
- package/dist/es/es2018/types/src/generated/resources/getConnectBusinessRulesDecisionTableDataByDecisionTableId.d.ts +0 -3
- package/dist/es/es2018/types/src/generated/resources/getConnectBusinessRulesDecisionTableFileByDecisionTableId.d.ts +18 -0
- package/dist/es/es2018/types/src/generated/resources/postConnectBusinessRulesDecisionTableDataByDecisionTableId.d.ts +0 -2
- package/dist/es/es2018/types/src/generated/resources/postConnectBusinessRulesDecisionTableFileByDecisionTableId.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/types/DecisionTableDataOutputRepresentation.d.ts +6 -12
- package/dist/es/es2018/types/src/generated/types/DecisionTableFileInputRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/DecisionTableFileOutputRepresentation.d.ts +38 -0
- package/dist/es/es2018/types/src/generated/types/DecisionTableRowInputRepresentation.d.ts +1 -4
- package/dist/es/es2018/types/src/generated/types/DecisionTableRowOutputRepresentation.d.ts +1 -4
- package/dist/es/es2018/types/src/generated/types/DecisionTableRowsListInputRepresentation.d.ts +1 -7
- package/dist/es/es2018/types/src/generated/types/DecisionTableRowsListOutputRepresentation.d.ts +1 -4
- package/package.json +3 -3
- package/sfdc/index.js +452 -195
- package/src/raml/api.raml +89 -71
- package/src/raml/luvio.raml +21 -9
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$5, typeCheckConfig as typeCheckConfig$7, StoreKeyMap, createResourceParams as createResourceParams$7 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -80,7 +80,7 @@ function createLink(ref) {
|
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
function validate$
|
|
83
|
+
function validate$e(obj, path = 'DecisionTableParameterOutputRepresentation') {
|
|
84
84
|
const v_error = (() => {
|
|
85
85
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
86
86
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -180,7 +180,7 @@ function validate$d(obj, path = 'DecisionTableParameterOutputRepresentation') {
|
|
|
180
180
|
return v_error === undefined ? null : v_error;
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
function validate$
|
|
183
|
+
function validate$d(obj, path = 'DecisionTableSourceCriteriaOutputRepresentation') {
|
|
184
184
|
const v_error = (() => {
|
|
185
185
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
186
186
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -224,7 +224,7 @@ function validate$c(obj, path = 'DecisionTableSourceCriteriaOutputRepresentation
|
|
|
224
224
|
return v_error === undefined ? null : v_error;
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
function validate$
|
|
227
|
+
function validate$c(obj, path = 'DecisionTableDefinitionOutputRepresentation') {
|
|
228
228
|
const v_error = (() => {
|
|
229
229
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
230
230
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -286,7 +286,7 @@ function validate$b(obj, path = 'DecisionTableDefinitionOutputRepresentation') {
|
|
|
286
286
|
for (let i = 0; i < obj_parameters.length; i++) {
|
|
287
287
|
const obj_parameters_item = obj_parameters[i];
|
|
288
288
|
const path_parameters_item = path_parameters + '[' + i + ']';
|
|
289
|
-
const referencepath_parameters_itemValidationError = validate$
|
|
289
|
+
const referencepath_parameters_itemValidationError = validate$e(obj_parameters_item, path_parameters_item);
|
|
290
290
|
if (referencepath_parameters_itemValidationError !== null) {
|
|
291
291
|
let message = 'Object doesn\'t match DecisionTableParameterOutputRepresentation (at "' + path_parameters_item + '")\n';
|
|
292
292
|
message += referencepath_parameters_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -308,7 +308,7 @@ function validate$b(obj, path = 'DecisionTableDefinitionOutputRepresentation') {
|
|
|
308
308
|
for (let i = 0; i < obj_sourceCriteria.length; i++) {
|
|
309
309
|
const obj_sourceCriteria_item = obj_sourceCriteria[i];
|
|
310
310
|
const path_sourceCriteria_item = path_sourceCriteria + '[' + i + ']';
|
|
311
|
-
const referencepath_sourceCriteria_itemValidationError = validate$
|
|
311
|
+
const referencepath_sourceCriteria_itemValidationError = validate$d(obj_sourceCriteria_item, path_sourceCriteria_item);
|
|
312
312
|
if (referencepath_sourceCriteria_itemValidationError !== null) {
|
|
313
313
|
let message = 'Object doesn\'t match DecisionTableSourceCriteriaOutputRepresentation (at "' + path_sourceCriteria_item + '")\n';
|
|
314
314
|
message += referencepath_sourceCriteria_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -354,9 +354,9 @@ function validate$b(obj, path = 'DecisionTableDefinitionOutputRepresentation') {
|
|
|
354
354
|
return v_error === undefined ? null : v_error;
|
|
355
355
|
}
|
|
356
356
|
|
|
357
|
-
const TTL$
|
|
358
|
-
const VERSION$
|
|
359
|
-
function validate$
|
|
357
|
+
const TTL$5 = 1000;
|
|
358
|
+
const VERSION$5 = "21435364536c593ed8b8972af7d154d5";
|
|
359
|
+
function validate$b(obj, path = 'DecisionTableOutputRepresentation') {
|
|
360
360
|
const v_error = (() => {
|
|
361
361
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
362
362
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -370,7 +370,7 @@ function validate$a(obj, path = 'DecisionTableOutputRepresentation') {
|
|
|
370
370
|
}
|
|
371
371
|
const obj_decisionTable = obj.decisionTable;
|
|
372
372
|
const path_decisionTable = path + '.decisionTable';
|
|
373
|
-
const referencepath_decisionTableValidationError = validate$
|
|
373
|
+
const referencepath_decisionTableValidationError = validate$c(obj_decisionTable, path_decisionTable);
|
|
374
374
|
if (referencepath_decisionTableValidationError !== null) {
|
|
375
375
|
let message = 'Object doesn\'t match DecisionTableDefinitionOutputRepresentation (at "' + path_decisionTable + '")\n';
|
|
376
376
|
message += referencepath_decisionTableValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -393,62 +393,62 @@ function validate$a(obj, path = 'DecisionTableOutputRepresentation') {
|
|
|
393
393
|
})();
|
|
394
394
|
return v_error === undefined ? null : v_error;
|
|
395
395
|
}
|
|
396
|
-
const RepresentationType$
|
|
397
|
-
function normalize$
|
|
396
|
+
const RepresentationType$5 = 'DecisionTableOutputRepresentation';
|
|
397
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
398
398
|
return input;
|
|
399
399
|
}
|
|
400
|
-
const select$
|
|
400
|
+
const select$c = function DecisionTableOutputRepresentationSelect() {
|
|
401
401
|
return {
|
|
402
402
|
kind: 'Fragment',
|
|
403
|
-
version: VERSION$
|
|
403
|
+
version: VERSION$5,
|
|
404
404
|
private: [],
|
|
405
405
|
opaque: true
|
|
406
406
|
};
|
|
407
407
|
};
|
|
408
|
-
function equals$
|
|
408
|
+
function equals$5(existing, incoming) {
|
|
409
409
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
410
410
|
return false;
|
|
411
411
|
}
|
|
412
412
|
return true;
|
|
413
413
|
}
|
|
414
|
-
const ingest$
|
|
414
|
+
const ingest$5 = function DecisionTableOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
415
415
|
if (process.env.NODE_ENV !== 'production') {
|
|
416
|
-
const validateError = validate$
|
|
416
|
+
const validateError = validate$b(input);
|
|
417
417
|
if (validateError !== null) {
|
|
418
418
|
throw validateError;
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
421
|
const key = path.fullPath;
|
|
422
|
-
const ttlToUse = TTL$
|
|
423
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
422
|
+
const ttlToUse = TTL$5;
|
|
423
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "DecisionTable", VERSION$5, RepresentationType$5, equals$5);
|
|
424
424
|
return createLink(key);
|
|
425
425
|
};
|
|
426
|
-
function getTypeCacheKeys$
|
|
426
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
427
427
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
428
428
|
const rootKey = fullPathFactory();
|
|
429
429
|
rootKeySet.set(rootKey, {
|
|
430
430
|
namespace: keyPrefix,
|
|
431
|
-
representationName: RepresentationType$
|
|
431
|
+
representationName: RepresentationType$5,
|
|
432
432
|
mergeable: false
|
|
433
433
|
});
|
|
434
434
|
}
|
|
435
435
|
|
|
436
|
-
function select$
|
|
437
|
-
return select$
|
|
436
|
+
function select$b(luvio, params) {
|
|
437
|
+
return select$c();
|
|
438
438
|
}
|
|
439
|
-
function keyBuilder$
|
|
439
|
+
function keyBuilder$b(luvio, params) {
|
|
440
440
|
return keyPrefix + '::DecisionTableOutputRepresentation:(' + 'decisionTableId:' + params.urlParams.decisionTableId + ')';
|
|
441
441
|
}
|
|
442
|
-
function getResponseCacheKeys$
|
|
443
|
-
getTypeCacheKeys$
|
|
442
|
+
function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
|
|
443
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response, () => keyBuilder$b(luvio, resourceParams));
|
|
444
444
|
}
|
|
445
|
-
function ingestSuccess$
|
|
445
|
+
function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
446
446
|
const { body } = response;
|
|
447
|
-
const key = keyBuilder$
|
|
448
|
-
luvio.storeIngest(key, ingest$
|
|
447
|
+
const key = keyBuilder$b(luvio, resourceParams);
|
|
448
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
449
449
|
const snapshot = luvio.storeLookup({
|
|
450
450
|
recordId: key,
|
|
451
|
-
node: select$
|
|
451
|
+
node: select$b(),
|
|
452
452
|
variables: {},
|
|
453
453
|
}, snapshotRefresh);
|
|
454
454
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -459,19 +459,19 @@ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
459
459
|
deepFreeze(snapshot.data);
|
|
460
460
|
return snapshot;
|
|
461
461
|
}
|
|
462
|
-
function ingestError$
|
|
463
|
-
const key = keyBuilder$
|
|
462
|
+
function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
463
|
+
const key = keyBuilder$b(luvio, params);
|
|
464
464
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
465
465
|
const storeMetadataParams = {
|
|
466
|
-
ttl: TTL$
|
|
466
|
+
ttl: TTL$5,
|
|
467
467
|
namespace: keyPrefix,
|
|
468
|
-
version: VERSION$
|
|
469
|
-
representationName: RepresentationType$
|
|
468
|
+
version: VERSION$5,
|
|
469
|
+
representationName: RepresentationType$5
|
|
470
470
|
};
|
|
471
471
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
472
472
|
return errorSnapshot;
|
|
473
473
|
}
|
|
474
|
-
function createResourceRequest$
|
|
474
|
+
function createResourceRequest$6(config) {
|
|
475
475
|
const headers = {};
|
|
476
476
|
return {
|
|
477
477
|
baseUri: '/services/data/v62.0',
|
|
@@ -485,93 +485,93 @@ function createResourceRequest$4(config) {
|
|
|
485
485
|
};
|
|
486
486
|
}
|
|
487
487
|
|
|
488
|
-
const adapterName$
|
|
488
|
+
const adapterName$6 = 'getDecisionTable';
|
|
489
489
|
const getDecisionTable_ConfigPropertyMetadata = [
|
|
490
490
|
generateParamConfigMetadata('decisionTableId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
491
491
|
];
|
|
492
|
-
const getDecisionTable_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
493
|
-
const createResourceParams$
|
|
494
|
-
function keyBuilder$
|
|
495
|
-
const resourceParams = createResourceParams$
|
|
496
|
-
return keyBuilder$
|
|
492
|
+
const getDecisionTable_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, getDecisionTable_ConfigPropertyMetadata);
|
|
493
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$7(getDecisionTable_ConfigPropertyMetadata);
|
|
494
|
+
function keyBuilder$a(luvio, config) {
|
|
495
|
+
const resourceParams = createResourceParams$6(config);
|
|
496
|
+
return keyBuilder$b(luvio, resourceParams);
|
|
497
497
|
}
|
|
498
|
-
function typeCheckConfig$
|
|
498
|
+
function typeCheckConfig$6(untrustedConfig) {
|
|
499
499
|
const config = {};
|
|
500
|
-
typeCheckConfig$
|
|
500
|
+
typeCheckConfig$7(untrustedConfig, config, getDecisionTable_ConfigPropertyMetadata);
|
|
501
501
|
return config;
|
|
502
502
|
}
|
|
503
|
-
function validateAdapterConfig$
|
|
503
|
+
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
504
504
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
505
505
|
return null;
|
|
506
506
|
}
|
|
507
507
|
if (process.env.NODE_ENV !== 'production') {
|
|
508
508
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
509
509
|
}
|
|
510
|
-
const config = typeCheckConfig$
|
|
510
|
+
const config = typeCheckConfig$6(untrustedConfig);
|
|
511
511
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
512
512
|
return null;
|
|
513
513
|
}
|
|
514
514
|
return config;
|
|
515
515
|
}
|
|
516
|
-
function adapterFragment$
|
|
517
|
-
createResourceParams$
|
|
518
|
-
return select$
|
|
516
|
+
function adapterFragment$4(luvio, config) {
|
|
517
|
+
createResourceParams$6(config);
|
|
518
|
+
return select$b();
|
|
519
519
|
}
|
|
520
|
-
function onFetchResponseSuccess$
|
|
521
|
-
const snapshot = ingestSuccess$
|
|
520
|
+
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
521
|
+
const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
|
|
522
522
|
config,
|
|
523
|
-
resolve: () => buildNetworkSnapshot$
|
|
523
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
524
524
|
});
|
|
525
525
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
526
526
|
}
|
|
527
|
-
function onFetchResponseError$
|
|
528
|
-
const snapshot = ingestError$
|
|
527
|
+
function onFetchResponseError$4(luvio, config, resourceParams, response) {
|
|
528
|
+
const snapshot = ingestError$4(luvio, resourceParams, response, {
|
|
529
529
|
config,
|
|
530
|
-
resolve: () => buildNetworkSnapshot$
|
|
530
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
531
531
|
});
|
|
532
532
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
533
533
|
}
|
|
534
|
-
function buildNetworkSnapshot$
|
|
535
|
-
const resourceParams = createResourceParams$
|
|
536
|
-
const request = createResourceRequest$
|
|
534
|
+
function buildNetworkSnapshot$6(luvio, config, options) {
|
|
535
|
+
const resourceParams = createResourceParams$6(config);
|
|
536
|
+
const request = createResourceRequest$6(resourceParams);
|
|
537
537
|
return luvio.dispatchResourceRequest(request, options)
|
|
538
538
|
.then((response) => {
|
|
539
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
539
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
|
|
540
540
|
const cache = new StoreKeyMap();
|
|
541
|
-
getResponseCacheKeys$
|
|
541
|
+
getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
|
|
542
542
|
return cache;
|
|
543
543
|
});
|
|
544
544
|
}, (response) => {
|
|
545
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
545
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
|
|
546
546
|
});
|
|
547
547
|
}
|
|
548
|
-
function buildNetworkSnapshotCachePolicy$
|
|
549
|
-
return buildNetworkSnapshotCachePolicy$
|
|
548
|
+
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
549
|
+
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, undefined, false);
|
|
550
550
|
}
|
|
551
|
-
function buildCachedSnapshotCachePolicy$
|
|
551
|
+
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
552
552
|
const { luvio, config } = context;
|
|
553
553
|
const selector = {
|
|
554
|
-
recordId: keyBuilder$
|
|
555
|
-
node: adapterFragment$
|
|
554
|
+
recordId: keyBuilder$a(luvio, config),
|
|
555
|
+
node: adapterFragment$4(luvio, config),
|
|
556
556
|
variables: {},
|
|
557
557
|
};
|
|
558
558
|
const cacheSnapshot = storeLookup(selector, {
|
|
559
559
|
config,
|
|
560
|
-
resolve: () => buildNetworkSnapshot$
|
|
560
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
561
561
|
});
|
|
562
562
|
return cacheSnapshot;
|
|
563
563
|
}
|
|
564
564
|
const getDecisionTableAdapterFactory = (luvio) => function DecisionTable__getDecisionTable(untrustedConfig, requestContext) {
|
|
565
|
-
const config = validateAdapterConfig$
|
|
565
|
+
const config = validateAdapterConfig$6(untrustedConfig, getDecisionTable_ConfigPropertyNames);
|
|
566
566
|
// Invalid or incomplete config
|
|
567
567
|
if (config === null) {
|
|
568
568
|
return null;
|
|
569
569
|
}
|
|
570
570
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
571
|
-
buildCachedSnapshotCachePolicy$
|
|
571
|
+
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
|
|
572
572
|
};
|
|
573
573
|
|
|
574
|
-
function validate$
|
|
574
|
+
function validate$a(obj, path = 'DecisionTableTemplateOutputRepresentation') {
|
|
575
575
|
const v_error = (() => {
|
|
576
576
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
577
577
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -601,7 +601,7 @@ function validate$9(obj, path = 'DecisionTableTemplateOutputRepresentation') {
|
|
|
601
601
|
return v_error === undefined ? null : v_error;
|
|
602
602
|
}
|
|
603
603
|
|
|
604
|
-
function validate$
|
|
604
|
+
function validate$9(obj, path = 'ErrorParametersOutputRepresentation') {
|
|
605
605
|
const v_error = (() => {
|
|
606
606
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
607
607
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -624,7 +624,7 @@ function validate$8(obj, path = 'ErrorParametersOutputRepresentation') {
|
|
|
624
624
|
return v_error === undefined ? null : v_error;
|
|
625
625
|
}
|
|
626
626
|
|
|
627
|
-
function validate$
|
|
627
|
+
function validate$8(obj, path = 'ErrorTargetsOutputRepresentation') {
|
|
628
628
|
const v_error = (() => {
|
|
629
629
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
630
630
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -647,7 +647,7 @@ function validate$7(obj, path = 'ErrorTargetsOutputRepresentation') {
|
|
|
647
647
|
return v_error === undefined ? null : v_error;
|
|
648
648
|
}
|
|
649
649
|
|
|
650
|
-
function validate$
|
|
650
|
+
function validate$7(obj, path = 'ErrorOutputRepresentation') {
|
|
651
651
|
const v_error = (() => {
|
|
652
652
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
653
653
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -682,7 +682,7 @@ function validate$6(obj, path = 'ErrorOutputRepresentation') {
|
|
|
682
682
|
for (let i = 0; i < obj_parameters.length; i++) {
|
|
683
683
|
const obj_parameters_item = obj_parameters[i];
|
|
684
684
|
const path_parameters_item = path_parameters + '[' + i + ']';
|
|
685
|
-
const referencepath_parameters_itemValidationError = validate$
|
|
685
|
+
const referencepath_parameters_itemValidationError = validate$9(obj_parameters_item, path_parameters_item);
|
|
686
686
|
if (referencepath_parameters_itemValidationError !== null) {
|
|
687
687
|
let message = 'Object doesn\'t match ErrorParametersOutputRepresentation (at "' + path_parameters_item + '")\n';
|
|
688
688
|
message += referencepath_parameters_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -699,7 +699,7 @@ function validate$6(obj, path = 'ErrorOutputRepresentation') {
|
|
|
699
699
|
for (let i = 0; i < obj_targets.length; i++) {
|
|
700
700
|
const obj_targets_item = obj_targets[i];
|
|
701
701
|
const path_targets_item = path_targets + '[' + i + ']';
|
|
702
|
-
const referencepath_targets_itemValidationError = validate$
|
|
702
|
+
const referencepath_targets_itemValidationError = validate$8(obj_targets_item, path_targets_item);
|
|
703
703
|
if (referencepath_targets_itemValidationError !== null) {
|
|
704
704
|
let message = 'Object doesn\'t match ErrorTargetsOutputRepresentation (at "' + path_targets_item + '")\n';
|
|
705
705
|
message += referencepath_targets_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -711,9 +711,9 @@ function validate$6(obj, path = 'ErrorOutputRepresentation') {
|
|
|
711
711
|
return v_error === undefined ? null : v_error;
|
|
712
712
|
}
|
|
713
713
|
|
|
714
|
-
const TTL$
|
|
715
|
-
const VERSION$
|
|
716
|
-
function validate$
|
|
714
|
+
const TTL$4 = 1000;
|
|
715
|
+
const VERSION$4 = "a2891bd122ab9f728d5937bf70b9f600";
|
|
716
|
+
function validate$6(obj, path = 'DecisionTableTemplatesListOutputRepresentation') {
|
|
717
717
|
const v_error = (() => {
|
|
718
718
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
719
719
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -727,7 +727,7 @@ function validate$5(obj, path = 'DecisionTableTemplatesListOutputRepresentation'
|
|
|
727
727
|
for (let i = 0; i < obj_decisionTableTemplates.length; i++) {
|
|
728
728
|
const obj_decisionTableTemplates_item = obj_decisionTableTemplates[i];
|
|
729
729
|
const path_decisionTableTemplates_item = path_decisionTableTemplates + '[' + i + ']';
|
|
730
|
-
const referencepath_decisionTableTemplates_itemValidationError = validate$
|
|
730
|
+
const referencepath_decisionTableTemplates_itemValidationError = validate$a(obj_decisionTableTemplates_item, path_decisionTableTemplates_item);
|
|
731
731
|
if (referencepath_decisionTableTemplates_itemValidationError !== null) {
|
|
732
732
|
let message = 'Object doesn\'t match DecisionTableTemplateOutputRepresentation (at "' + path_decisionTableTemplates_item + '")\n';
|
|
733
733
|
message += referencepath_decisionTableTemplates_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -744,7 +744,7 @@ function validate$5(obj, path = 'DecisionTableTemplatesListOutputRepresentation'
|
|
|
744
744
|
for (let i = 0; i < obj_errors.length; i++) {
|
|
745
745
|
const obj_errors_item = obj_errors[i];
|
|
746
746
|
const path_errors_item = path_errors + '[' + i + ']';
|
|
747
|
-
const referencepath_errors_itemValidationError = validate$
|
|
747
|
+
const referencepath_errors_itemValidationError = validate$7(obj_errors_item, path_errors_item);
|
|
748
748
|
if (referencepath_errors_itemValidationError !== null) {
|
|
749
749
|
let message = 'Object doesn\'t match ErrorOutputRepresentation (at "' + path_errors_item + '")\n';
|
|
750
750
|
message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -755,62 +755,62 @@ function validate$5(obj, path = 'DecisionTableTemplatesListOutputRepresentation'
|
|
|
755
755
|
})();
|
|
756
756
|
return v_error === undefined ? null : v_error;
|
|
757
757
|
}
|
|
758
|
-
const RepresentationType$
|
|
759
|
-
function normalize$
|
|
758
|
+
const RepresentationType$4 = 'DecisionTableTemplatesListOutputRepresentation';
|
|
759
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
760
760
|
return input;
|
|
761
761
|
}
|
|
762
|
-
const select$
|
|
762
|
+
const select$a = function DecisionTableTemplatesListOutputRepresentationSelect() {
|
|
763
763
|
return {
|
|
764
764
|
kind: 'Fragment',
|
|
765
|
-
version: VERSION$
|
|
765
|
+
version: VERSION$4,
|
|
766
766
|
private: [],
|
|
767
767
|
opaque: true
|
|
768
768
|
};
|
|
769
769
|
};
|
|
770
|
-
function equals$
|
|
770
|
+
function equals$4(existing, incoming) {
|
|
771
771
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
772
772
|
return false;
|
|
773
773
|
}
|
|
774
774
|
return true;
|
|
775
775
|
}
|
|
776
|
-
const ingest$
|
|
776
|
+
const ingest$4 = function DecisionTableTemplatesListOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
777
777
|
if (process.env.NODE_ENV !== 'production') {
|
|
778
|
-
const validateError = validate$
|
|
778
|
+
const validateError = validate$6(input);
|
|
779
779
|
if (validateError !== null) {
|
|
780
780
|
throw validateError;
|
|
781
781
|
}
|
|
782
782
|
}
|
|
783
783
|
const key = path.fullPath;
|
|
784
|
-
const ttlToUse = TTL$
|
|
785
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
784
|
+
const ttlToUse = TTL$4;
|
|
785
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "DecisionTable", VERSION$4, RepresentationType$4, equals$4);
|
|
786
786
|
return createLink(key);
|
|
787
787
|
};
|
|
788
|
-
function getTypeCacheKeys$
|
|
788
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
789
789
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
790
790
|
const rootKey = fullPathFactory();
|
|
791
791
|
rootKeySet.set(rootKey, {
|
|
792
792
|
namespace: keyPrefix,
|
|
793
|
-
representationName: RepresentationType$
|
|
793
|
+
representationName: RepresentationType$4,
|
|
794
794
|
mergeable: false
|
|
795
795
|
});
|
|
796
796
|
}
|
|
797
797
|
|
|
798
|
-
function select$
|
|
799
|
-
return select$
|
|
798
|
+
function select$9(luvio, params) {
|
|
799
|
+
return select$a();
|
|
800
800
|
}
|
|
801
|
-
function keyBuilder$
|
|
801
|
+
function keyBuilder$9(luvio, params) {
|
|
802
802
|
return keyPrefix + '::DecisionTableTemplatesListOutputRepresentation:(' + 'usageType:' + params.queryParams.usageType + ')';
|
|
803
803
|
}
|
|
804
|
-
function getResponseCacheKeys$
|
|
805
|
-
getTypeCacheKeys$
|
|
804
|
+
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
805
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$9(luvio, resourceParams));
|
|
806
806
|
}
|
|
807
|
-
function ingestSuccess$
|
|
807
|
+
function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
808
808
|
const { body } = response;
|
|
809
|
-
const key = keyBuilder$
|
|
810
|
-
luvio.storeIngest(key, ingest$
|
|
809
|
+
const key = keyBuilder$9(luvio, resourceParams);
|
|
810
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
811
811
|
const snapshot = luvio.storeLookup({
|
|
812
812
|
recordId: key,
|
|
813
|
-
node: select$
|
|
813
|
+
node: select$9(),
|
|
814
814
|
variables: {},
|
|
815
815
|
}, snapshotRefresh);
|
|
816
816
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -821,19 +821,19 @@ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
821
821
|
deepFreeze(snapshot.data);
|
|
822
822
|
return snapshot;
|
|
823
823
|
}
|
|
824
|
-
function ingestError$
|
|
825
|
-
const key = keyBuilder$
|
|
824
|
+
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
825
|
+
const key = keyBuilder$9(luvio, params);
|
|
826
826
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
827
827
|
const storeMetadataParams = {
|
|
828
|
-
ttl: TTL$
|
|
828
|
+
ttl: TTL$4,
|
|
829
829
|
namespace: keyPrefix,
|
|
830
|
-
version: VERSION$
|
|
831
|
-
representationName: RepresentationType$
|
|
830
|
+
version: VERSION$4,
|
|
831
|
+
representationName: RepresentationType$4
|
|
832
832
|
};
|
|
833
833
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
834
834
|
return errorSnapshot;
|
|
835
835
|
}
|
|
836
|
-
function createResourceRequest$
|
|
836
|
+
function createResourceRequest$5(config) {
|
|
837
837
|
const headers = {};
|
|
838
838
|
return {
|
|
839
839
|
baseUri: '/services/data/v62.0',
|
|
@@ -847,95 +847,95 @@ function createResourceRequest$3(config) {
|
|
|
847
847
|
};
|
|
848
848
|
}
|
|
849
849
|
|
|
850
|
-
const adapterName$
|
|
850
|
+
const adapterName$5 = 'getDecisionTableTemplateList';
|
|
851
851
|
const getDecisionTableTemplateList_ConfigPropertyMetadata = [
|
|
852
852
|
generateParamConfigMetadata('usageType', false, 1 /* QueryParameter */, 0 /* String */),
|
|
853
853
|
];
|
|
854
|
-
const getDecisionTableTemplateList_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
855
|
-
const createResourceParams$
|
|
856
|
-
function keyBuilder$
|
|
857
|
-
const resourceParams = createResourceParams$
|
|
858
|
-
return keyBuilder$
|
|
854
|
+
const getDecisionTableTemplateList_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getDecisionTableTemplateList_ConfigPropertyMetadata);
|
|
855
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$7(getDecisionTableTemplateList_ConfigPropertyMetadata);
|
|
856
|
+
function keyBuilder$8(luvio, config) {
|
|
857
|
+
const resourceParams = createResourceParams$5(config);
|
|
858
|
+
return keyBuilder$9(luvio, resourceParams);
|
|
859
859
|
}
|
|
860
|
-
function typeCheckConfig$
|
|
860
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
861
861
|
const config = {};
|
|
862
|
-
typeCheckConfig$
|
|
862
|
+
typeCheckConfig$7(untrustedConfig, config, getDecisionTableTemplateList_ConfigPropertyMetadata);
|
|
863
863
|
return config;
|
|
864
864
|
}
|
|
865
|
-
function validateAdapterConfig$
|
|
865
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
866
866
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
867
867
|
return null;
|
|
868
868
|
}
|
|
869
869
|
if (process.env.NODE_ENV !== 'production') {
|
|
870
870
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
871
871
|
}
|
|
872
|
-
const config = typeCheckConfig$
|
|
872
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
873
873
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
874
874
|
return null;
|
|
875
875
|
}
|
|
876
876
|
return config;
|
|
877
877
|
}
|
|
878
|
-
function adapterFragment$
|
|
879
|
-
createResourceParams$
|
|
880
|
-
return select$
|
|
878
|
+
function adapterFragment$3(luvio, config) {
|
|
879
|
+
createResourceParams$5(config);
|
|
880
|
+
return select$9();
|
|
881
881
|
}
|
|
882
|
-
function onFetchResponseSuccess$
|
|
883
|
-
const snapshot = ingestSuccess$
|
|
882
|
+
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
883
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
|
|
884
884
|
config,
|
|
885
|
-
resolve: () => buildNetworkSnapshot$
|
|
885
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
886
886
|
});
|
|
887
887
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
888
888
|
}
|
|
889
|
-
function onFetchResponseError$
|
|
890
|
-
const snapshot = ingestError$
|
|
889
|
+
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
890
|
+
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
891
891
|
config,
|
|
892
|
-
resolve: () => buildNetworkSnapshot$
|
|
892
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
893
893
|
});
|
|
894
894
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
895
895
|
}
|
|
896
|
-
function buildNetworkSnapshot$
|
|
897
|
-
const resourceParams = createResourceParams$
|
|
898
|
-
const request = createResourceRequest$
|
|
896
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
897
|
+
const resourceParams = createResourceParams$5(config);
|
|
898
|
+
const request = createResourceRequest$5(resourceParams);
|
|
899
899
|
return luvio.dispatchResourceRequest(request, options)
|
|
900
900
|
.then((response) => {
|
|
901
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
901
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
902
902
|
const cache = new StoreKeyMap();
|
|
903
|
-
getResponseCacheKeys$
|
|
903
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
|
|
904
904
|
return cache;
|
|
905
905
|
});
|
|
906
906
|
}, (response) => {
|
|
907
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
907
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
|
|
908
908
|
});
|
|
909
909
|
}
|
|
910
|
-
function buildNetworkSnapshotCachePolicy$
|
|
911
|
-
return buildNetworkSnapshotCachePolicy$
|
|
910
|
+
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
911
|
+
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
|
|
912
912
|
}
|
|
913
|
-
function buildCachedSnapshotCachePolicy$
|
|
913
|
+
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
914
914
|
const { luvio, config } = context;
|
|
915
915
|
const selector = {
|
|
916
|
-
recordId: keyBuilder$
|
|
917
|
-
node: adapterFragment$
|
|
916
|
+
recordId: keyBuilder$8(luvio, config),
|
|
917
|
+
node: adapterFragment$3(luvio, config),
|
|
918
918
|
variables: {},
|
|
919
919
|
};
|
|
920
920
|
const cacheSnapshot = storeLookup(selector, {
|
|
921
921
|
config,
|
|
922
|
-
resolve: () => buildNetworkSnapshot$
|
|
922
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
923
923
|
});
|
|
924
924
|
return cacheSnapshot;
|
|
925
925
|
}
|
|
926
926
|
const getDecisionTableTemplateListAdapterFactory = (luvio) => function DecisionTable__getDecisionTableTemplateList(untrustedConfig, requestContext) {
|
|
927
|
-
const config = validateAdapterConfig$
|
|
927
|
+
const config = validateAdapterConfig$5(untrustedConfig, getDecisionTableTemplateList_ConfigPropertyNames);
|
|
928
928
|
// Invalid or incomplete config
|
|
929
929
|
if (config === null) {
|
|
930
930
|
return null;
|
|
931
931
|
}
|
|
932
932
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
933
|
-
buildCachedSnapshotCachePolicy$
|
|
933
|
+
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
934
934
|
};
|
|
935
935
|
|
|
936
|
-
const TTL$
|
|
937
|
-
const VERSION$
|
|
938
|
-
function validate$
|
|
936
|
+
const TTL$3 = 1000;
|
|
937
|
+
const VERSION$3 = "9a106f486843ccdb3e85594fb33ef97f";
|
|
938
|
+
function validate$5(obj, path = 'DecisionTableTemplateDefinitionOutputRepresentation') {
|
|
939
939
|
const v_error = (() => {
|
|
940
940
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
941
941
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -943,7 +943,7 @@ function validate$4(obj, path = 'DecisionTableTemplateDefinitionOutputRepresenta
|
|
|
943
943
|
if (obj.decisionTableTemplate !== undefined) {
|
|
944
944
|
const obj_decisionTableTemplate = obj.decisionTableTemplate;
|
|
945
945
|
const path_decisionTableTemplate = path + '.decisionTableTemplate';
|
|
946
|
-
const referencepath_decisionTableTemplateValidationError = validate$
|
|
946
|
+
const referencepath_decisionTableTemplateValidationError = validate$c(obj_decisionTableTemplate, path_decisionTableTemplate);
|
|
947
947
|
if (referencepath_decisionTableTemplateValidationError !== null) {
|
|
948
948
|
let message = 'Object doesn\'t match DecisionTableDefinitionOutputRepresentation (at "' + path_decisionTableTemplate + '")\n';
|
|
949
949
|
message += referencepath_decisionTableTemplateValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -959,7 +959,7 @@ function validate$4(obj, path = 'DecisionTableTemplateDefinitionOutputRepresenta
|
|
|
959
959
|
for (let i = 0; i < obj_errors.length; i++) {
|
|
960
960
|
const obj_errors_item = obj_errors[i];
|
|
961
961
|
const path_errors_item = path_errors + '[' + i + ']';
|
|
962
|
-
const referencepath_errors_itemValidationError = validate$
|
|
962
|
+
const referencepath_errors_itemValidationError = validate$7(obj_errors_item, path_errors_item);
|
|
963
963
|
if (referencepath_errors_itemValidationError !== null) {
|
|
964
964
|
let message = 'Object doesn\'t match ErrorOutputRepresentation (at "' + path_errors_item + '")\n';
|
|
965
965
|
message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -970,62 +970,62 @@ function validate$4(obj, path = 'DecisionTableTemplateDefinitionOutputRepresenta
|
|
|
970
970
|
})();
|
|
971
971
|
return v_error === undefined ? null : v_error;
|
|
972
972
|
}
|
|
973
|
-
const RepresentationType$
|
|
974
|
-
function normalize$
|
|
973
|
+
const RepresentationType$3 = 'DecisionTableTemplateDefinitionOutputRepresentation';
|
|
974
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
975
975
|
return input;
|
|
976
976
|
}
|
|
977
|
-
const select$
|
|
977
|
+
const select$8 = function DecisionTableTemplateDefinitionOutputRepresentationSelect() {
|
|
978
978
|
return {
|
|
979
979
|
kind: 'Fragment',
|
|
980
|
-
version: VERSION$
|
|
980
|
+
version: VERSION$3,
|
|
981
981
|
private: [],
|
|
982
982
|
opaque: true
|
|
983
983
|
};
|
|
984
984
|
};
|
|
985
|
-
function equals$
|
|
985
|
+
function equals$3(existing, incoming) {
|
|
986
986
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
987
987
|
return false;
|
|
988
988
|
}
|
|
989
989
|
return true;
|
|
990
990
|
}
|
|
991
|
-
const ingest$
|
|
991
|
+
const ingest$3 = function DecisionTableTemplateDefinitionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
992
992
|
if (process.env.NODE_ENV !== 'production') {
|
|
993
|
-
const validateError = validate$
|
|
993
|
+
const validateError = validate$5(input);
|
|
994
994
|
if (validateError !== null) {
|
|
995
995
|
throw validateError;
|
|
996
996
|
}
|
|
997
997
|
}
|
|
998
998
|
const key = path.fullPath;
|
|
999
|
-
const ttlToUse = TTL$
|
|
1000
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
999
|
+
const ttlToUse = TTL$3;
|
|
1000
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "DecisionTable", VERSION$3, RepresentationType$3, equals$3);
|
|
1001
1001
|
return createLink(key);
|
|
1002
1002
|
};
|
|
1003
|
-
function getTypeCacheKeys$
|
|
1003
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
1004
1004
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1005
1005
|
const rootKey = fullPathFactory();
|
|
1006
1006
|
rootKeySet.set(rootKey, {
|
|
1007
1007
|
namespace: keyPrefix,
|
|
1008
|
-
representationName: RepresentationType$
|
|
1008
|
+
representationName: RepresentationType$3,
|
|
1009
1009
|
mergeable: false
|
|
1010
1010
|
});
|
|
1011
1011
|
}
|
|
1012
1012
|
|
|
1013
|
-
function select$
|
|
1014
|
-
return select$
|
|
1013
|
+
function select$7(luvio, params) {
|
|
1014
|
+
return select$8();
|
|
1015
1015
|
}
|
|
1016
|
-
function keyBuilder$
|
|
1016
|
+
function keyBuilder$7(luvio, params) {
|
|
1017
1017
|
return keyPrefix + '::DecisionTableTemplateDefinitionOutputRepresentation:(' + 'templateName:' + params.urlParams.templateName + ')';
|
|
1018
1018
|
}
|
|
1019
|
-
function getResponseCacheKeys$
|
|
1020
|
-
getTypeCacheKeys$
|
|
1019
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
1020
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$7(luvio, resourceParams));
|
|
1021
1021
|
}
|
|
1022
|
-
function ingestSuccess$
|
|
1022
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
1023
1023
|
const { body } = response;
|
|
1024
|
-
const key = keyBuilder$
|
|
1025
|
-
luvio.storeIngest(key, ingest$
|
|
1024
|
+
const key = keyBuilder$7(luvio, resourceParams);
|
|
1025
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
1026
1026
|
const snapshot = luvio.storeLookup({
|
|
1027
1027
|
recordId: key,
|
|
1028
|
-
node: select$
|
|
1028
|
+
node: select$7(),
|
|
1029
1029
|
variables: {},
|
|
1030
1030
|
}, snapshotRefresh);
|
|
1031
1031
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1036,19 +1036,19 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1036
1036
|
deepFreeze(snapshot.data);
|
|
1037
1037
|
return snapshot;
|
|
1038
1038
|
}
|
|
1039
|
-
function ingestError$
|
|
1040
|
-
const key = keyBuilder$
|
|
1039
|
+
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
1040
|
+
const key = keyBuilder$7(luvio, params);
|
|
1041
1041
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1042
1042
|
const storeMetadataParams = {
|
|
1043
|
-
ttl: TTL$
|
|
1043
|
+
ttl: TTL$3,
|
|
1044
1044
|
namespace: keyPrefix,
|
|
1045
|
-
version: VERSION$
|
|
1046
|
-
representationName: RepresentationType$
|
|
1045
|
+
version: VERSION$3,
|
|
1046
|
+
representationName: RepresentationType$3
|
|
1047
1047
|
};
|
|
1048
1048
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1049
1049
|
return errorSnapshot;
|
|
1050
1050
|
}
|
|
1051
|
-
function createResourceRequest$
|
|
1051
|
+
function createResourceRequest$4(config) {
|
|
1052
1052
|
const headers = {};
|
|
1053
1053
|
return {
|
|
1054
1054
|
baseUri: '/services/data/v62.0',
|
|
@@ -1062,93 +1062,93 @@ function createResourceRequest$2(config) {
|
|
|
1062
1062
|
};
|
|
1063
1063
|
}
|
|
1064
1064
|
|
|
1065
|
-
const adapterName$
|
|
1065
|
+
const adapterName$4 = 'getDecisionTableTemplate';
|
|
1066
1066
|
const getDecisionTableTemplate_ConfigPropertyMetadata = [
|
|
1067
1067
|
generateParamConfigMetadata('templateName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1068
1068
|
];
|
|
1069
|
-
const getDecisionTableTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1070
|
-
const createResourceParams$
|
|
1071
|
-
function keyBuilder$
|
|
1072
|
-
const resourceParams = createResourceParams$
|
|
1073
|
-
return keyBuilder$
|
|
1069
|
+
const getDecisionTableTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getDecisionTableTemplate_ConfigPropertyMetadata);
|
|
1070
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$7(getDecisionTableTemplate_ConfigPropertyMetadata);
|
|
1071
|
+
function keyBuilder$6(luvio, config) {
|
|
1072
|
+
const resourceParams = createResourceParams$4(config);
|
|
1073
|
+
return keyBuilder$7(luvio, resourceParams);
|
|
1074
1074
|
}
|
|
1075
|
-
function typeCheckConfig$
|
|
1075
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
1076
1076
|
const config = {};
|
|
1077
|
-
typeCheckConfig$
|
|
1077
|
+
typeCheckConfig$7(untrustedConfig, config, getDecisionTableTemplate_ConfigPropertyMetadata);
|
|
1078
1078
|
return config;
|
|
1079
1079
|
}
|
|
1080
|
-
function validateAdapterConfig$
|
|
1080
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
1081
1081
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1082
1082
|
return null;
|
|
1083
1083
|
}
|
|
1084
1084
|
if (process.env.NODE_ENV !== 'production') {
|
|
1085
1085
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1086
1086
|
}
|
|
1087
|
-
const config = typeCheckConfig$
|
|
1087
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
1088
1088
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1089
1089
|
return null;
|
|
1090
1090
|
}
|
|
1091
1091
|
return config;
|
|
1092
1092
|
}
|
|
1093
|
-
function adapterFragment$
|
|
1094
|
-
createResourceParams$
|
|
1095
|
-
return select$
|
|
1093
|
+
function adapterFragment$2(luvio, config) {
|
|
1094
|
+
createResourceParams$4(config);
|
|
1095
|
+
return select$7();
|
|
1096
1096
|
}
|
|
1097
|
-
function onFetchResponseSuccess$
|
|
1098
|
-
const snapshot = ingestSuccess$
|
|
1097
|
+
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
1098
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
1099
1099
|
config,
|
|
1100
|
-
resolve: () => buildNetworkSnapshot$
|
|
1100
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
1101
1101
|
});
|
|
1102
1102
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1103
1103
|
}
|
|
1104
|
-
function onFetchResponseError$
|
|
1105
|
-
const snapshot = ingestError$
|
|
1104
|
+
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
1105
|
+
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
1106
1106
|
config,
|
|
1107
|
-
resolve: () => buildNetworkSnapshot$
|
|
1107
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
1108
1108
|
});
|
|
1109
1109
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1110
1110
|
}
|
|
1111
|
-
function buildNetworkSnapshot$
|
|
1112
|
-
const resourceParams = createResourceParams$
|
|
1113
|
-
const request = createResourceRequest$
|
|
1111
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
1112
|
+
const resourceParams = createResourceParams$4(config);
|
|
1113
|
+
const request = createResourceRequest$4(resourceParams);
|
|
1114
1114
|
return luvio.dispatchResourceRequest(request, options)
|
|
1115
1115
|
.then((response) => {
|
|
1116
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
1116
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
1117
1117
|
const cache = new StoreKeyMap();
|
|
1118
|
-
getResponseCacheKeys$
|
|
1118
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
1119
1119
|
return cache;
|
|
1120
1120
|
});
|
|
1121
1121
|
}, (response) => {
|
|
1122
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
1122
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
|
|
1123
1123
|
});
|
|
1124
1124
|
}
|
|
1125
|
-
function buildNetworkSnapshotCachePolicy$
|
|
1126
|
-
return buildNetworkSnapshotCachePolicy$
|
|
1125
|
+
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
1126
|
+
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
|
|
1127
1127
|
}
|
|
1128
|
-
function buildCachedSnapshotCachePolicy$
|
|
1128
|
+
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
1129
1129
|
const { luvio, config } = context;
|
|
1130
1130
|
const selector = {
|
|
1131
|
-
recordId: keyBuilder$
|
|
1132
|
-
node: adapterFragment$
|
|
1131
|
+
recordId: keyBuilder$6(luvio, config),
|
|
1132
|
+
node: adapterFragment$2(luvio, config),
|
|
1133
1133
|
variables: {},
|
|
1134
1134
|
};
|
|
1135
1135
|
const cacheSnapshot = storeLookup(selector, {
|
|
1136
1136
|
config,
|
|
1137
|
-
resolve: () => buildNetworkSnapshot$
|
|
1137
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
1138
1138
|
});
|
|
1139
1139
|
return cacheSnapshot;
|
|
1140
1140
|
}
|
|
1141
1141
|
const getDecisionTableTemplateAdapterFactory = (luvio) => function DecisionTable__getDecisionTableTemplate(untrustedConfig, requestContext) {
|
|
1142
|
-
const config = validateAdapterConfig$
|
|
1142
|
+
const config = validateAdapterConfig$4(untrustedConfig, getDecisionTableTemplate_ConfigPropertyNames);
|
|
1143
1143
|
// Invalid or incomplete config
|
|
1144
1144
|
if (config === null) {
|
|
1145
1145
|
return null;
|
|
1146
1146
|
}
|
|
1147
1147
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1148
|
-
buildCachedSnapshotCachePolicy$
|
|
1148
|
+
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
1149
1149
|
};
|
|
1150
1150
|
|
|
1151
|
-
function validate$
|
|
1151
|
+
function validate$4(obj, path = 'DecisionTableRowInputRepresentation') {
|
|
1152
1152
|
const v_error = (() => {
|
|
1153
1153
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1154
1154
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1163,11 +1163,6 @@ function validate$3(obj, path = 'DecisionTableRowInputRepresentation') {
|
|
|
1163
1163
|
if (typeof obj_id !== 'string') {
|
|
1164
1164
|
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1165
1165
|
}
|
|
1166
|
-
const obj_name = obj.name;
|
|
1167
|
-
const path_name = path + '.name';
|
|
1168
|
-
if (typeof obj_name !== 'string') {
|
|
1169
|
-
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1170
|
-
}
|
|
1171
1166
|
const obj_rowData = obj.rowData;
|
|
1172
1167
|
const path_rowData = path + '.rowData';
|
|
1173
1168
|
if (typeof obj_rowData !== 'object' || ArrayIsArray(obj_rowData) || obj_rowData === null) {
|
|
@@ -1186,19 +1181,17 @@ function validate$3(obj, path = 'DecisionTableRowInputRepresentation') {
|
|
|
1186
1181
|
return v_error === undefined ? null : v_error;
|
|
1187
1182
|
}
|
|
1188
1183
|
|
|
1189
|
-
const TTL$
|
|
1190
|
-
const VERSION$
|
|
1191
|
-
function validate$
|
|
1184
|
+
const TTL$2 = 1000;
|
|
1185
|
+
const VERSION$2 = "58833f5bd113747199f0032242bf21b6";
|
|
1186
|
+
function validate$3(obj, path = 'DecisionTableDataOutputRepresentation') {
|
|
1192
1187
|
const v_error = (() => {
|
|
1193
1188
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1194
1189
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1195
1190
|
}
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
return new TypeError('Expected "string" but received "' + typeof obj_errorFileId + '" (at "' + path_errorFileId + '")');
|
|
1201
|
-
}
|
|
1191
|
+
const obj_errorFileId = obj.errorFileId;
|
|
1192
|
+
const path_errorFileId = path + '.errorFileId';
|
|
1193
|
+
if (typeof obj_errorFileId !== 'string') {
|
|
1194
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errorFileId + '" (at "' + path_errorFileId + '")');
|
|
1202
1195
|
}
|
|
1203
1196
|
if (obj.errors !== undefined) {
|
|
1204
1197
|
const obj_errors = obj.errors;
|
|
@@ -1214,81 +1207,71 @@ function validate$2(obj, path = 'DecisionTableDataOutputRepresentation') {
|
|
|
1214
1207
|
}
|
|
1215
1208
|
}
|
|
1216
1209
|
}
|
|
1217
|
-
const obj_message = obj.message;
|
|
1218
|
-
const path_message = path + '.message';
|
|
1219
|
-
if (typeof obj_message !== 'string') {
|
|
1220
|
-
return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
|
|
1221
|
-
}
|
|
1222
|
-
const obj_success = obj.success;
|
|
1223
|
-
const path_success = path + '.success';
|
|
1224
|
-
if (typeof obj_success !== 'boolean') {
|
|
1225
|
-
return new TypeError('Expected "boolean" but received "' + typeof obj_success + '" (at "' + path_success + '")');
|
|
1226
|
-
}
|
|
1227
1210
|
})();
|
|
1228
1211
|
return v_error === undefined ? null : v_error;
|
|
1229
1212
|
}
|
|
1230
|
-
const RepresentationType$
|
|
1231
|
-
function keyBuilder$
|
|
1232
|
-
return keyPrefix + '::' + RepresentationType$
|
|
1213
|
+
const RepresentationType$2 = 'DecisionTableDataOutputRepresentation';
|
|
1214
|
+
function keyBuilder$5(luvio, config) {
|
|
1215
|
+
return keyPrefix + '::' + RepresentationType$2 + ':' + config.errorFileId;
|
|
1233
1216
|
}
|
|
1234
|
-
function keyBuilderFromType(luvio, object) {
|
|
1217
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
1235
1218
|
const keyParams = {
|
|
1236
|
-
|
|
1219
|
+
errorFileId: object.errorFileId
|
|
1237
1220
|
};
|
|
1238
|
-
return keyBuilder$
|
|
1221
|
+
return keyBuilder$5(luvio, keyParams);
|
|
1239
1222
|
}
|
|
1240
|
-
function normalize$
|
|
1223
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
1241
1224
|
return input;
|
|
1242
1225
|
}
|
|
1243
|
-
const select$
|
|
1226
|
+
const select$6 = function DecisionTableDataOutputRepresentationSelect() {
|
|
1244
1227
|
return {
|
|
1245
1228
|
kind: 'Fragment',
|
|
1246
|
-
version: VERSION$
|
|
1229
|
+
version: VERSION$2,
|
|
1247
1230
|
private: [],
|
|
1248
1231
|
opaque: true
|
|
1249
1232
|
};
|
|
1250
1233
|
};
|
|
1251
|
-
function equals$
|
|
1234
|
+
function equals$2(existing, incoming) {
|
|
1252
1235
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1253
1236
|
return false;
|
|
1254
1237
|
}
|
|
1255
1238
|
return true;
|
|
1256
1239
|
}
|
|
1257
|
-
const ingest$
|
|
1240
|
+
const ingest$2 = function DecisionTableDataOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1258
1241
|
if (process.env.NODE_ENV !== 'production') {
|
|
1259
|
-
const validateError = validate$
|
|
1242
|
+
const validateError = validate$3(input);
|
|
1260
1243
|
if (validateError !== null) {
|
|
1261
1244
|
throw validateError;
|
|
1262
1245
|
}
|
|
1263
1246
|
}
|
|
1264
|
-
const key = keyBuilderFromType(luvio, input);
|
|
1265
|
-
const ttlToUse = TTL$
|
|
1266
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1247
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
1248
|
+
const ttlToUse = TTL$2;
|
|
1249
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "DecisionTable", VERSION$2, RepresentationType$2, equals$2);
|
|
1267
1250
|
return createLink(key);
|
|
1268
1251
|
};
|
|
1269
|
-
function getTypeCacheKeys$
|
|
1252
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
1270
1253
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1271
|
-
const rootKey = keyBuilderFromType(luvio, input);
|
|
1254
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
1272
1255
|
rootKeySet.set(rootKey, {
|
|
1273
1256
|
namespace: keyPrefix,
|
|
1274
|
-
representationName: RepresentationType$
|
|
1257
|
+
representationName: RepresentationType$2,
|
|
1275
1258
|
mergeable: false
|
|
1276
1259
|
});
|
|
1277
1260
|
}
|
|
1278
1261
|
|
|
1279
|
-
function select$
|
|
1280
|
-
return select$
|
|
1262
|
+
function select$5(luvio, params) {
|
|
1263
|
+
return select$6();
|
|
1281
1264
|
}
|
|
1282
|
-
function getResponseCacheKeys$
|
|
1283
|
-
getTypeCacheKeys$
|
|
1265
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
1266
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
1284
1267
|
}
|
|
1285
|
-
function ingestSuccess$
|
|
1268
|
+
function ingestSuccess$3(luvio, resourceParams, response) {
|
|
1286
1269
|
const { body } = response;
|
|
1287
|
-
const key = keyBuilderFromType(luvio, body);
|
|
1288
|
-
luvio.storeIngest(key, ingest$
|
|
1270
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
1271
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
1289
1272
|
const snapshot = luvio.storeLookup({
|
|
1290
1273
|
recordId: key,
|
|
1291
|
-
node: select$
|
|
1274
|
+
node: select$5(),
|
|
1292
1275
|
variables: {},
|
|
1293
1276
|
});
|
|
1294
1277
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1299,7 +1282,7 @@ function ingestSuccess$1(luvio, resourceParams, response) {
|
|
|
1299
1282
|
deepFreeze(snapshot.data);
|
|
1300
1283
|
return snapshot;
|
|
1301
1284
|
}
|
|
1302
|
-
function createResourceRequest$
|
|
1285
|
+
function createResourceRequest$3(config) {
|
|
1303
1286
|
const headers = {};
|
|
1304
1287
|
return {
|
|
1305
1288
|
baseUri: '/services/data/v62.0',
|
|
@@ -1313,24 +1296,22 @@ function createResourceRequest$1(config) {
|
|
|
1313
1296
|
};
|
|
1314
1297
|
}
|
|
1315
1298
|
|
|
1316
|
-
const adapterName$
|
|
1299
|
+
const adapterName$3 = 'postDecisionTableRows';
|
|
1317
1300
|
const postDecisionTableRows_ConfigPropertyMetadata = [
|
|
1318
1301
|
generateParamConfigMetadata('decisionTableId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1319
|
-
generateParamConfigMetadata('deleteAllRows', false, 2 /* Body */, 1 /* Boolean */),
|
|
1320
|
-
generateParamConfigMetadata('fileId', false, 2 /* Body */, 0 /* String */),
|
|
1321
1302
|
generateParamConfigMetadata('rows', false, 2 /* Body */, 4 /* Unsupported */, true),
|
|
1322
1303
|
];
|
|
1323
|
-
const postDecisionTableRows_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1324
|
-
const createResourceParams$
|
|
1325
|
-
function typeCheckConfig$
|
|
1304
|
+
const postDecisionTableRows_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, postDecisionTableRows_ConfigPropertyMetadata);
|
|
1305
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$7(postDecisionTableRows_ConfigPropertyMetadata);
|
|
1306
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
1326
1307
|
const config = {};
|
|
1327
|
-
typeCheckConfig$
|
|
1308
|
+
typeCheckConfig$7(untrustedConfig, config, postDecisionTableRows_ConfigPropertyMetadata);
|
|
1328
1309
|
const untrustedConfig_rows = untrustedConfig.rows;
|
|
1329
1310
|
if (ArrayIsArray$1(untrustedConfig_rows)) {
|
|
1330
1311
|
const untrustedConfig_rows_array = [];
|
|
1331
1312
|
for (let i = 0, arrayLength = untrustedConfig_rows.length; i < arrayLength; i++) {
|
|
1332
1313
|
const untrustedConfig_rows_item = untrustedConfig_rows[i];
|
|
1333
|
-
const referenceDecisionTableRowInputRepresentationValidationError = validate$
|
|
1314
|
+
const referenceDecisionTableRowInputRepresentationValidationError = validate$4(untrustedConfig_rows_item);
|
|
1334
1315
|
if (referenceDecisionTableRowInputRepresentationValidationError === null) {
|
|
1335
1316
|
untrustedConfig_rows_array.push(untrustedConfig_rows_item);
|
|
1336
1317
|
}
|
|
@@ -1339,30 +1320,30 @@ function typeCheckConfig$1(untrustedConfig) {
|
|
|
1339
1320
|
}
|
|
1340
1321
|
return config;
|
|
1341
1322
|
}
|
|
1342
|
-
function validateAdapterConfig$
|
|
1323
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
1343
1324
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1344
1325
|
return null;
|
|
1345
1326
|
}
|
|
1346
1327
|
if (process.env.NODE_ENV !== 'production') {
|
|
1347
1328
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1348
1329
|
}
|
|
1349
|
-
const config = typeCheckConfig$
|
|
1330
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
1350
1331
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1351
1332
|
return null;
|
|
1352
1333
|
}
|
|
1353
1334
|
return config;
|
|
1354
1335
|
}
|
|
1355
|
-
function buildNetworkSnapshot$
|
|
1356
|
-
const resourceParams = createResourceParams$
|
|
1357
|
-
const request = createResourceRequest$
|
|
1336
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
1337
|
+
const resourceParams = createResourceParams$3(config);
|
|
1338
|
+
const request = createResourceRequest$3(resourceParams);
|
|
1358
1339
|
return luvio.dispatchResourceRequest(request, options)
|
|
1359
1340
|
.then((response) => {
|
|
1360
1341
|
return luvio.handleSuccessResponse(() => {
|
|
1361
|
-
const snapshot = ingestSuccess$
|
|
1342
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response);
|
|
1362
1343
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1363
1344
|
}, () => {
|
|
1364
1345
|
const cache = new StoreKeyMap();
|
|
1365
|
-
getResponseCacheKeys$
|
|
1346
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
1366
1347
|
return cache;
|
|
1367
1348
|
});
|
|
1368
1349
|
}, (response) => {
|
|
@@ -1372,16 +1353,16 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
1372
1353
|
}
|
|
1373
1354
|
const postDecisionTableRowsAdapterFactory = (luvio) => {
|
|
1374
1355
|
return function postDecisionTableRows(untrustedConfig) {
|
|
1375
|
-
const config = validateAdapterConfig$
|
|
1356
|
+
const config = validateAdapterConfig$3(untrustedConfig, postDecisionTableRows_ConfigPropertyNames);
|
|
1376
1357
|
// Invalid or incomplete config
|
|
1377
1358
|
if (config === null) {
|
|
1378
1359
|
throw new Error('Invalid config for "postDecisionTableRows"');
|
|
1379
1360
|
}
|
|
1380
|
-
return buildNetworkSnapshot$
|
|
1361
|
+
return buildNetworkSnapshot$3(luvio, config);
|
|
1381
1362
|
};
|
|
1382
1363
|
};
|
|
1383
1364
|
|
|
1384
|
-
function validate$
|
|
1365
|
+
function validate$2(obj, path = 'DecisionTableRowOutputRepresentation') {
|
|
1385
1366
|
const v_error = (() => {
|
|
1386
1367
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1387
1368
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1391,11 +1372,6 @@ function validate$1(obj, path = 'DecisionTableRowOutputRepresentation') {
|
|
|
1391
1372
|
if (typeof obj_id !== 'string') {
|
|
1392
1373
|
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1393
1374
|
}
|
|
1394
|
-
const obj_name = obj.name;
|
|
1395
|
-
const path_name = path + '.name';
|
|
1396
|
-
if (typeof obj_name !== 'string') {
|
|
1397
|
-
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1398
|
-
}
|
|
1399
1375
|
const obj_rowData = obj.rowData;
|
|
1400
1376
|
const path_rowData = path + '.rowData';
|
|
1401
1377
|
if (typeof obj_rowData !== 'object' || ArrayIsArray(obj_rowData) || obj_rowData === null) {
|
|
@@ -1414,48 +1390,22 @@ function validate$1(obj, path = 'DecisionTableRowOutputRepresentation') {
|
|
|
1414
1390
|
return v_error === undefined ? null : v_error;
|
|
1415
1391
|
}
|
|
1416
1392
|
|
|
1417
|
-
const TTL = 1000;
|
|
1418
|
-
const VERSION = "
|
|
1419
|
-
function validate(obj, path = 'DecisionTableRowsListOutputRepresentation') {
|
|
1393
|
+
const TTL$1 = 1000;
|
|
1394
|
+
const VERSION$1 = "10dd31535fc5c028227867bd30804643";
|
|
1395
|
+
function validate$1(obj, path = 'DecisionTableRowsListOutputRepresentation') {
|
|
1420
1396
|
const v_error = (() => {
|
|
1421
1397
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1422
1398
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1423
1399
|
}
|
|
1424
|
-
const
|
|
1425
|
-
const
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
if (typeof obj_message !== 'string') {
|
|
1429
|
-
return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
|
|
1430
|
-
}
|
|
1431
|
-
})();
|
|
1432
|
-
if (obj_message_union0_error != null) {
|
|
1433
|
-
obj_message_union0 = obj_message_union0_error.message;
|
|
1434
|
-
}
|
|
1435
|
-
let obj_message_union1 = null;
|
|
1436
|
-
const obj_message_union1_error = (() => {
|
|
1437
|
-
if (obj_message !== null) {
|
|
1438
|
-
return new TypeError('Expected "null" but received "' + typeof obj_message + '" (at "' + path_message + '")');
|
|
1439
|
-
}
|
|
1440
|
-
})();
|
|
1441
|
-
if (obj_message_union1_error != null) {
|
|
1442
|
-
obj_message_union1 = obj_message_union1_error.message;
|
|
1443
|
-
}
|
|
1444
|
-
if (obj_message_union0 && obj_message_union1) {
|
|
1445
|
-
let message = 'Object doesn\'t match union (at "' + path_message + '")';
|
|
1446
|
-
message += '\n' + obj_message_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1447
|
-
message += '\n' + obj_message_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1448
|
-
return new TypeError(message);
|
|
1449
|
-
}
|
|
1450
|
-
const obj_rows = obj.rows;
|
|
1451
|
-
const path_rows = path + '.rows';
|
|
1452
|
-
if (!ArrayIsArray(obj_rows)) {
|
|
1453
|
-
return new TypeError('Expected "array" but received "' + typeof obj_rows + '" (at "' + path_rows + '")');
|
|
1400
|
+
const obj_rows = obj.rows;
|
|
1401
|
+
const path_rows = path + '.rows';
|
|
1402
|
+
if (!ArrayIsArray(obj_rows)) {
|
|
1403
|
+
return new TypeError('Expected "array" but received "' + typeof obj_rows + '" (at "' + path_rows + '")');
|
|
1454
1404
|
}
|
|
1455
1405
|
for (let i = 0; i < obj_rows.length; i++) {
|
|
1456
1406
|
const obj_rows_item = obj_rows[i];
|
|
1457
1407
|
const path_rows_item = path_rows + '[' + i + ']';
|
|
1458
|
-
const referencepath_rows_itemValidationError = validate$
|
|
1408
|
+
const referencepath_rows_itemValidationError = validate$2(obj_rows_item, path_rows_item);
|
|
1459
1409
|
if (referencepath_rows_itemValidationError !== null) {
|
|
1460
1410
|
let message = 'Object doesn\'t match DecisionTableRowOutputRepresentation (at "' + path_rows_item + '")\n';
|
|
1461
1411
|
message += referencepath_rows_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1491,11 +1441,216 @@ function validate(obj, path = 'DecisionTableRowsListOutputRepresentation') {
|
|
|
1491
1441
|
})();
|
|
1492
1442
|
return v_error === undefined ? null : v_error;
|
|
1493
1443
|
}
|
|
1494
|
-
const RepresentationType = 'DecisionTableRowsListOutputRepresentation';
|
|
1444
|
+
const RepresentationType$1 = 'DecisionTableRowsListOutputRepresentation';
|
|
1445
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
1446
|
+
return input;
|
|
1447
|
+
}
|
|
1448
|
+
const select$4 = function DecisionTableRowsListOutputRepresentationSelect() {
|
|
1449
|
+
return {
|
|
1450
|
+
kind: 'Fragment',
|
|
1451
|
+
version: VERSION$1,
|
|
1452
|
+
private: [],
|
|
1453
|
+
opaque: true
|
|
1454
|
+
};
|
|
1455
|
+
};
|
|
1456
|
+
function equals$1(existing, incoming) {
|
|
1457
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1458
|
+
return false;
|
|
1459
|
+
}
|
|
1460
|
+
return true;
|
|
1461
|
+
}
|
|
1462
|
+
const ingest$1 = function DecisionTableRowsListOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1463
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1464
|
+
const validateError = validate$1(input);
|
|
1465
|
+
if (validateError !== null) {
|
|
1466
|
+
throw validateError;
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1469
|
+
const key = path.fullPath;
|
|
1470
|
+
const ttlToUse = TTL$1;
|
|
1471
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "DecisionTable", VERSION$1, RepresentationType$1, equals$1);
|
|
1472
|
+
return createLink(key);
|
|
1473
|
+
};
|
|
1474
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
1475
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1476
|
+
const rootKey = fullPathFactory();
|
|
1477
|
+
rootKeySet.set(rootKey, {
|
|
1478
|
+
namespace: keyPrefix,
|
|
1479
|
+
representationName: RepresentationType$1,
|
|
1480
|
+
mergeable: false
|
|
1481
|
+
});
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
function select$3(luvio, params) {
|
|
1485
|
+
return select$4();
|
|
1486
|
+
}
|
|
1487
|
+
function keyBuilder$4(luvio, params) {
|
|
1488
|
+
return keyPrefix + '::DecisionTableRowsListOutputRepresentation:(' + 'filter:' + params.queryParams.filter + ',' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'decisionTableId:' + params.urlParams.decisionTableId + ')';
|
|
1489
|
+
}
|
|
1490
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
1491
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$4(luvio, resourceParams));
|
|
1492
|
+
}
|
|
1493
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
1494
|
+
const { body } = response;
|
|
1495
|
+
const key = keyBuilder$4(luvio, resourceParams);
|
|
1496
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
1497
|
+
const snapshot = luvio.storeLookup({
|
|
1498
|
+
recordId: key,
|
|
1499
|
+
node: select$3(),
|
|
1500
|
+
variables: {},
|
|
1501
|
+
}, snapshotRefresh);
|
|
1502
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1503
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1504
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
deepFreeze(snapshot.data);
|
|
1508
|
+
return snapshot;
|
|
1509
|
+
}
|
|
1510
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
1511
|
+
const key = keyBuilder$4(luvio, params);
|
|
1512
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1513
|
+
const storeMetadataParams = {
|
|
1514
|
+
ttl: TTL$1,
|
|
1515
|
+
namespace: keyPrefix,
|
|
1516
|
+
version: VERSION$1,
|
|
1517
|
+
representationName: RepresentationType$1
|
|
1518
|
+
};
|
|
1519
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1520
|
+
return errorSnapshot;
|
|
1521
|
+
}
|
|
1522
|
+
function createResourceRequest$2(config) {
|
|
1523
|
+
const headers = {};
|
|
1524
|
+
return {
|
|
1525
|
+
baseUri: '/services/data/v62.0',
|
|
1526
|
+
basePath: '/connect/business-rules/decision-table/' + config.urlParams.decisionTableId + '/data',
|
|
1527
|
+
method: 'get',
|
|
1528
|
+
body: null,
|
|
1529
|
+
urlParams: config.urlParams,
|
|
1530
|
+
queryParams: config.queryParams,
|
|
1531
|
+
headers,
|
|
1532
|
+
priority: 'normal',
|
|
1533
|
+
};
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
const adapterName$2 = 'getDecisionTableRows';
|
|
1537
|
+
const getDecisionTableRows_ConfigPropertyMetadata = [
|
|
1538
|
+
generateParamConfigMetadata('decisionTableId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1539
|
+
generateParamConfigMetadata('filter', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1540
|
+
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1541
|
+
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1542
|
+
];
|
|
1543
|
+
const getDecisionTableRows_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getDecisionTableRows_ConfigPropertyMetadata);
|
|
1544
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$7(getDecisionTableRows_ConfigPropertyMetadata);
|
|
1545
|
+
function keyBuilder$3(luvio, config) {
|
|
1546
|
+
const resourceParams = createResourceParams$2(config);
|
|
1547
|
+
return keyBuilder$4(luvio, resourceParams);
|
|
1548
|
+
}
|
|
1549
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
1550
|
+
const config = {};
|
|
1551
|
+
typeCheckConfig$7(untrustedConfig, config, getDecisionTableRows_ConfigPropertyMetadata);
|
|
1552
|
+
return config;
|
|
1553
|
+
}
|
|
1554
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
1555
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1556
|
+
return null;
|
|
1557
|
+
}
|
|
1558
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1559
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1560
|
+
}
|
|
1561
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
1562
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1563
|
+
return null;
|
|
1564
|
+
}
|
|
1565
|
+
return config;
|
|
1566
|
+
}
|
|
1567
|
+
function adapterFragment$1(luvio, config) {
|
|
1568
|
+
createResourceParams$2(config);
|
|
1569
|
+
return select$3();
|
|
1570
|
+
}
|
|
1571
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
1572
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
1573
|
+
config,
|
|
1574
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1575
|
+
});
|
|
1576
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1577
|
+
}
|
|
1578
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
1579
|
+
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
1580
|
+
config,
|
|
1581
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1582
|
+
});
|
|
1583
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1584
|
+
}
|
|
1585
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
1586
|
+
const resourceParams = createResourceParams$2(config);
|
|
1587
|
+
const request = createResourceRequest$2(resourceParams);
|
|
1588
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1589
|
+
.then((response) => {
|
|
1590
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
1591
|
+
const cache = new StoreKeyMap();
|
|
1592
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
1593
|
+
return cache;
|
|
1594
|
+
});
|
|
1595
|
+
}, (response) => {
|
|
1596
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
1597
|
+
});
|
|
1598
|
+
}
|
|
1599
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
1600
|
+
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
1601
|
+
}
|
|
1602
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
1603
|
+
const { luvio, config } = context;
|
|
1604
|
+
const selector = {
|
|
1605
|
+
recordId: keyBuilder$3(luvio, config),
|
|
1606
|
+
node: adapterFragment$1(luvio, config),
|
|
1607
|
+
variables: {},
|
|
1608
|
+
};
|
|
1609
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1610
|
+
config,
|
|
1611
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1612
|
+
});
|
|
1613
|
+
return cacheSnapshot;
|
|
1614
|
+
}
|
|
1615
|
+
const getDecisionTableRowsAdapterFactory = (luvio) => function DecisionTable__getDecisionTableRows(untrustedConfig, requestContext) {
|
|
1616
|
+
const config = validateAdapterConfig$2(untrustedConfig, getDecisionTableRows_ConfigPropertyNames);
|
|
1617
|
+
// Invalid or incomplete config
|
|
1618
|
+
if (config === null) {
|
|
1619
|
+
return null;
|
|
1620
|
+
}
|
|
1621
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1622
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
1623
|
+
};
|
|
1624
|
+
|
|
1625
|
+
const TTL = 1000;
|
|
1626
|
+
const VERSION = "581abdd509fd88568bfa17b4a220d8db";
|
|
1627
|
+
function validate(obj, path = 'DecisionTableFileOutputRepresentation') {
|
|
1628
|
+
const v_error = (() => {
|
|
1629
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1630
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1631
|
+
}
|
|
1632
|
+
const obj_message = obj.message;
|
|
1633
|
+
const path_message = path + '.message';
|
|
1634
|
+
if (typeof obj_message !== 'string') {
|
|
1635
|
+
return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
|
|
1636
|
+
}
|
|
1637
|
+
})();
|
|
1638
|
+
return v_error === undefined ? null : v_error;
|
|
1639
|
+
}
|
|
1640
|
+
const RepresentationType = 'DecisionTableFileOutputRepresentation';
|
|
1641
|
+
function keyBuilder$2(luvio, config) {
|
|
1642
|
+
return keyPrefix + '::' + RepresentationType + ':' + config.message;
|
|
1643
|
+
}
|
|
1644
|
+
function keyBuilderFromType(luvio, object) {
|
|
1645
|
+
const keyParams = {
|
|
1646
|
+
message: object.message
|
|
1647
|
+
};
|
|
1648
|
+
return keyBuilder$2(luvio, keyParams);
|
|
1649
|
+
}
|
|
1495
1650
|
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
1496
1651
|
return input;
|
|
1497
1652
|
}
|
|
1498
|
-
const select$
|
|
1653
|
+
const select$2 = function DecisionTableFileOutputRepresentationSelect() {
|
|
1499
1654
|
return {
|
|
1500
1655
|
kind: 'Fragment',
|
|
1501
1656
|
version: VERSION,
|
|
@@ -1509,21 +1664,21 @@ function equals(existing, incoming) {
|
|
|
1509
1664
|
}
|
|
1510
1665
|
return true;
|
|
1511
1666
|
}
|
|
1512
|
-
const ingest = function
|
|
1667
|
+
const ingest = function DecisionTableFileOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1513
1668
|
if (process.env.NODE_ENV !== 'production') {
|
|
1514
1669
|
const validateError = validate(input);
|
|
1515
1670
|
if (validateError !== null) {
|
|
1516
1671
|
throw validateError;
|
|
1517
1672
|
}
|
|
1518
1673
|
}
|
|
1519
|
-
const key =
|
|
1674
|
+
const key = keyBuilderFromType(luvio, input);
|
|
1520
1675
|
const ttlToUse = TTL;
|
|
1521
1676
|
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "DecisionTable", VERSION, RepresentationType, equals);
|
|
1522
1677
|
return createLink(key);
|
|
1523
1678
|
};
|
|
1524
1679
|
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
1525
1680
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1526
|
-
const rootKey =
|
|
1681
|
+
const rootKey = keyBuilderFromType(luvio, input);
|
|
1527
1682
|
rootKeySet.set(rootKey, {
|
|
1528
1683
|
namespace: keyPrefix,
|
|
1529
1684
|
representationName: RepresentationType,
|
|
@@ -1531,22 +1686,22 @@ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
1531
1686
|
});
|
|
1532
1687
|
}
|
|
1533
1688
|
|
|
1534
|
-
function select(luvio, params) {
|
|
1535
|
-
return select$
|
|
1689
|
+
function select$1(luvio, params) {
|
|
1690
|
+
return select$2();
|
|
1536
1691
|
}
|
|
1537
1692
|
function keyBuilder$1(luvio, params) {
|
|
1538
|
-
return keyPrefix + '::
|
|
1693
|
+
return keyPrefix + '::DecisionTableFileOutputRepresentation:(' + 'filter:' + params.queryParams.filter + ',' + 'decisionTableId:' + params.urlParams.decisionTableId + ')';
|
|
1539
1694
|
}
|
|
1540
|
-
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
1541
|
-
getTypeCacheKeys(storeKeyMap, luvio, response
|
|
1695
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
1696
|
+
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
1542
1697
|
}
|
|
1543
|
-
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
1698
|
+
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
1544
1699
|
const { body } = response;
|
|
1545
1700
|
const key = keyBuilder$1(luvio, resourceParams);
|
|
1546
1701
|
luvio.storeIngest(key, ingest, body);
|
|
1547
1702
|
const snapshot = luvio.storeLookup({
|
|
1548
1703
|
recordId: key,
|
|
1549
|
-
node: select(),
|
|
1704
|
+
node: select$1(),
|
|
1550
1705
|
variables: {},
|
|
1551
1706
|
}, snapshotRefresh);
|
|
1552
1707
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1569,11 +1724,11 @@ function ingestError(luvio, params, error, snapshotRefresh) {
|
|
|
1569
1724
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1570
1725
|
return errorSnapshot;
|
|
1571
1726
|
}
|
|
1572
|
-
function createResourceRequest(config) {
|
|
1727
|
+
function createResourceRequest$1(config) {
|
|
1573
1728
|
const headers = {};
|
|
1574
1729
|
return {
|
|
1575
1730
|
baseUri: '/services/data/v62.0',
|
|
1576
|
-
basePath: '/connect/business-rules/decision-table/' + config.urlParams.decisionTableId + '/
|
|
1731
|
+
basePath: '/connect/business-rules/decision-table/' + config.urlParams.decisionTableId + '/file',
|
|
1577
1732
|
method: 'get',
|
|
1578
1733
|
body: null,
|
|
1579
1734
|
urlParams: config.urlParams,
|
|
@@ -1583,66 +1738,61 @@ function createResourceRequest(config) {
|
|
|
1583
1738
|
};
|
|
1584
1739
|
}
|
|
1585
1740
|
|
|
1586
|
-
const adapterName = '
|
|
1587
|
-
const
|
|
1741
|
+
const adapterName$1 = 'getDecisionTableFile';
|
|
1742
|
+
const getDecisionTableFile_ConfigPropertyMetadata = [
|
|
1588
1743
|
generateParamConfigMetadata('decisionTableId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1589
|
-
generateParamConfigMetadata('errorFile', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
1590
|
-
generateParamConfigMetadata('file', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
1591
1744
|
generateParamConfigMetadata('filter', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1592
|
-
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1593
|
-
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1594
|
-
generateParamConfigMetadata('sortBy', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1595
1745
|
];
|
|
1596
|
-
const
|
|
1597
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
1746
|
+
const getDecisionTableFile_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getDecisionTableFile_ConfigPropertyMetadata);
|
|
1747
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$7(getDecisionTableFile_ConfigPropertyMetadata);
|
|
1598
1748
|
function keyBuilder(luvio, config) {
|
|
1599
|
-
const resourceParams = createResourceParams(config);
|
|
1749
|
+
const resourceParams = createResourceParams$1(config);
|
|
1600
1750
|
return keyBuilder$1(luvio, resourceParams);
|
|
1601
1751
|
}
|
|
1602
|
-
function typeCheckConfig(untrustedConfig) {
|
|
1752
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
1603
1753
|
const config = {};
|
|
1604
|
-
typeCheckConfig$
|
|
1754
|
+
typeCheckConfig$7(untrustedConfig, config, getDecisionTableFile_ConfigPropertyMetadata);
|
|
1605
1755
|
return config;
|
|
1606
1756
|
}
|
|
1607
|
-
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
1757
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
1608
1758
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1609
1759
|
return null;
|
|
1610
1760
|
}
|
|
1611
1761
|
if (process.env.NODE_ENV !== 'production') {
|
|
1612
1762
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1613
1763
|
}
|
|
1614
|
-
const config = typeCheckConfig(untrustedConfig);
|
|
1764
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
1615
1765
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1616
1766
|
return null;
|
|
1617
1767
|
}
|
|
1618
1768
|
return config;
|
|
1619
1769
|
}
|
|
1620
1770
|
function adapterFragment(luvio, config) {
|
|
1621
|
-
createResourceParams(config);
|
|
1622
|
-
return select();
|
|
1771
|
+
createResourceParams$1(config);
|
|
1772
|
+
return select$1();
|
|
1623
1773
|
}
|
|
1624
1774
|
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
1625
|
-
const snapshot = ingestSuccess(luvio, resourceParams, response, {
|
|
1775
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
|
|
1626
1776
|
config,
|
|
1627
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
1777
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
1628
1778
|
});
|
|
1629
1779
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1630
1780
|
}
|
|
1631
1781
|
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
1632
1782
|
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
1633
1783
|
config,
|
|
1634
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
1784
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
1635
1785
|
});
|
|
1636
1786
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1637
1787
|
}
|
|
1638
|
-
function buildNetworkSnapshot(luvio, config, options) {
|
|
1639
|
-
const resourceParams = createResourceParams(config);
|
|
1640
|
-
const request = createResourceRequest(resourceParams);
|
|
1788
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
1789
|
+
const resourceParams = createResourceParams$1(config);
|
|
1790
|
+
const request = createResourceRequest$1(resourceParams);
|
|
1641
1791
|
return luvio.dispatchResourceRequest(request, options)
|
|
1642
1792
|
.then((response) => {
|
|
1643
1793
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
1644
1794
|
const cache = new StoreKeyMap();
|
|
1645
|
-
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
1795
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
1646
1796
|
return cache;
|
|
1647
1797
|
});
|
|
1648
1798
|
}, (response) => {
|
|
@@ -1650,7 +1800,7 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
1650
1800
|
});
|
|
1651
1801
|
}
|
|
1652
1802
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
1653
|
-
return buildNetworkSnapshotCachePolicy$
|
|
1803
|
+
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
1654
1804
|
}
|
|
1655
1805
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
1656
1806
|
const { luvio, config } = context;
|
|
@@ -1661,12 +1811,12 @@ function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
|
1661
1811
|
};
|
|
1662
1812
|
const cacheSnapshot = storeLookup(selector, {
|
|
1663
1813
|
config,
|
|
1664
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
1814
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
1665
1815
|
});
|
|
1666
1816
|
return cacheSnapshot;
|
|
1667
1817
|
}
|
|
1668
|
-
const
|
|
1669
|
-
const config = validateAdapterConfig(untrustedConfig,
|
|
1818
|
+
const getDecisionTableFileAdapterFactory = (luvio) => function DecisionTable__getDecisionTableFile(untrustedConfig, requestContext) {
|
|
1819
|
+
const config = validateAdapterConfig$1(untrustedConfig, getDecisionTableFile_ConfigPropertyNames);
|
|
1670
1820
|
// Invalid or incomplete config
|
|
1671
1821
|
if (config === null) {
|
|
1672
1822
|
return null;
|
|
@@ -1675,4 +1825,96 @@ const getDecisionTableRowsAdapterFactory = (luvio) => function DecisionTable__ge
|
|
|
1675
1825
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
1676
1826
|
};
|
|
1677
1827
|
|
|
1678
|
-
|
|
1828
|
+
function select(luvio, params) {
|
|
1829
|
+
return select$2();
|
|
1830
|
+
}
|
|
1831
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
1832
|
+
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
1833
|
+
}
|
|
1834
|
+
function ingestSuccess(luvio, resourceParams, response) {
|
|
1835
|
+
const { body } = response;
|
|
1836
|
+
const key = keyBuilderFromType(luvio, body);
|
|
1837
|
+
luvio.storeIngest(key, ingest, body);
|
|
1838
|
+
const snapshot = luvio.storeLookup({
|
|
1839
|
+
recordId: key,
|
|
1840
|
+
node: select(),
|
|
1841
|
+
variables: {},
|
|
1842
|
+
});
|
|
1843
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1844
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1845
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1846
|
+
}
|
|
1847
|
+
}
|
|
1848
|
+
deepFreeze(snapshot.data);
|
|
1849
|
+
return snapshot;
|
|
1850
|
+
}
|
|
1851
|
+
function createResourceRequest(config) {
|
|
1852
|
+
const headers = {};
|
|
1853
|
+
return {
|
|
1854
|
+
baseUri: '/services/data/v62.0',
|
|
1855
|
+
basePath: '/connect/business-rules/decision-table/' + config.urlParams.decisionTableId + '/file',
|
|
1856
|
+
method: 'post',
|
|
1857
|
+
body: config.body,
|
|
1858
|
+
urlParams: config.urlParams,
|
|
1859
|
+
queryParams: {},
|
|
1860
|
+
headers,
|
|
1861
|
+
priority: 'normal',
|
|
1862
|
+
};
|
|
1863
|
+
}
|
|
1864
|
+
|
|
1865
|
+
const adapterName = 'postDecisionTableFile';
|
|
1866
|
+
const postDecisionTableFile_ConfigPropertyMetadata = [
|
|
1867
|
+
generateParamConfigMetadata('decisionTableId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1868
|
+
generateParamConfigMetadata('deleteAllRows', false, 2 /* Body */, 1 /* Boolean */),
|
|
1869
|
+
generateParamConfigMetadata('fileId', true, 2 /* Body */, 0 /* String */),
|
|
1870
|
+
];
|
|
1871
|
+
const postDecisionTableFile_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, postDecisionTableFile_ConfigPropertyMetadata);
|
|
1872
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$7(postDecisionTableFile_ConfigPropertyMetadata);
|
|
1873
|
+
function typeCheckConfig(untrustedConfig) {
|
|
1874
|
+
const config = {};
|
|
1875
|
+
typeCheckConfig$7(untrustedConfig, config, postDecisionTableFile_ConfigPropertyMetadata);
|
|
1876
|
+
return config;
|
|
1877
|
+
}
|
|
1878
|
+
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
1879
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1880
|
+
return null;
|
|
1881
|
+
}
|
|
1882
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1883
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1884
|
+
}
|
|
1885
|
+
const config = typeCheckConfig(untrustedConfig);
|
|
1886
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1887
|
+
return null;
|
|
1888
|
+
}
|
|
1889
|
+
return config;
|
|
1890
|
+
}
|
|
1891
|
+
function buildNetworkSnapshot(luvio, config, options) {
|
|
1892
|
+
const resourceParams = createResourceParams(config);
|
|
1893
|
+
const request = createResourceRequest(resourceParams);
|
|
1894
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1895
|
+
.then((response) => {
|
|
1896
|
+
return luvio.handleSuccessResponse(() => {
|
|
1897
|
+
const snapshot = ingestSuccess(luvio, resourceParams, response);
|
|
1898
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1899
|
+
}, () => {
|
|
1900
|
+
const cache = new StoreKeyMap();
|
|
1901
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
1902
|
+
return cache;
|
|
1903
|
+
});
|
|
1904
|
+
}, (response) => {
|
|
1905
|
+
deepFreeze(response);
|
|
1906
|
+
throw response;
|
|
1907
|
+
});
|
|
1908
|
+
}
|
|
1909
|
+
const postDecisionTableFileAdapterFactory = (luvio) => {
|
|
1910
|
+
return function postDecisionTableFile(untrustedConfig) {
|
|
1911
|
+
const config = validateAdapterConfig(untrustedConfig, postDecisionTableFile_ConfigPropertyNames);
|
|
1912
|
+
// Invalid or incomplete config
|
|
1913
|
+
if (config === null) {
|
|
1914
|
+
throw new Error('Invalid config for "postDecisionTableFile"');
|
|
1915
|
+
}
|
|
1916
|
+
return buildNetworkSnapshot(luvio, config);
|
|
1917
|
+
};
|
|
1918
|
+
};
|
|
1919
|
+
|
|
1920
|
+
export { getDecisionTableAdapterFactory, getDecisionTableFileAdapterFactory, getDecisionTableRowsAdapterFactory, getDecisionTableTemplateAdapterFactory, getDecisionTableTemplateListAdapterFactory, postDecisionTableFileAdapterFactory, postDecisionTableRowsAdapterFactory };
|