@salesforce/lds-adapters-cdp-byoc 1.353.1 → 1.354.0-dev10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/es2018/cdp-byoc.js +878 -209
- package/dist/es/es2018/types/src/generated/adapters/getCustomCodeDeployments.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/adapters/getCustomCodeExecutionLogs.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/adapters/getCustomCodeExecutions.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +5 -1
- package/dist/es/es2018/types/src/generated/resources/getSsotDataCustomCode.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/resources/getSsotDataCustomCodeExecutionsByCustomCodeNameOrId.d.ts +19 -0
- package/dist/es/es2018/types/src/generated/resources/getSsotDataCustomCodeExecutionsLogsByCustomCodeExecutionIdAndCustomCodeNameOrId.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/types/CustomCodeDeploymentRepresentation.d.ts +3 -3
- package/dist/es/es2018/types/src/generated/types/CustomCodeExecutionBaseRepresentation.d.ts +55 -0
- package/dist/es/es2018/types/src/generated/types/CustomCodeExecutionCollectionRepresentation.d.ts +38 -0
- package/dist/es/es2018/types/src/generated/types/CustomCodeExecutionLogRepresentation.d.ts +28 -0
- package/package.json +3 -3
- package/sfdc/index.js +918 -230
- package/src/raml/api.raml +133 -2
- package/src/raml/luvio.raml +10 -0
package/sfdc/index.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
15
|
import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
|
|
16
16
|
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
17
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$
|
|
17
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$7, typeCheckConfig as typeCheckConfig$7, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$4 } from 'force/luvioEngine';
|
|
18
18
|
|
|
19
19
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
20
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -83,6 +83,7 @@ const keyPrefix = 'byoc';
|
|
|
83
83
|
|
|
84
84
|
const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
|
|
85
85
|
const { isArray: ArrayIsArray } = Array;
|
|
86
|
+
const { stringify: JSONStringify } = JSON;
|
|
86
87
|
function equalsArray(a, b, equalsItem) {
|
|
87
88
|
const aLength = a.length;
|
|
88
89
|
const bLength = b.length;
|
|
@@ -121,8 +122,8 @@ function createLink(ref) {
|
|
|
121
122
|
};
|
|
122
123
|
}
|
|
123
124
|
|
|
124
|
-
const VERSION$
|
|
125
|
-
function validate$
|
|
125
|
+
const VERSION$5 = "2fe1bfd9fd1c6a94767d2ea000d6d318";
|
|
126
|
+
function validate$5(obj, path = 'CdpUserRepresentation') {
|
|
126
127
|
const v_error = (() => {
|
|
127
128
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
128
129
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -145,10 +146,10 @@ function validate$2(obj, path = 'CdpUserRepresentation') {
|
|
|
145
146
|
})();
|
|
146
147
|
return v_error === undefined ? null : v_error;
|
|
147
148
|
}
|
|
148
|
-
const select$
|
|
149
|
+
const select$b = function CdpUserRepresentationSelect() {
|
|
149
150
|
return {
|
|
150
151
|
kind: 'Fragment',
|
|
151
|
-
version: VERSION$
|
|
152
|
+
version: VERSION$5,
|
|
152
153
|
private: [],
|
|
153
154
|
selections: [
|
|
154
155
|
{
|
|
@@ -166,7 +167,7 @@ const select$6 = function CdpUserRepresentationSelect() {
|
|
|
166
167
|
]
|
|
167
168
|
};
|
|
168
169
|
};
|
|
169
|
-
function equals$
|
|
170
|
+
function equals$5(existing, incoming) {
|
|
170
171
|
const existing_id = existing.id;
|
|
171
172
|
const incoming_id = incoming.id;
|
|
172
173
|
if (!(existing_id === incoming_id)) {
|
|
@@ -185,8 +186,8 @@ function equals$2(existing, incoming) {
|
|
|
185
186
|
return true;
|
|
186
187
|
}
|
|
187
188
|
|
|
188
|
-
const VERSION$
|
|
189
|
-
function validate$
|
|
189
|
+
const VERSION$4 = "3a8185ac626c1463f8bf0540517ef2e2";
|
|
190
|
+
function validate$4(obj, path = 'CustomCodeDeploymentRepresentation') {
|
|
190
191
|
const v_error = (() => {
|
|
191
192
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
192
193
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -203,7 +204,7 @@ function validate$1(obj, path = 'CustomCodeDeploymentRepresentation') {
|
|
|
203
204
|
}
|
|
204
205
|
const obj_createdBy = obj.createdBy;
|
|
205
206
|
const path_createdBy = path + '.createdBy';
|
|
206
|
-
const referencepath_createdByValidationError = validate$
|
|
207
|
+
const referencepath_createdByValidationError = validate$5(obj_createdBy, path_createdBy);
|
|
207
208
|
if (referencepath_createdByValidationError !== null) {
|
|
208
209
|
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_createdBy + '")\n';
|
|
209
210
|
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -271,7 +272,7 @@ function validate$1(obj, path = 'CustomCodeDeploymentRepresentation') {
|
|
|
271
272
|
}
|
|
272
273
|
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
273
274
|
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
274
|
-
const referencepath_lastModifiedByValidationError = validate$
|
|
275
|
+
const referencepath_lastModifiedByValidationError = validate$5(obj_lastModifiedBy, path_lastModifiedBy);
|
|
275
276
|
if (referencepath_lastModifiedByValidationError !== null) {
|
|
276
277
|
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_lastModifiedBy + '")\n';
|
|
277
278
|
message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -304,8 +305,8 @@ function validate$1(obj, path = 'CustomCodeDeploymentRepresentation') {
|
|
|
304
305
|
const key = obj_parameters_keys[i];
|
|
305
306
|
const obj_parameters_prop = obj_parameters[key];
|
|
306
307
|
const path_parameters_prop = path_parameters + '["' + key + '"]';
|
|
307
|
-
if (
|
|
308
|
-
return new TypeError('Expected "
|
|
308
|
+
if (obj_parameters_prop === undefined) {
|
|
309
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_parameters_prop + '" (at "' + path_parameters_prop + '")');
|
|
309
310
|
}
|
|
310
311
|
}
|
|
311
312
|
const obj_status = obj.status;
|
|
@@ -326,24 +327,24 @@ function validate$1(obj, path = 'CustomCodeDeploymentRepresentation') {
|
|
|
326
327
|
})();
|
|
327
328
|
return v_error === undefined ? null : v_error;
|
|
328
329
|
}
|
|
329
|
-
const RepresentationType$
|
|
330
|
-
function keyBuilder$
|
|
331
|
-
return keyPrefix + '::' + RepresentationType$
|
|
330
|
+
const RepresentationType$3 = 'CustomCodeDeploymentRepresentation';
|
|
331
|
+
function keyBuilder$9(luvio, config) {
|
|
332
|
+
return keyPrefix + '::' + RepresentationType$3 + ':' + config.id;
|
|
332
333
|
}
|
|
333
334
|
function keyBuilderFromType(luvio, object) {
|
|
334
335
|
const keyParams = {
|
|
335
336
|
id: object.id
|
|
336
337
|
};
|
|
337
|
-
return keyBuilder$
|
|
338
|
+
return keyBuilder$9(luvio, keyParams);
|
|
338
339
|
}
|
|
339
|
-
function normalize$
|
|
340
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
340
341
|
return input;
|
|
341
342
|
}
|
|
342
|
-
const select$
|
|
343
|
-
const { selections: CdpUserRepresentation__selections, opaque: CdpUserRepresentation__opaque, } = select$
|
|
343
|
+
const select$a = function CustomCodeDeploymentRepresentationSelect() {
|
|
344
|
+
const { selections: CdpUserRepresentation__selections, opaque: CdpUserRepresentation__opaque, } = select$b();
|
|
344
345
|
return {
|
|
345
346
|
kind: 'Fragment',
|
|
346
|
-
version: VERSION$
|
|
347
|
+
version: VERSION$4,
|
|
347
348
|
private: [],
|
|
348
349
|
selections: [
|
|
349
350
|
{
|
|
@@ -420,8 +421,8 @@ const select$5 = function CustomCodeDeploymentRepresentationSelect() {
|
|
|
420
421
|
},
|
|
421
422
|
{
|
|
422
423
|
name: 'parameters',
|
|
423
|
-
kind: '
|
|
424
|
-
|
|
424
|
+
kind: 'Object',
|
|
425
|
+
// any
|
|
425
426
|
},
|
|
426
427
|
{
|
|
427
428
|
name: 'status',
|
|
@@ -438,7 +439,7 @@ const select$5 = function CustomCodeDeploymentRepresentationSelect() {
|
|
|
438
439
|
]
|
|
439
440
|
};
|
|
440
441
|
};
|
|
441
|
-
function equals$
|
|
442
|
+
function equals$4(existing, incoming) {
|
|
442
443
|
const existing_deploymentFailureCode = existing.deploymentFailureCode;
|
|
443
444
|
const incoming_deploymentFailureCode = incoming.deploymentFailureCode;
|
|
444
445
|
// if at least one of these optionals is defined
|
|
@@ -553,7 +554,7 @@ function equals$1(existing, incoming) {
|
|
|
553
554
|
}
|
|
554
555
|
const existing_createdBy = existing.createdBy;
|
|
555
556
|
const incoming_createdBy = incoming.createdBy;
|
|
556
|
-
if (!(equals$
|
|
557
|
+
if (!(equals$5(existing_createdBy, incoming_createdBy))) {
|
|
557
558
|
return false;
|
|
558
559
|
}
|
|
559
560
|
const existing_functionInvokeOptions = existing.functionInvokeOptions;
|
|
@@ -576,13 +577,13 @@ function equals$1(existing, incoming) {
|
|
|
576
577
|
}
|
|
577
578
|
const existing_lastModifiedBy = existing.lastModifiedBy;
|
|
578
579
|
const incoming_lastModifiedBy = incoming.lastModifiedBy;
|
|
579
|
-
if (!(equals$
|
|
580
|
+
if (!(equals$5(existing_lastModifiedBy, incoming_lastModifiedBy))) {
|
|
580
581
|
return false;
|
|
581
582
|
}
|
|
582
583
|
const existing_parameters = existing.parameters;
|
|
583
584
|
const incoming_parameters = incoming.parameters;
|
|
584
585
|
const equals_parameters_props = equalsObject(existing_parameters, incoming_parameters, (existing_parameters_prop, incoming_parameters_prop) => {
|
|
585
|
-
if (
|
|
586
|
+
if (JSONStringify(incoming_parameters_prop) !== JSONStringify(existing_parameters_prop)) {
|
|
586
587
|
return false;
|
|
587
588
|
}
|
|
588
589
|
});
|
|
@@ -591,41 +592,41 @@ function equals$1(existing, incoming) {
|
|
|
591
592
|
}
|
|
592
593
|
return true;
|
|
593
594
|
}
|
|
594
|
-
const ingest$
|
|
595
|
+
const ingest$3 = function CustomCodeDeploymentRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
595
596
|
if (process.env.NODE_ENV !== 'production') {
|
|
596
|
-
const validateError = validate$
|
|
597
|
+
const validateError = validate$4(input);
|
|
597
598
|
if (validateError !== null) {
|
|
598
599
|
throw validateError;
|
|
599
600
|
}
|
|
600
601
|
}
|
|
601
602
|
const key = keyBuilderFromType(luvio, input);
|
|
602
603
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
603
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
604
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "byoc", VERSION$4, RepresentationType$3, equals$4);
|
|
604
605
|
return createLink(key);
|
|
605
606
|
};
|
|
606
|
-
function getTypeCacheKeys$
|
|
607
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
607
608
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
608
609
|
const rootKey = keyBuilderFromType(luvio, input);
|
|
609
610
|
rootKeySet.set(rootKey, {
|
|
610
611
|
namespace: keyPrefix,
|
|
611
|
-
representationName: RepresentationType$
|
|
612
|
+
representationName: RepresentationType$3,
|
|
612
613
|
mergeable: false
|
|
613
614
|
});
|
|
614
615
|
}
|
|
615
616
|
|
|
616
|
-
function select$
|
|
617
|
-
return select$
|
|
617
|
+
function select$9(luvio, params) {
|
|
618
|
+
return select$a();
|
|
618
619
|
}
|
|
619
|
-
function getResponseCacheKeys$
|
|
620
|
-
getTypeCacheKeys$
|
|
620
|
+
function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
|
|
621
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response);
|
|
621
622
|
}
|
|
622
|
-
function ingestSuccess$
|
|
623
|
+
function ingestSuccess$5(luvio, resourceParams, response) {
|
|
623
624
|
const { body } = response;
|
|
624
625
|
const key = keyBuilderFromType(luvio, body);
|
|
625
|
-
luvio.storeIngest(key, ingest$
|
|
626
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
626
627
|
const snapshot = luvio.storeLookup({
|
|
627
628
|
recordId: key,
|
|
628
|
-
node: select$
|
|
629
|
+
node: select$9(),
|
|
629
630
|
variables: {},
|
|
630
631
|
});
|
|
631
632
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -636,10 +637,10 @@ function ingestSuccess$3(luvio, resourceParams, response) {
|
|
|
636
637
|
deepFreeze(snapshot.data);
|
|
637
638
|
return snapshot;
|
|
638
639
|
}
|
|
639
|
-
function createResourceRequest$
|
|
640
|
+
function createResourceRequest$6(config) {
|
|
640
641
|
const headers = {};
|
|
641
642
|
return {
|
|
642
|
-
baseUri: '/services/data/
|
|
643
|
+
baseUri: '/services/data/v64.0',
|
|
643
644
|
basePath: '/ssot/data-custom-code',
|
|
644
645
|
method: 'post',
|
|
645
646
|
body: config.body,
|
|
@@ -650,7 +651,7 @@ function createResourceRequest$4(config) {
|
|
|
650
651
|
};
|
|
651
652
|
}
|
|
652
653
|
|
|
653
|
-
const adapterName$
|
|
654
|
+
const adapterName$6 = 'createCustomCodeDeployment';
|
|
654
655
|
const createCustomCodeDeployment_ConfigPropertyMetadata = [
|
|
655
656
|
generateParamConfigMetadata('codeType', false, 2 /* Body */, 0 /* String */),
|
|
656
657
|
generateParamConfigMetadata('computeType', true, 2 /* Body */, 0 /* String */),
|
|
@@ -662,11 +663,11 @@ const createCustomCodeDeployment_ConfigPropertyMetadata = [
|
|
|
662
663
|
generateParamConfigMetadata('parameters', false, 2 /* Body */, 4 /* Unsupported */),
|
|
663
664
|
generateParamConfigMetadata('version', true, 2 /* Body */, 0 /* String */),
|
|
664
665
|
];
|
|
665
|
-
const createCustomCodeDeployment_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
666
|
-
const createResourceParams$
|
|
667
|
-
function typeCheckConfig$
|
|
666
|
+
const createCustomCodeDeployment_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, createCustomCodeDeployment_ConfigPropertyMetadata);
|
|
667
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$7(createCustomCodeDeployment_ConfigPropertyMetadata);
|
|
668
|
+
function typeCheckConfig$6(untrustedConfig) {
|
|
668
669
|
const config = {};
|
|
669
|
-
typeCheckConfig$
|
|
670
|
+
typeCheckConfig$7(untrustedConfig, config, createCustomCodeDeployment_ConfigPropertyMetadata);
|
|
670
671
|
const untrustedConfig_parameters = untrustedConfig.parameters;
|
|
671
672
|
if (untrustedIsObject(untrustedConfig_parameters)) {
|
|
672
673
|
const untrustedConfig_parameters_object = {};
|
|
@@ -686,30 +687,30 @@ function typeCheckConfig$4(untrustedConfig) {
|
|
|
686
687
|
}
|
|
687
688
|
return config;
|
|
688
689
|
}
|
|
689
|
-
function validateAdapterConfig$
|
|
690
|
+
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
690
691
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
691
692
|
return null;
|
|
692
693
|
}
|
|
693
694
|
if (process.env.NODE_ENV !== 'production') {
|
|
694
695
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
695
696
|
}
|
|
696
|
-
const config = typeCheckConfig$
|
|
697
|
+
const config = typeCheckConfig$6(untrustedConfig);
|
|
697
698
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
698
699
|
return null;
|
|
699
700
|
}
|
|
700
701
|
return config;
|
|
701
702
|
}
|
|
702
|
-
function buildNetworkSnapshot$
|
|
703
|
-
const resourceParams = createResourceParams$
|
|
704
|
-
const request = createResourceRequest$
|
|
703
|
+
function buildNetworkSnapshot$6(luvio, config, options) {
|
|
704
|
+
const resourceParams = createResourceParams$6(config);
|
|
705
|
+
const request = createResourceRequest$6(resourceParams);
|
|
705
706
|
return luvio.dispatchResourceRequest(request, options)
|
|
706
707
|
.then((response) => {
|
|
707
708
|
return luvio.handleSuccessResponse(() => {
|
|
708
|
-
const snapshot = ingestSuccess$
|
|
709
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response);
|
|
709
710
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
710
711
|
}, () => {
|
|
711
712
|
const cache = new StoreKeyMap();
|
|
712
|
-
getResponseCacheKeys$
|
|
713
|
+
getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
|
|
713
714
|
return cache;
|
|
714
715
|
});
|
|
715
716
|
}, (response) => {
|
|
@@ -719,36 +720,36 @@ function buildNetworkSnapshot$4(luvio, config, options) {
|
|
|
719
720
|
}
|
|
720
721
|
const createCustomCodeDeploymentAdapterFactory = (luvio) => {
|
|
721
722
|
return function createCustomCodeDeployment(untrustedConfig) {
|
|
722
|
-
const config = validateAdapterConfig$
|
|
723
|
+
const config = validateAdapterConfig$6(untrustedConfig, createCustomCodeDeployment_ConfigPropertyNames);
|
|
723
724
|
// Invalid or incomplete config
|
|
724
725
|
if (config === null) {
|
|
725
726
|
throw new Error('Invalid config for "createCustomCodeDeployment"');
|
|
726
727
|
}
|
|
727
|
-
return buildNetworkSnapshot$
|
|
728
|
+
return buildNetworkSnapshot$6(luvio, config);
|
|
728
729
|
};
|
|
729
730
|
};
|
|
730
731
|
|
|
731
|
-
function keyBuilder$
|
|
732
|
-
return keyBuilder$
|
|
732
|
+
function keyBuilder$8(luvio, params) {
|
|
733
|
+
return keyBuilder$9(luvio, {
|
|
733
734
|
id: params.urlParams.customCodeNameOrId
|
|
734
735
|
});
|
|
735
736
|
}
|
|
736
|
-
function getResponseCacheKeys$
|
|
737
|
-
const key = keyBuilder$
|
|
737
|
+
function getResponseCacheKeys$5(cacheKeyMap, luvio, resourceParams) {
|
|
738
|
+
const key = keyBuilder$8(luvio, resourceParams);
|
|
738
739
|
cacheKeyMap.set(key, {
|
|
739
740
|
namespace: keyPrefix,
|
|
740
|
-
representationName: RepresentationType$
|
|
741
|
+
representationName: RepresentationType$3,
|
|
741
742
|
mergeable: false
|
|
742
743
|
});
|
|
743
744
|
}
|
|
744
745
|
function evictSuccess(luvio, resourceParams) {
|
|
745
|
-
const key = keyBuilder$
|
|
746
|
+
const key = keyBuilder$8(luvio, resourceParams);
|
|
746
747
|
luvio.storeEvict(key);
|
|
747
748
|
}
|
|
748
|
-
function createResourceRequest$
|
|
749
|
+
function createResourceRequest$5(config) {
|
|
749
750
|
const headers = {};
|
|
750
751
|
return {
|
|
751
|
-
baseUri: '/services/data/
|
|
752
|
+
baseUri: '/services/data/v64.0',
|
|
752
753
|
basePath: '/ssot/data-custom-code/' + config.urlParams.customCodeNameOrId + '',
|
|
753
754
|
method: 'delete',
|
|
754
755
|
body: null,
|
|
@@ -759,33 +760,33 @@ function createResourceRequest$3(config) {
|
|
|
759
760
|
};
|
|
760
761
|
}
|
|
761
762
|
|
|
762
|
-
const adapterName$
|
|
763
|
+
const adapterName$5 = 'deleteCustomCodeDeployment';
|
|
763
764
|
const deleteCustomCodeDeployment_ConfigPropertyMetadata = [
|
|
764
765
|
generateParamConfigMetadata('customCodeNameOrId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
765
766
|
];
|
|
766
|
-
const deleteCustomCodeDeployment_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
767
|
-
const createResourceParams$
|
|
768
|
-
function typeCheckConfig$
|
|
767
|
+
const deleteCustomCodeDeployment_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, deleteCustomCodeDeployment_ConfigPropertyMetadata);
|
|
768
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$7(deleteCustomCodeDeployment_ConfigPropertyMetadata);
|
|
769
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
769
770
|
const config = {};
|
|
770
|
-
typeCheckConfig$
|
|
771
|
+
typeCheckConfig$7(untrustedConfig, config, deleteCustomCodeDeployment_ConfigPropertyMetadata);
|
|
771
772
|
return config;
|
|
772
773
|
}
|
|
773
|
-
function validateAdapterConfig$
|
|
774
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
774
775
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
775
776
|
return null;
|
|
776
777
|
}
|
|
777
778
|
if (process.env.NODE_ENV !== 'production') {
|
|
778
779
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
779
780
|
}
|
|
780
|
-
const config = typeCheckConfig$
|
|
781
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
781
782
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
782
783
|
return null;
|
|
783
784
|
}
|
|
784
785
|
return config;
|
|
785
786
|
}
|
|
786
|
-
function buildNetworkSnapshot$
|
|
787
|
-
const resourceParams = createResourceParams$
|
|
788
|
-
const request = createResourceRequest$
|
|
787
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
788
|
+
const resourceParams = createResourceParams$5(config);
|
|
789
|
+
const request = createResourceRequest$5(resourceParams);
|
|
789
790
|
return luvio.dispatchResourceRequest(request, options)
|
|
790
791
|
.then(() => {
|
|
791
792
|
return luvio.handleSuccessResponse(() => {
|
|
@@ -793,7 +794,7 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
793
794
|
return luvio.storeBroadcast();
|
|
794
795
|
}, () => {
|
|
795
796
|
const cache = new StoreKeyMap();
|
|
796
|
-
getResponseCacheKeys$
|
|
797
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams);
|
|
797
798
|
return cache;
|
|
798
799
|
});
|
|
799
800
|
}, (response) => {
|
|
@@ -803,33 +804,33 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
803
804
|
}
|
|
804
805
|
const deleteCustomCodeDeploymentAdapterFactory = (luvio) => {
|
|
805
806
|
return function byocdeleteCustomCodeDeployment(untrustedConfig) {
|
|
806
|
-
const config = validateAdapterConfig$
|
|
807
|
+
const config = validateAdapterConfig$5(untrustedConfig, deleteCustomCodeDeployment_ConfigPropertyNames);
|
|
807
808
|
// Invalid or incomplete config
|
|
808
809
|
if (config === null) {
|
|
809
|
-
throw new Error(`Invalid config for "${adapterName$
|
|
810
|
+
throw new Error(`Invalid config for "${adapterName$5}"`);
|
|
810
811
|
}
|
|
811
|
-
return buildNetworkSnapshot$
|
|
812
|
+
return buildNetworkSnapshot$5(luvio, config);
|
|
812
813
|
};
|
|
813
814
|
};
|
|
814
815
|
|
|
815
|
-
function select$
|
|
816
|
-
return select$
|
|
816
|
+
function select$8(luvio, params) {
|
|
817
|
+
return select$a();
|
|
817
818
|
}
|
|
818
|
-
function keyBuilder$
|
|
819
|
-
return keyBuilder$
|
|
819
|
+
function keyBuilder$7(luvio, params) {
|
|
820
|
+
return keyBuilder$9(luvio, {
|
|
820
821
|
id: params.urlParams.customCodeNameOrId
|
|
821
822
|
});
|
|
822
823
|
}
|
|
823
|
-
function getResponseCacheKeys$
|
|
824
|
-
getTypeCacheKeys$
|
|
824
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
825
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response);
|
|
825
826
|
}
|
|
826
|
-
function ingestSuccess$
|
|
827
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
827
828
|
const { body } = response;
|
|
828
|
-
const key = keyBuilder$
|
|
829
|
-
luvio.storeIngest(key, ingest$
|
|
829
|
+
const key = keyBuilder$7(luvio, resourceParams);
|
|
830
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
830
831
|
const snapshot = luvio.storeLookup({
|
|
831
832
|
recordId: key,
|
|
832
|
-
node: select$
|
|
833
|
+
node: select$8(),
|
|
833
834
|
variables: {},
|
|
834
835
|
}, snapshotRefresh);
|
|
835
836
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -840,16 +841,16 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
840
841
|
deepFreeze(snapshot.data);
|
|
841
842
|
return snapshot;
|
|
842
843
|
}
|
|
843
|
-
function ingestError$
|
|
844
|
-
const key = keyBuilder$
|
|
844
|
+
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
845
|
+
const key = keyBuilder$7(luvio, params);
|
|
845
846
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
846
847
|
luvio.storeIngestError(key, errorSnapshot);
|
|
847
848
|
return errorSnapshot;
|
|
848
849
|
}
|
|
849
|
-
function createResourceRequest$
|
|
850
|
+
function createResourceRequest$4(config) {
|
|
850
851
|
const headers = {};
|
|
851
852
|
return {
|
|
852
|
-
baseUri: '/services/data/
|
|
853
|
+
baseUri: '/services/data/v64.0',
|
|
853
854
|
basePath: '/ssot/data-custom-code/' + config.urlParams.customCodeNameOrId + '',
|
|
854
855
|
method: 'get',
|
|
855
856
|
body: null,
|
|
@@ -864,97 +865,97 @@ function createResourceRequestFromRepresentation(representation) {
|
|
|
864
865
|
urlParams: {},
|
|
865
866
|
};
|
|
866
867
|
config.urlParams.customCodeNameOrId = representation.id;
|
|
867
|
-
return createResourceRequest$
|
|
868
|
+
return createResourceRequest$4(config);
|
|
868
869
|
}
|
|
869
870
|
|
|
870
|
-
const adapterName$
|
|
871
|
+
const adapterName$4 = 'getCustomCodeDeployment';
|
|
871
872
|
const getCustomCodeDeployment_ConfigPropertyMetadata = [
|
|
872
873
|
generateParamConfigMetadata('customCodeNameOrId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
873
874
|
];
|
|
874
|
-
const getCustomCodeDeployment_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
875
|
-
const createResourceParams$
|
|
876
|
-
function keyBuilder$
|
|
877
|
-
const resourceParams = createResourceParams$
|
|
878
|
-
return keyBuilder$
|
|
875
|
+
const getCustomCodeDeployment_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getCustomCodeDeployment_ConfigPropertyMetadata);
|
|
876
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$7(getCustomCodeDeployment_ConfigPropertyMetadata);
|
|
877
|
+
function keyBuilder$6(luvio, config) {
|
|
878
|
+
const resourceParams = createResourceParams$4(config);
|
|
879
|
+
return keyBuilder$7(luvio, resourceParams);
|
|
879
880
|
}
|
|
880
|
-
function typeCheckConfig$
|
|
881
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
881
882
|
const config = {};
|
|
882
|
-
typeCheckConfig$
|
|
883
|
+
typeCheckConfig$7(untrustedConfig, config, getCustomCodeDeployment_ConfigPropertyMetadata);
|
|
883
884
|
return config;
|
|
884
885
|
}
|
|
885
|
-
function validateAdapterConfig$
|
|
886
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
886
887
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
887
888
|
return null;
|
|
888
889
|
}
|
|
889
890
|
if (process.env.NODE_ENV !== 'production') {
|
|
890
891
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
891
892
|
}
|
|
892
|
-
const config = typeCheckConfig$
|
|
893
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
893
894
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
894
895
|
return null;
|
|
895
896
|
}
|
|
896
897
|
return config;
|
|
897
898
|
}
|
|
898
|
-
function adapterFragment$
|
|
899
|
-
createResourceParams$
|
|
900
|
-
return select$
|
|
899
|
+
function adapterFragment$3(luvio, config) {
|
|
900
|
+
createResourceParams$4(config);
|
|
901
|
+
return select$8();
|
|
901
902
|
}
|
|
902
|
-
function onFetchResponseSuccess$
|
|
903
|
-
const snapshot = ingestSuccess$
|
|
903
|
+
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
904
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
904
905
|
config,
|
|
905
|
-
resolve: () => buildNetworkSnapshot$
|
|
906
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
906
907
|
});
|
|
907
908
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
908
909
|
}
|
|
909
|
-
function onFetchResponseError$
|
|
910
|
-
const snapshot = ingestError$
|
|
910
|
+
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
911
|
+
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
911
912
|
config,
|
|
912
|
-
resolve: () => buildNetworkSnapshot$
|
|
913
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
913
914
|
});
|
|
914
915
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
915
916
|
}
|
|
916
|
-
function buildNetworkSnapshot$
|
|
917
|
-
const resourceParams = createResourceParams$
|
|
918
|
-
const request = createResourceRequest$
|
|
917
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
918
|
+
const resourceParams = createResourceParams$4(config);
|
|
919
|
+
const request = createResourceRequest$4(resourceParams);
|
|
919
920
|
return luvio.dispatchResourceRequest(request, options)
|
|
920
921
|
.then((response) => {
|
|
921
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
922
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
922
923
|
const cache = new StoreKeyMap();
|
|
923
|
-
getResponseCacheKeys$
|
|
924
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
924
925
|
return cache;
|
|
925
926
|
});
|
|
926
927
|
}, (response) => {
|
|
927
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
928
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
|
|
928
929
|
});
|
|
929
930
|
}
|
|
930
|
-
function buildNetworkSnapshotCachePolicy$
|
|
931
|
-
return buildNetworkSnapshotCachePolicy$
|
|
931
|
+
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
932
|
+
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
|
|
932
933
|
}
|
|
933
|
-
function buildCachedSnapshotCachePolicy$
|
|
934
|
+
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
934
935
|
const { luvio, config } = context;
|
|
935
936
|
const selector = {
|
|
936
|
-
recordId: keyBuilder$
|
|
937
|
-
node: adapterFragment$
|
|
937
|
+
recordId: keyBuilder$6(luvio, config),
|
|
938
|
+
node: adapterFragment$3(luvio, config),
|
|
938
939
|
variables: {},
|
|
939
940
|
};
|
|
940
941
|
const cacheSnapshot = storeLookup(selector, {
|
|
941
942
|
config,
|
|
942
|
-
resolve: () => buildNetworkSnapshot$
|
|
943
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
943
944
|
});
|
|
944
945
|
return cacheSnapshot;
|
|
945
946
|
}
|
|
946
947
|
const getCustomCodeDeploymentAdapterFactory = (luvio) => function byoc__getCustomCodeDeployment(untrustedConfig, requestContext) {
|
|
947
|
-
const config = validateAdapterConfig$
|
|
948
|
+
const config = validateAdapterConfig$4(untrustedConfig, getCustomCodeDeployment_ConfigPropertyNames);
|
|
948
949
|
// Invalid or incomplete config
|
|
949
950
|
if (config === null) {
|
|
950
951
|
return null;
|
|
951
952
|
}
|
|
952
953
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
953
|
-
buildCachedSnapshotCachePolicy$
|
|
954
|
+
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
954
955
|
};
|
|
955
956
|
const notifyChangeFactory = (luvio, options) => {
|
|
956
957
|
return function getSsotDataCustomCodeByCustomCodeNameOrIdNotifyChange(configs) {
|
|
957
|
-
const keys = configs.map(c => keyBuilder$
|
|
958
|
+
const keys = configs.map(c => keyBuilder$9(luvio, c));
|
|
958
959
|
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
959
960
|
for (let i = 0, len = entries.length; i < len; i++) {
|
|
960
961
|
const { key, record: val } = entries[i];
|
|
@@ -963,11 +964,11 @@ const notifyChangeFactory = (luvio, options) => {
|
|
|
963
964
|
.then((response) => {
|
|
964
965
|
return luvio.handleSuccessResponse(() => {
|
|
965
966
|
const { body } = response;
|
|
966
|
-
luvio.storeIngest(key, ingest$
|
|
967
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
967
968
|
return luvio.storeBroadcast();
|
|
968
969
|
}, () => {
|
|
969
970
|
const cache = new StoreKeyMap();
|
|
970
|
-
getTypeCacheKeys$
|
|
971
|
+
getTypeCacheKeys$3(cache, luvio, response.body);
|
|
971
972
|
return cache;
|
|
972
973
|
});
|
|
973
974
|
}, (error) => {
|
|
@@ -982,8 +983,8 @@ const notifyChangeFactory = (luvio, options) => {
|
|
|
982
983
|
};
|
|
983
984
|
};
|
|
984
985
|
|
|
985
|
-
const VERSION = "3d9a814ca87df7e7c79c5d385c146820";
|
|
986
|
-
function validate(obj, path = 'CustomCodeDeploymentCollectionRepresentation') {
|
|
986
|
+
const VERSION$3 = "3d9a814ca87df7e7c79c5d385c146820";
|
|
987
|
+
function validate$3(obj, path = 'CustomCodeDeploymentCollectionRepresentation') {
|
|
987
988
|
const v_error = (() => {
|
|
988
989
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
989
990
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1020,14 +1021,14 @@ function validate(obj, path = 'CustomCodeDeploymentCollectionRepresentation') {
|
|
|
1020
1021
|
})();
|
|
1021
1022
|
return v_error === undefined ? null : v_error;
|
|
1022
1023
|
}
|
|
1023
|
-
const RepresentationType = 'CustomCodeDeploymentCollectionRepresentation';
|
|
1024
|
-
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
1024
|
+
const RepresentationType$2 = 'CustomCodeDeploymentCollectionRepresentation';
|
|
1025
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
1025
1026
|
const input_customCodeDeployments = input.customCodeDeployments;
|
|
1026
1027
|
const input_customCodeDeployments_id = path.fullPath + '__customCodeDeployments';
|
|
1027
1028
|
for (let i = 0; i < input_customCodeDeployments.length; i++) {
|
|
1028
1029
|
const input_customCodeDeployments_item = input_customCodeDeployments[i];
|
|
1029
1030
|
let input_customCodeDeployments_item_id = input_customCodeDeployments_id + '__' + i;
|
|
1030
|
-
input_customCodeDeployments[i] = ingest$
|
|
1031
|
+
input_customCodeDeployments[i] = ingest$3(input_customCodeDeployments_item, {
|
|
1031
1032
|
fullPath: input_customCodeDeployments_item_id,
|
|
1032
1033
|
propertyName: i,
|
|
1033
1034
|
parent: {
|
|
@@ -1040,10 +1041,10 @@ function normalize(input, existing, path, luvio, store, timestamp) {
|
|
|
1040
1041
|
}
|
|
1041
1042
|
return input;
|
|
1042
1043
|
}
|
|
1043
|
-
const select$
|
|
1044
|
+
const select$7 = function CustomCodeDeploymentCollectionRepresentationSelect() {
|
|
1044
1045
|
return {
|
|
1045
1046
|
kind: 'Fragment',
|
|
1046
|
-
version: VERSION,
|
|
1047
|
+
version: VERSION$3,
|
|
1047
1048
|
private: [],
|
|
1048
1049
|
selections: [
|
|
1049
1050
|
{
|
|
@@ -1054,7 +1055,7 @@ const select$2 = function CustomCodeDeploymentCollectionRepresentationSelect() {
|
|
|
1054
1055
|
name: 'customCodeDeployments',
|
|
1055
1056
|
kind: 'Link',
|
|
1056
1057
|
plural: true,
|
|
1057
|
-
fragment: select$
|
|
1058
|
+
fragment: select$a()
|
|
1058
1059
|
},
|
|
1059
1060
|
{
|
|
1060
1061
|
name: 'nextPageUrl',
|
|
@@ -1068,7 +1069,7 @@ const select$2 = function CustomCodeDeploymentCollectionRepresentationSelect() {
|
|
|
1068
1069
|
]
|
|
1069
1070
|
};
|
|
1070
1071
|
};
|
|
1071
|
-
function equals(existing, incoming) {
|
|
1072
|
+
function equals$3(existing, incoming) {
|
|
1072
1073
|
const existing_totalSize = existing.totalSize;
|
|
1073
1074
|
const incoming_totalSize = incoming.totalSize;
|
|
1074
1075
|
if (!(existing_totalSize === incoming_totalSize)) {
|
|
@@ -1104,48 +1105,48 @@ function equals(existing, incoming) {
|
|
|
1104
1105
|
}
|
|
1105
1106
|
return true;
|
|
1106
1107
|
}
|
|
1107
|
-
const ingest = function CustomCodeDeploymentCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1108
|
+
const ingest$2 = function CustomCodeDeploymentCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1108
1109
|
if (process.env.NODE_ENV !== 'production') {
|
|
1109
|
-
const validateError = validate(input);
|
|
1110
|
+
const validateError = validate$3(input);
|
|
1110
1111
|
if (validateError !== null) {
|
|
1111
1112
|
throw validateError;
|
|
1112
1113
|
}
|
|
1113
1114
|
}
|
|
1114
1115
|
const key = path.fullPath;
|
|
1115
1116
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1116
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "byoc", VERSION, RepresentationType, equals);
|
|
1117
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "byoc", VERSION$3, RepresentationType$2, equals$3);
|
|
1117
1118
|
return createLink(key);
|
|
1118
1119
|
};
|
|
1119
|
-
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
1120
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
1120
1121
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1121
1122
|
const rootKey = fullPathFactory();
|
|
1122
1123
|
rootKeySet.set(rootKey, {
|
|
1123
1124
|
namespace: keyPrefix,
|
|
1124
|
-
representationName: RepresentationType,
|
|
1125
|
+
representationName: RepresentationType$2,
|
|
1125
1126
|
mergeable: false
|
|
1126
1127
|
});
|
|
1127
1128
|
const input_customCodeDeployments_length = input.customCodeDeployments.length;
|
|
1128
1129
|
for (let i = 0; i < input_customCodeDeployments_length; i++) {
|
|
1129
|
-
getTypeCacheKeys$
|
|
1130
|
+
getTypeCacheKeys$3(rootKeySet, luvio, input.customCodeDeployments[i]);
|
|
1130
1131
|
}
|
|
1131
1132
|
}
|
|
1132
1133
|
|
|
1133
|
-
function select$
|
|
1134
|
-
return select$
|
|
1134
|
+
function select$6(luvio, params) {
|
|
1135
|
+
return select$7();
|
|
1135
1136
|
}
|
|
1136
|
-
function keyBuilder$
|
|
1137
|
-
return keyPrefix + '::CustomCodeDeploymentCollectionRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'orderBy:' + params.queryParams.orderBy + ')';
|
|
1137
|
+
function keyBuilder$5(luvio, params) {
|
|
1138
|
+
return keyPrefix + '::CustomCodeDeploymentCollectionRepresentation:(' + 'codeType:' + params.queryParams.codeType + ',' + 'deploymentStatus:' + params.queryParams.deploymentStatus + ',' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'orderBy:' + params.queryParams.orderBy + ')';
|
|
1138
1139
|
}
|
|
1139
|
-
function getResponseCacheKeys$
|
|
1140
|
-
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$
|
|
1140
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
1141
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$5(luvio, resourceParams));
|
|
1141
1142
|
}
|
|
1142
|
-
function ingestSuccess$
|
|
1143
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
1143
1144
|
const { body } = response;
|
|
1144
|
-
const key = keyBuilder$
|
|
1145
|
-
luvio.storeIngest(key, ingest, body);
|
|
1145
|
+
const key = keyBuilder$5(luvio, resourceParams);
|
|
1146
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
1146
1147
|
const snapshot = luvio.storeLookup({
|
|
1147
1148
|
recordId: key,
|
|
1148
|
-
node: select$
|
|
1149
|
+
node: select$6(),
|
|
1149
1150
|
variables: {},
|
|
1150
1151
|
}, snapshotRefresh);
|
|
1151
1152
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1156,16 +1157,16 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1156
1157
|
deepFreeze(snapshot.data);
|
|
1157
1158
|
return snapshot;
|
|
1158
1159
|
}
|
|
1159
|
-
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
1160
|
-
const key = keyBuilder$
|
|
1160
|
+
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
1161
|
+
const key = keyBuilder$5(luvio, params);
|
|
1161
1162
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1162
1163
|
luvio.storeIngestError(key, errorSnapshot);
|
|
1163
1164
|
return errorSnapshot;
|
|
1164
1165
|
}
|
|
1165
|
-
function createResourceRequest$
|
|
1166
|
+
function createResourceRequest$3(config) {
|
|
1166
1167
|
const headers = {};
|
|
1167
1168
|
return {
|
|
1168
|
-
baseUri: '/services/data/
|
|
1169
|
+
baseUri: '/services/data/v64.0',
|
|
1169
1170
|
basePath: '/ssot/data-custom-code',
|
|
1170
1171
|
method: 'get',
|
|
1171
1172
|
body: null,
|
|
@@ -1176,109 +1177,175 @@ function createResourceRequest$1(config) {
|
|
|
1176
1177
|
};
|
|
1177
1178
|
}
|
|
1178
1179
|
|
|
1179
|
-
const adapterName$
|
|
1180
|
+
const adapterName$3 = 'getCustomCodeDeployments';
|
|
1180
1181
|
const getCustomCodeDeployments_ConfigPropertyMetadata = [
|
|
1182
|
+
generateParamConfigMetadata('codeType', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1183
|
+
generateParamConfigMetadata('deploymentStatus', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1181
1184
|
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1182
1185
|
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1183
1186
|
generateParamConfigMetadata('orderBy', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1184
1187
|
];
|
|
1185
|
-
const getCustomCodeDeployments_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1186
|
-
const createResourceParams$
|
|
1187
|
-
function keyBuilder(luvio, config) {
|
|
1188
|
-
const resourceParams = createResourceParams$
|
|
1189
|
-
return keyBuilder$
|
|
1188
|
+
const getCustomCodeDeployments_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getCustomCodeDeployments_ConfigPropertyMetadata);
|
|
1189
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$7(getCustomCodeDeployments_ConfigPropertyMetadata);
|
|
1190
|
+
function keyBuilder$4(luvio, config) {
|
|
1191
|
+
const resourceParams = createResourceParams$3(config);
|
|
1192
|
+
return keyBuilder$5(luvio, resourceParams);
|
|
1190
1193
|
}
|
|
1191
|
-
function typeCheckConfig$
|
|
1194
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
1192
1195
|
const config = {};
|
|
1193
|
-
typeCheckConfig$
|
|
1196
|
+
typeCheckConfig$7(untrustedConfig, config, getCustomCodeDeployments_ConfigPropertyMetadata);
|
|
1194
1197
|
return config;
|
|
1195
1198
|
}
|
|
1196
|
-
function validateAdapterConfig$
|
|
1199
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
1197
1200
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1198
1201
|
return null;
|
|
1199
1202
|
}
|
|
1200
1203
|
if (process.env.NODE_ENV !== 'production') {
|
|
1201
1204
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1202
1205
|
}
|
|
1203
|
-
const config = typeCheckConfig$
|
|
1206
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
1204
1207
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1205
1208
|
return null;
|
|
1206
1209
|
}
|
|
1207
1210
|
return config;
|
|
1208
1211
|
}
|
|
1209
|
-
function adapterFragment(luvio, config) {
|
|
1210
|
-
createResourceParams$
|
|
1211
|
-
return select$
|
|
1212
|
+
function adapterFragment$2(luvio, config) {
|
|
1213
|
+
createResourceParams$3(config);
|
|
1214
|
+
return select$6();
|
|
1212
1215
|
}
|
|
1213
|
-
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
1214
|
-
const snapshot = ingestSuccess$
|
|
1216
|
+
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
1217
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
1215
1218
|
config,
|
|
1216
|
-
resolve: () => buildNetworkSnapshot$
|
|
1219
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1217
1220
|
});
|
|
1218
1221
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1219
1222
|
}
|
|
1220
|
-
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
1221
|
-
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
1223
|
+
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
1224
|
+
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
1222
1225
|
config,
|
|
1223
|
-
resolve: () => buildNetworkSnapshot$
|
|
1226
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1224
1227
|
});
|
|
1225
1228
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1226
1229
|
}
|
|
1227
|
-
function buildNetworkSnapshot$
|
|
1228
|
-
const resourceParams = createResourceParams$
|
|
1229
|
-
const request = createResourceRequest$
|
|
1230
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
1231
|
+
const resourceParams = createResourceParams$3(config);
|
|
1232
|
+
const request = createResourceRequest$3(resourceParams);
|
|
1230
1233
|
return luvio.dispatchResourceRequest(request, options)
|
|
1231
1234
|
.then((response) => {
|
|
1232
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
1235
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
1233
1236
|
const cache = new StoreKeyMap();
|
|
1234
|
-
getResponseCacheKeys$
|
|
1237
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
1235
1238
|
return cache;
|
|
1236
1239
|
});
|
|
1237
1240
|
}, (response) => {
|
|
1238
|
-
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
1241
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
|
|
1239
1242
|
});
|
|
1240
1243
|
}
|
|
1241
|
-
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
1242
|
-
return buildNetworkSnapshotCachePolicy$
|
|
1244
|
+
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
1245
|
+
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
1243
1246
|
}
|
|
1244
|
-
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
1247
|
+
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
1245
1248
|
const { luvio, config } = context;
|
|
1246
1249
|
const selector = {
|
|
1247
|
-
recordId: keyBuilder(luvio, config),
|
|
1248
|
-
node: adapterFragment(luvio, config),
|
|
1250
|
+
recordId: keyBuilder$4(luvio, config),
|
|
1251
|
+
node: adapterFragment$2(luvio, config),
|
|
1249
1252
|
variables: {},
|
|
1250
1253
|
};
|
|
1251
1254
|
const cacheSnapshot = storeLookup(selector, {
|
|
1252
1255
|
config,
|
|
1253
|
-
resolve: () => buildNetworkSnapshot$
|
|
1256
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1254
1257
|
});
|
|
1255
1258
|
return cacheSnapshot;
|
|
1256
1259
|
}
|
|
1257
1260
|
const getCustomCodeDeploymentsAdapterFactory = (luvio) => function byoc__getCustomCodeDeployments(untrustedConfig, requestContext) {
|
|
1258
|
-
const config = validateAdapterConfig$
|
|
1261
|
+
const config = validateAdapterConfig$3(untrustedConfig, getCustomCodeDeployments_ConfigPropertyNames);
|
|
1259
1262
|
// Invalid or incomplete config
|
|
1260
1263
|
if (config === null) {
|
|
1261
1264
|
return null;
|
|
1262
1265
|
}
|
|
1263
1266
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1264
|
-
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
1267
|
+
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
1265
1268
|
};
|
|
1266
1269
|
|
|
1267
|
-
|
|
1270
|
+
const VERSION$2 = "67e4b6c0a2163a4de44249f2a2dc7bd0";
|
|
1271
|
+
function validate$2(obj, path = 'CustomCodeExecutionLogRepresentation') {
|
|
1272
|
+
const v_error = (() => {
|
|
1273
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1274
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1275
|
+
}
|
|
1276
|
+
const obj_downloadUrl = obj.downloadUrl;
|
|
1277
|
+
const path_downloadUrl = path + '.downloadUrl';
|
|
1278
|
+
if (typeof obj_downloadUrl !== 'string') {
|
|
1279
|
+
return new TypeError('Expected "string" but received "' + typeof obj_downloadUrl + '" (at "' + path_downloadUrl + '")');
|
|
1280
|
+
}
|
|
1281
|
+
})();
|
|
1282
|
+
return v_error === undefined ? null : v_error;
|
|
1283
|
+
}
|
|
1284
|
+
const RepresentationType$1 = 'CustomCodeExecutionLogRepresentation';
|
|
1285
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
1286
|
+
return input;
|
|
1287
|
+
}
|
|
1288
|
+
const select$5 = function CustomCodeExecutionLogRepresentationSelect() {
|
|
1289
|
+
return {
|
|
1290
|
+
kind: 'Fragment',
|
|
1291
|
+
version: VERSION$2,
|
|
1292
|
+
private: [],
|
|
1293
|
+
selections: [
|
|
1294
|
+
{
|
|
1295
|
+
name: 'downloadUrl',
|
|
1296
|
+
kind: 'Scalar'
|
|
1297
|
+
}
|
|
1298
|
+
]
|
|
1299
|
+
};
|
|
1300
|
+
};
|
|
1301
|
+
function equals$2(existing, incoming) {
|
|
1302
|
+
const existing_downloadUrl = existing.downloadUrl;
|
|
1303
|
+
const incoming_downloadUrl = incoming.downloadUrl;
|
|
1304
|
+
if (!(existing_downloadUrl === incoming_downloadUrl)) {
|
|
1305
|
+
return false;
|
|
1306
|
+
}
|
|
1307
|
+
return true;
|
|
1308
|
+
}
|
|
1309
|
+
const ingest$1 = function CustomCodeExecutionLogRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1310
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1311
|
+
const validateError = validate$2(input);
|
|
1312
|
+
if (validateError !== null) {
|
|
1313
|
+
throw validateError;
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
const key = path.fullPath;
|
|
1317
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1318
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "byoc", VERSION$2, RepresentationType$1, equals$2);
|
|
1319
|
+
return createLink(key);
|
|
1320
|
+
};
|
|
1321
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
1322
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1323
|
+
const rootKey = fullPathFactory();
|
|
1324
|
+
rootKeySet.set(rootKey, {
|
|
1325
|
+
namespace: keyPrefix,
|
|
1326
|
+
representationName: RepresentationType$1,
|
|
1327
|
+
mergeable: false
|
|
1328
|
+
});
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
function select$4(luvio, params) {
|
|
1268
1332
|
return select$5();
|
|
1269
1333
|
}
|
|
1270
|
-
function
|
|
1271
|
-
|
|
1334
|
+
function keyBuilder$3(luvio, params) {
|
|
1335
|
+
return keyPrefix + '::CustomCodeExecutionLogRepresentation:(' + 'customCodeExecutionId:' + params.urlParams.customCodeExecutionId + ',' + 'customCodeNameOrId:' + params.urlParams.customCodeNameOrId + ')';
|
|
1272
1336
|
}
|
|
1273
|
-
function
|
|
1337
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
1338
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
|
|
1339
|
+
}
|
|
1340
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
1274
1341
|
const { body } = response;
|
|
1275
|
-
const key =
|
|
1342
|
+
const key = keyBuilder$3(luvio, resourceParams);
|
|
1276
1343
|
luvio.storeIngest(key, ingest$1, body);
|
|
1277
1344
|
const snapshot = luvio.storeLookup({
|
|
1278
1345
|
recordId: key,
|
|
1279
|
-
node: select(),
|
|
1346
|
+
node: select$4(),
|
|
1280
1347
|
variables: {},
|
|
1281
|
-
});
|
|
1348
|
+
}, snapshotRefresh);
|
|
1282
1349
|
if (process.env.NODE_ENV !== 'production') {
|
|
1283
1350
|
if (snapshot.state !== 'Fulfilled') {
|
|
1284
1351
|
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
@@ -1287,13 +1354,19 @@ function ingestSuccess(luvio, resourceParams, response) {
|
|
|
1287
1354
|
deepFreeze(snapshot.data);
|
|
1288
1355
|
return snapshot;
|
|
1289
1356
|
}
|
|
1290
|
-
function
|
|
1357
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
1358
|
+
const key = keyBuilder$3(luvio, params);
|
|
1359
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1360
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
1361
|
+
return errorSnapshot;
|
|
1362
|
+
}
|
|
1363
|
+
function createResourceRequest$2(config) {
|
|
1291
1364
|
const headers = {};
|
|
1292
1365
|
return {
|
|
1293
|
-
baseUri: '/services/data/
|
|
1294
|
-
basePath: '/ssot/data-custom-code/' + config.urlParams.customCodeNameOrId + '',
|
|
1295
|
-
method: '
|
|
1296
|
-
body:
|
|
1366
|
+
baseUri: '/services/data/v64.0',
|
|
1367
|
+
basePath: '/ssot/data-custom-code/' + config.urlParams.customCodeNameOrId + '/executions/' + config.urlParams.customCodeExecutionId + '/logs',
|
|
1368
|
+
method: 'get',
|
|
1369
|
+
body: null,
|
|
1297
1370
|
urlParams: config.urlParams,
|
|
1298
1371
|
queryParams: {},
|
|
1299
1372
|
headers,
|
|
@@ -1301,56 +1374,652 @@ function createResourceRequest(config) {
|
|
|
1301
1374
|
};
|
|
1302
1375
|
}
|
|
1303
1376
|
|
|
1304
|
-
const adapterName = '
|
|
1305
|
-
const
|
|
1377
|
+
const adapterName$2 = 'getCustomCodeExecutionLogs';
|
|
1378
|
+
const getCustomCodeExecutionLogs_ConfigPropertyMetadata = [
|
|
1379
|
+
generateParamConfigMetadata('customCodeExecutionId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1306
1380
|
generateParamConfigMetadata('customCodeNameOrId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1307
|
-
generateParamConfigMetadata('computeType', false, 2 /* Body */, 0 /* String */),
|
|
1308
|
-
generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
|
|
1309
|
-
generateParamConfigMetadata('label', false, 2 /* Body */, 0 /* String */),
|
|
1310
|
-
generateParamConfigMetadata('version', false, 2 /* Body */, 0 /* String */),
|
|
1311
1381
|
];
|
|
1312
|
-
const
|
|
1313
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
1314
|
-
function
|
|
1382
|
+
const getCustomCodeExecutionLogs_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getCustomCodeExecutionLogs_ConfigPropertyMetadata);
|
|
1383
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$7(getCustomCodeExecutionLogs_ConfigPropertyMetadata);
|
|
1384
|
+
function keyBuilder$2(luvio, config) {
|
|
1385
|
+
const resourceParams = createResourceParams$2(config);
|
|
1386
|
+
return keyBuilder$3(luvio, resourceParams);
|
|
1387
|
+
}
|
|
1388
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
1315
1389
|
const config = {};
|
|
1316
|
-
typeCheckConfig$
|
|
1390
|
+
typeCheckConfig$7(untrustedConfig, config, getCustomCodeExecutionLogs_ConfigPropertyMetadata);
|
|
1317
1391
|
return config;
|
|
1318
1392
|
}
|
|
1319
|
-
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
1393
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
1320
1394
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1321
1395
|
return null;
|
|
1322
1396
|
}
|
|
1323
1397
|
if (process.env.NODE_ENV !== 'production') {
|
|
1324
1398
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1325
1399
|
}
|
|
1326
|
-
const config = typeCheckConfig(untrustedConfig);
|
|
1400
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
1327
1401
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1328
1402
|
return null;
|
|
1329
1403
|
}
|
|
1330
1404
|
return config;
|
|
1331
1405
|
}
|
|
1332
|
-
function
|
|
1333
|
-
|
|
1334
|
-
|
|
1406
|
+
function adapterFragment$1(luvio, config) {
|
|
1407
|
+
createResourceParams$2(config);
|
|
1408
|
+
return select$4();
|
|
1409
|
+
}
|
|
1410
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
1411
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
1412
|
+
config,
|
|
1413
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1414
|
+
});
|
|
1415
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1416
|
+
}
|
|
1417
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
1418
|
+
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
1419
|
+
config,
|
|
1420
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1421
|
+
});
|
|
1422
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1423
|
+
}
|
|
1424
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
1425
|
+
const resourceParams = createResourceParams$2(config);
|
|
1426
|
+
const request = createResourceRequest$2(resourceParams);
|
|
1335
1427
|
return luvio.dispatchResourceRequest(request, options)
|
|
1336
1428
|
.then((response) => {
|
|
1337
|
-
return luvio.handleSuccessResponse(() => {
|
|
1338
|
-
const snapshot = ingestSuccess(luvio, resourceParams, response);
|
|
1339
|
-
return luvio.storeBroadcast().then(() => snapshot);
|
|
1340
|
-
}, () => {
|
|
1429
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
1341
1430
|
const cache = new StoreKeyMap();
|
|
1342
|
-
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
1431
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
1343
1432
|
return cache;
|
|
1344
1433
|
});
|
|
1345
1434
|
}, (response) => {
|
|
1346
|
-
|
|
1347
|
-
throw response;
|
|
1435
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
1348
1436
|
});
|
|
1349
1437
|
}
|
|
1350
|
-
|
|
1351
|
-
return
|
|
1352
|
-
|
|
1353
|
-
|
|
1438
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
1439
|
+
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
1440
|
+
}
|
|
1441
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
1442
|
+
const { luvio, config } = context;
|
|
1443
|
+
const selector = {
|
|
1444
|
+
recordId: keyBuilder$2(luvio, config),
|
|
1445
|
+
node: adapterFragment$1(luvio, config),
|
|
1446
|
+
variables: {},
|
|
1447
|
+
};
|
|
1448
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1449
|
+
config,
|
|
1450
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1451
|
+
});
|
|
1452
|
+
return cacheSnapshot;
|
|
1453
|
+
}
|
|
1454
|
+
const getCustomCodeExecutionLogsAdapterFactory = (luvio) => function byoc__getCustomCodeExecutionLogs(untrustedConfig, requestContext) {
|
|
1455
|
+
const config = validateAdapterConfig$2(untrustedConfig, getCustomCodeExecutionLogs_ConfigPropertyNames);
|
|
1456
|
+
// Invalid or incomplete config
|
|
1457
|
+
if (config === null) {
|
|
1458
|
+
return null;
|
|
1459
|
+
}
|
|
1460
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1461
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
1462
|
+
};
|
|
1463
|
+
|
|
1464
|
+
const VERSION$1 = "16ba4e83f3e94d331bcbdba6f3d301b9";
|
|
1465
|
+
function validate$1(obj, path = 'CustomCodeExecutionBaseRepresentation') {
|
|
1466
|
+
const v_error = (() => {
|
|
1467
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1468
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1469
|
+
}
|
|
1470
|
+
const obj_durationInSeconds = obj.durationInSeconds;
|
|
1471
|
+
const path_durationInSeconds = path + '.durationInSeconds';
|
|
1472
|
+
if (typeof obj_durationInSeconds !== 'number' || (typeof obj_durationInSeconds === 'number' && Math.floor(obj_durationInSeconds) !== obj_durationInSeconds)) {
|
|
1473
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_durationInSeconds + '" (at "' + path_durationInSeconds + '")');
|
|
1474
|
+
}
|
|
1475
|
+
const obj_endTime = obj.endTime;
|
|
1476
|
+
const path_endTime = path + '.endTime';
|
|
1477
|
+
if (typeof obj_endTime !== 'string') {
|
|
1478
|
+
return new TypeError('Expected "string" but received "' + typeof obj_endTime + '" (at "' + path_endTime + '")');
|
|
1479
|
+
}
|
|
1480
|
+
if (obj.errorCode !== undefined) {
|
|
1481
|
+
const obj_errorCode = obj.errorCode;
|
|
1482
|
+
const path_errorCode = path + '.errorCode';
|
|
1483
|
+
if (typeof obj_errorCode !== 'number' || (typeof obj_errorCode === 'number' && Math.floor(obj_errorCode) !== obj_errorCode)) {
|
|
1484
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_errorCode + '" (at "' + path_errorCode + '")');
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1487
|
+
if (obj.errorMessage !== undefined) {
|
|
1488
|
+
const obj_errorMessage = obj.errorMessage;
|
|
1489
|
+
const path_errorMessage = path + '.errorMessage';
|
|
1490
|
+
if (typeof obj_errorMessage !== 'string') {
|
|
1491
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
const obj_id = obj.id;
|
|
1495
|
+
const path_id = path + '.id';
|
|
1496
|
+
if (typeof obj_id !== 'string') {
|
|
1497
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1498
|
+
}
|
|
1499
|
+
const obj_rowsRead = obj.rowsRead;
|
|
1500
|
+
const path_rowsRead = path + '.rowsRead';
|
|
1501
|
+
if (typeof obj_rowsRead !== 'number' || (typeof obj_rowsRead === 'number' && Math.floor(obj_rowsRead) !== obj_rowsRead)) {
|
|
1502
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_rowsRead + '" (at "' + path_rowsRead + '")');
|
|
1503
|
+
}
|
|
1504
|
+
const obj_rowsWritten = obj.rowsWritten;
|
|
1505
|
+
const path_rowsWritten = path + '.rowsWritten';
|
|
1506
|
+
if (typeof obj_rowsWritten !== 'number' || (typeof obj_rowsWritten === 'number' && Math.floor(obj_rowsWritten) !== obj_rowsWritten)) {
|
|
1507
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_rowsWritten + '" (at "' + path_rowsWritten + '")');
|
|
1508
|
+
}
|
|
1509
|
+
const obj_startTime = obj.startTime;
|
|
1510
|
+
const path_startTime = path + '.startTime';
|
|
1511
|
+
if (typeof obj_startTime !== 'string') {
|
|
1512
|
+
return new TypeError('Expected "string" but received "' + typeof obj_startTime + '" (at "' + path_startTime + '")');
|
|
1513
|
+
}
|
|
1514
|
+
const obj_status = obj.status;
|
|
1515
|
+
const path_status = path + '.status';
|
|
1516
|
+
if (typeof obj_status !== 'string') {
|
|
1517
|
+
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
1518
|
+
}
|
|
1519
|
+
const obj_submittedTime = obj.submittedTime;
|
|
1520
|
+
const path_submittedTime = path + '.submittedTime';
|
|
1521
|
+
if (typeof obj_submittedTime !== 'string') {
|
|
1522
|
+
return new TypeError('Expected "string" but received "' + typeof obj_submittedTime + '" (at "' + path_submittedTime + '")');
|
|
1523
|
+
}
|
|
1524
|
+
})();
|
|
1525
|
+
return v_error === undefined ? null : v_error;
|
|
1526
|
+
}
|
|
1527
|
+
const select$3 = function CustomCodeExecutionBaseRepresentationSelect() {
|
|
1528
|
+
return {
|
|
1529
|
+
kind: 'Fragment',
|
|
1530
|
+
version: VERSION$1,
|
|
1531
|
+
private: [],
|
|
1532
|
+
selections: [
|
|
1533
|
+
{
|
|
1534
|
+
name: 'durationInSeconds',
|
|
1535
|
+
kind: 'Scalar'
|
|
1536
|
+
},
|
|
1537
|
+
{
|
|
1538
|
+
name: 'endTime',
|
|
1539
|
+
kind: 'Scalar'
|
|
1540
|
+
},
|
|
1541
|
+
{
|
|
1542
|
+
name: 'errorCode',
|
|
1543
|
+
kind: 'Scalar',
|
|
1544
|
+
required: false
|
|
1545
|
+
},
|
|
1546
|
+
{
|
|
1547
|
+
name: 'errorMessage',
|
|
1548
|
+
kind: 'Scalar',
|
|
1549
|
+
required: false
|
|
1550
|
+
},
|
|
1551
|
+
{
|
|
1552
|
+
name: 'id',
|
|
1553
|
+
kind: 'Scalar'
|
|
1554
|
+
},
|
|
1555
|
+
{
|
|
1556
|
+
name: 'rowsRead',
|
|
1557
|
+
kind: 'Scalar'
|
|
1558
|
+
},
|
|
1559
|
+
{
|
|
1560
|
+
name: 'rowsWritten',
|
|
1561
|
+
kind: 'Scalar'
|
|
1562
|
+
},
|
|
1563
|
+
{
|
|
1564
|
+
name: 'startTime',
|
|
1565
|
+
kind: 'Scalar'
|
|
1566
|
+
},
|
|
1567
|
+
{
|
|
1568
|
+
name: 'status',
|
|
1569
|
+
kind: 'Scalar'
|
|
1570
|
+
},
|
|
1571
|
+
{
|
|
1572
|
+
name: 'submittedTime',
|
|
1573
|
+
kind: 'Scalar'
|
|
1574
|
+
}
|
|
1575
|
+
]
|
|
1576
|
+
};
|
|
1577
|
+
};
|
|
1578
|
+
function equals$1(existing, incoming) {
|
|
1579
|
+
const existing_durationInSeconds = existing.durationInSeconds;
|
|
1580
|
+
const incoming_durationInSeconds = incoming.durationInSeconds;
|
|
1581
|
+
if (!(existing_durationInSeconds === incoming_durationInSeconds)) {
|
|
1582
|
+
return false;
|
|
1583
|
+
}
|
|
1584
|
+
const existing_errorCode = existing.errorCode;
|
|
1585
|
+
const incoming_errorCode = incoming.errorCode;
|
|
1586
|
+
// if at least one of these optionals is defined
|
|
1587
|
+
if (existing_errorCode !== undefined || incoming_errorCode !== undefined) {
|
|
1588
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1589
|
+
// not equal
|
|
1590
|
+
if (existing_errorCode === undefined || incoming_errorCode === undefined) {
|
|
1591
|
+
return false;
|
|
1592
|
+
}
|
|
1593
|
+
if (!(existing_errorCode === incoming_errorCode)) {
|
|
1594
|
+
return false;
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
const existing_rowsRead = existing.rowsRead;
|
|
1598
|
+
const incoming_rowsRead = incoming.rowsRead;
|
|
1599
|
+
if (!(existing_rowsRead === incoming_rowsRead)) {
|
|
1600
|
+
return false;
|
|
1601
|
+
}
|
|
1602
|
+
const existing_rowsWritten = existing.rowsWritten;
|
|
1603
|
+
const incoming_rowsWritten = incoming.rowsWritten;
|
|
1604
|
+
if (!(existing_rowsWritten === incoming_rowsWritten)) {
|
|
1605
|
+
return false;
|
|
1606
|
+
}
|
|
1607
|
+
const existing_endTime = existing.endTime;
|
|
1608
|
+
const incoming_endTime = incoming.endTime;
|
|
1609
|
+
if (!(existing_endTime === incoming_endTime)) {
|
|
1610
|
+
return false;
|
|
1611
|
+
}
|
|
1612
|
+
const existing_errorMessage = existing.errorMessage;
|
|
1613
|
+
const incoming_errorMessage = incoming.errorMessage;
|
|
1614
|
+
// if at least one of these optionals is defined
|
|
1615
|
+
if (existing_errorMessage !== undefined || incoming_errorMessage !== undefined) {
|
|
1616
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1617
|
+
// not equal
|
|
1618
|
+
if (existing_errorMessage === undefined || incoming_errorMessage === undefined) {
|
|
1619
|
+
return false;
|
|
1620
|
+
}
|
|
1621
|
+
if (!(existing_errorMessage === incoming_errorMessage)) {
|
|
1622
|
+
return false;
|
|
1623
|
+
}
|
|
1624
|
+
}
|
|
1625
|
+
const existing_id = existing.id;
|
|
1626
|
+
const incoming_id = incoming.id;
|
|
1627
|
+
if (!(existing_id === incoming_id)) {
|
|
1628
|
+
return false;
|
|
1629
|
+
}
|
|
1630
|
+
const existing_startTime = existing.startTime;
|
|
1631
|
+
const incoming_startTime = incoming.startTime;
|
|
1632
|
+
if (!(existing_startTime === incoming_startTime)) {
|
|
1633
|
+
return false;
|
|
1634
|
+
}
|
|
1635
|
+
const existing_status = existing.status;
|
|
1636
|
+
const incoming_status = incoming.status;
|
|
1637
|
+
if (!(existing_status === incoming_status)) {
|
|
1638
|
+
return false;
|
|
1639
|
+
}
|
|
1640
|
+
const existing_submittedTime = existing.submittedTime;
|
|
1641
|
+
const incoming_submittedTime = incoming.submittedTime;
|
|
1642
|
+
if (!(existing_submittedTime === incoming_submittedTime)) {
|
|
1643
|
+
return false;
|
|
1644
|
+
}
|
|
1645
|
+
return true;
|
|
1646
|
+
}
|
|
1647
|
+
|
|
1648
|
+
const VERSION = "eff3ca61ebb18d80a094043be3f81c07";
|
|
1649
|
+
function validate(obj, path = 'CustomCodeExecutionCollectionRepresentation') {
|
|
1650
|
+
const v_error = (() => {
|
|
1651
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1652
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1653
|
+
}
|
|
1654
|
+
if (obj.currentPageUrl !== undefined) {
|
|
1655
|
+
const obj_currentPageUrl = obj.currentPageUrl;
|
|
1656
|
+
const path_currentPageUrl = path + '.currentPageUrl';
|
|
1657
|
+
if (typeof obj_currentPageUrl !== 'string') {
|
|
1658
|
+
return new TypeError('Expected "string" but received "' + typeof obj_currentPageUrl + '" (at "' + path_currentPageUrl + '")');
|
|
1659
|
+
}
|
|
1660
|
+
}
|
|
1661
|
+
const obj_executions = obj.executions;
|
|
1662
|
+
const path_executions = path + '.executions';
|
|
1663
|
+
if (!ArrayIsArray(obj_executions)) {
|
|
1664
|
+
return new TypeError('Expected "array" but received "' + typeof obj_executions + '" (at "' + path_executions + '")');
|
|
1665
|
+
}
|
|
1666
|
+
for (let i = 0; i < obj_executions.length; i++) {
|
|
1667
|
+
const obj_executions_item = obj_executions[i];
|
|
1668
|
+
const path_executions_item = path_executions + '[' + i + ']';
|
|
1669
|
+
const referencepath_executions_itemValidationError = validate$1(obj_executions_item, path_executions_item);
|
|
1670
|
+
if (referencepath_executions_itemValidationError !== null) {
|
|
1671
|
+
let message = 'Object doesn\'t match CustomCodeExecutionBaseRepresentation (at "' + path_executions_item + '")\n';
|
|
1672
|
+
message += referencepath_executions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1673
|
+
return new TypeError(message);
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
if (obj.nextPageUrl !== undefined) {
|
|
1677
|
+
const obj_nextPageUrl = obj.nextPageUrl;
|
|
1678
|
+
const path_nextPageUrl = path + '.nextPageUrl';
|
|
1679
|
+
if (typeof obj_nextPageUrl !== 'string') {
|
|
1680
|
+
return new TypeError('Expected "string" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
|
|
1681
|
+
}
|
|
1682
|
+
}
|
|
1683
|
+
if (obj.totalSize !== undefined) {
|
|
1684
|
+
const obj_totalSize = obj.totalSize;
|
|
1685
|
+
const path_totalSize = path + '.totalSize';
|
|
1686
|
+
if (typeof obj_totalSize !== 'number' || (typeof obj_totalSize === 'number' && Math.floor(obj_totalSize) !== obj_totalSize)) {
|
|
1687
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_totalSize + '" (at "' + path_totalSize + '")');
|
|
1688
|
+
}
|
|
1689
|
+
}
|
|
1690
|
+
})();
|
|
1691
|
+
return v_error === undefined ? null : v_error;
|
|
1692
|
+
}
|
|
1693
|
+
const RepresentationType = 'CustomCodeExecutionCollectionRepresentation';
|
|
1694
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
1695
|
+
return input;
|
|
1696
|
+
}
|
|
1697
|
+
const select$2 = function CustomCodeExecutionCollectionRepresentationSelect() {
|
|
1698
|
+
const { selections: CustomCodeExecutionBaseRepresentation__selections, opaque: CustomCodeExecutionBaseRepresentation__opaque, } = select$3();
|
|
1699
|
+
return {
|
|
1700
|
+
kind: 'Fragment',
|
|
1701
|
+
version: VERSION,
|
|
1702
|
+
private: [],
|
|
1703
|
+
selections: [
|
|
1704
|
+
{
|
|
1705
|
+
name: 'currentPageUrl',
|
|
1706
|
+
kind: 'Scalar',
|
|
1707
|
+
required: false
|
|
1708
|
+
},
|
|
1709
|
+
{
|
|
1710
|
+
name: 'executions',
|
|
1711
|
+
kind: 'Object',
|
|
1712
|
+
plural: true,
|
|
1713
|
+
selections: CustomCodeExecutionBaseRepresentation__selections
|
|
1714
|
+
},
|
|
1715
|
+
{
|
|
1716
|
+
name: 'nextPageUrl',
|
|
1717
|
+
kind: 'Scalar',
|
|
1718
|
+
required: false
|
|
1719
|
+
},
|
|
1720
|
+
{
|
|
1721
|
+
name: 'totalSize',
|
|
1722
|
+
kind: 'Scalar',
|
|
1723
|
+
required: false
|
|
1724
|
+
}
|
|
1725
|
+
]
|
|
1726
|
+
};
|
|
1727
|
+
};
|
|
1728
|
+
function equals(existing, incoming) {
|
|
1729
|
+
const existing_totalSize = existing.totalSize;
|
|
1730
|
+
const incoming_totalSize = incoming.totalSize;
|
|
1731
|
+
// if at least one of these optionals is defined
|
|
1732
|
+
if (existing_totalSize !== undefined || incoming_totalSize !== undefined) {
|
|
1733
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1734
|
+
// not equal
|
|
1735
|
+
if (existing_totalSize === undefined || incoming_totalSize === undefined) {
|
|
1736
|
+
return false;
|
|
1737
|
+
}
|
|
1738
|
+
if (!(existing_totalSize === incoming_totalSize)) {
|
|
1739
|
+
return false;
|
|
1740
|
+
}
|
|
1741
|
+
}
|
|
1742
|
+
const existing_currentPageUrl = existing.currentPageUrl;
|
|
1743
|
+
const incoming_currentPageUrl = incoming.currentPageUrl;
|
|
1744
|
+
// if at least one of these optionals is defined
|
|
1745
|
+
if (existing_currentPageUrl !== undefined || incoming_currentPageUrl !== undefined) {
|
|
1746
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1747
|
+
// not equal
|
|
1748
|
+
if (existing_currentPageUrl === undefined || incoming_currentPageUrl === undefined) {
|
|
1749
|
+
return false;
|
|
1750
|
+
}
|
|
1751
|
+
if (!(existing_currentPageUrl === incoming_currentPageUrl)) {
|
|
1752
|
+
return false;
|
|
1753
|
+
}
|
|
1754
|
+
}
|
|
1755
|
+
const existing_nextPageUrl = existing.nextPageUrl;
|
|
1756
|
+
const incoming_nextPageUrl = incoming.nextPageUrl;
|
|
1757
|
+
// if at least one of these optionals is defined
|
|
1758
|
+
if (existing_nextPageUrl !== undefined || incoming_nextPageUrl !== undefined) {
|
|
1759
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1760
|
+
// not equal
|
|
1761
|
+
if (existing_nextPageUrl === undefined || incoming_nextPageUrl === undefined) {
|
|
1762
|
+
return false;
|
|
1763
|
+
}
|
|
1764
|
+
if (!(existing_nextPageUrl === incoming_nextPageUrl)) {
|
|
1765
|
+
return false;
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
const existing_executions = existing.executions;
|
|
1769
|
+
const incoming_executions = incoming.executions;
|
|
1770
|
+
const equals_executions_items = equalsArray(existing_executions, incoming_executions, (existing_executions_item, incoming_executions_item) => {
|
|
1771
|
+
if (!(equals$1(existing_executions_item, incoming_executions_item))) {
|
|
1772
|
+
return false;
|
|
1773
|
+
}
|
|
1774
|
+
});
|
|
1775
|
+
if (equals_executions_items === false) {
|
|
1776
|
+
return false;
|
|
1777
|
+
}
|
|
1778
|
+
return true;
|
|
1779
|
+
}
|
|
1780
|
+
const ingest = function CustomCodeExecutionCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1781
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1782
|
+
const validateError = validate(input);
|
|
1783
|
+
if (validateError !== null) {
|
|
1784
|
+
throw validateError;
|
|
1785
|
+
}
|
|
1786
|
+
}
|
|
1787
|
+
const key = path.fullPath;
|
|
1788
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1789
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "byoc", VERSION, RepresentationType, equals);
|
|
1790
|
+
return createLink(key);
|
|
1791
|
+
};
|
|
1792
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
1793
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1794
|
+
const rootKey = fullPathFactory();
|
|
1795
|
+
rootKeySet.set(rootKey, {
|
|
1796
|
+
namespace: keyPrefix,
|
|
1797
|
+
representationName: RepresentationType,
|
|
1798
|
+
mergeable: false
|
|
1799
|
+
});
|
|
1800
|
+
}
|
|
1801
|
+
|
|
1802
|
+
function select$1(luvio, params) {
|
|
1803
|
+
return select$2();
|
|
1804
|
+
}
|
|
1805
|
+
function keyBuilder$1(luvio, params) {
|
|
1806
|
+
return keyPrefix + '::CustomCodeExecutionCollectionRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'customCodeNameOrId:' + params.urlParams.customCodeNameOrId + ')';
|
|
1807
|
+
}
|
|
1808
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
1809
|
+
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
1810
|
+
}
|
|
1811
|
+
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
1812
|
+
const { body } = response;
|
|
1813
|
+
const key = keyBuilder$1(luvio, resourceParams);
|
|
1814
|
+
luvio.storeIngest(key, ingest, body);
|
|
1815
|
+
const snapshot = luvio.storeLookup({
|
|
1816
|
+
recordId: key,
|
|
1817
|
+
node: select$1(),
|
|
1818
|
+
variables: {},
|
|
1819
|
+
}, snapshotRefresh);
|
|
1820
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1821
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1822
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1823
|
+
}
|
|
1824
|
+
}
|
|
1825
|
+
deepFreeze(snapshot.data);
|
|
1826
|
+
return snapshot;
|
|
1827
|
+
}
|
|
1828
|
+
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
1829
|
+
const key = keyBuilder$1(luvio, params);
|
|
1830
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1831
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
1832
|
+
return errorSnapshot;
|
|
1833
|
+
}
|
|
1834
|
+
function createResourceRequest$1(config) {
|
|
1835
|
+
const headers = {};
|
|
1836
|
+
return {
|
|
1837
|
+
baseUri: '/services/data/v64.0',
|
|
1838
|
+
basePath: '/ssot/data-custom-code/' + config.urlParams.customCodeNameOrId + '/executions',
|
|
1839
|
+
method: 'get',
|
|
1840
|
+
body: null,
|
|
1841
|
+
urlParams: config.urlParams,
|
|
1842
|
+
queryParams: config.queryParams,
|
|
1843
|
+
headers,
|
|
1844
|
+
priority: 'normal',
|
|
1845
|
+
};
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
const adapterName$1 = 'getCustomCodeExecutions';
|
|
1849
|
+
const getCustomCodeExecutions_ConfigPropertyMetadata = [
|
|
1850
|
+
generateParamConfigMetadata('customCodeNameOrId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1851
|
+
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1852
|
+
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1853
|
+
];
|
|
1854
|
+
const getCustomCodeExecutions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getCustomCodeExecutions_ConfigPropertyMetadata);
|
|
1855
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$7(getCustomCodeExecutions_ConfigPropertyMetadata);
|
|
1856
|
+
function keyBuilder(luvio, config) {
|
|
1857
|
+
const resourceParams = createResourceParams$1(config);
|
|
1858
|
+
return keyBuilder$1(luvio, resourceParams);
|
|
1859
|
+
}
|
|
1860
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
1861
|
+
const config = {};
|
|
1862
|
+
typeCheckConfig$7(untrustedConfig, config, getCustomCodeExecutions_ConfigPropertyMetadata);
|
|
1863
|
+
return config;
|
|
1864
|
+
}
|
|
1865
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
1866
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1867
|
+
return null;
|
|
1868
|
+
}
|
|
1869
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1870
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1871
|
+
}
|
|
1872
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
1873
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1874
|
+
return null;
|
|
1875
|
+
}
|
|
1876
|
+
return config;
|
|
1877
|
+
}
|
|
1878
|
+
function adapterFragment(luvio, config) {
|
|
1879
|
+
createResourceParams$1(config);
|
|
1880
|
+
return select$1();
|
|
1881
|
+
}
|
|
1882
|
+
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
1883
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
|
|
1884
|
+
config,
|
|
1885
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
1886
|
+
});
|
|
1887
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1888
|
+
}
|
|
1889
|
+
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
1890
|
+
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
1891
|
+
config,
|
|
1892
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
1893
|
+
});
|
|
1894
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1895
|
+
}
|
|
1896
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
1897
|
+
const resourceParams = createResourceParams$1(config);
|
|
1898
|
+
const request = createResourceRequest$1(resourceParams);
|
|
1899
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1900
|
+
.then((response) => {
|
|
1901
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
1902
|
+
const cache = new StoreKeyMap();
|
|
1903
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
1904
|
+
return cache;
|
|
1905
|
+
});
|
|
1906
|
+
}, (response) => {
|
|
1907
|
+
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
1908
|
+
});
|
|
1909
|
+
}
|
|
1910
|
+
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
1911
|
+
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
1912
|
+
}
|
|
1913
|
+
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
1914
|
+
const { luvio, config } = context;
|
|
1915
|
+
const selector = {
|
|
1916
|
+
recordId: keyBuilder(luvio, config),
|
|
1917
|
+
node: adapterFragment(luvio, config),
|
|
1918
|
+
variables: {},
|
|
1919
|
+
};
|
|
1920
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1921
|
+
config,
|
|
1922
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
1923
|
+
});
|
|
1924
|
+
return cacheSnapshot;
|
|
1925
|
+
}
|
|
1926
|
+
const getCustomCodeExecutionsAdapterFactory = (luvio) => function byoc__getCustomCodeExecutions(untrustedConfig, requestContext) {
|
|
1927
|
+
const config = validateAdapterConfig$1(untrustedConfig, getCustomCodeExecutions_ConfigPropertyNames);
|
|
1928
|
+
// Invalid or incomplete config
|
|
1929
|
+
if (config === null) {
|
|
1930
|
+
return null;
|
|
1931
|
+
}
|
|
1932
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1933
|
+
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
1934
|
+
};
|
|
1935
|
+
|
|
1936
|
+
function select(luvio, params) {
|
|
1937
|
+
return select$a();
|
|
1938
|
+
}
|
|
1939
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
1940
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response);
|
|
1941
|
+
}
|
|
1942
|
+
function ingestSuccess(luvio, resourceParams, response) {
|
|
1943
|
+
const { body } = response;
|
|
1944
|
+
const key = keyBuilderFromType(luvio, body);
|
|
1945
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
1946
|
+
const snapshot = luvio.storeLookup({
|
|
1947
|
+
recordId: key,
|
|
1948
|
+
node: select(),
|
|
1949
|
+
variables: {},
|
|
1950
|
+
});
|
|
1951
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1952
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1953
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1954
|
+
}
|
|
1955
|
+
}
|
|
1956
|
+
deepFreeze(snapshot.data);
|
|
1957
|
+
return snapshot;
|
|
1958
|
+
}
|
|
1959
|
+
function createResourceRequest(config) {
|
|
1960
|
+
const headers = {};
|
|
1961
|
+
return {
|
|
1962
|
+
baseUri: '/services/data/v64.0',
|
|
1963
|
+
basePath: '/ssot/data-custom-code/' + config.urlParams.customCodeNameOrId + '',
|
|
1964
|
+
method: 'patch',
|
|
1965
|
+
body: config.body,
|
|
1966
|
+
urlParams: config.urlParams,
|
|
1967
|
+
queryParams: {},
|
|
1968
|
+
headers,
|
|
1969
|
+
priority: 'normal',
|
|
1970
|
+
};
|
|
1971
|
+
}
|
|
1972
|
+
|
|
1973
|
+
const adapterName = 'updateCustomCodeDeployment';
|
|
1974
|
+
const updateCustomCodeDeployment_ConfigPropertyMetadata = [
|
|
1975
|
+
generateParamConfigMetadata('customCodeNameOrId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1976
|
+
generateParamConfigMetadata('computeType', false, 2 /* Body */, 0 /* String */),
|
|
1977
|
+
generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
|
|
1978
|
+
generateParamConfigMetadata('label', false, 2 /* Body */, 0 /* String */),
|
|
1979
|
+
generateParamConfigMetadata('version', false, 2 /* Body */, 0 /* String */),
|
|
1980
|
+
];
|
|
1981
|
+
const updateCustomCodeDeployment_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, updateCustomCodeDeployment_ConfigPropertyMetadata);
|
|
1982
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$7(updateCustomCodeDeployment_ConfigPropertyMetadata);
|
|
1983
|
+
function typeCheckConfig(untrustedConfig) {
|
|
1984
|
+
const config = {};
|
|
1985
|
+
typeCheckConfig$7(untrustedConfig, config, updateCustomCodeDeployment_ConfigPropertyMetadata);
|
|
1986
|
+
return config;
|
|
1987
|
+
}
|
|
1988
|
+
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
1989
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1990
|
+
return null;
|
|
1991
|
+
}
|
|
1992
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1993
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1994
|
+
}
|
|
1995
|
+
const config = typeCheckConfig(untrustedConfig);
|
|
1996
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1997
|
+
return null;
|
|
1998
|
+
}
|
|
1999
|
+
return config;
|
|
2000
|
+
}
|
|
2001
|
+
function buildNetworkSnapshot(luvio, config, options) {
|
|
2002
|
+
const resourceParams = createResourceParams(config);
|
|
2003
|
+
const request = createResourceRequest(resourceParams);
|
|
2004
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
2005
|
+
.then((response) => {
|
|
2006
|
+
return luvio.handleSuccessResponse(() => {
|
|
2007
|
+
const snapshot = ingestSuccess(luvio, resourceParams, response);
|
|
2008
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2009
|
+
}, () => {
|
|
2010
|
+
const cache = new StoreKeyMap();
|
|
2011
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
2012
|
+
return cache;
|
|
2013
|
+
});
|
|
2014
|
+
}, (response) => {
|
|
2015
|
+
deepFreeze(response);
|
|
2016
|
+
throw response;
|
|
2017
|
+
});
|
|
2018
|
+
}
|
|
2019
|
+
const updateCustomCodeDeploymentAdapterFactory = (luvio) => {
|
|
2020
|
+
return function updateCustomCodeDeployment(untrustedConfig) {
|
|
2021
|
+
const config = validateAdapterConfig(untrustedConfig, updateCustomCodeDeployment_ConfigPropertyNames);
|
|
2022
|
+
// Invalid or incomplete config
|
|
1354
2023
|
if (config === null) {
|
|
1355
2024
|
throw new Error('Invalid config for "updateCustomCodeDeployment"');
|
|
1356
2025
|
}
|
|
@@ -1363,31 +2032,46 @@ let deleteCustomCodeDeployment;
|
|
|
1363
2032
|
let getCustomCodeDeployment;
|
|
1364
2033
|
let getCustomCodeDeploymentNotifyChange;
|
|
1365
2034
|
let getCustomCodeDeployments;
|
|
2035
|
+
let getCustomCodeExecutionLogs;
|
|
2036
|
+
let getCustomCodeExecutions;
|
|
1366
2037
|
let updateCustomCodeDeployment;
|
|
1367
2038
|
// Imperative GET Adapters
|
|
1368
2039
|
let getCustomCodeDeployment_imperative;
|
|
1369
2040
|
let getCustomCodeDeployments_imperative;
|
|
2041
|
+
let getCustomCodeExecutionLogs_imperative;
|
|
2042
|
+
let getCustomCodeExecutions_imperative;
|
|
1370
2043
|
const getCustomCodeDeploymentMetadata = { apiFamily: 'byoc', name: 'getCustomCodeDeployment' };
|
|
1371
2044
|
const getCustomCodeDeploymentsMetadata = { apiFamily: 'byoc', name: 'getCustomCodeDeployments' };
|
|
2045
|
+
const getCustomCodeExecutionLogsMetadata = {
|
|
2046
|
+
apiFamily: 'byoc',
|
|
2047
|
+
name: 'getCustomCodeExecutionLogs',
|
|
2048
|
+
};
|
|
2049
|
+
const getCustomCodeExecutionsMetadata = { apiFamily: 'byoc', name: 'getCustomCodeExecutions' };
|
|
1372
2050
|
// Notify Update Available
|
|
1373
2051
|
function bindExportsTo(luvio) {
|
|
1374
2052
|
// LDS Adapters
|
|
1375
2053
|
const getCustomCodeDeployment_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getCustomCodeDeployment', getCustomCodeDeploymentAdapterFactory), getCustomCodeDeploymentMetadata);
|
|
1376
2054
|
const getCustomCodeDeployments_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getCustomCodeDeployments', getCustomCodeDeploymentsAdapterFactory), getCustomCodeDeploymentsMetadata);
|
|
2055
|
+
const getCustomCodeExecutionLogs_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getCustomCodeExecutionLogs', getCustomCodeExecutionLogsAdapterFactory), getCustomCodeExecutionLogsMetadata);
|
|
2056
|
+
const getCustomCodeExecutions_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getCustomCodeExecutions', getCustomCodeExecutionsAdapterFactory), getCustomCodeExecutionsMetadata);
|
|
1377
2057
|
function unwrapSnapshotData(factory) {
|
|
1378
2058
|
const adapter = factory(luvio);
|
|
1379
2059
|
return (config) => adapter(config).then((snapshot) => snapshot.data);
|
|
1380
2060
|
}
|
|
1381
2061
|
return {
|
|
1382
2062
|
createCustomCodeDeployment: unwrapSnapshotData(createCustomCodeDeploymentAdapterFactory),
|
|
1383
|
-
deleteCustomCodeDeployment: createLDSAdapter(luvio, adapterName$
|
|
2063
|
+
deleteCustomCodeDeployment: createLDSAdapter(luvio, adapterName$5, deleteCustomCodeDeploymentAdapterFactory),
|
|
1384
2064
|
getCustomCodeDeployment: createWireAdapterConstructor(luvio, getCustomCodeDeployment_ldsAdapter, getCustomCodeDeploymentMetadata),
|
|
1385
2065
|
getCustomCodeDeploymentNotifyChange: createLDSAdapter(luvio, 'getCustomCodeDeploymentNotifyChange', notifyChangeFactory),
|
|
1386
2066
|
getCustomCodeDeployments: createWireAdapterConstructor(luvio, getCustomCodeDeployments_ldsAdapter, getCustomCodeDeploymentsMetadata),
|
|
2067
|
+
getCustomCodeExecutionLogs: createWireAdapterConstructor(luvio, getCustomCodeExecutionLogs_ldsAdapter, getCustomCodeExecutionLogsMetadata),
|
|
2068
|
+
getCustomCodeExecutions: createWireAdapterConstructor(luvio, getCustomCodeExecutions_ldsAdapter, getCustomCodeExecutionsMetadata),
|
|
1387
2069
|
updateCustomCodeDeployment: unwrapSnapshotData(updateCustomCodeDeploymentAdapterFactory),
|
|
1388
2070
|
// Imperative GET Adapters
|
|
1389
2071
|
getCustomCodeDeployment_imperative: createImperativeAdapter(luvio, getCustomCodeDeployment_ldsAdapter, getCustomCodeDeploymentMetadata),
|
|
1390
2072
|
getCustomCodeDeployments_imperative: createImperativeAdapter(luvio, getCustomCodeDeployments_ldsAdapter, getCustomCodeDeploymentsMetadata),
|
|
2073
|
+
getCustomCodeExecutionLogs_imperative: createImperativeAdapter(luvio, getCustomCodeExecutionLogs_ldsAdapter, getCustomCodeExecutionLogsMetadata),
|
|
2074
|
+
getCustomCodeExecutions_imperative: createImperativeAdapter(luvio, getCustomCodeExecutions_ldsAdapter, getCustomCodeExecutionsMetadata),
|
|
1391
2075
|
// Notify Update Availables
|
|
1392
2076
|
};
|
|
1393
2077
|
}
|
|
@@ -1398,11 +2082,15 @@ withDefaultLuvio((luvio) => {
|
|
|
1398
2082
|
getCustomCodeDeployment,
|
|
1399
2083
|
getCustomCodeDeploymentNotifyChange,
|
|
1400
2084
|
getCustomCodeDeployments,
|
|
2085
|
+
getCustomCodeExecutionLogs,
|
|
2086
|
+
getCustomCodeExecutions,
|
|
1401
2087
|
updateCustomCodeDeployment,
|
|
1402
2088
|
getCustomCodeDeployment_imperative,
|
|
1403
2089
|
getCustomCodeDeployments_imperative,
|
|
2090
|
+
getCustomCodeExecutionLogs_imperative,
|
|
2091
|
+
getCustomCodeExecutions_imperative,
|
|
1404
2092
|
} = bindExportsTo(luvio));
|
|
1405
2093
|
});
|
|
1406
2094
|
|
|
1407
|
-
export { createCustomCodeDeployment, deleteCustomCodeDeployment, getCustomCodeDeployment, getCustomCodeDeploymentNotifyChange, getCustomCodeDeployment_imperative, getCustomCodeDeployments, getCustomCodeDeployments_imperative, updateCustomCodeDeployment };
|
|
1408
|
-
// version: 1.
|
|
2095
|
+
export { createCustomCodeDeployment, deleteCustomCodeDeployment, getCustomCodeDeployment, getCustomCodeDeploymentNotifyChange, getCustomCodeDeployment_imperative, getCustomCodeDeployments, getCustomCodeDeployments_imperative, getCustomCodeExecutionLogs, getCustomCodeExecutionLogs_imperative, getCustomCodeExecutions, getCustomCodeExecutions_imperative, updateCustomCodeDeployment };
|
|
2096
|
+
// version: 1.354.0-dev10-f675337995
|