@temboplus/afloat 0.2.0-beta.2 → 0.2.0-beta.3
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 +6 -1
- package/dist/modules/payout/payout.query.d.ts +29 -0
- package/dist/modules/wallet/wallet.query.d.ts +31 -0
- package/package.json +1 -1
|
@@ -64,7 +64,12 @@ export declare class QueryBuilder {
|
|
|
64
64
|
*/
|
|
65
65
|
countAs(expression: string, alias: string): this;
|
|
66
66
|
/**
|
|
67
|
-
*
|
|
67
|
+
* Build the query into an objection-find compatible object.
|
|
68
|
+
*
|
|
69
|
+
* Pagination (rangeStart/rangeEnd) is only included if both `page` and `limit`
|
|
70
|
+
* have been explicitly set via `.paginate()` or in the constructor options.
|
|
71
|
+
*
|
|
72
|
+
* @returns An objection-find query object
|
|
68
73
|
*/
|
|
69
74
|
build(): Record<string, any>;
|
|
70
75
|
/**
|
|
@@ -111,6 +111,35 @@ export declare class PayoutQuery extends QueryBuilder {
|
|
|
111
111
|
* Get human-readable filter descriptions
|
|
112
112
|
*/
|
|
113
113
|
getActiveFilters(): string[];
|
|
114
|
+
/**
|
|
115
|
+
* Build the query into an objection-find compatible object for payout queries.
|
|
116
|
+
*
|
|
117
|
+
* The output object contains:
|
|
118
|
+
* - Filters: Field conditions like `status:eq`, `createdAt:gte`, `payeeName:likeLower`
|
|
119
|
+
* - Sorting: `orderBy` and/or `orderByDesc` with comma-separated fields
|
|
120
|
+
* - Pagination: `rangeStart` and `rangeEnd` (only if `.paginate()` was called)
|
|
121
|
+
* - Relations: `eager` for included relations via `.with()` or `.includeDefaultRelations()`
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* ```ts
|
|
125
|
+
* // Paginated query
|
|
126
|
+
* const paged = PayoutQuery.create()
|
|
127
|
+
* .whereStatus(PayoutStatus.PAID)
|
|
128
|
+
* .paginate(1, 20)
|
|
129
|
+
* .build();
|
|
130
|
+
* // => { "status:eq": "PAID", rangeStart: 0, rangeEnd: 19 }
|
|
131
|
+
*
|
|
132
|
+
* // Unpaginated list (no rangeStart/rangeEnd)
|
|
133
|
+
* const all = PayoutQuery.create()
|
|
134
|
+
* .whereApproved()
|
|
135
|
+
* .orderByDesc("createdAt")
|
|
136
|
+
* .build();
|
|
137
|
+
* // => { "approvalStatus:eq": "APPROVED", orderByDesc: "createdAt" }
|
|
138
|
+
* ```
|
|
139
|
+
*
|
|
140
|
+
* @returns An objection-find query object
|
|
141
|
+
*/
|
|
142
|
+
build(): Record<string, any>;
|
|
114
143
|
/**
|
|
115
144
|
* Extract filter values from QueryBuilder options
|
|
116
145
|
*/
|
|
@@ -88,6 +88,37 @@ export declare class WalletQuery extends QueryBuilder {
|
|
|
88
88
|
* Get human-readable filter descriptions
|
|
89
89
|
*/
|
|
90
90
|
getActiveFilters(): string[];
|
|
91
|
+
/**
|
|
92
|
+
* Build the query into an objection-find compatible object for wallet queries.
|
|
93
|
+
*
|
|
94
|
+
* The output object contains:
|
|
95
|
+
* - Filters: Field conditions like `id:eq`, `profileId:eq`, `accountName:likeLower`
|
|
96
|
+
* - Sorting: `orderBy` and/or `orderByDesc` with comma-separated fields
|
|
97
|
+
* - Pagination: `rangeStart` and `rangeEnd` (only if `.paginate()` was called)
|
|
98
|
+
*
|
|
99
|
+
* Since wallets are typically fetched as complete lists (not paginated),
|
|
100
|
+
* pagination is usually omitted.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```ts
|
|
104
|
+
* // Get all wallets for a profile (no pagination)
|
|
105
|
+
* const query = WalletQuery.create()
|
|
106
|
+
* .whereProfileId("prof_123")
|
|
107
|
+
* .whereCurrencyCode("TZS")
|
|
108
|
+
* .build();
|
|
109
|
+
* // => { "profileId:eq": "prof_123", "currencyCode:eq": "TZS" }
|
|
110
|
+
*
|
|
111
|
+
* // Paginated wallet list (if needed)
|
|
112
|
+
* const paged = WalletQuery.create()
|
|
113
|
+
* .whereChannel("MOBILE")
|
|
114
|
+
* .paginate(1, 10)
|
|
115
|
+
* .build();
|
|
116
|
+
* // => { "channel:eq": "MOBILE", rangeStart: 0, rangeEnd: 9 }
|
|
117
|
+
* ```
|
|
118
|
+
*
|
|
119
|
+
* @returns An objection-find query object
|
|
120
|
+
*/
|
|
121
|
+
build(): Record<string, any>;
|
|
91
122
|
/**
|
|
92
123
|
* Extract filter values from QueryBuilder options
|
|
93
124
|
*/
|