@temboplus/afloat 0.1.77-beta.11 → 0.1.77-beta.13
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/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/lib/query/query.builder.d.ts +5 -1
- package/dist/modules/payout/payout.dtos.d.ts +16 -16
- package/dist/modules/payout/payout.repository.d.ts +35 -23
- package/package.json +1 -1
|
@@ -27,7 +27,11 @@ export declare class QueryBuilder {
|
|
|
27
27
|
whereLessThan(field: string, value: any): this;
|
|
28
28
|
whereLessThanOrEqual(field: string, value: any): this;
|
|
29
29
|
whereBetween(field: string, min: any, max: any): this;
|
|
30
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Filter by date range with support for Date objects, strings, and null
|
|
32
|
+
* Internally converts to createdAt:gte and createdAt:lte filters
|
|
33
|
+
*/
|
|
34
|
+
whereDateBetween(startDate?: string | Date | null, endDate?: string | Date | null): this;
|
|
31
35
|
addSort(criteria: SortCriteria): this;
|
|
32
36
|
orderBy(field: string, direction?: SortDirection): this;
|
|
33
37
|
orderByAsc(field: string): this;
|
|
@@ -228,14 +228,14 @@ declare const PayoutFiltersSchema: z.ZodObject<{
|
|
|
228
228
|
id?: string | null | undefined;
|
|
229
229
|
profileId?: string | null | undefined;
|
|
230
230
|
search?: string | null | undefined;
|
|
231
|
-
startDate?: string | null | undefined;
|
|
232
|
-
endDate?: string | null | undefined;
|
|
233
231
|
channel?: string | null | undefined;
|
|
234
232
|
currencyCode?: string | null | undefined;
|
|
235
233
|
msisdn?: string | null | undefined;
|
|
236
234
|
payeeName?: string | null | undefined;
|
|
237
235
|
partnerReference?: string | null | undefined;
|
|
238
236
|
approvalStatus?: PayoutApprovalStatus | null | undefined;
|
|
237
|
+
startDate?: string | null | undefined;
|
|
238
|
+
endDate?: string | null | undefined;
|
|
239
239
|
minAmount?: number | null | undefined;
|
|
240
240
|
maxAmount?: number | null | undefined;
|
|
241
241
|
}, {
|
|
@@ -243,8 +243,6 @@ declare const PayoutFiltersSchema: z.ZodObject<{
|
|
|
243
243
|
id?: string | null | undefined;
|
|
244
244
|
profileId?: string | null | undefined;
|
|
245
245
|
search?: string | null | undefined;
|
|
246
|
-
startDate?: string | null | undefined;
|
|
247
|
-
endDate?: string | null | undefined;
|
|
248
246
|
page?: number | undefined;
|
|
249
247
|
limit?: number | undefined;
|
|
250
248
|
channel?: string | null | undefined;
|
|
@@ -255,6 +253,8 @@ declare const PayoutFiltersSchema: z.ZodObject<{
|
|
|
255
253
|
approvalStatus?: PayoutApprovalStatus | null | undefined;
|
|
256
254
|
sortBy?: string | undefined;
|
|
257
255
|
sortOrder?: "asc" | "desc" | undefined;
|
|
256
|
+
startDate?: string | null | undefined;
|
|
257
|
+
endDate?: string | null | undefined;
|
|
258
258
|
minAmount?: number | null | undefined;
|
|
259
259
|
maxAmount?: number | null | undefined;
|
|
260
260
|
}>;
|
|
@@ -286,8 +286,6 @@ declare const PayoutURLQueryParamsSchema: z.ZodObject<{
|
|
|
286
286
|
id?: string | undefined;
|
|
287
287
|
profileId?: string | undefined;
|
|
288
288
|
search?: string | undefined;
|
|
289
|
-
startDate?: string | undefined;
|
|
290
|
-
endDate?: string | undefined;
|
|
291
289
|
page?: number | undefined;
|
|
292
290
|
limit?: number | undefined;
|
|
293
291
|
channel?: string | undefined;
|
|
@@ -295,6 +293,8 @@ declare const PayoutURLQueryParamsSchema: z.ZodObject<{
|
|
|
295
293
|
payeeName?: string | undefined;
|
|
296
294
|
partnerReference?: string | undefined;
|
|
297
295
|
approvalStatus?: PayoutApprovalStatus | undefined;
|
|
296
|
+
startDate?: string | undefined;
|
|
297
|
+
endDate?: string | undefined;
|
|
298
298
|
minAmount?: number | undefined;
|
|
299
299
|
maxAmount?: number | undefined;
|
|
300
300
|
}, {
|
|
@@ -302,8 +302,6 @@ declare const PayoutURLQueryParamsSchema: z.ZodObject<{
|
|
|
302
302
|
id?: string | undefined;
|
|
303
303
|
profileId?: string | undefined;
|
|
304
304
|
search?: string | undefined;
|
|
305
|
-
startDate?: string | undefined;
|
|
306
|
-
endDate?: string | undefined;
|
|
307
305
|
page?: string | undefined;
|
|
308
306
|
limit?: string | undefined;
|
|
309
307
|
channel?: string | undefined;
|
|
@@ -313,6 +311,8 @@ declare const PayoutURLQueryParamsSchema: z.ZodObject<{
|
|
|
313
311
|
approvalStatus?: string | undefined;
|
|
314
312
|
sortBy?: string | undefined;
|
|
315
313
|
sortOrder?: "asc" | "desc" | undefined;
|
|
314
|
+
startDate?: string | undefined;
|
|
315
|
+
endDate?: string | undefined;
|
|
316
316
|
minAmount?: string | undefined;
|
|
317
317
|
maxAmount?: string | undefined;
|
|
318
318
|
}>;
|
|
@@ -512,14 +512,14 @@ export declare const PayoutDTOSchemas: {
|
|
|
512
512
|
id?: string | null | undefined;
|
|
513
513
|
profileId?: string | null | undefined;
|
|
514
514
|
search?: string | null | undefined;
|
|
515
|
-
startDate?: string | null | undefined;
|
|
516
|
-
endDate?: string | null | undefined;
|
|
517
515
|
channel?: string | null | undefined;
|
|
518
516
|
currencyCode?: string | null | undefined;
|
|
519
517
|
msisdn?: string | null | undefined;
|
|
520
518
|
payeeName?: string | null | undefined;
|
|
521
519
|
partnerReference?: string | null | undefined;
|
|
522
520
|
approvalStatus?: PayoutApprovalStatus | null | undefined;
|
|
521
|
+
startDate?: string | null | undefined;
|
|
522
|
+
endDate?: string | null | undefined;
|
|
523
523
|
minAmount?: number | null | undefined;
|
|
524
524
|
maxAmount?: number | null | undefined;
|
|
525
525
|
}, {
|
|
@@ -527,8 +527,6 @@ export declare const PayoutDTOSchemas: {
|
|
|
527
527
|
id?: string | null | undefined;
|
|
528
528
|
profileId?: string | null | undefined;
|
|
529
529
|
search?: string | null | undefined;
|
|
530
|
-
startDate?: string | null | undefined;
|
|
531
|
-
endDate?: string | null | undefined;
|
|
532
530
|
page?: number | undefined;
|
|
533
531
|
limit?: number | undefined;
|
|
534
532
|
channel?: string | null | undefined;
|
|
@@ -539,6 +537,8 @@ export declare const PayoutDTOSchemas: {
|
|
|
539
537
|
approvalStatus?: PayoutApprovalStatus | null | undefined;
|
|
540
538
|
sortBy?: string | undefined;
|
|
541
539
|
sortOrder?: "asc" | "desc" | undefined;
|
|
540
|
+
startDate?: string | null | undefined;
|
|
541
|
+
endDate?: string | null | undefined;
|
|
542
542
|
minAmount?: number | null | undefined;
|
|
543
543
|
maxAmount?: number | null | undefined;
|
|
544
544
|
}>;
|
|
@@ -567,8 +567,6 @@ export declare const PayoutDTOSchemas: {
|
|
|
567
567
|
id?: string | undefined;
|
|
568
568
|
profileId?: string | undefined;
|
|
569
569
|
search?: string | undefined;
|
|
570
|
-
startDate?: string | undefined;
|
|
571
|
-
endDate?: string | undefined;
|
|
572
570
|
page?: number | undefined;
|
|
573
571
|
limit?: number | undefined;
|
|
574
572
|
channel?: string | undefined;
|
|
@@ -576,6 +574,8 @@ export declare const PayoutDTOSchemas: {
|
|
|
576
574
|
payeeName?: string | undefined;
|
|
577
575
|
partnerReference?: string | undefined;
|
|
578
576
|
approvalStatus?: PayoutApprovalStatus | undefined;
|
|
577
|
+
startDate?: string | undefined;
|
|
578
|
+
endDate?: string | undefined;
|
|
579
579
|
minAmount?: number | undefined;
|
|
580
580
|
maxAmount?: number | undefined;
|
|
581
581
|
}, {
|
|
@@ -583,8 +583,6 @@ export declare const PayoutDTOSchemas: {
|
|
|
583
583
|
id?: string | undefined;
|
|
584
584
|
profileId?: string | undefined;
|
|
585
585
|
search?: string | undefined;
|
|
586
|
-
startDate?: string | undefined;
|
|
587
|
-
endDate?: string | undefined;
|
|
588
586
|
page?: string | undefined;
|
|
589
587
|
limit?: string | undefined;
|
|
590
588
|
channel?: string | undefined;
|
|
@@ -594,6 +592,8 @@ export declare const PayoutDTOSchemas: {
|
|
|
594
592
|
approvalStatus?: string | undefined;
|
|
595
593
|
sortBy?: string | undefined;
|
|
596
594
|
sortOrder?: "asc" | "desc" | undefined;
|
|
595
|
+
startDate?: string | undefined;
|
|
596
|
+
endDate?: string | undefined;
|
|
597
597
|
minAmount?: string | undefined;
|
|
598
598
|
maxAmount?: string | undefined;
|
|
599
599
|
}>;
|
|
@@ -7,6 +7,29 @@ import { PayoutChannel } from "./payout.dtos.js";
|
|
|
7
7
|
import { PayoutQuery } from "./payout.query.js";
|
|
8
8
|
import { PayoutFilters } from "./payout.dtos.js";
|
|
9
9
|
import { Paged } from "@/lib/query/index.js";
|
|
10
|
+
/**
|
|
11
|
+
* Input type for payout creation mutation
|
|
12
|
+
*/
|
|
13
|
+
export interface CreatePayoutInput {
|
|
14
|
+
channel: PayoutChannel;
|
|
15
|
+
receiver: ContactInfo;
|
|
16
|
+
amount: Amount;
|
|
17
|
+
notes?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Input type for payout approval mutation
|
|
21
|
+
*/
|
|
22
|
+
export interface ApprovePayoutInput {
|
|
23
|
+
id: string;
|
|
24
|
+
notes?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Input type for payout rejection mutation
|
|
28
|
+
*/
|
|
29
|
+
export interface RejectPayoutInput {
|
|
30
|
+
id: string;
|
|
31
|
+
notes?: string;
|
|
32
|
+
}
|
|
10
33
|
/**
|
|
11
34
|
* Flexible query input type - supports the class, filters interface, URL params, etc.
|
|
12
35
|
*/
|
|
@@ -93,11 +116,11 @@ export declare class PayoutRepository extends BaseRepository<PayoutAPI> {
|
|
|
93
116
|
/**
|
|
94
117
|
* Creates a new payout with the provided input data.
|
|
95
118
|
*
|
|
96
|
-
* @param
|
|
97
|
-
* @param
|
|
98
|
-
* @param
|
|
99
|
-
* @param
|
|
100
|
-
* @param
|
|
119
|
+
* @param input - The payout creation data
|
|
120
|
+
* @param input.channel - The payout channel to use
|
|
121
|
+
* @param input.receiver - Contact information for the payout receiver
|
|
122
|
+
* @param input.amount - The amount to pay out
|
|
123
|
+
* @param input.notes - Optional notes for the payout
|
|
101
124
|
* @returns Promise that resolves to the created payout
|
|
102
125
|
* @throws {APIError} If the input is invalid or if the creation operation fails
|
|
103
126
|
*
|
|
@@ -111,18 +134,12 @@ export declare class PayoutRepository extends BaseRepository<PayoutAPI> {
|
|
|
111
134
|
* });
|
|
112
135
|
* ```
|
|
113
136
|
*/
|
|
114
|
-
pay(
|
|
115
|
-
channel: PayoutChannel;
|
|
116
|
-
receiver: ContactInfo;
|
|
117
|
-
amount: Amount;
|
|
118
|
-
notes?: string;
|
|
119
|
-
}): Promise<Payout>;
|
|
137
|
+
pay(input: CreatePayoutInput): Promise<Payout>;
|
|
120
138
|
/**
|
|
121
139
|
* Approves a payout with optional notes.
|
|
122
140
|
*
|
|
123
|
-
* @param id - The ID of the payout to approve
|
|
124
|
-
* @param
|
|
125
|
-
* @param args.notes - Optional notes for the approval
|
|
141
|
+
* @param input.id - The ID of the payout to approve
|
|
142
|
+
* @param input.notes - Optional notes for the approval
|
|
126
143
|
* @returns Promise that resolves to the approved payout
|
|
127
144
|
* @throws {APIError} If payout is not found, already approved, or if the operation fails
|
|
128
145
|
*
|
|
@@ -133,15 +150,12 @@ export declare class PayoutRepository extends BaseRepository<PayoutAPI> {
|
|
|
133
150
|
* });
|
|
134
151
|
* ```
|
|
135
152
|
*/
|
|
136
|
-
approve(
|
|
137
|
-
notes?: string;
|
|
138
|
-
}): Promise<Payout>;
|
|
153
|
+
approve(input: ApprovePayoutInput): Promise<Payout>;
|
|
139
154
|
/**
|
|
140
155
|
* Rejects a payout with optional notes.
|
|
141
156
|
*
|
|
142
|
-
* @param id - The ID of the payout to reject
|
|
143
|
-
* @param
|
|
144
|
-
* @param args.notes - Optional notes for the rejection
|
|
157
|
+
* @param input.id - The ID of the payout to reject
|
|
158
|
+
* @param input.notes - Optional notes for the rejection
|
|
145
159
|
* @returns Promise that resolves to the rejected payout
|
|
146
160
|
* @throws {APIError} If payout is not found, already rejected, or if the operation fails
|
|
147
161
|
*
|
|
@@ -152,9 +166,7 @@ export declare class PayoutRepository extends BaseRepository<PayoutAPI> {
|
|
|
152
166
|
* });
|
|
153
167
|
* ```
|
|
154
168
|
*/
|
|
155
|
-
reject(
|
|
156
|
-
notes?: string;
|
|
157
|
-
}): Promise<Payout>;
|
|
169
|
+
reject(input: RejectPayoutInput): Promise<Payout>;
|
|
158
170
|
/**
|
|
159
171
|
* Retrieves a payout by its ID.
|
|
160
172
|
*
|