@salesforce/lds-adapters-platform-external-connectivity 1.282.0 → 1.283.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/es2018/platform-external-connectivity.js +439 -198
- package/dist/es/es2018/types/src/generated/adapters/createConnection.d.ts +2 -1
- package/dist/es/es2018/types/src/generated/adapters/testConnection.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +2 -1
- package/dist/es/es2018/types/src/generated/resources/postExternalConnectivityConnections.d.ts +2 -1
- package/dist/es/es2018/types/src/generated/resources/postExternalConnectivityConnectionsTestByConnectionDeveloperName.d.ts +12 -0
- package/dist/es/es2018/types/src/generated/types/AuthenticationTypeInputRepresentation.d.ts +3 -3
- package/dist/es/es2018/types/src/generated/types/ExternalConnectivityConnectionInputRepresentation.d.ts +4 -3
- package/dist/es/es2018/types/src/generated/types/ExternalConnectivityConnectionTestResultRepresentation.d.ts +50 -0
- package/package.json +3 -3
- package/sfdc/index.js +543 -299
- package/src/raml/api.raml +36 -2
- package/src/raml/luvio.raml +9 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$4, StoreKeyMap, createResourceParams as createResourceParams$
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$4, StoreKeyMap, createResourceParams as createResourceParams$6, typeCheckConfig as typeCheckConfig$6 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -92,7 +92,7 @@ function createLink(ref) {
|
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
function validate$
|
|
95
|
+
function validate$d(obj, path = 'ConnectorIconMetadataRepresentation') {
|
|
96
96
|
const v_error = (() => {
|
|
97
97
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
98
98
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -126,9 +126,9 @@ function validate$b(obj, path = 'ConnectorIconMetadataRepresentation') {
|
|
|
126
126
|
return v_error === undefined ? null : v_error;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
const TTL$
|
|
130
|
-
const VERSION$
|
|
131
|
-
function validate$
|
|
129
|
+
const TTL$6 = 500;
|
|
130
|
+
const VERSION$7 = "3e461ecbd697039c1881e691a2ee7bef";
|
|
131
|
+
function validate$c(obj, path = 'ExternalConnectivityConnectorRepresentation') {
|
|
132
132
|
const v_error = (() => {
|
|
133
133
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
134
134
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -156,7 +156,7 @@ function validate$a(obj, path = 'ExternalConnectivityConnectorRepresentation') {
|
|
|
156
156
|
for (let i = 0; i < obj_iconMetadata.length; i++) {
|
|
157
157
|
const obj_iconMetadata_item = obj_iconMetadata[i];
|
|
158
158
|
const path_iconMetadata_item = path_iconMetadata + '[' + i + ']';
|
|
159
|
-
const referencepath_iconMetadata_itemValidationError = validate$
|
|
159
|
+
const referencepath_iconMetadata_itemValidationError = validate$d(obj_iconMetadata_item, path_iconMetadata_item);
|
|
160
160
|
if (referencepath_iconMetadata_itemValidationError !== null) {
|
|
161
161
|
let message = 'Object doesn\'t match ConnectorIconMetadataRepresentation (at "' + path_iconMetadata_item + '")\n';
|
|
162
162
|
message += referencepath_iconMetadata_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -196,48 +196,48 @@ function validate$a(obj, path = 'ExternalConnectivityConnectorRepresentation') {
|
|
|
196
196
|
})();
|
|
197
197
|
return v_error === undefined ? null : v_error;
|
|
198
198
|
}
|
|
199
|
-
const RepresentationType$
|
|
200
|
-
function normalize$
|
|
199
|
+
const RepresentationType$7 = 'ExternalConnectivityConnectorRepresentation';
|
|
200
|
+
function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
201
201
|
return input;
|
|
202
202
|
}
|
|
203
|
-
const select$
|
|
203
|
+
const select$d = function ExternalConnectivityConnectorRepresentationSelect() {
|
|
204
204
|
return {
|
|
205
205
|
kind: 'Fragment',
|
|
206
|
-
version: VERSION$
|
|
206
|
+
version: VERSION$7,
|
|
207
207
|
private: [],
|
|
208
208
|
opaque: true
|
|
209
209
|
};
|
|
210
210
|
};
|
|
211
|
-
function equals$
|
|
211
|
+
function equals$7(existing, incoming) {
|
|
212
212
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
213
213
|
return false;
|
|
214
214
|
}
|
|
215
215
|
return true;
|
|
216
216
|
}
|
|
217
|
-
const ingest$
|
|
217
|
+
const ingest$7 = function ExternalConnectivityConnectorRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
218
218
|
if (process.env.NODE_ENV !== 'production') {
|
|
219
|
-
const validateError = validate$
|
|
219
|
+
const validateError = validate$c(input);
|
|
220
220
|
if (validateError !== null) {
|
|
221
221
|
throw validateError;
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
224
|
const key = path.fullPath;
|
|
225
|
-
const ttlToUse = TTL$
|
|
226
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
225
|
+
const ttlToUse = TTL$6;
|
|
226
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$7, "external-connectivity", VERSION$7, RepresentationType$7, equals$7);
|
|
227
227
|
return createLink(key);
|
|
228
228
|
};
|
|
229
|
-
function getTypeCacheKeys$
|
|
229
|
+
function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
|
|
230
230
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
231
231
|
const rootKey = fullPathFactory();
|
|
232
232
|
rootKeySet.set(rootKey, {
|
|
233
233
|
namespace: keyPrefix,
|
|
234
|
-
representationName: RepresentationType$
|
|
234
|
+
representationName: RepresentationType$7,
|
|
235
235
|
mergeable: false
|
|
236
236
|
});
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
-
const VERSION$
|
|
240
|
-
function validate$
|
|
239
|
+
const VERSION$6 = "461b7d8becf716990a936476f2158529";
|
|
240
|
+
function validate$b(obj, path = 'ExternalConnectivityConnectionRepresentation') {
|
|
241
241
|
const v_error = (() => {
|
|
242
242
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
243
243
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -295,11 +295,11 @@ function validate$9(obj, path = 'ExternalConnectivityConnectionRepresentation')
|
|
|
295
295
|
})();
|
|
296
296
|
return v_error === undefined ? null : v_error;
|
|
297
297
|
}
|
|
298
|
-
const RepresentationType$
|
|
299
|
-
function normalize$
|
|
298
|
+
const RepresentationType$6 = 'ExternalConnectivityConnectionRepresentation';
|
|
299
|
+
function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
300
300
|
const input_externalConnectorMetadata = input.externalConnectorMetadata;
|
|
301
301
|
const input_externalConnectorMetadata_id = path.fullPath + '__externalConnectorMetadata';
|
|
302
|
-
input.externalConnectorMetadata = ingest$
|
|
302
|
+
input.externalConnectorMetadata = ingest$7(input_externalConnectorMetadata, {
|
|
303
303
|
fullPath: input_externalConnectorMetadata_id,
|
|
304
304
|
propertyName: 'externalConnectorMetadata',
|
|
305
305
|
parent: {
|
|
@@ -311,10 +311,10 @@ function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
|
311
311
|
}, luvio, store, timestamp);
|
|
312
312
|
return input;
|
|
313
313
|
}
|
|
314
|
-
const select$
|
|
314
|
+
const select$c = function ExternalConnectivityConnectionRepresentationSelect() {
|
|
315
315
|
return {
|
|
316
316
|
kind: 'Fragment',
|
|
317
|
-
version: VERSION$
|
|
317
|
+
version: VERSION$6,
|
|
318
318
|
private: [],
|
|
319
319
|
selections: [
|
|
320
320
|
{
|
|
@@ -340,7 +340,7 @@ const select$a = function ExternalConnectivityConnectionRepresentationSelect() {
|
|
|
340
340
|
{
|
|
341
341
|
name: 'externalConnectorMetadata',
|
|
342
342
|
kind: 'Link',
|
|
343
|
-
fragment: select$
|
|
343
|
+
fragment: select$d()
|
|
344
344
|
},
|
|
345
345
|
{
|
|
346
346
|
name: 'lastModifiedBy',
|
|
@@ -361,7 +361,7 @@ const select$a = function ExternalConnectivityConnectionRepresentationSelect() {
|
|
|
361
361
|
]
|
|
362
362
|
};
|
|
363
363
|
};
|
|
364
|
-
function equals$
|
|
364
|
+
function equals$6(existing, incoming) {
|
|
365
365
|
const existing_established = existing.established;
|
|
366
366
|
const incoming_established = incoming.established;
|
|
367
367
|
if (!(existing_established === incoming_established)) {
|
|
@@ -414,32 +414,32 @@ function equals$5(existing, incoming) {
|
|
|
414
414
|
}
|
|
415
415
|
return true;
|
|
416
416
|
}
|
|
417
|
-
const ingest$
|
|
417
|
+
const ingest$6 = function ExternalConnectivityConnectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
418
418
|
if (process.env.NODE_ENV !== 'production') {
|
|
419
|
-
const validateError = validate$
|
|
419
|
+
const validateError = validate$b(input);
|
|
420
420
|
if (validateError !== null) {
|
|
421
421
|
throw validateError;
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
424
|
const key = path.fullPath;
|
|
425
425
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 300000;
|
|
426
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
426
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "external-connectivity", VERSION$6, RepresentationType$6, equals$6);
|
|
427
427
|
return createLink(key);
|
|
428
428
|
};
|
|
429
|
-
function getTypeCacheKeys$
|
|
429
|
+
function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
|
|
430
430
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
431
431
|
const rootKey = fullPathFactory();
|
|
432
432
|
rootKeySet.set(rootKey, {
|
|
433
433
|
namespace: keyPrefix,
|
|
434
|
-
representationName: RepresentationType$
|
|
434
|
+
representationName: RepresentationType$6,
|
|
435
435
|
mergeable: false
|
|
436
436
|
});
|
|
437
|
-
getTypeCacheKeys$
|
|
437
|
+
getTypeCacheKeys$7(rootKeySet, luvio, input.externalConnectorMetadata, () => rootKey + "__" + "externalConnectorMetadata");
|
|
438
438
|
}
|
|
439
439
|
|
|
440
|
-
const TTL$
|
|
441
|
-
const VERSION$
|
|
442
|
-
function validate$
|
|
440
|
+
const TTL$5 = 500;
|
|
441
|
+
const VERSION$5 = "20bb37f8c88f1dd513107a5128a6f4a5";
|
|
442
|
+
function validate$a(obj, path = 'ExternalConnectivityConnectionListRepresentation') {
|
|
443
443
|
const v_error = (() => {
|
|
444
444
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
445
445
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -459,14 +459,14 @@ function validate$8(obj, path = 'ExternalConnectivityConnectionListRepresentatio
|
|
|
459
459
|
})();
|
|
460
460
|
return v_error === undefined ? null : v_error;
|
|
461
461
|
}
|
|
462
|
-
const RepresentationType$
|
|
463
|
-
function normalize$
|
|
462
|
+
const RepresentationType$5 = 'ExternalConnectivityConnectionListRepresentation';
|
|
463
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
464
464
|
const input_connections = input.connections;
|
|
465
465
|
const input_connections_id = path.fullPath + '__connections';
|
|
466
466
|
for (let i = 0; i < input_connections.length; i++) {
|
|
467
467
|
const input_connections_item = input_connections[i];
|
|
468
468
|
let input_connections_item_id = input_connections_id + '__' + i;
|
|
469
|
-
input_connections[i] = ingest$
|
|
469
|
+
input_connections[i] = ingest$6(input_connections_item, {
|
|
470
470
|
fullPath: input_connections_item_id,
|
|
471
471
|
propertyName: i,
|
|
472
472
|
parent: {
|
|
@@ -479,22 +479,22 @@ function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
|
479
479
|
}
|
|
480
480
|
return input;
|
|
481
481
|
}
|
|
482
|
-
const select$
|
|
482
|
+
const select$b = function ExternalConnectivityConnectionListRepresentationSelect() {
|
|
483
483
|
return {
|
|
484
484
|
kind: 'Fragment',
|
|
485
|
-
version: VERSION$
|
|
485
|
+
version: VERSION$5,
|
|
486
486
|
private: [],
|
|
487
487
|
selections: [
|
|
488
488
|
{
|
|
489
489
|
name: 'connections',
|
|
490
490
|
kind: 'Link',
|
|
491
491
|
plural: true,
|
|
492
|
-
fragment: select$
|
|
492
|
+
fragment: select$c()
|
|
493
493
|
}
|
|
494
494
|
]
|
|
495
495
|
};
|
|
496
496
|
};
|
|
497
|
-
function equals$
|
|
497
|
+
function equals$5(existing, incoming) {
|
|
498
498
|
const existing_connections = existing.connections;
|
|
499
499
|
const incoming_connections = incoming.connections;
|
|
500
500
|
const equals_connections_items = equalsArray(existing_connections, incoming_connections, (existing_connections_item, incoming_connections_item) => {
|
|
@@ -507,48 +507,48 @@ function equals$4(existing, incoming) {
|
|
|
507
507
|
}
|
|
508
508
|
return true;
|
|
509
509
|
}
|
|
510
|
-
const ingest$
|
|
510
|
+
const ingest$5 = function ExternalConnectivityConnectionListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
511
511
|
if (process.env.NODE_ENV !== 'production') {
|
|
512
|
-
const validateError = validate$
|
|
512
|
+
const validateError = validate$a(input);
|
|
513
513
|
if (validateError !== null) {
|
|
514
514
|
throw validateError;
|
|
515
515
|
}
|
|
516
516
|
}
|
|
517
517
|
const key = path.fullPath;
|
|
518
|
-
const ttlToUse = TTL$
|
|
519
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
518
|
+
const ttlToUse = TTL$5;
|
|
519
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "external-connectivity", VERSION$5, RepresentationType$5, equals$5);
|
|
520
520
|
return createLink(key);
|
|
521
521
|
};
|
|
522
|
-
function getTypeCacheKeys$
|
|
522
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
523
523
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
524
524
|
const rootKey = fullPathFactory();
|
|
525
525
|
rootKeySet.set(rootKey, {
|
|
526
526
|
namespace: keyPrefix,
|
|
527
|
-
representationName: RepresentationType$
|
|
527
|
+
representationName: RepresentationType$5,
|
|
528
528
|
mergeable: false
|
|
529
529
|
});
|
|
530
530
|
const input_connections_length = input.connections.length;
|
|
531
531
|
for (let i = 0; i < input_connections_length; i++) {
|
|
532
|
-
getTypeCacheKeys$
|
|
532
|
+
getTypeCacheKeys$6(rootKeySet, luvio, input.connections[i], () => '');
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
535
|
|
|
536
|
-
function select$
|
|
537
|
-
return select$
|
|
536
|
+
function select$a(luvio, params) {
|
|
537
|
+
return select$b();
|
|
538
538
|
}
|
|
539
|
-
function keyBuilder$
|
|
539
|
+
function keyBuilder$9(luvio, params) {
|
|
540
540
|
return keyPrefix + '::ExternalConnectivityConnectionListRepresentation:(' + ')';
|
|
541
541
|
}
|
|
542
|
-
function getResponseCacheKeys$
|
|
543
|
-
getTypeCacheKeys$
|
|
542
|
+
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
543
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response, () => keyBuilder$9());
|
|
544
544
|
}
|
|
545
|
-
function ingestSuccess$
|
|
545
|
+
function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
546
546
|
const { body } = response;
|
|
547
|
-
const key = keyBuilder$
|
|
548
|
-
luvio.storeIngest(key, ingest$
|
|
547
|
+
const key = keyBuilder$9();
|
|
548
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
549
549
|
const snapshot = luvio.storeLookup({
|
|
550
550
|
recordId: key,
|
|
551
|
-
node: select$
|
|
551
|
+
node: select$a(),
|
|
552
552
|
variables: {},
|
|
553
553
|
}, snapshotRefresh);
|
|
554
554
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -560,18 +560,18 @@ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
560
560
|
return snapshot;
|
|
561
561
|
}
|
|
562
562
|
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
563
|
-
const key = keyBuilder$
|
|
563
|
+
const key = keyBuilder$9();
|
|
564
564
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
565
565
|
const storeMetadataParams = {
|
|
566
|
-
ttl: TTL$
|
|
566
|
+
ttl: TTL$5,
|
|
567
567
|
namespace: keyPrefix,
|
|
568
|
-
version: VERSION$
|
|
569
|
-
representationName: RepresentationType$
|
|
568
|
+
version: VERSION$5,
|
|
569
|
+
representationName: RepresentationType$5
|
|
570
570
|
};
|
|
571
571
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
572
572
|
return errorSnapshot;
|
|
573
573
|
}
|
|
574
|
-
function createResourceRequest$
|
|
574
|
+
function createResourceRequest$5(config) {
|
|
575
575
|
const headers = {};
|
|
576
576
|
return {
|
|
577
577
|
baseUri: '/services/data/v61.0',
|
|
@@ -585,57 +585,57 @@ function createResourceRequest$4(config) {
|
|
|
585
585
|
};
|
|
586
586
|
}
|
|
587
587
|
|
|
588
|
-
const adapterName$
|
|
588
|
+
const adapterName$5 = 'getConnections';
|
|
589
589
|
const getConnections_ConfigPropertyMetadata = [];
|
|
590
|
-
const getConnections_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
591
|
-
const createResourceParams$
|
|
592
|
-
function keyBuilder$
|
|
593
|
-
createResourceParams$
|
|
594
|
-
return keyBuilder$
|
|
590
|
+
const getConnections_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getConnections_ConfigPropertyMetadata);
|
|
591
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$6(getConnections_ConfigPropertyMetadata);
|
|
592
|
+
function keyBuilder$8(luvio, config) {
|
|
593
|
+
createResourceParams$5(config);
|
|
594
|
+
return keyBuilder$9();
|
|
595
595
|
}
|
|
596
|
-
function typeCheckConfig$
|
|
596
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
597
597
|
const config = {};
|
|
598
598
|
return config;
|
|
599
599
|
}
|
|
600
|
-
function validateAdapterConfig$
|
|
600
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
601
601
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
602
602
|
return null;
|
|
603
603
|
}
|
|
604
604
|
if (process.env.NODE_ENV !== 'production') {
|
|
605
605
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
606
606
|
}
|
|
607
|
-
const config = typeCheckConfig$
|
|
607
|
+
const config = typeCheckConfig$5();
|
|
608
608
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
609
609
|
return null;
|
|
610
610
|
}
|
|
611
611
|
return config;
|
|
612
612
|
}
|
|
613
613
|
function adapterFragment$3(luvio, config) {
|
|
614
|
-
createResourceParams$
|
|
615
|
-
return select$
|
|
614
|
+
createResourceParams$5(config);
|
|
615
|
+
return select$a();
|
|
616
616
|
}
|
|
617
617
|
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
618
|
-
const snapshot = ingestSuccess$
|
|
618
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
|
|
619
619
|
config,
|
|
620
|
-
resolve: () => buildNetworkSnapshot$
|
|
620
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
621
621
|
});
|
|
622
622
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
623
623
|
}
|
|
624
624
|
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
625
625
|
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
626
626
|
config,
|
|
627
|
-
resolve: () => buildNetworkSnapshot$
|
|
627
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
628
628
|
});
|
|
629
629
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
630
630
|
}
|
|
631
|
-
function buildNetworkSnapshot$
|
|
632
|
-
const resourceParams = createResourceParams$
|
|
633
|
-
const request = createResourceRequest$
|
|
631
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
632
|
+
const resourceParams = createResourceParams$5(config);
|
|
633
|
+
const request = createResourceRequest$5();
|
|
634
634
|
return luvio.dispatchResourceRequest(request, options)
|
|
635
635
|
.then((response) => {
|
|
636
636
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
637
637
|
const cache = new StoreKeyMap();
|
|
638
|
-
getResponseCacheKeys$
|
|
638
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
|
|
639
639
|
return cache;
|
|
640
640
|
});
|
|
641
641
|
}, (response) => {
|
|
@@ -643,23 +643,23 @@ function buildNetworkSnapshot$4(luvio, config, options) {
|
|
|
643
643
|
});
|
|
644
644
|
}
|
|
645
645
|
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
646
|
-
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
646
|
+
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
|
|
647
647
|
}
|
|
648
648
|
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
649
649
|
const { luvio, config } = context;
|
|
650
650
|
const selector = {
|
|
651
|
-
recordId: keyBuilder$
|
|
651
|
+
recordId: keyBuilder$8(luvio, config),
|
|
652
652
|
node: adapterFragment$3(luvio, config),
|
|
653
653
|
variables: {},
|
|
654
654
|
};
|
|
655
655
|
const cacheSnapshot = storeLookup(selector, {
|
|
656
656
|
config,
|
|
657
|
-
resolve: () => buildNetworkSnapshot$
|
|
657
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
658
658
|
});
|
|
659
659
|
return cacheSnapshot;
|
|
660
660
|
}
|
|
661
661
|
const getConnectionsAdapterFactory = (luvio) => function externalConnectivity__getConnections(untrustedConfig, requestContext) {
|
|
662
|
-
const config = validateAdapterConfig$
|
|
662
|
+
const config = validateAdapterConfig$5(untrustedConfig, getConnections_ConfigPropertyNames);
|
|
663
663
|
// Invalid or incomplete config
|
|
664
664
|
if (config === null) {
|
|
665
665
|
return null;
|
|
@@ -668,9 +668,35 @@ const getConnectionsAdapterFactory = (luvio) => function externalConnectivity__g
|
|
|
668
668
|
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
669
669
|
};
|
|
670
670
|
|
|
671
|
-
|
|
672
|
-
const
|
|
673
|
-
|
|
671
|
+
function validate$9(obj, path = 'AuthenticationTypeInputRepresentation') {
|
|
672
|
+
const v_error = (() => {
|
|
673
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
674
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
675
|
+
}
|
|
676
|
+
const obj_authenticationParameterInputs = obj.authenticationParameterInputs;
|
|
677
|
+
const path_authenticationParameterInputs = path + '.authenticationParameterInputs';
|
|
678
|
+
if (!ArrayIsArray(obj_authenticationParameterInputs)) {
|
|
679
|
+
return new TypeError('Expected "array" but received "' + typeof obj_authenticationParameterInputs + '" (at "' + path_authenticationParameterInputs + '")');
|
|
680
|
+
}
|
|
681
|
+
for (let i = 0; i < obj_authenticationParameterInputs.length; i++) {
|
|
682
|
+
const obj_authenticationParameterInputs_item = obj_authenticationParameterInputs[i];
|
|
683
|
+
const path_authenticationParameterInputs_item = path_authenticationParameterInputs + '[' + i + ']';
|
|
684
|
+
if (obj_authenticationParameterInputs_item === undefined) {
|
|
685
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_authenticationParameterInputs_item + '" (at "' + path_authenticationParameterInputs_item + '")');
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
const obj_authenticationProtocol = obj.authenticationProtocol;
|
|
689
|
+
const path_authenticationProtocol = path + '.authenticationProtocol';
|
|
690
|
+
if (typeof obj_authenticationProtocol !== 'string') {
|
|
691
|
+
return new TypeError('Expected "string" but received "' + typeof obj_authenticationProtocol + '" (at "' + path_authenticationProtocol + '")');
|
|
692
|
+
}
|
|
693
|
+
})();
|
|
694
|
+
return v_error === undefined ? null : v_error;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
const TTL$4 = 500;
|
|
698
|
+
const VERSION$4 = "139e6c6cae3db78f5efabb1639252ac2";
|
|
699
|
+
function validate$8(obj, path = 'ExternalConnectivityConnectionCreatedRepresentation') {
|
|
674
700
|
const v_error = (() => {
|
|
675
701
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
676
702
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -683,23 +709,23 @@ function validate$7(obj, path = 'ExternalConnectivityConnectionCreatedRepresenta
|
|
|
683
709
|
})();
|
|
684
710
|
return v_error === undefined ? null : v_error;
|
|
685
711
|
}
|
|
686
|
-
const RepresentationType$
|
|
687
|
-
function keyBuilder$
|
|
688
|
-
return keyPrefix + '::' + RepresentationType$
|
|
712
|
+
const RepresentationType$4 = 'ExternalConnectivityConnectionCreatedRepresentation';
|
|
713
|
+
function keyBuilder$7(luvio, config) {
|
|
714
|
+
return keyPrefix + '::' + RepresentationType$4 + ':' + config.developerName;
|
|
689
715
|
}
|
|
690
|
-
function keyBuilderFromType(luvio, object) {
|
|
716
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
691
717
|
const keyParams = {
|
|
692
718
|
developerName: object.developerName
|
|
693
719
|
};
|
|
694
|
-
return keyBuilder$
|
|
720
|
+
return keyBuilder$7(luvio, keyParams);
|
|
695
721
|
}
|
|
696
|
-
function normalize$
|
|
722
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
697
723
|
return input;
|
|
698
724
|
}
|
|
699
|
-
const select$
|
|
725
|
+
const select$9 = function ExternalConnectivityConnectionCreatedRepresentationSelect() {
|
|
700
726
|
return {
|
|
701
727
|
kind: 'Fragment',
|
|
702
|
-
version: VERSION$
|
|
728
|
+
version: VERSION$4,
|
|
703
729
|
private: [],
|
|
704
730
|
selections: [
|
|
705
731
|
{
|
|
@@ -709,7 +735,7 @@ const select$7 = function ExternalConnectivityConnectionCreatedRepresentationSel
|
|
|
709
735
|
]
|
|
710
736
|
};
|
|
711
737
|
};
|
|
712
|
-
function equals$
|
|
738
|
+
function equals$4(existing, incoming) {
|
|
713
739
|
const existing_developerName = existing.developerName;
|
|
714
740
|
const incoming_developerName = incoming.developerName;
|
|
715
741
|
if (!(existing_developerName === incoming_developerName)) {
|
|
@@ -717,41 +743,41 @@ function equals$3(existing, incoming) {
|
|
|
717
743
|
}
|
|
718
744
|
return true;
|
|
719
745
|
}
|
|
720
|
-
const ingest$
|
|
746
|
+
const ingest$4 = function ExternalConnectivityConnectionCreatedRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
721
747
|
if (process.env.NODE_ENV !== 'production') {
|
|
722
|
-
const validateError = validate$
|
|
748
|
+
const validateError = validate$8(input);
|
|
723
749
|
if (validateError !== null) {
|
|
724
750
|
throw validateError;
|
|
725
751
|
}
|
|
726
752
|
}
|
|
727
|
-
const key = keyBuilderFromType(luvio, input);
|
|
728
|
-
const ttlToUse = TTL$
|
|
729
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
753
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
754
|
+
const ttlToUse = TTL$4;
|
|
755
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "external-connectivity", VERSION$4, RepresentationType$4, equals$4);
|
|
730
756
|
return createLink(key);
|
|
731
757
|
};
|
|
732
|
-
function getTypeCacheKeys$
|
|
758
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
733
759
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
734
|
-
const rootKey = keyBuilderFromType(luvio, input);
|
|
760
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
735
761
|
rootKeySet.set(rootKey, {
|
|
736
762
|
namespace: keyPrefix,
|
|
737
|
-
representationName: RepresentationType$
|
|
763
|
+
representationName: RepresentationType$4,
|
|
738
764
|
mergeable: false
|
|
739
765
|
});
|
|
740
766
|
}
|
|
741
767
|
|
|
742
|
-
function select$
|
|
743
|
-
return select$
|
|
768
|
+
function select$8(luvio, params) {
|
|
769
|
+
return select$9();
|
|
744
770
|
}
|
|
745
|
-
function getResponseCacheKeys$
|
|
746
|
-
getTypeCacheKeys$
|
|
771
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
772
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response);
|
|
747
773
|
}
|
|
748
|
-
function ingestSuccess$
|
|
774
|
+
function ingestSuccess$4(luvio, resourceParams, response) {
|
|
749
775
|
const { body } = response;
|
|
750
|
-
const key = keyBuilderFromType(luvio, body);
|
|
751
|
-
luvio.storeIngest(key, ingest$
|
|
776
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
777
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
752
778
|
const snapshot = luvio.storeLookup({
|
|
753
779
|
recordId: key,
|
|
754
|
-
node: select$
|
|
780
|
+
node: select$8(),
|
|
755
781
|
variables: {},
|
|
756
782
|
});
|
|
757
783
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -762,7 +788,7 @@ function ingestSuccess$3(luvio, resourceParams, response) {
|
|
|
762
788
|
deepFreeze(snapshot.data);
|
|
763
789
|
return snapshot;
|
|
764
790
|
}
|
|
765
|
-
function createResourceRequest$
|
|
791
|
+
function createResourceRequest$4(config) {
|
|
766
792
|
const headers = {};
|
|
767
793
|
return {
|
|
768
794
|
baseUri: '/services/data/v61.0',
|
|
@@ -776,51 +802,49 @@ function createResourceRequest$3(config) {
|
|
|
776
802
|
};
|
|
777
803
|
}
|
|
778
804
|
|
|
779
|
-
const adapterName$
|
|
805
|
+
const adapterName$4 = 'createConnection';
|
|
780
806
|
const createConnection_ConfigPropertyMetadata = [
|
|
781
807
|
generateParamConfigMetadata('authenticationTypeInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
782
808
|
generateParamConfigMetadata('connectorDeveloperName', true, 2 /* Body */, 0 /* String */),
|
|
783
809
|
generateParamConfigMetadata('description', true, 2 /* Body */, 0 /* String */),
|
|
784
810
|
generateParamConfigMetadata('name', true, 2 /* Body */, 0 /* String */),
|
|
785
811
|
];
|
|
786
|
-
const createConnection_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
787
|
-
const createResourceParams$
|
|
788
|
-
function typeCheckConfig$
|
|
812
|
+
const createConnection_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, createConnection_ConfigPropertyMetadata);
|
|
813
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$6(createConnection_ConfigPropertyMetadata);
|
|
814
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
789
815
|
const config = {};
|
|
790
|
-
typeCheckConfig$
|
|
816
|
+
typeCheckConfig$6(untrustedConfig, config, createConnection_ConfigPropertyMetadata);
|
|
791
817
|
const untrustedConfig_authenticationTypeInput = untrustedConfig.authenticationTypeInput;
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
config.authenticationTypeInput = untrustedConfig_authenticationTypeInput_object;
|
|
796
|
-
}
|
|
818
|
+
const referenceAuthenticationTypeInputRepresentationValidationError = validate$9(untrustedConfig_authenticationTypeInput);
|
|
819
|
+
if (referenceAuthenticationTypeInputRepresentationValidationError === null) {
|
|
820
|
+
config.authenticationTypeInput = untrustedConfig_authenticationTypeInput;
|
|
797
821
|
}
|
|
798
822
|
return config;
|
|
799
823
|
}
|
|
800
|
-
function validateAdapterConfig$
|
|
824
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
801
825
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
802
826
|
return null;
|
|
803
827
|
}
|
|
804
828
|
if (process.env.NODE_ENV !== 'production') {
|
|
805
829
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
806
830
|
}
|
|
807
|
-
const config = typeCheckConfig$
|
|
831
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
808
832
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
809
833
|
return null;
|
|
810
834
|
}
|
|
811
835
|
return config;
|
|
812
836
|
}
|
|
813
|
-
function buildNetworkSnapshot$
|
|
814
|
-
const resourceParams = createResourceParams$
|
|
815
|
-
const request = createResourceRequest$
|
|
837
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
838
|
+
const resourceParams = createResourceParams$4(config);
|
|
839
|
+
const request = createResourceRequest$4(resourceParams);
|
|
816
840
|
return luvio.dispatchResourceRequest(request, options)
|
|
817
841
|
.then((response) => {
|
|
818
842
|
return luvio.handleSuccessResponse(() => {
|
|
819
|
-
const snapshot = ingestSuccess$
|
|
843
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response);
|
|
820
844
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
821
845
|
}, () => {
|
|
822
846
|
const cache = new StoreKeyMap();
|
|
823
|
-
getResponseCacheKeys$
|
|
847
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
824
848
|
return cache;
|
|
825
849
|
});
|
|
826
850
|
}, (response) => {
|
|
@@ -830,16 +854,16 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
830
854
|
}
|
|
831
855
|
const createConnectionAdapterFactory = (luvio) => {
|
|
832
856
|
return function createConnection(untrustedConfig) {
|
|
833
|
-
const config = validateAdapterConfig$
|
|
857
|
+
const config = validateAdapterConfig$4(untrustedConfig, createConnection_ConfigPropertyNames);
|
|
834
858
|
// Invalid or incomplete config
|
|
835
859
|
if (config === null) {
|
|
836
860
|
throw new Error('Invalid config for "createConnection"');
|
|
837
861
|
}
|
|
838
|
-
return buildNetworkSnapshot$
|
|
862
|
+
return buildNetworkSnapshot$4(luvio, config);
|
|
839
863
|
};
|
|
840
864
|
};
|
|
841
865
|
|
|
842
|
-
function validate$
|
|
866
|
+
function validate$7(obj, path = 'AuthenticationParameterDefinitionRepresentation') {
|
|
843
867
|
const v_error = (() => {
|
|
844
868
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
845
869
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -883,14 +907,14 @@ function validate$6(obj, path = 'AuthenticationParameterDefinitionRepresentation
|
|
|
883
907
|
return v_error === undefined ? null : v_error;
|
|
884
908
|
}
|
|
885
909
|
|
|
886
|
-
function validate$
|
|
910
|
+
function validate$6(obj, path = 'AuthenticationParameterRepresentation') {
|
|
887
911
|
const v_error = (() => {
|
|
888
912
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
889
913
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
890
914
|
}
|
|
891
915
|
const obj_authenticationParameterDefinition = obj.authenticationParameterDefinition;
|
|
892
916
|
const path_authenticationParameterDefinition = path + '.authenticationParameterDefinition';
|
|
893
|
-
const referencepath_authenticationParameterDefinitionValidationError = validate$
|
|
917
|
+
const referencepath_authenticationParameterDefinitionValidationError = validate$7(obj_authenticationParameterDefinition, path_authenticationParameterDefinition);
|
|
894
918
|
if (referencepath_authenticationParameterDefinitionValidationError !== null) {
|
|
895
919
|
let message = 'Object doesn\'t match AuthenticationParameterDefinitionRepresentation (at "' + path_authenticationParameterDefinition + '")\n';
|
|
896
920
|
message += referencepath_authenticationParameterDefinitionValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -905,7 +929,7 @@ function validate$5(obj, path = 'AuthenticationParameterRepresentation') {
|
|
|
905
929
|
return v_error === undefined ? null : v_error;
|
|
906
930
|
}
|
|
907
931
|
|
|
908
|
-
function validate$
|
|
932
|
+
function validate$5(obj, path = 'AuthenticationTypeRepresentation') {
|
|
909
933
|
const v_error = (() => {
|
|
910
934
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
911
935
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -918,7 +942,7 @@ function validate$4(obj, path = 'AuthenticationTypeRepresentation') {
|
|
|
918
942
|
for (let i = 0; i < obj_authenticationParameters.length; i++) {
|
|
919
943
|
const obj_authenticationParameters_item = obj_authenticationParameters[i];
|
|
920
944
|
const path_authenticationParameters_item = path_authenticationParameters + '[' + i + ']';
|
|
921
|
-
const referencepath_authenticationParameters_itemValidationError = validate$
|
|
945
|
+
const referencepath_authenticationParameters_itemValidationError = validate$6(obj_authenticationParameters_item, path_authenticationParameters_item);
|
|
922
946
|
if (referencepath_authenticationParameters_itemValidationError !== null) {
|
|
923
947
|
let message = 'Object doesn\'t match AuthenticationParameterRepresentation (at "' + path_authenticationParameters_item + '")\n';
|
|
924
948
|
message += referencepath_authenticationParameters_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -934,16 +958,16 @@ function validate$4(obj, path = 'AuthenticationTypeRepresentation') {
|
|
|
934
958
|
return v_error === undefined ? null : v_error;
|
|
935
959
|
}
|
|
936
960
|
|
|
937
|
-
const TTL$
|
|
938
|
-
const VERSION$
|
|
939
|
-
function validate$
|
|
961
|
+
const TTL$3 = 500;
|
|
962
|
+
const VERSION$3 = "d54347a80b50618d79aaee5dd94620b1";
|
|
963
|
+
function validate$4(obj, path = 'ExternalConnectivityConnectionDetailsRepresentation') {
|
|
940
964
|
const v_error = (() => {
|
|
941
965
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
942
966
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
943
967
|
}
|
|
944
968
|
const obj_authenticationType = obj.authenticationType;
|
|
945
969
|
const path_authenticationType = path + '.authenticationType';
|
|
946
|
-
const referencepath_authenticationTypeValidationError = validate$
|
|
970
|
+
const referencepath_authenticationTypeValidationError = validate$5(obj_authenticationType, path_authenticationType);
|
|
947
971
|
if (referencepath_authenticationTypeValidationError !== null) {
|
|
948
972
|
let message = 'Object doesn\'t match AuthenticationTypeRepresentation (at "' + path_authenticationType + '")\n';
|
|
949
973
|
message += referencepath_authenticationTypeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -976,7 +1000,7 @@ function validate$3(obj, path = 'ExternalConnectivityConnectionDetailsRepresenta
|
|
|
976
1000
|
}
|
|
977
1001
|
const obj_externalConnectorMetadata = obj.externalConnectorMetadata;
|
|
978
1002
|
const path_externalConnectorMetadata = path + '.externalConnectorMetadata';
|
|
979
|
-
const referencepath_externalConnectorMetadataValidationError = validate$
|
|
1003
|
+
const referencepath_externalConnectorMetadataValidationError = validate$c(obj_externalConnectorMetadata, path_externalConnectorMetadata);
|
|
980
1004
|
if (referencepath_externalConnectorMetadataValidationError !== null) {
|
|
981
1005
|
let message = 'Object doesn\'t match ExternalConnectivityConnectorRepresentation (at "' + path_externalConnectorMetadata + '")\n';
|
|
982
1006
|
message += referencepath_externalConnectorMetadataValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1005,62 +1029,62 @@ function validate$3(obj, path = 'ExternalConnectivityConnectionDetailsRepresenta
|
|
|
1005
1029
|
})();
|
|
1006
1030
|
return v_error === undefined ? null : v_error;
|
|
1007
1031
|
}
|
|
1008
|
-
const RepresentationType$
|
|
1009
|
-
function normalize$
|
|
1032
|
+
const RepresentationType$3 = 'ExternalConnectivityConnectionDetailsRepresentation';
|
|
1033
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
1010
1034
|
return input;
|
|
1011
1035
|
}
|
|
1012
|
-
const select$
|
|
1036
|
+
const select$7 = function ExternalConnectivityConnectionDetailsRepresentationSelect() {
|
|
1013
1037
|
return {
|
|
1014
1038
|
kind: 'Fragment',
|
|
1015
|
-
version: VERSION$
|
|
1039
|
+
version: VERSION$3,
|
|
1016
1040
|
private: [],
|
|
1017
1041
|
opaque: true
|
|
1018
1042
|
};
|
|
1019
1043
|
};
|
|
1020
|
-
function equals$
|
|
1044
|
+
function equals$3(existing, incoming) {
|
|
1021
1045
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1022
1046
|
return false;
|
|
1023
1047
|
}
|
|
1024
1048
|
return true;
|
|
1025
1049
|
}
|
|
1026
|
-
const ingest$
|
|
1050
|
+
const ingest$3 = function ExternalConnectivityConnectionDetailsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1027
1051
|
if (process.env.NODE_ENV !== 'production') {
|
|
1028
|
-
const validateError = validate$
|
|
1052
|
+
const validateError = validate$4(input);
|
|
1029
1053
|
if (validateError !== null) {
|
|
1030
1054
|
throw validateError;
|
|
1031
1055
|
}
|
|
1032
1056
|
}
|
|
1033
1057
|
const key = path.fullPath;
|
|
1034
|
-
const ttlToUse = TTL$
|
|
1035
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1058
|
+
const ttlToUse = TTL$3;
|
|
1059
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "external-connectivity", VERSION$3, RepresentationType$3, equals$3);
|
|
1036
1060
|
return createLink(key);
|
|
1037
1061
|
};
|
|
1038
|
-
function getTypeCacheKeys$
|
|
1062
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
1039
1063
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1040
1064
|
const rootKey = fullPathFactory();
|
|
1041
1065
|
rootKeySet.set(rootKey, {
|
|
1042
1066
|
namespace: keyPrefix,
|
|
1043
|
-
representationName: RepresentationType$
|
|
1067
|
+
representationName: RepresentationType$3,
|
|
1044
1068
|
mergeable: false
|
|
1045
1069
|
});
|
|
1046
1070
|
}
|
|
1047
1071
|
|
|
1048
|
-
function select$
|
|
1049
|
-
return select$
|
|
1072
|
+
function select$6(luvio, params) {
|
|
1073
|
+
return select$7();
|
|
1050
1074
|
}
|
|
1051
|
-
function keyBuilder$
|
|
1075
|
+
function keyBuilder$6(luvio, params) {
|
|
1052
1076
|
return keyPrefix + '::ExternalConnectivityConnectionDetailsRepresentation:(' + 'connectionDeveloperName:' + params.urlParams.connectionDeveloperName + ')';
|
|
1053
1077
|
}
|
|
1054
|
-
function getResponseCacheKeys$
|
|
1055
|
-
getTypeCacheKeys$
|
|
1078
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
1079
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$6(luvio, resourceParams));
|
|
1056
1080
|
}
|
|
1057
|
-
function ingestSuccess$
|
|
1081
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
1058
1082
|
const { body } = response;
|
|
1059
|
-
const key = keyBuilder$
|
|
1060
|
-
luvio.storeIngest(key, ingest$
|
|
1083
|
+
const key = keyBuilder$6(luvio, resourceParams);
|
|
1084
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
1061
1085
|
const snapshot = luvio.storeLookup({
|
|
1062
1086
|
recordId: key,
|
|
1063
|
-
node: select$
|
|
1087
|
+
node: select$6(),
|
|
1064
1088
|
variables: {},
|
|
1065
1089
|
}, snapshotRefresh);
|
|
1066
1090
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1072,18 +1096,18 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1072
1096
|
return snapshot;
|
|
1073
1097
|
}
|
|
1074
1098
|
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
1075
|
-
const key = keyBuilder$
|
|
1099
|
+
const key = keyBuilder$6(luvio, params);
|
|
1076
1100
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1077
1101
|
const storeMetadataParams = {
|
|
1078
|
-
ttl: TTL$
|
|
1102
|
+
ttl: TTL$3,
|
|
1079
1103
|
namespace: keyPrefix,
|
|
1080
|
-
version: VERSION$
|
|
1081
|
-
representationName: RepresentationType$
|
|
1104
|
+
version: VERSION$3,
|
|
1105
|
+
representationName: RepresentationType$3
|
|
1082
1106
|
};
|
|
1083
1107
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1084
1108
|
return errorSnapshot;
|
|
1085
1109
|
}
|
|
1086
|
-
function createResourceRequest$
|
|
1110
|
+
function createResourceRequest$3(config) {
|
|
1087
1111
|
const headers = {};
|
|
1088
1112
|
return {
|
|
1089
1113
|
baseUri: '/services/data/v61.0',
|
|
@@ -1097,60 +1121,60 @@ function createResourceRequest$2(config) {
|
|
|
1097
1121
|
};
|
|
1098
1122
|
}
|
|
1099
1123
|
|
|
1100
|
-
const adapterName$
|
|
1124
|
+
const adapterName$3 = 'getConnectionDetails';
|
|
1101
1125
|
const getConnectionDetails_ConfigPropertyMetadata = [
|
|
1102
1126
|
generateParamConfigMetadata('connectionDeveloperName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1103
1127
|
];
|
|
1104
|
-
const getConnectionDetails_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1105
|
-
const createResourceParams$
|
|
1106
|
-
function keyBuilder$
|
|
1107
|
-
const resourceParams = createResourceParams$
|
|
1108
|
-
return keyBuilder$
|
|
1128
|
+
const getConnectionDetails_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getConnectionDetails_ConfigPropertyMetadata);
|
|
1129
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$6(getConnectionDetails_ConfigPropertyMetadata);
|
|
1130
|
+
function keyBuilder$5(luvio, config) {
|
|
1131
|
+
const resourceParams = createResourceParams$3(config);
|
|
1132
|
+
return keyBuilder$6(luvio, resourceParams);
|
|
1109
1133
|
}
|
|
1110
|
-
function typeCheckConfig$
|
|
1134
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
1111
1135
|
const config = {};
|
|
1112
|
-
typeCheckConfig$
|
|
1136
|
+
typeCheckConfig$6(untrustedConfig, config, getConnectionDetails_ConfigPropertyMetadata);
|
|
1113
1137
|
return config;
|
|
1114
1138
|
}
|
|
1115
|
-
function validateAdapterConfig$
|
|
1139
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
1116
1140
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1117
1141
|
return null;
|
|
1118
1142
|
}
|
|
1119
1143
|
if (process.env.NODE_ENV !== 'production') {
|
|
1120
1144
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1121
1145
|
}
|
|
1122
|
-
const config = typeCheckConfig$
|
|
1146
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
1123
1147
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1124
1148
|
return null;
|
|
1125
1149
|
}
|
|
1126
1150
|
return config;
|
|
1127
1151
|
}
|
|
1128
1152
|
function adapterFragment$2(luvio, config) {
|
|
1129
|
-
createResourceParams$
|
|
1130
|
-
return select$
|
|
1153
|
+
createResourceParams$3(config);
|
|
1154
|
+
return select$6();
|
|
1131
1155
|
}
|
|
1132
1156
|
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
1133
|
-
const snapshot = ingestSuccess$
|
|
1157
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
1134
1158
|
config,
|
|
1135
|
-
resolve: () => buildNetworkSnapshot$
|
|
1159
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1136
1160
|
});
|
|
1137
1161
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1138
1162
|
}
|
|
1139
1163
|
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
1140
1164
|
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
1141
1165
|
config,
|
|
1142
|
-
resolve: () => buildNetworkSnapshot$
|
|
1166
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1143
1167
|
});
|
|
1144
1168
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1145
1169
|
}
|
|
1146
|
-
function buildNetworkSnapshot$
|
|
1147
|
-
const resourceParams = createResourceParams$
|
|
1148
|
-
const request = createResourceRequest$
|
|
1170
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
1171
|
+
const resourceParams = createResourceParams$3(config);
|
|
1172
|
+
const request = createResourceRequest$3(resourceParams);
|
|
1149
1173
|
return luvio.dispatchResourceRequest(request, options)
|
|
1150
1174
|
.then((response) => {
|
|
1151
1175
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
1152
1176
|
const cache = new StoreKeyMap();
|
|
1153
|
-
getResponseCacheKeys$
|
|
1177
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
1154
1178
|
return cache;
|
|
1155
1179
|
});
|
|
1156
1180
|
}, (response) => {
|
|
@@ -1158,23 +1182,23 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
1158
1182
|
});
|
|
1159
1183
|
}
|
|
1160
1184
|
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
1161
|
-
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
1185
|
+
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
1162
1186
|
}
|
|
1163
1187
|
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
1164
1188
|
const { luvio, config } = context;
|
|
1165
1189
|
const selector = {
|
|
1166
|
-
recordId: keyBuilder$
|
|
1190
|
+
recordId: keyBuilder$5(luvio, config),
|
|
1167
1191
|
node: adapterFragment$2(luvio, config),
|
|
1168
1192
|
variables: {},
|
|
1169
1193
|
};
|
|
1170
1194
|
const cacheSnapshot = storeLookup(selector, {
|
|
1171
1195
|
config,
|
|
1172
|
-
resolve: () => buildNetworkSnapshot$
|
|
1196
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1173
1197
|
});
|
|
1174
1198
|
return cacheSnapshot;
|
|
1175
1199
|
}
|
|
1176
1200
|
const getConnectionDetailsAdapterFactory = (luvio) => function externalConnectivity__getConnectionDetails(untrustedConfig, requestContext) {
|
|
1177
|
-
const config = validateAdapterConfig$
|
|
1201
|
+
const config = validateAdapterConfig$3(untrustedConfig, getConnectionDetails_ConfigPropertyNames);
|
|
1178
1202
|
// Invalid or incomplete config
|
|
1179
1203
|
if (config === null) {
|
|
1180
1204
|
return null;
|
|
@@ -1183,6 +1207,223 @@ const getConnectionDetailsAdapterFactory = (luvio) => function externalConnectiv
|
|
|
1183
1207
|
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
1184
1208
|
};
|
|
1185
1209
|
|
|
1210
|
+
const TTL$2 = 500;
|
|
1211
|
+
const VERSION$2 = "f67e09223fd376bbe6027ef475177f1b";
|
|
1212
|
+
function validate$3(obj, path = 'ExternalConnectivityConnectionTestResultRepresentation') {
|
|
1213
|
+
const v_error = (() => {
|
|
1214
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1215
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1216
|
+
}
|
|
1217
|
+
const obj_developerName = obj.developerName;
|
|
1218
|
+
const path_developerName = path + '.developerName';
|
|
1219
|
+
if (typeof obj_developerName !== 'string') {
|
|
1220
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
1221
|
+
}
|
|
1222
|
+
const obj_errorDetails = obj.errorDetails;
|
|
1223
|
+
const path_errorDetails = path + '.errorDetails';
|
|
1224
|
+
if (typeof obj_errorDetails !== 'string') {
|
|
1225
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errorDetails + '" (at "' + path_errorDetails + '")');
|
|
1226
|
+
}
|
|
1227
|
+
const obj_errorMessage = obj.errorMessage;
|
|
1228
|
+
const path_errorMessage = path + '.errorMessage';
|
|
1229
|
+
if (typeof obj_errorMessage !== 'string') {
|
|
1230
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
|
|
1231
|
+
}
|
|
1232
|
+
const obj_established = obj.established;
|
|
1233
|
+
const path_established = path + '.established';
|
|
1234
|
+
if (typeof obj_established !== 'boolean') {
|
|
1235
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_established + '" (at "' + path_established + '")');
|
|
1236
|
+
}
|
|
1237
|
+
const obj_lastTestedDate = obj.lastTestedDate;
|
|
1238
|
+
const path_lastTestedDate = path + '.lastTestedDate';
|
|
1239
|
+
if (typeof obj_lastTestedDate !== 'string') {
|
|
1240
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastTestedDate + '" (at "' + path_lastTestedDate + '")');
|
|
1241
|
+
}
|
|
1242
|
+
})();
|
|
1243
|
+
return v_error === undefined ? null : v_error;
|
|
1244
|
+
}
|
|
1245
|
+
const RepresentationType$2 = 'ExternalConnectivityConnectionTestResultRepresentation';
|
|
1246
|
+
function keyBuilder$4(luvio, config) {
|
|
1247
|
+
return keyPrefix + '::' + RepresentationType$2 + ':' + config.developerName;
|
|
1248
|
+
}
|
|
1249
|
+
function keyBuilderFromType(luvio, object) {
|
|
1250
|
+
const keyParams = {
|
|
1251
|
+
developerName: object.developerName
|
|
1252
|
+
};
|
|
1253
|
+
return keyBuilder$4(luvio, keyParams);
|
|
1254
|
+
}
|
|
1255
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
1256
|
+
return input;
|
|
1257
|
+
}
|
|
1258
|
+
const select$5 = function ExternalConnectivityConnectionTestResultRepresentationSelect() {
|
|
1259
|
+
return {
|
|
1260
|
+
kind: 'Fragment',
|
|
1261
|
+
version: VERSION$2,
|
|
1262
|
+
private: [],
|
|
1263
|
+
selections: [
|
|
1264
|
+
{
|
|
1265
|
+
name: 'developerName',
|
|
1266
|
+
kind: 'Scalar'
|
|
1267
|
+
},
|
|
1268
|
+
{
|
|
1269
|
+
name: 'errorDetails',
|
|
1270
|
+
kind: 'Scalar'
|
|
1271
|
+
},
|
|
1272
|
+
{
|
|
1273
|
+
name: 'errorMessage',
|
|
1274
|
+
kind: 'Scalar'
|
|
1275
|
+
},
|
|
1276
|
+
{
|
|
1277
|
+
name: 'established',
|
|
1278
|
+
kind: 'Scalar'
|
|
1279
|
+
},
|
|
1280
|
+
{
|
|
1281
|
+
name: 'lastTestedDate',
|
|
1282
|
+
kind: 'Scalar'
|
|
1283
|
+
}
|
|
1284
|
+
]
|
|
1285
|
+
};
|
|
1286
|
+
};
|
|
1287
|
+
function equals$2(existing, incoming) {
|
|
1288
|
+
const existing_established = existing.established;
|
|
1289
|
+
const incoming_established = incoming.established;
|
|
1290
|
+
if (!(existing_established === incoming_established)) {
|
|
1291
|
+
return false;
|
|
1292
|
+
}
|
|
1293
|
+
const existing_developerName = existing.developerName;
|
|
1294
|
+
const incoming_developerName = incoming.developerName;
|
|
1295
|
+
if (!(existing_developerName === incoming_developerName)) {
|
|
1296
|
+
return false;
|
|
1297
|
+
}
|
|
1298
|
+
const existing_errorDetails = existing.errorDetails;
|
|
1299
|
+
const incoming_errorDetails = incoming.errorDetails;
|
|
1300
|
+
if (!(existing_errorDetails === incoming_errorDetails)) {
|
|
1301
|
+
return false;
|
|
1302
|
+
}
|
|
1303
|
+
const existing_errorMessage = existing.errorMessage;
|
|
1304
|
+
const incoming_errorMessage = incoming.errorMessage;
|
|
1305
|
+
if (!(existing_errorMessage === incoming_errorMessage)) {
|
|
1306
|
+
return false;
|
|
1307
|
+
}
|
|
1308
|
+
const existing_lastTestedDate = existing.lastTestedDate;
|
|
1309
|
+
const incoming_lastTestedDate = incoming.lastTestedDate;
|
|
1310
|
+
if (!(existing_lastTestedDate === incoming_lastTestedDate)) {
|
|
1311
|
+
return false;
|
|
1312
|
+
}
|
|
1313
|
+
return true;
|
|
1314
|
+
}
|
|
1315
|
+
const ingest$2 = function ExternalConnectivityConnectionTestResultRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1316
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1317
|
+
const validateError = validate$3(input);
|
|
1318
|
+
if (validateError !== null) {
|
|
1319
|
+
throw validateError;
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
const key = keyBuilderFromType(luvio, input);
|
|
1323
|
+
const ttlToUse = TTL$2;
|
|
1324
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "external-connectivity", VERSION$2, RepresentationType$2, equals$2);
|
|
1325
|
+
return createLink(key);
|
|
1326
|
+
};
|
|
1327
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
1328
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1329
|
+
const rootKey = keyBuilderFromType(luvio, input);
|
|
1330
|
+
rootKeySet.set(rootKey, {
|
|
1331
|
+
namespace: keyPrefix,
|
|
1332
|
+
representationName: RepresentationType$2,
|
|
1333
|
+
mergeable: false
|
|
1334
|
+
});
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
function select$4(luvio, params) {
|
|
1338
|
+
return select$5();
|
|
1339
|
+
}
|
|
1340
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
1341
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
1342
|
+
}
|
|
1343
|
+
function ingestSuccess$2(luvio, resourceParams, response) {
|
|
1344
|
+
const { body } = response;
|
|
1345
|
+
const key = keyBuilderFromType(luvio, body);
|
|
1346
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
1347
|
+
const snapshot = luvio.storeLookup({
|
|
1348
|
+
recordId: key,
|
|
1349
|
+
node: select$4(),
|
|
1350
|
+
variables: {},
|
|
1351
|
+
});
|
|
1352
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1353
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1354
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
deepFreeze(snapshot.data);
|
|
1358
|
+
return snapshot;
|
|
1359
|
+
}
|
|
1360
|
+
function createResourceRequest$2(config) {
|
|
1361
|
+
const headers = {};
|
|
1362
|
+
return {
|
|
1363
|
+
baseUri: '/services/data/v61.0',
|
|
1364
|
+
basePath: '/external-connectivity/connections/' + config.urlParams.connectionDeveloperName + '/test',
|
|
1365
|
+
method: 'post',
|
|
1366
|
+
body: null,
|
|
1367
|
+
urlParams: config.urlParams,
|
|
1368
|
+
queryParams: {},
|
|
1369
|
+
headers,
|
|
1370
|
+
priority: 'normal',
|
|
1371
|
+
};
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
const adapterName$2 = 'testConnection';
|
|
1375
|
+
const testConnection_ConfigPropertyMetadata = [
|
|
1376
|
+
generateParamConfigMetadata('connectionDeveloperName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1377
|
+
];
|
|
1378
|
+
const testConnection_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, testConnection_ConfigPropertyMetadata);
|
|
1379
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$6(testConnection_ConfigPropertyMetadata);
|
|
1380
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
1381
|
+
const config = {};
|
|
1382
|
+
typeCheckConfig$6(untrustedConfig, config, testConnection_ConfigPropertyMetadata);
|
|
1383
|
+
return config;
|
|
1384
|
+
}
|
|
1385
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
1386
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1387
|
+
return null;
|
|
1388
|
+
}
|
|
1389
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1390
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1391
|
+
}
|
|
1392
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
1393
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1394
|
+
return null;
|
|
1395
|
+
}
|
|
1396
|
+
return config;
|
|
1397
|
+
}
|
|
1398
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
1399
|
+
const resourceParams = createResourceParams$2(config);
|
|
1400
|
+
const request = createResourceRequest$2(resourceParams);
|
|
1401
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1402
|
+
.then((response) => {
|
|
1403
|
+
return luvio.handleSuccessResponse(() => {
|
|
1404
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response);
|
|
1405
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1406
|
+
}, () => {
|
|
1407
|
+
const cache = new StoreKeyMap();
|
|
1408
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
1409
|
+
return cache;
|
|
1410
|
+
});
|
|
1411
|
+
}, (response) => {
|
|
1412
|
+
deepFreeze(response);
|
|
1413
|
+
throw response;
|
|
1414
|
+
});
|
|
1415
|
+
}
|
|
1416
|
+
const testConnectionAdapterFactory = (luvio) => {
|
|
1417
|
+
return function testConnection(untrustedConfig) {
|
|
1418
|
+
const config = validateAdapterConfig$2(untrustedConfig, testConnection_ConfigPropertyNames);
|
|
1419
|
+
// Invalid or incomplete config
|
|
1420
|
+
if (config === null) {
|
|
1421
|
+
throw new Error('Invalid config for "testConnection"');
|
|
1422
|
+
}
|
|
1423
|
+
return buildNetworkSnapshot$2(luvio, config);
|
|
1424
|
+
};
|
|
1425
|
+
};
|
|
1426
|
+
|
|
1186
1427
|
const TTL$1 = 500;
|
|
1187
1428
|
const VERSION$1 = "e0e363c96027e368a8c2c44580411d53";
|
|
1188
1429
|
function validate$2(obj, path = 'ExternalConnectivityConnectorListRepresentation') {
|
|
@@ -1198,7 +1439,7 @@ function validate$2(obj, path = 'ExternalConnectivityConnectorListRepresentation
|
|
|
1198
1439
|
for (let i = 0; i < obj_connectors.length; i++) {
|
|
1199
1440
|
const obj_connectors_item = obj_connectors[i];
|
|
1200
1441
|
const path_connectors_item = path_connectors + '[' + i + ']';
|
|
1201
|
-
const referencepath_connectors_itemValidationError = validate$
|
|
1442
|
+
const referencepath_connectors_itemValidationError = validate$c(obj_connectors_item, path_connectors_item);
|
|
1202
1443
|
if (referencepath_connectors_itemValidationError !== null) {
|
|
1203
1444
|
let message = 'Object doesn\'t match ExternalConnectivityConnectorRepresentation (at "' + path_connectors_item + '")\n';
|
|
1204
1445
|
message += referencepath_connectors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1303,7 +1544,7 @@ function createResourceRequest$1(config) {
|
|
|
1303
1544
|
const adapterName$1 = 'getConnectors';
|
|
1304
1545
|
const getConnectors_ConfigPropertyMetadata = [];
|
|
1305
1546
|
const getConnectors_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getConnectors_ConfigPropertyMetadata);
|
|
1306
|
-
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$
|
|
1547
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$6(getConnectors_ConfigPropertyMetadata);
|
|
1307
1548
|
function keyBuilder$2(luvio, config) {
|
|
1308
1549
|
createResourceParams$1(config);
|
|
1309
1550
|
return keyBuilder$3();
|
|
@@ -1396,7 +1637,7 @@ function validate$1(obj, path = 'AuthenticationTypeDefinitionRepresentation') {
|
|
|
1396
1637
|
for (let i = 0; i < obj_authenticationParameterDefinitions.length; i++) {
|
|
1397
1638
|
const obj_authenticationParameterDefinitions_item = obj_authenticationParameterDefinitions[i];
|
|
1398
1639
|
const path_authenticationParameterDefinitions_item = path_authenticationParameterDefinitions + '[' + i + ']';
|
|
1399
|
-
const referencepath_authenticationParameterDefinitions_itemValidationError = validate$
|
|
1640
|
+
const referencepath_authenticationParameterDefinitions_itemValidationError = validate$7(obj_authenticationParameterDefinitions_item, path_authenticationParameterDefinitions_item);
|
|
1400
1641
|
if (referencepath_authenticationParameterDefinitions_itemValidationError !== null) {
|
|
1401
1642
|
let message = 'Object doesn\'t match AuthenticationParameterDefinitionRepresentation (at "' + path_authenticationParameterDefinitions_item + '")\n';
|
|
1402
1643
|
message += referencepath_authenticationParameterDefinitions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1442,7 +1683,7 @@ function validate(obj, path = 'ExternalConnectivityConnectorDetailsRepresentatio
|
|
|
1442
1683
|
for (let i = 0; i < obj_iconMetadata.length; i++) {
|
|
1443
1684
|
const obj_iconMetadata_item = obj_iconMetadata[i];
|
|
1444
1685
|
const path_iconMetadata_item = path_iconMetadata + '[' + i + ']';
|
|
1445
|
-
const referencepath_iconMetadata_itemValidationError = validate$
|
|
1686
|
+
const referencepath_iconMetadata_itemValidationError = validate$d(obj_iconMetadata_item, path_iconMetadata_item);
|
|
1446
1687
|
if (referencepath_iconMetadata_itemValidationError !== null) {
|
|
1447
1688
|
let message = 'Object doesn\'t match ConnectorIconMetadataRepresentation (at "' + path_iconMetadata_item + '")\n';
|
|
1448
1689
|
message += referencepath_iconMetadata_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1594,14 +1835,14 @@ const getConnectorDetails_ConfigPropertyMetadata = [
|
|
|
1594
1835
|
generateParamConfigMetadata('connectorDeveloperName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1595
1836
|
];
|
|
1596
1837
|
const getConnectorDetails_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getConnectorDetails_ConfigPropertyMetadata);
|
|
1597
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
1838
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$6(getConnectorDetails_ConfigPropertyMetadata);
|
|
1598
1839
|
function keyBuilder(luvio, config) {
|
|
1599
1840
|
const resourceParams = createResourceParams(config);
|
|
1600
1841
|
return keyBuilder$1(luvio, resourceParams);
|
|
1601
1842
|
}
|
|
1602
1843
|
function typeCheckConfig(untrustedConfig) {
|
|
1603
1844
|
const config = {};
|
|
1604
|
-
typeCheckConfig$
|
|
1845
|
+
typeCheckConfig$6(untrustedConfig, config, getConnectorDetails_ConfigPropertyMetadata);
|
|
1605
1846
|
return config;
|
|
1606
1847
|
}
|
|
1607
1848
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
@@ -1675,4 +1916,4 @@ const getConnectorDetailsAdapterFactory = (luvio) => function externalConnectivi
|
|
|
1675
1916
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
1676
1917
|
};
|
|
1677
1918
|
|
|
1678
|
-
export { createConnectionAdapterFactory, getConnectionDetailsAdapterFactory, getConnectionsAdapterFactory, getConnectorDetailsAdapterFactory, getConnectorsAdapterFactory };
|
|
1919
|
+
export { createConnectionAdapterFactory, getConnectionDetailsAdapterFactory, getConnectionsAdapterFactory, getConnectorDetailsAdapterFactory, getConnectorsAdapterFactory, testConnectionAdapterFactory };
|