vr-commons 1.0.87 → 1.0.88

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.
@@ -11,4 +11,4 @@ export { unlockDeviceSchema, extendSessionSchema } from "./devices.validations";
11
11
  export { payInstallmentSchema } from "./payinstallment.validations";
12
12
  export { updateProfileSchema, requestPhoneChangeSchema, verifyPhoneChangeSchema, deleteAccountSchema, strongPasswordRegex, changePasswordSchema, } from "./account.validations";
13
13
  export { upgradeToRiderSchema } from "./user.management.validations";
14
- export { updateUserSchema, getUserSchema, deactivateUserSchema, deleteUserSchema, } from "./users.operation.validations";
14
+ export { updateUserSchema, getUserSchema, deleteUserSchema, getUsersSchema, } from "./users.operation.validations";
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.deleteAccountSchema = exports.verifyPhoneChangeSchema = exports.requestPhoneChangeSchema = exports.updateProfileSchema = exports.payInstallmentSchema = exports.extendSessionSchema = exports.unlockDeviceSchema = exports.getUserPaymentPlanSchema = exports.listUserPaymentPlansSchema = exports.getAppSpecsSchema = exports.activateAppSpecsSchema = exports.getActiveAppSpecsSchema = exports.listAppSpecsSchema = exports.updateAppSpecsSchema = exports.createAppSpecsSchema = exports.createSuspensionSchema = exports.getUserSuspensionsSchema = exports.getSuspensionSchema = exports.createBanSchema = exports.getUserRestrictionsSchema = exports.getBanSchema = exports.submitSuspensionAppealSchema = exports.submitBanAppealSchema = exports.exportBansSchema = exports.extendSuspensionSchema = exports.revokeSuspensionSchema = exports.revokeBanSchema = exports.reviewAppealSchema = exports.listSuspensionsSchema = exports.listPendingAppealsSchema = exports.listBansSchema = exports.deactivateAccountSchema = exports.createRiderSchema = exports.updateRiderProfileSchema = exports.updatePassengerProfileSchema = exports.passengerSignupSchema = exports.viewProfileSchema = exports.getAllUsersSchema = exports.updateUserProfileSchema = exports.getUserByIdSchema = exports.createUserSchema = exports.requestOtpSchema = exports.resendOtpSchema = exports.verifyOtpSchema = exports.registerSchema = exports.refreshTokenSchema = exports.userLoginSchema = exports.forgotPasswordSchema = exports.riderLoginSchema = exports.validate = void 0;
4
- exports.deleteUserSchema = exports.deactivateUserSchema = exports.getUserSchema = exports.updateUserSchema = exports.upgradeToRiderSchema = exports.changePasswordSchema = exports.strongPasswordRegex = void 0;
4
+ exports.getUsersSchema = exports.deleteUserSchema = exports.getUserSchema = exports.updateUserSchema = exports.upgradeToRiderSchema = exports.changePasswordSchema = exports.strongPasswordRegex = void 0;
5
5
  var validate_validations_1 = require("./validate.validations");
6
6
  Object.defineProperty(exports, "validate", { enumerable: true, get: function () { return validate_validations_1.validate; } });
7
7
  var auth_validations_1 = require("./auth.validations");
