@salesforce/lds-adapters-sales-people-api 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.
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, deepFreeze, typeCheckArrayOfScalars, StoreKeyMap } from '@luvio/engine';
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1, typeCheckArrayOfScalars, 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 = 'people-api';
|
|
52
70
|
|
|
53
71
|
const { isArray: ArrayIsArray } = Array;
|
|
@@ -387,26 +405,8 @@ const ingest = function PeopleAPIResponseCollectionIngest(input, path, luvio, st
|
|
|
387
405
|
}
|
|
388
406
|
}
|
|
389
407
|
const key = path.fullPath;
|
|
390
|
-
const existingRecord = store.readEntry(key);
|
|
391
408
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 3600000;
|
|
392
|
-
|
|
393
|
-
fullPath: key,
|
|
394
|
-
parent: path.parent,
|
|
395
|
-
propertyName: path.propertyName,
|
|
396
|
-
ttl: ttlToUse
|
|
397
|
-
});
|
|
398
|
-
if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
|
|
399
|
-
luvio.storePublish(key, incomingRecord);
|
|
400
|
-
}
|
|
401
|
-
if (ttlToUse !== undefined) {
|
|
402
|
-
const storeMetadataParams = {
|
|
403
|
-
ttl: ttlToUse,
|
|
404
|
-
namespace: "people-api",
|
|
405
|
-
version: VERSION,
|
|
406
|
-
representationName: RepresentationType,
|
|
407
|
-
};
|
|
408
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
409
|
-
}
|
|
409
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "people-api", VERSION, RepresentationType, equals);
|
|
410
410
|
return createLink(key);
|
|
411
411
|
};
|
|
412
412
|
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -465,13 +465,11 @@ function createResourceRequest(config) {
|
|
|
465
465
|
};
|
|
466
466
|
}
|
|
467
467
|
|
|
468
|
-
const
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
}
|
|
474
|
-
};
|
|
468
|
+
const adapterName = 'getParsedSignatureData';
|
|
469
|
+
const getParsedSignatureData_ConfigPropertyMetadata = [
|
|
470
|
+
generateParamConfigMetadata('emailAddresses', false),
|
|
471
|
+
];
|
|
472
|
+
const getParsedSignatureData_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getParsedSignatureData_ConfigPropertyMetadata);
|
|
475
473
|
function createResourceParams(config) {
|
|
476
474
|
const resourceParams = {
|
|
477
475
|
queryParams: {
|
|
@@ -537,21 +535,7 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
537
535
|
});
|
|
538
536
|
}
|
|
539
537
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
540
|
-
|
|
541
|
-
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
542
|
-
const dispatchOptions = {
|
|
543
|
-
resourceRequestContext: {
|
|
544
|
-
requestCorrelator,
|
|
545
|
-
luvioRequestMethod: undefined,
|
|
546
|
-
},
|
|
547
|
-
eventObservers
|
|
548
|
-
};
|
|
549
|
-
if (networkPriority !== 'normal') {
|
|
550
|
-
dispatchOptions.overrides = {
|
|
551
|
-
priority: networkPriority
|
|
552
|
-
};
|
|
553
|
-
}
|
|
554
|
-
return buildNetworkSnapshot(luvio, config, dispatchOptions);
|
|
538
|
+
return buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
555
539
|
}
|
|
556
540
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
557
541
|
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 = "people-api";
|
|
@@ -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_getPeople_ResourceRequestConfig } from '../resources/getPeople';
|
|
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 { PeopleAPIResponseCollection as types_PeopleAPIResponseCollection_PeopleAPIResponseCollection } from '../types/PeopleAPIResponseCollection';
|
|
5
5
|
export declare const adapterName = "getParsedSignatureData";
|
|
6
|
+
export declare const getParsedSignatureData_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
|
|
6
7
|
export declare const getParsedSignatureData_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
7
8
|
export interface GetParsedSignatureDataConfig {
|
|
8
9
|
emailAddresses?: Array<string>;
|
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, deepFreeze, typeCheckArrayOfScalars, StoreKeyMap } from 'force/luvioEngine';
|
|
17
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1, typeCheckArrayOfScalars, StoreKeyMap } 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 = 'people-api';
|
|
62
80
|
|
|
63
81
|
const { isArray: ArrayIsArray } = Array;
|
|
@@ -397,26 +415,8 @@ const ingest = function PeopleAPIResponseCollectionIngest(input, path, luvio, st
|
|
|
397
415
|
}
|
|
398
416
|
}
|
|
399
417
|
const key = path.fullPath;
|
|
400
|
-
const existingRecord = store.readEntry(key);
|
|
401
418
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 3600000;
|
|
402
|
-
|
|
403
|
-
fullPath: key,
|
|
404
|
-
parent: path.parent,
|
|
405
|
-
propertyName: path.propertyName,
|
|
406
|
-
ttl: ttlToUse
|
|
407
|
-
});
|
|
408
|
-
if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
|
|
409
|
-
luvio.storePublish(key, incomingRecord);
|
|
410
|
-
}
|
|
411
|
-
if (ttlToUse !== undefined) {
|
|
412
|
-
const storeMetadataParams = {
|
|
413
|
-
ttl: ttlToUse,
|
|
414
|
-
namespace: "people-api",
|
|
415
|
-
version: VERSION,
|
|
416
|
-
representationName: RepresentationType,
|
|
417
|
-
};
|
|
418
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
419
|
-
}
|
|
419
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "people-api", VERSION, RepresentationType, equals);
|
|
420
420
|
return createLink(key);
|
|
421
421
|
};
|
|
422
422
|
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -475,13 +475,11 @@ function createResourceRequest(config) {
|
|
|
475
475
|
};
|
|
476
476
|
}
|
|
477
477
|
|
|
478
|
-
const
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
}
|
|
484
|
-
};
|
|
478
|
+
const adapterName = 'getParsedSignatureData';
|
|
479
|
+
const getParsedSignatureData_ConfigPropertyMetadata = [
|
|
480
|
+
generateParamConfigMetadata('emailAddresses', false),
|
|
481
|
+
];
|
|
482
|
+
const getParsedSignatureData_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getParsedSignatureData_ConfigPropertyMetadata);
|
|
485
483
|
function createResourceParams(config) {
|
|
486
484
|
const resourceParams = {
|
|
487
485
|
queryParams: {
|
|
@@ -547,21 +545,7 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
547
545
|
});
|
|
548
546
|
}
|
|
549
547
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
550
|
-
|
|
551
|
-
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
552
|
-
const dispatchOptions = {
|
|
553
|
-
resourceRequestContext: {
|
|
554
|
-
requestCorrelator,
|
|
555
|
-
luvioRequestMethod: undefined,
|
|
556
|
-
},
|
|
557
|
-
eventObservers
|
|
558
|
-
};
|
|
559
|
-
if (networkPriority !== 'normal') {
|
|
560
|
-
dispatchOptions.overrides = {
|
|
561
|
-
priority: networkPriority
|
|
562
|
-
};
|
|
563
|
-
}
|
|
564
|
-
return buildNetworkSnapshot(luvio, config, dispatchOptions);
|
|
548
|
+
return buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
565
549
|
}
|
|
566
550
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
567
551
|
const { luvio, config } = context;
|
|
@@ -608,4 +592,4 @@ withDefaultLuvio((luvio) => {
|
|
|
608
592
|
});
|
|
609
593
|
|
|
610
594
|
export { getParsedSignatureData, getParsedSignatureData_imperative };
|
|
611
|
-
// version: 1.213.
|
|
595
|
+
// version: 1.213.1-79de10fe1
|