@salesforce/lds-adapters-platform-interaction-orchestrator 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 = 'InteractionOrchestrator';
|
|
52
70
|
|
|
53
71
|
const { isArray: ArrayIsArray } = Array;
|
|
@@ -887,26 +905,8 @@ const ingest = function FlowOrchestrationInstanceCollectionRepresentationIngest(
|
|
|
887
905
|
}
|
|
888
906
|
}
|
|
889
907
|
const key = path.fullPath;
|
|
890
|
-
const existingRecord = store.readEntry(key);
|
|
891
908
|
const ttlToUse = TTL;
|
|
892
|
-
|
|
893
|
-
fullPath: key,
|
|
894
|
-
parent: path.parent,
|
|
895
|
-
propertyName: path.propertyName,
|
|
896
|
-
ttl: ttlToUse
|
|
897
|
-
});
|
|
898
|
-
if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
|
|
899
|
-
luvio.storePublish(key, incomingRecord);
|
|
900
|
-
}
|
|
901
|
-
{
|
|
902
|
-
const storeMetadataParams = {
|
|
903
|
-
ttl: ttlToUse,
|
|
904
|
-
namespace: "InteractionOrchestrator",
|
|
905
|
-
version: VERSION,
|
|
906
|
-
representationName: RepresentationType,
|
|
907
|
-
};
|
|
908
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
909
|
-
}
|
|
909
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "InteractionOrchestrator", VERSION, RepresentationType, equals);
|
|
910
910
|
return createLink(key);
|
|
911
911
|
};
|
|
912
912
|
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -971,16 +971,15 @@ function createResourceRequest(config) {
|
|
|
971
971
|
};
|
|
972
972
|
}
|
|
973
973
|
|
|
974
|
+
const adapterName = 'getOrchestrationInstanceCollection';
|
|
974
975
|
const oneOfConfigPropertiesIdentifier = [
|
|
975
976
|
'relatedRecordId'
|
|
976
977
|
];
|
|
977
|
-
const
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
}
|
|
983
|
-
};
|
|
978
|
+
const getOrchestrationInstanceCollection_ConfigPropertyMetadata = [
|
|
979
|
+
generateParamConfigMetadata('contextRecordId', false),
|
|
980
|
+
generateParamConfigMetadata('relatedRecordId', false),
|
|
981
|
+
];
|
|
982
|
+
const getOrchestrationInstanceCollection_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getOrchestrationInstanceCollection_ConfigPropertyMetadata);
|
|
984
983
|
function createResourceParams(config) {
|
|
985
984
|
const resourceParams = {
|
|
986
985
|
queryParams: {
|
|
@@ -1050,21 +1049,7 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
1050
1049
|
});
|
|
1051
1050
|
}
|
|
1052
1051
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
1053
|
-
|
|
1054
|
-
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
1055
|
-
const dispatchOptions = {
|
|
1056
|
-
resourceRequestContext: {
|
|
1057
|
-
requestCorrelator,
|
|
1058
|
-
luvioRequestMethod: undefined,
|
|
1059
|
-
},
|
|
1060
|
-
eventObservers
|
|
1061
|
-
};
|
|
1062
|
-
if (networkPriority !== 'normal') {
|
|
1063
|
-
dispatchOptions.overrides = {
|
|
1064
|
-
priority: networkPriority
|
|
1065
|
-
};
|
|
1066
|
-
}
|
|
1067
|
-
return buildNetworkSnapshot(luvio, config, dispatchOptions);
|
|
1052
|
+
return buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
1068
1053
|
}
|
|
1069
1054
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
1070
1055
|
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 = "InteractionOrchestrator";
|
|
@@ -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_getConnectInteractionOrchestrationInstances_ResourceRequestConfig } from '../resources/getConnectInteractionOrchestrationInstances';
|
|
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 { FlowOrchestrationInstanceCollectionRepresentation as types_FlowOrchestrationInstanceCollectionRepresentation_FlowOrchestrationInstanceCollectionRepresentation } from '../types/FlowOrchestrationInstanceCollectionRepresentation';
|
|
5
5
|
export declare const adapterName = "getOrchestrationInstanceCollection";
|
|
6
|
+
export declare const getOrchestrationInstanceCollection_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
|
|
6
7
|
export declare const getOrchestrationInstanceCollection_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
7
8
|
export interface GetOrchestrationInstanceCollectionConfig {
|
|
8
9
|
contextRecordId?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-platform-interaction-orchestrator",
|
|
3
|
-
"version": "1.213.
|
|
3
|
+
"version": "1.213.1",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "Interaction Orchestrator APIs",
|
|
6
6
|
"main": "dist/es/es2018/platform-interaction-orchestrator.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, 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 = 'InteractionOrchestrator';
|
|
62
80
|
|
|
63
81
|
const { isArray: ArrayIsArray } = Array;
|
|
@@ -897,26 +915,8 @@ const ingest = function FlowOrchestrationInstanceCollectionRepresentationIngest(
|
|
|
897
915
|
}
|
|
898
916
|
}
|
|
899
917
|
const key = path.fullPath;
|
|
900
|
-
const existingRecord = store.readEntry(key);
|
|
901
918
|
const ttlToUse = TTL;
|
|
902
|
-
|
|
903
|
-
fullPath: key,
|
|
904
|
-
parent: path.parent,
|
|
905
|
-
propertyName: path.propertyName,
|
|
906
|
-
ttl: ttlToUse
|
|
907
|
-
});
|
|
908
|
-
if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
|
|
909
|
-
luvio.storePublish(key, incomingRecord);
|
|
910
|
-
}
|
|
911
|
-
{
|
|
912
|
-
const storeMetadataParams = {
|
|
913
|
-
ttl: ttlToUse,
|
|
914
|
-
namespace: "InteractionOrchestrator",
|
|
915
|
-
version: VERSION,
|
|
916
|
-
representationName: RepresentationType,
|
|
917
|
-
};
|
|
918
|
-
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
919
|
-
}
|
|
919
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "InteractionOrchestrator", VERSION, RepresentationType, equals);
|
|
920
920
|
return createLink(key);
|
|
921
921
|
};
|
|
922
922
|
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -981,16 +981,15 @@ function createResourceRequest(config) {
|
|
|
981
981
|
};
|
|
982
982
|
}
|
|
983
983
|
|
|
984
|
+
const adapterName = 'getOrchestrationInstanceCollection';
|
|
984
985
|
const oneOfConfigPropertiesIdentifier = [
|
|
985
986
|
'relatedRecordId'
|
|
986
987
|
];
|
|
987
|
-
const
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
}
|
|
993
|
-
};
|
|
988
|
+
const getOrchestrationInstanceCollection_ConfigPropertyMetadata = [
|
|
989
|
+
generateParamConfigMetadata('contextRecordId', false),
|
|
990
|
+
generateParamConfigMetadata('relatedRecordId', false),
|
|
991
|
+
];
|
|
992
|
+
const getOrchestrationInstanceCollection_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getOrchestrationInstanceCollection_ConfigPropertyMetadata);
|
|
994
993
|
function createResourceParams(config) {
|
|
995
994
|
const resourceParams = {
|
|
996
995
|
queryParams: {
|
|
@@ -1060,21 +1059,7 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
1060
1059
|
});
|
|
1061
1060
|
}
|
|
1062
1061
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
1063
|
-
|
|
1064
|
-
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
1065
|
-
const dispatchOptions = {
|
|
1066
|
-
resourceRequestContext: {
|
|
1067
|
-
requestCorrelator,
|
|
1068
|
-
luvioRequestMethod: undefined,
|
|
1069
|
-
},
|
|
1070
|
-
eventObservers
|
|
1071
|
-
};
|
|
1072
|
-
if (networkPriority !== 'normal') {
|
|
1073
|
-
dispatchOptions.overrides = {
|
|
1074
|
-
priority: networkPriority
|
|
1075
|
-
};
|
|
1076
|
-
}
|
|
1077
|
-
return buildNetworkSnapshot(luvio, config, dispatchOptions);
|
|
1062
|
+
return buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
1078
1063
|
}
|
|
1079
1064
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
1080
1065
|
const { luvio, config } = context;
|
|
@@ -1121,4 +1106,4 @@ withDefaultLuvio((luvio) => {
|
|
|
1121
1106
|
});
|
|
1122
1107
|
|
|
1123
1108
|
export { getOrchestrationInstanceCollection, getOrchestrationInstanceCollection_imperative };
|
|
1124
|
-
// version: 1.213.
|
|
1109
|
+
// version: 1.213.1-79de10fe1
|