@salesforce/lds-adapters-industries-externaldocument 1.213.0 → 1.213.2
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/industries-externaldocument.js +47 -135
- package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +3 -1
- package/dist/es/es2018/types/src/generated/adapters/createExternalDocument.d.ts +3 -2
- package/dist/es/es2018/types/src/generated/adapters/getExternalDocument.d.ts +3 -2
- package/dist/es/es2018/types/src/generated/adapters/getExternalDocumentUsers.d.ts +3 -2
- package/dist/es/es2018/types/src/generated/adapters/saveExternalDocument.d.ts +3 -2
- package/package.json +1 -1
- package/sfdc/index.js +48 -136
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, deepFreeze, typeCheckScalars, StoreKeyMap } from '@luvio/engine';
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2, typeCheckScalars, StoreKeyMap } 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 = 'ExternalDocument';
|
|
52
70
|
|
|
53
71
|
const { isArray: ArrayIsArray } = Array;
|
|
@@ -124,26 +142,8 @@ const ingest$3 = function ExternalDocumentOutputRepresentationIngest(input, path
|
|
|
124
142
|
}
|
|
125
143
|
}
|
|
126
144
|
const key = path.fullPath;
|
|
127
|
-
const existingRecord = store.readEntry(key);
|
|
128
145
|
const ttlToUse = TTL$3;
|
|
129
|
-
|
|
130
|
-
fullPath: key,
|
|
131
|
-
parent: path.parent,
|
|
132
|
-
propertyName: path.propertyName,
|
|
133
|
-
ttl: ttlToUse
|
|
134
|
-
});
|
|
135
|
-
if (existingRecord === undefined || equals$3(existingRecord, incomingRecord) === false) {
|
|
136
|
-
luvio.storePublish(key, incomingRecord);
|
|
137
|
-
}
|
|
138
|
-
{
|
|
139
|
-
const storeMetadataParams = {
|
|
140
|
-
ttl: ttlToUse,
|
|
141
|
-
namespace: "ExternalDocument",
|
|
142
|
-
version: VERSION$3,
|
|
143
|
-
representationName: RepresentationType$3,
|
|
144
|
-
};
|
|
145
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
146
|
-
}
|
|
146
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "ExternalDocument", VERSION$3, RepresentationType$3, equals$3);
|
|
147
147
|
return createLink(key);
|
|
148
148
|
};
|
|
149
149
|
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -208,13 +208,12 @@ function createResourceRequest$3(config) {
|
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
-
const
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
};
|
|
211
|
+
const adapterName$3 = 'getExternalDocument';
|
|
212
|
+
const getExternalDocument_ConfigPropertyMetadata = [
|
|
213
|
+
generateParamConfigMetadata('externalDocumentId', false),
|
|
214
|
+
generateParamConfigMetadata('refObjectId', false),
|
|
215
|
+
];
|
|
216
|
+
const getExternalDocument_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getExternalDocument_ConfigPropertyMetadata);
|
|
218
217
|
function createResourceParams$3(config) {
|
|
219
218
|
const resourceParams = {
|
|
220
219
|
queryParams: {
|
|
@@ -281,21 +280,7 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
281
280
|
});
|
|
282
281
|
}
|
|
283
282
|
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
284
|
-
|
|
285
|
-
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
286
|
-
const dispatchOptions = {
|
|
287
|
-
resourceRequestContext: {
|
|
288
|
-
requestCorrelator,
|
|
289
|
-
luvioRequestMethod: undefined,
|
|
290
|
-
},
|
|
291
|
-
eventObservers
|
|
292
|
-
};
|
|
293
|
-
if (networkPriority !== 'normal') {
|
|
294
|
-
dispatchOptions.overrides = {
|
|
295
|
-
priority: networkPriority
|
|
296
|
-
};
|
|
297
|
-
}
|
|
298
|
-
return buildNetworkSnapshot$3(luvio, config, dispatchOptions);
|
|
283
|
+
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
299
284
|
}
|
|
300
285
|
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
301
286
|
const { luvio, config } = context;
|
|
@@ -414,26 +399,8 @@ const ingest$2 = function ExternalDocCreationOutputRepresentationIngest(input, p
|
|
|
414
399
|
}
|
|
415
400
|
}
|
|
416
401
|
const key = keyBuilderFromType$1(luvio, input);
|
|
417
|
-
const existingRecord = store.readEntry(key);
|
|
418
402
|
const ttlToUse = TTL$2;
|
|
419
|
-
|
|
420
|
-
fullPath: key,
|
|
421
|
-
parent: path.parent,
|
|
422
|
-
propertyName: path.propertyName,
|
|
423
|
-
ttl: ttlToUse
|
|
424
|
-
});
|
|
425
|
-
if (existingRecord === undefined || equals$2(existingRecord, incomingRecord) === false) {
|
|
426
|
-
luvio.storePublish(key, incomingRecord);
|
|
427
|
-
}
|
|
428
|
-
{
|
|
429
|
-
const storeMetadataParams = {
|
|
430
|
-
ttl: ttlToUse,
|
|
431
|
-
namespace: "ExternalDocument",
|
|
432
|
-
version: VERSION$2,
|
|
433
|
-
representationName: RepresentationType$2,
|
|
434
|
-
};
|
|
435
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
436
|
-
}
|
|
403
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "ExternalDocument", VERSION$2, RepresentationType$2, equals$2);
|
|
437
404
|
return createLink(key);
|
|
438
405
|
};
|
|
439
406
|
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -483,13 +450,11 @@ function createResourceRequest$2(config) {
|
|
|
483
450
|
};
|
|
484
451
|
}
|
|
485
452
|
|
|
486
|
-
const
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
}
|
|
492
|
-
};
|
|
453
|
+
const adapterName$2 = 'createExternalDocument';
|
|
454
|
+
const createExternalDocument_ConfigPropertyMetadata = [
|
|
455
|
+
generateParamConfigMetadata('createExternalDocumentInput', true),
|
|
456
|
+
];
|
|
457
|
+
const createExternalDocument_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, createExternalDocument_ConfigPropertyMetadata);
|
|
493
458
|
function createResourceParams$2(config) {
|
|
494
459
|
const resourceParams = {
|
|
495
460
|
body: {
|
|
@@ -635,26 +600,8 @@ const ingest$1 = function SaveExternalDocumentRepresentationIngest(input, path,
|
|
|
635
600
|
}
|
|
636
601
|
}
|
|
637
602
|
const key = keyBuilderFromType(luvio, input);
|
|
638
|
-
const existingRecord = store.readEntry(key);
|
|
639
603
|
const ttlToUse = TTL$1;
|
|
640
|
-
|
|
641
|
-
fullPath: key,
|
|
642
|
-
parent: path.parent,
|
|
643
|
-
propertyName: path.propertyName,
|
|
644
|
-
ttl: ttlToUse
|
|
645
|
-
});
|
|
646
|
-
if (existingRecord === undefined || equals$1(existingRecord, incomingRecord) === false) {
|
|
647
|
-
luvio.storePublish(key, incomingRecord);
|
|
648
|
-
}
|
|
649
|
-
{
|
|
650
|
-
const storeMetadataParams = {
|
|
651
|
-
ttl: ttlToUse,
|
|
652
|
-
namespace: "ExternalDocument",
|
|
653
|
-
version: VERSION$1,
|
|
654
|
-
representationName: RepresentationType$1,
|
|
655
|
-
};
|
|
656
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
657
|
-
}
|
|
604
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "ExternalDocument", VERSION$1, RepresentationType$1, equals$1);
|
|
658
605
|
return createLink(key);
|
|
659
606
|
};
|
|
660
607
|
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -704,13 +651,11 @@ function createResourceRequest$1(config) {
|
|
|
704
651
|
};
|
|
705
652
|
}
|
|
706
653
|
|
|
707
|
-
const
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
}
|
|
713
|
-
};
|
|
654
|
+
const adapterName$1 = 'saveExternalDocument';
|
|
655
|
+
const saveExternalDocument_ConfigPropertyMetadata = [
|
|
656
|
+
generateParamConfigMetadata('saveExternalDocumentInput', true),
|
|
657
|
+
];
|
|
658
|
+
const saveExternalDocument_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, saveExternalDocument_ConfigPropertyMetadata);
|
|
714
659
|
function createResourceParams$1(config) {
|
|
715
660
|
const resourceParams = {
|
|
716
661
|
body: {
|
|
@@ -859,26 +804,8 @@ const ingest = function ExternalDocumentUsersListOutputRepresentationIngest(inpu
|
|
|
859
804
|
}
|
|
860
805
|
}
|
|
861
806
|
const key = path.fullPath;
|
|
862
|
-
const existingRecord = store.readEntry(key);
|
|
863
807
|
const ttlToUse = TTL;
|
|
864
|
-
|
|
865
|
-
fullPath: key,
|
|
866
|
-
parent: path.parent,
|
|
867
|
-
propertyName: path.propertyName,
|
|
868
|
-
ttl: ttlToUse
|
|
869
|
-
});
|
|
870
|
-
if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
|
|
871
|
-
luvio.storePublish(key, incomingRecord);
|
|
872
|
-
}
|
|
873
|
-
{
|
|
874
|
-
const storeMetadataParams = {
|
|
875
|
-
ttl: ttlToUse,
|
|
876
|
-
namespace: "ExternalDocument",
|
|
877
|
-
version: VERSION,
|
|
878
|
-
representationName: RepresentationType,
|
|
879
|
-
};
|
|
880
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
881
|
-
}
|
|
808
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "ExternalDocument", VERSION, RepresentationType, equals);
|
|
882
809
|
return createLink(key);
|
|
883
810
|
};
|
|
884
811
|
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -943,13 +870,12 @@ function createResourceRequest(config) {
|
|
|
943
870
|
};
|
|
944
871
|
}
|
|
945
872
|
|
|
946
|
-
const
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
};
|
|
873
|
+
const adapterName = 'getExternalDocumentUsers';
|
|
874
|
+
const getExternalDocumentUsers_ConfigPropertyMetadata = [
|
|
875
|
+
generateParamConfigMetadata('externalDocumentId', false),
|
|
876
|
+
generateParamConfigMetadata('startsWith', false),
|
|
877
|
+
];
|
|
878
|
+
const getExternalDocumentUsers_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getExternalDocumentUsers_ConfigPropertyMetadata);
|
|
953
879
|
function createResourceParams(config) {
|
|
954
880
|
const resourceParams = {
|
|
955
881
|
queryParams: {
|
|
@@ -1016,21 +942,7 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
1016
942
|
});
|
|
1017
943
|
}
|
|
1018
944
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
1019
|
-
|
|
1020
|
-
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
1021
|
-
const dispatchOptions = {
|
|
1022
|
-
resourceRequestContext: {
|
|
1023
|
-
requestCorrelator,
|
|
1024
|
-
luvioRequestMethod: undefined,
|
|
1025
|
-
},
|
|
1026
|
-
eventObservers
|
|
1027
|
-
};
|
|
1028
|
-
if (networkPriority !== 'normal') {
|
|
1029
|
-
dispatchOptions.overrides = {
|
|
1030
|
-
priority: networkPriority
|
|
1031
|
-
};
|
|
1032
|
-
}
|
|
1033
|
-
return buildNetworkSnapshot(luvio, config, dispatchOptions);
|
|
945
|
+
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
1034
946
|
}
|
|
1035
947
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
1036
948
|
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 = "ExternalDocument";
|
|
@@ -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 { ExternalDocCreationInputRepresentation as types_ExternalDocCreationInputRepresentation_ExternalDocCreationInputRepresentation } from '../types/ExternalDocCreationInputRepresentation';
|
|
3
4
|
import { ResourceRequestConfig as resources_postConnectExternalDocument_ResourceRequestConfig } from '../resources/postConnectExternalDocument';
|
|
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 { ExternalDocCreationOutputRepresentation as types_ExternalDocCreationOutputRepresentation_ExternalDocCreationOutputRepresentation } from '../types/ExternalDocCreationOutputRepresentation';
|
|
6
6
|
export declare const adapterName = "createExternalDocument";
|
|
7
|
+
export declare const createExternalDocument_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
|
|
7
8
|
export declare const createExternalDocument_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
8
9
|
export interface CreateExternalDocumentConfig {
|
|
9
10
|
createExternalDocumentInput: types_ExternalDocCreationInputRepresentation_ExternalDocCreationInputRepresentation;
|
|
@@ -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_getConnectExternalDocument_ResourceRequestConfig } from '../resources/getConnectExternalDocument';
|
|
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 { ExternalDocumentOutputRepresentation as types_ExternalDocumentOutputRepresentation_ExternalDocumentOutputRepresentation } from '../types/ExternalDocumentOutputRepresentation';
|
|
5
5
|
export declare const adapterName = "getExternalDocument";
|
|
6
|
+
export declare const getExternalDocument_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
|
|
6
7
|
export declare const getExternalDocument_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
7
8
|
export interface GetExternalDocumentConfig {
|
|
8
9
|
externalDocumentId?: 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_getConnectExternalDocumentUsers_ResourceRequestConfig } from '../resources/getConnectExternalDocumentUsers';
|
|
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 { ExternalDocumentUsersListOutputRepresentation as types_ExternalDocumentUsersListOutputRepresentation_ExternalDocumentUsersListOutputRepresentation } from '../types/ExternalDocumentUsersListOutputRepresentation';
|
|
5
5
|
export declare const adapterName = "getExternalDocumentUsers";
|
|
6
|
+
export declare const getExternalDocumentUsers_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
|
|
6
7
|
export declare const getExternalDocumentUsers_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
7
8
|
export interface GetExternalDocumentUsersConfig {
|
|
8
9
|
externalDocumentId?: string;
|
|
@@ -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 { SaveExternalDocumentInputRepresentation as types_SaveExternalDocumentInputRepresentation_SaveExternalDocumentInputRepresentation } from '../types/SaveExternalDocumentInputRepresentation';
|
|
3
4
|
import { ResourceRequestConfig as resources_putConnectExternalDocumentSave_ResourceRequestConfig } from '../resources/putConnectExternalDocumentSave';
|
|
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 { SaveExternalDocumentRepresentation as types_SaveExternalDocumentRepresentation_SaveExternalDocumentRepresentation } from '../types/SaveExternalDocumentRepresentation';
|
|
6
6
|
export declare const adapterName = "saveExternalDocument";
|
|
7
|
+
export declare const saveExternalDocument_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
|
|
7
8
|
export declare const saveExternalDocument_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
8
9
|
export interface SaveExternalDocumentConfig {
|
|
9
10
|
saveExternalDocumentInput: types_SaveExternalDocumentInputRepresentation_SaveExternalDocumentInputRepresentation;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-industries-externaldocument",
|
|
3
|
-
"version": "1.213.
|
|
3
|
+
"version": "1.213.2",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "This External Document API family will allow to create, edit or read the information about the document which is present in the external editor outside Salesforce. ",
|
|
6
6
|
"main": "dist/es/es2018/industries-externaldocument.js",
|
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, deepFreeze, StoreKeyMap, typeCheckScalars } from 'force/luvioEngine';
|
|
17
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2, typeCheckScalars } 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 = 'ExternalDocument';
|
|
62
80
|
|
|
63
81
|
const { isArray: ArrayIsArray } = Array;
|
|
@@ -162,26 +180,8 @@ const ingest$3 = function ExternalDocCreationOutputRepresentationIngest(input, p
|
|
|
162
180
|
}
|
|
163
181
|
}
|
|
164
182
|
const key = keyBuilderFromType$1(luvio, input);
|
|
165
|
-
const existingRecord = store.readEntry(key);
|
|
166
183
|
const ttlToUse = TTL$3;
|
|
167
|
-
|
|
168
|
-
fullPath: key,
|
|
169
|
-
parent: path.parent,
|
|
170
|
-
propertyName: path.propertyName,
|
|
171
|
-
ttl: ttlToUse
|
|
172
|
-
});
|
|
173
|
-
if (existingRecord === undefined || equals$3(existingRecord, incomingRecord) === false) {
|
|
174
|
-
luvio.storePublish(key, incomingRecord);
|
|
175
|
-
}
|
|
176
|
-
{
|
|
177
|
-
const storeMetadataParams = {
|
|
178
|
-
ttl: ttlToUse,
|
|
179
|
-
namespace: "ExternalDocument",
|
|
180
|
-
version: VERSION$3,
|
|
181
|
-
representationName: RepresentationType$3,
|
|
182
|
-
};
|
|
183
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
184
|
-
}
|
|
184
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "ExternalDocument", VERSION$3, RepresentationType$3, equals$3);
|
|
185
185
|
return createLink(key);
|
|
186
186
|
};
|
|
187
187
|
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -231,13 +231,11 @@ function createResourceRequest$3(config) {
|
|
|
231
231
|
};
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
const
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
}
|
|
240
|
-
};
|
|
234
|
+
const adapterName$3 = 'createExternalDocument';
|
|
235
|
+
const createExternalDocument_ConfigPropertyMetadata = [
|
|
236
|
+
generateParamConfigMetadata('createExternalDocumentInput', true),
|
|
237
|
+
];
|
|
238
|
+
const createExternalDocument_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, createExternalDocument_ConfigPropertyMetadata);
|
|
241
239
|
function createResourceParams$3(config) {
|
|
242
240
|
const resourceParams = {
|
|
243
241
|
body: {
|
|
@@ -363,26 +361,8 @@ const ingest$2 = function ExternalDocumentOutputRepresentationIngest(input, path
|
|
|
363
361
|
}
|
|
364
362
|
}
|
|
365
363
|
const key = path.fullPath;
|
|
366
|
-
const existingRecord = store.readEntry(key);
|
|
367
364
|
const ttlToUse = TTL$2;
|
|
368
|
-
|
|
369
|
-
fullPath: key,
|
|
370
|
-
parent: path.parent,
|
|
371
|
-
propertyName: path.propertyName,
|
|
372
|
-
ttl: ttlToUse
|
|
373
|
-
});
|
|
374
|
-
if (existingRecord === undefined || equals$2(existingRecord, incomingRecord) === false) {
|
|
375
|
-
luvio.storePublish(key, incomingRecord);
|
|
376
|
-
}
|
|
377
|
-
{
|
|
378
|
-
const storeMetadataParams = {
|
|
379
|
-
ttl: ttlToUse,
|
|
380
|
-
namespace: "ExternalDocument",
|
|
381
|
-
version: VERSION$2,
|
|
382
|
-
representationName: RepresentationType$2,
|
|
383
|
-
};
|
|
384
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
385
|
-
}
|
|
365
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "ExternalDocument", VERSION$2, RepresentationType$2, equals$2);
|
|
386
366
|
return createLink(key);
|
|
387
367
|
};
|
|
388
368
|
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -447,13 +427,12 @@ function createResourceRequest$2(config) {
|
|
|
447
427
|
};
|
|
448
428
|
}
|
|
449
429
|
|
|
450
|
-
const
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
};
|
|
430
|
+
const adapterName$2 = 'getExternalDocument';
|
|
431
|
+
const getExternalDocument_ConfigPropertyMetadata = [
|
|
432
|
+
generateParamConfigMetadata('externalDocumentId', false),
|
|
433
|
+
generateParamConfigMetadata('refObjectId', false),
|
|
434
|
+
];
|
|
435
|
+
const getExternalDocument_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getExternalDocument_ConfigPropertyMetadata);
|
|
457
436
|
function createResourceParams$2(config) {
|
|
458
437
|
const resourceParams = {
|
|
459
438
|
queryParams: {
|
|
@@ -520,21 +499,7 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
520
499
|
});
|
|
521
500
|
}
|
|
522
501
|
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
523
|
-
|
|
524
|
-
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
525
|
-
const dispatchOptions = {
|
|
526
|
-
resourceRequestContext: {
|
|
527
|
-
requestCorrelator,
|
|
528
|
-
luvioRequestMethod: undefined,
|
|
529
|
-
},
|
|
530
|
-
eventObservers
|
|
531
|
-
};
|
|
532
|
-
if (networkPriority !== 'normal') {
|
|
533
|
-
dispatchOptions.overrides = {
|
|
534
|
-
priority: networkPriority
|
|
535
|
-
};
|
|
536
|
-
}
|
|
537
|
-
return buildNetworkSnapshot$2(luvio, config, dispatchOptions);
|
|
502
|
+
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
538
503
|
}
|
|
539
504
|
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
540
505
|
const { luvio, config } = context;
|
|
@@ -648,26 +613,8 @@ const ingest$1 = function ExternalDocumentUsersListOutputRepresentationIngest(in
|
|
|
648
613
|
}
|
|
649
614
|
}
|
|
650
615
|
const key = path.fullPath;
|
|
651
|
-
const existingRecord = store.readEntry(key);
|
|
652
616
|
const ttlToUse = TTL$1;
|
|
653
|
-
|
|
654
|
-
fullPath: key,
|
|
655
|
-
parent: path.parent,
|
|
656
|
-
propertyName: path.propertyName,
|
|
657
|
-
ttl: ttlToUse
|
|
658
|
-
});
|
|
659
|
-
if (existingRecord === undefined || equals$1(existingRecord, incomingRecord) === false) {
|
|
660
|
-
luvio.storePublish(key, incomingRecord);
|
|
661
|
-
}
|
|
662
|
-
{
|
|
663
|
-
const storeMetadataParams = {
|
|
664
|
-
ttl: ttlToUse,
|
|
665
|
-
namespace: "ExternalDocument",
|
|
666
|
-
version: VERSION$1,
|
|
667
|
-
representationName: RepresentationType$1,
|
|
668
|
-
};
|
|
669
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
670
|
-
}
|
|
617
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "ExternalDocument", VERSION$1, RepresentationType$1, equals$1);
|
|
671
618
|
return createLink(key);
|
|
672
619
|
};
|
|
673
620
|
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -732,13 +679,12 @@ function createResourceRequest$1(config) {
|
|
|
732
679
|
};
|
|
733
680
|
}
|
|
734
681
|
|
|
735
|
-
const
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
};
|
|
682
|
+
const adapterName$1 = 'getExternalDocumentUsers';
|
|
683
|
+
const getExternalDocumentUsers_ConfigPropertyMetadata = [
|
|
684
|
+
generateParamConfigMetadata('externalDocumentId', false),
|
|
685
|
+
generateParamConfigMetadata('startsWith', false),
|
|
686
|
+
];
|
|
687
|
+
const getExternalDocumentUsers_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getExternalDocumentUsers_ConfigPropertyMetadata);
|
|
742
688
|
function createResourceParams$1(config) {
|
|
743
689
|
const resourceParams = {
|
|
744
690
|
queryParams: {
|
|
@@ -805,21 +751,7 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
805
751
|
});
|
|
806
752
|
}
|
|
807
753
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
808
|
-
|
|
809
|
-
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
810
|
-
const dispatchOptions = {
|
|
811
|
-
resourceRequestContext: {
|
|
812
|
-
requestCorrelator,
|
|
813
|
-
luvioRequestMethod: undefined,
|
|
814
|
-
},
|
|
815
|
-
eventObservers
|
|
816
|
-
};
|
|
817
|
-
if (networkPriority !== 'normal') {
|
|
818
|
-
dispatchOptions.overrides = {
|
|
819
|
-
priority: networkPriority
|
|
820
|
-
};
|
|
821
|
-
}
|
|
822
|
-
return buildNetworkSnapshot$1(luvio, config, dispatchOptions);
|
|
754
|
+
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
823
755
|
}
|
|
824
756
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
825
757
|
const { luvio, config } = context;
|
|
@@ -930,26 +862,8 @@ const ingest = function SaveExternalDocumentRepresentationIngest(input, path, lu
|
|
|
930
862
|
}
|
|
931
863
|
}
|
|
932
864
|
const key = keyBuilderFromType(luvio, input);
|
|
933
|
-
const existingRecord = store.readEntry(key);
|
|
934
865
|
const ttlToUse = TTL;
|
|
935
|
-
|
|
936
|
-
fullPath: key,
|
|
937
|
-
parent: path.parent,
|
|
938
|
-
propertyName: path.propertyName,
|
|
939
|
-
ttl: ttlToUse
|
|
940
|
-
});
|
|
941
|
-
if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
|
|
942
|
-
luvio.storePublish(key, incomingRecord);
|
|
943
|
-
}
|
|
944
|
-
{
|
|
945
|
-
const storeMetadataParams = {
|
|
946
|
-
ttl: ttlToUse,
|
|
947
|
-
namespace: "ExternalDocument",
|
|
948
|
-
version: VERSION,
|
|
949
|
-
representationName: RepresentationType,
|
|
950
|
-
};
|
|
951
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
952
|
-
}
|
|
866
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "ExternalDocument", VERSION, RepresentationType, equals);
|
|
953
867
|
return createLink(key);
|
|
954
868
|
};
|
|
955
869
|
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -999,13 +913,11 @@ function createResourceRequest(config) {
|
|
|
999
913
|
};
|
|
1000
914
|
}
|
|
1001
915
|
|
|
1002
|
-
const
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
}
|
|
1008
|
-
};
|
|
916
|
+
const adapterName = 'saveExternalDocument';
|
|
917
|
+
const saveExternalDocument_ConfigPropertyMetadata = [
|
|
918
|
+
generateParamConfigMetadata('saveExternalDocumentInput', true),
|
|
919
|
+
];
|
|
920
|
+
const saveExternalDocument_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, saveExternalDocument_ConfigPropertyMetadata);
|
|
1009
921
|
function createResourceParams(config) {
|
|
1010
922
|
const resourceParams = {
|
|
1011
923
|
body: {
|
|
@@ -1104,4 +1016,4 @@ withDefaultLuvio((luvio) => {
|
|
|
1104
1016
|
});
|
|
1105
1017
|
|
|
1106
1018
|
export { createExternalDocument, getExternalDocument, getExternalDocumentUsers, getExternalDocumentUsers_imperative, getExternalDocument_imperative, saveExternalDocument };
|
|
1107
|
-
// version: 1.213.
|
|
1019
|
+
// version: 1.213.2-1eb996209
|