vr-commons 1.0.131 → 1.0.132
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.
|
@@ -38,7 +38,7 @@ const formatUserProfile = (user, viewerType = "ADMIN", options = {}) => {
|
|
|
38
38
|
id: user.id,
|
|
39
39
|
firstName: user.firstName,
|
|
40
40
|
lastName: user.lastName,
|
|
41
|
-
primaryContact: primaryContactValue || "N/A",
|
|
41
|
+
primaryContact: primaryContactValue || "N/A", //take care
|
|
42
42
|
gender: user.gender || "male",
|
|
43
43
|
birthDate: user.birthDate || null,
|
|
44
44
|
birthMonth: user.birthMonth || null,
|
|
@@ -280,21 +280,21 @@ export declare const loginSchema: z.ZodObject<{
|
|
|
280
280
|
contactValue: z.ZodEffects<z.ZodString, string, string>;
|
|
281
281
|
password: z.ZodString;
|
|
282
282
|
}, "strip", z.ZodTypeAny, {
|
|
283
|
-
password: string;
|
|
284
283
|
contactValue: string;
|
|
285
|
-
}, {
|
|
286
284
|
password: string;
|
|
285
|
+
}, {
|
|
287
286
|
contactValue: string;
|
|
287
|
+
password: string;
|
|
288
288
|
}>;
|
|
289
289
|
}, "strip", z.ZodTypeAny, {
|
|
290
290
|
body: {
|
|
291
|
-
password: string;
|
|
292
291
|
contactValue: string;
|
|
292
|
+
password: string;
|
|
293
293
|
};
|
|
294
294
|
}, {
|
|
295
295
|
body: {
|
|
296
|
-
password: string;
|
|
297
296
|
contactValue: string;
|
|
297
|
+
password: string;
|
|
298
298
|
};
|
|
299
299
|
}>;
|
|
300
300
|
export declare const forgotPasswordSchema: z.ZodObject<{
|
|
@@ -6,7 +6,7 @@ const zod_1 = require("zod");
|
|
|
6
6
|
// ==================== REGEX PATTERNS ====================
|
|
7
7
|
exports.phoneRegex = /^\+250(78|79|73|72)[0-9]{7}$/;
|
|
8
8
|
exports.emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
9
|
-
const plateRegex = /^[
|
|
9
|
+
const plateRegex = /^R[ABCDEFGHIJKLMNPQRSTUVWXYZ]\s?\d{3}\s?[ABCDEFGHIJKLMNPQRSTUVWXYZ]$/;
|
|
10
10
|
exports.strongPasswordRegex = /^(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&#^()_\-+=])[A-Za-z\d@$!%*?&#^()_\-+=]{8,}$/;
|
|
11
11
|
// ==================== CONTACT VALIDATION HELPERS ====================
|
|
12
12
|
const detectContactType = (value) => {
|
|
@@ -16,64 +16,64 @@ export declare const upgradeToRiderSchema: z.ZodObject<{
|
|
|
16
16
|
birthMonth: z.ZodNumber;
|
|
17
17
|
birthYear: z.ZodNumber;
|
|
18
18
|
}, "strip", z.ZodTypeAny, {
|
|
19
|
-
jacketId: string;
|
|
20
19
|
gender: "male" | "female";
|
|
21
20
|
birthDate: number;
|
|
22
21
|
birthMonth: number;
|
|
23
22
|
birthYear: number;
|
|
24
23
|
contactValue: string;
|
|
24
|
+
jacketId: string;
|
|
25
25
|
plateNumber?: string | undefined;
|
|
26
26
|
}, {
|
|
27
|
-
jacketId: string;
|
|
28
27
|
gender: "male" | "female";
|
|
29
28
|
birthDate: number;
|
|
30
29
|
birthMonth: number;
|
|
31
30
|
birthYear: number;
|
|
32
31
|
contactValue: string;
|
|
32
|
+
jacketId: string;
|
|
33
33
|
plateNumber?: string | undefined;
|
|
34
34
|
}>, {
|
|
35
|
-
jacketId: string;
|
|
36
35
|
gender: "male" | "female";
|
|
37
36
|
birthDate: number;
|
|
38
37
|
birthMonth: number;
|
|
39
38
|
birthYear: number;
|
|
40
39
|
contactValue: string;
|
|
40
|
+
jacketId: string;
|
|
41
41
|
plateNumber?: string | undefined;
|
|
42
42
|
}, {
|
|
43
|
-
jacketId: string;
|
|
44
43
|
gender: "male" | "female";
|
|
45
44
|
birthDate: number;
|
|
46
45
|
birthMonth: number;
|
|
47
46
|
birthYear: number;
|
|
48
47
|
contactValue: string;
|
|
48
|
+
jacketId: string;
|
|
49
49
|
plateNumber?: string | undefined;
|
|
50
50
|
}>;
|
|
51
51
|
}, "strip", z.ZodTypeAny, {
|
|
52
|
+
params: {
|
|
53
|
+
userId: string;
|
|
54
|
+
};
|
|
52
55
|
body: {
|
|
53
|
-
jacketId: string;
|
|
54
56
|
gender: "male" | "female";
|
|
55
57
|
birthDate: number;
|
|
56
58
|
birthMonth: number;
|
|
57
59
|
birthYear: number;
|
|
58
60
|
contactValue: string;
|
|
61
|
+
jacketId: string;
|
|
59
62
|
plateNumber?: string | undefined;
|
|
60
63
|
};
|
|
64
|
+
}, {
|
|
61
65
|
params: {
|
|
62
66
|
userId: string;
|
|
63
67
|
};
|
|
64
|
-
}, {
|
|
65
68
|
body: {
|
|
66
|
-
jacketId: string;
|
|
67
69
|
gender: "male" | "female";
|
|
68
70
|
birthDate: number;
|
|
69
71
|
birthMonth: number;
|
|
70
72
|
birthYear: number;
|
|
71
73
|
contactValue: string;
|
|
74
|
+
jacketId: string;
|
|
72
75
|
plateNumber?: string | undefined;
|
|
73
76
|
};
|
|
74
|
-
params: {
|
|
75
|
-
userId: string;
|
|
76
|
-
};
|
|
77
77
|
}>;
|
|
78
78
|
export declare const updateRiderSchema: z.ZodObject<{
|
|
79
79
|
params: z.ZodObject<{
|
|
@@ -96,73 +96,73 @@ export declare const updateRiderSchema: z.ZodObject<{
|
|
|
96
96
|
}, "strip", z.ZodTypeAny, {
|
|
97
97
|
firstName?: string | undefined;
|
|
98
98
|
lastName?: string | undefined;
|
|
99
|
-
jacketId?: string | undefined;
|
|
100
99
|
plateNumber?: string | undefined;
|
|
101
100
|
gender?: "male" | "female" | undefined;
|
|
102
101
|
birthDate?: number | undefined;
|
|
103
102
|
birthMonth?: number | undefined;
|
|
104
103
|
birthYear?: number | undefined;
|
|
105
104
|
contactValue?: string | undefined;
|
|
105
|
+
jacketId?: string | undefined;
|
|
106
106
|
}, {
|
|
107
107
|
firstName?: string | undefined;
|
|
108
108
|
lastName?: string | undefined;
|
|
109
|
-
jacketId?: string | undefined;
|
|
110
109
|
plateNumber?: string | undefined;
|
|
111
110
|
gender?: "male" | "female" | undefined;
|
|
112
111
|
birthDate?: number | undefined;
|
|
113
112
|
birthMonth?: number | undefined;
|
|
114
113
|
birthYear?: number | undefined;
|
|
115
114
|
contactValue?: string | undefined;
|
|
115
|
+
jacketId?: string | undefined;
|
|
116
116
|
}>, {
|
|
117
117
|
firstName?: string | undefined;
|
|
118
118
|
lastName?: string | undefined;
|
|
119
|
-
jacketId?: string | undefined;
|
|
120
119
|
plateNumber?: string | undefined;
|
|
121
120
|
gender?: "male" | "female" | undefined;
|
|
122
121
|
birthDate?: number | undefined;
|
|
123
122
|
birthMonth?: number | undefined;
|
|
124
123
|
birthYear?: number | undefined;
|
|
125
124
|
contactValue?: string | undefined;
|
|
125
|
+
jacketId?: string | undefined;
|
|
126
126
|
}, {
|
|
127
127
|
firstName?: string | undefined;
|
|
128
128
|
lastName?: string | undefined;
|
|
129
|
-
jacketId?: string | undefined;
|
|
130
129
|
plateNumber?: string | undefined;
|
|
131
130
|
gender?: "male" | "female" | undefined;
|
|
132
131
|
birthDate?: number | undefined;
|
|
133
132
|
birthMonth?: number | undefined;
|
|
134
133
|
birthYear?: number | undefined;
|
|
135
134
|
contactValue?: string | undefined;
|
|
135
|
+
jacketId?: string | undefined;
|
|
136
136
|
}>;
|
|
137
137
|
}, "strip", z.ZodTypeAny, {
|
|
138
|
+
params: {
|
|
139
|
+
userId: string;
|
|
140
|
+
};
|
|
138
141
|
body: {
|
|
139
142
|
firstName?: string | undefined;
|
|
140
143
|
lastName?: string | undefined;
|
|
141
|
-
jacketId?: string | undefined;
|
|
142
144
|
plateNumber?: string | undefined;
|
|
143
145
|
gender?: "male" | "female" | undefined;
|
|
144
146
|
birthDate?: number | undefined;
|
|
145
147
|
birthMonth?: number | undefined;
|
|
146
148
|
birthYear?: number | undefined;
|
|
147
149
|
contactValue?: string | undefined;
|
|
150
|
+
jacketId?: string | undefined;
|
|
148
151
|
};
|
|
152
|
+
}, {
|
|
149
153
|
params: {
|
|
150
154
|
userId: string;
|
|
151
155
|
};
|
|
152
|
-
}, {
|
|
153
156
|
body: {
|
|
154
157
|
firstName?: string | undefined;
|
|
155
158
|
lastName?: string | undefined;
|
|
156
|
-
jacketId?: string | undefined;
|
|
157
159
|
plateNumber?: string | undefined;
|
|
158
160
|
gender?: "male" | "female" | undefined;
|
|
159
161
|
birthDate?: number | undefined;
|
|
160
162
|
birthMonth?: number | undefined;
|
|
161
163
|
birthYear?: number | undefined;
|
|
162
164
|
contactValue?: string | undefined;
|
|
163
|
-
|
|
164
|
-
params: {
|
|
165
|
-
userId: string;
|
|
165
|
+
jacketId?: string | undefined;
|
|
166
166
|
};
|
|
167
167
|
}>;
|
|
168
168
|
export declare const deleteUserSchema: z.ZodObject<{
|
|
@@ -212,53 +212,53 @@ export declare const getUsersSchema: z.ZodObject<{
|
|
|
212
212
|
sortBy: z.ZodOptional<z.ZodEnum<["createdAt", "firstName", "lastName", "gender"]>>;
|
|
213
213
|
sortOrder: z.ZodOptional<z.ZodEnum<["ASC", "DESC"]>>;
|
|
214
214
|
}, "strip", z.ZodTypeAny, {
|
|
215
|
-
search?: string | undefined;
|
|
216
|
-
limit?: number | undefined;
|
|
217
215
|
gender?: "male" | "female" | undefined;
|
|
216
|
+
page?: number | undefined;
|
|
217
|
+
limit?: number | undefined;
|
|
218
|
+
search?: string | undefined;
|
|
218
219
|
isActive?: "true" | "false" | undefined;
|
|
219
220
|
isDeactivated?: "true" | "false" | undefined;
|
|
220
221
|
role?: string | undefined;
|
|
221
|
-
page?: number | undefined;
|
|
222
222
|
contactType?: "EMAIL" | "PHONE" | "WHATSAPP" | undefined;
|
|
223
223
|
sortBy?: "firstName" | "lastName" | "gender" | "createdAt" | undefined;
|
|
224
|
-
sortOrder?: "
|
|
224
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
225
225
|
}, {
|
|
226
|
-
search?: string | undefined;
|
|
227
|
-
limit?: string | undefined;
|
|
228
226
|
gender?: "male" | "female" | undefined;
|
|
227
|
+
page?: string | undefined;
|
|
228
|
+
limit?: string | undefined;
|
|
229
|
+
search?: string | undefined;
|
|
229
230
|
isActive?: "true" | "false" | undefined;
|
|
230
231
|
isDeactivated?: "true" | "false" | undefined;
|
|
231
232
|
role?: string | undefined;
|
|
232
|
-
page?: string | undefined;
|
|
233
233
|
contactType?: "EMAIL" | "PHONE" | "WHATSAPP" | undefined;
|
|
234
234
|
sortBy?: "firstName" | "lastName" | "gender" | "createdAt" | undefined;
|
|
235
|
-
sortOrder?: "
|
|
235
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
236
236
|
}>;
|
|
237
237
|
}, "strip", z.ZodTypeAny, {
|
|
238
238
|
query: {
|
|
239
|
-
search?: string | undefined;
|
|
240
|
-
limit?: number | undefined;
|
|
241
239
|
gender?: "male" | "female" | undefined;
|
|
240
|
+
page?: number | undefined;
|
|
241
|
+
limit?: number | undefined;
|
|
242
|
+
search?: string | undefined;
|
|
242
243
|
isActive?: "true" | "false" | undefined;
|
|
243
244
|
isDeactivated?: "true" | "false" | undefined;
|
|
244
245
|
role?: string | undefined;
|
|
245
|
-
page?: number | undefined;
|
|
246
246
|
contactType?: "EMAIL" | "PHONE" | "WHATSAPP" | undefined;
|
|
247
247
|
sortBy?: "firstName" | "lastName" | "gender" | "createdAt" | undefined;
|
|
248
|
-
sortOrder?: "
|
|
248
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
249
249
|
};
|
|
250
250
|
}, {
|
|
251
251
|
query: {
|
|
252
|
-
search?: string | undefined;
|
|
253
|
-
limit?: string | undefined;
|
|
254
252
|
gender?: "male" | "female" | undefined;
|
|
253
|
+
page?: string | undefined;
|
|
254
|
+
limit?: string | undefined;
|
|
255
|
+
search?: string | undefined;
|
|
255
256
|
isActive?: "true" | "false" | undefined;
|
|
256
257
|
isDeactivated?: "true" | "false" | undefined;
|
|
257
258
|
role?: string | undefined;
|
|
258
|
-
page?: string | undefined;
|
|
259
259
|
contactType?: "EMAIL" | "PHONE" | "WHATSAPP" | undefined;
|
|
260
260
|
sortBy?: "firstName" | "lastName" | "gender" | "createdAt" | undefined;
|
|
261
|
-
sortOrder?: "
|
|
261
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
262
262
|
};
|
|
263
263
|
}>;
|
|
264
264
|
export declare const hireAdminSchema: z.ZodObject<{
|
|
@@ -266,7 +266,6 @@ export declare const hireAdminSchema: z.ZodObject<{
|
|
|
266
266
|
contactValue: z.ZodEffects<z.ZodString, string, string>;
|
|
267
267
|
firstName: z.ZodString;
|
|
268
268
|
lastName: z.ZodString;
|
|
269
|
-
password: z.ZodString;
|
|
270
269
|
role: z.ZodEnum<["AGENT", "ADMIN", "SUPER_ADMIN"]>;
|
|
271
270
|
superAdminPassword: z.ZodOptional<z.ZodString>;
|
|
272
271
|
gender: z.ZodEnum<["male", "female"]>;
|
|
@@ -276,94 +275,86 @@ export declare const hireAdminSchema: z.ZodObject<{
|
|
|
276
275
|
}, "strip", z.ZodTypeAny, {
|
|
277
276
|
firstName: string;
|
|
278
277
|
lastName: string;
|
|
279
|
-
password: string;
|
|
280
278
|
gender: "male" | "female";
|
|
281
279
|
birthDate: number;
|
|
282
280
|
birthMonth: number;
|
|
283
281
|
birthYear: number;
|
|
284
|
-
role: "ADMIN" | "AGENT" | "SUPER_ADMIN";
|
|
285
282
|
contactValue: string;
|
|
283
|
+
role: "AGENT" | "ADMIN" | "SUPER_ADMIN";
|
|
286
284
|
superAdminPassword?: string | undefined;
|
|
287
285
|
}, {
|
|
288
286
|
firstName: string;
|
|
289
287
|
lastName: string;
|
|
290
|
-
password: string;
|
|
291
288
|
gender: "male" | "female";
|
|
292
289
|
birthDate: number;
|
|
293
290
|
birthMonth: number;
|
|
294
291
|
birthYear: number;
|
|
295
|
-
role: "ADMIN" | "AGENT" | "SUPER_ADMIN";
|
|
296
292
|
contactValue: string;
|
|
293
|
+
role: "AGENT" | "ADMIN" | "SUPER_ADMIN";
|
|
297
294
|
superAdminPassword?: string | undefined;
|
|
298
295
|
}>, {
|
|
299
296
|
firstName: string;
|
|
300
297
|
lastName: string;
|
|
301
|
-
password: string;
|
|
302
298
|
gender: "male" | "female";
|
|
303
299
|
birthDate: number;
|
|
304
300
|
birthMonth: number;
|
|
305
301
|
birthYear: number;
|
|
306
|
-
role: "ADMIN" | "AGENT" | "SUPER_ADMIN";
|
|
307
302
|
contactValue: string;
|
|
303
|
+
role: "AGENT" | "ADMIN" | "SUPER_ADMIN";
|
|
308
304
|
superAdminPassword?: string | undefined;
|
|
309
305
|
}, {
|
|
310
306
|
firstName: string;
|
|
311
307
|
lastName: string;
|
|
312
|
-
password: string;
|
|
313
308
|
gender: "male" | "female";
|
|
314
309
|
birthDate: number;
|
|
315
310
|
birthMonth: number;
|
|
316
311
|
birthYear: number;
|
|
317
|
-
role: "ADMIN" | "AGENT" | "SUPER_ADMIN";
|
|
318
312
|
contactValue: string;
|
|
313
|
+
role: "AGENT" | "ADMIN" | "SUPER_ADMIN";
|
|
319
314
|
superAdminPassword?: string | undefined;
|
|
320
315
|
}>, {
|
|
321
316
|
firstName: string;
|
|
322
317
|
lastName: string;
|
|
323
|
-
password: string;
|
|
324
318
|
gender: "male" | "female";
|
|
325
319
|
birthDate: number;
|
|
326
320
|
birthMonth: number;
|
|
327
321
|
birthYear: number;
|
|
328
|
-
role: "ADMIN" | "AGENT" | "SUPER_ADMIN";
|
|
329
322
|
contactValue: string;
|
|
323
|
+
role: "AGENT" | "ADMIN" | "SUPER_ADMIN";
|
|
330
324
|
superAdminPassword?: string | undefined;
|
|
331
325
|
}, {
|
|
332
326
|
firstName: string;
|
|
333
327
|
lastName: string;
|
|
334
|
-
password: string;
|
|
335
328
|
gender: "male" | "female";
|
|
336
329
|
birthDate: number;
|
|
337
330
|
birthMonth: number;
|
|
338
331
|
birthYear: number;
|
|
339
|
-
role: "ADMIN" | "AGENT" | "SUPER_ADMIN";
|
|
340
332
|
contactValue: string;
|
|
333
|
+
role: "AGENT" | "ADMIN" | "SUPER_ADMIN";
|
|
341
334
|
superAdminPassword?: string | undefined;
|
|
342
335
|
}>;
|
|
343
336
|
}, "strip", z.ZodTypeAny, {
|
|
344
337
|
body: {
|
|
345
338
|
firstName: string;
|
|
346
339
|
lastName: string;
|
|
347
|
-
password: string;
|
|
348
340
|
gender: "male" | "female";
|
|
349
341
|
birthDate: number;
|
|
350
342
|
birthMonth: number;
|
|
351
343
|
birthYear: number;
|
|
352
|
-
role: "ADMIN" | "AGENT" | "SUPER_ADMIN";
|
|
353
344
|
contactValue: string;
|
|
345
|
+
role: "AGENT" | "ADMIN" | "SUPER_ADMIN";
|
|
354
346
|
superAdminPassword?: string | undefined;
|
|
355
347
|
};
|
|
356
348
|
}, {
|
|
357
349
|
body: {
|
|
358
350
|
firstName: string;
|
|
359
351
|
lastName: string;
|
|
360
|
-
password: string;
|
|
361
352
|
gender: "male" | "female";
|
|
362
353
|
birthDate: number;
|
|
363
354
|
birthMonth: number;
|
|
364
355
|
birthYear: number;
|
|
365
|
-
role: "ADMIN" | "AGENT" | "SUPER_ADMIN";
|
|
366
356
|
contactValue: string;
|
|
357
|
+
role: "AGENT" | "ADMIN" | "SUPER_ADMIN";
|
|
367
358
|
superAdminPassword?: string | undefined;
|
|
368
359
|
};
|
|
369
360
|
}>;
|
|
@@ -386,21 +377,21 @@ export declare const promoteAdminSchema: z.ZodObject<{
|
|
|
386
377
|
password?: string | undefined;
|
|
387
378
|
}>;
|
|
388
379
|
}, "strip", z.ZodTypeAny, {
|
|
380
|
+
params: {
|
|
381
|
+
userId: string;
|
|
382
|
+
};
|
|
389
383
|
body: {
|
|
390
384
|
targetRole: "ADMIN" | "SUPER_ADMIN";
|
|
391
385
|
password?: string | undefined;
|
|
392
386
|
};
|
|
387
|
+
}, {
|
|
393
388
|
params: {
|
|
394
389
|
userId: string;
|
|
395
390
|
};
|
|
396
|
-
}, {
|
|
397
391
|
body: {
|
|
398
392
|
targetRole: "ADMIN" | "SUPER_ADMIN";
|
|
399
393
|
password?: string | undefined;
|
|
400
394
|
};
|
|
401
|
-
params: {
|
|
402
|
-
userId: string;
|
|
403
|
-
};
|
|
404
395
|
}>;
|
|
405
396
|
export declare const demoteAdminSchema: z.ZodObject<{
|
|
406
397
|
params: z.ZodObject<{
|
|
@@ -413,24 +404,24 @@ export declare const demoteAdminSchema: z.ZodObject<{
|
|
|
413
404
|
body: z.ZodObject<{
|
|
414
405
|
targetRole: z.ZodEnum<["AGENT", "ADMIN"]>;
|
|
415
406
|
}, "strip", z.ZodTypeAny, {
|
|
416
|
-
targetRole: "
|
|
407
|
+
targetRole: "AGENT" | "ADMIN";
|
|
417
408
|
}, {
|
|
418
|
-
targetRole: "
|
|
409
|
+
targetRole: "AGENT" | "ADMIN";
|
|
419
410
|
}>;
|
|
420
411
|
}, "strip", z.ZodTypeAny, {
|
|
421
|
-
body: {
|
|
422
|
-
targetRole: "ADMIN" | "AGENT";
|
|
423
|
-
};
|
|
424
412
|
params: {
|
|
425
413
|
userId: string;
|
|
426
414
|
};
|
|
427
|
-
}, {
|
|
428
415
|
body: {
|
|
429
|
-
targetRole: "
|
|
416
|
+
targetRole: "AGENT" | "ADMIN";
|
|
430
417
|
};
|
|
418
|
+
}, {
|
|
431
419
|
params: {
|
|
432
420
|
userId: string;
|
|
433
421
|
};
|
|
422
|
+
body: {
|
|
423
|
+
targetRole: "AGENT" | "ADMIN";
|
|
424
|
+
};
|
|
434
425
|
}>;
|
|
435
426
|
export declare const fireEmployeeSchema: z.ZodObject<{
|
|
436
427
|
params: z.ZodObject<{
|
|
@@ -448,19 +439,19 @@ export declare const fireEmployeeSchema: z.ZodObject<{
|
|
|
448
439
|
reason?: string | undefined;
|
|
449
440
|
}>;
|
|
450
441
|
}, "strip", z.ZodTypeAny, {
|
|
451
|
-
body: {
|
|
452
|
-
reason?: string | undefined;
|
|
453
|
-
};
|
|
454
442
|
params: {
|
|
455
443
|
userId: string;
|
|
456
444
|
};
|
|
457
|
-
}, {
|
|
458
445
|
body: {
|
|
459
446
|
reason?: string | undefined;
|
|
460
447
|
};
|
|
448
|
+
}, {
|
|
461
449
|
params: {
|
|
462
450
|
userId: string;
|
|
463
451
|
};
|
|
452
|
+
body: {
|
|
453
|
+
reason?: string | undefined;
|
|
454
|
+
};
|
|
464
455
|
}>;
|
|
465
456
|
export declare const updateAdminSchema: z.ZodObject<{
|
|
466
457
|
params: z.ZodObject<{
|
|
@@ -512,6 +503,9 @@ export declare const updateAdminSchema: z.ZodObject<{
|
|
|
512
503
|
contactValue?: string | undefined;
|
|
513
504
|
}>;
|
|
514
505
|
}, "strip", z.ZodTypeAny, {
|
|
506
|
+
params: {
|
|
507
|
+
userId: string;
|
|
508
|
+
};
|
|
515
509
|
body: {
|
|
516
510
|
firstName?: string | undefined;
|
|
517
511
|
lastName?: string | undefined;
|
|
@@ -521,10 +515,10 @@ export declare const updateAdminSchema: z.ZodObject<{
|
|
|
521
515
|
birthYear?: number | undefined;
|
|
522
516
|
contactValue?: string | undefined;
|
|
523
517
|
};
|
|
518
|
+
}, {
|
|
524
519
|
params: {
|
|
525
520
|
userId: string;
|
|
526
521
|
};
|
|
527
|
-
}, {
|
|
528
522
|
body: {
|
|
529
523
|
firstName?: string | undefined;
|
|
530
524
|
lastName?: string | undefined;
|
|
@@ -534,9 +528,6 @@ export declare const updateAdminSchema: z.ZodObject<{
|
|
|
534
528
|
birthYear?: number | undefined;
|
|
535
529
|
contactValue?: string | undefined;
|
|
536
530
|
};
|
|
537
|
-
params: {
|
|
538
|
-
userId: string;
|
|
539
|
-
};
|
|
540
531
|
}>;
|
|
541
532
|
export declare const resetPasswordSchema: z.ZodObject<{
|
|
542
533
|
params: z.ZodObject<{
|
|
@@ -615,46 +606,46 @@ export declare const addUserContactSchema: z.ZodObject<{
|
|
|
615
606
|
isPrimary?: boolean | undefined;
|
|
616
607
|
}>;
|
|
617
608
|
}, "strip", z.ZodTypeAny, {
|
|
609
|
+
params: {
|
|
610
|
+
userId: string;
|
|
611
|
+
};
|
|
618
612
|
body: {
|
|
619
613
|
contactValue: string;
|
|
620
614
|
type?: "EMAIL" | "PHONE" | "WHATSAPP" | undefined;
|
|
621
615
|
isVerified?: boolean | undefined;
|
|
622
616
|
isPrimary?: boolean | undefined;
|
|
623
617
|
};
|
|
618
|
+
}, {
|
|
624
619
|
params: {
|
|
625
620
|
userId: string;
|
|
626
621
|
};
|
|
627
|
-
}, {
|
|
628
622
|
body: {
|
|
629
623
|
contactValue: string;
|
|
630
624
|
type?: "EMAIL" | "PHONE" | "WHATSAPP" | undefined;
|
|
631
625
|
isVerified?: boolean | undefined;
|
|
632
626
|
isPrimary?: boolean | undefined;
|
|
633
627
|
};
|
|
634
|
-
params: {
|
|
635
|
-
userId: string;
|
|
636
|
-
};
|
|
637
628
|
}>;
|
|
638
629
|
export declare const verifyUserContactSchema: z.ZodObject<{
|
|
639
630
|
params: z.ZodObject<{
|
|
640
631
|
userId: z.ZodString;
|
|
641
632
|
contactId: z.ZodString;
|
|
642
633
|
}, "strip", z.ZodTypeAny, {
|
|
643
|
-
userId: string;
|
|
644
634
|
contactId: string;
|
|
645
|
-
}, {
|
|
646
635
|
userId: string;
|
|
636
|
+
}, {
|
|
647
637
|
contactId: string;
|
|
638
|
+
userId: string;
|
|
648
639
|
}>;
|
|
649
640
|
}, "strip", z.ZodTypeAny, {
|
|
650
641
|
params: {
|
|
651
|
-
userId: string;
|
|
652
642
|
contactId: string;
|
|
643
|
+
userId: string;
|
|
653
644
|
};
|
|
654
645
|
}, {
|
|
655
646
|
params: {
|
|
656
|
-
userId: string;
|
|
657
647
|
contactId: string;
|
|
648
|
+
userId: string;
|
|
658
649
|
};
|
|
659
650
|
}>;
|
|
660
651
|
export declare const deleteUserContactSchema: z.ZodObject<{
|
|
@@ -662,21 +653,21 @@ export declare const deleteUserContactSchema: z.ZodObject<{
|
|
|
662
653
|
userId: z.ZodString;
|
|
663
654
|
contactId: z.ZodString;
|
|
664
655
|
}, "strip", z.ZodTypeAny, {
|
|
665
|
-
userId: string;
|
|
666
656
|
contactId: string;
|
|
667
|
-
}, {
|
|
668
657
|
userId: string;
|
|
658
|
+
}, {
|
|
669
659
|
contactId: string;
|
|
660
|
+
userId: string;
|
|
670
661
|
}>;
|
|
671
662
|
}, "strip", z.ZodTypeAny, {
|
|
672
663
|
params: {
|
|
673
|
-
userId: string;
|
|
674
664
|
contactId: string;
|
|
665
|
+
userId: string;
|
|
675
666
|
};
|
|
676
667
|
}, {
|
|
677
668
|
params: {
|
|
678
|
-
userId: string;
|
|
679
669
|
contactId: string;
|
|
670
|
+
userId: string;
|
|
680
671
|
};
|
|
681
672
|
}>;
|
|
682
673
|
export declare const setUserPrimaryContactSchema: z.ZodObject<{
|
|
@@ -684,21 +675,21 @@ export declare const setUserPrimaryContactSchema: z.ZodObject<{
|
|
|
684
675
|
userId: z.ZodString;
|
|
685
676
|
contactId: z.ZodString;
|
|
686
677
|
}, "strip", z.ZodTypeAny, {
|
|
687
|
-
userId: string;
|
|
688
678
|
contactId: string;
|
|
689
|
-
}, {
|
|
690
679
|
userId: string;
|
|
680
|
+
}, {
|
|
691
681
|
contactId: string;
|
|
682
|
+
userId: string;
|
|
692
683
|
}>;
|
|
693
684
|
}, "strip", z.ZodTypeAny, {
|
|
694
685
|
params: {
|
|
695
|
-
userId: string;
|
|
696
686
|
contactId: string;
|
|
687
|
+
userId: string;
|
|
697
688
|
};
|
|
698
689
|
}, {
|
|
699
690
|
params: {
|
|
700
|
-
userId: string;
|
|
701
691
|
contactId: string;
|
|
692
|
+
userId: string;
|
|
702
693
|
};
|
|
703
694
|
}>;
|
|
704
695
|
export type UpgradeToRiderInput = z.infer<typeof upgradeToRiderSchema>;
|
|
@@ -129,9 +129,6 @@ exports.hireAdminSchema = zod_1.z.object({
|
|
|
129
129
|
}),
|
|
130
130
|
firstName: zod_1.z.string().min(2).max(100),
|
|
131
131
|
lastName: zod_1.z.string().min(2).max(100),
|
|
132
|
-
password: zod_1.z
|
|
133
|
-
.string()
|
|
134
|
-
.regex(auth_validations_1.strongPasswordRegex, "Password must be at least 8 characters, include 1 uppercase letter, 1 number and 1 symbol"),
|
|
135
132
|
role: zod_1.z.enum(["AGENT", "ADMIN", "SUPER_ADMIN"]),
|
|
136
133
|
superAdminPassword: zod_1.z.string().optional(),
|
|
137
134
|
gender: zod_1.z.enum(["male", "female"], {
|