@salesforce/lds-adapters-platform-flow-builder 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, typeCheckScalars, StoreKeyMap } from '@luvio/engine';
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1, 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 = 'flow-builder';
|
|
52
70
|
|
|
53
71
|
const { isArray: ArrayIsArray } = Array;
|
|
@@ -683,26 +701,8 @@ const ingest = function FlowOperatorRuleCollectionRepresentationIngest(input, pa
|
|
|
683
701
|
}
|
|
684
702
|
}
|
|
685
703
|
const key = path.fullPath;
|
|
686
|
-
const existingRecord = store.readEntry(key);
|
|
687
704
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
|
|
688
|
-
|
|
689
|
-
fullPath: key,
|
|
690
|
-
parent: path.parent,
|
|
691
|
-
propertyName: path.propertyName,
|
|
692
|
-
ttl: ttlToUse
|
|
693
|
-
});
|
|
694
|
-
if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
|
|
695
|
-
luvio.storePublish(key, incomingRecord);
|
|
696
|
-
}
|
|
697
|
-
if (ttlToUse !== undefined) {
|
|
698
|
-
const storeMetadataParams = {
|
|
699
|
-
ttl: ttlToUse,
|
|
700
|
-
namespace: "flow-builder",
|
|
701
|
-
version: VERSION,
|
|
702
|
-
representationName: RepresentationType,
|
|
703
|
-
};
|
|
704
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
705
|
-
}
|
|
705
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "flow-builder", VERSION, RepresentationType, equals);
|
|
706
706
|
return createLink(key);
|
|
707
707
|
};
|
|
708
708
|
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -761,13 +761,13 @@ function createResourceRequest(config) {
|
|
|
761
761
|
};
|
|
762
762
|
}
|
|
763
763
|
|
|
764
|
-
const
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
764
|
+
const adapterName = 'getRules';
|
|
765
|
+
const getRules_ConfigPropertyMetadata = [
|
|
766
|
+
generateParamConfigMetadata('flowProcessType', false),
|
|
767
|
+
generateParamConfigMetadata('flowTriggerType', false),
|
|
768
|
+
generateParamConfigMetadata('recordTriggerType', false),
|
|
769
|
+
];
|
|
770
|
+
const getRules_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getRules_ConfigPropertyMetadata);
|
|
771
771
|
function createResourceParams(config) {
|
|
772
772
|
const resourceParams = {
|
|
773
773
|
queryParams: {
|
|
@@ -835,21 +835,7 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
835
835
|
});
|
|
836
836
|
}
|
|
837
837
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
838
|
-
|
|
839
|
-
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
840
|
-
const dispatchOptions = {
|
|
841
|
-
resourceRequestContext: {
|
|
842
|
-
requestCorrelator,
|
|
843
|
-
luvioRequestMethod: undefined,
|
|
844
|
-
},
|
|
845
|
-
eventObservers
|
|
846
|
-
};
|
|
847
|
-
if (networkPriority !== 'normal') {
|
|
848
|
-
dispatchOptions.overrides = {
|
|
849
|
-
priority: networkPriority
|
|
850
|
-
};
|
|
851
|
-
}
|
|
852
|
-
return buildNetworkSnapshot(luvio, config, dispatchOptions);
|
|
838
|
+
return buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
853
839
|
}
|
|
854
840
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
855
841
|
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 = "flow-builder";
|
|
@@ -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_getConnectInteractionBuilderRules_ResourceRequestConfig } from '../resources/getConnectInteractionBuilderRules';
|
|
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 { FlowOperatorRuleCollectionRepresentation as types_FlowOperatorRuleCollectionRepresentation_FlowOperatorRuleCollectionRepresentation } from '../types/FlowOperatorRuleCollectionRepresentation';
|
|
5
5
|
export declare const adapterName = "getRules";
|
|
6
|
+
export declare const getRules_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
|
|
6
7
|
export declare const getRules_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
7
8
|
export interface GetRulesConfig {
|
|
8
9
|
flowProcessType?: 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, typeCheckScalars, StoreKeyMap } from 'force/luvioEngine';
|
|
17
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1, typeCheckScalars, 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 = 'flow-builder';
|
|
62
80
|
|
|
63
81
|
const { isArray: ArrayIsArray } = Array;
|
|
@@ -693,26 +711,8 @@ const ingest = function FlowOperatorRuleCollectionRepresentationIngest(input, pa
|
|
|
693
711
|
}
|
|
694
712
|
}
|
|
695
713
|
const key = path.fullPath;
|
|
696
|
-
const existingRecord = store.readEntry(key);
|
|
697
714
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
|
|
698
|
-
|
|
699
|
-
fullPath: key,
|
|
700
|
-
parent: path.parent,
|
|
701
|
-
propertyName: path.propertyName,
|
|
702
|
-
ttl: ttlToUse
|
|
703
|
-
});
|
|
704
|
-
if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
|
|
705
|
-
luvio.storePublish(key, incomingRecord);
|
|
706
|
-
}
|
|
707
|
-
if (ttlToUse !== undefined) {
|
|
708
|
-
const storeMetadataParams = {
|
|
709
|
-
ttl: ttlToUse,
|
|
710
|
-
namespace: "flow-builder",
|
|
711
|
-
version: VERSION,
|
|
712
|
-
representationName: RepresentationType,
|
|
713
|
-
};
|
|
714
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
715
|
-
}
|
|
715
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "flow-builder", VERSION, RepresentationType, equals);
|
|
716
716
|
return createLink(key);
|
|
717
717
|
};
|
|
718
718
|
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -771,13 +771,13 @@ function createResourceRequest(config) {
|
|
|
771
771
|
};
|
|
772
772
|
}
|
|
773
773
|
|
|
774
|
-
const
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
774
|
+
const adapterName = 'getRules';
|
|
775
|
+
const getRules_ConfigPropertyMetadata = [
|
|
776
|
+
generateParamConfigMetadata('flowProcessType', false),
|
|
777
|
+
generateParamConfigMetadata('flowTriggerType', false),
|
|
778
|
+
generateParamConfigMetadata('recordTriggerType', false),
|
|
779
|
+
];
|
|
780
|
+
const getRules_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getRules_ConfigPropertyMetadata);
|
|
781
781
|
function createResourceParams(config) {
|
|
782
782
|
const resourceParams = {
|
|
783
783
|
queryParams: {
|
|
@@ -845,21 +845,7 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
845
845
|
});
|
|
846
846
|
}
|
|
847
847
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
848
|
-
|
|
849
|
-
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
850
|
-
const dispatchOptions = {
|
|
851
|
-
resourceRequestContext: {
|
|
852
|
-
requestCorrelator,
|
|
853
|
-
luvioRequestMethod: undefined,
|
|
854
|
-
},
|
|
855
|
-
eventObservers
|
|
856
|
-
};
|
|
857
|
-
if (networkPriority !== 'normal') {
|
|
858
|
-
dispatchOptions.overrides = {
|
|
859
|
-
priority: networkPriority
|
|
860
|
-
};
|
|
861
|
-
}
|
|
862
|
-
return buildNetworkSnapshot(luvio, config, dispatchOptions);
|
|
848
|
+
return buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
863
849
|
}
|
|
864
850
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
865
851
|
const { luvio, config } = context;
|
|
@@ -906,4 +892,4 @@ withDefaultLuvio((luvio) => {
|
|
|
906
892
|
});
|
|
907
893
|
|
|
908
894
|
export { getRules, getRules_imperative };
|
|
909
|
-
// version: 1.213.
|
|
895
|
+
// version: 1.213.1-79de10fe1
|