@salesforce/lds-adapters-platform-external-connectivity 1.364.0 → 1.366.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 +81 -17
- package/dist/es/es2018/types/src/generated/adapters/getConnections.d.ts +1 -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 -0
- package/dist/es/es2018/types/src/generated/resources/getExternalConnectivityConnections.d.ts +3 -0
- package/dist/es/es2018/types/src/generated/types/ExternalConnectivityConnectionListRepresentation.d.ts +17 -4
- package/package.json +3 -3
- package/sfdc/index.js +104 -37
- package/src/raml/api.raml +7 -0
- package/src/raml/luvio.raml +8 -0
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$7,
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$7, typeCheckConfig as typeCheckConfig$c, StoreKeyMap, createResourceParams as createResourceParams$c } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
|
-
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
10
|
+
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
11
11
|
const { isArray: ArrayIsArray$1 } = Array;
|
|
12
12
|
/**
|
|
13
13
|
* Validates an adapter config is well-formed.
|
|
@@ -31,7 +31,7 @@ function validateConfig(config, adapter, oneOf) {
|
|
|
31
31
|
throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
|
|
32
32
|
}
|
|
33
33
|
const supported = required.concat(optional);
|
|
34
|
-
if (ObjectKeys(config).some(key => !supported.includes(key))) {
|
|
34
|
+
if (ObjectKeys$1(config).some(key => !supported.includes(key))) {
|
|
35
35
|
throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -71,6 +71,7 @@ function buildAdapterValidationConfig(displayName, paramsMeta) {
|
|
|
71
71
|
}
|
|
72
72
|
const keyPrefix = 'external-connectivity';
|
|
73
73
|
|
|
74
|
+
const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
|
|
74
75
|
const { isArray: ArrayIsArray } = Array;
|
|
75
76
|
const { stringify: JSONStringify } = JSON;
|
|
76
77
|
function equalsArray(a, b, equalsItem) {
|
|
@@ -526,7 +527,7 @@ function getTypeCacheKeys$c(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
526
527
|
}
|
|
527
528
|
|
|
528
529
|
const TTL$b = 500;
|
|
529
|
-
const VERSION$b = "
|
|
530
|
+
const VERSION$b = "b5d13b1fd1ba9a2eccd69af50a915654";
|
|
530
531
|
function validate$i(obj, path = 'ExternalConnectivityConnectionListRepresentation') {
|
|
531
532
|
const v_error = (() => {
|
|
532
533
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -544,10 +545,45 @@ function validate$i(obj, path = 'ExternalConnectivityConnectionListRepresentatio
|
|
|
544
545
|
return new TypeError('Expected "object" but received "' + typeof obj_connections_item + '" (at "' + path_connections_item + '")');
|
|
545
546
|
}
|
|
546
547
|
}
|
|
548
|
+
const obj_connectorDeveloperName = obj.connectorDeveloperName;
|
|
549
|
+
const path_connectorDeveloperName = path + '.connectorDeveloperName';
|
|
550
|
+
let obj_connectorDeveloperName_union0 = null;
|
|
551
|
+
const obj_connectorDeveloperName_union0_error = (() => {
|
|
552
|
+
if (typeof obj_connectorDeveloperName !== 'string') {
|
|
553
|
+
return new TypeError('Expected "string" but received "' + typeof obj_connectorDeveloperName + '" (at "' + path_connectorDeveloperName + '")');
|
|
554
|
+
}
|
|
555
|
+
})();
|
|
556
|
+
if (obj_connectorDeveloperName_union0_error != null) {
|
|
557
|
+
obj_connectorDeveloperName_union0 = obj_connectorDeveloperName_union0_error.message;
|
|
558
|
+
}
|
|
559
|
+
let obj_connectorDeveloperName_union1 = null;
|
|
560
|
+
const obj_connectorDeveloperName_union1_error = (() => {
|
|
561
|
+
if (obj_connectorDeveloperName !== null) {
|
|
562
|
+
return new TypeError('Expected "null" but received "' + typeof obj_connectorDeveloperName + '" (at "' + path_connectorDeveloperName + '")');
|
|
563
|
+
}
|
|
564
|
+
})();
|
|
565
|
+
if (obj_connectorDeveloperName_union1_error != null) {
|
|
566
|
+
obj_connectorDeveloperName_union1 = obj_connectorDeveloperName_union1_error.message;
|
|
567
|
+
}
|
|
568
|
+
if (obj_connectorDeveloperName_union0 && obj_connectorDeveloperName_union1) {
|
|
569
|
+
let message = 'Object doesn\'t match union (at "' + path_connectorDeveloperName + '")';
|
|
570
|
+
message += '\n' + obj_connectorDeveloperName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
571
|
+
message += '\n' + obj_connectorDeveloperName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
572
|
+
return new TypeError(message);
|
|
573
|
+
}
|
|
547
574
|
})();
|
|
548
575
|
return v_error === undefined ? null : v_error;
|
|
549
576
|
}
|
|
550
577
|
const RepresentationType$b = 'ExternalConnectivityConnectionListRepresentation';
|
|
578
|
+
function keyBuilder$j(luvio, config) {
|
|
579
|
+
return keyPrefix + '::' + RepresentationType$b + ':' + (config.connectorDeveloperName === null ? '' : config.connectorDeveloperName);
|
|
580
|
+
}
|
|
581
|
+
function keyBuilderFromType$5(luvio, object) {
|
|
582
|
+
const keyParams = {
|
|
583
|
+
connectorDeveloperName: object.connectorDeveloperName
|
|
584
|
+
};
|
|
585
|
+
return keyBuilder$j(luvio, keyParams);
|
|
586
|
+
}
|
|
551
587
|
function normalize$b(input, existing, path, luvio, store, timestamp) {
|
|
552
588
|
const input_connections = input.connections;
|
|
553
589
|
const input_connections_id = path.fullPath + '__connections';
|
|
@@ -578,6 +614,10 @@ const select$n = function ExternalConnectivityConnectionListRepresentationSelect
|
|
|
578
614
|
kind: 'Link',
|
|
579
615
|
plural: true,
|
|
580
616
|
fragment: select$o()
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
name: 'connectorDeveloperName',
|
|
620
|
+
kind: 'Scalar'
|
|
581
621
|
}
|
|
582
622
|
]
|
|
583
623
|
};
|
|
@@ -593,6 +633,11 @@ function equals$b(existing, incoming) {
|
|
|
593
633
|
if (equals_connections_items === false) {
|
|
594
634
|
return false;
|
|
595
635
|
}
|
|
636
|
+
const existing_connectorDeveloperName = existing.connectorDeveloperName;
|
|
637
|
+
const incoming_connectorDeveloperName = incoming.connectorDeveloperName;
|
|
638
|
+
if (!(existing_connectorDeveloperName === incoming_connectorDeveloperName)) {
|
|
639
|
+
return false;
|
|
640
|
+
}
|
|
596
641
|
return true;
|
|
597
642
|
}
|
|
598
643
|
const ingest$b = function ExternalConnectivityConnectionListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
@@ -602,14 +647,14 @@ const ingest$b = function ExternalConnectivityConnectionListRepresentationIngest
|
|
|
602
647
|
throw validateError;
|
|
603
648
|
}
|
|
604
649
|
}
|
|
605
|
-
const key =
|
|
650
|
+
const key = keyBuilderFromType$5(luvio, input);
|
|
606
651
|
const ttlToUse = TTL$b;
|
|
607
652
|
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$b, "external-connectivity", VERSION$b, RepresentationType$b, equals$b);
|
|
608
653
|
return createLink(key);
|
|
609
654
|
};
|
|
610
655
|
function getTypeCacheKeys$b(rootKeySet, luvio, input, fullPathFactory) {
|
|
611
656
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
612
|
-
const rootKey =
|
|
657
|
+
const rootKey = keyBuilderFromType$5(luvio, input);
|
|
613
658
|
rootKeySet.set(rootKey, {
|
|
614
659
|
namespace: keyPrefix,
|
|
615
660
|
representationName: RepresentationType$b,
|
|
@@ -620,19 +665,35 @@ function getTypeCacheKeys$b(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
620
665
|
getTypeCacheKeys$c(rootKeySet, luvio, input.connections[i], () => '');
|
|
621
666
|
}
|
|
622
667
|
}
|
|
668
|
+
const notifyUpdateAvailableFactory = (luvio) => {
|
|
669
|
+
return function notifyConnectionListUpdateAvailable(configs) {
|
|
670
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
671
|
+
const requiredKeyParams = ['connectorDeveloperName'];
|
|
672
|
+
configs.forEach(config => {
|
|
673
|
+
if (false === requiredKeyParams.every(req => req in config)) {
|
|
674
|
+
throw new Error(`one of the configs did not contain all required parameters: ${JSONStringify(ObjectKeys(config))}`);
|
|
675
|
+
}
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
const keys = configs.map(c => keyBuilder$j(luvio, c));
|
|
679
|
+
return luvio.notifyStoreUpdateAvailable(keys);
|
|
680
|
+
};
|
|
681
|
+
};
|
|
623
682
|
|
|
624
683
|
function select$m(luvio, params) {
|
|
625
684
|
return select$n();
|
|
626
685
|
}
|
|
627
686
|
function keyBuilder$i(luvio, params) {
|
|
628
|
-
return
|
|
687
|
+
return keyBuilder$j(luvio, {
|
|
688
|
+
connectorDeveloperName: params.queryParams.connectorDeveloperName || ''
|
|
689
|
+
});
|
|
629
690
|
}
|
|
630
691
|
function getResponseCacheKeys$b(storeKeyMap, luvio, resourceParams, response) {
|
|
631
|
-
getTypeCacheKeys$b(storeKeyMap, luvio, response
|
|
692
|
+
getTypeCacheKeys$b(storeKeyMap, luvio, response);
|
|
632
693
|
}
|
|
633
694
|
function ingestSuccess$b(luvio, resourceParams, response, snapshotRefresh) {
|
|
634
695
|
const { body } = response;
|
|
635
|
-
const key = keyBuilder$i();
|
|
696
|
+
const key = keyBuilder$i(luvio, resourceParams);
|
|
636
697
|
luvio.storeIngest(key, ingest$b, body);
|
|
637
698
|
const snapshot = luvio.storeLookup({
|
|
638
699
|
recordId: key,
|
|
@@ -648,7 +709,7 @@ function ingestSuccess$b(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
648
709
|
return snapshot;
|
|
649
710
|
}
|
|
650
711
|
function ingestError$6(luvio, params, error, snapshotRefresh) {
|
|
651
|
-
const key = keyBuilder$i();
|
|
712
|
+
const key = keyBuilder$i(luvio, params);
|
|
652
713
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
653
714
|
const storeMetadataParams = {
|
|
654
715
|
ttl: TTL$b,
|
|
@@ -667,22 +728,25 @@ function createResourceRequest$b(config) {
|
|
|
667
728
|
method: 'get',
|
|
668
729
|
body: null,
|
|
669
730
|
urlParams: {},
|
|
670
|
-
queryParams:
|
|
731
|
+
queryParams: config.queryParams,
|
|
671
732
|
headers,
|
|
672
733
|
priority: 'normal',
|
|
673
734
|
};
|
|
674
735
|
}
|
|
675
736
|
|
|
676
737
|
const adapterName$b = 'getConnections';
|
|
677
|
-
const getConnections_ConfigPropertyMetadata = [
|
|
738
|
+
const getConnections_ConfigPropertyMetadata = [
|
|
739
|
+
generateParamConfigMetadata('connectorDeveloperName', false, 1 /* QueryParameter */, 0 /* String */),
|
|
740
|
+
];
|
|
678
741
|
const getConnections_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$b, getConnections_ConfigPropertyMetadata);
|
|
679
742
|
const createResourceParams$b = /*#__PURE__*/ createResourceParams$c(getConnections_ConfigPropertyMetadata);
|
|
680
743
|
function keyBuilder$h(luvio, config) {
|
|
681
|
-
createResourceParams$b(config);
|
|
682
|
-
return keyBuilder$i();
|
|
744
|
+
const resourceParams = createResourceParams$b(config);
|
|
745
|
+
return keyBuilder$i(luvio, resourceParams);
|
|
683
746
|
}
|
|
684
747
|
function typeCheckConfig$b(untrustedConfig) {
|
|
685
748
|
const config = {};
|
|
749
|
+
typeCheckConfig$c(untrustedConfig, config, getConnections_ConfigPropertyMetadata);
|
|
686
750
|
return config;
|
|
687
751
|
}
|
|
688
752
|
function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
|
|
@@ -692,7 +756,7 @@ function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
|
|
|
692
756
|
if (process.env.NODE_ENV !== 'production') {
|
|
693
757
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
694
758
|
}
|
|
695
|
-
const config = typeCheckConfig$b();
|
|
759
|
+
const config = typeCheckConfig$b(untrustedConfig);
|
|
696
760
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
697
761
|
return null;
|
|
698
762
|
}
|
|
@@ -718,7 +782,7 @@ function onFetchResponseError$6(luvio, config, resourceParams, response) {
|
|
|
718
782
|
}
|
|
719
783
|
function buildNetworkSnapshot$b(luvio, config, options) {
|
|
720
784
|
const resourceParams = createResourceParams$b(config);
|
|
721
|
-
const request = createResourceRequest$b();
|
|
785
|
+
const request = createResourceRequest$b(resourceParams);
|
|
722
786
|
return luvio.dispatchResourceRequest(request, options)
|
|
723
787
|
.then((response) => {
|
|
724
788
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => {
|
|
@@ -3764,4 +3828,4 @@ const getInvocableActionsAdapterFactory = (luvio) => function externalConnectivi
|
|
|
3764
3828
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
3765
3829
|
};
|
|
3766
3830
|
|
|
3767
|
-
export { createConnectionAdapterFactory, deleteConnectionAdapterFactory, getConnectionDetailsAdapterFactory, getConnectionsAdapterFactory, getConnectorDetailsAdapterFactory, getConnectorsAdapterFactory, getExternalConnectivityConnectionReferencedFlowsAdapterFactory, getExternalIdentityProvidersAdapterFactory, getInvocableActionsAdapterFactory, refreshMetadataAdapterFactory, testConnectionAdapterFactory, updateConnectionAdapterFactory };
|
|
3831
|
+
export { createConnectionAdapterFactory, deleteConnectionAdapterFactory, getConnectionDetailsAdapterFactory, getConnectionsAdapterFactory, getConnectorDetailsAdapterFactory, getConnectorsAdapterFactory, getExternalConnectivityConnectionReferencedFlowsAdapterFactory, getExternalIdentityProvidersAdapterFactory, getInvocableActionsAdapterFactory, notifyUpdateAvailableFactory as notifyConnectionListUpdateAvailableFactory, refreshMetadataAdapterFactory, testConnectionAdapterFactory, updateConnectionAdapterFactory };
|
|
@@ -6,6 +6,7 @@ export declare const adapterName = "getConnections";
|
|
|
6
6
|
export declare const getConnections_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
|
|
7
7
|
export declare const getConnections_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
8
8
|
export interface GetConnectionsConfig {
|
|
9
|
+
connectorDeveloperName?: string;
|
|
9
10
|
}
|
|
10
11
|
export declare const createResourceParams: (config: GetConnectionsConfig) => resources_getExternalConnectivityConnections_ResourceRequestConfig;
|
|
11
12
|
export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, config: GetConnectionsConfig): string;
|
|
@@ -10,3 +10,4 @@ export { getConnectorsAdapterFactory } from '../adapters/getConnectors';
|
|
|
10
10
|
export { getConnectorDetailsAdapterFactory } from '../adapters/getConnectorDetails';
|
|
11
11
|
export { getExternalIdentityProvidersAdapterFactory } from '../adapters/getExternalIdentityProviders';
|
|
12
12
|
export { getInvocableActionsAdapterFactory } from '../adapters/getInvocableActions';
|
|
13
|
+
export { notifyUpdateAvailableFactory as notifyConnectionListUpdateAvailableFactory } from '../types/ExternalConnectivityConnectionListRepresentation';
|
|
@@ -17,4 +17,6 @@ declare let getConnectors_imperative: any;
|
|
|
17
17
|
declare let getExternalConnectivityConnectionReferencedFlows_imperative: any;
|
|
18
18
|
declare let getExternalIdentityProviders_imperative: any;
|
|
19
19
|
declare let getInvocableActions_imperative: any;
|
|
20
|
+
declare let notifyConnectionListUpdateAvailable: any;
|
|
20
21
|
export { createConnection, deleteConnection, getConnectionDetails, getConnections, getConnectorDetails, getConnectors, getExternalConnectivityConnectionReferencedFlows, getExternalIdentityProviders, getInvocableActions, refreshMetadata, testConnection, updateConnection, getConnectionDetails_imperative, getConnections_imperative, getConnectorDetails_imperative, getConnectors_imperative, getExternalConnectivityConnectionReferencedFlows_imperative, getExternalIdentityProviders_imperative, getInvocableActions_imperative, };
|
|
22
|
+
export { notifyConnectionListUpdateAvailable };
|
package/dist/es/es2018/types/src/generated/resources/getExternalConnectivityConnections.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Luvio as $64$luvio_engine_Luvio, Fragment as $64$luvio_engine_Fragment, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, FetchResponse as $64$luvio_engine_FetchResponse, SnapshotRefresh as $64$luvio_engine_SnapshotRefresh, FulfilledSnapshot as $64$luvio_engine_FulfilledSnapshot, StaleSnapshot as $64$luvio_engine_StaleSnapshot, PendingSnapshot as $64$luvio_engine_PendingSnapshot, ErrorResponse as $64$luvio_engine_ErrorResponse, ErrorSnapshot as $64$luvio_engine_ErrorSnapshot, ResourceRequest as $64$luvio_engine_ResourceRequest } from '@luvio/engine';
|
|
2
2
|
import { ExternalConnectivityConnectionListRepresentation as types_ExternalConnectivityConnectionListRepresentation_ExternalConnectivityConnectionListRepresentation } from '../types/ExternalConnectivityConnectionListRepresentation';
|
|
3
3
|
export interface ResourceRequestConfig {
|
|
4
|
+
queryParams: {
|
|
5
|
+
connectorDeveloperName?: string;
|
|
6
|
+
};
|
|
4
7
|
}
|
|
5
8
|
export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
|
|
6
9
|
export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): string;
|
|
@@ -1,9 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { KeyMetadata as $64$luvio_engine_KeyMetadata, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Luvio as $64$luvio_engine_Luvio, IngestPath as $64$luvio_engine_IngestPath, Store as $64$luvio_engine_Store, ResourceIngest as $64$luvio_engine_ResourceIngest, FragmentSelection as $64$luvio_engine_FragmentSelection, LinkSelection as $64$luvio_engine_LinkSelection, StoreLink as $64$luvio_engine_StoreLink, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap } from '@luvio/engine';
|
|
2
2
|
import { ExternalConnectivityConnectionRepresentation as ExternalConnectivityConnectionRepresentation_ExternalConnectivityConnectionRepresentation } from './ExternalConnectivityConnectionRepresentation';
|
|
3
3
|
export declare const TTL = 500;
|
|
4
|
-
export declare const VERSION = "
|
|
4
|
+
export declare const VERSION = "b5d13b1fd1ba9a2eccd69af50a915654";
|
|
5
5
|
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
6
6
|
export declare const RepresentationType: string;
|
|
7
|
+
export interface KeyParams extends $64$luvio_engine_KeyMetadata {
|
|
8
|
+
connectorDeveloperName: string | null;
|
|
9
|
+
}
|
|
10
|
+
export type ExternalConnectivityConnectionListRepresentationNormalizedKeyMetadata = KeyParams & $64$luvio_engine_NormalizedKeyMetadata;
|
|
11
|
+
export type PartialExternalConnectivityConnectionListRepresentationNormalizedKeyMetadata = Partial<KeyParams> & $64$luvio_engine_NormalizedKeyMetadata;
|
|
12
|
+
export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, config: KeyParams): string;
|
|
13
|
+
export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, config: KeyParams): ExternalConnectivityConnectionListRepresentationNormalizedKeyMetadata;
|
|
14
|
+
export declare function keyBuilderFromType(luvio: $64$luvio_engine_Luvio, object: ExternalConnectivityConnectionListRepresentation): string;
|
|
15
|
+
export declare function keyBuilderFromType_StructuredKey(luvio: $64$luvio_engine_Luvio, object: ExternalConnectivityConnectionListRepresentation): $64$luvio_engine_NormalizedKeyMetadata;
|
|
7
16
|
export declare function normalize(input: ExternalConnectivityConnectionListRepresentation, existing: ExternalConnectivityConnectionListRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): ExternalConnectivityConnectionListRepresentationNormalized;
|
|
8
17
|
export interface DynamicIngestParams {
|
|
9
18
|
connections: $64$luvio_engine_ResourceIngest;
|
|
@@ -22,18 +31,22 @@ export declare function dynamicIngest(ingestParams: DynamicIngestParams): $64$lu
|
|
|
22
31
|
* Output representation for External Connectivity Connection List
|
|
23
32
|
*
|
|
24
33
|
* Keys:
|
|
25
|
-
* (
|
|
34
|
+
* connectorDeveloperName (string | null): connectorDeveloperName
|
|
26
35
|
*/
|
|
27
36
|
export interface ExternalConnectivityConnectionListRepresentationNormalized {
|
|
28
37
|
/** List of External Connectivity Connections */
|
|
29
38
|
connections: Array<$64$luvio_engine_StoreLink>;
|
|
39
|
+
/** The Connector developer name for a filtered list of connections. */
|
|
40
|
+
connectorDeveloperName: string | null;
|
|
30
41
|
}
|
|
31
42
|
/**
|
|
32
43
|
* Output representation for External Connectivity Connection List
|
|
33
44
|
*
|
|
34
45
|
* Keys:
|
|
35
|
-
* (
|
|
46
|
+
* connectorDeveloperName (string | null): connectorDeveloperName
|
|
36
47
|
*/
|
|
37
48
|
export interface ExternalConnectivityConnectionListRepresentation {
|
|
38
49
|
connections: Array<ExternalConnectivityConnectionRepresentation_ExternalConnectivityConnectionRepresentation>;
|
|
50
|
+
connectorDeveloperName: string | null;
|
|
39
51
|
}
|
|
52
|
+
export declare const notifyUpdateAvailableFactory: (luvio: $64$luvio_engine_Luvio) => (configs: Partial<KeyParams>[]) => Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-platform-external-connectivity",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.366.0",
|
|
4
4
|
"description": "A set of API for external connectivity",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "dist/es/es2018/platform-external-connectivity.js",
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
"test:unit:debug": "node --inspect-brk ../../node_modules/.bin/jest --runInBand"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@salesforce/lds-bindings": "^1.
|
|
44
|
+
"@salesforce/lds-bindings": "^1.366.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@salesforce/lds-compiler-plugins": "^1.
|
|
47
|
+
"@salesforce/lds-compiler-plugins": "^1.366.0"
|
|
48
48
|
},
|
|
49
49
|
"nx": {
|
|
50
50
|
"targets": {
|
package/sfdc/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import { withDefaultLuvio } from 'force/ldsEngine';
|
|
|
17
17
|
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$c, typeCheckConfig as typeCheckConfig$c, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$7 } from 'force/luvioEngine';
|
|
18
18
|
|
|
19
19
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
|
-
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
20
|
+
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
21
21
|
const { isArray: ArrayIsArray$1 } = Array;
|
|
22
22
|
/**
|
|
23
23
|
* Validates an adapter config is well-formed.
|
|
@@ -41,7 +41,7 @@ function validateConfig(config, adapter, oneOf) {
|
|
|
41
41
|
throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
|
|
42
42
|
}
|
|
43
43
|
const supported = required.concat(optional);
|
|
44
|
-
if (ObjectKeys(config).some(key => !supported.includes(key))) {
|
|
44
|
+
if (ObjectKeys$1(config).some(key => !supported.includes(key))) {
|
|
45
45
|
throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -81,6 +81,7 @@ function buildAdapterValidationConfig(displayName, paramsMeta) {
|
|
|
81
81
|
}
|
|
82
82
|
const keyPrefix = 'external-connectivity';
|
|
83
83
|
|
|
84
|
+
const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
|
|
84
85
|
const { isArray: ArrayIsArray } = Array;
|
|
85
86
|
const { stringify: JSONStringify } = JSON;
|
|
86
87
|
function equalsArray(a, b, equalsItem) {
|
|
@@ -144,14 +145,14 @@ function validate$k(obj, path = 'ExternalConnectivityConnectionCreatedRepresenta
|
|
|
144
145
|
return v_error === undefined ? null : v_error;
|
|
145
146
|
}
|
|
146
147
|
const RepresentationType$d = 'ExternalConnectivityConnectionCreatedRepresentation';
|
|
147
|
-
function keyBuilder$
|
|
148
|
+
function keyBuilder$j(luvio, config) {
|
|
148
149
|
return keyPrefix + '::' + RepresentationType$d + ':' + config.developerName;
|
|
149
150
|
}
|
|
150
|
-
function keyBuilderFromType$
|
|
151
|
+
function keyBuilderFromType$5(luvio, object) {
|
|
151
152
|
const keyParams = {
|
|
152
153
|
developerName: object.developerName
|
|
153
154
|
};
|
|
154
|
-
return keyBuilder$
|
|
155
|
+
return keyBuilder$j(luvio, keyParams);
|
|
155
156
|
}
|
|
156
157
|
function normalize$d(input, existing, path, luvio, store, timestamp) {
|
|
157
158
|
return input;
|
|
@@ -184,14 +185,14 @@ const ingest$d = function ExternalConnectivityConnectionCreatedRepresentationIng
|
|
|
184
185
|
throw validateError;
|
|
185
186
|
}
|
|
186
187
|
}
|
|
187
|
-
const key = keyBuilderFromType$
|
|
188
|
+
const key = keyBuilderFromType$5(luvio, input);
|
|
188
189
|
const ttlToUse = TTL$c;
|
|
189
190
|
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$d, "external-connectivity", VERSION$d, RepresentationType$d, equals$d);
|
|
190
191
|
return createLink(key);
|
|
191
192
|
};
|
|
192
193
|
function getTypeCacheKeys$d(rootKeySet, luvio, input, fullPathFactory) {
|
|
193
194
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
194
|
-
const rootKey = keyBuilderFromType$
|
|
195
|
+
const rootKey = keyBuilderFromType$5(luvio, input);
|
|
195
196
|
rootKeySet.set(rootKey, {
|
|
196
197
|
namespace: keyPrefix,
|
|
197
198
|
representationName: RepresentationType$d,
|
|
@@ -207,7 +208,7 @@ function getResponseCacheKeys$b(storeKeyMap, luvio, resourceParams, response) {
|
|
|
207
208
|
}
|
|
208
209
|
function ingestSuccess$b(luvio, resourceParams, response) {
|
|
209
210
|
const { body } = response;
|
|
210
|
-
const key = keyBuilderFromType$
|
|
211
|
+
const key = keyBuilderFromType$5(luvio, body);
|
|
211
212
|
luvio.storeIngest(key, ingest$d, body);
|
|
212
213
|
const snapshot = luvio.storeLookup({
|
|
213
214
|
recordId: key,
|
|
@@ -373,14 +374,14 @@ function validate$j(obj, path = 'ExternalConnectivityConnectionEditDeleteResultR
|
|
|
373
374
|
return v_error === undefined ? null : v_error;
|
|
374
375
|
}
|
|
375
376
|
const RepresentationType$c = 'ExternalConnectivityConnectionEditDeleteResultRepresentation';
|
|
376
|
-
function keyBuilder$
|
|
377
|
+
function keyBuilder$i(luvio, config) {
|
|
377
378
|
return keyPrefix + '::' + RepresentationType$c + ':' + config.developerName;
|
|
378
379
|
}
|
|
379
|
-
function keyBuilderFromType$
|
|
380
|
+
function keyBuilderFromType$4(luvio, object) {
|
|
380
381
|
const keyParams = {
|
|
381
382
|
developerName: object.developerName
|
|
382
383
|
};
|
|
383
|
-
return keyBuilder$
|
|
384
|
+
return keyBuilder$i(luvio, keyParams);
|
|
384
385
|
}
|
|
385
386
|
function normalize$c(input, existing, path, luvio, store, timestamp) {
|
|
386
387
|
return input;
|
|
@@ -431,14 +432,14 @@ const ingest$c = function ExternalConnectivityConnectionEditDeleteResultRepresen
|
|
|
431
432
|
throw validateError;
|
|
432
433
|
}
|
|
433
434
|
}
|
|
434
|
-
const key = keyBuilderFromType$
|
|
435
|
+
const key = keyBuilderFromType$4(luvio, input);
|
|
435
436
|
const ttlToUse = TTL$b;
|
|
436
437
|
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$c, "external-connectivity", VERSION$c, RepresentationType$c, equals$c);
|
|
437
438
|
return createLink(key);
|
|
438
439
|
};
|
|
439
440
|
function getTypeCacheKeys$c(rootKeySet, luvio, input, fullPathFactory) {
|
|
440
441
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
441
|
-
const rootKey = keyBuilderFromType$
|
|
442
|
+
const rootKey = keyBuilderFromType$4(luvio, input);
|
|
442
443
|
rootKeySet.set(rootKey, {
|
|
443
444
|
namespace: keyPrefix,
|
|
444
445
|
representationName: RepresentationType$c,
|
|
@@ -454,7 +455,7 @@ function getResponseCacheKeys$a(storeKeyMap, luvio, resourceParams, response) {
|
|
|
454
455
|
}
|
|
455
456
|
function ingestSuccess$a(luvio, resourceParams, response) {
|
|
456
457
|
const { body } = response;
|
|
457
|
-
const key = keyBuilderFromType$
|
|
458
|
+
const key = keyBuilderFromType$4(luvio, body);
|
|
458
459
|
luvio.storeIngest(key, ingest$c, body);
|
|
459
460
|
const snapshot = luvio.storeLookup({
|
|
460
461
|
recordId: key,
|
|
@@ -985,15 +986,15 @@ function getTypeCacheKeys$a(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
985
986
|
function select$j(luvio, params) {
|
|
986
987
|
return select$k();
|
|
987
988
|
}
|
|
988
|
-
function keyBuilder$
|
|
989
|
+
function keyBuilder$h(luvio, params) {
|
|
989
990
|
return keyPrefix + '::ExternalConnectivityConnectionDetailsRepresentation:(' + 'connectionDeveloperName:' + params.urlParams.connectionDeveloperName + ')';
|
|
990
991
|
}
|
|
991
992
|
function getResponseCacheKeys$9(storeKeyMap, luvio, resourceParams, response) {
|
|
992
|
-
getTypeCacheKeys$a(storeKeyMap, luvio, response, () => keyBuilder$
|
|
993
|
+
getTypeCacheKeys$a(storeKeyMap, luvio, response, () => keyBuilder$h(luvio, resourceParams));
|
|
993
994
|
}
|
|
994
995
|
function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
|
|
995
996
|
const { body } = response;
|
|
996
|
-
const key = keyBuilder$
|
|
997
|
+
const key = keyBuilder$h(luvio, resourceParams);
|
|
997
998
|
luvio.storeIngest(key, ingest$a, body);
|
|
998
999
|
const snapshot = luvio.storeLookup({
|
|
999
1000
|
recordId: key,
|
|
@@ -1009,7 +1010,7 @@ function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1009
1010
|
return snapshot;
|
|
1010
1011
|
}
|
|
1011
1012
|
function ingestError$6(luvio, params, error, snapshotRefresh) {
|
|
1012
|
-
const key = keyBuilder$
|
|
1013
|
+
const key = keyBuilder$h(luvio, params);
|
|
1013
1014
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1014
1015
|
const storeMetadataParams = {
|
|
1015
1016
|
ttl: TTL$9,
|
|
@@ -1040,9 +1041,9 @@ const getConnectionDetails_ConfigPropertyMetadata = [
|
|
|
1040
1041
|
];
|
|
1041
1042
|
const getConnectionDetails_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, getConnectionDetails_ConfigPropertyMetadata);
|
|
1042
1043
|
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$c(getConnectionDetails_ConfigPropertyMetadata);
|
|
1043
|
-
function keyBuilder$
|
|
1044
|
+
function keyBuilder$g(luvio, config) {
|
|
1044
1045
|
const resourceParams = createResourceParams$9(config);
|
|
1045
|
-
return keyBuilder$
|
|
1046
|
+
return keyBuilder$h(luvio, resourceParams);
|
|
1046
1047
|
}
|
|
1047
1048
|
function typeCheckConfig$9(untrustedConfig) {
|
|
1048
1049
|
const config = {};
|
|
@@ -1100,7 +1101,7 @@ function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext
|
|
|
1100
1101
|
function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
|
|
1101
1102
|
const { luvio, config } = context;
|
|
1102
1103
|
const selector = {
|
|
1103
|
-
recordId: keyBuilder$
|
|
1104
|
+
recordId: keyBuilder$g(luvio, config),
|
|
1104
1105
|
node: adapterFragment$6(luvio, config),
|
|
1105
1106
|
variables: {},
|
|
1106
1107
|
};
|
|
@@ -1410,7 +1411,7 @@ function getTypeCacheKeys$9(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
1410
1411
|
}
|
|
1411
1412
|
|
|
1412
1413
|
const TTL$8 = 500;
|
|
1413
|
-
const VERSION$8 = "
|
|
1414
|
+
const VERSION$8 = "b5d13b1fd1ba9a2eccd69af50a915654";
|
|
1414
1415
|
function validate$b(obj, path = 'ExternalConnectivityConnectionListRepresentation') {
|
|
1415
1416
|
const v_error = (() => {
|
|
1416
1417
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -1428,10 +1429,45 @@ function validate$b(obj, path = 'ExternalConnectivityConnectionListRepresentatio
|
|
|
1428
1429
|
return new TypeError('Expected "object" but received "' + typeof obj_connections_item + '" (at "' + path_connections_item + '")');
|
|
1429
1430
|
}
|
|
1430
1431
|
}
|
|
1432
|
+
const obj_connectorDeveloperName = obj.connectorDeveloperName;
|
|
1433
|
+
const path_connectorDeveloperName = path + '.connectorDeveloperName';
|
|
1434
|
+
let obj_connectorDeveloperName_union0 = null;
|
|
1435
|
+
const obj_connectorDeveloperName_union0_error = (() => {
|
|
1436
|
+
if (typeof obj_connectorDeveloperName !== 'string') {
|
|
1437
|
+
return new TypeError('Expected "string" but received "' + typeof obj_connectorDeveloperName + '" (at "' + path_connectorDeveloperName + '")');
|
|
1438
|
+
}
|
|
1439
|
+
})();
|
|
1440
|
+
if (obj_connectorDeveloperName_union0_error != null) {
|
|
1441
|
+
obj_connectorDeveloperName_union0 = obj_connectorDeveloperName_union0_error.message;
|
|
1442
|
+
}
|
|
1443
|
+
let obj_connectorDeveloperName_union1 = null;
|
|
1444
|
+
const obj_connectorDeveloperName_union1_error = (() => {
|
|
1445
|
+
if (obj_connectorDeveloperName !== null) {
|
|
1446
|
+
return new TypeError('Expected "null" but received "' + typeof obj_connectorDeveloperName + '" (at "' + path_connectorDeveloperName + '")');
|
|
1447
|
+
}
|
|
1448
|
+
})();
|
|
1449
|
+
if (obj_connectorDeveloperName_union1_error != null) {
|
|
1450
|
+
obj_connectorDeveloperName_union1 = obj_connectorDeveloperName_union1_error.message;
|
|
1451
|
+
}
|
|
1452
|
+
if (obj_connectorDeveloperName_union0 && obj_connectorDeveloperName_union1) {
|
|
1453
|
+
let message = 'Object doesn\'t match union (at "' + path_connectorDeveloperName + '")';
|
|
1454
|
+
message += '\n' + obj_connectorDeveloperName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1455
|
+
message += '\n' + obj_connectorDeveloperName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1456
|
+
return new TypeError(message);
|
|
1457
|
+
}
|
|
1431
1458
|
})();
|
|
1432
1459
|
return v_error === undefined ? null : v_error;
|
|
1433
1460
|
}
|
|
1434
1461
|
const RepresentationType$8 = 'ExternalConnectivityConnectionListRepresentation';
|
|
1462
|
+
function keyBuilder$f(luvio, config) {
|
|
1463
|
+
return keyPrefix + '::' + RepresentationType$8 + ':' + (config.connectorDeveloperName === null ? '' : config.connectorDeveloperName);
|
|
1464
|
+
}
|
|
1465
|
+
function keyBuilderFromType$3(luvio, object) {
|
|
1466
|
+
const keyParams = {
|
|
1467
|
+
connectorDeveloperName: object.connectorDeveloperName
|
|
1468
|
+
};
|
|
1469
|
+
return keyBuilder$f(luvio, keyParams);
|
|
1470
|
+
}
|
|
1435
1471
|
function normalize$8(input, existing, path, luvio, store, timestamp) {
|
|
1436
1472
|
const input_connections = input.connections;
|
|
1437
1473
|
const input_connections_id = path.fullPath + '__connections';
|
|
@@ -1462,6 +1498,10 @@ const select$h = function ExternalConnectivityConnectionListRepresentationSelect
|
|
|
1462
1498
|
kind: 'Link',
|
|
1463
1499
|
plural: true,
|
|
1464
1500
|
fragment: select$i()
|
|
1501
|
+
},
|
|
1502
|
+
{
|
|
1503
|
+
name: 'connectorDeveloperName',
|
|
1504
|
+
kind: 'Scalar'
|
|
1465
1505
|
}
|
|
1466
1506
|
]
|
|
1467
1507
|
};
|
|
@@ -1477,6 +1517,11 @@ function equals$8(existing, incoming) {
|
|
|
1477
1517
|
if (equals_connections_items === false) {
|
|
1478
1518
|
return false;
|
|
1479
1519
|
}
|
|
1520
|
+
const existing_connectorDeveloperName = existing.connectorDeveloperName;
|
|
1521
|
+
const incoming_connectorDeveloperName = incoming.connectorDeveloperName;
|
|
1522
|
+
if (!(existing_connectorDeveloperName === incoming_connectorDeveloperName)) {
|
|
1523
|
+
return false;
|
|
1524
|
+
}
|
|
1480
1525
|
return true;
|
|
1481
1526
|
}
|
|
1482
1527
|
const ingest$8 = function ExternalConnectivityConnectionListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
@@ -1486,14 +1531,14 @@ const ingest$8 = function ExternalConnectivityConnectionListRepresentationIngest
|
|
|
1486
1531
|
throw validateError;
|
|
1487
1532
|
}
|
|
1488
1533
|
}
|
|
1489
|
-
const key =
|
|
1534
|
+
const key = keyBuilderFromType$3(luvio, input);
|
|
1490
1535
|
const ttlToUse = TTL$8;
|
|
1491
1536
|
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$8, "external-connectivity", VERSION$8, RepresentationType$8, equals$8);
|
|
1492
1537
|
return createLink(key);
|
|
1493
1538
|
};
|
|
1494
1539
|
function getTypeCacheKeys$8(rootKeySet, luvio, input, fullPathFactory) {
|
|
1495
1540
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1496
|
-
const rootKey =
|
|
1541
|
+
const rootKey = keyBuilderFromType$3(luvio, input);
|
|
1497
1542
|
rootKeySet.set(rootKey, {
|
|
1498
1543
|
namespace: keyPrefix,
|
|
1499
1544
|
representationName: RepresentationType$8,
|
|
@@ -1504,19 +1549,35 @@ function getTypeCacheKeys$8(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
1504
1549
|
getTypeCacheKeys$9(rootKeySet, luvio, input.connections[i], () => '');
|
|
1505
1550
|
}
|
|
1506
1551
|
}
|
|
1552
|
+
const notifyUpdateAvailableFactory = (luvio) => {
|
|
1553
|
+
return function notifyConnectionListUpdateAvailable(configs) {
|
|
1554
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1555
|
+
const requiredKeyParams = ['connectorDeveloperName'];
|
|
1556
|
+
configs.forEach(config => {
|
|
1557
|
+
if (false === requiredKeyParams.every(req => req in config)) {
|
|
1558
|
+
throw new Error(`one of the configs did not contain all required parameters: ${JSONStringify(ObjectKeys(config))}`);
|
|
1559
|
+
}
|
|
1560
|
+
});
|
|
1561
|
+
}
|
|
1562
|
+
const keys = configs.map(c => keyBuilder$f(luvio, c));
|
|
1563
|
+
return luvio.notifyStoreUpdateAvailable(keys);
|
|
1564
|
+
};
|
|
1565
|
+
};
|
|
1507
1566
|
|
|
1508
1567
|
function select$g(luvio, params) {
|
|
1509
1568
|
return select$h();
|
|
1510
1569
|
}
|
|
1511
1570
|
function keyBuilder$e(luvio, params) {
|
|
1512
|
-
return
|
|
1571
|
+
return keyBuilder$f(luvio, {
|
|
1572
|
+
connectorDeveloperName: params.queryParams.connectorDeveloperName || ''
|
|
1573
|
+
});
|
|
1513
1574
|
}
|
|
1514
1575
|
function getResponseCacheKeys$8(storeKeyMap, luvio, resourceParams, response) {
|
|
1515
|
-
getTypeCacheKeys$8(storeKeyMap, luvio, response
|
|
1576
|
+
getTypeCacheKeys$8(storeKeyMap, luvio, response);
|
|
1516
1577
|
}
|
|
1517
1578
|
function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
|
|
1518
1579
|
const { body } = response;
|
|
1519
|
-
const key = keyBuilder$e();
|
|
1580
|
+
const key = keyBuilder$e(luvio, resourceParams);
|
|
1520
1581
|
luvio.storeIngest(key, ingest$8, body);
|
|
1521
1582
|
const snapshot = luvio.storeLookup({
|
|
1522
1583
|
recordId: key,
|
|
@@ -1532,7 +1593,7 @@ function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1532
1593
|
return snapshot;
|
|
1533
1594
|
}
|
|
1534
1595
|
function ingestError$5(luvio, params, error, snapshotRefresh) {
|
|
1535
|
-
const key = keyBuilder$e();
|
|
1596
|
+
const key = keyBuilder$e(luvio, params);
|
|
1536
1597
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1537
1598
|
const storeMetadataParams = {
|
|
1538
1599
|
ttl: TTL$8,
|
|
@@ -1551,22 +1612,25 @@ function createResourceRequest$8(config) {
|
|
|
1551
1612
|
method: 'get',
|
|
1552
1613
|
body: null,
|
|
1553
1614
|
urlParams: {},
|
|
1554
|
-
queryParams:
|
|
1615
|
+
queryParams: config.queryParams,
|
|
1555
1616
|
headers,
|
|
1556
1617
|
priority: 'normal',
|
|
1557
1618
|
};
|
|
1558
1619
|
}
|
|
1559
1620
|
|
|
1560
1621
|
const adapterName$8 = 'getConnections';
|
|
1561
|
-
const getConnections_ConfigPropertyMetadata = [
|
|
1622
|
+
const getConnections_ConfigPropertyMetadata = [
|
|
1623
|
+
generateParamConfigMetadata('connectorDeveloperName', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1624
|
+
];
|
|
1562
1625
|
const getConnections_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, getConnections_ConfigPropertyMetadata);
|
|
1563
1626
|
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$c(getConnections_ConfigPropertyMetadata);
|
|
1564
1627
|
function keyBuilder$d(luvio, config) {
|
|
1565
|
-
createResourceParams$8(config);
|
|
1566
|
-
return keyBuilder$e();
|
|
1628
|
+
const resourceParams = createResourceParams$8(config);
|
|
1629
|
+
return keyBuilder$e(luvio, resourceParams);
|
|
1567
1630
|
}
|
|
1568
1631
|
function typeCheckConfig$8(untrustedConfig) {
|
|
1569
1632
|
const config = {};
|
|
1633
|
+
typeCheckConfig$c(untrustedConfig, config, getConnections_ConfigPropertyMetadata);
|
|
1570
1634
|
return config;
|
|
1571
1635
|
}
|
|
1572
1636
|
function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
|
|
@@ -1576,7 +1640,7 @@ function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
|
|
|
1576
1640
|
if (process.env.NODE_ENV !== 'production') {
|
|
1577
1641
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1578
1642
|
}
|
|
1579
|
-
const config = typeCheckConfig$8();
|
|
1643
|
+
const config = typeCheckConfig$8(untrustedConfig);
|
|
1580
1644
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1581
1645
|
return null;
|
|
1582
1646
|
}
|
|
@@ -1602,7 +1666,7 @@ function onFetchResponseError$5(luvio, config, resourceParams, response) {
|
|
|
1602
1666
|
}
|
|
1603
1667
|
function buildNetworkSnapshot$8(luvio, config, options) {
|
|
1604
1668
|
const resourceParams = createResourceParams$8(config);
|
|
1605
|
-
const request = createResourceRequest$8();
|
|
1669
|
+
const request = createResourceRequest$8(resourceParams);
|
|
1606
1670
|
return luvio.dispatchResourceRequest(request, options)
|
|
1607
1671
|
.then((response) => {
|
|
1608
1672
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => {
|
|
@@ -3675,7 +3739,7 @@ function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
|
3675
3739
|
}
|
|
3676
3740
|
function ingestSuccess(luvio, resourceParams, response) {
|
|
3677
3741
|
const { body } = response;
|
|
3678
|
-
const key = keyBuilderFromType$
|
|
3742
|
+
const key = keyBuilderFromType$4(luvio, body);
|
|
3679
3743
|
luvio.storeIngest(key, ingest$c, body);
|
|
3680
3744
|
const snapshot = luvio.storeLookup({
|
|
3681
3745
|
recordId: key,
|
|
@@ -3830,6 +3894,7 @@ const getInvocableActionsMetadata = {
|
|
|
3830
3894
|
ttl: 500,
|
|
3831
3895
|
};
|
|
3832
3896
|
// Notify Update Available
|
|
3897
|
+
let notifyConnectionListUpdateAvailable;
|
|
3833
3898
|
function bindExportsTo(luvio) {
|
|
3834
3899
|
// LDS Adapters
|
|
3835
3900
|
const getConnectionDetails_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getConnectionDetails', getConnectionDetailsAdapterFactory), getConnectionDetailsMetadata);
|
|
@@ -3865,6 +3930,7 @@ function bindExportsTo(luvio) {
|
|
|
3865
3930
|
getExternalIdentityProviders_imperative: createImperativeAdapter(luvio, getExternalIdentityProviders_ldsAdapter, getExternalIdentityProvidersMetadata),
|
|
3866
3931
|
getInvocableActions_imperative: createImperativeAdapter(luvio, getInvocableActions_ldsAdapter, getInvocableActionsMetadata),
|
|
3867
3932
|
// Notify Update Availables
|
|
3933
|
+
notifyConnectionListUpdateAvailable: createLDSAdapter(luvio, 'notifyConnectionListUpdateAvailable', notifyUpdateAvailableFactory),
|
|
3868
3934
|
};
|
|
3869
3935
|
}
|
|
3870
3936
|
withDefaultLuvio((luvio) => {
|
|
@@ -3888,8 +3954,9 @@ withDefaultLuvio((luvio) => {
|
|
|
3888
3954
|
getExternalConnectivityConnectionReferencedFlows_imperative,
|
|
3889
3955
|
getExternalIdentityProviders_imperative,
|
|
3890
3956
|
getInvocableActions_imperative,
|
|
3957
|
+
notifyConnectionListUpdateAvailable,
|
|
3891
3958
|
} = bindExportsTo(luvio));
|
|
3892
3959
|
});
|
|
3893
3960
|
|
|
3894
|
-
export { createConnection, deleteConnection, getConnectionDetails, getConnectionDetails_imperative, getConnections, getConnections_imperative, getConnectorDetails, getConnectorDetails_imperative, getConnectors, getConnectors_imperative, getExternalConnectivityConnectionReferencedFlows, getExternalConnectivityConnectionReferencedFlows_imperative, getExternalIdentityProviders, getExternalIdentityProviders_imperative, getInvocableActions, getInvocableActions_imperative, refreshMetadata, testConnection, updateConnection };
|
|
3895
|
-
// version: 1.
|
|
3961
|
+
export { createConnection, deleteConnection, getConnectionDetails, getConnectionDetails_imperative, getConnections, getConnections_imperative, getConnectorDetails, getConnectorDetails_imperative, getConnectors, getConnectors_imperative, getExternalConnectivityConnectionReferencedFlows, getExternalConnectivityConnectionReferencedFlows_imperative, getExternalIdentityProviders, getExternalIdentityProviders_imperative, getInvocableActions, getInvocableActions_imperative, notifyConnectionListUpdateAvailable, refreshMetadata, testConnection, updateConnection };
|
|
3962
|
+
// version: 1.366.0-bf15f04cce
|
package/src/raml/api.raml
CHANGED
|
@@ -234,6 +234,9 @@ types:
|
|
|
234
234
|
type: array
|
|
235
235
|
items:
|
|
236
236
|
type: ExternalConnectivityConnectionRepresentation
|
|
237
|
+
connectorDeveloperName:
|
|
238
|
+
description: The Connector developer name for a filtered list of connections.
|
|
239
|
+
type: string | nil
|
|
237
240
|
ExternalConnectivityConnectionReferencedFlowsDefinitionRepresentation:
|
|
238
241
|
description: Output representation for flow definition referencing External Connectivity Connection
|
|
239
242
|
type: object
|
|
@@ -502,6 +505,10 @@ types:
|
|
|
502
505
|
body:
|
|
503
506
|
application/json:
|
|
504
507
|
type: ExternalConnectivityConnectionListRepresentation
|
|
508
|
+
queryParameters:
|
|
509
|
+
connectorDeveloperName:
|
|
510
|
+
type: string
|
|
511
|
+
required: false
|
|
505
512
|
post:
|
|
506
513
|
displayName: postExternalConnectivityConnectionList
|
|
507
514
|
description: POST method to create External Connectivity Connection
|
package/src/raml/luvio.raml
CHANGED
|
@@ -21,6 +21,12 @@ types:
|
|
|
21
21
|
developerName: developerName
|
|
22
22
|
ExternalConnectivityConnectionListRepresentation:
|
|
23
23
|
(luvio.ttl): 500
|
|
24
|
+
(luvio.key):
|
|
25
|
+
connectorDeveloperName: connectorDeveloperName
|
|
26
|
+
(luvio.updateAvailable):
|
|
27
|
+
name: notifyConnectionListUpdateAvailable
|
|
28
|
+
parameters:
|
|
29
|
+
connectorDeveloperName: connectorDeveloperName
|
|
24
30
|
ExternalConnectivityConnectionReferencedFlowsDefinitionRepresentation:
|
|
25
31
|
(luvio.ttl): 500
|
|
26
32
|
ExternalConnectivityConnectionReferencedFlowsRepresentation:
|
|
@@ -61,6 +67,8 @@ types:
|
|
|
61
67
|
get:
|
|
62
68
|
(luvio.adapter):
|
|
63
69
|
name: getConnections
|
|
70
|
+
(luvio.key):
|
|
71
|
+
connectorDeveloperName: queryParams.connectorDeveloperName || ''
|
|
64
72
|
post:
|
|
65
73
|
(luvio.adapter):
|
|
66
74
|
name: createConnection
|