vr-commons 1.0.65 → 1.0.67

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.
@@ -11,7 +11,7 @@ export interface BaseUserProfile {
11
11
  id: string;
12
12
  firstName: string;
13
13
  lastName: string;
14
- phoneNumber: string;
14
+ primaryPhone: string;
15
15
  email: string | null;
16
16
  nationalId: string;
17
17
  isActive: boolean;
@@ -25,7 +25,7 @@ const formatUserProfile = (user, viewerType = "ADMIN", options = {}) => {
25
25
  id: user.id,
26
26
  firstName: user.firstName,
27
27
  lastName: user.lastName,
28
- phoneNumber: user.phoneNumber,
28
+ primaryPhone: user.primaryPhone?.phoneNumber,
29
29
  email: user.email,
30
30
  nationalId: user.nationalId,
31
31
  isActive: user.isActive,
@@ -790,14 +790,14 @@ export declare const listAppSpecsSchema: z.ZodObject<{
790
790
  search?: string | undefined;
791
791
  isActive?: "true" | "false" | undefined;
792
792
  sortBy?: "createdAt" | "updatedAt" | "version" | undefined;
793
- sortOrder?: "DESC" | "ASC" | undefined;
793
+ sortOrder?: "ASC" | "DESC" | undefined;
794
794
  }, {
795
795
  search?: string | undefined;
796
796
  limit?: string | undefined;
797
797
  isActive?: "true" | "false" | undefined;
798
798
  page?: string | undefined;
799
799
  sortBy?: "createdAt" | "updatedAt" | "version" | undefined;
800
- sortOrder?: "DESC" | "ASC" | undefined;
800
+ sortOrder?: "ASC" | "DESC" | undefined;
801
801
  }>;
802
802
  }, "strip", z.ZodTypeAny, {
803
803
  query: {
@@ -806,7 +806,7 @@ export declare const listAppSpecsSchema: z.ZodObject<{
806
806
  search?: string | undefined;
807
807
  isActive?: "true" | "false" | undefined;
808
808
  sortBy?: "createdAt" | "updatedAt" | "version" | undefined;
809
- sortOrder?: "DESC" | "ASC" | undefined;
809
+ sortOrder?: "ASC" | "DESC" | undefined;
810
810
  };
811
811
  }, {
812
812
  query: {
@@ -815,7 +815,7 @@ export declare const listAppSpecsSchema: z.ZodObject<{
815
815
  isActive?: "true" | "false" | undefined;
816
816
  page?: string | undefined;
817
817
  sortBy?: "createdAt" | "updatedAt" | "version" | undefined;
818
- sortOrder?: "DESC" | "ASC" | undefined;
818
+ sortOrder?: "ASC" | "DESC" | undefined;
819
819
  };
820
820
  }>;
821
821
  export declare const getAppSpecsSchema: z.ZodObject<{
@@ -20,16 +20,16 @@ export declare const riderLoginSchema: z.ZodObject<{
20
20
  phoneNumber: string;
21
21
  nationalId: string;
22
22
  };
23
- query?: {} | undefined;
24
23
  params?: {} | undefined;
24
+ query?: {} | undefined;
25
25
  headers?: {} | undefined;
26
26
  }, {
27
27
  body: {
28
28
  phoneNumber: string;
29
29
  nationalId: string;
30
30
  };
31
- query?: {} | undefined;
32
31
  params?: {} | undefined;
32
+ query?: {} | undefined;
33
33
  headers?: {} | undefined;
34
34
  }>;
35
35
  export declare const userLoginSchema: z.ZodObject<{
@@ -96,78 +96,98 @@ export declare const registerSchema: z.ZodObject<{
96
96
  email: z.ZodOptional<z.ZodString>;
97
97
  password: z.ZodString;
98
98
  }, "strict", z.ZodTypeAny, {
99
- firstName: string;
100
- lastName: string;
101
99
  phoneNumber: string;
102
100
  password: string;
103
- email?: string | undefined;
104
- }, {
105
101
  firstName: string;
106
102
  lastName: string;
103
+ email?: string | undefined;
104
+ }, {
107
105
  phoneNumber: string;
108
106
  password: string;
107
+ firstName: string;
108
+ lastName: string;
109
109
  email?: string | undefined;
110
110
  }>;
111
111
  }, "strip", z.ZodTypeAny, {
112
112
  body: {
113
- firstName: string;
114
- lastName: string;
115
113
  phoneNumber: string;
116
114
  password: string;
115
+ firstName: string;
116
+ lastName: string;
117
117
  email?: string | undefined;
118
118
  };
119
119
  }, {
120
120
  body: {
121
- firstName: string;
122
- lastName: string;
123
121
  phoneNumber: string;
124
122
  password: string;
123
+ firstName: string;
124
+ lastName: string;
125
125
  email?: string | undefined;
126
126
  };
127
127
  }>;
128
- export declare const confirmSchema: z.ZodObject<{
128
+ export declare const requestOtpSchema: z.ZodObject<{
129
129
  body: z.ZodObject<{
130
130
  phoneNumber: z.ZodString;
131
- otp: z.ZodString;
132
- }, "strict", z.ZodTypeAny, {
131
+ }, "strip", z.ZodTypeAny, {
133
132
  phoneNumber: string;
134
- otp: string;
135
133
  }, {
136
134
  phoneNumber: string;
137
- otp: string;
138
135
  }>;
139
136
  }, "strip", z.ZodTypeAny, {
140
137
  body: {
141
138
  phoneNumber: string;
142
- otp: string;
143
139
  };
144
140
  }, {
145
141
  body: {
146
142
  phoneNumber: string;
147
- otp: string;
148
143
  };
149
144
  }>;
150
- export declare const verifySchema: z.ZodObject<{
151
- body: z.ZodObject<{
145
+ export declare const verifyOtpSchema: z.ZodObject<{
146
+ body: z.ZodEffects<z.ZodObject<{
152
147
  phoneNumber: z.ZodString;
153
- }, "strict", z.ZodTypeAny, {
148
+ otp: z.ZodString;
149
+ firstName: z.ZodOptional<z.ZodString>;
150
+ lastName: z.ZodOptional<z.ZodString>;
151
+ }, "strip", z.ZodTypeAny, {
154
152
  phoneNumber: string;
153
+ otp: string;
154
+ firstName?: string | undefined;
155
+ lastName?: string | undefined;
155
156
  }, {
156
157
  phoneNumber: string;
158
+ otp: string;
159
+ firstName?: string | undefined;
160
+ lastName?: string | undefined;
161
+ }>, {
162
+ phoneNumber: string;
163
+ otp: string;
164
+ firstName?: string | undefined;
165
+ lastName?: string | undefined;
166
+ }, {
167
+ phoneNumber: string;
168
+ otp: string;
169
+ firstName?: string | undefined;
170
+ lastName?: string | undefined;
157
171
  }>;
158
172
  }, "strip", z.ZodTypeAny, {
159
173
  body: {
160
174
  phoneNumber: string;
175
+ otp: string;
176
+ firstName?: string | undefined;
177
+ lastName?: string | undefined;
161
178
  };
162
179
  }, {
163
180
  body: {
164
181
  phoneNumber: string;
182
+ otp: string;
183
+ firstName?: string | undefined;
184
+ lastName?: string | undefined;
165
185
  };
166
186
  }>;
167
187
  export declare const resendOtpSchema: z.ZodObject<{
168
188
  body: z.ZodObject<{
169
189
  phoneNumber: z.ZodString;
170
- }, "strict", z.ZodTypeAny, {
190
+ }, "strip", z.ZodTypeAny, {
171
191
  phoneNumber: string;
172
192
  }, {
173
193
  phoneNumber: string;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resendOtpSchema = exports.verifySchema = exports.confirmSchema = exports.registerSchema = exports.refreshTokenSchema = exports.forgotPasswordSchema = exports.userLoginSchema = exports.riderLoginSchema = exports.passwordRegex = exports.phoneRegex = void 0;
3
+ exports.resendOtpSchema = exports.verifyOtpSchema = exports.requestOtpSchema = exports.registerSchema = exports.refreshTokenSchema = exports.forgotPasswordSchema = exports.userLoginSchema = exports.riderLoginSchema = exports.passwordRegex = exports.phoneRegex = void 0;
4
4
  const zod_1 = require("zod");
5
- exports.phoneRegex = /^[0-9]{10,15}$/;
5
+ exports.phoneRegex = /^\+?[0-9]{10,15}$/;
6
6
  exports.passwordRegex = /^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{6,}$/;
7
7
  exports.riderLoginSchema = zod_1.z.object({
8
8
  body: zod_1.z.object({
@@ -52,25 +52,40 @@ exports.registerSchema = zod_1.z.object({
52
52
  })
53
53
  .strict(),
54
54
  });
55
- exports.confirmSchema = zod_1.z.object({
56
- body: zod_1.z
57
- .object({
58
- phoneNumber: zod_1.z.string().regex(exports.phoneRegex, "Invalid phone number format"),
59
- otp: zod_1.z.string().length(6, "OTP must be 6 digits"),
60
- })
61
- .strict(),
55
+ exports.requestOtpSchema = zod_1.z.object({
56
+ body: zod_1.z.object({
57
+ phoneNumber: zod_1.z
58
+ .string()
59
+ .regex(exports.phoneRegex, "Invalid phone number format. Use format: +250788123456"),
60
+ }),
62
61
  });
63
- exports.verifySchema = zod_1.z.object({
62
+ exports.verifyOtpSchema = zod_1.z.object({
64
63
  body: zod_1.z
65
64
  .object({
66
65
  phoneNumber: zod_1.z.string().regex(exports.phoneRegex, "Invalid phone number format"),
66
+ otp: zod_1.z.string().length(6, "OTP must be 6 digits"),
67
+ firstName: zod_1.z
68
+ .string()
69
+ .min(2, "First name must be at least 2 characters")
70
+ .max(50)
71
+ .optional(),
72
+ lastName: zod_1.z
73
+ .string()
74
+ .min(2, "Last name must be at least 2 characters")
75
+ .max(50)
76
+ .optional(),
67
77
  })
68
- .strict(),
78
+ .refine((data) => {
79
+ // If it's a new user, firstName and lastName are required
80
+ // We'll check this in service by checking if user exists
81
+ return true;
82
+ }, {
83
+ message: "First name and last name are required for new users",
84
+ path: ["firstName", "lastName"],
85
+ }),
69
86
  });
70
87
  exports.resendOtpSchema = zod_1.z.object({
71
- body: zod_1.z
72
- .object({
88
+ body: zod_1.z.object({
73
89
  phoneNumber: zod_1.z.string().regex(exports.phoneRegex, "Invalid phone number format"),
74
- })
75
- .strict(),
90
+ }),
76
91
  });
@@ -11,13 +11,13 @@ export declare const listUserPaymentPlansSchema: z.ZodObject<{
11
11
  page: number;
12
12
  status?: "pending" | "succeeded" | "failed" | undefined;
13
13
  sortBy?: "createdAt" | "updatedAt" | "status" | "nextInstallmentDueAt" | undefined;
14
- sortOrder?: "DESC" | "ASC" | undefined;
14
+ sortOrder?: "ASC" | "DESC" | undefined;
15
15
  }, {
16
16
  limit?: string | undefined;
17
- status?: "pending" | "succeeded" | "failed" | undefined;
18
17
  page?: string | undefined;
18
+ status?: "pending" | "succeeded" | "failed" | undefined;
19
19
  sortBy?: "createdAt" | "updatedAt" | "status" | "nextInstallmentDueAt" | undefined;
20
- sortOrder?: "DESC" | "ASC" | undefined;
20
+ sortOrder?: "ASC" | "DESC" | undefined;
21
21
  }>;
22
22
  }, "strip", z.ZodTypeAny, {
23
23
  query: {
@@ -25,15 +25,15 @@ export declare const listUserPaymentPlansSchema: z.ZodObject<{
25
25
  page: number;
26
26
  status?: "pending" | "succeeded" | "failed" | undefined;
27
27
  sortBy?: "createdAt" | "updatedAt" | "status" | "nextInstallmentDueAt" | undefined;
28
- sortOrder?: "DESC" | "ASC" | undefined;
28
+ sortOrder?: "ASC" | "DESC" | undefined;
29
29
  };
30
30
  }, {
31
31
  query: {
32
32
  limit?: string | undefined;
33
- status?: "pending" | "succeeded" | "failed" | undefined;
34
33
  page?: string | undefined;
34
+ status?: "pending" | "succeeded" | "failed" | undefined;
35
35
  sortBy?: "createdAt" | "updatedAt" | "status" | "nextInstallmentDueAt" | undefined;
36
- sortOrder?: "DESC" | "ASC" | undefined;
36
+ sortOrder?: "ASC" | "DESC" | undefined;
37
37
  };
38
38
  }>;
39
39
  export declare const getUserPaymentPlanSchema: z.ZodObject<{
@@ -21,20 +21,20 @@ export declare const extendSessionSchema: z.ZodObject<{
21
21
  deviceSerialNumber: z.ZodString;
22
22
  sessionId: z.ZodString;
23
23
  }, "strip", z.ZodTypeAny, {
24
- sessionId: string;
25
24
  deviceSerialNumber: string;
26
- }, {
27
25
  sessionId: string;
26
+ }, {
28
27
  deviceSerialNumber: string;
28
+ sessionId: string;
29
29
  }>;
30
30
  }, "strip", z.ZodTypeAny, {
31
31
  body: {
32
- sessionId: string;
33
32
  deviceSerialNumber: string;
33
+ sessionId: string;
34
34
  };
35
35
  }, {
36
36
  body: {
37
- sessionId: string;
38
37
  deviceSerialNumber: string;
38
+ sessionId: string;
39
39
  };
40
40
  }>;
@@ -1,5 +1,5 @@
1
1
  export { validate } from "./validate.validations";
2
- export { riderLoginSchema, forgotPasswordSchema, userLoginSchema, refreshTokenSchema, registerSchema, confirmSchema, verifySchema, resendOtpSchema, } from "./auth.validations";
2
+ export { riderLoginSchema, forgotPasswordSchema, userLoginSchema, refreshTokenSchema, registerSchema, verifyOtpSchema, resendOtpSchema, requestOtpSchema, } from "./auth.validations";
3
3
  export { createUserSchema, getUserByIdSchema, updateUserProfileSchema, getAllUsersSchema, viewProfileSchema, passengerSignupSchema, updatePassengerProfileSchema, updateRiderProfileSchema, createRiderSchema, changePasswordSchema, deactivateAccountSchema, deleteAccountSchema, updateProfileSchema, } from "./profiles.validations";
4
4
  export { listBansSchema, listPendingAppealsSchema, listSuspensionsSchema, reviewAppealSchema, revokeBanSchema, revokeSuspensionSchema, extendSuspensionSchema, exportBansSchema, } from "./moderation.validations";
5
5
  export { submitBanAppealSchema, submitSuspensionAppealSchema, } from "./appeals.validations";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.payInstallmentSchema = exports.extendSessionSchema = exports.unlockDeviceSchema = exports.getUserPaymentPlanSchema = exports.listUserPaymentPlansSchema = exports.getAppSpecsSchema = exports.activateAppSpecsSchema = exports.getActiveAppSpecsSchema = exports.listAppSpecsSchema = exports.updateAppSpecsSchema = exports.createAppSpecsSchema = exports.createSuspensionSchema = exports.getUserSuspensionsSchema = exports.getSuspensionSchema = exports.createBanSchema = exports.getUserRestrictionsSchema = exports.getBanSchema = exports.submitSuspensionAppealSchema = exports.submitBanAppealSchema = exports.exportBansSchema = exports.extendSuspensionSchema = exports.revokeSuspensionSchema = exports.revokeBanSchema = exports.reviewAppealSchema = exports.listSuspensionsSchema = exports.listPendingAppealsSchema = exports.listBansSchema = exports.updateProfileSchema = exports.deleteAccountSchema = exports.deactivateAccountSchema = exports.changePasswordSchema = exports.createRiderSchema = exports.updateRiderProfileSchema = exports.updatePassengerProfileSchema = exports.passengerSignupSchema = exports.viewProfileSchema = exports.getAllUsersSchema = exports.updateUserProfileSchema = exports.getUserByIdSchema = exports.createUserSchema = exports.resendOtpSchema = exports.verifySchema = exports.confirmSchema = exports.registerSchema = exports.refreshTokenSchema = exports.userLoginSchema = exports.forgotPasswordSchema = exports.riderLoginSchema = exports.validate = void 0;
3
+ exports.payInstallmentSchema = exports.extendSessionSchema = exports.unlockDeviceSchema = exports.getUserPaymentPlanSchema = exports.listUserPaymentPlansSchema = exports.getAppSpecsSchema = exports.activateAppSpecsSchema = exports.getActiveAppSpecsSchema = exports.listAppSpecsSchema = exports.updateAppSpecsSchema = exports.createAppSpecsSchema = exports.createSuspensionSchema = exports.getUserSuspensionsSchema = exports.getSuspensionSchema = exports.createBanSchema = exports.getUserRestrictionsSchema = exports.getBanSchema = exports.submitSuspensionAppealSchema = exports.submitBanAppealSchema = exports.exportBansSchema = exports.extendSuspensionSchema = exports.revokeSuspensionSchema = exports.revokeBanSchema = exports.reviewAppealSchema = exports.listSuspensionsSchema = exports.listPendingAppealsSchema = exports.listBansSchema = exports.updateProfileSchema = exports.deleteAccountSchema = exports.deactivateAccountSchema = exports.changePasswordSchema = exports.createRiderSchema = exports.updateRiderProfileSchema = exports.updatePassengerProfileSchema = exports.passengerSignupSchema = exports.viewProfileSchema = exports.getAllUsersSchema = exports.updateUserProfileSchema = exports.getUserByIdSchema = exports.createUserSchema = exports.requestOtpSchema = exports.resendOtpSchema = exports.verifyOtpSchema = exports.registerSchema = exports.refreshTokenSchema = exports.userLoginSchema = exports.forgotPasswordSchema = exports.riderLoginSchema = exports.validate = void 0;
4
4
  var validate_validations_1 = require("./validate.validations");
5
5
  Object.defineProperty(exports, "validate", { enumerable: true, get: function () { return validate_validations_1.validate; } });
6
6
  var auth_validations_1 = require("./auth.validations");
@@ -9,9 +9,9 @@ Object.defineProperty(exports, "forgotPasswordSchema", { enumerable: true, get:
9
9
  Object.defineProperty(exports, "userLoginSchema", { enumerable: true, get: function () { return auth_validations_1.userLoginSchema; } });
10
10
  Object.defineProperty(exports, "refreshTokenSchema", { enumerable: true, get: function () { return auth_validations_1.refreshTokenSchema; } });
11
11
  Object.defineProperty(exports, "registerSchema", { enumerable: true, get: function () { return auth_validations_1.registerSchema; } });
12
- Object.defineProperty(exports, "confirmSchema", { enumerable: true, get: function () { return auth_validations_1.confirmSchema; } });
13
- Object.defineProperty(exports, "verifySchema", { enumerable: true, get: function () { return auth_validations_1.verifySchema; } });
12
+ Object.defineProperty(exports, "verifyOtpSchema", { enumerable: true, get: function () { return auth_validations_1.verifyOtpSchema; } });
14
13
  Object.defineProperty(exports, "resendOtpSchema", { enumerable: true, get: function () { return auth_validations_1.resendOtpSchema; } });
14
+ Object.defineProperty(exports, "requestOtpSchema", { enumerable: true, get: function () { return auth_validations_1.requestOtpSchema; } });
15
15
  var profiles_validations_1 = require("./profiles.validations");
16
16
  // Admin/Super Admin Schema
17
17
  Object.defineProperty(exports, "createUserSchema", { enumerable: true, get: function () { return profiles_validations_1.createUserSchema; } });
@@ -24,19 +24,19 @@ export declare const listBansSchema: z.ZodObject<{
24
24
  sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
25
25
  fromDate?: string | undefined;
26
26
  toDate?: string | undefined;
27
- sortOrder?: "DESC" | "ASC" | undefined;
27
+ sortOrder?: "ASC" | "DESC" | undefined;
28
28
  }, {
29
29
  search?: string | undefined;
30
30
  limit?: string | undefined;
31
31
  userId?: string | undefined;
32
+ page?: string | undefined;
32
33
  isPermanent?: "true" | "false" | undefined;
33
34
  appealStatus?: "pending" | "approved" | "rejected" | undefined;
34
35
  status?: "active" | "revoked" | undefined;
35
- page?: string | undefined;
36
36
  sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
37
37
  fromDate?: string | undefined;
38
38
  toDate?: string | undefined;
39
- sortOrder?: "DESC" | "ASC" | undefined;
39
+ sortOrder?: "ASC" | "DESC" | undefined;
40
40
  }>, {
41
41
  limit: number;
42
42
  page: number;
@@ -48,19 +48,19 @@ export declare const listBansSchema: z.ZodObject<{
48
48
  sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
49
49
  fromDate?: string | undefined;
50
50
  toDate?: string | undefined;
51
- sortOrder?: "DESC" | "ASC" | undefined;
51
+ sortOrder?: "ASC" | "DESC" | undefined;
52
52
  }, {
53
53
  search?: string | undefined;
54
54
  limit?: string | undefined;
55
55
  userId?: string | undefined;
56
+ page?: string | undefined;
56
57
  isPermanent?: "true" | "false" | undefined;
57
58
  appealStatus?: "pending" | "approved" | "rejected" | undefined;
58
59
  status?: "active" | "revoked" | undefined;
59
- page?: string | undefined;
60
60
  sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
61
61
  fromDate?: string | undefined;
62
62
  toDate?: string | undefined;
63
- sortOrder?: "DESC" | "ASC" | undefined;
63
+ sortOrder?: "ASC" | "DESC" | undefined;
64
64
  }>;
65
65
  }, "strip", z.ZodTypeAny, {
66
66
  query: {
@@ -74,21 +74,21 @@ export declare const listBansSchema: z.ZodObject<{
74
74
  sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
75
75
  fromDate?: string | undefined;
76
76
  toDate?: string | undefined;
77
- sortOrder?: "DESC" | "ASC" | undefined;
77
+ sortOrder?: "ASC" | "DESC" | undefined;
78
78
  };
79
79
  }, {
80
80
  query: {
81
81
  search?: string | undefined;
82
82
  limit?: string | undefined;
83
83
  userId?: string | undefined;
84
+ page?: string | undefined;
84
85
  isPermanent?: "true" | "false" | undefined;
85
86
  appealStatus?: "pending" | "approved" | "rejected" | undefined;
86
87
  status?: "active" | "revoked" | undefined;
87
- page?: string | undefined;
88
88
  sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
89
89
  fromDate?: string | undefined;
90
90
  toDate?: string | undefined;
91
- sortOrder?: "DESC" | "ASC" | undefined;
91
+ sortOrder?: "ASC" | "DESC" | undefined;
92
92
  };
93
93
  }>;
94
94
  export declare const listSuspensionsSchema: z.ZodObject<{
@@ -111,21 +111,21 @@ export declare const listSuspensionsSchema: z.ZodObject<{
111
111
  userId?: string | undefined;
112
112
  appealStatus?: "pending" | "approved" | "rejected" | undefined;
113
113
  status?: "active" | "revoked" | "expired" | undefined;
114
- sortBy?: "createdAt" | "startedAt" | "reason" | "endsAt" | undefined;
114
+ sortBy?: "createdAt" | "reason" | "endsAt" | "startedAt" | undefined;
115
115
  fromDate?: string | undefined;
116
116
  toDate?: string | undefined;
117
- sortOrder?: "DESC" | "ASC" | undefined;
117
+ sortOrder?: "ASC" | "DESC" | undefined;
118
118
  }, {
119
119
  search?: string | undefined;
120
120
  limit?: string | undefined;
121
121
  userId?: string | undefined;
122
+ page?: string | undefined;
122
123
  appealStatus?: "pending" | "approved" | "rejected" | undefined;
123
124
  status?: "active" | "revoked" | "expired" | undefined;
124
- page?: string | undefined;
125
- sortBy?: "createdAt" | "startedAt" | "reason" | "endsAt" | undefined;
125
+ sortBy?: "createdAt" | "reason" | "endsAt" | "startedAt" | undefined;
126
126
  fromDate?: string | undefined;
127
127
  toDate?: string | undefined;
128
- sortOrder?: "DESC" | "ASC" | undefined;
128
+ sortOrder?: "ASC" | "DESC" | undefined;
129
129
  }>, {
130
130
  limit: number;
131
131
  page: number;
@@ -133,21 +133,21 @@ export declare const listSuspensionsSchema: z.ZodObject<{
133
133
  userId?: string | undefined;
134
134
  appealStatus?: "pending" | "approved" | "rejected" | undefined;
135
135
  status?: "active" | "revoked" | "expired" | undefined;
136
- sortBy?: "createdAt" | "startedAt" | "reason" | "endsAt" | undefined;
136
+ sortBy?: "createdAt" | "reason" | "endsAt" | "startedAt" | undefined;
137
137
  fromDate?: string | undefined;
138
138
  toDate?: string | undefined;
139
- sortOrder?: "DESC" | "ASC" | undefined;
139
+ sortOrder?: "ASC" | "DESC" | undefined;
140
140
  }, {
141
141
  search?: string | undefined;
142
142
  limit?: string | undefined;
143
143
  userId?: string | undefined;
144
+ page?: string | undefined;
144
145
  appealStatus?: "pending" | "approved" | "rejected" | undefined;
145
146
  status?: "active" | "revoked" | "expired" | undefined;
146
- page?: string | undefined;
147
- sortBy?: "createdAt" | "startedAt" | "reason" | "endsAt" | undefined;
147
+ sortBy?: "createdAt" | "reason" | "endsAt" | "startedAt" | undefined;
148
148
  fromDate?: string | undefined;
149
149
  toDate?: string | undefined;
150
- sortOrder?: "DESC" | "ASC" | undefined;
150
+ sortOrder?: "ASC" | "DESC" | undefined;
151
151
  }>;
152
152
  }, "strip", z.ZodTypeAny, {
153
153
  query: {
@@ -157,23 +157,23 @@ export declare const listSuspensionsSchema: z.ZodObject<{
157
157
  userId?: string | undefined;
158
158
  appealStatus?: "pending" | "approved" | "rejected" | undefined;
159
159
  status?: "active" | "revoked" | "expired" | undefined;
160
- sortBy?: "createdAt" | "startedAt" | "reason" | "endsAt" | undefined;
160
+ sortBy?: "createdAt" | "reason" | "endsAt" | "startedAt" | undefined;
161
161
  fromDate?: string | undefined;
162
162
  toDate?: string | undefined;
163
- sortOrder?: "DESC" | "ASC" | undefined;
163
+ sortOrder?: "ASC" | "DESC" | undefined;
164
164
  };
165
165
  }, {
166
166
  query: {
167
167
  search?: string | undefined;
168
168
  limit?: string | undefined;
169
169
  userId?: string | undefined;
170
+ page?: string | undefined;
170
171
  appealStatus?: "pending" | "approved" | "rejected" | undefined;
171
172
  status?: "active" | "revoked" | "expired" | undefined;
172
- page?: string | undefined;
173
- sortBy?: "createdAt" | "startedAt" | "reason" | "endsAt" | undefined;
173
+ sortBy?: "createdAt" | "reason" | "endsAt" | "startedAt" | undefined;
174
174
  fromDate?: string | undefined;
175
175
  toDate?: string | undefined;
176
- sortOrder?: "DESC" | "ASC" | undefined;
176
+ sortOrder?: "ASC" | "DESC" | undefined;
177
177
  };
178
178
  }>;
179
179
  export declare const revokeBanSchema: z.ZodObject<{
@@ -21,21 +21,21 @@ export declare const payInstallmentSchema: z.ZodObject<{
21
21
  provider?: "mtn_momo" | "airtel_money" | undefined;
22
22
  }>;
23
23
  }, "strip", z.ZodTypeAny, {
24
+ params: {
25
+ planId: string;
26
+ installmentId: string;
27
+ };
24
28
  body: {
25
29
  phoneNumber: string;
26
30
  provider: "mtn_momo" | "airtel_money";
27
31
  };
32
+ }, {
28
33
  params: {
29
34
  planId: string;
30
35
  installmentId: string;
31
36
  };
32
- }, {
33
37
  body: {
34
38
  phoneNumber: string;
35
39
  provider?: "mtn_momo" | "airtel_money" | undefined;
36
40
  };
37
- params: {
38
- planId: string;
39
- installmentId: string;
40
- };
41
41
  }>;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.payInstallmentSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const uuidSchema = zod_1.z.string().uuid("Invalid ID format");
6
- const phoneRegex = /^(\+?250|0)?[7-9][0-9]{8}$/;
6
+ const phoneRegex = /^\+?[0-9]{10,15}$/;
7
7
  exports.payInstallmentSchema = zod_1.z.object({
8
8
  params: zod_1.z.object({
9
9
  planId: uuidSchema,
@@ -15,25 +15,25 @@ export declare const createUserSchema: z.ZodObject<{
15
15
  plateNumber: z.ZodNullable<z.ZodOptional<z.ZodString>>;
16
16
  jacketId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
17
17
  }, "strip", z.ZodTypeAny, {
18
- firstName: string;
19
- lastName: string;
20
18
  phoneNumber: string;
21
- password: string;
22
19
  nationalId: string;
23
- role: "RIDER" | "PASSENGER" | "ADMIN" | "AGENT" | "SUPER_ADMIN";
24
- jacketId?: string | null | undefined;
20
+ password: string;
21
+ firstName: string;
22
+ lastName: string;
23
+ role: "AGENT" | "RIDER" | "PASSENGER" | "ADMIN" | "SUPER_ADMIN";
25
24
  email?: string | null | undefined;
26
25
  plateNumber?: string | null | undefined;
26
+ jacketId?: string | null | undefined;
27
27
  }, {
28
- firstName: string;
29
- lastName: string;
30
28
  phoneNumber: string;
31
- password: string;
32
29
  nationalId: string;
33
- role: "RIDER" | "PASSENGER" | "ADMIN" | "AGENT" | "SUPER_ADMIN";
34
- jacketId?: string | null | undefined;
30
+ password: string;
31
+ firstName: string;
32
+ lastName: string;
33
+ role: "AGENT" | "RIDER" | "PASSENGER" | "ADMIN" | "SUPER_ADMIN";
35
34
  email?: string | null | undefined;
36
35
  plateNumber?: string | null | undefined;
36
+ jacketId?: string | null | undefined;
37
37
  }>;
38
38
  headers: z.ZodObject<{
39
39
  authorization: z.ZodString;
@@ -44,30 +44,30 @@ export declare const createUserSchema: z.ZodObject<{
44
44
  }>;
45
45
  }, "strip", z.ZodTypeAny, {
46
46
  body: {
47
- firstName: string;
48
- lastName: string;
49
47
  phoneNumber: string;
50
- password: string;
51
48
  nationalId: string;
52
- role: "RIDER" | "PASSENGER" | "ADMIN" | "AGENT" | "SUPER_ADMIN";
53
- jacketId?: string | null | undefined;
49
+ password: string;
50
+ firstName: string;
51
+ lastName: string;
52
+ role: "AGENT" | "RIDER" | "PASSENGER" | "ADMIN" | "SUPER_ADMIN";
54
53
  email?: string | null | undefined;
55
54
  plateNumber?: string | null | undefined;
55
+ jacketId?: string | null | undefined;
56
56
  };
57
57
  headers: {
58
58
  authorization: string;
59
59
  };
60
60
  }, {
61
61
  body: {
62
- firstName: string;
63
- lastName: string;
64
62
  phoneNumber: string;
65
- password: string;
66
63
  nationalId: string;
67
- role: "RIDER" | "PASSENGER" | "ADMIN" | "AGENT" | "SUPER_ADMIN";
68
- jacketId?: string | null | undefined;
64
+ password: string;
65
+ firstName: string;
66
+ lastName: string;
67
+ role: "AGENT" | "RIDER" | "PASSENGER" | "ADMIN" | "SUPER_ADMIN";
69
68
  email?: string | null | undefined;
70
69
  plateNumber?: string | null | undefined;
70
+ jacketId?: string | null | undefined;
71
71
  };
72
72
  headers: {
73
73
  authorization: string;
@@ -122,45 +122,45 @@ export declare const updateUserProfileSchema: z.ZodObject<{
122
122
  isDeactivated: z.ZodOptional<z.ZodBoolean>;
123
123
  password: z.ZodOptional<z.ZodString>;
124
124
  }, "strip", z.ZodTypeAny, {
125
- firstName?: string | undefined;
126
- lastName?: string | undefined;
127
125
  phoneNumber?: string | undefined;
128
126
  email?: string | null | undefined;
129
127
  password?: string | undefined;
128
+ firstName?: string | undefined;
129
+ lastName?: string | undefined;
130
130
  plateNumber?: string | null | undefined;
131
131
  isActive?: boolean | undefined;
132
- isDeactivated?: boolean | undefined;
133
132
  isSuspended?: boolean | undefined;
133
+ isDeactivated?: boolean | undefined;
134
134
  }, {
135
- firstName?: string | undefined;
136
- lastName?: string | undefined;
137
135
  phoneNumber?: string | undefined;
138
136
  email?: string | null | undefined;
139
137
  password?: string | undefined;
138
+ firstName?: string | undefined;
139
+ lastName?: string | undefined;
140
140
  plateNumber?: string | null | undefined;
141
141
  isActive?: boolean | undefined;
142
- isDeactivated?: boolean | undefined;
143
142
  isSuspended?: boolean | undefined;
143
+ isDeactivated?: boolean | undefined;
144
144
  }>, {
145
- firstName?: string | undefined;
146
- lastName?: string | undefined;
147
145
  phoneNumber?: string | undefined;
148
146
  email?: string | null | undefined;
149
147
  password?: string | undefined;
148
+ firstName?: string | undefined;
149
+ lastName?: string | undefined;
150
150
  plateNumber?: string | null | undefined;
151
151
  isActive?: boolean | undefined;
152
- isDeactivated?: boolean | undefined;
153
152
  isSuspended?: boolean | undefined;
153
+ isDeactivated?: boolean | undefined;
154
154
  }, {
155
- firstName?: string | undefined;
156
- lastName?: string | undefined;
157
155
  phoneNumber?: string | undefined;
158
156
  email?: string | null | undefined;
159
157
  password?: string | undefined;
158
+ firstName?: string | undefined;
159
+ lastName?: string | undefined;
160
160
  plateNumber?: string | null | undefined;
161
161
  isActive?: boolean | undefined;
162
- isDeactivated?: boolean | undefined;
163
162
  isSuspended?: boolean | undefined;
163
+ isDeactivated?: boolean | undefined;
164
164
  }>;
165
165
  headers: z.ZodObject<{
166
166
  authorization: z.ZodString;
@@ -170,37 +170,37 @@ export declare const updateUserProfileSchema: z.ZodObject<{
170
170
  authorization: string;
171
171
  }>;
172
172
  }, "strip", z.ZodTypeAny, {
173
+ params: {
174
+ userId: string;
175
+ };
173
176
  body: {
174
- firstName?: string | undefined;
175
- lastName?: string | undefined;
176
177
  phoneNumber?: string | undefined;
177
178
  email?: string | null | undefined;
178
179
  password?: string | undefined;
180
+ firstName?: string | undefined;
181
+ lastName?: string | undefined;
179
182
  plateNumber?: string | null | undefined;
180
183
  isActive?: boolean | undefined;
181
- isDeactivated?: boolean | undefined;
182
184
  isSuspended?: boolean | undefined;
183
- };
184
- params: {
185
- userId: string;
185
+ isDeactivated?: boolean | undefined;
186
186
  };
187
187
  headers: {
188
188
  authorization: string;
189
189
  };
190
190
  }, {
191
+ params: {
192
+ userId: string;
193
+ };
191
194
  body: {
192
- firstName?: string | undefined;
193
- lastName?: string | undefined;
194
195
  phoneNumber?: string | undefined;
195
196
  email?: string | null | undefined;
196
197
  password?: string | undefined;
198
+ firstName?: string | undefined;
199
+ lastName?: string | undefined;
197
200
  plateNumber?: string | null | undefined;
198
201
  isActive?: boolean | undefined;
199
- isDeactivated?: boolean | undefined;
200
202
  isSuspended?: boolean | undefined;
201
- };
202
- params: {
203
- userId: string;
203
+ isDeactivated?: boolean | undefined;
204
204
  };
205
205
  headers: {
206
206
  authorization: string;
@@ -220,29 +220,29 @@ export declare const getAllUsersSchema: z.ZodObject<{
220
220
  sortBy: z.ZodDefault<z.ZodEnum<["firstName", "lastLoginAt", "createdAt"]>>;
221
221
  order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
222
222
  }, "strip", z.ZodTypeAny, {
223
+ sortBy: "firstName" | "lastLoginAt" | "createdAt";
223
224
  order: "asc" | "desc";
224
- sortBy: "createdAt" | "firstName" | "lastLoginAt";
225
- search?: string | undefined;
226
- limit?: number | undefined;
225
+ role?: "AGENT" | "RIDER" | "PASSENGER" | "ADMIN" | "SUPER_ADMIN" | undefined;
227
226
  isActive?: boolean | undefined;
228
- role?: "RIDER" | "PASSENGER" | "ADMIN" | "AGENT" | "SUPER_ADMIN" | undefined;
229
- isBanned?: boolean | undefined;
230
227
  isSuspended?: boolean | undefined;
231
228
  page?: number | undefined;
229
+ limit?: number | undefined;
230
+ isBanned?: boolean | undefined;
231
+ search?: string | undefined;
232
232
  startDate?: string | undefined;
233
233
  endDate?: string | undefined;
234
234
  }, {
235
- search?: string | undefined;
236
- order?: "asc" | "desc" | undefined;
237
- limit?: string | undefined;
235
+ role?: "AGENT" | "RIDER" | "PASSENGER" | "ADMIN" | "SUPER_ADMIN" | undefined;
238
236
  isActive?: "true" | "false" | undefined;
239
- role?: "RIDER" | "PASSENGER" | "ADMIN" | "AGENT" | "SUPER_ADMIN" | undefined;
240
- isBanned?: "true" | "false" | undefined;
241
237
  isSuspended?: "true" | "false" | undefined;
242
238
  page?: string | undefined;
239
+ limit?: string | undefined;
240
+ isBanned?: "true" | "false" | undefined;
241
+ search?: string | undefined;
243
242
  startDate?: string | undefined;
244
243
  endDate?: string | undefined;
245
- sortBy?: "createdAt" | "firstName" | "lastLoginAt" | undefined;
244
+ sortBy?: "firstName" | "lastLoginAt" | "createdAt" | undefined;
245
+ order?: "asc" | "desc" | undefined;
246
246
  }>;
247
247
  headers: z.ZodObject<{
248
248
  authorization: z.ZodString;
@@ -253,15 +253,15 @@ export declare const getAllUsersSchema: z.ZodObject<{
253
253
  }>;
254
254
  }, "strip", z.ZodTypeAny, {
255
255
  query: {
256
+ sortBy: "firstName" | "lastLoginAt" | "createdAt";
256
257
  order: "asc" | "desc";
257
- sortBy: "createdAt" | "firstName" | "lastLoginAt";
258
- search?: string | undefined;
259
- limit?: number | undefined;
258
+ role?: "AGENT" | "RIDER" | "PASSENGER" | "ADMIN" | "SUPER_ADMIN" | undefined;
260
259
  isActive?: boolean | undefined;
261
- role?: "RIDER" | "PASSENGER" | "ADMIN" | "AGENT" | "SUPER_ADMIN" | undefined;
262
- isBanned?: boolean | undefined;
263
260
  isSuspended?: boolean | undefined;
264
261
  page?: number | undefined;
262
+ limit?: number | undefined;
263
+ isBanned?: boolean | undefined;
264
+ search?: string | undefined;
265
265
  startDate?: string | undefined;
266
266
  endDate?: string | undefined;
267
267
  };
@@ -270,17 +270,17 @@ export declare const getAllUsersSchema: z.ZodObject<{
270
270
  };
271
271
  }, {
272
272
  query: {
273
- search?: string | undefined;
274
- order?: "asc" | "desc" | undefined;
275
- limit?: string | undefined;
273
+ role?: "AGENT" | "RIDER" | "PASSENGER" | "ADMIN" | "SUPER_ADMIN" | undefined;
276
274
  isActive?: "true" | "false" | undefined;
277
- role?: "RIDER" | "PASSENGER" | "ADMIN" | "AGENT" | "SUPER_ADMIN" | undefined;
278
- isBanned?: "true" | "false" | undefined;
279
275
  isSuspended?: "true" | "false" | undefined;
280
276
  page?: string | undefined;
277
+ limit?: string | undefined;
278
+ isBanned?: "true" | "false" | undefined;
279
+ search?: string | undefined;
281
280
  startDate?: string | undefined;
282
281
  endDate?: string | undefined;
283
- sortBy?: "createdAt" | "firstName" | "lastLoginAt" | undefined;
282
+ sortBy?: "firstName" | "lastLoginAt" | "createdAt" | undefined;
283
+ order?: "asc" | "desc" | undefined;
284
284
  };
285
285
  headers: {
286
286
  authorization: string;
@@ -301,16 +301,16 @@ export declare const viewProfileSchema: z.ZodObject<{
301
301
  headers: {
302
302
  authorization: string;
303
303
  };
304
+ params?: {} | undefined;
304
305
  body?: {} | undefined;
305
306
  query?: {} | undefined;
306
- params?: {} | undefined;
307
307
  }, {
308
308
  headers: {
309
309
  authorization: string;
310
310
  };
311
+ params?: {} | undefined;
311
312
  body?: {} | undefined;
312
313
  query?: {} | undefined;
313
- params?: {} | undefined;
314
314
  }>;
315
315
  export declare const passengerSignupSchema: z.ZodObject<{
316
316
  body: z.ZodObject<{
@@ -323,47 +323,47 @@ export declare const passengerSignupSchema: z.ZodObject<{
323
323
  password: z.ZodNullable<z.ZodOptional<z.ZodString>>;
324
324
  plateNumber: z.ZodNullable<z.ZodOptional<z.ZodString>>;
325
325
  }, "strip", z.ZodTypeAny, {
326
- firstName: string;
327
- lastName: string;
328
326
  phoneNumber: string;
329
327
  nationalId: string;
330
- jacketId?: string | undefined;
328
+ firstName: string;
329
+ lastName: string;
331
330
  email?: string | null | undefined;
332
331
  password?: string | null | undefined;
333
332
  plateNumber?: string | null | undefined;
333
+ jacketId?: string | undefined;
334
334
  }, {
335
- firstName: string;
336
- lastName: string;
337
335
  phoneNumber: string;
338
336
  nationalId: string;
339
- jacketId?: string | undefined;
337
+ firstName: string;
338
+ lastName: string;
340
339
  email?: string | null | undefined;
341
340
  password?: string | null | undefined;
342
341
  plateNumber?: string | null | undefined;
342
+ jacketId?: string | undefined;
343
343
  }>;
344
344
  headers: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
345
345
  }, "strip", z.ZodTypeAny, {
346
346
  body: {
347
- firstName: string;
348
- lastName: string;
349
347
  phoneNumber: string;
350
348
  nationalId: string;
351
- jacketId?: string | undefined;
349
+ firstName: string;
350
+ lastName: string;
352
351
  email?: string | null | undefined;
353
352
  password?: string | null | undefined;
354
353
  plateNumber?: string | null | undefined;
354
+ jacketId?: string | undefined;
355
355
  };
356
356
  headers?: {} | undefined;
357
357
  }, {
358
358
  body: {
359
- firstName: string;
360
- lastName: string;
361
359
  phoneNumber: string;
362
360
  nationalId: string;
363
- jacketId?: string | undefined;
361
+ firstName: string;
362
+ lastName: string;
364
363
  email?: string | null | undefined;
365
364
  password?: string | null | undefined;
366
365
  plateNumber?: string | null | undefined;
366
+ jacketId?: string | undefined;
367
367
  };
368
368
  headers?: {} | undefined;
369
369
  }>;
@@ -420,44 +420,44 @@ export declare const createRiderSchema: z.ZodObject<{
420
420
  plateNumber: z.ZodString;
421
421
  jacketId: z.ZodString;
422
422
  }, "strip", z.ZodTypeAny, {
423
+ phoneNumber: string;
424
+ nationalId: string;
423
425
  firstName: string;
424
426
  lastName: string;
425
- phoneNumber: string;
426
- jacketId: string;
427
427
  plateNumber: string;
428
- nationalId: string;
428
+ jacketId: string;
429
429
  }, {
430
+ phoneNumber: string;
431
+ nationalId: string;
430
432
  firstName: string;
431
433
  lastName: string;
432
- phoneNumber: string;
433
- jacketId: string;
434
434
  plateNumber: string;
435
- nationalId: string;
435
+ jacketId: string;
436
436
  }>;
437
437
  params: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
438
438
  query: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
439
439
  }, "strip", z.ZodTypeAny, {
440
440
  body: {
441
+ phoneNumber: string;
442
+ nationalId: string;
441
443
  firstName: string;
442
444
  lastName: string;
443
- phoneNumber: string;
444
- jacketId: string;
445
445
  plateNumber: string;
446
- nationalId: string;
446
+ jacketId: string;
447
447
  };
448
- query?: {} | undefined;
449
448
  params?: {} | undefined;
449
+ query?: {} | undefined;
450
450
  }, {
451
451
  body: {
452
+ phoneNumber: string;
453
+ nationalId: string;
452
454
  firstName: string;
453
455
  lastName: string;
454
- phoneNumber: string;
455
- jacketId: string;
456
456
  plateNumber: string;
457
- nationalId: string;
457
+ jacketId: string;
458
458
  };
459
- query?: {} | undefined;
460
459
  params?: {} | undefined;
460
+ query?: {} | undefined;
461
461
  }>;
462
462
  export declare const updateRiderProfileSchema: z.ZodObject<{
463
463
  params: z.ZodObject<{
@@ -475,33 +475,33 @@ export declare const updateRiderProfileSchema: z.ZodObject<{
475
475
  plateNumber: z.ZodString;
476
476
  jacketId: z.ZodString;
477
477
  }, "strip", z.ZodTypeAny, {
478
+ phoneNumber: string;
479
+ nationalId: string;
478
480
  firstName: string;
479
481
  lastName: string;
480
- phoneNumber: string;
481
- jacketId: string;
482
482
  plateNumber: string;
483
- nationalId: string;
483
+ jacketId: string;
484
484
  }, {
485
+ phoneNumber: string;
486
+ nationalId: string;
485
487
  firstName: string;
486
488
  lastName: string;
487
- phoneNumber: string;
488
- jacketId: string;
489
489
  plateNumber: string;
490
- nationalId: string;
490
+ jacketId: string;
491
491
  }>, {
492
+ phoneNumber: string;
493
+ nationalId: string;
492
494
  firstName: string;
493
495
  lastName: string;
494
- phoneNumber: string;
495
- jacketId: string;
496
496
  plateNumber: string;
497
- nationalId: string;
497
+ jacketId: string;
498
498
  }, {
499
+ phoneNumber: string;
500
+ nationalId: string;
499
501
  firstName: string;
500
502
  lastName: string;
501
- phoneNumber: string;
502
- jacketId: string;
503
503
  plateNumber: string;
504
- nationalId: string;
504
+ jacketId: string;
505
505
  }>;
506
506
  query: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
507
507
  headers: z.ZodObject<{
@@ -512,32 +512,32 @@ export declare const updateRiderProfileSchema: z.ZodObject<{
512
512
  authorization: string;
513
513
  }>;
514
514
  }, "strip", z.ZodTypeAny, {
515
+ params: {
516
+ id: string;
517
+ };
515
518
  body: {
519
+ phoneNumber: string;
520
+ nationalId: string;
516
521
  firstName: string;
517
522
  lastName: string;
518
- phoneNumber: string;
519
- jacketId: string;
520
523
  plateNumber: string;
521
- nationalId: string;
522
- };
523
- params: {
524
- id: string;
524
+ jacketId: string;
525
525
  };
526
526
  headers: {
527
527
  authorization: string;
528
528
  };
529
529
  query?: {} | undefined;
530
530
  }, {
531
+ params: {
532
+ id: string;
533
+ };
531
534
  body: {
535
+ phoneNumber: string;
536
+ nationalId: string;
532
537
  firstName: string;
533
538
  lastName: string;
534
- phoneNumber: string;
535
- jacketId: string;
536
539
  plateNumber: string;
537
- nationalId: string;
538
- };
539
- params: {
540
- id: string;
540
+ jacketId: string;
541
541
  };
542
542
  headers: {
543
543
  authorization: string;
@@ -666,33 +666,33 @@ export declare const updateProfileSchema: z.ZodObject<{
666
666
  email: z.ZodOptional<z.ZodString>;
667
667
  nationalId: z.ZodOptional<z.ZodString>;
668
668
  }, "strict", z.ZodTypeAny, {
669
- firstName?: string | undefined;
670
- lastName?: string | undefined;
671
669
  phoneNumber?: string | undefined;
672
- email?: string | undefined;
673
670
  nationalId?: string | undefined;
674
- }, {
671
+ email?: string | undefined;
675
672
  firstName?: string | undefined;
676
673
  lastName?: string | undefined;
674
+ }, {
677
675
  phoneNumber?: string | undefined;
678
- email?: string | undefined;
679
676
  nationalId?: string | undefined;
677
+ email?: string | undefined;
678
+ firstName?: string | undefined;
679
+ lastName?: string | undefined;
680
680
  }>;
681
681
  }, "strip", z.ZodTypeAny, {
682
682
  body: {
683
- firstName?: string | undefined;
684
- lastName?: string | undefined;
685
683
  phoneNumber?: string | undefined;
686
- email?: string | undefined;
687
684
  nationalId?: string | undefined;
685
+ email?: string | undefined;
686
+ firstName?: string | undefined;
687
+ lastName?: string | undefined;
688
688
  };
689
689
  }, {
690
690
  body: {
691
- firstName?: string | undefined;
692
- lastName?: string | undefined;
693
691
  phoneNumber?: string | undefined;
694
- email?: string | undefined;
695
692
  nationalId?: string | undefined;
693
+ email?: string | undefined;
694
+ firstName?: string | undefined;
695
+ lastName?: string | undefined;
696
696
  };
697
697
  }>;
698
698
  export type CreateUserInput = z.infer<typeof createUserSchema>;
@@ -5,10 +5,10 @@ const zod_1 = require("zod");
5
5
  // ============================================================================
6
6
  // COMMON VALIDATIONS
7
7
  // ============================================================================
8
- exports.phoneNumberRegex = /^(078|079|072|073)\d{7}$/;
8
+ exports.phoneNumberRegex = /^\+?[0-9]{10,15}$/;
9
9
  exports.nationalIdRegex = /^\d{16}$/;
10
10
  exports.jacketIdRegex = /^JKT-\d{9}$/;
11
- exports.phoneRegex = /^[0-9]{10,15}$/;
11
+ exports.phoneRegex = /^\+?[0-9]{10,15}$/;
12
12
  // ============================================================================
13
13
  // ADMIN/SUPER ADMIN SCHEMAS
14
14
  // ============================================================================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vr-commons",
3
- "version": "1.0.65",
3
+ "version": "1.0.67",
4
4
  "description": "Shared functions package",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -100,7 +100,7 @@
100
100
  "date-fns": "^4.1.0",
101
101
  "rimraf": "^5.0.5",
102
102
  "typescript": "^5.3.3",
103
- "vr-models": "^1.0.43",
103
+ "vr-models": "^1.0.45",
104
104
  "zod": "^3.25.20"
105
105
  },
106
106
  "dependencies": {