vr-commons 1.0.178 → 1.0.182
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/validations/admin/admin.bans.validations.d.ts +8 -8
- package/dist/validations/admin/admin.devicePayments.validations.d.ts +89 -54
- package/dist/validations/admin/admin.devicePayments.validations.js +13 -1
- package/dist/validations/admin/admin.devices.validations.d.ts +33 -26
- package/dist/validations/admin/admin.devices.validations.js +1 -0
- package/dist/validations/admin/admin.eventLogs.validations.d.ts +14 -14
- package/dist/validations/admin/admin.installments.validations.d.ts +16 -16
- package/dist/validations/admin/admin.pricings.validations.d.ts +50 -50
- package/dist/validations/admin/admin.products.validations.d.ts +32 -32
- package/dist/validations/admin/admin.suspensions.validations.d.ts +8 -8
- package/dist/validations/admin/admin.users.validations.d.ts +44 -44
- package/dist/validations/index.d.ts +1 -1
- package/dist/validations/index.js +2 -1
- package/dist/validations/shared/shared.account.validations.js +1 -1
- package/dist/validations/shared/shared.appSpecs.validations.d.ts +14 -14
- package/dist/validations/shared/shared.auth.validations.js +2 -2
- package/dist/validations/shared/shared.moderation.validations.d.ts +111 -111
- package/dist/validations/shared/shared.profiles.validations.d.ts +36 -36
- package/dist/validations/users/users.devicePaymentPlans.validations.d.ts +16 -16
- package/package.json +2 -2
|
@@ -32,19 +32,19 @@ export declare const getUserRestrictionsSchema: z.ZodObject<{
|
|
|
32
32
|
includeResolved?: "true" | "false" | undefined;
|
|
33
33
|
}>;
|
|
34
34
|
}, "strip", z.ZodTypeAny, {
|
|
35
|
-
params: {
|
|
36
|
-
userId: string;
|
|
37
|
-
};
|
|
38
35
|
query: {
|
|
39
36
|
includeResolved?: "true" | "false" | undefined;
|
|
40
37
|
};
|
|
41
|
-
}, {
|
|
42
38
|
params: {
|
|
43
39
|
userId: string;
|
|
44
40
|
};
|
|
41
|
+
}, {
|
|
45
42
|
query: {
|
|
46
43
|
includeResolved?: "true" | "false" | undefined;
|
|
47
44
|
};
|
|
45
|
+
params: {
|
|
46
|
+
userId: string;
|
|
47
|
+
};
|
|
48
48
|
}>;
|
|
49
49
|
export declare const createBanSchema: z.ZodObject<{
|
|
50
50
|
params: z.ZodObject<{
|
|
@@ -65,19 +65,19 @@ export declare const createBanSchema: z.ZodObject<{
|
|
|
65
65
|
isPermanent?: boolean | undefined;
|
|
66
66
|
}>;
|
|
67
67
|
}, "strip", z.ZodTypeAny, {
|
|
68
|
-
params: {
|
|
69
|
-
userId: string;
|
|
70
|
-
};
|
|
71
68
|
body: {
|
|
72
69
|
reason: string;
|
|
73
70
|
isPermanent: boolean;
|
|
74
71
|
};
|
|
75
|
-
}, {
|
|
76
72
|
params: {
|
|
77
73
|
userId: string;
|
|
78
74
|
};
|
|
75
|
+
}, {
|
|
79
76
|
body: {
|
|
80
77
|
reason: string;
|
|
81
78
|
isPermanent?: boolean | undefined;
|
|
82
79
|
};
|
|
80
|
+
params: {
|
|
81
|
+
userId: string;
|
|
82
|
+
};
|
|
83
83
|
}>;
|
|
@@ -6,24 +6,24 @@ export declare const createPlanSchema: z.ZodObject<{
|
|
|
6
6
|
productId: z.ZodString;
|
|
7
7
|
}, "strip", z.ZodTypeAny, {
|
|
8
8
|
userId: string;
|
|
9
|
-
pricingId: string;
|
|
10
9
|
productId: string;
|
|
10
|
+
pricingId: string;
|
|
11
11
|
}, {
|
|
12
12
|
userId: string;
|
|
13
|
-
pricingId: string;
|
|
14
13
|
productId: string;
|
|
14
|
+
pricingId: string;
|
|
15
15
|
}>;
|
|
16
16
|
}, "strip", z.ZodTypeAny, {
|
|
17
17
|
body: {
|
|
18
18
|
userId: string;
|
|
19
|
-
pricingId: string;
|
|
20
19
|
productId: string;
|
|
20
|
+
pricingId: string;
|
|
21
21
|
};
|
|
22
22
|
}, {
|
|
23
23
|
body: {
|
|
24
24
|
userId: string;
|
|
25
|
-
pricingId: string;
|
|
26
25
|
productId: string;
|
|
26
|
+
pricingId: string;
|
|
27
27
|
};
|
|
28
28
|
}>;
|
|
29
29
|
export declare const listPlansSchema: z.ZodObject<{
|
|
@@ -38,49 +38,49 @@ export declare const listPlansSchema: z.ZodObject<{
|
|
|
38
38
|
sortBy: z.ZodOptional<z.ZodEnum<["createdAt", "updatedAt", "nextInstallmentDueAt", "paidAmount", "outstandingAmount"]>>;
|
|
39
39
|
sortOrder: z.ZodOptional<z.ZodEnum<["ASC", "DESC"]>>;
|
|
40
40
|
}, "strip", z.ZodTypeAny, {
|
|
41
|
-
page: number;
|
|
42
41
|
limit: number;
|
|
43
|
-
|
|
42
|
+
page: number;
|
|
43
|
+
search?: string | undefined;
|
|
44
44
|
userId?: string | undefined;
|
|
45
|
-
|
|
45
|
+
status?: "ACTIVE" | "DEFAULTED" | "PENDING" | "COMPLETED" | "CANCELLED" | undefined;
|
|
46
46
|
isOverdue?: "true" | "false" | undefined;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
|
|
48
|
+
sortOrder?: "DESC" | "ASC" | undefined;
|
|
49
|
+
deviceId?: string | undefined;
|
|
50
50
|
}, {
|
|
51
|
-
|
|
52
|
-
page?: string | undefined;
|
|
51
|
+
search?: string | undefined;
|
|
53
52
|
limit?: string | undefined;
|
|
54
53
|
userId?: string | undefined;
|
|
55
|
-
|
|
54
|
+
status?: "ACTIVE" | "DEFAULTED" | "PENDING" | "COMPLETED" | "CANCELLED" | undefined;
|
|
56
55
|
isOverdue?: "true" | "false" | undefined;
|
|
57
|
-
|
|
58
|
-
sortBy?: "createdAt" | "updatedAt" | "
|
|
59
|
-
sortOrder?: "
|
|
56
|
+
page?: string | undefined;
|
|
57
|
+
sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
|
|
58
|
+
sortOrder?: "DESC" | "ASC" | undefined;
|
|
59
|
+
deviceId?: string | undefined;
|
|
60
60
|
}>;
|
|
61
61
|
}, "strip", z.ZodTypeAny, {
|
|
62
62
|
query: {
|
|
63
|
-
page: number;
|
|
64
63
|
limit: number;
|
|
65
|
-
|
|
64
|
+
page: number;
|
|
65
|
+
search?: string | undefined;
|
|
66
66
|
userId?: string | undefined;
|
|
67
|
-
|
|
67
|
+
status?: "ACTIVE" | "DEFAULTED" | "PENDING" | "COMPLETED" | "CANCELLED" | undefined;
|
|
68
68
|
isOverdue?: "true" | "false" | undefined;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
|
|
70
|
+
sortOrder?: "DESC" | "ASC" | undefined;
|
|
71
|
+
deviceId?: string | undefined;
|
|
72
72
|
};
|
|
73
73
|
}, {
|
|
74
74
|
query: {
|
|
75
|
-
|
|
76
|
-
page?: string | undefined;
|
|
75
|
+
search?: string | undefined;
|
|
77
76
|
limit?: string | undefined;
|
|
78
77
|
userId?: string | undefined;
|
|
79
|
-
|
|
78
|
+
status?: "ACTIVE" | "DEFAULTED" | "PENDING" | "COMPLETED" | "CANCELLED" | undefined;
|
|
80
79
|
isOverdue?: "true" | "false" | undefined;
|
|
81
|
-
|
|
82
|
-
sortBy?: "createdAt" | "updatedAt" | "
|
|
83
|
-
sortOrder?: "
|
|
80
|
+
page?: string | undefined;
|
|
81
|
+
sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
|
|
82
|
+
sortOrder?: "DESC" | "ASC" | undefined;
|
|
83
|
+
deviceId?: string | undefined;
|
|
84
84
|
};
|
|
85
85
|
}>;
|
|
86
86
|
export declare const getPlanSchema: z.ZodObject<{
|
|
@@ -112,10 +112,10 @@ export declare const getUserPlansSchema: z.ZodObject<{
|
|
|
112
112
|
status: z.ZodOptional<z.ZodEnum<["PENDING", "ACTIVE", "COMPLETED", "DEFAULTED", "CANCELLED"]>>;
|
|
113
113
|
includeCompleted: z.ZodOptional<z.ZodEnum<["true", "false"]>>;
|
|
114
114
|
}, "strip", z.ZodTypeAny, {
|
|
115
|
-
status?: "
|
|
115
|
+
status?: "ACTIVE" | "DEFAULTED" | "PENDING" | "COMPLETED" | "CANCELLED" | undefined;
|
|
116
116
|
includeCompleted?: "true" | "false" | undefined;
|
|
117
117
|
}, {
|
|
118
|
-
status?: "
|
|
118
|
+
status?: "ACTIVE" | "DEFAULTED" | "PENDING" | "COMPLETED" | "CANCELLED" | undefined;
|
|
119
119
|
includeCompleted?: "true" | "false" | undefined;
|
|
120
120
|
}>>;
|
|
121
121
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -123,7 +123,7 @@ export declare const getUserPlansSchema: z.ZodObject<{
|
|
|
123
123
|
userId: string;
|
|
124
124
|
};
|
|
125
125
|
query?: {
|
|
126
|
-
status?: "
|
|
126
|
+
status?: "ACTIVE" | "DEFAULTED" | "PENDING" | "COMPLETED" | "CANCELLED" | undefined;
|
|
127
127
|
includeCompleted?: "true" | "false" | undefined;
|
|
128
128
|
} | undefined;
|
|
129
129
|
}, {
|
|
@@ -131,7 +131,7 @@ export declare const getUserPlansSchema: z.ZodObject<{
|
|
|
131
131
|
userId: string;
|
|
132
132
|
};
|
|
133
133
|
query?: {
|
|
134
|
-
status?: "
|
|
134
|
+
status?: "ACTIVE" | "DEFAULTED" | "PENDING" | "COMPLETED" | "CANCELLED" | undefined;
|
|
135
135
|
includeCompleted?: "true" | "false" | undefined;
|
|
136
136
|
} | undefined;
|
|
137
137
|
}>;
|
|
@@ -152,6 +152,41 @@ export declare const getDevicePlanSchema: z.ZodObject<{
|
|
|
152
152
|
deviceId: string;
|
|
153
153
|
};
|
|
154
154
|
}>;
|
|
155
|
+
export declare const replacePlanDevicesSchema: z.ZodObject<{
|
|
156
|
+
params: z.ZodObject<{
|
|
157
|
+
id: z.ZodString;
|
|
158
|
+
}, "strip", z.ZodTypeAny, {
|
|
159
|
+
id: string;
|
|
160
|
+
}, {
|
|
161
|
+
id: string;
|
|
162
|
+
}>;
|
|
163
|
+
body: z.ZodObject<{
|
|
164
|
+
replacementPrefix: z.ZodEnum<["VBRD", "VIBERIDE"]>;
|
|
165
|
+
replacementPairID: z.ZodString;
|
|
166
|
+
}, "strip", z.ZodTypeAny, {
|
|
167
|
+
replacementPrefix: "VBRD" | "VIBERIDE";
|
|
168
|
+
replacementPairID: string;
|
|
169
|
+
}, {
|
|
170
|
+
replacementPrefix: "VBRD" | "VIBERIDE";
|
|
171
|
+
replacementPairID: string;
|
|
172
|
+
}>;
|
|
173
|
+
}, "strip", z.ZodTypeAny, {
|
|
174
|
+
body: {
|
|
175
|
+
replacementPrefix: "VBRD" | "VIBERIDE";
|
|
176
|
+
replacementPairID: string;
|
|
177
|
+
};
|
|
178
|
+
params: {
|
|
179
|
+
id: string;
|
|
180
|
+
};
|
|
181
|
+
}, {
|
|
182
|
+
body: {
|
|
183
|
+
replacementPrefix: "VBRD" | "VIBERIDE";
|
|
184
|
+
replacementPairID: string;
|
|
185
|
+
};
|
|
186
|
+
params: {
|
|
187
|
+
id: string;
|
|
188
|
+
};
|
|
189
|
+
}>;
|
|
155
190
|
export declare const limitedUpdateSchema: z.ZodObject<{
|
|
156
191
|
params: z.ZodObject<{
|
|
157
192
|
id: z.ZodString;
|
|
@@ -166,38 +201,38 @@ export declare const limitedUpdateSchema: z.ZodObject<{
|
|
|
166
201
|
userId: z.ZodOptional<z.ZodString>;
|
|
167
202
|
}, "strip", z.ZodTypeAny, {
|
|
168
203
|
userId?: string | undefined;
|
|
169
|
-
pricingId?: string | undefined;
|
|
170
204
|
productId?: string | undefined;
|
|
205
|
+
pricingId?: string | undefined;
|
|
171
206
|
}, {
|
|
172
207
|
userId?: string | undefined;
|
|
173
|
-
pricingId?: string | undefined;
|
|
174
208
|
productId?: string | undefined;
|
|
209
|
+
pricingId?: string | undefined;
|
|
175
210
|
}>, {
|
|
176
211
|
userId?: string | undefined;
|
|
177
|
-
pricingId?: string | undefined;
|
|
178
212
|
productId?: string | undefined;
|
|
213
|
+
pricingId?: string | undefined;
|
|
179
214
|
}, {
|
|
180
215
|
userId?: string | undefined;
|
|
181
|
-
pricingId?: string | undefined;
|
|
182
216
|
productId?: string | undefined;
|
|
217
|
+
pricingId?: string | undefined;
|
|
183
218
|
}>;
|
|
184
219
|
}, "strip", z.ZodTypeAny, {
|
|
185
|
-
params: {
|
|
186
|
-
id: string;
|
|
187
|
-
};
|
|
188
220
|
body: {
|
|
189
221
|
userId?: string | undefined;
|
|
190
|
-
pricingId?: string | undefined;
|
|
191
222
|
productId?: string | undefined;
|
|
223
|
+
pricingId?: string | undefined;
|
|
192
224
|
};
|
|
193
|
-
}, {
|
|
194
225
|
params: {
|
|
195
226
|
id: string;
|
|
196
227
|
};
|
|
228
|
+
}, {
|
|
197
229
|
body: {
|
|
198
230
|
userId?: string | undefined;
|
|
199
|
-
pricingId?: string | undefined;
|
|
200
231
|
productId?: string | undefined;
|
|
232
|
+
pricingId?: string | undefined;
|
|
233
|
+
};
|
|
234
|
+
params: {
|
|
235
|
+
id: string;
|
|
201
236
|
};
|
|
202
237
|
}>;
|
|
203
238
|
export declare const recordPaymentSchema: z.ZodObject<{
|
|
@@ -220,44 +255,44 @@ export declare const recordPaymentSchema: z.ZodObject<{
|
|
|
220
255
|
amount: number;
|
|
221
256
|
provider: "AIRTEL_MONEY" | "CASH" | "MOMO_PAY";
|
|
222
257
|
providerReference: string;
|
|
223
|
-
customerPhone?: string | undefined;
|
|
224
|
-
notes?: string | undefined;
|
|
225
258
|
metadata?: Record<string, any> | undefined;
|
|
259
|
+
customerPhone?: string | undefined;
|
|
226
260
|
customerName?: string | undefined;
|
|
261
|
+
notes?: string | undefined;
|
|
227
262
|
}, {
|
|
228
263
|
amount: number;
|
|
229
264
|
providerReference: string;
|
|
265
|
+
metadata?: Record<string, any> | undefined;
|
|
230
266
|
provider?: "AIRTEL_MONEY" | "CASH" | "MOMO_PAY" | undefined;
|
|
231
267
|
customerPhone?: string | undefined;
|
|
232
|
-
notes?: string | undefined;
|
|
233
|
-
metadata?: Record<string, any> | undefined;
|
|
234
268
|
customerName?: string | undefined;
|
|
269
|
+
notes?: string | undefined;
|
|
235
270
|
}>;
|
|
236
271
|
}, "strip", z.ZodTypeAny, {
|
|
237
|
-
params: {
|
|
238
|
-
id: string;
|
|
239
|
-
};
|
|
240
272
|
body: {
|
|
241
273
|
amount: number;
|
|
242
274
|
provider: "AIRTEL_MONEY" | "CASH" | "MOMO_PAY";
|
|
243
275
|
providerReference: string;
|
|
244
|
-
customerPhone?: string | undefined;
|
|
245
|
-
notes?: string | undefined;
|
|
246
276
|
metadata?: Record<string, any> | undefined;
|
|
277
|
+
customerPhone?: string | undefined;
|
|
247
278
|
customerName?: string | undefined;
|
|
279
|
+
notes?: string | undefined;
|
|
248
280
|
};
|
|
249
|
-
}, {
|
|
250
281
|
params: {
|
|
251
282
|
id: string;
|
|
252
283
|
};
|
|
284
|
+
}, {
|
|
253
285
|
body: {
|
|
254
286
|
amount: number;
|
|
255
287
|
providerReference: string;
|
|
288
|
+
metadata?: Record<string, any> | undefined;
|
|
256
289
|
provider?: "AIRTEL_MONEY" | "CASH" | "MOMO_PAY" | undefined;
|
|
257
290
|
customerPhone?: string | undefined;
|
|
258
|
-
notes?: string | undefined;
|
|
259
|
-
metadata?: Record<string, any> | undefined;
|
|
260
291
|
customerName?: string | undefined;
|
|
292
|
+
notes?: string | undefined;
|
|
293
|
+
};
|
|
294
|
+
params: {
|
|
295
|
+
id: string;
|
|
261
296
|
};
|
|
262
297
|
}>;
|
|
263
298
|
export declare const deletePlanSchema: z.ZodObject<{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deletePlanSchema = exports.recordPaymentSchema = exports.limitedUpdateSchema = exports.getDevicePlanSchema = exports.getUserPlansSchema = exports.getPlanSchema = exports.listPlansSchema = exports.createPlanSchema = void 0;
|
|
3
|
+
exports.deletePlanSchema = exports.recordPaymentSchema = exports.limitedUpdateSchema = exports.replacePlanDevicesSchema = exports.getDevicePlanSchema = exports.getUserPlansSchema = exports.getPlanSchema = exports.listPlansSchema = exports.createPlanSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const vr_models_1 = require("vr-models");
|
|
6
6
|
const regex_constants_1 = require("../../constants/regex.constants");
|
|
@@ -55,6 +55,18 @@ exports.getDevicePlanSchema = zod_1.z.object({
|
|
|
55
55
|
deviceId: zod_1.z.string().uuid("Invalid device ID"),
|
|
56
56
|
}),
|
|
57
57
|
});
|
|
58
|
+
// ==================== DEVICE REPLACEMENT ====================
|
|
59
|
+
exports.replacePlanDevicesSchema = zod_1.z.object({
|
|
60
|
+
params: zod_1.z.object({
|
|
61
|
+
id: zod_1.z.string().uuid("Invalid payment plan ID"),
|
|
62
|
+
}),
|
|
63
|
+
body: zod_1.z.object({
|
|
64
|
+
replacementPrefix: zod_1.z.enum(["VBRD", "VIBERIDE"]),
|
|
65
|
+
replacementPairID: zod_1.z
|
|
66
|
+
.string()
|
|
67
|
+
.regex(regex_constants_1.DEVICE_PAIR_ID_REGEX, "Invalid pair ID format"),
|
|
68
|
+
}),
|
|
69
|
+
});
|
|
58
70
|
// ==================== UPDATE ====================
|
|
59
71
|
// validations/operations.validation.ts
|
|
60
72
|
exports.limitedUpdateSchema = zod_1.z.object({
|
|
@@ -5,28 +5,35 @@ export declare const createDevicePairsSchema: z.ZodObject<{
|
|
|
5
5
|
body: z.ZodEffects<z.ZodObject<{
|
|
6
6
|
productId: z.ZodString;
|
|
7
7
|
pairIds: z.ZodArray<z.ZodString, "many">;
|
|
8
|
+
serialPrefix: z.ZodDefault<z.ZodEnum<["VBRD", "VIBERIDE"]>>;
|
|
8
9
|
}, "strip", z.ZodTypeAny, {
|
|
9
10
|
productId: string;
|
|
10
11
|
pairIds: string[];
|
|
12
|
+
serialPrefix: "VBRD" | "VIBERIDE";
|
|
11
13
|
}, {
|
|
12
14
|
productId: string;
|
|
13
15
|
pairIds: string[];
|
|
16
|
+
serialPrefix?: "VBRD" | "VIBERIDE" | undefined;
|
|
14
17
|
}>, {
|
|
15
18
|
pairIds: string[];
|
|
16
19
|
productId: string;
|
|
20
|
+
serialPrefix: "VBRD" | "VIBERIDE";
|
|
17
21
|
}, {
|
|
18
22
|
productId: string;
|
|
19
23
|
pairIds: string[];
|
|
24
|
+
serialPrefix?: "VBRD" | "VIBERIDE" | undefined;
|
|
20
25
|
}>;
|
|
21
26
|
}, "strip", z.ZodTypeAny, {
|
|
22
27
|
body: {
|
|
23
28
|
pairIds: string[];
|
|
24
29
|
productId: string;
|
|
30
|
+
serialPrefix: "VBRD" | "VIBERIDE";
|
|
25
31
|
};
|
|
26
32
|
}, {
|
|
27
33
|
body: {
|
|
28
34
|
productId: string;
|
|
29
35
|
pairIds: string[];
|
|
36
|
+
serialPrefix?: "VBRD" | "VIBERIDE" | undefined;
|
|
30
37
|
};
|
|
31
38
|
}>;
|
|
32
39
|
export declare const getDeviceSchema: z.ZodObject<{
|
|
@@ -59,50 +66,50 @@ export declare const getDevicesSchema: z.ZodObject<{
|
|
|
59
66
|
sortBy: z.ZodOptional<z.ZodEnum<["serialNumber", "status", "createdAt", "updatedAt"]>>;
|
|
60
67
|
sortOrder: z.ZodOptional<z.ZodEnum<["ASC", "DESC"]>>;
|
|
61
68
|
}, "strip", z.ZodTypeAny, {
|
|
62
|
-
|
|
63
|
-
page?: number | undefined;
|
|
69
|
+
search?: string | undefined;
|
|
64
70
|
limit?: number | undefined;
|
|
71
|
+
status?: "locked" | "unlocked" | "disabled" | undefined;
|
|
65
72
|
productId?: string | undefined;
|
|
66
|
-
|
|
67
|
-
sortBy?: "
|
|
68
|
-
sortOrder?: "
|
|
73
|
+
page?: number | undefined;
|
|
74
|
+
sortBy?: "createdAt" | "updatedAt" | "status" | "serialNumber" | undefined;
|
|
75
|
+
sortOrder?: "DESC" | "ASC" | undefined;
|
|
69
76
|
dedicatedUser?: "PASSENGER" | "RIDER" | "N/A" | undefined;
|
|
70
77
|
isPermanentlyUnlocked?: "true" | "false" | undefined;
|
|
71
78
|
isAssigned?: "true" | "false" | undefined;
|
|
72
79
|
}, {
|
|
73
|
-
|
|
74
|
-
page?: string | undefined;
|
|
80
|
+
search?: string | undefined;
|
|
75
81
|
limit?: string | undefined;
|
|
82
|
+
status?: "locked" | "unlocked" | "disabled" | undefined;
|
|
76
83
|
productId?: string | undefined;
|
|
77
|
-
|
|
78
|
-
sortBy?: "
|
|
79
|
-
sortOrder?: "
|
|
84
|
+
page?: string | undefined;
|
|
85
|
+
sortBy?: "createdAt" | "updatedAt" | "status" | "serialNumber" | undefined;
|
|
86
|
+
sortOrder?: "DESC" | "ASC" | undefined;
|
|
80
87
|
dedicatedUser?: "PASSENGER" | "RIDER" | "N/A" | undefined;
|
|
81
88
|
isPermanentlyUnlocked?: "true" | "false" | undefined;
|
|
82
89
|
isAssigned?: "true" | "false" | undefined;
|
|
83
90
|
}>;
|
|
84
91
|
}, "strip", z.ZodTypeAny, {
|
|
85
92
|
query: {
|
|
86
|
-
|
|
87
|
-
page?: number | undefined;
|
|
93
|
+
search?: string | undefined;
|
|
88
94
|
limit?: number | undefined;
|
|
95
|
+
status?: "locked" | "unlocked" | "disabled" | undefined;
|
|
89
96
|
productId?: string | undefined;
|
|
90
|
-
|
|
91
|
-
sortBy?: "
|
|
92
|
-
sortOrder?: "
|
|
97
|
+
page?: number | undefined;
|
|
98
|
+
sortBy?: "createdAt" | "updatedAt" | "status" | "serialNumber" | undefined;
|
|
99
|
+
sortOrder?: "DESC" | "ASC" | undefined;
|
|
93
100
|
dedicatedUser?: "PASSENGER" | "RIDER" | "N/A" | undefined;
|
|
94
101
|
isPermanentlyUnlocked?: "true" | "false" | undefined;
|
|
95
102
|
isAssigned?: "true" | "false" | undefined;
|
|
96
103
|
};
|
|
97
104
|
}, {
|
|
98
105
|
query: {
|
|
99
|
-
|
|
100
|
-
page?: string | undefined;
|
|
106
|
+
search?: string | undefined;
|
|
101
107
|
limit?: string | undefined;
|
|
108
|
+
status?: "locked" | "unlocked" | "disabled" | undefined;
|
|
102
109
|
productId?: string | undefined;
|
|
103
|
-
|
|
104
|
-
sortBy?: "
|
|
105
|
-
sortOrder?: "
|
|
110
|
+
page?: string | undefined;
|
|
111
|
+
sortBy?: "createdAt" | "updatedAt" | "status" | "serialNumber" | undefined;
|
|
112
|
+
sortOrder?: "DESC" | "ASC" | undefined;
|
|
106
113
|
dedicatedUser?: "PASSENGER" | "RIDER" | "N/A" | undefined;
|
|
107
114
|
isPermanentlyUnlocked?: "true" | "false" | undefined;
|
|
108
115
|
isAssigned?: "true" | "false" | undefined;
|
|
@@ -330,20 +337,20 @@ export declare const customDeviceResetSchema: z.ZodObject<{
|
|
|
330
337
|
}, "strip", z.ZodTypeAny, {
|
|
331
338
|
status?: string | string[] | undefined;
|
|
332
339
|
productId?: string | string[] | undefined;
|
|
333
|
-
pairId?: string | string[] | undefined;
|
|
334
340
|
dedicatedUser?: string | string[] | undefined;
|
|
335
341
|
isPermanentlyUnlocked?: boolean | undefined;
|
|
336
342
|
excludeStatus?: string | string[] | undefined;
|
|
343
|
+
pairId?: string | string[] | undefined;
|
|
337
344
|
excludePairIds?: string | string[] | undefined;
|
|
338
345
|
createdBefore?: string | undefined;
|
|
339
346
|
createdAfter?: string | undefined;
|
|
340
347
|
}, {
|
|
341
348
|
status?: string | string[] | undefined;
|
|
342
349
|
productId?: string | string[] | undefined;
|
|
343
|
-
pairId?: string | string[] | undefined;
|
|
344
350
|
dedicatedUser?: string | string[] | undefined;
|
|
345
351
|
isPermanentlyUnlocked?: boolean | undefined;
|
|
346
352
|
excludeStatus?: string | string[] | undefined;
|
|
353
|
+
pairId?: string | string[] | undefined;
|
|
347
354
|
excludePairIds?: string | string[] | undefined;
|
|
348
355
|
createdBefore?: string | undefined;
|
|
349
356
|
createdAfter?: string | undefined;
|
|
@@ -382,10 +389,10 @@ export declare const customDeviceResetSchema: z.ZodObject<{
|
|
|
382
389
|
condition?: {
|
|
383
390
|
status?: string | string[] | undefined;
|
|
384
391
|
productId?: string | string[] | undefined;
|
|
385
|
-
pairId?: string | string[] | undefined;
|
|
386
392
|
dedicatedUser?: string | string[] | undefined;
|
|
387
393
|
isPermanentlyUnlocked?: boolean | undefined;
|
|
388
394
|
excludeStatus?: string | string[] | undefined;
|
|
395
|
+
pairId?: string | string[] | undefined;
|
|
389
396
|
excludePairIds?: string | string[] | undefined;
|
|
390
397
|
createdBefore?: string | undefined;
|
|
391
398
|
createdAfter?: string | undefined;
|
|
@@ -403,10 +410,10 @@ export declare const customDeviceResetSchema: z.ZodObject<{
|
|
|
403
410
|
condition?: {
|
|
404
411
|
status?: string | string[] | undefined;
|
|
405
412
|
productId?: string | string[] | undefined;
|
|
406
|
-
pairId?: string | string[] | undefined;
|
|
407
413
|
dedicatedUser?: string | string[] | undefined;
|
|
408
414
|
isPermanentlyUnlocked?: boolean | undefined;
|
|
409
415
|
excludeStatus?: string | string[] | undefined;
|
|
416
|
+
pairId?: string | string[] | undefined;
|
|
410
417
|
excludePairIds?: string | string[] | undefined;
|
|
411
418
|
createdBefore?: string | undefined;
|
|
412
419
|
createdAfter?: string | undefined;
|
|
@@ -426,10 +433,10 @@ export declare const customDeviceResetSchema: z.ZodObject<{
|
|
|
426
433
|
condition?: {
|
|
427
434
|
status?: string | string[] | undefined;
|
|
428
435
|
productId?: string | string[] | undefined;
|
|
429
|
-
pairId?: string | string[] | undefined;
|
|
430
436
|
dedicatedUser?: string | string[] | undefined;
|
|
431
437
|
isPermanentlyUnlocked?: boolean | undefined;
|
|
432
438
|
excludeStatus?: string | string[] | undefined;
|
|
439
|
+
pairId?: string | string[] | undefined;
|
|
433
440
|
excludePairIds?: string | string[] | undefined;
|
|
434
441
|
createdBefore?: string | undefined;
|
|
435
442
|
createdAfter?: string | undefined;
|
|
@@ -449,10 +456,10 @@ export declare const customDeviceResetSchema: z.ZodObject<{
|
|
|
449
456
|
condition?: {
|
|
450
457
|
status?: string | string[] | undefined;
|
|
451
458
|
productId?: string | string[] | undefined;
|
|
452
|
-
pairId?: string | string[] | undefined;
|
|
453
459
|
dedicatedUser?: string | string[] | undefined;
|
|
454
460
|
isPermanentlyUnlocked?: boolean | undefined;
|
|
455
461
|
excludeStatus?: string | string[] | undefined;
|
|
462
|
+
pairId?: string | string[] | undefined;
|
|
456
463
|
excludePairIds?: string | string[] | undefined;
|
|
457
464
|
createdBefore?: string | undefined;
|
|
458
465
|
createdAfter?: string | undefined;
|
|
@@ -24,6 +24,7 @@ exports.createDevicePairsSchema = zod_1.z.object({
|
|
|
24
24
|
.array(zod_1.z.string().regex(exports.PAIR_ID_REGEX, PAIR_ID_ERROR))
|
|
25
25
|
.min(1, "At least one pair ID required")
|
|
26
26
|
.max(100, "Cannot create more than 100 pairs at once"),
|
|
27
|
+
serialPrefix: zod_1.z.enum(["VBRD", "VIBERIDE"]).default("VIBERIDE"),
|
|
27
28
|
})
|
|
28
29
|
.transform((data) => {
|
|
29
30
|
// ✅ Remove duplicates and keep unique pair IDs
|
|
@@ -18,10 +18,10 @@ export declare const listEventLogsSchema: z.ZodObject<{
|
|
|
18
18
|
sortOrder: z.ZodDefault<z.ZodOptional<z.ZodEnum<["ASC", "DESC"]>>>;
|
|
19
19
|
hasDeviceSession: z.ZodEffects<z.ZodOptional<z.ZodString>, boolean, string | undefined>;
|
|
20
20
|
}, "strip", z.ZodTypeAny, {
|
|
21
|
-
page: number;
|
|
22
21
|
limit: number;
|
|
22
|
+
page: number;
|
|
23
23
|
sortBy: "createdAt" | "actorType" | "action" | "entity";
|
|
24
|
-
sortOrder: "
|
|
24
|
+
sortOrder: "DESC" | "ASC";
|
|
25
25
|
hasDeviceSession: boolean;
|
|
26
26
|
search?: string | undefined;
|
|
27
27
|
firstName?: string | undefined;
|
|
@@ -35,15 +35,15 @@ export declare const listEventLogsSchema: z.ZodObject<{
|
|
|
35
35
|
entityId?: string | undefined;
|
|
36
36
|
actorName?: string | undefined;
|
|
37
37
|
}, {
|
|
38
|
-
page?: string | undefined;
|
|
39
|
-
limit?: string | undefined;
|
|
40
38
|
search?: string | undefined;
|
|
41
|
-
|
|
42
|
-
sortOrder?: "ASC" | "DESC" | undefined;
|
|
39
|
+
limit?: string | undefined;
|
|
43
40
|
firstName?: string | undefined;
|
|
44
41
|
lastName?: string | undefined;
|
|
42
|
+
page?: string | undefined;
|
|
43
|
+
sortBy?: "createdAt" | "actorType" | "action" | "entity" | undefined;
|
|
45
44
|
fromDate?: string | undefined;
|
|
46
45
|
toDate?: string | undefined;
|
|
46
|
+
sortOrder?: "DESC" | "ASC" | undefined;
|
|
47
47
|
actorType?: "ADMIN" | "PASSENGER" | "RIDER" | "AGENT" | "SUPER_ADMIN" | undefined;
|
|
48
48
|
actorId?: string | undefined;
|
|
49
49
|
action?: string | undefined;
|
|
@@ -52,15 +52,15 @@ export declare const listEventLogsSchema: z.ZodObject<{
|
|
|
52
52
|
actorName?: string | undefined;
|
|
53
53
|
hasDeviceSession?: string | undefined;
|
|
54
54
|
}>, any, {
|
|
55
|
-
page?: string | undefined;
|
|
56
|
-
limit?: string | undefined;
|
|
57
55
|
search?: string | undefined;
|
|
58
|
-
|
|
59
|
-
sortOrder?: "ASC" | "DESC" | undefined;
|
|
56
|
+
limit?: string | undefined;
|
|
60
57
|
firstName?: string | undefined;
|
|
61
58
|
lastName?: string | undefined;
|
|
59
|
+
page?: string | undefined;
|
|
60
|
+
sortBy?: "createdAt" | "actorType" | "action" | "entity" | undefined;
|
|
62
61
|
fromDate?: string | undefined;
|
|
63
62
|
toDate?: string | undefined;
|
|
63
|
+
sortOrder?: "DESC" | "ASC" | undefined;
|
|
64
64
|
actorType?: "ADMIN" | "PASSENGER" | "RIDER" | "AGENT" | "SUPER_ADMIN" | undefined;
|
|
65
65
|
actorId?: string | undefined;
|
|
66
66
|
action?: string | undefined;
|
|
@@ -73,15 +73,15 @@ export declare const listEventLogsSchema: z.ZodObject<{
|
|
|
73
73
|
query?: any;
|
|
74
74
|
}, {
|
|
75
75
|
query: {
|
|
76
|
-
page?: string | undefined;
|
|
77
|
-
limit?: string | undefined;
|
|
78
76
|
search?: string | undefined;
|
|
79
|
-
|
|
80
|
-
sortOrder?: "ASC" | "DESC" | undefined;
|
|
77
|
+
limit?: string | undefined;
|
|
81
78
|
firstName?: string | undefined;
|
|
82
79
|
lastName?: string | undefined;
|
|
80
|
+
page?: string | undefined;
|
|
81
|
+
sortBy?: "createdAt" | "actorType" | "action" | "entity" | undefined;
|
|
83
82
|
fromDate?: string | undefined;
|
|
84
83
|
toDate?: string | undefined;
|
|
84
|
+
sortOrder?: "DESC" | "ASC" | undefined;
|
|
85
85
|
actorType?: "ADMIN" | "PASSENGER" | "RIDER" | "AGENT" | "SUPER_ADMIN" | undefined;
|
|
86
86
|
actorId?: string | undefined;
|
|
87
87
|
action?: string | undefined;
|