vr-commons 1.0.177 → 1.0.181
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/utils/admin/admin.devicePayments.utils.d.ts +2 -1
- package/dist/utils/admin/admin.devicePayments.utils.js +13 -9
- package/dist/utils/users/users.verification.utils.js +2 -2
- package/dist/validations/admin/admin.devicePayments.validations.d.ts +90 -55
- package/dist/validations/admin/admin.devicePayments.validations.js +14 -2
- package/dist/validations/admin/admin.devices.validations.d.ts +58 -51
- package/dist/validations/admin/admin.devices.validations.js +1 -0
- package/dist/validations/admin/admin.installments.validations.js +1 -1
- package/dist/validations/admin/admin.pricings.validations.d.ts +10 -10
- package/dist/validations/admin/admin.users.validations.d.ts +103 -103
- package/dist/validations/index.d.ts +1 -1
- package/dist/validations/index.js +2 -1
- package/dist/validations/shared/shared.account.validations.d.ts +16 -16
- package/dist/validations/shared/shared.account.validations.js +1 -1
- package/dist/validations/shared/shared.auth.validations.d.ts +34 -34
- package/dist/validations/shared/shared.auth.validations.js +2 -2
- package/package.json +1 -1
|
@@ -10,21 +10,21 @@ export declare const userLoginSchema: z.ZodObject<{
|
|
|
10
10
|
contactValue: z.ZodEffects<z.ZodString, string, string>;
|
|
11
11
|
password: z.ZodString;
|
|
12
12
|
}, "strip", z.ZodTypeAny, {
|
|
13
|
-
password: string;
|
|
14
13
|
contactValue: string;
|
|
15
|
-
}, {
|
|
16
14
|
password: string;
|
|
15
|
+
}, {
|
|
17
16
|
contactValue: string;
|
|
17
|
+
password: string;
|
|
18
18
|
}>;
|
|
19
19
|
}, "strip", z.ZodTypeAny, {
|
|
20
20
|
body: {
|
|
21
|
-
password: string;
|
|
22
21
|
contactValue: string;
|
|
22
|
+
password: string;
|
|
23
23
|
};
|
|
24
24
|
}, {
|
|
25
25
|
body: {
|
|
26
|
-
password: string;
|
|
27
26
|
contactValue: string;
|
|
27
|
+
password: string;
|
|
28
28
|
};
|
|
29
29
|
}>;
|
|
30
30
|
export declare const forgotPasswordSchema: z.ZodObject<{
|
|
@@ -95,33 +95,33 @@ export declare const registerSchema: z.ZodObject<{
|
|
|
95
95
|
birthMonth: z.ZodOptional<z.ZodNumber>;
|
|
96
96
|
birthYear: z.ZodOptional<z.ZodNumber>;
|
|
97
97
|
}, "strict", z.ZodTypeAny, {
|
|
98
|
+
contactValue: string;
|
|
99
|
+
password: string;
|
|
98
100
|
firstName: string;
|
|
99
101
|
lastName: string;
|
|
100
|
-
password: string;
|
|
101
102
|
role: "PASSENGER" | "RIDER";
|
|
102
|
-
contactValue: string;
|
|
103
103
|
gender?: "male" | "female" | undefined;
|
|
104
104
|
birthDate?: number | undefined;
|
|
105
105
|
birthMonth?: number | undefined;
|
|
106
106
|
birthYear?: number | undefined;
|
|
107
107
|
}, {
|
|
108
|
+
contactValue: string;
|
|
109
|
+
password: string;
|
|
108
110
|
firstName: string;
|
|
109
111
|
lastName: string;
|
|
110
|
-
|
|
111
|
-
contactValue: string;
|
|
112
|
+
role?: "PASSENGER" | "RIDER" | undefined;
|
|
112
113
|
gender?: "male" | "female" | undefined;
|
|
113
114
|
birthDate?: number | undefined;
|
|
114
115
|
birthMonth?: number | undefined;
|
|
115
116
|
birthYear?: number | undefined;
|
|
116
|
-
role?: "PASSENGER" | "RIDER" | undefined;
|
|
117
117
|
}>;
|
|
118
118
|
}, "strip", z.ZodTypeAny, {
|
|
119
119
|
body: {
|
|
120
|
+
contactValue: string;
|
|
121
|
+
password: string;
|
|
120
122
|
firstName: string;
|
|
121
123
|
lastName: string;
|
|
122
|
-
password: string;
|
|
123
124
|
role: "PASSENGER" | "RIDER";
|
|
124
|
-
contactValue: string;
|
|
125
125
|
gender?: "male" | "female" | undefined;
|
|
126
126
|
birthDate?: number | undefined;
|
|
127
127
|
birthMonth?: number | undefined;
|
|
@@ -129,15 +129,15 @@ export declare const registerSchema: z.ZodObject<{
|
|
|
129
129
|
};
|
|
130
130
|
}, {
|
|
131
131
|
body: {
|
|
132
|
+
contactValue: string;
|
|
133
|
+
password: string;
|
|
132
134
|
firstName: string;
|
|
133
135
|
lastName: string;
|
|
134
|
-
|
|
135
|
-
contactValue: string;
|
|
136
|
+
role?: "PASSENGER" | "RIDER" | undefined;
|
|
136
137
|
gender?: "male" | "female" | undefined;
|
|
137
138
|
birthDate?: number | undefined;
|
|
138
139
|
birthMonth?: number | undefined;
|
|
139
140
|
birthYear?: number | undefined;
|
|
140
|
-
role?: "PASSENGER" | "RIDER" | undefined;
|
|
141
141
|
};
|
|
142
142
|
}>;
|
|
143
143
|
export declare const riderPasswordRegex: RegExp;
|
|
@@ -359,57 +359,57 @@ export declare const createUserSchema: z.ZodObject<{
|
|
|
359
359
|
jacketId: z.ZodOptional<z.ZodString>;
|
|
360
360
|
plateNumber: z.ZodOptional<z.ZodString>;
|
|
361
361
|
}, "strip", z.ZodTypeAny, {
|
|
362
|
+
contactValue: string;
|
|
363
|
+
password: string;
|
|
362
364
|
firstName: string;
|
|
363
365
|
lastName: string;
|
|
364
|
-
|
|
365
|
-
role: "ADMIN" | "PASSENGER" | "RIDER" | "AGENT" | "SUPER_ADMIN";
|
|
366
|
-
contactValue: string;
|
|
367
|
-
jacketId?: string | undefined;
|
|
368
|
-
plateNumber?: string | undefined;
|
|
366
|
+
role: "PASSENGER" | "RIDER" | "AGENT" | "ADMIN" | "SUPER_ADMIN";
|
|
369
367
|
gender?: "male" | "female" | undefined;
|
|
370
368
|
birthDate?: number | undefined;
|
|
371
369
|
birthMonth?: number | undefined;
|
|
372
370
|
birthYear?: number | undefined;
|
|
371
|
+
jacketId?: string | undefined;
|
|
372
|
+
plateNumber?: string | undefined;
|
|
373
373
|
}, {
|
|
374
|
+
contactValue: string;
|
|
375
|
+
password: string;
|
|
374
376
|
firstName: string;
|
|
375
377
|
lastName: string;
|
|
376
|
-
|
|
377
|
-
role: "ADMIN" | "PASSENGER" | "RIDER" | "AGENT" | "SUPER_ADMIN";
|
|
378
|
-
contactValue: string;
|
|
379
|
-
jacketId?: string | undefined;
|
|
380
|
-
plateNumber?: string | undefined;
|
|
378
|
+
role: "PASSENGER" | "RIDER" | "AGENT" | "ADMIN" | "SUPER_ADMIN";
|
|
381
379
|
gender?: "male" | "female" | undefined;
|
|
382
380
|
birthDate?: number | undefined;
|
|
383
381
|
birthMonth?: number | undefined;
|
|
384
382
|
birthYear?: number | undefined;
|
|
383
|
+
jacketId?: string | undefined;
|
|
384
|
+
plateNumber?: string | undefined;
|
|
385
385
|
}>;
|
|
386
386
|
}, "strip", z.ZodTypeAny, {
|
|
387
387
|
body: {
|
|
388
|
+
contactValue: string;
|
|
389
|
+
password: string;
|
|
388
390
|
firstName: string;
|
|
389
391
|
lastName: string;
|
|
390
|
-
|
|
391
|
-
role: "ADMIN" | "PASSENGER" | "RIDER" | "AGENT" | "SUPER_ADMIN";
|
|
392
|
-
contactValue: string;
|
|
393
|
-
jacketId?: string | undefined;
|
|
394
|
-
plateNumber?: string | undefined;
|
|
392
|
+
role: "PASSENGER" | "RIDER" | "AGENT" | "ADMIN" | "SUPER_ADMIN";
|
|
395
393
|
gender?: "male" | "female" | undefined;
|
|
396
394
|
birthDate?: number | undefined;
|
|
397
395
|
birthMonth?: number | undefined;
|
|
398
396
|
birthYear?: number | undefined;
|
|
397
|
+
jacketId?: string | undefined;
|
|
398
|
+
plateNumber?: string | undefined;
|
|
399
399
|
};
|
|
400
400
|
}, {
|
|
401
401
|
body: {
|
|
402
|
+
contactValue: string;
|
|
403
|
+
password: string;
|
|
402
404
|
firstName: string;
|
|
403
405
|
lastName: string;
|
|
404
|
-
|
|
405
|
-
role: "ADMIN" | "PASSENGER" | "RIDER" | "AGENT" | "SUPER_ADMIN";
|
|
406
|
-
contactValue: string;
|
|
407
|
-
jacketId?: string | undefined;
|
|
408
|
-
plateNumber?: string | undefined;
|
|
406
|
+
role: "PASSENGER" | "RIDER" | "AGENT" | "ADMIN" | "SUPER_ADMIN";
|
|
409
407
|
gender?: "male" | "female" | undefined;
|
|
410
408
|
birthDate?: number | undefined;
|
|
411
409
|
birthMonth?: number | undefined;
|
|
412
410
|
birthYear?: number | undefined;
|
|
411
|
+
jacketId?: string | undefined;
|
|
412
|
+
plateNumber?: string | undefined;
|
|
413
413
|
};
|
|
414
414
|
}>;
|
|
415
415
|
export declare const updateContactSchema: z.ZodObject<{
|
|
@@ -95,14 +95,14 @@ exports.registerSchema = zod_1.z.object({
|
|
|
95
95
|
})
|
|
96
96
|
.strict(),
|
|
97
97
|
});
|
|
98
|
-
//
|
|
98
|
+
// =============================== USER (RIDER/PASSENGER) AUTH VALIDATIONS =====================================
|
|
99
99
|
// Rider login with contact
|
|
100
100
|
exports.riderPasswordRegex = regex_constants_1.RIDER_PIN_REGEX;
|
|
101
101
|
exports.checkRiderAccountSchema = zod_1.z.object({
|
|
102
102
|
body: zod_1.z.object({
|
|
103
103
|
phoneNumber: zod_1.z
|
|
104
104
|
.string()
|
|
105
|
-
.regex(exports.phoneRegex, "Invalid phone number format. Must be a valid Rwandan phone number (+250...)
|
|
105
|
+
.regex(exports.phoneRegex, "Invalid phone number format. Must be a valid Rwandan phone number (+250...) _ washyizemo nimero itabaho onger ugenzure neza ko itangizwa na +250"),
|
|
106
106
|
}),
|
|
107
107
|
});
|
|
108
108
|
exports.setRiderPasswordSchema = zod_1.z.object({
|