vr-commons 1.0.78 → 1.0.79

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.
@@ -89,7 +89,7 @@ const checkAccountDependencies = async (userId, transaction) => {
89
89
  messages.push(`You have ${activeDevicePlans} active device payment plan(s)`);
90
90
  }
91
91
  // 2. Check for pending payments
92
- const pendingPayments = await vr_models_1.Transaction.count({
92
+ const pendingPayments = await vr_models_1.Payment.count({
93
93
  where: {
94
94
  userId,
95
95
  status: "PENDING", // Adjust based on your status enum
@@ -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?: "ASC" | "DESC" | undefined;
793
+ sortOrder?: "DESC" | "ASC" | 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?: "ASC" | "DESC" | undefined;
800
+ sortOrder?: "DESC" | "ASC" | 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?: "ASC" | "DESC" | undefined;
809
+ sortOrder?: "DESC" | "ASC" | 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?: "ASC" | "DESC" | undefined;
818
+ sortOrder?: "DESC" | "ASC" | undefined;
819
819
  };
820
820
  }>;
821
821
  export declare const getAppSpecsSchema: z.ZodObject<{
@@ -6,30 +6,30 @@ export declare const riderLoginSchema: z.ZodObject<{
6
6
  phoneNumber: z.ZodString;
7
7
  nationalId: z.ZodString;
8
8
  }, "strip", z.ZodTypeAny, {
9
- phoneNumber: string;
10
9
  nationalId: string;
11
- }, {
12
10
  phoneNumber: string;
11
+ }, {
13
12
  nationalId: string;
13
+ phoneNumber: string;
14
14
  }>;
15
15
  query: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
16
16
  params: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
17
17
  headers: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
18
18
  }, "strip", z.ZodTypeAny, {
19
19
  body: {
20
- phoneNumber: string;
21
20
  nationalId: string;
21
+ phoneNumber: string;
22
22
  };
23
- params?: {} | undefined;
24
23
  query?: {} | undefined;
24
+ params?: {} | undefined;
25
25
  headers?: {} | undefined;
26
26
  }, {
27
27
  body: {
28
- phoneNumber: string;
29
28
  nationalId: string;
29
+ phoneNumber: string;
30
30
  };
31
- params?: {} | undefined;
32
31
  query?: {} | undefined;
32
+ params?: {} | undefined;
33
33
  headers?: {} | undefined;
34
34
  }>;
35
35
  export declare const userLoginSchema: z.ZodObject<{
@@ -96,32 +96,32 @@ export declare const registerSchema: z.ZodObject<{
96
96
  email: z.ZodOptional<z.ZodString>;
97
97
  password: z.ZodString;
98
98
  }, "strict", z.ZodTypeAny, {
99
- phoneNumber: string;
100
- password: string;
101
99
  firstName: string;
102
100
  lastName: string;
101
+ password: string;
102
+ phoneNumber: string;
103
103
  email?: string | undefined;
104
104
  }, {
105
- phoneNumber: string;
106
- password: string;
107
105
  firstName: string;
108
106
  lastName: string;
107
+ password: string;
108
+ phoneNumber: string;
109
109
  email?: string | undefined;
110
110
  }>;
111
111
  }, "strip", z.ZodTypeAny, {
112
112
  body: {
113
- phoneNumber: string;
114
- password: string;
115
113
  firstName: string;
116
114
  lastName: string;
115
+ password: string;
116
+ phoneNumber: string;
117
117
  email?: string | undefined;
118
118
  };
119
119
  }, {
120
120
  body: {
121
- phoneNumber: string;
122
- password: string;
123
121
  firstName: string;
124
122
  lastName: string;
123
+ password: string;
124
+ phoneNumber: string;
125
125
  email?: string | undefined;
126
126
  };
127
127
  }>;
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
2
  export declare const listUserPaymentPlansSchema: z.ZodObject<{
3
3
  query: z.ZodObject<{
4
- status: z.ZodOptional<z.ZodEnum<["pending", "succeeded", "failed"]>>;
4
+ status: z.ZodOptional<z.ZodEnum<["PENDING", "SUCCESSFUL", "FAILED"]>>;
5
5
  page: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, number, string | undefined>, z.ZodNumber>;
6
6
  limit: z.ZodPipeline<z.ZodEffects<z.ZodOptional<z.ZodString>, number, string | undefined>, z.ZodNumber>;
7
7
  sortBy: z.ZodOptional<z.ZodEnum<["createdAt", "updatedAt", "nextInstallmentDueAt", "status"]>>;
@@ -9,31 +9,31 @@ export declare const listUserPaymentPlansSchema: z.ZodObject<{
9
9
  }, "strip", z.ZodTypeAny, {
10
10
  limit: number;
11
11
  page: number;
12
- status?: "pending" | "succeeded" | "failed" | undefined;
12
+ status?: "PENDING" | "SUCCESSFUL" | "FAILED" | undefined;
13
13
  sortBy?: "createdAt" | "updatedAt" | "status" | "nextInstallmentDueAt" | undefined;
14
- sortOrder?: "ASC" | "DESC" | undefined;
14
+ sortOrder?: "DESC" | "ASC" | undefined;
15
15
  }, {
16
16
  limit?: string | undefined;
17
+ status?: "PENDING" | "SUCCESSFUL" | "FAILED" | undefined;
17
18
  page?: string | undefined;
18
- status?: "pending" | "succeeded" | "failed" | undefined;
19
19
  sortBy?: "createdAt" | "updatedAt" | "status" | "nextInstallmentDueAt" | undefined;
20
- sortOrder?: "ASC" | "DESC" | undefined;
20
+ sortOrder?: "DESC" | "ASC" | undefined;
21
21
  }>;
22
22
  }, "strip", z.ZodTypeAny, {
23
23
  query: {
24
24
  limit: number;
25
25
  page: number;
26
- status?: "pending" | "succeeded" | "failed" | undefined;
26
+ status?: "PENDING" | "SUCCESSFUL" | "FAILED" | undefined;
27
27
  sortBy?: "createdAt" | "updatedAt" | "status" | "nextInstallmentDueAt" | undefined;
28
- sortOrder?: "ASC" | "DESC" | undefined;
28
+ sortOrder?: "DESC" | "ASC" | undefined;
29
29
  };
30
30
  }, {
31
31
  query: {
32
32
  limit?: string | undefined;
33
+ status?: "PENDING" | "SUCCESSFUL" | "FAILED" | undefined;
33
34
  page?: string | undefined;
34
- status?: "pending" | "succeeded" | "failed" | undefined;
35
35
  sortBy?: "createdAt" | "updatedAt" | "status" | "nextInstallmentDueAt" | undefined;
36
- sortOrder?: "ASC" | "DESC" | undefined;
36
+ sortOrder?: "DESC" | "ASC" | undefined;
37
37
  };
38
38
  }>;
39
39
  export declare const getUserPaymentPlanSchema: z.ZodObject<{
@@ -14,81 +14,81 @@ 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
- page: number;
18
17
  limit: number;
19
- status?: "active" | "revoked" | undefined;
20
- userId?: string | undefined;
18
+ page: number;
21
19
  search?: string | undefined;
22
- sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
23
- appealStatus?: "pending" | "approved" | "rejected" | undefined;
20
+ userId?: string | undefined;
24
21
  isPermanent?: "true" | "false" | undefined;
22
+ appealStatus?: "pending" | "approved" | "rejected" | undefined;
23
+ status?: "active" | "revoked" | undefined;
24
+ sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
25
25
  fromDate?: string | undefined;
26
26
  toDate?: string | undefined;
27
- sortOrder?: "ASC" | "DESC" | undefined;
27
+ sortOrder?: "DESC" | "ASC" | undefined;
28
28
  }, {
29
- status?: "active" | "revoked" | undefined;
29
+ search?: string | undefined;
30
+ limit?: string | undefined;
30
31
  userId?: string | undefined;
32
+ isPermanent?: "true" | "false" | undefined;
33
+ appealStatus?: "pending" | "approved" | "rejected" | undefined;
34
+ status?: "active" | "revoked" | undefined;
31
35
  page?: string | undefined;
32
- limit?: string | undefined;
33
- search?: string | undefined;
34
36
  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
- sortOrder?: "ASC" | "DESC" | undefined;
39
+ sortOrder?: "DESC" | "ASC" | undefined;
40
40
  }>, {
41
- page: number;
42
41
  limit: number;
43
- status?: "active" | "revoked" | undefined;
44
- userId?: string | undefined;
42
+ page: number;
45
43
  search?: string | undefined;
46
- sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
47
- appealStatus?: "pending" | "approved" | "rejected" | undefined;
44
+ userId?: string | undefined;
48
45
  isPermanent?: "true" | "false" | undefined;
46
+ appealStatus?: "pending" | "approved" | "rejected" | undefined;
47
+ status?: "active" | "revoked" | undefined;
48
+ sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
49
49
  fromDate?: string | undefined;
50
50
  toDate?: string | undefined;
51
- sortOrder?: "ASC" | "DESC" | undefined;
51
+ sortOrder?: "DESC" | "ASC" | undefined;
52
52
  }, {
53
- status?: "active" | "revoked" | undefined;
53
+ search?: string | undefined;
54
+ limit?: string | undefined;
54
55
  userId?: string | undefined;
56
+ isPermanent?: "true" | "false" | undefined;
57
+ appealStatus?: "pending" | "approved" | "rejected" | undefined;
58
+ status?: "active" | "revoked" | undefined;
55
59
  page?: string | undefined;
56
- limit?: string | undefined;
57
- search?: string | undefined;
58
60
  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
- sortOrder?: "ASC" | "DESC" | undefined;
63
+ sortOrder?: "DESC" | "ASC" | undefined;
64
64
  }>;
65
65
  }, "strip", z.ZodTypeAny, {
66
66
  query: {
67
- page: number;
68
67
  limit: number;
69
- status?: "active" | "revoked" | undefined;
70
- userId?: string | undefined;
68
+ page: number;
71
69
  search?: string | undefined;
72
- sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
73
- appealStatus?: "pending" | "approved" | "rejected" | undefined;
70
+ userId?: string | undefined;
74
71
  isPermanent?: "true" | "false" | undefined;
72
+ appealStatus?: "pending" | "approved" | "rejected" | undefined;
73
+ status?: "active" | "revoked" | undefined;
74
+ sortBy?: "createdAt" | "reason" | "bannedAt" | undefined;
75
75
  fromDate?: string | undefined;
76
76
  toDate?: string | undefined;
77
- sortOrder?: "ASC" | "DESC" | undefined;
77
+ sortOrder?: "DESC" | "ASC" | undefined;
78
78
  };
79
79
  }, {
80
80
  query: {
81
- status?: "active" | "revoked" | undefined;
81
+ search?: string | undefined;
82
+ limit?: string | undefined;
82
83
  userId?: string | undefined;
84
+ isPermanent?: "true" | "false" | undefined;
85
+ appealStatus?: "pending" | "approved" | "rejected" | undefined;
86
+ status?: "active" | "revoked" | undefined;
83
87
  page?: string | undefined;
84
- limit?: string | undefined;
85
- search?: string | undefined;
86
88
  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
- sortOrder?: "ASC" | "DESC" | undefined;
91
+ sortOrder?: "DESC" | "ASC" | undefined;
92
92
  };
93
93
  }>;
94
94
  export declare const listSuspensionsSchema: z.ZodObject<{
@@ -105,75 +105,75 @@ 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
- page: number;
109
108
  limit: number;
110
- status?: "active" | "revoked" | "expired" | undefined;
111
- userId?: string | undefined;
109
+ page: number;
112
110
  search?: string | undefined;
113
- sortBy?: "createdAt" | "reason" | "startedAt" | "endsAt" | undefined;
111
+ userId?: string | undefined;
114
112
  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
- sortOrder?: "ASC" | "DESC" | undefined;
117
+ sortOrder?: "DESC" | "ASC" | undefined;
118
118
  }, {
119
- status?: "active" | "revoked" | "expired" | undefined;
120
- userId?: string | undefined;
121
- page?: string | undefined;
122
- limit?: string | undefined;
123
119
  search?: string | undefined;
124
- sortBy?: "createdAt" | "reason" | "startedAt" | "endsAt" | undefined;
120
+ limit?: string | undefined;
121
+ userId?: string | undefined;
125
122
  appealStatus?: "pending" | "approved" | "rejected" | undefined;
123
+ status?: "active" | "revoked" | "expired" | undefined;
124
+ page?: string | undefined;
125
+ sortBy?: "createdAt" | "reason" | "endsAt" | "startedAt" | undefined;
126
126
  fromDate?: string | undefined;
127
127
  toDate?: string | undefined;
128
- sortOrder?: "ASC" | "DESC" | undefined;
128
+ sortOrder?: "DESC" | "ASC" | undefined;
129
129
  }>, {
130
- page: number;
131
130
  limit: number;
132
- status?: "active" | "revoked" | "expired" | undefined;
133
- userId?: string | undefined;
131
+ page: number;
134
132
  search?: string | undefined;
135
- sortBy?: "createdAt" | "reason" | "startedAt" | "endsAt" | undefined;
133
+ userId?: string | undefined;
136
134
  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
- sortOrder?: "ASC" | "DESC" | undefined;
139
+ sortOrder?: "DESC" | "ASC" | undefined;
140
140
  }, {
141
- status?: "active" | "revoked" | "expired" | undefined;
142
- userId?: string | undefined;
143
- page?: string | undefined;
144
- limit?: string | undefined;
145
141
  search?: string | undefined;
146
- sortBy?: "createdAt" | "reason" | "startedAt" | "endsAt" | undefined;
142
+ limit?: string | undefined;
143
+ userId?: string | undefined;
147
144
  appealStatus?: "pending" | "approved" | "rejected" | undefined;
145
+ status?: "active" | "revoked" | "expired" | undefined;
146
+ page?: string | undefined;
147
+ sortBy?: "createdAt" | "reason" | "endsAt" | "startedAt" | undefined;
148
148
  fromDate?: string | undefined;
149
149
  toDate?: string | undefined;
150
- sortOrder?: "ASC" | "DESC" | undefined;
150
+ sortOrder?: "DESC" | "ASC" | undefined;
151
151
  }>;
152
152
  }, "strip", z.ZodTypeAny, {
153
153
  query: {
154
- page: number;
155
154
  limit: number;
156
- status?: "active" | "revoked" | "expired" | undefined;
157
- userId?: string | undefined;
155
+ page: number;
158
156
  search?: string | undefined;
159
- sortBy?: "createdAt" | "reason" | "startedAt" | "endsAt" | undefined;
157
+ userId?: string | undefined;
160
158
  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
- sortOrder?: "ASC" | "DESC" | undefined;
163
+ sortOrder?: "DESC" | "ASC" | undefined;
164
164
  };
165
165
  }, {
166
166
  query: {
167
- status?: "active" | "revoked" | "expired" | undefined;
168
- userId?: string | undefined;
169
- page?: string | undefined;
170
- limit?: string | undefined;
171
167
  search?: string | undefined;
172
- sortBy?: "createdAt" | "reason" | "startedAt" | "endsAt" | undefined;
168
+ limit?: string | undefined;
169
+ userId?: string | undefined;
173
170
  appealStatus?: "pending" | "approved" | "rejected" | undefined;
171
+ status?: "active" | "revoked" | "expired" | undefined;
172
+ page?: string | undefined;
173
+ sortBy?: "createdAt" | "reason" | "endsAt" | "startedAt" | undefined;
174
174
  fromDate?: string | undefined;
175
175
  toDate?: string | undefined;
176
- sortOrder?: "ASC" | "DESC" | undefined;
176
+ sortOrder?: "DESC" | "ASC" | undefined;
177
177
  };
178
178
  }>;
179
179
  export declare const revokeBanSchema: z.ZodObject<{
@@ -192,19 +192,19 @@ export declare const revokeBanSchema: z.ZodObject<{
192
192
  revocationReason?: string | undefined;
193
193
  }>;
194
194
  }, "strip", z.ZodTypeAny, {
195
- params: {
196
- banId: string;
197
- };
198
195
  body: {
199
196
  revocationReason?: string | undefined;
200
197
  };
201
- }, {
202
198
  params: {
203
199
  banId: string;
204
200
  };
201
+ }, {
205
202
  body: {
206
203
  revocationReason?: string | undefined;
207
204
  };
205
+ params: {
206
+ banId: string;
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
- params: {
226
- suspensionId: string;
227
- };
228
225
  body: {
229
226
  revocationReason?: string | undefined;
230
227
  };
231
- }, {
232
228
  params: {
233
229
  suspensionId: string;
234
230
  };
231
+ }, {
235
232
  body: {
236
233
  revocationReason?: string | undefined;
237
234
  };
235
+ params: {
236
+ suspensionId: string;
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
- };
267
264
  body: {
268
265
  newEndDate: string;
269
266
  extensionReason?: string | undefined;
270
267
  };
271
- }, {
272
268
  params: {
273
269
  suspensionId: string;
274
270
  };
271
+ }, {
275
272
  body: {
276
273
  newEndDate: string;
277
274
  extensionReason?: string | undefined;
278
275
  };
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
- page: number;
290
289
  limit: number;
290
+ page: 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
- page?: string | undefined;
297
296
  limit?: string | undefined;
297
+ page?: string | undefined;
298
298
  fromDate?: string | undefined;
299
299
  toDate?: string | undefined;
300
300
  }>, {
301
- page: number;
302
301
  limit: number;
302
+ page: 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
- page?: string | undefined;
309
308
  limit?: string | undefined;
309
+ page?: string | undefined;
310
310
  fromDate?: string | undefined;
311
311
  toDate?: string | undefined;
312
312
  }>;
313
313
  }, "strip", z.ZodTypeAny, {
314
314
  query: {
315
- page: number;
316
315
  limit: number;
316
+ page: 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
- page?: string | undefined;
325
324
  limit?: string | undefined;
325
+ page?: 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
- params: {
353
- banId?: string | undefined;
354
- suspensionId?: string | undefined;
355
- };
356
352
  body: {
357
353
  appealStatus: "approved" | "rejected";
358
354
  adminNotes?: string | undefined;
359
355
  };
360
- }, {
361
356
  params: {
362
357
  banId?: string | undefined;
363
358
  suspensionId?: string | undefined;
364
359
  };
360
+ }, {
365
361
  body: {
366
362
  appealStatus: "approved" | "rejected";
367
363
  adminNotes?: string | undefined;
368
364
  };
365
+ params: {
366
+ banId?: string | undefined;
367
+ suspensionId?: string | undefined;
368
+ };
369
369
  }>;
370
370
  export declare const exportBansSchema: z.ZodObject<{
371
371
  query: z.ZodEffects<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
- };
28
24
  body: {
29
25
  phoneNumber: string;
30
26
  provider: "mtn_momo" | "airtel_money";
31
27
  };
32
- }, {
33
28
  params: {
34
29
  planId: string;
35
30
  installmentId: string;
36
31
  };
32
+ }, {
37
33
  body: {
38
34
  phoneNumber: string;
39
35
  provider?: "mtn_momo" | "airtel_money" | undefined;
40
36
  };
37
+ params: {
38
+ planId: string;
39
+ installmentId: string;
40
+ };
41
41
  }>;
@@ -16,23 +16,23 @@ export declare const createUserSchema: z.ZodObject<{
16
16
  }, "strip", z.ZodTypeAny, {
17
17
  firstName: string;
18
18
  lastName: string;
19
- phoneNumber: string;
20
- nationalId: string;
21
19
  password: string;
22
- role: "AGENT" | "RIDER" | "PASSENGER" | "ADMIN" | "SUPER_ADMIN";
20
+ nationalId: string;
21
+ role: "ADMIN" | "PASSENGER" | "RIDER" | "AGENT" | "SUPER_ADMIN";
22
+ phoneNumber: string;
23
+ jacketId?: string | null | undefined;
23
24
  email?: string | null | undefined;
24
25
  plateNumber?: string | null | undefined;
25
- jacketId?: string | null | undefined;
26
26
  }, {
27
27
  firstName: string;
28
28
  lastName: string;
29
- phoneNumber: string;
30
- nationalId: string;
31
29
  password: string;
32
- role: "AGENT" | "RIDER" | "PASSENGER" | "ADMIN" | "SUPER_ADMIN";
30
+ nationalId: string;
31
+ role: "ADMIN" | "PASSENGER" | "RIDER" | "AGENT" | "SUPER_ADMIN";
32
+ phoneNumber: string;
33
+ jacketId?: string | null | undefined;
33
34
  email?: string | null | undefined;
34
35
  plateNumber?: string | null | undefined;
35
- jacketId?: string | null | undefined;
36
36
  }>;
37
37
  headers: z.ZodObject<{
38
38
  authorization: z.ZodString;
@@ -45,13 +45,13 @@ export declare const createUserSchema: z.ZodObject<{
45
45
  body: {
46
46
  firstName: string;
47
47
  lastName: string;
48
- phoneNumber: string;
49
- nationalId: string;
50
48
  password: string;
51
- role: "AGENT" | "RIDER" | "PASSENGER" | "ADMIN" | "SUPER_ADMIN";
49
+ nationalId: string;
50
+ role: "ADMIN" | "PASSENGER" | "RIDER" | "AGENT" | "SUPER_ADMIN";
51
+ phoneNumber: string;
52
+ jacketId?: string | null | undefined;
52
53
  email?: string | null | undefined;
53
54
  plateNumber?: string | null | undefined;
54
- jacketId?: string | null | undefined;
55
55
  };
56
56
  headers: {
57
57
  authorization: string;
@@ -60,13 +60,13 @@ export declare const createUserSchema: z.ZodObject<{
60
60
  body: {
61
61
  firstName: string;
62
62
  lastName: string;
63
- phoneNumber: string;
64
- nationalId: string;
65
63
  password: string;
66
- role: "AGENT" | "RIDER" | "PASSENGER" | "ADMIN" | "SUPER_ADMIN";
64
+ nationalId: string;
65
+ role: "ADMIN" | "PASSENGER" | "RIDER" | "AGENT" | "SUPER_ADMIN";
66
+ phoneNumber: string;
67
+ jacketId?: string | null | undefined;
67
68
  email?: string | null | undefined;
68
69
  plateNumber?: string | null | undefined;
69
- jacketId?: string | null | undefined;
70
70
  };
71
71
  headers: {
72
72
  authorization: string;
@@ -123,43 +123,43 @@ export declare const updateUserProfileSchema: z.ZodObject<{
123
123
  }, "strip", z.ZodTypeAny, {
124
124
  firstName?: string | undefined;
125
125
  lastName?: string | undefined;
126
- phoneNumber?: string | undefined;
127
126
  email?: string | null | undefined;
128
127
  password?: string | undefined;
129
128
  plateNumber?: string | null | undefined;
130
129
  isActive?: boolean | undefined;
131
- isSuspended?: boolean | undefined;
132
130
  isDeactivated?: boolean | undefined;
131
+ phoneNumber?: string | undefined;
132
+ isSuspended?: boolean | undefined;
133
133
  }, {
134
134
  firstName?: string | undefined;
135
135
  lastName?: string | undefined;
136
- phoneNumber?: string | undefined;
137
136
  email?: string | null | undefined;
138
137
  password?: string | undefined;
139
138
  plateNumber?: string | null | undefined;
140
139
  isActive?: boolean | undefined;
141
- isSuspended?: boolean | undefined;
142
140
  isDeactivated?: boolean | undefined;
141
+ phoneNumber?: string | undefined;
142
+ isSuspended?: boolean | undefined;
143
143
  }>, {
144
144
  firstName?: string | undefined;
145
145
  lastName?: string | undefined;
146
- phoneNumber?: string | undefined;
147
146
  email?: string | null | undefined;
148
147
  password?: string | undefined;
149
148
  plateNumber?: string | null | undefined;
150
149
  isActive?: boolean | undefined;
151
- isSuspended?: boolean | undefined;
152
150
  isDeactivated?: boolean | undefined;
151
+ phoneNumber?: string | undefined;
152
+ isSuspended?: boolean | undefined;
153
153
  }, {
154
154
  firstName?: string | undefined;
155
155
  lastName?: string | undefined;
156
- phoneNumber?: string | undefined;
157
156
  email?: string | null | undefined;
158
157
  password?: string | undefined;
159
158
  plateNumber?: string | null | undefined;
160
159
  isActive?: boolean | undefined;
161
- isSuspended?: boolean | undefined;
162
160
  isDeactivated?: boolean | undefined;
161
+ phoneNumber?: string | undefined;
162
+ isSuspended?: boolean | undefined;
163
163
  }>;
164
164
  headers: z.ZodObject<{
165
165
  authorization: z.ZodString;
@@ -169,37 +169,37 @@ 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
173
  firstName?: string | undefined;
177
174
  lastName?: string | undefined;
178
- phoneNumber?: string | undefined;
179
175
  email?: string | null | undefined;
180
176
  password?: string | undefined;
181
177
  plateNumber?: string | null | undefined;
182
178
  isActive?: boolean | undefined;
183
- isSuspended?: boolean | undefined;
184
179
  isDeactivated?: boolean | undefined;
180
+ phoneNumber?: string | undefined;
181
+ isSuspended?: boolean | undefined;
182
+ };
183
+ params: {
184
+ userId: string;
185
185
  };
186
186
  headers: {
187
187
  authorization: string;
188
188
  };
189
189
  }, {
190
- params: {
191
- userId: string;
192
- };
193
190
  body: {
194
191
  firstName?: string | undefined;
195
192
  lastName?: string | undefined;
196
- phoneNumber?: string | undefined;
197
193
  email?: string | null | undefined;
198
194
  password?: string | undefined;
199
195
  plateNumber?: string | null | undefined;
200
196
  isActive?: boolean | undefined;
201
- isSuspended?: boolean | undefined;
202
197
  isDeactivated?: boolean | undefined;
198
+ phoneNumber?: string | undefined;
199
+ isSuspended?: boolean | undefined;
200
+ };
201
+ params: {
202
+ userId: string;
203
203
  };
204
204
  headers: {
205
205
  authorization: string;
@@ -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: "firstName" | "lastLoginAt" | "createdAt";
223
222
  order: "asc" | "desc";
224
- role?: "AGENT" | "RIDER" | "PASSENGER" | "ADMIN" | "SUPER_ADMIN" | undefined;
223
+ sortBy: "firstName" | "lastLoginAt" | "createdAt";
224
+ search?: string | undefined;
225
+ limit?: number | undefined;
225
226
  isActive?: boolean | undefined;
227
+ role?: "ADMIN" | "PASSENGER" | "RIDER" | "AGENT" | "SUPER_ADMIN" | undefined;
228
+ isBanned?: boolean | undefined;
226
229
  isSuspended?: boolean | undefined;
227
230
  page?: number | undefined;
228
- limit?: number | undefined;
229
- isBanned?: boolean | undefined;
230
- search?: string | undefined;
231
231
  startDate?: string | undefined;
232
232
  endDate?: string | undefined;
233
233
  }, {
234
- role?: "AGENT" | "RIDER" | "PASSENGER" | "ADMIN" | "SUPER_ADMIN" | undefined;
234
+ search?: string | undefined;
235
+ order?: "asc" | "desc" | undefined;
236
+ limit?: string | undefined;
235
237
  isActive?: "true" | "false" | undefined;
238
+ role?: "ADMIN" | "PASSENGER" | "RIDER" | "AGENT" | "SUPER_ADMIN" | undefined;
239
+ isBanned?: "true" | "false" | undefined;
236
240
  isSuspended?: "true" | "false" | undefined;
237
241
  page?: string | undefined;
238
- limit?: string | undefined;
239
- isBanned?: "true" | "false" | undefined;
240
- search?: string | undefined;
241
242
  startDate?: string | undefined;
242
243
  endDate?: string | undefined;
243
244
  sortBy?: "firstName" | "lastLoginAt" | "createdAt" | undefined;
244
- order?: "asc" | "desc" | undefined;
245
245
  }>;
246
246
  headers: z.ZodObject<{
247
247
  authorization: z.ZodString;
@@ -251,38 +251,38 @@ export declare const getAllUsersSchema: z.ZodObject<{
251
251
  authorization: string;
252
252
  }>;
253
253
  }, "strip", z.ZodTypeAny, {
254
- headers: {
255
- authorization: string;
256
- };
257
254
  query: {
258
- sortBy: "firstName" | "lastLoginAt" | "createdAt";
259
255
  order: "asc" | "desc";
260
- role?: "AGENT" | "RIDER" | "PASSENGER" | "ADMIN" | "SUPER_ADMIN" | undefined;
256
+ sortBy: "firstName" | "lastLoginAt" | "createdAt";
257
+ search?: string | undefined;
258
+ limit?: number | undefined;
261
259
  isActive?: boolean | undefined;
260
+ role?: "ADMIN" | "PASSENGER" | "RIDER" | "AGENT" | "SUPER_ADMIN" | undefined;
261
+ isBanned?: boolean | undefined;
262
262
  isSuspended?: boolean | undefined;
263
263
  page?: number | undefined;
264
- limit?: number | undefined;
265
- isBanned?: boolean | undefined;
266
- search?: string | undefined;
267
264
  startDate?: string | undefined;
268
265
  endDate?: string | undefined;
269
266
  };
270
- }, {
271
267
  headers: {
272
268
  authorization: string;
273
269
  };
270
+ }, {
274
271
  query: {
275
- role?: "AGENT" | "RIDER" | "PASSENGER" | "ADMIN" | "SUPER_ADMIN" | undefined;
272
+ search?: string | undefined;
273
+ order?: "asc" | "desc" | undefined;
274
+ limit?: string | undefined;
276
275
  isActive?: "true" | "false" | undefined;
276
+ role?: "ADMIN" | "PASSENGER" | "RIDER" | "AGENT" | "SUPER_ADMIN" | undefined;
277
+ isBanned?: "true" | "false" | undefined;
277
278
  isSuspended?: "true" | "false" | undefined;
278
279
  page?: string | undefined;
279
- limit?: string | undefined;
280
- isBanned?: "true" | "false" | undefined;
281
- search?: string | undefined;
282
280
  startDate?: string | undefined;
283
281
  endDate?: string | undefined;
284
282
  sortBy?: "firstName" | "lastLoginAt" | "createdAt" | undefined;
285
- order?: "asc" | "desc" | undefined;
283
+ };
284
+ headers: {
285
+ authorization: string;
286
286
  };
287
287
  }>;
288
288
  export declare const viewProfileSchema: z.ZodObject<{
@@ -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<{
@@ -324,45 +324,45 @@ export declare const passengerSignupSchema: z.ZodObject<{
324
324
  }, "strip", z.ZodTypeAny, {
325
325
  firstName: string;
326
326
  lastName: string;
327
- phoneNumber: string;
328
327
  nationalId: string;
328
+ phoneNumber: string;
329
+ jacketId?: string | undefined;
329
330
  email?: string | null | undefined;
330
331
  password?: string | null | undefined;
331
332
  plateNumber?: string | null | undefined;
332
- jacketId?: string | undefined;
333
333
  }, {
334
334
  firstName: string;
335
335
  lastName: string;
336
- phoneNumber: string;
337
336
  nationalId: string;
337
+ phoneNumber: string;
338
+ jacketId?: string | undefined;
338
339
  email?: string | null | undefined;
339
340
  password?: string | null | undefined;
340
341
  plateNumber?: string | null | undefined;
341
- jacketId?: string | undefined;
342
342
  }>;
343
343
  headers: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
344
344
  }, "strip", z.ZodTypeAny, {
345
345
  body: {
346
346
  firstName: string;
347
347
  lastName: string;
348
- phoneNumber: string;
349
348
  nationalId: string;
349
+ phoneNumber: string;
350
+ jacketId?: string | undefined;
350
351
  email?: string | null | undefined;
351
352
  password?: string | null | undefined;
352
353
  plateNumber?: string | null | undefined;
353
- jacketId?: string | undefined;
354
354
  };
355
355
  headers?: {} | undefined;
356
356
  }, {
357
357
  body: {
358
358
  firstName: string;
359
359
  lastName: string;
360
- phoneNumber: string;
361
360
  nationalId: string;
361
+ phoneNumber: string;
362
+ jacketId?: string | undefined;
362
363
  email?: string | null | undefined;
363
364
  password?: string | null | undefined;
364
365
  plateNumber?: string | null | undefined;
365
- jacketId?: string | undefined;
366
366
  };
367
367
  headers?: {} | undefined;
368
368
  }>;
@@ -421,17 +421,17 @@ export declare const createRiderSchema: z.ZodObject<{
421
421
  }, "strip", z.ZodTypeAny, {
422
422
  firstName: string;
423
423
  lastName: string;
424
- phoneNumber: string;
425
- nationalId: string;
426
- plateNumber: string;
427
424
  jacketId: string;
425
+ plateNumber: string;
426
+ nationalId: string;
427
+ phoneNumber: string;
428
428
  }, {
429
429
  firstName: string;
430
430
  lastName: string;
431
- phoneNumber: string;
432
- nationalId: string;
433
- plateNumber: string;
434
431
  jacketId: string;
432
+ plateNumber: string;
433
+ nationalId: string;
434
+ phoneNumber: string;
435
435
  }>;
436
436
  params: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
437
437
  query: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
@@ -439,24 +439,24 @@ export declare const createRiderSchema: z.ZodObject<{
439
439
  body: {
440
440
  firstName: string;
441
441
  lastName: string;
442
- phoneNumber: string;
443
- nationalId: string;
444
- plateNumber: string;
445
442
  jacketId: string;
443
+ plateNumber: string;
444
+ nationalId: string;
445
+ phoneNumber: string;
446
446
  };
447
- params?: {} | undefined;
448
447
  query?: {} | undefined;
448
+ params?: {} | undefined;
449
449
  }, {
450
450
  body: {
451
451
  firstName: string;
452
452
  lastName: string;
453
- phoneNumber: string;
454
- nationalId: string;
455
- plateNumber: string;
456
453
  jacketId: string;
454
+ plateNumber: string;
455
+ nationalId: string;
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<{
@@ -476,31 +476,31 @@ export declare const updateRiderProfileSchema: z.ZodObject<{
476
476
  }, "strip", z.ZodTypeAny, {
477
477
  firstName: string;
478
478
  lastName: string;
479
- phoneNumber: string;
480
- nationalId: string;
481
- plateNumber: string;
482
479
  jacketId: string;
480
+ plateNumber: string;
481
+ nationalId: string;
482
+ phoneNumber: string;
483
483
  }, {
484
484
  firstName: string;
485
485
  lastName: string;
486
- phoneNumber: string;
487
- nationalId: string;
488
- plateNumber: string;
489
486
  jacketId: string;
487
+ plateNumber: string;
488
+ nationalId: string;
489
+ phoneNumber: string;
490
490
  }>, {
491
491
  firstName: string;
492
492
  lastName: string;
493
- phoneNumber: string;
494
- nationalId: string;
495
- plateNumber: string;
496
493
  jacketId: string;
494
+ plateNumber: string;
495
+ nationalId: string;
496
+ phoneNumber: string;
497
497
  }, {
498
498
  firstName: string;
499
499
  lastName: string;
500
- phoneNumber: string;
501
- nationalId: string;
502
- plateNumber: string;
503
500
  jacketId: string;
501
+ plateNumber: string;
502
+ nationalId: string;
503
+ phoneNumber: string;
504
504
  }>;
505
505
  query: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
506
506
  headers: z.ZodObject<{
@@ -511,32 +511,32 @@ 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;
520
- phoneNumber: string;
521
- nationalId: string;
522
- plateNumber: string;
523
517
  jacketId: string;
518
+ plateNumber: string;
519
+ nationalId: string;
520
+ phoneNumber: string;
521
+ };
522
+ params: {
523
+ id: string;
524
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;
536
- phoneNumber: string;
537
- nationalId: string;
538
- plateNumber: string;
539
533
  jacketId: string;
534
+ plateNumber: string;
535
+ nationalId: string;
536
+ phoneNumber: string;
537
+ };
538
+ params: {
539
+ id: string;
540
540
  };
541
541
  headers: {
542
542
  authorization: string;
@@ -629,31 +629,31 @@ export declare const updateProfileSchema: z.ZodObject<{
629
629
  }, "strict", z.ZodTypeAny, {
630
630
  firstName?: string | undefined;
631
631
  lastName?: string | undefined;
632
- phoneNumber?: string | undefined;
633
- nationalId?: string | undefined;
634
632
  email?: string | undefined;
633
+ nationalId?: string | undefined;
634
+ phoneNumber?: string | undefined;
635
635
  }, {
636
636
  firstName?: string | undefined;
637
637
  lastName?: string | undefined;
638
- phoneNumber?: string | undefined;
639
- nationalId?: string | undefined;
640
638
  email?: string | undefined;
639
+ nationalId?: string | undefined;
640
+ phoneNumber?: string | undefined;
641
641
  }>;
642
642
  }, "strip", z.ZodTypeAny, {
643
643
  body: {
644
644
  firstName?: string | undefined;
645
645
  lastName?: string | undefined;
646
- phoneNumber?: string | undefined;
647
- nationalId?: string | undefined;
648
646
  email?: string | undefined;
647
+ nationalId?: string | undefined;
648
+ phoneNumber?: string | undefined;
649
649
  };
650
650
  }, {
651
651
  body: {
652
652
  firstName?: string | undefined;
653
653
  lastName?: string | undefined;
654
- phoneNumber?: string | undefined;
655
- nationalId?: string | undefined;
656
654
  email?: string | undefined;
655
+ nationalId?: string | undefined;
656
+ phoneNumber?: string | undefined;
657
657
  };
658
658
  }>;
659
659
  export type CreateUserInput = z.infer<typeof createUserSchema>;
@@ -34,23 +34,23 @@ export declare const upgradeToRiderSchema: z.ZodObject<{
34
34
  plateNumber?: string | undefined;
35
35
  }>;
36
36
  }, "strip", z.ZodTypeAny, {
37
- params: {
38
- userId: string;
39
- };
40
37
  body: {
41
38
  jacketId: string;
42
39
  nationalId: string;
43
40
  phoneNumber: string;
44
41
  plateNumber?: string | undefined;
45
42
  };
46
- }, {
47
43
  params: {
48
44
  userId: string;
49
45
  };
46
+ }, {
50
47
  body: {
51
48
  jacketId: string;
52
49
  nationalId: string;
53
50
  phoneNumber: string;
54
51
  plateNumber?: string | undefined;
55
52
  };
53
+ params: {
54
+ userId: string;
55
+ };
56
56
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vr-commons",
3
- "version": "1.0.78",
3
+ "version": "1.0.79",
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.45",
103
+ "vr-models": "^1.0.47",
104
104
  "zod": "^3.25.20"
105
105
  },
106
106
  "dependencies": {