vr-commons 1.0.95 → 1.0.97

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.
Files changed (29) hide show
  1. package/dist/utils/admin.device.utils.d.ts +59 -0
  2. package/dist/utils/admin.device.utils.js +231 -0
  3. package/dist/utils/admin.devicePayment.utils.d.ts +46 -0
  4. package/dist/utils/admin.devicePayment.utils.js +206 -0
  5. package/dist/utils/index.d.ts +3 -1
  6. package/dist/utils/index.js +5 -1
  7. package/dist/utils/types.d.ts +7 -0
  8. package/dist/validations/admin.devicePayment.validations.d.ts +270 -0
  9. package/dist/validations/admin.devicePayment.validations.js +98 -0
  10. package/dist/validations/admin.devices.validations.d.ts +250 -0
  11. package/dist/validations/admin.devices.validations.js +118 -0
  12. package/dist/validations/appSpecs.validations.d.ts +16 -16
  13. package/dist/validations/appeals.validations.d.ts +8 -8
  14. package/dist/validations/auth.validations.d.ts +2 -2
  15. package/dist/validations/bans.validations.d.ts +8 -8
  16. package/dist/validations/devicePaymentPlan.validations.d.ts +12 -12
  17. package/dist/validations/index.d.ts +3 -0
  18. package/dist/validations/index.js +26 -1
  19. package/dist/validations/moderation.validations.d.ts +105 -105
  20. package/dist/validations/payinstallment.validations.d.ts +5 -5
  21. package/dist/validations/pricing.validations.d.ts +313 -0
  22. package/dist/validations/pricing.validations.js +376 -0
  23. package/dist/validations/pricings.validations.d.ts +313 -0
  24. package/dist/validations/pricings.validations.js +376 -0
  25. package/dist/validations/product.validations.d.ts +42 -42
  26. package/dist/validations/profiles.validations.d.ts +46 -46
  27. package/dist/validations/suspensions.validations.d.ts +8 -8
  28. package/dist/validations/users.admin.validations.d.ts +44 -44
  29. package/package.json +2 -2
@@ -8,27 +8,27 @@ export declare const createProductSchema: z.ZodObject<{
8
8
  }, "strip", z.ZodTypeAny, {
9
9
  name: string;
10
10
  stock: number;
11
- description?: string | null | undefined;
12
11
  isActive?: boolean | undefined;
12
+ description?: string | null | undefined;
13
13
  }, {
14
14
  name: string;
15
- stock?: number | undefined;
16
- description?: string | null | undefined;
17
15
  isActive?: boolean | undefined;
16
+ description?: string | null | undefined;
17
+ stock?: number | undefined;
18
18
  }>;
19
19
  }, "strip", z.ZodTypeAny, {
20
20
  body: {
21
21
  name: string;
22
22
  stock: number;
23
- description?: string | null | undefined;
24
23
  isActive?: boolean | undefined;
24
+ description?: string | null | undefined;
25
25
  };
26
26
  }, {
27
27
  body: {
28
28
  name: string;
29
- stock?: number | undefined;
30
- description?: string | null | undefined;
31
29
  isActive?: boolean | undefined;
30
+ description?: string | null | undefined;
31
+ stock?: number | undefined;
32
32
  };
33
33
  }>;
