@salesforce/lds-adapters-platform-named-credential 1.213.0 → 1.213.1
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-named-credential.js +40 -97
- package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +3 -1
- package/dist/es/es2018/types/src/generated/adapters/deleteCredential.d.ts +3 -2
- package/dist/es/es2018/types/src/generated/adapters/getExternalCredentials.d.ts +3 -2
- package/dist/es/es2018/types/src/generated/adapters/getOAuthCredentialAuthUrl.d.ts +3 -2
- package/package.json +1 -1
- package/sfdc/index.js +42 -99
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, StoreKeyMap, deepFreeze, typeCheckScalars } from '@luvio/engine';
|
|
7
|
+
import { serializeStructuredKey, StoreKeyMap, deepFreeze, typeCheckScalars, ingestShape, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -48,6 +48,24 @@ const snapshotRefreshOptions = {
|
|
|
48
48
|
},
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
|
+
function generateParamConfigMetadata(name, required, coerceFn) {
|
|
52
|
+
return {
|
|
53
|
+
name,
|
|
54
|
+
required,
|
|
55
|
+
coerceFn,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function buildAdapterValidationConfig(displayName, paramsMeta) {
|
|
59
|
+
const required = paramsMeta.filter(p => p.required).map(p => p.name);
|
|
60
|
+
const optional = paramsMeta.filter(p => !p.required).map(p => p.name);
|
|
61
|
+
return {
|
|
62
|
+
displayName,
|
|
63
|
+
parameters: {
|
|
64
|
+
required,
|
|
65
|
+
optional,
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
}
|
|
51
69
|
const keyPrefix = 'named-credential';
|
|
52
70
|
|
|
53
71
|
const { isArray: ArrayIsArray } = Array;
|
|
@@ -108,14 +126,13 @@ function createResourceRequest$2(config) {
|
|
|
108
126
|
};
|
|
109
127
|
}
|
|
110
128
|
|
|
111
|
-
const adapterName = 'deleteCredential';
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
};
|
|
129
|
+
const adapterName$2 = 'deleteCredential';
|
|
130
|
+
const deleteCredential_ConfigPropertyMetadata = [
|
|
131
|
+
generateParamConfigMetadata('externalCredential', false),
|
|
132
|
+
generateParamConfigMetadata('principalName', false),
|
|
133
|
+
generateParamConfigMetadata('principalType', false),
|
|
134
|
+
];
|
|
135
|
+
const deleteCredential_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, deleteCredential_ConfigPropertyMetadata);
|
|
119
136
|
function createResourceParams$2(config) {
|
|
120
137
|
const resourceParams = {
|
|
121
138
|
queryParams: {
|
|
@@ -169,7 +186,7 @@ const deleteCredentialAdapterFactory = (luvio) => {
|
|
|
169
186
|
const config = validateAdapterConfig$2(untrustedConfig, deleteCredential_ConfigPropertyNames);
|
|
170
187
|
// Invalid or incomplete config
|
|
171
188
|
if (config === null) {
|
|
172
|
-
throw new Error(`Invalid config for "${adapterName}"`);
|
|
189
|
+
throw new Error(`Invalid config for "${adapterName$2}"`);
|
|
173
190
|
}
|
|
174
191
|
return buildNetworkSnapshot$2(luvio, config);
|
|
175
192
|
};
|
|
@@ -302,26 +319,8 @@ const ingest$2 = function OAuthCredentialAuthUrlRepresentationIngest(input, path
|
|
|
302
319
|
}
|
|
303
320
|
}
|
|
304
321
|
const key = keyBuilderFromType$1(luvio, input);
|
|
305
|
-
const existingRecord = store.readEntry(key);
|
|
306
322
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 300000;
|
|
307
|
-
|
|
308
|
-
fullPath: key,
|
|
309
|
-
parent: path.parent,
|
|
310
|
-
propertyName: path.propertyName,
|
|
311
|
-
ttl: ttlToUse
|
|
312
|
-
});
|
|
313
|
-
if (existingRecord === undefined || equals$4(existingRecord, incomingRecord) === false) {
|
|
314
|
-
luvio.storePublish(key, incomingRecord);
|
|
315
|
-
}
|
|
316
|
-
if (ttlToUse !== undefined) {
|
|
317
|
-
const storeMetadataParams = {
|
|
318
|
-
ttl: ttlToUse,
|
|
319
|
-
namespace: "named-credential",
|
|
320
|
-
version: VERSION$4,
|
|
321
|
-
representationName: RepresentationType$2,
|
|
322
|
-
};
|
|
323
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
324
|
-
}
|
|
323
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "named-credential", VERSION$4, RepresentationType$2, equals$4);
|
|
325
324
|
return createLink(key);
|
|
326
325
|
};
|
|
327
326
|
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -371,13 +370,11 @@ function createResourceRequest$1(config) {
|
|
|
371
370
|
};
|
|
372
371
|
}
|
|
373
372
|
|
|
374
|
-
const
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
}
|
|
380
|
-
};
|
|
373
|
+
const adapterName$1 = 'getOAuthCredentialAuthUrl';
|
|
374
|
+
const getOAuthCredentialAuthUrl_ConfigPropertyMetadata = [
|
|
375
|
+
generateParamConfigMetadata('requestBody', true),
|
|
376
|
+
];
|
|
377
|
+
const getOAuthCredentialAuthUrl_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getOAuthCredentialAuthUrl_ConfigPropertyMetadata);
|
|
381
378
|
function createResourceParams$1(config) {
|
|
382
379
|
const resourceParams = {
|
|
383
380
|
body: {
|
|
@@ -713,26 +710,8 @@ const ingest$1 = function ExternalCredentialRepresentationIngest(input, path, lu
|
|
|
713
710
|
}
|
|
714
711
|
}
|
|
715
712
|
const key = keyBuilderFromType(luvio, input);
|
|
716
|
-
const existingRecord = store.readEntry(key);
|
|
717
713
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 300000;
|
|
718
|
-
|
|
719
|
-
fullPath: key,
|
|
720
|
-
parent: path.parent,
|
|
721
|
-
propertyName: path.propertyName,
|
|
722
|
-
ttl: ttlToUse
|
|
723
|
-
});
|
|
724
|
-
if (existingRecord === undefined || equals$1(existingRecord, incomingRecord) === false) {
|
|
725
|
-
luvio.storePublish(key, incomingRecord);
|
|
726
|
-
}
|
|
727
|
-
if (ttlToUse !== undefined) {
|
|
728
|
-
const storeMetadataParams = {
|
|
729
|
-
ttl: ttlToUse,
|
|
730
|
-
namespace: "named-credential",
|
|
731
|
-
version: VERSION$1,
|
|
732
|
-
representationName: RepresentationType$1,
|
|
733
|
-
};
|
|
734
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
735
|
-
}
|
|
714
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "named-credential", VERSION$1, RepresentationType$1, equals$1);
|
|
736
715
|
return createLink(key);
|
|
737
716
|
};
|
|
738
717
|
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -782,7 +761,7 @@ function normalize(input, existing, path, luvio, store, timestamp) {
|
|
|
782
761
|
existing: existing,
|
|
783
762
|
},
|
|
784
763
|
ttl: path.ttl
|
|
785
|
-
}, luvio, store);
|
|
764
|
+
}, luvio, store, timestamp);
|
|
786
765
|
}
|
|
787
766
|
return input;
|
|
788
767
|
}
|
|
@@ -822,26 +801,8 @@ const ingest = function ExternalCredentialListRepresentationIngest(input, path,
|
|
|
822
801
|
}
|
|
823
802
|
}
|
|
824
803
|
const key = path.fullPath;
|
|
825
|
-
const existingRecord = store.readEntry(key);
|
|
826
804
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 300000;
|
|
827
|
-
|
|
828
|
-
fullPath: key,
|
|
829
|
-
parent: path.parent,
|
|
830
|
-
propertyName: path.propertyName,
|
|
831
|
-
ttl: ttlToUse
|
|
832
|
-
}, luvio, store);
|
|
833
|
-
if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
|
|
834
|
-
luvio.storePublish(key, incomingRecord);
|
|
835
|
-
}
|
|
836
|
-
if (ttlToUse !== undefined) {
|
|
837
|
-
const storeMetadataParams = {
|
|
838
|
-
ttl: ttlToUse,
|
|
839
|
-
namespace: "named-credential",
|
|
840
|
-
version: VERSION,
|
|
841
|
-
representationName: RepresentationType,
|
|
842
|
-
};
|
|
843
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
844
|
-
}
|
|
805
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "named-credential", VERSION, RepresentationType, equals);
|
|
845
806
|
return createLink(key);
|
|
846
807
|
};
|
|
847
808
|
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -904,13 +865,9 @@ function createResourceRequest(config) {
|
|
|
904
865
|
};
|
|
905
866
|
}
|
|
906
867
|
|
|
907
|
-
const
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
required: [],
|
|
911
|
-
optional: []
|
|
912
|
-
}
|
|
913
|
-
};
|
|
868
|
+
const adapterName = 'getExternalCredentials';
|
|
869
|
+
const getExternalCredentials_ConfigPropertyMetadata = [];
|
|
870
|
+
const getExternalCredentials_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getExternalCredentials_ConfigPropertyMetadata);
|
|
914
871
|
function createResourceParams(config) {
|
|
915
872
|
const resourceParams = {};
|
|
916
873
|
return resourceParams;
|
|
@@ -967,21 +924,7 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
967
924
|
});
|
|
968
925
|
}
|
|
969
926
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
970
|
-
|
|
971
|
-
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
972
|
-
const dispatchOptions = {
|
|
973
|
-
resourceRequestContext: {
|
|
974
|
-
requestCorrelator,
|
|
975
|
-
luvioRequestMethod: undefined,
|
|
976
|
-
},
|
|
977
|
-
eventObservers
|
|
978
|
-
};
|
|
979
|
-
if (networkPriority !== 'normal') {
|
|
980
|
-
dispatchOptions.overrides = {
|
|
981
|
-
priority: networkPriority
|
|
982
|
-
};
|
|
983
|
-
}
|
|
984
|
-
return buildNetworkSnapshot(luvio, config, dispatchOptions);
|
|
927
|
+
return buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
985
928
|
}
|
|
986
929
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
987
930
|
const { luvio, config } = context;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Adapter as $64$luvio_engine_Adapter, Snapshot as $64$luvio_engine_Snapshot, UnfulfilledSnapshot as $64$luvio_engine_UnfulfilledSnapshot } from '@luvio/engine';
|
|
1
|
+
import { Adapter as $64$luvio_engine_Adapter, Snapshot as $64$luvio_engine_Snapshot, UnfulfilledSnapshot as $64$luvio_engine_UnfulfilledSnapshot, AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata } from '@luvio/engine';
|
|
2
2
|
export declare const ObjectPrototypeHasOwnProperty: (v: PropertyKey) => boolean;
|
|
3
3
|
declare const ObjectKeys: {
|
|
4
4
|
(o: object): string[];
|
|
@@ -57,4 +57,6 @@ export declare const snapshotRefreshOptions: {
|
|
|
57
57
|
export declare function stableJSONStringify(node: any): string | undefined;
|
|
58
58
|
export declare function getFetchResponseStatusText(status: number): string;
|
|
59
59
|
export declare function isUnfulfilledSnapshot<T, U>(snapshot: $64$luvio_engine_Snapshot<T, U>): snapshot is $64$luvio_engine_UnfulfilledSnapshot<T, U>;
|
|
60
|
+
export declare function generateParamConfigMetadata(name: string, required: boolean, coerceFn?: (v: unknown) => unknown): $64$luvio_engine_AdapterConfigMetadata;
|
|
61
|
+
export declare function buildAdapterValidationConfig(displayName: string, paramsMeta: $64$luvio_engine_AdapterConfigMetadata[]): AdapterValidationConfig;
|
|
60
62
|
export declare const keyPrefix = "named-credential";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata, Luvio as $64$luvio_engine_Luvio, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, DeleteAdapterFactory as $64$luvio_engine_DeleteAdapterFactory } from '@luvio/engine';
|
|
2
|
+
import { Untrusted as adapter$45$utils_Untrusted, AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig } from './adapter-utils';
|
|
2
3
|
import { ResourceRequestConfig as resources_deleteNamedCredentialsCredential_ResourceRequestConfig } from '../resources/deleteNamedCredentialsCredential';
|
|
3
|
-
import { Luvio as $64$luvio_engine_Luvio, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, DeleteAdapterFactory as $64$luvio_engine_DeleteAdapterFactory } from '@luvio/engine';
|
|
4
4
|
export declare const adapterName = "deleteCredential";
|
|
5
|
+
export declare const deleteCredential_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
|
|
5
6
|
export declare const deleteCredential_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
6
7
|
export interface DeleteCredentialConfig {
|
|
7
8
|
externalCredential?: string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata, Luvio as $64$luvio_engine_Luvio, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Fragment as $64$luvio_engine_Fragment, Snapshot as $64$luvio_engine_Snapshot, FetchResponse as $64$luvio_engine_FetchResponse, ErrorResponse as $64$luvio_engine_ErrorResponse, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, CoercedAdapterRequestContext as $64$luvio_engine_CoercedAdapterRequestContext, StoreLookup as $64$luvio_engine_StoreLookup, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
|
|
2
|
+
import { Untrusted as adapter$45$utils_Untrusted, AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig } from './adapter-utils';
|
|
2
3
|
import { ResourceRequestConfig as resources_getNamedCredentialsExternalCredentials_ResourceRequestConfig } from '../resources/getNamedCredentialsExternalCredentials';
|
|
3
|
-
import { Luvio as $64$luvio_engine_Luvio, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Fragment as $64$luvio_engine_Fragment, Snapshot as $64$luvio_engine_Snapshot, FetchResponse as $64$luvio_engine_FetchResponse, ErrorResponse as $64$luvio_engine_ErrorResponse, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, CoercedAdapterRequestContext as $64$luvio_engine_CoercedAdapterRequestContext, StoreLookup as $64$luvio_engine_StoreLookup, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
|
|
4
4
|
import { ExternalCredentialListRepresentation as types_ExternalCredentialListRepresentation_ExternalCredentialListRepresentation } from '../types/ExternalCredentialListRepresentation';
|
|
5
5
|
export declare const adapterName = "getExternalCredentials";
|
|
6
|
+
export declare const getExternalCredentials_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
|
|
6
7
|
export declare const getExternalCredentials_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
7
8
|
export interface GetExternalCredentialsConfig {
|
|
8
9
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata, Luvio as $64$luvio_engine_Luvio, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
|
|
2
|
+
import { Untrusted as adapter$45$utils_Untrusted, AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig } from './adapter-utils';
|
|
2
3
|
import { OAuthCredentialAuthUrlInputRepresentation as types_OAuthCredentialAuthUrlInputRepresentation_OAuthCredentialAuthUrlInputRepresentation } from '../types/OAuthCredentialAuthUrlInputRepresentation';
|
|
3
4
|
import { ResourceRequestConfig as resources_postNamedCredentialsCredentialAuthUrlOAuth_ResourceRequestConfig } from '../resources/postNamedCredentialsCredentialAuthUrlOAuth';
|
|
4
|
-
import { Luvio as $64$luvio_engine_Luvio, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
|
|
5
5
|
import { OAuthCredentialAuthUrlRepresentation as types_OAuthCredentialAuthUrlRepresentation_OAuthCredentialAuthUrlRepresentation } from '../types/OAuthCredentialAuthUrlRepresentation';
|
|
6
6
|
export declare const adapterName = "getOAuthCredentialAuthUrl";
|
|
7
|
+
export declare const getOAuthCredentialAuthUrl_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
|
|
7
8
|
export declare const getOAuthCredentialAuthUrl_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
8
9
|
export interface GetOAuthCredentialAuthUrlConfig {
|
|
9
10
|
requestBody: types_OAuthCredentialAuthUrlInputRepresentation_OAuthCredentialAuthUrlInputRepresentation;
|
package/package.json
CHANGED
package/sfdc/index.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
15
|
import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
|
|
16
16
|
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
17
|
-
import { serializeStructuredKey, StoreKeyMap, deepFreeze, typeCheckScalars } from 'force/luvioEngine';
|
|
17
|
+
import { serializeStructuredKey, StoreKeyMap, deepFreeze, typeCheckScalars, ingestShape, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1 } from 'force/luvioEngine';
|
|
18
18
|
|
|
19
19
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
20
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -58,6 +58,24 @@ const snapshotRefreshOptions = {
|
|
|
58
58
|
},
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
|
+
function generateParamConfigMetadata(name, required, coerceFn) {
|
|
62
|
+
return {
|
|
63
|
+
name,
|
|
64
|
+
required,
|
|
65
|
+
coerceFn,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function buildAdapterValidationConfig(displayName, paramsMeta) {
|
|
69
|
+
const required = paramsMeta.filter(p => p.required).map(p => p.name);
|
|
70
|
+
const optional = paramsMeta.filter(p => !p.required).map(p => p.name);
|
|
71
|
+
return {
|
|
72
|
+
displayName,
|
|
73
|
+
parameters: {
|
|
74
|
+
required,
|
|
75
|
+
optional,
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
}
|
|
61
79
|
const keyPrefix = 'named-credential';
|
|
62
80
|
|
|
63
81
|
const { isArray: ArrayIsArray } = Array;
|
|
@@ -118,14 +136,13 @@ function createResourceRequest$2(config) {
|
|
|
118
136
|
};
|
|
119
137
|
}
|
|
120
138
|
|
|
121
|
-
const adapterName = 'deleteCredential';
|
|
122
|
-
const
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
};
|
|
139
|
+
const adapterName$2 = 'deleteCredential';
|
|
140
|
+
const deleteCredential_ConfigPropertyMetadata = [
|
|
141
|
+
generateParamConfigMetadata('externalCredential', false),
|
|
142
|
+
generateParamConfigMetadata('principalName', false),
|
|
143
|
+
generateParamConfigMetadata('principalType', false),
|
|
144
|
+
];
|
|
145
|
+
const deleteCredential_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, deleteCredential_ConfigPropertyMetadata);
|
|
129
146
|
function createResourceParams$2(config) {
|
|
130
147
|
const resourceParams = {
|
|
131
148
|
queryParams: {
|
|
@@ -179,7 +196,7 @@ const deleteCredentialAdapterFactory = (luvio) => {
|
|
|
179
196
|
const config = validateAdapterConfig$2(untrustedConfig, deleteCredential_ConfigPropertyNames);
|
|
180
197
|
// Invalid or incomplete config
|
|
181
198
|
if (config === null) {
|
|
182
|
-
throw new Error(`Invalid config for "${adapterName}"`);
|
|
199
|
+
throw new Error(`Invalid config for "${adapterName$2}"`);
|
|
183
200
|
}
|
|
184
201
|
return buildNetworkSnapshot$2(luvio, config);
|
|
185
202
|
};
|
|
@@ -461,26 +478,8 @@ const ingest$2 = function ExternalCredentialRepresentationIngest(input, path, lu
|
|
|
461
478
|
}
|
|
462
479
|
}
|
|
463
480
|
const key = keyBuilderFromType$1(luvio, input);
|
|
464
|
-
const existingRecord = store.readEntry(key);
|
|
465
481
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 300000;
|
|
466
|
-
|
|
467
|
-
fullPath: key,
|
|
468
|
-
parent: path.parent,
|
|
469
|
-
propertyName: path.propertyName,
|
|
470
|
-
ttl: ttlToUse
|
|
471
|
-
});
|
|
472
|
-
if (existingRecord === undefined || equals$2(existingRecord, incomingRecord) === false) {
|
|
473
|
-
luvio.storePublish(key, incomingRecord);
|
|
474
|
-
}
|
|
475
|
-
if (ttlToUse !== undefined) {
|
|
476
|
-
const storeMetadataParams = {
|
|
477
|
-
ttl: ttlToUse,
|
|
478
|
-
namespace: "named-credential",
|
|
479
|
-
version: VERSION$2,
|
|
480
|
-
representationName: RepresentationType$2,
|
|
481
|
-
};
|
|
482
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
483
|
-
}
|
|
482
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "named-credential", VERSION$2, RepresentationType$2, equals$2);
|
|
484
483
|
return createLink(key);
|
|
485
484
|
};
|
|
486
485
|
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -530,7 +529,7 @@ function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
|
530
529
|
existing: existing,
|
|
531
530
|
},
|
|
532
531
|
ttl: path.ttl
|
|
533
|
-
}, luvio, store);
|
|
532
|
+
}, luvio, store, timestamp);
|
|
534
533
|
}
|
|
535
534
|
return input;
|
|
536
535
|
}
|
|
@@ -570,26 +569,8 @@ const ingest$1 = function ExternalCredentialListRepresentationIngest(input, path
|
|
|
570
569
|
}
|
|
571
570
|
}
|
|
572
571
|
const key = path.fullPath;
|
|
573
|
-
const existingRecord = store.readEntry(key);
|
|
574
572
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 300000;
|
|
575
|
-
|
|
576
|
-
fullPath: key,
|
|
577
|
-
parent: path.parent,
|
|
578
|
-
propertyName: path.propertyName,
|
|
579
|
-
ttl: ttlToUse
|
|
580
|
-
}, luvio, store);
|
|
581
|
-
if (existingRecord === undefined || equals$1(existingRecord, incomingRecord) === false) {
|
|
582
|
-
luvio.storePublish(key, incomingRecord);
|
|
583
|
-
}
|
|
584
|
-
if (ttlToUse !== undefined) {
|
|
585
|
-
const storeMetadataParams = {
|
|
586
|
-
ttl: ttlToUse,
|
|
587
|
-
namespace: "named-credential",
|
|
588
|
-
version: VERSION$1,
|
|
589
|
-
representationName: RepresentationType$1,
|
|
590
|
-
};
|
|
591
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
592
|
-
}
|
|
573
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "named-credential", VERSION$1, RepresentationType$1, equals$1);
|
|
593
574
|
return createLink(key);
|
|
594
575
|
};
|
|
595
576
|
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -652,13 +633,9 @@ function createResourceRequest$1(config) {
|
|
|
652
633
|
};
|
|
653
634
|
}
|
|
654
635
|
|
|
655
|
-
const
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
required: [],
|
|
659
|
-
optional: []
|
|
660
|
-
}
|
|
661
|
-
};
|
|
636
|
+
const adapterName$1 = 'getExternalCredentials';
|
|
637
|
+
const getExternalCredentials_ConfigPropertyMetadata = [];
|
|
638
|
+
const getExternalCredentials_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getExternalCredentials_ConfigPropertyMetadata);
|
|
662
639
|
function createResourceParams$1(config) {
|
|
663
640
|
const resourceParams = {};
|
|
664
641
|
return resourceParams;
|
|
@@ -715,21 +692,7 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
715
692
|
});
|
|
716
693
|
}
|
|
717
694
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
718
|
-
|
|
719
|
-
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
720
|
-
const dispatchOptions = {
|
|
721
|
-
resourceRequestContext: {
|
|
722
|
-
requestCorrelator,
|
|
723
|
-
luvioRequestMethod: undefined,
|
|
724
|
-
},
|
|
725
|
-
eventObservers
|
|
726
|
-
};
|
|
727
|
-
if (networkPriority !== 'normal') {
|
|
728
|
-
dispatchOptions.overrides = {
|
|
729
|
-
priority: networkPriority
|
|
730
|
-
};
|
|
731
|
-
}
|
|
732
|
-
return buildNetworkSnapshot$1(luvio, config, dispatchOptions);
|
|
695
|
+
return buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
733
696
|
}
|
|
734
697
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
735
698
|
const { luvio, config } = context;
|
|
@@ -881,26 +844,8 @@ const ingest = function OAuthCredentialAuthUrlRepresentationIngest(input, path,
|
|
|
881
844
|
}
|
|
882
845
|
}
|
|
883
846
|
const key = keyBuilderFromType(luvio, input);
|
|
884
|
-
const existingRecord = store.readEntry(key);
|
|
885
847
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 300000;
|
|
886
|
-
|
|
887
|
-
fullPath: key,
|
|
888
|
-
parent: path.parent,
|
|
889
|
-
propertyName: path.propertyName,
|
|
890
|
-
ttl: ttlToUse
|
|
891
|
-
});
|
|
892
|
-
if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
|
|
893
|
-
luvio.storePublish(key, incomingRecord);
|
|
894
|
-
}
|
|
895
|
-
if (ttlToUse !== undefined) {
|
|
896
|
-
const storeMetadataParams = {
|
|
897
|
-
ttl: ttlToUse,
|
|
898
|
-
namespace: "named-credential",
|
|
899
|
-
version: VERSION,
|
|
900
|
-
representationName: RepresentationType,
|
|
901
|
-
};
|
|
902
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
903
|
-
}
|
|
848
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "named-credential", VERSION, RepresentationType, equals);
|
|
904
849
|
return createLink(key);
|
|
905
850
|
};
|
|
906
851
|
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -950,13 +895,11 @@ function createResourceRequest(config) {
|
|
|
950
895
|
};
|
|
951
896
|
}
|
|
952
897
|
|
|
953
|
-
const
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
}
|
|
959
|
-
};
|
|
898
|
+
const adapterName = 'getOAuthCredentialAuthUrl';
|
|
899
|
+
const getOAuthCredentialAuthUrl_ConfigPropertyMetadata = [
|
|
900
|
+
generateParamConfigMetadata('requestBody', true),
|
|
901
|
+
];
|
|
902
|
+
const getOAuthCredentialAuthUrl_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getOAuthCredentialAuthUrl_ConfigPropertyMetadata);
|
|
960
903
|
function createResourceParams(config) {
|
|
961
904
|
const resourceParams = {
|
|
962
905
|
body: {
|
|
@@ -1030,7 +973,7 @@ function bindExportsTo(luvio) {
|
|
|
1030
973
|
return (config) => adapter(config).then(snapshot => snapshot.data);
|
|
1031
974
|
}
|
|
1032
975
|
return {
|
|
1033
|
-
deleteCredential: createLDSAdapter(luvio, adapterName, deleteCredentialAdapterFactory),
|
|
976
|
+
deleteCredential: createLDSAdapter(luvio, adapterName$2, deleteCredentialAdapterFactory),
|
|
1034
977
|
getExternalCredentials: createWireAdapterConstructor(luvio, getExternalCredentials_ldsAdapter, getExternalCredentialsMetadata),
|
|
1035
978
|
getOAuthCredentialAuthUrl: unwrapSnapshotData(getOAuthCredentialAuthUrlAdapterFactory),
|
|
1036
979
|
// Imperative GET Adapters
|
|
@@ -1047,4 +990,4 @@ withDefaultLuvio((luvio) => {
|
|
|
1047
990
|
});
|
|
1048
991
|
|
|
1049
992
|
export { deleteCredential, getExternalCredentials, getExternalCredentials_imperative, getOAuthCredentialAuthUrl };
|
|
1050
|
-
// version: 1.213.
|
|
993
|
+
// version: 1.213.1-79de10fe1
|