@salesforce/lds-adapters-platform-external-connectivity 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/platform-external-connectivity.js +3976 -0
- package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +62 -0
- package/dist/es/es2018/types/src/generated/adapters/createConnection.d.ts +20 -0
- package/dist/es/es2018/types/src/generated/adapters/deleteConnection.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/adapters/getConnectionDetails.d.ts +27 -0
- package/dist/es/es2018/types/src/generated/adapters/getConnections.d.ts +27 -0
- package/dist/es/es2018/types/src/generated/adapters/getConnectorDetails.d.ts +27 -0
- package/dist/es/es2018/types/src/generated/adapters/getConnectors.d.ts +26 -0
- package/dist/es/es2018/types/src/generated/adapters/getExternalConnectivityConnectionReferencedFlows.d.ts +27 -0
- package/dist/es/es2018/types/src/generated/adapters/getExternalIdentityProviders.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/adapters/getInvocableActions.d.ts +27 -0
- package/dist/es/es2018/types/src/generated/adapters/refreshMetadata.d.ts +18 -0
- package/dist/es/es2018/types/src/generated/adapters/testConnection.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/adapters/updateConnection.d.ts +21 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +13 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +22 -0
- package/dist/es/es2018/types/src/generated/resources/getExternalConnectivityConnections.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/resources/getExternalConnectivityConnectionsByConnectionDeveloperName.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/resources/getExternalConnectivityConnectionsReferencedFlowsByConnectionDeveloperName.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/resources/getExternalConnectivityConnectors.d.ts +12 -0
- package/dist/es/es2018/types/src/generated/resources/getExternalConnectivityConnectorsByConnectorDeveloperName.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/resources/getExternalConnectivityInvocableActions.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/resources/getExternalConnectivitySpaMappingByConnectorType.d.ts +18 -0
- package/dist/es/es2018/types/src/generated/resources/postExternalConnectivityConnections.d.ts +17 -0
- package/dist/es/es2018/types/src/generated/resources/postExternalConnectivityConnectionsDeleteByConnectionDeveloperName.d.ts +12 -0
- package/dist/es/es2018/types/src/generated/resources/postExternalConnectivityConnectionsRefreshMetadataByConnectionDeveloperName.d.ts +17 -0
- package/dist/es/es2018/types/src/generated/resources/postExternalConnectivityConnectionsTestByConnectionDeveloperName.d.ts +12 -0
- package/dist/es/es2018/types/src/generated/resources/putExternalConnectivityConnectionsByConnectionDeveloperName.d.ts +20 -0
- package/dist/es/es2018/types/src/generated/types/AuthenticationParameterDefinitionRepresentation.d.ts +49 -0
- package/dist/es/es2018/types/src/generated/types/AuthenticationParameterRepresentation.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/types/AuthenticationTypeDefinitionRepresentation.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/types/AuthenticationTypeInputRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/AuthenticationTypeRepresentation.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/types/ConnectorIconMetadataRepresentation.d.ts +34 -0
- package/dist/es/es2018/types/src/generated/types/ExternalConnectivityConnectionCreatedRepresentation.d.ts +38 -0
- package/dist/es/es2018/types/src/generated/types/ExternalConnectivityConnectionDetailsRepresentation.d.ts +69 -0
- package/dist/es/es2018/types/src/generated/types/ExternalConnectivityConnectionEditDeleteResultRepresentation.d.ts +44 -0
- package/dist/es/es2018/types/src/generated/types/ExternalConnectivityConnectionFlowsGroupedByApiNameRepresentation.d.ts +33 -0
- package/dist/es/es2018/types/src/generated/types/ExternalConnectivityConnectionInputRepresentation.d.ts +41 -0
- package/dist/es/es2018/types/src/generated/types/ExternalConnectivityConnectionListRepresentation.d.ts +52 -0
- package/dist/es/es2018/types/src/generated/types/ExternalConnectivityConnectionReferencedFlowsDefinitionRepresentation.d.ts +44 -0
- package/dist/es/es2018/types/src/generated/types/ExternalConnectivityConnectionReferencedFlowsRepresentation.d.ts +33 -0
- package/dist/es/es2018/types/src/generated/types/ExternalConnectivityConnectionRefreshMetadataInputRepresentation.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/types/ExternalConnectivityConnectionRefreshMetadataOutputRepresentation.d.ts +41 -0
- package/dist/es/es2018/types/src/generated/types/ExternalConnectivityConnectionRefreshMetadataTypeProviderRequestParametersRepresentation.d.ts +35 -0
- package/dist/es/es2018/types/src/generated/types/ExternalConnectivityConnectionRepresentation.d.ts +73 -0
- package/dist/es/es2018/types/src/generated/types/ExternalConnectivityConnectionTestResultRepresentation.d.ts +50 -0
- package/dist/es/es2018/types/src/generated/types/ExternalConnectivityConnectorDetailsRepresentation.d.ts +61 -0
- package/dist/es/es2018/types/src/generated/types/ExternalConnectivityConnectorListRepresentation.d.ts +30 -0
- package/dist/es/es2018/types/src/generated/types/ExternalConnectivityConnectorRepresentation.d.ts +57 -0
- package/dist/es/es2018/types/src/generated/types/ExternalConnectivityInvocableActionInfoRepresentation.d.ts +53 -0
- package/dist/es/es2018/types/src/generated/types/ExternalConnectivityInvocableActionListRepresentation.d.ts +39 -0
- package/dist/es/es2018/types/src/generated/types/IcStandardExternalIdentityProviderListRepresentation.d.ts +30 -0
- package/dist/es/es2018/types/src/generated/types/IcStandardExternalIdentityProviderRepresentation.d.ts +38 -0
- package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
- package/package.json +67 -0
- package/sfdc/index.d.ts +1 -0
- package/sfdc/index.js +4107 -0
- package/src/raml/api.raml +724 -0
- package/src/raml/luvio.raml +126 -0
|
@@ -0,0 +1,3976 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2022, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$7, typeCheckConfig as typeCheckConfig$c, StoreKeyMap, createResourceParams as createResourceParams$c } from '@luvio/engine';
|
|
8
|
+
|
|
9
|
+
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
|
+
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
11
|
+
const { isArray: ArrayIsArray$1 } = Array;
|
|
12
|
+
/**
|
|
13
|
+
* Validates an adapter config is well-formed.
|
|
14
|
+
* @param config The config to validate.
|
|
15
|
+
* @param adapter The adapter validation configuration.
|
|
16
|
+
* @param oneOf The keys the config must contain at least one of.
|
|
17
|
+
* @throws A TypeError if config doesn't satisfy the adapter's config validation.
|
|
18
|
+
*/
|
|
19
|
+
function validateConfig(config, adapter, oneOf) {
|
|
20
|
+
const { displayName } = adapter;
|
|
21
|
+
const { required, optional, unsupported } = adapter.parameters;
|
|
22
|
+
if (config === undefined ||
|
|
23
|
+
required.every(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
|
|
24
|
+
throw new TypeError(`adapter ${displayName} configuration must specify ${required.sort().join(', ')}`);
|
|
25
|
+
}
|
|
26
|
+
if (oneOf && oneOf.some(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
|
|
27
|
+
throw new TypeError(`adapter ${displayName} configuration must specify one of ${oneOf.sort().join(', ')}`);
|
|
28
|
+
}
|
|
29
|
+
if (unsupported !== undefined &&
|
|
30
|
+
unsupported.some(req => ObjectPrototypeHasOwnProperty.call(config, req))) {
|
|
31
|
+
throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
|
|
32
|
+
}
|
|
33
|
+
const supported = required.concat(optional);
|
|
34
|
+
if (ObjectKeys$1(config).some(key => !supported.includes(key))) {
|
|
35
|
+
throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function untrustedIsObject(untrusted) {
|
|
39
|
+
return typeof untrusted === 'object' && untrusted !== null && ArrayIsArray$1(untrusted) === false;
|
|
40
|
+
}
|
|
41
|
+
function areRequiredParametersPresent(config, configPropertyNames) {
|
|
42
|
+
return configPropertyNames.parameters.required.every(req => req in config);
|
|
43
|
+
}
|
|
44
|
+
const snapshotRefreshOptions = {
|
|
45
|
+
overrides: {
|
|
46
|
+
headers: {
|
|
47
|
+
'Cache-Control': 'no-cache',
|
|
48
|
+
},
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
function generateParamConfigMetadata(name, required, resourceType, typeCheckShape, isArrayShape = false, coerceFn) {
|
|
52
|
+
return {
|
|
53
|
+
name,
|
|
54
|
+
required,
|
|
55
|
+
resourceType,
|
|
56
|
+
typeCheckShape,
|
|
57
|
+
isArrayShape,
|
|
58
|
+
coerceFn,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function buildAdapterValidationConfig(displayName, paramsMeta) {
|
|
62
|
+
const required = paramsMeta.filter(p => p.required).map(p => p.name);
|
|
63
|
+
const optional = paramsMeta.filter(p => !p.required).map(p => p.name);
|
|
64
|
+
return {
|
|
65
|
+
displayName,
|
|
66
|
+
parameters: {
|
|
67
|
+
required,
|
|
68
|
+
optional,
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
const keyPrefix = 'external-connectivity';
|
|
73
|
+
|
|
74
|
+
const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
|
|
75
|
+
const { isArray: ArrayIsArray } = Array;
|
|
76
|
+
const { stringify: JSONStringify } = JSON;
|
|
77
|
+
function equalsArray(a, b, equalsItem) {
|
|
78
|
+
const aLength = a.length;
|
|
79
|
+
const bLength = b.length;
|
|
80
|
+
if (aLength !== bLength) {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
for (let i = 0; i < aLength; i++) {
|
|
84
|
+
if (equalsItem(a[i], b[i]) === false) {
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
function createLink(ref) {
|
|
91
|
+
return {
|
|
92
|
+
__ref: serializeStructuredKey(ref),
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function validate$n(obj, path = 'ConnectorIconMetadataRepresentation') {
|
|
97
|
+
const v_error = (() => {
|
|
98
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
99
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
100
|
+
}
|
|
101
|
+
const obj_alternateText = obj.alternateText;
|
|
102
|
+
const path_alternateText = path + '.alternateText';
|
|
103
|
+
if (typeof obj_alternateText !== 'string') {
|
|
104
|
+
return new TypeError('Expected "string" but received "' + typeof obj_alternateText + '" (at "' + path_alternateText + '")');
|
|
105
|
+
}
|
|
106
|
+
const obj_name = obj.name;
|
|
107
|
+
const path_name = path + '.name';
|
|
108
|
+
if (typeof obj_name !== 'string') {
|
|
109
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
110
|
+
}
|
|
111
|
+
const obj_resourceUrl = obj.resourceUrl;
|
|
112
|
+
const path_resourceUrl = path + '.resourceUrl';
|
|
113
|
+
if (typeof obj_resourceUrl !== 'string') {
|
|
114
|
+
return new TypeError('Expected "string" but received "' + typeof obj_resourceUrl + '" (at "' + path_resourceUrl + '")');
|
|
115
|
+
}
|
|
116
|
+
})();
|
|
117
|
+
return v_error === undefined ? null : v_error;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
const TTL$c = 500;
|
|
121
|
+
const VERSION$d = "3e461ecbd697039c1881e691a2ee7bef";
|
|
122
|
+
function validate$m(obj, path = 'ExternalConnectivityConnectorRepresentation') {
|
|
123
|
+
const v_error = (() => {
|
|
124
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
125
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
126
|
+
}
|
|
127
|
+
const obj_connectorType = obj.connectorType;
|
|
128
|
+
const path_connectorType = path + '.connectorType';
|
|
129
|
+
if (typeof obj_connectorType !== 'string') {
|
|
130
|
+
return new TypeError('Expected "string" but received "' + typeof obj_connectorType + '" (at "' + path_connectorType + '")');
|
|
131
|
+
}
|
|
132
|
+
const obj_description = obj.description;
|
|
133
|
+
const path_description = path + '.description';
|
|
134
|
+
if (typeof obj_description !== 'string') {
|
|
135
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
136
|
+
}
|
|
137
|
+
const obj_developerName = obj.developerName;
|
|
138
|
+
const path_developerName = path + '.developerName';
|
|
139
|
+
if (typeof obj_developerName !== 'string') {
|
|
140
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
141
|
+
}
|
|
142
|
+
const obj_iconMetadata = obj.iconMetadata;
|
|
143
|
+
const path_iconMetadata = path + '.iconMetadata';
|
|
144
|
+
if (!ArrayIsArray(obj_iconMetadata)) {
|
|
145
|
+
return new TypeError('Expected "array" but received "' + typeof obj_iconMetadata + '" (at "' + path_iconMetadata + '")');
|
|
146
|
+
}
|
|
147
|
+
for (let i = 0; i < obj_iconMetadata.length; i++) {
|
|
148
|
+
const obj_iconMetadata_item = obj_iconMetadata[i];
|
|
149
|
+
const path_iconMetadata_item = path_iconMetadata + '[' + i + ']';
|
|
150
|
+
const referencepath_iconMetadata_itemValidationError = validate$n(obj_iconMetadata_item, path_iconMetadata_item);
|
|
151
|
+
if (referencepath_iconMetadata_itemValidationError !== null) {
|
|
152
|
+
let message = 'Object doesn\'t match ConnectorIconMetadataRepresentation (at "' + path_iconMetadata_item + '")\n';
|
|
153
|
+
message += referencepath_iconMetadata_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
154
|
+
return new TypeError(message);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
const obj_label = obj.label;
|
|
158
|
+
const path_label = path + '.label';
|
|
159
|
+
if (typeof obj_label !== 'string') {
|
|
160
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
161
|
+
}
|
|
162
|
+
const obj_labelVersion = obj.labelVersion;
|
|
163
|
+
const path_labelVersion = path + '.labelVersion';
|
|
164
|
+
if (typeof obj_labelVersion !== 'string') {
|
|
165
|
+
return new TypeError('Expected "string" but received "' + typeof obj_labelVersion + '" (at "' + path_labelVersion + '")');
|
|
166
|
+
}
|
|
167
|
+
const obj_majorVersion = obj.majorVersion;
|
|
168
|
+
const path_majorVersion = path + '.majorVersion';
|
|
169
|
+
if (typeof obj_majorVersion !== 'number' || (typeof obj_majorVersion === 'number' && Math.floor(obj_majorVersion) !== obj_majorVersion)) {
|
|
170
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_majorVersion + '" (at "' + path_majorVersion + '")');
|
|
171
|
+
}
|
|
172
|
+
const obj_releaseStatus = obj.releaseStatus;
|
|
173
|
+
const path_releaseStatus = path + '.releaseStatus';
|
|
174
|
+
if (typeof obj_releaseStatus !== 'string') {
|
|
175
|
+
return new TypeError('Expected "string" but received "' + typeof obj_releaseStatus + '" (at "' + path_releaseStatus + '")');
|
|
176
|
+
}
|
|
177
|
+
const obj_vendor = obj.vendor;
|
|
178
|
+
const path_vendor = path + '.vendor';
|
|
179
|
+
if (typeof obj_vendor !== 'string') {
|
|
180
|
+
return new TypeError('Expected "string" but received "' + typeof obj_vendor + '" (at "' + path_vendor + '")');
|
|
181
|
+
}
|
|
182
|
+
const obj_version = obj.version;
|
|
183
|
+
const path_version = path + '.version';
|
|
184
|
+
if (typeof obj_version !== 'string') {
|
|
185
|
+
return new TypeError('Expected "string" but received "' + typeof obj_version + '" (at "' + path_version + '")');
|
|
186
|
+
}
|
|
187
|
+
})();
|
|
188
|
+
return v_error === undefined ? null : v_error;
|
|
189
|
+
}
|
|
190
|
+
const RepresentationType$d = 'ExternalConnectivityConnectorRepresentation';
|
|
191
|
+
function normalize$d(input, existing, path, luvio, store, timestamp) {
|
|
192
|
+
return input;
|
|
193
|
+
}
|
|
194
|
+
const select$p = function ExternalConnectivityConnectorRepresentationSelect() {
|
|
195
|
+
return {
|
|
196
|
+
kind: 'Fragment',
|
|
197
|
+
version: VERSION$d,
|
|
198
|
+
private: [],
|
|
199
|
+
opaque: true
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
function equals$d(existing, incoming) {
|
|
203
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
204
|
+
return false;
|
|
205
|
+
}
|
|
206
|
+
return true;
|
|
207
|
+
}
|
|
208
|
+
const ingest$d = function ExternalConnectivityConnectorRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
209
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
210
|
+
const validateError = validate$m(input);
|
|
211
|
+
if (validateError !== null) {
|
|
212
|
+
throw validateError;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
const key = path.fullPath;
|
|
216
|
+
const ttlToUse = TTL$c;
|
|
217
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$d, "external-connectivity", VERSION$d, RepresentationType$d, equals$d);
|
|
218
|
+
return createLink(key);
|
|
219
|
+
};
|
|
220
|
+
function getTypeCacheKeys$d(rootKeySet, luvio, input, fullPathFactory) {
|
|
221
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
222
|
+
const rootKey = fullPathFactory();
|
|
223
|
+
rootKeySet.set(rootKey, {
|
|
224
|
+
namespace: keyPrefix,
|
|
225
|
+
representationName: RepresentationType$d,
|
|
226
|
+
mergeable: false
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
const VERSION$c = "f2e2de246b96fc1a5010041fc74f4401";
|
|
231
|
+
function validate$l(obj, path = 'ExternalConnectivityConnectionRepresentation') {
|
|
232
|
+
const v_error = (() => {
|
|
233
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
234
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
235
|
+
}
|
|
236
|
+
if (obj.agentActionEnabled !== undefined) {
|
|
237
|
+
const obj_agentActionEnabled = obj.agentActionEnabled;
|
|
238
|
+
const path_agentActionEnabled = path + '.agentActionEnabled';
|
|
239
|
+
let obj_agentActionEnabled_union0 = null;
|
|
240
|
+
const obj_agentActionEnabled_union0_error = (() => {
|
|
241
|
+
if (typeof obj_agentActionEnabled !== 'boolean') {
|
|
242
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_agentActionEnabled + '" (at "' + path_agentActionEnabled + '")');
|
|
243
|
+
}
|
|
244
|
+
})();
|
|
245
|
+
if (obj_agentActionEnabled_union0_error != null) {
|
|
246
|
+
obj_agentActionEnabled_union0 = obj_agentActionEnabled_union0_error.message;
|
|
247
|
+
}
|
|
248
|
+
let obj_agentActionEnabled_union1 = null;
|
|
249
|
+
const obj_agentActionEnabled_union1_error = (() => {
|
|
250
|
+
if (obj_agentActionEnabled !== null) {
|
|
251
|
+
return new TypeError('Expected "null" but received "' + typeof obj_agentActionEnabled + '" (at "' + path_agentActionEnabled + '")');
|
|
252
|
+
}
|
|
253
|
+
})();
|
|
254
|
+
if (obj_agentActionEnabled_union1_error != null) {
|
|
255
|
+
obj_agentActionEnabled_union1 = obj_agentActionEnabled_union1_error.message;
|
|
256
|
+
}
|
|
257
|
+
if (obj_agentActionEnabled_union0 && obj_agentActionEnabled_union1) {
|
|
258
|
+
let message = 'Object doesn\'t match union (at "' + path_agentActionEnabled + '")';
|
|
259
|
+
message += '\n' + obj_agentActionEnabled_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
260
|
+
message += '\n' + obj_agentActionEnabled_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
261
|
+
return new TypeError(message);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
const obj_createdBy = obj.createdBy;
|
|
265
|
+
const path_createdBy = path + '.createdBy';
|
|
266
|
+
if (typeof obj_createdBy !== 'string') {
|
|
267
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdBy + '" (at "' + path_createdBy + '")');
|
|
268
|
+
}
|
|
269
|
+
const obj_createdById = obj.createdById;
|
|
270
|
+
const path_createdById = path + '.createdById';
|
|
271
|
+
if (typeof obj_createdById !== 'string') {
|
|
272
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdById + '" (at "' + path_createdById + '")');
|
|
273
|
+
}
|
|
274
|
+
const obj_createdDate = obj.createdDate;
|
|
275
|
+
const path_createdDate = path + '.createdDate';
|
|
276
|
+
if (typeof obj_createdDate !== 'string') {
|
|
277
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
278
|
+
}
|
|
279
|
+
const obj_description = obj.description;
|
|
280
|
+
const path_description = path + '.description';
|
|
281
|
+
let obj_description_union0 = null;
|
|
282
|
+
const obj_description_union0_error = (() => {
|
|
283
|
+
if (typeof obj_description !== 'string') {
|
|
284
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
285
|
+
}
|
|
286
|
+
})();
|
|
287
|
+
if (obj_description_union0_error != null) {
|
|
288
|
+
obj_description_union0 = obj_description_union0_error.message;
|
|
289
|
+
}
|
|
290
|
+
let obj_description_union1 = null;
|
|
291
|
+
const obj_description_union1_error = (() => {
|
|
292
|
+
if (obj_description !== null) {
|
|
293
|
+
return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
294
|
+
}
|
|
295
|
+
})();
|
|
296
|
+
if (obj_description_union1_error != null) {
|
|
297
|
+
obj_description_union1 = obj_description_union1_error.message;
|
|
298
|
+
}
|
|
299
|
+
if (obj_description_union0 && obj_description_union1) {
|
|
300
|
+
let message = 'Object doesn\'t match union (at "' + path_description + '")';
|
|
301
|
+
message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
302
|
+
message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
303
|
+
return new TypeError(message);
|
|
304
|
+
}
|
|
305
|
+
const obj_developerName = obj.developerName;
|
|
306
|
+
const path_developerName = path + '.developerName';
|
|
307
|
+
if (typeof obj_developerName !== 'string') {
|
|
308
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
309
|
+
}
|
|
310
|
+
const obj_established = obj.established;
|
|
311
|
+
const path_established = path + '.established';
|
|
312
|
+
if (typeof obj_established !== 'boolean') {
|
|
313
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_established + '" (at "' + path_established + '")');
|
|
314
|
+
}
|
|
315
|
+
const obj_externalConnectorMetadata = obj.externalConnectorMetadata;
|
|
316
|
+
const path_externalConnectorMetadata = path + '.externalConnectorMetadata';
|
|
317
|
+
if (typeof obj_externalConnectorMetadata !== 'object' || Array.isArray(obj_externalConnectorMetadata)) {
|
|
318
|
+
return new TypeError('Expected "object" but received "' + typeof obj_externalConnectorMetadata + '" (at "' + path_externalConnectorMetadata + '")');
|
|
319
|
+
}
|
|
320
|
+
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
321
|
+
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
322
|
+
if (typeof obj_lastModifiedBy !== 'string') {
|
|
323
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedBy + '" (at "' + path_lastModifiedBy + '")');
|
|
324
|
+
}
|
|
325
|
+
const obj_lastModifiedById = obj.lastModifiedById;
|
|
326
|
+
const path_lastModifiedById = path + '.lastModifiedById';
|
|
327
|
+
if (typeof obj_lastModifiedById !== 'string') {
|
|
328
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedById + '" (at "' + path_lastModifiedById + '")');
|
|
329
|
+
}
|
|
330
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
331
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
332
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
333
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
334
|
+
}
|
|
335
|
+
const obj_lastTestedDate = obj.lastTestedDate;
|
|
336
|
+
const path_lastTestedDate = path + '.lastTestedDate';
|
|
337
|
+
let obj_lastTestedDate_union0 = null;
|
|
338
|
+
const obj_lastTestedDate_union0_error = (() => {
|
|
339
|
+
if (typeof obj_lastTestedDate !== 'string') {
|
|
340
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastTestedDate + '" (at "' + path_lastTestedDate + '")');
|
|
341
|
+
}
|
|
342
|
+
})();
|
|
343
|
+
if (obj_lastTestedDate_union0_error != null) {
|
|
344
|
+
obj_lastTestedDate_union0 = obj_lastTestedDate_union0_error.message;
|
|
345
|
+
}
|
|
346
|
+
let obj_lastTestedDate_union1 = null;
|
|
347
|
+
const obj_lastTestedDate_union1_error = (() => {
|
|
348
|
+
if (obj_lastTestedDate !== null) {
|
|
349
|
+
return new TypeError('Expected "null" but received "' + typeof obj_lastTestedDate + '" (at "' + path_lastTestedDate + '")');
|
|
350
|
+
}
|
|
351
|
+
})();
|
|
352
|
+
if (obj_lastTestedDate_union1_error != null) {
|
|
353
|
+
obj_lastTestedDate_union1 = obj_lastTestedDate_union1_error.message;
|
|
354
|
+
}
|
|
355
|
+
if (obj_lastTestedDate_union0 && obj_lastTestedDate_union1) {
|
|
356
|
+
let message = 'Object doesn\'t match union (at "' + path_lastTestedDate + '")';
|
|
357
|
+
message += '\n' + obj_lastTestedDate_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
358
|
+
message += '\n' + obj_lastTestedDate_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
359
|
+
return new TypeError(message);
|
|
360
|
+
}
|
|
361
|
+
const obj_name = obj.name;
|
|
362
|
+
const path_name = path + '.name';
|
|
363
|
+
if (typeof obj_name !== 'string') {
|
|
364
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
365
|
+
}
|
|
366
|
+
})();
|
|
367
|
+
return v_error === undefined ? null : v_error;
|
|
368
|
+
}
|
|
369
|
+
const RepresentationType$c = 'ExternalConnectivityConnectionRepresentation';
|
|
370
|
+
function normalize$c(input, existing, path, luvio, store, timestamp) {
|
|
371
|
+
const input_externalConnectorMetadata = input.externalConnectorMetadata;
|
|
372
|
+
const input_externalConnectorMetadata_id = path.fullPath + '__externalConnectorMetadata';
|
|
373
|
+
input.externalConnectorMetadata = ingest$d(input_externalConnectorMetadata, {
|
|
374
|
+
fullPath: input_externalConnectorMetadata_id,
|
|
375
|
+
propertyName: 'externalConnectorMetadata',
|
|
376
|
+
parent: {
|
|
377
|
+
data: input,
|
|
378
|
+
key: path.fullPath,
|
|
379
|
+
existing: existing,
|
|
380
|
+
},
|
|
381
|
+
ttl: path.ttl
|
|
382
|
+
}, luvio, store, timestamp);
|
|
383
|
+
return input;
|
|
384
|
+
}
|
|
385
|
+
const select$o = function ExternalConnectivityConnectionRepresentationSelect() {
|
|
386
|
+
return {
|
|
387
|
+
kind: 'Fragment',
|
|
388
|
+
version: VERSION$c,
|
|
389
|
+
private: [],
|
|
390
|
+
selections: [
|
|
391
|
+
{
|
|
392
|
+
name: 'agentActionEnabled',
|
|
393
|
+
kind: 'Scalar',
|
|
394
|
+
required: false
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
name: 'createdBy',
|
|
398
|
+
kind: 'Scalar'
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
name: 'createdById',
|
|
402
|
+
kind: 'Scalar'
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
name: 'createdDate',
|
|
406
|
+
kind: 'Scalar'
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
name: 'description',
|
|
410
|
+
kind: 'Scalar'
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
name: 'developerName',
|
|
414
|
+
kind: 'Scalar'
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
name: 'established',
|
|
418
|
+
kind: 'Scalar'
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
name: 'externalConnectorMetadata',
|
|
422
|
+
kind: 'Link',
|
|
423
|
+
fragment: select$p()
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
name: 'lastModifiedBy',
|
|
427
|
+
kind: 'Scalar'
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
name: 'lastModifiedById',
|
|
431
|
+
kind: 'Scalar'
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
name: 'lastModifiedDate',
|
|
435
|
+
kind: 'Scalar'
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
name: 'lastTestedDate',
|
|
439
|
+
kind: 'Scalar'
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
name: 'name',
|
|
443
|
+
kind: 'Scalar'
|
|
444
|
+
}
|
|
445
|
+
]
|
|
446
|
+
};
|
|
447
|
+
};
|
|
448
|
+
function equals$c(existing, incoming) {
|
|
449
|
+
const existing_established = existing.established;
|
|
450
|
+
const incoming_established = incoming.established;
|
|
451
|
+
if (!(existing_established === incoming_established)) {
|
|
452
|
+
return false;
|
|
453
|
+
}
|
|
454
|
+
const existing_createdBy = existing.createdBy;
|
|
455
|
+
const incoming_createdBy = incoming.createdBy;
|
|
456
|
+
if (!(existing_createdBy === incoming_createdBy)) {
|
|
457
|
+
return false;
|
|
458
|
+
}
|
|
459
|
+
const existing_createdById = existing.createdById;
|
|
460
|
+
const incoming_createdById = incoming.createdById;
|
|
461
|
+
if (!(existing_createdById === incoming_createdById)) {
|
|
462
|
+
return false;
|
|
463
|
+
}
|
|
464
|
+
const existing_createdDate = existing.createdDate;
|
|
465
|
+
const incoming_createdDate = incoming.createdDate;
|
|
466
|
+
if (!(existing_createdDate === incoming_createdDate)) {
|
|
467
|
+
return false;
|
|
468
|
+
}
|
|
469
|
+
const existing_developerName = existing.developerName;
|
|
470
|
+
const incoming_developerName = incoming.developerName;
|
|
471
|
+
if (!(existing_developerName === incoming_developerName)) {
|
|
472
|
+
return false;
|
|
473
|
+
}
|
|
474
|
+
const existing_lastModifiedBy = existing.lastModifiedBy;
|
|
475
|
+
const incoming_lastModifiedBy = incoming.lastModifiedBy;
|
|
476
|
+
if (!(existing_lastModifiedBy === incoming_lastModifiedBy)) {
|
|
477
|
+
return false;
|
|
478
|
+
}
|
|
479
|
+
const existing_lastModifiedById = existing.lastModifiedById;
|
|
480
|
+
const incoming_lastModifiedById = incoming.lastModifiedById;
|
|
481
|
+
if (!(existing_lastModifiedById === incoming_lastModifiedById)) {
|
|
482
|
+
return false;
|
|
483
|
+
}
|
|
484
|
+
const existing_lastModifiedDate = existing.lastModifiedDate;
|
|
485
|
+
const incoming_lastModifiedDate = incoming.lastModifiedDate;
|
|
486
|
+
if (!(existing_lastModifiedDate === incoming_lastModifiedDate)) {
|
|
487
|
+
return false;
|
|
488
|
+
}
|
|
489
|
+
const existing_name = existing.name;
|
|
490
|
+
const incoming_name = incoming.name;
|
|
491
|
+
if (!(existing_name === incoming_name)) {
|
|
492
|
+
return false;
|
|
493
|
+
}
|
|
494
|
+
const existing_agentActionEnabled = existing.agentActionEnabled;
|
|
495
|
+
const incoming_agentActionEnabled = incoming.agentActionEnabled;
|
|
496
|
+
// if at least one of these optionals is defined
|
|
497
|
+
if (existing_agentActionEnabled !== undefined || incoming_agentActionEnabled !== undefined) {
|
|
498
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
499
|
+
// not equal
|
|
500
|
+
if (existing_agentActionEnabled === undefined || incoming_agentActionEnabled === undefined) {
|
|
501
|
+
return false;
|
|
502
|
+
}
|
|
503
|
+
if (!(existing_agentActionEnabled === incoming_agentActionEnabled)) {
|
|
504
|
+
return false;
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
const existing_description = existing.description;
|
|
508
|
+
const incoming_description = incoming.description;
|
|
509
|
+
if (!(existing_description === incoming_description)) {
|
|
510
|
+
return false;
|
|
511
|
+
}
|
|
512
|
+
const existing_externalConnectorMetadata = existing.externalConnectorMetadata;
|
|
513
|
+
const incoming_externalConnectorMetadata = incoming.externalConnectorMetadata;
|
|
514
|
+
if (!(existing_externalConnectorMetadata.__ref === incoming_externalConnectorMetadata.__ref)) {
|
|
515
|
+
return false;
|
|
516
|
+
}
|
|
517
|
+
const existing_lastTestedDate = existing.lastTestedDate;
|
|
518
|
+
const incoming_lastTestedDate = incoming.lastTestedDate;
|
|
519
|
+
if (!(existing_lastTestedDate === incoming_lastTestedDate)) {
|
|
520
|
+
return false;
|
|
521
|
+
}
|
|
522
|
+
return true;
|
|
523
|
+
}
|
|
524
|
+
const ingest$c = function ExternalConnectivityConnectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
525
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
526
|
+
const validateError = validate$l(input);
|
|
527
|
+
if (validateError !== null) {
|
|
528
|
+
throw validateError;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
const key = path.fullPath;
|
|
532
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 300000;
|
|
533
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$c, "external-connectivity", VERSION$c, RepresentationType$c, equals$c);
|
|
534
|
+
return createLink(key);
|
|
535
|
+
};
|
|
536
|
+
function getTypeCacheKeys$c(rootKeySet, luvio, input, fullPathFactory) {
|
|
537
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
538
|
+
const rootKey = fullPathFactory();
|
|
539
|
+
rootKeySet.set(rootKey, {
|
|
540
|
+
namespace: keyPrefix,
|
|
541
|
+
representationName: RepresentationType$c,
|
|
542
|
+
mergeable: false
|
|
543
|
+
});
|
|
544
|
+
getTypeCacheKeys$d(rootKeySet, luvio, input.externalConnectorMetadata, () => rootKey + "__" + "externalConnectorMetadata");
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
const TTL$b = 500;
|
|
548
|
+
const VERSION$b = "b5d13b1fd1ba9a2eccd69af50a915654";
|
|
549
|
+
function validate$k(obj, path = 'ExternalConnectivityConnectionListRepresentation') {
|
|
550
|
+
const v_error = (() => {
|
|
551
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
552
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
553
|
+
}
|
|
554
|
+
const obj_connections = obj.connections;
|
|
555
|
+
const path_connections = path + '.connections';
|
|
556
|
+
if (!ArrayIsArray(obj_connections)) {
|
|
557
|
+
return new TypeError('Expected "array" but received "' + typeof obj_connections + '" (at "' + path_connections + '")');
|
|
558
|
+
}
|
|
559
|
+
for (let i = 0; i < obj_connections.length; i++) {
|
|
560
|
+
const obj_connections_item = obj_connections[i];
|
|
561
|
+
const path_connections_item = path_connections + '[' + i + ']';
|
|
562
|
+
if (typeof obj_connections_item !== 'object' || Array.isArray(obj_connections_item)) {
|
|
563
|
+
return new TypeError('Expected "object" but received "' + typeof obj_connections_item + '" (at "' + path_connections_item + '")');
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
const obj_connectorDeveloperName = obj.connectorDeveloperName;
|
|
567
|
+
const path_connectorDeveloperName = path + '.connectorDeveloperName';
|
|
568
|
+
let obj_connectorDeveloperName_union0 = null;
|
|
569
|
+
const obj_connectorDeveloperName_union0_error = (() => {
|
|
570
|
+
if (typeof obj_connectorDeveloperName !== 'string') {
|
|
571
|
+
return new TypeError('Expected "string" but received "' + typeof obj_connectorDeveloperName + '" (at "' + path_connectorDeveloperName + '")');
|
|
572
|
+
}
|
|
573
|
+
})();
|
|
574
|
+
if (obj_connectorDeveloperName_union0_error != null) {
|
|
575
|
+
obj_connectorDeveloperName_union0 = obj_connectorDeveloperName_union0_error.message;
|
|
576
|
+
}
|
|
577
|
+
let obj_connectorDeveloperName_union1 = null;
|
|
578
|
+
const obj_connectorDeveloperName_union1_error = (() => {
|
|
579
|
+
if (obj_connectorDeveloperName !== null) {
|
|
580
|
+
return new TypeError('Expected "null" but received "' + typeof obj_connectorDeveloperName + '" (at "' + path_connectorDeveloperName + '")');
|
|
581
|
+
}
|
|
582
|
+
})();
|
|
583
|
+
if (obj_connectorDeveloperName_union1_error != null) {
|
|
584
|
+
obj_connectorDeveloperName_union1 = obj_connectorDeveloperName_union1_error.message;
|
|
585
|
+
}
|
|
586
|
+
if (obj_connectorDeveloperName_union0 && obj_connectorDeveloperName_union1) {
|
|
587
|
+
let message = 'Object doesn\'t match union (at "' + path_connectorDeveloperName + '")';
|
|
588
|
+
message += '\n' + obj_connectorDeveloperName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
589
|
+
message += '\n' + obj_connectorDeveloperName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
590
|
+
return new TypeError(message);
|
|
591
|
+
}
|
|
592
|
+
})();
|
|
593
|
+
return v_error === undefined ? null : v_error;
|
|
594
|
+
}
|
|
595
|
+
const RepresentationType$b = 'ExternalConnectivityConnectionListRepresentation';
|
|
596
|
+
function keyBuilder$j(luvio, config) {
|
|
597
|
+
return keyPrefix + '::' + RepresentationType$b + ':' + (config.connectorDeveloperName === null ? '' : config.connectorDeveloperName);
|
|
598
|
+
}
|
|
599
|
+
function keyBuilderFromType$5(luvio, object) {
|
|
600
|
+
const keyParams = {
|
|
601
|
+
connectorDeveloperName: object.connectorDeveloperName
|
|
602
|
+
};
|
|
603
|
+
return keyBuilder$j(luvio, keyParams);
|
|
604
|
+
}
|
|
605
|
+
function normalize$b(input, existing, path, luvio, store, timestamp) {
|
|
606
|
+
const input_connections = input.connections;
|
|
607
|
+
const input_connections_id = path.fullPath + '__connections';
|
|
608
|
+
for (let i = 0; i < input_connections.length; i++) {
|
|
609
|
+
const input_connections_item = input_connections[i];
|
|
610
|
+
let input_connections_item_id = input_connections_id + '__' + i;
|
|
611
|
+
input_connections[i] = ingest$c(input_connections_item, {
|
|
612
|
+
fullPath: input_connections_item_id,
|
|
613
|
+
propertyName: i,
|
|
614
|
+
parent: {
|
|
615
|
+
data: input,
|
|
616
|
+
key: path.fullPath,
|
|
617
|
+
existing: existing,
|
|
618
|
+
},
|
|
619
|
+
ttl: path.ttl
|
|
620
|
+
}, luvio, store, timestamp);
|
|
621
|
+
}
|
|
622
|
+
return input;
|
|
623
|
+
}
|
|
624
|
+
const select$n = function ExternalConnectivityConnectionListRepresentationSelect() {
|
|
625
|
+
return {
|
|
626
|
+
kind: 'Fragment',
|
|
627
|
+
version: VERSION$b,
|
|
628
|
+
private: [],
|
|
629
|
+
selections: [
|
|
630
|
+
{
|
|
631
|
+
name: 'connections',
|
|
632
|
+
kind: 'Link',
|
|
633
|
+
plural: true,
|
|
634
|
+
fragment: select$o()
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
name: 'connectorDeveloperName',
|
|
638
|
+
kind: 'Scalar'
|
|
639
|
+
}
|
|
640
|
+
]
|
|
641
|
+
};
|
|
642
|
+
};
|
|
643
|
+
function equals$b(existing, incoming) {
|
|
644
|
+
const existing_connections = existing.connections;
|
|
645
|
+
const incoming_connections = incoming.connections;
|
|
646
|
+
const equals_connections_items = equalsArray(existing_connections, incoming_connections, (existing_connections_item, incoming_connections_item) => {
|
|
647
|
+
if (!(existing_connections_item.__ref === incoming_connections_item.__ref)) {
|
|
648
|
+
return false;
|
|
649
|
+
}
|
|
650
|
+
});
|
|
651
|
+
if (equals_connections_items === false) {
|
|
652
|
+
return false;
|
|
653
|
+
}
|
|
654
|
+
const existing_connectorDeveloperName = existing.connectorDeveloperName;
|
|
655
|
+
const incoming_connectorDeveloperName = incoming.connectorDeveloperName;
|
|
656
|
+
if (!(existing_connectorDeveloperName === incoming_connectorDeveloperName)) {
|
|
657
|
+
return false;
|
|
658
|
+
}
|
|
659
|
+
return true;
|
|
660
|
+
}
|
|
661
|
+
const ingest$b = function ExternalConnectivityConnectionListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
662
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
663
|
+
const validateError = validate$k(input);
|
|
664
|
+
if (validateError !== null) {
|
|
665
|
+
throw validateError;
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
const key = keyBuilderFromType$5(luvio, input);
|
|
669
|
+
const ttlToUse = TTL$b;
|
|
670
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$b, "external-connectivity", VERSION$b, RepresentationType$b, equals$b);
|
|
671
|
+
return createLink(key);
|
|
672
|
+
};
|
|
673
|
+
function getTypeCacheKeys$b(rootKeySet, luvio, input, fullPathFactory) {
|
|
674
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
675
|
+
const rootKey = keyBuilderFromType$5(luvio, input);
|
|
676
|
+
rootKeySet.set(rootKey, {
|
|
677
|
+
namespace: keyPrefix,
|
|
678
|
+
representationName: RepresentationType$b,
|
|
679
|
+
mergeable: false
|
|
680
|
+
});
|
|
681
|
+
const input_connections_length = input.connections.length;
|
|
682
|
+
for (let i = 0; i < input_connections_length; i++) {
|
|
683
|
+
getTypeCacheKeys$c(rootKeySet, luvio, input.connections[i], () => '');
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
const notifyUpdateAvailableFactory = (luvio) => {
|
|
687
|
+
return function notifyConnectionListUpdateAvailable(configs) {
|
|
688
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
689
|
+
const requiredKeyParams = ['connectorDeveloperName'];
|
|
690
|
+
configs.forEach(config => {
|
|
691
|
+
if (false === requiredKeyParams.every(req => req in config)) {
|
|
692
|
+
throw new Error(`one of the configs did not contain all required parameters: ${JSONStringify(ObjectKeys(config))}`);
|
|
693
|
+
}
|
|
694
|
+
});
|
|
695
|
+
}
|
|
696
|
+
const keys = configs.map(c => keyBuilder$j(luvio, c));
|
|
697
|
+
return luvio.notifyStoreUpdateAvailable(keys);
|
|
698
|
+
};
|
|
699
|
+
};
|
|
700
|
+
|
|
701
|
+
function select$m(luvio, params) {
|
|
702
|
+
return select$n();
|
|
703
|
+
}
|
|
704
|
+
function keyBuilder$i(luvio, params) {
|
|
705
|
+
return keyBuilder$j(luvio, {
|
|
706
|
+
connectorDeveloperName: params.queryParams.connectorDeveloperName || ''
|
|
707
|
+
});
|
|
708
|
+
}
|
|
709
|
+
function getResponseCacheKeys$b(storeKeyMap, luvio, resourceParams, response) {
|
|
710
|
+
getTypeCacheKeys$b(storeKeyMap, luvio, response);
|
|
711
|
+
}
|
|
712
|
+
function ingestSuccess$b(luvio, resourceParams, response, snapshotRefresh) {
|
|
713
|
+
const { body } = response;
|
|
714
|
+
const key = keyBuilder$i(luvio, resourceParams);
|
|
715
|
+
luvio.storeIngest(key, ingest$b, body);
|
|
716
|
+
const snapshot = luvio.storeLookup({
|
|
717
|
+
recordId: key,
|
|
718
|
+
node: select$m(),
|
|
719
|
+
variables: {},
|
|
720
|
+
}, snapshotRefresh);
|
|
721
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
722
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
723
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
deepFreeze(snapshot.data);
|
|
727
|
+
return snapshot;
|
|
728
|
+
}
|
|
729
|
+
function ingestError$6(luvio, params, error, snapshotRefresh) {
|
|
730
|
+
const key = keyBuilder$i(luvio, params);
|
|
731
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
732
|
+
const storeMetadataParams = {
|
|
733
|
+
ttl: TTL$b,
|
|
734
|
+
namespace: keyPrefix,
|
|
735
|
+
version: VERSION$b,
|
|
736
|
+
representationName: RepresentationType$b
|
|
737
|
+
};
|
|
738
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
739
|
+
return errorSnapshot;
|
|
740
|
+
}
|
|
741
|
+
function createResourceRequest$b(config) {
|
|
742
|
+
const headers = {};
|
|
743
|
+
return {
|
|
744
|
+
baseUri: '/services/data/v66.0',
|
|
745
|
+
basePath: '/external-connectivity/connections',
|
|
746
|
+
method: 'get',
|
|
747
|
+
body: null,
|
|
748
|
+
urlParams: {},
|
|
749
|
+
queryParams: config.queryParams,
|
|
750
|
+
headers,
|
|
751
|
+
priority: 'normal',
|
|
752
|
+
};
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
const adapterName$b = 'getConnections';
|
|
756
|
+
const getConnections_ConfigPropertyMetadata = [
|
|
757
|
+
generateParamConfigMetadata('connectorDeveloperName', false, 1 /* QueryParameter */, 0 /* String */),
|
|
758
|
+
];
|
|
759
|
+
const getConnections_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$b, getConnections_ConfigPropertyMetadata);
|
|
760
|
+
const createResourceParams$b = /*#__PURE__*/ createResourceParams$c(getConnections_ConfigPropertyMetadata);
|
|
761
|
+
function keyBuilder$h(luvio, config) {
|
|
762
|
+
const resourceParams = createResourceParams$b(config);
|
|
763
|
+
return keyBuilder$i(luvio, resourceParams);
|
|
764
|
+
}
|
|
765
|
+
function typeCheckConfig$b(untrustedConfig) {
|
|
766
|
+
const config = {};
|
|
767
|
+
typeCheckConfig$c(untrustedConfig, config, getConnections_ConfigPropertyMetadata);
|
|
768
|
+
return config;
|
|
769
|
+
}
|
|
770
|
+
function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
|
|
771
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
772
|
+
return null;
|
|
773
|
+
}
|
|
774
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
775
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
776
|
+
}
|
|
777
|
+
const config = typeCheckConfig$b(untrustedConfig);
|
|
778
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
779
|
+
return null;
|
|
780
|
+
}
|
|
781
|
+
return config;
|
|
782
|
+
}
|
|
783
|
+
function adapterFragment$6(luvio, config) {
|
|
784
|
+
createResourceParams$b(config);
|
|
785
|
+
return select$m();
|
|
786
|
+
}
|
|
787
|
+
function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
|
|
788
|
+
const snapshot = ingestSuccess$b(luvio, resourceParams, response, {
|
|
789
|
+
config,
|
|
790
|
+
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
791
|
+
});
|
|
792
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
793
|
+
}
|
|
794
|
+
function onFetchResponseError$6(luvio, config, resourceParams, response) {
|
|
795
|
+
const snapshot = ingestError$6(luvio, resourceParams, response, {
|
|
796
|
+
config,
|
|
797
|
+
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
798
|
+
});
|
|
799
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
800
|
+
}
|
|
801
|
+
function buildNetworkSnapshot$b(luvio, config, options) {
|
|
802
|
+
const resourceParams = createResourceParams$b(config);
|
|
803
|
+
const request = createResourceRequest$b(resourceParams);
|
|
804
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
805
|
+
.then((response) => {
|
|
806
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => {
|
|
807
|
+
const cache = new StoreKeyMap();
|
|
808
|
+
getResponseCacheKeys$b(cache, luvio, resourceParams, response.body);
|
|
809
|
+
return cache;
|
|
810
|
+
});
|
|
811
|
+
}, (response) => {
|
|
812
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$6(luvio, config, resourceParams, response));
|
|
813
|
+
});
|
|
814
|
+
}
|
|
815
|
+
function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext) {
|
|
816
|
+
return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$b, undefined, false);
|
|
817
|
+
}
|
|
818
|
+
function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
|
|
819
|
+
const { luvio, config } = context;
|
|
820
|
+
const selector = {
|
|
821
|
+
recordId: keyBuilder$h(luvio, config),
|
|
822
|
+
node: adapterFragment$6(luvio, config),
|
|
823
|
+
variables: {},
|
|
824
|
+
};
|
|
825
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
826
|
+
config,
|
|
827
|
+
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
828
|
+
});
|
|
829
|
+
return cacheSnapshot;
|
|
830
|
+
}
|
|
831
|
+
const getConnectionsAdapterFactory = (luvio) => function externalConnectivity__getConnections(untrustedConfig, requestContext) {
|
|
832
|
+
const config = validateAdapterConfig$b(untrustedConfig, getConnections_ConfigPropertyNames);
|
|
833
|
+
// Invalid or incomplete config
|
|
834
|
+
if (config === null) {
|
|
835
|
+
return null;
|
|
836
|
+
}
|
|
837
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
838
|
+
buildCachedSnapshotCachePolicy$6, buildNetworkSnapshotCachePolicy$6);
|
|
839
|
+
};
|
|
840
|
+
|
|
841
|
+
function validate$j(obj, path = 'AuthenticationTypeInputRepresentation') {
|
|
842
|
+
const v_error = (() => {
|
|
843
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
844
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
845
|
+
}
|
|
846
|
+
const obj_authenticationParameterInputs = obj.authenticationParameterInputs;
|
|
847
|
+
const path_authenticationParameterInputs = path + '.authenticationParameterInputs';
|
|
848
|
+
if (!ArrayIsArray(obj_authenticationParameterInputs)) {
|
|
849
|
+
return new TypeError('Expected "array" but received "' + typeof obj_authenticationParameterInputs + '" (at "' + path_authenticationParameterInputs + '")');
|
|
850
|
+
}
|
|
851
|
+
for (let i = 0; i < obj_authenticationParameterInputs.length; i++) {
|
|
852
|
+
const obj_authenticationParameterInputs_item = obj_authenticationParameterInputs[i];
|
|
853
|
+
const path_authenticationParameterInputs_item = path_authenticationParameterInputs + '[' + i + ']';
|
|
854
|
+
if (obj_authenticationParameterInputs_item === undefined) {
|
|
855
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_authenticationParameterInputs_item + '" (at "' + path_authenticationParameterInputs_item + '")');
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
const obj_authenticationProtocol = obj.authenticationProtocol;
|
|
859
|
+
const path_authenticationProtocol = path + '.authenticationProtocol';
|
|
860
|
+
if (typeof obj_authenticationProtocol !== 'string') {
|
|
861
|
+
return new TypeError('Expected "string" but received "' + typeof obj_authenticationProtocol + '" (at "' + path_authenticationProtocol + '")');
|
|
862
|
+
}
|
|
863
|
+
})();
|
|
864
|
+
return v_error === undefined ? null : v_error;
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
const TTL$a = 500;
|
|
868
|
+
const VERSION$a = "139e6c6cae3db78f5efabb1639252ac2";
|
|
869
|
+
function validate$i(obj, path = 'ExternalConnectivityConnectionCreatedRepresentation') {
|
|
870
|
+
const v_error = (() => {
|
|
871
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
872
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
873
|
+
}
|
|
874
|
+
const obj_developerName = obj.developerName;
|
|
875
|
+
const path_developerName = path + '.developerName';
|
|
876
|
+
if (typeof obj_developerName !== 'string') {
|
|
877
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
878
|
+
}
|
|
879
|
+
})();
|
|
880
|
+
return v_error === undefined ? null : v_error;
|
|
881
|
+
}
|
|
882
|
+
const RepresentationType$a = 'ExternalConnectivityConnectionCreatedRepresentation';
|
|
883
|
+
function keyBuilder$g(luvio, config) {
|
|
884
|
+
return keyPrefix + '::' + RepresentationType$a + ':' + config.developerName;
|
|
885
|
+
}
|
|
886
|
+
function keyBuilderFromType$4(luvio, object) {
|
|
887
|
+
const keyParams = {
|
|
888
|
+
developerName: object.developerName
|
|
889
|
+
};
|
|
890
|
+
return keyBuilder$g(luvio, keyParams);
|
|
891
|
+
}
|
|
892
|
+
function normalize$a(input, existing, path, luvio, store, timestamp) {
|
|
893
|
+
return input;
|
|
894
|
+
}
|
|
895
|
+
const select$l = function ExternalConnectivityConnectionCreatedRepresentationSelect() {
|
|
896
|
+
return {
|
|
897
|
+
kind: 'Fragment',
|
|
898
|
+
version: VERSION$a,
|
|
899
|
+
private: [],
|
|
900
|
+
selections: [
|
|
901
|
+
{
|
|
902
|
+
name: 'developerName',
|
|
903
|
+
kind: 'Scalar'
|
|
904
|
+
}
|
|
905
|
+
]
|
|
906
|
+
};
|
|
907
|
+
};
|
|
908
|
+
function equals$a(existing, incoming) {
|
|
909
|
+
const existing_developerName = existing.developerName;
|
|
910
|
+
const incoming_developerName = incoming.developerName;
|
|
911
|
+
if (!(existing_developerName === incoming_developerName)) {
|
|
912
|
+
return false;
|
|
913
|
+
}
|
|
914
|
+
return true;
|
|
915
|
+
}
|
|
916
|
+
const ingest$a = function ExternalConnectivityConnectionCreatedRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
917
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
918
|
+
const validateError = validate$i(input);
|
|
919
|
+
if (validateError !== null) {
|
|
920
|
+
throw validateError;
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
const key = keyBuilderFromType$4(luvio, input);
|
|
924
|
+
const ttlToUse = TTL$a;
|
|
925
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$a, "external-connectivity", VERSION$a, RepresentationType$a, equals$a);
|
|
926
|
+
return createLink(key);
|
|
927
|
+
};
|
|
928
|
+
function getTypeCacheKeys$a(rootKeySet, luvio, input, fullPathFactory) {
|
|
929
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
930
|
+
const rootKey = keyBuilderFromType$4(luvio, input);
|
|
931
|
+
rootKeySet.set(rootKey, {
|
|
932
|
+
namespace: keyPrefix,
|
|
933
|
+
representationName: RepresentationType$a,
|
|
934
|
+
mergeable: false
|
|
935
|
+
});
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
function select$k(luvio, params) {
|
|
939
|
+
return select$l();
|
|
940
|
+
}
|
|
941
|
+
function getResponseCacheKeys$a(storeKeyMap, luvio, resourceParams, response) {
|
|
942
|
+
getTypeCacheKeys$a(storeKeyMap, luvio, response);
|
|
943
|
+
}
|
|
944
|
+
function ingestSuccess$a(luvio, resourceParams, response) {
|
|
945
|
+
const { body } = response;
|
|
946
|
+
const key = keyBuilderFromType$4(luvio, body);
|
|
947
|
+
luvio.storeIngest(key, ingest$a, body);
|
|
948
|
+
const snapshot = luvio.storeLookup({
|
|
949
|
+
recordId: key,
|
|
950
|
+
node: select$k(),
|
|
951
|
+
variables: {},
|
|
952
|
+
});
|
|
953
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
954
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
955
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
deepFreeze(snapshot.data);
|
|
959
|
+
return snapshot;
|
|
960
|
+
}
|
|
961
|
+
function createResourceRequest$a(config) {
|
|
962
|
+
const headers = {};
|
|
963
|
+
return {
|
|
964
|
+
baseUri: '/services/data/v66.0',
|
|
965
|
+
basePath: '/external-connectivity/connections',
|
|
966
|
+
method: 'post',
|
|
967
|
+
body: config.body,
|
|
968
|
+
urlParams: {},
|
|
969
|
+
queryParams: {},
|
|
970
|
+
headers,
|
|
971
|
+
priority: 'normal',
|
|
972
|
+
};
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
const adapterName$a = 'createConnection';
|
|
976
|
+
const createConnection_ConfigPropertyMetadata = [
|
|
977
|
+
generateParamConfigMetadata('authenticationTypeInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
978
|
+
generateParamConfigMetadata('agentActionEnabled', false, 2 /* Body */, 4 /* Unsupported */),
|
|
979
|
+
generateParamConfigMetadata('connectorDeveloperName', true, 2 /* Body */, 0 /* String */),
|
|
980
|
+
generateParamConfigMetadata('description', true, 2 /* Body */, 0 /* String */),
|
|
981
|
+
generateParamConfigMetadata('name', true, 2 /* Body */, 0 /* String */),
|
|
982
|
+
];
|
|
983
|
+
const createConnection_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$a, createConnection_ConfigPropertyMetadata);
|
|
984
|
+
const createResourceParams$a = /*#__PURE__*/ createResourceParams$c(createConnection_ConfigPropertyMetadata);
|
|
985
|
+
function typeCheckConfig$a(untrustedConfig) {
|
|
986
|
+
const config = {};
|
|
987
|
+
typeCheckConfig$c(untrustedConfig, config, createConnection_ConfigPropertyMetadata);
|
|
988
|
+
const untrustedConfig_authenticationTypeInput = untrustedConfig.authenticationTypeInput;
|
|
989
|
+
const referenceAuthenticationTypeInputRepresentationValidationError = validate$j(untrustedConfig_authenticationTypeInput);
|
|
990
|
+
if (referenceAuthenticationTypeInputRepresentationValidationError === null) {
|
|
991
|
+
config.authenticationTypeInput = untrustedConfig_authenticationTypeInput;
|
|
992
|
+
}
|
|
993
|
+
const untrustedConfig_agentActionEnabled = untrustedConfig.agentActionEnabled;
|
|
994
|
+
if (typeof untrustedConfig_agentActionEnabled === 'boolean') {
|
|
995
|
+
config.agentActionEnabled = untrustedConfig_agentActionEnabled;
|
|
996
|
+
}
|
|
997
|
+
if (untrustedConfig_agentActionEnabled === null) {
|
|
998
|
+
config.agentActionEnabled = untrustedConfig_agentActionEnabled;
|
|
999
|
+
}
|
|
1000
|
+
return config;
|
|
1001
|
+
}
|
|
1002
|
+
function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
|
|
1003
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1004
|
+
return null;
|
|
1005
|
+
}
|
|
1006
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1007
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1008
|
+
}
|
|
1009
|
+
const config = typeCheckConfig$a(untrustedConfig);
|
|
1010
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1011
|
+
return null;
|
|
1012
|
+
}
|
|
1013
|
+
return config;
|
|
1014
|
+
}
|
|
1015
|
+
function buildNetworkSnapshot$a(luvio, config, options) {
|
|
1016
|
+
const resourceParams = createResourceParams$a(config);
|
|
1017
|
+
const request = createResourceRequest$a(resourceParams);
|
|
1018
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1019
|
+
.then((response) => {
|
|
1020
|
+
return luvio.handleSuccessResponse(() => {
|
|
1021
|
+
const snapshot = ingestSuccess$a(luvio, resourceParams, response);
|
|
1022
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1023
|
+
}, () => {
|
|
1024
|
+
const cache = new StoreKeyMap();
|
|
1025
|
+
getResponseCacheKeys$a(cache, luvio, resourceParams, response.body);
|
|
1026
|
+
return cache;
|
|
1027
|
+
});
|
|
1028
|
+
}, (response) => {
|
|
1029
|
+
deepFreeze(response);
|
|
1030
|
+
throw response;
|
|
1031
|
+
});
|
|
1032
|
+
}
|
|
1033
|
+
const createConnectionAdapterFactory = (luvio) => {
|
|
1034
|
+
return function createConnection(untrustedConfig) {
|
|
1035
|
+
const config = validateAdapterConfig$a(untrustedConfig, createConnection_ConfigPropertyNames);
|
|
1036
|
+
// Invalid or incomplete config
|
|
1037
|
+
if (config === null) {
|
|
1038
|
+
throw new Error('Invalid config for "createConnection"');
|
|
1039
|
+
}
|
|
1040
|
+
return buildNetworkSnapshot$a(luvio, config);
|
|
1041
|
+
};
|
|
1042
|
+
};
|
|
1043
|
+
|
|
1044
|
+
const TTL$9 = 500;
|
|
1045
|
+
const VERSION$9 = "2f8128d7e2e433bc604c71441fa6fc50";
|
|
1046
|
+
function validate$h(obj, path = 'ExternalConnectivityConnectionEditDeleteResultRepresentation') {
|
|
1047
|
+
const v_error = (() => {
|
|
1048
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1049
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1050
|
+
}
|
|
1051
|
+
const obj_developerName = obj.developerName;
|
|
1052
|
+
const path_developerName = path + '.developerName';
|
|
1053
|
+
if (typeof obj_developerName !== 'string') {
|
|
1054
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
1055
|
+
}
|
|
1056
|
+
const obj_errorDescription = obj.errorDescription;
|
|
1057
|
+
const path_errorDescription = path + '.errorDescription';
|
|
1058
|
+
let obj_errorDescription_union0 = null;
|
|
1059
|
+
const obj_errorDescription_union0_error = (() => {
|
|
1060
|
+
if (typeof obj_errorDescription !== 'string') {
|
|
1061
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errorDescription + '" (at "' + path_errorDescription + '")');
|
|
1062
|
+
}
|
|
1063
|
+
})();
|
|
1064
|
+
if (obj_errorDescription_union0_error != null) {
|
|
1065
|
+
obj_errorDescription_union0 = obj_errorDescription_union0_error.message;
|
|
1066
|
+
}
|
|
1067
|
+
let obj_errorDescription_union1 = null;
|
|
1068
|
+
const obj_errorDescription_union1_error = (() => {
|
|
1069
|
+
if (obj_errorDescription !== null) {
|
|
1070
|
+
return new TypeError('Expected "null" but received "' + typeof obj_errorDescription + '" (at "' + path_errorDescription + '")');
|
|
1071
|
+
}
|
|
1072
|
+
})();
|
|
1073
|
+
if (obj_errorDescription_union1_error != null) {
|
|
1074
|
+
obj_errorDescription_union1 = obj_errorDescription_union1_error.message;
|
|
1075
|
+
}
|
|
1076
|
+
if (obj_errorDescription_union0 && obj_errorDescription_union1) {
|
|
1077
|
+
let message = 'Object doesn\'t match union (at "' + path_errorDescription + '")';
|
|
1078
|
+
message += '\n' + obj_errorDescription_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1079
|
+
message += '\n' + obj_errorDescription_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1080
|
+
return new TypeError(message);
|
|
1081
|
+
}
|
|
1082
|
+
const obj_errorMessage = obj.errorMessage;
|
|
1083
|
+
const path_errorMessage = path + '.errorMessage';
|
|
1084
|
+
let obj_errorMessage_union0 = null;
|
|
1085
|
+
const obj_errorMessage_union0_error = (() => {
|
|
1086
|
+
if (typeof obj_errorMessage !== 'string') {
|
|
1087
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
|
|
1088
|
+
}
|
|
1089
|
+
})();
|
|
1090
|
+
if (obj_errorMessage_union0_error != null) {
|
|
1091
|
+
obj_errorMessage_union0 = obj_errorMessage_union0_error.message;
|
|
1092
|
+
}
|
|
1093
|
+
let obj_errorMessage_union1 = null;
|
|
1094
|
+
const obj_errorMessage_union1_error = (() => {
|
|
1095
|
+
if (obj_errorMessage !== null) {
|
|
1096
|
+
return new TypeError('Expected "null" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
|
|
1097
|
+
}
|
|
1098
|
+
})();
|
|
1099
|
+
if (obj_errorMessage_union1_error != null) {
|
|
1100
|
+
obj_errorMessage_union1 = obj_errorMessage_union1_error.message;
|
|
1101
|
+
}
|
|
1102
|
+
if (obj_errorMessage_union0 && obj_errorMessage_union1) {
|
|
1103
|
+
let message = 'Object doesn\'t match union (at "' + path_errorMessage + '")';
|
|
1104
|
+
message += '\n' + obj_errorMessage_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1105
|
+
message += '\n' + obj_errorMessage_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1106
|
+
return new TypeError(message);
|
|
1107
|
+
}
|
|
1108
|
+
})();
|
|
1109
|
+
return v_error === undefined ? null : v_error;
|
|
1110
|
+
}
|
|
1111
|
+
const RepresentationType$9 = 'ExternalConnectivityConnectionEditDeleteResultRepresentation';
|
|
1112
|
+
function keyBuilder$f(luvio, config) {
|
|
1113
|
+
return keyPrefix + '::' + RepresentationType$9 + ':' + config.developerName;
|
|
1114
|
+
}
|
|
1115
|
+
function keyBuilderFromType$3(luvio, object) {
|
|
1116
|
+
const keyParams = {
|
|
1117
|
+
developerName: object.developerName
|
|
1118
|
+
};
|
|
1119
|
+
return keyBuilder$f(luvio, keyParams);
|
|
1120
|
+
}
|
|
1121
|
+
function normalize$9(input, existing, path, luvio, store, timestamp) {
|
|
1122
|
+
return input;
|
|
1123
|
+
}
|
|
1124
|
+
const select$j = function ExternalConnectivityConnectionEditDeleteResultRepresentationSelect() {
|
|
1125
|
+
return {
|
|
1126
|
+
kind: 'Fragment',
|
|
1127
|
+
version: VERSION$9,
|
|
1128
|
+
private: [],
|
|
1129
|
+
selections: [
|
|
1130
|
+
{
|
|
1131
|
+
name: 'developerName',
|
|
1132
|
+
kind: 'Scalar'
|
|
1133
|
+
},
|
|
1134
|
+
{
|
|
1135
|
+
name: 'errorDescription',
|
|
1136
|
+
kind: 'Scalar'
|
|
1137
|
+
},
|
|
1138
|
+
{
|
|
1139
|
+
name: 'errorMessage',
|
|
1140
|
+
kind: 'Scalar'
|
|
1141
|
+
}
|
|
1142
|
+
]
|
|
1143
|
+
};
|
|
1144
|
+
};
|
|
1145
|
+
function equals$9(existing, incoming) {
|
|
1146
|
+
const existing_developerName = existing.developerName;
|
|
1147
|
+
const incoming_developerName = incoming.developerName;
|
|
1148
|
+
if (!(existing_developerName === incoming_developerName)) {
|
|
1149
|
+
return false;
|
|
1150
|
+
}
|
|
1151
|
+
const existing_errorDescription = existing.errorDescription;
|
|
1152
|
+
const incoming_errorDescription = incoming.errorDescription;
|
|
1153
|
+
if (!(existing_errorDescription === incoming_errorDescription)) {
|
|
1154
|
+
return false;
|
|
1155
|
+
}
|
|
1156
|
+
const existing_errorMessage = existing.errorMessage;
|
|
1157
|
+
const incoming_errorMessage = incoming.errorMessage;
|
|
1158
|
+
if (!(existing_errorMessage === incoming_errorMessage)) {
|
|
1159
|
+
return false;
|
|
1160
|
+
}
|
|
1161
|
+
return true;
|
|
1162
|
+
}
|
|
1163
|
+
const ingest$9 = function ExternalConnectivityConnectionEditDeleteResultRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1164
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1165
|
+
const validateError = validate$h(input);
|
|
1166
|
+
if (validateError !== null) {
|
|
1167
|
+
throw validateError;
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
const key = keyBuilderFromType$3(luvio, input);
|
|
1171
|
+
const ttlToUse = TTL$9;
|
|
1172
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$9, "external-connectivity", VERSION$9, RepresentationType$9, equals$9);
|
|
1173
|
+
return createLink(key);
|
|
1174
|
+
};
|
|
1175
|
+
function getTypeCacheKeys$9(rootKeySet, luvio, input, fullPathFactory) {
|
|
1176
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1177
|
+
const rootKey = keyBuilderFromType$3(luvio, input);
|
|
1178
|
+
rootKeySet.set(rootKey, {
|
|
1179
|
+
namespace: keyPrefix,
|
|
1180
|
+
representationName: RepresentationType$9,
|
|
1181
|
+
mergeable: false
|
|
1182
|
+
});
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
function select$i(luvio, params) {
|
|
1186
|
+
return select$j();
|
|
1187
|
+
}
|
|
1188
|
+
function getResponseCacheKeys$9(storeKeyMap, luvio, resourceParams, response) {
|
|
1189
|
+
getTypeCacheKeys$9(storeKeyMap, luvio, response);
|
|
1190
|
+
}
|
|
1191
|
+
function ingestSuccess$9(luvio, resourceParams, response) {
|
|
1192
|
+
const { body } = response;
|
|
1193
|
+
const key = keyBuilderFromType$3(luvio, body);
|
|
1194
|
+
luvio.storeIngest(key, ingest$9, body);
|
|
1195
|
+
const snapshot = luvio.storeLookup({
|
|
1196
|
+
recordId: key,
|
|
1197
|
+
node: select$i(),
|
|
1198
|
+
variables: {},
|
|
1199
|
+
});
|
|
1200
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1201
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1202
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
deepFreeze(snapshot.data);
|
|
1206
|
+
return snapshot;
|
|
1207
|
+
}
|
|
1208
|
+
function createResourceRequest$9(config) {
|
|
1209
|
+
const headers = {};
|
|
1210
|
+
return {
|
|
1211
|
+
baseUri: '/services/data/v66.0',
|
|
1212
|
+
basePath: '/external-connectivity/connections/delete/' + config.urlParams.connectionDeveloperName + '',
|
|
1213
|
+
method: 'post',
|
|
1214
|
+
body: null,
|
|
1215
|
+
urlParams: config.urlParams,
|
|
1216
|
+
queryParams: {},
|
|
1217
|
+
headers,
|
|
1218
|
+
priority: 'normal',
|
|
1219
|
+
};
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
const adapterName$9 = 'deleteConnection';
|
|
1223
|
+
const deleteConnection_ConfigPropertyMetadata = [
|
|
1224
|
+
generateParamConfigMetadata('connectionDeveloperName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1225
|
+
];
|
|
1226
|
+
const deleteConnection_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, deleteConnection_ConfigPropertyMetadata);
|
|
1227
|
+
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$c(deleteConnection_ConfigPropertyMetadata);
|
|
1228
|
+
function typeCheckConfig$9(untrustedConfig) {
|
|
1229
|
+
const config = {};
|
|
1230
|
+
typeCheckConfig$c(untrustedConfig, config, deleteConnection_ConfigPropertyMetadata);
|
|
1231
|
+
return config;
|
|
1232
|
+
}
|
|
1233
|
+
function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
|
|
1234
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1235
|
+
return null;
|
|
1236
|
+
}
|
|
1237
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1238
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1239
|
+
}
|
|
1240
|
+
const config = typeCheckConfig$9(untrustedConfig);
|
|
1241
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1242
|
+
return null;
|
|
1243
|
+
}
|
|
1244
|
+
return config;
|
|
1245
|
+
}
|
|
1246
|
+
function buildNetworkSnapshot$9(luvio, config, options) {
|
|
1247
|
+
const resourceParams = createResourceParams$9(config);
|
|
1248
|
+
const request = createResourceRequest$9(resourceParams);
|
|
1249
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1250
|
+
.then((response) => {
|
|
1251
|
+
return luvio.handleSuccessResponse(() => {
|
|
1252
|
+
const snapshot = ingestSuccess$9(luvio, resourceParams, response);
|
|
1253
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1254
|
+
}, () => {
|
|
1255
|
+
const cache = new StoreKeyMap();
|
|
1256
|
+
getResponseCacheKeys$9(cache, luvio, resourceParams, response.body);
|
|
1257
|
+
return cache;
|
|
1258
|
+
});
|
|
1259
|
+
}, (response) => {
|
|
1260
|
+
deepFreeze(response);
|
|
1261
|
+
throw response;
|
|
1262
|
+
});
|
|
1263
|
+
}
|
|
1264
|
+
const deleteConnectionAdapterFactory = (luvio) => {
|
|
1265
|
+
return function deleteConnection(untrustedConfig) {
|
|
1266
|
+
const config = validateAdapterConfig$9(untrustedConfig, deleteConnection_ConfigPropertyNames);
|
|
1267
|
+
// Invalid or incomplete config
|
|
1268
|
+
if (config === null) {
|
|
1269
|
+
throw new Error('Invalid config for "deleteConnection"');
|
|
1270
|
+
}
|
|
1271
|
+
return buildNetworkSnapshot$9(luvio, config);
|
|
1272
|
+
};
|
|
1273
|
+
};
|
|
1274
|
+
|
|
1275
|
+
function validate$g(obj, path = 'AuthenticationParameterDefinitionRepresentation') {
|
|
1276
|
+
const v_error = (() => {
|
|
1277
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1278
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1279
|
+
}
|
|
1280
|
+
const obj_description = obj.description;
|
|
1281
|
+
const path_description = path + '.description';
|
|
1282
|
+
if (typeof obj_description !== 'string') {
|
|
1283
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
1284
|
+
}
|
|
1285
|
+
const obj_helpText = obj.helpText;
|
|
1286
|
+
const path_helpText = path + '.helpText';
|
|
1287
|
+
let obj_helpText_union0 = null;
|
|
1288
|
+
const obj_helpText_union0_error = (() => {
|
|
1289
|
+
if (typeof obj_helpText !== 'string') {
|
|
1290
|
+
return new TypeError('Expected "string" but received "' + typeof obj_helpText + '" (at "' + path_helpText + '")');
|
|
1291
|
+
}
|
|
1292
|
+
})();
|
|
1293
|
+
if (obj_helpText_union0_error != null) {
|
|
1294
|
+
obj_helpText_union0 = obj_helpText_union0_error.message;
|
|
1295
|
+
}
|
|
1296
|
+
let obj_helpText_union1 = null;
|
|
1297
|
+
const obj_helpText_union1_error = (() => {
|
|
1298
|
+
if (obj_helpText !== null) {
|
|
1299
|
+
return new TypeError('Expected "null" but received "' + typeof obj_helpText + '" (at "' + path_helpText + '")');
|
|
1300
|
+
}
|
|
1301
|
+
})();
|
|
1302
|
+
if (obj_helpText_union1_error != null) {
|
|
1303
|
+
obj_helpText_union1 = obj_helpText_union1_error.message;
|
|
1304
|
+
}
|
|
1305
|
+
if (obj_helpText_union0 && obj_helpText_union1) {
|
|
1306
|
+
let message = 'Object doesn\'t match union (at "' + path_helpText + '")';
|
|
1307
|
+
message += '\n' + obj_helpText_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1308
|
+
message += '\n' + obj_helpText_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1309
|
+
return new TypeError(message);
|
|
1310
|
+
}
|
|
1311
|
+
const obj_label = obj.label;
|
|
1312
|
+
const path_label = path + '.label';
|
|
1313
|
+
if (typeof obj_label !== 'string') {
|
|
1314
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
1315
|
+
}
|
|
1316
|
+
const obj_maxLength = obj.maxLength;
|
|
1317
|
+
const path_maxLength = path + '.maxLength';
|
|
1318
|
+
if (typeof obj_maxLength !== 'number' || (typeof obj_maxLength === 'number' && Math.floor(obj_maxLength) !== obj_maxLength)) {
|
|
1319
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_maxLength + '" (at "' + path_maxLength + '")');
|
|
1320
|
+
}
|
|
1321
|
+
const obj_name = obj.name;
|
|
1322
|
+
const path_name = path + '.name';
|
|
1323
|
+
if (typeof obj_name !== 'string') {
|
|
1324
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1325
|
+
}
|
|
1326
|
+
const obj_required = obj.required;
|
|
1327
|
+
const path_required = path + '.required';
|
|
1328
|
+
if (typeof obj_required !== 'boolean') {
|
|
1329
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_required + '" (at "' + path_required + '")');
|
|
1330
|
+
}
|
|
1331
|
+
const obj_secret = obj.secret;
|
|
1332
|
+
const path_secret = path + '.secret';
|
|
1333
|
+
if (typeof obj_secret !== 'boolean') {
|
|
1334
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_secret + '" (at "' + path_secret + '")');
|
|
1335
|
+
}
|
|
1336
|
+
const obj_valueType = obj.valueType;
|
|
1337
|
+
const path_valueType = path + '.valueType';
|
|
1338
|
+
if (typeof obj_valueType !== 'string') {
|
|
1339
|
+
return new TypeError('Expected "string" but received "' + typeof obj_valueType + '" (at "' + path_valueType + '")');
|
|
1340
|
+
}
|
|
1341
|
+
})();
|
|
1342
|
+
return v_error === undefined ? null : v_error;
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1345
|
+
function validate$f(obj, path = 'AuthenticationParameterRepresentation') {
|
|
1346
|
+
const v_error = (() => {
|
|
1347
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1348
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1349
|
+
}
|
|
1350
|
+
const obj_authenticationParameterDefinition = obj.authenticationParameterDefinition;
|
|
1351
|
+
const path_authenticationParameterDefinition = path + '.authenticationParameterDefinition';
|
|
1352
|
+
const referencepath_authenticationParameterDefinitionValidationError = validate$g(obj_authenticationParameterDefinition, path_authenticationParameterDefinition);
|
|
1353
|
+
if (referencepath_authenticationParameterDefinitionValidationError !== null) {
|
|
1354
|
+
let message = 'Object doesn\'t match AuthenticationParameterDefinitionRepresentation (at "' + path_authenticationParameterDefinition + '")\n';
|
|
1355
|
+
message += referencepath_authenticationParameterDefinitionValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1356
|
+
return new TypeError(message);
|
|
1357
|
+
}
|
|
1358
|
+
const obj_value = obj.value;
|
|
1359
|
+
const path_value = path + '.value';
|
|
1360
|
+
if (typeof obj_value !== 'string') {
|
|
1361
|
+
return new TypeError('Expected "string" but received "' + typeof obj_value + '" (at "' + path_value + '")');
|
|
1362
|
+
}
|
|
1363
|
+
})();
|
|
1364
|
+
return v_error === undefined ? null : v_error;
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
function validate$e(obj, path = 'AuthenticationTypeRepresentation') {
|
|
1368
|
+
const v_error = (() => {
|
|
1369
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1370
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1371
|
+
}
|
|
1372
|
+
const obj_authenticationParameters = obj.authenticationParameters;
|
|
1373
|
+
const path_authenticationParameters = path + '.authenticationParameters';
|
|
1374
|
+
if (!ArrayIsArray(obj_authenticationParameters)) {
|
|
1375
|
+
return new TypeError('Expected "array" but received "' + typeof obj_authenticationParameters + '" (at "' + path_authenticationParameters + '")');
|
|
1376
|
+
}
|
|
1377
|
+
for (let i = 0; i < obj_authenticationParameters.length; i++) {
|
|
1378
|
+
const obj_authenticationParameters_item = obj_authenticationParameters[i];
|
|
1379
|
+
const path_authenticationParameters_item = path_authenticationParameters + '[' + i + ']';
|
|
1380
|
+
const referencepath_authenticationParameters_itemValidationError = validate$f(obj_authenticationParameters_item, path_authenticationParameters_item);
|
|
1381
|
+
if (referencepath_authenticationParameters_itemValidationError !== null) {
|
|
1382
|
+
let message = 'Object doesn\'t match AuthenticationParameterRepresentation (at "' + path_authenticationParameters_item + '")\n';
|
|
1383
|
+
message += referencepath_authenticationParameters_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1384
|
+
return new TypeError(message);
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
const obj_authenticationProtocol = obj.authenticationProtocol;
|
|
1388
|
+
const path_authenticationProtocol = path + '.authenticationProtocol';
|
|
1389
|
+
if (typeof obj_authenticationProtocol !== 'string') {
|
|
1390
|
+
return new TypeError('Expected "string" but received "' + typeof obj_authenticationProtocol + '" (at "' + path_authenticationProtocol + '")');
|
|
1391
|
+
}
|
|
1392
|
+
})();
|
|
1393
|
+
return v_error === undefined ? null : v_error;
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
const TTL$8 = 500;
|
|
1397
|
+
const VERSION$8 = "f4779ee578433586f3d374d1dbf4cf6a";
|
|
1398
|
+
function validate$d(obj, path = 'ExternalConnectivityConnectionDetailsRepresentation') {
|
|
1399
|
+
const v_error = (() => {
|
|
1400
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1401
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1402
|
+
}
|
|
1403
|
+
if (obj.agentActionEnabled !== undefined) {
|
|
1404
|
+
const obj_agentActionEnabled = obj.agentActionEnabled;
|
|
1405
|
+
const path_agentActionEnabled = path + '.agentActionEnabled';
|
|
1406
|
+
let obj_agentActionEnabled_union0 = null;
|
|
1407
|
+
const obj_agentActionEnabled_union0_error = (() => {
|
|
1408
|
+
if (typeof obj_agentActionEnabled !== 'boolean') {
|
|
1409
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_agentActionEnabled + '" (at "' + path_agentActionEnabled + '")');
|
|
1410
|
+
}
|
|
1411
|
+
})();
|
|
1412
|
+
if (obj_agentActionEnabled_union0_error != null) {
|
|
1413
|
+
obj_agentActionEnabled_union0 = obj_agentActionEnabled_union0_error.message;
|
|
1414
|
+
}
|
|
1415
|
+
let obj_agentActionEnabled_union1 = null;
|
|
1416
|
+
const obj_agentActionEnabled_union1_error = (() => {
|
|
1417
|
+
if (obj_agentActionEnabled !== null) {
|
|
1418
|
+
return new TypeError('Expected "null" but received "' + typeof obj_agentActionEnabled + '" (at "' + path_agentActionEnabled + '")');
|
|
1419
|
+
}
|
|
1420
|
+
})();
|
|
1421
|
+
if (obj_agentActionEnabled_union1_error != null) {
|
|
1422
|
+
obj_agentActionEnabled_union1 = obj_agentActionEnabled_union1_error.message;
|
|
1423
|
+
}
|
|
1424
|
+
if (obj_agentActionEnabled_union0 && obj_agentActionEnabled_union1) {
|
|
1425
|
+
let message = 'Object doesn\'t match union (at "' + path_agentActionEnabled + '")';
|
|
1426
|
+
message += '\n' + obj_agentActionEnabled_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1427
|
+
message += '\n' + obj_agentActionEnabled_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1428
|
+
return new TypeError(message);
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
const obj_authenticationType = obj.authenticationType;
|
|
1432
|
+
const path_authenticationType = path + '.authenticationType';
|
|
1433
|
+
const referencepath_authenticationTypeValidationError = validate$e(obj_authenticationType, path_authenticationType);
|
|
1434
|
+
if (referencepath_authenticationTypeValidationError !== null) {
|
|
1435
|
+
let message = 'Object doesn\'t match AuthenticationTypeRepresentation (at "' + path_authenticationType + '")\n';
|
|
1436
|
+
message += referencepath_authenticationTypeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1437
|
+
return new TypeError(message);
|
|
1438
|
+
}
|
|
1439
|
+
const obj_createdBy = obj.createdBy;
|
|
1440
|
+
const path_createdBy = path + '.createdBy';
|
|
1441
|
+
if (typeof obj_createdBy !== 'string') {
|
|
1442
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdBy + '" (at "' + path_createdBy + '")');
|
|
1443
|
+
}
|
|
1444
|
+
const obj_createdById = obj.createdById;
|
|
1445
|
+
const path_createdById = path + '.createdById';
|
|
1446
|
+
if (typeof obj_createdById !== 'string') {
|
|
1447
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdById + '" (at "' + path_createdById + '")');
|
|
1448
|
+
}
|
|
1449
|
+
const obj_createdDate = obj.createdDate;
|
|
1450
|
+
const path_createdDate = path + '.createdDate';
|
|
1451
|
+
if (typeof obj_createdDate !== 'string') {
|
|
1452
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
1453
|
+
}
|
|
1454
|
+
const obj_description = obj.description;
|
|
1455
|
+
const path_description = path + '.description';
|
|
1456
|
+
let obj_description_union0 = null;
|
|
1457
|
+
const obj_description_union0_error = (() => {
|
|
1458
|
+
if (typeof obj_description !== 'string') {
|
|
1459
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
1460
|
+
}
|
|
1461
|
+
})();
|
|
1462
|
+
if (obj_description_union0_error != null) {
|
|
1463
|
+
obj_description_union0 = obj_description_union0_error.message;
|
|
1464
|
+
}
|
|
1465
|
+
let obj_description_union1 = null;
|
|
1466
|
+
const obj_description_union1_error = (() => {
|
|
1467
|
+
if (obj_description !== null) {
|
|
1468
|
+
return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
1469
|
+
}
|
|
1470
|
+
})();
|
|
1471
|
+
if (obj_description_union1_error != null) {
|
|
1472
|
+
obj_description_union1 = obj_description_union1_error.message;
|
|
1473
|
+
}
|
|
1474
|
+
if (obj_description_union0 && obj_description_union1) {
|
|
1475
|
+
let message = 'Object doesn\'t match union (at "' + path_description + '")';
|
|
1476
|
+
message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1477
|
+
message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1478
|
+
return new TypeError(message);
|
|
1479
|
+
}
|
|
1480
|
+
const obj_developerName = obj.developerName;
|
|
1481
|
+
const path_developerName = path + '.developerName';
|
|
1482
|
+
if (typeof obj_developerName !== 'string') {
|
|
1483
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
1484
|
+
}
|
|
1485
|
+
const obj_established = obj.established;
|
|
1486
|
+
const path_established = path + '.established';
|
|
1487
|
+
if (typeof obj_established !== 'boolean') {
|
|
1488
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_established + '" (at "' + path_established + '")');
|
|
1489
|
+
}
|
|
1490
|
+
const obj_externalConnectorMetadata = obj.externalConnectorMetadata;
|
|
1491
|
+
const path_externalConnectorMetadata = path + '.externalConnectorMetadata';
|
|
1492
|
+
const referencepath_externalConnectorMetadataValidationError = validate$m(obj_externalConnectorMetadata, path_externalConnectorMetadata);
|
|
1493
|
+
if (referencepath_externalConnectorMetadataValidationError !== null) {
|
|
1494
|
+
let message = 'Object doesn\'t match ExternalConnectivityConnectorRepresentation (at "' + path_externalConnectorMetadata + '")\n';
|
|
1495
|
+
message += referencepath_externalConnectorMetadataValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1496
|
+
return new TypeError(message);
|
|
1497
|
+
}
|
|
1498
|
+
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
1499
|
+
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
1500
|
+
if (typeof obj_lastModifiedBy !== 'string') {
|
|
1501
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedBy + '" (at "' + path_lastModifiedBy + '")');
|
|
1502
|
+
}
|
|
1503
|
+
const obj_lastModifiedById = obj.lastModifiedById;
|
|
1504
|
+
const path_lastModifiedById = path + '.lastModifiedById';
|
|
1505
|
+
if (typeof obj_lastModifiedById !== 'string') {
|
|
1506
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedById + '" (at "' + path_lastModifiedById + '")');
|
|
1507
|
+
}
|
|
1508
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
1509
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
1510
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
1511
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
1512
|
+
}
|
|
1513
|
+
const obj_lastTestedDate = obj.lastTestedDate;
|
|
1514
|
+
const path_lastTestedDate = path + '.lastTestedDate';
|
|
1515
|
+
let obj_lastTestedDate_union0 = null;
|
|
1516
|
+
const obj_lastTestedDate_union0_error = (() => {
|
|
1517
|
+
if (typeof obj_lastTestedDate !== 'string') {
|
|
1518
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastTestedDate + '" (at "' + path_lastTestedDate + '")');
|
|
1519
|
+
}
|
|
1520
|
+
})();
|
|
1521
|
+
if (obj_lastTestedDate_union0_error != null) {
|
|
1522
|
+
obj_lastTestedDate_union0 = obj_lastTestedDate_union0_error.message;
|
|
1523
|
+
}
|
|
1524
|
+
let obj_lastTestedDate_union1 = null;
|
|
1525
|
+
const obj_lastTestedDate_union1_error = (() => {
|
|
1526
|
+
if (obj_lastTestedDate !== null) {
|
|
1527
|
+
return new TypeError('Expected "null" but received "' + typeof obj_lastTestedDate + '" (at "' + path_lastTestedDate + '")');
|
|
1528
|
+
}
|
|
1529
|
+
})();
|
|
1530
|
+
if (obj_lastTestedDate_union1_error != null) {
|
|
1531
|
+
obj_lastTestedDate_union1 = obj_lastTestedDate_union1_error.message;
|
|
1532
|
+
}
|
|
1533
|
+
if (obj_lastTestedDate_union0 && obj_lastTestedDate_union1) {
|
|
1534
|
+
let message = 'Object doesn\'t match union (at "' + path_lastTestedDate + '")';
|
|
1535
|
+
message += '\n' + obj_lastTestedDate_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1536
|
+
message += '\n' + obj_lastTestedDate_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1537
|
+
return new TypeError(message);
|
|
1538
|
+
}
|
|
1539
|
+
const obj_name = obj.name;
|
|
1540
|
+
const path_name = path + '.name';
|
|
1541
|
+
if (typeof obj_name !== 'string') {
|
|
1542
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1543
|
+
}
|
|
1544
|
+
})();
|
|
1545
|
+
return v_error === undefined ? null : v_error;
|
|
1546
|
+
}
|
|
1547
|
+
const RepresentationType$8 = 'ExternalConnectivityConnectionDetailsRepresentation';
|
|
1548
|
+
function normalize$8(input, existing, path, luvio, store, timestamp) {
|
|
1549
|
+
return input;
|
|
1550
|
+
}
|
|
1551
|
+
const select$h = function ExternalConnectivityConnectionDetailsRepresentationSelect() {
|
|
1552
|
+
return {
|
|
1553
|
+
kind: 'Fragment',
|
|
1554
|
+
version: VERSION$8,
|
|
1555
|
+
private: [],
|
|
1556
|
+
opaque: true
|
|
1557
|
+
};
|
|
1558
|
+
};
|
|
1559
|
+
function equals$8(existing, incoming) {
|
|
1560
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1561
|
+
return false;
|
|
1562
|
+
}
|
|
1563
|
+
return true;
|
|
1564
|
+
}
|
|
1565
|
+
const ingest$8 = function ExternalConnectivityConnectionDetailsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1566
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1567
|
+
const validateError = validate$d(input);
|
|
1568
|
+
if (validateError !== null) {
|
|
1569
|
+
throw validateError;
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
const key = path.fullPath;
|
|
1573
|
+
const ttlToUse = TTL$8;
|
|
1574
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$8, "external-connectivity", VERSION$8, RepresentationType$8, equals$8);
|
|
1575
|
+
return createLink(key);
|
|
1576
|
+
};
|
|
1577
|
+
function getTypeCacheKeys$8(rootKeySet, luvio, input, fullPathFactory) {
|
|
1578
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1579
|
+
const rootKey = fullPathFactory();
|
|
1580
|
+
rootKeySet.set(rootKey, {
|
|
1581
|
+
namespace: keyPrefix,
|
|
1582
|
+
representationName: RepresentationType$8,
|
|
1583
|
+
mergeable: false
|
|
1584
|
+
});
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
function select$g(luvio, params) {
|
|
1588
|
+
return select$h();
|
|
1589
|
+
}
|
|
1590
|
+
function keyBuilder$e(luvio, params) {
|
|
1591
|
+
return keyPrefix + '::ExternalConnectivityConnectionDetailsRepresentation:(' + 'connectionDeveloperName:' + params.urlParams.connectionDeveloperName + ')';
|
|
1592
|
+
}
|
|
1593
|
+
function getResponseCacheKeys$8(storeKeyMap, luvio, resourceParams, response) {
|
|
1594
|
+
getTypeCacheKeys$8(storeKeyMap, luvio, response, () => keyBuilder$e(luvio, resourceParams));
|
|
1595
|
+
}
|
|
1596
|
+
function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
|
|
1597
|
+
const { body } = response;
|
|
1598
|
+
const key = keyBuilder$e(luvio, resourceParams);
|
|
1599
|
+
luvio.storeIngest(key, ingest$8, body);
|
|
1600
|
+
const snapshot = luvio.storeLookup({
|
|
1601
|
+
recordId: key,
|
|
1602
|
+
node: select$g(),
|
|
1603
|
+
variables: {},
|
|
1604
|
+
}, snapshotRefresh);
|
|
1605
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1606
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1607
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1608
|
+
}
|
|
1609
|
+
}
|
|
1610
|
+
deepFreeze(snapshot.data);
|
|
1611
|
+
return snapshot;
|
|
1612
|
+
}
|
|
1613
|
+
function ingestError$5(luvio, params, error, snapshotRefresh) {
|
|
1614
|
+
const key = keyBuilder$e(luvio, params);
|
|
1615
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1616
|
+
const storeMetadataParams = {
|
|
1617
|
+
ttl: TTL$8,
|
|
1618
|
+
namespace: keyPrefix,
|
|
1619
|
+
version: VERSION$8,
|
|
1620
|
+
representationName: RepresentationType$8
|
|
1621
|
+
};
|
|
1622
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1623
|
+
return errorSnapshot;
|
|
1624
|
+
}
|
|
1625
|
+
function createResourceRequest$8(config) {
|
|
1626
|
+
const headers = {};
|
|
1627
|
+
return {
|
|
1628
|
+
baseUri: '/services/data/v66.0',
|
|
1629
|
+
basePath: '/external-connectivity/connections/' + config.urlParams.connectionDeveloperName + '',
|
|
1630
|
+
method: 'get',
|
|
1631
|
+
body: null,
|
|
1632
|
+
urlParams: config.urlParams,
|
|
1633
|
+
queryParams: {},
|
|
1634
|
+
headers,
|
|
1635
|
+
priority: 'normal',
|
|
1636
|
+
};
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
const adapterName$8 = 'getConnectionDetails';
|
|
1640
|
+
const getConnectionDetails_ConfigPropertyMetadata = [
|
|
1641
|
+
generateParamConfigMetadata('connectionDeveloperName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1642
|
+
];
|
|
1643
|
+
const getConnectionDetails_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, getConnectionDetails_ConfigPropertyMetadata);
|
|
1644
|
+
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$c(getConnectionDetails_ConfigPropertyMetadata);
|
|
1645
|
+
function keyBuilder$d(luvio, config) {
|
|
1646
|
+
const resourceParams = createResourceParams$8(config);
|
|
1647
|
+
return keyBuilder$e(luvio, resourceParams);
|
|
1648
|
+
}
|
|
1649
|
+
function typeCheckConfig$8(untrustedConfig) {
|
|
1650
|
+
const config = {};
|
|
1651
|
+
typeCheckConfig$c(untrustedConfig, config, getConnectionDetails_ConfigPropertyMetadata);
|
|
1652
|
+
return config;
|
|
1653
|
+
}
|
|
1654
|
+
function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
|
|
1655
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1656
|
+
return null;
|
|
1657
|
+
}
|
|
1658
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1659
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1660
|
+
}
|
|
1661
|
+
const config = typeCheckConfig$8(untrustedConfig);
|
|
1662
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1663
|
+
return null;
|
|
1664
|
+
}
|
|
1665
|
+
return config;
|
|
1666
|
+
}
|
|
1667
|
+
function adapterFragment$5(luvio, config) {
|
|
1668
|
+
createResourceParams$8(config);
|
|
1669
|
+
return select$g();
|
|
1670
|
+
}
|
|
1671
|
+
function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
|
|
1672
|
+
const snapshot = ingestSuccess$8(luvio, resourceParams, response, {
|
|
1673
|
+
config,
|
|
1674
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
1675
|
+
});
|
|
1676
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1677
|
+
}
|
|
1678
|
+
function onFetchResponseError$5(luvio, config, resourceParams, response) {
|
|
1679
|
+
const snapshot = ingestError$5(luvio, resourceParams, response, {
|
|
1680
|
+
config,
|
|
1681
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
1682
|
+
});
|
|
1683
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1684
|
+
}
|
|
1685
|
+
function buildNetworkSnapshot$8(luvio, config, options) {
|
|
1686
|
+
const resourceParams = createResourceParams$8(config);
|
|
1687
|
+
const request = createResourceRequest$8(resourceParams);
|
|
1688
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1689
|
+
.then((response) => {
|
|
1690
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => {
|
|
1691
|
+
const cache = new StoreKeyMap();
|
|
1692
|
+
getResponseCacheKeys$8(cache, luvio, resourceParams, response.body);
|
|
1693
|
+
return cache;
|
|
1694
|
+
});
|
|
1695
|
+
}, (response) => {
|
|
1696
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$5(luvio, config, resourceParams, response));
|
|
1697
|
+
});
|
|
1698
|
+
}
|
|
1699
|
+
function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
|
|
1700
|
+
return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$8, undefined, false);
|
|
1701
|
+
}
|
|
1702
|
+
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
1703
|
+
const { luvio, config } = context;
|
|
1704
|
+
const selector = {
|
|
1705
|
+
recordId: keyBuilder$d(luvio, config),
|
|
1706
|
+
node: adapterFragment$5(luvio, config),
|
|
1707
|
+
variables: {},
|
|
1708
|
+
};
|
|
1709
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1710
|
+
config,
|
|
1711
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
1712
|
+
});
|
|
1713
|
+
return cacheSnapshot;
|
|
1714
|
+
}
|
|
1715
|
+
const getConnectionDetailsAdapterFactory = (luvio) => function externalConnectivity__getConnectionDetails(untrustedConfig, requestContext) {
|
|
1716
|
+
const config = validateAdapterConfig$8(untrustedConfig, getConnectionDetails_ConfigPropertyNames);
|
|
1717
|
+
// Invalid or incomplete config
|
|
1718
|
+
if (config === null) {
|
|
1719
|
+
return null;
|
|
1720
|
+
}
|
|
1721
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1722
|
+
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
|
|
1723
|
+
};
|
|
1724
|
+
|
|
1725
|
+
function select$f(luvio, params) {
|
|
1726
|
+
return select$j();
|
|
1727
|
+
}
|
|
1728
|
+
function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
|
|
1729
|
+
getTypeCacheKeys$9(storeKeyMap, luvio, response);
|
|
1730
|
+
}
|
|
1731
|
+
function ingestSuccess$7(luvio, resourceParams, response) {
|
|
1732
|
+
const { body } = response;
|
|
1733
|
+
const key = keyBuilderFromType$3(luvio, body);
|
|
1734
|
+
luvio.storeIngest(key, ingest$9, body);
|
|
1735
|
+
const snapshot = luvio.storeLookup({
|
|
1736
|
+
recordId: key,
|
|
1737
|
+
node: select$f(),
|
|
1738
|
+
variables: {},
|
|
1739
|
+
});
|
|
1740
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1741
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1742
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1743
|
+
}
|
|
1744
|
+
}
|
|
1745
|
+
deepFreeze(snapshot.data);
|
|
1746
|
+
return snapshot;
|
|
1747
|
+
}
|
|
1748
|
+
function createResourceRequest$7(config) {
|
|
1749
|
+
const headers = {};
|
|
1750
|
+
return {
|
|
1751
|
+
baseUri: '/services/data/v66.0',
|
|
1752
|
+
basePath: '/external-connectivity/connections/' + config.urlParams.connectionDeveloperName + '',
|
|
1753
|
+
method: 'put',
|
|
1754
|
+
body: config.body,
|
|
1755
|
+
urlParams: config.urlParams,
|
|
1756
|
+
queryParams: {},
|
|
1757
|
+
headers,
|
|
1758
|
+
priority: 'normal',
|
|
1759
|
+
};
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
const adapterName$7 = 'updateConnection';
|
|
1763
|
+
const updateConnection_ConfigPropertyMetadata = [
|
|
1764
|
+
generateParamConfigMetadata('connectionDeveloperName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1765
|
+
generateParamConfigMetadata('authenticationTypeInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1766
|
+
generateParamConfigMetadata('agentActionEnabled', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1767
|
+
generateParamConfigMetadata('connectorDeveloperName', true, 2 /* Body */, 0 /* String */),
|
|
1768
|
+
generateParamConfigMetadata('description', true, 2 /* Body */, 0 /* String */),
|
|
1769
|
+
generateParamConfigMetadata('name', true, 2 /* Body */, 0 /* String */),
|
|
1770
|
+
];
|
|
1771
|
+
const updateConnection_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, updateConnection_ConfigPropertyMetadata);
|
|
1772
|
+
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$c(updateConnection_ConfigPropertyMetadata);
|
|
1773
|
+
function typeCheckConfig$7(untrustedConfig) {
|
|
1774
|
+
const config = {};
|
|
1775
|
+
typeCheckConfig$c(untrustedConfig, config, updateConnection_ConfigPropertyMetadata);
|
|
1776
|
+
const untrustedConfig_authenticationTypeInput = untrustedConfig.authenticationTypeInput;
|
|
1777
|
+
const referenceAuthenticationTypeInputRepresentationValidationError = validate$j(untrustedConfig_authenticationTypeInput);
|
|
1778
|
+
if (referenceAuthenticationTypeInputRepresentationValidationError === null) {
|
|
1779
|
+
config.authenticationTypeInput = untrustedConfig_authenticationTypeInput;
|
|
1780
|
+
}
|
|
1781
|
+
const untrustedConfig_agentActionEnabled = untrustedConfig.agentActionEnabled;
|
|
1782
|
+
if (typeof untrustedConfig_agentActionEnabled === 'boolean') {
|
|
1783
|
+
config.agentActionEnabled = untrustedConfig_agentActionEnabled;
|
|
1784
|
+
}
|
|
1785
|
+
if (untrustedConfig_agentActionEnabled === null) {
|
|
1786
|
+
config.agentActionEnabled = untrustedConfig_agentActionEnabled;
|
|
1787
|
+
}
|
|
1788
|
+
return config;
|
|
1789
|
+
}
|
|
1790
|
+
function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
|
|
1791
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1792
|
+
return null;
|
|
1793
|
+
}
|
|
1794
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1795
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1796
|
+
}
|
|
1797
|
+
const config = typeCheckConfig$7(untrustedConfig);
|
|
1798
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1799
|
+
return null;
|
|
1800
|
+
}
|
|
1801
|
+
return config;
|
|
1802
|
+
}
|
|
1803
|
+
function buildNetworkSnapshot$7(luvio, config, options) {
|
|
1804
|
+
const resourceParams = createResourceParams$7(config);
|
|
1805
|
+
const request = createResourceRequest$7(resourceParams);
|
|
1806
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1807
|
+
.then((response) => {
|
|
1808
|
+
return luvio.handleSuccessResponse(() => {
|
|
1809
|
+
const snapshot = ingestSuccess$7(luvio, resourceParams, response);
|
|
1810
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1811
|
+
}, () => {
|
|
1812
|
+
const cache = new StoreKeyMap();
|
|
1813
|
+
getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
|
|
1814
|
+
return cache;
|
|
1815
|
+
});
|
|
1816
|
+
}, (response) => {
|
|
1817
|
+
deepFreeze(response);
|
|
1818
|
+
throw response;
|
|
1819
|
+
});
|
|
1820
|
+
}
|
|
1821
|
+
const updateConnectionAdapterFactory = (luvio) => {
|
|
1822
|
+
return function updateConnection(untrustedConfig) {
|
|
1823
|
+
const config = validateAdapterConfig$7(untrustedConfig, updateConnection_ConfigPropertyNames);
|
|
1824
|
+
// Invalid or incomplete config
|
|
1825
|
+
if (config === null) {
|
|
1826
|
+
throw new Error('Invalid config for "updateConnection"');
|
|
1827
|
+
}
|
|
1828
|
+
return buildNetworkSnapshot$7(luvio, config);
|
|
1829
|
+
};
|
|
1830
|
+
};
|
|
1831
|
+
|
|
1832
|
+
function validate$c(obj, path = 'ExternalConnectivityConnectionReferencedFlowsDefinitionRepresentation') {
|
|
1833
|
+
const v_error = (() => {
|
|
1834
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1835
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1836
|
+
}
|
|
1837
|
+
const obj_elementsUsingConnection = obj.elementsUsingConnection;
|
|
1838
|
+
const path_elementsUsingConnection = path + '.elementsUsingConnection';
|
|
1839
|
+
if (!ArrayIsArray(obj_elementsUsingConnection)) {
|
|
1840
|
+
return new TypeError('Expected "array" but received "' + typeof obj_elementsUsingConnection + '" (at "' + path_elementsUsingConnection + '")');
|
|
1841
|
+
}
|
|
1842
|
+
for (let i = 0; i < obj_elementsUsingConnection.length; i++) {
|
|
1843
|
+
const obj_elementsUsingConnection_item = obj_elementsUsingConnection[i];
|
|
1844
|
+
const path_elementsUsingConnection_item = path_elementsUsingConnection + '[' + i + ']';
|
|
1845
|
+
let obj_elementsUsingConnection_item_union0 = null;
|
|
1846
|
+
const obj_elementsUsingConnection_item_union0_error = (() => {
|
|
1847
|
+
if (typeof obj_elementsUsingConnection_item !== 'string') {
|
|
1848
|
+
return new TypeError('Expected "string" but received "' + typeof obj_elementsUsingConnection_item + '" (at "' + path_elementsUsingConnection_item + '")');
|
|
1849
|
+
}
|
|
1850
|
+
})();
|
|
1851
|
+
if (obj_elementsUsingConnection_item_union0_error != null) {
|
|
1852
|
+
obj_elementsUsingConnection_item_union0 = obj_elementsUsingConnection_item_union0_error.message;
|
|
1853
|
+
}
|
|
1854
|
+
let obj_elementsUsingConnection_item_union1 = null;
|
|
1855
|
+
const obj_elementsUsingConnection_item_union1_error = (() => {
|
|
1856
|
+
if (obj_elementsUsingConnection_item !== null) {
|
|
1857
|
+
return new TypeError('Expected "null" but received "' + typeof obj_elementsUsingConnection_item + '" (at "' + path_elementsUsingConnection_item + '")');
|
|
1858
|
+
}
|
|
1859
|
+
})();
|
|
1860
|
+
if (obj_elementsUsingConnection_item_union1_error != null) {
|
|
1861
|
+
obj_elementsUsingConnection_item_union1 = obj_elementsUsingConnection_item_union1_error.message;
|
|
1862
|
+
}
|
|
1863
|
+
if (obj_elementsUsingConnection_item_union0 && obj_elementsUsingConnection_item_union1) {
|
|
1864
|
+
let message = 'Object doesn\'t match union (at "' + path_elementsUsingConnection_item + '")';
|
|
1865
|
+
message += '\n' + obj_elementsUsingConnection_item_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1866
|
+
message += '\n' + obj_elementsUsingConnection_item_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1867
|
+
return new TypeError(message);
|
|
1868
|
+
}
|
|
1869
|
+
}
|
|
1870
|
+
const obj_flowName = obj.flowName;
|
|
1871
|
+
const path_flowName = path + '.flowName';
|
|
1872
|
+
let obj_flowName_union0 = null;
|
|
1873
|
+
const obj_flowName_union0_error = (() => {
|
|
1874
|
+
if (typeof obj_flowName !== 'string') {
|
|
1875
|
+
return new TypeError('Expected "string" but received "' + typeof obj_flowName + '" (at "' + path_flowName + '")');
|
|
1876
|
+
}
|
|
1877
|
+
})();
|
|
1878
|
+
if (obj_flowName_union0_error != null) {
|
|
1879
|
+
obj_flowName_union0 = obj_flowName_union0_error.message;
|
|
1880
|
+
}
|
|
1881
|
+
let obj_flowName_union1 = null;
|
|
1882
|
+
const obj_flowName_union1_error = (() => {
|
|
1883
|
+
if (obj_flowName !== null) {
|
|
1884
|
+
return new TypeError('Expected "null" but received "' + typeof obj_flowName + '" (at "' + path_flowName + '")');
|
|
1885
|
+
}
|
|
1886
|
+
})();
|
|
1887
|
+
if (obj_flowName_union1_error != null) {
|
|
1888
|
+
obj_flowName_union1 = obj_flowName_union1_error.message;
|
|
1889
|
+
}
|
|
1890
|
+
if (obj_flowName_union0 && obj_flowName_union1) {
|
|
1891
|
+
let message = 'Object doesn\'t match union (at "' + path_flowName + '")';
|
|
1892
|
+
message += '\n' + obj_flowName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1893
|
+
message += '\n' + obj_flowName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1894
|
+
return new TypeError(message);
|
|
1895
|
+
}
|
|
1896
|
+
const obj_flowStatus = obj.flowStatus;
|
|
1897
|
+
const path_flowStatus = path + '.flowStatus';
|
|
1898
|
+
let obj_flowStatus_union0 = null;
|
|
1899
|
+
const obj_flowStatus_union0_error = (() => {
|
|
1900
|
+
if (typeof obj_flowStatus !== 'string') {
|
|
1901
|
+
return new TypeError('Expected "string" but received "' + typeof obj_flowStatus + '" (at "' + path_flowStatus + '")');
|
|
1902
|
+
}
|
|
1903
|
+
})();
|
|
1904
|
+
if (obj_flowStatus_union0_error != null) {
|
|
1905
|
+
obj_flowStatus_union0 = obj_flowStatus_union0_error.message;
|
|
1906
|
+
}
|
|
1907
|
+
let obj_flowStatus_union1 = null;
|
|
1908
|
+
const obj_flowStatus_union1_error = (() => {
|
|
1909
|
+
if (obj_flowStatus !== null) {
|
|
1910
|
+
return new TypeError('Expected "null" but received "' + typeof obj_flowStatus + '" (at "' + path_flowStatus + '")');
|
|
1911
|
+
}
|
|
1912
|
+
})();
|
|
1913
|
+
if (obj_flowStatus_union1_error != null) {
|
|
1914
|
+
obj_flowStatus_union1 = obj_flowStatus_union1_error.message;
|
|
1915
|
+
}
|
|
1916
|
+
if (obj_flowStatus_union0 && obj_flowStatus_union1) {
|
|
1917
|
+
let message = 'Object doesn\'t match union (at "' + path_flowStatus + '")';
|
|
1918
|
+
message += '\n' + obj_flowStatus_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1919
|
+
message += '\n' + obj_flowStatus_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1920
|
+
return new TypeError(message);
|
|
1921
|
+
}
|
|
1922
|
+
const obj_flowVersionId = obj.flowVersionId;
|
|
1923
|
+
const path_flowVersionId = path + '.flowVersionId';
|
|
1924
|
+
let obj_flowVersionId_union0 = null;
|
|
1925
|
+
const obj_flowVersionId_union0_error = (() => {
|
|
1926
|
+
if (typeof obj_flowVersionId !== 'string') {
|
|
1927
|
+
return new TypeError('Expected "string" but received "' + typeof obj_flowVersionId + '" (at "' + path_flowVersionId + '")');
|
|
1928
|
+
}
|
|
1929
|
+
})();
|
|
1930
|
+
if (obj_flowVersionId_union0_error != null) {
|
|
1931
|
+
obj_flowVersionId_union0 = obj_flowVersionId_union0_error.message;
|
|
1932
|
+
}
|
|
1933
|
+
let obj_flowVersionId_union1 = null;
|
|
1934
|
+
const obj_flowVersionId_union1_error = (() => {
|
|
1935
|
+
if (obj_flowVersionId !== null) {
|
|
1936
|
+
return new TypeError('Expected "null" but received "' + typeof obj_flowVersionId + '" (at "' + path_flowVersionId + '")');
|
|
1937
|
+
}
|
|
1938
|
+
})();
|
|
1939
|
+
if (obj_flowVersionId_union1_error != null) {
|
|
1940
|
+
obj_flowVersionId_union1 = obj_flowVersionId_union1_error.message;
|
|
1941
|
+
}
|
|
1942
|
+
if (obj_flowVersionId_union0 && obj_flowVersionId_union1) {
|
|
1943
|
+
let message = 'Object doesn\'t match union (at "' + path_flowVersionId + '")';
|
|
1944
|
+
message += '\n' + obj_flowVersionId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1945
|
+
message += '\n' + obj_flowVersionId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1946
|
+
return new TypeError(message);
|
|
1947
|
+
}
|
|
1948
|
+
const obj_flowVersionNumber = obj.flowVersionNumber;
|
|
1949
|
+
const path_flowVersionNumber = path + '.flowVersionNumber';
|
|
1950
|
+
let obj_flowVersionNumber_union0 = null;
|
|
1951
|
+
const obj_flowVersionNumber_union0_error = (() => {
|
|
1952
|
+
if (typeof obj_flowVersionNumber !== 'string') {
|
|
1953
|
+
return new TypeError('Expected "string" but received "' + typeof obj_flowVersionNumber + '" (at "' + path_flowVersionNumber + '")');
|
|
1954
|
+
}
|
|
1955
|
+
})();
|
|
1956
|
+
if (obj_flowVersionNumber_union0_error != null) {
|
|
1957
|
+
obj_flowVersionNumber_union0 = obj_flowVersionNumber_union0_error.message;
|
|
1958
|
+
}
|
|
1959
|
+
let obj_flowVersionNumber_union1 = null;
|
|
1960
|
+
const obj_flowVersionNumber_union1_error = (() => {
|
|
1961
|
+
if (obj_flowVersionNumber !== null) {
|
|
1962
|
+
return new TypeError('Expected "null" but received "' + typeof obj_flowVersionNumber + '" (at "' + path_flowVersionNumber + '")');
|
|
1963
|
+
}
|
|
1964
|
+
})();
|
|
1965
|
+
if (obj_flowVersionNumber_union1_error != null) {
|
|
1966
|
+
obj_flowVersionNumber_union1 = obj_flowVersionNumber_union1_error.message;
|
|
1967
|
+
}
|
|
1968
|
+
if (obj_flowVersionNumber_union0 && obj_flowVersionNumber_union1) {
|
|
1969
|
+
let message = 'Object doesn\'t match union (at "' + path_flowVersionNumber + '")';
|
|
1970
|
+
message += '\n' + obj_flowVersionNumber_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1971
|
+
message += '\n' + obj_flowVersionNumber_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1972
|
+
return new TypeError(message);
|
|
1973
|
+
}
|
|
1974
|
+
const obj_ownerName = obj.ownerName;
|
|
1975
|
+
const path_ownerName = path + '.ownerName';
|
|
1976
|
+
let obj_ownerName_union0 = null;
|
|
1977
|
+
const obj_ownerName_union0_error = (() => {
|
|
1978
|
+
if (typeof obj_ownerName !== 'string') {
|
|
1979
|
+
return new TypeError('Expected "string" but received "' + typeof obj_ownerName + '" (at "' + path_ownerName + '")');
|
|
1980
|
+
}
|
|
1981
|
+
})();
|
|
1982
|
+
if (obj_ownerName_union0_error != null) {
|
|
1983
|
+
obj_ownerName_union0 = obj_ownerName_union0_error.message;
|
|
1984
|
+
}
|
|
1985
|
+
let obj_ownerName_union1 = null;
|
|
1986
|
+
const obj_ownerName_union1_error = (() => {
|
|
1987
|
+
if (obj_ownerName !== null) {
|
|
1988
|
+
return new TypeError('Expected "null" but received "' + typeof obj_ownerName + '" (at "' + path_ownerName + '")');
|
|
1989
|
+
}
|
|
1990
|
+
})();
|
|
1991
|
+
if (obj_ownerName_union1_error != null) {
|
|
1992
|
+
obj_ownerName_union1 = obj_ownerName_union1_error.message;
|
|
1993
|
+
}
|
|
1994
|
+
if (obj_ownerName_union0 && obj_ownerName_union1) {
|
|
1995
|
+
let message = 'Object doesn\'t match union (at "' + path_ownerName + '")';
|
|
1996
|
+
message += '\n' + obj_ownerName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1997
|
+
message += '\n' + obj_ownerName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1998
|
+
return new TypeError(message);
|
|
1999
|
+
}
|
|
2000
|
+
})();
|
|
2001
|
+
return v_error === undefined ? null : v_error;
|
|
2002
|
+
}
|
|
2003
|
+
|
|
2004
|
+
function validate$b(obj, path = 'ExternalConnectivityConnectionFlowsGroupedByApiNameRepresentation') {
|
|
2005
|
+
const v_error = (() => {
|
|
2006
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2007
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2008
|
+
}
|
|
2009
|
+
const obj_apiName = obj.apiName;
|
|
2010
|
+
const path_apiName = path + '.apiName';
|
|
2011
|
+
let obj_apiName_union0 = null;
|
|
2012
|
+
const obj_apiName_union0_error = (() => {
|
|
2013
|
+
if (typeof obj_apiName !== 'string') {
|
|
2014
|
+
return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
|
|
2015
|
+
}
|
|
2016
|
+
})();
|
|
2017
|
+
if (obj_apiName_union0_error != null) {
|
|
2018
|
+
obj_apiName_union0 = obj_apiName_union0_error.message;
|
|
2019
|
+
}
|
|
2020
|
+
let obj_apiName_union1 = null;
|
|
2021
|
+
const obj_apiName_union1_error = (() => {
|
|
2022
|
+
if (obj_apiName !== null) {
|
|
2023
|
+
return new TypeError('Expected "null" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
|
|
2024
|
+
}
|
|
2025
|
+
})();
|
|
2026
|
+
if (obj_apiName_union1_error != null) {
|
|
2027
|
+
obj_apiName_union1 = obj_apiName_union1_error.message;
|
|
2028
|
+
}
|
|
2029
|
+
if (obj_apiName_union0 && obj_apiName_union1) {
|
|
2030
|
+
let message = 'Object doesn\'t match union (at "' + path_apiName + '")';
|
|
2031
|
+
message += '\n' + obj_apiName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2032
|
+
message += '\n' + obj_apiName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2033
|
+
return new TypeError(message);
|
|
2034
|
+
}
|
|
2035
|
+
const obj_externalConnectivityConnectionReferencedFlowsDefinitionRepresentation = obj.externalConnectivityConnectionReferencedFlowsDefinitionRepresentation;
|
|
2036
|
+
const path_externalConnectivityConnectionReferencedFlowsDefinitionRepresentation = path + '.externalConnectivityConnectionReferencedFlowsDefinitionRepresentation';
|
|
2037
|
+
if (!ArrayIsArray(obj_externalConnectivityConnectionReferencedFlowsDefinitionRepresentation)) {
|
|
2038
|
+
return new TypeError('Expected "array" but received "' + typeof obj_externalConnectivityConnectionReferencedFlowsDefinitionRepresentation + '" (at "' + path_externalConnectivityConnectionReferencedFlowsDefinitionRepresentation + '")');
|
|
2039
|
+
}
|
|
2040
|
+
for (let i = 0; i < obj_externalConnectivityConnectionReferencedFlowsDefinitionRepresentation.length; i++) {
|
|
2041
|
+
const obj_externalConnectivityConnectionReferencedFlowsDefinitionRepresentation_item = obj_externalConnectivityConnectionReferencedFlowsDefinitionRepresentation[i];
|
|
2042
|
+
const path_externalConnectivityConnectionReferencedFlowsDefinitionRepresentation_item = path_externalConnectivityConnectionReferencedFlowsDefinitionRepresentation + '[' + i + ']';
|
|
2043
|
+
const referencepath_externalConnectivityConnectionReferencedFlowsDefinitionRepresentation_itemValidationError = validate$c(obj_externalConnectivityConnectionReferencedFlowsDefinitionRepresentation_item, path_externalConnectivityConnectionReferencedFlowsDefinitionRepresentation_item);
|
|
2044
|
+
if (referencepath_externalConnectivityConnectionReferencedFlowsDefinitionRepresentation_itemValidationError !== null) {
|
|
2045
|
+
let message = 'Object doesn\'t match ExternalConnectivityConnectionReferencedFlowsDefinitionRepresentation (at "' + path_externalConnectivityConnectionReferencedFlowsDefinitionRepresentation_item + '")\n';
|
|
2046
|
+
message += referencepath_externalConnectivityConnectionReferencedFlowsDefinitionRepresentation_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2047
|
+
return new TypeError(message);
|
|
2048
|
+
}
|
|
2049
|
+
}
|
|
2050
|
+
})();
|
|
2051
|
+
return v_error === undefined ? null : v_error;
|
|
2052
|
+
}
|
|
2053
|
+
|
|
2054
|
+
const TTL$7 = 500;
|
|
2055
|
+
const VERSION$7 = "820abb05d9fdc457563c221e32216e97";
|
|
2056
|
+
function validate$a(obj, path = 'ExternalConnectivityConnectionReferencedFlowsRepresentation') {
|
|
2057
|
+
const v_error = (() => {
|
|
2058
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2059
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2060
|
+
}
|
|
2061
|
+
const obj_connectionFullName = obj.connectionFullName;
|
|
2062
|
+
const path_connectionFullName = path + '.connectionFullName';
|
|
2063
|
+
let obj_connectionFullName_union0 = null;
|
|
2064
|
+
const obj_connectionFullName_union0_error = (() => {
|
|
2065
|
+
if (typeof obj_connectionFullName !== 'string') {
|
|
2066
|
+
return new TypeError('Expected "string" but received "' + typeof obj_connectionFullName + '" (at "' + path_connectionFullName + '")');
|
|
2067
|
+
}
|
|
2068
|
+
})();
|
|
2069
|
+
if (obj_connectionFullName_union0_error != null) {
|
|
2070
|
+
obj_connectionFullName_union0 = obj_connectionFullName_union0_error.message;
|
|
2071
|
+
}
|
|
2072
|
+
let obj_connectionFullName_union1 = null;
|
|
2073
|
+
const obj_connectionFullName_union1_error = (() => {
|
|
2074
|
+
if (obj_connectionFullName !== null) {
|
|
2075
|
+
return new TypeError('Expected "null" but received "' + typeof obj_connectionFullName + '" (at "' + path_connectionFullName + '")');
|
|
2076
|
+
}
|
|
2077
|
+
})();
|
|
2078
|
+
if (obj_connectionFullName_union1_error != null) {
|
|
2079
|
+
obj_connectionFullName_union1 = obj_connectionFullName_union1_error.message;
|
|
2080
|
+
}
|
|
2081
|
+
if (obj_connectionFullName_union0 && obj_connectionFullName_union1) {
|
|
2082
|
+
let message = 'Object doesn\'t match union (at "' + path_connectionFullName + '")';
|
|
2083
|
+
message += '\n' + obj_connectionFullName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2084
|
+
message += '\n' + obj_connectionFullName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2085
|
+
return new TypeError(message);
|
|
2086
|
+
}
|
|
2087
|
+
const obj_externalConnectivityConnectionFlowsGroupedByApiNameRepresentation = obj.externalConnectivityConnectionFlowsGroupedByApiNameRepresentation;
|
|
2088
|
+
const path_externalConnectivityConnectionFlowsGroupedByApiNameRepresentation = path + '.externalConnectivityConnectionFlowsGroupedByApiNameRepresentation';
|
|
2089
|
+
if (!ArrayIsArray(obj_externalConnectivityConnectionFlowsGroupedByApiNameRepresentation)) {
|
|
2090
|
+
return new TypeError('Expected "array" but received "' + typeof obj_externalConnectivityConnectionFlowsGroupedByApiNameRepresentation + '" (at "' + path_externalConnectivityConnectionFlowsGroupedByApiNameRepresentation + '")');
|
|
2091
|
+
}
|
|
2092
|
+
for (let i = 0; i < obj_externalConnectivityConnectionFlowsGroupedByApiNameRepresentation.length; i++) {
|
|
2093
|
+
const obj_externalConnectivityConnectionFlowsGroupedByApiNameRepresentation_item = obj_externalConnectivityConnectionFlowsGroupedByApiNameRepresentation[i];
|
|
2094
|
+
const path_externalConnectivityConnectionFlowsGroupedByApiNameRepresentation_item = path_externalConnectivityConnectionFlowsGroupedByApiNameRepresentation + '[' + i + ']';
|
|
2095
|
+
const referencepath_externalConnectivityConnectionFlowsGroupedByApiNameRepresentation_itemValidationError = validate$b(obj_externalConnectivityConnectionFlowsGroupedByApiNameRepresentation_item, path_externalConnectivityConnectionFlowsGroupedByApiNameRepresentation_item);
|
|
2096
|
+
if (referencepath_externalConnectivityConnectionFlowsGroupedByApiNameRepresentation_itemValidationError !== null) {
|
|
2097
|
+
let message = 'Object doesn\'t match ExternalConnectivityConnectionFlowsGroupedByApiNameRepresentation (at "' + path_externalConnectivityConnectionFlowsGroupedByApiNameRepresentation_item + '")\n';
|
|
2098
|
+
message += referencepath_externalConnectivityConnectionFlowsGroupedByApiNameRepresentation_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2099
|
+
return new TypeError(message);
|
|
2100
|
+
}
|
|
2101
|
+
}
|
|
2102
|
+
})();
|
|
2103
|
+
return v_error === undefined ? null : v_error;
|
|
2104
|
+
}
|
|
2105
|
+
const RepresentationType$7 = 'ExternalConnectivityConnectionReferencedFlowsRepresentation';
|
|
2106
|
+
function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
2107
|
+
return input;
|
|
2108
|
+
}
|
|
2109
|
+
const select$e = function ExternalConnectivityConnectionReferencedFlowsRepresentationSelect() {
|
|
2110
|
+
return {
|
|
2111
|
+
kind: 'Fragment',
|
|
2112
|
+
version: VERSION$7,
|
|
2113
|
+
private: [],
|
|
2114
|
+
opaque: true
|
|
2115
|
+
};
|
|
2116
|
+
};
|
|
2117
|
+
function equals$7(existing, incoming) {
|
|
2118
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
2119
|
+
return false;
|
|
2120
|
+
}
|
|
2121
|
+
return true;
|
|
2122
|
+
}
|
|
2123
|
+
const ingest$7 = function ExternalConnectivityConnectionReferencedFlowsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2124
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2125
|
+
const validateError = validate$a(input);
|
|
2126
|
+
if (validateError !== null) {
|
|
2127
|
+
throw validateError;
|
|
2128
|
+
}
|
|
2129
|
+
}
|
|
2130
|
+
const key = path.fullPath;
|
|
2131
|
+
const ttlToUse = TTL$7;
|
|
2132
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$7, "external-connectivity", VERSION$7, RepresentationType$7, equals$7);
|
|
2133
|
+
return createLink(key);
|
|
2134
|
+
};
|
|
2135
|
+
function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
|
|
2136
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2137
|
+
const rootKey = fullPathFactory();
|
|
2138
|
+
rootKeySet.set(rootKey, {
|
|
2139
|
+
namespace: keyPrefix,
|
|
2140
|
+
representationName: RepresentationType$7,
|
|
2141
|
+
mergeable: false
|
|
2142
|
+
});
|
|
2143
|
+
}
|
|
2144
|
+
|
|
2145
|
+
function select$d(luvio, params) {
|
|
2146
|
+
return select$e();
|
|
2147
|
+
}
|
|
2148
|
+
function keyBuilder$c(luvio, params) {
|
|
2149
|
+
return keyPrefix + '::ExternalConnectivityConnectionReferencedFlowsRepresentation:(' + 'connectionDeveloperName:' + params.urlParams.connectionDeveloperName + ')';
|
|
2150
|
+
}
|
|
2151
|
+
function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
|
|
2152
|
+
getTypeCacheKeys$7(storeKeyMap, luvio, response, () => keyBuilder$c(luvio, resourceParams));
|
|
2153
|
+
}
|
|
2154
|
+
function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
2155
|
+
const { body } = response;
|
|
2156
|
+
const key = keyBuilder$c(luvio, resourceParams);
|
|
2157
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
2158
|
+
const snapshot = luvio.storeLookup({
|
|
2159
|
+
recordId: key,
|
|
2160
|
+
node: select$d(),
|
|
2161
|
+
variables: {},
|
|
2162
|
+
}, snapshotRefresh);
|
|
2163
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2164
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
2165
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
2166
|
+
}
|
|
2167
|
+
}
|
|
2168
|
+
deepFreeze(snapshot.data);
|
|
2169
|
+
return snapshot;
|
|
2170
|
+
}
|
|
2171
|
+
function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
2172
|
+
const key = keyBuilder$c(luvio, params);
|
|
2173
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2174
|
+
const storeMetadataParams = {
|
|
2175
|
+
ttl: TTL$7,
|
|
2176
|
+
namespace: keyPrefix,
|
|
2177
|
+
version: VERSION$7,
|
|
2178
|
+
representationName: RepresentationType$7
|
|
2179
|
+
};
|
|
2180
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
2181
|
+
return errorSnapshot;
|
|
2182
|
+
}
|
|
2183
|
+
function createResourceRequest$6(config) {
|
|
2184
|
+
const headers = {};
|
|
2185
|
+
return {
|
|
2186
|
+
baseUri: '/services/data/v66.0',
|
|
2187
|
+
basePath: '/external-connectivity/connections/' + config.urlParams.connectionDeveloperName + '/referenced-flows',
|
|
2188
|
+
method: 'get',
|
|
2189
|
+
body: null,
|
|
2190
|
+
urlParams: config.urlParams,
|
|
2191
|
+
queryParams: {},
|
|
2192
|
+
headers,
|
|
2193
|
+
priority: 'normal',
|
|
2194
|
+
};
|
|
2195
|
+
}
|
|
2196
|
+
|
|
2197
|
+
const adapterName$6 = 'getExternalConnectivityConnectionReferencedFlows';
|
|
2198
|
+
const getExternalConnectivityConnectionReferencedFlows_ConfigPropertyMetadata = [
|
|
2199
|
+
generateParamConfigMetadata('connectionDeveloperName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2200
|
+
];
|
|
2201
|
+
const getExternalConnectivityConnectionReferencedFlows_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, getExternalConnectivityConnectionReferencedFlows_ConfigPropertyMetadata);
|
|
2202
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$c(getExternalConnectivityConnectionReferencedFlows_ConfigPropertyMetadata);
|
|
2203
|
+
function keyBuilder$b(luvio, config) {
|
|
2204
|
+
const resourceParams = createResourceParams$6(config);
|
|
2205
|
+
return keyBuilder$c(luvio, resourceParams);
|
|
2206
|
+
}
|
|
2207
|
+
function typeCheckConfig$6(untrustedConfig) {
|
|
2208
|
+
const config = {};
|
|
2209
|
+
typeCheckConfig$c(untrustedConfig, config, getExternalConnectivityConnectionReferencedFlows_ConfigPropertyMetadata);
|
|
2210
|
+
return config;
|
|
2211
|
+
}
|
|
2212
|
+
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
2213
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
2214
|
+
return null;
|
|
2215
|
+
}
|
|
2216
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2217
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
2218
|
+
}
|
|
2219
|
+
const config = typeCheckConfig$6(untrustedConfig);
|
|
2220
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2221
|
+
return null;
|
|
2222
|
+
}
|
|
2223
|
+
return config;
|
|
2224
|
+
}
|
|
2225
|
+
function adapterFragment$4(luvio, config) {
|
|
2226
|
+
createResourceParams$6(config);
|
|
2227
|
+
return select$d();
|
|
2228
|
+
}
|
|
2229
|
+
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
2230
|
+
const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
|
|
2231
|
+
config,
|
|
2232
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
2233
|
+
});
|
|
2234
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2235
|
+
}
|
|
2236
|
+
function onFetchResponseError$4(luvio, config, resourceParams, response) {
|
|
2237
|
+
const snapshot = ingestError$4(luvio, resourceParams, response, {
|
|
2238
|
+
config,
|
|
2239
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
2240
|
+
});
|
|
2241
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2242
|
+
}
|
|
2243
|
+
function buildNetworkSnapshot$6(luvio, config, options) {
|
|
2244
|
+
const resourceParams = createResourceParams$6(config);
|
|
2245
|
+
const request = createResourceRequest$6(resourceParams);
|
|
2246
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
2247
|
+
.then((response) => {
|
|
2248
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
|
|
2249
|
+
const cache = new StoreKeyMap();
|
|
2250
|
+
getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
|
|
2251
|
+
return cache;
|
|
2252
|
+
});
|
|
2253
|
+
}, (response) => {
|
|
2254
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
|
|
2255
|
+
});
|
|
2256
|
+
}
|
|
2257
|
+
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
2258
|
+
return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, undefined, false);
|
|
2259
|
+
}
|
|
2260
|
+
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
2261
|
+
const { luvio, config } = context;
|
|
2262
|
+
const selector = {
|
|
2263
|
+
recordId: keyBuilder$b(luvio, config),
|
|
2264
|
+
node: adapterFragment$4(luvio, config),
|
|
2265
|
+
variables: {},
|
|
2266
|
+
};
|
|
2267
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
2268
|
+
config,
|
|
2269
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
2270
|
+
});
|
|
2271
|
+
return cacheSnapshot;
|
|
2272
|
+
}
|
|
2273
|
+
const getExternalConnectivityConnectionReferencedFlowsAdapterFactory = (luvio) => function externalConnectivity__getExternalConnectivityConnectionReferencedFlows(untrustedConfig, requestContext) {
|
|
2274
|
+
const config = validateAdapterConfig$6(untrustedConfig, getExternalConnectivityConnectionReferencedFlows_ConfigPropertyNames);
|
|
2275
|
+
// Invalid or incomplete config
|
|
2276
|
+
if (config === null) {
|
|
2277
|
+
return null;
|
|
2278
|
+
}
|
|
2279
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2280
|
+
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
|
|
2281
|
+
};
|
|
2282
|
+
|
|
2283
|
+
function validate$9(obj, path = 'ExternalConnectivityConnectionRefreshMetadataTypeProviderRequestParametersRepresentation') {
|
|
2284
|
+
const v_error = (() => {
|
|
2285
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2286
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2287
|
+
}
|
|
2288
|
+
const obj_inputValues = obj.inputValues;
|
|
2289
|
+
const path_inputValues = path + '.inputValues';
|
|
2290
|
+
if (typeof obj_inputValues !== 'object' || ArrayIsArray(obj_inputValues) || obj_inputValues === null) {
|
|
2291
|
+
return new TypeError('Expected "object" but received "' + typeof obj_inputValues + '" (at "' + path_inputValues + '")');
|
|
2292
|
+
}
|
|
2293
|
+
const obj_inputValues_keys = ObjectKeys(obj_inputValues);
|
|
2294
|
+
for (let i = 0; i < obj_inputValues_keys.length; i++) {
|
|
2295
|
+
const key = obj_inputValues_keys[i];
|
|
2296
|
+
const obj_inputValues_prop = obj_inputValues[key];
|
|
2297
|
+
const path_inputValues_prop = path_inputValues + '["' + key + '"]';
|
|
2298
|
+
if (obj_inputValues_prop === undefined) {
|
|
2299
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_inputValues_prop + '" (at "' + path_inputValues_prop + '")');
|
|
2300
|
+
}
|
|
2301
|
+
}
|
|
2302
|
+
const obj_metadataProviderName = obj.metadataProviderName;
|
|
2303
|
+
const path_metadataProviderName = path + '.metadataProviderName';
|
|
2304
|
+
if (typeof obj_metadataProviderName !== 'string') {
|
|
2305
|
+
return new TypeError('Expected "string" but received "' + typeof obj_metadataProviderName + '" (at "' + path_metadataProviderName + '")');
|
|
2306
|
+
}
|
|
2307
|
+
})();
|
|
2308
|
+
return v_error === undefined ? null : v_error;
|
|
2309
|
+
}
|
|
2310
|
+
|
|
2311
|
+
const TTL$6 = 500;
|
|
2312
|
+
const VERSION$6 = "71ffbcde2884f7332ea29ce2c9344e8d";
|
|
2313
|
+
function validate$8(obj, path = 'ExternalConnectivityConnectionRefreshMetadataOutputRepresentation') {
|
|
2314
|
+
const v_error = (() => {
|
|
2315
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2316
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2317
|
+
}
|
|
2318
|
+
const obj_apexClassNames = obj.apexClassNames;
|
|
2319
|
+
const path_apexClassNames = path + '.apexClassNames';
|
|
2320
|
+
if (!ArrayIsArray(obj_apexClassNames)) {
|
|
2321
|
+
return new TypeError('Expected "array" but received "' + typeof obj_apexClassNames + '" (at "' + path_apexClassNames + '")');
|
|
2322
|
+
}
|
|
2323
|
+
for (let i = 0; i < obj_apexClassNames.length; i++) {
|
|
2324
|
+
const obj_apexClassNames_item = obj_apexClassNames[i];
|
|
2325
|
+
const path_apexClassNames_item = path_apexClassNames + '[' + i + ']';
|
|
2326
|
+
if (typeof obj_apexClassNames_item !== 'string') {
|
|
2327
|
+
return new TypeError('Expected "string" but received "' + typeof obj_apexClassNames_item + '" (at "' + path_apexClassNames_item + '")');
|
|
2328
|
+
}
|
|
2329
|
+
}
|
|
2330
|
+
const obj_connectionName = obj.connectionName;
|
|
2331
|
+
const path_connectionName = path + '.connectionName';
|
|
2332
|
+
if (typeof obj_connectionName !== 'string') {
|
|
2333
|
+
return new TypeError('Expected "string" but received "' + typeof obj_connectionName + '" (at "' + path_connectionName + '")');
|
|
2334
|
+
}
|
|
2335
|
+
})();
|
|
2336
|
+
return v_error === undefined ? null : v_error;
|
|
2337
|
+
}
|
|
2338
|
+
const RepresentationType$6 = 'ExternalConnectivityConnectionRefreshMetadataOutputRepresentation';
|
|
2339
|
+
function keyBuilder$a(luvio, config) {
|
|
2340
|
+
return keyPrefix + '::' + RepresentationType$6 + ':' + config.connectionName;
|
|
2341
|
+
}
|
|
2342
|
+
function keyBuilderFromType$2(luvio, object) {
|
|
2343
|
+
const keyParams = {
|
|
2344
|
+
connectionName: object.connectionName
|
|
2345
|
+
};
|
|
2346
|
+
return keyBuilder$a(luvio, keyParams);
|
|
2347
|
+
}
|
|
2348
|
+
function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
2349
|
+
return input;
|
|
2350
|
+
}
|
|
2351
|
+
const select$c = function ExternalConnectivityConnectionRefreshMetadataOutputRepresentationSelect() {
|
|
2352
|
+
return {
|
|
2353
|
+
kind: 'Fragment',
|
|
2354
|
+
version: VERSION$6,
|
|
2355
|
+
private: [],
|
|
2356
|
+
opaque: true
|
|
2357
|
+
};
|
|
2358
|
+
};
|
|
2359
|
+
function equals$6(existing, incoming) {
|
|
2360
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
2361
|
+
return false;
|
|
2362
|
+
}
|
|
2363
|
+
return true;
|
|
2364
|
+
}
|
|
2365
|
+
const ingest$6 = function ExternalConnectivityConnectionRefreshMetadataOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2366
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2367
|
+
const validateError = validate$8(input);
|
|
2368
|
+
if (validateError !== null) {
|
|
2369
|
+
throw validateError;
|
|
2370
|
+
}
|
|
2371
|
+
}
|
|
2372
|
+
const key = keyBuilderFromType$2(luvio, input);
|
|
2373
|
+
const ttlToUse = TTL$6;
|
|
2374
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "external-connectivity", VERSION$6, RepresentationType$6, equals$6);
|
|
2375
|
+
return createLink(key);
|
|
2376
|
+
};
|
|
2377
|
+
function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
|
|
2378
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2379
|
+
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
2380
|
+
rootKeySet.set(rootKey, {
|
|
2381
|
+
namespace: keyPrefix,
|
|
2382
|
+
representationName: RepresentationType$6,
|
|
2383
|
+
mergeable: false
|
|
2384
|
+
});
|
|
2385
|
+
}
|
|
2386
|
+
|
|
2387
|
+
function select$b(luvio, params) {
|
|
2388
|
+
return select$c();
|
|
2389
|
+
}
|
|
2390
|
+
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
2391
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response);
|
|
2392
|
+
}
|
|
2393
|
+
function ingestSuccess$5(luvio, resourceParams, response) {
|
|
2394
|
+
const { body } = response;
|
|
2395
|
+
const key = keyBuilderFromType$2(luvio, body);
|
|
2396
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
2397
|
+
const snapshot = luvio.storeLookup({
|
|
2398
|
+
recordId: key,
|
|
2399
|
+
node: select$b(),
|
|
2400
|
+
variables: {},
|
|
2401
|
+
});
|
|
2402
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2403
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
2404
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
2405
|
+
}
|
|
2406
|
+
}
|
|
2407
|
+
deepFreeze(snapshot.data);
|
|
2408
|
+
return snapshot;
|
|
2409
|
+
}
|
|
2410
|
+
function createResourceRequest$5(config) {
|
|
2411
|
+
const headers = {};
|
|
2412
|
+
return {
|
|
2413
|
+
baseUri: '/services/data/v66.0',
|
|
2414
|
+
basePath: '/external-connectivity/connections/' + config.urlParams.connectionDeveloperName + '/refresh-metadata',
|
|
2415
|
+
method: 'post',
|
|
2416
|
+
body: config.body,
|
|
2417
|
+
urlParams: config.urlParams,
|
|
2418
|
+
queryParams: {},
|
|
2419
|
+
headers,
|
|
2420
|
+
priority: 'normal',
|
|
2421
|
+
};
|
|
2422
|
+
}
|
|
2423
|
+
|
|
2424
|
+
const adapterName$5 = 'refreshMetadata';
|
|
2425
|
+
const refreshMetadata_ConfigPropertyMetadata = [
|
|
2426
|
+
generateParamConfigMetadata('connectionDeveloperName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2427
|
+
generateParamConfigMetadata('apexClassNames', false, 2 /* Body */, 0 /* String */, true),
|
|
2428
|
+
generateParamConfigMetadata('typeProviderRequestParameters', false, 2 /* Body */, 4 /* Unsupported */, true),
|
|
2429
|
+
];
|
|
2430
|
+
const refreshMetadata_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, refreshMetadata_ConfigPropertyMetadata);
|
|
2431
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$c(refreshMetadata_ConfigPropertyMetadata);
|
|
2432
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
2433
|
+
const config = {};
|
|
2434
|
+
typeCheckConfig$c(untrustedConfig, config, refreshMetadata_ConfigPropertyMetadata);
|
|
2435
|
+
const untrustedConfig_typeProviderRequestParameters = untrustedConfig.typeProviderRequestParameters;
|
|
2436
|
+
if (ArrayIsArray$1(untrustedConfig_typeProviderRequestParameters)) {
|
|
2437
|
+
const untrustedConfig_typeProviderRequestParameters_array = [];
|
|
2438
|
+
for (let i = 0, arrayLength = untrustedConfig_typeProviderRequestParameters.length; i < arrayLength; i++) {
|
|
2439
|
+
const untrustedConfig_typeProviderRequestParameters_item = untrustedConfig_typeProviderRequestParameters[i];
|
|
2440
|
+
const referenceExternalConnectivityConnectionRefreshMetadataTypeProviderRequestParametersRepresentationValidationError = validate$9(untrustedConfig_typeProviderRequestParameters_item);
|
|
2441
|
+
if (referenceExternalConnectivityConnectionRefreshMetadataTypeProviderRequestParametersRepresentationValidationError === null) {
|
|
2442
|
+
untrustedConfig_typeProviderRequestParameters_array.push(untrustedConfig_typeProviderRequestParameters_item);
|
|
2443
|
+
}
|
|
2444
|
+
}
|
|
2445
|
+
config.typeProviderRequestParameters = untrustedConfig_typeProviderRequestParameters_array;
|
|
2446
|
+
}
|
|
2447
|
+
return config;
|
|
2448
|
+
}
|
|
2449
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
2450
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
2451
|
+
return null;
|
|
2452
|
+
}
|
|
2453
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2454
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
2455
|
+
}
|
|
2456
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
2457
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2458
|
+
return null;
|
|
2459
|
+
}
|
|
2460
|
+
return config;
|
|
2461
|
+
}
|
|
2462
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
2463
|
+
const resourceParams = createResourceParams$5(config);
|
|
2464
|
+
const request = createResourceRequest$5(resourceParams);
|
|
2465
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
2466
|
+
.then((response) => {
|
|
2467
|
+
return luvio.handleSuccessResponse(() => {
|
|
2468
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response);
|
|
2469
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2470
|
+
}, () => {
|
|
2471
|
+
const cache = new StoreKeyMap();
|
|
2472
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
|
|
2473
|
+
return cache;
|
|
2474
|
+
});
|
|
2475
|
+
}, (response) => {
|
|
2476
|
+
deepFreeze(response);
|
|
2477
|
+
throw response;
|
|
2478
|
+
});
|
|
2479
|
+
}
|
|
2480
|
+
const refreshMetadataAdapterFactory = (luvio) => {
|
|
2481
|
+
return function refreshMetadata(untrustedConfig) {
|
|
2482
|
+
const config = validateAdapterConfig$5(untrustedConfig, refreshMetadata_ConfigPropertyNames);
|
|
2483
|
+
// Invalid or incomplete config
|
|
2484
|
+
if (config === null) {
|
|
2485
|
+
throw new Error('Invalid config for "refreshMetadata"');
|
|
2486
|
+
}
|
|
2487
|
+
return buildNetworkSnapshot$5(luvio, config);
|
|
2488
|
+
};
|
|
2489
|
+
};
|
|
2490
|
+
|
|
2491
|
+
const TTL$5 = 500;
|
|
2492
|
+
const VERSION$5 = "586c10aa43f3608962cdfc83e38d3157";
|
|
2493
|
+
function validate$7(obj, path = 'ExternalConnectivityConnectionTestResultRepresentation') {
|
|
2494
|
+
const v_error = (() => {
|
|
2495
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2496
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2497
|
+
}
|
|
2498
|
+
const obj_developerName = obj.developerName;
|
|
2499
|
+
const path_developerName = path + '.developerName';
|
|
2500
|
+
if (typeof obj_developerName !== 'string') {
|
|
2501
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
2502
|
+
}
|
|
2503
|
+
const obj_errorDetails = obj.errorDetails;
|
|
2504
|
+
const path_errorDetails = path + '.errorDetails';
|
|
2505
|
+
let obj_errorDetails_union0 = null;
|
|
2506
|
+
const obj_errorDetails_union0_error = (() => {
|
|
2507
|
+
if (typeof obj_errorDetails !== 'string') {
|
|
2508
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errorDetails + '" (at "' + path_errorDetails + '")');
|
|
2509
|
+
}
|
|
2510
|
+
})();
|
|
2511
|
+
if (obj_errorDetails_union0_error != null) {
|
|
2512
|
+
obj_errorDetails_union0 = obj_errorDetails_union0_error.message;
|
|
2513
|
+
}
|
|
2514
|
+
let obj_errorDetails_union1 = null;
|
|
2515
|
+
const obj_errorDetails_union1_error = (() => {
|
|
2516
|
+
if (obj_errorDetails !== null) {
|
|
2517
|
+
return new TypeError('Expected "null" but received "' + typeof obj_errorDetails + '" (at "' + path_errorDetails + '")');
|
|
2518
|
+
}
|
|
2519
|
+
})();
|
|
2520
|
+
if (obj_errorDetails_union1_error != null) {
|
|
2521
|
+
obj_errorDetails_union1 = obj_errorDetails_union1_error.message;
|
|
2522
|
+
}
|
|
2523
|
+
if (obj_errorDetails_union0 && obj_errorDetails_union1) {
|
|
2524
|
+
let message = 'Object doesn\'t match union (at "' + path_errorDetails + '")';
|
|
2525
|
+
message += '\n' + obj_errorDetails_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2526
|
+
message += '\n' + obj_errorDetails_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2527
|
+
return new TypeError(message);
|
|
2528
|
+
}
|
|
2529
|
+
const obj_errorMessage = obj.errorMessage;
|
|
2530
|
+
const path_errorMessage = path + '.errorMessage';
|
|
2531
|
+
let obj_errorMessage_union0 = null;
|
|
2532
|
+
const obj_errorMessage_union0_error = (() => {
|
|
2533
|
+
if (typeof obj_errorMessage !== 'string') {
|
|
2534
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
|
|
2535
|
+
}
|
|
2536
|
+
})();
|
|
2537
|
+
if (obj_errorMessage_union0_error != null) {
|
|
2538
|
+
obj_errorMessage_union0 = obj_errorMessage_union0_error.message;
|
|
2539
|
+
}
|
|
2540
|
+
let obj_errorMessage_union1 = null;
|
|
2541
|
+
const obj_errorMessage_union1_error = (() => {
|
|
2542
|
+
if (obj_errorMessage !== null) {
|
|
2543
|
+
return new TypeError('Expected "null" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
|
|
2544
|
+
}
|
|
2545
|
+
})();
|
|
2546
|
+
if (obj_errorMessage_union1_error != null) {
|
|
2547
|
+
obj_errorMessage_union1 = obj_errorMessage_union1_error.message;
|
|
2548
|
+
}
|
|
2549
|
+
if (obj_errorMessage_union0 && obj_errorMessage_union1) {
|
|
2550
|
+
let message = 'Object doesn\'t match union (at "' + path_errorMessage + '")';
|
|
2551
|
+
message += '\n' + obj_errorMessage_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2552
|
+
message += '\n' + obj_errorMessage_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2553
|
+
return new TypeError(message);
|
|
2554
|
+
}
|
|
2555
|
+
const obj_established = obj.established;
|
|
2556
|
+
const path_established = path + '.established';
|
|
2557
|
+
if (typeof obj_established !== 'boolean') {
|
|
2558
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_established + '" (at "' + path_established + '")');
|
|
2559
|
+
}
|
|
2560
|
+
const obj_lastTestedDate = obj.lastTestedDate;
|
|
2561
|
+
const path_lastTestedDate = path + '.lastTestedDate';
|
|
2562
|
+
if (typeof obj_lastTestedDate !== 'string') {
|
|
2563
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastTestedDate + '" (at "' + path_lastTestedDate + '")');
|
|
2564
|
+
}
|
|
2565
|
+
})();
|
|
2566
|
+
return v_error === undefined ? null : v_error;
|
|
2567
|
+
}
|
|
2568
|
+
const RepresentationType$5 = 'ExternalConnectivityConnectionTestResultRepresentation';
|
|
2569
|
+
function keyBuilder$9(luvio, config) {
|
|
2570
|
+
return keyPrefix + '::' + RepresentationType$5 + ':' + config.developerName;
|
|
2571
|
+
}
|
|
2572
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
2573
|
+
const keyParams = {
|
|
2574
|
+
developerName: object.developerName
|
|
2575
|
+
};
|
|
2576
|
+
return keyBuilder$9(luvio, keyParams);
|
|
2577
|
+
}
|
|
2578
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
2579
|
+
return input;
|
|
2580
|
+
}
|
|
2581
|
+
const select$a = function ExternalConnectivityConnectionTestResultRepresentationSelect() {
|
|
2582
|
+
return {
|
|
2583
|
+
kind: 'Fragment',
|
|
2584
|
+
version: VERSION$5,
|
|
2585
|
+
private: [],
|
|
2586
|
+
selections: [
|
|
2587
|
+
{
|
|
2588
|
+
name: 'developerName',
|
|
2589
|
+
kind: 'Scalar'
|
|
2590
|
+
},
|
|
2591
|
+
{
|
|
2592
|
+
name: 'errorDetails',
|
|
2593
|
+
kind: 'Scalar'
|
|
2594
|
+
},
|
|
2595
|
+
{
|
|
2596
|
+
name: 'errorMessage',
|
|
2597
|
+
kind: 'Scalar'
|
|
2598
|
+
},
|
|
2599
|
+
{
|
|
2600
|
+
name: 'established',
|
|
2601
|
+
kind: 'Scalar'
|
|
2602
|
+
},
|
|
2603
|
+
{
|
|
2604
|
+
name: 'lastTestedDate',
|
|
2605
|
+
kind: 'Scalar'
|
|
2606
|
+
}
|
|
2607
|
+
]
|
|
2608
|
+
};
|
|
2609
|
+
};
|
|
2610
|
+
function equals$5(existing, incoming) {
|
|
2611
|
+
const existing_established = existing.established;
|
|
2612
|
+
const incoming_established = incoming.established;
|
|
2613
|
+
if (!(existing_established === incoming_established)) {
|
|
2614
|
+
return false;
|
|
2615
|
+
}
|
|
2616
|
+
const existing_developerName = existing.developerName;
|
|
2617
|
+
const incoming_developerName = incoming.developerName;
|
|
2618
|
+
if (!(existing_developerName === incoming_developerName)) {
|
|
2619
|
+
return false;
|
|
2620
|
+
}
|
|
2621
|
+
const existing_lastTestedDate = existing.lastTestedDate;
|
|
2622
|
+
const incoming_lastTestedDate = incoming.lastTestedDate;
|
|
2623
|
+
if (!(existing_lastTestedDate === incoming_lastTestedDate)) {
|
|
2624
|
+
return false;
|
|
2625
|
+
}
|
|
2626
|
+
const existing_errorDetails = existing.errorDetails;
|
|
2627
|
+
const incoming_errorDetails = incoming.errorDetails;
|
|
2628
|
+
if (!(existing_errorDetails === incoming_errorDetails)) {
|
|
2629
|
+
return false;
|
|
2630
|
+
}
|
|
2631
|
+
const existing_errorMessage = existing.errorMessage;
|
|
2632
|
+
const incoming_errorMessage = incoming.errorMessage;
|
|
2633
|
+
if (!(existing_errorMessage === incoming_errorMessage)) {
|
|
2634
|
+
return false;
|
|
2635
|
+
}
|
|
2636
|
+
return true;
|
|
2637
|
+
}
|
|
2638
|
+
const ingest$5 = function ExternalConnectivityConnectionTestResultRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2639
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2640
|
+
const validateError = validate$7(input);
|
|
2641
|
+
if (validateError !== null) {
|
|
2642
|
+
throw validateError;
|
|
2643
|
+
}
|
|
2644
|
+
}
|
|
2645
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
2646
|
+
const ttlToUse = TTL$5;
|
|
2647
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "external-connectivity", VERSION$5, RepresentationType$5, equals$5);
|
|
2648
|
+
return createLink(key);
|
|
2649
|
+
};
|
|
2650
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
2651
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2652
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
2653
|
+
rootKeySet.set(rootKey, {
|
|
2654
|
+
namespace: keyPrefix,
|
|
2655
|
+
representationName: RepresentationType$5,
|
|
2656
|
+
mergeable: false
|
|
2657
|
+
});
|
|
2658
|
+
}
|
|
2659
|
+
|
|
2660
|
+
function select$9(luvio, params) {
|
|
2661
|
+
return select$a();
|
|
2662
|
+
}
|
|
2663
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
2664
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response);
|
|
2665
|
+
}
|
|
2666
|
+
function ingestSuccess$4(luvio, resourceParams, response) {
|
|
2667
|
+
const { body } = response;
|
|
2668
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
2669
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
2670
|
+
const snapshot = luvio.storeLookup({
|
|
2671
|
+
recordId: key,
|
|
2672
|
+
node: select$9(),
|
|
2673
|
+
variables: {},
|
|
2674
|
+
});
|
|
2675
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2676
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
2677
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
2678
|
+
}
|
|
2679
|
+
}
|
|
2680
|
+
deepFreeze(snapshot.data);
|
|
2681
|
+
return snapshot;
|
|
2682
|
+
}
|
|
2683
|
+
function createResourceRequest$4(config) {
|
|
2684
|
+
const headers = {};
|
|
2685
|
+
return {
|
|
2686
|
+
baseUri: '/services/data/v66.0',
|
|
2687
|
+
basePath: '/external-connectivity/connections/' + config.urlParams.connectionDeveloperName + '/test',
|
|
2688
|
+
method: 'post',
|
|
2689
|
+
body: null,
|
|
2690
|
+
urlParams: config.urlParams,
|
|
2691
|
+
queryParams: {},
|
|
2692
|
+
headers,
|
|
2693
|
+
priority: 'normal',
|
|
2694
|
+
};
|
|
2695
|
+
}
|
|
2696
|
+
|
|
2697
|
+
const adapterName$4 = 'testConnection';
|
|
2698
|
+
const testConnection_ConfigPropertyMetadata = [
|
|
2699
|
+
generateParamConfigMetadata('connectionDeveloperName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2700
|
+
];
|
|
2701
|
+
const testConnection_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, testConnection_ConfigPropertyMetadata);
|
|
2702
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$c(testConnection_ConfigPropertyMetadata);
|
|
2703
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
2704
|
+
const config = {};
|
|
2705
|
+
typeCheckConfig$c(untrustedConfig, config, testConnection_ConfigPropertyMetadata);
|
|
2706
|
+
return config;
|
|
2707
|
+
}
|
|
2708
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
2709
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
2710
|
+
return null;
|
|
2711
|
+
}
|
|
2712
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2713
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
2714
|
+
}
|
|
2715
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
2716
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2717
|
+
return null;
|
|
2718
|
+
}
|
|
2719
|
+
return config;
|
|
2720
|
+
}
|
|
2721
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
2722
|
+
const resourceParams = createResourceParams$4(config);
|
|
2723
|
+
const request = createResourceRequest$4(resourceParams);
|
|
2724
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
2725
|
+
.then((response) => {
|
|
2726
|
+
return luvio.handleSuccessResponse(() => {
|
|
2727
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response);
|
|
2728
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2729
|
+
}, () => {
|
|
2730
|
+
const cache = new StoreKeyMap();
|
|
2731
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
2732
|
+
return cache;
|
|
2733
|
+
});
|
|
2734
|
+
}, (response) => {
|
|
2735
|
+
deepFreeze(response);
|
|
2736
|
+
throw response;
|
|
2737
|
+
});
|
|
2738
|
+
}
|
|
2739
|
+
const testConnectionAdapterFactory = (luvio) => {
|
|
2740
|
+
return function testConnection(untrustedConfig) {
|
|
2741
|
+
const config = validateAdapterConfig$4(untrustedConfig, testConnection_ConfigPropertyNames);
|
|
2742
|
+
// Invalid or incomplete config
|
|
2743
|
+
if (config === null) {
|
|
2744
|
+
throw new Error('Invalid config for "testConnection"');
|
|
2745
|
+
}
|
|
2746
|
+
return buildNetworkSnapshot$4(luvio, config);
|
|
2747
|
+
};
|
|
2748
|
+
};
|
|
2749
|
+
|
|
2750
|
+
const TTL$4 = 500;
|
|
2751
|
+
const VERSION$4 = "e0e363c96027e368a8c2c44580411d53";
|
|
2752
|
+
function validate$6(obj, path = 'ExternalConnectivityConnectorListRepresentation') {
|
|
2753
|
+
const v_error = (() => {
|
|
2754
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2755
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2756
|
+
}
|
|
2757
|
+
const obj_connectors = obj.connectors;
|
|
2758
|
+
const path_connectors = path + '.connectors';
|
|
2759
|
+
if (!ArrayIsArray(obj_connectors)) {
|
|
2760
|
+
return new TypeError('Expected "array" but received "' + typeof obj_connectors + '" (at "' + path_connectors + '")');
|
|
2761
|
+
}
|
|
2762
|
+
for (let i = 0; i < obj_connectors.length; i++) {
|
|
2763
|
+
const obj_connectors_item = obj_connectors[i];
|
|
2764
|
+
const path_connectors_item = path_connectors + '[' + i + ']';
|
|
2765
|
+
const referencepath_connectors_itemValidationError = validate$m(obj_connectors_item, path_connectors_item);
|
|
2766
|
+
if (referencepath_connectors_itemValidationError !== null) {
|
|
2767
|
+
let message = 'Object doesn\'t match ExternalConnectivityConnectorRepresentation (at "' + path_connectors_item + '")\n';
|
|
2768
|
+
message += referencepath_connectors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2769
|
+
return new TypeError(message);
|
|
2770
|
+
}
|
|
2771
|
+
}
|
|
2772
|
+
})();
|
|
2773
|
+
return v_error === undefined ? null : v_error;
|
|
2774
|
+
}
|
|
2775
|
+
const RepresentationType$4 = 'ExternalConnectivityConnectorListRepresentation';
|
|
2776
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
2777
|
+
return input;
|
|
2778
|
+
}
|
|
2779
|
+
const select$8 = function ExternalConnectivityConnectorListRepresentationSelect() {
|
|
2780
|
+
return {
|
|
2781
|
+
kind: 'Fragment',
|
|
2782
|
+
version: VERSION$4,
|
|
2783
|
+
private: [],
|
|
2784
|
+
opaque: true
|
|
2785
|
+
};
|
|
2786
|
+
};
|
|
2787
|
+
function equals$4(existing, incoming) {
|
|
2788
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
2789
|
+
return false;
|
|
2790
|
+
}
|
|
2791
|
+
return true;
|
|
2792
|
+
}
|
|
2793
|
+
const ingest$4 = function ExternalConnectivityConnectorListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2794
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2795
|
+
const validateError = validate$6(input);
|
|
2796
|
+
if (validateError !== null) {
|
|
2797
|
+
throw validateError;
|
|
2798
|
+
}
|
|
2799
|
+
}
|
|
2800
|
+
const key = path.fullPath;
|
|
2801
|
+
const ttlToUse = TTL$4;
|
|
2802
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "external-connectivity", VERSION$4, RepresentationType$4, equals$4);
|
|
2803
|
+
return createLink(key);
|
|
2804
|
+
};
|
|
2805
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
2806
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2807
|
+
const rootKey = fullPathFactory();
|
|
2808
|
+
rootKeySet.set(rootKey, {
|
|
2809
|
+
namespace: keyPrefix,
|
|
2810
|
+
representationName: RepresentationType$4,
|
|
2811
|
+
mergeable: false
|
|
2812
|
+
});
|
|
2813
|
+
}
|
|
2814
|
+
|
|
2815
|
+
function select$7(luvio, params) {
|
|
2816
|
+
return select$8();
|
|
2817
|
+
}
|
|
2818
|
+
function keyBuilder$8(luvio, params) {
|
|
2819
|
+
return keyPrefix + '::ExternalConnectivityConnectorListRepresentation:(' + ')';
|
|
2820
|
+
}
|
|
2821
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
2822
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$8());
|
|
2823
|
+
}
|
|
2824
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
2825
|
+
const { body } = response;
|
|
2826
|
+
const key = keyBuilder$8();
|
|
2827
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
2828
|
+
const snapshot = luvio.storeLookup({
|
|
2829
|
+
recordId: key,
|
|
2830
|
+
node: select$7(),
|
|
2831
|
+
variables: {},
|
|
2832
|
+
}, snapshotRefresh);
|
|
2833
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2834
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
2835
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
2836
|
+
}
|
|
2837
|
+
}
|
|
2838
|
+
deepFreeze(snapshot.data);
|
|
2839
|
+
return snapshot;
|
|
2840
|
+
}
|
|
2841
|
+
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
2842
|
+
const key = keyBuilder$8();
|
|
2843
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2844
|
+
const storeMetadataParams = {
|
|
2845
|
+
ttl: TTL$4,
|
|
2846
|
+
namespace: keyPrefix,
|
|
2847
|
+
version: VERSION$4,
|
|
2848
|
+
representationName: RepresentationType$4
|
|
2849
|
+
};
|
|
2850
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
2851
|
+
return errorSnapshot;
|
|
2852
|
+
}
|
|
2853
|
+
function createResourceRequest$3(config) {
|
|
2854
|
+
const headers = {};
|
|
2855
|
+
return {
|
|
2856
|
+
baseUri: '/services/data/v66.0',
|
|
2857
|
+
basePath: '/external-connectivity/connectors',
|
|
2858
|
+
method: 'get',
|
|
2859
|
+
body: null,
|
|
2860
|
+
urlParams: {},
|
|
2861
|
+
queryParams: {},
|
|
2862
|
+
headers,
|
|
2863
|
+
priority: 'normal',
|
|
2864
|
+
};
|
|
2865
|
+
}
|
|
2866
|
+
|
|
2867
|
+
const adapterName$3 = 'getConnectors';
|
|
2868
|
+
const getConnectors_ConfigPropertyMetadata = [];
|
|
2869
|
+
const getConnectors_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getConnectors_ConfigPropertyMetadata);
|
|
2870
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$c(getConnectors_ConfigPropertyMetadata);
|
|
2871
|
+
function keyBuilder$7(luvio, config) {
|
|
2872
|
+
createResourceParams$3(config);
|
|
2873
|
+
return keyBuilder$8();
|
|
2874
|
+
}
|
|
2875
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
2876
|
+
const config = {};
|
|
2877
|
+
return config;
|
|
2878
|
+
}
|
|
2879
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
2880
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
2881
|
+
return null;
|
|
2882
|
+
}
|
|
2883
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2884
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
2885
|
+
}
|
|
2886
|
+
const config = typeCheckConfig$3();
|
|
2887
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2888
|
+
return null;
|
|
2889
|
+
}
|
|
2890
|
+
return config;
|
|
2891
|
+
}
|
|
2892
|
+
function adapterFragment$3(luvio, config) {
|
|
2893
|
+
createResourceParams$3(config);
|
|
2894
|
+
return select$7();
|
|
2895
|
+
}
|
|
2896
|
+
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
2897
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
2898
|
+
config,
|
|
2899
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
2900
|
+
});
|
|
2901
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2902
|
+
}
|
|
2903
|
+
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
2904
|
+
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
2905
|
+
config,
|
|
2906
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
2907
|
+
});
|
|
2908
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2909
|
+
}
|
|
2910
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
2911
|
+
const resourceParams = createResourceParams$3(config);
|
|
2912
|
+
const request = createResourceRequest$3();
|
|
2913
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
2914
|
+
.then((response) => {
|
|
2915
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
2916
|
+
const cache = new StoreKeyMap();
|
|
2917
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
2918
|
+
return cache;
|
|
2919
|
+
});
|
|
2920
|
+
}, (response) => {
|
|
2921
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
|
|
2922
|
+
});
|
|
2923
|
+
}
|
|
2924
|
+
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
2925
|
+
return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
2926
|
+
}
|
|
2927
|
+
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
2928
|
+
const { luvio, config } = context;
|
|
2929
|
+
const selector = {
|
|
2930
|
+
recordId: keyBuilder$7(luvio, config),
|
|
2931
|
+
node: adapterFragment$3(luvio, config),
|
|
2932
|
+
variables: {},
|
|
2933
|
+
};
|
|
2934
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
2935
|
+
config,
|
|
2936
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
2937
|
+
});
|
|
2938
|
+
return cacheSnapshot;
|
|
2939
|
+
}
|
|
2940
|
+
const getConnectorsAdapterFactory = (luvio) => function externalConnectivity__getConnectors(untrustedConfig, requestContext) {
|
|
2941
|
+
const config = validateAdapterConfig$3(untrustedConfig, getConnectors_ConfigPropertyNames);
|
|
2942
|
+
// Invalid or incomplete config
|
|
2943
|
+
if (config === null) {
|
|
2944
|
+
return null;
|
|
2945
|
+
}
|
|
2946
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2947
|
+
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
2948
|
+
};
|
|
2949
|
+
|
|
2950
|
+
function validate$5(obj, path = 'AuthenticationTypeDefinitionRepresentation') {
|
|
2951
|
+
const v_error = (() => {
|
|
2952
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2953
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2954
|
+
}
|
|
2955
|
+
const obj_authenticationParameterDefinitions = obj.authenticationParameterDefinitions;
|
|
2956
|
+
const path_authenticationParameterDefinitions = path + '.authenticationParameterDefinitions';
|
|
2957
|
+
if (!ArrayIsArray(obj_authenticationParameterDefinitions)) {
|
|
2958
|
+
return new TypeError('Expected "array" but received "' + typeof obj_authenticationParameterDefinitions + '" (at "' + path_authenticationParameterDefinitions + '")');
|
|
2959
|
+
}
|
|
2960
|
+
for (let i = 0; i < obj_authenticationParameterDefinitions.length; i++) {
|
|
2961
|
+
const obj_authenticationParameterDefinitions_item = obj_authenticationParameterDefinitions[i];
|
|
2962
|
+
const path_authenticationParameterDefinitions_item = path_authenticationParameterDefinitions + '[' + i + ']';
|
|
2963
|
+
const referencepath_authenticationParameterDefinitions_itemValidationError = validate$g(obj_authenticationParameterDefinitions_item, path_authenticationParameterDefinitions_item);
|
|
2964
|
+
if (referencepath_authenticationParameterDefinitions_itemValidationError !== null) {
|
|
2965
|
+
let message = 'Object doesn\'t match AuthenticationParameterDefinitionRepresentation (at "' + path_authenticationParameterDefinitions_item + '")\n';
|
|
2966
|
+
message += referencepath_authenticationParameterDefinitions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2967
|
+
return new TypeError(message);
|
|
2968
|
+
}
|
|
2969
|
+
}
|
|
2970
|
+
const obj_authenticationProtocol = obj.authenticationProtocol;
|
|
2971
|
+
const path_authenticationProtocol = path + '.authenticationProtocol';
|
|
2972
|
+
if (typeof obj_authenticationProtocol !== 'string') {
|
|
2973
|
+
return new TypeError('Expected "string" but received "' + typeof obj_authenticationProtocol + '" (at "' + path_authenticationProtocol + '")');
|
|
2974
|
+
}
|
|
2975
|
+
})();
|
|
2976
|
+
return v_error === undefined ? null : v_error;
|
|
2977
|
+
}
|
|
2978
|
+
|
|
2979
|
+
const TTL$3 = 500;
|
|
2980
|
+
const VERSION$3 = "f8847a262a47a2a68d458483f2a60a07";
|
|
2981
|
+
function validate$4(obj, path = 'ExternalConnectivityConnectorDetailsRepresentation') {
|
|
2982
|
+
const v_error = (() => {
|
|
2983
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2984
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2985
|
+
}
|
|
2986
|
+
const obj_connectorType = obj.connectorType;
|
|
2987
|
+
const path_connectorType = path + '.connectorType';
|
|
2988
|
+
if (typeof obj_connectorType !== 'string') {
|
|
2989
|
+
return new TypeError('Expected "string" but received "' + typeof obj_connectorType + '" (at "' + path_connectorType + '")');
|
|
2990
|
+
}
|
|
2991
|
+
const obj_description = obj.description;
|
|
2992
|
+
const path_description = path + '.description';
|
|
2993
|
+
if (typeof obj_description !== 'string') {
|
|
2994
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
2995
|
+
}
|
|
2996
|
+
const obj_developerName = obj.developerName;
|
|
2997
|
+
const path_developerName = path + '.developerName';
|
|
2998
|
+
if (typeof obj_developerName !== 'string') {
|
|
2999
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
3000
|
+
}
|
|
3001
|
+
const obj_iconMetadata = obj.iconMetadata;
|
|
3002
|
+
const path_iconMetadata = path + '.iconMetadata';
|
|
3003
|
+
if (!ArrayIsArray(obj_iconMetadata)) {
|
|
3004
|
+
return new TypeError('Expected "array" but received "' + typeof obj_iconMetadata + '" (at "' + path_iconMetadata + '")');
|
|
3005
|
+
}
|
|
3006
|
+
for (let i = 0; i < obj_iconMetadata.length; i++) {
|
|
3007
|
+
const obj_iconMetadata_item = obj_iconMetadata[i];
|
|
3008
|
+
const path_iconMetadata_item = path_iconMetadata + '[' + i + ']';
|
|
3009
|
+
const referencepath_iconMetadata_itemValidationError = validate$n(obj_iconMetadata_item, path_iconMetadata_item);
|
|
3010
|
+
if (referencepath_iconMetadata_itemValidationError !== null) {
|
|
3011
|
+
let message = 'Object doesn\'t match ConnectorIconMetadataRepresentation (at "' + path_iconMetadata_item + '")\n';
|
|
3012
|
+
message += referencepath_iconMetadata_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3013
|
+
return new TypeError(message);
|
|
3014
|
+
}
|
|
3015
|
+
}
|
|
3016
|
+
const obj_label = obj.label;
|
|
3017
|
+
const path_label = path + '.label';
|
|
3018
|
+
if (typeof obj_label !== 'string') {
|
|
3019
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
3020
|
+
}
|
|
3021
|
+
const obj_labelVersion = obj.labelVersion;
|
|
3022
|
+
const path_labelVersion = path + '.labelVersion';
|
|
3023
|
+
if (typeof obj_labelVersion !== 'string') {
|
|
3024
|
+
return new TypeError('Expected "string" but received "' + typeof obj_labelVersion + '" (at "' + path_labelVersion + '")');
|
|
3025
|
+
}
|
|
3026
|
+
const obj_majorVersion = obj.majorVersion;
|
|
3027
|
+
const path_majorVersion = path + '.majorVersion';
|
|
3028
|
+
if (typeof obj_majorVersion !== 'number' || (typeof obj_majorVersion === 'number' && Math.floor(obj_majorVersion) !== obj_majorVersion)) {
|
|
3029
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_majorVersion + '" (at "' + path_majorVersion + '")');
|
|
3030
|
+
}
|
|
3031
|
+
const obj_releaseStatus = obj.releaseStatus;
|
|
3032
|
+
const path_releaseStatus = path + '.releaseStatus';
|
|
3033
|
+
if (typeof obj_releaseStatus !== 'string') {
|
|
3034
|
+
return new TypeError('Expected "string" but received "' + typeof obj_releaseStatus + '" (at "' + path_releaseStatus + '")');
|
|
3035
|
+
}
|
|
3036
|
+
const obj_supportedAuthenticationTypes = obj.supportedAuthenticationTypes;
|
|
3037
|
+
const path_supportedAuthenticationTypes = path + '.supportedAuthenticationTypes';
|
|
3038
|
+
if (!ArrayIsArray(obj_supportedAuthenticationTypes)) {
|
|
3039
|
+
return new TypeError('Expected "array" but received "' + typeof obj_supportedAuthenticationTypes + '" (at "' + path_supportedAuthenticationTypes + '")');
|
|
3040
|
+
}
|
|
3041
|
+
for (let i = 0; i < obj_supportedAuthenticationTypes.length; i++) {
|
|
3042
|
+
const obj_supportedAuthenticationTypes_item = obj_supportedAuthenticationTypes[i];
|
|
3043
|
+
const path_supportedAuthenticationTypes_item = path_supportedAuthenticationTypes + '[' + i + ']';
|
|
3044
|
+
const referencepath_supportedAuthenticationTypes_itemValidationError = validate$5(obj_supportedAuthenticationTypes_item, path_supportedAuthenticationTypes_item);
|
|
3045
|
+
if (referencepath_supportedAuthenticationTypes_itemValidationError !== null) {
|
|
3046
|
+
let message = 'Object doesn\'t match AuthenticationTypeDefinitionRepresentation (at "' + path_supportedAuthenticationTypes_item + '")\n';
|
|
3047
|
+
message += referencepath_supportedAuthenticationTypes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3048
|
+
return new TypeError(message);
|
|
3049
|
+
}
|
|
3050
|
+
}
|
|
3051
|
+
const obj_vendor = obj.vendor;
|
|
3052
|
+
const path_vendor = path + '.vendor';
|
|
3053
|
+
if (typeof obj_vendor !== 'string') {
|
|
3054
|
+
return new TypeError('Expected "string" but received "' + typeof obj_vendor + '" (at "' + path_vendor + '")');
|
|
3055
|
+
}
|
|
3056
|
+
const obj_version = obj.version;
|
|
3057
|
+
const path_version = path + '.version';
|
|
3058
|
+
if (typeof obj_version !== 'string') {
|
|
3059
|
+
return new TypeError('Expected "string" but received "' + typeof obj_version + '" (at "' + path_version + '")');
|
|
3060
|
+
}
|
|
3061
|
+
})();
|
|
3062
|
+
return v_error === undefined ? null : v_error;
|
|
3063
|
+
}
|
|
3064
|
+
const RepresentationType$3 = 'ExternalConnectivityConnectorDetailsRepresentation';
|
|
3065
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
3066
|
+
return input;
|
|
3067
|
+
}
|
|
3068
|
+
const select$6 = function ExternalConnectivityConnectorDetailsRepresentationSelect() {
|
|
3069
|
+
return {
|
|
3070
|
+
kind: 'Fragment',
|
|
3071
|
+
version: VERSION$3,
|
|
3072
|
+
private: [],
|
|
3073
|
+
opaque: true
|
|
3074
|
+
};
|
|
3075
|
+
};
|
|
3076
|
+
function equals$3(existing, incoming) {
|
|
3077
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
3078
|
+
return false;
|
|
3079
|
+
}
|
|
3080
|
+
return true;
|
|
3081
|
+
}
|
|
3082
|
+
const ingest$3 = function ExternalConnectivityConnectorDetailsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3083
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3084
|
+
const validateError = validate$4(input);
|
|
3085
|
+
if (validateError !== null) {
|
|
3086
|
+
throw validateError;
|
|
3087
|
+
}
|
|
3088
|
+
}
|
|
3089
|
+
const key = path.fullPath;
|
|
3090
|
+
const ttlToUse = TTL$3;
|
|
3091
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "external-connectivity", VERSION$3, RepresentationType$3, equals$3);
|
|
3092
|
+
return createLink(key);
|
|
3093
|
+
};
|
|
3094
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
3095
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3096
|
+
const rootKey = fullPathFactory();
|
|
3097
|
+
rootKeySet.set(rootKey, {
|
|
3098
|
+
namespace: keyPrefix,
|
|
3099
|
+
representationName: RepresentationType$3,
|
|
3100
|
+
mergeable: false
|
|
3101
|
+
});
|
|
3102
|
+
}
|
|
3103
|
+
|
|
3104
|
+
function select$5(luvio, params) {
|
|
3105
|
+
return select$6();
|
|
3106
|
+
}
|
|
3107
|
+
function keyBuilder$6(luvio, params) {
|
|
3108
|
+
return keyPrefix + '::ExternalConnectivityConnectorDetailsRepresentation:(' + 'connectorDeveloperName:' + params.urlParams.connectorDeveloperName + ')';
|
|
3109
|
+
}
|
|
3110
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
3111
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$6(luvio, resourceParams));
|
|
3112
|
+
}
|
|
3113
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
3114
|
+
const { body } = response;
|
|
3115
|
+
const key = keyBuilder$6(luvio, resourceParams);
|
|
3116
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
3117
|
+
const snapshot = luvio.storeLookup({
|
|
3118
|
+
recordId: key,
|
|
3119
|
+
node: select$5(),
|
|
3120
|
+
variables: {},
|
|
3121
|
+
}, snapshotRefresh);
|
|
3122
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3123
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
3124
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
3125
|
+
}
|
|
3126
|
+
}
|
|
3127
|
+
deepFreeze(snapshot.data);
|
|
3128
|
+
return snapshot;
|
|
3129
|
+
}
|
|
3130
|
+
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
3131
|
+
const key = keyBuilder$6(luvio, params);
|
|
3132
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3133
|
+
const storeMetadataParams = {
|
|
3134
|
+
ttl: TTL$3,
|
|
3135
|
+
namespace: keyPrefix,
|
|
3136
|
+
version: VERSION$3,
|
|
3137
|
+
representationName: RepresentationType$3
|
|
3138
|
+
};
|
|
3139
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3140
|
+
return errorSnapshot;
|
|
3141
|
+
}
|
|
3142
|
+
function createResourceRequest$2(config) {
|
|
3143
|
+
const headers = {};
|
|
3144
|
+
return {
|
|
3145
|
+
baseUri: '/services/data/v66.0',
|
|
3146
|
+
basePath: '/external-connectivity/connectors/' + config.urlParams.connectorDeveloperName + '',
|
|
3147
|
+
method: 'get',
|
|
3148
|
+
body: null,
|
|
3149
|
+
urlParams: config.urlParams,
|
|
3150
|
+
queryParams: {},
|
|
3151
|
+
headers,
|
|
3152
|
+
priority: 'normal',
|
|
3153
|
+
};
|
|
3154
|
+
}
|
|
3155
|
+
|
|
3156
|
+
const adapterName$2 = 'getConnectorDetails';
|
|
3157
|
+
const getConnectorDetails_ConfigPropertyMetadata = [
|
|
3158
|
+
generateParamConfigMetadata('connectorDeveloperName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3159
|
+
];
|
|
3160
|
+
const getConnectorDetails_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getConnectorDetails_ConfigPropertyMetadata);
|
|
3161
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$c(getConnectorDetails_ConfigPropertyMetadata);
|
|
3162
|
+
function keyBuilder$5(luvio, config) {
|
|
3163
|
+
const resourceParams = createResourceParams$2(config);
|
|
3164
|
+
return keyBuilder$6(luvio, resourceParams);
|
|
3165
|
+
}
|
|
3166
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
3167
|
+
const config = {};
|
|
3168
|
+
typeCheckConfig$c(untrustedConfig, config, getConnectorDetails_ConfigPropertyMetadata);
|
|
3169
|
+
return config;
|
|
3170
|
+
}
|
|
3171
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
3172
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
3173
|
+
return null;
|
|
3174
|
+
}
|
|
3175
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3176
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
3177
|
+
}
|
|
3178
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
3179
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3180
|
+
return null;
|
|
3181
|
+
}
|
|
3182
|
+
return config;
|
|
3183
|
+
}
|
|
3184
|
+
function adapterFragment$2(luvio, config) {
|
|
3185
|
+
createResourceParams$2(config);
|
|
3186
|
+
return select$5();
|
|
3187
|
+
}
|
|
3188
|
+
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
3189
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
3190
|
+
config,
|
|
3191
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
3192
|
+
});
|
|
3193
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3194
|
+
}
|
|
3195
|
+
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
3196
|
+
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
3197
|
+
config,
|
|
3198
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
3199
|
+
});
|
|
3200
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3201
|
+
}
|
|
3202
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
3203
|
+
const resourceParams = createResourceParams$2(config);
|
|
3204
|
+
const request = createResourceRequest$2(resourceParams);
|
|
3205
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
3206
|
+
.then((response) => {
|
|
3207
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
3208
|
+
const cache = new StoreKeyMap();
|
|
3209
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
3210
|
+
return cache;
|
|
3211
|
+
});
|
|
3212
|
+
}, (response) => {
|
|
3213
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
|
|
3214
|
+
});
|
|
3215
|
+
}
|
|
3216
|
+
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
3217
|
+
return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
3218
|
+
}
|
|
3219
|
+
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
3220
|
+
const { luvio, config } = context;
|
|
3221
|
+
const selector = {
|
|
3222
|
+
recordId: keyBuilder$5(luvio, config),
|
|
3223
|
+
node: adapterFragment$2(luvio, config),
|
|
3224
|
+
variables: {},
|
|
3225
|
+
};
|
|
3226
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
3227
|
+
config,
|
|
3228
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
3229
|
+
});
|
|
3230
|
+
return cacheSnapshot;
|
|
3231
|
+
}
|
|
3232
|
+
const getConnectorDetailsAdapterFactory = (luvio) => function externalConnectivity__getConnectorDetails(untrustedConfig, requestContext) {
|
|
3233
|
+
const config = validateAdapterConfig$2(untrustedConfig, getConnectorDetails_ConfigPropertyNames);
|
|
3234
|
+
// Invalid or incomplete config
|
|
3235
|
+
if (config === null) {
|
|
3236
|
+
return null;
|
|
3237
|
+
}
|
|
3238
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3239
|
+
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
3240
|
+
};
|
|
3241
|
+
|
|
3242
|
+
function validate$3(obj, path = 'IcStandardExternalIdentityProviderRepresentation') {
|
|
3243
|
+
const v_error = (() => {
|
|
3244
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3245
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3246
|
+
}
|
|
3247
|
+
const obj_environment = obj.environment;
|
|
3248
|
+
const path_environment = path + '.environment';
|
|
3249
|
+
if (typeof obj_environment !== 'string') {
|
|
3250
|
+
return new TypeError('Expected "string" but received "' + typeof obj_environment + '" (at "' + path_environment + '")');
|
|
3251
|
+
}
|
|
3252
|
+
const obj_fullName = obj.fullName;
|
|
3253
|
+
const path_fullName = path + '.fullName';
|
|
3254
|
+
if (typeof obj_fullName !== 'string') {
|
|
3255
|
+
return new TypeError('Expected "string" but received "' + typeof obj_fullName + '" (at "' + path_fullName + '")');
|
|
3256
|
+
}
|
|
3257
|
+
const obj_label = obj.label;
|
|
3258
|
+
const path_label = path + '.label';
|
|
3259
|
+
if (typeof obj_label !== 'string') {
|
|
3260
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
3261
|
+
}
|
|
3262
|
+
const obj_prefixedFullName = obj.prefixedFullName;
|
|
3263
|
+
const path_prefixedFullName = path + '.prefixedFullName';
|
|
3264
|
+
if (typeof obj_prefixedFullName !== 'string') {
|
|
3265
|
+
return new TypeError('Expected "string" but received "' + typeof obj_prefixedFullName + '" (at "' + path_prefixedFullName + '")');
|
|
3266
|
+
}
|
|
3267
|
+
})();
|
|
3268
|
+
return v_error === undefined ? null : v_error;
|
|
3269
|
+
}
|
|
3270
|
+
|
|
3271
|
+
const TTL$2 = 500;
|
|
3272
|
+
const VERSION$2 = "72f95c35be550092433b2acd2f914899";
|
|
3273
|
+
function validate$2(obj, path = 'IcStandardExternalIdentityProviderListRepresentation') {
|
|
3274
|
+
const v_error = (() => {
|
|
3275
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3276
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3277
|
+
}
|
|
3278
|
+
const obj_identityProviderRepresentationList = obj.identityProviderRepresentationList;
|
|
3279
|
+
const path_identityProviderRepresentationList = path + '.identityProviderRepresentationList';
|
|
3280
|
+
if (!ArrayIsArray(obj_identityProviderRepresentationList)) {
|
|
3281
|
+
return new TypeError('Expected "array" but received "' + typeof obj_identityProviderRepresentationList + '" (at "' + path_identityProviderRepresentationList + '")');
|
|
3282
|
+
}
|
|
3283
|
+
for (let i = 0; i < obj_identityProviderRepresentationList.length; i++) {
|
|
3284
|
+
const obj_identityProviderRepresentationList_item = obj_identityProviderRepresentationList[i];
|
|
3285
|
+
const path_identityProviderRepresentationList_item = path_identityProviderRepresentationList + '[' + i + ']';
|
|
3286
|
+
const referencepath_identityProviderRepresentationList_itemValidationError = validate$3(obj_identityProviderRepresentationList_item, path_identityProviderRepresentationList_item);
|
|
3287
|
+
if (referencepath_identityProviderRepresentationList_itemValidationError !== null) {
|
|
3288
|
+
let message = 'Object doesn\'t match IcStandardExternalIdentityProviderRepresentation (at "' + path_identityProviderRepresentationList_item + '")\n';
|
|
3289
|
+
message += referencepath_identityProviderRepresentationList_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3290
|
+
return new TypeError(message);
|
|
3291
|
+
}
|
|
3292
|
+
}
|
|
3293
|
+
})();
|
|
3294
|
+
return v_error === undefined ? null : v_error;
|
|
3295
|
+
}
|
|
3296
|
+
const RepresentationType$2 = 'IcStandardExternalIdentityProviderListRepresentation';
|
|
3297
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
3298
|
+
return input;
|
|
3299
|
+
}
|
|
3300
|
+
const select$4 = function IcStandardExternalIdentityProviderListRepresentationSelect() {
|
|
3301
|
+
return {
|
|
3302
|
+
kind: 'Fragment',
|
|
3303
|
+
version: VERSION$2,
|
|
3304
|
+
private: [],
|
|
3305
|
+
opaque: true
|
|
3306
|
+
};
|
|
3307
|
+
};
|
|
3308
|
+
function equals$2(existing, incoming) {
|
|
3309
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
3310
|
+
return false;
|
|
3311
|
+
}
|
|
3312
|
+
return true;
|
|
3313
|
+
}
|
|
3314
|
+
const ingest$2 = function IcStandardExternalIdentityProviderListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3315
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3316
|
+
const validateError = validate$2(input);
|
|
3317
|
+
if (validateError !== null) {
|
|
3318
|
+
throw validateError;
|
|
3319
|
+
}
|
|
3320
|
+
}
|
|
3321
|
+
const key = path.fullPath;
|
|
3322
|
+
const ttlToUse = TTL$2;
|
|
3323
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "external-connectivity", VERSION$2, RepresentationType$2, equals$2);
|
|
3324
|
+
return createLink(key);
|
|
3325
|
+
};
|
|
3326
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
3327
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3328
|
+
const rootKey = fullPathFactory();
|
|
3329
|
+
rootKeySet.set(rootKey, {
|
|
3330
|
+
namespace: keyPrefix,
|
|
3331
|
+
representationName: RepresentationType$2,
|
|
3332
|
+
mergeable: false
|
|
3333
|
+
});
|
|
3334
|
+
}
|
|
3335
|
+
|
|
3336
|
+
function select$3(luvio, params) {
|
|
3337
|
+
return select$4();
|
|
3338
|
+
}
|
|
3339
|
+
function keyBuilder$4(luvio, params) {
|
|
3340
|
+
return keyPrefix + '::IcStandardExternalIdentityProviderListRepresentation:(' + 'version:' + params.queryParams.version + ',' + 'connectorType:' + params.urlParams.connectorType + ')';
|
|
3341
|
+
}
|
|
3342
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
3343
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$4(luvio, resourceParams));
|
|
3344
|
+
}
|
|
3345
|
+
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
3346
|
+
const { body } = response;
|
|
3347
|
+
const key = keyBuilder$4(luvio, resourceParams);
|
|
3348
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
3349
|
+
const snapshot = luvio.storeLookup({
|
|
3350
|
+
recordId: key,
|
|
3351
|
+
node: select$3(),
|
|
3352
|
+
variables: {},
|
|
3353
|
+
}, snapshotRefresh);
|
|
3354
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3355
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
3356
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
3357
|
+
}
|
|
3358
|
+
}
|
|
3359
|
+
deepFreeze(snapshot.data);
|
|
3360
|
+
return snapshot;
|
|
3361
|
+
}
|
|
3362
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
3363
|
+
const key = keyBuilder$4(luvio, params);
|
|
3364
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3365
|
+
const storeMetadataParams = {
|
|
3366
|
+
ttl: TTL$2,
|
|
3367
|
+
namespace: keyPrefix,
|
|
3368
|
+
version: VERSION$2,
|
|
3369
|
+
representationName: RepresentationType$2
|
|
3370
|
+
};
|
|
3371
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3372
|
+
return errorSnapshot;
|
|
3373
|
+
}
|
|
3374
|
+
function createResourceRequest$1(config) {
|
|
3375
|
+
const headers = {};
|
|
3376
|
+
return {
|
|
3377
|
+
baseUri: '/services/data/v66.0',
|
|
3378
|
+
basePath: '/external-connectivity/' + config.urlParams.connectorType + '/spa-mapping',
|
|
3379
|
+
method: 'get',
|
|
3380
|
+
body: null,
|
|
3381
|
+
urlParams: config.urlParams,
|
|
3382
|
+
queryParams: config.queryParams,
|
|
3383
|
+
headers,
|
|
3384
|
+
priority: 'normal',
|
|
3385
|
+
};
|
|
3386
|
+
}
|
|
3387
|
+
|
|
3388
|
+
const adapterName$1 = 'getExternalIdentityProviders';
|
|
3389
|
+
const getExternalIdentityProviders_ConfigPropertyMetadata = [
|
|
3390
|
+
generateParamConfigMetadata('connectorType', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3391
|
+
generateParamConfigMetadata('version', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3392
|
+
];
|
|
3393
|
+
const getExternalIdentityProviders_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getExternalIdentityProviders_ConfigPropertyMetadata);
|
|
3394
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$c(getExternalIdentityProviders_ConfigPropertyMetadata);
|
|
3395
|
+
function keyBuilder$3(luvio, config) {
|
|
3396
|
+
const resourceParams = createResourceParams$1(config);
|
|
3397
|
+
return keyBuilder$4(luvio, resourceParams);
|
|
3398
|
+
}
|
|
3399
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
3400
|
+
const config = {};
|
|
3401
|
+
typeCheckConfig$c(untrustedConfig, config, getExternalIdentityProviders_ConfigPropertyMetadata);
|
|
3402
|
+
return config;
|
|
3403
|
+
}
|
|
3404
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
3405
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
3406
|
+
return null;
|
|
3407
|
+
}
|
|
3408
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3409
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
3410
|
+
}
|
|
3411
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
3412
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3413
|
+
return null;
|
|
3414
|
+
}
|
|
3415
|
+
return config;
|
|
3416
|
+
}
|
|
3417
|
+
function adapterFragment$1(luvio, config) {
|
|
3418
|
+
createResourceParams$1(config);
|
|
3419
|
+
return select$3();
|
|
3420
|
+
}
|
|
3421
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
3422
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
|
|
3423
|
+
config,
|
|
3424
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
3425
|
+
});
|
|
3426
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3427
|
+
}
|
|
3428
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
3429
|
+
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
3430
|
+
config,
|
|
3431
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
3432
|
+
});
|
|
3433
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3434
|
+
}
|
|
3435
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
3436
|
+
const resourceParams = createResourceParams$1(config);
|
|
3437
|
+
const request = createResourceRequest$1(resourceParams);
|
|
3438
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
3439
|
+
.then((response) => {
|
|
3440
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
3441
|
+
const cache = new StoreKeyMap();
|
|
3442
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
3443
|
+
return cache;
|
|
3444
|
+
});
|
|
3445
|
+
}, (response) => {
|
|
3446
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
3447
|
+
});
|
|
3448
|
+
}
|
|
3449
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
3450
|
+
return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
3451
|
+
}
|
|
3452
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
3453
|
+
const { luvio, config } = context;
|
|
3454
|
+
const selector = {
|
|
3455
|
+
recordId: keyBuilder$3(luvio, config),
|
|
3456
|
+
node: adapterFragment$1(luvio, config),
|
|
3457
|
+
variables: {},
|
|
3458
|
+
};
|
|
3459
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
3460
|
+
config,
|
|
3461
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
3462
|
+
});
|
|
3463
|
+
return cacheSnapshot;
|
|
3464
|
+
}
|
|
3465
|
+
const getExternalIdentityProvidersAdapterFactory = (luvio) => function externalConnectivity__getExternalIdentityProviders(untrustedConfig, requestContext) {
|
|
3466
|
+
const config = validateAdapterConfig$1(untrustedConfig, getExternalIdentityProviders_ConfigPropertyNames);
|
|
3467
|
+
// Invalid or incomplete config
|
|
3468
|
+
if (config === null) {
|
|
3469
|
+
return null;
|
|
3470
|
+
}
|
|
3471
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3472
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
3473
|
+
};
|
|
3474
|
+
|
|
3475
|
+
const TTL$1 = 500;
|
|
3476
|
+
const VERSION$1 = "0b4a79a624550132fa06fd5506437efb";
|
|
3477
|
+
function validate$1(obj, path = 'ExternalConnectivityInvocableActionInfoRepresentation') {
|
|
3478
|
+
const v_error = (() => {
|
|
3479
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3480
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3481
|
+
}
|
|
3482
|
+
const obj_category = obj.category;
|
|
3483
|
+
const path_category = path + '.category';
|
|
3484
|
+
let obj_category_union0 = null;
|
|
3485
|
+
const obj_category_union0_error = (() => {
|
|
3486
|
+
if (typeof obj_category !== 'string') {
|
|
3487
|
+
return new TypeError('Expected "string" but received "' + typeof obj_category + '" (at "' + path_category + '")');
|
|
3488
|
+
}
|
|
3489
|
+
})();
|
|
3490
|
+
if (obj_category_union0_error != null) {
|
|
3491
|
+
obj_category_union0 = obj_category_union0_error.message;
|
|
3492
|
+
}
|
|
3493
|
+
let obj_category_union1 = null;
|
|
3494
|
+
const obj_category_union1_error = (() => {
|
|
3495
|
+
if (obj_category !== null) {
|
|
3496
|
+
return new TypeError('Expected "null" but received "' + typeof obj_category + '" (at "' + path_category + '")');
|
|
3497
|
+
}
|
|
3498
|
+
})();
|
|
3499
|
+
if (obj_category_union1_error != null) {
|
|
3500
|
+
obj_category_union1 = obj_category_union1_error.message;
|
|
3501
|
+
}
|
|
3502
|
+
if (obj_category_union0 && obj_category_union1) {
|
|
3503
|
+
let message = 'Object doesn\'t match union (at "' + path_category + '")';
|
|
3504
|
+
message += '\n' + obj_category_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3505
|
+
message += '\n' + obj_category_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3506
|
+
return new TypeError(message);
|
|
3507
|
+
}
|
|
3508
|
+
const obj_description = obj.description;
|
|
3509
|
+
const path_description = path + '.description';
|
|
3510
|
+
let obj_description_union0 = null;
|
|
3511
|
+
const obj_description_union0_error = (() => {
|
|
3512
|
+
if (typeof obj_description !== 'string') {
|
|
3513
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
3514
|
+
}
|
|
3515
|
+
})();
|
|
3516
|
+
if (obj_description_union0_error != null) {
|
|
3517
|
+
obj_description_union0 = obj_description_union0_error.message;
|
|
3518
|
+
}
|
|
3519
|
+
let obj_description_union1 = null;
|
|
3520
|
+
const obj_description_union1_error = (() => {
|
|
3521
|
+
if (obj_description !== null) {
|
|
3522
|
+
return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
3523
|
+
}
|
|
3524
|
+
})();
|
|
3525
|
+
if (obj_description_union1_error != null) {
|
|
3526
|
+
obj_description_union1 = obj_description_union1_error.message;
|
|
3527
|
+
}
|
|
3528
|
+
if (obj_description_union0 && obj_description_union1) {
|
|
3529
|
+
let message = 'Object doesn\'t match union (at "' + path_description + '")';
|
|
3530
|
+
message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3531
|
+
message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3532
|
+
return new TypeError(message);
|
|
3533
|
+
}
|
|
3534
|
+
const obj_durableId = obj.durableId;
|
|
3535
|
+
const path_durableId = path + '.durableId';
|
|
3536
|
+
let obj_durableId_union0 = null;
|
|
3537
|
+
const obj_durableId_union0_error = (() => {
|
|
3538
|
+
if (typeof obj_durableId !== 'string') {
|
|
3539
|
+
return new TypeError('Expected "string" but received "' + typeof obj_durableId + '" (at "' + path_durableId + '")');
|
|
3540
|
+
}
|
|
3541
|
+
})();
|
|
3542
|
+
if (obj_durableId_union0_error != null) {
|
|
3543
|
+
obj_durableId_union0 = obj_durableId_union0_error.message;
|
|
3544
|
+
}
|
|
3545
|
+
let obj_durableId_union1 = null;
|
|
3546
|
+
const obj_durableId_union1_error = (() => {
|
|
3547
|
+
if (obj_durableId !== null) {
|
|
3548
|
+
return new TypeError('Expected "null" but received "' + typeof obj_durableId + '" (at "' + path_durableId + '")');
|
|
3549
|
+
}
|
|
3550
|
+
})();
|
|
3551
|
+
if (obj_durableId_union1_error != null) {
|
|
3552
|
+
obj_durableId_union1 = obj_durableId_union1_error.message;
|
|
3553
|
+
}
|
|
3554
|
+
if (obj_durableId_union0 && obj_durableId_union1) {
|
|
3555
|
+
let message = 'Object doesn\'t match union (at "' + path_durableId + '")';
|
|
3556
|
+
message += '\n' + obj_durableId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3557
|
+
message += '\n' + obj_durableId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3558
|
+
return new TypeError(message);
|
|
3559
|
+
}
|
|
3560
|
+
const obj_label = obj.label;
|
|
3561
|
+
const path_label = path + '.label';
|
|
3562
|
+
let obj_label_union0 = null;
|
|
3563
|
+
const obj_label_union0_error = (() => {
|
|
3564
|
+
if (typeof obj_label !== 'string') {
|
|
3565
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
3566
|
+
}
|
|
3567
|
+
})();
|
|
3568
|
+
if (obj_label_union0_error != null) {
|
|
3569
|
+
obj_label_union0 = obj_label_union0_error.message;
|
|
3570
|
+
}
|
|
3571
|
+
let obj_label_union1 = null;
|
|
3572
|
+
const obj_label_union1_error = (() => {
|
|
3573
|
+
if (obj_label !== null) {
|
|
3574
|
+
return new TypeError('Expected "null" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
3575
|
+
}
|
|
3576
|
+
})();
|
|
3577
|
+
if (obj_label_union1_error != null) {
|
|
3578
|
+
obj_label_union1 = obj_label_union1_error.message;
|
|
3579
|
+
}
|
|
3580
|
+
if (obj_label_union0 && obj_label_union1) {
|
|
3581
|
+
let message = 'Object doesn\'t match union (at "' + path_label + '")';
|
|
3582
|
+
message += '\n' + obj_label_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3583
|
+
message += '\n' + obj_label_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3584
|
+
return new TypeError(message);
|
|
3585
|
+
}
|
|
3586
|
+
const obj_name = obj.name;
|
|
3587
|
+
const path_name = path + '.name';
|
|
3588
|
+
let obj_name_union0 = null;
|
|
3589
|
+
const obj_name_union0_error = (() => {
|
|
3590
|
+
if (typeof obj_name !== 'string') {
|
|
3591
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
3592
|
+
}
|
|
3593
|
+
})();
|
|
3594
|
+
if (obj_name_union0_error != null) {
|
|
3595
|
+
obj_name_union0 = obj_name_union0_error.message;
|
|
3596
|
+
}
|
|
3597
|
+
let obj_name_union1 = null;
|
|
3598
|
+
const obj_name_union1_error = (() => {
|
|
3599
|
+
if (obj_name !== null) {
|
|
3600
|
+
return new TypeError('Expected "null" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
3601
|
+
}
|
|
3602
|
+
})();
|
|
3603
|
+
if (obj_name_union1_error != null) {
|
|
3604
|
+
obj_name_union1 = obj_name_union1_error.message;
|
|
3605
|
+
}
|
|
3606
|
+
if (obj_name_union0 && obj_name_union1) {
|
|
3607
|
+
let message = 'Object doesn\'t match union (at "' + path_name + '")';
|
|
3608
|
+
message += '\n' + obj_name_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3609
|
+
message += '\n' + obj_name_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3610
|
+
return new TypeError(message);
|
|
3611
|
+
}
|
|
3612
|
+
const obj_type = obj.type;
|
|
3613
|
+
const path_type = path + '.type';
|
|
3614
|
+
let obj_type_union0 = null;
|
|
3615
|
+
const obj_type_union0_error = (() => {
|
|
3616
|
+
if (typeof obj_type !== 'string') {
|
|
3617
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
3618
|
+
}
|
|
3619
|
+
})();
|
|
3620
|
+
if (obj_type_union0_error != null) {
|
|
3621
|
+
obj_type_union0 = obj_type_union0_error.message;
|
|
3622
|
+
}
|
|
3623
|
+
let obj_type_union1 = null;
|
|
3624
|
+
const obj_type_union1_error = (() => {
|
|
3625
|
+
if (obj_type !== null) {
|
|
3626
|
+
return new TypeError('Expected "null" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
3627
|
+
}
|
|
3628
|
+
})();
|
|
3629
|
+
if (obj_type_union1_error != null) {
|
|
3630
|
+
obj_type_union1 = obj_type_union1_error.message;
|
|
3631
|
+
}
|
|
3632
|
+
if (obj_type_union0 && obj_type_union1) {
|
|
3633
|
+
let message = 'Object doesn\'t match union (at "' + path_type + '")';
|
|
3634
|
+
message += '\n' + obj_type_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3635
|
+
message += '\n' + obj_type_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3636
|
+
return new TypeError(message);
|
|
3637
|
+
}
|
|
3638
|
+
})();
|
|
3639
|
+
return v_error === undefined ? null : v_error;
|
|
3640
|
+
}
|
|
3641
|
+
const RepresentationType$1 = 'ExternalConnectivityInvocableActionInfoRepresentation';
|
|
3642
|
+
function keyBuilder$2(luvio, config) {
|
|
3643
|
+
return keyPrefix + '::' + RepresentationType$1 + ':' + (config.name === null ? '' : config.name);
|
|
3644
|
+
}
|
|
3645
|
+
function keyBuilderFromType(luvio, object) {
|
|
3646
|
+
const keyParams = {
|
|
3647
|
+
name: object.name
|
|
3648
|
+
};
|
|
3649
|
+
return keyBuilder$2(luvio, keyParams);
|
|
3650
|
+
}
|
|
3651
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
3652
|
+
return input;
|
|
3653
|
+
}
|
|
3654
|
+
const select$2 = function ExternalConnectivityInvocableActionInfoRepresentationSelect() {
|
|
3655
|
+
return {
|
|
3656
|
+
kind: 'Fragment',
|
|
3657
|
+
version: VERSION$1,
|
|
3658
|
+
private: [],
|
|
3659
|
+
selections: [
|
|
3660
|
+
{
|
|
3661
|
+
name: 'category',
|
|
3662
|
+
kind: 'Scalar'
|
|
3663
|
+
},
|
|
3664
|
+
{
|
|
3665
|
+
name: 'description',
|
|
3666
|
+
kind: 'Scalar'
|
|
3667
|
+
},
|
|
3668
|
+
{
|
|
3669
|
+
name: 'durableId',
|
|
3670
|
+
kind: 'Scalar'
|
|
3671
|
+
},
|
|
3672
|
+
{
|
|
3673
|
+
name: 'label',
|
|
3674
|
+
kind: 'Scalar'
|
|
3675
|
+
},
|
|
3676
|
+
{
|
|
3677
|
+
name: 'name',
|
|
3678
|
+
kind: 'Scalar'
|
|
3679
|
+
},
|
|
3680
|
+
{
|
|
3681
|
+
name: 'type',
|
|
3682
|
+
kind: 'Scalar'
|
|
3683
|
+
}
|
|
3684
|
+
]
|
|
3685
|
+
};
|
|
3686
|
+
};
|
|
3687
|
+
function equals$1(existing, incoming) {
|
|
3688
|
+
const existing_category = existing.category;
|
|
3689
|
+
const incoming_category = incoming.category;
|
|
3690
|
+
if (!(existing_category === incoming_category)) {
|
|
3691
|
+
return false;
|
|
3692
|
+
}
|
|
3693
|
+
const existing_description = existing.description;
|
|
3694
|
+
const incoming_description = incoming.description;
|
|
3695
|
+
if (!(existing_description === incoming_description)) {
|
|
3696
|
+
return false;
|
|
3697
|
+
}
|
|
3698
|
+
const existing_durableId = existing.durableId;
|
|
3699
|
+
const incoming_durableId = incoming.durableId;
|
|
3700
|
+
if (!(existing_durableId === incoming_durableId)) {
|
|
3701
|
+
return false;
|
|
3702
|
+
}
|
|
3703
|
+
const existing_label = existing.label;
|
|
3704
|
+
const incoming_label = incoming.label;
|
|
3705
|
+
if (!(existing_label === incoming_label)) {
|
|
3706
|
+
return false;
|
|
3707
|
+
}
|
|
3708
|
+
const existing_name = existing.name;
|
|
3709
|
+
const incoming_name = incoming.name;
|
|
3710
|
+
if (!(existing_name === incoming_name)) {
|
|
3711
|
+
return false;
|
|
3712
|
+
}
|
|
3713
|
+
const existing_type = existing.type;
|
|
3714
|
+
const incoming_type = incoming.type;
|
|
3715
|
+
if (!(existing_type === incoming_type)) {
|
|
3716
|
+
return false;
|
|
3717
|
+
}
|
|
3718
|
+
return true;
|
|
3719
|
+
}
|
|
3720
|
+
const ingest$1 = function ExternalConnectivityInvocableActionInfoRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3721
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3722
|
+
const validateError = validate$1(input);
|
|
3723
|
+
if (validateError !== null) {
|
|
3724
|
+
throw validateError;
|
|
3725
|
+
}
|
|
3726
|
+
}
|
|
3727
|
+
const key = keyBuilderFromType(luvio, input);
|
|
3728
|
+
const ttlToUse = TTL$1;
|
|
3729
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "external-connectivity", VERSION$1, RepresentationType$1, equals$1);
|
|
3730
|
+
return createLink(key);
|
|
3731
|
+
};
|
|
3732
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
3733
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3734
|
+
const rootKey = keyBuilderFromType(luvio, input);
|
|
3735
|
+
rootKeySet.set(rootKey, {
|
|
3736
|
+
namespace: keyPrefix,
|
|
3737
|
+
representationName: RepresentationType$1,
|
|
3738
|
+
mergeable: false
|
|
3739
|
+
});
|
|
3740
|
+
}
|
|
3741
|
+
|
|
3742
|
+
const TTL = 500;
|
|
3743
|
+
const VERSION = "4dfa2e248d8028a0432ca833b2ddb964";
|
|
3744
|
+
function validate(obj, path = 'ExternalConnectivityInvocableActionListRepresentation') {
|
|
3745
|
+
const v_error = (() => {
|
|
3746
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3747
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3748
|
+
}
|
|
3749
|
+
const obj_invocableActions = obj.invocableActions;
|
|
3750
|
+
const path_invocableActions = path + '.invocableActions';
|
|
3751
|
+
if (!ArrayIsArray(obj_invocableActions)) {
|
|
3752
|
+
return new TypeError('Expected "array" but received "' + typeof obj_invocableActions + '" (at "' + path_invocableActions + '")');
|
|
3753
|
+
}
|
|
3754
|
+
for (let i = 0; i < obj_invocableActions.length; i++) {
|
|
3755
|
+
const obj_invocableActions_item = obj_invocableActions[i];
|
|
3756
|
+
const path_invocableActions_item = path_invocableActions + '[' + i + ']';
|
|
3757
|
+
if (typeof obj_invocableActions_item !== 'object' || Array.isArray(obj_invocableActions_item)) {
|
|
3758
|
+
return new TypeError('Expected "object" but received "' + typeof obj_invocableActions_item + '" (at "' + path_invocableActions_item + '")');
|
|
3759
|
+
}
|
|
3760
|
+
}
|
|
3761
|
+
})();
|
|
3762
|
+
return v_error === undefined ? null : v_error;
|
|
3763
|
+
}
|
|
3764
|
+
const RepresentationType = 'ExternalConnectivityInvocableActionListRepresentation';
|
|
3765
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
3766
|
+
const input_invocableActions = input.invocableActions;
|
|
3767
|
+
const input_invocableActions_id = path.fullPath + '__invocableActions';
|
|
3768
|
+
for (let i = 0; i < input_invocableActions.length; i++) {
|
|
3769
|
+
const input_invocableActions_item = input_invocableActions[i];
|
|
3770
|
+
let input_invocableActions_item_id = input_invocableActions_id + '__' + i;
|
|
3771
|
+
input_invocableActions[i] = ingest$1(input_invocableActions_item, {
|
|
3772
|
+
fullPath: input_invocableActions_item_id,
|
|
3773
|
+
propertyName: i,
|
|
3774
|
+
parent: {
|
|
3775
|
+
data: input,
|
|
3776
|
+
key: path.fullPath,
|
|
3777
|
+
existing: existing,
|
|
3778
|
+
},
|
|
3779
|
+
ttl: path.ttl
|
|
3780
|
+
}, luvio, store, timestamp);
|
|
3781
|
+
}
|
|
3782
|
+
return input;
|
|
3783
|
+
}
|
|
3784
|
+
const select$1 = function ExternalConnectivityInvocableActionListRepresentationSelect() {
|
|
3785
|
+
return {
|
|
3786
|
+
kind: 'Fragment',
|
|
3787
|
+
version: VERSION,
|
|
3788
|
+
private: [],
|
|
3789
|
+
selections: [
|
|
3790
|
+
{
|
|
3791
|
+
name: 'invocableActions',
|
|
3792
|
+
kind: 'Link',
|
|
3793
|
+
plural: true,
|
|
3794
|
+
fragment: select$2()
|
|
3795
|
+
}
|
|
3796
|
+
]
|
|
3797
|
+
};
|
|
3798
|
+
};
|
|
3799
|
+
function equals(existing, incoming) {
|
|
3800
|
+
const existing_invocableActions = existing.invocableActions;
|
|
3801
|
+
const incoming_invocableActions = incoming.invocableActions;
|
|
3802
|
+
const equals_invocableActions_items = equalsArray(existing_invocableActions, incoming_invocableActions, (existing_invocableActions_item, incoming_invocableActions_item) => {
|
|
3803
|
+
if (!(existing_invocableActions_item.__ref === incoming_invocableActions_item.__ref)) {
|
|
3804
|
+
return false;
|
|
3805
|
+
}
|
|
3806
|
+
});
|
|
3807
|
+
if (equals_invocableActions_items === false) {
|
|
3808
|
+
return false;
|
|
3809
|
+
}
|
|
3810
|
+
return true;
|
|
3811
|
+
}
|
|
3812
|
+
const ingest = function ExternalConnectivityInvocableActionListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3813
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3814
|
+
const validateError = validate(input);
|
|
3815
|
+
if (validateError !== null) {
|
|
3816
|
+
throw validateError;
|
|
3817
|
+
}
|
|
3818
|
+
}
|
|
3819
|
+
const key = path.fullPath;
|
|
3820
|
+
const ttlToUse = TTL;
|
|
3821
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "external-connectivity", VERSION, RepresentationType, equals);
|
|
3822
|
+
return createLink(key);
|
|
3823
|
+
};
|
|
3824
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
3825
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3826
|
+
const rootKey = fullPathFactory();
|
|
3827
|
+
rootKeySet.set(rootKey, {
|
|
3828
|
+
namespace: keyPrefix,
|
|
3829
|
+
representationName: RepresentationType,
|
|
3830
|
+
mergeable: false
|
|
3831
|
+
});
|
|
3832
|
+
const input_invocableActions_length = input.invocableActions.length;
|
|
3833
|
+
for (let i = 0; i < input_invocableActions_length; i++) {
|
|
3834
|
+
getTypeCacheKeys$1(rootKeySet, luvio, input.invocableActions[i]);
|
|
3835
|
+
}
|
|
3836
|
+
}
|
|
3837
|
+
|
|
3838
|
+
function select(luvio, params) {
|
|
3839
|
+
return select$1();
|
|
3840
|
+
}
|
|
3841
|
+
function keyBuilder$1(luvio, params) {
|
|
3842
|
+
return keyPrefix + '::ExternalConnectivityInvocableActionListRepresentation:(' + 'invocableActionTypes:' + params.queryParams.invocableActionTypes + ')';
|
|
3843
|
+
}
|
|
3844
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
3845
|
+
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
3846
|
+
}
|
|
3847
|
+
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
3848
|
+
const { body } = response;
|
|
3849
|
+
const key = keyBuilder$1(luvio, resourceParams);
|
|
3850
|
+
luvio.storeIngest(key, ingest, body);
|
|
3851
|
+
const snapshot = luvio.storeLookup({
|
|
3852
|
+
recordId: key,
|
|
3853
|
+
node: select(),
|
|
3854
|
+
variables: {},
|
|
3855
|
+
}, snapshotRefresh);
|
|
3856
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3857
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
3858
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
3859
|
+
}
|
|
3860
|
+
}
|
|
3861
|
+
deepFreeze(snapshot.data);
|
|
3862
|
+
return snapshot;
|
|
3863
|
+
}
|
|
3864
|
+
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
3865
|
+
const key = keyBuilder$1(luvio, params);
|
|
3866
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3867
|
+
const storeMetadataParams = {
|
|
3868
|
+
ttl: TTL,
|
|
3869
|
+
namespace: keyPrefix,
|
|
3870
|
+
version: VERSION,
|
|
3871
|
+
representationName: RepresentationType
|
|
3872
|
+
};
|
|
3873
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3874
|
+
return errorSnapshot;
|
|
3875
|
+
}
|
|
3876
|
+
function createResourceRequest(config) {
|
|
3877
|
+
const headers = {};
|
|
3878
|
+
return {
|
|
3879
|
+
baseUri: '/services/data/v66.0',
|
|
3880
|
+
basePath: '/external-connectivity/invocable-actions',
|
|
3881
|
+
method: 'get',
|
|
3882
|
+
body: null,
|
|
3883
|
+
urlParams: {},
|
|
3884
|
+
queryParams: config.queryParams,
|
|
3885
|
+
headers,
|
|
3886
|
+
priority: 'normal',
|
|
3887
|
+
};
|
|
3888
|
+
}
|
|
3889
|
+
|
|
3890
|
+
const adapterName = 'getInvocableActions';
|
|
3891
|
+
const getInvocableActions_ConfigPropertyMetadata = [
|
|
3892
|
+
generateParamConfigMetadata('invocableActionTypes', true, 1 /* QueryParameter */, 0 /* String */, true),
|
|
3893
|
+
];
|
|
3894
|
+
const getInvocableActions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getInvocableActions_ConfigPropertyMetadata);
|
|
3895
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$c(getInvocableActions_ConfigPropertyMetadata);
|
|
3896
|
+
function keyBuilder(luvio, config) {
|
|
3897
|
+
const resourceParams = createResourceParams(config);
|
|
3898
|
+
return keyBuilder$1(luvio, resourceParams);
|
|
3899
|
+
}
|
|
3900
|
+
function typeCheckConfig(untrustedConfig) {
|
|
3901
|
+
const config = {};
|
|
3902
|
+
typeCheckConfig$c(untrustedConfig, config, getInvocableActions_ConfigPropertyMetadata);
|
|
3903
|
+
return config;
|
|
3904
|
+
}
|
|
3905
|
+
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
3906
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
3907
|
+
return null;
|
|
3908
|
+
}
|
|
3909
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3910
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
3911
|
+
}
|
|
3912
|
+
const config = typeCheckConfig(untrustedConfig);
|
|
3913
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3914
|
+
return null;
|
|
3915
|
+
}
|
|
3916
|
+
return config;
|
|
3917
|
+
}
|
|
3918
|
+
function adapterFragment(luvio, config) {
|
|
3919
|
+
createResourceParams(config);
|
|
3920
|
+
return select();
|
|
3921
|
+
}
|
|
3922
|
+
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
3923
|
+
const snapshot = ingestSuccess(luvio, resourceParams, response, {
|
|
3924
|
+
config,
|
|
3925
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
3926
|
+
});
|
|
3927
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3928
|
+
}
|
|
3929
|
+
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
3930
|
+
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
3931
|
+
config,
|
|
3932
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
3933
|
+
});
|
|
3934
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3935
|
+
}
|
|
3936
|
+
function buildNetworkSnapshot(luvio, config, options) {
|
|
3937
|
+
const resourceParams = createResourceParams(config);
|
|
3938
|
+
const request = createResourceRequest(resourceParams);
|
|
3939
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
3940
|
+
.then((response) => {
|
|
3941
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
3942
|
+
const cache = new StoreKeyMap();
|
|
3943
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
3944
|
+
return cache;
|
|
3945
|
+
});
|
|
3946
|
+
}, (response) => {
|
|
3947
|
+
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
3948
|
+
});
|
|
3949
|
+
}
|
|
3950
|
+
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
3951
|
+
return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
3952
|
+
}
|
|
3953
|
+
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
3954
|
+
const { luvio, config } = context;
|
|
3955
|
+
const selector = {
|
|
3956
|
+
recordId: keyBuilder(luvio, config),
|
|
3957
|
+
node: adapterFragment(luvio, config),
|
|
3958
|
+
variables: {},
|
|
3959
|
+
};
|
|
3960
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
3961
|
+
config,
|
|
3962
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
3963
|
+
});
|
|
3964
|
+
return cacheSnapshot;
|
|
3965
|
+
}
|
|
3966
|
+
const getInvocableActionsAdapterFactory = (luvio) => function externalConnectivity__getInvocableActions(untrustedConfig, requestContext) {
|
|
3967
|
+
const config = validateAdapterConfig(untrustedConfig, getInvocableActions_ConfigPropertyNames);
|
|
3968
|
+
// Invalid or incomplete config
|
|
3969
|
+
if (config === null) {
|
|
3970
|
+
return null;
|
|
3971
|
+
}
|
|
3972
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3973
|
+
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
3974
|
+
};
|
|
3975
|
+
|
|
3976
|
+
export { createConnectionAdapterFactory, deleteConnectionAdapterFactory, getConnectionDetailsAdapterFactory, getConnectionsAdapterFactory, getConnectorDetailsAdapterFactory, getConnectorsAdapterFactory, getExternalConnectivityConnectionReferencedFlowsAdapterFactory, getExternalIdentityProvidersAdapterFactory, getInvocableActionsAdapterFactory, notifyUpdateAvailableFactory as notifyConnectionListUpdateAvailableFactory, refreshMetadataAdapterFactory, testConnectionAdapterFactory, updateConnectionAdapterFactory };
|