vr-commons 1.0.98 → 1.0.99

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.
@@ -32,55 +32,55 @@ export declare const listPlansSchema: z.ZodObject<{
32
32
  limit: z.ZodDefault<z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>>;
33
33
  userId: z.ZodOptional<z.ZodString>;
34
34
  deviceId: z.ZodOptional<z.ZodString>;
35
- status: z.ZodOptional<z.ZodEnum<["PENDING", "SUCCESSFUL", "FAILED"]>>;
35
+ status: z.ZodOptional<z.ZodEnum<["ACTIVE", "COMPLETED", "DEFAULTED", "CANCELLED"]>>;
36
36
  isOverdue: z.ZodOptional<z.ZodEnum<["true", "false"]>>;
37
37
  search: z.ZodOptional<z.ZodString>;
38
38
  sortBy: z.ZodOptional<z.ZodEnum<["createdAt", "updatedAt", "nextInstallmentDueAt", "paidAmount", "outstandingAmount"]>>;
39
39
  sortOrder: z.ZodOptional<z.ZodEnum<["ASC", "DESC"]>>;
40
40
  }, "strip", z.ZodTypeAny, {
41
- limit: number;
42
41
  page: number;
43
- search?: string | undefined;
42
+ limit: number;
43
+ status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
44
44
  userId?: string | undefined;
45
- status?: "PENDING" | "SUCCESSFUL" | "FAILED" | undefined;
46
- sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
47
- sortOrder?: "DESC" | "ASC" | undefined;
48
45
  deviceId?: string | undefined;
49
46
  isOverdue?: "true" | "false" | undefined;
50
- }, {
51
47
  search?: string | undefined;
52
- limit?: string | undefined;
48
+ sortBy?: "createdAt" | "updatedAt" | "nextInstallmentDueAt" | "paidAmount" | "outstandingAmount" | undefined;
49
+ sortOrder?: "ASC" | "DESC" | undefined;
50
+ }, {
51
+ status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
53
52
  userId?: string | undefined;
54
- status?: "PENDING" | "SUCCESSFUL" | "FAILED" | undefined;
55
53
  page?: string | undefined;
56
- sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
57
- sortOrder?: "DESC" | "ASC" | undefined;
54
+ limit?: string | undefined;
58
55
  deviceId?: string | undefined;
59
56
  isOverdue?: "true" | "false" | undefined;
57
+ search?: string | undefined;
58
+ sortBy?: "createdAt" | "updatedAt" | "nextInstallmentDueAt" | "paidAmount" | "outstandingAmount" | undefined;
59
+ sortOrder?: "ASC" | "DESC" | undefined;
60
60
  }>;
61
61
  }, "strip", z.ZodTypeAny, {
62
62
  query: {
63
- limit: number;
64
63
  page: number;
65
- search?: string | undefined;
64
+ limit: number;
65
+ status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
66
66
  userId?: string | undefined;
67
- status?: "PENDING" | "SUCCESSFUL" | "FAILED" | undefined;
68
- sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
69
- sortOrder?: "DESC" | "ASC" | undefined;
70
67
  deviceId?: string | undefined;
71
68
  isOverdue?: "true" | "false" | undefined;
69
+ search?: string | undefined;
70
+ sortBy?: "createdAt" | "updatedAt" | "nextInstallmentDueAt" | "paidAmount" | "outstandingAmount" | undefined;
71
+ sortOrder?: "ASC" | "DESC" | undefined;
72
72
  };
73
73
  }, {
74
74
  query: {
75
- search?: string | undefined;
76
- limit?: string | undefined;
75
+ status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
77
76
  userId?: string | undefined;
78
- status?: "PENDING" | "SUCCESSFUL" | "FAILED" | undefined;
79
77
  page?: string | undefined;
80
- sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
81
- sortOrder?: "DESC" | "ASC" | undefined;
78
+ limit?: string | undefined;
82
79
  deviceId?: string | undefined;
83
80
  isOverdue?: "true" | "false" | undefined;
81
+ search?: string | undefined;
82
+ sortBy?: "createdAt" | "updatedAt" | "nextInstallmentDueAt" | "paidAmount" | "outstandingAmount" | undefined;
83
+ sortOrder?: "ASC" | "DESC" | undefined;
84
84
  };
85
85
  }>;
