vr-commons 1.0.35 → 1.0.37
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.
|
@@ -413,11 +413,8 @@ export declare const createRiderSchema: z.ZodObject<{
|
|
|
413
413
|
lastName: z.ZodString;
|
|
414
414
|
phoneNumber: z.ZodString;
|
|
415
415
|
nationalId: z.ZodString;
|
|
416
|
-
email: z.ZodUnion<[z.ZodNullable<z.ZodOptional<z.ZodString>>, z.ZodLiteral<"">]>;
|
|
417
|
-
password: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
418
416
|
plateNumber: z.ZodString;
|
|
419
417
|
jacketId: z.ZodString;
|
|
420
|
-
securityClearanceId: z.ZodString;
|
|
421
418
|
}, "strip", z.ZodTypeAny, {
|
|
422
419
|
firstName: string;
|
|
423
420
|
lastName: string;
|
|
@@ -425,9 +422,6 @@ export declare const createRiderSchema: z.ZodObject<{
|
|
|
425
422
|
nationalId: string;
|
|
426
423
|
plateNumber: string;
|
|
427
424
|
jacketId: string;
|
|
428
|
-
securityClearanceId: string;
|
|
429
|
-
email?: string | null | undefined;
|
|
430
|
-
password?: string | null | undefined;
|
|
431
425
|
}, {
|
|
432
426
|
firstName: string;
|
|
433
427
|
lastName: string;
|
|
@@ -435,9 +429,6 @@ export declare const createRiderSchema: z.ZodObject<{
|
|
|
435
429
|
nationalId: string;
|
|
436
430
|
plateNumber: string;
|
|
437
431
|
jacketId: string;
|
|
438
|
-
securityClearanceId: string;
|
|
439
|
-
email?: string | null | undefined;
|
|
440
|
-
password?: string | null | undefined;
|
|
441
432
|
}>;
|
|
442
433
|
params: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
|
|
443
434
|
query: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
|
|
@@ -449,9 +440,6 @@ export declare const createRiderSchema: z.ZodObject<{
|
|
|
449
440
|
nationalId: string;
|
|
450
441
|
plateNumber: string;
|
|
451
442
|
jacketId: string;
|
|
452
|
-
securityClearanceId: string;
|
|
453
|
-
email?: string | null | undefined;
|
|
454
|
-
password?: string | null | undefined;
|
|
455
443
|
};
|
|
456
444
|
params?: {} | undefined;
|
|
457
445
|
query?: {} | undefined;
|
|
@@ -463,9 +451,6 @@ export declare const createRiderSchema: z.ZodObject<{
|
|
|
463
451
|
nationalId: string;
|
|
464
452
|
plateNumber: string;
|
|
465
453
|
jacketId: string;
|
|
466
|
-
securityClearanceId: string;
|
|
467
|
-
email?: string | null | undefined;
|
|
468
|
-
password?: string | null | undefined;
|
|
469
454
|
};
|
|
470
455
|
params?: {} | undefined;
|
|
471
456
|
query?: {} | undefined;
|
|
@@ -593,30 +578,40 @@ export declare const updateRiderProfileSchema: z.ZodObject<{
|
|
|
593
578
|
riderId: string;
|
|
594
579
|
}>;
|
|
595
580
|
body: z.ZodEffects<z.ZodObject<{
|
|
596
|
-
firstName: z.
|
|
597
|
-
lastName: z.
|
|
598
|
-
|
|
599
|
-
|
|
581
|
+
firstName: z.ZodString;
|
|
582
|
+
lastName: z.ZodString;
|
|
583
|
+
phoneNumber: z.ZodString;
|
|
584
|
+
nationalId: z.ZodString;
|
|
585
|
+
plateNumber: z.ZodString;
|
|
586
|
+
jacketId: z.ZodString;
|
|
600
587
|
}, "strip", z.ZodTypeAny, {
|
|
601
|
-
firstName
|
|
602
|
-
lastName
|
|
603
|
-
|
|
604
|
-
|
|
588
|
+
firstName: string;
|
|
589
|
+
lastName: string;
|
|
590
|
+
phoneNumber: string;
|
|
591
|
+
nationalId: string;
|
|
592
|
+
plateNumber: string;
|
|
593
|
+
jacketId: string;
|
|
605
594
|
}, {
|
|
606
|
-
firstName
|
|
607
|
-
lastName
|
|
608
|
-
|
|
609
|
-
|
|
595
|
+
firstName: string;
|
|
596
|
+
lastName: string;
|
|
597
|
+
phoneNumber: string;
|
|
598
|
+
nationalId: string;
|
|
599
|
+
plateNumber: string;
|
|
600
|
+
jacketId: string;
|
|
610
601
|
}>, {
|
|
611
|
-
firstName
|
|
612
|
-
lastName
|
|
613
|
-
|
|
614
|
-
|
|
602
|
+
firstName: string;
|
|
603
|
+
lastName: string;
|
|
604
|
+
phoneNumber: string;
|
|
605
|
+
nationalId: string;
|
|
606
|
+
plateNumber: string;
|
|
607
|
+
jacketId: string;
|
|
615
608
|
}, {
|
|
616
|
-
firstName
|
|
617
|
-
lastName
|
|
618
|
-
|
|
619
|
-
|
|
609
|
+
firstName: string;
|
|
610
|
+
lastName: string;
|
|
611
|
+
phoneNumber: string;
|
|
612
|
+
nationalId: string;
|
|
613
|
+
plateNumber: string;
|
|
614
|
+
jacketId: string;
|
|
620
615
|
}>;
|
|
621
616
|
query: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
|
|
622
617
|
headers: z.ZodObject<{
|
|
@@ -631,10 +626,12 @@ export declare const updateRiderProfileSchema: z.ZodObject<{
|
|
|
631
626
|
riderId: string;
|
|
632
627
|
};
|
|
633
628
|
body: {
|
|
634
|
-
firstName
|
|
635
|
-
lastName
|
|
636
|
-
|
|
637
|
-
|
|
629
|
+
firstName: string;
|
|
630
|
+
lastName: string;
|
|
631
|
+
phoneNumber: string;
|
|
632
|
+
nationalId: string;
|
|
633
|
+
plateNumber: string;
|
|
634
|
+
jacketId: string;
|
|
638
635
|
};
|
|
639
636
|
headers: {
|
|
640
637
|
authorization: string;
|
|
@@ -645,10 +642,12 @@ export declare const updateRiderProfileSchema: z.ZodObject<{
|
|
|
645
642
|
riderId: string;
|
|
646
643
|
};
|
|
647
644
|
body: {
|
|
648
|
-
firstName
|
|
649
|
-
lastName
|
|
650
|
-
|
|
651
|
-
|
|
645
|
+
firstName: string;
|
|
646
|
+
lastName: string;
|
|
647
|
+
phoneNumber: string;
|
|
648
|
+
nationalId: string;
|
|
649
|
+
plateNumber: string;
|
|
650
|
+
jacketId: string;
|
|
652
651
|
};
|
|
653
652
|
headers: {
|
|
654
653
|
authorization: string;
|
|
@@ -255,23 +255,10 @@ exports.createRiderSchema = zod_1.z.object({
|
|
|
255
255
|
nationalId: zod_1.z
|
|
256
256
|
.string()
|
|
257
257
|
.regex(nationalIdRegex, "National ID must be 16 digits"),
|
|
258
|
-
email: zod_1.z
|
|
259
|
-
.string()
|
|
260
|
-
.email("Invalid email address")
|
|
261
|
-
.optional()
|
|
262
|
-
.nullable()
|
|
263
|
-
.or(zod_1.z.literal("")),
|
|
264
|
-
password: zod_1.z
|
|
265
|
-
.string()
|
|
266
|
-
.min(6, "Password must be at least 6 characters")
|
|
267
|
-
.max(100, "Password cannot exceed 100 characters")
|
|
268
|
-
.optional()
|
|
269
|
-
.nullable(),
|
|
270
258
|
plateNumber: zod_1.z.string().max(20, "Plate number cannot exceed 20 characters"),
|
|
271
259
|
jacketId: zod_1.z
|
|
272
260
|
.string()
|
|
273
261
|
.regex(jacketIdRegex, "jacketId required and must be of format JKT-"),
|
|
274
|
-
securityClearanceId: zod_1.z.string().max(50, "SecurityClearanceId required"),
|
|
275
262
|
}),
|
|
276
263
|
params: zod_1.z.object({}).optional(),
|
|
277
264
|
query: zod_1.z.object({}).optional(),
|
|
@@ -341,24 +328,23 @@ exports.updateRiderProfileSchema = zod_1.z.object({
|
|
|
341
328
|
firstName: zod_1.z
|
|
342
329
|
.string()
|
|
343
330
|
.min(2, "First name must be at least 2 characters")
|
|
344
|
-
.max(100, "First name cannot exceed 100 characters")
|
|
345
|
-
.optional(),
|
|
331
|
+
.max(100, "First name cannot exceed 100 characters"),
|
|
346
332
|
lastName: zod_1.z
|
|
347
333
|
.string()
|
|
348
334
|
.min(2, "Last name must be at least 2 characters")
|
|
349
|
-
.max(100, "Last name cannot exceed 100 characters")
|
|
350
|
-
|
|
351
|
-
email: zod_1.z
|
|
335
|
+
.max(100, "Last name cannot exceed 100 characters"),
|
|
336
|
+
phoneNumber: zod_1.z
|
|
352
337
|
.string()
|
|
353
|
-
.
|
|
354
|
-
|
|
355
|
-
.
|
|
356
|
-
.
|
|
338
|
+
.regex(phoneNumberRegex, "Phone number must be a valid Rwandan number (078/079/072/073) followed by 7 digits"),
|
|
339
|
+
nationalId: zod_1.z
|
|
340
|
+
.string()
|
|
341
|
+
.regex(nationalIdRegex, "National ID must be 16 digits"),
|
|
357
342
|
plateNumber: zod_1.z
|
|
358
343
|
.string()
|
|
359
|
-
.max(20, "Plate number cannot exceed 20 characters")
|
|
360
|
-
|
|
361
|
-
.
|
|
344
|
+
.max(20, "Plate number cannot exceed 20 characters"),
|
|
345
|
+
jacketId: zod_1.z
|
|
346
|
+
.string()
|
|
347
|
+
.regex(jacketIdRegex, "jacketId required and must be of format JKT-"),
|
|
362
348
|
})
|
|
363
349
|
.refine((data) => Object.keys(data).length > 0, {
|
|
364
350
|
message: "At least one field must be provided for update",
|