34
34
  export declare const updateProductSchema: z.ZodObject<{
@@ -45,35 +45,35 @@ export declare const updateProductSchema: z.ZodObject<{
45
45
  stock: z.ZodOptional<z.ZodNumber>;
46
46
  isActive: z.ZodOptional<z.ZodBoolean>;
47
47
  }, "strip", z.ZodTypeAny, {
48
+ isActive?: boolean | undefined;
49
+ description?: string | null | undefined;
48
50
  name?: string | undefined;
49
51
  stock?: number | undefined;
50
- description?: string | null | undefined;
51
- isActive?: boolean | undefined;
52
52
  }, {
53
+ isActive?: boolean | undefined;
54
+ description?: string | null | undefined;
53
55
  name?: string | undefined;
54
56
  stock?: number | undefined;
55
- description?: string | null | undefined;
56
- isActive?: boolean | undefined;
57
57
  }>;
58
58
  }, "strip", z.ZodTypeAny, {
59
- params: {
60
- id: string;
61
- };
62
59
  body: {
60
+ isActive?: boolean | undefined;
61
+ description?: string | null | undefined;
63
62
  name?: string | undefined;
64
63
  stock?: number | undefined;
65
- description?: string | null | undefined;
66
- isActive?: boolean | undefined;
67
64
  };
68
- }, {
69
65
  params: {
70
66
  id: string;
71
67
  };
68
+ }, {
72
69
  body: {
70
+ isActive?: boolean | undefined;
71
+ description?: string | null | undefined;
73
72
  name?: string | undefined;
74
73
  stock?: number | undefined;
75
- description?: string | null | undefined;
76
- isActive?: boolean | undefined;
74
+ };
75
+ params: {
76
+ id: string;
77
77
  };
78
78
  }>;
79
79
  export declare const getProductSchema: z.ZodObject<{
@@ -103,41 +103,41 @@ export declare const getProductsSchema: z.ZodObject<{
103
103
  sortBy: z.ZodOptional<z.ZodEnum<["name", "stock", "createdAt", "updatedAt"]>>;
104
104
  sortOrder: z.ZodOptional<z.ZodEnum<["ASC", "DESC"]>>;
105
105
  }, "strip", z.ZodTypeAny, {
106
+ search?: string | undefined;
107
+ limit?: number | undefined;
106
108
  isActive?: "true" | "false" | undefined;
107
109
  page?: number | undefined;
108
- limit?: number | undefined;
109
- search?: string | undefined;
110
+ sortBy?: "createdAt" | "updatedAt" | "name" | "stock" | undefined;
111
+ sortOrder?: "DESC" | "ASC" | undefined;
110
112
  minStock?: number | undefined;
111
- sortBy?: "name" | "stock" | "createdAt" | "updatedAt" | undefined;
112
- sortOrder?: "ASC" | "DESC" | undefined;
113
113
  }, {
114
+ search?: string | undefined;
115
+ limit?: string | undefined;
114
116
  isActive?: "true" | "false" | undefined;
115
117
  page?: string | undefined;
116
- limit?: string | undefined;
117
- search?: string | undefined;
118
+ sortBy?: "createdAt" | "updatedAt" | "name" | "stock" | undefined;
119
+ sortOrder?: "DESC" | "ASC" | undefined;
118
120
  minStock?: string | undefined;
119
- sortBy?: "name" | "stock" | "createdAt" | "updatedAt" | undefined;
120
- sortOrder?: "ASC" | "DESC" | undefined;
121
121
  }>;
122
122
  }, "strip", z.ZodTypeAny, {
123
123
  query: {
124
+ search?: string | undefined;
125
+ limit?: number | undefined;
124
126
  isActive?: "true" | "false" | undefined;
125
127
  page?: number | undefined;
126
- limit?: number | undefined;
127
- search?: string | undefined;
128
+ sortBy?: "createdAt" | "updatedAt" | "name" | "stock" | undefined;
129
+ sortOrder?: "DESC" | "ASC" | undefined;
128
130
  minStock?: number | undefined;
129
- sortBy?: "name" | "stock" | "createdAt" | "updatedAt" | undefined;
130
- sortOrder?: "ASC" | "DESC" | undefined;
131
131
  };
132
132
  }, {
133
133
  query: {
134
+ search?: string | undefined;
135
+ limit?: string | undefined;
134
136
  isActive?: "true" | "false" | undefined;
135
137
  page?: string | undefined;
136
- limit?: string | undefined;
137
- search?: string | undefined;
138
+ sortBy?: "createdAt" | "updatedAt" | "name" | "stock" | undefined;
139
+ sortOrder?: "DESC" | "ASC" | undefined;
138
140
  minStock?: string | undefined;
139
- sortBy?: "name" | "stock" | "createdAt" | "updatedAt" | undefined;
140
- sortOrder?: "ASC" | "DESC" | undefined;
141
141
  };
142
142
  }>;