86
86
  export declare const getPlanSchema: z.ZodObject<{
@@ -109,13 +109,13 @@ export declare const getUserPlansSchema: z.ZodObject<{
109
109
  userId: string;
110
110
  }>;
111
111
  query: z.ZodOptional<z.ZodObject<{
112
- status: z.ZodOptional<z.ZodEnum<["PENDING", "SUCCESSFUL", "FAILED"]>>;
112
+ status: z.ZodOptional<z.ZodEnum<["ACTIVE", "COMPLETED", "DEFAULTED", "CANCELLED"]>>;
113
113
  includeCompleted: z.ZodOptional<z.ZodEnum<["true", "false"]>>;
114
114
  }, "strip", z.ZodTypeAny, {
115
- status?: "PENDING" | "SUCCESSFUL" | "FAILED" | undefined;
115
+ status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
116
116
  includeCompleted?: "true" | "false" | undefined;
117
117
  }, {
118
- status?: "PENDING" | "SUCCESSFUL" | "FAILED" | undefined;
118
+ status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
119
119
  includeCompleted?: "true" | "false" | undefined;
120
120
  }>>;
121
121
  }, "strip", z.ZodTypeAny, {
@@ -123,7 +123,7 @@ export declare const getUserPlansSchema: z.ZodObject<{
123
123
  userId: string;
124
124
  };
125
125
  query?: {
126
- status?: "PENDING" | "SUCCESSFUL" | "FAILED" | undefined;
126
+ status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
127
127
  includeCompleted?: "true" | "false" | undefined;
128
128
  } | undefined;
129
129
  }, {
@@ -131,7 +131,7 @@ export declare const getUserPlansSchema: z.ZodObject<{
131
131
  userId: string;
132
132
  };
133
133
  query?: {
134
- status?: "PENDING" | "SUCCESSFUL" | "FAILED" | undefined;
134
+ status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
135
135
  includeCompleted?: "true" | "false" | undefined;
136
136
  } | undefined;
137
137
  }>;
@@ -177,21 +177,21 @@ export declare const limitedUpdateSchema: z.ZodObject<{
177
177
  pricingId?: string | undefined;
178
178
  }>;
179
179
  }, "strip", z.ZodTypeAny, {
180
+ params: {
181
+ id: string;
182
+ };
180
183
  body: {
181
184
  userId?: string | undefined;
182
185
  pricingId?: string | undefined;
183
186
  };
187
+ }, {
184
188
  params: {
185
189
  id: string;
186
190
  };
187
- }, {
188
191
  body: {
189
192
  userId?: string | undefined;
190
193
  pricingId?: string | undefined;
191
194
  };
192
- params: {
193
- id: string;
194
- };
195
195
  }>;
196
196
  export declare const recordPaymentSchema: z.ZodObject<{
197
197
  params: z.ZodObject<{
@@ -209,33 +209,33 @@ export declare const recordPaymentSchema: z.ZodObject<{
209
209
  }, "strip", z.ZodTypeAny, {
210
210
  amount: number;
211
211
  provider: "mtn_momo" | "airtel_money";
212
- metadata?: Record<string, any> | undefined;
213
212
  providerReference?: string | undefined;
213
+ metadata?: Record<string, any> | undefined;
214
214
  }, {
215
215
  amount: number;
216
216
  provider: "mtn_momo" | "airtel_money";
217
- metadata?: Record<string, any> | undefined;
218
217
  providerReference?: string | undefined;
218
+ metadata?: Record<string, any> | undefined;
219
219
  }>;
220
220
  }, "strip", z.ZodTypeAny, {
221
+ params: {
222
+ id: string;
223
+ };
221
224
  body: {
222
225
  amount: number;
223
226
  provider: "mtn_momo" | "airtel_money";
224
- metadata?: Record<string, any> | undefined;
225
227
  providerReference?: string | undefined;
228
+ metadata?: Record<string, any> | undefined;
226
229
  };
230
+ }, {
227
231
  params: {
228
232
  id: string;
229
233
  };
230
- }, {
231
234
  body: {
232
235
  amount: number;
233
236
  provider: "mtn_momo" | "airtel_money";
234
- metadata?: Record<string, any> | undefined;
235
237
  providerReference?: string | undefined;
236
- };
237
- params: {
238
- id: string;
238
+ metadata?: Record<string, any> | undefined;
239
239
  };
240
240
  }>;
241
241
  export declare const deletePlanSchema: z.ZodObject<{
@@ -21,7 +21,7 @@ exports.listPlansSchema = zod_1.z.object({
21
21
  limit: zod_1.z.string().regex(/^\d+$/).transform(Number).optional().default("20"),
22
22
  userId: zod_1.z.string().uuid().optional(),
23
23
  deviceId: zod_1.z.string().uuid().optional(),
24
- status: zod_1.z.enum(vr_models_1.PAYMENT_STATUS).optional(),
24
+ status: zod_1.z.enum(vr_models_1.PAYMENT_PLAN_STATUS).optional(),
25
25
  isOverdue: zod_1.z.enum(["true", "false"]).optional(),
26
26
  search: zod_1.z.string().optional(),
27
27
  sortBy: zod_1.z
@@ -47,7 +47,7 @@ exports.getUserPlansSchema = zod_1.z.object({
47
47
  }),
48
48
  query: zod_1.z
49
49
  .object({
50
- status: zod_1.z.enum(vr_models_1.PAYMENT_STATUS).optional(),
50
+ status: zod_1.z.enum(vr_models_1.PAYMENT_PLAN_STATUS).optional(),
51
51
  includeCompleted: zod_1.z.enum(["true", "false"]).optional(),
52
52
  })
53
53
  .optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vr-commons",
3
- "version": "1.0.98",
3
+ "version": "1.0.99",
4
4
  "description": "Shared functions package",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",