vr-commons 1.0.177 → 1.0.178
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/admin.devicePayments.utils.d.ts +2 -1
- package/dist/utils/admin/admin.devicePayments.utils.js +13 -9
- package/dist/utils/users/users.verification.utils.js +2 -2
- package/dist/validations/admin/admin.bans.validations.d.ts +8 -8
- package/dist/validations/admin/admin.devicePayments.validations.d.ts +59 -59
- package/dist/validations/admin/admin.devicePayments.validations.js +1 -1
- package/dist/validations/admin/admin.devices.validations.d.ts +22 -22
- 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.installments.validations.js +1 -1
- package/dist/validations/admin/admin.pricings.validations.d.ts +60 -60
- 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/shared/shared.appSpecs.validations.d.ts +14 -14
- 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
|
@@ -7,7 +7,8 @@ export interface DeleteCheckResult {
|
|
|
7
7
|
export declare const DPP_OperationsUtil: {
|
|
8
8
|
/**
|
|
9
9
|
* Check if a payment plan can be deleted
|
|
10
|
-
*
|
|
10
|
+
* Financial records are permanent: delete only plans with no payments and
|
|
11
|
+
* no installments of any status.
|
|
11
12
|
*/
|
|
12
13
|
canDeletePlan(planId: string, transaction?: Transaction): Promise<DeleteCheckResult>;
|
|
13
14
|
/**
|
|
@@ -5,7 +5,8 @@ const vr_models_1 = require("vr-models");
|
|
|
5
5
|
exports.DPP_OperationsUtil = {
|
|
6
6
|
/**
|
|
7
7
|
* Check if a payment plan can be deleted
|
|
8
|
-
*
|
|
8
|
+
* Financial records are permanent: delete only plans with no payments and
|
|
9
|
+
* no installments of any status.
|
|
9
10
|
*/
|
|
10
11
|
async canDeletePlan(planId, transaction) {
|
|
11
12
|
// Check if any payments exist for this plan
|
|
@@ -19,18 +20,14 @@ exports.DPP_OperationsUtil = {
|
|
|
19
20
|
reason: `Cannot delete plan with ${paymentCount} payment(s) already recorded`,
|
|
20
21
|
};
|
|
21
22
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
where: {
|
|
25
|
-
devicePaymentPlanId: planId,
|
|
26
|
-
status: "PAID",
|
|
27
|
-
},
|
|
23
|
+
const installmentCount = await vr_models_1.Installment.count({
|
|
24
|
+
where: { devicePaymentPlanId: planId },
|
|
28
25
|
transaction,
|
|
29
26
|
});
|
|
30
|
-
if (
|
|
27
|
+
if (installmentCount > 0) {
|
|
31
28
|
return {
|
|
32
29
|
canDelete: false,
|
|
33
|
-
reason:
|
|
30
|
+
reason: `Cannot delete plan with ${installmentCount} installment(s) recorded`,
|
|
34
31
|
};
|
|
35
32
|
}
|
|
36
33
|
return { canDelete: true };
|
|
@@ -157,6 +154,7 @@ exports.DPP_OperationsUtil = {
|
|
|
157
154
|
const planData = {
|
|
158
155
|
id: plan.id,
|
|
159
156
|
userId: plan.userId,
|
|
157
|
+
productId: plan.productId,
|
|
160
158
|
pricingSnapshot: plan.pricingSnapshot,
|
|
161
159
|
totalAmount: plan.totalAmount, // ✅ Added
|
|
162
160
|
paidAmount: plan.paidAmount,
|
|
@@ -177,6 +175,7 @@ exports.DPP_OperationsUtil = {
|
|
|
177
175
|
return {
|
|
178
176
|
id: planData.id,
|
|
179
177
|
userId: planData.userId,
|
|
178
|
+
productId: planData.productId,
|
|
180
179
|
pricingSnapshot: {
|
|
181
180
|
id: planData.pricingSnapshot?.id || null,
|
|
182
181
|
name: planData.pricingSnapshot?.name || null,
|
|
@@ -190,7 +189,12 @@ exports.DPP_OperationsUtil = {
|
|
|
190
189
|
autoLockOnMiss: planData.pricingSnapshot?.autoLockOnMiss ?? true,
|
|
191
190
|
minOrderQuantity: planData.pricingSnapshot?.minOrderQuantity || 1,
|
|
192
191
|
maxOrderQuantity: planData.pricingSnapshot?.maxOrderQuantity || 1,
|
|
192
|
+
productId: planData.pricingSnapshot?.productId || planData.productId,
|
|
193
|
+
productName: planData.pricingSnapshot?.productName || null,
|
|
194
|
+
pairId: planData.pricingSnapshot?.pairId || null,
|
|
195
|
+
deviceIds: planData.pricingSnapshot?.deviceIds || [],
|
|
193
196
|
},
|
|
197
|
+
historicalDeviceIds: planData.pricingSnapshot?.deviceIds || [],
|
|
194
198
|
totalAmount: totalAmount, // ✅ Added
|
|
195
199
|
paidAmount: planData.paidAmount || 0,
|
|
196
200
|
outstandingAmount: planData.outstandingAmount || 0,
|
|
@@ -83,7 +83,7 @@ const sendSMS = async (phoneNumber, message) => {
|
|
|
83
83
|
// from: fromNumber,
|
|
84
84
|
// to: phoneNumber,
|
|
85
85
|
// });
|
|
86
|
-
|
|
86
|
+
// Verification codes and full contact details must never be written to logs.
|
|
87
87
|
return true;
|
|
88
88
|
}
|
|
89
89
|
catch (error) {
|
|
@@ -111,7 +111,7 @@ const sendEmail = async (to, subject, html) => {
|
|
|
111
111
|
subject,
|
|
112
112
|
html,
|
|
113
113
|
});
|
|
114
|
-
console.log(
|
|
114
|
+
console.log("Verification email sent");
|
|
115
115
|
return true;
|
|
116
116
|
}
|
|
117
117
|
catch (error) {
|
|
@@ -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
|
}>;
|
|
@@ -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
|
-
productId: string;
|
|
10
9
|
pricingId: string;
|
|
10
|
+
productId: string;
|
|
11
11
|
}, {
|
|
12
12
|
userId: string;
|
|
13
|
-
productId: string;
|
|
14
13
|
pricingId: string;
|
|
14
|
+
productId: string;
|
|
15
15
|
}>;
|
|
16
16
|
}, "strip", z.ZodTypeAny, {
|
|
17
17
|
body: {
|
|
18
18
|
userId: string;
|
|
19
|
-
productId: string;
|
|
20
19
|
pricingId: string;
|
|
20
|
+
productId: string;
|
|
21
21
|
};
|
|
22
22
|
}, {
|
|
23
23
|
body: {
|
|
24
24
|
userId: string;
|
|
25
|
-
productId: string;
|
|
26
25
|
pricingId: string;
|
|
26
|
+
productId: 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
|
-
limit: number;
|
|
42
41
|
page: number;
|
|
43
|
-
|
|
42
|
+
limit: number;
|
|
43
|
+
status?: "PENDING" | "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
|
|
44
44
|
userId?: string | undefined;
|
|
45
|
-
status?: "ACTIVE" | "DEFAULTED" | "PENDING" | "COMPLETED" | "CANCELLED" | undefined;
|
|
46
|
-
isOverdue?: "true" | "false" | undefined;
|
|
47
|
-
sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
|
|
48
|
-
sortOrder?: "DESC" | "ASC" | undefined;
|
|
49
45
|
deviceId?: string | undefined;
|
|
50
|
-
|
|
46
|
+
isOverdue?: "true" | "false" | undefined;
|
|
51
47
|
search?: string | undefined;
|
|
48
|
+
sortBy?: "createdAt" | "updatedAt" | "nextInstallmentDueAt" | "paidAmount" | "outstandingAmount" | undefined;
|
|
49
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
50
|
+
}, {
|
|
51
|
+
status?: "PENDING" | "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
|
|
52
|
+
page?: string | undefined;
|
|
52
53
|
limit?: string | undefined;
|
|
53
54
|
userId?: string | undefined;
|
|
54
|
-
status?: "ACTIVE" | "DEFAULTED" | "PENDING" | "COMPLETED" | "CANCELLED" | undefined;
|
|
55
|
-
isOverdue?: "true" | "false" | undefined;
|
|
56
|
-
page?: string | undefined;
|
|
57
|
-
sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
|
|
58
|
-
sortOrder?: "DESC" | "ASC" | undefined;
|
|
59
55
|
deviceId?: string | undefined;
|
|
56
|
+
isOverdue?: "true" | "false" | undefined;
|
|
57
|
+
search?: string | undefined;
|
|
58
|
+
sortBy?: "createdAt" | "updatedAt" | "nextInstallmentDueAt" | "paidAmount" | "outstandingAmount" | undefined;
|
|
59
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
60
60
|
}>;
|
|
61
61
|
}, "strip", z.ZodTypeAny, {
|
|
62
62
|
query: {
|
|
63
|
-
limit: number;
|
|
64
63
|
page: number;
|
|
65
|
-
|
|
64
|
+
limit: number;
|
|
65
|
+
status?: "PENDING" | "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
|
|
66
66
|
userId?: string | undefined;
|
|
67
|
-
status?: "ACTIVE" | "DEFAULTED" | "PENDING" | "COMPLETED" | "CANCELLED" | undefined;
|
|
68
|
-
isOverdue?: "true" | "false" | undefined;
|
|
69
|
-
sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
|
|
70
|
-
sortOrder?: "DESC" | "ASC" | undefined;
|
|
71
67
|
deviceId?: string | undefined;
|
|
68
|
+
isOverdue?: "true" | "false" | undefined;
|
|
69
|
+
search?: string | undefined;
|
|
70
|
+
sortBy?: "createdAt" | "updatedAt" | "nextInstallmentDueAt" | "paidAmount" | "outstandingAmount" | undefined;
|
|
71
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
72
72
|
};
|
|
73
73
|
}, {
|
|
74
74
|
query: {
|
|
75
|
-
|
|
75
|
+
status?: "PENDING" | "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
|
|
76
|
+
page?: string | undefined;
|
|
76
77
|
limit?: string | undefined;
|
|
77
78
|
userId?: string | undefined;
|
|
78
|
-
status?: "ACTIVE" | "DEFAULTED" | "PENDING" | "COMPLETED" | "CANCELLED" | undefined;
|
|
79
|
-
isOverdue?: "true" | "false" | undefined;
|
|
80
|
-
page?: string | undefined;
|
|
81
|
-
sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
|
|
82
|
-
sortOrder?: "DESC" | "ASC" | undefined;
|
|
83
79
|
deviceId?: string | undefined;
|
|
80
|
+
isOverdue?: "true" | "false" | undefined;
|
|
81
|
+
search?: string | undefined;
|
|
82
|
+
sortBy?: "createdAt" | "updatedAt" | "nextInstallmentDueAt" | "paidAmount" | "outstandingAmount" | undefined;
|
|
83
|
+
sortOrder?: "ASC" | "DESC" | 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?: "PENDING" | "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
|
|
116
116
|
includeCompleted?: "true" | "false" | undefined;
|
|
117
117
|
}, {
|
|
118
|
-
status?: "
|
|
118
|
+
status?: "PENDING" | "ACTIVE" | "COMPLETED" | "DEFAULTED" | "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?: "PENDING" | "ACTIVE" | "COMPLETED" | "DEFAULTED" | "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?: "PENDING" | "ACTIVE" | "COMPLETED" | "DEFAULTED" | "CANCELLED" | undefined;
|
|
135
135
|
includeCompleted?: "true" | "false" | undefined;
|
|
136
136
|
} | undefined;
|
|
137
137
|
}>;
|
|
@@ -166,38 +166,38 @@ export declare const limitedUpdateSchema: z.ZodObject<{
|
|
|
166
166
|
userId: z.ZodOptional<z.ZodString>;
|
|
167
167
|
}, "strip", z.ZodTypeAny, {
|
|
168
168
|
userId?: string | undefined;
|
|
169
|
-
productId?: string | undefined;
|
|
170
169
|
pricingId?: string | undefined;
|
|
170
|
+
productId?: string | undefined;
|
|
171
171
|
}, {
|
|
172
172
|
userId?: string | undefined;
|
|
173
|
-
productId?: string | undefined;
|
|
174
173
|
pricingId?: string | undefined;
|
|
174
|
+
productId?: string | undefined;
|
|
175
175
|
}>, {
|
|
176
176
|
userId?: string | undefined;
|
|
177
|
-
productId?: string | undefined;
|
|
178
177
|
pricingId?: string | undefined;
|
|
178
|
+
productId?: string | undefined;
|
|
179
179
|
}, {
|
|
180
180
|
userId?: string | undefined;
|
|
181
|
-
productId?: string | undefined;
|
|
182
181
|
pricingId?: string | undefined;
|
|
182
|
+
productId?: string | undefined;
|
|
183
183
|
}>;
|
|
184
184
|
}, "strip", z.ZodTypeAny, {
|
|
185
|
+
params: {
|
|
186
|
+
id: string;
|
|
187
|
+
};
|
|
185
188
|
body: {
|
|
186
189
|
userId?: string | undefined;
|
|
187
|
-
productId?: string | undefined;
|
|
188
190
|
pricingId?: string | undefined;
|
|
191
|
+
productId?: string | undefined;
|
|
189
192
|
};
|
|
193
|
+
}, {
|
|
190
194
|
params: {
|
|
191
195
|
id: string;
|
|
192
196
|
};
|
|
193
|
-
}, {
|
|
194
197
|
body: {
|
|
195
198
|
userId?: string | undefined;
|
|
196
|
-
productId?: string | undefined;
|
|
197
199
|
pricingId?: string | undefined;
|
|
198
|
-
|
|
199
|
-
params: {
|
|
200
|
-
id: string;
|
|
200
|
+
productId?: string | undefined;
|
|
201
201
|
};
|
|
202
202
|
}>;
|
|
203
203
|
export declare const recordPaymentSchema: z.ZodObject<{
|
|
@@ -211,7 +211,7 @@ export declare const recordPaymentSchema: z.ZodObject<{
|
|
|
211
211
|
body: z.ZodObject<{
|
|
212
212
|
amount: z.ZodNumber;
|
|
213
213
|
provider: z.ZodDefault<z.ZodEnum<["AIRTEL_MONEY", "CASH", "MOMO_PAY"]>>;
|
|
214
|
-
providerReference: z.
|
|
214
|
+
providerReference: z.ZodString;
|
|
215
215
|
customerPhone: z.ZodOptional<z.ZodString>;
|
|
216
216
|
customerName: z.ZodOptional<z.ZodString>;
|
|
217
217
|
notes: z.ZodOptional<z.ZodString>;
|
|
@@ -219,45 +219,45 @@ export declare const recordPaymentSchema: z.ZodObject<{
|
|
|
219
219
|
}, "strip", z.ZodTypeAny, {
|
|
220
220
|
amount: number;
|
|
221
221
|
provider: "AIRTEL_MONEY" | "CASH" | "MOMO_PAY";
|
|
222
|
-
|
|
223
|
-
providerReference?: string | undefined;
|
|
222
|
+
providerReference: string;
|
|
224
223
|
customerPhone?: string | undefined;
|
|
225
|
-
customerName?: string | undefined;
|
|
226
224
|
notes?: string | undefined;
|
|
225
|
+
metadata?: Record<string, any> | undefined;
|
|
226
|
+
customerName?: string | undefined;
|
|
227
227
|
}, {
|
|
228
228
|
amount: number;
|
|
229
|
-
|
|
229
|
+
providerReference: string;
|
|
230
230
|
provider?: "AIRTEL_MONEY" | "CASH" | "MOMO_PAY" | undefined;
|
|
231
|
-
providerReference?: string | undefined;
|
|
232
231
|
customerPhone?: string | undefined;
|
|
233
|
-
customerName?: string | undefined;
|
|
234
232
|
notes?: string | undefined;
|
|
233
|
+
metadata?: Record<string, any> | undefined;
|
|
234
|
+
customerName?: string | undefined;
|
|
235
235
|
}>;
|
|
236
236
|
}, "strip", z.ZodTypeAny, {
|
|
237
|
+
params: {
|
|
238
|
+
id: string;
|
|
239
|
+
};
|
|
237
240
|
body: {
|
|
238
241
|
amount: number;
|
|
239
242
|
provider: "AIRTEL_MONEY" | "CASH" | "MOMO_PAY";
|
|
240
|
-
|
|
241
|
-
providerReference?: string | undefined;
|
|
243
|
+
providerReference: string;
|
|
242
244
|
customerPhone?: string | undefined;
|
|
243
|
-
customerName?: string | undefined;
|
|
244
245
|
notes?: string | undefined;
|
|
246
|
+
metadata?: Record<string, any> | undefined;
|
|
247
|
+
customerName?: string | undefined;
|
|
245
248
|
};
|
|
249
|
+
}, {
|
|
246
250
|
params: {
|
|
247
251
|
id: string;
|
|
248
252
|
};
|
|
249
|
-
}, {
|
|
250
253
|
body: {
|
|
251
254
|
amount: number;
|
|
252
|
-
|
|
255
|
+
providerReference: string;
|
|
253
256
|
provider?: "AIRTEL_MONEY" | "CASH" | "MOMO_PAY" | undefined;
|
|
254
|
-
providerReference?: string | undefined;
|
|
255
257
|
customerPhone?: string | undefined;
|
|
256
|
-
customerName?: string | undefined;
|
|
257
258
|
notes?: string | undefined;
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
id: string;
|
|
259
|
+
metadata?: Record<string, any> | undefined;
|
|
260
|
+
customerName?: string | undefined;
|
|
261
261
|
};
|
|
262
262
|
}>;
|
|
263
263
|
export declare const deletePlanSchema: z.ZodObject<{
|
|
@@ -79,7 +79,7 @@ exports.recordPaymentSchema = zod_1.z.object({
|
|
|
79
79
|
body: zod_1.z.object({
|
|
80
80
|
amount: zod_1.z.number().min(0.01, "Amount must be greater than 0"),
|
|
81
81
|
provider: zod_1.z.enum(vr_models_1.PAYMENT_PROVIDER).default("MOMO_PAY"),
|
|
82
|
-
providerReference: zod_1.z.string().
|
|
82
|
+
providerReference: zod_1.z.string().trim().min(1).max(255),
|
|
83
83
|
customerPhone: zod_1.z
|
|
84
84
|
.string()
|
|
85
85
|
.regex(/^\+?250[0-9]{9}$/, "Invalid MTN Rwanda phone number")
|
|
@@ -59,50 +59,50 @@ export declare const getDevicesSchema: z.ZodObject<{
|
|
|
59
59
|
sortBy: z.ZodOptional<z.ZodEnum<["serialNumber", "status", "createdAt", "updatedAt"]>>;
|
|
60
60
|
sortOrder: z.ZodOptional<z.ZodEnum<["ASC", "DESC"]>>;
|
|
61
61
|
}, "strip", z.ZodTypeAny, {
|
|
62
|
-
search?: string | undefined;
|
|
63
|
-
limit?: number | undefined;
|
|
64
62
|
status?: "locked" | "unlocked" | "disabled" | undefined;
|
|
65
63
|
page?: number | undefined;
|
|
66
|
-
|
|
67
|
-
sortOrder?: "DESC" | "ASC" | undefined;
|
|
64
|
+
limit?: number | undefined;
|
|
68
65
|
productId?: string | undefined;
|
|
66
|
+
search?: string | undefined;
|
|
67
|
+
sortBy?: "status" | "createdAt" | "updatedAt" | "serialNumber" | undefined;
|
|
68
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
69
69
|
dedicatedUser?: "PASSENGER" | "RIDER" | "N/A" | undefined;
|
|
70
70
|
isPermanentlyUnlocked?: "true" | "false" | undefined;
|
|
71
71
|
isAssigned?: "true" | "false" | undefined;
|
|
72
72
|
}, {
|
|
73
|
-
search?: string | undefined;
|
|
74
|
-
limit?: string | undefined;
|
|
75
73
|
status?: "locked" | "unlocked" | "disabled" | undefined;
|
|
76
74
|
page?: string | undefined;
|
|
77
|
-
|
|
78
|
-
sortOrder?: "DESC" | "ASC" | undefined;
|
|
75
|
+
limit?: string | undefined;
|
|
79
76
|
productId?: string | undefined;
|
|
77
|
+
search?: string | undefined;
|
|
78
|
+
sortBy?: "status" | "createdAt" | "updatedAt" | "serialNumber" | undefined;
|
|
79
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
80
80
|
dedicatedUser?: "PASSENGER" | "RIDER" | "N/A" | undefined;
|
|
81
81
|
isPermanentlyUnlocked?: "true" | "false" | undefined;
|
|
82
82
|
isAssigned?: "true" | "false" | undefined;
|
|
83
83
|
}>;
|
|
84
84
|
}, "strip", z.ZodTypeAny, {
|
|
85
85
|
query: {
|
|
86
|
-
search?: string | undefined;
|
|
87
|
-
limit?: number | undefined;
|
|
88
86
|
status?: "locked" | "unlocked" | "disabled" | undefined;
|
|
89
87
|
page?: number | undefined;
|
|
90
|
-
|
|
91
|
-
sortOrder?: "DESC" | "ASC" | undefined;
|
|
88
|
+
limit?: number | undefined;
|
|
92
89
|
productId?: string | undefined;
|
|
90
|
+
search?: string | undefined;
|
|
91
|
+
sortBy?: "status" | "createdAt" | "updatedAt" | "serialNumber" | undefined;
|
|
92
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
93
93
|
dedicatedUser?: "PASSENGER" | "RIDER" | "N/A" | undefined;
|
|
94
94
|
isPermanentlyUnlocked?: "true" | "false" | undefined;
|
|
95
95
|
isAssigned?: "true" | "false" | undefined;
|
|
96
96
|
};
|
|
97
97
|
}, {
|
|
98
98
|
query: {
|
|
99
|
-
search?: string | undefined;
|
|
100
|
-
limit?: string | undefined;
|
|
101
99
|
status?: "locked" | "unlocked" | "disabled" | undefined;
|
|
102
100
|
page?: string | undefined;
|
|
103
|
-
|
|
104
|
-
sortOrder?: "DESC" | "ASC" | undefined;
|
|
101
|
+
limit?: string | undefined;
|
|
105
102
|
productId?: string | undefined;
|
|
103
|
+
search?: string | undefined;
|
|
104
|
+
sortBy?: "status" | "createdAt" | "updatedAt" | "serialNumber" | undefined;
|
|
105
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
106
106
|
dedicatedUser?: "PASSENGER" | "RIDER" | "N/A" | undefined;
|
|
107
107
|
isPermanentlyUnlocked?: "true" | "false" | undefined;
|
|
108
108
|
isAssigned?: "true" | "false" | undefined;
|
|
@@ -330,20 +330,20 @@ export declare const customDeviceResetSchema: z.ZodObject<{
|
|
|
330
330
|
}, "strip", z.ZodTypeAny, {
|
|
331
331
|
status?: string | string[] | undefined;
|
|
332
332
|
productId?: string | string[] | undefined;
|
|
333
|
+
pairId?: string | string[] | undefined;
|
|
333
334
|
dedicatedUser?: string | string[] | undefined;
|
|
334
335
|
isPermanentlyUnlocked?: boolean | undefined;
|
|
335
336
|
excludeStatus?: string | string[] | undefined;
|
|
336
|
-
pairId?: string | string[] | undefined;
|
|
337
337
|
excludePairIds?: string | string[] | undefined;
|
|
338
338
|
createdBefore?: string | undefined;
|
|
339
339
|
createdAfter?: string | undefined;
|
|
340
340
|
}, {
|
|
341
341
|
status?: string | string[] | undefined;
|
|
342
342
|
productId?: string | string[] | undefined;
|
|
343
|
+
pairId?: string | string[] | undefined;
|
|
343
344
|
dedicatedUser?: string | string[] | undefined;
|
|
344
345
|
isPermanentlyUnlocked?: boolean | undefined;
|
|
345
346
|
excludeStatus?: string | string[] | undefined;
|
|
346
|
-
pairId?: string | string[] | undefined;
|
|
347
347
|
excludePairIds?: string | string[] | undefined;
|
|
348
348
|
createdBefore?: string | undefined;
|
|
349
349
|
createdAfter?: string | undefined;
|
|
@@ -382,10 +382,10 @@ export declare const customDeviceResetSchema: z.ZodObject<{
|
|
|
382
382
|
condition?: {
|
|
383
383
|
status?: string | string[] | undefined;
|
|
384
384
|
productId?: string | string[] | undefined;
|
|
385
|
+
pairId?: string | string[] | undefined;
|
|
385
386
|
dedicatedUser?: string | string[] | undefined;
|
|
386
387
|
isPermanentlyUnlocked?: boolean | undefined;
|
|
387
388
|
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;
|
|
@@ -403,10 +403,10 @@ export declare const customDeviceResetSchema: z.ZodObject<{
|
|
|
403
403
|
condition?: {
|
|
404
404
|
status?: string | string[] | undefined;
|
|
405
405
|
productId?: string | string[] | undefined;
|
|
406
|
+
pairId?: string | string[] | undefined;
|
|
406
407
|
dedicatedUser?: string | string[] | undefined;
|
|
407
408
|
isPermanentlyUnlocked?: boolean | undefined;
|
|
408
409
|
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;
|
|
@@ -426,10 +426,10 @@ export declare const customDeviceResetSchema: z.ZodObject<{
|
|
|
426
426
|
condition?: {
|
|
427
427
|
status?: string | string[] | undefined;
|
|
428
428
|
productId?: string | string[] | undefined;
|
|
429
|
+
pairId?: string | string[] | undefined;
|
|
429
430
|
dedicatedUser?: string | string[] | undefined;
|
|
430
431
|
isPermanentlyUnlocked?: boolean | undefined;
|
|
431
432
|
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;
|
|
@@ -449,10 +449,10 @@ export declare const customDeviceResetSchema: z.ZodObject<{
|
|
|
449
449
|
condition?: {
|
|
450
450
|
status?: string | string[] | undefined;
|
|
451
451
|
productId?: string | string[] | undefined;
|
|
452
|
+
pairId?: string | string[] | undefined;
|
|
452
453
|
dedicatedUser?: string | string[] | undefined;
|
|
453
454
|
isPermanentlyUnlocked?: boolean | undefined;
|
|
454
455
|
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;
|
|
@@ -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
|
-
limit: number;
|
|
22
21
|
page: number;
|
|
22
|
+
limit: number;
|
|
23
23
|
sortBy: "createdAt" | "actorType" | "action" | "entity";
|
|
24
|
-
sortOrder: "
|
|
24
|
+
sortOrder: "ASC" | "DESC";
|
|
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
|
-
|
|
38
|
+
page?: string | undefined;
|
|
39
39
|
limit?: string | undefined;
|
|
40
|
+
search?: string | undefined;
|
|
41
|
+
sortBy?: "createdAt" | "actorType" | "action" | "entity" | undefined;
|
|
42
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
40
43
|
firstName?: string | undefined;
|
|
41
44
|
lastName?: string | undefined;
|
|
42
|
-
page?: string | undefined;
|
|
43
|
-
sortBy?: "createdAt" | "actorType" | "action" | "entity" | undefined;
|
|
44
45
|
fromDate?: string | undefined;
|
|
45
46
|
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
|
-
|
|
55
|
+
page?: string | undefined;
|
|
56
56
|
limit?: string | undefined;
|
|
57
|
+
search?: string | undefined;
|
|
58
|
+
sortBy?: "createdAt" | "actorType" | "action" | "entity" | undefined;
|
|
59
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
57
60
|
firstName?: string | undefined;
|
|
58
61
|
lastName?: string | undefined;
|
|
59
|
-
page?: string | undefined;
|
|
60
|
-
sortBy?: "createdAt" | "actorType" | "action" | "entity" | undefined;
|
|
61
62
|
fromDate?: string | undefined;
|
|
62
63
|
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
|
-
|
|
76
|
+
page?: string | undefined;
|
|
77
77
|
limit?: string | undefined;
|
|
78
|
+
search?: string | undefined;
|
|
79
|
+
sortBy?: "createdAt" | "actorType" | "action" | "entity" | undefined;
|
|
80
|
+
sortOrder?: "ASC" | "DESC" | undefined;
|
|
78
81
|
firstName?: string | undefined;
|
|
79
82
|
lastName?: string | undefined;
|
|
80
|
-
page?: string | undefined;
|
|
81
|
-
sortBy?: "createdAt" | "actorType" | "action" | "entity" | undefined;
|
|
82
83
|
fromDate?: string | undefined;
|
|
83
84
|
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;
|