@@ -76,5 +76,5 @@ Object.defineProperty(exports, "upgradeToRiderSchema", { enumerable: true, get:
76
76
  var users_operation_validations_1 = require("./users.operation.validations");
77
77
  Object.defineProperty(exports, "updateUserSchema", { enumerable: true, get: function () { return users_operation_validations_1.updateUserSchema; } });
78
78
  Object.defineProperty(exports, "getUserSchema", { enumerable: true, get: function () { return users_operation_validations_1.getUserSchema; } });
79
- Object.defineProperty(exports, "deactivateUserSchema", { enumerable: true, get: function () { return users_operation_validations_1.deactivateUserSchema; } });
80
79
  Object.defineProperty(exports, "deleteUserSchema", { enumerable: true, get: function () { return users_operation_validations_1.deleteUserSchema; } });
80
+ Object.defineProperty(exports, "getUsersSchema", { enumerable: true, get: function () { return users_operation_validations_1.getUsersSchema; } });
@@ -18,19 +18,19 @@ export declare const updateUserSchema: z.ZodObject<{
18
18
  }, "strip", z.ZodTypeAny, {
19
19
  firstName?: string | undefined;
20
20
  lastName?: string | undefined;
21
+ phoneNumber?: string | undefined;
21
22
  jacketId?: string | null | undefined;
22
23
  email?: string | null | undefined;
23
24
  plateNumber?: string | null | undefined;
24
25
  nationalId?: string | undefined;
25
- phoneNumber?: string | undefined;
26
26
  }, {
27
27
  firstName?: string | undefined;
28
28
  lastName?: string | undefined;
29
+ phoneNumber?: string | undefined;
29
30
  jacketId?: string | null | undefined;
30
31
  email?: string | null | undefined;
31
32
  plateNumber?: string | null | undefined;
32
33
  nationalId?: string | undefined;
33
- phoneNumber?: string | undefined;
34
34
  }>;
35
35
  }, "strip", z.ZodTypeAny, {
36
36
  params: {
@@ -39,11 +39,11 @@ export declare const updateUserSchema: z.ZodObject<{
39
39
  body: {
40
40
  firstName?: string | undefined;
41
41
  lastName?: string | undefined;
42
+ phoneNumber?: string | undefined;
42
43
  jacketId?: string | null | undefined;
43
44
  email?: string | null | undefined;
44
45
  plateNumber?: string | null | undefined;
45
46
  nationalId?: string | undefined;
46
- phoneNumber?: string | undefined;
47
47
  };
48
48
  }, {
49
49
  params: {
@@ -52,11 +52,11 @@ export declare const updateUserSchema: z.ZodObject<{
52
52
  body: {
53
53
  firstName?: string | undefined;
54
54
  lastName?: string | undefined;
55
+ phoneNumber?: string | undefined;
55
56
  jacketId?: string | null | undefined;
56
57
  email?: string | null | undefined;
57
58
  plateNumber?: string | null | undefined;
58
59
  nationalId?: string | undefined;
59
- phoneNumber?: string | undefined;
60
60
  };
61
61
  }>;
62
62
  export declare const getUserSchema: z.ZodObject<{
@@ -88,49 +88,49 @@ export declare const getUsersSchema: z.ZodObject<{
88
88
  sortBy: z.ZodOptional<z.ZodEnum<["createdAt", "firstName", "lastName", "phoneNumber"]>>;
89
89
  sortOrder: z.ZodOptional<z.ZodEnum<["ASC", "DESC"]>>;
90
90
  }, "strip", z.ZodTypeAny, {
91
- search?: string | undefined;
91
+ page?: number | undefined;
92
92
  limit?: number | undefined;
93
- securityClearanceId?: string | undefined;
93
+ search?: string | undefined;
94
94
  isActive?: "true" | "false" | undefined;
95
- isDeactivated?: "true" | "false" | undefined;
96
95
  isSuspended?: "true" | "false" | undefined;
97
- page?: number | undefined;
98
- sortBy?: "createdAt" | "firstName" | "lastName" | "phoneNumber" | undefined;
99
- sortOrder?: "DESC" | "ASC" | undefined;
96
+ isDeactivated?: "true" | "false" | undefined;
97
+ securityClearanceId?: string | undefined;
98
+ sortBy?: "firstName" | "lastName" | "phoneNumber" | "createdAt" | undefined;
99
+ sortOrder?: "ASC" | "DESC" | undefined;
100
100
  }, {
101
- search?: string | undefined;
101
+ page?: string | undefined;
102
102
  limit?: string | undefined;
103
- securityClearanceId?: string | undefined;
103
+ search?: string | undefined;
104
104
  isActive?: "true" | "false" | undefined;
105
- isDeactivated?: "true" | "false" | undefined;
106
105
  isSuspended?: "true" | "false" | undefined;
107
- page?: string | undefined;
108
- sortBy?: "createdAt" | "firstName" | "lastName" | "phoneNumber" | undefined;
109
- sortOrder?: "DESC" | "ASC" | undefined;
106
+ isDeactivated?: "true" | "false" | undefined;
107
+ securityClearanceId?: string | undefined;
108
+ sortBy?: "firstName" | "lastName" | "phoneNumber" | "createdAt" | undefined;
109
+ sortOrder?: "ASC" | "DESC" | undefined;
110
110
  }>;
111
111
  }, "strip", z.ZodTypeAny, {
112
112
  query: {
113
- search?: string | undefined;
113
+ page?: number | undefined;
114
114
  limit?: number | undefined;
115
- securityClearanceId?: string | undefined;
115
+ search?: string | undefined;
116
116
  isActive?: "true" | "false" | undefined;
117
- isDeactivated?: "true" | "false" | undefined;
118
117
  isSuspended?: "true" | "false" | undefined;
119
- page?: number | undefined;
120
- sortBy?: "createdAt" | "firstName" | "lastName" | "phoneNumber" | undefined;
121
- sortOrder?: "DESC" | "ASC" | undefined;
118
+ isDeactivated?: "true" | "false" | undefined;
119
+ securityClearanceId?: string | undefined;
120
+ sortBy?: "firstName" | "lastName" | "phoneNumber" | "createdAt" | undefined;
121
+ sortOrder?: "ASC" | "DESC" | undefined;
122
122
  };
123
123
  }, {
124
124
  query: {
125
- search?: string | undefined;
125
+ page?: string | undefined;
126
126
  limit?: string | undefined;
127
- securityClearanceId?: string | undefined;
127
+ search?: string | undefined;
128
128
  isActive?: "true" | "false" | undefined;
129
- isDeactivated?: "true" | "false" | undefined;
130
129
  isSuspended?: "true" | "false" | undefined;
131
- page?: string | undefined;
132
- sortBy?: "createdAt" | "firstName" | "lastName" | "phoneNumber" | undefined;
133
- sortOrder?: "DESC" | "ASC" | undefined;
130
+ isDeactivated?: "true" | "false" | undefined;
131
+ securityClearanceId?: string | undefined;
132
+ sortBy?: "firstName" | "lastName" | "phoneNumber" | "createdAt" | undefined;
133
+ sortOrder?: "ASC" | "DESC" | undefined;
134
134
  };
135
135
  }>;
136
136
  export declare const deleteUserSchema: z.ZodObject<{
@@ -150,131 +150,3 @@ export declare const deleteUserSchema: z.ZodObject<{
150
150
  id: string;
151
151
  };
152
152
  }>;
153
- export declare const suspendUserSchema: z.ZodObject<{
154
- params: z.ZodObject<{
155
- id: z.ZodString;
156
- }, "strip", z.ZodTypeAny, {
157
- id: string;
158
- }, {
159
- id: string;
160
- }>;
161
- body: z.ZodObject<{
162
- reason: z.ZodString;
163
- }, "strip", z.ZodTypeAny, {
164
- reason: string;
165
- }, {
166
- reason: string;
167
- }>;
168
- }, "strip", z.ZodTypeAny, {
169
- params: {
170
- id: string;
171
- };
172
- body: {
173
- reason: string;
174
- };
175
- }, {
176
- params: {
177
- id: string;
178
- };
179
- body: {
180
- reason: string;
181
- };
182
- }>;
183
- export declare const unsuspendUserSchema: z.ZodObject<{
184
- params: z.ZodObject<{
185
- id: z.ZodString;
186
- }, "strip", z.ZodTypeAny, {
187
- id: string;
188
- }, {
189
- id: string;
190
- }>;
191
- }, "strip", z.ZodTypeAny, {
192
- params: {
193
- id: string;
194
- };
195
- }, {
196
- params: {
197
- id: string;
198
- };
199
- }>;
200
- export declare const banUserSchema: z.ZodObject<{
201
- params: z.ZodObject<{
202
- id: z.ZodString;
203
- }, "strip", z.ZodTypeAny, {
204
- id: string;
205
- }, {
206
- id: string;
207
- }>;
208
- body: z.ZodObject<{
209
- reason: z.ZodString;
210
- }, "strip", z.ZodTypeAny, {
211
- reason: string;
212
- }, {
213
- reason: string;
214
- }>;
215
- }, "strip", z.ZodTypeAny, {
216
- params: {
217
- id: string;
218
- };
219
- body: {
220
- reason: string;
221
- };
222
- }, {
223
- params: {
224
- id: string;
225
- };
226
- body: {
227
- reason: string;
228
- };
229
- }>;
230
- export declare const unbanUserSchema: z.ZodObject<{
231
- params: z.ZodObject<{
232
- id: z.ZodString;
233
- }, "strip", z.ZodTypeAny, {
234
- id: string;
235
- }, {
236
- id: string;
237
- }>;
238
- }, "strip", z.ZodTypeAny, {
239
- params: {
240
- id: string;
241
- };
242
- }, {
243
- params: {
244
- id: string;
245
- };
246
- }>;
247
- export declare const deactivateUserSchema: z.ZodObject<{
248
- params: z.ZodObject<{
249
- id: z.ZodString;
250
- }, "strip", z.ZodTypeAny, {
251
- id: string;
252
- }, {
253
- id: string;
254
- }>;
255
- }, "strip", z.ZodTypeAny, {
256
- params: {
257
- id: string;
258
- };
259
- }, {
260
- params: {
261
- id: string;
262
- };
263
- }>;
264
- export declare const activateUserSchema: z.ZodObject<{
265
- params: z.ZodObject<{
266
- id: z.ZodString;
267
- }, "strip", z.ZodTypeAny, {
268
- id: string;
269
- }, {
270
- id: string;
271
- }>;
272
- }, "strip", z.ZodTypeAny, {
273
- params: {
274
- id: string;
275
- };
276
- }, {
277
- params: {
278
- id: string;
279
- };
280
- }>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.activateUserSchema = exports.deactivateUserSchema = exports.unbanUserSchema = exports.banUserSchema = exports.unsuspendUserSchema = exports.suspendUserSchema = exports.deleteUserSchema = exports.getUsersSchema = exports.getUserSchema = exports.updateUserSchema = void 0;
3
+ exports.deleteUserSchema = exports.getUsersSchema = exports.getUserSchema = exports.updateUserSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const auth_validations_1 = require("./auth.validations");
6
6
  // Base user schema
@@ -70,40 +70,3 @@ exports.deleteUserSchema = zod_1.z.object({
70
70
  id: zod_1.z.string().uuid("Invalid user ID"),
71
71
  }),
72
72
  });
73
- // Toggle user status schemas
74
- exports.suspendUserSchema = zod_1.z.object({
75
- params: zod_1.z.object({
76
- id: zod_1.z.string().uuid("Invalid user ID"),
77
- }),
78
- body: zod_1.z.object({
79
- reason: zod_1.z.string().min(1, "Suspension reason is required"),
80
- }),
81
- });
82
- exports.unsuspendUserSchema = zod_1.z.object({
83
- params: zod_1.z.object({
84
- id: zod_1.z.string().uuid("Invalid user ID"),
85
- }),
86
- });
87
- exports.banUserSchema = zod_1.z.object({
88
- params: zod_1.z.object({
89
- id: zod_1.z.string().uuid("Invalid user ID"),
90
- }),
91
- body: zod_1.z.object({
92
- reason: zod_1.z.string().min(1, "Ban reason is required"),
93
- }),
94
- });
95
- exports.unbanUserSchema = zod_1.z.object({
96
- params: zod_1.z.object({
97
- id: zod_1.z.string().uuid("Invalid user ID"),
98
- }),
99
- });
100
- exports.deactivateUserSchema = zod_1.z.object({
101
- params: zod_1.z.object({
102
- id: zod_1.z.string().uuid("Invalid user ID"),
103
- }),
104
- });
105
- exports.activateUserSchema = zod_1.z.object({
106
- params: zod_1.z.object({
107
- id: zod_1.z.string().uuid("Invalid user ID"),
108
- }),
109
- });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vr-commons",
3
- "version": "1.0.87",
3
+ "version": "1.0.88",
4
4
  "description": "Shared functions package",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",