@salesforce/lds-adapters-cdp-byoc 0.1.0-dev1
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/LICENSE.txt +82 -0
- package/dist/es/es2018/cdp-byoc.js +2145 -0
- package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +62 -0
- package/dist/es/es2018/types/src/generated/adapters/createCustomCodeDeployment.d.ts +26 -0
- package/dist/es/es2018/types/src/generated/adapters/deleteCustomCodeDeployment.d.ts +14 -0
- package/dist/es/es2018/types/src/generated/adapters/getCustomCodeDeployment.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/adapters/getCustomCodeDeployments.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/adapters/getCustomCodeExecution.d.ts +28 -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/adapters/updateCustomCodeDeployment.d.ts +20 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +8 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/resources/deleteSsotDataCustomCodeByCustomCodeNameOrId.d.ts +12 -0
- package/dist/es/es2018/types/src/generated/resources/getSsotDataCustomCode.d.ts +20 -0
- package/dist/es/es2018/types/src/generated/resources/getSsotDataCustomCodeByCustomCodeNameOrId.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/resources/getSsotDataCustomCodeExecutionsByCustomCodeExecutionIdAndCustomCodeNameOrId.d.ts +16 -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/resources/patchSsotDataCustomCodeByCustomCodeNameOrId.d.ts +19 -0
- package/dist/es/es2018/types/src/generated/resources/postSsotDataCustomCode.d.ts +23 -0
- package/dist/es/es2018/types/src/generated/types/CdpUserRepresentation.d.ts +34 -0
- package/dist/es/es2018/types/src/generated/types/CustomCodeDeploymentCollectionRepresentation.d.ts +47 -0
- package/dist/es/es2018/types/src/generated/types/CustomCodeDeploymentInputRepresentation.d.ts +68 -0
- package/dist/es/es2018/types/src/generated/types/CustomCodeDeploymentRepresentation.d.ts +99 -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/dist/es/es2018/types/src/generated/types/CustomCodePatchInputRepresentation.d.ts +40 -0
- package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
- package/package.json +66 -0
- package/sfdc/index.d.ts +1 -0
- package/sfdc/index.js +2265 -0
- package/src/raml/api.raml +493 -0
- package/src/raml/luvio.raml +54 -0
package/sfdc/index.js
ADDED
|
@@ -0,0 +1,2265 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2022, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* ATTENTION!
|
|
9
|
+
* THIS IS A GENERATED FILE FROM https://github.com/salesforce-experience-platform-emu/lds-lightning-platform
|
|
10
|
+
* If you would like to contribute to LDS, please follow the steps outlined in the git repo.
|
|
11
|
+
* Any changes made to this file in p4 will be automatically overwritten.
|
|
12
|
+
* *******************************************************************************************
|
|
13
|
+
*/
|
|
14
|
+
/* proxy-compat-disable */
|
|
15
|
+
import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
|
|
16
|
+
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
17
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$8, typeCheckConfig as typeCheckConfig$8, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$5 } from 'force/luvioEngine';
|
|
18
|
+
|
|
19
|
+
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
|
+
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
21
|
+
const { isArray: ArrayIsArray$1 } = Array;
|
|
22
|
+
/**
|
|
23
|
+
* Validates an adapter config is well-formed.
|
|
24
|
+
* @param config The config to validate.
|
|
25
|
+
* @param adapter The adapter validation configuration.
|
|
26
|
+
* @param oneOf The keys the config must contain at least one of.
|
|
27
|
+
* @throws A TypeError if config doesn't satisfy the adapter's config validation.
|
|
28
|
+
*/
|
|
29
|
+
function validateConfig(config, adapter, oneOf) {
|
|
30
|
+
const { displayName } = adapter;
|
|
31
|
+
const { required, optional, unsupported } = adapter.parameters;
|
|
32
|
+
if (config === undefined ||
|
|
33
|
+
required.every(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
|
|
34
|
+
throw new TypeError(`adapter ${displayName} configuration must specify ${required.sort().join(', ')}`);
|
|
35
|
+
}
|
|
36
|
+
if (oneOf && oneOf.some(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
|
|
37
|
+
throw new TypeError(`adapter ${displayName} configuration must specify one of ${oneOf.sort().join(', ')}`);
|
|
38
|
+
}
|
|
39
|
+
if (unsupported !== undefined &&
|
|
40
|
+
unsupported.some(req => ObjectPrototypeHasOwnProperty.call(config, req))) {
|
|
41
|
+
throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
|
|
42
|
+
}
|
|
43
|
+
const supported = required.concat(optional);
|
|
44
|
+
if (ObjectKeys$1(config).some(key => !supported.includes(key))) {
|
|
45
|
+
throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function untrustedIsObject(untrusted) {
|
|
49
|
+
return typeof untrusted === 'object' && untrusted !== null && ArrayIsArray$1(untrusted) === false;
|
|
50
|
+
}
|
|
51
|
+
function areRequiredParametersPresent(config, configPropertyNames) {
|
|
52
|
+
return configPropertyNames.parameters.required.every(req => req in config);
|
|
53
|
+
}
|
|
54
|
+
const snapshotRefreshOptions = {
|
|
55
|
+
overrides: {
|
|
56
|
+
headers: {
|
|
57
|
+
'Cache-Control': 'no-cache',
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
function generateParamConfigMetadata(name, required, resourceType, typeCheckShape, isArrayShape = false, coerceFn) {
|
|
62
|
+
return {
|
|
63
|
+
name,
|
|
64
|
+
required,
|
|
65
|
+
resourceType,
|
|
66
|
+
typeCheckShape,
|
|
67
|
+
isArrayShape,
|
|
68
|
+
coerceFn,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function buildAdapterValidationConfig(displayName, paramsMeta) {
|
|
72
|
+
const required = paramsMeta.filter(p => p.required).map(p => p.name);
|
|
73
|
+
const optional = paramsMeta.filter(p => !p.required).map(p => p.name);
|
|
74
|
+
return {
|
|
75
|
+
displayName,
|
|
76
|
+
parameters: {
|
|
77
|
+
required,
|
|
78
|
+
optional,
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
const keyPrefix = 'byoc';
|
|
83
|
+
|
|
84
|
+
const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
|
|
85
|
+
const { isArray: ArrayIsArray } = Array;
|
|
86
|
+
const { stringify: JSONStringify } = JSON;
|
|
87
|
+
function equalsArray(a, b, equalsItem) {
|
|
88
|
+
const aLength = a.length;
|
|
89
|
+
const bLength = b.length;
|
|
90
|
+
if (aLength !== bLength) {
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
for (let i = 0; i < aLength; i++) {
|
|
94
|
+
if (equalsItem(a[i], b[i]) === false) {
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
100
|
+
function equalsObject(a, b, equalsProp) {
|
|
101
|
+
const aKeys = ObjectKeys(a).sort();
|
|
102
|
+
const bKeys = ObjectKeys(b).sort();
|
|
103
|
+
const aKeysLength = aKeys.length;
|
|
104
|
+
const bKeysLength = bKeys.length;
|
|
105
|
+
if (aKeysLength !== bKeysLength) {
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
for (let i = 0; i < aKeys.length; i++) {
|
|
109
|
+
const key = aKeys[i];
|
|
110
|
+
if (key !== bKeys[i]) {
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
113
|
+
if (equalsProp(a[key], b[key]) === false) {
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return true;
|
|
118
|
+
}
|
|
119
|
+
function createLink(ref) {
|
|
120
|
+
return {
|
|
121
|
+
__ref: serializeStructuredKey(ref),
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const VERSION$5 = "2fe1bfd9fd1c6a94767d2ea000d6d318";
|
|
126
|
+
function validate$5(obj, path = 'CdpUserRepresentation') {
|
|
127
|
+
const v_error = (() => {
|
|
128
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
129
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
130
|
+
}
|
|
131
|
+
const obj_id = obj.id;
|
|
132
|
+
const path_id = path + '.id';
|
|
133
|
+
if (typeof obj_id !== 'string') {
|
|
134
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
135
|
+
}
|
|
136
|
+
const obj_name = obj.name;
|
|
137
|
+
const path_name = path + '.name';
|
|
138
|
+
if (typeof obj_name !== 'string') {
|
|
139
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
140
|
+
}
|
|
141
|
+
const obj_profilePhotoUrl = obj.profilePhotoUrl;
|
|
142
|
+
const path_profilePhotoUrl = path + '.profilePhotoUrl';
|
|
143
|
+
if (typeof obj_profilePhotoUrl !== 'string') {
|
|
144
|
+
return new TypeError('Expected "string" but received "' + typeof obj_profilePhotoUrl + '" (at "' + path_profilePhotoUrl + '")');
|
|
145
|
+
}
|
|
146
|
+
})();
|
|
147
|
+
return v_error === undefined ? null : v_error;
|
|
148
|
+
}
|
|
149
|
+
const select$c = function CdpUserRepresentationSelect() {
|
|
150
|
+
return {
|
|
151
|
+
kind: 'Fragment',
|
|
152
|
+
version: VERSION$5,
|
|
153
|
+
private: [],
|
|
154
|
+
selections: [
|
|
155
|
+
{
|
|
156
|
+
name: 'id',
|
|
157
|
+
kind: 'Scalar'
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
name: 'name',
|
|
161
|
+
kind: 'Scalar'
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: 'profilePhotoUrl',
|
|
165
|
+
kind: 'Scalar'
|
|
166
|
+
}
|
|
167
|
+
]
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
function equals$5(existing, incoming) {
|
|
171
|
+
const existing_id = existing.id;
|
|
172
|
+
const incoming_id = incoming.id;
|
|
173
|
+
if (!(existing_id === incoming_id)) {
|
|
174
|
+
return false;
|
|
175
|
+
}
|
|
176
|
+
const existing_name = existing.name;
|
|
177
|
+
const incoming_name = incoming.name;
|
|
178
|
+
if (!(existing_name === incoming_name)) {
|
|
179
|
+
return false;
|
|
180
|
+
}
|
|
181
|
+
const existing_profilePhotoUrl = existing.profilePhotoUrl;
|
|
182
|
+
const incoming_profilePhotoUrl = incoming.profilePhotoUrl;
|
|
183
|
+
if (!(existing_profilePhotoUrl === incoming_profilePhotoUrl)) {
|
|
184
|
+
return false;
|
|
185
|
+
}
|
|
186
|
+
return true;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
const VERSION$4 = "3a8185ac626c1463f8bf0540517ef2e2";
|
|
190
|
+
function validate$4(obj, path = 'CustomCodeDeploymentRepresentation') {
|
|
191
|
+
const v_error = (() => {
|
|
192
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
193
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
194
|
+
}
|
|
195
|
+
const obj_codeType = obj.codeType;
|
|
196
|
+
const path_codeType = path + '.codeType';
|
|
197
|
+
if (typeof obj_codeType !== 'string') {
|
|
198
|
+
return new TypeError('Expected "string" but received "' + typeof obj_codeType + '" (at "' + path_codeType + '")');
|
|
199
|
+
}
|
|
200
|
+
const obj_computeType = obj.computeType;
|
|
201
|
+
const path_computeType = path + '.computeType';
|
|
202
|
+
if (typeof obj_computeType !== 'string') {
|
|
203
|
+
return new TypeError('Expected "string" but received "' + typeof obj_computeType + '" (at "' + path_computeType + '")');
|
|
204
|
+
}
|
|
205
|
+
const obj_createdBy = obj.createdBy;
|
|
206
|
+
const path_createdBy = path + '.createdBy';
|
|
207
|
+
const referencepath_createdByValidationError = validate$5(obj_createdBy, path_createdBy);
|
|
208
|
+
if (referencepath_createdByValidationError !== null) {
|
|
209
|
+
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_createdBy + '")\n';
|
|
210
|
+
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
211
|
+
return new TypeError(message);
|
|
212
|
+
}
|
|
213
|
+
const obj_createdDate = obj.createdDate;
|
|
214
|
+
const path_createdDate = path + '.createdDate';
|
|
215
|
+
if (typeof obj_createdDate !== 'string') {
|
|
216
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
217
|
+
}
|
|
218
|
+
if (obj.deploymentFailureCode !== undefined) {
|
|
219
|
+
const obj_deploymentFailureCode = obj.deploymentFailureCode;
|
|
220
|
+
const path_deploymentFailureCode = path + '.deploymentFailureCode';
|
|
221
|
+
if (typeof obj_deploymentFailureCode !== 'number' || (typeof obj_deploymentFailureCode === 'number' && Math.floor(obj_deploymentFailureCode) !== obj_deploymentFailureCode)) {
|
|
222
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_deploymentFailureCode + '" (at "' + path_deploymentFailureCode + '")');
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
if (obj.deploymentFailureReason !== undefined) {
|
|
226
|
+
const obj_deploymentFailureReason = obj.deploymentFailureReason;
|
|
227
|
+
const path_deploymentFailureReason = path + '.deploymentFailureReason';
|
|
228
|
+
if (typeof obj_deploymentFailureReason !== 'string') {
|
|
229
|
+
return new TypeError('Expected "string" but received "' + typeof obj_deploymentFailureReason + '" (at "' + path_deploymentFailureReason + '")');
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
const obj_deploymentStatus = obj.deploymentStatus;
|
|
233
|
+
const path_deploymentStatus = path + '.deploymentStatus';
|
|
234
|
+
if (typeof obj_deploymentStatus !== 'string') {
|
|
235
|
+
return new TypeError('Expected "string" but received "' + typeof obj_deploymentStatus + '" (at "' + path_deploymentStatus + '")');
|
|
236
|
+
}
|
|
237
|
+
if (obj.description !== undefined) {
|
|
238
|
+
const obj_description = obj.description;
|
|
239
|
+
const path_description = path + '.description';
|
|
240
|
+
if (typeof obj_description !== 'string') {
|
|
241
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
const obj_fileUploadUrl = obj.fileUploadUrl;
|
|
245
|
+
const path_fileUploadUrl = path + '.fileUploadUrl';
|
|
246
|
+
if (typeof obj_fileUploadUrl !== 'string') {
|
|
247
|
+
return new TypeError('Expected "string" but received "' + typeof obj_fileUploadUrl + '" (at "' + path_fileUploadUrl + '")');
|
|
248
|
+
}
|
|
249
|
+
if (obj.functionInvokeOptions !== undefined) {
|
|
250
|
+
const obj_functionInvokeOptions = obj.functionInvokeOptions;
|
|
251
|
+
const path_functionInvokeOptions = path + '.functionInvokeOptions';
|
|
252
|
+
if (!ArrayIsArray(obj_functionInvokeOptions)) {
|
|
253
|
+
return new TypeError('Expected "array" but received "' + typeof obj_functionInvokeOptions + '" (at "' + path_functionInvokeOptions + '")');
|
|
254
|
+
}
|
|
255
|
+
for (let i = 0; i < obj_functionInvokeOptions.length; i++) {
|
|
256
|
+
const obj_functionInvokeOptions_item = obj_functionInvokeOptions[i];
|
|
257
|
+
const path_functionInvokeOptions_item = path_functionInvokeOptions + '[' + i + ']';
|
|
258
|
+
if (typeof obj_functionInvokeOptions_item !== 'string') {
|
|
259
|
+
return new TypeError('Expected "string" but received "' + typeof obj_functionInvokeOptions_item + '" (at "' + path_functionInvokeOptions_item + '")');
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
const obj_id = obj.id;
|
|
264
|
+
const path_id = path + '.id';
|
|
265
|
+
if (typeof obj_id !== 'string') {
|
|
266
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
267
|
+
}
|
|
268
|
+
const obj_label = obj.label;
|
|
269
|
+
const path_label = path + '.label';
|
|
270
|
+
if (typeof obj_label !== 'string') {
|
|
271
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
272
|
+
}
|
|
273
|
+
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
274
|
+
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
275
|
+
const referencepath_lastModifiedByValidationError = validate$5(obj_lastModifiedBy, path_lastModifiedBy);
|
|
276
|
+
if (referencepath_lastModifiedByValidationError !== null) {
|
|
277
|
+
let message = 'Object doesn\'t match CdpUserRepresentation (at "' + path_lastModifiedBy + '")\n';
|
|
278
|
+
message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
279
|
+
return new TypeError(message);
|
|
280
|
+
}
|
|
281
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
282
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
283
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
284
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
285
|
+
}
|
|
286
|
+
const obj_name = obj.name;
|
|
287
|
+
const path_name = path + '.name';
|
|
288
|
+
if (typeof obj_name !== 'string') {
|
|
289
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
290
|
+
}
|
|
291
|
+
if (obj.namespace !== undefined) {
|
|
292
|
+
const obj_namespace = obj.namespace;
|
|
293
|
+
const path_namespace = path + '.namespace';
|
|
294
|
+
if (typeof obj_namespace !== 'string') {
|
|
295
|
+
return new TypeError('Expected "string" but received "' + typeof obj_namespace + '" (at "' + path_namespace + '")');
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
const obj_parameters = obj.parameters;
|
|
299
|
+
const path_parameters = path + '.parameters';
|
|
300
|
+
if (typeof obj_parameters !== 'object' || ArrayIsArray(obj_parameters) || obj_parameters === null) {
|
|
301
|
+
return new TypeError('Expected "object" but received "' + typeof obj_parameters + '" (at "' + path_parameters + '")');
|
|
302
|
+
}
|
|
303
|
+
const obj_parameters_keys = ObjectKeys(obj_parameters);
|
|
304
|
+
for (let i = 0; i < obj_parameters_keys.length; i++) {
|
|
305
|
+
const key = obj_parameters_keys[i];
|
|
306
|
+
const obj_parameters_prop = obj_parameters[key];
|
|
307
|
+
const path_parameters_prop = path_parameters + '["' + key + '"]';
|
|
308
|
+
if (obj_parameters_prop === undefined) {
|
|
309
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_parameters_prop + '" (at "' + path_parameters_prop + '")');
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
const obj_status = obj.status;
|
|
313
|
+
const path_status = path + '.status';
|
|
314
|
+
if (typeof obj_status !== 'string') {
|
|
315
|
+
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
316
|
+
}
|
|
317
|
+
const obj_url = obj.url;
|
|
318
|
+
const path_url = path + '.url';
|
|
319
|
+
if (typeof obj_url !== 'string') {
|
|
320
|
+
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
321
|
+
}
|
|
322
|
+
const obj_version = obj.version;
|
|
323
|
+
const path_version = path + '.version';
|
|
324
|
+
if (typeof obj_version !== 'string') {
|
|
325
|
+
return new TypeError('Expected "string" but received "' + typeof obj_version + '" (at "' + path_version + '")');
|
|
326
|
+
}
|
|
327
|
+
})();
|
|
328
|
+
return v_error === undefined ? null : v_error;
|
|
329
|
+
}
|
|
330
|
+
const RepresentationType$4 = 'CustomCodeDeploymentRepresentation';
|
|
331
|
+
function keyBuilder$b(luvio, config) {
|
|
332
|
+
return keyPrefix + '::' + RepresentationType$4 + ':' + config.id;
|
|
333
|
+
}
|
|
334
|
+
function keyBuilderFromType(luvio, object) {
|
|
335
|
+
const keyParams = {
|
|
336
|
+
id: object.id
|
|
337
|
+
};
|
|
338
|
+
return keyBuilder$b(luvio, keyParams);
|
|
339
|
+
}
|
|
340
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
341
|
+
return input;
|
|
342
|
+
}
|
|
343
|
+
const select$b = function CustomCodeDeploymentRepresentationSelect() {
|
|
344
|
+
const { selections: CdpUserRepresentation__selections, opaque: CdpUserRepresentation__opaque, } = select$c();
|
|
345
|
+
return {
|
|
346
|
+
kind: 'Fragment',
|
|
347
|
+
version: VERSION$4,
|
|
348
|
+
private: [],
|
|
349
|
+
selections: [
|
|
350
|
+
{
|
|
351
|
+
name: 'codeType',
|
|
352
|
+
kind: 'Scalar'
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
name: 'computeType',
|
|
356
|
+
kind: 'Scalar'
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
name: 'createdBy',
|
|
360
|
+
kind: 'Object',
|
|
361
|
+
selections: CdpUserRepresentation__selections
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
name: 'createdDate',
|
|
365
|
+
kind: 'Scalar'
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
name: 'deploymentFailureCode',
|
|
369
|
+
kind: 'Scalar',
|
|
370
|
+
required: false
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
name: 'deploymentFailureReason',
|
|
374
|
+
kind: 'Scalar',
|
|
375
|
+
required: false
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
name: 'deploymentStatus',
|
|
379
|
+
kind: 'Scalar'
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
name: 'description',
|
|
383
|
+
kind: 'Scalar',
|
|
384
|
+
required: false
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
name: 'fileUploadUrl',
|
|
388
|
+
kind: 'Scalar'
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
name: 'functionInvokeOptions',
|
|
392
|
+
kind: 'Scalar',
|
|
393
|
+
plural: true,
|
|
394
|
+
required: false
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
name: 'id',
|
|
398
|
+
kind: 'Scalar'
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
name: 'label',
|
|
402
|
+
kind: 'Scalar'
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
name: 'lastModifiedBy',
|
|
406
|
+
kind: 'Object',
|
|
407
|
+
selections: CdpUserRepresentation__selections
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
name: 'lastModifiedDate',
|
|
411
|
+
kind: 'Scalar'
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
name: 'name',
|
|
415
|
+
kind: 'Scalar'
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
name: 'namespace',
|
|
419
|
+
kind: 'Scalar',
|
|
420
|
+
required: false
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
name: 'parameters',
|
|
424
|
+
kind: 'Object',
|
|
425
|
+
// any
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
name: 'status',
|
|
429
|
+
kind: 'Scalar'
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
name: 'url',
|
|
433
|
+
kind: 'Scalar'
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
name: 'version',
|
|
437
|
+
kind: 'Scalar'
|
|
438
|
+
}
|
|
439
|
+
]
|
|
440
|
+
};
|
|
441
|
+
};
|
|
442
|
+
function equals$4(existing, incoming) {
|
|
443
|
+
const existing_deploymentFailureCode = existing.deploymentFailureCode;
|
|
444
|
+
const incoming_deploymentFailureCode = incoming.deploymentFailureCode;
|
|
445
|
+
// if at least one of these optionals is defined
|
|
446
|
+
if (existing_deploymentFailureCode !== undefined || incoming_deploymentFailureCode !== undefined) {
|
|
447
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
448
|
+
// not equal
|
|
449
|
+
if (existing_deploymentFailureCode === undefined || incoming_deploymentFailureCode === undefined) {
|
|
450
|
+
return false;
|
|
451
|
+
}
|
|
452
|
+
if (!(existing_deploymentFailureCode === incoming_deploymentFailureCode)) {
|
|
453
|
+
return false;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
const existing_codeType = existing.codeType;
|
|
457
|
+
const incoming_codeType = incoming.codeType;
|
|
458
|
+
if (!(existing_codeType === incoming_codeType)) {
|
|
459
|
+
return false;
|
|
460
|
+
}
|
|
461
|
+
const existing_computeType = existing.computeType;
|
|
462
|
+
const incoming_computeType = incoming.computeType;
|
|
463
|
+
if (!(existing_computeType === incoming_computeType)) {
|
|
464
|
+
return false;
|
|
465
|
+
}
|
|
466
|
+
const existing_createdDate = existing.createdDate;
|
|
467
|
+
const incoming_createdDate = incoming.createdDate;
|
|
468
|
+
if (!(existing_createdDate === incoming_createdDate)) {
|
|
469
|
+
return false;
|
|
470
|
+
}
|
|
471
|
+
const existing_deploymentFailureReason = existing.deploymentFailureReason;
|
|
472
|
+
const incoming_deploymentFailureReason = incoming.deploymentFailureReason;
|
|
473
|
+
// if at least one of these optionals is defined
|
|
474
|
+
if (existing_deploymentFailureReason !== undefined || incoming_deploymentFailureReason !== undefined) {
|
|
475
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
476
|
+
// not equal
|
|
477
|
+
if (existing_deploymentFailureReason === undefined || incoming_deploymentFailureReason === undefined) {
|
|
478
|
+
return false;
|
|
479
|
+
}
|
|
480
|
+
if (!(existing_deploymentFailureReason === incoming_deploymentFailureReason)) {
|
|
481
|
+
return false;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
const existing_deploymentStatus = existing.deploymentStatus;
|
|
485
|
+
const incoming_deploymentStatus = incoming.deploymentStatus;
|
|
486
|
+
if (!(existing_deploymentStatus === incoming_deploymentStatus)) {
|
|
487
|
+
return false;
|
|
488
|
+
}
|
|
489
|
+
const existing_description = existing.description;
|
|
490
|
+
const incoming_description = incoming.description;
|
|
491
|
+
// if at least one of these optionals is defined
|
|
492
|
+
if (existing_description !== undefined || incoming_description !== undefined) {
|
|
493
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
494
|
+
// not equal
|
|
495
|
+
if (existing_description === undefined || incoming_description === undefined) {
|
|
496
|
+
return false;
|
|
497
|
+
}
|
|
498
|
+
if (!(existing_description === incoming_description)) {
|
|
499
|
+
return false;
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
const existing_fileUploadUrl = existing.fileUploadUrl;
|
|
503
|
+
const incoming_fileUploadUrl = incoming.fileUploadUrl;
|
|
504
|
+
if (!(existing_fileUploadUrl === incoming_fileUploadUrl)) {
|
|
505
|
+
return false;
|
|
506
|
+
}
|
|
507
|
+
const existing_id = existing.id;
|
|
508
|
+
const incoming_id = incoming.id;
|
|
509
|
+
if (!(existing_id === incoming_id)) {
|
|
510
|
+
return false;
|
|
511
|
+
}
|
|
512
|
+
const existing_label = existing.label;
|
|
513
|
+
const incoming_label = incoming.label;
|
|
514
|
+
if (!(existing_label === incoming_label)) {
|
|
515
|
+
return false;
|
|
516
|
+
}
|
|
517
|
+
const existing_lastModifiedDate = existing.lastModifiedDate;
|
|
518
|
+
const incoming_lastModifiedDate = incoming.lastModifiedDate;
|
|
519
|
+
if (!(existing_lastModifiedDate === incoming_lastModifiedDate)) {
|
|
520
|
+
return false;
|
|
521
|
+
}
|
|
522
|
+
const existing_name = existing.name;
|
|
523
|
+
const incoming_name = incoming.name;
|
|
524
|
+
if (!(existing_name === incoming_name)) {
|
|
525
|
+
return false;
|
|
526
|
+
}
|
|
527
|
+
const existing_namespace = existing.namespace;
|
|
528
|
+
const incoming_namespace = incoming.namespace;
|
|
529
|
+
// if at least one of these optionals is defined
|
|
530
|
+
if (existing_namespace !== undefined || incoming_namespace !== undefined) {
|
|
531
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
532
|
+
// not equal
|
|
533
|
+
if (existing_namespace === undefined || incoming_namespace === undefined) {
|
|
534
|
+
return false;
|
|
535
|
+
}
|
|
536
|
+
if (!(existing_namespace === incoming_namespace)) {
|
|
537
|
+
return false;
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
const existing_status = existing.status;
|
|
541
|
+
const incoming_status = incoming.status;
|
|
542
|
+
if (!(existing_status === incoming_status)) {
|
|
543
|
+
return false;
|
|
544
|
+
}
|
|
545
|
+
const existing_url = existing.url;
|
|
546
|
+
const incoming_url = incoming.url;
|
|
547
|
+
if (!(existing_url === incoming_url)) {
|
|
548
|
+
return false;
|
|
549
|
+
}
|
|
550
|
+
const existing_version = existing.version;
|
|
551
|
+
const incoming_version = incoming.version;
|
|
552
|
+
if (!(existing_version === incoming_version)) {
|
|
553
|
+
return false;
|
|
554
|
+
}
|
|
555
|
+
const existing_createdBy = existing.createdBy;
|
|
556
|
+
const incoming_createdBy = incoming.createdBy;
|
|
557
|
+
if (!(equals$5(existing_createdBy, incoming_createdBy))) {
|
|
558
|
+
return false;
|
|
559
|
+
}
|
|
560
|
+
const existing_functionInvokeOptions = existing.functionInvokeOptions;
|
|
561
|
+
const incoming_functionInvokeOptions = incoming.functionInvokeOptions;
|
|
562
|
+
// if at least one of these optionals is defined
|
|
563
|
+
if (existing_functionInvokeOptions !== undefined || incoming_functionInvokeOptions !== undefined) {
|
|
564
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
565
|
+
// not equal
|
|
566
|
+
if (existing_functionInvokeOptions === undefined || incoming_functionInvokeOptions === undefined) {
|
|
567
|
+
return false;
|
|
568
|
+
}
|
|
569
|
+
const equals_functionInvokeOptions_items = equalsArray(existing_functionInvokeOptions, incoming_functionInvokeOptions, (existing_functionInvokeOptions_item, incoming_functionInvokeOptions_item) => {
|
|
570
|
+
if (!(existing_functionInvokeOptions_item === incoming_functionInvokeOptions_item)) {
|
|
571
|
+
return false;
|
|
572
|
+
}
|
|
573
|
+
});
|
|
574
|
+
if (equals_functionInvokeOptions_items === false) {
|
|
575
|
+
return false;
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
const existing_lastModifiedBy = existing.lastModifiedBy;
|
|
579
|
+
const incoming_lastModifiedBy = incoming.lastModifiedBy;
|
|
580
|
+
if (!(equals$5(existing_lastModifiedBy, incoming_lastModifiedBy))) {
|
|
581
|
+
return false;
|
|
582
|
+
}
|
|
583
|
+
const existing_parameters = existing.parameters;
|
|
584
|
+
const incoming_parameters = incoming.parameters;
|
|
585
|
+
const equals_parameters_props = equalsObject(existing_parameters, incoming_parameters, (existing_parameters_prop, incoming_parameters_prop) => {
|
|
586
|
+
if (JSONStringify(incoming_parameters_prop) !== JSONStringify(existing_parameters_prop)) {
|
|
587
|
+
return false;
|
|
588
|
+
}
|
|
589
|
+
});
|
|
590
|
+
if (equals_parameters_props === false) {
|
|
591
|
+
return false;
|
|
592
|
+
}
|
|
593
|
+
return true;
|
|
594
|
+
}
|
|
595
|
+
const ingest$4 = function CustomCodeDeploymentRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
596
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
597
|
+
const validateError = validate$4(input);
|
|
598
|
+
if (validateError !== null) {
|
|
599
|
+
throw validateError;
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
const key = keyBuilderFromType(luvio, input);
|
|
603
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
604
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "byoc", VERSION$4, RepresentationType$4, equals$4);
|
|
605
|
+
return createLink(key);
|
|
606
|
+
};
|
|
607
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
608
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
609
|
+
const rootKey = keyBuilderFromType(luvio, input);
|
|
610
|
+
rootKeySet.set(rootKey, {
|
|
611
|
+
namespace: keyPrefix,
|
|
612
|
+
representationName: RepresentationType$4,
|
|
613
|
+
mergeable: false
|
|
614
|
+
});
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
function select$a(luvio, params) {
|
|
618
|
+
return select$b();
|
|
619
|
+
}
|
|
620
|
+
function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
|
|
621
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response);
|
|
622
|
+
}
|
|
623
|
+
function ingestSuccess$6(luvio, resourceParams, response) {
|
|
624
|
+
const { body } = response;
|
|
625
|
+
const key = keyBuilderFromType(luvio, body);
|
|
626
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
627
|
+
const snapshot = luvio.storeLookup({
|
|
628
|
+
recordId: key,
|
|
629
|
+
node: select$a(),
|
|
630
|
+
variables: {},
|
|
631
|
+
});
|
|
632
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
633
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
634
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
deepFreeze(snapshot.data);
|
|
638
|
+
return snapshot;
|
|
639
|
+
}
|
|
640
|
+
function createResourceRequest$7(config) {
|
|
641
|
+
const headers = {};
|
|
642
|
+
return {
|
|
643
|
+
baseUri: '/services/data/v66.0',
|
|
644
|
+
basePath: '/ssot/data-custom-code',
|
|
645
|
+
method: 'post',
|
|
646
|
+
body: config.body,
|
|
647
|
+
urlParams: {},
|
|
648
|
+
queryParams: {},
|
|
649
|
+
headers,
|
|
650
|
+
priority: 'normal',
|
|
651
|
+
};
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
const adapterName$7 = 'createCustomCodeDeployment';
|
|
655
|
+
const createCustomCodeDeployment_ConfigPropertyMetadata = [
|
|
656
|
+
generateParamConfigMetadata('codeType', false, 2 /* Body */, 0 /* String */),
|
|
657
|
+
generateParamConfigMetadata('functionInvokeOptions', false, 2 /* Body */, 0 /* String */, true),
|
|
658
|
+
generateParamConfigMetadata('computeType', true, 2 /* Body */, 0 /* String */),
|
|
659
|
+
generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
|
|
660
|
+
generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
|
|
661
|
+
generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
|
|
662
|
+
generateParamConfigMetadata('name', true, 2 /* Body */, 0 /* String */),
|
|
663
|
+
generateParamConfigMetadata('namespace', false, 2 /* Body */, 0 /* String */),
|
|
664
|
+
generateParamConfigMetadata('parameters', false, 2 /* Body */, 4 /* Unsupported */),
|
|
665
|
+
generateParamConfigMetadata('version', true, 2 /* Body */, 0 /* String */),
|
|
666
|
+
];
|
|
667
|
+
const createCustomCodeDeployment_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, createCustomCodeDeployment_ConfigPropertyMetadata);
|
|
668
|
+
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$8(createCustomCodeDeployment_ConfigPropertyMetadata);
|
|
669
|
+
function typeCheckConfig$7(untrustedConfig) {
|
|
670
|
+
const config = {};
|
|
671
|
+
typeCheckConfig$8(untrustedConfig, config, createCustomCodeDeployment_ConfigPropertyMetadata);
|
|
672
|
+
const untrustedConfig_parameters = untrustedConfig.parameters;
|
|
673
|
+
if (untrustedIsObject(untrustedConfig_parameters)) {
|
|
674
|
+
const untrustedConfig_parameters_object = {};
|
|
675
|
+
const untrustedConfig_parameters_keys = Object.keys(untrustedConfig_parameters);
|
|
676
|
+
for (let i = 0, arrayLength = untrustedConfig_parameters_keys.length; i < arrayLength; i++) {
|
|
677
|
+
const key = untrustedConfig_parameters_keys[i];
|
|
678
|
+
const untrustedConfig_parameters_prop = untrustedConfig_parameters[key];
|
|
679
|
+
if (typeof untrustedConfig_parameters_prop === 'string') {
|
|
680
|
+
if (untrustedConfig_parameters_object !== undefined) {
|
|
681
|
+
untrustedConfig_parameters_object[key] = untrustedConfig_parameters_prop;
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
if (untrustedConfig_parameters_object !== undefined && Object.keys(untrustedConfig_parameters_object).length >= 0) {
|
|
686
|
+
config.parameters = untrustedConfig_parameters_object;
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
return config;
|
|
690
|
+
}
|
|
691
|
+
function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
|
|
692
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
693
|
+
return null;
|
|
694
|
+
}
|
|
695
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
696
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
697
|
+
}
|
|
698
|
+
const config = typeCheckConfig$7(untrustedConfig);
|
|
699
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
700
|
+
return null;
|
|
701
|
+
}
|
|
702
|
+
return config;
|
|
703
|
+
}
|
|
704
|
+
function buildNetworkSnapshot$7(luvio, config, options) {
|
|
705
|
+
const resourceParams = createResourceParams$7(config);
|
|
706
|
+
const request = createResourceRequest$7(resourceParams);
|
|
707
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
708
|
+
.then((response) => {
|
|
709
|
+
return luvio.handleSuccessResponse(() => {
|
|
710
|
+
const snapshot = ingestSuccess$6(luvio, resourceParams, response);
|
|
711
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
712
|
+
}, () => {
|
|
713
|
+
const cache = new StoreKeyMap();
|
|
714
|
+
getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
|
|
715
|
+
return cache;
|
|
716
|
+
});
|
|
717
|
+
}, (response) => {
|
|
718
|
+
deepFreeze(response);
|
|
719
|
+
throw response;
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
const createCustomCodeDeploymentAdapterFactory = (luvio) => {
|
|
723
|
+
return function createCustomCodeDeployment(untrustedConfig) {
|
|
724
|
+
const config = validateAdapterConfig$7(untrustedConfig, createCustomCodeDeployment_ConfigPropertyNames);
|
|
725
|
+
// Invalid or incomplete config
|
|
726
|
+
if (config === null) {
|
|
727
|
+
throw new Error('Invalid config for "createCustomCodeDeployment"');
|
|
728
|
+
}
|
|
729
|
+
return buildNetworkSnapshot$7(luvio, config);
|
|
730
|
+
};
|
|
731
|
+
};
|
|
732
|
+
|
|
733
|
+
function keyBuilder$a(luvio, params) {
|
|
734
|
+
return keyBuilder$b(luvio, {
|
|
735
|
+
id: params.urlParams.customCodeNameOrId
|
|
736
|
+
});
|
|
737
|
+
}
|
|
738
|
+
function getResponseCacheKeys$6(cacheKeyMap, luvio, resourceParams) {
|
|
739
|
+
const key = keyBuilder$a(luvio, resourceParams);
|
|
740
|
+
cacheKeyMap.set(key, {
|
|
741
|
+
namespace: keyPrefix,
|
|
742
|
+
representationName: RepresentationType$4,
|
|
743
|
+
mergeable: false
|
|
744
|
+
});
|
|
745
|
+
}
|
|
746
|
+
function evictSuccess(luvio, resourceParams) {
|
|
747
|
+
const key = keyBuilder$a(luvio, resourceParams);
|
|
748
|
+
luvio.storeEvict(key);
|
|
749
|
+
}
|
|
750
|
+
function createResourceRequest$6(config) {
|
|
751
|
+
const headers = {};
|
|
752
|
+
return {
|
|
753
|
+
baseUri: '/services/data/v66.0',
|
|
754
|
+
basePath: '/ssot/data-custom-code/' + config.urlParams.customCodeNameOrId + '',
|
|
755
|
+
method: 'delete',
|
|
756
|
+
body: null,
|
|
757
|
+
urlParams: config.urlParams,
|
|
758
|
+
queryParams: {},
|
|
759
|
+
headers,
|
|
760
|
+
priority: 'normal',
|
|
761
|
+
};
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
const adapterName$6 = 'deleteCustomCodeDeployment';
|
|
765
|
+
const deleteCustomCodeDeployment_ConfigPropertyMetadata = [
|
|
766
|
+
generateParamConfigMetadata('customCodeNameOrId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
767
|
+
];
|
|
768
|
+
const deleteCustomCodeDeployment_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, deleteCustomCodeDeployment_ConfigPropertyMetadata);
|
|
769
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$8(deleteCustomCodeDeployment_ConfigPropertyMetadata);
|
|
770
|
+
function typeCheckConfig$6(untrustedConfig) {
|
|
771
|
+
const config = {};
|
|
772
|
+
typeCheckConfig$8(untrustedConfig, config, deleteCustomCodeDeployment_ConfigPropertyMetadata);
|
|
773
|
+
return config;
|
|
774
|
+
}
|
|
775
|
+
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
776
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
777
|
+
return null;
|
|
778
|
+
}
|
|
779
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
780
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
781
|
+
}
|
|
782
|
+
const config = typeCheckConfig$6(untrustedConfig);
|
|
783
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
784
|
+
return null;
|
|
785
|
+
}
|
|
786
|
+
return config;
|
|
787
|
+
}
|
|
788
|
+
function buildNetworkSnapshot$6(luvio, config, options) {
|
|
789
|
+
const resourceParams = createResourceParams$6(config);
|
|
790
|
+
const request = createResourceRequest$6(resourceParams);
|
|
791
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
792
|
+
.then(() => {
|
|
793
|
+
return luvio.handleSuccessResponse(() => {
|
|
794
|
+
evictSuccess(luvio, resourceParams);
|
|
795
|
+
return luvio.storeBroadcast();
|
|
796
|
+
}, () => {
|
|
797
|
+
const cache = new StoreKeyMap();
|
|
798
|
+
getResponseCacheKeys$6(cache, luvio, resourceParams);
|
|
799
|
+
return cache;
|
|
800
|
+
});
|
|
801
|
+
}, (response) => {
|
|
802
|
+
deepFreeze(response);
|
|
803
|
+
throw response;
|
|
804
|
+
});
|
|
805
|
+
}
|
|
806
|
+
const deleteCustomCodeDeploymentAdapterFactory = (luvio) => {
|
|
807
|
+
return function byocdeleteCustomCodeDeployment(untrustedConfig) {
|
|
808
|
+
const config = validateAdapterConfig$6(untrustedConfig, deleteCustomCodeDeployment_ConfigPropertyNames);
|
|
809
|
+
// Invalid or incomplete config
|
|
810
|
+
if (config === null) {
|
|
811
|
+
throw new Error(`Invalid config for "${adapterName$6}"`);
|
|
812
|
+
}
|
|
813
|
+
return buildNetworkSnapshot$6(luvio, config);
|
|
814
|
+
};
|
|
815
|
+
};
|
|
816
|
+
|
|
817
|
+
function select$9(luvio, params) {
|
|
818
|
+
return select$b();
|
|
819
|
+
}
|
|
820
|
+
function keyBuilder$9(luvio, params) {
|
|
821
|
+
return keyBuilder$b(luvio, {
|
|
822
|
+
id: params.urlParams.customCodeNameOrId
|
|
823
|
+
});
|
|
824
|
+
}
|
|
825
|
+
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
826
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response);
|
|
827
|
+
}
|
|
828
|
+
function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
829
|
+
const { body } = response;
|
|
830
|
+
const key = keyBuilder$9(luvio, resourceParams);
|
|
831
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
832
|
+
const snapshot = luvio.storeLookup({
|
|
833
|
+
recordId: key,
|
|
834
|
+
node: select$9(),
|
|
835
|
+
variables: {},
|
|
836
|
+
}, snapshotRefresh);
|
|
837
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
838
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
839
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
deepFreeze(snapshot.data);
|
|
843
|
+
return snapshot;
|
|
844
|
+
}
|
|
845
|
+
function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
846
|
+
const key = keyBuilder$9(luvio, params);
|
|
847
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
848
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
849
|
+
return errorSnapshot;
|
|
850
|
+
}
|
|
851
|
+
function createResourceRequest$5(config) {
|
|
852
|
+
const headers = {};
|
|
853
|
+
return {
|
|
854
|
+
baseUri: '/services/data/v66.0',
|
|
855
|
+
basePath: '/ssot/data-custom-code/' + config.urlParams.customCodeNameOrId + '',
|
|
856
|
+
method: 'get',
|
|
857
|
+
body: null,
|
|
858
|
+
urlParams: config.urlParams,
|
|
859
|
+
queryParams: {},
|
|
860
|
+
headers,
|
|
861
|
+
priority: 'normal',
|
|
862
|
+
};
|
|
863
|
+
}
|
|
864
|
+
function createResourceRequestFromRepresentation(representation) {
|
|
865
|
+
const config = {
|
|
866
|
+
urlParams: {},
|
|
867
|
+
};
|
|
868
|
+
config.urlParams.customCodeNameOrId = representation.id;
|
|
869
|
+
return createResourceRequest$5(config);
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
const adapterName$5 = 'getCustomCodeDeployment';
|
|
873
|
+
const getCustomCodeDeployment_ConfigPropertyMetadata = [
|
|
874
|
+
generateParamConfigMetadata('customCodeNameOrId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
875
|
+
];
|
|
876
|
+
const getCustomCodeDeployment_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getCustomCodeDeployment_ConfigPropertyMetadata);
|
|
877
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$8(getCustomCodeDeployment_ConfigPropertyMetadata);
|
|
878
|
+
function keyBuilder$8(luvio, config) {
|
|
879
|
+
const resourceParams = createResourceParams$5(config);
|
|
880
|
+
return keyBuilder$9(luvio, resourceParams);
|
|
881
|
+
}
|
|
882
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
883
|
+
const config = {};
|
|
884
|
+
typeCheckConfig$8(untrustedConfig, config, getCustomCodeDeployment_ConfigPropertyMetadata);
|
|
885
|
+
return config;
|
|
886
|
+
}
|
|
887
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
888
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
889
|
+
return null;
|
|
890
|
+
}
|
|
891
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
892
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
893
|
+
}
|
|
894
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
895
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
896
|
+
return null;
|
|
897
|
+
}
|
|
898
|
+
return config;
|
|
899
|
+
}
|
|
900
|
+
function adapterFragment$4(luvio, config) {
|
|
901
|
+
createResourceParams$5(config);
|
|
902
|
+
return select$9();
|
|
903
|
+
}
|
|
904
|
+
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
905
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
|
|
906
|
+
config,
|
|
907
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
908
|
+
});
|
|
909
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
910
|
+
}
|
|
911
|
+
function onFetchResponseError$4(luvio, config, resourceParams, response) {
|
|
912
|
+
const snapshot = ingestError$4(luvio, resourceParams, response, {
|
|
913
|
+
config,
|
|
914
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
915
|
+
});
|
|
916
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
917
|
+
}
|
|
918
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
919
|
+
const resourceParams = createResourceParams$5(config);
|
|
920
|
+
const request = createResourceRequest$5(resourceParams);
|
|
921
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
922
|
+
.then((response) => {
|
|
923
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
|
|
924
|
+
const cache = new StoreKeyMap();
|
|
925
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
|
|
926
|
+
return cache;
|
|
927
|
+
});
|
|
928
|
+
}, (response) => {
|
|
929
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
|
|
930
|
+
});
|
|
931
|
+
}
|
|
932
|
+
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
933
|
+
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
|
|
934
|
+
}
|
|
935
|
+
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
936
|
+
const { luvio, config } = context;
|
|
937
|
+
const selector = {
|
|
938
|
+
recordId: keyBuilder$8(luvio, config),
|
|
939
|
+
node: adapterFragment$4(luvio, config),
|
|
940
|
+
variables: {},
|
|
941
|
+
};
|
|
942
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
943
|
+
config,
|
|
944
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
945
|
+
});
|
|
946
|
+
return cacheSnapshot;
|
|
947
|
+
}
|
|
948
|
+
const getCustomCodeDeploymentAdapterFactory = (luvio) => function byoc__getCustomCodeDeployment(untrustedConfig, requestContext) {
|
|
949
|
+
const config = validateAdapterConfig$5(untrustedConfig, getCustomCodeDeployment_ConfigPropertyNames);
|
|
950
|
+
// Invalid or incomplete config
|
|
951
|
+
if (config === null) {
|
|
952
|
+
return null;
|
|
953
|
+
}
|
|
954
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
955
|
+
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
|
|
956
|
+
};
|
|
957
|
+
const notifyChangeFactory = (luvio, options) => {
|
|
958
|
+
return function getSsotDataCustomCodeByCustomCodeNameOrIdNotifyChange(configs) {
|
|
959
|
+
const keys = configs.map(c => keyBuilder$b(luvio, c));
|
|
960
|
+
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
961
|
+
for (let i = 0, len = entries.length; i < len; i++) {
|
|
962
|
+
const { key, record: val } = entries[i];
|
|
963
|
+
const refreshRequest = createResourceRequestFromRepresentation(val);
|
|
964
|
+
luvio.dispatchResourceRequest(refreshRequest, options)
|
|
965
|
+
.then((response) => {
|
|
966
|
+
return luvio.handleSuccessResponse(() => {
|
|
967
|
+
const { body } = response;
|
|
968
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
969
|
+
return luvio.storeBroadcast();
|
|
970
|
+
}, () => {
|
|
971
|
+
const cache = new StoreKeyMap();
|
|
972
|
+
getTypeCacheKeys$4(cache, luvio, response.body);
|
|
973
|
+
return cache;
|
|
974
|
+
});
|
|
975
|
+
}, (error) => {
|
|
976
|
+
return luvio.handleErrorResponse(() => {
|
|
977
|
+
const errorSnapshot = luvio.errorSnapshot(error);
|
|
978
|
+
luvio.storeIngestError(key, errorSnapshot, undefined);
|
|
979
|
+
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
980
|
+
});
|
|
981
|
+
});
|
|
982
|
+
}
|
|
983
|
+
});
|
|
984
|
+
};
|
|
985
|
+
};
|
|
986
|
+
|
|
987
|
+
const VERSION$3 = "3d9a814ca87df7e7c79c5d385c146820";
|
|
988
|
+
function validate$3(obj, path = 'CustomCodeDeploymentCollectionRepresentation') {
|
|
989
|
+
const v_error = (() => {
|
|
990
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
991
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
992
|
+
}
|
|
993
|
+
const obj_currentPageUrl = obj.currentPageUrl;
|
|
994
|
+
const path_currentPageUrl = path + '.currentPageUrl';
|
|
995
|
+
if (typeof obj_currentPageUrl !== 'string') {
|
|
996
|
+
return new TypeError('Expected "string" but received "' + typeof obj_currentPageUrl + '" (at "' + path_currentPageUrl + '")');
|
|
997
|
+
}
|
|
998
|
+
const obj_customCodeDeployments = obj.customCodeDeployments;
|
|
999
|
+
const path_customCodeDeployments = path + '.customCodeDeployments';
|
|
1000
|
+
if (!ArrayIsArray(obj_customCodeDeployments)) {
|
|
1001
|
+
return new TypeError('Expected "array" but received "' + typeof obj_customCodeDeployments + '" (at "' + path_customCodeDeployments + '")');
|
|
1002
|
+
}
|
|
1003
|
+
for (let i = 0; i < obj_customCodeDeployments.length; i++) {
|
|
1004
|
+
const obj_customCodeDeployments_item = obj_customCodeDeployments[i];
|
|
1005
|
+
const path_customCodeDeployments_item = path_customCodeDeployments + '[' + i + ']';
|
|
1006
|
+
if (typeof obj_customCodeDeployments_item !== 'object' || Array.isArray(obj_customCodeDeployments_item)) {
|
|
1007
|
+
return new TypeError('Expected "object" but received "' + typeof obj_customCodeDeployments_item + '" (at "' + path_customCodeDeployments_item + '")');
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
if (obj.nextPageUrl !== undefined) {
|
|
1011
|
+
const obj_nextPageUrl = obj.nextPageUrl;
|
|
1012
|
+
const path_nextPageUrl = path + '.nextPageUrl';
|
|
1013
|
+
if (typeof obj_nextPageUrl !== 'string') {
|
|
1014
|
+
return new TypeError('Expected "string" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
const obj_totalSize = obj.totalSize;
|
|
1018
|
+
const path_totalSize = path + '.totalSize';
|
|
1019
|
+
if (typeof obj_totalSize !== 'number' || (typeof obj_totalSize === 'number' && Math.floor(obj_totalSize) !== obj_totalSize)) {
|
|
1020
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_totalSize + '" (at "' + path_totalSize + '")');
|
|
1021
|
+
}
|
|
1022
|
+
})();
|
|
1023
|
+
return v_error === undefined ? null : v_error;
|
|
1024
|
+
}
|
|
1025
|
+
const RepresentationType$3 = 'CustomCodeDeploymentCollectionRepresentation';
|
|
1026
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
1027
|
+
const input_customCodeDeployments = input.customCodeDeployments;
|
|
1028
|
+
const input_customCodeDeployments_id = path.fullPath + '__customCodeDeployments';
|
|
1029
|
+
for (let i = 0; i < input_customCodeDeployments.length; i++) {
|
|
1030
|
+
const input_customCodeDeployments_item = input_customCodeDeployments[i];
|
|
1031
|
+
let input_customCodeDeployments_item_id = input_customCodeDeployments_id + '__' + i;
|
|
1032
|
+
input_customCodeDeployments[i] = ingest$4(input_customCodeDeployments_item, {
|
|
1033
|
+
fullPath: input_customCodeDeployments_item_id,
|
|
1034
|
+
propertyName: i,
|
|
1035
|
+
parent: {
|
|
1036
|
+
data: input,
|
|
1037
|
+
key: path.fullPath,
|
|
1038
|
+
existing: existing,
|
|
1039
|
+
},
|
|
1040
|
+
ttl: path.ttl
|
|
1041
|
+
}, luvio, store, timestamp);
|
|
1042
|
+
}
|
|
1043
|
+
return input;
|
|
1044
|
+
}
|
|
1045
|
+
const select$8 = function CustomCodeDeploymentCollectionRepresentationSelect() {
|
|
1046
|
+
return {
|
|
1047
|
+
kind: 'Fragment',
|
|
1048
|
+
version: VERSION$3,
|
|
1049
|
+
private: [],
|
|
1050
|
+
selections: [
|
|
1051
|
+
{
|
|
1052
|
+
name: 'currentPageUrl',
|
|
1053
|
+
kind: 'Scalar'
|
|
1054
|
+
},
|
|
1055
|
+
{
|
|
1056
|
+
name: 'customCodeDeployments',
|
|
1057
|
+
kind: 'Link',
|
|
1058
|
+
plural: true,
|
|
1059
|
+
fragment: select$b()
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
name: 'nextPageUrl',
|
|
1063
|
+
kind: 'Scalar',
|
|
1064
|
+
required: false
|
|
1065
|
+
},
|
|
1066
|
+
{
|
|
1067
|
+
name: 'totalSize',
|
|
1068
|
+
kind: 'Scalar'
|
|
1069
|
+
}
|
|
1070
|
+
]
|
|
1071
|
+
};
|
|
1072
|
+
};
|
|
1073
|
+
function equals$3(existing, incoming) {
|
|
1074
|
+
const existing_totalSize = existing.totalSize;
|
|
1075
|
+
const incoming_totalSize = incoming.totalSize;
|
|
1076
|
+
if (!(existing_totalSize === incoming_totalSize)) {
|
|
1077
|
+
return false;
|
|
1078
|
+
}
|
|
1079
|
+
const existing_currentPageUrl = existing.currentPageUrl;
|
|
1080
|
+
const incoming_currentPageUrl = incoming.currentPageUrl;
|
|
1081
|
+
if (!(existing_currentPageUrl === incoming_currentPageUrl)) {
|
|
1082
|
+
return false;
|
|
1083
|
+
}
|
|
1084
|
+
const existing_nextPageUrl = existing.nextPageUrl;
|
|
1085
|
+
const incoming_nextPageUrl = incoming.nextPageUrl;
|
|
1086
|
+
// if at least one of these optionals is defined
|
|
1087
|
+
if (existing_nextPageUrl !== undefined || incoming_nextPageUrl !== undefined) {
|
|
1088
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1089
|
+
// not equal
|
|
1090
|
+
if (existing_nextPageUrl === undefined || incoming_nextPageUrl === undefined) {
|
|
1091
|
+
return false;
|
|
1092
|
+
}
|
|
1093
|
+
if (!(existing_nextPageUrl === incoming_nextPageUrl)) {
|
|
1094
|
+
return false;
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
const existing_customCodeDeployments = existing.customCodeDeployments;
|
|
1098
|
+
const incoming_customCodeDeployments = incoming.customCodeDeployments;
|
|
1099
|
+
const equals_customCodeDeployments_items = equalsArray(existing_customCodeDeployments, incoming_customCodeDeployments, (existing_customCodeDeployments_item, incoming_customCodeDeployments_item) => {
|
|
1100
|
+
if (!(existing_customCodeDeployments_item.__ref === incoming_customCodeDeployments_item.__ref)) {
|
|
1101
|
+
return false;
|
|
1102
|
+
}
|
|
1103
|
+
});
|
|
1104
|
+
if (equals_customCodeDeployments_items === false) {
|
|
1105
|
+
return false;
|
|
1106
|
+
}
|
|
1107
|
+
return true;
|
|
1108
|
+
}
|
|
1109
|
+
const ingest$3 = function CustomCodeDeploymentCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1110
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1111
|
+
const validateError = validate$3(input);
|
|
1112
|
+
if (validateError !== null) {
|
|
1113
|
+
throw validateError;
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
const key = path.fullPath;
|
|
1117
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1118
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "byoc", VERSION$3, RepresentationType$3, equals$3);
|
|
1119
|
+
return createLink(key);
|
|
1120
|
+
};
|
|
1121
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
1122
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1123
|
+
const rootKey = fullPathFactory();
|
|
1124
|
+
rootKeySet.set(rootKey, {
|
|
1125
|
+
namespace: keyPrefix,
|
|
1126
|
+
representationName: RepresentationType$3,
|
|
1127
|
+
mergeable: false
|
|
1128
|
+
});
|
|
1129
|
+
const input_customCodeDeployments_length = input.customCodeDeployments.length;
|
|
1130
|
+
for (let i = 0; i < input_customCodeDeployments_length; i++) {
|
|
1131
|
+
getTypeCacheKeys$4(rootKeySet, luvio, input.customCodeDeployments[i]);
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
function select$7(luvio, params) {
|
|
1136
|
+
return select$8();
|
|
1137
|
+
}
|
|
1138
|
+
function keyBuilder$7(luvio, params) {
|
|
1139
|
+
return keyPrefix + '::CustomCodeDeploymentCollectionRepresentation:(' + 'codeType:' + params.queryParams.codeType + ',' + 'deploymentStatus:' + params.queryParams.deploymentStatus + ',' + 'label:' + params.queryParams.label + ',' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'orderBy:' + params.queryParams.orderBy + ')';
|
|
1140
|
+
}
|
|
1141
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
1142
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$7(luvio, resourceParams));
|
|
1143
|
+
}
|
|
1144
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
1145
|
+
const { body } = response;
|
|
1146
|
+
const key = keyBuilder$7(luvio, resourceParams);
|
|
1147
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
1148
|
+
const snapshot = luvio.storeLookup({
|
|
1149
|
+
recordId: key,
|
|
1150
|
+
node: select$7(),
|
|
1151
|
+
variables: {},
|
|
1152
|
+
}, snapshotRefresh);
|
|
1153
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1154
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1155
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
deepFreeze(snapshot.data);
|
|
1159
|
+
return snapshot;
|
|
1160
|
+
}
|
|
1161
|
+
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
1162
|
+
const key = keyBuilder$7(luvio, params);
|
|
1163
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1164
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
1165
|
+
return errorSnapshot;
|
|
1166
|
+
}
|
|
1167
|
+
function createResourceRequest$4(config) {
|
|
1168
|
+
const headers = {};
|
|
1169
|
+
return {
|
|
1170
|
+
baseUri: '/services/data/v66.0',
|
|
1171
|
+
basePath: '/ssot/data-custom-code',
|
|
1172
|
+
method: 'get',
|
|
1173
|
+
body: null,
|
|
1174
|
+
urlParams: {},
|
|
1175
|
+
queryParams: config.queryParams,
|
|
1176
|
+
headers,
|
|
1177
|
+
priority: 'normal',
|
|
1178
|
+
};
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
const adapterName$4 = 'getCustomCodeDeployments';
|
|
1182
|
+
const getCustomCodeDeployments_ConfigPropertyMetadata = [
|
|
1183
|
+
generateParamConfigMetadata('codeType', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1184
|
+
generateParamConfigMetadata('deploymentStatus', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1185
|
+
generateParamConfigMetadata('label', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1186
|
+
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1187
|
+
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1188
|
+
generateParamConfigMetadata('orderBy', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1189
|
+
];
|
|
1190
|
+
const getCustomCodeDeployments_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getCustomCodeDeployments_ConfigPropertyMetadata);
|
|
1191
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$8(getCustomCodeDeployments_ConfigPropertyMetadata);
|
|
1192
|
+
function keyBuilder$6(luvio, config) {
|
|
1193
|
+
const resourceParams = createResourceParams$4(config);
|
|
1194
|
+
return keyBuilder$7(luvio, resourceParams);
|
|
1195
|
+
}
|
|
1196
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
1197
|
+
const config = {};
|
|
1198
|
+
typeCheckConfig$8(untrustedConfig, config, getCustomCodeDeployments_ConfigPropertyMetadata);
|
|
1199
|
+
return config;
|
|
1200
|
+
}
|
|
1201
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
1202
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1203
|
+
return null;
|
|
1204
|
+
}
|
|
1205
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1206
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1207
|
+
}
|
|
1208
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
1209
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1210
|
+
return null;
|
|
1211
|
+
}
|
|
1212
|
+
return config;
|
|
1213
|
+
}
|
|
1214
|
+
function adapterFragment$3(luvio, config) {
|
|
1215
|
+
createResourceParams$4(config);
|
|
1216
|
+
return select$7();
|
|
1217
|
+
}
|
|
1218
|
+
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
1219
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
1220
|
+
config,
|
|
1221
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
1222
|
+
});
|
|
1223
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1224
|
+
}
|
|
1225
|
+
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
1226
|
+
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
1227
|
+
config,
|
|
1228
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
1229
|
+
});
|
|
1230
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1231
|
+
}
|
|
1232
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
1233
|
+
const resourceParams = createResourceParams$4(config);
|
|
1234
|
+
const request = createResourceRequest$4(resourceParams);
|
|
1235
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1236
|
+
.then((response) => {
|
|
1237
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
1238
|
+
const cache = new StoreKeyMap();
|
|
1239
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
1240
|
+
return cache;
|
|
1241
|
+
});
|
|
1242
|
+
}, (response) => {
|
|
1243
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
|
|
1244
|
+
});
|
|
1245
|
+
}
|
|
1246
|
+
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
1247
|
+
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
|
|
1248
|
+
}
|
|
1249
|
+
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
1250
|
+
const { luvio, config } = context;
|
|
1251
|
+
const selector = {
|
|
1252
|
+
recordId: keyBuilder$6(luvio, config),
|
|
1253
|
+
node: adapterFragment$3(luvio, config),
|
|
1254
|
+
variables: {},
|
|
1255
|
+
};
|
|
1256
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1257
|
+
config,
|
|
1258
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
1259
|
+
});
|
|
1260
|
+
return cacheSnapshot;
|
|
1261
|
+
}
|
|
1262
|
+
const getCustomCodeDeploymentsAdapterFactory = (luvio) => function byoc__getCustomCodeDeployments(untrustedConfig, requestContext) {
|
|
1263
|
+
const config = validateAdapterConfig$4(untrustedConfig, getCustomCodeDeployments_ConfigPropertyNames);
|
|
1264
|
+
// Invalid or incomplete config
|
|
1265
|
+
if (config === null) {
|
|
1266
|
+
return null;
|
|
1267
|
+
}
|
|
1268
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1269
|
+
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
1270
|
+
};
|
|
1271
|
+
|
|
1272
|
+
const VERSION$2 = "16ba4e83f3e94d331bcbdba6f3d301b9";
|
|
1273
|
+
function validate$2(obj, path = 'CustomCodeExecutionBaseRepresentation') {
|
|
1274
|
+
const v_error = (() => {
|
|
1275
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1276
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1277
|
+
}
|
|
1278
|
+
const obj_durationInSeconds = obj.durationInSeconds;
|
|
1279
|
+
const path_durationInSeconds = path + '.durationInSeconds';
|
|
1280
|
+
if (typeof obj_durationInSeconds !== 'number' || (typeof obj_durationInSeconds === 'number' && Math.floor(obj_durationInSeconds) !== obj_durationInSeconds)) {
|
|
1281
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_durationInSeconds + '" (at "' + path_durationInSeconds + '")');
|
|
1282
|
+
}
|
|
1283
|
+
const obj_endTime = obj.endTime;
|
|
1284
|
+
const path_endTime = path + '.endTime';
|
|
1285
|
+
if (typeof obj_endTime !== 'string') {
|
|
1286
|
+
return new TypeError('Expected "string" but received "' + typeof obj_endTime + '" (at "' + path_endTime + '")');
|
|
1287
|
+
}
|
|
1288
|
+
if (obj.errorCode !== undefined) {
|
|
1289
|
+
const obj_errorCode = obj.errorCode;
|
|
1290
|
+
const path_errorCode = path + '.errorCode';
|
|
1291
|
+
if (typeof obj_errorCode !== 'number' || (typeof obj_errorCode === 'number' && Math.floor(obj_errorCode) !== obj_errorCode)) {
|
|
1292
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_errorCode + '" (at "' + path_errorCode + '")');
|
|
1293
|
+
}
|
|
1294
|
+
}
|
|
1295
|
+
if (obj.errorMessage !== undefined) {
|
|
1296
|
+
const obj_errorMessage = obj.errorMessage;
|
|
1297
|
+
const path_errorMessage = path + '.errorMessage';
|
|
1298
|
+
if (typeof obj_errorMessage !== 'string') {
|
|
1299
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
const obj_id = obj.id;
|
|
1303
|
+
const path_id = path + '.id';
|
|
1304
|
+
if (typeof obj_id !== 'string') {
|
|
1305
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1306
|
+
}
|
|
1307
|
+
const obj_rowsRead = obj.rowsRead;
|
|
1308
|
+
const path_rowsRead = path + '.rowsRead';
|
|
1309
|
+
if (typeof obj_rowsRead !== 'number' || (typeof obj_rowsRead === 'number' && Math.floor(obj_rowsRead) !== obj_rowsRead)) {
|
|
1310
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_rowsRead + '" (at "' + path_rowsRead + '")');
|
|
1311
|
+
}
|
|
1312
|
+
const obj_rowsWritten = obj.rowsWritten;
|
|
1313
|
+
const path_rowsWritten = path + '.rowsWritten';
|
|
1314
|
+
if (typeof obj_rowsWritten !== 'number' || (typeof obj_rowsWritten === 'number' && Math.floor(obj_rowsWritten) !== obj_rowsWritten)) {
|
|
1315
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_rowsWritten + '" (at "' + path_rowsWritten + '")');
|
|
1316
|
+
}
|
|
1317
|
+
const obj_startTime = obj.startTime;
|
|
1318
|
+
const path_startTime = path + '.startTime';
|
|
1319
|
+
if (typeof obj_startTime !== 'string') {
|
|
1320
|
+
return new TypeError('Expected "string" but received "' + typeof obj_startTime + '" (at "' + path_startTime + '")');
|
|
1321
|
+
}
|
|
1322
|
+
const obj_status = obj.status;
|
|
1323
|
+
const path_status = path + '.status';
|
|
1324
|
+
if (typeof obj_status !== 'string') {
|
|
1325
|
+
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
1326
|
+
}
|
|
1327
|
+
const obj_submittedTime = obj.submittedTime;
|
|
1328
|
+
const path_submittedTime = path + '.submittedTime';
|
|
1329
|
+
if (typeof obj_submittedTime !== 'string') {
|
|
1330
|
+
return new TypeError('Expected "string" but received "' + typeof obj_submittedTime + '" (at "' + path_submittedTime + '")');
|
|
1331
|
+
}
|
|
1332
|
+
})();
|
|
1333
|
+
return v_error === undefined ? null : v_error;
|
|
1334
|
+
}
|
|
1335
|
+
const RepresentationType$2 = 'CustomCodeExecutionBaseRepresentation';
|
|
1336
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
1337
|
+
return input;
|
|
1338
|
+
}
|
|
1339
|
+
const select$6 = function CustomCodeExecutionBaseRepresentationSelect() {
|
|
1340
|
+
return {
|
|
1341
|
+
kind: 'Fragment',
|
|
1342
|
+
version: VERSION$2,
|
|
1343
|
+
private: [],
|
|
1344
|
+
selections: [
|
|
1345
|
+
{
|
|
1346
|
+
name: 'durationInSeconds',
|
|
1347
|
+
kind: 'Scalar'
|
|
1348
|
+
},
|
|
1349
|
+
{
|
|
1350
|
+
name: 'endTime',
|
|
1351
|
+
kind: 'Scalar'
|
|
1352
|
+
},
|
|
1353
|
+
{
|
|
1354
|
+
name: 'errorCode',
|
|
1355
|
+
kind: 'Scalar',
|
|
1356
|
+
required: false
|
|
1357
|
+
},
|
|
1358
|
+
{
|
|
1359
|
+
name: 'errorMessage',
|
|
1360
|
+
kind: 'Scalar',
|
|
1361
|
+
required: false
|
|
1362
|
+
},
|
|
1363
|
+
{
|
|
1364
|
+
name: 'id',
|
|
1365
|
+
kind: 'Scalar'
|
|
1366
|
+
},
|
|
1367
|
+
{
|
|
1368
|
+
name: 'rowsRead',
|
|
1369
|
+
kind: 'Scalar'
|
|
1370
|
+
},
|
|
1371
|
+
{
|
|
1372
|
+
name: 'rowsWritten',
|
|
1373
|
+
kind: 'Scalar'
|
|
1374
|
+
},
|
|
1375
|
+
{
|
|
1376
|
+
name: 'startTime',
|
|
1377
|
+
kind: 'Scalar'
|
|
1378
|
+
},
|
|
1379
|
+
{
|
|
1380
|
+
name: 'status',
|
|
1381
|
+
kind: 'Scalar'
|
|
1382
|
+
},
|
|
1383
|
+
{
|
|
1384
|
+
name: 'submittedTime',
|
|
1385
|
+
kind: 'Scalar'
|
|
1386
|
+
}
|
|
1387
|
+
]
|
|
1388
|
+
};
|
|
1389
|
+
};
|
|
1390
|
+
function equals$2(existing, incoming) {
|
|
1391
|
+
const existing_durationInSeconds = existing.durationInSeconds;
|
|
1392
|
+
const incoming_durationInSeconds = incoming.durationInSeconds;
|
|
1393
|
+
if (!(existing_durationInSeconds === incoming_durationInSeconds)) {
|
|
1394
|
+
return false;
|
|
1395
|
+
}
|
|
1396
|
+
const existing_errorCode = existing.errorCode;
|
|
1397
|
+
const incoming_errorCode = incoming.errorCode;
|
|
1398
|
+
// if at least one of these optionals is defined
|
|
1399
|
+
if (existing_errorCode !== undefined || incoming_errorCode !== undefined) {
|
|
1400
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1401
|
+
// not equal
|
|
1402
|
+
if (existing_errorCode === undefined || incoming_errorCode === undefined) {
|
|
1403
|
+
return false;
|
|
1404
|
+
}
|
|
1405
|
+
if (!(existing_errorCode === incoming_errorCode)) {
|
|
1406
|
+
return false;
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
const existing_rowsRead = existing.rowsRead;
|
|
1410
|
+
const incoming_rowsRead = incoming.rowsRead;
|
|
1411
|
+
if (!(existing_rowsRead === incoming_rowsRead)) {
|
|
1412
|
+
return false;
|
|
1413
|
+
}
|
|
1414
|
+
const existing_rowsWritten = existing.rowsWritten;
|
|
1415
|
+
const incoming_rowsWritten = incoming.rowsWritten;
|
|
1416
|
+
if (!(existing_rowsWritten === incoming_rowsWritten)) {
|
|
1417
|
+
return false;
|
|
1418
|
+
}
|
|
1419
|
+
const existing_endTime = existing.endTime;
|
|
1420
|
+
const incoming_endTime = incoming.endTime;
|
|
1421
|
+
if (!(existing_endTime === incoming_endTime)) {
|
|
1422
|
+
return false;
|
|
1423
|
+
}
|
|
1424
|
+
const existing_errorMessage = existing.errorMessage;
|
|
1425
|
+
const incoming_errorMessage = incoming.errorMessage;
|
|
1426
|
+
// if at least one of these optionals is defined
|
|
1427
|
+
if (existing_errorMessage !== undefined || incoming_errorMessage !== undefined) {
|
|
1428
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1429
|
+
// not equal
|
|
1430
|
+
if (existing_errorMessage === undefined || incoming_errorMessage === undefined) {
|
|
1431
|
+
return false;
|
|
1432
|
+
}
|
|
1433
|
+
if (!(existing_errorMessage === incoming_errorMessage)) {
|
|
1434
|
+
return false;
|
|
1435
|
+
}
|
|
1436
|
+
}
|
|
1437
|
+
const existing_id = existing.id;
|
|
1438
|
+
const incoming_id = incoming.id;
|
|
1439
|
+
if (!(existing_id === incoming_id)) {
|
|
1440
|
+
return false;
|
|
1441
|
+
}
|
|
1442
|
+
const existing_startTime = existing.startTime;
|
|
1443
|
+
const incoming_startTime = incoming.startTime;
|
|
1444
|
+
if (!(existing_startTime === incoming_startTime)) {
|
|
1445
|
+
return false;
|
|
1446
|
+
}
|
|
1447
|
+
const existing_status = existing.status;
|
|
1448
|
+
const incoming_status = incoming.status;
|
|
1449
|
+
if (!(existing_status === incoming_status)) {
|
|
1450
|
+
return false;
|
|
1451
|
+
}
|
|
1452
|
+
const existing_submittedTime = existing.submittedTime;
|
|
1453
|
+
const incoming_submittedTime = incoming.submittedTime;
|
|
1454
|
+
if (!(existing_submittedTime === incoming_submittedTime)) {
|
|
1455
|
+
return false;
|
|
1456
|
+
}
|
|
1457
|
+
return true;
|
|
1458
|
+
}
|
|
1459
|
+
const ingest$2 = function CustomCodeExecutionBaseRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1460
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1461
|
+
const validateError = validate$2(input);
|
|
1462
|
+
if (validateError !== null) {
|
|
1463
|
+
throw validateError;
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
const key = path.fullPath;
|
|
1467
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1468
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "byoc", VERSION$2, RepresentationType$2, equals$2);
|
|
1469
|
+
return createLink(key);
|
|
1470
|
+
};
|
|
1471
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
1472
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1473
|
+
const rootKey = fullPathFactory();
|
|
1474
|
+
rootKeySet.set(rootKey, {
|
|
1475
|
+
namespace: keyPrefix,
|
|
1476
|
+
representationName: RepresentationType$2,
|
|
1477
|
+
mergeable: false
|
|
1478
|
+
});
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
function select$5(luvio, params) {
|
|
1482
|
+
return select$6();
|
|
1483
|
+
}
|
|
1484
|
+
function keyBuilder$5(luvio, params) {
|
|
1485
|
+
return keyPrefix + '::CustomCodeExecutionBaseRepresentation:(' + 'customCodeExecutionId:' + params.urlParams.customCodeExecutionId + ',' + 'customCodeNameOrId:' + params.urlParams.customCodeNameOrId + ')';
|
|
1486
|
+
}
|
|
1487
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
1488
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$5(luvio, resourceParams));
|
|
1489
|
+
}
|
|
1490
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
1491
|
+
const { body } = response;
|
|
1492
|
+
const key = keyBuilder$5(luvio, resourceParams);
|
|
1493
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
1494
|
+
const snapshot = luvio.storeLookup({
|
|
1495
|
+
recordId: key,
|
|
1496
|
+
node: select$5(),
|
|
1497
|
+
variables: {},
|
|
1498
|
+
}, snapshotRefresh);
|
|
1499
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1500
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1501
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
deepFreeze(snapshot.data);
|
|
1505
|
+
return snapshot;
|
|
1506
|
+
}
|
|
1507
|
+
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
1508
|
+
const key = keyBuilder$5(luvio, params);
|
|
1509
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1510
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
1511
|
+
return errorSnapshot;
|
|
1512
|
+
}
|
|
1513
|
+
function createResourceRequest$3(config) {
|
|
1514
|
+
const headers = {};
|
|
1515
|
+
return {
|
|
1516
|
+
baseUri: '/services/data/v66.0',
|
|
1517
|
+
basePath: '/ssot/data-custom-code/' + config.urlParams.customCodeNameOrId + '/executions/' + config.urlParams.customCodeExecutionId + '',
|
|
1518
|
+
method: 'get',
|
|
1519
|
+
body: null,
|
|
1520
|
+
urlParams: config.urlParams,
|
|
1521
|
+
queryParams: {},
|
|
1522
|
+
headers,
|
|
1523
|
+
priority: 'normal',
|
|
1524
|
+
};
|
|
1525
|
+
}
|
|
1526
|
+
|
|
1527
|
+
const adapterName$3 = 'getCustomCodeExecution';
|
|
1528
|
+
const getCustomCodeExecution_ConfigPropertyMetadata = [
|
|
1529
|
+
generateParamConfigMetadata('customCodeExecutionId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1530
|
+
generateParamConfigMetadata('customCodeNameOrId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1531
|
+
];
|
|
1532
|
+
const getCustomCodeExecution_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getCustomCodeExecution_ConfigPropertyMetadata);
|
|
1533
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$8(getCustomCodeExecution_ConfigPropertyMetadata);
|
|
1534
|
+
function keyBuilder$4(luvio, config) {
|
|
1535
|
+
const resourceParams = createResourceParams$3(config);
|
|
1536
|
+
return keyBuilder$5(luvio, resourceParams);
|
|
1537
|
+
}
|
|
1538
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
1539
|
+
const config = {};
|
|
1540
|
+
typeCheckConfig$8(untrustedConfig, config, getCustomCodeExecution_ConfigPropertyMetadata);
|
|
1541
|
+
return config;
|
|
1542
|
+
}
|
|
1543
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
1544
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1545
|
+
return null;
|
|
1546
|
+
}
|
|
1547
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1548
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1549
|
+
}
|
|
1550
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
1551
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1552
|
+
return null;
|
|
1553
|
+
}
|
|
1554
|
+
return config;
|
|
1555
|
+
}
|
|
1556
|
+
function adapterFragment$2(luvio, config) {
|
|
1557
|
+
createResourceParams$3(config);
|
|
1558
|
+
return select$5();
|
|
1559
|
+
}
|
|
1560
|
+
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
1561
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
1562
|
+
config,
|
|
1563
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1564
|
+
});
|
|
1565
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1566
|
+
}
|
|
1567
|
+
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
1568
|
+
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
1569
|
+
config,
|
|
1570
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1571
|
+
});
|
|
1572
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1573
|
+
}
|
|
1574
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
1575
|
+
const resourceParams = createResourceParams$3(config);
|
|
1576
|
+
const request = createResourceRequest$3(resourceParams);
|
|
1577
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1578
|
+
.then((response) => {
|
|
1579
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
1580
|
+
const cache = new StoreKeyMap();
|
|
1581
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
1582
|
+
return cache;
|
|
1583
|
+
});
|
|
1584
|
+
}, (response) => {
|
|
1585
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
|
|
1586
|
+
});
|
|
1587
|
+
}
|
|
1588
|
+
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
1589
|
+
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
1590
|
+
}
|
|
1591
|
+
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
1592
|
+
const { luvio, config } = context;
|
|
1593
|
+
const selector = {
|
|
1594
|
+
recordId: keyBuilder$4(luvio, config),
|
|
1595
|
+
node: adapterFragment$2(luvio, config),
|
|
1596
|
+
variables: {},
|
|
1597
|
+
};
|
|
1598
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1599
|
+
config,
|
|
1600
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1601
|
+
});
|
|
1602
|
+
return cacheSnapshot;
|
|
1603
|
+
}
|
|
1604
|
+
const getCustomCodeExecutionAdapterFactory = (luvio) => function byoc__getCustomCodeExecution(untrustedConfig, requestContext) {
|
|
1605
|
+
const config = validateAdapterConfig$3(untrustedConfig, getCustomCodeExecution_ConfigPropertyNames);
|
|
1606
|
+
// Invalid or incomplete config
|
|
1607
|
+
if (config === null) {
|
|
1608
|
+
return null;
|
|
1609
|
+
}
|
|
1610
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1611
|
+
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
1612
|
+
};
|
|
1613
|
+
|
|
1614
|
+
const VERSION$1 = "67e4b6c0a2163a4de44249f2a2dc7bd0";
|
|
1615
|
+
function validate$1(obj, path = 'CustomCodeExecutionLogRepresentation') {
|
|
1616
|
+
const v_error = (() => {
|
|
1617
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1618
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1619
|
+
}
|
|
1620
|
+
const obj_downloadUrl = obj.downloadUrl;
|
|
1621
|
+
const path_downloadUrl = path + '.downloadUrl';
|
|
1622
|
+
if (typeof obj_downloadUrl !== 'string') {
|
|
1623
|
+
return new TypeError('Expected "string" but received "' + typeof obj_downloadUrl + '" (at "' + path_downloadUrl + '")');
|
|
1624
|
+
}
|
|
1625
|
+
})();
|
|
1626
|
+
return v_error === undefined ? null : v_error;
|
|
1627
|
+
}
|
|
1628
|
+
const RepresentationType$1 = 'CustomCodeExecutionLogRepresentation';
|
|
1629
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
1630
|
+
return input;
|
|
1631
|
+
}
|
|
1632
|
+
const select$4 = function CustomCodeExecutionLogRepresentationSelect() {
|
|
1633
|
+
return {
|
|
1634
|
+
kind: 'Fragment',
|
|
1635
|
+
version: VERSION$1,
|
|
1636
|
+
private: [],
|
|
1637
|
+
selections: [
|
|
1638
|
+
{
|
|
1639
|
+
name: 'downloadUrl',
|
|
1640
|
+
kind: 'Scalar'
|
|
1641
|
+
}
|
|
1642
|
+
]
|
|
1643
|
+
};
|
|
1644
|
+
};
|
|
1645
|
+
function equals$1(existing, incoming) {
|
|
1646
|
+
const existing_downloadUrl = existing.downloadUrl;
|
|
1647
|
+
const incoming_downloadUrl = incoming.downloadUrl;
|
|
1648
|
+
if (!(existing_downloadUrl === incoming_downloadUrl)) {
|
|
1649
|
+
return false;
|
|
1650
|
+
}
|
|
1651
|
+
return true;
|
|
1652
|
+
}
|
|
1653
|
+
const ingest$1 = function CustomCodeExecutionLogRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1654
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1655
|
+
const validateError = validate$1(input);
|
|
1656
|
+
if (validateError !== null) {
|
|
1657
|
+
throw validateError;
|
|
1658
|
+
}
|
|
1659
|
+
}
|
|
1660
|
+
const key = path.fullPath;
|
|
1661
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1662
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "byoc", VERSION$1, RepresentationType$1, equals$1);
|
|
1663
|
+
return createLink(key);
|
|
1664
|
+
};
|
|
1665
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
1666
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1667
|
+
const rootKey = fullPathFactory();
|
|
1668
|
+
rootKeySet.set(rootKey, {
|
|
1669
|
+
namespace: keyPrefix,
|
|
1670
|
+
representationName: RepresentationType$1,
|
|
1671
|
+
mergeable: false
|
|
1672
|
+
});
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
function select$3(luvio, params) {
|
|
1676
|
+
return select$4();
|
|
1677
|
+
}
|
|
1678
|
+
function keyBuilder$3(luvio, params) {
|
|
1679
|
+
return keyPrefix + '::CustomCodeExecutionLogRepresentation:(' + 'customCodeExecutionId:' + params.urlParams.customCodeExecutionId + ',' + 'customCodeNameOrId:' + params.urlParams.customCodeNameOrId + ')';
|
|
1680
|
+
}
|
|
1681
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
1682
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
|
|
1683
|
+
}
|
|
1684
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
1685
|
+
const { body } = response;
|
|
1686
|
+
const key = keyBuilder$3(luvio, resourceParams);
|
|
1687
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
1688
|
+
const snapshot = luvio.storeLookup({
|
|
1689
|
+
recordId: key,
|
|
1690
|
+
node: select$3(),
|
|
1691
|
+
variables: {},
|
|
1692
|
+
}, snapshotRefresh);
|
|
1693
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1694
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1695
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1696
|
+
}
|
|
1697
|
+
}
|
|
1698
|
+
deepFreeze(snapshot.data);
|
|
1699
|
+
return snapshot;
|
|
1700
|
+
}
|
|
1701
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
1702
|
+
const key = keyBuilder$3(luvio, params);
|
|
1703
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1704
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
1705
|
+
return errorSnapshot;
|
|
1706
|
+
}
|
|
1707
|
+
function createResourceRequest$2(config) {
|
|
1708
|
+
const headers = {};
|
|
1709
|
+
return {
|
|
1710
|
+
baseUri: '/services/data/v66.0',
|
|
1711
|
+
basePath: '/ssot/data-custom-code/' + config.urlParams.customCodeNameOrId + '/executions/' + config.urlParams.customCodeExecutionId + '/logs',
|
|
1712
|
+
method: 'get',
|
|
1713
|
+
body: null,
|
|
1714
|
+
urlParams: config.urlParams,
|
|
1715
|
+
queryParams: {},
|
|
1716
|
+
headers,
|
|
1717
|
+
priority: 'normal',
|
|
1718
|
+
};
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
const adapterName$2 = 'getCustomCodeExecutionLogs';
|
|
1722
|
+
const getCustomCodeExecutionLogs_ConfigPropertyMetadata = [
|
|
1723
|
+
generateParamConfigMetadata('customCodeExecutionId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1724
|
+
generateParamConfigMetadata('customCodeNameOrId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1725
|
+
];
|
|
1726
|
+
const getCustomCodeExecutionLogs_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getCustomCodeExecutionLogs_ConfigPropertyMetadata);
|
|
1727
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$8(getCustomCodeExecutionLogs_ConfigPropertyMetadata);
|
|
1728
|
+
function keyBuilder$2(luvio, config) {
|
|
1729
|
+
const resourceParams = createResourceParams$2(config);
|
|
1730
|
+
return keyBuilder$3(luvio, resourceParams);
|
|
1731
|
+
}
|
|
1732
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
1733
|
+
const config = {};
|
|
1734
|
+
typeCheckConfig$8(untrustedConfig, config, getCustomCodeExecutionLogs_ConfigPropertyMetadata);
|
|
1735
|
+
return config;
|
|
1736
|
+
}
|
|
1737
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
1738
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1739
|
+
return null;
|
|
1740
|
+
}
|
|
1741
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1742
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1743
|
+
}
|
|
1744
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
1745
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1746
|
+
return null;
|
|
1747
|
+
}
|
|
1748
|
+
return config;
|
|
1749
|
+
}
|
|
1750
|
+
function adapterFragment$1(luvio, config) {
|
|
1751
|
+
createResourceParams$2(config);
|
|
1752
|
+
return select$3();
|
|
1753
|
+
}
|
|
1754
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
1755
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
1756
|
+
config,
|
|
1757
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1758
|
+
});
|
|
1759
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1760
|
+
}
|
|
1761
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
1762
|
+
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
1763
|
+
config,
|
|
1764
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1765
|
+
});
|
|
1766
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1767
|
+
}
|
|
1768
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
1769
|
+
const resourceParams = createResourceParams$2(config);
|
|
1770
|
+
const request = createResourceRequest$2(resourceParams);
|
|
1771
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1772
|
+
.then((response) => {
|
|
1773
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
1774
|
+
const cache = new StoreKeyMap();
|
|
1775
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
1776
|
+
return cache;
|
|
1777
|
+
});
|
|
1778
|
+
}, (response) => {
|
|
1779
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
1780
|
+
});
|
|
1781
|
+
}
|
|
1782
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
1783
|
+
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
1784
|
+
}
|
|
1785
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
1786
|
+
const { luvio, config } = context;
|
|
1787
|
+
const selector = {
|
|
1788
|
+
recordId: keyBuilder$2(luvio, config),
|
|
1789
|
+
node: adapterFragment$1(luvio, config),
|
|
1790
|
+
variables: {},
|
|
1791
|
+
};
|
|
1792
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1793
|
+
config,
|
|
1794
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1795
|
+
});
|
|
1796
|
+
return cacheSnapshot;
|
|
1797
|
+
}
|
|
1798
|
+
const getCustomCodeExecutionLogsAdapterFactory = (luvio) => function byoc__getCustomCodeExecutionLogs(untrustedConfig, requestContext) {
|
|
1799
|
+
const config = validateAdapterConfig$2(untrustedConfig, getCustomCodeExecutionLogs_ConfigPropertyNames);
|
|
1800
|
+
// Invalid or incomplete config
|
|
1801
|
+
if (config === null) {
|
|
1802
|
+
return null;
|
|
1803
|
+
}
|
|
1804
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1805
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
1806
|
+
};
|
|
1807
|
+
|
|
1808
|
+
const VERSION = "eff3ca61ebb18d80a094043be3f81c07";
|
|
1809
|
+
function validate(obj, path = 'CustomCodeExecutionCollectionRepresentation') {
|
|
1810
|
+
const v_error = (() => {
|
|
1811
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1812
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1813
|
+
}
|
|
1814
|
+
if (obj.currentPageUrl !== undefined) {
|
|
1815
|
+
const obj_currentPageUrl = obj.currentPageUrl;
|
|
1816
|
+
const path_currentPageUrl = path + '.currentPageUrl';
|
|
1817
|
+
if (typeof obj_currentPageUrl !== 'string') {
|
|
1818
|
+
return new TypeError('Expected "string" but received "' + typeof obj_currentPageUrl + '" (at "' + path_currentPageUrl + '")');
|
|
1819
|
+
}
|
|
1820
|
+
}
|
|
1821
|
+
const obj_executions = obj.executions;
|
|
1822
|
+
const path_executions = path + '.executions';
|
|
1823
|
+
if (!ArrayIsArray(obj_executions)) {
|
|
1824
|
+
return new TypeError('Expected "array" but received "' + typeof obj_executions + '" (at "' + path_executions + '")');
|
|
1825
|
+
}
|
|
1826
|
+
for (let i = 0; i < obj_executions.length; i++) {
|
|
1827
|
+
const obj_executions_item = obj_executions[i];
|
|
1828
|
+
const path_executions_item = path_executions + '[' + i + ']';
|
|
1829
|
+
const referencepath_executions_itemValidationError = validate$2(obj_executions_item, path_executions_item);
|
|
1830
|
+
if (referencepath_executions_itemValidationError !== null) {
|
|
1831
|
+
let message = 'Object doesn\'t match CustomCodeExecutionBaseRepresentation (at "' + path_executions_item + '")\n';
|
|
1832
|
+
message += referencepath_executions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1833
|
+
return new TypeError(message);
|
|
1834
|
+
}
|
|
1835
|
+
}
|
|
1836
|
+
if (obj.nextPageUrl !== undefined) {
|
|
1837
|
+
const obj_nextPageUrl = obj.nextPageUrl;
|
|
1838
|
+
const path_nextPageUrl = path + '.nextPageUrl';
|
|
1839
|
+
if (typeof obj_nextPageUrl !== 'string') {
|
|
1840
|
+
return new TypeError('Expected "string" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
if (obj.totalSize !== undefined) {
|
|
1844
|
+
const obj_totalSize = obj.totalSize;
|
|
1845
|
+
const path_totalSize = path + '.totalSize';
|
|
1846
|
+
if (typeof obj_totalSize !== 'number' || (typeof obj_totalSize === 'number' && Math.floor(obj_totalSize) !== obj_totalSize)) {
|
|
1847
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_totalSize + '" (at "' + path_totalSize + '")');
|
|
1848
|
+
}
|
|
1849
|
+
}
|
|
1850
|
+
})();
|
|
1851
|
+
return v_error === undefined ? null : v_error;
|
|
1852
|
+
}
|
|
1853
|
+
const RepresentationType = 'CustomCodeExecutionCollectionRepresentation';
|
|
1854
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
1855
|
+
return input;
|
|
1856
|
+
}
|
|
1857
|
+
const select$2 = function CustomCodeExecutionCollectionRepresentationSelect() {
|
|
1858
|
+
const { selections: CustomCodeExecutionBaseRepresentation__selections, opaque: CustomCodeExecutionBaseRepresentation__opaque, } = select$6();
|
|
1859
|
+
return {
|
|
1860
|
+
kind: 'Fragment',
|
|
1861
|
+
version: VERSION,
|
|
1862
|
+
private: [],
|
|
1863
|
+
selections: [
|
|
1864
|
+
{
|
|
1865
|
+
name: 'currentPageUrl',
|
|
1866
|
+
kind: 'Scalar',
|
|
1867
|
+
required: false
|
|
1868
|
+
},
|
|
1869
|
+
{
|
|
1870
|
+
name: 'executions',
|
|
1871
|
+
kind: 'Object',
|
|
1872
|
+
plural: true,
|
|
1873
|
+
selections: CustomCodeExecutionBaseRepresentation__selections
|
|
1874
|
+
},
|
|
1875
|
+
{
|
|
1876
|
+
name: 'nextPageUrl',
|
|
1877
|
+
kind: 'Scalar',
|
|
1878
|
+
required: false
|
|
1879
|
+
},
|
|
1880
|
+
{
|
|
1881
|
+
name: 'totalSize',
|
|
1882
|
+
kind: 'Scalar',
|
|
1883
|
+
required: false
|
|
1884
|
+
}
|
|
1885
|
+
]
|
|
1886
|
+
};
|
|
1887
|
+
};
|
|
1888
|
+
function equals(existing, incoming) {
|
|
1889
|
+
const existing_totalSize = existing.totalSize;
|
|
1890
|
+
const incoming_totalSize = incoming.totalSize;
|
|
1891
|
+
// if at least one of these optionals is defined
|
|
1892
|
+
if (existing_totalSize !== undefined || incoming_totalSize !== undefined) {
|
|
1893
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1894
|
+
// not equal
|
|
1895
|
+
if (existing_totalSize === undefined || incoming_totalSize === undefined) {
|
|
1896
|
+
return false;
|
|
1897
|
+
}
|
|
1898
|
+
if (!(existing_totalSize === incoming_totalSize)) {
|
|
1899
|
+
return false;
|
|
1900
|
+
}
|
|
1901
|
+
}
|
|
1902
|
+
const existing_currentPageUrl = existing.currentPageUrl;
|
|
1903
|
+
const incoming_currentPageUrl = incoming.currentPageUrl;
|
|
1904
|
+
// if at least one of these optionals is defined
|
|
1905
|
+
if (existing_currentPageUrl !== undefined || incoming_currentPageUrl !== undefined) {
|
|
1906
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1907
|
+
// not equal
|
|
1908
|
+
if (existing_currentPageUrl === undefined || incoming_currentPageUrl === undefined) {
|
|
1909
|
+
return false;
|
|
1910
|
+
}
|
|
1911
|
+
if (!(existing_currentPageUrl === incoming_currentPageUrl)) {
|
|
1912
|
+
return false;
|
|
1913
|
+
}
|
|
1914
|
+
}
|
|
1915
|
+
const existing_nextPageUrl = existing.nextPageUrl;
|
|
1916
|
+
const incoming_nextPageUrl = incoming.nextPageUrl;
|
|
1917
|
+
// if at least one of these optionals is defined
|
|
1918
|
+
if (existing_nextPageUrl !== undefined || incoming_nextPageUrl !== undefined) {
|
|
1919
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1920
|
+
// not equal
|
|
1921
|
+
if (existing_nextPageUrl === undefined || incoming_nextPageUrl === undefined) {
|
|
1922
|
+
return false;
|
|
1923
|
+
}
|
|
1924
|
+
if (!(existing_nextPageUrl === incoming_nextPageUrl)) {
|
|
1925
|
+
return false;
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
const existing_executions = existing.executions;
|
|
1929
|
+
const incoming_executions = incoming.executions;
|
|
1930
|
+
const equals_executions_items = equalsArray(existing_executions, incoming_executions, (existing_executions_item, incoming_executions_item) => {
|
|
1931
|
+
if (!(equals$2(existing_executions_item, incoming_executions_item))) {
|
|
1932
|
+
return false;
|
|
1933
|
+
}
|
|
1934
|
+
});
|
|
1935
|
+
if (equals_executions_items === false) {
|
|
1936
|
+
return false;
|
|
1937
|
+
}
|
|
1938
|
+
return true;
|
|
1939
|
+
}
|
|
1940
|
+
const ingest = function CustomCodeExecutionCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1941
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1942
|
+
const validateError = validate(input);
|
|
1943
|
+
if (validateError !== null) {
|
|
1944
|
+
throw validateError;
|
|
1945
|
+
}
|
|
1946
|
+
}
|
|
1947
|
+
const key = path.fullPath;
|
|
1948
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1949
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "byoc", VERSION, RepresentationType, equals);
|
|
1950
|
+
return createLink(key);
|
|
1951
|
+
};
|
|
1952
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
1953
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1954
|
+
const rootKey = fullPathFactory();
|
|
1955
|
+
rootKeySet.set(rootKey, {
|
|
1956
|
+
namespace: keyPrefix,
|
|
1957
|
+
representationName: RepresentationType,
|
|
1958
|
+
mergeable: false
|
|
1959
|
+
});
|
|
1960
|
+
}
|
|
1961
|
+
|
|
1962
|
+
function select$1(luvio, params) {
|
|
1963
|
+
return select$2();
|
|
1964
|
+
}
|
|
1965
|
+
function keyBuilder$1(luvio, params) {
|
|
1966
|
+
return keyPrefix + '::CustomCodeExecutionCollectionRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'customCodeNameOrId:' + params.urlParams.customCodeNameOrId + ')';
|
|
1967
|
+
}
|
|
1968
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
1969
|
+
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
1970
|
+
}
|
|
1971
|
+
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
1972
|
+
const { body } = response;
|
|
1973
|
+
const key = keyBuilder$1(luvio, resourceParams);
|
|
1974
|
+
luvio.storeIngest(key, ingest, body);
|
|
1975
|
+
const snapshot = luvio.storeLookup({
|
|
1976
|
+
recordId: key,
|
|
1977
|
+
node: select$1(),
|
|
1978
|
+
variables: {},
|
|
1979
|
+
}, snapshotRefresh);
|
|
1980
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1981
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1982
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1983
|
+
}
|
|
1984
|
+
}
|
|
1985
|
+
deepFreeze(snapshot.data);
|
|
1986
|
+
return snapshot;
|
|
1987
|
+
}
|
|
1988
|
+
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
1989
|
+
const key = keyBuilder$1(luvio, params);
|
|
1990
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1991
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
1992
|
+
return errorSnapshot;
|
|
1993
|
+
}
|
|
1994
|
+
function createResourceRequest$1(config) {
|
|
1995
|
+
const headers = {};
|
|
1996
|
+
return {
|
|
1997
|
+
baseUri: '/services/data/v66.0',
|
|
1998
|
+
basePath: '/ssot/data-custom-code/' + config.urlParams.customCodeNameOrId + '/executions',
|
|
1999
|
+
method: 'get',
|
|
2000
|
+
body: null,
|
|
2001
|
+
urlParams: config.urlParams,
|
|
2002
|
+
queryParams: config.queryParams,
|
|
2003
|
+
headers,
|
|
2004
|
+
priority: 'normal',
|
|
2005
|
+
};
|
|
2006
|
+
}
|
|
2007
|
+
|
|
2008
|
+
const adapterName$1 = 'getCustomCodeExecutions';
|
|
2009
|
+
const getCustomCodeExecutions_ConfigPropertyMetadata = [
|
|
2010
|
+
generateParamConfigMetadata('customCodeNameOrId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2011
|
+
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
2012
|
+
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
2013
|
+
];
|
|
2014
|
+
const getCustomCodeExecutions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getCustomCodeExecutions_ConfigPropertyMetadata);
|
|
2015
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$8(getCustomCodeExecutions_ConfigPropertyMetadata);
|
|
2016
|
+
function keyBuilder(luvio, config) {
|
|
2017
|
+
const resourceParams = createResourceParams$1(config);
|
|
2018
|
+
return keyBuilder$1(luvio, resourceParams);
|
|
2019
|
+
}
|
|
2020
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
2021
|
+
const config = {};
|
|
2022
|
+
typeCheckConfig$8(untrustedConfig, config, getCustomCodeExecutions_ConfigPropertyMetadata);
|
|
2023
|
+
return config;
|
|
2024
|
+
}
|
|
2025
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
2026
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
2027
|
+
return null;
|
|
2028
|
+
}
|
|
2029
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2030
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
2031
|
+
}
|
|
2032
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
2033
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2034
|
+
return null;
|
|
2035
|
+
}
|
|
2036
|
+
return config;
|
|
2037
|
+
}
|
|
2038
|
+
function adapterFragment(luvio, config) {
|
|
2039
|
+
createResourceParams$1(config);
|
|
2040
|
+
return select$1();
|
|
2041
|
+
}
|
|
2042
|
+
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
2043
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
|
|
2044
|
+
config,
|
|
2045
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
2046
|
+
});
|
|
2047
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2048
|
+
}
|
|
2049
|
+
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
2050
|
+
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
2051
|
+
config,
|
|
2052
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
2053
|
+
});
|
|
2054
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2055
|
+
}
|
|
2056
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
2057
|
+
const resourceParams = createResourceParams$1(config);
|
|
2058
|
+
const request = createResourceRequest$1(resourceParams);
|
|
2059
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
2060
|
+
.then((response) => {
|
|
2061
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
2062
|
+
const cache = new StoreKeyMap();
|
|
2063
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
2064
|
+
return cache;
|
|
2065
|
+
});
|
|
2066
|
+
}, (response) => {
|
|
2067
|
+
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
2068
|
+
});
|
|
2069
|
+
}
|
|
2070
|
+
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
2071
|
+
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
2072
|
+
}
|
|
2073
|
+
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
2074
|
+
const { luvio, config } = context;
|
|
2075
|
+
const selector = {
|
|
2076
|
+
recordId: keyBuilder(luvio, config),
|
|
2077
|
+
node: adapterFragment(luvio, config),
|
|
2078
|
+
variables: {},
|
|
2079
|
+
};
|
|
2080
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
2081
|
+
config,
|
|
2082
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
2083
|
+
});
|
|
2084
|
+
return cacheSnapshot;
|
|
2085
|
+
}
|
|
2086
|
+
const getCustomCodeExecutionsAdapterFactory = (luvio) => function byoc__getCustomCodeExecutions(untrustedConfig, requestContext) {
|
|
2087
|
+
const config = validateAdapterConfig$1(untrustedConfig, getCustomCodeExecutions_ConfigPropertyNames);
|
|
2088
|
+
// Invalid or incomplete config
|
|
2089
|
+
if (config === null) {
|
|
2090
|
+
return null;
|
|
2091
|
+
}
|
|
2092
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2093
|
+
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
2094
|
+
};
|
|
2095
|
+
|
|
2096
|
+
function select(luvio, params) {
|
|
2097
|
+
return select$b();
|
|
2098
|
+
}
|
|
2099
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
2100
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response);
|
|
2101
|
+
}
|
|
2102
|
+
function ingestSuccess(luvio, resourceParams, response) {
|
|
2103
|
+
const { body } = response;
|
|
2104
|
+
const key = keyBuilderFromType(luvio, body);
|
|
2105
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
2106
|
+
const snapshot = luvio.storeLookup({
|
|
2107
|
+
recordId: key,
|
|
2108
|
+
node: select(),
|
|
2109
|
+
variables: {},
|
|
2110
|
+
});
|
|
2111
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2112
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
2113
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
2114
|
+
}
|
|
2115
|
+
}
|
|
2116
|
+
deepFreeze(snapshot.data);
|
|
2117
|
+
return snapshot;
|
|
2118
|
+
}
|
|
2119
|
+
function createResourceRequest(config) {
|
|
2120
|
+
const headers = {};
|
|
2121
|
+
return {
|
|
2122
|
+
baseUri: '/services/data/v66.0',
|
|
2123
|
+
basePath: '/ssot/data-custom-code/' + config.urlParams.customCodeNameOrId + '',
|
|
2124
|
+
method: 'patch',
|
|
2125
|
+
body: config.body,
|
|
2126
|
+
urlParams: config.urlParams,
|
|
2127
|
+
queryParams: {},
|
|
2128
|
+
headers,
|
|
2129
|
+
priority: 'normal',
|
|
2130
|
+
};
|
|
2131
|
+
}
|
|
2132
|
+
|
|
2133
|
+
const adapterName = 'updateCustomCodeDeployment';
|
|
2134
|
+
const updateCustomCodeDeployment_ConfigPropertyMetadata = [
|
|
2135
|
+
generateParamConfigMetadata('customCodeNameOrId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2136
|
+
generateParamConfigMetadata('computeType', false, 2 /* Body */, 0 /* String */),
|
|
2137
|
+
generateParamConfigMetadata('functionInvokeOptions', false, 2 /* Body */, 0 /* String */, true),
|
|
2138
|
+
generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
|
|
2139
|
+
generateParamConfigMetadata('label', false, 2 /* Body */, 0 /* String */),
|
|
2140
|
+
generateParamConfigMetadata('version', false, 2 /* Body */, 0 /* String */),
|
|
2141
|
+
];
|
|
2142
|
+
const updateCustomCodeDeployment_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, updateCustomCodeDeployment_ConfigPropertyMetadata);
|
|
2143
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$8(updateCustomCodeDeployment_ConfigPropertyMetadata);
|
|
2144
|
+
function typeCheckConfig(untrustedConfig) {
|
|
2145
|
+
const config = {};
|
|
2146
|
+
typeCheckConfig$8(untrustedConfig, config, updateCustomCodeDeployment_ConfigPropertyMetadata);
|
|
2147
|
+
return config;
|
|
2148
|
+
}
|
|
2149
|
+
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
2150
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
2151
|
+
return null;
|
|
2152
|
+
}
|
|
2153
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2154
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
2155
|
+
}
|
|
2156
|
+
const config = typeCheckConfig(untrustedConfig);
|
|
2157
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2158
|
+
return null;
|
|
2159
|
+
}
|
|
2160
|
+
return config;
|
|
2161
|
+
}
|
|
2162
|
+
function buildNetworkSnapshot(luvio, config, options) {
|
|
2163
|
+
const resourceParams = createResourceParams(config);
|
|
2164
|
+
const request = createResourceRequest(resourceParams);
|
|
2165
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
2166
|
+
.then((response) => {
|
|
2167
|
+
return luvio.handleSuccessResponse(() => {
|
|
2168
|
+
const snapshot = ingestSuccess(luvio, resourceParams, response);
|
|
2169
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2170
|
+
}, () => {
|
|
2171
|
+
const cache = new StoreKeyMap();
|
|
2172
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
2173
|
+
return cache;
|
|
2174
|
+
});
|
|
2175
|
+
}, (response) => {
|
|
2176
|
+
deepFreeze(response);
|
|
2177
|
+
throw response;
|
|
2178
|
+
});
|
|
2179
|
+
}
|
|
2180
|
+
const updateCustomCodeDeploymentAdapterFactory = (luvio) => {
|
|
2181
|
+
return function updateCustomCodeDeployment(untrustedConfig) {
|
|
2182
|
+
const config = validateAdapterConfig(untrustedConfig, updateCustomCodeDeployment_ConfigPropertyNames);
|
|
2183
|
+
// Invalid or incomplete config
|
|
2184
|
+
if (config === null) {
|
|
2185
|
+
throw new Error('Invalid config for "updateCustomCodeDeployment"');
|
|
2186
|
+
}
|
|
2187
|
+
return buildNetworkSnapshot(luvio, config);
|
|
2188
|
+
};
|
|
2189
|
+
};
|
|
2190
|
+
|
|
2191
|
+
let createCustomCodeDeployment;
|
|
2192
|
+
let deleteCustomCodeDeployment;
|
|
2193
|
+
let getCustomCodeDeployment;
|
|
2194
|
+
let getCustomCodeDeploymentNotifyChange;
|
|
2195
|
+
let getCustomCodeDeployments;
|
|
2196
|
+
let getCustomCodeExecution;
|
|
2197
|
+
let getCustomCodeExecutionLogs;
|
|
2198
|
+
let getCustomCodeExecutions;
|
|
2199
|
+
let updateCustomCodeDeployment;
|
|
2200
|
+
// Imperative GET Adapters
|
|
2201
|
+
let getCustomCodeDeployment_imperative;
|
|
2202
|
+
let getCustomCodeDeployments_imperative;
|
|
2203
|
+
let getCustomCodeExecution_imperative;
|
|
2204
|
+
let getCustomCodeExecutionLogs_imperative;
|
|
2205
|
+
let getCustomCodeExecutions_imperative;
|
|
2206
|
+
const getCustomCodeDeploymentMetadata = { apiFamily: 'byoc', name: 'getCustomCodeDeployment' };
|
|
2207
|
+
const getCustomCodeDeploymentsMetadata = { apiFamily: 'byoc', name: 'getCustomCodeDeployments' };
|
|
2208
|
+
const getCustomCodeExecutionMetadata = { apiFamily: 'byoc', name: 'getCustomCodeExecution' };
|
|
2209
|
+
const getCustomCodeExecutionLogsMetadata = {
|
|
2210
|
+
apiFamily: 'byoc',
|
|
2211
|
+
name: 'getCustomCodeExecutionLogs',
|
|
2212
|
+
};
|
|
2213
|
+
const getCustomCodeExecutionsMetadata = { apiFamily: 'byoc', name: 'getCustomCodeExecutions' };
|
|
2214
|
+
// Notify Update Available
|
|
2215
|
+
function bindExportsTo(luvio) {
|
|
2216
|
+
// LDS Adapters
|
|
2217
|
+
const getCustomCodeDeployment_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getCustomCodeDeployment', getCustomCodeDeploymentAdapterFactory), getCustomCodeDeploymentMetadata);
|
|
2218
|
+
const getCustomCodeDeployments_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getCustomCodeDeployments', getCustomCodeDeploymentsAdapterFactory), getCustomCodeDeploymentsMetadata);
|
|
2219
|
+
const getCustomCodeExecution_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getCustomCodeExecution', getCustomCodeExecutionAdapterFactory), getCustomCodeExecutionMetadata);
|
|
2220
|
+
const getCustomCodeExecutionLogs_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getCustomCodeExecutionLogs', getCustomCodeExecutionLogsAdapterFactory), getCustomCodeExecutionLogsMetadata);
|
|
2221
|
+
const getCustomCodeExecutions_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getCustomCodeExecutions', getCustomCodeExecutionsAdapterFactory), getCustomCodeExecutionsMetadata);
|
|
2222
|
+
function unwrapSnapshotData(factory) {
|
|
2223
|
+
const adapter = factory(luvio);
|
|
2224
|
+
return (config) => adapter(config).then((snapshot) => snapshot.data);
|
|
2225
|
+
}
|
|
2226
|
+
return {
|
|
2227
|
+
createCustomCodeDeployment: unwrapSnapshotData(createCustomCodeDeploymentAdapterFactory),
|
|
2228
|
+
deleteCustomCodeDeployment: createLDSAdapter(luvio, adapterName$6, deleteCustomCodeDeploymentAdapterFactory),
|
|
2229
|
+
getCustomCodeDeployment: createWireAdapterConstructor(luvio, getCustomCodeDeployment_ldsAdapter, getCustomCodeDeploymentMetadata),
|
|
2230
|
+
getCustomCodeDeploymentNotifyChange: createLDSAdapter(luvio, 'getCustomCodeDeploymentNotifyChange', notifyChangeFactory),
|
|
2231
|
+
getCustomCodeDeployments: createWireAdapterConstructor(luvio, getCustomCodeDeployments_ldsAdapter, getCustomCodeDeploymentsMetadata),
|
|
2232
|
+
getCustomCodeExecution: createWireAdapterConstructor(luvio, getCustomCodeExecution_ldsAdapter, getCustomCodeExecutionMetadata),
|
|
2233
|
+
getCustomCodeExecutionLogs: createWireAdapterConstructor(luvio, getCustomCodeExecutionLogs_ldsAdapter, getCustomCodeExecutionLogsMetadata),
|
|
2234
|
+
getCustomCodeExecutions: createWireAdapterConstructor(luvio, getCustomCodeExecutions_ldsAdapter, getCustomCodeExecutionsMetadata),
|
|
2235
|
+
updateCustomCodeDeployment: unwrapSnapshotData(updateCustomCodeDeploymentAdapterFactory),
|
|
2236
|
+
// Imperative GET Adapters
|
|
2237
|
+
getCustomCodeDeployment_imperative: createImperativeAdapter(luvio, getCustomCodeDeployment_ldsAdapter, getCustomCodeDeploymentMetadata),
|
|
2238
|
+
getCustomCodeDeployments_imperative: createImperativeAdapter(luvio, getCustomCodeDeployments_ldsAdapter, getCustomCodeDeploymentsMetadata),
|
|
2239
|
+
getCustomCodeExecution_imperative: createImperativeAdapter(luvio, getCustomCodeExecution_ldsAdapter, getCustomCodeExecutionMetadata),
|
|
2240
|
+
getCustomCodeExecutionLogs_imperative: createImperativeAdapter(luvio, getCustomCodeExecutionLogs_ldsAdapter, getCustomCodeExecutionLogsMetadata),
|
|
2241
|
+
getCustomCodeExecutions_imperative: createImperativeAdapter(luvio, getCustomCodeExecutions_ldsAdapter, getCustomCodeExecutionsMetadata),
|
|
2242
|
+
// Notify Update Availables
|
|
2243
|
+
};
|
|
2244
|
+
}
|
|
2245
|
+
withDefaultLuvio((luvio) => {
|
|
2246
|
+
({
|
|
2247
|
+
createCustomCodeDeployment,
|
|
2248
|
+
deleteCustomCodeDeployment,
|
|
2249
|
+
getCustomCodeDeployment,
|
|
2250
|
+
getCustomCodeDeploymentNotifyChange,
|
|
2251
|
+
getCustomCodeDeployments,
|
|
2252
|
+
getCustomCodeExecution,
|
|
2253
|
+
getCustomCodeExecutionLogs,
|
|
2254
|
+
getCustomCodeExecutions,
|
|
2255
|
+
updateCustomCodeDeployment,
|
|
2256
|
+
getCustomCodeDeployment_imperative,
|
|
2257
|
+
getCustomCodeDeployments_imperative,
|
|
2258
|
+
getCustomCodeExecution_imperative,
|
|
2259
|
+
getCustomCodeExecutionLogs_imperative,
|
|
2260
|
+
getCustomCodeExecutions_imperative,
|
|
2261
|
+
} = bindExportsTo(luvio));
|
|
2262
|
+
});
|
|
2263
|
+
|
|
2264
|
+
export { createCustomCodeDeployment, deleteCustomCodeDeployment, getCustomCodeDeployment, getCustomCodeDeploymentNotifyChange, getCustomCodeDeployment_imperative, getCustomCodeDeployments, getCustomCodeDeployments_imperative, getCustomCodeExecution, getCustomCodeExecutionLogs, getCustomCodeExecutionLogs_imperative, getCustomCodeExecution_imperative, getCustomCodeExecutions, getCustomCodeExecutions_imperative, updateCustomCodeDeployment };
|
|
2265
|
+
// version: 0.1.0-dev1-c978a7b010
|