vr-commons 1.0.133 → 1.0.135
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.
- package/dist/validations/account.validations.d.ts +16 -16
- package/dist/validations/admin.devicePayment.validations.d.ts +37 -27
- package/dist/validations/admin.devicePayment.validations.js +4 -4
- package/dist/validations/admin.devices.validations.d.ts +16 -16
- package/dist/validations/appSpecs.validations.d.ts +4 -4
- package/dist/validations/appeals.validations.d.ts +8 -8
- package/dist/validations/bans.validations.d.ts +8 -8
- package/dist/validations/devicePaymentPlan.validations.d.ts +9 -9
- package/dist/validations/moderation.validations.d.ts +57 -57
- package/dist/validations/payinstallment.validations.d.ts +38 -23
- package/dist/validations/payinstallment.validations.js +10 -6
- package/dist/validations/pricing.validations.d.ts +30 -30
- package/dist/validations/pricings.validations.d.ts +8 -8
- package/dist/validations/product.validations.d.ts +12 -12
- package/dist/validations/profiles.validations.d.ts +22 -22
- package/dist/validations/suspensions.validations.d.ts +8 -8
- package/dist/validations/users.admin.validations.d.ts +52 -52
- package/package.json +2 -2
|
@@ -49,19 +49,19 @@ export declare const getUserRestrictionsSchema: z.ZodObject<{
|
|
|
49
49
|
includeResolved?: "true" | "false" | undefined;
|
|
50
50
|
}>;
|
|
51
51
|
}, "strip", z.ZodTypeAny, {
|
|
52
|
-
query: {
|
|
53
|
-
includeResolved?: "true" | "false" | undefined;
|
|
54
|
-
};
|
|
55
52
|
params: {
|
|
56
53
|
userId: string;
|
|
57
54
|
};
|
|
58
|
-
}, {
|
|
59
55
|
query: {
|
|
60
56
|
includeResolved?: "true" | "false" | undefined;
|
|
61
57
|
};
|
|
58
|
+
}, {
|
|
62
59
|
params: {
|
|
63
60
|
userId: string;
|
|
64
61
|
};
|
|
62
|
+
query: {
|
|
63
|
+
includeResolved?: "true" | "false" | undefined;
|
|
64
|
+
};
|
|
65
65
|
}>;
|
|
66
66
|
export declare const getUserBansSchema: z.ZodObject<{
|
|
67
67
|
params: z.ZodObject<{
|
|
@@ -79,19 +79,19 @@ export declare const getUserBansSchema: z.ZodObject<{
|
|
|
79
79
|
includeResolved?: "true" | "false" | undefined;
|
|
80
80
|
}>;
|
|
81
81
|
}, "strip", z.ZodTypeAny, {
|
|
82
|
-
query: {
|
|
83
|
-
includeResolved?: "true" | "false" | undefined;
|
|
84
|
-
};
|
|
85
82
|
params: {
|
|
86
83
|
userId: string;
|
|
87
84
|
};
|
|
88
|
-
}, {
|
|
89
85
|
query: {
|
|
90
86
|
includeResolved?: "true" | "false" | undefined;
|
|
91
87
|
};
|
|
88
|
+
}, {
|
|
92
89
|
params: {
|
|
93
90
|
userId: string;
|
|
94
91
|
};
|
|
92
|
+
query: {
|
|
93
|
+
includeResolved?: "true" | "false" | undefined;
|
|
94
|
+
};
|
|
95
95
|
}>;
|
|
96
96
|
export declare const getUserSuspensionsSchema: z.ZodObject<{
|
|
97
97
|
params: z.ZodObject<{
|
|
@@ -112,21 +112,21 @@ export declare const getUserSuspensionsSchema: z.ZodObject<{
|
|
|
112
112
|
includeResolved?: "true" | "false" | undefined;
|
|
113
113
|
}>;
|
|
114
114
|
}, "strip", z.ZodTypeAny, {
|
|
115
|
+
params: {
|
|
116
|
+
userId: string;
|
|
117
|
+
};
|
|
115
118
|
query: {
|
|
116
119
|
status?: "active" | "expired" | "revoked" | undefined;
|
|
117
120
|
includeResolved?: "true" | "false" | undefined;
|
|
118
121
|
};
|
|
122
|
+
}, {
|
|
119
123
|
params: {
|
|
120
124
|
userId: string;
|
|
121
125
|
};
|
|
122
|
-
}, {
|
|
123
126
|
query: {
|
|
124
127
|
status?: "active" | "expired" | "revoked" | undefined;
|
|
125
128
|
includeResolved?: "true" | "false" | undefined;
|
|
126
129
|
};
|
|
127
|
-
params: {
|
|
128
|
-
userId: string;
|
|
129
|
-
};
|
|
130
130
|
}>;
|
|
131
131
|
export declare const submitBanAppealSchema: z.ZodObject<{
|
|
132
132
|
params: z.ZodObject<{
|
|
@@ -144,19 +144,19 @@ export declare const submitBanAppealSchema: z.ZodObject<{
|
|
|
144
144
|
appealReason: string;
|
|
145
145
|
}>;
|
|
146
146
|
}, "strip", z.ZodTypeAny, {
|
|
147
|
-
body: {
|
|
148
|
-
appealReason: string;
|
|
149
|
-
};
|
|
150
147
|
params: {
|
|
151
148
|
banId: string;
|
|
152
149
|
};
|
|
153
|
-
}, {
|
|
154
150
|
body: {
|
|
155
151
|
appealReason: string;
|
|
156
152
|
};
|
|
153
|
+
}, {
|
|
157
154
|
params: {
|
|
158
155
|
banId: string;
|
|
159
156
|
};
|
|
157
|
+
body: {
|
|
158
|
+
appealReason: string;
|
|
159
|
+
};
|
|
160
160
|
}>;
|
|
161
161
|
export declare const submitSuspensionAppealSchema: z.ZodObject<{
|
|
162
162
|
params: z.ZodObject<{
|
|
@@ -174,19 +174,19 @@ export declare const submitSuspensionAppealSchema: z.ZodObject<{
|
|
|
174
174
|
appealReason: string;
|
|
175
175
|
}>;
|
|
176
176
|
}, "strip", z.ZodTypeAny, {
|
|
177
|
-
body: {
|
|
178
|
-
appealReason: string;
|
|
179
|
-
};
|
|
180
177
|
params: {
|
|
181
178
|
suspensionId: string;
|
|
182
179
|
};
|
|
183
|
-
}, {
|
|
184
180
|
body: {
|
|
185
181
|
appealReason: string;
|
|
186
182
|
};
|
|
183
|
+
}, {
|
|
187
184
|
params: {
|
|
188
185
|
suspensionId: string;
|
|
189
186
|
};
|
|
187
|
+
body: {
|
|
188
|
+
appealReason: string;
|
|
189
|
+
};
|
|
190
190
|
}>;
|
|
191
191
|
export declare const createBanSchema: z.ZodObject<{
|
|
192
192
|
params: z.ZodObject<{
|
|
@@ -207,21 +207,21 @@ export declare const createBanSchema: z.ZodObject<{
|
|
|
207
207
|
isPermanent?: boolean | undefined;
|
|
208
208
|
}>;
|
|
209
209
|
}, "strip", z.ZodTypeAny, {
|
|
210
|
+
params: {
|
|
211
|
+
userId: string;
|
|
212
|
+
};
|
|
210
213
|
body: {
|
|
211
214
|
reason: string;
|
|
212
215
|
isPermanent: boolean;
|
|
213
216
|
};
|
|
217
|
+
}, {
|
|
214
218
|
params: {
|
|
215
219
|
userId: string;
|
|
216
220
|
};
|
|
217
|
-
}, {
|
|
218
221
|
body: {
|
|
219
222
|
reason: string;
|
|
220
223
|
isPermanent?: boolean | undefined;
|
|
221
224
|
};
|
|
222
|
-
params: {
|
|
223
|
-
userId: string;
|
|
224
|
-
};
|
|
225
225
|
}>;
|
|
226
226
|
export declare const createSuspensionSchema: z.ZodObject<{
|
|
227
227
|
params: z.ZodObject<{
|
|
@@ -242,21 +242,21 @@ export declare const createSuspensionSchema: z.ZodObject<{
|
|
|
242
242
|
endsAt: string;
|
|
243
243
|
}>;
|
|
244
244
|
}, "strip", z.ZodTypeAny, {
|
|
245
|
+
params: {
|
|
246
|
+
userId: string;
|
|
247
|
+
};
|
|
245
248
|
body: {
|
|
246
249
|
reason: string;
|
|
247
250
|
endsAt: string;
|
|
248
251
|
};
|
|
252
|
+
}, {
|
|
249
253
|
params: {
|
|
250
254
|
userId: string;
|
|
251
255
|
};
|
|
252
|
-
}, {
|
|
253
256
|
body: {
|
|
254
257
|
reason: string;
|
|
255
258
|
endsAt: string;
|
|
256
259
|
};
|
|
257
|
-
params: {
|
|
258
|
-
userId: string;
|
|
259
|
-
};
|
|
260
260
|
}>;
|
|
261
261
|
export declare const listBansSchema: z.ZodObject<{
|
|
262
262
|
query: z.ZodEffects<z.ZodObject<{
|
|
@@ -275,22 +275,22 @@ export declare const listBansSchema: z.ZodObject<{
|
|
|
275
275
|
}, "strip", z.ZodTypeAny, {
|
|
276
276
|
limit: number;
|
|
277
277
|
page: number;
|
|
278
|
+
status?: "active" | "revoked" | undefined;
|
|
278
279
|
search?: string | undefined;
|
|
279
280
|
userId?: string | undefined;
|
|
280
281
|
isPermanent?: "true" | "false" | undefined;
|
|
281
282
|
appealStatus?: "pending" | "approved" | "rejected" | undefined;
|
|
282
|
-
status?: "active" | "revoked" | undefined;
|
|
283
283
|
sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
|
|
284
284
|
fromDate?: string | undefined;
|
|
285
285
|
toDate?: string | undefined;
|
|
286
286
|
sortOrder?: "DESC" | "ASC" | undefined;
|
|
287
287
|
}, {
|
|
288
|
+
status?: "active" | "revoked" | undefined;
|
|
288
289
|
search?: string | undefined;
|
|
289
290
|
limit?: string | undefined;
|
|
290
291
|
userId?: string | undefined;
|
|
291
292
|
isPermanent?: "true" | "false" | undefined;
|
|
292
293
|
appealStatus?: "pending" | "approved" | "rejected" | undefined;
|
|
293
|
-
status?: "active" | "revoked" | undefined;
|
|
294
294
|
page?: string | undefined;
|
|
295
295
|
sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
|
|
296
296
|
fromDate?: string | undefined;
|
|
@@ -299,22 +299,22 @@ export declare const listBansSchema: z.ZodObject<{
|
|
|
299
299
|
}>, {
|
|
300
300
|
limit: number;
|
|
301
301
|
page: number;
|
|
302
|
+
status?: "active" | "revoked" | undefined;
|
|
302
303
|
search?: string | undefined;
|
|
303
304
|
userId?: string | undefined;
|
|
304
305
|
isPermanent?: "true" | "false" | undefined;
|
|
305
306
|
appealStatus?: "pending" | "approved" | "rejected" | undefined;
|
|
306
|
-
status?: "active" | "revoked" | undefined;
|
|
307
307
|
sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
|
|
308
308
|
fromDate?: string | undefined;
|
|
309
309
|
toDate?: string | undefined;
|
|
310
310
|
sortOrder?: "DESC" | "ASC" | undefined;
|
|
311
311
|
}, {
|
|
312
|
+
status?: "active" | "revoked" | undefined;
|
|
312
313
|
search?: string | undefined;
|
|
313
314
|
limit?: string | undefined;
|
|
314
315
|
userId?: string | undefined;
|
|
315
316
|
isPermanent?: "true" | "false" | undefined;
|
|
316
317
|
appealStatus?: "pending" | "approved" | "rejected" | undefined;
|
|
317
|
-
status?: "active" | "revoked" | undefined;
|
|
318
318
|
page?: string | undefined;
|
|
319
319
|
sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
|
|
320
320
|
fromDate?: string | undefined;
|
|
@@ -325,11 +325,11 @@ export declare const listBansSchema: z.ZodObject<{
|
|
|
325
325
|
query: {
|
|
326
326
|
limit: number;
|
|
327
327
|
page: number;
|
|
328
|
+
status?: "active" | "revoked" | undefined;
|
|
328
329
|
search?: string | undefined;
|
|
329
330
|
userId?: string | undefined;
|
|
330
331
|
isPermanent?: "true" | "false" | undefined;
|
|
331
332
|
appealStatus?: "pending" | "approved" | "rejected" | undefined;
|
|
332
|
-
status?: "active" | "revoked" | undefined;
|
|
333
333
|
sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
|
|
334
334
|
fromDate?: string | undefined;
|
|
335
335
|
toDate?: string | undefined;
|
|
@@ -337,12 +337,12 @@ export declare const listBansSchema: z.ZodObject<{
|
|
|
337
337
|
};
|
|
338
338
|
}, {
|
|
339
339
|
query: {
|
|
340
|
+
status?: "active" | "revoked" | undefined;
|
|
340
341
|
search?: string | undefined;
|
|
341
342
|
limit?: string | undefined;
|
|
342
343
|
userId?: string | undefined;
|
|
343
344
|
isPermanent?: "true" | "false" | undefined;
|
|
344
345
|
appealStatus?: "pending" | "approved" | "rejected" | undefined;
|
|
345
|
-
status?: "active" | "revoked" | undefined;
|
|
346
346
|
page?: string | undefined;
|
|
347
347
|
sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
|
|
348
348
|
fromDate?: string | undefined;
|
|
@@ -366,20 +366,20 @@ export declare const listSuspensionsSchema: z.ZodObject<{
|
|
|
366
366
|
}, "strip", z.ZodTypeAny, {
|
|
367
367
|
limit: number;
|
|
368
368
|
page: number;
|
|
369
|
+
status?: "active" | "expired" | "revoked" | undefined;
|
|
369
370
|
search?: string | undefined;
|
|
370
371
|
userId?: string | undefined;
|
|
371
372
|
appealStatus?: "pending" | "approved" | "rejected" | undefined;
|
|
372
|
-
status?: "active" | "expired" | "revoked" | undefined;
|
|
373
373
|
sortBy?: "createdAt" | "reason" | "endsAt" | "startedAt" | undefined;
|
|
374
374
|
fromDate?: string | undefined;
|
|
375
375
|
toDate?: string | undefined;
|
|
376
376
|
sortOrder?: "DESC" | "ASC" | undefined;
|
|
377
377
|
}, {
|
|
378
|
+
status?: "active" | "expired" | "revoked" | undefined;
|
|
378
379
|
search?: string | undefined;
|
|
379
380
|
limit?: string | undefined;
|
|
380
381
|
userId?: string | undefined;
|
|
381
382
|
appealStatus?: "pending" | "approved" | "rejected" | undefined;
|
|
382
|
-
status?: "active" | "expired" | "revoked" | undefined;
|
|
383
383
|
page?: string | undefined;
|
|
384
384
|
sortBy?: "createdAt" | "reason" | "endsAt" | "startedAt" | undefined;
|
|
385
385
|
fromDate?: string | undefined;
|
|
@@ -388,20 +388,20 @@ export declare const listSuspensionsSchema: z.ZodObject<{
|
|
|
388
388
|
}>, {
|
|
389
389
|
limit: number;
|
|
390
390
|
page: number;
|
|
391
|
+
status?: "active" | "expired" | "revoked" | undefined;
|
|
391
392
|
search?: string | undefined;
|
|
392
393
|
userId?: string | undefined;
|
|
393
394
|
appealStatus?: "pending" | "approved" | "rejected" | undefined;
|
|
394
|
-
status?: "active" | "expired" | "revoked" | undefined;
|
|
395
395
|
sortBy?: "createdAt" | "reason" | "endsAt" | "startedAt" | undefined;
|
|
396
396
|
fromDate?: string | undefined;
|
|
397
397
|
toDate?: string | undefined;
|
|
398
398
|
sortOrder?: "DESC" | "ASC" | undefined;
|
|
399
399
|
}, {
|
|
400
|
+
status?: "active" | "expired" | "revoked" | undefined;
|
|
400
401
|
search?: string | undefined;
|
|
401
402
|
limit?: string | undefined;
|
|
402
403
|
userId?: string | undefined;
|
|
403
404
|
appealStatus?: "pending" | "approved" | "rejected" | undefined;
|
|
404
|
-
status?: "active" | "expired" | "revoked" | undefined;
|
|
405
405
|
page?: string | undefined;
|
|
406
406
|
sortBy?: "createdAt" | "reason" | "endsAt" | "startedAt" | undefined;
|
|
407
407
|
fromDate?: string | undefined;
|
|
@@ -412,10 +412,10 @@ export declare const listSuspensionsSchema: z.ZodObject<{
|
|
|
412
412
|
query: {
|
|
413
413
|
limit: number;
|
|
414
414
|
page: number;
|
|
415
|
+
status?: "active" | "expired" | "revoked" | undefined;
|
|
415
416
|
search?: string | undefined;
|
|
416
417
|
userId?: string | undefined;
|
|
417
418
|
appealStatus?: "pending" | "approved" | "rejected" | undefined;
|
|
418
|
-
status?: "active" | "expired" | "revoked" | undefined;
|
|
419
419
|
sortBy?: "createdAt" | "reason" | "endsAt" | "startedAt" | undefined;
|
|
420
420
|
fromDate?: string | undefined;
|
|
421
421
|
toDate?: string | undefined;
|
|
@@ -423,11 +423,11 @@ export declare const listSuspensionsSchema: z.ZodObject<{
|
|
|
423
423
|
};
|
|
424
424
|
}, {
|
|
425
425
|
query: {
|
|
426
|
+
status?: "active" | "expired" | "revoked" | undefined;
|
|
426
427
|
search?: string | undefined;
|
|
427
428
|
limit?: string | undefined;
|
|
428
429
|
userId?: string | undefined;
|
|
429
430
|
appealStatus?: "pending" | "approved" | "rejected" | undefined;
|
|
430
|
-
status?: "active" | "expired" | "revoked" | undefined;
|
|
431
431
|
page?: string | undefined;
|
|
432
432
|
sortBy?: "createdAt" | "reason" | "endsAt" | "startedAt" | undefined;
|
|
433
433
|
fromDate?: string | undefined;
|
|
@@ -501,19 +501,19 @@ export declare const revokeBanSchema: z.ZodObject<{
|
|
|
501
501
|
revocationReason?: string | undefined;
|
|
502
502
|
}>;
|
|
503
503
|
}, "strip", z.ZodTypeAny, {
|
|
504
|
-
body: {
|
|
505
|
-
revocationReason?: string | undefined;
|
|
506
|
-
};
|
|
507
504
|
params: {
|
|
508
505
|
banId: string;
|
|
509
506
|
};
|
|
510
|
-
}, {
|
|
511
507
|
body: {
|
|
512
508
|
revocationReason?: string | undefined;
|
|
513
509
|
};
|
|
510
|
+
}, {
|
|
514
511
|
params: {
|
|
515
512
|
banId: string;
|
|
516
513
|
};
|
|
514
|
+
body: {
|
|
515
|
+
revocationReason?: string | undefined;
|
|
516
|
+
};
|
|
517
517
|
}>;
|
|
518
518
|
export declare const revokeSuspensionSchema: z.ZodObject<{
|
|
519
519
|
params: z.ZodObject<{
|
|
@@ -531,19 +531,19 @@ export declare const revokeSuspensionSchema: z.ZodObject<{
|
|
|
531
531
|
revocationReason?: string | undefined;
|
|
532
532
|
}>;
|
|
533
533
|
}, "strip", z.ZodTypeAny, {
|
|
534
|
-
body: {
|
|
535
|
-
revocationReason?: string | undefined;
|
|
536
|
-
};
|
|
537
534
|
params: {
|
|
538
535
|
suspensionId: string;
|
|
539
536
|
};
|
|
540
|
-
}, {
|
|
541
537
|
body: {
|
|
542
538
|
revocationReason?: string | undefined;
|
|
543
539
|
};
|
|
540
|
+
}, {
|
|
544
541
|
params: {
|
|
545
542
|
suspensionId: string;
|
|
546
543
|
};
|
|
544
|
+
body: {
|
|
545
|
+
revocationReason?: string | undefined;
|
|
546
|
+
};
|
|
547
547
|
}>;
|
|
548
548
|
export declare const extendSuspensionSchema: z.ZodObject<{
|
|
549
549
|
params: z.ZodObject<{
|
|
@@ -570,21 +570,21 @@ export declare const extendSuspensionSchema: z.ZodObject<{
|
|
|
570
570
|
extensionReason?: string | undefined;
|
|
571
571
|
}>;
|
|
572
572
|
}, "strip", z.ZodTypeAny, {
|
|
573
|
+
params: {
|
|
574
|
+
suspensionId: string;
|
|
575
|
+
};
|
|
573
576
|
body: {
|
|
574
577
|
newEndDate: string;
|
|
575
578
|
extensionReason?: string | undefined;
|
|
576
579
|
};
|
|
580
|
+
}, {
|
|
577
581
|
params: {
|
|
578
582
|
suspensionId: string;
|
|
579
583
|
};
|
|
580
|
-
}, {
|
|
581
584
|
body: {
|
|
582
585
|
newEndDate: string;
|
|
583
586
|
extensionReason?: string | undefined;
|
|
584
587
|
};
|
|
585
|
-
params: {
|
|
586
|
-
suspensionId: string;
|
|
587
|
-
};
|
|
588
588
|
}>;
|
|
589
589
|
export declare const reviewAppealSchema: z.ZodObject<{
|
|
590
590
|
params: z.ZodObject<{
|
|
@@ -608,23 +608,23 @@ export declare const reviewAppealSchema: z.ZodObject<{
|
|
|
608
608
|
adminNotes?: string | undefined;
|
|
609
609
|
}>;
|
|
610
610
|
}, "strip", z.ZodTypeAny, {
|
|
611
|
-
body: {
|
|
612
|
-
appealStatus: "approved" | "rejected";
|
|
613
|
-
adminNotes?: string | undefined;
|
|
614
|
-
};
|
|
615
611
|
params: {
|
|
616
612
|
banId?: string | undefined;
|
|
617
613
|
suspensionId?: string | undefined;
|
|
618
614
|
};
|
|
619
|
-
}, {
|
|
620
615
|
body: {
|
|
621
616
|
appealStatus: "approved" | "rejected";
|
|
622
617
|
adminNotes?: string | undefined;
|
|
623
618
|
};
|
|
619
|
+
}, {
|
|
624
620
|
params: {
|
|
625
621
|
banId?: string | undefined;
|
|
626
622
|
suspensionId?: string | undefined;
|
|
627
623
|
};
|
|
624
|
+
body: {
|
|
625
|
+
appealStatus: "approved" | "rejected";
|
|
626
|
+
adminNotes?: string | undefined;
|
|
627
|
+
};
|
|
628
628
|
}>;
|
|
629
629
|
export declare const exportBansSchema: z.ZodObject<{
|
|
630
630
|
query: z.ZodEffects<z.ZodObject<{
|
|
@@ -1,41 +1,56 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const payInstallmentSchema: z.ZodObject<{
|
|
3
3
|
params: z.ZodObject<{
|
|
4
|
-
|
|
5
|
-
installmentId: z.ZodString;
|
|
4
|
+
id: z.ZodString;
|
|
6
5
|
}, "strip", z.ZodTypeAny, {
|
|
7
|
-
|
|
8
|
-
planId: string;
|
|
6
|
+
id: string;
|
|
9
7
|
}, {
|
|
10
|
-
|
|
11
|
-
planId: string;
|
|
8
|
+
id: string;
|
|
12
9
|
}>;
|
|
13
10
|
body: z.ZodObject<{
|
|
14
|
-
|
|
15
|
-
provider: z.ZodDefault<z.ZodEnum<["
|
|
11
|
+
amount: z.ZodNumber;
|
|
12
|
+
provider: z.ZodDefault<z.ZodEnum<["AIRTEL_MONEY", "CASH", "MOMO_PAY"]>>;
|
|
13
|
+
providerReference: z.ZodString;
|
|
14
|
+
customerPhone: z.ZodString;
|
|
15
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
16
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
16
17
|
}, "strip", z.ZodTypeAny, {
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
amount: number;
|
|
19
|
+
provider: "AIRTEL_MONEY" | "CASH" | "MOMO_PAY";
|
|
20
|
+
providerReference: string;
|
|
21
|
+
customerPhone: string;
|
|
22
|
+
notes?: string | undefined;
|
|
23
|
+
metadata?: Record<string, any> | undefined;
|
|
19
24
|
}, {
|
|
20
|
-
|
|
21
|
-
|
|
25
|
+
amount: number;
|
|
26
|
+
providerReference: string;
|
|
27
|
+
customerPhone: string;
|
|
28
|
+
provider?: "AIRTEL_MONEY" | "CASH" | "MOMO_PAY" | undefined;
|
|
29
|
+
notes?: string | undefined;
|
|
30
|
+
metadata?: Record<string, any> | undefined;
|
|
22
31
|
}>;
|
|
23
32
|
}, "strip", z.ZodTypeAny, {
|
|
24
|
-
body: {
|
|
25
|
-
provider: "mtn_momo" | "airtel_money";
|
|
26
|
-
phoneNumber: string;
|
|
27
|
-
};
|
|
28
33
|
params: {
|
|
29
|
-
|
|
30
|
-
planId: string;
|
|
34
|
+
id: string;
|
|
31
35
|
};
|
|
32
|
-
}, {
|
|
33
36
|
body: {
|
|
34
|
-
|
|
35
|
-
provider
|
|
37
|
+
amount: number;
|
|
38
|
+
provider: "AIRTEL_MONEY" | "CASH" | "MOMO_PAY";
|
|
39
|
+
providerReference: string;
|
|
40
|
+
customerPhone: string;
|
|
41
|
+
notes?: string | undefined;
|
|
42
|
+
metadata?: Record<string, any> | undefined;
|
|
36
43
|
};
|
|
44
|
+
}, {
|
|
37
45
|
params: {
|
|
38
|
-
|
|
39
|
-
|
|
46
|
+
id: string;
|
|
47
|
+
};
|
|
48
|
+
body: {
|
|
49
|
+
amount: number;
|
|
50
|
+
providerReference: string;
|
|
51
|
+
customerPhone: string;
|
|
52
|
+
provider?: "AIRTEL_MONEY" | "CASH" | "MOMO_PAY" | undefined;
|
|
53
|
+
notes?: string | undefined;
|
|
54
|
+
metadata?: Record<string, any> | undefined;
|
|
40
55
|
};
|
|
41
56
|
}>;
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.payInstallmentSchema = void 0;
|
|
4
|
+
const vr_models_1 = require("vr-models");
|
|
4
5
|
const zod_1 = require("zod");
|
|
5
|
-
const uuidSchema = zod_1.z.string().uuid("Invalid ID format");
|
|
6
6
|
const phoneRegex = /^\+250(78|79|73|72)[0-9]{7}$/;
|
|
7
|
+
// src/modules/installments/validations/installments.validations.ts
|
|
7
8
|
exports.payInstallmentSchema = zod_1.z.object({
|
|
8
9
|
params: zod_1.z.object({
|
|
9
|
-
|
|
10
|
-
installmentId: uuidSchema,
|
|
10
|
+
id: zod_1.z.string().uuid("Invalid installment ID"),
|
|
11
11
|
}),
|
|
12
12
|
body: zod_1.z.object({
|
|
13
|
-
|
|
13
|
+
amount: zod_1.z.number().min(0.01, "Amount must be greater than 0"),
|
|
14
|
+
provider: zod_1.z.enum([...vr_models_1.PAYMENT_PROVIDER]).default("MOMO_PAY"),
|
|
15
|
+
providerReference: zod_1.z.string(),
|
|
16
|
+
customerPhone: zod_1.z
|
|
14
17
|
.string()
|
|
15
|
-
.regex(phoneRegex, "Invalid phone number
|
|
16
|
-
|
|
18
|
+
.regex(phoneRegex, "Invalid MTN Rwanda phone number"),
|
|
19
|
+
notes: zod_1.z.string().optional(),
|
|
20
|
+
metadata: zod_1.z.record(zod_1.z.any()).optional(),
|
|
17
21
|
}),
|
|
18
22
|
});
|
|
@@ -16,8 +16,8 @@ export declare const createPricingSchema: z.ZodObject<{
|
|
|
16
16
|
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
17
17
|
}, "strip", z.ZodTypeAny, {
|
|
18
18
|
type: "HIRE_PURCHASE" | "FULL_PAYMENT";
|
|
19
|
-
name: string;
|
|
20
19
|
productId: string;
|
|
20
|
+
name: string;
|
|
21
21
|
totalAmount: number;
|
|
22
22
|
isActive?: boolean | undefined;
|
|
23
23
|
downPayment?: number | undefined;
|
|
@@ -30,8 +30,8 @@ export declare const createPricingSchema: z.ZodObject<{
|
|
|
30
30
|
maxOrderQuantity?: number | undefined;
|
|
31
31
|
}, {
|
|
32
32
|
type: "HIRE_PURCHASE" | "FULL_PAYMENT";
|
|
33
|
-
name: string;
|
|
34
33
|
productId: string;
|
|
34
|
+
name: string;
|
|
35
35
|
totalAmount: number;
|
|
36
36
|
isActive?: boolean | undefined;
|
|
37
37
|
downPayment?: number | undefined;
|
|
@@ -44,8 +44,8 @@ export declare const createPricingSchema: z.ZodObject<{
|
|
|
44
44
|
maxOrderQuantity?: number | undefined;
|
|
45
45
|
}>, {
|
|
46
46
|
type: "HIRE_PURCHASE" | "FULL_PAYMENT";
|
|
47
|
-
name: string;
|
|
48
47
|
productId: string;
|
|
48
|
+
name: string;
|
|
49
49
|
totalAmount: number;
|
|
50
50
|
isActive?: boolean | undefined;
|
|
51
51
|
downPayment?: number | undefined;
|
|
@@ -58,8 +58,8 @@ export declare const createPricingSchema: z.ZodObject<{
|
|
|
58
58
|
maxOrderQuantity?: number | undefined;
|
|
59
59
|
}, {
|
|
60
60
|
type: "HIRE_PURCHASE" | "FULL_PAYMENT";
|
|
61
|
-
name: string;
|
|
62
61
|
productId: string;
|
|
62
|
+
name: string;
|
|
63
63
|
totalAmount: number;
|
|
64
64
|
isActive?: boolean | undefined;
|
|
65
65
|
downPayment?: number | undefined;
|
|
@@ -74,8 +74,8 @@ export declare const createPricingSchema: z.ZodObject<{
|
|
|
74
74
|
}, "strip", z.ZodTypeAny, {
|
|
75
75
|
body: {
|
|
76
76
|
type: "HIRE_PURCHASE" | "FULL_PAYMENT";
|
|
77
|
-
name: string;
|
|
78
77
|
productId: string;
|
|
78
|
+
name: string;
|
|
79
79
|
totalAmount: number;
|
|
80
80
|
isActive?: boolean | undefined;
|
|
81
81
|
downPayment?: number | undefined;
|
|
@@ -90,8 +90,8 @@ export declare const createPricingSchema: z.ZodObject<{
|
|
|
90
90
|
}, {
|
|
91
91
|
body: {
|
|
92
92
|
type: "HIRE_PURCHASE" | "FULL_PAYMENT";
|
|
93
|
-
name: string;
|
|
94
93
|
productId: string;
|
|
94
|
+
name: string;
|
|
95
95
|
totalAmount: number;
|
|
96
96
|
isActive?: boolean | undefined;
|
|
97
97
|
downPayment?: number | undefined;
|
|
@@ -179,6 +179,9 @@ export declare const updatePricingSchema: z.ZodObject<{
|
|
|
179
179
|
maxOrderQuantity?: number | undefined;
|
|
180
180
|
}>;
|
|
181
181
|
}, "strip", z.ZodTypeAny, {
|
|
182
|
+
params: {
|
|
183
|
+
id: string;
|
|
184
|
+
};
|
|
182
185
|
body: {
|
|
183
186
|
type?: "HIRE_PURCHASE" | "FULL_PAYMENT" | undefined;
|
|
184
187
|
isActive?: boolean | undefined;
|
|
@@ -193,10 +196,10 @@ export declare const updatePricingSchema: z.ZodObject<{
|
|
|
193
196
|
minOrderQuantity?: number | undefined;
|
|
194
197
|
maxOrderQuantity?: number | undefined;
|
|
195
198
|
};
|
|
199
|
+
}, {
|
|
196
200
|
params: {
|
|
197
201
|
id: string;
|
|
198
202
|
};
|
|
199
|
-
}, {
|
|
200
203
|
body: {
|
|
201
204
|
type?: "HIRE_PURCHASE" | "FULL_PAYMENT" | undefined;
|
|
202
205
|
isActive?: boolean | undefined;
|
|
@@ -211,9 +214,6 @@ export declare const updatePricingSchema: z.ZodObject<{
|
|
|
211
214
|
minOrderQuantity?: number | undefined;
|
|
212
215
|
maxOrderQuantity?: number | undefined;
|
|
213
216
|
};
|
|
214
|
-
params: {
|
|
215
|
-
id: string;
|
|
216
|
-
};
|
|
217
217
|
}>;
|
|
218
218
|
export declare const getPricingSchema: z.ZodObject<{
|
|
219
219
|
params: z.ZodObject<{
|
|
@@ -245,51 +245,51 @@ export declare const getPricingsSchema: z.ZodObject<{
|
|
|
245
245
|
sortBy: z.ZodOptional<z.ZodEnum<["name", "totalAmount", "createdAt", "updatedAt"]>>;
|
|
246
246
|
sortOrder: z.ZodOptional<z.ZodEnum<["ASC", "DESC"]>>;
|
|
247
247
|
}, "strip", z.ZodTypeAny, {
|
|
248
|
-
search?: string | undefined;
|
|
249
248
|
type?: "HIRE_PURCHASE" | "FULL_PAYMENT" | undefined;
|
|
250
|
-
|
|
251
|
-
isActive?: "true" | "false" | undefined;
|
|
249
|
+
productId?: string | undefined;
|
|
252
250
|
page?: number | undefined;
|
|
251
|
+
limit?: number | undefined;
|
|
252
|
+
search?: string | undefined;
|
|
253
253
|
sortBy?: "createdAt" | "updatedAt" | "name" | "totalAmount" | undefined;
|
|
254
|
-
sortOrder?: "
|
|
255
|
-
|
|
254
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
255
|
+
isActive?: "true" | "false" | undefined;
|
|
256
256
|
minAmount?: number | undefined;
|
|
257
257
|
maxAmount?: number | undefined;
|
|
258
258
|
}, {
|
|
259
|
-
search?: string | undefined;
|
|
260
259
|
type?: "HIRE_PURCHASE" | "FULL_PAYMENT" | undefined;
|
|
261
|
-
|
|
262
|
-
isActive?: "true" | "false" | undefined;
|
|
260
|
+
productId?: string | undefined;
|
|
263
261
|
page?: string | undefined;
|
|
262
|
+
limit?: string | undefined;
|
|
263
|
+
search?: string | undefined;
|
|
264
264
|
sortBy?: "createdAt" | "updatedAt" | "name" | "totalAmount" | undefined;
|
|
265
|
-
sortOrder?: "
|
|
266
|
-
|
|
265
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
266
|
+
isActive?: "true" | "false" | undefined;
|
|
267
267
|
minAmount?: string | undefined;
|
|
268
268
|
maxAmount?: string | undefined;
|
|
269
269
|
}>;
|
|
270
270
|
}, "strip", z.ZodTypeAny, {
|
|
271
271
|
query: {
|
|
272
|
-
search?: string | undefined;
|
|
273
272
|
type?: "HIRE_PURCHASE" | "FULL_PAYMENT" | undefined;
|
|
274
|
-
|
|
275
|
-
isActive?: "true" | "false" | undefined;
|
|
273
|
+
productId?: string | undefined;
|
|
276
274
|
page?: number | undefined;
|
|
275
|
+
limit?: number | undefined;
|
|
276
|
+
search?: string | undefined;
|
|
277
277
|
sortBy?: "createdAt" | "updatedAt" | "name" | "totalAmount" | undefined;
|
|
278
|
-
sortOrder?: "
|
|
279
|
-
|
|
278
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
279
|
+
isActive?: "true" | "false" | undefined;
|
|
280
280
|
minAmount?: number | undefined;
|
|
281
281
|
maxAmount?: number | undefined;
|
|
282
282
|
};
|
|
283
283
|
}, {
|
|
284
284
|
query: {
|
|
285
|
-
search?: string | undefined;
|
|
286
285
|
type?: "HIRE_PURCHASE" | "FULL_PAYMENT" | undefined;
|
|
287
|
-
|
|
288
|
-
isActive?: "true" | "false" | undefined;
|
|
286
|
+
productId?: string | undefined;
|
|
289
287
|
page?: string | undefined;
|
|
288
|
+
limit?: string | undefined;
|
|
289
|
+
search?: string | undefined;
|
|
290
290
|
sortBy?: "createdAt" | "updatedAt" | "name" | "totalAmount" | undefined;
|
|
291
|
-
sortOrder?: "
|
|
292
|
-
|
|
291
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
292
|
+
isActive?: "true" | "false" | undefined;
|
|
293
293
|
minAmount?: string | undefined;
|
|
294
294
|
maxAmount?: string | undefined;
|
|
295
295
|
};
|