vr-commons 1.0.138 → 1.0.140

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.
@@ -37,10 +37,12 @@ export declare const DPP_OperationsUtil: {
37
37
  };
38
38
  /**
39
39
  * Generate installments for a hire purchase plan
40
+ * ✅ Updated to use unitPrice and create one installment at a time
40
41
  */
41
42
  generateInstallments(plan: DevicePaymentPlan, transaction?: Transaction): Promise<void>;
42
43
  /**
43
44
  * Format plan for operation response
45
+ * ✅ Updated to use unitPrice and totalAmount
44
46
  */
45
47
  formatPlanForOps(plan: DevicePaymentPlan | null): any;
46
48
  };
@@ -75,7 +75,7 @@ exports.DPP_OperationsUtil = {
75
75
  }
76
76
  // For now, require exact installment amount
77
77
  // Could be modified to allow overpayment later
78
- if (amount !== nextInstallment.amount) {
78
+ if (amount !== Number(nextInstallment.amount)) {
79
79
  return {
80
80
  valid: false,
81
81
  reason: `Payment amount must equal the next installment amount of ${nextInstallment.amount}`,
@@ -88,12 +88,13 @@ exports.DPP_OperationsUtil = {
88
88
  * Calculate new values after payment
89
89
  */
90
90
  calculatePaymentEffects(plan, amount) {
91
- const newPaidAmount = plan.paidAmount + amount;
92
- const newOutstandingAmount = Math.max(0, plan.outstandingAmount - amount);
91
+ // ✅ Use plan.totalAmount instead of pricingSnapshot.totalAmount
92
+ const totalAmount = Number(plan.totalAmount) || 0;
93
+ const newPaidAmount = Number(plan.paidAmount) + amount;
94
+ const newOutstandingAmount = Math.max(0, totalAmount - newPaidAmount);
93
95
  const wasCompleted = plan.status === "COMPLETED";
94
96
  const isNowCompleted = newOutstandingAmount <= 0;
95
- const totalAmount = plan.pricingSnapshot.totalAmount;
96
- const progress = (newPaidAmount / totalAmount) * 100;
97
+ const progress = totalAmount > 0 ? (newPaidAmount / totalAmount) * 100 : 0;
97
98
  return {
98
99
  newPaidAmount,
99
100
  newOutstandingAmount,
@@ -104,6 +105,7 @@ exports.DPP_OperationsUtil = {
104
105
  },
105
106
  /**
106
107
  * Generate installments for a hire purchase plan
108
+ * ✅ Updated to use unitPrice and create one installment at a time
107
109
  */
108
110
  async generateInstallments(plan, transaction) {
109
111
  const pricing = plan.pricingSnapshot;
@@ -112,7 +114,10 @@ exports.DPP_OperationsUtil = {
112
114
  }
113
115
  const InstallmentModel = vr_models_1.Installment;
114
116
  const installments = [];
115
- const dueDate = new Date(); // First installment due after creation
117
+ // ✅ Get device count from plan
118
+ const deviceCount = plan.devices?.length || 1;
119
+ const installmentAmount = Number(pricing.installmentAmount) * deviceCount;
120
+ const dueDate = new Date();
116
121
  if (pricing.installmentFrequency === "DAILY") {
117
122
  dueDate.setDate(dueDate.getDate() + 1);
118
123
  }
@@ -122,33 +127,29 @@ exports.DPP_OperationsUtil = {
122
127
  else if (pricing.installmentFrequency === "MONTHLY") {
123
128
  dueDate.setMonth(dueDate.getMonth() + 1);
124
129
  }
125
- for (let i = 1; i <= pricing.installmentCount; i++) {
126
- installments.push({
127
- devicePaymentPlanId: plan.id,
128
- installmentNumber: i,
129
- amount: Number(pricing.installmentAmount),
130
- dueDate: new Date(dueDate),
131
- status: "PENDING",
132
- isAutoGenerated: true,
133
- });
134
- // Calculate next due date
135
- if (pricing.installmentFrequency === "DAILY") {
136
- dueDate.setDate(dueDate.getDate() + 1);
137
- }
138
- else if (pricing.installmentFrequency === "WEEKLY") {
139
- dueDate.setDate(dueDate.getDate() + 7);
140
- }
141
- else if (pricing.installmentFrequency === "MONTHLY") {
142
- dueDate.setMonth(dueDate.getMonth() + 1);
143
- }
144
- }
145
- await InstallmentModel.bulkCreate(installments, { transaction });
130
+ // ✅ Create only the first installment (not all at once)
131
+ const firstInstallment = {
132
+ devicePaymentPlanId: plan.id,
133
+ installmentNumber: 1,
134
+ amount: installmentAmount,
135
+ paidAmount: 0.0,
136
+ dueDate: new Date(dueDate),
137
+ status: "PENDING",
138
+ isAutoGenerated: true,
139
+ metadata: {
140
+ totalInstallments: pricing.installmentCount,
141
+ remainingInstallments: pricing.installmentCount - 1,
142
+ createdAt: new Date().toISOString(),
143
+ },
144
+ };
145
+ await InstallmentModel.create(firstInstallment, { transaction });
146
146
  // Set the first installment as next due
147
- plan.nextInstallmentDueAt = installments[0]?.dueDate || null;
147
+ plan.nextInstallmentDueAt = firstInstallment.dueDate;
148
148
  await plan.save({ transaction });
149
149
  },
150
150
  /**
151
151
  * Format plan for operation response
152
+ * ✅ Updated to use unitPrice and totalAmount
152
153
  */
153
154
  formatPlanForOps(plan) {
154
155
  if (!plan)
@@ -158,6 +159,7 @@ exports.DPP_OperationsUtil = {
158
159
  id: plan.id,
159
160
  userId: plan.userId,
160
161
  pricingSnapshot: plan.pricingSnapshot,
162
+ totalAmount: plan.totalAmount, // ✅ Added
161
163
  paidAmount: plan.paidAmount,
162
164
  outstandingAmount: plan.outstandingAmount,
163
165
  lastPaymentAt: plan.lastPaymentAt,
@@ -170,21 +172,27 @@ exports.DPP_OperationsUtil = {
170
172
  user: plan.user || null,
171
173
  installments: plan.installments || [],
172
174
  };
173
- const totalAmount = planData.pricingSnapshot?.totalAmount || 0;
175
+ // ✅ Use plan.totalAmount instead of pricingSnapshot.totalAmount
176
+ const totalAmount = Number(planData.totalAmount) || 0;
174
177
  const hasInstallments = (planData.installments?.length ?? 0) > 0;
175
178
  return {
176
179
  id: planData.id,
177
180
  userId: planData.userId,
178
181
  pricingSnapshot: {
182
+ id: planData.pricingSnapshot?.id || null,
183
+ name: planData.pricingSnapshot?.name || null,
179
184
  type: planData.pricingSnapshot?.type || null,
180
- totalAmount: planData.pricingSnapshot?.totalAmount || 0,
185
+ unitPrice: planData.pricingSnapshot?.unitPrice || 0, // ✅ Changed from totalAmount
181
186
  downPayment: planData.pricingSnapshot?.downPayment || 0,
182
187
  installmentAmount: planData.pricingSnapshot?.installmentAmount || null,
183
188
  installmentFrequency: planData.pricingSnapshot?.installmentFrequency || null,
184
189
  installmentCount: planData.pricingSnapshot?.installmentCount || null,
185
190
  gracePeriodDays: planData.pricingSnapshot?.gracePeriodDays || 2,
186
191
  autoLockOnMiss: planData.pricingSnapshot?.autoLockOnMiss ?? true,
192
+ minOrderQuantity: planData.pricingSnapshot?.minOrderQuantity || 1,
193
+ maxOrderQuantity: planData.pricingSnapshot?.maxOrderQuantity || 1,
187
194
  },
195
+ totalAmount: totalAmount, // ✅ Added
188
196
  paidAmount: planData.paidAmount || 0,
189
197
  outstandingAmount: planData.outstandingAmount || 0,
190
198
  lastPaymentAt: planData.lastPaymentAt,
@@ -196,9 +204,9 @@ exports.DPP_OperationsUtil = {
196
204
  devices: planData.devices || [],
197
205
  user: planData.user || null,
198
206
  installments: planData.installments || [],
199
- progress: totalAmount > 0 ? (plan.paidAmount / totalAmount) * 100 : 0,
200
- canEdit: plan.paidAmount === 0,
201
- canDelete: plan.paidAmount === 0,
207
+ progress: totalAmount > 0 ? (Number(plan.paidAmount) / totalAmount) * 100 : 0,
208
+ canEdit: Number(plan.paidAmount) === 0,
209
+ canDelete: Number(plan.paidAmount) === 0,
202
210
  isOverdue: false,
203
211
  hasInstallments,
204
212
  };
@@ -43,33 +43,33 @@ 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
- status?: "PENDING" | "ACTIVE" | "DEFAULTED" | "COMPLETED" | "CANCELLED" | undefined;
47
+ page: number;
49
48
  search?: string | undefined;
50
49
  userId?: string | undefined;
50
+ status?: "ACTIVE" | "DEFAULTED" | "PENDING" | "COMPLETED" | "CANCELLED" | undefined;
51
51
  isOverdue?: "true" | "false" | undefined;
52
52
  sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
53
53
  sortOrder?: "DESC" | "ASC" | undefined;
54
54
  deviceId?: string | undefined;
55
55
  }, {
56
- status?: "PENDING" | "ACTIVE" | "DEFAULTED" | "COMPLETED" | "CANCELLED" | undefined;
57
- page?: string | undefined;
58
- limit?: string | undefined;
59
56
  search?: string | undefined;
57
+ limit?: string | undefined;
60
58
  userId?: string | undefined;
59
+ status?: "ACTIVE" | "DEFAULTED" | "PENDING" | "COMPLETED" | "CANCELLED" | undefined;
61
60
  isOverdue?: "true" | "false" | undefined;
61
+ page?: string | undefined;
62
62
  sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
63
63
  sortOrder?: "DESC" | "ASC" | undefined;
64
64
  deviceId?: string | undefined;
65
65
  }>;
66
66
  }, "strip", z.ZodTypeAny, {
67
67
  query: {
68
- page: number;
69
68
  limit: number;
70
- status?: "PENDING" | "ACTIVE" | "DEFAULTED" | "COMPLETED" | "CANCELLED" | undefined;
69
+ page: number;
71
70
  search?: string | undefined;
72
71
  userId?: string | undefined;
72
+ status?: "ACTIVE" | "DEFAULTED" | "PENDING" | "COMPLETED" | "CANCELLED" | undefined;
73
73
  isOverdue?: "true" | "false" | undefined;
74
74
  sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
75
75
  sortOrder?: "DESC" | "ASC" | undefined;
@@ -77,12 +77,12 @@ export declare const listPlansSchema: z.ZodObject<{
77
77
  };
78
78
  }, {
79
79
  query: {
80
- status?: "PENDING" | "ACTIVE" | "DEFAULTED" | "COMPLETED" | "CANCELLED" | undefined;
81
- page?: string | undefined;
82
- limit?: string | undefined;
83
80
  search?: string | undefined;
81
+ limit?: string | undefined;
84
82
  userId?: string | undefined;
83
+ status?: "ACTIVE" | "DEFAULTED" | "PENDING" | "COMPLETED" | "CANCELLED" | undefined;
85
84
  isOverdue?: "true" | "false" | undefined;
85
+ page?: string | undefined;
86
86
  sortBy?: "createdAt" | "updatedAt" | "paidAmount" | "outstandingAmount" | "nextInstallmentDueAt" | undefined;
87
87
  sortOrder?: "DESC" | "ASC" | undefined;
88
88
  deviceId?: string | undefined;
@@ -117,10 +117,10 @@ export declare const getUserPlansSchema: z.ZodObject<{
117
117
  status: z.ZodOptional<z.ZodEnum<["PENDING", "ACTIVE", "COMPLETED", "DEFAULTED", "CANCELLED"]>>;
118
118
  includeCompleted: z.ZodOptional<z.ZodEnum<["true", "false"]>>;
119
119
  }, "strip", z.ZodTypeAny, {
120
- status?: "PENDING" | "ACTIVE" | "DEFAULTED" | "COMPLETED" | "CANCELLED" | undefined;
120
+ status?: "ACTIVE" | "DEFAULTED" | "PENDING" | "COMPLETED" | "CANCELLED" | undefined;
121
121
  includeCompleted?: "true" | "false" | undefined;
122
122
  }, {
123
- status?: "PENDING" | "ACTIVE" | "DEFAULTED" | "COMPLETED" | "CANCELLED" | undefined;
123
+ status?: "ACTIVE" | "DEFAULTED" | "PENDING" | "COMPLETED" | "CANCELLED" | undefined;
124
124
  includeCompleted?: "true" | "false" | undefined;
125
125
  }>>;
126
126
  }, "strip", z.ZodTypeAny, {
@@ -128,7 +128,7 @@ export declare const getUserPlansSchema: z.ZodObject<{
128
128
  userId: string;
129
129
  };
130
130
  query?: {
131
- status?: "PENDING" | "ACTIVE" | "DEFAULTED" | "COMPLETED" | "CANCELLED" | undefined;
131
+ status?: "ACTIVE" | "DEFAULTED" | "PENDING" | "COMPLETED" | "CANCELLED" | undefined;
132
132
  includeCompleted?: "true" | "false" | undefined;
133
133
  } | undefined;
134
134
  }, {
@@ -136,7 +136,7 @@ export declare const getUserPlansSchema: z.ZodObject<{
136
136
  userId: string;
137
137
  };
138
138
  query?: {
139
- status?: "PENDING" | "ACTIVE" | "DEFAULTED" | "COMPLETED" | "CANCELLED" | undefined;
139
+ status?: "ACTIVE" | "DEFAULTED" | "PENDING" | "COMPLETED" | "CANCELLED" | undefined;
140
140
  includeCompleted?: "true" | "false" | undefined;
141
141
  } | undefined;
142
142
  }>;
@@ -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
- };
198
195
  body: {
199
196
  userId?: string | undefined;
200
197
  productId?: string | undefined;
201
198
  deviceIds?: string[] | undefined;
202
199
  pricingId?: string | undefined;
203
200
  };
204
- }, {
205
201
  params: {
206
202
  id: string;
207
203
  };
204
+ }, {
208
205
  body: {
209
206
  userId?: string | undefined;
210
207
  productId?: string | undefined;
211
208
  deviceIds?: string[] | undefined;
212
209
  pricingId?: string | undefined;
213
210
  };
211
+ params: {
212
+ id: string;
213
+ };
214
214
  }>;
215
215
  export declare const recordPaymentSchema: z.ZodObject<{
216
216
  params: z.ZodObject<{
@@ -231,45 +231,45 @@ export declare const recordPaymentSchema: z.ZodObject<{
231
231
  }, "strip", z.ZodTypeAny, {
232
232
  amount: number;
233
233
  provider: "AIRTEL_MONEY" | "CASH" | "MOMO_PAY";
234
+ metadata?: Record<string, any> | undefined;
234
235
  providerReference?: string | undefined;
235
236
  customerPhone?: string | undefined;
236
- notes?: string | undefined;
237
- metadata?: Record<string, any> | undefined;
238
237
  customerName?: string | undefined;
238
+ notes?: string | undefined;
239
239
  }, {
240
240
  amount: number;
241
+ metadata?: Record<string, any> | undefined;
241
242
  provider?: "AIRTEL_MONEY" | "CASH" | "MOMO_PAY" | undefined;
242
243
  providerReference?: string | undefined;
243
244
  customerPhone?: string | undefined;
244
- notes?: string | undefined;
245
- metadata?: Record<string, any> | undefined;
246
245
  customerName?: string | undefined;
246
+ notes?: string | undefined;
247
247
  }>;
248
248
  }, "strip", z.ZodTypeAny, {
249
- params: {
250
- id: string;
251
- };
252
249
  body: {
253
250
  amount: number;
254
251
  provider: "AIRTEL_MONEY" | "CASH" | "MOMO_PAY";
252
+ metadata?: Record<string, any> | undefined;
255
253
  providerReference?: string | undefined;
256
254
  customerPhone?: string | undefined;
257
- notes?: string | undefined;
258
- metadata?: Record<string, any> | undefined;
259
255
  customerName?: string | undefined;
256
+ notes?: string | undefined;
260
257
  };
261
- }, {
262
258
  params: {
263
259
  id: string;
264
260
  };
261
+ }, {
265
262
  body: {
266
263
  amount: number;
264
+ metadata?: Record<string, any> | undefined;
267
265
  provider?: "AIRTEL_MONEY" | "CASH" | "MOMO_PAY" | undefined;
268
266
  providerReference?: string | undefined;
269
267
  customerPhone?: string | undefined;
270
- notes?: string | undefined;
271
- metadata?: Record<string, any> | undefined;
272
268
  customerName?: string | undefined;
269
+ notes?: string | undefined;
270
+ };
271
+ params: {
272
+ id: string;
273
273
  };
274
274
  }>;
275
275
  export declare const deletePlanSchema: z.ZodObject<{
@@ -65,23 +65,23 @@ export declare const updateDeviceSchema: z.ZodObject<{
65
65
  dedicatedUser?: "PASSENGER" | "RIDER" | "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?: "PASSENGER" | "RIDER" | "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?: "PASSENGER" | "RIDER" | "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,22 +113,22 @@ 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
- limit?: number | undefined;
119
- search?: string | undefined;
120
- sortBy?: "status" | "createdAt" | "updatedAt" | "serialNumber" | undefined;
120
+ sortBy?: "createdAt" | "updatedAt" | "status" | "serialNumber" | undefined;
121
121
  sortOrder?: "DESC" | "ASC" | undefined;
122
122
  productId?: string | undefined;
123
123
  dedicatedUser?: "PASSENGER" | "RIDER" | "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
- limit?: string | undefined;
130
- search?: string | undefined;
131
- sortBy?: "status" | "createdAt" | "updatedAt" | "serialNumber" | undefined;
131
+ sortBy?: "createdAt" | "updatedAt" | "status" | "serialNumber" | undefined;
132
132
  sortOrder?: "DESC" | "ASC" | undefined;
133
133
  productId?: string | undefined;
134
134
  dedicatedUser?: "PASSENGER" | "RIDER" | "N/A" | undefined;
@@ -137,11 +137,11 @@ 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
- limit?: number | undefined;
143
- search?: string | undefined;
144
- sortBy?: "status" | "createdAt" | "updatedAt" | "serialNumber" | undefined;
144
+ sortBy?: "createdAt" | "updatedAt" | "status" | "serialNumber" | undefined;
145
145
  sortOrder?: "DESC" | "ASC" | undefined;
146
146
  productId?: string | undefined;
147
147
  dedicatedUser?: "PASSENGER" | "RIDER" | "N/A" | undefined;
@@ -150,11 +150,11 @@ 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
- limit?: string | undefined;
156
- search?: string | undefined;
157
- sortBy?: "status" | "createdAt" | "updatedAt" | "serialNumber" | undefined;
157
+ sortBy?: "createdAt" | "updatedAt" | "status" | "serialNumber" | undefined;
158
158
  sortOrder?: "DESC" | "ASC" | undefined;
159
159
  productId?: string | undefined;
160
160
  dedicatedUser?: "PASSENGER" | "RIDER" | "N/A" | 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<{
@@ -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
- limit?: number | undefined;
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
- limit?: string | undefined;
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
- limit?: number | undefined;
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
- limit?: string | undefined;
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
- metadata?: Record<string, any> | undefined;
101
+ };
102
+ params: {
103
+ id: string;
104
104
  };
105
105
  }>;
@@ -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,24 +785,24 @@ 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;
789
+ page: number;
790
790
  search?: string | undefined;
791
791
  isActive?: "true" | "false" | undefined;
792
792
  sortBy?: "createdAt" | "updatedAt" | "version" | undefined;
793
793
  sortOrder?: "DESC" | "ASC" | undefined;
794
794
  }, {
795
- page?: string | undefined;
796
- limit?: string | undefined;
797
795
  search?: string | undefined;
796
+ limit?: string | undefined;
798
797
  isActive?: "true" | "false" | undefined;
798
+ page?: string | undefined;
799
799
  sortBy?: "createdAt" | "updatedAt" | "version" | undefined;
800
800
  sortOrder?: "DESC" | "ASC" | undefined;
801
801
  }>;
802
802
  }, "strip", z.ZodTypeAny, {
803
803
  query: {
804
- page: number;
805
804
  limit: number;
805
+ page: number;
806
806
  search?: string | undefined;
807
807
  isActive?: "true" | "false" | undefined;
808
808
  sortBy?: "createdAt" | "updatedAt" | "version" | undefined;
@@ -810,10 +810,10 @@ export declare const listAppSpecsSchema: z.ZodObject<{
810
810
  };
811
811
  }, {
812
812
  query: {
813
- page?: string | undefined;
814
- limit?: string | undefined;
815
813
  search?: string | undefined;
814
+ limit?: string | undefined;
816
815
  isActive?: "true" | "false" | undefined;
816
+ page?: string | undefined;
817
817
  sortBy?: "createdAt" | "updatedAt" | "version" | undefined;
818
818
  sortOrder?: "DESC" | "ASC" | undefined;
819
819
  };
@@ -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
  }>;