vr-commons 1.0.107 → 1.0.109

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.
@@ -13,7 +13,10 @@ export interface BaseUserProfile {
13
13
  lastName: string;
14
14
  primaryPhone: string;
15
15
  email: string | null;
16
- nationalId: string;
16
+ gender: "male" | "female";
17
+ birthDate: number | null;
18
+ birthMonth: number | null;
19
+ birthYear: number | null;
17
20
  isActive: boolean;
18
21
  lastLoginAt: Date | null;
19
22
  createdAt: Date;
@@ -65,6 +68,7 @@ export interface UserSearchFilters {
65
68
  isSuspended?: boolean;
66
69
  isBanned?: boolean;
67
70
  isDeactivated?: boolean;
71
+ gender?: "male" | "female";
68
72
  startDate?: string;
69
73
  endDate?: string;
70
74
  search?: string;
@@ -84,7 +88,6 @@ export interface GetUsersResult {
84
88
  total: number;
85
89
  }
86
90
  export declare const PHONE_REGEX: RegExp;
87
- export declare const NATIONAL_ID_REGEX: RegExp;
88
91
  export declare const JACKET_ID_REGEX: RegExp;
89
92
  export declare const JACKET_ID_PREFIX = "JKT";
90
93
  /**
@@ -156,10 +159,10 @@ export interface ValidationError {
156
159
  }
157
160
  /**
158
161
  * Validate unique user fields (phone number is in PhoneContact table)
162
+ * Note: nationalId has been removed
159
163
  */
160
164
  export declare const validateUniqueFields: (fields: {
161
165
  phoneNumber?: string;
162
- nationalId?: string;
163
166
  email?: string | null;
164
167
  jacketId?: string;
165
168
  }, excludeUserId?: string) => Promise<ValidationError[]>;
@@ -172,7 +175,7 @@ export declare const validatePassword: (plainPassword: string, hashedPassword: s
172
175
  */
173
176
  export declare const hashPassword: (password: string) => Promise<string>;
174
177
  /**
175
- * Soft delete user
178
+ * Soft delete user (updated - no nationalId reference)
176
179
  */
177
180
  export declare const softDeleteUser: (userId: string, options?: {
178
181
  reason?: string;
@@ -200,7 +203,6 @@ declare const _default: {
200
203
  generateJacketId: () => Promise<string>;
201
204
  validateUniqueFields: (fields: {
202
205
  phoneNumber?: string;
203
- nationalId?: string;
204
206
  email?: string | null;
205
207
  jacketId?: string;
206
208
  }, excludeUserId?: string) => Promise<ValidationError[]>;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.softDeleteUser = exports.hashPassword = exports.validatePassword = exports.validateUniqueFields = exports.generateJacketId = exports.getSortOrder = exports.generateEventSearchConditions = exports.generateUserSearchConditions = exports.findSecurityClearanceByRole = exports.getUsersByRole = exports.getUserById = exports.isAccountAccessible = exports.canModifyAccount = exports.hasAllPermissions = exports.hasAnyPermission = exports.hasPermission = exports.hasRole = exports.formatUserListResponse = exports.formatUserProfile = exports.JACKET_ID_PREFIX = exports.JACKET_ID_REGEX = exports.NATIONAL_ID_REGEX = exports.PHONE_REGEX = void 0;
6
+ exports.softDeleteUser = exports.hashPassword = exports.validatePassword = exports.validateUniqueFields = exports.generateJacketId = exports.getSortOrder = exports.generateEventSearchConditions = exports.generateUserSearchConditions = exports.findSecurityClearanceByRole = exports.getUsersByRole = exports.getUserById = exports.isAccountAccessible = exports.canModifyAccount = exports.hasAllPermissions = exports.hasAnyPermission = exports.hasPermission = exports.hasRole = exports.formatUserListResponse = exports.formatUserProfile = exports.JACKET_ID_PREFIX = exports.JACKET_ID_REGEX = exports.PHONE_REGEX = void 0;
7
7
  const vr_models_1 = require("vr-models");
8
8
  const bcryptjs_1 = __importDefault(require("bcryptjs"));
9
9
  const sequelize_1 = require("sequelize");
@@ -11,7 +11,6 @@ const sequelize_1 = require("sequelize");
11
11
  // REGEX PATTERNS & CONSTANTS
12
12
  // ============================================================================
13
13
  exports.PHONE_REGEX = /^(078|079|072|073)\d{7}$/;
14
- exports.NATIONAL_ID_REGEX = /^\d{16}$/;
15
14
  exports.JACKET_ID_REGEX = /^JKT-\d{9}$/;
16
15
  exports.JACKET_ID_PREFIX = "JKT";
17
16
  // ============================================================================
@@ -27,7 +26,10 @@ const formatUserProfile = (user, viewerType = "ADMIN", options = {}) => {
27
26
  lastName: user.lastName,
28
27
  primaryPhone: user.primaryPhone?.phoneNumber,
29
28
  email: user.email,
30
- nationalId: user.nationalId,
29
+ gender: user.gender || "male",
30
+ birthDate: user.birthDate || null,
31
+ birthMonth: user.birthMonth || null,
32
+ birthYear: user.birthYear || null,
31
33
  isActive: user.isActive,
32
34
  lastLoginAt: user.lastLoginAt,
33
35
  createdAt: user.createdAt,
@@ -202,6 +204,8 @@ const getUsersByRole = async (role, filters = {}, pagination) => {
202
204
  where.isSuspended = filters.isSuspended;
203
205
  if (filters.isDeactivated !== undefined)
204
206
  where.isDeactivated = filters.isDeactivated;
207
+ if (filters.gender !== undefined)
208
+ where.gender = filters.gender;
205
209
  if (filters.isBanned !== undefined) {
206
210
  if (filters.isBanned) {
207
211
  where.bannedAt = { [sequelize_1.Op.ne]: null };
@@ -227,7 +231,6 @@ const getUsersByRole = async (role, filters = {}, pagination) => {
227
231
  { lastName: { [sequelize_1.Op.iLike]: `%${filters.search}%` } },
228
232
  { phoneNumber: { [sequelize_1.Op.iLike]: `%${filters.search}%` } },
229
233
  { email: { [sequelize_1.Op.iLike]: `%${filters.search}%` } },
230
- { nationalId: { [sequelize_1.Op.iLike]: `%${filters.search}%` } },
231
234
  { jacketId: { [sequelize_1.Op.iLike]: `%${filters.search}%` } },
232
235
  ];
233
236
  }
@@ -288,6 +291,9 @@ const generateUserSearchConditions = (filters) => {
288
291
  if (filters.isSuspended !== undefined) {
289
292
  where.isSuspended = filters.isSuspended;
290
293
  }
294
+ if (filters.gender !== undefined) {
295
+ where.gender = filters.gender;
296
+ }
291
297
  if (filters.isBanned !== undefined) {
292
298
  if (filters.isBanned) {
293
299
  where.bannedAt = { [sequelize_1.Op.ne]: null };
@@ -312,7 +318,6 @@ const generateUserSearchConditions = (filters) => {
312
318
  { lastName: { [sequelize_1.Op.iLike]: `%${filters.search}%` } },
313
319
  { phoneNumber: { [sequelize_1.Op.iLike]: `%${filters.search}%` } },
314
320
  { email: { [sequelize_1.Op.iLike]: `%${filters.search}%` } },
315
- { nationalId: { [sequelize_1.Op.iLike]: `%${filters.search}%` } },
316
321
  { jacketId: { [sequelize_1.Op.iLike]: `%${filters.search}%` } },
317
322
  ];
318
323
  }
@@ -348,7 +353,7 @@ exports.generateEventSearchConditions = generateEventSearchConditions;
348
353
  * Get sort order for queries
349
354
  */
350
355
  const getSortOrder = (sortBy = "createdAt", order = "desc") => {
351
- const validSortFields = ["firstName", "lastLoginAt", "createdAt"];
356
+ const validSortFields = ["firstName", "lastLoginAt", "createdAt", "gender"];
352
357
  const sortField = validSortFields.includes(sortBy) ? sortBy : "createdAt";
353
358
  const sortOrder = order.toLowerCase() === "asc" ? "ASC" : "DESC";
354
359
  if (sortField === "firstName") {
@@ -383,6 +388,7 @@ const generateJacketId = async () => {
383
388
  exports.generateJacketId = generateJacketId;
384
389
  /**
385
390
  * Validate unique user fields (phone number is in PhoneContact table)
391
+ * Note: nationalId has been removed
386
392
  */
387
393
  const validateUniqueFields = async (fields, excludeUserId) => {
388
394
  const errors = [];
@@ -403,20 +409,6 @@ const validateUniqueFields = async (fields, excludeUserId) => {
403
409
  });
404
410
  }
405
411
  }
406
- // Check nationalId (on User model)
407
- if (fields.nationalId) {
408
- const userWhere = { nationalId: fields.nationalId };
409
- if (excludeUserId) {
410
- userWhere.id = { [sequelize_1.Op.ne]: excludeUserId };
411
- }
412
- const existingUser = await vr_models_1.User.findOne({ where: userWhere });
413
- if (existingUser) {
414
- errors.push({
415
- field: "nationalId",
416
- message: "National ID already registered",
417
- });
418
- }
419
- }
420
412
  // Check email (on User model)
421
413
  if (fields.email) {
422
414
  const userWhere = { email: fields.email };
@@ -466,7 +458,7 @@ exports.hashPassword = hashPassword;
466
458
  // ACCOUNT MANAGEMENT FUNCTIONS
467
459
  // ============================================================================
468
460
  /**
469
- * Soft delete user
461
+ * Soft delete user (updated - no nationalId reference)
470
462
  */
471
463
  const softDeleteUser = async (userId, options) => {
472
464
  const updateData = {
@@ -479,7 +471,6 @@ const softDeleteUser = async (userId, options) => {
479
471
  updateData.email = null;
480
472
  updateData.password = null;
481
473
  updateData.phoneNumber = `DELETED_${timestamp}`;
482
- updateData.nationalId = `DELETED_${timestamp}`;
483
474
  updateData.jacketId = `DELETED_${timestamp}`;
484
475
  await vr_models_1.User.update(updateData, {
485
476
  where: { id: userId },
@@ -7,28 +7,28 @@ export declare const createPlanSchema: z.ZodObject<{
7
7
  productId: z.ZodString;
8
8
  }, "strip", z.ZodTypeAny, {
9
9
  userId: string;
10
+ productId: string;
10
11
  deviceIds: string[];
11
12
  pricingId: string;
12
- productId: string;
13
13
  }, {
14
14
  userId: string;
15
+ productId: string;
15
16
  deviceIds: string[];
16
17
  pricingId: string;
17
- productId: string;
18
18
  }>;
19
19
  }, "strip", z.ZodTypeAny, {
20
20
  body: {
21
21
  userId: string;
22
+ productId: string;
22
23
  deviceIds: string[];
23
24
  pricingId: string;
24
- productId: string;
25
25
  };
26
26
  }, {
27
27
  body: {
28
28
  userId: string;
29
+ productId: string;
29
30
  deviceIds: string[];
30
31
  pricingId: string;
31
- productId: string;
32
32
  };
33
33
  }>;
34
34
  export declare const listPlansSchema: z.ZodObject<{
@@ -45,47 +45,47 @@ export declare const listPlansSchema: z.ZodObject<{
45
45
  }, "strip", z.ZodTypeAny, {
46
46
  page: number;
47
47
  limit: number;
48
- status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
48
+ status?: "ACTIVE" | "DEFAULTED" | "COMPLETED" | "CANCELLED" | undefined;
49
49
  userId?: string | undefined;
50
- deviceId?: string | undefined;
51
- isOverdue?: "true" | "false" | undefined;
52
50
  search?: string | undefined;
53
- sortBy?: "createdAt" | "updatedAt" | "nextInstallmentDueAt" | "paidAmount" | "outstandingAmount" | undefined;
51
+ sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
54
52
  sortOrder?: "ASC" | "DESC" | undefined;
53
+ deviceId?: string | undefined;
54
+ isOverdue?: "true" | "false" | undefined;
55
55
  }, {
56
- status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
56
+ status?: "ACTIVE" | "DEFAULTED" | "COMPLETED" | "CANCELLED" | undefined;
57
57
  userId?: string | undefined;
58
58
  page?: string | undefined;
59
59
  limit?: string | undefined;
60
- deviceId?: string | undefined;
61
- isOverdue?: "true" | "false" | undefined;
62
60
  search?: string | undefined;
63
- sortBy?: "createdAt" | "updatedAt" | "nextInstallmentDueAt" | "paidAmount" | "outstandingAmount" | undefined;
61
+ sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
64
62
  sortOrder?: "ASC" | "DESC" | undefined;
63
+ deviceId?: string | undefined;
64
+ isOverdue?: "true" | "false" | undefined;
65
65
  }>;
66
66
  }, "strip", z.ZodTypeAny, {
67
67
  query: {
68
68
  page: number;
69
69
  limit: number;
70
- status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
70
+ status?: "ACTIVE" | "DEFAULTED" | "COMPLETED" | "CANCELLED" | undefined;
71
71
  userId?: string | undefined;
72
- deviceId?: string | undefined;
73
- isOverdue?: "true" | "false" | undefined;
74
72
  search?: string | undefined;
75
- sortBy?: "createdAt" | "updatedAt" | "nextInstallmentDueAt" | "paidAmount" | "outstandingAmount" | undefined;
73
+ sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
76
74
  sortOrder?: "ASC" | "DESC" | undefined;
75
+ deviceId?: string | undefined;
76
+ isOverdue?: "true" | "false" | undefined;
77
77
  };
78
78
  }, {
79
79
  query: {
80
- status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
80
+ status?: "ACTIVE" | "DEFAULTED" | "COMPLETED" | "CANCELLED" | undefined;
81
81
  userId?: string | undefined;
82
82
  page?: string | undefined;
83
83
  limit?: string | undefined;
84
- deviceId?: string | undefined;
85
- isOverdue?: "true" | "false" | undefined;
86
84
  search?: string | undefined;
87
- sortBy?: "createdAt" | "updatedAt" | "nextInstallmentDueAt" | "paidAmount" | "outstandingAmount" | undefined;
85
+ sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
88
86
  sortOrder?: "ASC" | "DESC" | undefined;
87
+ deviceId?: string | undefined;
88
+ isOverdue?: "true" | "false" | undefined;
89
89
  };
90
90
  }>;
91
91
  export declare const getPlanSchema: z.ZodObject<{
@@ -117,10 +117,10 @@ export declare const getUserPlansSchema: z.ZodObject<{
117
117
  status: z.ZodOptional<z.ZodEnum<["ACTIVE", "COMPLETED", "DEFAULTED", "CANCELLED"]>>;
118
118
  includeCompleted: z.ZodOptional<z.ZodEnum<["true", "false"]>>;
119
119
  }, "strip", z.ZodTypeAny, {
120
- status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
120
+ status?: "ACTIVE" | "DEFAULTED" | "COMPLETED" | "CANCELLED" | undefined;
121
121
  includeCompleted?: "true" | "false" | undefined;
122
122
  }, {
123
- status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
123
+ status?: "ACTIVE" | "DEFAULTED" | "COMPLETED" | "CANCELLED" | undefined;
124
124
  includeCompleted?: "true" | "false" | undefined;
125
125
  }>>;
126
126
  }, "strip", z.ZodTypeAny, {
@@ -128,7 +128,7 @@ export declare const getUserPlansSchema: z.ZodObject<{
128
128
  userId: string;
129
129
  };
130
130
  query?: {
131
- status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
131
+ status?: "ACTIVE" | "DEFAULTED" | "COMPLETED" | "CANCELLED" | undefined;
132
132
  includeCompleted?: "true" | "false" | undefined;
133
133
  } | undefined;
134
134
  }, {
@@ -136,7 +136,7 @@ export declare const getUserPlansSchema: z.ZodObject<{
136
136
  userId: string;
137
137
  };
138
138
  query?: {
139
- status?: "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
139
+ status?: "ACTIVE" | "DEFAULTED" | "COMPLETED" | "CANCELLED" | undefined;
140
140
  includeCompleted?: "true" | "false" | undefined;
141
141
  } | undefined;
142
142
  }>;
@@ -172,24 +172,24 @@ export declare const limitedUpdateSchema: z.ZodObject<{
172
172
  userId: z.ZodString;
173
173
  }, "strip", z.ZodTypeAny, {
174
174
  userId: string;
175
+ productId: string;
175
176
  deviceIds: string[];
176
177
  pricingId: string;
177
- productId: string;
178
178
  }, {
179
179
  userId: string;
180
+ productId: string;
180
181
  deviceIds: string[];
181
182
  pricingId: string;
182
- productId: string;
183
183
  }>, {
184
184
  userId: string;
185
+ productId: string;
185
186
  deviceIds: string[];
186
187
  pricingId: string;
187
- productId: string;
188
188
  }, {
189
189
  userId: string;
190
+ productId: string;
190
191
  deviceIds: string[];
191
192
  pricingId: string;
192
- productId: string;
193
193
  }>;
194
194
  }, "strip", z.ZodTypeAny, {
195
195
  params: {
@@ -197,9 +197,9 @@ export declare const limitedUpdateSchema: z.ZodObject<{
197
197
  };
198
198
  body: {
199
199
  userId: string;
200
+ productId: string;
200
201
  deviceIds: string[];
201
202
  pricingId: string;
202
- productId: string;
203
203
  };
204
204
  }, {
205
205
  params: {
@@ -207,9 +207,9 @@ export declare const limitedUpdateSchema: z.ZodObject<{
207
207
  };
208
208
  body: {
209
209
  userId: string;
210
+ productId: string;
210
211
  deviceIds: string[];
211
212
  pricingId: string;
212
- productId: string;
213
213
  };
214
214
  }>;
215
215
  export declare const recordPaymentSchema: z.ZodObject<{
@@ -228,13 +228,13 @@ export declare const recordPaymentSchema: z.ZodObject<{
228
228
  }, "strip", z.ZodTypeAny, {
229
229
  amount: number;
230
230
  provider: "mtn_momo" | "airtel_money";
231
- providerReference?: string | undefined;
232
231
  metadata?: Record<string, any> | undefined;
232
+ providerReference?: string | undefined;
233
233
  }, {
234
234
  amount: number;
235
235
  provider: "mtn_momo" | "airtel_money";
236
- providerReference?: string | undefined;
237
236
  metadata?: Record<string, any> | undefined;
237
+ providerReference?: string | undefined;
238
238
  }>;
239
239
  }, "strip", z.ZodTypeAny, {
240
240
  params: {
@@ -243,8 +243,8 @@ export declare const recordPaymentSchema: z.ZodObject<{
243
243
  body: {
244
244
  amount: number;
245
245
  provider: "mtn_momo" | "airtel_money";
246
- providerReference?: string | undefined;
247
246
  metadata?: Record<string, any> | undefined;
247
+ providerReference?: string | undefined;
248
248
  };
249
249
  }, {
250
250
  params: {
@@ -253,8 +253,8 @@ export declare const recordPaymentSchema: z.ZodObject<{
253
253
  body: {
254
254
  amount: number;
255
255
  provider: "mtn_momo" | "airtel_money";
256
- providerReference?: string | undefined;
257
256
  metadata?: Record<string, any> | undefined;
257
+ providerReference?: string | undefined;
258
258
  };
259
259
  }>;
260
260
  export declare const deletePlanSchema: z.ZodObject<{
@@ -58,29 +58,29 @@ export declare const updateDeviceSchema: z.ZodObject<{
58
58
  }, "strip", z.ZodTypeAny, {
59
59
  status?: "locked" | "unlocked" | "disabled" | undefined;
60
60
  serialNumber?: string | undefined;
61
- dedicatedUser?: "PASSENGER" | "RIDER" | "N/A" | null | undefined;
61
+ dedicatedUser?: "RIDER" | "PASSENGER" | "N/A" | null | undefined;
62
62
  }, {
63
63
  status?: "locked" | "unlocked" | "disabled" | undefined;
64
64
  serialNumber?: string | undefined;
65
- dedicatedUser?: "PASSENGER" | "RIDER" | "N/A" | null | undefined;
65
+ dedicatedUser?: "RIDER" | "PASSENGER" | "N/A" | null | undefined;
66
66
  }>;
67
67
  }, "strip", z.ZodTypeAny, {
68
+ params: {
69
+ id: string;
70
+ };
68
71
  body: {
69
72
  status?: "locked" | "unlocked" | "disabled" | undefined;
70
73
  serialNumber?: string | undefined;
71
- dedicatedUser?: "PASSENGER" | "RIDER" | "N/A" | null | undefined;
74
+ dedicatedUser?: "RIDER" | "PASSENGER" | "N/A" | null | undefined;
72
75
  };
76
+ }, {
73
77
  params: {
74
78
  id: string;
75
79
  };
76
- }, {
77
80
  body: {
78
81
  status?: "locked" | "unlocked" | "disabled" | undefined;
79
82
  serialNumber?: string | undefined;
80
- dedicatedUser?: "PASSENGER" | "RIDER" | "N/A" | null | undefined;
81
- };
82
- params: {
83
- id: string;
83
+ dedicatedUser?: "RIDER" | "PASSENGER" | "N/A" | null | undefined;
84
84
  };
85
85
  }>;
86
86
  export declare const getDeviceSchema: z.ZodObject<{
@@ -113,51 +113,51 @@ export declare const getDevicesSchema: z.ZodObject<{
113
113
  sortBy: z.ZodOptional<z.ZodEnum<["serialNumber", "status", "createdAt", "updatedAt"]>>;
114
114
  sortOrder: z.ZodOptional<z.ZodEnum<["ASC", "DESC"]>>;
115
115
  }, "strip", z.ZodTypeAny, {
116
- search?: string | undefined;
117
- limit?: number | undefined;
118
116
  status?: "locked" | "unlocked" | "disabled" | undefined;
119
117
  page?: number | undefined;
120
- sortBy?: "createdAt" | "updatedAt" | "status" | "serialNumber" | undefined;
121
- sortOrder?: "DESC" | "ASC" | undefined;
118
+ limit?: number | undefined;
119
+ search?: string | undefined;
120
+ sortBy?: "status" | "createdAt" | "updatedAt" | "serialNumber" | undefined;
121
+ sortOrder?: "ASC" | "DESC" | undefined;
122
122
  productId?: string | undefined;
123
- dedicatedUser?: "PASSENGER" | "RIDER" | "N/A" | undefined;
123
+ dedicatedUser?: "RIDER" | "PASSENGER" | "N/A" | undefined;
124
124
  isPermanentlyUnlocked?: "true" | "false" | undefined;
125
125
  isAssigned?: "true" | "false" | undefined;
126
126
  }, {
127
- search?: string | undefined;
128
- limit?: string | undefined;
129
127
  status?: "locked" | "unlocked" | "disabled" | undefined;
130
128
  page?: string | undefined;
131
- sortBy?: "createdAt" | "updatedAt" | "status" | "serialNumber" | undefined;
132
- sortOrder?: "DESC" | "ASC" | undefined;
129
+ limit?: string | undefined;
130
+ search?: string | undefined;
131
+ sortBy?: "status" | "createdAt" | "updatedAt" | "serialNumber" | undefined;
132
+ sortOrder?: "ASC" | "DESC" | undefined;
133
133
  productId?: string | undefined;
134
- dedicatedUser?: "PASSENGER" | "RIDER" | "N/A" | undefined;
134
+ dedicatedUser?: "RIDER" | "PASSENGER" | "N/A" | undefined;
135
135
  isPermanentlyUnlocked?: "true" | "false" | undefined;
136
136
  isAssigned?: "true" | "false" | undefined;
137
137
  }>;
138
138
  }, "strip", z.ZodTypeAny, {
139
139
  query: {
140
- search?: string | undefined;
141
- limit?: number | undefined;
142
140
  status?: "locked" | "unlocked" | "disabled" | undefined;
143
141
  page?: number | undefined;
144
- sortBy?: "createdAt" | "updatedAt" | "status" | "serialNumber" | undefined;
145
- sortOrder?: "DESC" | "ASC" | undefined;
142
+ limit?: number | undefined;
143
+ search?: string | undefined;
144
+ sortBy?: "status" | "createdAt" | "updatedAt" | "serialNumber" | undefined;
145
+ sortOrder?: "ASC" | "DESC" | undefined;
146
146
  productId?: string | undefined;
147
- dedicatedUser?: "PASSENGER" | "RIDER" | "N/A" | undefined;
147
+ dedicatedUser?: "RIDER" | "PASSENGER" | "N/A" | undefined;
148
148
  isPermanentlyUnlocked?: "true" | "false" | undefined;
149
149
  isAssigned?: "true" | "false" | undefined;
150
150
  };
151
151
  }, {
152
152
  query: {
153
- search?: string | undefined;
154
- limit?: string | undefined;
155
153
  status?: "locked" | "unlocked" | "disabled" | undefined;
156
154
  page?: string | undefined;
157
- sortBy?: "createdAt" | "updatedAt" | "status" | "serialNumber" | undefined;
158
- sortOrder?: "DESC" | "ASC" | undefined;
155
+ limit?: string | undefined;
156
+ search?: string | undefined;
157
+ sortBy?: "status" | "createdAt" | "updatedAt" | "serialNumber" | undefined;
158
+ sortOrder?: "ASC" | "DESC" | undefined;
159
159
  productId?: string | undefined;
160
- dedicatedUser?: "PASSENGER" | "RIDER" | "N/A" | undefined;
160
+ dedicatedUser?: "RIDER" | "PASSENGER" | "N/A" | undefined;
161
161
  isPermanentlyUnlocked?: "true" | "false" | undefined;
162
162
  isAssigned?: "true" | "false" | undefined;
163
163
  };
@@ -242,19 +242,19 @@ export declare const disableDeviceSchema: z.ZodObject<{
242
242
  reason: string;
243
243
  }>;
244
244
  }, "strip", z.ZodTypeAny, {
245
- body: {
246
- reason: string;
247
- };
248
245
  params: {
249
246
  id: string;
250
247
  };
251
- }, {
252
248
  body: {
253
249
  reason: string;
254
250
  };
251
+ }, {
255
252
  params: {
256
253
  id: string;
257
254
  };
255
+ body: {
256
+ reason: string;
257
+ };
258
258
  }>;
259
259
  export declare const makePermanentSchema: z.ZodObject<{
260
260
  params: z.ZodObject<{
@@ -616,6 +616,9 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
616
616
  sentryDsn?: string | null | undefined;
617
617
  }>;
618
618
  }, "strip", z.ZodTypeAny, {
619
+ params: {
620
+ id: string;
621
+ };
619
622
  body: {
620
623
  appName?: string | undefined;
621
624
  appShortName?: string | null | undefined;
@@ -692,10 +695,10 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
692
695
  facebookPixelId?: string | null | undefined;
693
696
  sentryDsn?: string | null | undefined;
694
697
  };
698
+ }, {
695
699
  params: {
696
700
  id: string;
697
701
  };
698
- }, {
699
702
  body: {
700
703
  appName?: string | undefined;
701
704
  appShortName?: string | null | undefined;
@@ -772,9 +775,6 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
772
775
  facebookPixelId?: string | null | undefined;
773
776
  sentryDsn?: string | null | undefined;
774
777
  };
775
- params: {
776
- id: string;
777
- };
778
778
  }>;
779
779
  export declare const listAppSpecsSchema: z.ZodObject<{
780
780
  query: z.ZodObject<{
@@ -785,37 +785,37 @@ export declare const listAppSpecsSchema: z.ZodObject<{
785
785
  sortBy: z.ZodOptional<z.ZodEnum<["version", "createdAt", "updatedAt"]>>;
786
786
  sortOrder: z.ZodOptional<z.ZodEnum<["ASC", "DESC"]>>;
787
787
  }, "strip", z.ZodTypeAny, {
788
- limit: number;
789
788
  page: number;
790
- search?: string | undefined;
789
+ limit: number;
791
790
  isActive?: "true" | "false" | undefined;
791
+ search?: string | undefined;
792
792
  sortBy?: "createdAt" | "updatedAt" | "version" | undefined;
793
- sortOrder?: "DESC" | "ASC" | undefined;
793
+ sortOrder?: "ASC" | "DESC" | undefined;
794
794
  }, {
795
- search?: string | undefined;
796
- limit?: string | undefined;
797
795
  isActive?: "true" | "false" | undefined;
798
796
  page?: string | undefined;
797
+ limit?: string | undefined;
798
+ search?: 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: {
804
- limit: number;
805
804
  page: number;
806
- search?: string | undefined;
805
+ limit: number;
807
806
  isActive?: "true" | "false" | undefined;
807
+ search?: string | 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: {
813
- search?: string | undefined;
814
- limit?: string | undefined;
815
813
  isActive?: "true" | "false" | undefined;
816
814
  page?: string | undefined;
815
+ limit?: string | undefined;
816
+ search?: 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<{
@@ -15,19 +15,19 @@ export declare const submitBanAppealSchema: z.ZodObject<{
15
15
  appealReason: string;
16
16
  }>;
17
17
  }, "strip", z.ZodTypeAny, {
18
- body: {
19
- appealReason: string;
20
- };
21
18
  params: {
22
19
  banId: string;
23
20
  };
24
- }, {
25
21
  body: {
26
22
  appealReason: string;
27
23
  };
24
+ }, {
28
25
  params: {
29
26
  banId: string;
30
27
  };
28
+ body: {
29
+ appealReason: string;
30
+ };
31
31
  }>;
32
32
  export declare const submitSuspensionAppealSchema: z.ZodObject<{
33
33
  params: z.ZodObject<{
@@ -45,17 +45,17 @@ export declare const submitSuspensionAppealSchema: z.ZodObject<{
45
45
  appealReason: string;
46
46
  }>;
47
47
  }, "strip", z.ZodTypeAny, {
48
- body: {
49
- appealReason: string;
50
- };
51
48
  params: {
52
49
  suspensionId: string;
53
50
  };
54
- }, {
55
51
  body: {
56
52
  appealReason: string;
57
53
  };
54
+ }, {
58
55
  params: {
59
56
  suspensionId: string;
60
57
  };
58
+ body: {
59
+ appealReason: string;
60
+ };
61
61
  }>;