vr-commons 1.0.119 → 1.0.121
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.
|
@@ -67,19 +67,19 @@ export declare const changeEmailSchema: z.ZodObject<{
|
|
|
67
67
|
}>;
|
|
68
68
|
export declare const requestPhoneChangeSchema: z.ZodObject<{
|
|
69
69
|
body: z.ZodObject<{
|
|
70
|
-
|
|
70
|
+
newContacValue: z.ZodString;
|
|
71
71
|
}, "strip", z.ZodTypeAny, {
|
|
72
|
-
|
|
72
|
+
newContacValue: string;
|
|
73
73
|
}, {
|
|
74
|
-
|
|
74
|
+
newContacValue: string;
|
|
75
75
|
}>;
|
|
76
76
|
}, "strip", z.ZodTypeAny, {
|
|
77
77
|
body: {
|
|
78
|
-
|
|
78
|
+
newContacValue: string;
|
|
79
79
|
};
|
|
80
80
|
}, {
|
|
81
81
|
body: {
|
|
82
|
-
|
|
82
|
+
newContacValue: string;
|
|
83
83
|
};
|
|
84
84
|
}>;
|
|
85
85
|
export declare const verifyPhoneChangeSchema: z.ZodObject<{
|
|
@@ -260,21 +260,21 @@ export declare const loginSchema: z.ZodObject<{
|
|
|
260
260
|
contactValue: z.ZodEffects<z.ZodString, string, string>;
|
|
261
261
|
password: z.ZodString;
|
|
262
262
|
}, "strip", z.ZodTypeAny, {
|
|
263
|
-
password: string;
|
|
264
263
|
contactValue: string;
|
|
265
|
-
}, {
|
|
266
264
|
password: string;
|
|
265
|
+
}, {
|
|
267
266
|
contactValue: string;
|
|
267
|
+
password: string;
|
|
268
268
|
}>;
|
|
269
269
|
}, "strip", z.ZodTypeAny, {
|
|
270
270
|
body: {
|
|
271
|
-
password: string;
|
|
272
271
|
contactValue: string;
|
|
272
|
+
password: string;
|
|
273
273
|
};
|
|
274
274
|
}, {
|
|
275
275
|
body: {
|
|
276
|
-
password: string;
|
|
277
276
|
contactValue: string;
|
|
277
|
+
password: string;
|
|
278
278
|
};
|
|
279
279
|
}>;
|
|
280
280
|
export declare const forgotPasswordSchema: z.ZodObject<{
|
|
@@ -61,7 +61,7 @@ exports.changeEmailSchema = zod_1.z.object({
|
|
|
61
61
|
// Schema for changing phone number specifically
|
|
62
62
|
exports.requestPhoneChangeSchema = zod_1.z.object({
|
|
63
63
|
body: zod_1.z.object({
|
|
64
|
-
|
|
64
|
+
newContacValue: zod_1.z
|
|
65
65
|
.string()
|
|
66
66
|
.regex(exports.phoneRegex, "Invalid phone number format. Must be a valid Rwandan phone number (+250...)"),
|
|
67
67
|
}),
|
|
@@ -7,28 +7,28 @@ export declare const createPlanSchema: z.ZodObject<{
|
|
|
7
7
|
productId: z.ZodString;
|
|
8
8
|
}, "strip", z.ZodTypeAny, {
|
|
9
9
|
userId: string;
|
|
10
|
-
productId: string;
|
|
11
10
|
deviceIds: string[];
|
|
12
11
|
pricingId: string;
|
|
12
|
+
productId: string;
|
|
13
13
|
}, {
|
|
14
14
|
userId: string;
|
|
15
|
-
productId: string;
|
|
16
15
|
deviceIds: string[];
|
|
17
16
|
pricingId: string;
|
|
17
|
+
productId: string;
|
|
18
18
|
}>;
|
|
19
19
|
}, "strip", z.ZodTypeAny, {
|
|
20
20
|
body: {
|
|
21
21
|
userId: string;
|
|
22
|
-
productId: string;
|
|
23
22
|
deviceIds: string[];
|
|
24
23
|
pricingId: string;
|
|
24
|
+
productId: string;
|
|
25
25
|
};
|
|
26
26
|
}, {
|
|
27
27
|
body: {
|
|
28
28
|
userId: string;
|
|
29
|
-
productId: string;
|
|
30
29
|
deviceIds: string[];
|
|
31
30
|
pricingId: string;
|
|
31
|
+
productId: string;
|
|
32
32
|
};
|
|
33
33
|
}>;
|
|
34
34
|
export declare const listPlansSchema: z.ZodObject<{
|
|
@@ -43,49 +43,49 @@ export declare const listPlansSchema: z.ZodObject<{
|
|
|
43
43
|
sortBy: z.ZodOptional<z.ZodEnum<["createdAt", "updatedAt", "nextInstallmentDueAt", "paidAmount", "outstandingAmount"]>>;
|
|
44
44
|
sortOrder: z.ZodOptional<z.ZodEnum<["ASC", "DESC"]>>;
|
|
45
45
|
}, "strip", z.ZodTypeAny, {
|
|
46
|
-
limit: number;
|
|
47
46
|
page: number;
|
|
48
|
-
|
|
47
|
+
limit: number;
|
|
48
|
+
status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
|
|
49
49
|
userId?: string | undefined;
|
|
50
|
-
status?: "ACTIVE" | "DEFAULTED" | "COMPLETED" | "CANCELLED" | undefined;
|
|
51
|
-
isOverdue?: "true" | "false" | undefined;
|
|
52
|
-
sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
|
|
53
|
-
sortOrder?: "DESC" | "ASC" | undefined;
|
|
54
50
|
deviceId?: string | undefined;
|
|
55
|
-
|
|
51
|
+
isOverdue?: "true" | "false" | undefined;
|
|
56
52
|
search?: string | undefined;
|
|
57
|
-
|
|
53
|
+
sortBy?: "createdAt" | "updatedAt" | "nextInstallmentDueAt" | "paidAmount" | "outstandingAmount" | undefined;
|
|
54
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
55
|
+
}, {
|
|
56
|
+
status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
|
|
58
57
|
userId?: string | undefined;
|
|
59
|
-
status?: "ACTIVE" | "DEFAULTED" | "COMPLETED" | "CANCELLED" | undefined;
|
|
60
|
-
isOverdue?: "true" | "false" | undefined;
|
|
61
58
|
page?: string | undefined;
|
|
62
|
-
|
|
63
|
-
sortOrder?: "DESC" | "ASC" | undefined;
|
|
59
|
+
limit?: string | undefined;
|
|
64
60
|
deviceId?: string | undefined;
|
|
61
|
+
isOverdue?: "true" | "false" | undefined;
|
|
62
|
+
search?: string | undefined;
|
|
63
|
+
sortBy?: "createdAt" | "updatedAt" | "nextInstallmentDueAt" | "paidAmount" | "outstandingAmount" | undefined;
|
|
64
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
65
65
|
}>;
|
|
66
66
|
}, "strip", z.ZodTypeAny, {
|
|
67
67
|
query: {
|
|
68
|
-
limit: number;
|
|
69
68
|
page: number;
|
|
70
|
-
|
|
69
|
+
limit: number;
|
|
70
|
+
status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
|
|
71
71
|
userId?: string | undefined;
|
|
72
|
-
status?: "ACTIVE" | "DEFAULTED" | "COMPLETED" | "CANCELLED" | undefined;
|
|
73
|
-
isOverdue?: "true" | "false" | undefined;
|
|
74
|
-
sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
|
|
75
|
-
sortOrder?: "DESC" | "ASC" | undefined;
|
|
76
72
|
deviceId?: string | undefined;
|
|
73
|
+
isOverdue?: "true" | "false" | undefined;
|
|
74
|
+
search?: string | undefined;
|
|
75
|
+
sortBy?: "createdAt" | "updatedAt" | "nextInstallmentDueAt" | "paidAmount" | "outstandingAmount" | undefined;
|
|
76
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
77
77
|
};
|
|
78
78
|
}, {
|
|
79
79
|
query: {
|
|
80
|
-
|
|
81
|
-
limit?: string | undefined;
|
|
80
|
+
status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
|
|
82
81
|
userId?: string | undefined;
|
|
83
|
-
status?: "ACTIVE" | "DEFAULTED" | "COMPLETED" | "CANCELLED" | undefined;
|
|
84
|
-
isOverdue?: "true" | "false" | undefined;
|
|
85
82
|
page?: string | undefined;
|
|
86
|
-
|
|
87
|
-
sortOrder?: "DESC" | "ASC" | undefined;
|
|
83
|
+
limit?: string | undefined;
|
|
88
84
|
deviceId?: string | undefined;
|
|
85
|
+
isOverdue?: "true" | "false" | undefined;
|
|
86
|
+
search?: string | undefined;
|
|
87
|
+
sortBy?: "createdAt" | "updatedAt" | "nextInstallmentDueAt" | "paidAmount" | "outstandingAmount" | undefined;
|
|
88
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
89
89
|
};
|
|
90
90
|
}>;
|
|
91
91
|
export declare const getPlanSchema: z.ZodObject<{
|
|
@@ -117,10 +117,10 @@ export declare const getUserPlansSchema: z.ZodObject<{
|
|
|
117
117
|
status: z.ZodOptional<z.ZodEnum<["ACTIVE", "COMPLETED", "DEFAULTED", "CANCELLED"]>>;
|
|
118
118
|
includeCompleted: z.ZodOptional<z.ZodEnum<["true", "false"]>>;
|
|
119
119
|
}, "strip", z.ZodTypeAny, {
|
|
120
|
-
status?: "ACTIVE" | "
|
|
120
|
+
status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
|
|
121
121
|
includeCompleted?: "true" | "false" | undefined;
|
|
122
122
|
}, {
|
|
123
|
-
status?: "ACTIVE" | "
|
|
123
|
+
status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
|
|
124
124
|
includeCompleted?: "true" | "false" | undefined;
|
|
125
125
|
}>>;
|
|
126
126
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -128,7 +128,7 @@ export declare const getUserPlansSchema: z.ZodObject<{
|
|
|
128
128
|
userId: string;
|
|
129
129
|
};
|
|
130
130
|
query?: {
|
|
131
|
-
status?: "ACTIVE" | "
|
|
131
|
+
status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
|
|
132
132
|
includeCompleted?: "true" | "false" | undefined;
|
|
133
133
|
} | undefined;
|
|
134
134
|
}, {
|
|
@@ -136,7 +136,7 @@ export declare const getUserPlansSchema: z.ZodObject<{
|
|
|
136
136
|
userId: string;
|
|
137
137
|
};
|
|
138
138
|
query?: {
|
|
139
|
-
status?: "ACTIVE" | "
|
|
139
|
+
status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
|
|
140
140
|
includeCompleted?: "true" | "false" | undefined;
|
|
141
141
|
} | undefined;
|
|
142
142
|
}>;
|
|
@@ -168,48 +168,48 @@ export declare const limitedUpdateSchema: z.ZodObject<{
|
|
|
168
168
|
body: z.ZodEffects<z.ZodObject<{
|
|
169
169
|
pricingId: z.ZodString;
|
|
170
170
|
productId: z.ZodString;
|
|
171
|
-
deviceIds: z.ZodArray<z.ZodString, "many"
|
|
171
|
+
deviceIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
172
172
|
userId: z.ZodString;
|
|
173
173
|
}, "strip", z.ZodTypeAny, {
|
|
174
174
|
userId: string;
|
|
175
|
-
productId: string;
|
|
176
|
-
deviceIds: string[];
|
|
177
175
|
pricingId: string;
|
|
176
|
+
productId: string;
|
|
177
|
+
deviceIds?: string[] | undefined;
|
|
178
178
|
}, {
|
|
179
179
|
userId: string;
|
|
180
|
-
productId: string;
|
|
181
|
-
deviceIds: string[];
|
|
182
180
|
pricingId: string;
|
|
181
|
+
productId: string;
|
|
182
|
+
deviceIds?: string[] | undefined;
|
|
183
183
|
}>, {
|
|
184
184
|
userId: string;
|
|
185
|
-
productId: string;
|
|
186
|
-
deviceIds: string[];
|
|
187
185
|
pricingId: string;
|
|
186
|
+
productId: string;
|
|
187
|
+
deviceIds?: string[] | undefined;
|
|
188
188
|
}, {
|
|
189
189
|
userId: string;
|
|
190
|
-
productId: string;
|
|
191
|
-
deviceIds: string[];
|
|
192
190
|
pricingId: string;
|
|
191
|
+
productId: string;
|
|
192
|
+
deviceIds?: string[] | undefined;
|
|
193
193
|
}>;
|
|
194
194
|
}, "strip", z.ZodTypeAny, {
|
|
195
|
+
params: {
|
|
196
|
+
id: string;
|
|
197
|
+
};
|
|
195
198
|
body: {
|
|
196
199
|
userId: string;
|
|
197
|
-
productId: string;
|
|
198
|
-
deviceIds: string[];
|
|
199
200
|
pricingId: string;
|
|
201
|
+
productId: string;
|
|
202
|
+
deviceIds?: string[] | undefined;
|
|
200
203
|
};
|
|
204
|
+
}, {
|
|
201
205
|
params: {
|
|
202
206
|
id: string;
|
|
203
207
|
};
|
|
204
|
-
}, {
|
|
205
208
|
body: {
|
|
206
209
|
userId: string;
|
|
207
|
-
productId: string;
|
|
208
|
-
deviceIds: string[];
|
|
209
210
|
pricingId: string;
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
id: string;
|
|
211
|
+
productId: string;
|
|
212
|
+
deviceIds?: string[] | undefined;
|
|
213
213
|
};
|
|
214
214
|
}>;
|
|
215
215
|
export declare const recordPaymentSchema: z.ZodObject<{
|
|
@@ -229,37 +229,37 @@ export declare const recordPaymentSchema: z.ZodObject<{
|
|
|
229
229
|
}, "strip", z.ZodTypeAny, {
|
|
230
230
|
amount: number;
|
|
231
231
|
provider: "MTN_MOMO" | "AIRTEL_MONEY" | "DPO" | "FLUTTERWAVE";
|
|
232
|
-
metadata?: Record<string, any> | undefined;
|
|
233
232
|
providerReference?: string | undefined;
|
|
234
233
|
customerPhone?: string | undefined;
|
|
234
|
+
metadata?: Record<string, any> | undefined;
|
|
235
235
|
}, {
|
|
236
236
|
amount: number;
|
|
237
237
|
provider: "MTN_MOMO" | "AIRTEL_MONEY" | "DPO" | "FLUTTERWAVE";
|
|
238
|
-
metadata?: Record<string, any> | undefined;
|
|
239
238
|
providerReference?: string | undefined;
|
|
240
239
|
customerPhone?: string | undefined;
|
|
240
|
+
metadata?: Record<string, any> | undefined;
|
|
241
241
|
}>;
|
|
242
242
|
}, "strip", z.ZodTypeAny, {
|
|
243
|
+
params: {
|
|
244
|
+
id: string;
|
|
245
|
+
};
|
|
243
246
|
body: {
|
|
244
247
|
amount: number;
|
|
245
248
|
provider: "MTN_MOMO" | "AIRTEL_MONEY" | "DPO" | "FLUTTERWAVE";
|
|
246
|
-
metadata?: Record<string, any> | undefined;
|
|
247
249
|
providerReference?: string | undefined;
|
|
248
250
|
customerPhone?: string | undefined;
|
|
251
|
+
metadata?: Record<string, any> | undefined;
|
|
249
252
|
};
|
|
253
|
+
}, {
|
|
250
254
|
params: {
|
|
251
255
|
id: string;
|
|
252
256
|
};
|
|
253
|
-
}, {
|
|
254
257
|
body: {
|
|
255
258
|
amount: number;
|
|
256
259
|
provider: "MTN_MOMO" | "AIRTEL_MONEY" | "DPO" | "FLUTTERWAVE";
|
|
257
|
-
metadata?: Record<string, any> | undefined;
|
|
258
260
|
providerReference?: string | undefined;
|
|
259
261
|
customerPhone?: string | undefined;
|
|
260
|
-
|
|
261
|
-
params: {
|
|
262
|
-
id: string;
|
|
262
|
+
metadata?: Record<string, any> | undefined;
|
|
263
263
|
};
|
|
264
264
|
}>;
|
|
265
265
|
export declare const deletePlanSchema: z.ZodObject<{
|
|
@@ -72,7 +72,8 @@ exports.limitedUpdateSchema = zod_1.z.object({
|
|
|
72
72
|
deviceIds: zod_1.z
|
|
73
73
|
.array(zod_1.z.string().uuid("Invalid device ID"))
|
|
74
74
|
.min(1, "At least one device required")
|
|
75
|
-
.max(10, "Maximum 10 devices per plan")
|
|
75
|
+
.max(10, "Maximum 10 devices per plan")
|
|
76
|
+
.optional(),
|
|
76
77
|
// Can reassign to different user before any payments
|
|
77
78
|
userId: zod_1.z.string().uuid("Invalid user ID"),
|
|
78
79
|
})
|