vr-commons 1.0.149 → 1.0.150
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/utils/admin.device.utils.d.ts +17 -0
- package/dist/utils/admin.device.utils.js +57 -0
- package/dist/validations/admin.devicePayment.validations.d.ts +24 -24
- package/dist/validations/admin.devices.validations.d.ts +5 -0
- package/dist/validations/admin.devices.validations.js +1 -0
- package/dist/validations/admin.installment.validations.d.ts +8 -8
- package/dist/validations/appSpecs.validations.d.ts +16 -16
- package/dist/validations/appeals.validations.d.ts +8 -8
- package/dist/validations/auth.validations.d.ts +8 -8
- package/dist/validations/bans.validations.d.ts +8 -8
- package/dist/validations/devicePaymentPlan.validations.d.ts +12 -12
- package/dist/validations/eventlogs.admin.validations.d.ts +15 -15
- package/dist/validations/moderation.validations.d.ts +99 -99
- package/dist/validations/pricings.validations.d.ts +30 -30
- package/dist/validations/product.validations.d.ts +24 -24
- package/dist/validations/profiles.validations.d.ts +42 -42
- package/dist/validations/suspensions.validations.d.ts +8 -8
- package/dist/validations/users.admin.validations.d.ts +40 -40
- package/package.json +2 -2
|
@@ -82,4 +82,21 @@ export declare const stockUtil: {
|
|
|
82
82
|
error?: string | undefined;
|
|
83
83
|
devices?: Device[] | undefined;
|
|
84
84
|
};
|
|
85
|
+
/**
|
|
86
|
+
* Check if pair exists and is not soft deleted
|
|
87
|
+
*/
|
|
88
|
+
checkPairExists(pairId: string, productId: string, transaction?: any): Promise<{
|
|
89
|
+
exists: boolean;
|
|
90
|
+
devices?: Device[];
|
|
91
|
+
missing?: string[];
|
|
92
|
+
}>;
|
|
93
|
+
/**
|
|
94
|
+
* Check if pair IDs exist and are not soft deleted (for bulk operations)
|
|
95
|
+
*/
|
|
96
|
+
checkMultiplePairsExist(pairIds: string[], productId: string, transaction?: any): Promise<{
|
|
97
|
+
valid: boolean;
|
|
98
|
+
existingPairs: string[];
|
|
99
|
+
missingPairs: string[];
|
|
100
|
+
incompletePairs: string[];
|
|
101
|
+
}>;
|
|
85
102
|
};
|
|
@@ -251,6 +251,7 @@ exports.stockUtil = {
|
|
|
251
251
|
return await vr_models_1.Device.findAll({
|
|
252
252
|
where: {
|
|
253
253
|
pairId: { [sequelize_1.Op.in]: pairIds },
|
|
254
|
+
deletedAt: null, // ✅ Exclude soft deleted
|
|
254
255
|
},
|
|
255
256
|
include: [{ model: vr_models_1.DevicePaymentPlan, as: "paymentPlan" }],
|
|
256
257
|
transaction,
|
|
@@ -288,4 +289,60 @@ exports.stockUtil = {
|
|
|
288
289
|
}
|
|
289
290
|
return { valid: true };
|
|
290
291
|
},
|
|
292
|
+
/**
|
|
293
|
+
* Check if pair exists and is not soft deleted
|
|
294
|
+
*/
|
|
295
|
+
async checkPairExists(pairId, productId, transaction) {
|
|
296
|
+
const devices = await vr_models_1.Device.findAll({
|
|
297
|
+
where: {
|
|
298
|
+
pairId: pairId,
|
|
299
|
+
productId: productId,
|
|
300
|
+
deletedAt: null, // ✅ Exclude soft deleted
|
|
301
|
+
},
|
|
302
|
+
transaction,
|
|
303
|
+
});
|
|
304
|
+
if (devices.length === 0) {
|
|
305
|
+
return { exists: false, missing: ["RIDER", "PASSENGER"] };
|
|
306
|
+
}
|
|
307
|
+
const hasRider = devices.some((d) => d.dedicatedUser === "RIDER");
|
|
308
|
+
const hasPassenger = devices.some((d) => d.dedicatedUser === "PASSENGER");
|
|
309
|
+
const missing = [];
|
|
310
|
+
if (!hasRider)
|
|
311
|
+
missing.push("RIDER");
|
|
312
|
+
if (!hasPassenger)
|
|
313
|
+
missing.push("PASSENGER");
|
|
314
|
+
return {
|
|
315
|
+
exists: devices.length === 2 && hasRider && hasPassenger,
|
|
316
|
+
devices: devices,
|
|
317
|
+
missing: missing,
|
|
318
|
+
};
|
|
319
|
+
},
|
|
320
|
+
/**
|
|
321
|
+
* Check if pair IDs exist and are not soft deleted (for bulk operations)
|
|
322
|
+
*/
|
|
323
|
+
async checkMultiplePairsExist(pairIds, productId, transaction) {
|
|
324
|
+
const existingPairs = [];
|
|
325
|
+
const missingPairs = [];
|
|
326
|
+
const incompletePairs = [];
|
|
327
|
+
for (const pairId of pairIds) {
|
|
328
|
+
const result = await this.checkPairExists(pairId, productId, transaction);
|
|
329
|
+
if (!result.exists) {
|
|
330
|
+
if (result.devices && result.devices.length === 1) {
|
|
331
|
+
incompletePairs.push(pairId);
|
|
332
|
+
}
|
|
333
|
+
else {
|
|
334
|
+
missingPairs.push(pairId);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
else {
|
|
338
|
+
existingPairs.push(pairId);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
return {
|
|
342
|
+
valid: existingPairs.length === pairIds.length,
|
|
343
|
+
existingPairs,
|
|
344
|
+
missingPairs,
|
|
345
|
+
incompletePairs,
|
|
346
|
+
};
|
|
347
|
+
},
|
|
291
348
|
};
|
|
@@ -43,48 +43,48 @@ export declare const listPlansSchema: z.ZodObject<{
|
|
|
43
43
|
sortBy: z.ZodOptional<z.ZodEnum<["createdAt", "updatedAt", "nextInstallmentDueAt", "paidAmount", "outstandingAmount"]>>;
|
|
44
44
|
sortOrder: z.ZodOptional<z.ZodEnum<["ASC", "DESC"]>>;
|
|
45
45
|
}, "strip", z.ZodTypeAny, {
|
|
46
|
-
limit: number;
|
|
47
46
|
page: number;
|
|
48
|
-
|
|
47
|
+
limit: number;
|
|
49
48
|
status?: "ACTIVE" | "PENDING" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
|
|
49
|
+
search?: string | undefined;
|
|
50
|
+
sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
|
|
51
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
50
52
|
userId?: string | undefined;
|
|
51
53
|
isOverdue?: "true" | "false" | undefined;
|
|
52
|
-
sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
|
|
53
|
-
sortOrder?: "DESC" | "ASC" | undefined;
|
|
54
54
|
deviceId?: string | undefined;
|
|
55
55
|
}, {
|
|
56
|
+
status?: "ACTIVE" | "PENDING" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
|
|
57
|
+
page?: string | undefined;
|
|
56
58
|
limit?: string | undefined;
|
|
57
59
|
search?: string | undefined;
|
|
58
|
-
|
|
60
|
+
sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
|
|
61
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
59
62
|
userId?: string | undefined;
|
|
60
63
|
isOverdue?: "true" | "false" | undefined;
|
|
61
|
-
page?: string | undefined;
|
|
62
|
-
sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
|
|
63
|
-
sortOrder?: "DESC" | "ASC" | undefined;
|
|
64
64
|
deviceId?: string | undefined;
|
|
65
65
|
}>;
|
|
66
66
|
}, "strip", z.ZodTypeAny, {
|
|
67
67
|
query: {
|
|
68
|
-
limit: number;
|
|
69
68
|
page: number;
|
|
70
|
-
|
|
69
|
+
limit: number;
|
|
71
70
|
status?: "ACTIVE" | "PENDING" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
|
|
71
|
+
search?: string | undefined;
|
|
72
|
+
sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
|
|
73
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
72
74
|
userId?: string | undefined;
|
|
73
75
|
isOverdue?: "true" | "false" | undefined;
|
|
74
|
-
sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
|
|
75
|
-
sortOrder?: "DESC" | "ASC" | undefined;
|
|
76
76
|
deviceId?: string | undefined;
|
|
77
77
|
};
|
|
78
78
|
}, {
|
|
79
79
|
query: {
|
|
80
|
+
status?: "ACTIVE" | "PENDING" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
|
|
81
|
+
page?: string | undefined;
|
|
80
82
|
limit?: string | undefined;
|
|
81
83
|
search?: string | undefined;
|
|
82
|
-
|
|
84
|
+
sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
|
|
85
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
83
86
|
userId?: string | undefined;
|
|
84
87
|
isOverdue?: "true" | "false" | undefined;
|
|
85
|
-
page?: string | undefined;
|
|
86
|
-
sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
|
|
87
|
-
sortOrder?: "DESC" | "ASC" | undefined;
|
|
88
88
|
deviceId?: string | undefined;
|
|
89
89
|
};
|
|
90
90
|
}>;
|
|
@@ -192,25 +192,25 @@ export declare const limitedUpdateSchema: z.ZodObject<{
|
|
|
192
192
|
pricingId?: string | undefined;
|
|
193
193
|
}>;
|
|
194
194
|
}, "strip", z.ZodTypeAny, {
|
|
195
|
+
params: {
|
|
196
|
+
id: string;
|
|
197
|
+
};
|
|
195
198
|
body: {
|
|
196
199
|
productId?: string | undefined;
|
|
197
200
|
userId?: string | undefined;
|
|
198
201
|
deviceIds?: string[] | undefined;
|
|
199
202
|
pricingId?: string | undefined;
|
|
200
203
|
};
|
|
204
|
+
}, {
|
|
201
205
|
params: {
|
|
202
206
|
id: string;
|
|
203
207
|
};
|
|
204
|
-
}, {
|
|
205
208
|
body: {
|
|
206
209
|
productId?: string | undefined;
|
|
207
210
|
userId?: string | undefined;
|
|
208
211
|
deviceIds?: string[] | undefined;
|
|
209
212
|
pricingId?: string | undefined;
|
|
210
213
|
};
|
|
211
|
-
params: {
|
|
212
|
-
id: string;
|
|
213
|
-
};
|
|
214
214
|
}>;
|
|
215
215
|
export declare const recordPaymentSchema: z.ZodObject<{
|
|
216
216
|
params: z.ZodObject<{
|
|
@@ -246,6 +246,9 @@ export declare const recordPaymentSchema: z.ZodObject<{
|
|
|
246
246
|
notes?: string | undefined;
|
|
247
247
|
}>;
|
|
248
248
|
}, "strip", z.ZodTypeAny, {
|
|
249
|
+
params: {
|
|
250
|
+
id: string;
|
|
251
|
+
};
|
|
249
252
|
body: {
|
|
250
253
|
amount: number;
|
|
251
254
|
provider: "AIRTEL_MONEY" | "CASH" | "MOMO_PAY";
|
|
@@ -255,10 +258,10 @@ export declare const recordPaymentSchema: z.ZodObject<{
|
|
|
255
258
|
customerName?: string | undefined;
|
|
256
259
|
notes?: string | undefined;
|
|
257
260
|
};
|
|
261
|
+
}, {
|
|
258
262
|
params: {
|
|
259
263
|
id: string;
|
|
260
264
|
};
|
|
261
|
-
}, {
|
|
262
265
|
body: {
|
|
263
266
|
amount: number;
|
|
264
267
|
metadata?: Record<string, any> | undefined;
|
|
@@ -268,9 +271,6 @@ export declare const recordPaymentSchema: z.ZodObject<{
|
|
|
268
271
|
customerName?: string | undefined;
|
|
269
272
|
notes?: string | undefined;
|
|
270
273
|
};
|
|
271
|
-
params: {
|
|
272
|
-
id: string;
|
|
273
|
-
};
|
|
274
274
|
}>;
|
|
275
275
|
export declare const deletePlanSchema: z.ZodObject<{
|
|
276
276
|
params: z.ZodObject<{
|
|
@@ -111,18 +111,23 @@ export declare const getDevicesSchema: z.ZodObject<{
|
|
|
111
111
|
export declare const deleteDevicesByPairsSchema: z.ZodObject<{
|
|
112
112
|
body: z.ZodObject<{
|
|
113
113
|
pairIds: z.ZodArray<z.ZodString, "many">;
|
|
114
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
114
115
|
}, "strip", z.ZodTypeAny, {
|
|
115
116
|
pairIds: string[];
|
|
117
|
+
reason?: string | undefined;
|
|
116
118
|
}, {
|
|
117
119
|
pairIds: string[];
|
|
120
|
+
reason?: string | undefined;
|
|
118
121
|
}>;
|
|
119
122
|
}, "strip", z.ZodTypeAny, {
|
|
120
123
|
body: {
|
|
121
124
|
pairIds: string[];
|
|
125
|
+
reason?: string | undefined;
|
|
122
126
|
};
|
|
123
127
|
}, {
|
|
124
128
|
body: {
|
|
125
129
|
pairIds: string[];
|
|
130
|
+
reason?: string | undefined;
|
|
126
131
|
};
|
|
127
132
|
}>;
|
|
128
133
|
export declare const permanentDeleteDevicesByPairsSchema: z.ZodObject<{
|
|
@@ -66,6 +66,7 @@ exports.deleteDevicesByPairsSchema = zod_1.z.object({
|
|
|
66
66
|
pairIds: zod_1.z
|
|
67
67
|
.array(zod_1.z.string().regex(exports.PAIR_ID_REGEX, PAIR_ID_ERROR))
|
|
68
68
|
.min(1, "At least one pair ID required"),
|
|
69
|
+
reason: zod_1.z.string().optional(),
|
|
69
70
|
}),
|
|
70
71
|
});
|
|
71
72
|
// Permanent delete by pair IDs (SUPER_ADMIN only)
|
|
@@ -6,28 +6,28 @@ 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;
|
|
10
9
|
status?: "PENDING" | "PAID" | "OVERDUE" | "SKIPPED" | undefined;
|
|
11
10
|
page?: number | undefined;
|
|
11
|
+
limit?: number | undefined;
|
|
12
12
|
planId?: string | undefined;
|
|
13
13
|
}, {
|
|
14
|
-
limit?: string | undefined;
|
|
15
14
|
status?: "PENDING" | "PAID" | "OVERDUE" | "SKIPPED" | undefined;
|
|
16
15
|
page?: string | undefined;
|
|
16
|
+
limit?: string | undefined;
|
|
17
17
|
planId?: string | undefined;
|
|
18
18
|
}>;
|
|
19
19
|
}, "strip", z.ZodTypeAny, {
|
|
20
20
|
query: {
|
|
21
|
-
limit?: number | undefined;
|
|
22
21
|
status?: "PENDING" | "PAID" | "OVERDUE" | "SKIPPED" | undefined;
|
|
23
22
|
page?: number | undefined;
|
|
23
|
+
limit?: number | undefined;
|
|
24
24
|
planId?: string | undefined;
|
|
25
25
|
};
|
|
26
26
|
}, {
|
|
27
27
|
query: {
|
|
28
|
-
limit?: string | undefined;
|
|
29
28
|
status?: "PENDING" | "PAID" | "OVERDUE" | "SKIPPED" | undefined;
|
|
30
29
|
page?: string | undefined;
|
|
30
|
+
limit?: string | undefined;
|
|
31
31
|
planId?: string | undefined;
|
|
32
32
|
};
|
|
33
33
|
}>;
|
|
@@ -79,6 +79,9 @@ export declare const payInstallmentSchema: z.ZodObject<{
|
|
|
79
79
|
notes?: string | undefined;
|
|
80
80
|
}>;
|
|
81
81
|
}, "strip", z.ZodTypeAny, {
|
|
82
|
+
params: {
|
|
83
|
+
id: string;
|
|
84
|
+
};
|
|
82
85
|
body: {
|
|
83
86
|
amount: number;
|
|
84
87
|
provider: "AIRTEL_MONEY" | "CASH" | "MOMO_PAY";
|
|
@@ -87,10 +90,10 @@ export declare const payInstallmentSchema: z.ZodObject<{
|
|
|
87
90
|
metadata?: Record<string, any> | undefined;
|
|
88
91
|
notes?: string | undefined;
|
|
89
92
|
};
|
|
93
|
+
}, {
|
|
90
94
|
params: {
|
|
91
95
|
id: string;
|
|
92
96
|
};
|
|
93
|
-
}, {
|
|
94
97
|
body: {
|
|
95
98
|
amount: number;
|
|
96
99
|
providerReference: string;
|
|
@@ -99,7 +102,4 @@ export declare const payInstallmentSchema: z.ZodObject<{
|
|
|
99
102
|
provider?: "AIRTEL_MONEY" | "CASH" | "MOMO_PAY" | undefined;
|
|
100
103
|
notes?: string | undefined;
|
|
101
104
|
};
|
|
102
|
-
params: {
|
|
103
|
-
id: string;
|
|
104
|
-
};
|
|
105
105
|
}>;
|
|
@@ -616,6 +616,9 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
|
|
|
616
616
|
sentryDsn?: string | null | undefined;
|
|
617
617
|
}>;
|
|
618
618
|
}, "strip", z.ZodTypeAny, {
|
|
619
|
+
params: {
|
|
620
|
+
id: string;
|
|
621
|
+
};
|
|
619
622
|
body: {
|
|
620
623
|
appName?: string | undefined;
|
|
621
624
|
appShortName?: string | null | undefined;
|
|
@@ -692,10 +695,10 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
|
|
|
692
695
|
facebookPixelId?: string | null | undefined;
|
|
693
696
|
sentryDsn?: string | null | undefined;
|
|
694
697
|
};
|
|
698
|
+
}, {
|
|
695
699
|
params: {
|
|
696
700
|
id: string;
|
|
697
701
|
};
|
|
698
|
-
}, {
|
|
699
702
|
body: {
|
|
700
703
|
appName?: string | undefined;
|
|
701
704
|
appShortName?: string | null | undefined;
|
|
@@ -772,9 +775,6 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
|
|
|
772
775
|
facebookPixelId?: string | null | undefined;
|
|
773
776
|
sentryDsn?: string | null | undefined;
|
|
774
777
|
};
|
|
775
|
-
params: {
|
|
776
|
-
id: string;
|
|
777
|
-
};
|
|
778
778
|
}>;
|
|
779
779
|
export declare const listAppSpecsSchema: z.ZodObject<{
|
|
780
780
|
query: z.ZodObject<{
|
|
@@ -785,37 +785,37 @@ export declare const listAppSpecsSchema: z.ZodObject<{
|
|
|
785
785
|
sortBy: z.ZodOptional<z.ZodEnum<["version", "createdAt", "updatedAt"]>>;
|
|
786
786
|
sortOrder: z.ZodOptional<z.ZodEnum<["ASC", "DESC"]>>;
|
|
787
787
|
}, "strip", z.ZodTypeAny, {
|
|
788
|
-
limit: number;
|
|
789
788
|
page: number;
|
|
789
|
+
limit: number;
|
|
790
790
|
search?: string | undefined;
|
|
791
|
-
isActive?: "true" | "false" | undefined;
|
|
792
791
|
sortBy?: "createdAt" | "updatedAt" | "version" | undefined;
|
|
793
|
-
sortOrder?: "
|
|
792
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
793
|
+
isActive?: "true" | "false" | undefined;
|
|
794
794
|
}, {
|
|
795
|
+
page?: string | undefined;
|
|
795
796
|
limit?: string | undefined;
|
|
796
797
|
search?: string | undefined;
|
|
797
|
-
isActive?: "true" | "false" | undefined;
|
|
798
|
-
page?: string | undefined;
|
|
799
798
|
sortBy?: "createdAt" | "updatedAt" | "version" | undefined;
|
|
800
|
-
sortOrder?: "
|
|
799
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
800
|
+
isActive?: "true" | "false" | undefined;
|
|
801
801
|
}>;
|
|
802
802
|
}, "strip", z.ZodTypeAny, {
|
|
803
803
|
query: {
|
|
804
|
-
limit: number;
|
|
805
804
|
page: number;
|
|
805
|
+
limit: number;
|
|
806
806
|
search?: string | undefined;
|
|
807
|
-
isActive?: "true" | "false" | undefined;
|
|
808
807
|
sortBy?: "createdAt" | "updatedAt" | "version" | undefined;
|
|
809
|
-
sortOrder?: "
|
|
808
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
809
|
+
isActive?: "true" | "false" | undefined;
|
|
810
810
|
};
|
|
811
811
|
}, {
|
|
812
812
|
query: {
|
|
813
|
+
page?: string | undefined;
|
|
813
814
|
limit?: string | undefined;
|
|
814
815
|
search?: string | undefined;
|
|
815
|
-
isActive?: "true" | "false" | undefined;
|
|
816
|
-
page?: string | undefined;
|
|
817
816
|
sortBy?: "createdAt" | "updatedAt" | "version" | undefined;
|
|
818
|
-
sortOrder?: "
|
|
817
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
818
|
+
isActive?: "true" | "false" | undefined;
|
|
819
819
|
};
|
|
820
820
|
}>;
|
|
821
821
|
export declare const getAppSpecsSchema: z.ZodObject<{
|
|
@@ -15,19 +15,19 @@ export declare const submitBanAppealSchema: z.ZodObject<{
|
|
|
15
15
|
appealReason: string;
|
|
16
16
|
}>;
|
|
17
17
|
}, "strip", z.ZodTypeAny, {
|
|
18
|
-
body: {
|
|
19
|
-
appealReason: string;
|
|
20
|
-
};
|
|
21
18
|
params: {
|
|
22
19
|
banId: string;
|
|
23
20
|
};
|
|
24
|
-
}, {
|
|
25
21
|
body: {
|
|
26
22
|
appealReason: string;
|
|
27
23
|
};
|
|
24
|
+
}, {
|
|
28
25
|
params: {
|
|
29
26
|
banId: string;
|
|
30
27
|
};
|
|
28
|
+
body: {
|
|
29
|
+
appealReason: string;
|
|
30
|
+
};
|
|
31
31
|
}>;
|
|
32
32
|
export declare const submitSuspensionAppealSchema: z.ZodObject<{
|
|
33
33
|
params: z.ZodObject<{
|
|
@@ -45,17 +45,17 @@ export declare const submitSuspensionAppealSchema: z.ZodObject<{
|
|
|
45
45
|
appealReason: string;
|
|
46
46
|
}>;
|
|
47
47
|
}, "strip", z.ZodTypeAny, {
|
|
48
|
-
body: {
|
|
49
|
-
appealReason: string;
|
|
50
|
-
};
|
|
51
48
|
params: {
|
|
52
49
|
suspensionId: string;
|
|
53
50
|
};
|
|
54
|
-
}, {
|
|
55
51
|
body: {
|
|
56
52
|
appealReason: string;
|
|
57
53
|
};
|
|
54
|
+
}, {
|
|
58
55
|
params: {
|
|
59
56
|
suspensionId: string;
|
|
60
57
|
};
|
|
58
|
+
body: {
|
|
59
|
+
appealReason: string;
|
|
60
|
+
};
|
|
61
61
|
}>;
|
|
@@ -98,7 +98,7 @@ export declare const registerSchema: z.ZodObject<{
|
|
|
98
98
|
firstName: string;
|
|
99
99
|
lastName: string;
|
|
100
100
|
password: string;
|
|
101
|
-
role: "
|
|
101
|
+
role: "PASSENGER" | "RIDER";
|
|
102
102
|
contactValue: string;
|
|
103
103
|
gender?: "male" | "female" | undefined;
|
|
104
104
|
birthDate?: number | undefined;
|
|
@@ -113,14 +113,14 @@ export declare const registerSchema: z.ZodObject<{
|
|
|
113
113
|
birthDate?: number | undefined;
|
|
114
114
|
birthMonth?: number | undefined;
|
|
115
115
|
birthYear?: number | undefined;
|
|
116
|
-
role?: "
|
|
116
|
+
role?: "PASSENGER" | "RIDER" | undefined;
|
|
117
117
|
}>;
|
|
118
118
|
}, "strip", z.ZodTypeAny, {
|
|
119
119
|
body: {
|
|
120
120
|
firstName: string;
|
|
121
121
|
lastName: string;
|
|
122
122
|
password: string;
|
|
123
|
-
role: "
|
|
123
|
+
role: "PASSENGER" | "RIDER";
|
|
124
124
|
contactValue: string;
|
|
125
125
|
gender?: "male" | "female" | undefined;
|
|
126
126
|
birthDate?: number | undefined;
|
|
@@ -137,7 +137,7 @@ export declare const registerSchema: z.ZodObject<{
|
|
|
137
137
|
birthDate?: number | undefined;
|
|
138
138
|
birthMonth?: number | undefined;
|
|
139
139
|
birthYear?: number | undefined;
|
|
140
|
-
role?: "
|
|
140
|
+
role?: "PASSENGER" | "RIDER" | undefined;
|
|
141
141
|
};
|
|
142
142
|
}>;
|
|
143
143
|
export declare const riderPasswordRegex: RegExp;
|
|
@@ -362,7 +362,7 @@ export declare const createUserSchema: z.ZodObject<{
|
|
|
362
362
|
firstName: string;
|
|
363
363
|
lastName: string;
|
|
364
364
|
password: string;
|
|
365
|
-
role: "
|
|
365
|
+
role: "PASSENGER" | "RIDER" | "ADMIN" | "AGENT" | "SUPER_ADMIN";
|
|
366
366
|
contactValue: string;
|
|
367
367
|
jacketId?: string | undefined;
|
|
368
368
|
plateNumber?: string | undefined;
|
|
@@ -374,7 +374,7 @@ export declare const createUserSchema: z.ZodObject<{
|
|
|
374
374
|
firstName: string;
|
|
375
375
|
lastName: string;
|
|
376
376
|
password: string;
|
|
377
|
-
role: "
|
|
377
|
+
role: "PASSENGER" | "RIDER" | "ADMIN" | "AGENT" | "SUPER_ADMIN";
|
|
378
378
|
contactValue: string;
|
|
379
379
|
jacketId?: string | undefined;
|
|
380
380
|
plateNumber?: string | undefined;
|
|
@@ -388,7 +388,7 @@ export declare const createUserSchema: z.ZodObject<{
|
|
|
388
388
|
firstName: string;
|
|
389
389
|
lastName: string;
|
|
390
390
|
password: string;
|
|
391
|
-
role: "
|
|
391
|
+
role: "PASSENGER" | "RIDER" | "ADMIN" | "AGENT" | "SUPER_ADMIN";
|
|
392
392
|
contactValue: string;
|
|
393
393
|
jacketId?: string | undefined;
|
|
394
394
|
plateNumber?: string | undefined;
|
|
@@ -402,7 +402,7 @@ export declare const createUserSchema: z.ZodObject<{
|
|
|
402
402
|
firstName: string;
|
|
403
403
|
lastName: string;
|
|
404
404
|
password: string;
|
|
405
|
-
role: "
|
|
405
|
+
role: "PASSENGER" | "RIDER" | "ADMIN" | "AGENT" | "SUPER_ADMIN";
|
|
406
406
|
contactValue: string;
|
|
407
407
|
jacketId?: string | undefined;
|
|
408
408
|
plateNumber?: string | undefined;
|
|
@@ -32,19 +32,19 @@ export declare const getUserRestrictionsSchema: z.ZodObject<{
|
|
|
32
32
|
includeResolved?: "true" | "false" | undefined;
|
|
33
33
|
}>;
|
|
34
34
|
}, "strip", z.ZodTypeAny, {
|
|
35
|
-
query: {
|
|
36
|
-
includeResolved?: "true" | "false" | undefined;
|
|
37
|
-
};
|
|
38
35
|
params: {
|
|
39
36
|
userId: string;
|
|
40
37
|
};
|
|
41
|
-
}, {
|
|
42
38
|
query: {
|
|
43
39
|
includeResolved?: "true" | "false" | undefined;
|
|
44
40
|
};
|
|
41
|
+
}, {
|
|
45
42
|
params: {
|
|
46
43
|
userId: string;
|
|
47
44
|
};
|
|
45
|
+
query: {
|
|
46
|
+
includeResolved?: "true" | "false" | undefined;
|
|
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
|
+
};
|
|
68
71
|
body: {
|
|
69
72
|
reason: string;
|
|
70
73
|
isPermanent: boolean;
|
|
71
74
|
};
|
|
75
|
+
}, {
|
|
72
76
|
params: {
|
|
73
77
|
userId: string;
|
|
74
78
|
};
|
|
75
|
-
}, {
|
|
76
79
|
body: {
|
|
77
80
|
reason: string;
|
|
78
81
|
isPermanent?: boolean | undefined;
|
|
79
82
|
};
|
|
80
|
-
params: {
|
|
81
|
-
userId: string;
|
|
82
|
-
};
|
|
83
83
|
}>;
|
|
@@ -7,33 +7,33 @@ export declare const listUserPaymentPlansSchema: z.ZodObject<{
|
|
|
7
7
|
sortBy: z.ZodOptional<z.ZodEnum<["createdAt", "updatedAt", "nextInstallmentDueAt", "status"]>>;
|
|
8
8
|
sortOrder: z.ZodOptional<z.ZodEnum<["ASC", "DESC"]>>;
|
|
9
9
|
}, "strip", z.ZodTypeAny, {
|
|
10
|
-
limit: number;
|
|
11
10
|
page: number;
|
|
11
|
+
limit: number;
|
|
12
12
|
status?: "ACTIVE" | "PENDING" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
|
|
13
|
-
sortBy?: "
|
|
14
|
-
sortOrder?: "
|
|
13
|
+
sortBy?: "status" | "createdAt" | "updatedAt" | "nextInstallmentDueAt" | undefined;
|
|
14
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
15
15
|
}, {
|
|
16
|
-
limit?: string | undefined;
|
|
17
16
|
status?: "ACTIVE" | "PENDING" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
|
|
18
17
|
page?: string | undefined;
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
limit?: string | undefined;
|
|
19
|
+
sortBy?: "status" | "createdAt" | "updatedAt" | "nextInstallmentDueAt" | undefined;
|
|
20
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
21
21
|
}>;
|
|
22
22
|
}, "strip", z.ZodTypeAny, {
|
|
23
23
|
query: {
|
|
24
|
-
limit: number;
|
|
25
24
|
page: number;
|
|
25
|
+
limit: number;
|
|
26
26
|
status?: "ACTIVE" | "PENDING" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
|
|
27
|
-
sortBy?: "
|
|
28
|
-
sortOrder?: "
|
|
27
|
+
sortBy?: "status" | "createdAt" | "updatedAt" | "nextInstallmentDueAt" | undefined;
|
|
28
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
29
29
|
};
|
|
30
30
|
}, {
|
|
31
31
|
query: {
|
|
32
|
-
limit?: string | undefined;
|
|
33
32
|
status?: "ACTIVE" | "PENDING" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
|
|
34
33
|
page?: string | undefined;
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
limit?: string | undefined;
|
|
35
|
+
sortBy?: "status" | "createdAt" | "updatedAt" | "nextInstallmentDueAt" | undefined;
|
|
36
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
37
37
|
};
|
|
38
38
|
}>;
|
|
39
39
|
export declare const getUserPaymentPlanSchema: z.ZodObject<{
|