@ondc/automation-mock-runner 1.3.15 → 1.3.17

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.
@@ -13,6 +13,7 @@ export declare class MockRunner {
13
13
  domain: string;
14
14
  version: string;
15
15
  flowId: string;
16
+ config_version?: string | undefined;
16
17
  };
17
18
  transaction_data: {
18
19
  transaction_id: string;
@@ -456,7 +456,7 @@ class MockRunner {
456
456
  const version = this.config.meta?.version || "2.0.0";
457
457
  const majorVersion = parseInt(version.split(".")[0], 10);
458
458
  // set city code
459
- const cityCode = MockRunner.getIdFromSession(sessionData, "city_code") || "*";
459
+ const cityCode = MockRunner.getIdFromSession(sessionData, "city_code") ?? "*";
460
460
  if (majorVersion === 1) {
461
461
  return {
462
462
  ...baseContext,
@@ -41,6 +41,7 @@ export declare function generatePlaygroundConfigFromFlowConfig(payloads: Payload
41
41
  domain: string;
42
42
  version: string;
43
43
  flowId: string;
44
+ config_version?: string | undefined;
44
45
  };
45
46
  transaction_data: {
46
47
  transaction_id: string;
@@ -7,6 +7,7 @@ export declare const MetaSchema: z.ZodObject<{
7
7
  domain: z.ZodString;
8
8
  version: z.ZodString;
9
9
  flowId: z.ZodString;
10
+ config_version: z.ZodOptional<z.ZodString>;
10
11
  }, z.core.$strip>;
11
12
  export declare const TransactionDataSchema: z.ZodObject<{
12
13
  transaction_id: z.ZodString;
@@ -63,6 +64,7 @@ export declare const MockPlaygroundConfigSchema: z.ZodObject<{
63
64
  domain: z.ZodString;
64
65
  version: z.ZodString;
65
66
  flowId: z.ZodString;
67
+ config_version: z.ZodOptional<z.ZodString>;
66
68
  }, z.core.$strip>;
67
69
  transaction_data: z.ZodObject<{
68
70
  transaction_id: z.ZodString;
@@ -8,6 +8,7 @@ exports.MetaSchema = zod_1.z.object({
8
8
  domain: zod_1.z.string().min(1, "Domain is required"),
9
9
  version: zod_1.z.string().min(1, "Version is required"),
10
10
  flowId: zod_1.z.string().min(1, "Flow ID is required"),
11
+ config_version: zod_1.z.string().optional(),
11
12
  });
12
13
  exports.TransactionDataSchema = zod_1.z.object({
13
14
  transaction_id: zod_1.z.string().min(1, "Transaction ID is required"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ondc/automation-mock-runner",
3
- "version": "1.3.15",
3
+ "version": "1.3.17",
4
4
  "description": "A TypeScript library for ONDC automation mock runner",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",