vr-commons 1.0.84 → 1.0.85

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.
@@ -146,42 +146,42 @@ export declare const verifyOtpSchema: z.ZodObject<{
146
146
  body: z.ZodEffects<z.ZodObject<{
147
147
  phoneNumber: z.ZodString;
148
148
  otp: z.ZodString;
149
- firstName: z.ZodString;
150
- lastName: z.ZodString;
149
+ firstName: z.ZodOptional<z.ZodString>;
150
+ lastName: z.ZodOptional<z.ZodString>;
151
151
  }, "strip", z.ZodTypeAny, {
152
152
  phoneNumber: string;
153
- firstName: string;
154
- lastName: string;
155
153
  otp: string;
154
+ firstName?: string | undefined;
155
+ lastName?: string | undefined;
156
156
  }, {
157
157
  phoneNumber: string;
158
- firstName: string;
159
- lastName: string;
160
158
  otp: string;
159
+ firstName?: string | undefined;
160
+ lastName?: string | undefined;
161
161
  }>, {
162
162
  phoneNumber: string;
163
- firstName: string;
164
- lastName: string;
165
163
  otp: string;
164
+ firstName?: string | undefined;
165
+ lastName?: string | undefined;
166
166
  }, {
167
167
  phoneNumber: string;
168
- firstName: string;
169
- lastName: string;
170
168
  otp: string;
169
+ firstName?: string | undefined;
170
+ lastName?: string | undefined;
171
171
  }>;
172
172
  }, "strip", z.ZodTypeAny, {
173
173
  body: {
174
174
  phoneNumber: string;
175
- firstName: string;
176
- lastName: string;
177
175
  otp: string;
176
+ firstName?: string | undefined;
177
+ lastName?: string | undefined;
178
178
  };
179
179
  }, {
180
180
  body: {
181
181
  phoneNumber: string;
182
- firstName: string;
183
- lastName: string;
184
182
  otp: string;
183
+ firstName?: string | undefined;
184
+ lastName?: string | undefined;
185
185
  };
186
186
  }>;
187
187
  export declare const resendOtpSchema: z.ZodObject<{
@@ -67,11 +67,13 @@ exports.verifyOtpSchema = zod_1.z.object({
67
67
  firstName: zod_1.z
68
68
  .string()
69
69
  .min(2, "First name must be at least 2 characters")
70
- .max(50),
70
+ .max(50)
71
+ .optional(),
71
72
  lastName: zod_1.z
72
73
  .string()
73
74
  .min(2, "Last name must be at least 2 characters")
74
- .max(50),
75
+ .max(50)
76
+ .optional(),
75
77
  })
76
78
  .refine((data) => {
77
79
  // If it's a new user, firstName and lastName are required
@@ -1,39 +1,39 @@
1
1
  import { z } from "zod";
2
2
  export declare const listUserPaymentPlansSchema: z.ZodObject<{
3
3
  query: z.ZodObject<{
4
- status: z.ZodOptional<z.ZodEnum<["PENDING", "SUCCESSFUL", "FAILED"]>>;
4
+ status: z.ZodOptional<z.ZodEnum<["ACTIVE", "COMPLETED", "DEFAULTED", "CANCELLED"]>>;
5
5
  page: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, number, string | undefined>, z.ZodNumber>;
6
6
  limit: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, number, string | undefined>, z.ZodNumber>;
7
7
  sortBy: z.ZodOptional<z.ZodEnum<["createdAt", "updatedAt", "nextInstallmentDueAt", "status"]>>;
8
8
  sortOrder: z.ZodOptional<z.ZodEnum<["ASC", "DESC"]>>;
9
9
  }, "strip", z.ZodTypeAny, {
10
- limit: number;
11
10
  page: number;
12
- status?: "PENDING" | "SUCCESSFUL" | "FAILED" | undefined;
13
- sortBy?: "createdAt" | "updatedAt" | "status" | "nextInstallmentDueAt" | undefined;
14
- sortOrder?: "DESC" | "ASC" | undefined;
11
+ limit: number;
12
+ status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
13
+ sortBy?: "status" | "createdAt" | "updatedAt" | "nextInstallmentDueAt" | undefined;
14
+ sortOrder?: "ASC" | "DESC" | undefined;
15
15
  }, {
16
- limit?: string | undefined;
17
- status?: "PENDING" | "SUCCESSFUL" | "FAILED" | undefined;
16
+ status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
18
17
  page?: string | undefined;
19
- sortBy?: "createdAt" | "updatedAt" | "status" | "nextInstallmentDueAt" | undefined;
20
- sortOrder?: "DESC" | "ASC" | undefined;
18
+ limit?: string | undefined;
19
+ sortBy?: "status" | "createdAt" | "updatedAt" | "nextInstallmentDueAt" | undefined;
20
+ sortOrder?: "ASC" | "DESC" | undefined;
21
21
  }>;
22
22
  }, "strip", z.ZodTypeAny, {
23
23
  query: {
24
- limit: number;
25
24
  page: number;
26
- status?: "PENDING" | "SUCCESSFUL" | "FAILED" | undefined;
27
- sortBy?: "createdAt" | "updatedAt" | "status" | "nextInstallmentDueAt" | undefined;
28
- sortOrder?: "DESC" | "ASC" | undefined;
25
+ limit: number;
26
+ status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
27
+ sortBy?: "status" | "createdAt" | "updatedAt" | "nextInstallmentDueAt" | undefined;
28
+ sortOrder?: "ASC" | "DESC" | undefined;
29
29
  };
30
30
  }, {
31
31
  query: {
32
- limit?: string | undefined;
33
- status?: "PENDING" | "SUCCESSFUL" | "FAILED" | undefined;
32
+ status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
34
33
  page?: string | undefined;
35
- sortBy?: "createdAt" | "updatedAt" | "status" | "nextInstallmentDueAt" | undefined;
36
- sortOrder?: "DESC" | "ASC" | undefined;
34
+ limit?: string | undefined;
35
+ sortBy?: "status" | "createdAt" | "updatedAt" | "nextInstallmentDueAt" | undefined;
36
+ sortOrder?: "ASC" | "DESC" | undefined;
37
37
  };
38
38
  }>;
39
39
  export declare const getUserPaymentPlanSchema: z.ZodObject<{
@@ -6,7 +6,7 @@ const vr_models_1 = require("vr-models");
6
6
  const uuidSchema = zod_1.z.string().uuid("Invalid ID format");
7
7
  exports.listUserPaymentPlansSchema = zod_1.z.object({
8
8
  query: zod_1.z.object({
9
- status: zod_1.z.enum(vr_models_1.PAYMENT_STATUS).optional(),
9
+ status: zod_1.z.enum(vr_models_1.PAYMENT_PLAN_STATUS).optional(),
10
10
  page: zod_1.z
11
11
  .string()
12
12
  .optional()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vr-commons",
3
- "version": "1.0.84",
3
+ "version": "1.0.85",
4
4
  "description": "Shared functions package",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",