@salesforce/lds-adapters-platform-external-connectivity 1.294.0 → 1.296.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 +527 -197
- package/dist/es/es2018/types/src/generated/adapters/deleteConnection.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/adapters/updateConnection.d.ts +20 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +3 -1
- package/dist/es/es2018/types/src/generated/resources/postExternalConnectivityConnectionsDeleteByConnectionDeveloperName.d.ts +12 -0
- package/dist/es/es2018/types/src/generated/resources/putExternalConnectivityConnectionsByConnectionDeveloperName.d.ts +19 -0
- package/dist/es/es2018/types/src/generated/types/ExternalConnectivityConnectionEditDeleteResultRepresentation.d.ts +44 -0
- package/package.json +5 -4
- package/sfdc/index.js +506 -170
- package/src/raml/api.raml +42 -0
- package/src/raml/luvio.raml +13 -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$8, typeCheckConfig as typeCheckConfig$8 } 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$e(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$d(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$7 = 500;
|
|
130
|
+
const VERSION$8 = "3e461ecbd697039c1881e691a2ee7bef";
|
|
131
|
+
function validate$d(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$c(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$e(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$c(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$8 = 'ExternalConnectivityConnectorRepresentation';
|
|
200
|
+
function normalize$8(input, existing, path, luvio, store, timestamp) {
|
|
201
201
|
return input;
|
|
202
202
|
}
|
|
203
|
-
const select$
|
|
203
|
+
const select$g = function ExternalConnectivityConnectorRepresentationSelect() {
|
|
204
204
|
return {
|
|
205
205
|
kind: 'Fragment',
|
|
206
|
-
version: VERSION$
|
|
206
|
+
version: VERSION$8,
|
|
207
207
|
private: [],
|
|
208
208
|
opaque: true
|
|
209
209
|
};
|
|
210
210
|
};
|
|
211
|
-
function equals$
|
|
211
|
+
function equals$8(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$8 = function ExternalConnectivityConnectorRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
218
218
|
if (process.env.NODE_ENV !== 'production') {
|
|
219
|
-
const validateError = validate$
|
|
219
|
+
const validateError = validate$d(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$7;
|
|
226
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$8, "external-connectivity", VERSION$8, RepresentationType$8, equals$8);
|
|
227
227
|
return createLink(key);
|
|
228
228
|
};
|
|
229
|
-
function getTypeCacheKeys$
|
|
229
|
+
function getTypeCacheKeys$8(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$8,
|
|
235
235
|
mergeable: false
|
|
236
236
|
});
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
-
const VERSION$
|
|
240
|
-
function validate$
|
|
239
|
+
const VERSION$7 = "89d2327df1e3dc86e80db8de5afc6ad8";
|
|
240
|
+
function validate$c(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 + '")');
|
|
@@ -337,11 +337,11 @@ function validate$b(obj, path = 'ExternalConnectivityConnectionRepresentation')
|
|
|
337
337
|
})();
|
|
338
338
|
return v_error === undefined ? null : v_error;
|
|
339
339
|
}
|
|
340
|
-
const RepresentationType$
|
|
341
|
-
function normalize$
|
|
340
|
+
const RepresentationType$7 = 'ExternalConnectivityConnectionRepresentation';
|
|
341
|
+
function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
342
342
|
const input_externalConnectorMetadata = input.externalConnectorMetadata;
|
|
343
343
|
const input_externalConnectorMetadata_id = path.fullPath + '__externalConnectorMetadata';
|
|
344
|
-
input.externalConnectorMetadata = ingest$
|
|
344
|
+
input.externalConnectorMetadata = ingest$8(input_externalConnectorMetadata, {
|
|
345
345
|
fullPath: input_externalConnectorMetadata_id,
|
|
346
346
|
propertyName: 'externalConnectorMetadata',
|
|
347
347
|
parent: {
|
|
@@ -353,10 +353,10 @@ function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
|
353
353
|
}, luvio, store, timestamp);
|
|
354
354
|
return input;
|
|
355
355
|
}
|
|
356
|
-
const select$
|
|
356
|
+
const select$f = function ExternalConnectivityConnectionRepresentationSelect() {
|
|
357
357
|
return {
|
|
358
358
|
kind: 'Fragment',
|
|
359
|
-
version: VERSION$
|
|
359
|
+
version: VERSION$7,
|
|
360
360
|
private: [],
|
|
361
361
|
selections: [
|
|
362
362
|
{
|
|
@@ -382,7 +382,7 @@ const select$c = function ExternalConnectivityConnectionRepresentationSelect() {
|
|
|
382
382
|
{
|
|
383
383
|
name: 'externalConnectorMetadata',
|
|
384
384
|
kind: 'Link',
|
|
385
|
-
fragment: select$
|
|
385
|
+
fragment: select$g()
|
|
386
386
|
},
|
|
387
387
|
{
|
|
388
388
|
name: 'lastModifiedBy',
|
|
@@ -403,7 +403,7 @@ const select$c = function ExternalConnectivityConnectionRepresentationSelect() {
|
|
|
403
403
|
]
|
|
404
404
|
};
|
|
405
405
|
};
|
|
406
|
-
function equals$
|
|
406
|
+
function equals$7(existing, incoming) {
|
|
407
407
|
const existing_established = existing.established;
|
|
408
408
|
const incoming_established = incoming.established;
|
|
409
409
|
if (!(existing_established === incoming_established)) {
|
|
@@ -456,32 +456,32 @@ function equals$6(existing, incoming) {
|
|
|
456
456
|
}
|
|
457
457
|
return true;
|
|
458
458
|
}
|
|
459
|
-
const ingest$
|
|
459
|
+
const ingest$7 = function ExternalConnectivityConnectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
460
460
|
if (process.env.NODE_ENV !== 'production') {
|
|
461
|
-
const validateError = validate$
|
|
461
|
+
const validateError = validate$c(input);
|
|
462
462
|
if (validateError !== null) {
|
|
463
463
|
throw validateError;
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
466
|
const key = path.fullPath;
|
|
467
467
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 300000;
|
|
468
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
468
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$7, "external-connectivity", VERSION$7, RepresentationType$7, equals$7);
|
|
469
469
|
return createLink(key);
|
|
470
470
|
};
|
|
471
|
-
function getTypeCacheKeys$
|
|
471
|
+
function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
|
|
472
472
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
473
473
|
const rootKey = fullPathFactory();
|
|
474
474
|
rootKeySet.set(rootKey, {
|
|
475
475
|
namespace: keyPrefix,
|
|
476
|
-
representationName: RepresentationType$
|
|
476
|
+
representationName: RepresentationType$7,
|
|
477
477
|
mergeable: false
|
|
478
478
|
});
|
|
479
|
-
getTypeCacheKeys$
|
|
479
|
+
getTypeCacheKeys$8(rootKeySet, luvio, input.externalConnectorMetadata, () => rootKey + "__" + "externalConnectorMetadata");
|
|
480
480
|
}
|
|
481
481
|
|
|
482
|
-
const TTL$
|
|
483
|
-
const VERSION$
|
|
484
|
-
function validate$
|
|
482
|
+
const TTL$6 = 500;
|
|
483
|
+
const VERSION$6 = "20bb37f8c88f1dd513107a5128a6f4a5";
|
|
484
|
+
function validate$b(obj, path = 'ExternalConnectivityConnectionListRepresentation') {
|
|
485
485
|
const v_error = (() => {
|
|
486
486
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
487
487
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -501,14 +501,14 @@ function validate$a(obj, path = 'ExternalConnectivityConnectionListRepresentatio
|
|
|
501
501
|
})();
|
|
502
502
|
return v_error === undefined ? null : v_error;
|
|
503
503
|
}
|
|
504
|
-
const RepresentationType$
|
|
505
|
-
function normalize$
|
|
504
|
+
const RepresentationType$6 = 'ExternalConnectivityConnectionListRepresentation';
|
|
505
|
+
function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
506
506
|
const input_connections = input.connections;
|
|
507
507
|
const input_connections_id = path.fullPath + '__connections';
|
|
508
508
|
for (let i = 0; i < input_connections.length; i++) {
|
|
509
509
|
const input_connections_item = input_connections[i];
|
|
510
510
|
let input_connections_item_id = input_connections_id + '__' + i;
|
|
511
|
-
input_connections[i] = ingest$
|
|
511
|
+
input_connections[i] = ingest$7(input_connections_item, {
|
|
512
512
|
fullPath: input_connections_item_id,
|
|
513
513
|
propertyName: i,
|
|
514
514
|
parent: {
|
|
@@ -521,22 +521,22 @@ function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
|
521
521
|
}
|
|
522
522
|
return input;
|
|
523
523
|
}
|
|
524
|
-
const select$
|
|
524
|
+
const select$e = function ExternalConnectivityConnectionListRepresentationSelect() {
|
|
525
525
|
return {
|
|
526
526
|
kind: 'Fragment',
|
|
527
|
-
version: VERSION$
|
|
527
|
+
version: VERSION$6,
|
|
528
528
|
private: [],
|
|
529
529
|
selections: [
|
|
530
530
|
{
|
|
531
531
|
name: 'connections',
|
|
532
532
|
kind: 'Link',
|
|
533
533
|
plural: true,
|
|
534
|
-
fragment: select$
|
|
534
|
+
fragment: select$f()
|
|
535
535
|
}
|
|
536
536
|
]
|
|
537
537
|
};
|
|
538
538
|
};
|
|
539
|
-
function equals$
|
|
539
|
+
function equals$6(existing, incoming) {
|
|
540
540
|
const existing_connections = existing.connections;
|
|
541
541
|
const incoming_connections = incoming.connections;
|
|
542
542
|
const equals_connections_items = equalsArray(existing_connections, incoming_connections, (existing_connections_item, incoming_connections_item) => {
|
|
@@ -549,48 +549,48 @@ function equals$5(existing, incoming) {
|
|
|
549
549
|
}
|
|
550
550
|
return true;
|
|
551
551
|
}
|
|
552
|
-
const ingest$
|
|
552
|
+
const ingest$6 = function ExternalConnectivityConnectionListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
553
553
|
if (process.env.NODE_ENV !== 'production') {
|
|
554
|
-
const validateError = validate$
|
|
554
|
+
const validateError = validate$b(input);
|
|
555
555
|
if (validateError !== null) {
|
|
556
556
|
throw validateError;
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
559
|
const key = path.fullPath;
|
|
560
|
-
const ttlToUse = TTL$
|
|
561
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
560
|
+
const ttlToUse = TTL$6;
|
|
561
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "external-connectivity", VERSION$6, RepresentationType$6, equals$6);
|
|
562
562
|
return createLink(key);
|
|
563
563
|
};
|
|
564
|
-
function getTypeCacheKeys$
|
|
564
|
+
function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
|
|
565
565
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
566
566
|
const rootKey = fullPathFactory();
|
|
567
567
|
rootKeySet.set(rootKey, {
|
|
568
568
|
namespace: keyPrefix,
|
|
569
|
-
representationName: RepresentationType$
|
|
569
|
+
representationName: RepresentationType$6,
|
|
570
570
|
mergeable: false
|
|
571
571
|
});
|
|
572
572
|
const input_connections_length = input.connections.length;
|
|
573
573
|
for (let i = 0; i < input_connections_length; i++) {
|
|
574
|
-
getTypeCacheKeys$
|
|
574
|
+
getTypeCacheKeys$7(rootKeySet, luvio, input.connections[i], () => '');
|
|
575
575
|
}
|
|
576
576
|
}
|
|
577
577
|
|
|
578
|
-
function select$
|
|
579
|
-
return select$
|
|
578
|
+
function select$d(luvio, params) {
|
|
579
|
+
return select$e();
|
|
580
580
|
}
|
|
581
|
-
function keyBuilder$
|
|
581
|
+
function keyBuilder$a(luvio, params) {
|
|
582
582
|
return keyPrefix + '::ExternalConnectivityConnectionListRepresentation:(' + ')';
|
|
583
583
|
}
|
|
584
|
-
function getResponseCacheKeys$
|
|
585
|
-
getTypeCacheKeys$
|
|
584
|
+
function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
|
|
585
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response, () => keyBuilder$a());
|
|
586
586
|
}
|
|
587
|
-
function ingestSuccess$
|
|
587
|
+
function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
588
588
|
const { body } = response;
|
|
589
|
-
const key = keyBuilder$
|
|
590
|
-
luvio.storeIngest(key, ingest$
|
|
589
|
+
const key = keyBuilder$a();
|
|
590
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
591
591
|
const snapshot = luvio.storeLookup({
|
|
592
592
|
recordId: key,
|
|
593
|
-
node: select$
|
|
593
|
+
node: select$d(),
|
|
594
594
|
variables: {},
|
|
595
595
|
}, snapshotRefresh);
|
|
596
596
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -602,18 +602,18 @@ function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
602
602
|
return snapshot;
|
|
603
603
|
}
|
|
604
604
|
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
605
|
-
const key = keyBuilder$
|
|
605
|
+
const key = keyBuilder$a();
|
|
606
606
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
607
607
|
const storeMetadataParams = {
|
|
608
|
-
ttl: TTL$
|
|
608
|
+
ttl: TTL$6,
|
|
609
609
|
namespace: keyPrefix,
|
|
610
|
-
version: VERSION$
|
|
611
|
-
representationName: RepresentationType$
|
|
610
|
+
version: VERSION$6,
|
|
611
|
+
representationName: RepresentationType$6
|
|
612
612
|
};
|
|
613
613
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
614
614
|
return errorSnapshot;
|
|
615
615
|
}
|
|
616
|
-
function createResourceRequest$
|
|
616
|
+
function createResourceRequest$7(config) {
|
|
617
617
|
const headers = {};
|
|
618
618
|
return {
|
|
619
619
|
baseUri: '/services/data/v62.0',
|
|
@@ -627,57 +627,57 @@ function createResourceRequest$5(config) {
|
|
|
627
627
|
};
|
|
628
628
|
}
|
|
629
629
|
|
|
630
|
-
const adapterName$
|
|
630
|
+
const adapterName$7 = 'getConnections';
|
|
631
631
|
const getConnections_ConfigPropertyMetadata = [];
|
|
632
|
-
const getConnections_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
633
|
-
const createResourceParams$
|
|
634
|
-
function keyBuilder$
|
|
635
|
-
createResourceParams$
|
|
636
|
-
return keyBuilder$
|
|
632
|
+
const getConnections_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, getConnections_ConfigPropertyMetadata);
|
|
633
|
+
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$8(getConnections_ConfigPropertyMetadata);
|
|
634
|
+
function keyBuilder$9(luvio, config) {
|
|
635
|
+
createResourceParams$7(config);
|
|
636
|
+
return keyBuilder$a();
|
|
637
637
|
}
|
|
638
|
-
function typeCheckConfig$
|
|
638
|
+
function typeCheckConfig$7(untrustedConfig) {
|
|
639
639
|
const config = {};
|
|
640
640
|
return config;
|
|
641
641
|
}
|
|
642
|
-
function validateAdapterConfig$
|
|
642
|
+
function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
|
|
643
643
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
644
644
|
return null;
|
|
645
645
|
}
|
|
646
646
|
if (process.env.NODE_ENV !== 'production') {
|
|
647
647
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
648
648
|
}
|
|
649
|
-
const config = typeCheckConfig$
|
|
649
|
+
const config = typeCheckConfig$7();
|
|
650
650
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
651
651
|
return null;
|
|
652
652
|
}
|
|
653
653
|
return config;
|
|
654
654
|
}
|
|
655
655
|
function adapterFragment$3(luvio, config) {
|
|
656
|
-
createResourceParams$
|
|
657
|
-
return select$
|
|
656
|
+
createResourceParams$7(config);
|
|
657
|
+
return select$d();
|
|
658
658
|
}
|
|
659
659
|
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
660
|
-
const snapshot = ingestSuccess$
|
|
660
|
+
const snapshot = ingestSuccess$7(luvio, resourceParams, response, {
|
|
661
661
|
config,
|
|
662
|
-
resolve: () => buildNetworkSnapshot$
|
|
662
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
663
663
|
});
|
|
664
664
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
665
665
|
}
|
|
666
666
|
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
667
667
|
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
668
668
|
config,
|
|
669
|
-
resolve: () => buildNetworkSnapshot$
|
|
669
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
670
670
|
});
|
|
671
671
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
672
672
|
}
|
|
673
|
-
function buildNetworkSnapshot$
|
|
674
|
-
const resourceParams = createResourceParams$
|
|
675
|
-
const request = createResourceRequest$
|
|
673
|
+
function buildNetworkSnapshot$7(luvio, config, options) {
|
|
674
|
+
const resourceParams = createResourceParams$7(config);
|
|
675
|
+
const request = createResourceRequest$7();
|
|
676
676
|
return luvio.dispatchResourceRequest(request, options)
|
|
677
677
|
.then((response) => {
|
|
678
678
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
679
679
|
const cache = new StoreKeyMap();
|
|
680
|
-
getResponseCacheKeys$
|
|
680
|
+
getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
|
|
681
681
|
return cache;
|
|
682
682
|
});
|
|
683
683
|
}, (response) => {
|
|
@@ -685,23 +685,23 @@ function buildNetworkSnapshot$5(luvio, config, options) {
|
|
|
685
685
|
});
|
|
686
686
|
}
|
|
687
687
|
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
688
|
-
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
688
|
+
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$7, undefined, false);
|
|
689
689
|
}
|
|
690
690
|
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
691
691
|
const { luvio, config } = context;
|
|
692
692
|
const selector = {
|
|
693
|
-
recordId: keyBuilder$
|
|
693
|
+
recordId: keyBuilder$9(luvio, config),
|
|
694
694
|
node: adapterFragment$3(luvio, config),
|
|
695
695
|
variables: {},
|
|
696
696
|
};
|
|
697
697
|
const cacheSnapshot = storeLookup(selector, {
|
|
698
698
|
config,
|
|
699
|
-
resolve: () => buildNetworkSnapshot$
|
|
699
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
700
700
|
});
|
|
701
701
|
return cacheSnapshot;
|
|
702
702
|
}
|
|
703
703
|
const getConnectionsAdapterFactory = (luvio) => function externalConnectivity__getConnections(untrustedConfig, requestContext) {
|
|
704
|
-
const config = validateAdapterConfig$
|
|
704
|
+
const config = validateAdapterConfig$7(untrustedConfig, getConnections_ConfigPropertyNames);
|
|
705
705
|
// Invalid or incomplete config
|
|
706
706
|
if (config === null) {
|
|
707
707
|
return null;
|
|
@@ -710,7 +710,7 @@ const getConnectionsAdapterFactory = (luvio) => function externalConnectivity__g
|
|
|
710
710
|
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
711
711
|
};
|
|
712
712
|
|
|
713
|
-
function validate$
|
|
713
|
+
function validate$a(obj, path = 'AuthenticationTypeInputRepresentation') {
|
|
714
714
|
const v_error = (() => {
|
|
715
715
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
716
716
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -736,9 +736,9 @@ function validate$9(obj, path = 'AuthenticationTypeInputRepresentation') {
|
|
|
736
736
|
return v_error === undefined ? null : v_error;
|
|
737
737
|
}
|
|
738
738
|
|
|
739
|
-
const TTL$
|
|
740
|
-
const VERSION$
|
|
741
|
-
function validate$
|
|
739
|
+
const TTL$5 = 500;
|
|
740
|
+
const VERSION$5 = "139e6c6cae3db78f5efabb1639252ac2";
|
|
741
|
+
function validate$9(obj, path = 'ExternalConnectivityConnectionCreatedRepresentation') {
|
|
742
742
|
const v_error = (() => {
|
|
743
743
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
744
744
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -751,23 +751,23 @@ function validate$8(obj, path = 'ExternalConnectivityConnectionCreatedRepresenta
|
|
|
751
751
|
})();
|
|
752
752
|
return v_error === undefined ? null : v_error;
|
|
753
753
|
}
|
|
754
|
-
const RepresentationType$
|
|
755
|
-
function keyBuilder$
|
|
756
|
-
return keyPrefix + '::' + RepresentationType$
|
|
754
|
+
const RepresentationType$5 = 'ExternalConnectivityConnectionCreatedRepresentation';
|
|
755
|
+
function keyBuilder$8(luvio, config) {
|
|
756
|
+
return keyPrefix + '::' + RepresentationType$5 + ':' + config.developerName;
|
|
757
757
|
}
|
|
758
|
-
function keyBuilderFromType$
|
|
758
|
+
function keyBuilderFromType$2(luvio, object) {
|
|
759
759
|
const keyParams = {
|
|
760
760
|
developerName: object.developerName
|
|
761
761
|
};
|
|
762
|
-
return keyBuilder$
|
|
762
|
+
return keyBuilder$8(luvio, keyParams);
|
|
763
763
|
}
|
|
764
|
-
function normalize$
|
|
764
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
765
765
|
return input;
|
|
766
766
|
}
|
|
767
|
-
const select$
|
|
767
|
+
const select$c = function ExternalConnectivityConnectionCreatedRepresentationSelect() {
|
|
768
768
|
return {
|
|
769
769
|
kind: 'Fragment',
|
|
770
|
-
version: VERSION$
|
|
770
|
+
version: VERSION$5,
|
|
771
771
|
private: [],
|
|
772
772
|
selections: [
|
|
773
773
|
{
|
|
@@ -777,7 +777,7 @@ const select$9 = function ExternalConnectivityConnectionCreatedRepresentationSel
|
|
|
777
777
|
]
|
|
778
778
|
};
|
|
779
779
|
};
|
|
780
|
-
function equals$
|
|
780
|
+
function equals$5(existing, incoming) {
|
|
781
781
|
const existing_developerName = existing.developerName;
|
|
782
782
|
const incoming_developerName = incoming.developerName;
|
|
783
783
|
if (!(existing_developerName === incoming_developerName)) {
|
|
@@ -785,41 +785,41 @@ function equals$4(existing, incoming) {
|
|
|
785
785
|
}
|
|
786
786
|
return true;
|
|
787
787
|
}
|
|
788
|
-
const ingest$
|
|
788
|
+
const ingest$5 = function ExternalConnectivityConnectionCreatedRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
789
789
|
if (process.env.NODE_ENV !== 'production') {
|
|
790
|
-
const validateError = validate$
|
|
790
|
+
const validateError = validate$9(input);
|
|
791
791
|
if (validateError !== null) {
|
|
792
792
|
throw validateError;
|
|
793
793
|
}
|
|
794
794
|
}
|
|
795
|
-
const key = keyBuilderFromType$
|
|
796
|
-
const ttlToUse = TTL$
|
|
797
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
795
|
+
const key = keyBuilderFromType$2(luvio, input);
|
|
796
|
+
const ttlToUse = TTL$5;
|
|
797
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "external-connectivity", VERSION$5, RepresentationType$5, equals$5);
|
|
798
798
|
return createLink(key);
|
|
799
799
|
};
|
|
800
|
-
function getTypeCacheKeys$
|
|
800
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
801
801
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
802
|
-
const rootKey = keyBuilderFromType$
|
|
802
|
+
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
803
803
|
rootKeySet.set(rootKey, {
|
|
804
804
|
namespace: keyPrefix,
|
|
805
|
-
representationName: RepresentationType$
|
|
805
|
+
representationName: RepresentationType$5,
|
|
806
806
|
mergeable: false
|
|
807
807
|
});
|
|
808
808
|
}
|
|
809
809
|
|
|
810
|
-
function select$
|
|
811
|
-
return select$
|
|
810
|
+
function select$b(luvio, params) {
|
|
811
|
+
return select$c();
|
|
812
812
|
}
|
|
813
|
-
function getResponseCacheKeys$
|
|
814
|
-
getTypeCacheKeys$
|
|
813
|
+
function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
|
|
814
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response);
|
|
815
815
|
}
|
|
816
|
-
function ingestSuccess$
|
|
816
|
+
function ingestSuccess$6(luvio, resourceParams, response) {
|
|
817
817
|
const { body } = response;
|
|
818
|
-
const key = keyBuilderFromType$
|
|
819
|
-
luvio.storeIngest(key, ingest$
|
|
818
|
+
const key = keyBuilderFromType$2(luvio, body);
|
|
819
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
820
820
|
const snapshot = luvio.storeLookup({
|
|
821
821
|
recordId: key,
|
|
822
|
-
node: select$
|
|
822
|
+
node: select$b(),
|
|
823
823
|
variables: {},
|
|
824
824
|
});
|
|
825
825
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -830,7 +830,7 @@ function ingestSuccess$4(luvio, resourceParams, response) {
|
|
|
830
830
|
deepFreeze(snapshot.data);
|
|
831
831
|
return snapshot;
|
|
832
832
|
}
|
|
833
|
-
function createResourceRequest$
|
|
833
|
+
function createResourceRequest$6(config) {
|
|
834
834
|
const headers = {};
|
|
835
835
|
return {
|
|
836
836
|
baseUri: '/services/data/v62.0',
|
|
@@ -844,49 +844,49 @@ function createResourceRequest$4(config) {
|
|
|
844
844
|
};
|
|
845
845
|
}
|
|
846
846
|
|
|
847
|
-
const adapterName$
|
|
847
|
+
const adapterName$6 = 'createConnection';
|
|
848
848
|
const createConnection_ConfigPropertyMetadata = [
|
|
849
849
|
generateParamConfigMetadata('authenticationTypeInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
850
850
|
generateParamConfigMetadata('connectorDeveloperName', true, 2 /* Body */, 0 /* String */),
|
|
851
851
|
generateParamConfigMetadata('description', true, 2 /* Body */, 0 /* String */),
|
|
852
852
|
generateParamConfigMetadata('name', true, 2 /* Body */, 0 /* String */),
|
|
853
853
|
];
|
|
854
|
-
const createConnection_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
855
|
-
const createResourceParams$
|
|
856
|
-
function typeCheckConfig$
|
|
854
|
+
const createConnection_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, createConnection_ConfigPropertyMetadata);
|
|
855
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$8(createConnection_ConfigPropertyMetadata);
|
|
856
|
+
function typeCheckConfig$6(untrustedConfig) {
|
|
857
857
|
const config = {};
|
|
858
|
-
typeCheckConfig$
|
|
858
|
+
typeCheckConfig$8(untrustedConfig, config, createConnection_ConfigPropertyMetadata);
|
|
859
859
|
const untrustedConfig_authenticationTypeInput = untrustedConfig.authenticationTypeInput;
|
|
860
|
-
const referenceAuthenticationTypeInputRepresentationValidationError = validate$
|
|
860
|
+
const referenceAuthenticationTypeInputRepresentationValidationError = validate$a(untrustedConfig_authenticationTypeInput);
|
|
861
861
|
if (referenceAuthenticationTypeInputRepresentationValidationError === null) {
|
|
862
862
|
config.authenticationTypeInput = untrustedConfig_authenticationTypeInput;
|
|
863
863
|
}
|
|
864
864
|
return config;
|
|
865
865
|
}
|
|
866
|
-
function validateAdapterConfig$
|
|
866
|
+
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
867
867
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
868
868
|
return null;
|
|
869
869
|
}
|
|
870
870
|
if (process.env.NODE_ENV !== 'production') {
|
|
871
871
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
872
872
|
}
|
|
873
|
-
const config = typeCheckConfig$
|
|
873
|
+
const config = typeCheckConfig$6(untrustedConfig);
|
|
874
874
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
875
875
|
return null;
|
|
876
876
|
}
|
|
877
877
|
return config;
|
|
878
878
|
}
|
|
879
|
-
function buildNetworkSnapshot$
|
|
880
|
-
const resourceParams = createResourceParams$
|
|
881
|
-
const request = createResourceRequest$
|
|
879
|
+
function buildNetworkSnapshot$6(luvio, config, options) {
|
|
880
|
+
const resourceParams = createResourceParams$6(config);
|
|
881
|
+
const request = createResourceRequest$6(resourceParams);
|
|
882
882
|
return luvio.dispatchResourceRequest(request, options)
|
|
883
883
|
.then((response) => {
|
|
884
884
|
return luvio.handleSuccessResponse(() => {
|
|
885
|
-
const snapshot = ingestSuccess$
|
|
885
|
+
const snapshot = ingestSuccess$6(luvio, resourceParams, response);
|
|
886
886
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
887
887
|
}, () => {
|
|
888
888
|
const cache = new StoreKeyMap();
|
|
889
|
-
getResponseCacheKeys$
|
|
889
|
+
getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
|
|
890
890
|
return cache;
|
|
891
891
|
});
|
|
892
892
|
}, (response) => {
|
|
@@ -896,16 +896,16 @@ function buildNetworkSnapshot$4(luvio, config, options) {
|
|
|
896
896
|
}
|
|
897
897
|
const createConnectionAdapterFactory = (luvio) => {
|
|
898
898
|
return function createConnection(untrustedConfig) {
|
|
899
|
-
const config = validateAdapterConfig$
|
|
899
|
+
const config = validateAdapterConfig$6(untrustedConfig, createConnection_ConfigPropertyNames);
|
|
900
900
|
// Invalid or incomplete config
|
|
901
901
|
if (config === null) {
|
|
902
902
|
throw new Error('Invalid config for "createConnection"');
|
|
903
903
|
}
|
|
904
|
-
return buildNetworkSnapshot$
|
|
904
|
+
return buildNetworkSnapshot$6(luvio, config);
|
|
905
905
|
};
|
|
906
906
|
};
|
|
907
907
|
|
|
908
|
-
function validate$
|
|
908
|
+
function validate$8(obj, path = 'AuthenticationParameterDefinitionRepresentation') {
|
|
909
909
|
const v_error = (() => {
|
|
910
910
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
911
911
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -949,14 +949,14 @@ function validate$7(obj, path = 'AuthenticationParameterDefinitionRepresentation
|
|
|
949
949
|
return v_error === undefined ? null : v_error;
|
|
950
950
|
}
|
|
951
951
|
|
|
952
|
-
function validate$
|
|
952
|
+
function validate$7(obj, path = 'AuthenticationParameterRepresentation') {
|
|
953
953
|
const v_error = (() => {
|
|
954
954
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
955
955
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
956
956
|
}
|
|
957
957
|
const obj_authenticationParameterDefinition = obj.authenticationParameterDefinition;
|
|
958
958
|
const path_authenticationParameterDefinition = path + '.authenticationParameterDefinition';
|
|
959
|
-
const referencepath_authenticationParameterDefinitionValidationError = validate$
|
|
959
|
+
const referencepath_authenticationParameterDefinitionValidationError = validate$8(obj_authenticationParameterDefinition, path_authenticationParameterDefinition);
|
|
960
960
|
if (referencepath_authenticationParameterDefinitionValidationError !== null) {
|
|
961
961
|
let message = 'Object doesn\'t match AuthenticationParameterDefinitionRepresentation (at "' + path_authenticationParameterDefinition + '")\n';
|
|
962
962
|
message += referencepath_authenticationParameterDefinitionValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -971,7 +971,7 @@ function validate$6(obj, path = 'AuthenticationParameterRepresentation') {
|
|
|
971
971
|
return v_error === undefined ? null : v_error;
|
|
972
972
|
}
|
|
973
973
|
|
|
974
|
-
function validate$
|
|
974
|
+
function validate$6(obj, path = 'AuthenticationTypeRepresentation') {
|
|
975
975
|
const v_error = (() => {
|
|
976
976
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
977
977
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -984,7 +984,7 @@ function validate$5(obj, path = 'AuthenticationTypeRepresentation') {
|
|
|
984
984
|
for (let i = 0; i < obj_authenticationParameters.length; i++) {
|
|
985
985
|
const obj_authenticationParameters_item = obj_authenticationParameters[i];
|
|
986
986
|
const path_authenticationParameters_item = path_authenticationParameters + '[' + i + ']';
|
|
987
|
-
const referencepath_authenticationParameters_itemValidationError = validate$
|
|
987
|
+
const referencepath_authenticationParameters_itemValidationError = validate$7(obj_authenticationParameters_item, path_authenticationParameters_item);
|
|
988
988
|
if (referencepath_authenticationParameters_itemValidationError !== null) {
|
|
989
989
|
let message = 'Object doesn\'t match AuthenticationParameterRepresentation (at "' + path_authenticationParameters_item + '")\n';
|
|
990
990
|
message += referencepath_authenticationParameters_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1000,16 +1000,16 @@ function validate$5(obj, path = 'AuthenticationTypeRepresentation') {
|
|
|
1000
1000
|
return v_error === undefined ? null : v_error;
|
|
1001
1001
|
}
|
|
1002
1002
|
|
|
1003
|
-
const TTL$
|
|
1004
|
-
const VERSION$
|
|
1005
|
-
function validate$
|
|
1003
|
+
const TTL$4 = 500;
|
|
1004
|
+
const VERSION$4 = "7ca6b78397dd8632eba2e72a10134d04";
|
|
1005
|
+
function validate$5(obj, path = 'ExternalConnectivityConnectionDetailsRepresentation') {
|
|
1006
1006
|
const v_error = (() => {
|
|
1007
1007
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1008
1008
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1009
1009
|
}
|
|
1010
1010
|
const obj_authenticationType = obj.authenticationType;
|
|
1011
1011
|
const path_authenticationType = path + '.authenticationType';
|
|
1012
|
-
const referencepath_authenticationTypeValidationError = validate$
|
|
1012
|
+
const referencepath_authenticationTypeValidationError = validate$6(obj_authenticationType, path_authenticationType);
|
|
1013
1013
|
if (referencepath_authenticationTypeValidationError !== null) {
|
|
1014
1014
|
let message = 'Object doesn\'t match AuthenticationTypeRepresentation (at "' + path_authenticationType + '")\n';
|
|
1015
1015
|
message += referencepath_authenticationTypeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1063,7 +1063,7 @@ function validate$4(obj, path = 'ExternalConnectivityConnectionDetailsRepresenta
|
|
|
1063
1063
|
}
|
|
1064
1064
|
const obj_externalConnectorMetadata = obj.externalConnectorMetadata;
|
|
1065
1065
|
const path_externalConnectorMetadata = path + '.externalConnectorMetadata';
|
|
1066
|
-
const referencepath_externalConnectorMetadataValidationError = validate$
|
|
1066
|
+
const referencepath_externalConnectorMetadataValidationError = validate$d(obj_externalConnectorMetadata, path_externalConnectorMetadata);
|
|
1067
1067
|
if (referencepath_externalConnectorMetadataValidationError !== null) {
|
|
1068
1068
|
let message = 'Object doesn\'t match ExternalConnectivityConnectorRepresentation (at "' + path_externalConnectorMetadata + '")\n';
|
|
1069
1069
|
message += referencepath_externalConnectorMetadataValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1113,62 +1113,62 @@ function validate$4(obj, path = 'ExternalConnectivityConnectionDetailsRepresenta
|
|
|
1113
1113
|
})();
|
|
1114
1114
|
return v_error === undefined ? null : v_error;
|
|
1115
1115
|
}
|
|
1116
|
-
const RepresentationType$
|
|
1117
|
-
function normalize$
|
|
1116
|
+
const RepresentationType$4 = 'ExternalConnectivityConnectionDetailsRepresentation';
|
|
1117
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
1118
1118
|
return input;
|
|
1119
1119
|
}
|
|
1120
|
-
const select$
|
|
1120
|
+
const select$a = function ExternalConnectivityConnectionDetailsRepresentationSelect() {
|
|
1121
1121
|
return {
|
|
1122
1122
|
kind: 'Fragment',
|
|
1123
|
-
version: VERSION$
|
|
1123
|
+
version: VERSION$4,
|
|
1124
1124
|
private: [],
|
|
1125
1125
|
opaque: true
|
|
1126
1126
|
};
|
|
1127
1127
|
};
|
|
1128
|
-
function equals$
|
|
1128
|
+
function equals$4(existing, incoming) {
|
|
1129
1129
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1130
1130
|
return false;
|
|
1131
1131
|
}
|
|
1132
1132
|
return true;
|
|
1133
1133
|
}
|
|
1134
|
-
const ingest$
|
|
1134
|
+
const ingest$4 = function ExternalConnectivityConnectionDetailsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1135
1135
|
if (process.env.NODE_ENV !== 'production') {
|
|
1136
|
-
const validateError = validate$
|
|
1136
|
+
const validateError = validate$5(input);
|
|
1137
1137
|
if (validateError !== null) {
|
|
1138
1138
|
throw validateError;
|
|
1139
1139
|
}
|
|
1140
1140
|
}
|
|
1141
1141
|
const key = path.fullPath;
|
|
1142
|
-
const ttlToUse = TTL$
|
|
1143
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1142
|
+
const ttlToUse = TTL$4;
|
|
1143
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "external-connectivity", VERSION$4, RepresentationType$4, equals$4);
|
|
1144
1144
|
return createLink(key);
|
|
1145
1145
|
};
|
|
1146
|
-
function getTypeCacheKeys$
|
|
1146
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
1147
1147
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1148
1148
|
const rootKey = fullPathFactory();
|
|
1149
1149
|
rootKeySet.set(rootKey, {
|
|
1150
1150
|
namespace: keyPrefix,
|
|
1151
|
-
representationName: RepresentationType$
|
|
1151
|
+
representationName: RepresentationType$4,
|
|
1152
1152
|
mergeable: false
|
|
1153
1153
|
});
|
|
1154
1154
|
}
|
|
1155
1155
|
|
|
1156
|
-
function select$
|
|
1157
|
-
return select$
|
|
1156
|
+
function select$9(luvio, params) {
|
|
1157
|
+
return select$a();
|
|
1158
1158
|
}
|
|
1159
|
-
function keyBuilder$
|
|
1159
|
+
function keyBuilder$7(luvio, params) {
|
|
1160
1160
|
return keyPrefix + '::ExternalConnectivityConnectionDetailsRepresentation:(' + 'connectionDeveloperName:' + params.urlParams.connectionDeveloperName + ')';
|
|
1161
1161
|
}
|
|
1162
|
-
function getResponseCacheKeys$
|
|
1163
|
-
getTypeCacheKeys$
|
|
1162
|
+
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
1163
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$7(luvio, resourceParams));
|
|
1164
1164
|
}
|
|
1165
|
-
function ingestSuccess$
|
|
1165
|
+
function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
1166
1166
|
const { body } = response;
|
|
1167
|
-
const key = keyBuilder$
|
|
1168
|
-
luvio.storeIngest(key, ingest$
|
|
1167
|
+
const key = keyBuilder$7(luvio, resourceParams);
|
|
1168
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
1169
1169
|
const snapshot = luvio.storeLookup({
|
|
1170
1170
|
recordId: key,
|
|
1171
|
-
node: select$
|
|
1171
|
+
node: select$9(),
|
|
1172
1172
|
variables: {},
|
|
1173
1173
|
}, snapshotRefresh);
|
|
1174
1174
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1180,18 +1180,18 @@ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1180
1180
|
return snapshot;
|
|
1181
1181
|
}
|
|
1182
1182
|
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
1183
|
-
const key = keyBuilder$
|
|
1183
|
+
const key = keyBuilder$7(luvio, params);
|
|
1184
1184
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1185
1185
|
const storeMetadataParams = {
|
|
1186
|
-
ttl: TTL$
|
|
1186
|
+
ttl: TTL$4,
|
|
1187
1187
|
namespace: keyPrefix,
|
|
1188
|
-
version: VERSION$
|
|
1189
|
-
representationName: RepresentationType$
|
|
1188
|
+
version: VERSION$4,
|
|
1189
|
+
representationName: RepresentationType$4
|
|
1190
1190
|
};
|
|
1191
1191
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1192
1192
|
return errorSnapshot;
|
|
1193
1193
|
}
|
|
1194
|
-
function createResourceRequest$
|
|
1194
|
+
function createResourceRequest$5(config) {
|
|
1195
1195
|
const headers = {};
|
|
1196
1196
|
return {
|
|
1197
1197
|
baseUri: '/services/data/v62.0',
|
|
@@ -1205,60 +1205,60 @@ function createResourceRequest$3(config) {
|
|
|
1205
1205
|
};
|
|
1206
1206
|
}
|
|
1207
1207
|
|
|
1208
|
-
const adapterName$
|
|
1208
|
+
const adapterName$5 = 'getConnectionDetails';
|
|
1209
1209
|
const getConnectionDetails_ConfigPropertyMetadata = [
|
|
1210
1210
|
generateParamConfigMetadata('connectionDeveloperName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1211
1211
|
];
|
|
1212
|
-
const getConnectionDetails_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1213
|
-
const createResourceParams$
|
|
1214
|
-
function keyBuilder$
|
|
1215
|
-
const resourceParams = createResourceParams$
|
|
1216
|
-
return keyBuilder$
|
|
1212
|
+
const getConnectionDetails_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getConnectionDetails_ConfigPropertyMetadata);
|
|
1213
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$8(getConnectionDetails_ConfigPropertyMetadata);
|
|
1214
|
+
function keyBuilder$6(luvio, config) {
|
|
1215
|
+
const resourceParams = createResourceParams$5(config);
|
|
1216
|
+
return keyBuilder$7(luvio, resourceParams);
|
|
1217
1217
|
}
|
|
1218
|
-
function typeCheckConfig$
|
|
1218
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
1219
1219
|
const config = {};
|
|
1220
|
-
typeCheckConfig$
|
|
1220
|
+
typeCheckConfig$8(untrustedConfig, config, getConnectionDetails_ConfigPropertyMetadata);
|
|
1221
1221
|
return config;
|
|
1222
1222
|
}
|
|
1223
|
-
function validateAdapterConfig$
|
|
1223
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
1224
1224
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1225
1225
|
return null;
|
|
1226
1226
|
}
|
|
1227
1227
|
if (process.env.NODE_ENV !== 'production') {
|
|
1228
1228
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1229
1229
|
}
|
|
1230
|
-
const config = typeCheckConfig$
|
|
1230
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
1231
1231
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1232
1232
|
return null;
|
|
1233
1233
|
}
|
|
1234
1234
|
return config;
|
|
1235
1235
|
}
|
|
1236
1236
|
function adapterFragment$2(luvio, config) {
|
|
1237
|
-
createResourceParams$
|
|
1238
|
-
return select$
|
|
1237
|
+
createResourceParams$5(config);
|
|
1238
|
+
return select$9();
|
|
1239
1239
|
}
|
|
1240
1240
|
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
1241
|
-
const snapshot = ingestSuccess$
|
|
1241
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
|
|
1242
1242
|
config,
|
|
1243
|
-
resolve: () => buildNetworkSnapshot$
|
|
1243
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
1244
1244
|
});
|
|
1245
1245
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1246
1246
|
}
|
|
1247
1247
|
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
1248
1248
|
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
1249
1249
|
config,
|
|
1250
|
-
resolve: () => buildNetworkSnapshot$
|
|
1250
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
1251
1251
|
});
|
|
1252
1252
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1253
1253
|
}
|
|
1254
|
-
function buildNetworkSnapshot$
|
|
1255
|
-
const resourceParams = createResourceParams$
|
|
1256
|
-
const request = createResourceRequest$
|
|
1254
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
1255
|
+
const resourceParams = createResourceParams$5(config);
|
|
1256
|
+
const request = createResourceRequest$5(resourceParams);
|
|
1257
1257
|
return luvio.dispatchResourceRequest(request, options)
|
|
1258
1258
|
.then((response) => {
|
|
1259
1259
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
1260
1260
|
const cache = new StoreKeyMap();
|
|
1261
|
-
getResponseCacheKeys$
|
|
1261
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
|
|
1262
1262
|
return cache;
|
|
1263
1263
|
});
|
|
1264
1264
|
}, (response) => {
|
|
@@ -1266,23 +1266,23 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
1266
1266
|
});
|
|
1267
1267
|
}
|
|
1268
1268
|
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
1269
|
-
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
1269
|
+
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
|
|
1270
1270
|
}
|
|
1271
1271
|
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
1272
1272
|
const { luvio, config } = context;
|
|
1273
1273
|
const selector = {
|
|
1274
|
-
recordId: keyBuilder$
|
|
1274
|
+
recordId: keyBuilder$6(luvio, config),
|
|
1275
1275
|
node: adapterFragment$2(luvio, config),
|
|
1276
1276
|
variables: {},
|
|
1277
1277
|
};
|
|
1278
1278
|
const cacheSnapshot = storeLookup(selector, {
|
|
1279
1279
|
config,
|
|
1280
|
-
resolve: () => buildNetworkSnapshot$
|
|
1280
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
1281
1281
|
});
|
|
1282
1282
|
return cacheSnapshot;
|
|
1283
1283
|
}
|
|
1284
1284
|
const getConnectionDetailsAdapterFactory = (luvio) => function externalConnectivity__getConnectionDetails(untrustedConfig, requestContext) {
|
|
1285
|
-
const config = validateAdapterConfig$
|
|
1285
|
+
const config = validateAdapterConfig$5(untrustedConfig, getConnectionDetails_ConfigPropertyNames);
|
|
1286
1286
|
// Invalid or incomplete config
|
|
1287
1287
|
if (config === null) {
|
|
1288
1288
|
return null;
|
|
@@ -1291,6 +1291,336 @@ const getConnectionDetailsAdapterFactory = (luvio) => function externalConnectiv
|
|
|
1291
1291
|
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
1292
1292
|
};
|
|
1293
1293
|
|
|
1294
|
+
const TTL$3 = 500;
|
|
1295
|
+
const VERSION$3 = "2f8128d7e2e433bc604c71441fa6fc50";
|
|
1296
|
+
function validate$4(obj, path = 'ExternalConnectivityConnectionEditDeleteResultRepresentation') {
|
|
1297
|
+
const v_error = (() => {
|
|
1298
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1299
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1300
|
+
}
|
|
1301
|
+
const obj_developerName = obj.developerName;
|
|
1302
|
+
const path_developerName = path + '.developerName';
|
|
1303
|
+
if (typeof obj_developerName !== 'string') {
|
|
1304
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
1305
|
+
}
|
|
1306
|
+
const obj_errorDescription = obj.errorDescription;
|
|
1307
|
+
const path_errorDescription = path + '.errorDescription';
|
|
1308
|
+
let obj_errorDescription_union0 = null;
|
|
1309
|
+
const obj_errorDescription_union0_error = (() => {
|
|
1310
|
+
if (typeof obj_errorDescription !== 'string') {
|
|
1311
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errorDescription + '" (at "' + path_errorDescription + '")');
|
|
1312
|
+
}
|
|
1313
|
+
})();
|
|
1314
|
+
if (obj_errorDescription_union0_error != null) {
|
|
1315
|
+
obj_errorDescription_union0 = obj_errorDescription_union0_error.message;
|
|
1316
|
+
}
|
|
1317
|
+
let obj_errorDescription_union1 = null;
|
|
1318
|
+
const obj_errorDescription_union1_error = (() => {
|
|
1319
|
+
if (obj_errorDescription !== null) {
|
|
1320
|
+
return new TypeError('Expected "null" but received "' + typeof obj_errorDescription + '" (at "' + path_errorDescription + '")');
|
|
1321
|
+
}
|
|
1322
|
+
})();
|
|
1323
|
+
if (obj_errorDescription_union1_error != null) {
|
|
1324
|
+
obj_errorDescription_union1 = obj_errorDescription_union1_error.message;
|
|
1325
|
+
}
|
|
1326
|
+
if (obj_errorDescription_union0 && obj_errorDescription_union1) {
|
|
1327
|
+
let message = 'Object doesn\'t match union (at "' + path_errorDescription + '")';
|
|
1328
|
+
message += '\n' + obj_errorDescription_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1329
|
+
message += '\n' + obj_errorDescription_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1330
|
+
return new TypeError(message);
|
|
1331
|
+
}
|
|
1332
|
+
const obj_errorMessage = obj.errorMessage;
|
|
1333
|
+
const path_errorMessage = path + '.errorMessage';
|
|
1334
|
+
let obj_errorMessage_union0 = null;
|
|
1335
|
+
const obj_errorMessage_union0_error = (() => {
|
|
1336
|
+
if (typeof obj_errorMessage !== 'string') {
|
|
1337
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
|
|
1338
|
+
}
|
|
1339
|
+
})();
|
|
1340
|
+
if (obj_errorMessage_union0_error != null) {
|
|
1341
|
+
obj_errorMessage_union0 = obj_errorMessage_union0_error.message;
|
|
1342
|
+
}
|
|
1343
|
+
let obj_errorMessage_union1 = null;
|
|
1344
|
+
const obj_errorMessage_union1_error = (() => {
|
|
1345
|
+
if (obj_errorMessage !== null) {
|
|
1346
|
+
return new TypeError('Expected "null" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
|
|
1347
|
+
}
|
|
1348
|
+
})();
|
|
1349
|
+
if (obj_errorMessage_union1_error != null) {
|
|
1350
|
+
obj_errorMessage_union1 = obj_errorMessage_union1_error.message;
|
|
1351
|
+
}
|
|
1352
|
+
if (obj_errorMessage_union0 && obj_errorMessage_union1) {
|
|
1353
|
+
let message = 'Object doesn\'t match union (at "' + path_errorMessage + '")';
|
|
1354
|
+
message += '\n' + obj_errorMessage_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1355
|
+
message += '\n' + obj_errorMessage_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1356
|
+
return new TypeError(message);
|
|
1357
|
+
}
|
|
1358
|
+
})();
|
|
1359
|
+
return v_error === undefined ? null : v_error;
|
|
1360
|
+
}
|
|
1361
|
+
const RepresentationType$3 = 'ExternalConnectivityConnectionEditDeleteResultRepresentation';
|
|
1362
|
+
function keyBuilder$5(luvio, config) {
|
|
1363
|
+
return keyPrefix + '::' + RepresentationType$3 + ':' + config.developerName;
|
|
1364
|
+
}
|
|
1365
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
1366
|
+
const keyParams = {
|
|
1367
|
+
developerName: object.developerName
|
|
1368
|
+
};
|
|
1369
|
+
return keyBuilder$5(luvio, keyParams);
|
|
1370
|
+
}
|
|
1371
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
1372
|
+
return input;
|
|
1373
|
+
}
|
|
1374
|
+
const select$8 = function ExternalConnectivityConnectionEditDeleteResultRepresentationSelect() {
|
|
1375
|
+
return {
|
|
1376
|
+
kind: 'Fragment',
|
|
1377
|
+
version: VERSION$3,
|
|
1378
|
+
private: [],
|
|
1379
|
+
selections: [
|
|
1380
|
+
{
|
|
1381
|
+
name: 'developerName',
|
|
1382
|
+
kind: 'Scalar'
|
|
1383
|
+
},
|
|
1384
|
+
{
|
|
1385
|
+
name: 'errorDescription',
|
|
1386
|
+
kind: 'Scalar'
|
|
1387
|
+
},
|
|
1388
|
+
{
|
|
1389
|
+
name: 'errorMessage',
|
|
1390
|
+
kind: 'Scalar'
|
|
1391
|
+
}
|
|
1392
|
+
]
|
|
1393
|
+
};
|
|
1394
|
+
};
|
|
1395
|
+
function equals$3(existing, incoming) {
|
|
1396
|
+
const existing_developerName = existing.developerName;
|
|
1397
|
+
const incoming_developerName = incoming.developerName;
|
|
1398
|
+
if (!(existing_developerName === incoming_developerName)) {
|
|
1399
|
+
return false;
|
|
1400
|
+
}
|
|
1401
|
+
const existing_errorDescription = existing.errorDescription;
|
|
1402
|
+
const incoming_errorDescription = incoming.errorDescription;
|
|
1403
|
+
if (!(existing_errorDescription === incoming_errorDescription)) {
|
|
1404
|
+
return false;
|
|
1405
|
+
}
|
|
1406
|
+
const existing_errorMessage = existing.errorMessage;
|
|
1407
|
+
const incoming_errorMessage = incoming.errorMessage;
|
|
1408
|
+
if (!(existing_errorMessage === incoming_errorMessage)) {
|
|
1409
|
+
return false;
|
|
1410
|
+
}
|
|
1411
|
+
return true;
|
|
1412
|
+
}
|
|
1413
|
+
const ingest$3 = function ExternalConnectivityConnectionEditDeleteResultRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1414
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1415
|
+
const validateError = validate$4(input);
|
|
1416
|
+
if (validateError !== null) {
|
|
1417
|
+
throw validateError;
|
|
1418
|
+
}
|
|
1419
|
+
}
|
|
1420
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
1421
|
+
const ttlToUse = TTL$3;
|
|
1422
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "external-connectivity", VERSION$3, RepresentationType$3, equals$3);
|
|
1423
|
+
return createLink(key);
|
|
1424
|
+
};
|
|
1425
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
1426
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1427
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
1428
|
+
rootKeySet.set(rootKey, {
|
|
1429
|
+
namespace: keyPrefix,
|
|
1430
|
+
representationName: RepresentationType$3,
|
|
1431
|
+
mergeable: false
|
|
1432
|
+
});
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
function select$7(luvio, params) {
|
|
1436
|
+
return select$8();
|
|
1437
|
+
}
|
|
1438
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
1439
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response);
|
|
1440
|
+
}
|
|
1441
|
+
function ingestSuccess$4(luvio, resourceParams, response) {
|
|
1442
|
+
const { body } = response;
|
|
1443
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
1444
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
1445
|
+
const snapshot = luvio.storeLookup({
|
|
1446
|
+
recordId: key,
|
|
1447
|
+
node: select$7(),
|
|
1448
|
+
variables: {},
|
|
1449
|
+
});
|
|
1450
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1451
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1452
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1453
|
+
}
|
|
1454
|
+
}
|
|
1455
|
+
deepFreeze(snapshot.data);
|
|
1456
|
+
return snapshot;
|
|
1457
|
+
}
|
|
1458
|
+
function createResourceRequest$4(config) {
|
|
1459
|
+
const headers = {};
|
|
1460
|
+
return {
|
|
1461
|
+
baseUri: '/services/data/v62.0',
|
|
1462
|
+
basePath: '/external-connectivity/connections/' + config.urlParams.connectionDeveloperName + '',
|
|
1463
|
+
method: 'put',
|
|
1464
|
+
body: config.body,
|
|
1465
|
+
urlParams: config.urlParams,
|
|
1466
|
+
queryParams: {},
|
|
1467
|
+
headers,
|
|
1468
|
+
priority: 'normal',
|
|
1469
|
+
};
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1472
|
+
const adapterName$4 = 'updateConnection';
|
|
1473
|
+
const updateConnection_ConfigPropertyMetadata = [
|
|
1474
|
+
generateParamConfigMetadata('connectionDeveloperName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1475
|
+
generateParamConfigMetadata('authenticationTypeInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1476
|
+
generateParamConfigMetadata('connectorDeveloperName', true, 2 /* Body */, 0 /* String */),
|
|
1477
|
+
generateParamConfigMetadata('description', true, 2 /* Body */, 0 /* String */),
|
|
1478
|
+
generateParamConfigMetadata('name', true, 2 /* Body */, 0 /* String */),
|
|
1479
|
+
];
|
|
1480
|
+
const updateConnection_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, updateConnection_ConfigPropertyMetadata);
|
|
1481
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$8(updateConnection_ConfigPropertyMetadata);
|
|
1482
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
1483
|
+
const config = {};
|
|
1484
|
+
typeCheckConfig$8(untrustedConfig, config, updateConnection_ConfigPropertyMetadata);
|
|
1485
|
+
const untrustedConfig_authenticationTypeInput = untrustedConfig.authenticationTypeInput;
|
|
1486
|
+
const referenceAuthenticationTypeInputRepresentationValidationError = validate$a(untrustedConfig_authenticationTypeInput);
|
|
1487
|
+
if (referenceAuthenticationTypeInputRepresentationValidationError === null) {
|
|
1488
|
+
config.authenticationTypeInput = untrustedConfig_authenticationTypeInput;
|
|
1489
|
+
}
|
|
1490
|
+
return config;
|
|
1491
|
+
}
|
|
1492
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
1493
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1494
|
+
return null;
|
|
1495
|
+
}
|
|
1496
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1497
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1498
|
+
}
|
|
1499
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
1500
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1501
|
+
return null;
|
|
1502
|
+
}
|
|
1503
|
+
return config;
|
|
1504
|
+
}
|
|
1505
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
1506
|
+
const resourceParams = createResourceParams$4(config);
|
|
1507
|
+
const request = createResourceRequest$4(resourceParams);
|
|
1508
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1509
|
+
.then((response) => {
|
|
1510
|
+
return luvio.handleSuccessResponse(() => {
|
|
1511
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response);
|
|
1512
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1513
|
+
}, () => {
|
|
1514
|
+
const cache = new StoreKeyMap();
|
|
1515
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
1516
|
+
return cache;
|
|
1517
|
+
});
|
|
1518
|
+
}, (response) => {
|
|
1519
|
+
deepFreeze(response);
|
|
1520
|
+
throw response;
|
|
1521
|
+
});
|
|
1522
|
+
}
|
|
1523
|
+
const updateConnectionAdapterFactory = (luvio) => {
|
|
1524
|
+
return function updateConnection(untrustedConfig) {
|
|
1525
|
+
const config = validateAdapterConfig$4(untrustedConfig, updateConnection_ConfigPropertyNames);
|
|
1526
|
+
// Invalid or incomplete config
|
|
1527
|
+
if (config === null) {
|
|
1528
|
+
throw new Error('Invalid config for "updateConnection"');
|
|
1529
|
+
}
|
|
1530
|
+
return buildNetworkSnapshot$4(luvio, config);
|
|
1531
|
+
};
|
|
1532
|
+
};
|
|
1533
|
+
|
|
1534
|
+
function select$6(luvio, params) {
|
|
1535
|
+
return select$8();
|
|
1536
|
+
}
|
|
1537
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
1538
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response);
|
|
1539
|
+
}
|
|
1540
|
+
function ingestSuccess$3(luvio, resourceParams, response) {
|
|
1541
|
+
const { body } = response;
|
|
1542
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
1543
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
1544
|
+
const snapshot = luvio.storeLookup({
|
|
1545
|
+
recordId: key,
|
|
1546
|
+
node: select$6(),
|
|
1547
|
+
variables: {},
|
|
1548
|
+
});
|
|
1549
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1550
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1551
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
deepFreeze(snapshot.data);
|
|
1555
|
+
return snapshot;
|
|
1556
|
+
}
|
|
1557
|
+
function createResourceRequest$3(config) {
|
|
1558
|
+
const headers = {};
|
|
1559
|
+
return {
|
|
1560
|
+
baseUri: '/services/data/v62.0',
|
|
1561
|
+
basePath: '/external-connectivity/connections/delete/' + config.urlParams.connectionDeveloperName + '',
|
|
1562
|
+
method: 'post',
|
|
1563
|
+
body: null,
|
|
1564
|
+
urlParams: config.urlParams,
|
|
1565
|
+
queryParams: {},
|
|
1566
|
+
headers,
|
|
1567
|
+
priority: 'normal',
|
|
1568
|
+
};
|
|
1569
|
+
}
|
|
1570
|
+
|
|
1571
|
+
const adapterName$3 = 'deleteConnection';
|
|
1572
|
+
const deleteConnection_ConfigPropertyMetadata = [
|
|
1573
|
+
generateParamConfigMetadata('connectionDeveloperName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1574
|
+
];
|
|
1575
|
+
const deleteConnection_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, deleteConnection_ConfigPropertyMetadata);
|
|
1576
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$8(deleteConnection_ConfigPropertyMetadata);
|
|
1577
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
1578
|
+
const config = {};
|
|
1579
|
+
typeCheckConfig$8(untrustedConfig, config, deleteConnection_ConfigPropertyMetadata);
|
|
1580
|
+
return config;
|
|
1581
|
+
}
|
|
1582
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
1583
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1584
|
+
return null;
|
|
1585
|
+
}
|
|
1586
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1587
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1588
|
+
}
|
|
1589
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
1590
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1591
|
+
return null;
|
|
1592
|
+
}
|
|
1593
|
+
return config;
|
|
1594
|
+
}
|
|
1595
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
1596
|
+
const resourceParams = createResourceParams$3(config);
|
|
1597
|
+
const request = createResourceRequest$3(resourceParams);
|
|
1598
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1599
|
+
.then((response) => {
|
|
1600
|
+
return luvio.handleSuccessResponse(() => {
|
|
1601
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response);
|
|
1602
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1603
|
+
}, () => {
|
|
1604
|
+
const cache = new StoreKeyMap();
|
|
1605
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
1606
|
+
return cache;
|
|
1607
|
+
});
|
|
1608
|
+
}, (response) => {
|
|
1609
|
+
deepFreeze(response);
|
|
1610
|
+
throw response;
|
|
1611
|
+
});
|
|
1612
|
+
}
|
|
1613
|
+
const deleteConnectionAdapterFactory = (luvio) => {
|
|
1614
|
+
return function deleteConnection(untrustedConfig) {
|
|
1615
|
+
const config = validateAdapterConfig$3(untrustedConfig, deleteConnection_ConfigPropertyNames);
|
|
1616
|
+
// Invalid or incomplete config
|
|
1617
|
+
if (config === null) {
|
|
1618
|
+
throw new Error('Invalid config for "deleteConnection"');
|
|
1619
|
+
}
|
|
1620
|
+
return buildNetworkSnapshot$3(luvio, config);
|
|
1621
|
+
};
|
|
1622
|
+
};
|
|
1623
|
+
|
|
1294
1624
|
const TTL$2 = 500;
|
|
1295
1625
|
const VERSION$2 = "586c10aa43f3608962cdfc83e38d3157";
|
|
1296
1626
|
function validate$3(obj, path = 'ExternalConnectivityConnectionTestResultRepresentation') {
|
|
@@ -1502,10 +1832,10 @@ const testConnection_ConfigPropertyMetadata = [
|
|
|
1502
1832
|
generateParamConfigMetadata('connectionDeveloperName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1503
1833
|
];
|
|
1504
1834
|
const testConnection_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, testConnection_ConfigPropertyMetadata);
|
|
1505
|
-
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$
|
|
1835
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$8(testConnection_ConfigPropertyMetadata);
|
|
1506
1836
|
function typeCheckConfig$2(untrustedConfig) {
|
|
1507
1837
|
const config = {};
|
|
1508
|
-
typeCheckConfig$
|
|
1838
|
+
typeCheckConfig$8(untrustedConfig, config, testConnection_ConfigPropertyMetadata);
|
|
1509
1839
|
return config;
|
|
1510
1840
|
}
|
|
1511
1841
|
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
@@ -1565,7 +1895,7 @@ function validate$2(obj, path = 'ExternalConnectivityConnectorListRepresentation
|
|
|
1565
1895
|
for (let i = 0; i < obj_connectors.length; i++) {
|
|
1566
1896
|
const obj_connectors_item = obj_connectors[i];
|
|
1567
1897
|
const path_connectors_item = path_connectors + '[' + i + ']';
|
|
1568
|
-
const referencepath_connectors_itemValidationError = validate$
|
|
1898
|
+
const referencepath_connectors_itemValidationError = validate$d(obj_connectors_item, path_connectors_item);
|
|
1569
1899
|
if (referencepath_connectors_itemValidationError !== null) {
|
|
1570
1900
|
let message = 'Object doesn\'t match ExternalConnectivityConnectorRepresentation (at "' + path_connectors_item + '")\n';
|
|
1571
1901
|
message += referencepath_connectors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1670,7 +2000,7 @@ function createResourceRequest$1(config) {
|
|
|
1670
2000
|
const adapterName$1 = 'getConnectors';
|
|
1671
2001
|
const getConnectors_ConfigPropertyMetadata = [];
|
|
1672
2002
|
const getConnectors_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getConnectors_ConfigPropertyMetadata);
|
|
1673
|
-
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$
|
|
2003
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$8(getConnectors_ConfigPropertyMetadata);
|
|
1674
2004
|
function keyBuilder$2(luvio, config) {
|
|
1675
2005
|
createResourceParams$1(config);
|
|
1676
2006
|
return keyBuilder$3();
|
|
@@ -1763,7 +2093,7 @@ function validate$1(obj, path = 'AuthenticationTypeDefinitionRepresentation') {
|
|
|
1763
2093
|
for (let i = 0; i < obj_authenticationParameterDefinitions.length; i++) {
|
|
1764
2094
|
const obj_authenticationParameterDefinitions_item = obj_authenticationParameterDefinitions[i];
|
|
1765
2095
|
const path_authenticationParameterDefinitions_item = path_authenticationParameterDefinitions + '[' + i + ']';
|
|
1766
|
-
const referencepath_authenticationParameterDefinitions_itemValidationError = validate$
|
|
2096
|
+
const referencepath_authenticationParameterDefinitions_itemValidationError = validate$8(obj_authenticationParameterDefinitions_item, path_authenticationParameterDefinitions_item);
|
|
1767
2097
|
if (referencepath_authenticationParameterDefinitions_itemValidationError !== null) {
|
|
1768
2098
|
let message = 'Object doesn\'t match AuthenticationParameterDefinitionRepresentation (at "' + path_authenticationParameterDefinitions_item + '")\n';
|
|
1769
2099
|
message += referencepath_authenticationParameterDefinitions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1809,7 +2139,7 @@ function validate(obj, path = 'ExternalConnectivityConnectorDetailsRepresentatio
|
|
|
1809
2139
|
for (let i = 0; i < obj_iconMetadata.length; i++) {
|
|
1810
2140
|
const obj_iconMetadata_item = obj_iconMetadata[i];
|
|
1811
2141
|
const path_iconMetadata_item = path_iconMetadata + '[' + i + ']';
|
|
1812
|
-
const referencepath_iconMetadata_itemValidationError = validate$
|
|
2142
|
+
const referencepath_iconMetadata_itemValidationError = validate$e(obj_iconMetadata_item, path_iconMetadata_item);
|
|
1813
2143
|
if (referencepath_iconMetadata_itemValidationError !== null) {
|
|
1814
2144
|
let message = 'Object doesn\'t match ConnectorIconMetadataRepresentation (at "' + path_iconMetadata_item + '")\n';
|
|
1815
2145
|
message += referencepath_iconMetadata_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1961,14 +2291,14 @@ const getConnectorDetails_ConfigPropertyMetadata = [
|
|
|
1961
2291
|
generateParamConfigMetadata('connectorDeveloperName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1962
2292
|
];
|
|
1963
2293
|
const getConnectorDetails_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getConnectorDetails_ConfigPropertyMetadata);
|
|
1964
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
2294
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$8(getConnectorDetails_ConfigPropertyMetadata);
|
|
1965
2295
|
function keyBuilder(luvio, config) {
|
|
1966
2296
|
const resourceParams = createResourceParams(config);
|
|
1967
2297
|
return keyBuilder$1(luvio, resourceParams);
|
|
1968
2298
|
}
|
|
1969
2299
|
function typeCheckConfig(untrustedConfig) {
|
|
1970
2300
|
const config = {};
|
|
1971
|
-
typeCheckConfig$
|
|
2301
|
+
typeCheckConfig$8(untrustedConfig, config, getConnectorDetails_ConfigPropertyMetadata);
|
|
1972
2302
|
return config;
|
|
1973
2303
|
}
|
|
1974
2304
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
@@ -2042,4 +2372,4 @@ const getConnectorDetailsAdapterFactory = (luvio) => function externalConnectivi
|
|
|
2042
2372
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
2043
2373
|
};
|
|
2044
2374
|
|
|
2045
|
-
export { createConnectionAdapterFactory, getConnectionDetailsAdapterFactory, getConnectionsAdapterFactory, getConnectorDetailsAdapterFactory, getConnectorsAdapterFactory, testConnectionAdapterFactory };
|
|
2375
|
+
export { createConnectionAdapterFactory, deleteConnectionAdapterFactory, getConnectionDetailsAdapterFactory, getConnectionsAdapterFactory, getConnectorDetailsAdapterFactory, getConnectorsAdapterFactory, testConnectionAdapterFactory, updateConnectionAdapterFactory };
|