@salesforce/lds-adapters-industries-featurevalidation 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.
|
@@ -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, create: ObjectCreate } = 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 = 'featurevalidation';
|
|
45
63
|
|
|
46
64
|
const { isArray: ArrayIsArray } = Array;
|
|
@@ -377,26 +395,8 @@ const ingest = function FeatureValidationOutputRepresentationIngest(input, path,
|
|
|
377
395
|
}
|
|
378
396
|
}
|
|
379
397
|
const key = keyBuilderFromType(luvio, input);
|
|
380
|
-
const existingRecord = store.readEntry(key);
|
|
381
398
|
const ttlToUse = TTL;
|
|
382
|
-
|
|
383
|
-
fullPath: key,
|
|
384
|
-
parent: path.parent,
|
|
385
|
-
propertyName: path.propertyName,
|
|
386
|
-
ttl: ttlToUse
|
|
387
|
-
});
|
|
388
|
-
if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
|
|
389
|
-
luvio.storePublish(key, incomingRecord);
|
|
390
|
-
}
|
|
391
|
-
{
|
|
392
|
-
const storeMetadataParams = {
|
|
393
|
-
ttl: ttlToUse,
|
|
394
|
-
namespace: "featurevalidation",
|
|
395
|
-
version: VERSION,
|
|
396
|
-
representationName: RepresentationType,
|
|
397
|
-
};
|
|
398
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
399
|
-
}
|
|
399
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "featurevalidation", VERSION, RepresentationType, equals);
|
|
400
400
|
return createLink(key);
|
|
401
401
|
};
|
|
402
402
|
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -446,13 +446,11 @@ function createResourceRequest(config) {
|
|
|
446
446
|
};
|
|
447
447
|
}
|
|
448
448
|
|
|
449
|
-
const
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
}
|
|
455
|
-
};
|
|
449
|
+
const adapterName = 'featureValidation';
|
|
450
|
+
const featureValidation_ConfigPropertyMetadata = [
|
|
451
|
+
generateParamConfigMetadata('FeatureValidationData', true),
|
|
452
|
+
];
|
|
453
|
+
const featureValidation_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, featureValidation_ConfigPropertyMetadata);
|
|
456
454
|
function createResourceParams(config) {
|
|
457
455
|
const resourceParams = {
|
|
458
456
|
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 = "featurevalidation";
|
|
@@ -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 { FeatureValidationInputRepresentation as types_FeatureValidationInputRepresentation_FeatureValidationInputRepresentation } from '../types/FeatureValidationInputRepresentation';
|
|
3
4
|
import { ResourceRequestConfig as resources_postConnectIndustriesFeatureValidation_ResourceRequestConfig } from '../resources/postConnectIndustriesFeatureValidation';
|
|
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 { FeatureValidationOutputRepresentation as types_FeatureValidationOutputRepresentation_FeatureValidationOutputRepresentation } from '../types/FeatureValidationOutputRepresentation';
|
|
6
6
|
export declare const adapterName = "featureValidation";
|
|
7
|
+
export declare const featureValidation_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
|
|
7
8
|
export declare const featureValidation_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
8
9
|
export interface FeatureValidationConfig {
|
|
9
10
|
FeatureValidationData: types_FeatureValidationInputRepresentation_FeatureValidationInputRepresentation;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-industries-featurevalidation",
|
|
3
|
-
"version": "1.213.
|
|
3
|
+
"version": "1.213.2",
|
|
4
4
|
"description": "Feature validation tool to debug setup issues.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "dist/umd/es2018/industries-featurevalidation.js",
|
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, create: ObjectCreate } = 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 = 'featurevalidation';
|
|
54
72
|
|
|
55
73
|
const { isArray: ArrayIsArray } = Array;
|
|
@@ -386,26 +404,8 @@ const ingest = function FeatureValidationOutputRepresentationIngest(input, path,
|
|
|
386
404
|
}
|
|
387
405
|
}
|
|
388
406
|
const key = keyBuilderFromType(luvio, input);
|
|
389
|
-
const existingRecord = store.readEntry(key);
|
|
390
407
|
const ttlToUse = TTL;
|
|
391
|
-
|
|
392
|
-
fullPath: key,
|
|
393
|
-
parent: path.parent,
|
|
394
|
-
propertyName: path.propertyName,
|
|
395
|
-
ttl: ttlToUse
|
|
396
|
-
});
|
|
397
|
-
if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
|
|
398
|
-
luvio.storePublish(key, incomingRecord);
|
|
399
|
-
}
|
|
400
|
-
{
|
|
401
|
-
const storeMetadataParams = {
|
|
402
|
-
ttl: ttlToUse,
|
|
403
|
-
namespace: "featurevalidation",
|
|
404
|
-
version: VERSION,
|
|
405
|
-
representationName: RepresentationType,
|
|
406
|
-
};
|
|
407
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
408
|
-
}
|
|
408
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "featurevalidation", VERSION, RepresentationType, equals);
|
|
409
409
|
return createLink(key);
|
|
410
410
|
};
|
|
411
411
|
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -455,13 +455,11 @@ function createResourceRequest(config) {
|
|
|
455
455
|
};
|
|
456
456
|
}
|
|
457
457
|
|
|
458
|
-
const
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
}
|
|
464
|
-
};
|
|
458
|
+
const adapterName = 'featureValidation';
|
|
459
|
+
const featureValidation_ConfigPropertyMetadata = [
|
|
460
|
+
generateParamConfigMetadata('FeatureValidationData', true),
|
|
461
|
+
];
|
|
462
|
+
const featureValidation_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, featureValidation_ConfigPropertyMetadata);
|
|
465
463
|
function createResourceParams(config) {
|
|
466
464
|
const resourceParams = {
|
|
467
465
|
body: {
|
|
@@ -539,4 +537,4 @@ withDefaultLuvio((luvio) => {
|
|
|
539
537
|
});
|
|
540
538
|
|
|
541
539
|
export { featureValidation };
|
|
542
|
-
// version: 1.213.
|
|
540
|
+
// version: 1.213.2-1eb996209
|