@salesforce/lds-adapters-platform-flow 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.
@@ -100,6 +100,24 @@ function stableJSONStringify(node) {
100
100
  }
101
101
  return '{' + out + '}';
102
102
  }
103
+ function generateParamConfigMetadata(name, required, coerceFn) {
104
+ return {
105
+ name,
106
+ required,
107
+ coerceFn,
108
+ };
109
+ }
110
+ function buildAdapterValidationConfig(displayName, paramsMeta) {
111
+ const required = paramsMeta.filter(p => p.required).map(p => p.name);
112
+ const optional = paramsMeta.filter(p => !p.required).map(p => p.name);
113
+ return {
114
+ displayName,
115
+ parameters: {
116
+ required,
117
+ optional,
118
+ }
119
+ };
120
+ }
103
121
  const keyPrefix = 'FlowRuntime';
104
122
 
105
123
  const RepresentationType = 'FlowRuntimeResponseRepresentation';
@@ -133,13 +151,16 @@ function createResourceRequest$2(config) {
133
151
  };
134
152
  }
135
153
 
136
- const startFlow_ConfigPropertyNames = {
137
- displayName: 'startFlow',
138
- parameters: {
139
- required: ['flowDevName'],
140
- optional: ['flowVersionId', 'arguments', 'enableTrace', 'enableRollbackMode', 'debugAsUserId']
141
- }
142
- };
154
+ const adapterName$2 = 'startFlow';
155
+ const startFlow_ConfigPropertyMetadata = [
156
+ generateParamConfigMetadata('flowDevName', true),
157
+ generateParamConfigMetadata('flowVersionId', false),
158
+ generateParamConfigMetadata('arguments', false),
159
+ generateParamConfigMetadata('enableTrace', false),
160
+ generateParamConfigMetadata('enableRollbackMode', false),
161
+ generateParamConfigMetadata('debugAsUserId', false),
162
+ ];
163
+ const startFlow_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, startFlow_ConfigPropertyMetadata);
143
164
  function createResourceParams$2(config) {
144
165
  const resourceParams = {
145
166
  body: {
@@ -367,13 +388,11 @@ function validate(obj, path = 'FlowRuntimeNavigateFlowRepresentation') {
367
388
  return v_error === undefined ? null : v_error;
368
389
  }
369
390
 
370
- const navigateFlow_ConfigPropertyNames = {
371
- displayName: 'navigateFlow',
372
- parameters: {
373
- required: ['request'],
374
- optional: []
375
- }
376
- };
391
+ const adapterName$1 = 'navigateFlow';
392
+ const navigateFlow_ConfigPropertyMetadata = [
393
+ generateParamConfigMetadata('request', true),
394
+ ];
395
+ const navigateFlow_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, navigateFlow_ConfigPropertyMetadata);
377
396
  function createResourceParams$1(config) {
378
397
  const resourceParams = {
379
398
  body: {
@@ -456,13 +475,11 @@ function createResourceRequest(config) {
456
475
  };
457
476
  }
458
477
 
459
- const resumeFlow_ConfigPropertyNames = {
460
- displayName: 'resumeFlow',
461
- parameters: {
462
- required: ['pausedInterviewId'],
463
- optional: []
464
- }
465
- };
478
+ const adapterName = 'resumeFlow';
479
+ const resumeFlow_ConfigPropertyMetadata = [
480
+ generateParamConfigMetadata('pausedInterviewId', true),
481
+ ];
482
+ const resumeFlow_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, resumeFlow_ConfigPropertyMetadata);
466
483
  function createResourceParams(config) {
467
484
  const resourceParams = {
468
485
  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 = "FlowRuntime";
@@ -1,9 +1,10 @@
1
- import { AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig, Untrusted as adapter$45$utils_Untrusted } from './adapter-utils';
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 { FlowRuntimeNavigateFlowRepresentation as types_FlowRuntimeNavigateFlowRepresentation_FlowRuntimeNavigateFlowRepresentation } from '../types/FlowRuntimeNavigateFlowRepresentation';
3
4
  import { ResourceRequestConfig as resources_postConnectInteractionRuntimeNavigateFlow_ResourceRequestConfig } from '../resources/postConnectInteractionRuntimeNavigateFlow';
4
- 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';
5
5
  import { FlowRuntimeResponseRepresentation as types_FlowRuntimeResponseRepresentation_FlowRuntimeResponseRepresentation } from '../types/FlowRuntimeResponseRepresentation';
6
6
  export declare const adapterName = "navigateFlow";
7
+ export declare const navigateFlow_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
7
8
  export declare const navigateFlow_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
8
9
  export interface NavigateFlowConfig {
9
10
  request: types_FlowRuntimeNavigateFlowRepresentation_FlowRuntimeNavigateFlowRepresentation;
@@ -1,8 +1,9 @@
1
- import { AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig, Untrusted as adapter$45$utils_Untrusted } from './adapter-utils';
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_postConnectInteractionRuntimeResumeFlow_ResourceRequestConfig } from '../resources/postConnectInteractionRuntimeResumeFlow';
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 { FlowRuntimeResponseRepresentation as types_FlowRuntimeResponseRepresentation_FlowRuntimeResponseRepresentation } from '../types/FlowRuntimeResponseRepresentation';
5
5
  export declare const adapterName = "resumeFlow";
6
+ export declare const resumeFlow_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
6
7
  export declare const resumeFlow_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
7
8
  export interface ResumeFlowConfig {
8
9
  pausedInterviewId: string;
@@ -1,8 +1,9 @@
1
- import { AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig, Untrusted as adapter$45$utils_Untrusted } from './adapter-utils';
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_postConnectInteractionRuntimeStartFlow_ResourceRequestConfig } from '../resources/postConnectInteractionRuntimeStartFlow';
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 { FlowRuntimeResponseRepresentation as types_FlowRuntimeResponseRepresentation_FlowRuntimeResponseRepresentation } from '../types/FlowRuntimeResponseRepresentation';
5
5
  export declare const adapterName = "startFlow";
6
+ export declare const startFlow_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
6
7
  export declare const startFlow_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
7
8
  export interface StartFlowConfig {
8
9
  flowDevName: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-platform-flow",
3
- "version": "1.213.0",
3
+ "version": "1.213.2",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "Flow Runtime APIs",
6
6
  "main": "dist/es/es2018/platform-flow.js",
package/sfdc/index.js CHANGED
@@ -110,6 +110,24 @@ function stableJSONStringify(node) {
110
110
  }
111
111
  return '{' + out + '}';
112
112
  }
113
+ function generateParamConfigMetadata(name, required, coerceFn) {
114
+ return {
115
+ name,
116
+ required,
117
+ coerceFn,
118
+ };
119
+ }
120
+ function buildAdapterValidationConfig(displayName, paramsMeta) {
121
+ const required = paramsMeta.filter(p => p.required).map(p => p.name);
122
+ const optional = paramsMeta.filter(p => !p.required).map(p => p.name);
123
+ return {
124
+ displayName,
125
+ parameters: {
126
+ required,
127
+ optional,
128
+ }
129
+ };
130
+ }
113
131
  const keyPrefix = 'FlowRuntime';
114
132
 
115
133
  const RepresentationType = 'FlowRuntimeResponseRepresentation';
@@ -271,13 +289,10 @@ function validate(obj, path = 'FlowRuntimeNavigateFlowRepresentation') {
271
289
  }
272
290
 
273
291
  const adapterName$2 = 'navigateFlow';
274
- const navigateFlow_ConfigPropertyNames = {
275
- displayName: 'navigateFlow',
276
- parameters: {
277
- required: ['request'],
278
- optional: []
279
- }
280
- };
292
+ const navigateFlow_ConfigPropertyMetadata = [
293
+ generateParamConfigMetadata('request', true),
294
+ ];
295
+ const navigateFlow_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, navigateFlow_ConfigPropertyMetadata);
281
296
  function createResourceParams$2(config) {
282
297
  const resourceParams = {
283
298
  body: {
@@ -361,13 +376,10 @@ function createResourceRequest$1(config) {
361
376
  }
362
377
 
363
378
  const adapterName$1 = 'resumeFlow';
364
- const resumeFlow_ConfigPropertyNames = {
365
- displayName: 'resumeFlow',
366
- parameters: {
367
- required: ['pausedInterviewId'],
368
- optional: []
369
- }
370
- };
379
+ const resumeFlow_ConfigPropertyMetadata = [
380
+ generateParamConfigMetadata('pausedInterviewId', true),
381
+ ];
382
+ const resumeFlow_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, resumeFlow_ConfigPropertyMetadata);
371
383
  function createResourceParams$1(config) {
372
384
  const resourceParams = {
373
385
  body: {
@@ -449,13 +461,15 @@ function createResourceRequest(config) {
449
461
  }
450
462
 
451
463
  const adapterName = 'startFlow';
452
- const startFlow_ConfigPropertyNames = {
453
- displayName: 'startFlow',
454
- parameters: {
455
- required: ['flowDevName'],
456
- optional: ['flowVersionId', 'arguments', 'enableTrace', 'enableRollbackMode', 'debugAsUserId']
457
- }
458
- };
464
+ const startFlow_ConfigPropertyMetadata = [
465
+ generateParamConfigMetadata('flowDevName', true),
466
+ generateParamConfigMetadata('flowVersionId', false),
467
+ generateParamConfigMetadata('arguments', false),
468
+ generateParamConfigMetadata('enableTrace', false),
469
+ generateParamConfigMetadata('enableRollbackMode', false),
470
+ generateParamConfigMetadata('debugAsUserId', false),
471
+ ];
472
+ const startFlow_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, startFlow_ConfigPropertyMetadata);
459
473
  function createResourceParams(config) {
460
474
  const resourceParams = {
461
475
  body: {
@@ -551,4 +565,4 @@ withDefaultLuvio((luvio) => {
551
565
  });
552
566
 
553
567
  export { navigateFlow, resumeFlow, startFlow };
554
- // version: 1.213.0-951602080
568
+ // version: 1.213.2-1eb996209