@salesforce/lds-adapters-cdp-byoc 1.354.0-dev7 → 1.354.0-dev8
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 +867 -199
- 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/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 +909 -222
- package/src/raml/api.raml +130 -0
- 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;
|
|
@@ -122,8 +122,8 @@ function createLink(ref) {
|
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
const VERSION$
|
|
126
|
-
function validate$
|
|
125
|
+
const VERSION$5 = "2fe1bfd9fd1c6a94767d2ea000d6d318";
|
|
126
|
+
function validate$5(obj, path = 'CdpUserRepresentation') {
|
|
127
127
|
const v_error = (() => {
|
|
128
128
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
129
129
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -146,10 +146,10 @@ function validate$2(obj, path = 'CdpUserRepresentation') {
|
|
|
146
146
|
})();
|
|
147
147
|
return v_error === undefined ? null : v_error;
|
|
148
148
|
}
|
|
149
|
-
const select$
|
|
149
|
+
const select$b = function CdpUserRepresentationSelect() {
|
|
150
150
|
return {
|
|
151
151
|
kind: 'Fragment',
|
|
152
|
-
version: VERSION$
|
|
152
|
+
version: VERSION$5,
|
|
153
153
|
private: [],
|
|
154
154
|
selections: [
|
|
155
155
|
{
|
|
@@ -167,7 +167,7 @@ const select$6 = function CdpUserRepresentationSelect() {
|
|
|
167
167
|
]
|
|
168
168
|
};
|
|
169
169
|
};
|
|
170
|
-
function equals$
|
|
170
|
+
function equals$5(existing, incoming) {
|
|
171
171
|
const existing_id = existing.id;
|
|
172
172
|
const incoming_id = incoming.id;
|
|
173
173
|
if (!(existing_id === incoming_id)) {
|
|
@@ -186,8 +186,8 @@ function equals$2(existing, incoming) {
|
|
|
186
186
|
return true;
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
const VERSION$
|
|
190
|
-
function validate$
|
|
189
|
+
const VERSION$4 = "3a8185ac626c1463f8bf0540517ef2e2";
|
|
190
|
+
function validate$4(obj, path = 'CustomCodeDeploymentRepresentation') {
|
|
191
191
|
const v_error = (() => {
|
|
192
192
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
193
193
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -204,7 +204,7 @@ function validate$1(obj, path = 'CustomCodeDeploymentRepresentation') {
|
|
|
204
204
|
}
|
|
205
205
|
const obj_createdBy = obj.createdBy;
|
|
206
206
|
const path_createdBy = path + '.createdBy';
|
|
207
|
-
const referencepath_createdByValidationError = validate$
|
|
207
|
+
const referencepath_createdByValidationError = validate$5(obj_createdBy, path_createdBy);
|
|
208
208
|
if (referencepath_createdByValidationError !== null) {
|
|
209
209
|
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_createdBy + '")\n';
|
|
210
210
|
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -272,7 +272,7 @@ function validate$1(obj, path = 'CustomCodeDeploymentRepresentation') {
|
|
|
272
272
|
}
|
|
273
273
|
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
274
274
|
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
275
|
-
const referencepath_lastModifiedByValidationError = validate$
|
|
275
|
+
const referencepath_lastModifiedByValidationError = validate$5(obj_lastModifiedBy, path_lastModifiedBy);
|
|
276
276
|
if (referencepath_lastModifiedByValidationError !== null) {
|
|
277
277
|
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_lastModifiedBy + '")\n';
|
|
278
278
|
message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -327,24 +327,24 @@ function validate$1(obj, path = 'CustomCodeDeploymentRepresentation') {
|
|
|
327
327
|
})();
|
|
328
328
|
return v_error === undefined ? null : v_error;
|
|
329
329
|
}
|
|
330
|
-
const RepresentationType$
|
|
331
|
-
function keyBuilder$
|
|
332
|
-
return keyPrefix + '::' + RepresentationType$
|
|
330
|
+
const RepresentationType$3 = 'CustomCodeDeploymentRepresentation';
|
|
331
|
+
function keyBuilder$9(luvio, config) {
|
|
332
|
+
return keyPrefix + '::' + RepresentationType$3 + ':' + config.id;
|
|
333
333
|
}
|
|
334
334
|
function keyBuilderFromType(luvio, object) {
|
|
335
335
|
const keyParams = {
|
|
336
336
|
id: object.id
|
|
337
337
|
};
|
|
338
|
-
return keyBuilder$
|
|
338
|
+
return keyBuilder$9(luvio, keyParams);
|
|
339
339
|
}
|
|
340
|
-
function normalize$
|
|
340
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
341
341
|
return input;
|
|
342
342
|
}
|
|
343
|
-
const select$
|
|
344
|
-
const { selections: CdpUserRepresentation__selections, opaque: CdpUserRepresentation__opaque, } = select$
|
|
343
|
+
const select$a = function CustomCodeDeploymentRepresentationSelect() {
|
|
344
|
+
const { selections: CdpUserRepresentation__selections, opaque: CdpUserRepresentation__opaque, } = select$b();
|
|
345
345
|
return {
|
|
346
346
|
kind: 'Fragment',
|
|
347
|
-
version: VERSION$
|
|
347
|
+
version: VERSION$4,
|
|
348
348
|
private: [],
|
|
349
349
|
selections: [
|
|
350
350
|
{
|
|
@@ -439,7 +439,7 @@ const select$5 = function CustomCodeDeploymentRepresentationSelect() {
|
|
|
439
439
|
]
|
|
440
440
|
};
|
|
441
441
|
};
|
|
442
|
-
function equals$
|
|
442
|
+
function equals$4(existing, incoming) {
|
|
443
443
|
const existing_deploymentFailureCode = existing.deploymentFailureCode;
|
|
444
444
|
const incoming_deploymentFailureCode = incoming.deploymentFailureCode;
|
|
445
445
|
// if at least one of these optionals is defined
|
|
@@ -554,7 +554,7 @@ function equals$1(existing, incoming) {
|
|
|
554
554
|
}
|
|
555
555
|
const existing_createdBy = existing.createdBy;
|
|
556
556
|
const incoming_createdBy = incoming.createdBy;
|
|
557
|
-
if (!(equals$
|
|
557
|
+
if (!(equals$5(existing_createdBy, incoming_createdBy))) {
|
|
558
558
|
return false;
|
|
559
559
|
}
|
|
560
560
|
const existing_functionInvokeOptions = existing.functionInvokeOptions;
|
|
@@ -577,7 +577,7 @@ function equals$1(existing, incoming) {
|
|
|
577
577
|
}
|
|
578
578
|
const existing_lastModifiedBy = existing.lastModifiedBy;
|
|
579
579
|
const incoming_lastModifiedBy = incoming.lastModifiedBy;
|
|
580
|
-
if (!(equals$
|
|
580
|
+
if (!(equals$5(existing_lastModifiedBy, incoming_lastModifiedBy))) {
|
|
581
581
|
return false;
|
|
582
582
|
}
|
|
583
583
|
const existing_parameters = existing.parameters;
|
|
@@ -592,41 +592,41 @@ function equals$1(existing, incoming) {
|
|
|
592
592
|
}
|
|
593
593
|
return true;
|
|
594
594
|
}
|
|
595
|
-
const ingest$
|
|
595
|
+
const ingest$3 = function CustomCodeDeploymentRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
596
596
|
if (process.env.NODE_ENV !== 'production') {
|
|
597
|
-
const validateError = validate$
|
|
597
|
+
const validateError = validate$4(input);
|
|
598
598
|
if (validateError !== null) {
|
|
599
599
|
throw validateError;
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
602
|
const key = keyBuilderFromType(luvio, input);
|
|
603
603
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
604
|
-
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);
|
|
605
605
|
return createLink(key);
|
|
606
606
|
};
|
|
607
|
-
function getTypeCacheKeys$
|
|
607
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
608
608
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
609
609
|
const rootKey = keyBuilderFromType(luvio, input);
|
|
610
610
|
rootKeySet.set(rootKey, {
|
|
611
611
|
namespace: keyPrefix,
|
|
612
|
-
representationName: RepresentationType$
|
|
612
|
+
representationName: RepresentationType$3,
|
|
613
613
|
mergeable: false
|
|
614
614
|
});
|
|
615
615
|
}
|
|
616
616
|
|
|
617
|
-
function select$
|
|
618
|
-
return select$
|
|
617
|
+
function select$9(luvio, params) {
|
|
618
|
+
return select$a();
|
|
619
619
|
}
|
|
620
|
-
function getResponseCacheKeys$
|
|
621
|
-
getTypeCacheKeys$
|
|
620
|
+
function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
|
|
621
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response);
|
|
622
622
|
}
|
|
623
|
-
function ingestSuccess$
|
|
623
|
+
function ingestSuccess$5(luvio, resourceParams, response) {
|
|
624
624
|
const { body } = response;
|
|
625
625
|
const key = keyBuilderFromType(luvio, body);
|
|
626
|
-
luvio.storeIngest(key, ingest$
|
|
626
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
627
627
|
const snapshot = luvio.storeLookup({
|
|
628
628
|
recordId: key,
|
|
629
|
-
node: select$
|
|
629
|
+
node: select$9(),
|
|
630
630
|
variables: {},
|
|
631
631
|
});
|
|
632
632
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -637,7 +637,7 @@ function ingestSuccess$3(luvio, resourceParams, response) {
|
|
|
637
637
|
deepFreeze(snapshot.data);
|
|
638
638
|
return snapshot;
|
|
639
639
|
}
|
|
640
|
-
function createResourceRequest$
|
|
640
|
+
function createResourceRequest$6(config) {
|
|
641
641
|
const headers = {};
|
|
642
642
|
return {
|
|
643
643
|
baseUri: '/services/data/v64.0',
|
|
@@ -651,7 +651,7 @@ function createResourceRequest$4(config) {
|
|
|
651
651
|
};
|
|
652
652
|
}
|
|
653
653
|
|
|
654
|
-
const adapterName$
|
|
654
|
+
const adapterName$6 = 'createCustomCodeDeployment';
|
|
655
655
|
const createCustomCodeDeployment_ConfigPropertyMetadata = [
|
|
656
656
|
generateParamConfigMetadata('codeType', false, 2 /* Body */, 0 /* String */),
|
|
657
657
|
generateParamConfigMetadata('computeType', true, 2 /* Body */, 0 /* String */),
|
|
@@ -663,11 +663,11 @@ const createCustomCodeDeployment_ConfigPropertyMetadata = [
|
|
|
663
663
|
generateParamConfigMetadata('parameters', false, 2 /* Body */, 4 /* Unsupported */),
|
|
664
664
|
generateParamConfigMetadata('version', true, 2 /* Body */, 0 /* String */),
|
|
665
665
|
];
|
|
666
|
-
const createCustomCodeDeployment_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
667
|
-
const createResourceParams$
|
|
668
|
-
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) {
|
|
669
669
|
const config = {};
|
|
670
|
-
typeCheckConfig$
|
|
670
|
+
typeCheckConfig$7(untrustedConfig, config, createCustomCodeDeployment_ConfigPropertyMetadata);
|
|
671
671
|
const untrustedConfig_parameters = untrustedConfig.parameters;
|
|
672
672
|
if (untrustedIsObject(untrustedConfig_parameters)) {
|
|
673
673
|
const untrustedConfig_parameters_object = {};
|
|
@@ -687,30 +687,30 @@ function typeCheckConfig$4(untrustedConfig) {
|
|
|
687
687
|
}
|
|
688
688
|
return config;
|
|
689
689
|
}
|
|
690
|
-
function validateAdapterConfig$
|
|
690
|
+
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
691
691
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
692
692
|
return null;
|
|
693
693
|
}
|
|
694
694
|
if (process.env.NODE_ENV !== 'production') {
|
|
695
695
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
696
696
|
}
|
|
697
|
-
const config = typeCheckConfig$
|
|
697
|
+
const config = typeCheckConfig$6(untrustedConfig);
|
|
698
698
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
699
699
|
return null;
|
|
700
700
|
}
|
|
701
701
|
return config;
|
|
702
702
|
}
|
|
703
|
-
function buildNetworkSnapshot$
|
|
704
|
-
const resourceParams = createResourceParams$
|
|
705
|
-
const request = createResourceRequest$
|
|
703
|
+
function buildNetworkSnapshot$6(luvio, config, options) {
|
|
704
|
+
const resourceParams = createResourceParams$6(config);
|
|
705
|
+
const request = createResourceRequest$6(resourceParams);
|
|
706
706
|
return luvio.dispatchResourceRequest(request, options)
|
|
707
707
|
.then((response) => {
|
|
708
708
|
return luvio.handleSuccessResponse(() => {
|
|
709
|
-
const snapshot = ingestSuccess$
|
|
709
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response);
|
|
710
710
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
711
711
|
}, () => {
|
|
712
712
|
const cache = new StoreKeyMap();
|
|
713
|
-
getResponseCacheKeys$
|
|
713
|
+
getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
|
|
714
714
|
return cache;
|
|
715
715
|
});
|
|
716
716
|
}, (response) => {
|
|
@@ -720,33 +720,33 @@ function buildNetworkSnapshot$4(luvio, config, options) {
|
|
|
720
720
|
}
|
|
721
721
|
const createCustomCodeDeploymentAdapterFactory = (luvio) => {
|
|
722
722
|
return function createCustomCodeDeployment(untrustedConfig) {
|
|
723
|
-
const config = validateAdapterConfig$
|
|
723
|
+
const config = validateAdapterConfig$6(untrustedConfig, createCustomCodeDeployment_ConfigPropertyNames);
|
|
724
724
|
// Invalid or incomplete config
|
|
725
725
|
if (config === null) {
|
|
726
726
|
throw new Error('Invalid config for "createCustomCodeDeployment"');
|
|
727
727
|
}
|
|
728
|
-
return buildNetworkSnapshot$
|
|
728
|
+
return buildNetworkSnapshot$6(luvio, config);
|
|
729
729
|
};
|
|
730
730
|
};
|
|
731
731
|
|
|
732
|
-
function keyBuilder$
|
|
733
|
-
return keyBuilder$
|
|
732
|
+
function keyBuilder$8(luvio, params) {
|
|
733
|
+
return keyBuilder$9(luvio, {
|
|
734
734
|
id: params.urlParams.customCodeNameOrId
|
|
735
735
|
});
|
|
736
736
|
}
|
|
737
|
-
function getResponseCacheKeys$
|
|
738
|
-
const key = keyBuilder$
|
|
737
|
+
function getResponseCacheKeys$5(cacheKeyMap, luvio, resourceParams) {
|
|
738
|
+
const key = keyBuilder$8(luvio, resourceParams);
|
|
739
739
|
cacheKeyMap.set(key, {
|
|
740
740
|
namespace: keyPrefix,
|
|
741
|
-
representationName: RepresentationType$
|
|
741
|
+
representationName: RepresentationType$3,
|
|
742
742
|
mergeable: false
|
|
743
743
|
});
|
|
744
744
|
}
|
|
745
745
|
function evictSuccess(luvio, resourceParams) {
|
|
746
|
-
const key = keyBuilder$
|
|
746
|
+
const key = keyBuilder$8(luvio, resourceParams);
|
|
747
747
|
luvio.storeEvict(key);
|
|
748
748
|
}
|
|
749
|
-
function createResourceRequest$
|
|
749
|
+
function createResourceRequest$5(config) {
|
|
750
750
|
const headers = {};
|
|
751
751
|
return {
|
|
752
752
|
baseUri: '/services/data/v64.0',
|
|
@@ -760,33 +760,33 @@ function createResourceRequest$3(config) {
|
|
|
760
760
|
};
|
|
761
761
|
}
|
|
762
762
|
|
|
763
|
-
const adapterName$
|
|
763
|
+
const adapterName$5 = 'deleteCustomCodeDeployment';
|
|
764
764
|
const deleteCustomCodeDeployment_ConfigPropertyMetadata = [
|
|
765
765
|
generateParamConfigMetadata('customCodeNameOrId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
766
766
|
];
|
|
767
|
-
const deleteCustomCodeDeployment_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
768
|
-
const createResourceParams$
|
|
769
|
-
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) {
|
|
770
770
|
const config = {};
|
|
771
|
-
typeCheckConfig$
|
|
771
|
+
typeCheckConfig$7(untrustedConfig, config, deleteCustomCodeDeployment_ConfigPropertyMetadata);
|
|
772
772
|
return config;
|
|
773
773
|
}
|
|
774
|
-
function validateAdapterConfig$
|
|
774
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
775
775
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
776
776
|
return null;
|
|
777
777
|
}
|
|
778
778
|
if (process.env.NODE_ENV !== 'production') {
|
|
779
779
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
780
780
|
}
|
|
781
|
-
const config = typeCheckConfig$
|
|
781
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
782
782
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
783
783
|
return null;
|
|
784
784
|
}
|
|
785
785
|
return config;
|
|
786
786
|
}
|
|
787
|
-
function buildNetworkSnapshot$
|
|
788
|
-
const resourceParams = createResourceParams$
|
|
789
|
-
const request = createResourceRequest$
|
|
787
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
788
|
+
const resourceParams = createResourceParams$5(config);
|
|
789
|
+
const request = createResourceRequest$5(resourceParams);
|
|
790
790
|
return luvio.dispatchResourceRequest(request, options)
|
|
791
791
|
.then(() => {
|
|
792
792
|
return luvio.handleSuccessResponse(() => {
|
|
@@ -794,7 +794,7 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
794
794
|
return luvio.storeBroadcast();
|
|
795
795
|
}, () => {
|
|
796
796
|
const cache = new StoreKeyMap();
|
|
797
|
-
getResponseCacheKeys$
|
|
797
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams);
|
|
798
798
|
return cache;
|
|
799
799
|
});
|
|
800
800
|
}, (response) => {
|
|
@@ -804,33 +804,33 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
804
804
|
}
|
|
805
805
|
const deleteCustomCodeDeploymentAdapterFactory = (luvio) => {
|
|
806
806
|
return function byocdeleteCustomCodeDeployment(untrustedConfig) {
|
|
807
|
-
const config = validateAdapterConfig$
|
|
807
|
+
const config = validateAdapterConfig$5(untrustedConfig, deleteCustomCodeDeployment_ConfigPropertyNames);
|
|
808
808
|
// Invalid or incomplete config
|
|
809
809
|
if (config === null) {
|
|
810
|
-
throw new Error(`Invalid config for "${adapterName$
|
|
810
|
+
throw new Error(`Invalid config for "${adapterName$5}"`);
|
|
811
811
|
}
|
|
812
|
-
return buildNetworkSnapshot$
|
|
812
|
+
return buildNetworkSnapshot$5(luvio, config);
|
|
813
813
|
};
|
|
814
814
|
};
|
|
815
815
|
|
|
816
|
-
function select$
|
|
817
|
-
return select$
|
|
816
|
+
function select$8(luvio, params) {
|
|
817
|
+
return select$a();
|
|
818
818
|
}
|
|
819
|
-
function keyBuilder$
|
|
820
|
-
return keyBuilder$
|
|
819
|
+
function keyBuilder$7(luvio, params) {
|
|
820
|
+
return keyBuilder$9(luvio, {
|
|
821
821
|
id: params.urlParams.customCodeNameOrId
|
|
822
822
|
});
|
|
823
823
|
}
|
|
824
|
-
function getResponseCacheKeys$
|
|
825
|
-
getTypeCacheKeys$
|
|
824
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
825
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response);
|
|
826
826
|
}
|
|
827
|
-
function ingestSuccess$
|
|
827
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
828
828
|
const { body } = response;
|
|
829
|
-
const key = keyBuilder$
|
|
830
|
-
luvio.storeIngest(key, ingest$
|
|
829
|
+
const key = keyBuilder$7(luvio, resourceParams);
|
|
830
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
831
831
|
const snapshot = luvio.storeLookup({
|
|
832
832
|
recordId: key,
|
|
833
|
-
node: select$
|
|
833
|
+
node: select$8(),
|
|
834
834
|
variables: {},
|
|
835
835
|
}, snapshotRefresh);
|
|
836
836
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -841,13 +841,13 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
841
841
|
deepFreeze(snapshot.data);
|
|
842
842
|
return snapshot;
|
|
843
843
|
}
|
|
844
|
-
function ingestError$
|
|
845
|
-
const key = keyBuilder$
|
|
844
|
+
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
845
|
+
const key = keyBuilder$7(luvio, params);
|
|
846
846
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
847
847
|
luvio.storeIngestError(key, errorSnapshot);
|
|
848
848
|
return errorSnapshot;
|
|
849
849
|
}
|
|
850
|
-
function createResourceRequest$
|
|
850
|
+
function createResourceRequest$4(config) {
|
|
851
851
|
const headers = {};
|
|
852
852
|
return {
|
|
853
853
|
baseUri: '/services/data/v64.0',
|
|
@@ -865,97 +865,97 @@ function createResourceRequestFromRepresentation(representation) {
|
|
|
865
865
|
urlParams: {},
|
|
866
866
|
};
|
|
867
867
|
config.urlParams.customCodeNameOrId = representation.id;
|
|
868
|
-
return createResourceRequest$
|
|
868
|
+
return createResourceRequest$4(config);
|
|
869
869
|
}
|
|
870
870
|
|
|
871
|
-
const adapterName$
|
|
871
|
+
const adapterName$4 = 'getCustomCodeDeployment';
|
|
872
872
|
const getCustomCodeDeployment_ConfigPropertyMetadata = [
|
|
873
873
|
generateParamConfigMetadata('customCodeNameOrId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
874
874
|
];
|
|
875
|
-
const getCustomCodeDeployment_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
876
|
-
const createResourceParams$
|
|
877
|
-
function keyBuilder$
|
|
878
|
-
const resourceParams = createResourceParams$
|
|
879
|
-
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);
|
|
880
880
|
}
|
|
881
|
-
function typeCheckConfig$
|
|
881
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
882
882
|
const config = {};
|
|
883
|
-
typeCheckConfig$
|
|
883
|
+
typeCheckConfig$7(untrustedConfig, config, getCustomCodeDeployment_ConfigPropertyMetadata);
|
|
884
884
|
return config;
|
|
885
885
|
}
|
|
886
|
-
function validateAdapterConfig$
|
|
886
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
887
887
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
888
888
|
return null;
|
|
889
889
|
}
|
|
890
890
|
if (process.env.NODE_ENV !== 'production') {
|
|
891
891
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
892
892
|
}
|
|
893
|
-
const config = typeCheckConfig$
|
|
893
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
894
894
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
895
895
|
return null;
|
|
896
896
|
}
|
|
897
897
|
return config;
|
|
898
898
|
}
|
|
899
|
-
function adapterFragment$
|
|
900
|
-
createResourceParams$
|
|
901
|
-
return select$
|
|
899
|
+
function adapterFragment$3(luvio, config) {
|
|
900
|
+
createResourceParams$4(config);
|
|
901
|
+
return select$8();
|
|
902
902
|
}
|
|
903
|
-
function onFetchResponseSuccess$
|
|
904
|
-
const snapshot = ingestSuccess$
|
|
903
|
+
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
904
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
905
905
|
config,
|
|
906
|
-
resolve: () => buildNetworkSnapshot$
|
|
906
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
907
907
|
});
|
|
908
908
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
909
909
|
}
|
|
910
|
-
function onFetchResponseError$
|
|
911
|
-
const snapshot = ingestError$
|
|
910
|
+
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
911
|
+
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
912
912
|
config,
|
|
913
|
-
resolve: () => buildNetworkSnapshot$
|
|
913
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
914
914
|
});
|
|
915
915
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
916
916
|
}
|
|
917
|
-
function buildNetworkSnapshot$
|
|
918
|
-
const resourceParams = createResourceParams$
|
|
919
|
-
const request = createResourceRequest$
|
|
917
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
918
|
+
const resourceParams = createResourceParams$4(config);
|
|
919
|
+
const request = createResourceRequest$4(resourceParams);
|
|
920
920
|
return luvio.dispatchResourceRequest(request, options)
|
|
921
921
|
.then((response) => {
|
|
922
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
922
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
923
923
|
const cache = new StoreKeyMap();
|
|
924
|
-
getResponseCacheKeys$
|
|
924
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
925
925
|
return cache;
|
|
926
926
|
});
|
|
927
927
|
}, (response) => {
|
|
928
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
928
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
|
|
929
929
|
});
|
|
930
930
|
}
|
|
931
|
-
function buildNetworkSnapshotCachePolicy$
|
|
932
|
-
return buildNetworkSnapshotCachePolicy$
|
|
931
|
+
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
932
|
+
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
|
|
933
933
|
}
|
|
934
|
-
function buildCachedSnapshotCachePolicy$
|
|
934
|
+
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
935
935
|
const { luvio, config } = context;
|
|
936
936
|
const selector = {
|
|
937
|
-
recordId: keyBuilder$
|
|
938
|
-
node: adapterFragment$
|
|
937
|
+
recordId: keyBuilder$6(luvio, config),
|
|
938
|
+
node: adapterFragment$3(luvio, config),
|
|
939
939
|
variables: {},
|
|
940
940
|
};
|
|
941
941
|
const cacheSnapshot = storeLookup(selector, {
|
|
942
942
|
config,
|
|
943
|
-
resolve: () => buildNetworkSnapshot$
|
|
943
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
944
944
|
});
|
|
945
945
|
return cacheSnapshot;
|
|
946
946
|
}
|
|
947
947
|
const getCustomCodeDeploymentAdapterFactory = (luvio) => function byoc__getCustomCodeDeployment(untrustedConfig, requestContext) {
|
|
948
|
-
const config = validateAdapterConfig$
|
|
948
|
+
const config = validateAdapterConfig$4(untrustedConfig, getCustomCodeDeployment_ConfigPropertyNames);
|
|
949
949
|
// Invalid or incomplete config
|
|
950
950
|
if (config === null) {
|
|
951
951
|
return null;
|
|
952
952
|
}
|
|
953
953
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
954
|
-
buildCachedSnapshotCachePolicy$
|
|
954
|
+
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
955
955
|
};
|
|
956
956
|
const notifyChangeFactory = (luvio, options) => {
|
|
957
957
|
return function getSsotDataCustomCodeByCustomCodeNameOrIdNotifyChange(configs) {
|
|
958
|
-
const keys = configs.map(c => keyBuilder$
|
|
958
|
+
const keys = configs.map(c => keyBuilder$9(luvio, c));
|
|
959
959
|
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
960
960
|
for (let i = 0, len = entries.length; i < len; i++) {
|
|
961
961
|
const { key, record: val } = entries[i];
|
|
@@ -964,11 +964,11 @@ const notifyChangeFactory = (luvio, options) => {
|
|
|
964
964
|
.then((response) => {
|
|
965
965
|
return luvio.handleSuccessResponse(() => {
|
|
966
966
|
const { body } = response;
|
|
967
|
-
luvio.storeIngest(key, ingest$
|
|
967
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
968
968
|
return luvio.storeBroadcast();
|
|
969
969
|
}, () => {
|
|
970
970
|
const cache = new StoreKeyMap();
|
|
971
|
-
getTypeCacheKeys$
|
|
971
|
+
getTypeCacheKeys$3(cache, luvio, response.body);
|
|
972
972
|
return cache;
|
|
973
973
|
});
|
|
974
974
|
}, (error) => {
|
|
@@ -983,8 +983,8 @@ const notifyChangeFactory = (luvio, options) => {
|
|
|
983
983
|
};
|
|
984
984
|
};
|
|
985
985
|
|
|
986
|
-
const VERSION = "3d9a814ca87df7e7c79c5d385c146820";
|
|
987
|
-
function validate(obj, path = 'CustomCodeDeploymentCollectionRepresentation') {
|
|
986
|
+
const VERSION$3 = "3d9a814ca87df7e7c79c5d385c146820";
|
|
987
|
+
function validate$3(obj, path = 'CustomCodeDeploymentCollectionRepresentation') {
|
|
988
988
|
const v_error = (() => {
|
|
989
989
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
990
990
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1021,14 +1021,14 @@ function validate(obj, path = 'CustomCodeDeploymentCollectionRepresentation') {
|
|
|
1021
1021
|
})();
|
|
1022
1022
|
return v_error === undefined ? null : v_error;
|
|
1023
1023
|
}
|
|
1024
|
-
const RepresentationType = 'CustomCodeDeploymentCollectionRepresentation';
|
|
1025
|
-
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
1024
|
+
const RepresentationType$2 = 'CustomCodeDeploymentCollectionRepresentation';
|
|
1025
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
1026
1026
|
const input_customCodeDeployments = input.customCodeDeployments;
|
|
1027
1027
|
const input_customCodeDeployments_id = path.fullPath + '__customCodeDeployments';
|
|
1028
1028
|
for (let i = 0; i < input_customCodeDeployments.length; i++) {
|
|
1029
1029
|
const input_customCodeDeployments_item = input_customCodeDeployments[i];
|
|
1030
1030
|
let input_customCodeDeployments_item_id = input_customCodeDeployments_id + '__' + i;
|
|
1031
|
-
input_customCodeDeployments[i] = ingest$
|
|
1031
|
+
input_customCodeDeployments[i] = ingest$3(input_customCodeDeployments_item, {
|
|
1032
1032
|
fullPath: input_customCodeDeployments_item_id,
|
|
1033
1033
|
propertyName: i,
|
|
1034
1034
|
parent: {
|
|
@@ -1041,10 +1041,10 @@ function normalize(input, existing, path, luvio, store, timestamp) {
|
|
|
1041
1041
|
}
|
|
1042
1042
|
return input;
|
|
1043
1043
|
}
|
|
1044
|
-
const select$
|
|
1044
|
+
const select$7 = function CustomCodeDeploymentCollectionRepresentationSelect() {
|
|
1045
1045
|
return {
|
|
1046
1046
|
kind: 'Fragment',
|
|
1047
|
-
version: VERSION,
|
|
1047
|
+
version: VERSION$3,
|
|
1048
1048
|
private: [],
|
|
1049
1049
|
selections: [
|
|
1050
1050
|
{
|
|
@@ -1055,7 +1055,7 @@ const select$2 = function CustomCodeDeploymentCollectionRepresentationSelect() {
|
|
|
1055
1055
|
name: 'customCodeDeployments',
|
|
1056
1056
|
kind: 'Link',
|
|
1057
1057
|
plural: true,
|
|
1058
|
-
fragment: select$
|
|
1058
|
+
fragment: select$a()
|
|
1059
1059
|
},
|
|
1060
1060
|
{
|
|
1061
1061
|
name: 'nextPageUrl',
|
|
@@ -1069,7 +1069,7 @@ const select$2 = function CustomCodeDeploymentCollectionRepresentationSelect() {
|
|
|
1069
1069
|
]
|
|
1070
1070
|
};
|
|
1071
1071
|
};
|
|
1072
|
-
function equals(existing, incoming) {
|
|
1072
|
+
function equals$3(existing, incoming) {
|
|
1073
1073
|
const existing_totalSize = existing.totalSize;
|
|
1074
1074
|
const incoming_totalSize = incoming.totalSize;
|
|
1075
1075
|
if (!(existing_totalSize === incoming_totalSize)) {
|
|
@@ -1105,48 +1105,48 @@ function equals(existing, incoming) {
|
|
|
1105
1105
|
}
|
|
1106
1106
|
return true;
|
|
1107
1107
|
}
|
|
1108
|
-
const ingest = function CustomCodeDeploymentCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1108
|
+
const ingest$2 = function CustomCodeDeploymentCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1109
1109
|
if (process.env.NODE_ENV !== 'production') {
|
|
1110
|
-
const validateError = validate(input);
|
|
1110
|
+
const validateError = validate$3(input);
|
|
1111
1111
|
if (validateError !== null) {
|
|
1112
1112
|
throw validateError;
|
|
1113
1113
|
}
|
|
1114
1114
|
}
|
|
1115
1115
|
const key = path.fullPath;
|
|
1116
1116
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1117
|
-
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);
|
|
1118
1118
|
return createLink(key);
|
|
1119
1119
|
};
|
|
1120
|
-
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
1120
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
1121
1121
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1122
1122
|
const rootKey = fullPathFactory();
|
|
1123
1123
|
rootKeySet.set(rootKey, {
|
|
1124
1124
|
namespace: keyPrefix,
|
|
1125
|
-
representationName: RepresentationType,
|
|
1125
|
+
representationName: RepresentationType$2,
|
|
1126
1126
|
mergeable: false
|
|
1127
1127
|
});
|
|
1128
1128
|
const input_customCodeDeployments_length = input.customCodeDeployments.length;
|
|
1129
1129
|
for (let i = 0; i < input_customCodeDeployments_length; i++) {
|
|
1130
|
-
getTypeCacheKeys$
|
|
1130
|
+
getTypeCacheKeys$3(rootKeySet, luvio, input.customCodeDeployments[i]);
|
|
1131
1131
|
}
|
|
1132
1132
|
}
|
|
1133
1133
|
|
|
1134
|
-
function select$
|
|
1135
|
-
return select$
|
|
1134
|
+
function select$6(luvio, params) {
|
|
1135
|
+
return select$7();
|
|
1136
1136
|
}
|
|
1137
|
-
function keyBuilder$
|
|
1138
|
-
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 + ')';
|
|
1139
1139
|
}
|
|
1140
|
-
function getResponseCacheKeys$
|
|
1141
|
-
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$
|
|
1140
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
1141
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$5(luvio, resourceParams));
|
|
1142
1142
|
}
|
|
1143
|
-
function ingestSuccess$
|
|
1143
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
1144
1144
|
const { body } = response;
|
|
1145
|
-
const key = keyBuilder$
|
|
1146
|
-
luvio.storeIngest(key, ingest, body);
|
|
1145
|
+
const key = keyBuilder$5(luvio, resourceParams);
|
|
1146
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
1147
1147
|
const snapshot = luvio.storeLookup({
|
|
1148
1148
|
recordId: key,
|
|
1149
|
-
node: select$
|
|
1149
|
+
node: select$6(),
|
|
1150
1150
|
variables: {},
|
|
1151
1151
|
}, snapshotRefresh);
|
|
1152
1152
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1157,13 +1157,13 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1157
1157
|
deepFreeze(snapshot.data);
|
|
1158
1158
|
return snapshot;
|
|
1159
1159
|
}
|
|
1160
|
-
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
1161
|
-
const key = keyBuilder$
|
|
1160
|
+
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
1161
|
+
const key = keyBuilder$5(luvio, params);
|
|
1162
1162
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1163
1163
|
luvio.storeIngestError(key, errorSnapshot);
|
|
1164
1164
|
return errorSnapshot;
|
|
1165
1165
|
}
|
|
1166
|
-
function createResourceRequest$
|
|
1166
|
+
function createResourceRequest$3(config) {
|
|
1167
1167
|
const headers = {};
|
|
1168
1168
|
return {
|
|
1169
1169
|
baseUri: '/services/data/v64.0',
|
|
@@ -1177,109 +1177,175 @@ function createResourceRequest$1(config) {
|
|
|
1177
1177
|
};
|
|
1178
1178
|
}
|
|
1179
1179
|
|
|
1180
|
-
const adapterName$
|
|
1180
|
+
const adapterName$3 = 'getCustomCodeDeployments';
|
|
1181
1181
|
const getCustomCodeDeployments_ConfigPropertyMetadata = [
|
|
1182
|
+
generateParamConfigMetadata('codeType', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1183
|
+
generateParamConfigMetadata('deploymentStatus', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1182
1184
|
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1183
1185
|
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1184
1186
|
generateParamConfigMetadata('orderBy', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1185
1187
|
];
|
|
1186
|
-
const getCustomCodeDeployments_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1187
|
-
const createResourceParams$
|
|
1188
|
-
function keyBuilder(luvio, config) {
|
|
1189
|
-
const resourceParams = createResourceParams$
|
|
1190
|
-
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);
|
|
1191
1193
|
}
|
|
1192
|
-
function typeCheckConfig$
|
|
1194
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
1193
1195
|
const config = {};
|
|
1194
|
-
typeCheckConfig$
|
|
1196
|
+
typeCheckConfig$7(untrustedConfig, config, getCustomCodeDeployments_ConfigPropertyMetadata);
|
|
1195
1197
|
return config;
|
|
1196
1198
|
}
|
|
1197
|
-
function validateAdapterConfig$
|
|
1199
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
1198
1200
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1199
1201
|
return null;
|
|
1200
1202
|
}
|
|
1201
1203
|
if (process.env.NODE_ENV !== 'production') {
|
|
1202
1204
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1203
1205
|
}
|
|
1204
|
-
const config = typeCheckConfig$
|
|
1206
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
1205
1207
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1206
1208
|
return null;
|
|
1207
1209
|
}
|
|
1208
1210
|
return config;
|
|
1209
1211
|
}
|
|
1210
|
-
function adapterFragment(luvio, config) {
|
|
1211
|
-
createResourceParams$
|
|
1212
|
-
return select$
|
|
1212
|
+
function adapterFragment$2(luvio, config) {
|
|
1213
|
+
createResourceParams$3(config);
|
|
1214
|
+
return select$6();
|
|
1213
1215
|
}
|
|
1214
|
-
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
1215
|
-
const snapshot = ingestSuccess$
|
|
1216
|
+
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
1217
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
1216
1218
|
config,
|
|
1217
|
-
resolve: () => buildNetworkSnapshot$
|
|
1219
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1218
1220
|
});
|
|
1219
1221
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1220
1222
|
}
|
|
1221
|
-
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
1222
|
-
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
1223
|
+
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
1224
|
+
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
1223
1225
|
config,
|
|
1224
|
-
resolve: () => buildNetworkSnapshot$
|
|
1226
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1225
1227
|
});
|
|
1226
1228
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1227
1229
|
}
|
|
1228
|
-
function buildNetworkSnapshot$
|
|
1229
|
-
const resourceParams = createResourceParams$
|
|
1230
|
-
const request = createResourceRequest$
|
|
1230
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
1231
|
+
const resourceParams = createResourceParams$3(config);
|
|
1232
|
+
const request = createResourceRequest$3(resourceParams);
|
|
1231
1233
|
return luvio.dispatchResourceRequest(request, options)
|
|
1232
1234
|
.then((response) => {
|
|
1233
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
1235
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
1234
1236
|
const cache = new StoreKeyMap();
|
|
1235
|
-
getResponseCacheKeys$
|
|
1237
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
1236
1238
|
return cache;
|
|
1237
1239
|
});
|
|
1238
1240
|
}, (response) => {
|
|
1239
|
-
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
1241
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
|
|
1240
1242
|
});
|
|
1241
1243
|
}
|
|
1242
|
-
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
1243
|
-
return buildNetworkSnapshotCachePolicy$
|
|
1244
|
+
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
1245
|
+
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
1244
1246
|
}
|
|
1245
|
-
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
1247
|
+
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
1246
1248
|
const { luvio, config } = context;
|
|
1247
1249
|
const selector = {
|
|
1248
|
-
recordId: keyBuilder(luvio, config),
|
|
1249
|
-
node: adapterFragment(luvio, config),
|
|
1250
|
+
recordId: keyBuilder$4(luvio, config),
|
|
1251
|
+
node: adapterFragment$2(luvio, config),
|
|
1250
1252
|
variables: {},
|
|
1251
1253
|
};
|
|
1252
1254
|
const cacheSnapshot = storeLookup(selector, {
|
|
1253
1255
|
config,
|
|
1254
|
-
resolve: () => buildNetworkSnapshot$
|
|
1256
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1255
1257
|
});
|
|
1256
1258
|
return cacheSnapshot;
|
|
1257
1259
|
}
|
|
1258
1260
|
const getCustomCodeDeploymentsAdapterFactory = (luvio) => function byoc__getCustomCodeDeployments(untrustedConfig, requestContext) {
|
|
1259
|
-
const config = validateAdapterConfig$
|
|
1261
|
+
const config = validateAdapterConfig$3(untrustedConfig, getCustomCodeDeployments_ConfigPropertyNames);
|
|
1260
1262
|
// Invalid or incomplete config
|
|
1261
1263
|
if (config === null) {
|
|
1262
1264
|
return null;
|
|
1263
1265
|
}
|
|
1264
1266
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1265
|
-
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
1267
|
+
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
1266
1268
|
};
|
|
1267
1269
|
|
|
1268
|
-
|
|
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) {
|
|
1269
1332
|
return select$5();
|
|
1270
1333
|
}
|
|
1271
|
-
function
|
|
1272
|
-
|
|
1334
|
+
function keyBuilder$3(luvio, params) {
|
|
1335
|
+
return keyPrefix + '::CustomCodeExecutionLogRepresentation:(' + 'customCodeExecutionId:' + params.urlParams.customCodeExecutionId + ',' + 'customCodeNameOrId:' + params.urlParams.customCodeNameOrId + ')';
|
|
1273
1336
|
}
|
|
1274
|
-
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) {
|
|
1275
1341
|
const { body } = response;
|
|
1276
|
-
const key =
|
|
1342
|
+
const key = keyBuilder$3(luvio, resourceParams);
|
|
1277
1343
|
luvio.storeIngest(key, ingest$1, body);
|
|
1278
1344
|
const snapshot = luvio.storeLookup({
|
|
1279
1345
|
recordId: key,
|
|
1280
|
-
node: select(),
|
|
1346
|
+
node: select$4(),
|
|
1281
1347
|
variables: {},
|
|
1282
|
-
});
|
|
1348
|
+
}, snapshotRefresh);
|
|
1283
1349
|
if (process.env.NODE_ENV !== 'production') {
|
|
1284
1350
|
if (snapshot.state !== 'Fulfilled') {
|
|
1285
1351
|
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
@@ -1288,13 +1354,19 @@ function ingestSuccess(luvio, resourceParams, response) {
|
|
|
1288
1354
|
deepFreeze(snapshot.data);
|
|
1289
1355
|
return snapshot;
|
|
1290
1356
|
}
|
|
1291
|
-
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) {
|
|
1292
1364
|
const headers = {};
|
|
1293
1365
|
return {
|
|
1294
1366
|
baseUri: '/services/data/v64.0',
|
|
1295
|
-
basePath: '/ssot/data-custom-code/' + config.urlParams.customCodeNameOrId + '',
|
|
1296
|
-
method: '
|
|
1297
|
-
body:
|
|
1367
|
+
basePath: '/ssot/data-custom-code/' + config.urlParams.customCodeNameOrId + '/executions/' + config.urlParams.customCodeExecutionId + '/logs',
|
|
1368
|
+
method: 'get',
|
|
1369
|
+
body: null,
|
|
1298
1370
|
urlParams: config.urlParams,
|
|
1299
1371
|
queryParams: {},
|
|
1300
1372
|
headers,
|
|
@@ -1302,58 +1374,654 @@ function createResourceRequest(config) {
|
|
|
1302
1374
|
};
|
|
1303
1375
|
}
|
|
1304
1376
|
|
|
1305
|
-
const adapterName = '
|
|
1306
|
-
const
|
|
1377
|
+
const adapterName$2 = 'getCustomCodeExecutionLogs';
|
|
1378
|
+
const getCustomCodeExecutionLogs_ConfigPropertyMetadata = [
|
|
1379
|
+
generateParamConfigMetadata('customCodeExecutionId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1307
1380
|
generateParamConfigMetadata('customCodeNameOrId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1308
|
-
generateParamConfigMetadata('computeType', false, 2 /* Body */, 0 /* String */),
|
|
1309
|
-
generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
|
|
1310
|
-
generateParamConfigMetadata('label', false, 2 /* Body */, 0 /* String */),
|
|
1311
|
-
generateParamConfigMetadata('version', false, 2 /* Body */, 0 /* String */),
|
|
1312
1381
|
];
|
|
1313
|
-
const
|
|
1314
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
1315
|
-
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) {
|
|
1316
1389
|
const config = {};
|
|
1317
|
-
typeCheckConfig$
|
|
1390
|
+
typeCheckConfig$7(untrustedConfig, config, getCustomCodeExecutionLogs_ConfigPropertyMetadata);
|
|
1318
1391
|
return config;
|
|
1319
1392
|
}
|
|
1320
|
-
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
1393
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
1321
1394
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1322
1395
|
return null;
|
|
1323
1396
|
}
|
|
1324
1397
|
if (process.env.NODE_ENV !== 'production') {
|
|
1325
1398
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1326
1399
|
}
|
|
1327
|
-
const config = typeCheckConfig(untrustedConfig);
|
|
1400
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
1328
1401
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1329
1402
|
return null;
|
|
1330
1403
|
}
|
|
1331
1404
|
return config;
|
|
1332
1405
|
}
|
|
1333
|
-
function
|
|
1334
|
-
|
|
1335
|
-
|
|
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);
|
|
1336
1427
|
return luvio.dispatchResourceRequest(request, options)
|
|
1337
1428
|
.then((response) => {
|
|
1338
|
-
return luvio.handleSuccessResponse(() => {
|
|
1339
|
-
const snapshot = ingestSuccess(luvio, resourceParams, response);
|
|
1340
|
-
return luvio.storeBroadcast().then(() => snapshot);
|
|
1341
|
-
}, () => {
|
|
1429
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
1342
1430
|
const cache = new StoreKeyMap();
|
|
1343
|
-
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
1431
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
1344
1432
|
return cache;
|
|
1345
1433
|
});
|
|
1346
1434
|
}, (response) => {
|
|
1347
|
-
|
|
1348
|
-
throw response;
|
|
1435
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
1349
1436
|
});
|
|
1350
1437
|
}
|
|
1351
|
-
|
|
1352
|
-
return
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
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
|
|
2023
|
+
if (config === null) {
|
|
2024
|
+
throw new Error('Invalid config for "updateCustomCodeDeployment"');
|
|
1357
2025
|
}
|
|
1358
2026
|
return buildNetworkSnapshot(luvio, config);
|
|
1359
2027
|
};
|
|
@@ -1364,31 +2032,46 @@ let deleteCustomCodeDeployment;
|
|
|
1364
2032
|
let getCustomCodeDeployment;
|
|
1365
2033
|
let getCustomCodeDeploymentNotifyChange;
|
|
1366
2034
|
let getCustomCodeDeployments;
|
|
2035
|
+
let getCustomCodeExecutionLogs;
|
|
2036
|
+
let getCustomCodeExecutions;
|
|
1367
2037
|
let updateCustomCodeDeployment;
|
|
1368
2038
|
// Imperative GET Adapters
|
|
1369
2039
|
let getCustomCodeDeployment_imperative;
|
|
1370
2040
|
let getCustomCodeDeployments_imperative;
|
|
2041
|
+
let getCustomCodeExecutionLogs_imperative;
|
|
2042
|
+
let getCustomCodeExecutions_imperative;
|
|
1371
2043
|
const getCustomCodeDeploymentMetadata = { apiFamily: 'byoc', name: 'getCustomCodeDeployment' };
|
|
1372
2044
|
const getCustomCodeDeploymentsMetadata = { apiFamily: 'byoc', name: 'getCustomCodeDeployments' };
|
|
2045
|
+
const getCustomCodeExecutionLogsMetadata = {
|
|
2046
|
+
apiFamily: 'byoc',
|
|
2047
|
+
name: 'getCustomCodeExecutionLogs',
|
|
2048
|
+
};
|
|
2049
|
+
const getCustomCodeExecutionsMetadata = { apiFamily: 'byoc', name: 'getCustomCodeExecutions' };
|
|
1373
2050
|
// Notify Update Available
|
|
1374
2051
|
function bindExportsTo(luvio) {
|
|
1375
2052
|
// LDS Adapters
|
|
1376
2053
|
const getCustomCodeDeployment_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getCustomCodeDeployment', getCustomCodeDeploymentAdapterFactory), getCustomCodeDeploymentMetadata);
|
|
1377
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);
|
|
1378
2057
|
function unwrapSnapshotData(factory) {
|
|
1379
2058
|
const adapter = factory(luvio);
|
|
1380
2059
|
return (config) => adapter(config).then((snapshot) => snapshot.data);
|
|
1381
2060
|
}
|
|
1382
2061
|
return {
|
|
1383
2062
|
createCustomCodeDeployment: unwrapSnapshotData(createCustomCodeDeploymentAdapterFactory),
|
|
1384
|
-
deleteCustomCodeDeployment: createLDSAdapter(luvio, adapterName$
|
|
2063
|
+
deleteCustomCodeDeployment: createLDSAdapter(luvio, adapterName$5, deleteCustomCodeDeploymentAdapterFactory),
|
|
1385
2064
|
getCustomCodeDeployment: createWireAdapterConstructor(luvio, getCustomCodeDeployment_ldsAdapter, getCustomCodeDeploymentMetadata),
|
|
1386
2065
|
getCustomCodeDeploymentNotifyChange: createLDSAdapter(luvio, 'getCustomCodeDeploymentNotifyChange', notifyChangeFactory),
|
|
1387
2066
|
getCustomCodeDeployments: createWireAdapterConstructor(luvio, getCustomCodeDeployments_ldsAdapter, getCustomCodeDeploymentsMetadata),
|
|
2067
|
+
getCustomCodeExecutionLogs: createWireAdapterConstructor(luvio, getCustomCodeExecutionLogs_ldsAdapter, getCustomCodeExecutionLogsMetadata),
|
|
2068
|
+
getCustomCodeExecutions: createWireAdapterConstructor(luvio, getCustomCodeExecutions_ldsAdapter, getCustomCodeExecutionsMetadata),
|
|
1388
2069
|
updateCustomCodeDeployment: unwrapSnapshotData(updateCustomCodeDeploymentAdapterFactory),
|
|
1389
2070
|
// Imperative GET Adapters
|
|
1390
2071
|
getCustomCodeDeployment_imperative: createImperativeAdapter(luvio, getCustomCodeDeployment_ldsAdapter, getCustomCodeDeploymentMetadata),
|
|
1391
2072
|
getCustomCodeDeployments_imperative: createImperativeAdapter(luvio, getCustomCodeDeployments_ldsAdapter, getCustomCodeDeploymentsMetadata),
|
|
2073
|
+
getCustomCodeExecutionLogs_imperative: createImperativeAdapter(luvio, getCustomCodeExecutionLogs_ldsAdapter, getCustomCodeExecutionLogsMetadata),
|
|
2074
|
+
getCustomCodeExecutions_imperative: createImperativeAdapter(luvio, getCustomCodeExecutions_ldsAdapter, getCustomCodeExecutionsMetadata),
|
|
1392
2075
|
// Notify Update Availables
|
|
1393
2076
|
};
|
|
1394
2077
|
}
|
|
@@ -1399,11 +2082,15 @@ withDefaultLuvio((luvio) => {
|
|
|
1399
2082
|
getCustomCodeDeployment,
|
|
1400
2083
|
getCustomCodeDeploymentNotifyChange,
|
|
1401
2084
|
getCustomCodeDeployments,
|
|
2085
|
+
getCustomCodeExecutionLogs,
|
|
2086
|
+
getCustomCodeExecutions,
|
|
1402
2087
|
updateCustomCodeDeployment,
|
|
1403
2088
|
getCustomCodeDeployment_imperative,
|
|
1404
2089
|
getCustomCodeDeployments_imperative,
|
|
2090
|
+
getCustomCodeExecutionLogs_imperative,
|
|
2091
|
+
getCustomCodeExecutions_imperative,
|
|
1405
2092
|
} = bindExportsTo(luvio));
|
|
1406
2093
|
});
|
|
1407
2094
|
|
|
1408
|
-
export { createCustomCodeDeployment, deleteCustomCodeDeployment, getCustomCodeDeployment, getCustomCodeDeploymentNotifyChange, getCustomCodeDeployment_imperative, getCustomCodeDeployments, getCustomCodeDeployments_imperative, updateCustomCodeDeployment };
|
|
1409
|
-
// version: 1.354.0-
|
|
2095
|
+
export { createCustomCodeDeployment, deleteCustomCodeDeployment, getCustomCodeDeployment, getCustomCodeDeploymentNotifyChange, getCustomCodeDeployment_imperative, getCustomCodeDeployments, getCustomCodeDeployments_imperative, getCustomCodeExecutionLogs, getCustomCodeExecutionLogs_imperative, getCustomCodeExecutions, getCustomCodeExecutions_imperative, updateCustomCodeDeployment };
|
|
2096
|
+
// version: 1.354.0-dev8-9491b01b31
|