vr-commons 1.0.69 → 1.0.71

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.
@@ -7,8 +7,7 @@ exports.formatTimeRemaining = exports.getTokenTimeRemaining = exports.shouldRefr
7
7
  const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
8
8
  // Get token lifespan from env with fallback to 30 days (in seconds)
9
9
  const getTokenLifespan = (type) => {
10
- const envVar = `${type}_TOKEN_LIFE_SPAN`;
11
- const value = process.env[envVar];
10
+ const value = process.env.TOKEN_LIFE_SPAN;
12
11
  if (value) {
13
12
  const parsed = parseInt(value, 10);
14
13
  if (!isNaN(parsed) && parsed > 0) {
@@ -16,7 +15,7 @@ const getTokenLifespan = (type) => {
16
15
  }
17
16
  }
18
17
  // Default to 30 days (2,592,000 seconds)
19
- console.warn(`⚠️ ${envVar} not set or invalid, using default 30 days (2,592,000 seconds)`);
18
+ console.warn(`⚠️ Token lie span not set or invalid, using default 30 days (2,592,000 seconds)`);
20
19
  return 30 * 24 * 60 * 60;
21
20
  };
22
21
  // Helper to generate token with 30-day expiry
@@ -86,7 +85,7 @@ const shouldRefreshToken = (token) => {
86
85
  return false;
87
86
  const now = Math.floor(Date.now() / 1000);
88
87
  const timeUntilExpiry = decoded.exp - now;
89
- const refreshThreshold = 5 * 24 * 60 * 60; // 5 days in seconds
88
+ const refreshThreshold = parseInt(process.env.TOKEN_REFRESH_THRESHOLD || "604800");
90
89
  return timeUntilExpiry < refreshThreshold && timeUntilExpiry > 0;
91
90
  }
92
91
  catch {
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createDeviceSession = void 0;
4
4
  const uuid_1 = require("uuid");
5
- // Session duration for device unlock sessions (15 minutes)
6
- const SESSION_DURATION = parseInt(process.env.DEVICE_SESSION_DURATION || "15") * 60 * 1000; // Convert minutes to milliseconds
5
+ // Session duration for device unlock sessions (12 minutes)
6
+ const SESSION_DURATION = parseInt(process.env.DEVICE_SESSION_DURATION || "12") * 60 * 1000; // Convert minutes to milliseconds
7
7
  /**
8
8
  * Create a new device session (for BLE unlock)
9
9
  * This is separate from the long-lasting auth token
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+ export declare const phoneRegex: RegExp;
2
3
  export declare const updateProfileSchema: z.ZodObject<{
3
4
  body: z.ZodObject<{
4
5
  firstName: z.ZodOptional<z.ZodString>;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deleteAccountSchema = exports.verifyPhoneChangeSchema = exports.requestPhoneChangeSchema = exports.updateProfileSchema = void 0;
3
+ exports.deleteAccountSchema = exports.verifyPhoneChangeSchema = exports.requestPhoneChangeSchema = exports.updateProfileSchema = exports.phoneRegex = void 0;
4
4
  // src/modules/account/validations/account.schema.ts
5
5
  const zod_1 = require("zod");
6
- const phoneRegex = /^\+?[0-9]{10,15}$/;
6
+ exports.phoneRegex = /^\+250(78|79|73|72)[0-9]{7}$/;
7
7
  const plateRegex = /^[A-Z0-9]{3,10}$/i;
8
8
  exports.updateProfileSchema = zod_1.z.object({
9
9
  body: zod_1.z.object({
@@ -17,7 +17,7 @@ exports.updateProfileSchema = zod_1.z.object({
17
17
  });
18
18
  exports.requestPhoneChangeSchema = zod_1.z.object({
19
19
  body: zod_1.z.object({
20
- newPhoneNumber: zod_1.z.string().regex(phoneRegex, "Invalid phone number format"),
20
+ newPhoneNumber: zod_1.z.string().regex(exports.phoneRegex, "Invalid phone number format"),
21
21
  }),
22
22
  });
23
23
  // Updated validation schema
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
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 = /^\+250(78|79|73|72)[0-9]{7}$/;
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({
@@ -14,78 +14,78 @@ export declare const listBansSchema: z.ZodObject<{
14
14
  sortBy: z.ZodOptional<z.ZodEnum<["bannedAt", "createdAt", "reason"]>>;
15
15
  sortOrder: z.ZodOptional<z.ZodEnum<["ASC", "DESC"]>>;
16
16
  }, "strip", z.ZodTypeAny, {
17
- limit: number;
18
17
  page: number;
19
- search?: string | undefined;
20
- userId?: string | undefined;
21
- isPermanent?: "true" | "false" | undefined;
22
- appealStatus?: "pending" | "approved" | "rejected" | undefined;
18
+ limit: number;
23
19
  status?: "active" | "revoked" | undefined;
20
+ userId?: string | undefined;
21
+ search?: string | undefined;
24
22
  sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
23
+ appealStatus?: "pending" | "approved" | "rejected" | undefined;
24
+ isPermanent?: "true" | "false" | undefined;
25
25
  fromDate?: string | undefined;
26
26
  toDate?: string | undefined;
27
27
  sortOrder?: "ASC" | "DESC" | undefined;
28
28
  }, {
29
- search?: string | undefined;
30
- limit?: string | undefined;
29
+ status?: "active" | "revoked" | undefined;
31
30
  userId?: string | undefined;
32
31
  page?: string | undefined;
33
- isPermanent?: "true" | "false" | undefined;
34
- appealStatus?: "pending" | "approved" | "rejected" | undefined;
35
- status?: "active" | "revoked" | undefined;
32
+ limit?: string | undefined;
33
+ search?: string | undefined;
36
34
  sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
35
+ appealStatus?: "pending" | "approved" | "rejected" | undefined;
36
+ isPermanent?: "true" | "false" | undefined;
37
37
  fromDate?: string | undefined;
38
38
  toDate?: string | undefined;
39
39
  sortOrder?: "ASC" | "DESC" | undefined;
40
40
  }>, {
41
- limit: number;
42
41
  page: number;
43
- search?: string | undefined;
44
- userId?: string | undefined;
45
- isPermanent?: "true" | "false" | undefined;
46
- appealStatus?: "pending" | "approved" | "rejected" | undefined;
42
+ limit: number;
47
43
  status?: "active" | "revoked" | undefined;
44
+ userId?: string | undefined;
45
+ search?: string | undefined;
48
46
  sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
47
+ appealStatus?: "pending" | "approved" | "rejected" | undefined;
48
+ isPermanent?: "true" | "false" | undefined;
49
49
  fromDate?: string | undefined;
50
50
  toDate?: string | undefined;
51
51
  sortOrder?: "ASC" | "DESC" | undefined;
52
52
  }, {
53
- search?: string | undefined;
54
- limit?: string | undefined;
53
+ status?: "active" | "revoked" | undefined;
55
54
  userId?: string | undefined;
56
55
  page?: string | undefined;
57
- isPermanent?: "true" | "false" | undefined;
58
- appealStatus?: "pending" | "approved" | "rejected" | undefined;
59
- status?: "active" | "revoked" | undefined;
56
+ limit?: string | undefined;
57
+ search?: string | undefined;
60
58
  sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
59
+ appealStatus?: "pending" | "approved" | "rejected" | undefined;
60
+ isPermanent?: "true" | "false" | undefined;
61
61
  fromDate?: string | undefined;
62
62
  toDate?: string | undefined;
63
63
  sortOrder?: "ASC" | "DESC" | undefined;
64
64
  }>;
65
65
  }, "strip", z.ZodTypeAny, {
66
66
  query: {
67
- limit: number;
68
67
  page: number;
69
- search?: string | undefined;
70
- userId?: string | undefined;
71
- isPermanent?: "true" | "false" | undefined;
72
- appealStatus?: "pending" | "approved" | "rejected" | undefined;
68
+ limit: number;
73
69
  status?: "active" | "revoked" | undefined;
70
+ userId?: string | undefined;
71
+ search?: string | undefined;
74
72
  sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
73
+ appealStatus?: "pending" | "approved" | "rejected" | undefined;
74
+ isPermanent?: "true" | "false" | undefined;
75
75
  fromDate?: string | undefined;
76
76
  toDate?: string | undefined;
77
77
  sortOrder?: "ASC" | "DESC" | undefined;
78
78
  };
79
79
  }, {
80
80
  query: {
81
- search?: string | undefined;
82
- limit?: string | undefined;
81
+ status?: "active" | "revoked" | undefined;
83
82
  userId?: string | undefined;
84
83
  page?: string | undefined;
85
- isPermanent?: "true" | "false" | undefined;
86
- appealStatus?: "pending" | "approved" | "rejected" | undefined;
87
- status?: "active" | "revoked" | undefined;
84
+ limit?: string | undefined;
85
+ search?: string | undefined;
88
86
  sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
87
+ appealStatus?: "pending" | "approved" | "rejected" | undefined;
88
+ isPermanent?: "true" | "false" | undefined;
89
89
  fromDate?: string | undefined;
90
90
  toDate?: string | undefined;
91
91
  sortOrder?: "ASC" | "DESC" | undefined;
@@ -105,72 +105,72 @@ export declare const listSuspensionsSchema: z.ZodObject<{
105
105
  sortBy: z.ZodOptional<z.ZodEnum<["startedAt", "endsAt", "createdAt", "reason"]>>;
106
106
  sortOrder: z.ZodOptional<z.ZodEnum<["ASC", "DESC"]>>;
107
107
  }, "strip", z.ZodTypeAny, {
108
- limit: number;
109
108
  page: number;
110
- search?: string | undefined;
109
+ limit: number;
110
+ status?: "active" | "revoked" | "expired" | undefined;
111
111
  userId?: string | undefined;
112
+ search?: string | undefined;
113
+ sortBy?: "createdAt" | "reason" | "startedAt" | "endsAt" | undefined;
112
114
  appealStatus?: "pending" | "approved" | "rejected" | undefined;
113
- status?: "active" | "revoked" | "expired" | undefined;
114
- sortBy?: "createdAt" | "reason" | "endsAt" | "startedAt" | undefined;
115
115
  fromDate?: string | undefined;
116
116
  toDate?: string | undefined;
117
117
  sortOrder?: "ASC" | "DESC" | undefined;
118
118
  }, {
119
- search?: string | undefined;
120
- limit?: string | undefined;
119
+ status?: "active" | "revoked" | "expired" | undefined;
121
120
  userId?: string | undefined;
122
121
  page?: string | undefined;
122
+ limit?: string | undefined;
123
+ search?: string | undefined;
124
+ sortBy?: "createdAt" | "reason" | "startedAt" | "endsAt" | undefined;
123
125
  appealStatus?: "pending" | "approved" | "rejected" | undefined;
124
- status?: "active" | "revoked" | "expired" | undefined;
125
- sortBy?: "createdAt" | "reason" | "endsAt" | "startedAt" | undefined;
126
126
  fromDate?: string | undefined;
127
127
  toDate?: string | undefined;
128
128
  sortOrder?: "ASC" | "DESC" | undefined;
129
129
  }>, {
130
- limit: number;
131
130
  page: number;
132
- search?: string | undefined;
131
+ limit: number;
132
+ status?: "active" | "revoked" | "expired" | undefined;
133
133
  userId?: string | undefined;
134
+ search?: string | undefined;
135
+ sortBy?: "createdAt" | "reason" | "startedAt" | "endsAt" | undefined;
134
136
  appealStatus?: "pending" | "approved" | "rejected" | undefined;
135
- status?: "active" | "revoked" | "expired" | undefined;
136
- sortBy?: "createdAt" | "reason" | "endsAt" | "startedAt" | undefined;
137
137
  fromDate?: string | undefined;
138
138
  toDate?: string | undefined;
139
139
  sortOrder?: "ASC" | "DESC" | undefined;
140
140
  }, {
141
- search?: string | undefined;
142
- limit?: string | undefined;
141
+ status?: "active" | "revoked" | "expired" | undefined;
143
142
  userId?: string | undefined;
144
143
  page?: string | undefined;
144
+ limit?: string | undefined;
145
+ search?: string | undefined;
146
+ sortBy?: "createdAt" | "reason" | "startedAt" | "endsAt" | undefined;
145
147
  appealStatus?: "pending" | "approved" | "rejected" | undefined;
146
- status?: "active" | "revoked" | "expired" | undefined;
147
- sortBy?: "createdAt" | "reason" | "endsAt" | "startedAt" | undefined;
148
148
  fromDate?: string | undefined;
149
149
  toDate?: string | undefined;
150
150
  sortOrder?: "ASC" | "DESC" | undefined;
151
151
  }>;
152
152
  }, "strip", z.ZodTypeAny, {
153
153
  query: {
154
- limit: number;
155
154
  page: number;
156
- search?: string | undefined;
155
+ limit: number;
156
+ status?: "active" | "revoked" | "expired" | undefined;
157
157
  userId?: string | undefined;
158
+ search?: string | undefined;
159
+ sortBy?: "createdAt" | "reason" | "startedAt" | "endsAt" | undefined;
158
160
  appealStatus?: "pending" | "approved" | "rejected" | undefined;
159
- status?: "active" | "revoked" | "expired" | undefined;
160
- sortBy?: "createdAt" | "reason" | "endsAt" | "startedAt" | undefined;
161
161
  fromDate?: string | undefined;
162
162
  toDate?: string | undefined;
163
163
  sortOrder?: "ASC" | "DESC" | undefined;
164
164
  };
165
165
  }, {
166
166
  query: {
167
- search?: string | undefined;
168
- limit?: string | undefined;
167
+ status?: "active" | "revoked" | "expired" | undefined;
169
168
  userId?: string | undefined;
170
169
  page?: string | undefined;
170
+ limit?: string | undefined;
171
+ search?: string | undefined;
172
+ sortBy?: "createdAt" | "reason" | "startedAt" | "endsAt" | undefined;
171
173
  appealStatus?: "pending" | "approved" | "rejected" | undefined;
172
- status?: "active" | "revoked" | "expired" | undefined;
173
- sortBy?: "createdAt" | "reason" | "endsAt" | "startedAt" | undefined;
174
174
  fromDate?: string | undefined;
175
175
  toDate?: string | undefined;
176
176
  sortOrder?: "ASC" | "DESC" | undefined;
@@ -192,19 +192,19 @@ export declare const revokeBanSchema: z.ZodObject<{
192
192
  revocationReason?: string | undefined;
193
193
  }>;
194
194
  }, "strip", z.ZodTypeAny, {
195
- body: {
196
- revocationReason?: string | undefined;
197
- };
198
195
  params: {
199
196
  banId: string;
200
197
  };
201
- }, {
202
198
  body: {
203
199
  revocationReason?: string | undefined;
204
200
  };
201
+ }, {
205
202
  params: {
206
203
  banId: string;
207
204
  };
205
+ body: {
206
+ revocationReason?: string | undefined;
207
+ };
208
208
  }>;
209
209
  export declare const revokeSuspensionSchema: z.ZodObject<{
210
210
  params: z.ZodObject<{
@@ -222,19 +222,19 @@ export declare const revokeSuspensionSchema: z.ZodObject<{
222
222
  revocationReason?: string | undefined;
223
223
  }>;
224
224
  }, "strip", z.ZodTypeAny, {
225
- body: {
226
- revocationReason?: string | undefined;
227
- };
228
225
  params: {
229
226
  suspensionId: string;
230
227
  };
231
- }, {
232
228
  body: {
233
229
  revocationReason?: string | undefined;
234
230
  };
231
+ }, {
235
232
  params: {
236
233
  suspensionId: string;
237
234
  };
235
+ body: {
236
+ revocationReason?: string | undefined;
237
+ };
238
238
  }>;
239
239
  export declare const extendSuspensionSchema: z.ZodObject<{
240
240
  params: z.ZodObject<{
@@ -261,21 +261,21 @@ export declare const extendSuspensionSchema: z.ZodObject<{
261
261
  extensionReason?: string | undefined;
262
262
  }>;
263
263
  }, "strip", z.ZodTypeAny, {
264
+ params: {
265
+ suspensionId: string;
266
+ };
264
267
  body: {
265
268
  newEndDate: string;
266
269
  extensionReason?: string | undefined;
267
270
  };
271
+ }, {
268
272
  params: {
269
273
  suspensionId: string;
270
274
  };
271
- }, {
272
275
  body: {
273
276
  newEndDate: string;
274
277
  extensionReason?: string | undefined;
275
278
  };
276
- params: {
277
- suspensionId: string;
278
- };
279
279
  }>;
280
280
  export declare const listPendingAppealsSchema: z.ZodObject<{
281
281
  query: z.ZodEffects<z.ZodObject<{
@@ -286,34 +286,34 @@ export declare const listPendingAppealsSchema: z.ZodObject<{
286
286
  fromDate: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
287
287
  toDate: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
288
288
  }, "strip", z.ZodTypeAny, {
289
- limit: number;
290
289
  page: number;
290
+ limit: number;
291
291
  type?: "ban" | "suspension" | undefined;
292
292
  fromDate?: string | undefined;
293
293
  toDate?: string | undefined;
294
294
  }, {
295
295
  type?: "ban" | "suspension" | undefined;
296
- limit?: string | undefined;
297
296
  page?: string | undefined;
297
+ limit?: string | undefined;
298
298
  fromDate?: string | undefined;
299
299
  toDate?: string | undefined;
300
300
  }>, {
301
- limit: number;
302
301
  page: number;
302
+ limit: number;
303
303
  type?: "ban" | "suspension" | undefined;
304
304
  fromDate?: string | undefined;
305
305
  toDate?: string | undefined;
306
306
  }, {
307
307
  type?: "ban" | "suspension" | undefined;
308
- limit?: string | undefined;
309
308
  page?: string | undefined;
309
+ limit?: string | undefined;
310
310
  fromDate?: string | undefined;
311
311
  toDate?: string | undefined;
312
312
  }>;
313
313
  }, "strip", z.ZodTypeAny, {
314
314
  query: {
315
- limit: number;
316
315
  page: number;
316
+ limit: number;
317
317
  type?: "ban" | "suspension" | undefined;
318
318
  fromDate?: string | undefined;
319
319
  toDate?: string | undefined;
@@ -321,8 +321,8 @@ export declare const listPendingAppealsSchema: z.ZodObject<{
321
321
  }, {
322
322
  query: {
323
323
  type?: "ban" | "suspension" | undefined;
324
- limit?: string | undefined;
325
324
  page?: string | undefined;
325
+ limit?: string | undefined;
326
326
  fromDate?: string | undefined;
327
327
  toDate?: string | undefined;
328
328
  };
@@ -349,23 +349,23 @@ export declare const reviewAppealSchema: z.ZodObject<{
349
349
  adminNotes?: string | undefined;
350
350
  }>;
351
351
  }, "strip", z.ZodTypeAny, {
352
- body: {
353
- appealStatus: "approved" | "rejected";
354
- adminNotes?: string | undefined;
355
- };
356
352
  params: {
357
353
  banId?: string | undefined;
358
354
  suspensionId?: string | undefined;
359
355
  };
360
- }, {
361
356
  body: {
362
357
  appealStatus: "approved" | "rejected";
363
358
  adminNotes?: string | undefined;
364
359
  };
360
+ }, {
365
361
  params: {
366
362
  banId?: string | undefined;
367
363
  suspensionId?: string | undefined;
368
364
  };
365
+ body: {
366
+ appealStatus: "approved" | "rejected";
367
+ adminNotes?: string | undefined;
368
+ };
369
369
  }>;
370
370
  export declare const exportBansSchema: z.ZodObject<{
371
371
  query: z.ZodEffects<z.ZodObject<{
@@ -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 = /^\+?[0-9]{10,15}$/;
6
+ const phoneRegex = /^\+250(78|79|73|72)[0-9]{7}$/;
7
7
  exports.payInstallmentSchema = zod_1.z.object({
8
8
  params: zod_1.z.object({
9
9
  planId: uuidSchema,
@@ -12,7 +12,7 @@ exports.payInstallmentSchema = zod_1.z.object({
12
12
  body: zod_1.z.object({
13
13
  phoneNumber: zod_1.z
14
14
  .string()
15
- .regex(phoneRegex, "Invalid phone number format. Use format: 0788123456 or +250788123456"),
15
+ .regex(phoneRegex, "Invalid phone number format. Use format: +250788123456"),
16
16
  provider: zod_1.z.enum(["mtn_momo", "airtel_money"]).default("mtn_momo"),
17
17
  }),
18
18
  });
@@ -2,7 +2,6 @@ import { z } from "zod";
2
2
  export declare const phoneNumberRegex: RegExp;
3
3
  export declare const nationalIdRegex: RegExp;
4
4
  export declare const jacketIdRegex: RegExp;
5
- export declare const phoneRegex: RegExp;
6
5
  export declare const createUserSchema: z.ZodObject<{
7
6
  body: z.ZodObject<{
8
7
  firstName: z.ZodString;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updateProfileSchema = exports.deleteAccountSchema = exports.deactivateAccountSchema = exports.changePasswordSchema = exports.updateRiderProfileSchema = exports.createRiderSchema = exports.updatePassengerProfileSchema = exports.passengerSignupSchema = exports.viewProfileSchema = exports.getAllUsersSchema = exports.updateUserProfileSchema = exports.getUserByIdSchema = exports.createUserSchema = exports.phoneRegex = exports.jacketIdRegex = exports.nationalIdRegex = exports.phoneNumberRegex = void 0;
3
+ exports.updateProfileSchema = exports.deleteAccountSchema = exports.deactivateAccountSchema = exports.changePasswordSchema = exports.updateRiderProfileSchema = exports.createRiderSchema = exports.updatePassengerProfileSchema = exports.passengerSignupSchema = exports.viewProfileSchema = exports.getAllUsersSchema = exports.updateUserProfileSchema = exports.getUserByIdSchema = exports.createUserSchema = exports.jacketIdRegex = exports.nationalIdRegex = exports.phoneNumberRegex = void 0;
4
4
  const zod_1 = require("zod");
5
5
  // ============================================================================
6
6
  // COMMON VALIDATIONS
@@ -8,7 +8,7 @@ const zod_1 = require("zod");
8
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
+ const phoneRegex = /^\+250(78|79|73|72)[0-9]{7}$/;
12
12
  // ============================================================================
13
13
  // ADMIN/SUPER ADMIN SCHEMAS
14
14
  // ============================================================================
@@ -364,7 +364,7 @@ exports.updateProfileSchema = zod_1.z.object({
364
364
  lastName: zod_1.z.string().min(2).max(50).optional(),
365
365
  phoneNumber: zod_1.z
366
366
  .string()
367
- .regex(exports.phoneRegex, "Invalid phone number")
367
+ .regex(phoneRegex, "Invalid phone number")
368
368
  .optional(),
369
369
  email: zod_1.z.string().email("Invalid email").optional(),
370
370
  nationalId: zod_1.z.string().min(5).max(20).optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vr-commons",
3
- "version": "1.0.69",
3
+ "version": "1.0.71",
4
4
  "description": "Shared functions package",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",