143
143
  export declare const deleteProductSchema: z.ZodObject<{
@@ -203,26 +203,26 @@ export declare const updateStockSchema: z.ZodObject<{
203
203
  operation: z.ZodEnum<["increment", "decrement", "set"]>;
204
204
  amount: z.ZodNumber;
205
205
  }, "strip", z.ZodTypeAny, {
206
- operation: "set" | "increment" | "decrement";
207
206
  amount: number;
207
+ operation: "increment" | "decrement" | "set";
208
208
  }, {
209
- operation: "set" | "increment" | "decrement";
210
209
  amount: number;
210
+ operation: "increment" | "decrement" | "set";
211
211
  }>;
212
212
  }, "strip", z.ZodTypeAny, {
213
- params: {
214
- id: string;
215
- };
216
213
  body: {
217
- operation: "set" | "increment" | "decrement";
218
214
  amount: number;
215
+ operation: "increment" | "decrement" | "set";
219
216
  };
220
- }, {
221
217
  params: {
222
218
  id: string;
223
219
  };
220
+ }, {
224
221
  body: {
225
- operation: "set" | "increment" | "decrement";
226
222
  amount: number;
223
+ operation: "increment" | "decrement" | "set";
224
+ };
225
+ params: {
226
+ id: string;
227
227
  };
228
228
  }>;
