@ondc/automation-mock-runner 1.3.0 → 1.3.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.
@@ -153,6 +153,8 @@ async function getMinifiedCode(base64Code) {
153
153
  * ```
154
154
  */
155
155
  async function generatePlaygroundConfigFromFlowConfig(payloads, flowConfig) {
156
+ flowConfig = JSON.parse(JSON.stringify(flowConfig));
157
+ flowConfig.sequence = flowConfig.sequence.filter((step) => step.type === "HTML_FORM" || step.type === "DYNAMIC_FORM");
156
158
  if (payloads.length < flowConfig.sequence.length) {
157
159
  throw new Error(`Insufficient payloads provided. Expected at least ${flowConfig.sequence.length}, but got ${payloads.length}`);
158
160
  }
@@ -1,13 +1,3 @@
1
- export interface FormFieldConfigType {
2
- name: string;
3
- label: string;
4
- type: "text" | "select" | "textarea" | "list";
5
- payloadField: string;
6
- values?: string[];
7
- defaultValue?: string;
8
- input?: FormFieldConfigType[];
9
- }
10
- export type FormConfigType = FormFieldConfigType[];
11
1
  export interface FetchFlowsResponse {
12
2
  domain: Domain[];
13
3
  }
@@ -29,7 +19,7 @@ export interface SequenceStep {
29
19
  pair: string | null;
30
20
  owner: "BAP" | "BPP";
31
21
  stackable?: boolean;
32
- input?: FormConfigType;
22
+ input?: any;
33
23
  expect?: boolean;
34
24
  label?: string;
35
25
  force_proceed?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ondc/automation-mock-runner",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "A TypeScript library for ONDC automation mock runner",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",