vr-commons 1.0.178 → 1.0.182

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.
@@ -49,9 +49,6 @@ export declare const upgradeToRiderSchema: z.ZodObject<{
49
49
  plateNumber?: string | undefined;
50
50
  }>;
51
51
  }, "strip", z.ZodTypeAny, {
52
- params: {
53
- userId: string;
54
- };
55
52
  body: {
56
53
  jacketId: string;
57
54
  gender: "male" | "female";
@@ -61,10 +58,10 @@ export declare const upgradeToRiderSchema: z.ZodObject<{
61
58
  contactValue: string;
62
59
  plateNumber?: string | undefined;
63
60
  };
64
- }, {
65
61
  params: {
66
62
  userId: string;
67
63
  };
64
+ }, {
68
65
  body: {
69
66
  jacketId: string;
70
67
  gender: "male" | "female";
@@ -74,6 +71,9 @@ export declare const upgradeToRiderSchema: z.ZodObject<{
74
71
  contactValue: string;
75
72
  plateNumber?: string | undefined;
76
73
  };
74
+ params: {
75
+ userId: string;
76
+ };
77
77
  }>;
78
78
  export declare const updateRiderSchema: z.ZodObject<{
79
79
  params: z.ZodObject<{
@@ -135,9 +135,6 @@ export declare const updateRiderSchema: z.ZodObject<{
135
135
  contactValue?: string | undefined;
136
136
  }>;
137
137
  }, "strip", z.ZodTypeAny, {
138
- params: {
139
- userId: string;
140
- };
141
138
  body: {
142
139
  firstName?: string | undefined;
143
140
  lastName?: string | undefined;
@@ -149,10 +146,10 @@ export declare const updateRiderSchema: z.ZodObject<{
149
146
  birthYear?: number | undefined;
150
147
  contactValue?: string | undefined;
151
148
  };
152
- }, {
153
149
  params: {
154
150
  userId: string;
155
151
  };
152
+ }, {
156
153
  body: {
157
154
  firstName?: string | undefined;
158
155
  lastName?: string | undefined;
@@ -164,6 +161,9 @@ export declare const updateRiderSchema: z.ZodObject<{
164
161
  birthYear?: number | undefined;
165
162
  contactValue?: string | undefined;
166
163
  };
164
+ params: {
165
+ userId: string;
166
+ };
167
167
  }>;
168
168
  export declare const deleteUserSchema: z.ZodObject<{
169
169
  params: 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
- page?: number | undefined;
216
- limit?: number | undefined;
217
215
  search?: string | undefined;
218
- sortBy?: "createdAt" | "firstName" | "lastName" | "gender" | undefined;
219
- sortOrder?: "ASC" | "DESC" | undefined;
216
+ limit?: number | undefined;
220
217
  gender?: "male" | "female" | undefined;
221
218
  isActive?: "true" | "false" | undefined;
222
219
  isDeactivated?: "true" | "false" | undefined;
223
220
  role?: string | undefined;
221
+ page?: number | undefined;
224
222
  contactType?: "EMAIL" | "PHONE" | "WHATSAPP" | undefined;
223
+ sortBy?: "firstName" | "lastName" | "gender" | "createdAt" | undefined;
224
+ sortOrder?: "DESC" | "ASC" | undefined;
225
225
  }, {
226
- page?: string | undefined;
227
- limit?: string | undefined;
228
226
  search?: string | undefined;
229
- sortBy?: "createdAt" | "firstName" | "lastName" | "gender" | undefined;
230
- sortOrder?: "ASC" | "DESC" | undefined;
227
+ limit?: string | undefined;
231
228
  gender?: "male" | "female" | undefined;
232
229
  isActive?: "true" | "false" | undefined;
233
230
  isDeactivated?: "true" | "false" | undefined;
234
231
  role?: string | undefined;
232
+ page?: string | undefined;
235
233
  contactType?: "EMAIL" | "PHONE" | "WHATSAPP" | undefined;
234
+ sortBy?: "firstName" | "lastName" | "gender" | "createdAt" | undefined;
235
+ sortOrder?: "DESC" | "ASC" | undefined;
236
236
  }>;
237
237
  }, "strip", z.ZodTypeAny, {
238
238
  query: {
239
- page?: number | undefined;
240
- limit?: number | undefined;
241
239
  search?: string | undefined;
242
- sortBy?: "createdAt" | "firstName" | "lastName" | "gender" | undefined;
243
- sortOrder?: "ASC" | "DESC" | undefined;
240
+ limit?: number | undefined;
244
241
  gender?: "male" | "female" | undefined;
245
242
  isActive?: "true" | "false" | undefined;
246
243
  isDeactivated?: "true" | "false" | undefined;
247
244
  role?: string | undefined;
245
+ page?: number | undefined;
248
246
  contactType?: "EMAIL" | "PHONE" | "WHATSAPP" | undefined;
247
+ sortBy?: "firstName" | "lastName" | "gender" | "createdAt" | undefined;
248
+ sortOrder?: "DESC" | "ASC" | undefined;
249
249
  };
250
250
  }, {
251
251
  query: {
252
- page?: string | undefined;
253
- limit?: string | undefined;
254
252
  search?: string | undefined;
255
- sortBy?: "createdAt" | "firstName" | "lastName" | "gender" | undefined;
256
- sortOrder?: "ASC" | "DESC" | undefined;
253
+ limit?: string | undefined;
257
254
  gender?: "male" | "female" | undefined;
258
255
  isActive?: "true" | "false" | undefined;
259
256
  isDeactivated?: "true" | "false" | undefined;
260
257
  role?: string | undefined;
258
+ page?: string | undefined;
261
259
  contactType?: "EMAIL" | "PHONE" | "WHATSAPP" | undefined;
260
+ sortBy?: "firstName" | "lastName" | "gender" | "createdAt" | undefined;
261
+ sortOrder?: "DESC" | "ASC" | undefined;
262
262
  };
263
263
  }>;
264
264
  export declare const hireAdminSchema: z.ZodObject<{
@@ -377,21 +377,21 @@ export declare const promoteAdminSchema: z.ZodObject<{
377
377
  password?: string | undefined;
378
378
  }>;
379
379
  }, "strip", z.ZodTypeAny, {
380
- params: {
381
- userId: string;
382
- };
383
380
  body: {
384
381
  targetRole: "ADMIN" | "SUPER_ADMIN";
385
382
  password?: string | undefined;
386
383
  };
387
- }, {
388
384
  params: {
389
385
  userId: string;
390
386
  };
387
+ }, {
391
388
  body: {
392
389
  targetRole: "ADMIN" | "SUPER_ADMIN";
393
390
  password?: string | undefined;
394
391
  };
392
+ params: {
393
+ userId: string;
394
+ };
395
395
  }>;
396
396
  export declare const demoteAdminSchema: z.ZodObject<{
397
397
  params: z.ZodObject<{
@@ -409,19 +409,19 @@ export declare const demoteAdminSchema: z.ZodObject<{
409
409
  targetRole: "ADMIN" | "AGENT";
410
410
  }>;
411
411
  }, "strip", z.ZodTypeAny, {
412
- params: {
413
- userId: string;
414
- };
415
412
  body: {
416
413
  targetRole: "ADMIN" | "AGENT";
417
414
  };
418
- }, {
419
415
  params: {
420
416
  userId: string;
421
417
  };
418
+ }, {
422
419
  body: {
423
420
  targetRole: "ADMIN" | "AGENT";
424
421
  };
422
+ params: {
423
+ userId: string;
424
+ };
425
425
  }>;
426
426
  export declare const fireEmployeeSchema: z.ZodObject<{
427
427
  params: z.ZodObject<{
@@ -439,19 +439,19 @@ export declare const fireEmployeeSchema: z.ZodObject<{
439
439
  reason?: string | undefined;
440
440
  }>;
441
441
  }, "strip", z.ZodTypeAny, {
442
- params: {
443
- userId: string;
444
- };
445
442
  body: {
446
443
  reason?: string | undefined;
447
444
  };
448
- }, {
449
445
  params: {
450
446
  userId: string;
451
447
  };
448
+ }, {
452
449
  body: {
453
450
  reason?: string | undefined;
454
451
  };
452
+ params: {
453
+ userId: string;
454
+ };
455
455
  }>;
456
456
  export declare const updateAdminSchema: z.ZodObject<{
457
457
  params: z.ZodObject<{
@@ -503,9 +503,6 @@ export declare const updateAdminSchema: z.ZodObject<{
503
503
  contactValue?: string | undefined;
504
504
  }>;
505
505
  }, "strip", z.ZodTypeAny, {
506
- params: {
507
- userId: string;
508
- };
509
506
  body: {
510
507
  firstName?: string | undefined;
511
508
  lastName?: string | undefined;
@@ -515,10 +512,10 @@ export declare const updateAdminSchema: z.ZodObject<{
515
512
  birthYear?: number | undefined;
516
513
  contactValue?: string | undefined;
517
514
  };
518
- }, {
519
515
  params: {
520
516
  userId: string;
521
517
  };
518
+ }, {
522
519
  body: {
523
520
  firstName?: string | undefined;
524
521
  lastName?: string | undefined;
@@ -528,6 +525,9 @@ export declare const updateAdminSchema: z.ZodObject<{
528
525
  birthYear?: number | undefined;
529
526
  contactValue?: string | undefined;
530
527
  };
528
+ params: {
529
+ userId: string;
530
+ };
531
531
  }>;
532
532
  export declare const resetPasswordSchema: z.ZodObject<{
533
533
  params: z.ZodObject<{
@@ -606,25 +606,25 @@ export declare const addUserContactSchema: z.ZodObject<{
606
606
  isPrimary?: boolean | undefined;
607
607
  }>;
608
608
  }, "strip", z.ZodTypeAny, {
609
- params: {
610
- userId: string;
611
- };
612
609
  body: {
613
610
  contactValue: string;
614
611
  type?: "EMAIL" | "PHONE" | "WHATSAPP" | undefined;
615
612
  isVerified?: boolean | undefined;
616
613
  isPrimary?: boolean | undefined;
617
614
  };
618
- }, {
619
615
  params: {
620
616
  userId: string;
621
617
  };
618
+ }, {
622
619
  body: {
623
620
  contactValue: string;
624
621
  type?: "EMAIL" | "PHONE" | "WHATSAPP" | undefined;
625
622
  isVerified?: boolean | undefined;
626
623
  isPrimary?: boolean | undefined;
627
624
  };
625
+ params: {
626
+ userId: string;
627
+ };
628
628
  }>;
629
629
  export declare const verifyUserContactSchema: z.ZodObject<{
630
630
  params: z.ZodObject<{
@@ -12,5 +12,5 @@ export { updateAdminSchema, updateRiderSchema, deleteUserSchema, getUserSchema,
12
12
  export { createProductSchema, updateProductSchema, getProductSchema, getProductsSchema, deactivateProductSchema, activateProductSchema, deleteProductSchema, updateStockSchema, } from "./admin/admin.products.validations";
13
13
  export { createPricingSchema, updatePricingSchema, getPricingSchema, getPricingsSchema, deletePricingSchema, } from "./admin/admin.pricings.validations";
14
14
  export { checkAvailabilitySchema, createDevicePairsSchema, lockDevicesSchema, unlockDevicesSchema, deleteDevicesByPairsSchema, makeDevicesPermanentSchema, permanentDeleteDevicesByPairsSchema, disableDevicesSchema, enableDevicesSchema, getDeviceSchema, getDevicesSchema, triggerDeviceResetSchema, customDeviceResetSchema, } from "./admin/admin.devices.validations";
15
- export { createPlanSchema, limitedUpdateSchema, getDevicePlanSchema, getPlanSchema, getUserPlansSchema, listPlansSchema, recordPaymentSchema, deletePlanSchema, } from "./admin/admin.devicePayments.validations";
15
+ export { createPlanSchema, limitedUpdateSchema, getDevicePlanSchema, getPlanSchema, getUserPlansSchema, listPlansSchema, recordPaymentSchema, deletePlanSchema, replacePlanDevicesSchema, } from "./admin/admin.devicePayments.validations";
16
16
  export { listEventLogsSchema, getEventLogSchema, } from "./admin/admin.eventLogs.validations";
@@ -16,7 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.activateAppSpecsSchema = exports.getAppSpecsByNameSchema = exports.getActiveAppSpecsSchema = exports.listAppSpecsSchema = exports.updateAppSpecsSchema = exports.createAppSpecsSchema = exports.exportBansSchema = exports.createSuspensionSchema = exports.createBanSchema = exports.extendSuspensionSchema = exports.revokeSuspensionSchema = exports.revokeBanSchema = exports.reviewAppealSchema = exports.listSuspensionsSchema = exports.listPendingAppealsSchema = exports.listBansSchema = exports.getUserBansSchema = exports.getUserSuspensionsSchema = exports.getSuspensionSchema = exports.getUserRestrictionsSchema = exports.getBanSchema = exports.submitSuspensionAppealSchema = exports.submitBanAppealSchema = exports.deactivateAccountSchema = exports.createRiderSchema = exports.updateRiderProfileSchema = exports.updatePassengerProfileSchema = exports.passengerSignupSchema = exports.viewProfileSchema = exports.getAllUsersSchema = exports.updateUserProfileSchema = exports.getUserByIdSchema = exports.createUserSchema = exports.googleLoginSchema = exports.completePassengerProfileSchema = exports.checkRiderAccountSchema = exports.setRiderPasswordSchema = exports.riderPasswordRegex = exports.passwordRegex = exports.emailRegex = exports.phoneRegex = exports.requestOtpSchema = exports.resendOtpSchema = exports.verifyOtpSchema = exports.registerSchema = exports.refreshTokenSchema = exports.userLoginSchema = exports.forgotPasswordSchema = exports.riderLoginSchema = exports.validate = void 0;
18
18
  exports.enableDevicesSchema = exports.disableDevicesSchema = exports.permanentDeleteDevicesByPairsSchema = exports.makeDevicesPermanentSchema = exports.deleteDevicesByPairsSchema = exports.unlockDevicesSchema = exports.lockDevicesSchema = exports.createDevicePairsSchema = exports.checkAvailabilitySchema = exports.deletePricingSchema = exports.getPricingsSchema = exports.getPricingSchema = exports.updatePricingSchema = exports.createPricingSchema = exports.updateStockSchema = exports.deleteProductSchema = exports.activateProductSchema = exports.deactivateProductSchema = exports.getProductsSchema = exports.getProductSchema = exports.updateProductSchema = exports.createProductSchema = exports.resetPasswordSchema = exports.upgradeToRiderSchema = exports.fireEmployeeSchema = exports.demoteAdminSchema = exports.promoteAdminSchema = exports.hireAdminSchema = exports.getUsersSchema = exports.getUserSchema = exports.deleteUserSchema = exports.updateRiderSchema = exports.updateAdminSchema = exports.getInstallmentsSchema = exports.getInstallmentByIdSchema = exports.payInstallmentSchema = exports.serialRegex = exports.extendSessionSchema = exports.unlockDeviceSchema = exports.getUserPaymentPlanSchema = exports.listUserPaymentPlansSchema = exports.registerRiderSchema = exports.riderPasswordSchema = exports.changePasswordSchema = exports.strongPasswordRegex = exports.deleteAccountSchema = exports.verifyPhoneChangeSchema = exports.requestPhoneChangeSchema = exports.updateProfileSchema = exports.getAppSpecsSchema = void 0;
19
- exports.getEventLogSchema = exports.listEventLogsSchema = exports.deletePlanSchema = exports.recordPaymentSchema = exports.listPlansSchema = exports.getUserPlansSchema = exports.getPlanSchema = exports.getDevicePlanSchema = exports.limitedUpdateSchema = exports.createPlanSchema = exports.customDeviceResetSchema = exports.triggerDeviceResetSchema = exports.getDevicesSchema = exports.getDeviceSchema = void 0;
19
+ exports.getEventLogSchema = exports.listEventLogsSchema = exports.replacePlanDevicesSchema = exports.deletePlanSchema = exports.recordPaymentSchema = exports.listPlansSchema = exports.getUserPlansSchema = exports.getPlanSchema = exports.getDevicePlanSchema = exports.limitedUpdateSchema = exports.createPlanSchema = exports.customDeviceResetSchema = exports.triggerDeviceResetSchema = exports.getDevicesSchema = exports.getDeviceSchema = void 0;
20
20
  __exportStar(require("../constants/regex.constants"), exports);
21
21
  var shared_validate_validations_1 = require("./shared/shared.validate.validations");
22
22
  Object.defineProperty(exports, "validate", { enumerable: true, get: function () { return shared_validate_validations_1.validate; } });
@@ -144,6 +144,7 @@ Object.defineProperty(exports, "getUserPlansSchema", { enumerable: true, get: fu
144
144
  Object.defineProperty(exports, "listPlansSchema", { enumerable: true, get: function () { return admin_devicePayments_validations_1.listPlansSchema; } });
145
145
  Object.defineProperty(exports, "recordPaymentSchema", { enumerable: true, get: function () { return admin_devicePayments_validations_1.recordPaymentSchema; } });
146
146
  Object.defineProperty(exports, "deletePlanSchema", { enumerable: true, get: function () { return admin_devicePayments_validations_1.deletePlanSchema; } });
147
+ Object.defineProperty(exports, "replacePlanDevicesSchema", { enumerable: true, get: function () { return admin_devicePayments_validations_1.replacePlanDevicesSchema; } });
147
148
  var admin_eventLogs_validations_1 = require("./admin/admin.eventLogs.validations");
148
149
  Object.defineProperty(exports, "listEventLogsSchema", { enumerable: true, get: function () { return admin_eventLogs_validations_1.listEventLogsSchema; } });
149
150
  Object.defineProperty(exports, "getEventLogSchema", { enumerable: true, get: function () { return admin_eventLogs_validations_1.getEventLogSchema; } });
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.registerRiderSchema = exports.riderPasswordSchema = exports.resetPasswordSchema = exports.forgotPasswordSchema = exports.loginSchema = exports.changePasswordSchema = exports.deleteAccountSchema = exports.confirmVerificationSchema = exports.verifyContactSchema = exports.setPrimaryContactSchema = exports.deleteContactSchema = exports.addContactSchema = exports.verifyEmailChangeSchema = exports.verifyPhoneChangeSchema = exports.requestPhoneChangeSchema = exports.changeEmailSchema = exports.updateContactSchema = exports.updateProfileSchema = exports.validateContactValue = exports.detectContactType = exports.strongPasswordRegex = exports.emailRegex = exports.phoneRegex = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const regex_constants_1 = require("../../constants/regex.constants");
6
- // ==================== REGEX PATTERNS ====================
6
+ // ==================== REGEX PATTERNS =================================
7
7
  exports.phoneRegex = regex_constants_1.PHONE_NUMBER_REGEX;
8
8
  exports.emailRegex = regex_constants_1.EMAIL_ADDRESS_REGEX;
9
9
  const plateRegex = regex_constants_1.RWANDA_PLATE_NUMBER_REGEX;
@@ -845,9 +845,6 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
845
845
  maintenanceEndAt?: string | null | undefined;
846
846
  }>;
847
847
  }, "strip", z.ZodTypeAny, {
848
- params: {
849
- id: string;
850
- };
851
848
  body: {
852
849
  appShortName?: string | null | undefined;
853
850
  appDescription?: string | null | undefined;
@@ -922,10 +919,10 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
922
919
  maintenanceStartAt?: string | null | undefined;
923
920
  maintenanceEndAt?: string | null | undefined;
924
921
  };
925
- }, {
926
922
  params: {
927
923
  id: string;
928
924
  };
925
+ }, {
929
926
  body: {
930
927
  appShortName?: string | null | undefined;
931
928
  appDescription?: string | null | undefined;
@@ -1000,6 +997,9 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
1000
997
  maintenanceStartAt?: string | null | undefined;
1001
998
  maintenanceEndAt?: string | null | undefined;
1002
999
  };
1000
+ params: {
1001
+ id: string;
1002
+ };
1003
1003
  }>;
1004
1004
  export declare const listAppSpecsSchema: z.ZodObject<{
1005
1005
  query: z.ZodObject<{
@@ -1009,33 +1009,33 @@ export declare const listAppSpecsSchema: z.ZodObject<{
1009
1009
  sortBy: z.ZodOptional<z.ZodEnum<["appName", "createdAt", "updatedAt"]>>;
1010
1010
  sortOrder: z.ZodOptional<z.ZodEnum<["ASC", "DESC"]>>;
1011
1011
  }, "strip", z.ZodTypeAny, {
1012
- page: number;
1013
1012
  limit: number;
1013
+ page: number;
1014
1014
  search?: string | undefined;
1015
1015
  sortBy?: "createdAt" | "updatedAt" | "appName" | undefined;
1016
- sortOrder?: "ASC" | "DESC" | undefined;
1016
+ sortOrder?: "DESC" | "ASC" | undefined;
1017
1017
  }, {
1018
- page?: string | undefined;
1019
- limit?: string | undefined;
1020
1018
  search?: string | undefined;
1019
+ limit?: string | undefined;
1020
+ page?: string | undefined;
1021
1021
  sortBy?: "createdAt" | "updatedAt" | "appName" | undefined;
1022
- sortOrder?: "ASC" | "DESC" | undefined;
1022
+ sortOrder?: "DESC" | "ASC" | undefined;
1023
1023
  }>;
1024
1024
  }, "strip", z.ZodTypeAny, {
1025
1025
  query: {
1026
- page: number;
1027
1026
  limit: number;
1027
+ page: number;
1028
1028
  search?: string | undefined;
1029
1029
  sortBy?: "createdAt" | "updatedAt" | "appName" | undefined;
1030
- sortOrder?: "ASC" | "DESC" | undefined;
1030
+ sortOrder?: "DESC" | "ASC" | undefined;
1031
1031
  };
1032
1032
  }, {
1033
1033
  query: {
1034
- page?: string | undefined;
1035
- limit?: string | undefined;
1036
1034
  search?: string | undefined;
1035
+ limit?: string | undefined;
1036
+ page?: string | undefined;
1037
1037
  sortBy?: "createdAt" | "updatedAt" | "appName" | undefined;
1038
- sortOrder?: "ASC" | "DESC" | undefined;
1038
+ sortOrder?: "DESC" | "ASC" | undefined;
1039
1039
  };
1040
1040
  }>;
1041
1041
  export declare const getAppSpecsSchema: z.ZodObject<{
@@ -95,14 +95,14 @@ exports.registerSchema = zod_1.z.object({
95
95
  })
96
96
  .strict(),
97
97
  });
98
- // ==================== USER (RIDER/PASSENGER) AUTH VALIDATIONS ====================
98
+ // =============================== USER (RIDER/PASSENGER) AUTH VALIDATIONS =====================================
99
99
  // Rider login with contact
100
100
  exports.riderPasswordRegex = regex_constants_1.RIDER_PIN_REGEX;
101
101
  exports.checkRiderAccountSchema = zod_1.z.object({
102
102
  body: zod_1.z.object({
103
103
  phoneNumber: zod_1.z
104
104
  .string()
105
- .regex(exports.phoneRegex, "Invalid phone number format. Must be a valid Rwandan phone number (+250...) followed by 7 digits _ washyizemo nimero itabaho onger ugenzure neza ko itangizwa na 07"),
105
+ .regex(exports.phoneRegex, "Invalid phone number format. Must be a valid Rwandan phone number (+250...) _ washyizemo nimero itabaho onger ugenzure neza ko itangizwa na +250"),
106
106
  }),
107
107
  });
108
108
  exports.setRiderPasswordSchema = zod_1.z.object({