@salesforce/lds-adapters-industries-eri 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, StoreKeyMap } from '@luvio/engine';
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -41,6 +41,24 @@ function untrustedIsObject(untrusted) {
|
|
|
41
41
|
function areRequiredParametersPresent(config, configPropertyNames) {
|
|
42
42
|
return configPropertyNames.parameters.required.every(req => req in config);
|
|
43
43
|
}
|
|
44
|
+
function generateParamConfigMetadata(name, required, coerceFn) {
|
|
45
|
+
return {
|
|
46
|
+
name,
|
|
47
|
+
required,
|
|
48
|
+
coerceFn,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function buildAdapterValidationConfig(displayName, paramsMeta) {
|
|
52
|
+
const required = paramsMeta.filter(p => p.required).map(p => p.name);
|
|
53
|
+
const optional = paramsMeta.filter(p => !p.required).map(p => p.name);
|
|
54
|
+
return {
|
|
55
|
+
displayName,
|
|
56
|
+
parameters: {
|
|
57
|
+
required,
|
|
58
|
+
optional,
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
}
|
|
44
62
|
const keyPrefix = 'eri';
|
|
45
63
|
|
|
46
64
|
const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
|
|
@@ -338,26 +356,8 @@ const ingest = function ERIDigestOutputRepresentationIngest(input, path, luvio,
|
|
|
338
356
|
}
|
|
339
357
|
}
|
|
340
358
|
const key = keyBuilderFromType(luvio, input);
|
|
341
|
-
const existingRecord = store.readEntry(key);
|
|
342
359
|
const ttlToUse = TTL;
|
|
343
|
-
|
|
344
|
-
fullPath: key,
|
|
345
|
-
parent: path.parent,
|
|
346
|
-
propertyName: path.propertyName,
|
|
347
|
-
ttl: ttlToUse
|
|
348
|
-
});
|
|
349
|
-
if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
|
|
350
|
-
luvio.storePublish(key, incomingRecord);
|
|
351
|
-
}
|
|
352
|
-
{
|
|
353
|
-
const storeMetadataParams = {
|
|
354
|
-
ttl: ttlToUse,
|
|
355
|
-
namespace: "eri",
|
|
356
|
-
version: VERSION,
|
|
357
|
-
representationName: RepresentationType,
|
|
358
|
-
};
|
|
359
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
360
|
-
}
|
|
360
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "eri", VERSION, RepresentationType, equals);
|
|
361
361
|
return createLink(key);
|
|
362
362
|
};
|
|
363
363
|
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -407,13 +407,11 @@ function createResourceRequest(config) {
|
|
|
407
407
|
};
|
|
408
408
|
}
|
|
409
409
|
|
|
410
|
-
const
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
}
|
|
416
|
-
};
|
|
410
|
+
const adapterName = 'getERIDigest';
|
|
411
|
+
const getERIDigest_ConfigPropertyMetadata = [
|
|
412
|
+
generateParamConfigMetadata('eriDigestInput', true),
|
|
413
|
+
];
|
|
414
|
+
const getERIDigest_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getERIDigest_ConfigPropertyMetadata);
|
|
417
415
|
function createResourceParams(config) {
|
|
418
416
|
const resourceParams = {
|
|
419
417
|
body: {
|
|
@@ -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 = "eri";
|
|
@@ -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 { ERIDigestInputRepresentation as types_ERIDigestInputRepresentation_ERIDigestInputRepresentation } from '../types/ERIDigestInputRepresentation';
|
|
3
4
|
import { ResourceRequestConfig as resources_postConnectEriDigest_ResourceRequestConfig } from '../resources/postConnectEriDigest';
|
|
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 { ERIDigestOutputRepresentation as types_ERIDigestOutputRepresentation_ERIDigestOutputRepresentation } from '../types/ERIDigestOutputRepresentation';
|
|
6
6
|
export declare const adapterName = "getERIDigest";
|
|
7
|
+
export declare const getERIDigest_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
|
|
7
8
|
export declare const getERIDigest_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
8
9
|
export interface GetERIDigestConfig {
|
|
9
10
|
eriDigestInput: types_ERIDigestInputRepresentation_ERIDigestInputRepresentation;
|
package/package.json
CHANGED
package/sfdc/index.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
15
|
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
16
|
-
import { serializeStructuredKey, deepFreeze, StoreKeyMap } from 'force/luvioEngine';
|
|
16
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap } from 'force/luvioEngine';
|
|
17
17
|
|
|
18
18
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
19
19
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -50,6 +50,24 @@ function untrustedIsObject(untrusted) {
|
|
|
50
50
|
function areRequiredParametersPresent(config, configPropertyNames) {
|
|
51
51
|
return configPropertyNames.parameters.required.every(req => req in config);
|
|
52
52
|
}
|
|
53
|
+
function generateParamConfigMetadata(name, required, coerceFn) {
|
|
54
|
+
return {
|
|
55
|
+
name,
|
|
56
|
+
required,
|
|
57
|
+
coerceFn,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function buildAdapterValidationConfig(displayName, paramsMeta) {
|
|
61
|
+
const required = paramsMeta.filter(p => p.required).map(p => p.name);
|
|
62
|
+
const optional = paramsMeta.filter(p => !p.required).map(p => p.name);
|
|
63
|
+
return {
|
|
64
|
+
displayName,
|
|
65
|
+
parameters: {
|
|
66
|
+
required,
|
|
67
|
+
optional,
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
}
|
|
53
71
|
const keyPrefix = 'eri';
|
|
54
72
|
|
|
55
73
|
const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
|
|
@@ -347,26 +365,8 @@ const ingest = function ERIDigestOutputRepresentationIngest(input, path, luvio,
|
|
|
347
365
|
}
|
|
348
366
|
}
|
|
349
367
|
const key = keyBuilderFromType(luvio, input);
|
|
350
|
-
const existingRecord = store.readEntry(key);
|
|
351
368
|
const ttlToUse = TTL;
|
|
352
|
-
|
|
353
|
-
fullPath: key,
|
|
354
|
-
parent: path.parent,
|
|
355
|
-
propertyName: path.propertyName,
|
|
356
|
-
ttl: ttlToUse
|
|
357
|
-
});
|
|
358
|
-
if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
|
|
359
|
-
luvio.storePublish(key, incomingRecord);
|
|
360
|
-
}
|
|
361
|
-
{
|
|
362
|
-
const storeMetadataParams = {
|
|
363
|
-
ttl: ttlToUse,
|
|
364
|
-
namespace: "eri",
|
|
365
|
-
version: VERSION,
|
|
366
|
-
representationName: RepresentationType,
|
|
367
|
-
};
|
|
368
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
369
|
-
}
|
|
369
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "eri", VERSION, RepresentationType, equals);
|
|
370
370
|
return createLink(key);
|
|
371
371
|
};
|
|
372
372
|
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -416,13 +416,11 @@ function createResourceRequest(config) {
|
|
|
416
416
|
};
|
|
417
417
|
}
|
|
418
418
|
|
|
419
|
-
const
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
}
|
|
425
|
-
};
|
|
419
|
+
const adapterName = 'getERIDigest';
|
|
420
|
+
const getERIDigest_ConfigPropertyMetadata = [
|
|
421
|
+
generateParamConfigMetadata('eriDigestInput', true),
|
|
422
|
+
];
|
|
423
|
+
const getERIDigest_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getERIDigest_ConfigPropertyMetadata);
|
|
426
424
|
function createResourceParams(config) {
|
|
427
425
|
const resourceParams = {
|
|
428
426
|
body: {
|
|
@@ -500,4 +498,4 @@ withDefaultLuvio((luvio) => {
|
|
|
500
498
|
});
|
|
501
499
|
|
|
502
500
|
export { getERIDigest };
|
|
503
|
-
// version: 1.213.
|
|
501
|
+
// version: 1.213.1-79de10fe1
|