@temboplus/afloat 0.1.73 → 0.1.75-0
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/features/admin/admin.contract.d.ts +64 -64
- package/dist/features/contact/contact.api-contract.d.ts +24 -29
- package/dist/features/contact/contact.dtos.d.ts +6 -6
- package/dist/features/payout/payout.api-contract.d.ts +25 -46
- package/dist/features/payout/payout.dtos.d.ts +239 -5
- package/dist/features/payout/payout.query.d.ts +126 -0
- package/dist/features/payout/payout.repository.d.ts +41 -49
- package/dist/features/wallet/wallet.contract.d.ts +8 -8
- package/dist/features/wallet/wallet.dtos.d.ts +12 -12
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/lib/api/common-schemas.d.ts +49 -0
- package/dist/lib/api/index.d.ts +1 -1
- package/dist/lib/query/index.d.ts +2 -0
- package/dist/lib/query/query.builder.d.ts +71 -0
- package/dist/lib/query/query.types.d.ts +36 -0
- package/package.json +1 -1
- package/dist/lib/api/common-responses.d.ts +0 -12
|
@@ -14,28 +14,7 @@ export declare const DEFAULT_ORDER_BY_DESC = "createdAt";
|
|
|
14
14
|
*/
|
|
15
15
|
export declare const contract: {
|
|
16
16
|
getPayouts: {
|
|
17
|
-
query: z.ZodObject<{
|
|
18
|
-
rangeStart: z.ZodNumber;
|
|
19
|
-
rangeEnd: z.ZodNumber;
|
|
20
|
-
eager: z.ZodString;
|
|
21
|
-
approvalStatus: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof import("./payout.dtos.js").PayoutApprovalStatus>>>;
|
|
22
|
-
orderByDesc: z.ZodString;
|
|
23
|
-
msisdn: z.ZodOptional<z.ZodString>;
|
|
24
|
-
}, "strip", z.ZodTypeAny, {
|
|
25
|
-
eager: string;
|
|
26
|
-
orderByDesc: string;
|
|
27
|
-
rangeStart: number;
|
|
28
|
-
rangeEnd: number;
|
|
29
|
-
msisdn?: string | undefined;
|
|
30
|
-
approvalStatus?: import("./payout.dtos.js").PayoutApprovalStatus | null | undefined;
|
|
31
|
-
}, {
|
|
32
|
-
eager: string;
|
|
33
|
-
orderByDesc: string;
|
|
34
|
-
rangeStart: number;
|
|
35
|
-
rangeEnd: number;
|
|
36
|
-
msisdn?: string | undefined;
|
|
37
|
-
approvalStatus?: import("./payout.dtos.js").PayoutApprovalStatus | null | undefined;
|
|
38
|
-
}>;
|
|
17
|
+
query: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
39
18
|
method: "GET";
|
|
40
19
|
path: "";
|
|
41
20
|
responses: {
|
|
@@ -88,8 +67,8 @@ export declare const contract: {
|
|
|
88
67
|
}, "strip", z.ZodTypeAny, {
|
|
89
68
|
status: import("./payout.dtos.js").PayoutStatus;
|
|
90
69
|
id: string;
|
|
91
|
-
profileId: string;
|
|
92
70
|
createdAt: Date;
|
|
71
|
+
profileId: string;
|
|
93
72
|
updatedAt: Date;
|
|
94
73
|
channel: string;
|
|
95
74
|
msisdn: string;
|
|
@@ -116,8 +95,8 @@ export declare const contract: {
|
|
|
116
95
|
}, {
|
|
117
96
|
status: import("./payout.dtos.js").PayoutStatus;
|
|
118
97
|
id: string;
|
|
119
|
-
profileId: string;
|
|
120
98
|
createdAt: Date;
|
|
99
|
+
profileId: string;
|
|
121
100
|
updatedAt: Date;
|
|
122
101
|
channel: string;
|
|
123
102
|
msisdn: string;
|
|
@@ -144,11 +123,12 @@ export declare const contract: {
|
|
|
144
123
|
}>, "many">;
|
|
145
124
|
total: z.ZodNumber;
|
|
146
125
|
}, "strip", z.ZodTypeAny, {
|
|
126
|
+
total: number;
|
|
147
127
|
results: {
|
|
148
128
|
status: import("./payout.dtos.js").PayoutStatus;
|
|
149
129
|
id: string;
|
|
150
|
-
profileId: string;
|
|
151
130
|
createdAt: Date;
|
|
131
|
+
profileId: string;
|
|
152
132
|
updatedAt: Date;
|
|
153
133
|
channel: string;
|
|
154
134
|
msisdn: string;
|
|
@@ -173,13 +153,13 @@ export declare const contract: {
|
|
|
173
153
|
identity: string;
|
|
174
154
|
} | null | undefined;
|
|
175
155
|
}[];
|
|
176
|
-
total: number;
|
|
177
156
|
}, {
|
|
157
|
+
total: number;
|
|
178
158
|
results: {
|
|
179
159
|
status: import("./payout.dtos.js").PayoutStatus;
|
|
180
160
|
id: string;
|
|
181
|
-
profileId: string;
|
|
182
161
|
createdAt: Date;
|
|
162
|
+
profileId: string;
|
|
183
163
|
updatedAt: Date;
|
|
184
164
|
channel: string;
|
|
185
165
|
msisdn: string;
|
|
@@ -204,7 +184,6 @@ export declare const contract: {
|
|
|
204
184
|
identity: string;
|
|
205
185
|
} | null | undefined;
|
|
206
186
|
}[];
|
|
207
|
-
total: number;
|
|
208
187
|
}>;
|
|
209
188
|
};
|
|
210
189
|
};
|
|
@@ -216,17 +195,17 @@ export declare const contract: {
|
|
|
216
195
|
approvalStatus: z.ZodNativeEnum<typeof import("./payout.dtos.js").PayoutApprovalStatus>;
|
|
217
196
|
orderByDesc: z.ZodString;
|
|
218
197
|
}, "strip", z.ZodTypeAny, {
|
|
219
|
-
approvalStatus: import("./payout.dtos.js").PayoutApprovalStatus;
|
|
220
|
-
eager: string;
|
|
221
|
-
orderByDesc: string;
|
|
222
198
|
rangeStart: number;
|
|
223
199
|
rangeEnd: number;
|
|
224
|
-
}, {
|
|
225
|
-
approvalStatus: import("./payout.dtos.js").PayoutApprovalStatus;
|
|
226
|
-
eager: string;
|
|
227
200
|
orderByDesc: string;
|
|
201
|
+
eager: string;
|
|
202
|
+
approvalStatus: import("./payout.dtos.js").PayoutApprovalStatus;
|
|
203
|
+
}, {
|
|
228
204
|
rangeStart: number;
|
|
229
205
|
rangeEnd: number;
|
|
206
|
+
orderByDesc: string;
|
|
207
|
+
eager: string;
|
|
208
|
+
approvalStatus: import("./payout.dtos.js").PayoutApprovalStatus;
|
|
230
209
|
}>;
|
|
231
210
|
method: "GET";
|
|
232
211
|
path: "";
|
|
@@ -280,8 +259,8 @@ export declare const contract: {
|
|
|
280
259
|
}, "strip", z.ZodTypeAny, {
|
|
281
260
|
status: import("./payout.dtos.js").PayoutStatus;
|
|
282
261
|
id: string;
|
|
283
|
-
profileId: string;
|
|
284
262
|
createdAt: Date;
|
|
263
|
+
profileId: string;
|
|
285
264
|
updatedAt: Date;
|
|
286
265
|
channel: string;
|
|
287
266
|
msisdn: string;
|
|
@@ -308,8 +287,8 @@ export declare const contract: {
|
|
|
308
287
|
}, {
|
|
309
288
|
status: import("./payout.dtos.js").PayoutStatus;
|
|
310
289
|
id: string;
|
|
311
|
-
profileId: string;
|
|
312
290
|
createdAt: Date;
|
|
291
|
+
profileId: string;
|
|
313
292
|
updatedAt: Date;
|
|
314
293
|
channel: string;
|
|
315
294
|
msisdn: string;
|
|
@@ -336,11 +315,12 @@ export declare const contract: {
|
|
|
336
315
|
}>, "many">;
|
|
337
316
|
total: z.ZodNumber;
|
|
338
317
|
}, "strip", z.ZodTypeAny, {
|
|
318
|
+
total: number;
|
|
339
319
|
results: {
|
|
340
320
|
status: import("./payout.dtos.js").PayoutStatus;
|
|
341
321
|
id: string;
|
|
342
|
-
profileId: string;
|
|
343
322
|
createdAt: Date;
|
|
323
|
+
profileId: string;
|
|
344
324
|
updatedAt: Date;
|
|
345
325
|
channel: string;
|
|
346
326
|
msisdn: string;
|
|
@@ -365,13 +345,13 @@ export declare const contract: {
|
|
|
365
345
|
identity: string;
|
|
366
346
|
} | null | undefined;
|
|
367
347
|
}[];
|
|
368
|
-
total: number;
|
|
369
348
|
}, {
|
|
349
|
+
total: number;
|
|
370
350
|
results: {
|
|
371
351
|
status: import("./payout.dtos.js").PayoutStatus;
|
|
372
352
|
id: string;
|
|
373
|
-
profileId: string;
|
|
374
353
|
createdAt: Date;
|
|
354
|
+
profileId: string;
|
|
375
355
|
updatedAt: Date;
|
|
376
356
|
channel: string;
|
|
377
357
|
msisdn: string;
|
|
@@ -396,7 +376,6 @@ export declare const contract: {
|
|
|
396
376
|
identity: string;
|
|
397
377
|
} | null | undefined;
|
|
398
378
|
}[];
|
|
399
|
-
total: number;
|
|
400
379
|
}>;
|
|
401
380
|
};
|
|
402
381
|
};
|
|
@@ -475,8 +454,8 @@ export declare const contract: {
|
|
|
475
454
|
}, "strip", z.ZodTypeAny, {
|
|
476
455
|
status: import("./payout.dtos.js").PayoutStatus;
|
|
477
456
|
id: string;
|
|
478
|
-
profileId: string;
|
|
479
457
|
createdAt: Date;
|
|
458
|
+
profileId: string;
|
|
480
459
|
updatedAt: Date;
|
|
481
460
|
channel: string;
|
|
482
461
|
msisdn: string;
|
|
@@ -503,8 +482,8 @@ export declare const contract: {
|
|
|
503
482
|
}, {
|
|
504
483
|
status: import("./payout.dtos.js").PayoutStatus;
|
|
505
484
|
id: string;
|
|
506
|
-
profileId: string;
|
|
507
485
|
createdAt: Date;
|
|
486
|
+
profileId: string;
|
|
508
487
|
updatedAt: Date;
|
|
509
488
|
channel: string;
|
|
510
489
|
msisdn: string;
|
|
@@ -613,8 +592,8 @@ export declare const contract: {
|
|
|
613
592
|
}, "strip", z.ZodTypeAny, {
|
|
614
593
|
status: import("./payout.dtos.js").PayoutStatus;
|
|
615
594
|
id: string;
|
|
616
|
-
profileId: string;
|
|
617
595
|
createdAt: Date;
|
|
596
|
+
profileId: string;
|
|
618
597
|
updatedAt: Date;
|
|
619
598
|
channel: string;
|
|
620
599
|
msisdn: string;
|
|
@@ -641,8 +620,8 @@ export declare const contract: {
|
|
|
641
620
|
}, {
|
|
642
621
|
status: import("./payout.dtos.js").PayoutStatus;
|
|
643
622
|
id: string;
|
|
644
|
-
profileId: string;
|
|
645
623
|
createdAt: Date;
|
|
624
|
+
profileId: string;
|
|
646
625
|
updatedAt: Date;
|
|
647
626
|
channel: string;
|
|
648
627
|
msisdn: string;
|
|
@@ -723,8 +702,8 @@ export declare const contract: {
|
|
|
723
702
|
}, "strip", z.ZodTypeAny, {
|
|
724
703
|
status: import("./payout.dtos.js").PayoutStatus;
|
|
725
704
|
id: string;
|
|
726
|
-
profileId: string;
|
|
727
705
|
createdAt: Date;
|
|
706
|
+
profileId: string;
|
|
728
707
|
updatedAt: Date;
|
|
729
708
|
channel: string;
|
|
730
709
|
msisdn: string;
|
|
@@ -751,8 +730,8 @@ export declare const contract: {
|
|
|
751
730
|
}, {
|
|
752
731
|
status: import("./payout.dtos.js").PayoutStatus;
|
|
753
732
|
id: string;
|
|
754
|
-
profileId: string;
|
|
755
733
|
createdAt: Date;
|
|
734
|
+
profileId: string;
|
|
756
735
|
updatedAt: Date;
|
|
757
736
|
channel: string;
|
|
758
737
|
msisdn: string;
|
|
@@ -143,8 +143,8 @@ declare const PayoutDTOSchema: z.ZodObject<{
|
|
|
143
143
|
}, "strip", z.ZodTypeAny, {
|
|
144
144
|
status: PayoutStatus;
|
|
145
145
|
id: string;
|
|
146
|
-
profileId: string;
|
|
147
146
|
createdAt: Date;
|
|
147
|
+
profileId: string;
|
|
148
148
|
updatedAt: Date;
|
|
149
149
|
channel: string;
|
|
150
150
|
msisdn: string;
|
|
@@ -171,8 +171,8 @@ declare const PayoutDTOSchema: z.ZodObject<{
|
|
|
171
171
|
}, {
|
|
172
172
|
status: PayoutStatus;
|
|
173
173
|
id: string;
|
|
174
|
-
profileId: string;
|
|
175
174
|
createdAt: Date;
|
|
175
|
+
profileId: string;
|
|
176
176
|
updatedAt: Date;
|
|
177
177
|
channel: string;
|
|
178
178
|
msisdn: string;
|
|
@@ -197,6 +197,122 @@ declare const PayoutDTOSchema: z.ZodObject<{
|
|
|
197
197
|
identity: string;
|
|
198
198
|
} | null | undefined;
|
|
199
199
|
}>;
|
|
200
|
+
/**
|
|
201
|
+
* Lightweight filters interface for payout queries
|
|
202
|
+
*/
|
|
203
|
+
declare const PayoutFiltersSchema: z.ZodObject<{
|
|
204
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
205
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
206
|
+
sortBy: z.ZodDefault<z.ZodString>;
|
|
207
|
+
sortOrder: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
|
|
208
|
+
startDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
209
|
+
endDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
210
|
+
payeeName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
211
|
+
msisdn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
212
|
+
profileId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
213
|
+
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
214
|
+
partnerReference: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
215
|
+
channel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
216
|
+
status: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof PayoutStatus>>>;
|
|
217
|
+
approvalStatus: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof PayoutApprovalStatus>>>;
|
|
218
|
+
minAmount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
219
|
+
maxAmount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
220
|
+
search: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
221
|
+
}, "strip", z.ZodTypeAny, {
|
|
222
|
+
page: number;
|
|
223
|
+
limit: number;
|
|
224
|
+
sortBy: string;
|
|
225
|
+
sortOrder: "asc" | "desc";
|
|
226
|
+
status?: PayoutStatus | null | undefined;
|
|
227
|
+
id?: string | null | undefined;
|
|
228
|
+
search?: string | null | undefined;
|
|
229
|
+
startDate?: string | null | undefined;
|
|
230
|
+
endDate?: string | null | undefined;
|
|
231
|
+
profileId?: string | null | undefined;
|
|
232
|
+
channel?: string | null | undefined;
|
|
233
|
+
msisdn?: string | null | undefined;
|
|
234
|
+
payeeName?: string | null | undefined;
|
|
235
|
+
partnerReference?: string | null | undefined;
|
|
236
|
+
approvalStatus?: PayoutApprovalStatus | null | undefined;
|
|
237
|
+
minAmount?: number | null | undefined;
|
|
238
|
+
maxAmount?: number | null | undefined;
|
|
239
|
+
}, {
|
|
240
|
+
status?: PayoutStatus | null | undefined;
|
|
241
|
+
page?: number | undefined;
|
|
242
|
+
limit?: number | undefined;
|
|
243
|
+
id?: string | null | undefined;
|
|
244
|
+
search?: string | null | undefined;
|
|
245
|
+
startDate?: string | null | undefined;
|
|
246
|
+
endDate?: string | null | undefined;
|
|
247
|
+
profileId?: string | null | undefined;
|
|
248
|
+
channel?: string | null | undefined;
|
|
249
|
+
msisdn?: string | null | undefined;
|
|
250
|
+
payeeName?: string | null | undefined;
|
|
251
|
+
partnerReference?: string | null | undefined;
|
|
252
|
+
approvalStatus?: PayoutApprovalStatus | null | undefined;
|
|
253
|
+
sortBy?: string | undefined;
|
|
254
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
255
|
+
minAmount?: number | null | undefined;
|
|
256
|
+
maxAmount?: number | null | undefined;
|
|
257
|
+
}>;
|
|
258
|
+
/**
|
|
259
|
+
* URL-safe schema for query parameters (all strings)
|
|
260
|
+
*/
|
|
261
|
+
declare const PayoutURLQueryParamsSchema: z.ZodObject<{
|
|
262
|
+
page: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
|
|
263
|
+
limit: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
|
|
264
|
+
sortBy: z.ZodDefault<z.ZodString>;
|
|
265
|
+
sortOrder: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
|
|
266
|
+
startDate: z.ZodOptional<z.ZodString>;
|
|
267
|
+
endDate: z.ZodOptional<z.ZodString>;
|
|
268
|
+
payeeName: z.ZodOptional<z.ZodString>;
|
|
269
|
+
msisdn: z.ZodOptional<z.ZodString>;
|
|
270
|
+
profileId: z.ZodOptional<z.ZodString>;
|
|
271
|
+
id: z.ZodOptional<z.ZodString>;
|
|
272
|
+
partnerReference: z.ZodOptional<z.ZodString>;
|
|
273
|
+
channel: z.ZodOptional<z.ZodString>;
|
|
274
|
+
status: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, PayoutStatus, string>>;
|
|
275
|
+
approvalStatus: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, PayoutApprovalStatus, string>>;
|
|
276
|
+
minAmount: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
|
|
277
|
+
maxAmount: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
|
|
278
|
+
search: z.ZodOptional<z.ZodString>;
|
|
279
|
+
}, "strip", z.ZodTypeAny, {
|
|
280
|
+
sortBy: string;
|
|
281
|
+
sortOrder: "asc" | "desc";
|
|
282
|
+
status?: PayoutStatus | undefined;
|
|
283
|
+
page?: number | undefined;
|
|
284
|
+
limit?: number | undefined;
|
|
285
|
+
id?: string | undefined;
|
|
286
|
+
search?: string | undefined;
|
|
287
|
+
startDate?: string | undefined;
|
|
288
|
+
endDate?: string | undefined;
|
|
289
|
+
profileId?: string | undefined;
|
|
290
|
+
channel?: string | undefined;
|
|
291
|
+
msisdn?: string | undefined;
|
|
292
|
+
payeeName?: string | undefined;
|
|
293
|
+
partnerReference?: string | undefined;
|
|
294
|
+
approvalStatus?: PayoutApprovalStatus | undefined;
|
|
295
|
+
minAmount?: number | undefined;
|
|
296
|
+
maxAmount?: number | undefined;
|
|
297
|
+
}, {
|
|
298
|
+
status?: string | undefined;
|
|
299
|
+
page?: string | undefined;
|
|
300
|
+
limit?: string | undefined;
|
|
301
|
+
id?: string | undefined;
|
|
302
|
+
search?: string | undefined;
|
|
303
|
+
startDate?: string | undefined;
|
|
304
|
+
endDate?: string | undefined;
|
|
305
|
+
profileId?: string | undefined;
|
|
306
|
+
channel?: string | undefined;
|
|
307
|
+
msisdn?: string | undefined;
|
|
308
|
+
payeeName?: string | undefined;
|
|
309
|
+
partnerReference?: string | undefined;
|
|
310
|
+
approvalStatus?: string | undefined;
|
|
311
|
+
sortBy?: string | undefined;
|
|
312
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
313
|
+
minAmount?: string | undefined;
|
|
314
|
+
maxAmount?: string | undefined;
|
|
315
|
+
}>;
|
|
200
316
|
/**
|
|
201
317
|
* Type definition inferred from AuthorizerSchema
|
|
202
318
|
* Represents the structure of a user who actions the payout
|
|
@@ -212,6 +328,14 @@ type PayoutInputDTO = z.infer<typeof PayoutInputDTOSchema>;
|
|
|
212
328
|
* Represents the complete payout record structure
|
|
213
329
|
*/
|
|
214
330
|
type PayoutDTO = z.infer<typeof PayoutDTOSchema>;
|
|
331
|
+
/**
|
|
332
|
+
* Type definition for payout filters
|
|
333
|
+
*/
|
|
334
|
+
type PayoutFilters = z.infer<typeof PayoutFiltersSchema>;
|
|
335
|
+
/**
|
|
336
|
+
* Type definition for URL query parameters
|
|
337
|
+
*/
|
|
338
|
+
type PayoutURLQueryParams = z.infer<typeof PayoutURLQueryParamsSchema>;
|
|
215
339
|
/**
|
|
216
340
|
* Export object containing all payout-related schemas
|
|
217
341
|
* Used for validation and type checking throughout the application
|
|
@@ -265,8 +389,8 @@ export declare const PayoutDTOSchemas: {
|
|
|
265
389
|
}, "strip", z.ZodTypeAny, {
|
|
266
390
|
status: PayoutStatus;
|
|
267
391
|
id: string;
|
|
268
|
-
profileId: string;
|
|
269
392
|
createdAt: Date;
|
|
393
|
+
profileId: string;
|
|
270
394
|
updatedAt: Date;
|
|
271
395
|
channel: string;
|
|
272
396
|
msisdn: string;
|
|
@@ -293,8 +417,8 @@ export declare const PayoutDTOSchemas: {
|
|
|
293
417
|
}, {
|
|
294
418
|
status: PayoutStatus;
|
|
295
419
|
id: string;
|
|
296
|
-
profileId: string;
|
|
297
420
|
createdAt: Date;
|
|
421
|
+
profileId: string;
|
|
298
422
|
updatedAt: Date;
|
|
299
423
|
channel: string;
|
|
300
424
|
msisdn: string;
|
|
@@ -357,9 +481,119 @@ export declare const PayoutDTOSchemas: {
|
|
|
357
481
|
id: string;
|
|
358
482
|
identity: string;
|
|
359
483
|
}>;
|
|
484
|
+
readonly PayoutFilters: z.ZodObject<{
|
|
485
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
486
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
487
|
+
sortBy: z.ZodDefault<z.ZodString>;
|
|
488
|
+
sortOrder: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
|
|
489
|
+
startDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
490
|
+
endDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
491
|
+
payeeName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
492
|
+
msisdn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
493
|
+
profileId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
494
|
+
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
495
|
+
partnerReference: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
496
|
+
channel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
497
|
+
status: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof PayoutStatus>>>;
|
|
498
|
+
approvalStatus: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof PayoutApprovalStatus>>>;
|
|
499
|
+
minAmount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
500
|
+
maxAmount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
501
|
+
search: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
502
|
+
}, "strip", z.ZodTypeAny, {
|
|
503
|
+
page: number;
|
|
504
|
+
limit: number;
|
|
505
|
+
sortBy: string;
|
|
506
|
+
sortOrder: "asc" | "desc";
|
|
507
|
+
status?: PayoutStatus | null | undefined;
|
|
508
|
+
id?: string | null | undefined;
|
|
509
|
+
search?: string | null | undefined;
|
|
510
|
+
startDate?: string | null | undefined;
|
|
511
|
+
endDate?: string | null | undefined;
|
|
512
|
+
profileId?: string | null | undefined;
|
|
513
|
+
channel?: string | null | undefined;
|
|
514
|
+
msisdn?: string | null | undefined;
|
|
515
|
+
payeeName?: string | null | undefined;
|
|
516
|
+
partnerReference?: string | null | undefined;
|
|
517
|
+
approvalStatus?: PayoutApprovalStatus | null | undefined;
|
|
518
|
+
minAmount?: number | null | undefined;
|
|
519
|
+
maxAmount?: number | null | undefined;
|
|
520
|
+
}, {
|
|
521
|
+
status?: PayoutStatus | null | undefined;
|
|
522
|
+
page?: number | undefined;
|
|
523
|
+
limit?: number | undefined;
|
|
524
|
+
id?: string | null | undefined;
|
|
525
|
+
search?: string | null | undefined;
|
|
526
|
+
startDate?: string | null | undefined;
|
|
527
|
+
endDate?: string | null | undefined;
|
|
528
|
+
profileId?: string | null | undefined;
|
|
529
|
+
channel?: string | null | undefined;
|
|
530
|
+
msisdn?: string | null | undefined;
|
|
531
|
+
payeeName?: string | null | undefined;
|
|
532
|
+
partnerReference?: string | null | undefined;
|
|
533
|
+
approvalStatus?: PayoutApprovalStatus | null | undefined;
|
|
534
|
+
sortBy?: string | undefined;
|
|
535
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
536
|
+
minAmount?: number | null | undefined;
|
|
537
|
+
maxAmount?: number | null | undefined;
|
|
538
|
+
}>;
|
|
539
|
+
readonly PayoutURLQueryParams: z.ZodObject<{
|
|
540
|
+
page: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
|
|
541
|
+
limit: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
|
|
542
|
+
sortBy: z.ZodDefault<z.ZodString>;
|
|
543
|
+
sortOrder: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
|
|
544
|
+
startDate: z.ZodOptional<z.ZodString>;
|
|
545
|
+
endDate: z.ZodOptional<z.ZodString>;
|
|
546
|
+
payeeName: z.ZodOptional<z.ZodString>;
|
|
547
|
+
msisdn: z.ZodOptional<z.ZodString>;
|
|
548
|
+
profileId: z.ZodOptional<z.ZodString>;
|
|
549
|
+
id: z.ZodOptional<z.ZodString>;
|
|
550
|
+
partnerReference: z.ZodOptional<z.ZodString>;
|
|
551
|
+
channel: z.ZodOptional<z.ZodString>;
|
|
552
|
+
status: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, PayoutStatus, string>>;
|
|
553
|
+
approvalStatus: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, PayoutApprovalStatus, string>>;
|
|
554
|
+
minAmount: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
|
|
555
|
+
maxAmount: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
|
|
556
|
+
search: z.ZodOptional<z.ZodString>;
|
|
557
|
+
}, "strip", z.ZodTypeAny, {
|
|
558
|
+
sortBy: string;
|
|
559
|
+
sortOrder: "asc" | "desc";
|
|
560
|
+
status?: PayoutStatus | undefined;
|
|
561
|
+
page?: number | undefined;
|
|
562
|
+
limit?: number | undefined;
|
|
563
|
+
id?: string | undefined;
|
|
564
|
+
search?: string | undefined;
|
|
565
|
+
startDate?: string | undefined;
|
|
566
|
+
endDate?: string | undefined;
|
|
567
|
+
profileId?: string | undefined;
|
|
568
|
+
channel?: string | undefined;
|
|
569
|
+
msisdn?: string | undefined;
|
|
570
|
+
payeeName?: string | undefined;
|
|
571
|
+
partnerReference?: string | undefined;
|
|
572
|
+
approvalStatus?: PayoutApprovalStatus | undefined;
|
|
573
|
+
minAmount?: number | undefined;
|
|
574
|
+
maxAmount?: number | undefined;
|
|
575
|
+
}, {
|
|
576
|
+
status?: string | undefined;
|
|
577
|
+
page?: string | undefined;
|
|
578
|
+
limit?: string | undefined;
|
|
579
|
+
id?: string | undefined;
|
|
580
|
+
search?: string | undefined;
|
|
581
|
+
startDate?: string | undefined;
|
|
582
|
+
endDate?: string | undefined;
|
|
583
|
+
profileId?: string | undefined;
|
|
584
|
+
channel?: string | undefined;
|
|
585
|
+
msisdn?: string | undefined;
|
|
586
|
+
payeeName?: string | undefined;
|
|
587
|
+
partnerReference?: string | undefined;
|
|
588
|
+
approvalStatus?: string | undefined;
|
|
589
|
+
sortBy?: string | undefined;
|
|
590
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
591
|
+
minAmount?: string | undefined;
|
|
592
|
+
maxAmount?: string | undefined;
|
|
593
|
+
}>;
|
|
360
594
|
};
|
|
361
595
|
/**
|
|
362
596
|
* Export types for use in other parts of the application
|
|
363
597
|
* These types can be used for type checking and documentation
|
|
364
598
|
*/
|
|
365
|
-
export type { PayoutAuthorizerDTO as PayoutAuthorizer, PayoutDTO, PayoutInputDTO };
|
|
599
|
+
export type { PayoutAuthorizerDTO as PayoutAuthorizer, PayoutDTO, PayoutInputDTO, PayoutFilters, PayoutURLQueryParams, };
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { QueryBuilder } from "@/lib/query/index.js";
|
|
2
|
+
import { PayoutStatus, PayoutApprovalStatus, PayoutFilters } from "./payout.dtos.js";
|
|
3
|
+
/**
|
|
4
|
+
* Payout-specific query builder that extends the base QueryBuilder
|
|
5
|
+
* and handles all possible input conversions (DTOs, URL params, etc.)
|
|
6
|
+
*/
|
|
7
|
+
export declare class PayoutQuery extends QueryBuilder {
|
|
8
|
+
/**
|
|
9
|
+
* Create empty payout query with defaults
|
|
10
|
+
*/
|
|
11
|
+
static create(): PayoutQuery;
|
|
12
|
+
/**
|
|
13
|
+
* Create from typed DTO/filters object
|
|
14
|
+
*/
|
|
15
|
+
static fromFilters(filters: PayoutFilters): PayoutQuery;
|
|
16
|
+
/**
|
|
17
|
+
* Create from URL search parameters (strings)
|
|
18
|
+
*/
|
|
19
|
+
static fromUrlParams(params: Record<string, string>): PayoutQuery;
|
|
20
|
+
/**
|
|
21
|
+
* Create from URLSearchParams object
|
|
22
|
+
*/
|
|
23
|
+
static fromSearchParams(searchParams: URLSearchParams): PayoutQuery;
|
|
24
|
+
/**
|
|
25
|
+
* Create from Next.js Request object
|
|
26
|
+
*/
|
|
27
|
+
static fromRequest(request: Request): PayoutQuery;
|
|
28
|
+
/**
|
|
29
|
+
* Create from any supported input type
|
|
30
|
+
*/
|
|
31
|
+
static from(input: QueryBuilder | PayoutFilters | Record<string, string> | URLSearchParams | null | undefined): PayoutQuery;
|
|
32
|
+
/**
|
|
33
|
+
* Type guard for string records
|
|
34
|
+
*/
|
|
35
|
+
private static isStringRecord;
|
|
36
|
+
whereStatus(status: PayoutStatus): this;
|
|
37
|
+
whereApprovalStatus(approvalStatus: PayoutApprovalStatus): this;
|
|
38
|
+
whereChannel(channel: string): this;
|
|
39
|
+
wherePending(): this;
|
|
40
|
+
whereApproved(): this;
|
|
41
|
+
whereRejected(): this;
|
|
42
|
+
wherePaid(): this;
|
|
43
|
+
whereFailed(): this;
|
|
44
|
+
whereAmountBetween(min: number, max: number): this;
|
|
45
|
+
wherePayee(payeeName: string): this;
|
|
46
|
+
whereMsisdn(msisdn: string): this;
|
|
47
|
+
whereProfileId(profileId: string): this;
|
|
48
|
+
wherePartnerReference(partnerReference: string): this;
|
|
49
|
+
whereSearch(searchTerm: string): this;
|
|
50
|
+
/**
|
|
51
|
+
* Apply all filters from PayoutFilters object
|
|
52
|
+
*/
|
|
53
|
+
private applyFilters;
|
|
54
|
+
/**
|
|
55
|
+
* Convert to PayoutFilters DTO
|
|
56
|
+
*/
|
|
57
|
+
toFilters(): PayoutFilters;
|
|
58
|
+
/**
|
|
59
|
+
* Convert to URL-safe string parameters
|
|
60
|
+
*/
|
|
61
|
+
toUrlParams(): Record<string, string>;
|
|
62
|
+
/**
|
|
63
|
+
* Convert to URLSearchParams
|
|
64
|
+
*/
|
|
65
|
+
toSearchParams(): URLSearchParams;
|
|
66
|
+
/**
|
|
67
|
+
* Convert to query string
|
|
68
|
+
*/
|
|
69
|
+
toQueryString(): string;
|
|
70
|
+
/**
|
|
71
|
+
* Create new instance with updated pagination
|
|
72
|
+
*/
|
|
73
|
+
withPagination(page: number, limit?: number): PayoutQuery;
|
|
74
|
+
/**
|
|
75
|
+
* Create new instance with updated sorting
|
|
76
|
+
*/
|
|
77
|
+
withSorting(sortBy: string, sortOrder?: "asc" | "desc"): PayoutQuery;
|
|
78
|
+
/**
|
|
79
|
+
* Create new instance with date range
|
|
80
|
+
*/
|
|
81
|
+
withDateRange(startDate?: string, endDate?: string): PayoutQuery;
|
|
82
|
+
/**
|
|
83
|
+
* Create new instance with status filter
|
|
84
|
+
*/
|
|
85
|
+
withStatus(status?: PayoutStatus): PayoutQuery;
|
|
86
|
+
/**
|
|
87
|
+
* Create new instance with approval status filter
|
|
88
|
+
*/
|
|
89
|
+
withApprovalStatus(approvalStatus?: PayoutApprovalStatus): PayoutQuery;
|
|
90
|
+
/**
|
|
91
|
+
* Create new instance with channel filter
|
|
92
|
+
*/
|
|
93
|
+
withChannel(channel?: string): PayoutQuery;
|
|
94
|
+
/**
|
|
95
|
+
* Reset to first page
|
|
96
|
+
*/
|
|
97
|
+
resetPage(): PayoutQuery;
|
|
98
|
+
/**
|
|
99
|
+
* Check if any filters are applied
|
|
100
|
+
*/
|
|
101
|
+
hasFilters(): boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Get human-readable filter descriptions
|
|
104
|
+
*/
|
|
105
|
+
getActiveFilters(): string[];
|
|
106
|
+
/**
|
|
107
|
+
* Extract filter values from QueryBuilder options
|
|
108
|
+
*/
|
|
109
|
+
private extractFilterValues;
|
|
110
|
+
/**
|
|
111
|
+
* Extract primary sort field
|
|
112
|
+
*/
|
|
113
|
+
private extractSortField;
|
|
114
|
+
/**
|
|
115
|
+
* Extract primary sort order
|
|
116
|
+
*/
|
|
117
|
+
private extractSortOrder;
|
|
118
|
+
/**
|
|
119
|
+
* Type guard for valid statuses
|
|
120
|
+
*/
|
|
121
|
+
private isValidStatus;
|
|
122
|
+
/**
|
|
123
|
+
* Type guard for valid approval statuses
|
|
124
|
+
*/
|
|
125
|
+
private isValidApprovalStatus;
|
|
126
|
+
}
|