@salesforce/lds-adapters-platform-flow 1.379.1 → 1.380.0-dev10
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.
- package/dist/es/es2018/platform-flow.js +56 -48
- package/dist/es/es2018/types/src/adapters/invokeAction.d.ts +2 -2
- package/dist/es/es2018/types/src/generated/adapters/invokeAction.d.ts +9 -13
- package/dist/es/es2018/types/src/generated/resources/postConnectInteractionRuntimeInvokeAction.d.ts +6 -10
- package/dist/es/es2018/types/src/generated/types/FlowRuntimeInvokeActionInputRepresentation.d.ts +3 -3
- package/dist/es/es2018/types/src/generated/types/FlowRuntimeInvokeActionInputWrapperRepresentation.d.ts +37 -0
- package/package.json +4 -4
- package/sfdc/index.js +57 -49
- package/src/raml/api.raml +11 -18
- package/dist/es/es2018/types/src/generated/types/FlowRuntimeInvokeActionOutputRepresentation.d.ts +0 -35
|
@@ -123,13 +123,13 @@ function buildAdapterValidationConfig(displayName, paramsMeta) {
|
|
|
123
123
|
}
|
|
124
124
|
const keyPrefix = 'FlowRuntime';
|
|
125
125
|
|
|
126
|
-
const RepresentationType
|
|
127
|
-
function getTypeCacheKeys
|
|
126
|
+
const RepresentationType = 'FlowRuntimeResponseRepresentation';
|
|
127
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
128
128
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
129
129
|
const rootKey = fullPathFactory();
|
|
130
130
|
rootKeySet.set(rootKey, {
|
|
131
131
|
namespace: keyPrefix,
|
|
132
|
-
representationName: RepresentationType
|
|
132
|
+
representationName: RepresentationType,
|
|
133
133
|
mergeable: false
|
|
134
134
|
});
|
|
135
135
|
}
|
|
@@ -138,7 +138,7 @@ function keyBuilder$3(luvio, params) {
|
|
|
138
138
|
return keyPrefix + '::FlowRuntimeResponseRepresentation:(' + 'flowDevName:' + params.body.flowDevName + '::' + (params.body.flowVersionId === undefined ? 'flowVersionId' : 'flowVersionId:' + params.body.flowVersionId) + '::' + (params.body.arguments === undefined ? 'arguments' : 'arguments:' + params.body.arguments) + '::' + (params.body.enableTrace === undefined ? 'enableTrace' : 'enableTrace:' + params.body.enableTrace) + '::' + (params.body.enableRollbackMode === undefined ? 'enableRollbackMode' : 'enableRollbackMode:' + params.body.enableRollbackMode) + '::' + (params.body.useLatestSubflow === undefined ? 'useLatestSubflow' : 'useLatestSubflow:' + params.body.useLatestSubflow) + '::' + (params.body.debugAsUserId === undefined ? 'debugAsUserId' : 'debugAsUserId:' + params.body.debugAsUserId) + '::' + (params.body.isBuilderDebug === undefined ? 'isBuilderDebug' : 'isBuilderDebug:' + params.body.isBuilderDebug) + ')';
|
|
139
139
|
}
|
|
140
140
|
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
141
|
-
getTypeCacheKeys
|
|
141
|
+
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
|
|
142
142
|
}
|
|
143
143
|
function createResourceRequest$3(config) {
|
|
144
144
|
const headers = {};
|
|
@@ -221,7 +221,7 @@ function keyBuilder$2(luvio, params) {
|
|
|
221
221
|
return keyPrefix + '::FlowRuntimeResponseRepresentation:(' + 'request.action:' + params.body.request.action + '::' + 'request.serializedState:' + params.body.request.serializedState + '::' + (params.body.request.fields === undefined ? undefined : ('[' + params.body.request.fields.map(element => 'request.fields.field:' + element.field + '::' + (element.isVisible === undefined ? 'request.fields.isVisible' : 'request.fields.isVisible:' + element.isVisible) + '::' + (element.value === undefined ? 'request.fields.value' : 'request.fields.value:' + element.value)).join(',') + ']')) + '::' + (params.body.request.uiElementVisited === undefined ? 'request.uiElementVisited' : 'request.uiElementVisited:' + params.body.request.uiElementVisited) + '::' + (params.body.request.enableTrace === undefined ? 'request.enableTrace' : 'request.enableTrace:' + params.body.request.enableTrace) + '::' + stableJSONStringify(params.body.request.lcErrors) + '::' + (params.body.request.isBuilderDebug === undefined ? 'request.isBuilderDebug' : 'request.isBuilderDebug:' + params.body.request.isBuilderDebug) + ')';
|
|
222
222
|
}
|
|
223
223
|
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
224
|
-
getTypeCacheKeys
|
|
224
|
+
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$2(luvio, resourceParams));
|
|
225
225
|
}
|
|
226
226
|
function createResourceRequest$2(config) {
|
|
227
227
|
const headers = {};
|
|
@@ -237,7 +237,7 @@ function createResourceRequest$2(config) {
|
|
|
237
237
|
};
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
-
function validate$
|
|
240
|
+
function validate$3(obj, path = 'FlowRuntimeNavigationFieldValue') {
|
|
241
241
|
const v_error = (() => {
|
|
242
242
|
if (typeof obj !== 'object' || ArrayIsArray$1(obj) || obj === null) {
|
|
243
243
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -286,7 +286,7 @@ function validate$2(obj, path = 'FlowRuntimeNavigationFieldValue') {
|
|
|
286
286
|
return v_error === undefined ? null : v_error;
|
|
287
287
|
}
|
|
288
288
|
|
|
289
|
-
function validate$
|
|
289
|
+
function validate$2(obj, path = 'FlowRuntimeHashbagRepresentation') {
|
|
290
290
|
const v_error = (() => {
|
|
291
291
|
if (typeof obj !== 'object' || ArrayIsArray$1(obj) || obj === null) {
|
|
292
292
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -304,7 +304,7 @@ function validate$1(obj, path = 'FlowRuntimeHashbagRepresentation') {
|
|
|
304
304
|
return v_error === undefined ? null : v_error;
|
|
305
305
|
}
|
|
306
306
|
|
|
307
|
-
function validate(obj, path = 'FlowRuntimeNavigateFlowRepresentation') {
|
|
307
|
+
function validate$1(obj, path = 'FlowRuntimeNavigateFlowRepresentation') {
|
|
308
308
|
const v_error = (() => {
|
|
309
309
|
if (typeof obj !== 'object' || ArrayIsArray$1(obj) || obj === null) {
|
|
310
310
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -330,7 +330,7 @@ function validate(obj, path = 'FlowRuntimeNavigateFlowRepresentation') {
|
|
|
330
330
|
for (let i = 0; i < obj_fields.length; i++) {
|
|
331
331
|
const obj_fields_item = obj_fields[i];
|
|
332
332
|
const path_fields_item = path_fields + '[' + i + ']';
|
|
333
|
-
const referencepath_fields_itemValidationError = validate$
|
|
333
|
+
const referencepath_fields_itemValidationError = validate$3(obj_fields_item, path_fields_item);
|
|
334
334
|
if (referencepath_fields_itemValidationError !== null) {
|
|
335
335
|
let message = 'Object doesn\'t match FlowRuntimeNavigationFieldValue (at "' + path_fields_item + '")\n';
|
|
336
336
|
message += referencepath_fields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -348,7 +348,7 @@ function validate(obj, path = 'FlowRuntimeNavigateFlowRepresentation') {
|
|
|
348
348
|
if (obj.lcErrors !== undefined) {
|
|
349
349
|
const obj_lcErrors = obj.lcErrors;
|
|
350
350
|
const path_lcErrors = path + '.lcErrors';
|
|
351
|
-
const referencepath_lcErrorsValidationError = validate$
|
|
351
|
+
const referencepath_lcErrorsValidationError = validate$2(obj_lcErrors, path_lcErrors);
|
|
352
352
|
if (referencepath_lcErrorsValidationError !== null) {
|
|
353
353
|
let message = 'Object doesn\'t match FlowRuntimeHashbagRepresentation (at "' + path_lcErrors + '")\n';
|
|
354
354
|
message += referencepath_lcErrorsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -380,7 +380,7 @@ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$4(navigateFlow
|
|
|
380
380
|
function typeCheckConfig$2(untrustedConfig) {
|
|
381
381
|
const config = {};
|
|
382
382
|
const untrustedConfig_request = untrustedConfig.request;
|
|
383
|
-
const referenceFlowRuntimeNavigateFlowRepresentationValidationError = validate(untrustedConfig_request);
|
|
383
|
+
const referenceFlowRuntimeNavigateFlowRepresentationValidationError = validate$1(untrustedConfig_request);
|
|
384
384
|
if (referenceFlowRuntimeNavigateFlowRepresentationValidationError === null) {
|
|
385
385
|
config.request = untrustedConfig_request;
|
|
386
386
|
}
|
|
@@ -435,7 +435,7 @@ function keyBuilder$1(luvio, params) {
|
|
|
435
435
|
return keyPrefix + '::FlowRuntimeResponseRepresentation:(' + 'pausedInterviewId:' + params.body.pausedInterviewId + ')';
|
|
436
436
|
}
|
|
437
437
|
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
438
|
-
getTypeCacheKeys
|
|
438
|
+
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
439
439
|
}
|
|
440
440
|
function createResourceRequest$1(config) {
|
|
441
441
|
const headers = {};
|
|
@@ -507,19 +507,8 @@ const resumeFlowAdapterFactory = (luvio) => function flowRuntime__resumeFlow(unt
|
|
|
507
507
|
return buildNetworkSnapshot$1(luvio, config);
|
|
508
508
|
};
|
|
509
509
|
|
|
510
|
-
const RepresentationType = 'FlowRuntimeInvokeActionOutputRepresentation';
|
|
511
|
-
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
512
|
-
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
513
|
-
const rootKey = fullPathFactory();
|
|
514
|
-
rootKeySet.set(rootKey, {
|
|
515
|
-
namespace: keyPrefix,
|
|
516
|
-
representationName: RepresentationType,
|
|
517
|
-
mergeable: false
|
|
518
|
-
});
|
|
519
|
-
}
|
|
520
|
-
|
|
521
510
|
function keyBuilder(luvio, params) {
|
|
522
|
-
return keyPrefix + '::
|
|
511
|
+
return keyPrefix + '::FlowRuntimeResponseRepresentation:(' + 'request.actionName:' + params.body.request.actionName + '::' + 'request.actionType:' + params.body.request.actionType + '::' + 'request.flowVersionId:' + params.body.request.flowVersionId + '::' + stableJSONStringify(params.body.request.inputValues) + ')';
|
|
523
512
|
}
|
|
524
513
|
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
525
514
|
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder(luvio, resourceParams));
|
|
@@ -538,37 +527,56 @@ function createResourceRequest(config) {
|
|
|
538
527
|
};
|
|
539
528
|
}
|
|
540
529
|
|
|
530
|
+
function validate(obj, path = 'FlowRuntimeInvokeActionInputRepresentation') {
|
|
531
|
+
const v_error = (() => {
|
|
532
|
+
if (typeof obj !== 'object' || ArrayIsArray$1(obj) || obj === null) {
|
|
533
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
534
|
+
}
|
|
535
|
+
const obj_actionName = obj.actionName;
|
|
536
|
+
const path_actionName = path + '.actionName';
|
|
537
|
+
if (typeof obj_actionName !== 'string') {
|
|
538
|
+
return new TypeError('Expected "string" but received "' + typeof obj_actionName + '" (at "' + path_actionName + '")');
|
|
539
|
+
}
|
|
540
|
+
const obj_actionType = obj.actionType;
|
|
541
|
+
const path_actionType = path + '.actionType';
|
|
542
|
+
if (typeof obj_actionType !== 'string') {
|
|
543
|
+
return new TypeError('Expected "string" but received "' + typeof obj_actionType + '" (at "' + path_actionType + '")');
|
|
544
|
+
}
|
|
545
|
+
const obj_flowVersionId = obj.flowVersionId;
|
|
546
|
+
const path_flowVersionId = path + '.flowVersionId';
|
|
547
|
+
if (typeof obj_flowVersionId !== 'string') {
|
|
548
|
+
return new TypeError('Expected "string" but received "' + typeof obj_flowVersionId + '" (at "' + path_flowVersionId + '")');
|
|
549
|
+
}
|
|
550
|
+
const obj_inputValues = obj.inputValues;
|
|
551
|
+
const path_inputValues = path + '.inputValues';
|
|
552
|
+
if (typeof obj_inputValues !== 'object' || ArrayIsArray$1(obj_inputValues) || obj_inputValues === null) {
|
|
553
|
+
return new TypeError('Expected "object" but received "' + typeof obj_inputValues + '" (at "' + path_inputValues + '")');
|
|
554
|
+
}
|
|
555
|
+
const obj_inputValues_keys = ObjectKeys$1(obj_inputValues);
|
|
556
|
+
for (let i = 0; i < obj_inputValues_keys.length; i++) {
|
|
557
|
+
const key = obj_inputValues_keys[i];
|
|
558
|
+
const obj_inputValues_prop = obj_inputValues[key];
|
|
559
|
+
const path_inputValues_prop = path_inputValues + '["' + key + '"]';
|
|
560
|
+
if (obj_inputValues_prop === undefined) {
|
|
561
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_inputValues_prop + '" (at "' + path_inputValues_prop + '")');
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
})();
|
|
565
|
+
return v_error === undefined ? null : v_error;
|
|
566
|
+
}
|
|
567
|
+
|
|
541
568
|
const adapterName = 'invokeAction';
|
|
542
569
|
const invokeAction_ConfigPropertyMetadata = [
|
|
543
|
-
generateParamConfigMetadata('
|
|
544
|
-
generateParamConfigMetadata('actionType', true, 2 /* Body */, 0 /* String */),
|
|
545
|
-
generateParamConfigMetadata('flowVersionId', true, 2 /* Body */, 0 /* String */),
|
|
546
|
-
generateParamConfigMetadata('inputValues', true, 2 /* Body */, 4 /* Unsupported */),
|
|
570
|
+
generateParamConfigMetadata('request', true, 2 /* Body */, 4 /* Unsupported */),
|
|
547
571
|
];
|
|
548
572
|
const invokeAction_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, invokeAction_ConfigPropertyMetadata);
|
|
549
573
|
const createResourceParams = /*#__PURE__*/ createResourceParams$4(invokeAction_ConfigPropertyMetadata);
|
|
550
574
|
function typeCheckConfig(untrustedConfig) {
|
|
551
575
|
const config = {};
|
|
552
|
-
|
|
553
|
-
const
|
|
554
|
-
if (
|
|
555
|
-
|
|
556
|
-
const untrustedConfig_inputValues_keys = Object.keys(untrustedConfig_inputValues);
|
|
557
|
-
for (let i = 0, arrayLength = untrustedConfig_inputValues_keys.length; i < arrayLength; i++) {
|
|
558
|
-
const key = untrustedConfig_inputValues_keys[i];
|
|
559
|
-
const untrustedConfig_inputValues_prop = untrustedConfig_inputValues[key];
|
|
560
|
-
if (untrustedIsObject(untrustedConfig_inputValues_prop)) {
|
|
561
|
-
const untrustedConfig_inputValues_prop_object = {};
|
|
562
|
-
if (untrustedConfig_inputValues_prop_object !== undefined && Object.keys(untrustedConfig_inputValues_prop_object).length >= 0) {
|
|
563
|
-
if (untrustedConfig_inputValues_object !== undefined) {
|
|
564
|
-
untrustedConfig_inputValues_object[key] = untrustedConfig_inputValues_prop_object;
|
|
565
|
-
}
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
if (untrustedConfig_inputValues_object !== undefined && Object.keys(untrustedConfig_inputValues_object).length >= 0) {
|
|
570
|
-
config.inputValues = untrustedConfig_inputValues_object;
|
|
571
|
-
}
|
|
576
|
+
const untrustedConfig_request = untrustedConfig.request;
|
|
577
|
+
const referenceFlowRuntimeInvokeActionInputRepresentationValidationError = validate(untrustedConfig_request);
|
|
578
|
+
if (referenceFlowRuntimeInvokeActionInputRepresentationValidationError === null) {
|
|
579
|
+
config.request = untrustedConfig_request;
|
|
572
580
|
}
|
|
573
581
|
return config;
|
|
574
582
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Luvio as $64$luvio_engine_Luvio, DispatchResourceRequestContext } from '@luvio/engine';
|
|
2
|
-
import type {
|
|
2
|
+
import type { FlowRuntimeResponseRepresentation as types_FlowRuntimeResponseRepresentation_FlowRuntimeResponseRepresentation } from '../generated/types/FlowRuntimeResponseRepresentation';
|
|
3
3
|
import type { InvokeActionConfig } from '../generated/adapters/invokeAction';
|
|
4
4
|
export { adapterName } from '../generated/adapters/invokeAction';
|
|
5
|
-
export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: InvokeActionConfig, options?: DispatchResourceRequestContext): Promise<
|
|
5
|
+
export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: InvokeActionConfig, options?: DispatchResourceRequestContext): Promise<types_FlowRuntimeResponseRepresentation_FlowRuntimeResponseRepresentation>;
|
|
6
6
|
export declare const invokeActionAdapterFactory: any;
|
|
@@ -1,17 +1,13 @@
|
|
|
1
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
2
|
import { Untrusted as adapter$45$utils_Untrusted, AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig } from './adapter-utils';
|
|
3
|
+
import { FlowRuntimeInvokeActionInputRepresentation as types_FlowRuntimeInvokeActionInputRepresentation_FlowRuntimeInvokeActionInputRepresentation } from '../types/FlowRuntimeInvokeActionInputRepresentation';
|
|
3
4
|
import { ResourceRequestConfig as resources_postConnectInteractionRuntimeInvokeAction_ResourceRequestConfig } from '../resources/postConnectInteractionRuntimeInvokeAction';
|
|
4
|
-
import {
|
|
5
|
+
import { FlowRuntimeResponseRepresentation as types_FlowRuntimeResponseRepresentation_FlowRuntimeResponseRepresentation } from '../types/FlowRuntimeResponseRepresentation';
|
|
5
6
|
export declare const adapterName = "invokeAction";
|
|
6
7
|
export declare const invokeAction_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
|
|
7
8
|
export declare const invokeAction_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
8
9
|
export interface InvokeActionConfig {
|
|
9
|
-
|
|
10
|
-
actionType: string;
|
|
11
|
-
flowVersionId: string;
|
|
12
|
-
inputValues: {
|
|
13
|
-
[key: string]: {};
|
|
14
|
-
};
|
|
10
|
+
request: types_FlowRuntimeInvokeActionInputRepresentation_FlowRuntimeInvokeActionInputRepresentation;
|
|
15
11
|
}
|
|
16
12
|
export declare const createResourceParams: (config: InvokeActionConfig) => resources_postConnectInteractionRuntimeInvokeAction_ResourceRequestConfig;
|
|
17
13
|
export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, config: InvokeActionConfig): string;
|
|
@@ -19,14 +15,14 @@ export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio,
|
|
|
19
15
|
export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<InvokeActionConfig>): adapter$45$utils_Untrusted<InvokeActionConfig>;
|
|
20
16
|
export declare function validateAdapterConfig(untrustedConfig: unknown, configPropertyNames: adapter$45$utils_AdapterValidationConfig): InvokeActionConfig | null;
|
|
21
17
|
export declare function adapterFragment(luvio: $64$luvio_engine_Luvio, config: InvokeActionConfig): $64$luvio_engine_Fragment;
|
|
22
|
-
export declare function buildCachedSnapshot(luvio: $64$luvio_engine_Luvio, config: InvokeActionConfig): $64$luvio_engine_Snapshot<
|
|
23
|
-
export declare function onFetchResponseSuccess(luvio: $64$luvio_engine_Luvio, config: InvokeActionConfig, resourceParams: resources_postConnectInteractionRuntimeInvokeAction_ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<
|
|
18
|
+
export declare function buildCachedSnapshot(luvio: $64$luvio_engine_Luvio, config: InvokeActionConfig): $64$luvio_engine_Snapshot<types_FlowRuntimeResponseRepresentation_FlowRuntimeResponseRepresentation, any>;
|
|
19
|
+
export declare function onFetchResponseSuccess(luvio: $64$luvio_engine_Luvio, config: InvokeActionConfig, resourceParams: resources_postConnectInteractionRuntimeInvokeAction_ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_FlowRuntimeResponseRepresentation_FlowRuntimeResponseRepresentation>): Promise<import("@luvio/engine").FulfilledSnapshot<types_FlowRuntimeResponseRepresentation_FlowRuntimeResponseRepresentation, {}> | import("@luvio/engine").StaleSnapshot<types_FlowRuntimeResponseRepresentation_FlowRuntimeResponseRepresentation, {}> | import("@luvio/engine").PendingSnapshot<types_FlowRuntimeResponseRepresentation_FlowRuntimeResponseRepresentation, any>>;
|
|
24
20
|
export declare function onFetchResponseError(luvio: $64$luvio_engine_Luvio, config: InvokeActionConfig, resourceParams: resources_postConnectInteractionRuntimeInvokeAction_ResourceRequestConfig, response: $64$luvio_engine_ErrorResponse): Promise<import("@luvio/engine").ErrorSnapshot>;
|
|
25
|
-
export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: InvokeActionConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<$64$luvio_engine_Snapshot<
|
|
21
|
+
export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: InvokeActionConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<$64$luvio_engine_Snapshot<types_FlowRuntimeResponseRepresentation_FlowRuntimeResponseRepresentation, any>>;
|
|
26
22
|
export type BuildSnapshotContext = {
|
|
27
23
|
luvio: $64$luvio_engine_Luvio;
|
|
28
24
|
config: InvokeActionConfig;
|
|
29
25
|
};
|
|
30
|
-
export declare function buildNetworkSnapshotCachePolicy(context: BuildSnapshotContext, coercedAdapterRequestContext: $64$luvio_engine_CoercedAdapterRequestContext): Promise<$64$luvio_engine_Snapshot<
|
|
31
|
-
export declare function buildCachedSnapshotCachePolicy(context: BuildSnapshotContext, storeLookup: $64$luvio_engine_StoreLookup<
|
|
32
|
-
export declare const invokeActionAdapterFactory: $64$luvio_engine_AdapterFactory<InvokeActionConfig,
|
|
26
|
+
export declare function buildNetworkSnapshotCachePolicy(context: BuildSnapshotContext, coercedAdapterRequestContext: $64$luvio_engine_CoercedAdapterRequestContext): Promise<$64$luvio_engine_Snapshot<types_FlowRuntimeResponseRepresentation_FlowRuntimeResponseRepresentation, any>>;
|
|
27
|
+
export declare function buildCachedSnapshotCachePolicy(context: BuildSnapshotContext, storeLookup: $64$luvio_engine_StoreLookup<types_FlowRuntimeResponseRepresentation_FlowRuntimeResponseRepresentation>): $64$luvio_engine_Snapshot<types_FlowRuntimeResponseRepresentation_FlowRuntimeResponseRepresentation, any>;
|
|
28
|
+
export declare const invokeActionAdapterFactory: $64$luvio_engine_AdapterFactory<InvokeActionConfig, types_FlowRuntimeResponseRepresentation_FlowRuntimeResponseRepresentation>;
|
package/dist/es/es2018/types/src/generated/resources/postConnectInteractionRuntimeInvokeAction.d.ts
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
|
+
import { FlowRuntimeInvokeActionInputRepresentation as types_FlowRuntimeInvokeActionInputRepresentation_FlowRuntimeInvokeActionInputRepresentation } from '../types/FlowRuntimeInvokeActionInputRepresentation';
|
|
1
2
|
import { Luvio as $64$luvio_engine_Luvio, Fragment as $64$luvio_engine_Fragment, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, FetchResponse as $64$luvio_engine_FetchResponse, SnapshotRefresh as $64$luvio_engine_SnapshotRefresh, FulfilledSnapshot as $64$luvio_engine_FulfilledSnapshot, StaleSnapshot as $64$luvio_engine_StaleSnapshot, PendingSnapshot as $64$luvio_engine_PendingSnapshot, ErrorResponse as $64$luvio_engine_ErrorResponse, ErrorSnapshot as $64$luvio_engine_ErrorSnapshot, ResourceRequest as $64$luvio_engine_ResourceRequest } from '@luvio/engine';
|
|
2
|
-
import {
|
|
3
|
+
import { FlowRuntimeResponseRepresentation as types_FlowRuntimeResponseRepresentation_FlowRuntimeResponseRepresentation } from '../types/FlowRuntimeResponseRepresentation';
|
|
3
4
|
export interface ResourceRequestConfig {
|
|
4
5
|
body: {
|
|
5
|
-
|
|
6
|
-
actionType: string;
|
|
7
|
-
flowVersionId: string;
|
|
8
|
-
inputValues: {
|
|
9
|
-
[key: string]: {};
|
|
10
|
-
};
|
|
6
|
+
request: types_FlowRuntimeInvokeActionInputRepresentation_FlowRuntimeInvokeActionInputRepresentation;
|
|
11
7
|
};
|
|
12
8
|
}
|
|
13
9
|
export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
|
|
14
10
|
export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): string;
|
|
15
11
|
export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_NormalizedKeyMetadata;
|
|
16
|
-
export declare function getResponseCacheKeys(storeKeyMap: any, luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response:
|
|
17
|
-
export declare function ingestSuccess(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<
|
|
18
|
-
export declare function ingestError(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig, error: $64$luvio_engine_ErrorResponse, snapshotRefresh?: $64$luvio_engine_SnapshotRefresh<
|
|
12
|
+
export declare function getResponseCacheKeys(storeKeyMap: any, luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_FlowRuntimeResponseRepresentation_FlowRuntimeResponseRepresentation): void;
|
|
13
|
+
export declare function ingestSuccess(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_FlowRuntimeResponseRepresentation_FlowRuntimeResponseRepresentation>, snapshotRefresh?: $64$luvio_engine_SnapshotRefresh<types_FlowRuntimeResponseRepresentation_FlowRuntimeResponseRepresentation>): $64$luvio_engine_FulfilledSnapshot<types_FlowRuntimeResponseRepresentation_FlowRuntimeResponseRepresentation, {}> | $64$luvio_engine_StaleSnapshot<types_FlowRuntimeResponseRepresentation_FlowRuntimeResponseRepresentation, {}> | $64$luvio_engine_PendingSnapshot<types_FlowRuntimeResponseRepresentation_FlowRuntimeResponseRepresentation, any>;
|
|
14
|
+
export declare function ingestError(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig, error: $64$luvio_engine_ErrorResponse, snapshotRefresh?: $64$luvio_engine_SnapshotRefresh<types_FlowRuntimeResponseRepresentation_FlowRuntimeResponseRepresentation>): $64$luvio_engine_ErrorSnapshot;
|
|
19
15
|
export declare function createResourceRequest(config: ResourceRequestConfig): $64$luvio_engine_ResourceRequest;
|
|
20
16
|
export default createResourceRequest;
|
package/dist/es/es2018/types/src/generated/types/FlowRuntimeInvokeActionInputRepresentation.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, BaseFragment as $64$luvio_engine_BaseFragment, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
|
|
2
2
|
export declare const TTL = 500;
|
|
3
|
-
export declare const VERSION = "
|
|
3
|
+
export declare const VERSION = "49a9ed1295d4bdf865f29837aa52a9c3";
|
|
4
4
|
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
5
5
|
export declare const RepresentationType: string;
|
|
6
6
|
export declare function normalize(input: FlowRuntimeInvokeActionInputRepresentation, existing: FlowRuntimeInvokeActionInputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): FlowRuntimeInvokeActionInputRepresentationNormalized;
|
|
@@ -23,7 +23,7 @@ export interface FlowRuntimeInvokeActionInputRepresentationNormalized {
|
|
|
23
23
|
flowVersionId: string;
|
|
24
24
|
/** InputValues */
|
|
25
25
|
inputValues: {
|
|
26
|
-
[key: string]:
|
|
26
|
+
[key: string]: unknown;
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
@@ -37,6 +37,6 @@ export interface FlowRuntimeInvokeActionInputRepresentation {
|
|
|
37
37
|
actionType: string;
|
|
38
38
|
flowVersionId: string;
|
|
39
39
|
inputValues: {
|
|
40
|
-
[key: string]:
|
|
40
|
+
[key: string]: unknown;
|
|
41
41
|
};
|
|
42
42
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, ResourceIngest as $64$luvio_engine_ResourceIngest, FragmentSelection as $64$luvio_engine_FragmentSelection, LinkSelection as $64$luvio_engine_LinkSelection, StoreLink as $64$luvio_engine_StoreLink, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
|
|
2
|
+
import { FlowRuntimeInvokeActionInputRepresentation as FlowRuntimeInvokeActionInputRepresentation_FlowRuntimeInvokeActionInputRepresentation } from './FlowRuntimeInvokeActionInputRepresentation';
|
|
3
|
+
export declare const VERSION = "b4445cc62ae092236ca7c13655b78bc6";
|
|
4
|
+
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
5
|
+
export declare const RepresentationType: string;
|
|
6
|
+
export declare function normalize(input: FlowRuntimeInvokeActionInputWrapperRepresentation, existing: FlowRuntimeInvokeActionInputWrapperRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): FlowRuntimeInvokeActionInputWrapperRepresentationNormalized;
|
|
7
|
+
export interface DynamicIngestParams {
|
|
8
|
+
request: $64$luvio_engine_ResourceIngest;
|
|
9
|
+
}
|
|
10
|
+
export declare function dynamicNormalize(ingestParams: DynamicIngestParams): (input: FlowRuntimeInvokeActionInputWrapperRepresentation, existing: FlowRuntimeInvokeActionInputWrapperRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number) => FlowRuntimeInvokeActionInputWrapperRepresentationNormalized;
|
|
11
|
+
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
12
|
+
export interface DynamicSelectParams {
|
|
13
|
+
request?: $64$luvio_engine_LinkSelection;
|
|
14
|
+
}
|
|
15
|
+
export declare const dynamicSelect: (params: DynamicSelectParams) => $64$luvio_engine_FragmentSelection;
|
|
16
|
+
export declare function equals(existing: FlowRuntimeInvokeActionInputWrapperRepresentationNormalized, incoming: FlowRuntimeInvokeActionInputWrapperRepresentationNormalized): boolean;
|
|
17
|
+
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
18
|
+
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: FlowRuntimeInvokeActionInputWrapperRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
19
|
+
export declare function dynamicIngest(ingestParams: DynamicIngestParams): $64$luvio_engine_ResourceIngest;
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
*
|
|
23
|
+
* Keys:
|
|
24
|
+
* (none)
|
|
25
|
+
*/
|
|
26
|
+
export interface FlowRuntimeInvokeActionInputWrapperRepresentationNormalized {
|
|
27
|
+
request: $64$luvio_engine_StoreLink;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
*
|
|
32
|
+
* Keys:
|
|
33
|
+
* (none)
|
|
34
|
+
*/
|
|
35
|
+
export interface FlowRuntimeInvokeActionInputWrapperRepresentation {
|
|
36
|
+
request: FlowRuntimeInvokeActionInputRepresentation_FlowRuntimeInvokeActionInputRepresentation;
|
|
37
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-platform-flow",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.380.0-dev10",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "Flow Runtime APIs",
|
|
6
6
|
"main": "dist/es/es2018/platform-flow.js",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"release:core": "../../scripts/release/core.js --adapter=lds-adapters-platform-flow"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@salesforce/lds-bindings": "^1.
|
|
40
|
+
"@salesforce/lds-bindings": "^1.380.0-dev10"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@salesforce/lds-compiler-plugins": "^1.
|
|
44
|
-
"@salesforce/lds-karma": "^1.
|
|
43
|
+
"@salesforce/lds-compiler-plugins": "^1.380.0-dev10",
|
|
44
|
+
"@salesforce/lds-karma": "^1.380.0-dev10"
|
|
45
45
|
},
|
|
46
46
|
"nx": {
|
|
47
47
|
"targets": {
|
package/sfdc/index.js
CHANGED
|
@@ -133,13 +133,13 @@ function buildAdapterValidationConfig(displayName, paramsMeta) {
|
|
|
133
133
|
}
|
|
134
134
|
const keyPrefix = 'FlowRuntime';
|
|
135
135
|
|
|
136
|
-
const RepresentationType
|
|
137
|
-
function getTypeCacheKeys
|
|
136
|
+
const RepresentationType = 'FlowRuntimeResponseRepresentation';
|
|
137
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
138
138
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
139
139
|
const rootKey = fullPathFactory();
|
|
140
140
|
rootKeySet.set(rootKey, {
|
|
141
141
|
namespace: keyPrefix,
|
|
142
|
-
representationName: RepresentationType
|
|
142
|
+
representationName: RepresentationType,
|
|
143
143
|
mergeable: false
|
|
144
144
|
});
|
|
145
145
|
}
|
|
@@ -148,7 +148,7 @@ function keyBuilder$3(luvio, params) {
|
|
|
148
148
|
return keyPrefix + '::FlowRuntimeResponseRepresentation:(' + 'request.action:' + params.body.request.action + '::' + 'request.serializedState:' + params.body.request.serializedState + '::' + (params.body.request.fields === undefined ? undefined : ('[' + params.body.request.fields.map(element => 'request.fields.field:' + element.field + '::' + (element.isVisible === undefined ? 'request.fields.isVisible' : 'request.fields.isVisible:' + element.isVisible) + '::' + (element.value === undefined ? 'request.fields.value' : 'request.fields.value:' + element.value)).join(',') + ']')) + '::' + (params.body.request.uiElementVisited === undefined ? 'request.uiElementVisited' : 'request.uiElementVisited:' + params.body.request.uiElementVisited) + '::' + (params.body.request.enableTrace === undefined ? 'request.enableTrace' : 'request.enableTrace:' + params.body.request.enableTrace) + '::' + stableJSONStringify(params.body.request.lcErrors) + '::' + (params.body.request.isBuilderDebug === undefined ? 'request.isBuilderDebug' : 'request.isBuilderDebug:' + params.body.request.isBuilderDebug) + ')';
|
|
149
149
|
}
|
|
150
150
|
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
151
|
-
getTypeCacheKeys
|
|
151
|
+
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
|
|
152
152
|
}
|
|
153
153
|
function createResourceRequest$3(config) {
|
|
154
154
|
const headers = {};
|
|
@@ -164,7 +164,7 @@ function createResourceRequest$3(config) {
|
|
|
164
164
|
};
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
function validate$
|
|
167
|
+
function validate$3(obj, path = 'FlowRuntimeNavigationFieldValue') {
|
|
168
168
|
const v_error = (() => {
|
|
169
169
|
if (typeof obj !== 'object' || ArrayIsArray$1(obj) || obj === null) {
|
|
170
170
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -213,7 +213,7 @@ function validate$2(obj, path = 'FlowRuntimeNavigationFieldValue') {
|
|
|
213
213
|
return v_error === undefined ? null : v_error;
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
-
function validate$
|
|
216
|
+
function validate$2(obj, path = 'FlowRuntimeHashbagRepresentation') {
|
|
217
217
|
const v_error = (() => {
|
|
218
218
|
if (typeof obj !== 'object' || ArrayIsArray$1(obj) || obj === null) {
|
|
219
219
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -231,7 +231,7 @@ function validate$1(obj, path = 'FlowRuntimeHashbagRepresentation') {
|
|
|
231
231
|
return v_error === undefined ? null : v_error;
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
function validate(obj, path = 'FlowRuntimeNavigateFlowRepresentation') {
|
|
234
|
+
function validate$1(obj, path = 'FlowRuntimeNavigateFlowRepresentation') {
|
|
235
235
|
const v_error = (() => {
|
|
236
236
|
if (typeof obj !== 'object' || ArrayIsArray$1(obj) || obj === null) {
|
|
237
237
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -257,7 +257,7 @@ function validate(obj, path = 'FlowRuntimeNavigateFlowRepresentation') {
|
|
|
257
257
|
for (let i = 0; i < obj_fields.length; i++) {
|
|
258
258
|
const obj_fields_item = obj_fields[i];
|
|
259
259
|
const path_fields_item = path_fields + '[' + i + ']';
|
|
260
|
-
const referencepath_fields_itemValidationError = validate$
|
|
260
|
+
const referencepath_fields_itemValidationError = validate$3(obj_fields_item, path_fields_item);
|
|
261
261
|
if (referencepath_fields_itemValidationError !== null) {
|
|
262
262
|
let message = 'Object doesn\'t match FlowRuntimeNavigationFieldValue (at "' + path_fields_item + '")\n';
|
|
263
263
|
message += referencepath_fields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -275,7 +275,7 @@ function validate(obj, path = 'FlowRuntimeNavigateFlowRepresentation') {
|
|
|
275
275
|
if (obj.lcErrors !== undefined) {
|
|
276
276
|
const obj_lcErrors = obj.lcErrors;
|
|
277
277
|
const path_lcErrors = path + '.lcErrors';
|
|
278
|
-
const referencepath_lcErrorsValidationError = validate$
|
|
278
|
+
const referencepath_lcErrorsValidationError = validate$2(obj_lcErrors, path_lcErrors);
|
|
279
279
|
if (referencepath_lcErrorsValidationError !== null) {
|
|
280
280
|
let message = 'Object doesn\'t match FlowRuntimeHashbagRepresentation (at "' + path_lcErrors + '")\n';
|
|
281
281
|
message += referencepath_lcErrorsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -307,7 +307,7 @@ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$4(navigateFlow
|
|
|
307
307
|
function typeCheckConfig$3(untrustedConfig) {
|
|
308
308
|
const config = {};
|
|
309
309
|
const untrustedConfig_request = untrustedConfig.request;
|
|
310
|
-
const referenceFlowRuntimeNavigateFlowRepresentationValidationError = validate(untrustedConfig_request);
|
|
310
|
+
const referenceFlowRuntimeNavigateFlowRepresentationValidationError = validate$1(untrustedConfig_request);
|
|
311
311
|
if (referenceFlowRuntimeNavigateFlowRepresentationValidationError === null) {
|
|
312
312
|
config.request = untrustedConfig_request;
|
|
313
313
|
}
|
|
@@ -362,7 +362,7 @@ function keyBuilder$2(luvio, params) {
|
|
|
362
362
|
return keyPrefix + '::FlowRuntimeResponseRepresentation:(' + 'pausedInterviewId:' + params.body.pausedInterviewId + ')';
|
|
363
363
|
}
|
|
364
364
|
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
365
|
-
getTypeCacheKeys
|
|
365
|
+
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$2(luvio, resourceParams));
|
|
366
366
|
}
|
|
367
367
|
function createResourceRequest$2(config) {
|
|
368
368
|
const headers = {};
|
|
@@ -438,7 +438,7 @@ function keyBuilder$1(luvio, params) {
|
|
|
438
438
|
return keyPrefix + '::FlowRuntimeResponseRepresentation:(' + 'flowDevName:' + params.body.flowDevName + '::' + (params.body.flowVersionId === undefined ? 'flowVersionId' : 'flowVersionId:' + params.body.flowVersionId) + '::' + (params.body.arguments === undefined ? 'arguments' : 'arguments:' + params.body.arguments) + '::' + (params.body.enableTrace === undefined ? 'enableTrace' : 'enableTrace:' + params.body.enableTrace) + '::' + (params.body.enableRollbackMode === undefined ? 'enableRollbackMode' : 'enableRollbackMode:' + params.body.enableRollbackMode) + '::' + (params.body.useLatestSubflow === undefined ? 'useLatestSubflow' : 'useLatestSubflow:' + params.body.useLatestSubflow) + '::' + (params.body.debugAsUserId === undefined ? 'debugAsUserId' : 'debugAsUserId:' + params.body.debugAsUserId) + '::' + (params.body.isBuilderDebug === undefined ? 'isBuilderDebug' : 'isBuilderDebug:' + params.body.isBuilderDebug) + ')';
|
|
439
439
|
}
|
|
440
440
|
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
441
|
-
getTypeCacheKeys
|
|
441
|
+
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
442
442
|
}
|
|
443
443
|
function createResourceRequest$1(config) {
|
|
444
444
|
const headers = {};
|
|
@@ -517,19 +517,8 @@ const startFlowAdapterFactory = (luvio) => function flowRuntime__startFlow(untru
|
|
|
517
517
|
return buildNetworkSnapshot$1(luvio, config);
|
|
518
518
|
};
|
|
519
519
|
|
|
520
|
-
const RepresentationType = 'FlowRuntimeInvokeActionOutputRepresentation';
|
|
521
|
-
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
522
|
-
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
523
|
-
const rootKey = fullPathFactory();
|
|
524
|
-
rootKeySet.set(rootKey, {
|
|
525
|
-
namespace: keyPrefix,
|
|
526
|
-
representationName: RepresentationType,
|
|
527
|
-
mergeable: false
|
|
528
|
-
});
|
|
529
|
-
}
|
|
530
|
-
|
|
531
520
|
function keyBuilder(luvio, params) {
|
|
532
|
-
return keyPrefix + '::
|
|
521
|
+
return keyPrefix + '::FlowRuntimeResponseRepresentation:(' + 'request.actionName:' + params.body.request.actionName + '::' + 'request.actionType:' + params.body.request.actionType + '::' + 'request.flowVersionId:' + params.body.request.flowVersionId + '::' + stableJSONStringify(params.body.request.inputValues) + ')';
|
|
533
522
|
}
|
|
534
523
|
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
535
524
|
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder(luvio, resourceParams));
|
|
@@ -548,37 +537,56 @@ function createResourceRequest(config) {
|
|
|
548
537
|
};
|
|
549
538
|
}
|
|
550
539
|
|
|
540
|
+
function validate(obj, path = 'FlowRuntimeInvokeActionInputRepresentation') {
|
|
541
|
+
const v_error = (() => {
|
|
542
|
+
if (typeof obj !== 'object' || ArrayIsArray$1(obj) || obj === null) {
|
|
543
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
544
|
+
}
|
|
545
|
+
const obj_actionName = obj.actionName;
|
|
546
|
+
const path_actionName = path + '.actionName';
|
|
547
|
+
if (typeof obj_actionName !== 'string') {
|
|
548
|
+
return new TypeError('Expected "string" but received "' + typeof obj_actionName + '" (at "' + path_actionName + '")');
|
|
549
|
+
}
|
|
550
|
+
const obj_actionType = obj.actionType;
|
|
551
|
+
const path_actionType = path + '.actionType';
|
|
552
|
+
if (typeof obj_actionType !== 'string') {
|
|
553
|
+
return new TypeError('Expected "string" but received "' + typeof obj_actionType + '" (at "' + path_actionType + '")');
|
|
554
|
+
}
|
|
555
|
+
const obj_flowVersionId = obj.flowVersionId;
|
|
556
|
+
const path_flowVersionId = path + '.flowVersionId';
|
|
557
|
+
if (typeof obj_flowVersionId !== 'string') {
|
|
558
|
+
return new TypeError('Expected "string" but received "' + typeof obj_flowVersionId + '" (at "' + path_flowVersionId + '")');
|
|
559
|
+
}
|
|
560
|
+
const obj_inputValues = obj.inputValues;
|
|
561
|
+
const path_inputValues = path + '.inputValues';
|
|
562
|
+
if (typeof obj_inputValues !== 'object' || ArrayIsArray$1(obj_inputValues) || obj_inputValues === null) {
|
|
563
|
+
return new TypeError('Expected "object" but received "' + typeof obj_inputValues + '" (at "' + path_inputValues + '")');
|
|
564
|
+
}
|
|
565
|
+
const obj_inputValues_keys = ObjectKeys$1(obj_inputValues);
|
|
566
|
+
for (let i = 0; i < obj_inputValues_keys.length; i++) {
|
|
567
|
+
const key = obj_inputValues_keys[i];
|
|
568
|
+
const obj_inputValues_prop = obj_inputValues[key];
|
|
569
|
+
const path_inputValues_prop = path_inputValues + '["' + key + '"]';
|
|
570
|
+
if (obj_inputValues_prop === undefined) {
|
|
571
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_inputValues_prop + '" (at "' + path_inputValues_prop + '")');
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
})();
|
|
575
|
+
return v_error === undefined ? null : v_error;
|
|
576
|
+
}
|
|
577
|
+
|
|
551
578
|
const adapterName = 'invokeAction';
|
|
552
579
|
const invokeAction_ConfigPropertyMetadata = [
|
|
553
|
-
generateParamConfigMetadata('
|
|
554
|
-
generateParamConfigMetadata('actionType', true, 2 /* Body */, 0 /* String */),
|
|
555
|
-
generateParamConfigMetadata('flowVersionId', true, 2 /* Body */, 0 /* String */),
|
|
556
|
-
generateParamConfigMetadata('inputValues', true, 2 /* Body */, 4 /* Unsupported */),
|
|
580
|
+
generateParamConfigMetadata('request', true, 2 /* Body */, 4 /* Unsupported */),
|
|
557
581
|
];
|
|
558
582
|
const invokeAction_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, invokeAction_ConfigPropertyMetadata);
|
|
559
583
|
const createResourceParams = /*#__PURE__*/ createResourceParams$4(invokeAction_ConfigPropertyMetadata);
|
|
560
584
|
function typeCheckConfig(untrustedConfig) {
|
|
561
585
|
const config = {};
|
|
562
|
-
|
|
563
|
-
const
|
|
564
|
-
if (
|
|
565
|
-
|
|
566
|
-
const untrustedConfig_inputValues_keys = Object.keys(untrustedConfig_inputValues);
|
|
567
|
-
for (let i = 0, arrayLength = untrustedConfig_inputValues_keys.length; i < arrayLength; i++) {
|
|
568
|
-
const key = untrustedConfig_inputValues_keys[i];
|
|
569
|
-
const untrustedConfig_inputValues_prop = untrustedConfig_inputValues[key];
|
|
570
|
-
if (untrustedIsObject(untrustedConfig_inputValues_prop)) {
|
|
571
|
-
const untrustedConfig_inputValues_prop_object = {};
|
|
572
|
-
if (untrustedConfig_inputValues_prop_object !== undefined && Object.keys(untrustedConfig_inputValues_prop_object).length >= 0) {
|
|
573
|
-
if (untrustedConfig_inputValues_object !== undefined) {
|
|
574
|
-
untrustedConfig_inputValues_object[key] = untrustedConfig_inputValues_prop_object;
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
if (untrustedConfig_inputValues_object !== undefined && Object.keys(untrustedConfig_inputValues_object).length >= 0) {
|
|
580
|
-
config.inputValues = untrustedConfig_inputValues_object;
|
|
581
|
-
}
|
|
586
|
+
const untrustedConfig_request = untrustedConfig.request;
|
|
587
|
+
const referenceFlowRuntimeInvokeActionInputRepresentationValidationError = validate(untrustedConfig_request);
|
|
588
|
+
if (referenceFlowRuntimeInvokeActionInputRepresentationValidationError === null) {
|
|
589
|
+
config.request = untrustedConfig_request;
|
|
582
590
|
}
|
|
583
591
|
return config;
|
|
584
592
|
}
|
|
@@ -644,4 +652,4 @@ withDefaultLuvio((luvio) => {
|
|
|
644
652
|
});
|
|
645
653
|
|
|
646
654
|
export { invokeAction, navigateFlow, resumeFlow, startFlow };
|
|
647
|
-
// version: 1.
|
|
655
|
+
// version: 1.380.0-dev10-0a2876c461
|
package/src/raml/api.raml
CHANGED
|
@@ -130,6 +130,13 @@ types:
|
|
|
130
130
|
type: FlowRuntimeNavigationResult | nil
|
|
131
131
|
required: false
|
|
132
132
|
|
|
133
|
+
FlowRuntimeInvokeActionInputWrapperRepresentation:
|
|
134
|
+
type: object
|
|
135
|
+
properties:
|
|
136
|
+
request:
|
|
137
|
+
type: FlowRuntimeInvokeActionInputRepresentation
|
|
138
|
+
required: true
|
|
139
|
+
|
|
133
140
|
FlowRuntimeInvokeActionInputRepresentation:
|
|
134
141
|
description: Invocable actions input values representation
|
|
135
142
|
type: object
|
|
@@ -148,21 +155,7 @@ types:
|
|
|
148
155
|
type: object
|
|
149
156
|
properties:
|
|
150
157
|
//:
|
|
151
|
-
type:
|
|
152
|
-
|
|
153
|
-
FlowRuntimeInvokeActionOutputRepresentation:
|
|
154
|
-
description: Flow Runtime Invoke Action Output Representation
|
|
155
|
-
type: object
|
|
156
|
-
properties:
|
|
157
|
-
error:
|
|
158
|
-
description: Error
|
|
159
|
-
type: object
|
|
160
|
-
isSuccess:
|
|
161
|
-
description: Error
|
|
162
|
-
type: boolean
|
|
163
|
-
response:
|
|
164
|
-
description: Invoke Action Output Response
|
|
165
|
-
type: object
|
|
158
|
+
type: any
|
|
166
159
|
|
|
167
160
|
/connect/interaction/runtime/startFlow:
|
|
168
161
|
post:
|
|
@@ -210,8 +203,8 @@ types:
|
|
|
210
203
|
description: Success
|
|
211
204
|
body:
|
|
212
205
|
application/json:
|
|
213
|
-
type:
|
|
206
|
+
type: FlowRuntimeResponseRepresentation
|
|
214
207
|
body:
|
|
215
208
|
application/json:
|
|
216
|
-
type:
|
|
217
|
-
(oas-body-name):
|
|
209
|
+
type: FlowRuntimeInvokeActionInputWrapperRepresentation
|
|
210
|
+
(oas-body-name): request
|
package/dist/es/es2018/types/src/generated/types/FlowRuntimeInvokeActionOutputRepresentation.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, BaseFragment as $64$luvio_engine_BaseFragment, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
|
|
2
|
-
export declare const TTL = 500;
|
|
3
|
-
export declare const VERSION = "41d6714e6caad1711509f013815682a9";
|
|
4
|
-
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
5
|
-
export declare const RepresentationType: string;
|
|
6
|
-
export declare function normalize(input: FlowRuntimeInvokeActionOutputRepresentation, existing: FlowRuntimeInvokeActionOutputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): FlowRuntimeInvokeActionOutputRepresentationNormalized;
|
|
7
|
-
export declare const select: () => $64$luvio_engine_BaseFragment;
|
|
8
|
-
export declare function equals(existing: FlowRuntimeInvokeActionOutputRepresentationNormalized, incoming: FlowRuntimeInvokeActionOutputRepresentationNormalized): boolean;
|
|
9
|
-
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
10
|
-
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: FlowRuntimeInvokeActionOutputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
11
|
-
/**
|
|
12
|
-
* Flow Runtime Invoke Action Output Representation
|
|
13
|
-
*
|
|
14
|
-
* Keys:
|
|
15
|
-
* (none)
|
|
16
|
-
*/
|
|
17
|
-
export interface FlowRuntimeInvokeActionOutputRepresentationNormalized {
|
|
18
|
-
/** Error */
|
|
19
|
-
error: {};
|
|
20
|
-
/** Error */
|
|
21
|
-
isSuccess: boolean;
|
|
22
|
-
/** Invoke Action Output Response */
|
|
23
|
-
response: {};
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Flow Runtime Invoke Action Output Representation
|
|
27
|
-
*
|
|
28
|
-
* Keys:
|
|
29
|
-
* (none)
|
|
30
|
-
*/
|
|
31
|
-
export interface FlowRuntimeInvokeActionOutputRepresentation {
|
|
32
|
-
error: {};
|
|
33
|
-
isSuccess: boolean;
|
|
34
|
-
response: {};
|
|
35
|
-
}
|