@@ -17,7 +17,7 @@ export declare const createUserSchema: z.ZodObject<{
17
17
  firstName: string;
18
18
  lastName: string;
19
19
  nationalId: string;
20
- role: "RIDER" | "PASSENGER" | "ADMIN" | "AGENT" | "SUPER_ADMIN";
20
+ role: "ADMIN" | "PASSENGER" | "RIDER" | "AGENT" | "SUPER_ADMIN";
21
21
  phoneNumber: string;
22
22
  jacketId?: string | null | undefined;
23
23
  email?: string | null | undefined;
@@ -27,7 +27,7 @@ export declare const createUserSchema: z.ZodObject<{
27
27
  firstName: string;
28
28
  lastName: string;
29
29
  nationalId: string;
30
- role: "RIDER" | "PASSENGER" | "ADMIN" | "AGENT" | "SUPER_ADMIN";
30
+ role: "ADMIN" | "PASSENGER" | "RIDER" | "AGENT" | "SUPER_ADMIN";
31
31
  phoneNumber: string;
32
32
  jacketId?: string | null | undefined;
33
33
  email?: string | null | undefined;
@@ -46,7 +46,7 @@ export declare const createUserSchema: z.ZodObject<{
46
46
  firstName: string;
47
47
  lastName: string;
48
48
  nationalId: string;
49
- role: "RIDER" | "PASSENGER" | "ADMIN" | "AGENT" | "SUPER_ADMIN";
49
+ role: "ADMIN" | "PASSENGER" | "RIDER" | "AGENT" | "SUPER_ADMIN";
50
50
  phoneNumber: string;
51
51
  jacketId?: string | null | undefined;
52
52
  email?: string | null | undefined;
@@ -61,7 +61,7 @@ export declare const createUserSchema: z.ZodObject<{
61
61
  firstName: string;
62
62
  lastName: string;
63
63
  nationalId: string;
64
- role: "RIDER" | "PASSENGER" | "ADMIN" | "AGENT" | "SUPER_ADMIN";
64
+ role: "ADMIN" | "PASSENGER" | "RIDER" | "AGENT" | "SUPER_ADMIN";
65
65
  phoneNumber: string;
66
66
  jacketId?: string | null | undefined;
67
67
  email?: string | null | undefined;
@@ -121,42 +121,42 @@ export declare const updateUserProfileSchema: z.ZodObject<{
121
121
  isDeactivated: z.ZodOptional<z.ZodBoolean>;
122
122
  password: z.ZodOptional<z.ZodString>;
123
123
  }, "strip", z.ZodTypeAny, {
124
- isActive?: boolean | undefined;
125
124
  firstName?: string | undefined;
126
125
  lastName?: string | undefined;
127
126
  email?: string | null | undefined;
128
127
  password?: string | undefined;
129
128
  plateNumber?: string | null | undefined;
129
+ isActive?: boolean | undefined;
130
130
  isDeactivated?: boolean | undefined;
131
131
  phoneNumber?: string | undefined;
132
132
  isSuspended?: boolean | undefined;
133
133
  }, {
134
- isActive?: boolean | undefined;
135
134
  firstName?: string | undefined;
136
135
  lastName?: string | undefined;
137
136
  email?: string | null | undefined;
138
137
  password?: string | undefined;
139
138
  plateNumber?: string | null | undefined;
139
+ isActive?: boolean | undefined;
140
140
  isDeactivated?: boolean | undefined;
141
141
  phoneNumber?: string | undefined;
142
142
  isSuspended?: boolean | undefined;
143
143
  }>, {
144
- isActive?: boolean | undefined;
145
144
  firstName?: string | undefined;
146
145
  lastName?: string | undefined;
147
146
  email?: string | null | undefined;
148
147
  password?: string | undefined;
149
148
  plateNumber?: string | null | undefined;
149
+ isActive?: boolean | undefined;
150
150
  isDeactivated?: boolean | undefined;
151
151
  phoneNumber?: string | undefined;
152
152
  isSuspended?: boolean | undefined;
153
153
  }, {
154
- isActive?: boolean | undefined;
155
154
  firstName?: string | undefined;
156
155
  lastName?: string | undefined;
157
156
  email?: string | null | undefined;
158
157
  password?: string | undefined;
159
158
  plateNumber?: string | null | undefined;
159
+ isActive?: boolean | undefined;
160
160
  isDeactivated?: boolean | undefined;
161
161
  phoneNumber?: string | undefined;
162
162
  isSuspended?: boolean | undefined;
@@ -169,38 +169,38 @@ export declare const updateUserProfileSchema: z.ZodObject<{
169
169
  authorization: string;
170
170
  }>;
171
171
  }, "strip", z.ZodTypeAny, {
172
- params: {
173
- userId: string;
174
- };
175
172
  body: {
176
- isActive?: boolean | undefined;
177
173
  firstName?: string | undefined;
178
174
  lastName?: string | undefined;
179
175
  email?: string | null | undefined;
180
176
  password?: string | undefined;
181
177
  plateNumber?: string | null | undefined;
178
+ isActive?: boolean | undefined;
182
179
  isDeactivated?: boolean | undefined;
183
180
  phoneNumber?: string | undefined;
184
181
  isSuspended?: boolean | undefined;
185
182
  };
183
+ params: {
184
+ userId: string;
185
+ };
186
186
  headers: {
187
187
  authorization: string;
188
188
  };
189
189
  }, {
190
- params: {
191
- userId: string;
192
- };
193
190
  body: {
194
- isActive?: boolean | undefined;
195
191
  firstName?: string | undefined;
196
192
  lastName?: string | undefined;
197
193
  email?: string | null | undefined;
198
194
  password?: string | undefined;
199
195
  plateNumber?: string | null | undefined;
196
+ isActive?: boolean | undefined;
200
197
  isDeactivated?: boolean | undefined;
201
198
  phoneNumber?: string | undefined;
202
199
  isSuspended?: boolean | undefined;
203
200
  };
201
+ params: {
202
+ userId: string;
203
+ };
204
204
  headers: {
205
205
  authorization: string;
206
206
  };
@@ -219,29 +219,29 @@ export declare const getAllUsersSchema: z.ZodObject<{
219
219
  sortBy: z.ZodDefault<z.ZodEnum<["firstName", "lastLoginAt", "createdAt"]>>;
220
220
  order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
221
221
  }, "strip", z.ZodTypeAny, {
222
- sortBy: "createdAt" | "firstName" | "lastLoginAt";
223
222
  order: "asc" | "desc";
224
- isActive?: boolean | undefined;
225
- page?: number | undefined;
226
- limit?: number | undefined;
223
+ sortBy: "firstName" | "lastLoginAt" | "createdAt";
227
224
  search?: string | undefined;
228
- role?: "RIDER" | "PASSENGER" | "ADMIN" | "AGENT" | "SUPER_ADMIN" | undefined;
225
+ limit?: number | undefined;
226
+ isActive?: boolean | undefined;
227
+ role?: "ADMIN" | "PASSENGER" | "RIDER" | "AGENT" | "SUPER_ADMIN" | undefined;
229
228
  isBanned?: boolean | undefined;
230
229
  isSuspended?: boolean | undefined;
230
+ page?: number | undefined;
231
231
  startDate?: string | undefined;
232
232
  endDate?: string | undefined;
233
233
  }, {
234
- isActive?: "true" | "false" | undefined;
235
- page?: string | undefined;
236
- limit?: string | undefined;
237
234
  search?: string | undefined;
238
- sortBy?: "createdAt" | "firstName" | "lastLoginAt" | undefined;
239
235
  order?: "asc" | "desc" | undefined;
240
- role?: "RIDER" | "PASSENGER" | "ADMIN" | "AGENT" | "SUPER_ADMIN" | undefined;
236
+ limit?: string | undefined;
237
+ isActive?: "true" | "false" | undefined;
238
+ role?: "ADMIN" | "PASSENGER" | "RIDER" | "AGENT" | "SUPER_ADMIN" | undefined;
241
239
  isBanned?: "true" | "false" | undefined;
242
240
  isSuspended?: "true" | "false" | undefined;
241
+ page?: string | undefined;
243
242
  startDate?: string | undefined;
244
243
  endDate?: string | undefined;
244
+ sortBy?: "firstName" | "lastLoginAt" | "createdAt" | undefined;
245
245
  }>;
246
246
  headers: z.ZodObject<{
247
247
  authorization: z.ZodString;
@@ -252,15 +252,15 @@ export declare const getAllUsersSchema: z.ZodObject<{
252
252
  }>;
253
253
  }, "strip", z.ZodTypeAny, {
254
254
  query: {
255
- sortBy: "createdAt" | "firstName" | "lastLoginAt";
256
255
  order: "asc" | "desc";
257
- isActive?: boolean | undefined;
258
- page?: number | undefined;
259
- limit?: number | undefined;
256
+ sortBy: "firstName" | "lastLoginAt" | "createdAt";
260
257
  search?: string | undefined;
261
- role?: "RIDER" | "PASSENGER" | "ADMIN" | "AGENT" | "SUPER_ADMIN" | undefined;
258
+ limit?: number | undefined;
259
+ isActive?: boolean | undefined;
260
+ role?: "ADMIN" | "PASSENGER" | "RIDER" | "AGENT" | "SUPER_ADMIN" | undefined;
262
261
  isBanned?: boolean | undefined;
263
262
  isSuspended?: boolean | undefined;
263
+ page?: number | undefined;
264
264
  startDate?: string | undefined;
265
265
  endDate?: string | undefined;
266
266
  };
@@ -269,17 +269,17 @@ export declare const getAllUsersSchema: z.ZodObject<{
269
269
  };
270
270
  }, {
271
271
  query: {
272
- isActive?: "true" | "false" | undefined;
273
- page?: string | undefined;
274
- limit?: string | undefined;
275
272
  search?: string | undefined;
276
- sortBy?: "createdAt" | "firstName" | "lastLoginAt" | undefined;
277
273
  order?: "asc" | "desc" | undefined;
278
- role?: "RIDER" | "PASSENGER" | "ADMIN" | "AGENT" | "SUPER_ADMIN" | undefined;
274
+ limit?: string | undefined;
275
+ isActive?: "true" | "false" | undefined;
276
+ role?: "ADMIN" | "PASSENGER" | "RIDER" | "AGENT" | "SUPER_ADMIN" | undefined;
279
277
  isBanned?: "true" | "false" | undefined;
280
278
  isSuspended?: "true" | "false" | undefined;
279
+ page?: string | undefined;
281
280
  startDate?: string | undefined;
282
281
  endDate?: string | undefined;
282
+ sortBy?: "firstName" | "lastLoginAt" | "createdAt" | undefined;
283
283
  };
284
284
  headers: {
285
285
  authorization: string;
@@ -300,16 +300,16 @@ export declare const viewProfileSchema: z.ZodObject<{
300
300
  headers: {
301
301
  authorization: string;
302
302
  };
303
- params?: {} | undefined;
304
303
  body?: {} | undefined;
305
304
  query?: {} | undefined;
305
+ params?: {} | undefined;
306
306
  }, {
307
307
  headers: {
308
308
  authorization: string;
309
309
  };
310
- params?: {} | undefined;
311
310
  body?: {} | undefined;
312
311
  query?: {} | undefined;
312
+ params?: {} | undefined;
313
313
  }>;
314
314
  export declare const passengerSignupSchema: z.ZodObject<{
315
315
  body: z.ZodObject<{
@@ -444,8 +444,8 @@ export declare const createRiderSchema: z.ZodObject<{
444
444
  nationalId: string;
445
445
  phoneNumber: string;
446
446
  };
447
- params?: {} | undefined;
448
447
  query?: {} | undefined;
448
+ params?: {} | undefined;
449
449
  }, {
450
450
  body: {
451
451
  firstName: string;
@@ -455,8 +455,8 @@ export declare const createRiderSchema: z.ZodObject<{
455
455
  nationalId: string;
456
456
  phoneNumber: string;
457
457
  };
458
- params?: {} | undefined;
459
458
  query?: {} | undefined;
459
+ params?: {} | undefined;
460
460
  }>;
461
461
  export declare const updateRiderProfileSchema: z.ZodObject<{
462
462
  params: z.ZodObject<{
@@ -511,9 +511,6 @@ export declare const updateRiderProfileSchema: z.ZodObject<{
511
511
  authorization: string;
512
512
  }>;
513
513
  }, "strip", z.ZodTypeAny, {
514
- params: {
515
- id: string;
516
- };
517
514
  body: {
518
515
  firstName: string;
519
516
  lastName: string;
@@ -522,14 +519,14 @@ export declare const updateRiderProfileSchema: z.ZodObject<{
522
519
  nationalId: string;
523
520
  phoneNumber: string;
524
521
  };
522
+ params: {
523
+ id: string;
524
+ };
525
525
  headers: {
526
526
  authorization: string;
527
527
  };
528
528
  query?: {} | undefined;
529
529
  }, {
530
- params: {
531
- id: string;
532
- };
533
530
  body: {
534
531
  firstName: string;
535
532
  lastName: string;
@@ -538,6 +535,9 @@ export declare const updateRiderProfileSchema: z.ZodObject<{
538
535
  nationalId: string;
539
536
  phoneNumber: string;
540
537
  };
538
+ params: {
539
+ id: string;
540
+ };
541
541
  headers: {
542
542
  authorization: string;
543
543
  };
@@ -35,21 +35,21 @@ export declare const getUserSuspensionsSchema: z.ZodObject<{
35
35
  includeResolved?: "true" | "false" | undefined;
36
36
  }>;
37
37
  }, "strip", z.ZodTypeAny, {
38
- params: {
39
- userId: string;
40
- };
41
38
  query: {
42
39
  status?: "active" | "expired" | "revoked" | undefined;
43
40
  includeResolved?: "true" | "false" | undefined;
44
41
  };
45
- }, {
46
42
  params: {
47
43
  userId: string;
48
44
  };
45
+ }, {
49
46
  query: {
50
47
  status?: "active" | "expired" | "revoked" | undefined;
51
48
  includeResolved?: "true" | "false" | undefined;
52
49
  };
50
+ params: {
51
+ userId: string;
52
+ };
53
53
  }>;
54
54
  export declare const createSuspensionSchema: z.ZodObject<{
55
55
  params: z.ZodObject<{
@@ -70,19 +70,19 @@ export declare const createSuspensionSchema: z.ZodObject<{
70
70
  endsAt: string;
71
71
  }>;
72
72
  }, "strip", z.ZodTypeAny, {
73
- params: {
74
- userId: string;
75
- };
76
73
  body: {
77
74
  reason: string;
78
75
  endsAt: string;
79
76
  };
80
- }, {
81
77
  params: {
82
78
  userId: string;
83
79
  };
80
+ }, {
84
81
  body: {
85
82
  reason: string;
86
83
  endsAt: string;
87
84
  };
85
+ params: {
86
+ userId: string;
87
+ };
88
88
  }>;