vr-commons 1.0.109 → 1.0.110
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/middlewares/idempotency.middlewares.d.ts +3 -0
- package/dist/middlewares/idempotency.middlewares.js +74 -0
- package/dist/validations/admin.devicePayment.validations.d.ts +24 -24
- package/dist/validations/admin.devices.validations.d.ts +24 -24
- 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 +6 -6
- 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 +32 -32
- package/dist/validations/moderation.validations.d.ts +114 -114
- package/dist/validations/payinstallment.validations.d.ts +5 -5
- package/dist/validations/pricing.validations.d.ts +16 -16
- package/dist/validations/pricings.validations.d.ts +16 -16
- package/dist/validations/product.validations.d.ts +24 -24
- package/dist/validations/profiles.validations.d.ts +122 -122
- package/dist/validations/suspensions.validations.d.ts +8 -8
- package/dist/validations/users.admin.validations.d.ts +81 -81
- package/package.json +1 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Request, Response, NextFunction } from "express";
|
|
2
|
+
export declare const idempotencyMiddleware: (req: Request, res: Response, next: NextFunction) => Promise<void | Response<any, Record<string, any>>>;
|
|
3
|
+
export declare const storeIdempotencyResponse: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.storeIdempotencyResponse = exports.idempotencyMiddleware = void 0;
|
|
4
|
+
const vr_models_1 = require("vr-models");
|
|
5
|
+
const response_utils_1 = require("../utils/response.utils");
|
|
6
|
+
const idempotencyMiddleware = async (req, res, next) => {
|
|
7
|
+
// Skip for GET requests
|
|
8
|
+
if (req.method === "GET") {
|
|
9
|
+
return next();
|
|
10
|
+
}
|
|
11
|
+
const idempotencyKey = req.headers["idempotency-key"];
|
|
12
|
+
if (!idempotencyKey) {
|
|
13
|
+
return (0, response_utils_1.sendErrorResponse)(res, "Idempotency-Key header is required", 400);
|
|
14
|
+
}
|
|
15
|
+
// Validate UUID format
|
|
16
|
+
const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
17
|
+
if (!uuidRegex.test(idempotencyKey)) {
|
|
18
|
+
return (0, response_utils_1.sendErrorResponse)(res, "Idempotency-Key must be a valid UUID", 400);
|
|
19
|
+
}
|
|
20
|
+
try {
|
|
21
|
+
const existing = await vr_models_1.IdempotencyRecord.findOne({
|
|
22
|
+
where: { key: idempotencyKey },
|
|
23
|
+
});
|
|
24
|
+
if (existing && existing.isValid()) {
|
|
25
|
+
const response = existing.getResponse();
|
|
26
|
+
return res.status(response?.statusCode || 200).json(response?.body);
|
|
27
|
+
}
|
|
28
|
+
if (existing && existing.isExpired()) {
|
|
29
|
+
await vr_models_1.IdempotencyRecord.invalidate(idempotencyKey);
|
|
30
|
+
}
|
|
31
|
+
// Store original response methods
|
|
32
|
+
const originalJson = res.json.bind(res);
|
|
33
|
+
const originalStatus = res.status.bind(res);
|
|
34
|
+
res.json = function (body) {
|
|
35
|
+
res.locals.responseBody = body;
|
|
36
|
+
return originalJson(body);
|
|
37
|
+
};
|
|
38
|
+
res.status = function (code) {
|
|
39
|
+
res.locals.statusCode = code;
|
|
40
|
+
return originalStatus(code);
|
|
41
|
+
};
|
|
42
|
+
req.idempotencyKey = idempotencyKey;
|
|
43
|
+
next();
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
console.error("Idempotency middleware error:", error);
|
|
47
|
+
next(error);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
exports.idempotencyMiddleware = idempotencyMiddleware;
|
|
51
|
+
// Store response after completion
|
|
52
|
+
const storeIdempotencyResponse = async (req, res, next) => {
|
|
53
|
+
if (req.method === "GET" || !req.idempotencyKey) {
|
|
54
|
+
return next();
|
|
55
|
+
}
|
|
56
|
+
try {
|
|
57
|
+
const expiresAt = new Date();
|
|
58
|
+
expiresAt.setHours(expiresAt.getHours() + 24);
|
|
59
|
+
await vr_models_1.IdempotencyRecord.create({
|
|
60
|
+
key: req.idempotencyKey,
|
|
61
|
+
requestMethod: req.method,
|
|
62
|
+
requestPath: req.path,
|
|
63
|
+
requestParams: req.body,
|
|
64
|
+
responseStatusCode: res.locals.statusCode || 200,
|
|
65
|
+
responseBody: res.locals.responseBody || {},
|
|
66
|
+
expiresAt, // Add this
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
console.error("Failed to store idempotency record:", error);
|
|
71
|
+
}
|
|
72
|
+
next();
|
|
73
|
+
};
|
|
74
|
+
exports.storeIdempotencyResponse = storeIdempotencyResponse;
|
|
@@ -43,47 +43,47 @@ 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
|
-
page: number;
|
|
47
46
|
limit: number;
|
|
48
|
-
|
|
49
|
-
userId?: string | undefined;
|
|
47
|
+
page: number;
|
|
50
48
|
search?: string | undefined;
|
|
49
|
+
userId?: string | undefined;
|
|
50
|
+
status?: "ACTIVE" | "DEFAULTED" | "COMPLETED" | "CANCELLED" | undefined;
|
|
51
51
|
sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
|
|
52
|
-
sortOrder?: "
|
|
52
|
+
sortOrder?: "DESC" | "ASC" | undefined;
|
|
53
53
|
deviceId?: string | undefined;
|
|
54
54
|
isOverdue?: "true" | "false" | undefined;
|
|
55
55
|
}, {
|
|
56
|
-
|
|
56
|
+
search?: string | undefined;
|
|
57
|
+
limit?: string | undefined;
|
|
57
58
|
userId?: string | undefined;
|
|
59
|
+
status?: "ACTIVE" | "DEFAULTED" | "COMPLETED" | "CANCELLED" | undefined;
|
|
58
60
|
page?: string | undefined;
|
|
59
|
-
limit?: string | undefined;
|
|
60
|
-
search?: string | undefined;
|
|
61
61
|
sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
|
|
62
|
-
sortOrder?: "
|
|
62
|
+
sortOrder?: "DESC" | "ASC" | undefined;
|
|
63
63
|
deviceId?: string | undefined;
|
|
64
64
|
isOverdue?: "true" | "false" | undefined;
|
|
65
65
|
}>;
|
|
66
66
|
}, "strip", z.ZodTypeAny, {
|
|
67
67
|
query: {
|
|
68
|
-
page: number;
|
|
69
68
|
limit: number;
|
|
70
|
-
|
|
71
|
-
userId?: string | undefined;
|
|
69
|
+
page: number;
|
|
72
70
|
search?: string | undefined;
|
|
71
|
+
userId?: string | undefined;
|
|
72
|
+
status?: "ACTIVE" | "DEFAULTED" | "COMPLETED" | "CANCELLED" | undefined;
|
|
73
73
|
sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
|
|
74
|
-
sortOrder?: "
|
|
74
|
+
sortOrder?: "DESC" | "ASC" | undefined;
|
|
75
75
|
deviceId?: string | undefined;
|
|
76
76
|
isOverdue?: "true" | "false" | undefined;
|
|
77
77
|
};
|
|
78
78
|
}, {
|
|
79
79
|
query: {
|
|
80
|
-
|
|
80
|
+
search?: string | undefined;
|
|
81
|
+
limit?: string | undefined;
|
|
81
82
|
userId?: string | undefined;
|
|
83
|
+
status?: "ACTIVE" | "DEFAULTED" | "COMPLETED" | "CANCELLED" | undefined;
|
|
82
84
|
page?: string | undefined;
|
|
83
|
-
limit?: string | undefined;
|
|
84
|
-
search?: string | undefined;
|
|
85
85
|
sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
|
|
86
|
-
sortOrder?: "
|
|
86
|
+
sortOrder?: "DESC" | "ASC" | undefined;
|
|
87
87
|
deviceId?: string | undefined;
|
|
88
88
|
isOverdue?: "true" | "false" | undefined;
|
|
89
89
|
};
|
|
@@ -192,25 +192,25 @@ export declare const limitedUpdateSchema: z.ZodObject<{
|
|
|
192
192
|
pricingId: string;
|
|
193
193
|
}>;
|
|
194
194
|
}, "strip", z.ZodTypeAny, {
|
|
195
|
-
params: {
|
|
196
|
-
id: string;
|
|
197
|
-
};
|
|
198
195
|
body: {
|
|
199
196
|
userId: string;
|
|
200
197
|
productId: string;
|
|
201
198
|
deviceIds: string[];
|
|
202
199
|
pricingId: string;
|
|
203
200
|
};
|
|
204
|
-
}, {
|
|
205
201
|
params: {
|
|
206
202
|
id: string;
|
|
207
203
|
};
|
|
204
|
+
}, {
|
|
208
205
|
body: {
|
|
209
206
|
userId: string;
|
|
210
207
|
productId: string;
|
|
211
208
|
deviceIds: string[];
|
|
212
209
|
pricingId: string;
|
|
213
210
|
};
|
|
211
|
+
params: {
|
|
212
|
+
id: string;
|
|
213
|
+
};
|
|
214
214
|
}>;
|
|
215
215
|
export declare const recordPaymentSchema: z.ZodObject<{
|
|
216
216
|
params: z.ZodObject<{
|
|
@@ -237,25 +237,25 @@ export declare const recordPaymentSchema: z.ZodObject<{
|
|
|
237
237
|
providerReference?: string | undefined;
|
|
238
238
|
}>;
|
|
239
239
|
}, "strip", z.ZodTypeAny, {
|
|
240
|
-
params: {
|
|
241
|
-
id: string;
|
|
242
|
-
};
|
|
243
240
|
body: {
|
|
244
241
|
amount: number;
|
|
245
242
|
provider: "mtn_momo" | "airtel_money";
|
|
246
243
|
metadata?: Record<string, any> | undefined;
|
|
247
244
|
providerReference?: string | undefined;
|
|
248
245
|
};
|
|
249
|
-
}, {
|
|
250
246
|
params: {
|
|
251
247
|
id: string;
|
|
252
248
|
};
|
|
249
|
+
}, {
|
|
253
250
|
body: {
|
|
254
251
|
amount: number;
|
|
255
252
|
provider: "mtn_momo" | "airtel_money";
|
|
256
253
|
metadata?: Record<string, any> | undefined;
|
|
257
254
|
providerReference?: string | undefined;
|
|
258
255
|
};
|
|
256
|
+
params: {
|
|
257
|
+
id: string;
|
|
258
|
+
};
|
|
259
259
|
}>;
|
|
260
260
|
export declare const deletePlanSchema: z.ZodObject<{
|
|
261
261
|
params: z.ZodObject<{
|
|
@@ -65,23 +65,23 @@ export declare const updateDeviceSchema: z.ZodObject<{
|
|
|
65
65
|
dedicatedUser?: "RIDER" | "PASSENGER" | "N/A" | null | undefined;
|
|
66
66
|
}>;
|
|
67
67
|
}, "strip", z.ZodTypeAny, {
|
|
68
|
-
params: {
|
|
69
|
-
id: string;
|
|
70
|
-
};
|
|
71
68
|
body: {
|
|
72
69
|
status?: "locked" | "unlocked" | "disabled" | undefined;
|
|
73
70
|
serialNumber?: string | undefined;
|
|
74
71
|
dedicatedUser?: "RIDER" | "PASSENGER" | "N/A" | null | undefined;
|
|
75
72
|
};
|
|
76
|
-
}, {
|
|
77
73
|
params: {
|
|
78
74
|
id: string;
|
|
79
75
|
};
|
|
76
|
+
}, {
|
|
80
77
|
body: {
|
|
81
78
|
status?: "locked" | "unlocked" | "disabled" | undefined;
|
|
82
79
|
serialNumber?: string | undefined;
|
|
83
80
|
dedicatedUser?: "RIDER" | "PASSENGER" | "N/A" | null | undefined;
|
|
84
81
|
};
|
|
82
|
+
params: {
|
|
83
|
+
id: string;
|
|
84
|
+
};
|
|
85
85
|
}>;
|
|
86
86
|
export declare const getDeviceSchema: z.ZodObject<{
|
|
87
87
|
params: z.ZodObject<{
|
|
@@ -113,23 +113,23 @@ export declare const getDevicesSchema: z.ZodObject<{
|
|
|
113
113
|
sortBy: z.ZodOptional<z.ZodEnum<["serialNumber", "status", "createdAt", "updatedAt"]>>;
|
|
114
114
|
sortOrder: z.ZodOptional<z.ZodEnum<["ASC", "DESC"]>>;
|
|
115
115
|
}, "strip", z.ZodTypeAny, {
|
|
116
|
+
search?: string | undefined;
|
|
117
|
+
limit?: number | undefined;
|
|
116
118
|
status?: "locked" | "unlocked" | "disabled" | undefined;
|
|
117
119
|
page?: number | undefined;
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
sortBy?: "status" | "createdAt" | "updatedAt" | "serialNumber" | undefined;
|
|
121
|
-
sortOrder?: "ASC" | "DESC" | undefined;
|
|
120
|
+
sortBy?: "createdAt" | "updatedAt" | "status" | "serialNumber" | undefined;
|
|
121
|
+
sortOrder?: "DESC" | "ASC" | undefined;
|
|
122
122
|
productId?: string | undefined;
|
|
123
123
|
dedicatedUser?: "RIDER" | "PASSENGER" | "N/A" | undefined;
|
|
124
124
|
isPermanentlyUnlocked?: "true" | "false" | undefined;
|
|
125
125
|
isAssigned?: "true" | "false" | undefined;
|
|
126
126
|
}, {
|
|
127
|
+
search?: string | undefined;
|
|
128
|
+
limit?: string | undefined;
|
|
127
129
|
status?: "locked" | "unlocked" | "disabled" | undefined;
|
|
128
130
|
page?: string | undefined;
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
sortBy?: "status" | "createdAt" | "updatedAt" | "serialNumber" | undefined;
|
|
132
|
-
sortOrder?: "ASC" | "DESC" | undefined;
|
|
131
|
+
sortBy?: "createdAt" | "updatedAt" | "status" | "serialNumber" | undefined;
|
|
132
|
+
sortOrder?: "DESC" | "ASC" | undefined;
|
|
133
133
|
productId?: string | undefined;
|
|
134
134
|
dedicatedUser?: "RIDER" | "PASSENGER" | "N/A" | undefined;
|
|
135
135
|
isPermanentlyUnlocked?: "true" | "false" | undefined;
|
|
@@ -137,12 +137,12 @@ export declare const getDevicesSchema: z.ZodObject<{
|
|
|
137
137
|
}>;
|
|
138
138
|
}, "strip", z.ZodTypeAny, {
|
|
139
139
|
query: {
|
|
140
|
+
search?: string | undefined;
|
|
141
|
+
limit?: number | undefined;
|
|
140
142
|
status?: "locked" | "unlocked" | "disabled" | undefined;
|
|
141
143
|
page?: number | undefined;
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
sortBy?: "status" | "createdAt" | "updatedAt" | "serialNumber" | undefined;
|
|
145
|
-
sortOrder?: "ASC" | "DESC" | undefined;
|
|
144
|
+
sortBy?: "createdAt" | "updatedAt" | "status" | "serialNumber" | undefined;
|
|
145
|
+
sortOrder?: "DESC" | "ASC" | undefined;
|
|
146
146
|
productId?: string | undefined;
|
|
147
147
|
dedicatedUser?: "RIDER" | "PASSENGER" | "N/A" | undefined;
|
|
148
148
|
isPermanentlyUnlocked?: "true" | "false" | undefined;
|
|
@@ -150,12 +150,12 @@ export declare const getDevicesSchema: z.ZodObject<{
|
|
|
150
150
|
};
|
|
151
151
|
}, {
|
|
152
152
|
query: {
|
|
153
|
+
search?: string | undefined;
|
|
154
|
+
limit?: string | undefined;
|
|
153
155
|
status?: "locked" | "unlocked" | "disabled" | undefined;
|
|
154
156
|
page?: string | undefined;
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
sortBy?: "status" | "createdAt" | "updatedAt" | "serialNumber" | undefined;
|
|
158
|
-
sortOrder?: "ASC" | "DESC" | undefined;
|
|
157
|
+
sortBy?: "createdAt" | "updatedAt" | "status" | "serialNumber" | undefined;
|
|
158
|
+
sortOrder?: "DESC" | "ASC" | undefined;
|
|
159
159
|
productId?: string | undefined;
|
|
160
160
|
dedicatedUser?: "RIDER" | "PASSENGER" | "N/A" | undefined;
|
|
161
161
|
isPermanentlyUnlocked?: "true" | "false" | undefined;
|
|
@@ -242,19 +242,19 @@ export declare const disableDeviceSchema: z.ZodObject<{
|
|
|
242
242
|
reason: string;
|
|
243
243
|
}>;
|
|
244
244
|
}, "strip", z.ZodTypeAny, {
|
|
245
|
-
params: {
|
|
246
|
-
id: string;
|
|
247
|
-
};
|
|
248
245
|
body: {
|
|
249
246
|
reason: string;
|
|
250
247
|
};
|
|
251
|
-
}, {
|
|
252
248
|
params: {
|
|
253
249
|
id: string;
|
|
254
250
|
};
|
|
251
|
+
}, {
|
|
255
252
|
body: {
|
|
256
253
|
reason: string;
|
|
257
254
|
};
|
|
255
|
+
params: {
|
|
256
|
+
id: string;
|
|
257
|
+
};
|
|
258
258
|
}>;
|
|
259
259
|
export declare const makePermanentSchema: z.ZodObject<{
|
|
260
260
|
params: z.ZodObject<{
|
|
@@ -616,9 +616,6 @@ 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
|
-
};
|
|
622
619
|
body: {
|
|
623
620
|
appName?: string | undefined;
|
|
624
621
|
appShortName?: string | null | undefined;
|
|
@@ -695,10 +692,10 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
|
|
|
695
692
|
facebookPixelId?: string | null | undefined;
|
|
696
693
|
sentryDsn?: string | null | undefined;
|
|
697
694
|
};
|
|
698
|
-
}, {
|
|
699
695
|
params: {
|
|
700
696
|
id: string;
|
|
701
697
|
};
|
|
698
|
+
}, {
|
|
702
699
|
body: {
|
|
703
700
|
appName?: string | undefined;
|
|
704
701
|
appShortName?: string | null | undefined;
|
|
@@ -775,6 +772,9 @@ export declare const updateAppSpecsSchema: z.ZodObject<{
|
|
|
775
772
|
facebookPixelId?: string | null | undefined;
|
|
776
773
|
sentryDsn?: string | null | undefined;
|
|
777
774
|
};
|
|
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
|
-
page: number;
|
|
789
788
|
limit: number;
|
|
790
|
-
|
|
789
|
+
page: number;
|
|
791
790
|
search?: string | undefined;
|
|
791
|
+
isActive?: "true" | "false" | undefined;
|
|
792
792
|
sortBy?: "createdAt" | "updatedAt" | "version" | undefined;
|
|
793
|
-
sortOrder?: "
|
|
793
|
+
sortOrder?: "DESC" | "ASC" | undefined;
|
|
794
794
|
}, {
|
|
795
|
+
search?: string | undefined;
|
|
796
|
+
limit?: string | undefined;
|
|
795
797
|
isActive?: "true" | "false" | undefined;
|
|
796
798
|
page?: string | undefined;
|
|
797
|
-
limit?: string | undefined;
|
|
798
|
-
search?: string | undefined;
|
|
799
799
|
sortBy?: "createdAt" | "updatedAt" | "version" | undefined;
|
|
800
|
-
sortOrder?: "
|
|
800
|
+
sortOrder?: "DESC" | "ASC" | undefined;
|
|
801
801
|
}>;
|
|
802
802
|
}, "strip", z.ZodTypeAny, {
|
|
803
803
|
query: {
|
|
804
|
-
page: number;
|
|
805
804
|
limit: number;
|
|
806
|
-
|
|
805
|
+
page: number;
|
|
807
806
|
search?: string | undefined;
|
|
807
|
+
isActive?: "true" | "false" | undefined;
|
|
808
808
|
sortBy?: "createdAt" | "updatedAt" | "version" | undefined;
|
|
809
|
-
sortOrder?: "
|
|
809
|
+
sortOrder?: "DESC" | "ASC" | undefined;
|
|
810
810
|
};
|
|
811
811
|
}, {
|
|
812
812
|
query: {
|
|
813
|
+
search?: string | undefined;
|
|
814
|
+
limit?: string | undefined;
|
|
813
815
|
isActive?: "true" | "false" | undefined;
|
|
814
816
|
page?: string | undefined;
|
|
815
|
-
limit?: string | undefined;
|
|
816
|
-
search?: string | undefined;
|
|
817
817
|
sortBy?: "createdAt" | "updatedAt" | "version" | undefined;
|
|
818
|
-
sortOrder?: "
|
|
818
|
+
sortOrder?: "DESC" | "ASC" | 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
|
-
params: {
|
|
19
|
-
banId: string;
|
|
20
|
-
};
|
|
21
18
|
body: {
|
|
22
19
|
appealReason: string;
|
|
23
20
|
};
|
|
24
|
-
}, {
|
|
25
21
|
params: {
|
|
26
22
|
banId: string;
|
|
27
23
|
};
|
|
24
|
+
}, {
|
|
28
25
|
body: {
|
|
29
26
|
appealReason: string;
|
|
30
27
|
};
|
|
28
|
+
params: {
|
|
29
|
+
banId: 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
|
-
params: {
|
|
49
|
-
suspensionId: string;
|
|
50
|
-
};
|
|
51
48
|
body: {
|
|
52
49
|
appealReason: string;
|
|
53
50
|
};
|
|
54
|
-
}, {
|
|
55
51
|
params: {
|
|
56
52
|
suspensionId: string;
|
|
57
53
|
};
|
|
54
|
+
}, {
|
|
58
55
|
body: {
|
|
59
56
|
appealReason: string;
|
|
60
57
|
};
|
|
58
|
+
params: {
|
|
59
|
+
suspensionId: string;
|
|
60
|
+
};
|
|
61
61
|
}>;
|
|
@@ -89,30 +89,30 @@ export declare const registerSchema: z.ZodObject<{
|
|
|
89
89
|
}, "strict", z.ZodTypeAny, {
|
|
90
90
|
firstName: string;
|
|
91
91
|
lastName: string;
|
|
92
|
-
phoneNumber: string;
|
|
93
92
|
password: string;
|
|
93
|
+
phoneNumber: string;
|
|
94
94
|
email?: string | undefined;
|
|
95
95
|
}, {
|
|
96
96
|
firstName: string;
|
|
97
97
|
lastName: string;
|
|
98
|
-
phoneNumber: string;
|
|
99
98
|
password: string;
|
|
99
|
+
phoneNumber: string;
|
|
100
100
|
email?: string | undefined;
|
|
101
101
|
}>;
|
|
102
102
|
}, "strip", z.ZodTypeAny, {
|
|
103
103
|
body: {
|
|
104
104
|
firstName: string;
|
|
105
105
|
lastName: string;
|
|
106
|
-
phoneNumber: string;
|
|
107
106
|
password: string;
|
|
107
|
+
phoneNumber: string;
|
|
108
108
|
email?: string | undefined;
|
|
109
109
|
};
|
|
110
110
|
}, {
|
|
111
111
|
body: {
|
|
112
112
|
firstName: string;
|
|
113
113
|
lastName: string;
|
|
114
|
-
phoneNumber: string;
|
|
115
114
|
password: string;
|
|
115
|
+
phoneNumber: string;
|
|
116
116
|
email?: string | undefined;
|
|
117
117
|
};
|
|
118
118
|
}>;
|
|
@@ -135,17 +135,17 @@ export declare const riderLoginSchema: z.ZodObject<{
|
|
|
135
135
|
phoneNumber: string;
|
|
136
136
|
nationalId: string;
|
|
137
137
|
};
|
|
138
|
+
query?: {} | undefined;
|
|
138
139
|
params?: {} | undefined;
|
|
139
140
|
headers?: {} | undefined;
|
|
140
|
-
query?: {} | undefined;
|
|
141
141
|
}, {
|
|
142
142
|
body: {
|
|
143
143
|
phoneNumber: string;
|
|
144
144
|
nationalId: string;
|
|
145
145
|
};
|
|
146
|
+
query?: {} | undefined;
|
|
146
147
|
params?: {} | undefined;
|
|
147
148
|
headers?: {} | undefined;
|
|
148
|
-
query?: {} | undefined;
|
|
149
149
|
}>;
|
|
150
150
|
export declare const requestOtpSchema: z.ZodObject<{
|
|
151
151
|
body: z.ZodObject<{
|
|
@@ -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
|
}>;
|
|
@@ -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
|
-
page: number;
|
|
11
10
|
limit: number;
|
|
11
|
+
page: number;
|
|
12
12
|
status?: "ACTIVE" | "DEFAULTED" | "COMPLETED" | "CANCELLED" | undefined;
|
|
13
|
-
sortBy?: "
|
|
14
|
-
sortOrder?: "
|
|
13
|
+
sortBy?: "createdAt" | "updatedAt" | "status" | "nextInstallmentDueAt" | undefined;
|
|
14
|
+
sortOrder?: "DESC" | "ASC" | undefined;
|
|
15
15
|
}, {
|
|
16
|
+
limit?: string | undefined;
|
|
16
17
|
status?: "ACTIVE" | "DEFAULTED" | "COMPLETED" | "CANCELLED" | undefined;
|
|
17
18
|
page?: string | undefined;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
sortOrder?: "ASC" | "DESC" | undefined;
|
|
19
|
+
sortBy?: "createdAt" | "updatedAt" | "status" | "nextInstallmentDueAt" | undefined;
|
|
20
|
+
sortOrder?: "DESC" | "ASC" | undefined;
|
|
21
21
|
}>;
|
|
22
22
|
}, "strip", z.ZodTypeAny, {
|
|
23
23
|
query: {
|
|
24
|
-
page: number;
|
|
25
24
|
limit: number;
|
|
25
|
+
page: number;
|
|
26
26
|
status?: "ACTIVE" | "DEFAULTED" | "COMPLETED" | "CANCELLED" | undefined;
|
|
27
|
-
sortBy?: "
|
|
28
|
-
sortOrder?: "
|
|
27
|
+
sortBy?: "createdAt" | "updatedAt" | "status" | "nextInstallmentDueAt" | undefined;
|
|
28
|
+
sortOrder?: "DESC" | "ASC" | undefined;
|
|
29
29
|
};
|
|
30
30
|
}, {
|
|
31
31
|
query: {
|
|
32
|
+
limit?: string | undefined;
|
|
32
33
|
status?: "ACTIVE" | "DEFAULTED" | "COMPLETED" | "CANCELLED" | undefined;
|
|
33
34
|
page?: string | undefined;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
sortOrder?: "ASC" | "DESC" | undefined;
|
|
35
|
+
sortBy?: "createdAt" | "updatedAt" | "status" | "nextInstallmentDueAt" | undefined;
|
|
36
|
+
sortOrder?: "DESC" | "ASC" | undefined;
|
|
37
37
|
};
|
|
38
38
|
}>;
|
|
39
39
|
export declare const getUserPaymentPlanSchema: z.ZodObject<{
|