vr-commons 1.0.178 → 1.0.181
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 +41 -6
- package/dist/validations/admin/admin.devicePayments.validations.js +13 -1
- package/dist/validations/admin/admin.devices.validations.d.ts +60 -53
- 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 +72 -72
- package/dist/validations/index.d.ts +1 -1
- package/dist/validations/index.js +2 -1
- package/dist/validations/shared/shared.account.validations.d.ts +16 -16
- 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.d.ts +34 -34
- 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 +1 -1
|
@@ -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
|
}>;
|
|
@@ -49,9 +49,9 @@ export declare const listPlansSchema: z.ZodObject<{
|
|
|
49
49
|
sortOrder?: "ASC" | "DESC" | undefined;
|
|
50
50
|
}, {
|
|
51
51
|
status?: "PENDING" | "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
|
|
52
|
+
userId?: string | undefined;
|
|
52
53
|
page?: string | undefined;
|
|
53
54
|
limit?: string | undefined;
|
|
54
|
-
userId?: string | undefined;
|
|
55
55
|
deviceId?: string | undefined;
|
|
56
56
|
isOverdue?: "true" | "false" | undefined;
|
|
57
57
|
search?: string | undefined;
|
|
@@ -73,9 +73,9 @@ export declare const listPlansSchema: z.ZodObject<{
|
|
|
73
73
|
}, {
|
|
74
74
|
query: {
|
|
75
75
|
status?: "PENDING" | "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
|
|
76
|
+
userId?: string | undefined;
|
|
76
77
|
page?: string | undefined;
|
|
77
78
|
limit?: string | undefined;
|
|
78
|
-
userId?: string | undefined;
|
|
79
79
|
deviceId?: string | undefined;
|
|
80
80
|
isOverdue?: "true" | "false" | undefined;
|
|
81
81
|
search?: string | undefined;
|
|
@@ -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
|
+
params: {
|
|
175
|
+
id: string;
|
|
176
|
+
};
|
|
177
|
+
body: {
|
|
178
|
+
replacementPrefix: "VBRD" | "VIBERIDE";
|
|
179
|
+
replacementPairID: string;
|
|
180
|
+
};
|
|
181
|
+
}, {
|
|
182
|
+
params: {
|
|
183
|
+
id: string;
|
|
184
|
+
};
|
|
185
|
+
body: {
|
|
186
|
+
replacementPrefix: "VBRD" | "VIBERIDE";
|
|
187
|
+
replacementPairID: string;
|
|
188
|
+
};
|
|
189
|
+
}>;
|
|
155
190
|
export declare const limitedUpdateSchema: z.ZodObject<{
|
|
156
191
|
params: z.ZodObject<{
|
|
157
192
|
id: z.ZodString;
|
|
@@ -221,17 +256,17 @@ export declare const recordPaymentSchema: z.ZodObject<{
|
|
|
221
256
|
provider: "AIRTEL_MONEY" | "CASH" | "MOMO_PAY";
|
|
222
257
|
providerReference: string;
|
|
223
258
|
customerPhone?: string | undefined;
|
|
259
|
+
customerName?: string | undefined;
|
|
224
260
|
notes?: string | undefined;
|
|
225
261
|
metadata?: Record<string, any> | undefined;
|
|
226
|
-
customerName?: string | undefined;
|
|
227
262
|
}, {
|
|
228
263
|
amount: number;
|
|
229
264
|
providerReference: string;
|
|
230
265
|
provider?: "AIRTEL_MONEY" | "CASH" | "MOMO_PAY" | undefined;
|
|
231
266
|
customerPhone?: string | undefined;
|
|
267
|
+
customerName?: string | undefined;
|
|
232
268
|
notes?: string | undefined;
|
|
233
269
|
metadata?: Record<string, any> | undefined;
|
|
234
|
-
customerName?: string | undefined;
|
|
235
270
|
}>;
|
|
236
271
|
}, "strip", z.ZodTypeAny, {
|
|
237
272
|
params: {
|
|
@@ -242,9 +277,9 @@ export declare const recordPaymentSchema: z.ZodObject<{
|
|
|
242
277
|
provider: "AIRTEL_MONEY" | "CASH" | "MOMO_PAY";
|
|
243
278
|
providerReference: string;
|
|
244
279
|
customerPhone?: string | undefined;
|
|
280
|
+
customerName?: string | undefined;
|
|
245
281
|
notes?: string | undefined;
|
|
246
282
|
metadata?: Record<string, any> | undefined;
|
|
247
|
-
customerName?: string | undefined;
|
|
248
283
|
};
|
|
249
284
|
}, {
|
|
250
285
|
params: {
|
|
@@ -255,9 +290,9 @@ export declare const recordPaymentSchema: z.ZodObject<{
|
|
|
255
290
|
providerReference: string;
|
|
256
291
|
provider?: "AIRTEL_MONEY" | "CASH" | "MOMO_PAY" | undefined;
|
|
257
292
|
customerPhone?: string | undefined;
|
|
293
|
+
customerName?: string | undefined;
|
|
258
294
|
notes?: string | undefined;
|
|
259
295
|
metadata?: Record<string, any> | undefined;
|
|
260
|
-
customerName?: string | undefined;
|
|
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,53 +66,53 @@ 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, {
|
|
69
|
+
productId?: string | undefined;
|
|
62
70
|
status?: "locked" | "unlocked" | "disabled" | undefined;
|
|
63
71
|
page?: number | undefined;
|
|
64
72
|
limit?: number | undefined;
|
|
65
|
-
productId?: string | undefined;
|
|
66
|
-
search?: string | undefined;
|
|
67
|
-
sortBy?: "status" | "createdAt" | "updatedAt" | "serialNumber" | undefined;
|
|
68
|
-
sortOrder?: "ASC" | "DESC" | undefined;
|
|
69
73
|
dedicatedUser?: "PASSENGER" | "RIDER" | "N/A" | undefined;
|
|
70
74
|
isPermanentlyUnlocked?: "true" | "false" | undefined;
|
|
71
75
|
isAssigned?: "true" | "false" | undefined;
|
|
76
|
+
search?: string | undefined;
|
|
77
|
+
sortBy?: "status" | "serialNumber" | "createdAt" | "updatedAt" | undefined;
|
|
78
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
72
79
|
}, {
|
|
80
|
+
productId?: string | undefined;
|
|
73
81
|
status?: "locked" | "unlocked" | "disabled" | undefined;
|
|
74
82
|
page?: string | undefined;
|
|
75
83
|
limit?: string | undefined;
|
|
76
|
-
productId?: string | undefined;
|
|
77
|
-
search?: string | undefined;
|
|
78
|
-
sortBy?: "status" | "createdAt" | "updatedAt" | "serialNumber" | undefined;
|
|
79
|
-
sortOrder?: "ASC" | "DESC" | undefined;
|
|
80
84
|
dedicatedUser?: "PASSENGER" | "RIDER" | "N/A" | undefined;
|
|
81
85
|
isPermanentlyUnlocked?: "true" | "false" | undefined;
|
|
82
86
|
isAssigned?: "true" | "false" | undefined;
|
|
87
|
+
search?: string | undefined;
|
|
88
|
+
sortBy?: "status" | "serialNumber" | "createdAt" | "updatedAt" | undefined;
|
|
89
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
83
90
|
}>;
|
|
84
91
|
}, "strip", z.ZodTypeAny, {
|
|
85
92
|
query: {
|
|
93
|
+
productId?: string | undefined;
|
|
86
94
|
status?: "locked" | "unlocked" | "disabled" | undefined;
|
|
87
95
|
page?: number | undefined;
|
|
88
96
|
limit?: number | undefined;
|
|
89
|
-
productId?: string | undefined;
|
|
90
|
-
search?: string | undefined;
|
|
91
|
-
sortBy?: "status" | "createdAt" | "updatedAt" | "serialNumber" | undefined;
|
|
92
|
-
sortOrder?: "ASC" | "DESC" | undefined;
|
|
93
97
|
dedicatedUser?: "PASSENGER" | "RIDER" | "N/A" | undefined;
|
|
94
98
|
isPermanentlyUnlocked?: "true" | "false" | undefined;
|
|
95
99
|
isAssigned?: "true" | "false" | undefined;
|
|
100
|
+
search?: string | undefined;
|
|
101
|
+
sortBy?: "status" | "serialNumber" | "createdAt" | "updatedAt" | undefined;
|
|
102
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
96
103
|
};
|
|
97
104
|
}, {
|
|
98
105
|
query: {
|
|
106
|
+
productId?: string | undefined;
|
|
99
107
|
status?: "locked" | "unlocked" | "disabled" | undefined;
|
|
100
108
|
page?: string | undefined;
|
|
101
109
|
limit?: string | undefined;
|
|
102
|
-
productId?: string | undefined;
|
|
103
|
-
search?: string | undefined;
|
|
104
|
-
sortBy?: "status" | "createdAt" | "updatedAt" | "serialNumber" | undefined;
|
|
105
|
-
sortOrder?: "ASC" | "DESC" | undefined;
|
|
106
110
|
dedicatedUser?: "PASSENGER" | "RIDER" | "N/A" | undefined;
|
|
107
111
|
isPermanentlyUnlocked?: "true" | "false" | undefined;
|
|
108
112
|
isAssigned?: "true" | "false" | undefined;
|
|
113
|
+
search?: string | undefined;
|
|
114
|
+
sortBy?: "status" | "serialNumber" | "createdAt" | "updatedAt" | undefined;
|
|
115
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
109
116
|
};
|
|
110
117
|
}>;
|
|
111
118
|
export declare const deleteDevicesByPairsSchema: z.ZodObject<{
|
|
@@ -153,32 +160,32 @@ export declare const lockDevicesSchema: z.ZodObject<{
|
|
|
153
160
|
pairIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
154
161
|
serialNumbers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
155
162
|
}, "strip", z.ZodTypeAny, {
|
|
156
|
-
reason?: string | undefined;
|
|
157
163
|
pairIds?: string[] | undefined;
|
|
164
|
+
reason?: string | undefined;
|
|
158
165
|
serialNumbers?: string[] | undefined;
|
|
159
166
|
}, {
|
|
160
|
-
reason?: string | undefined;
|
|
161
167
|
pairIds?: string[] | undefined;
|
|
168
|
+
reason?: string | undefined;
|
|
162
169
|
serialNumbers?: string[] | undefined;
|
|
163
170
|
}>, {
|
|
164
|
-
reason?: string | undefined;
|
|
165
171
|
pairIds?: string[] | undefined;
|
|
172
|
+
reason?: string | undefined;
|
|
166
173
|
serialNumbers?: string[] | undefined;
|
|
167
174
|
}, {
|
|
168
|
-
reason?: string | undefined;
|
|
169
175
|
pairIds?: string[] | undefined;
|
|
176
|
+
reason?: string | undefined;
|
|
170
177
|
serialNumbers?: string[] | undefined;
|
|
171
178
|
}>;
|
|
172
179
|
}, "strip", z.ZodTypeAny, {
|
|
173
180
|
body: {
|
|
174
|
-
reason?: string | undefined;
|
|
175
181
|
pairIds?: string[] | undefined;
|
|
182
|
+
reason?: string | undefined;
|
|
176
183
|
serialNumbers?: string[] | undefined;
|
|
177
184
|
};
|
|
178
185
|
}, {
|
|
179
186
|
body: {
|
|
180
|
-
reason?: string | undefined;
|
|
181
187
|
pairIds?: string[] | undefined;
|
|
188
|
+
reason?: string | undefined;
|
|
182
189
|
serialNumbers?: string[] | undefined;
|
|
183
190
|
};
|
|
184
191
|
}>;
|
|
@@ -328,22 +335,22 @@ export declare const customDeviceResetSchema: z.ZodObject<{
|
|
|
328
335
|
createdBefore: z.ZodOptional<z.ZodString>;
|
|
329
336
|
createdAfter: z.ZodOptional<z.ZodString>;
|
|
330
337
|
}, "strip", z.ZodTypeAny, {
|
|
331
|
-
status?: string | string[] | undefined;
|
|
332
338
|
productId?: string | string[] | undefined;
|
|
333
|
-
|
|
339
|
+
status?: 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
|
-
status?: string | string[] | undefined;
|
|
342
348
|
productId?: string | string[] | undefined;
|
|
343
|
-
|
|
349
|
+
status?: 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;
|
|
@@ -356,106 +363,106 @@ export declare const customDeviceResetSchema: z.ZodObject<{
|
|
|
356
363
|
activatedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
357
364
|
}, "strip", z.ZodTypeAny, {
|
|
358
365
|
status?: string | undefined;
|
|
359
|
-
devicePaymentPlanId?: string | null | undefined;
|
|
360
366
|
dedicatedUser?: string | undefined;
|
|
361
367
|
isPermanentlyUnlocked?: boolean | undefined;
|
|
368
|
+
devicePaymentPlanId?: string | null | undefined;
|
|
362
369
|
activatedAt?: string | null | undefined;
|
|
363
370
|
}, {
|
|
364
371
|
status?: string | undefined;
|
|
365
|
-
devicePaymentPlanId?: string | null | undefined;
|
|
366
372
|
dedicatedUser?: string | undefined;
|
|
367
373
|
isPermanentlyUnlocked?: boolean | undefined;
|
|
374
|
+
devicePaymentPlanId?: string | null | undefined;
|
|
368
375
|
activatedAt?: string | null | undefined;
|
|
369
376
|
}>>;
|
|
370
377
|
batchSize: z.ZodOptional<z.ZodNumber>;
|
|
371
378
|
maxRetries: z.ZodOptional<z.ZodNumber>;
|
|
372
379
|
}, "strip", z.ZodTypeAny, {
|
|
373
|
-
update?: {
|
|
374
|
-
status?: string | undefined;
|
|
375
|
-
devicePaymentPlanId?: string | null | undefined;
|
|
376
|
-
dedicatedUser?: string | undefined;
|
|
377
|
-
isPermanentlyUnlocked?: boolean | undefined;
|
|
378
|
-
activatedAt?: string | null | undefined;
|
|
379
|
-
} | undefined;
|
|
380
380
|
batchSize?: number | undefined;
|
|
381
381
|
maxRetries?: number | undefined;
|
|
382
382
|
condition?: {
|
|
383
|
-
status?: string | string[] | undefined;
|
|
384
383
|
productId?: string | string[] | undefined;
|
|
385
|
-
|
|
384
|
+
status?: string | string[] | undefined;
|
|
386
385
|
dedicatedUser?: string | string[] | undefined;
|
|
387
386
|
isPermanentlyUnlocked?: boolean | undefined;
|
|
388
387
|
excludeStatus?: string | string[] | undefined;
|
|
388
|
+
pairId?: string | string[] | undefined;
|
|
389
389
|
excludePairIds?: string | string[] | undefined;
|
|
390
390
|
createdBefore?: string | undefined;
|
|
391
391
|
createdAfter?: string | undefined;
|
|
392
392
|
} | undefined;
|
|
393
|
-
}, {
|
|
394
393
|
update?: {
|
|
395
394
|
status?: string | undefined;
|
|
396
|
-
devicePaymentPlanId?: string | null | undefined;
|
|
397
395
|
dedicatedUser?: string | undefined;
|
|
398
396
|
isPermanentlyUnlocked?: boolean | undefined;
|
|
397
|
+
devicePaymentPlanId?: string | null | undefined;
|
|
399
398
|
activatedAt?: string | null | undefined;
|
|
400
399
|
} | undefined;
|
|
400
|
+
}, {
|
|
401
401
|
batchSize?: number | undefined;
|
|
402
402
|
maxRetries?: number | undefined;
|
|
403
403
|
condition?: {
|
|
404
|
-
status?: string | string[] | undefined;
|
|
405
404
|
productId?: string | string[] | undefined;
|
|
406
|
-
|
|
405
|
+
status?: string | string[] | undefined;
|
|
407
406
|
dedicatedUser?: string | string[] | undefined;
|
|
408
407
|
isPermanentlyUnlocked?: boolean | undefined;
|
|
409
408
|
excludeStatus?: string | string[] | undefined;
|
|
409
|
+
pairId?: string | string[] | undefined;
|
|
410
410
|
excludePairIds?: string | string[] | undefined;
|
|
411
411
|
createdBefore?: string | undefined;
|
|
412
412
|
createdAfter?: string | undefined;
|
|
413
413
|
} | undefined;
|
|
414
|
-
}>;
|
|
415
|
-
}, "strip", z.ZodTypeAny, {
|
|
416
|
-
body: {
|
|
417
414
|
update?: {
|
|
418
415
|
status?: string | undefined;
|
|
419
|
-
devicePaymentPlanId?: string | null | undefined;
|
|
420
416
|
dedicatedUser?: string | undefined;
|
|
421
417
|
isPermanentlyUnlocked?: boolean | undefined;
|
|
418
|
+
devicePaymentPlanId?: string | null | undefined;
|
|
422
419
|
activatedAt?: string | null | undefined;
|
|
423
420
|
} | undefined;
|
|
421
|
+
}>;
|
|
422
|
+
}, "strip", z.ZodTypeAny, {
|
|
423
|
+
body: {
|
|
424
424
|
batchSize?: number | undefined;
|
|
425
425
|
maxRetries?: number | undefined;
|
|
426
426
|
condition?: {
|
|
427
|
-
status?: string | string[] | undefined;
|
|
428
427
|
productId?: string | string[] | undefined;
|
|
429
|
-
|
|
428
|
+
status?: string | string[] | undefined;
|
|
430
429
|
dedicatedUser?: string | string[] | undefined;
|
|
431
430
|
isPermanentlyUnlocked?: boolean | undefined;
|
|
432
431
|
excludeStatus?: string | string[] | undefined;
|
|
432
|
+
pairId?: string | string[] | undefined;
|
|
433
433
|
excludePairIds?: string | string[] | undefined;
|
|
434
434
|
createdBefore?: string | undefined;
|
|
435
435
|
createdAfter?: string | undefined;
|
|
436
436
|
} | undefined;
|
|
437
|
-
};
|
|
438
|
-
}, {
|
|
439
|
-
body: {
|
|
440
437
|
update?: {
|
|
441
438
|
status?: string | undefined;
|
|
442
|
-
devicePaymentPlanId?: string | null | undefined;
|
|
443
439
|
dedicatedUser?: string | undefined;
|
|
444
440
|
isPermanentlyUnlocked?: boolean | undefined;
|
|
441
|
+
devicePaymentPlanId?: string | null | undefined;
|
|
445
442
|
activatedAt?: string | null | undefined;
|
|
446
443
|
} | undefined;
|
|
444
|
+
};
|
|
445
|
+
}, {
|
|
446
|
+
body: {
|
|
447
447
|
batchSize?: number | undefined;
|
|
448
448
|
maxRetries?: number | undefined;
|
|
449
449
|
condition?: {
|
|
450
|
-
status?: string | string[] | undefined;
|
|
451
450
|
productId?: string | string[] | undefined;
|
|
452
|
-
|
|
451
|
+
status?: string | string[] | undefined;
|
|
453
452
|
dedicatedUser?: string | string[] | undefined;
|
|
454
453
|
isPermanentlyUnlocked?: boolean | undefined;
|
|
455
454
|
excludeStatus?: string | string[] | undefined;
|
|
455
|
+
pairId?: string | string[] | undefined;
|
|
456
456
|
excludePairIds?: string | string[] | undefined;
|
|
457
457
|
createdBefore?: string | undefined;
|
|
458
458
|
createdAfter?: string | undefined;
|
|
459
459
|
} | undefined;
|
|
460
|
+
update?: {
|
|
461
|
+
status?: string | undefined;
|
|
462
|
+
dedicatedUser?: string | undefined;
|
|
463
|
+
isPermanentlyUnlocked?: boolean | undefined;
|
|
464
|
+
devicePaymentPlanId?: string | null | undefined;
|
|
465
|
+
activatedAt?: string | null | undefined;
|
|
466
|
+
} | undefined;
|
|
460
467
|
};
|
|
461
468
|
}>;
|
|
@@ -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;
|
|
@@ -6,29 +6,29 @@ export declare const getInstallmentsSchema: z.ZodObject<{
|
|
|
6
6
|
page: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
|
|
7
7
|
limit: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
|
|
8
8
|
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
limit?: number | undefined;
|
|
9
10
|
status?: "PENDING" | "PAID" | "OVERDUE" | "SKIPPED" | undefined;
|
|
10
|
-
planId?: string | undefined;
|
|
11
11
|
page?: number | undefined;
|
|
12
|
-
|
|
12
|
+
planId?: string | undefined;
|
|
13
13
|
}, {
|
|
14
|
+
limit?: string | undefined;
|
|
14
15
|
status?: "PENDING" | "PAID" | "OVERDUE" | "SKIPPED" | undefined;
|
|
15
|
-
planId?: string | undefined;
|
|
16
16
|
page?: string | undefined;
|
|
17
|
-
|
|
17
|
+
planId?: string | undefined;
|
|
18
18
|
}>;
|
|
19
19
|
}, "strip", z.ZodTypeAny, {
|
|
20
20
|
query: {
|
|
21
|
+
limit?: number | undefined;
|
|
21
22
|
status?: "PENDING" | "PAID" | "OVERDUE" | "SKIPPED" | undefined;
|
|
22
|
-
planId?: string | undefined;
|
|
23
23
|
page?: number | undefined;
|
|
24
|
-
|
|
24
|
+
planId?: string | undefined;
|
|
25
25
|
};
|
|
26
26
|
}, {
|
|
27
27
|
query: {
|
|
28
|
+
limit?: string | undefined;
|
|
28
29
|
status?: "PENDING" | "PAID" | "OVERDUE" | "SKIPPED" | undefined;
|
|
29
|
-
planId?: string | undefined;
|
|
30
30
|
page?: string | undefined;
|
|
31
|
-
|
|
31
|
+
planId?: string | undefined;
|
|
32
32
|
};
|
|
33
33
|
}>;
|
|
34
34
|
export declare const getInstallmentByIdSchema: z.ZodObject<{
|
|
@@ -68,38 +68,38 @@ export declare const payInstallmentSchema: z.ZodObject<{
|
|
|
68
68
|
provider: "AIRTEL_MONEY" | "CASH" | "MOMO_PAY";
|
|
69
69
|
providerReference: string;
|
|
70
70
|
customerPhone: string;
|
|
71
|
-
notes?: string | undefined;
|
|
72
71
|
metadata?: Record<string, any> | undefined;
|
|
72
|
+
notes?: string | undefined;
|
|
73
73
|
}, {
|
|
74
74
|
amount: number;
|
|
75
75
|
providerReference: string;
|
|
76
76
|
customerPhone: string;
|
|
77
|
+
metadata?: Record<string, any> | undefined;
|
|
77
78
|
provider?: "AIRTEL_MONEY" | "CASH" | "MOMO_PAY" | undefined;
|
|
78
79
|
notes?: string | undefined;
|
|
79
|
-
metadata?: Record<string, any> | undefined;
|
|
80
80
|
}>;
|
|
81
81
|
}, "strip", z.ZodTypeAny, {
|
|
82
|
-
params: {
|
|
83
|
-
id: string;
|
|
84
|
-
};
|
|
85
82
|
body: {
|
|
86
83
|
amount: number;
|
|
87
84
|
provider: "AIRTEL_MONEY" | "CASH" | "MOMO_PAY";
|
|
88
85
|
providerReference: string;
|
|
89
86
|
customerPhone: string;
|
|
90
|
-
notes?: string | undefined;
|
|
91
87
|
metadata?: Record<string, any> | undefined;
|
|
88
|
+
notes?: string | undefined;
|
|
92
89
|
};
|
|
93
|
-
}, {
|
|
94
90
|
params: {
|
|
95
91
|
id: string;
|
|
96
92
|
};
|
|
93
|
+
}, {
|
|
97
94
|
body: {
|
|
98
95
|
amount: number;
|
|
99
96
|
providerReference: string;
|
|
100
97
|
customerPhone: string;
|
|
98
|
+
metadata?: Record<string, any> | undefined;
|
|
101
99
|
provider?: "AIRTEL_MONEY" | "CASH" | "MOMO_PAY" | undefined;
|
|
102
100
|
notes?: string | undefined;
|
|
103
|
-
|
|
101
|
+
};
|
|
102
|
+
params: {
|
|
103
|
+
id: string;
|
|
104
104
|
};
|
|
105
105
|
}>;
|