@temboplus/tembo-dashboard 0.0.3 → 0.0.5

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.
@@ -22,11 +22,17 @@ export declare class QueryBuilder {
22
22
  whereIn(field: string, values: any[]): this;
23
23
  whereNull(field: string): this;
24
24
  whereNotNull(field: string): this;
25
+ whereGreaterThan(field: string, value: any): this;
26
+ whereGreaterThanOrEqual(field: string, value: any): this;
27
+ whereLessThan(field: string, value: any): this;
28
+ whereLessThanOrEqual(field: string, value: any): this;
29
+ whereBetween(field: string, min: any, max: any): this;
30
+ whereDateBetween(startDate?: string, endDate?: string): this;
25
31
  addSort(criteria: SortCriteria): this;
26
32
  orderBy(field: string, direction?: SortDirection): this;
27
33
  orderByAsc(field: string): this;
28
34
  orderByDesc(field: string): this;
29
- paginate(page: number, pageSize: number): this;
35
+ paginate(page: number, limit: number): this;
30
36
  /**
31
37
  * Add eager loading for related models
32
38
  * @param relations Relation name or array of relation names
@@ -61,5 +67,5 @@ export declare class QueryBuilder {
61
67
  * Create a clone of this query builder
62
68
  */
63
69
  clone(): this;
64
- static create(options?: QueryOptions): QueryBuilder;
70
+ static create<T extends QueryOptions>(options?: T): QueryBuilder;
65
71
  }
@@ -26,7 +26,7 @@ export interface SortCriteria {
26
26
  }
27
27
  export interface QueryOptions {
28
28
  page?: number;
29
- pageSize?: number;
29
+ limit?: number;
30
30
  filters?: FilterCriteria[];
31
31
  sort?: SortCriteria[];
32
32
  includes?: string[];
@@ -8,7 +8,7 @@ export declare const collectionContract: {
8
8
  path: "/";
9
9
  responses: {
10
10
  200: z.ZodObject<{
11
- data: z.ZodArray<z.ZodObject<{
11
+ results: z.ZodArray<z.ZodObject<{
12
12
  id: z.ZodString;
13
13
  status: z.ZodNativeEnum<typeof import("./collection.dtos").COLLECTION_STATUS>;
14
14
  statusMessage: z.ZodString;
@@ -33,6 +33,7 @@ export declare const collectionContract: {
33
33
  currencyCode: z.ZodDefault<z.ZodString>;
34
34
  }, "strip", z.ZodTypeAny, {
35
35
  status: import("./collection.dtos").COLLECTION_STATUS;
36
+ createdAt: string;
36
37
  id: string;
37
38
  statusMessage: string;
38
39
  accountNo: string;
@@ -43,7 +44,6 @@ export declare const collectionContract: {
43
44
  channel: import("./collection.dtos").COLLECTION_CHANNEL;
44
45
  amount: number;
45
46
  reference: string;
46
- createdAt: string;
47
47
  updatedAt: string;
48
48
  currencyCode: string;
49
49
  serviceFee?: string | undefined;
@@ -56,6 +56,7 @@ export declare const collectionContract: {
56
56
  notes?: string | undefined;
57
57
  }, {
58
58
  status: import("./collection.dtos").COLLECTION_STATUS;
59
+ createdAt: string;
59
60
  id: string;
60
61
  statusMessage: string;
61
62
  accountNo: string;
@@ -66,7 +67,6 @@ export declare const collectionContract: {
66
67
  channel: import("./collection.dtos").COLLECTION_CHANNEL;
67
68
  amount: number;
68
69
  reference: string;
69
- createdAt: string;
70
70
  updatedAt: string;
71
71
  serviceFee?: string | undefined;
72
72
  postedAmount?: string | undefined;
@@ -81,8 +81,9 @@ export declare const collectionContract: {
81
81
  total: z.ZodNumber;
82
82
  }, "strip", z.ZodTypeAny, {
83
83
  total: number;
84
- data: {
84
+ results: {
85
85
  status: import("./collection.dtos").COLLECTION_STATUS;
86
+ createdAt: string;
86
87
  id: string;
87
88
  statusMessage: string;
88
89
  accountNo: string;
@@ -93,7 +94,6 @@ export declare const collectionContract: {
93
94
  channel: import("./collection.dtos").COLLECTION_CHANNEL;
94
95
  amount: number;
95
96
  reference: string;
96
- createdAt: string;
97
97
  updatedAt: string;
98
98
  currencyCode: string;
99
99
  serviceFee?: string | undefined;
@@ -107,8 +107,9 @@ export declare const collectionContract: {
107
107
  }[];
108
108
  }, {
109
109
  total: number;
110
- data: {
110
+ results: {
111
111
  status: import("./collection.dtos").COLLECTION_STATUS;
112
+ createdAt: string;
112
113
  id: string;
113
114
  statusMessage: string;
114
115
  accountNo: string;
@@ -119,7 +120,6 @@ export declare const collectionContract: {
119
120
  channel: import("./collection.dtos").COLLECTION_CHANNEL;
120
121
  amount: number;
121
122
  reference: string;
122
- createdAt: string;
123
123
  updatedAt: string;
124
124
  serviceFee?: string | undefined;
125
125
  postedAmount?: string | undefined;
@@ -186,6 +186,7 @@ export declare const collectionContract: {
186
186
  currencyCode: z.ZodDefault<z.ZodString>;
187
187
  }, "strip", z.ZodTypeAny, {
188
188
  status: import("./collection.dtos").COLLECTION_STATUS;
189
+ createdAt: string;
189
190
  id: string;
190
191
  statusMessage: string;
191
192
  accountNo: string;
@@ -196,7 +197,6 @@ export declare const collectionContract: {
196
197
  channel: import("./collection.dtos").COLLECTION_CHANNEL;
197
198
  amount: number;
198
199
  reference: string;
199
- createdAt: string;
200
200
  updatedAt: string;
201
201
  currencyCode: string;
202
202
  serviceFee?: string | undefined;
@@ -209,6 +209,7 @@ export declare const collectionContract: {
209
209
  notes?: string | undefined;
210
210
  }, {
211
211
  status: import("./collection.dtos").COLLECTION_STATUS;
212
+ createdAt: string;
212
213
  id: string;
213
214
  statusMessage: string;
214
215
  accountNo: string;
@@ -219,7 +220,6 @@ export declare const collectionContract: {
219
220
  channel: import("./collection.dtos").COLLECTION_CHANNEL;
220
221
  amount: number;
221
222
  reference: string;
222
- createdAt: string;
223
223
  updatedAt: string;
224
224
  serviceFee?: string | undefined;
225
225
  postedAmount?: string | undefined;
@@ -10,22 +10,6 @@ export declare enum COLLECTION_CHANNEL {
10
10
  TIGO = "TZ-TIGO-C2B",
11
11
  HALOTEL = "TZ-HALOTEL-C2B"
12
12
  }
13
- export declare const accountSummarySchema: z.ZodObject<{
14
- balance: z.ZodNumber;
15
- availableBalance: z.ZodNumber;
16
- accountNumber: z.ZodString;
17
- accountName: z.ZodString;
18
- }, "strip", z.ZodTypeAny, {
19
- balance: number;
20
- availableBalance: number;
21
- accountNumber: string;
22
- accountName: string;
23
- }, {
24
- balance: number;
25
- availableBalance: number;
26
- accountNumber: string;
27
- accountName: string;
28
- }>;
29
13
  export declare const CollectionDTOSchemas: {
30
14
  collection: z.ZodObject<{
31
15
  id: z.ZodString;
@@ -52,6 +36,7 @@ export declare const CollectionDTOSchemas: {
52
36
  currencyCode: z.ZodDefault<z.ZodString>;
53
37
  }, "strip", z.ZodTypeAny, {
54
38
  status: COLLECTION_STATUS;
39
+ createdAt: string;
55
40
  id: string;
56
41
  statusMessage: string;
57
42
  accountNo: string;
@@ -62,7 +47,6 @@ export declare const CollectionDTOSchemas: {
62
47
  channel: COLLECTION_CHANNEL;
63
48
  amount: number;
64
49
  reference: string;
65
- createdAt: string;
66
50
  updatedAt: string;
67
51
  currencyCode: string;
68
52
  serviceFee?: string | undefined;
@@ -75,6 +59,7 @@ export declare const CollectionDTOSchemas: {
75
59
  notes?: string | undefined;
76
60
  }, {
77
61
  status: COLLECTION_STATUS;
62
+ createdAt: string;
78
63
  id: string;
79
64
  statusMessage: string;
80
65
  accountNo: string;
@@ -85,7 +70,6 @@ export declare const CollectionDTOSchemas: {
85
70
  channel: COLLECTION_CHANNEL;
86
71
  amount: number;
87
72
  reference: string;
88
- createdAt: string;
89
73
  updatedAt: string;
90
74
  serviceFee?: string | undefined;
91
75
  postedAmount?: string | undefined;
@@ -100,7 +84,7 @@ export declare const CollectionDTOSchemas: {
100
84
  collectionQueryParams: z.ZodObject<{
101
85
  page: z.ZodDefault<z.ZodNumber>;
102
86
  limit: z.ZodDefault<z.ZodNumber>;
103
- sortBy: z.ZodDefault<z.ZodEnum<["transactionDate", "amount", "status", "createdAt"]>>;
87
+ sortBy: z.ZodDefault<z.ZodString>;
104
88
  sortOrder: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
105
89
  startDate: z.ZodOptional<z.ZodString>;
106
90
  endDate: z.ZodOptional<z.ZodString>;
@@ -117,9 +101,11 @@ export declare const CollectionDTOSchemas: {
117
101
  }, "strip", z.ZodTypeAny, {
118
102
  page: number;
119
103
  limit: number;
120
- sortBy: "status" | "transactionDate" | "amount" | "createdAt";
104
+ sortBy: string;
121
105
  sortOrder: "asc" | "desc";
122
106
  status?: COLLECTION_STATUS | undefined;
107
+ startDate?: string | undefined;
108
+ endDate?: string | undefined;
123
109
  search?: string | undefined;
124
110
  id?: string | undefined;
125
111
  accountNo?: string | undefined;
@@ -127,12 +113,12 @@ export declare const CollectionDTOSchemas: {
127
113
  channel?: COLLECTION_CHANNEL | undefined;
128
114
  reference?: string | undefined;
129
115
  partnerReference?: string | undefined;
130
- startDate?: string | undefined;
131
- endDate?: string | undefined;
132
116
  minAmount?: number | undefined;
133
117
  maxAmount?: number | undefined;
134
118
  }, {
135
119
  status?: COLLECTION_STATUS | undefined;
120
+ startDate?: string | undefined;
121
+ endDate?: string | undefined;
136
122
  page?: number | undefined;
137
123
  limit?: number | undefined;
138
124
  search?: string | undefined;
@@ -142,10 +128,8 @@ export declare const CollectionDTOSchemas: {
142
128
  channel?: COLLECTION_CHANNEL | undefined;
143
129
  reference?: string | undefined;
144
130
  partnerReference?: string | undefined;
145
- sortBy?: "status" | "transactionDate" | "amount" | "createdAt" | undefined;
131
+ sortBy?: string | undefined;
146
132
  sortOrder?: "asc" | "desc" | undefined;
147
- startDate?: string | undefined;
148
- endDate?: string | undefined;
149
133
  minAmount?: number | undefined;
150
134
  maxAmount?: number | undefined;
151
135
  }>;
@@ -173,7 +157,7 @@ export declare const CollectionDTOSchemas: {
173
157
  }>;
174
158
  paymentStatus: z.ZodNativeEnum<typeof COLLECTION_STATUS>;
175
159
  paymentChannel: z.ZodNativeEnum<typeof COLLECTION_CHANNEL>;
176
- accountSummary: z.ZodObject<{
160
+ walletSummary: z.ZodObject<{
177
161
  balance: z.ZodNumber;
178
162
  availableBalance: z.ZodNumber;
179
163
  accountNumber: z.ZodString;
@@ -192,4 +176,3 @@ export declare const CollectionDTOSchemas: {
192
176
  };
193
177
  export type CollectionDTO = z.infer<typeof CollectionDTOSchemas.collection>;
194
178
  export type CollectionQueryParamsDTO = z.infer<typeof CollectionDTOSchemas.collectionQueryParams>;
195
- export type AccountSummaryDTO = z.infer<typeof CollectionDTOSchemas.accountSummary>;
@@ -4,6 +4,9 @@ import { COLLECTION_STATUS, COLLECTION_CHANNEL, CollectionQueryParamsDTO } from
4
4
  * Specialized query builder for collection queries
5
5
  */
6
6
  export declare class CollectionQueryBuilder extends QueryBuilder {
7
+ static create(): CollectionQueryBuilder;
8
+ static forCollections(): CollectionQueryBuilder;
9
+ static fromDTO(dto: CollectionQueryParamsDTO): CollectionQueryBuilder;
7
10
  whereStatus(status: COLLECTION_STATUS): this;
8
11
  whereChannel(channel: COLLECTION_CHANNEL): this;
9
12
  wherePending(): this;
@@ -14,5 +17,11 @@ export declare class CollectionQueryBuilder extends QueryBuilder {
14
17
  whereAccount(accountNo: string): this;
15
18
  whereReference(reference: string): this;
16
19
  wherePartnerReference(partnerReference: string): this;
20
+ whereSearch(searchTerm: string): this;
17
21
  toCollectionQuery(): CollectionQueryParamsDTO;
22
+ private extractFilterValues;
23
+ private extractSortField;
24
+ private extractSortOrder;
25
+ private isValidChannel;
26
+ private isValidStatus;
18
27
  }
@@ -1,6 +1,6 @@
1
- import { BaseRepository, PaginationDTO } from "@/lib/api";
1
+ import { BaseRepository, PaginationDTO, WalletSummaryDTO } from "@/lib/api";
2
2
  import { collectionContract } from "./collection.api-contract";
3
- import { type CollectionQueryParamsDTO, AccountSummaryDTO } from "./collection.dtos";
3
+ import { type CollectionQueryParamsDTO } from "./collection.dtos";
4
4
  import { Collection } from "./collection.model";
5
5
  /**
6
6
  * Repository class for managing collections through API interactions.
@@ -34,5 +34,5 @@ export declare class CollectionRepository extends BaseRepository<typeof collecti
34
34
  /**
35
35
  * Get account balance and summary information
36
36
  */
37
- getBalance(): Promise<AccountSummaryDTO>;
37
+ getBalance(): Promise<WalletSummaryDTO>;
38
38
  }
@@ -4,7 +4,7 @@ export declare const payoutContract: {
4
4
  query: z.ZodObject<{
5
5
  page: z.ZodDefault<z.ZodNumber>;
6
6
  limit: z.ZodDefault<z.ZodNumber>;
7
- sortBy: z.ZodDefault<z.ZodEnum<["transactionDate", "amount", "statusCodeText", "createdAt"]>>;
7
+ sortBy: z.ZodDefault<z.ZodString>;
8
8
  sortOrder: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
9
9
  startDate: z.ZodOptional<z.ZodString>;
10
10
  endDate: z.ZodOptional<z.ZodString>;
@@ -19,30 +19,30 @@ export declare const payoutContract: {
19
19
  }, "strip", z.ZodTypeAny, {
20
20
  page: number;
21
21
  limit: number;
22
- sortBy: "transactionDate" | "amount" | "createdAt" | "statusCodeText";
22
+ sortBy: string;
23
23
  sortOrder: "asc" | "desc";
24
24
  status?: import("./payout.dtos").PAYOUT_STATUS | undefined;
25
+ startDate?: string | undefined;
26
+ endDate?: string | undefined;
25
27
  search?: string | undefined;
26
28
  id?: string | undefined;
27
29
  msisdn?: string | undefined;
28
30
  channel?: import("./payout.dtos").MOBILE_PAYOUT_CHANNEL | import("./payout.dtos").BANK_PAYOUT_CHANNEL | undefined;
29
- startDate?: string | undefined;
30
- endDate?: string | undefined;
31
31
  minAmount?: number | undefined;
32
32
  maxAmount?: number | undefined;
33
33
  ref?: string | undefined;
34
34
  }, {
35
35
  status?: import("./payout.dtos").PAYOUT_STATUS | undefined;
36
+ startDate?: string | undefined;
37
+ endDate?: string | undefined;
36
38
  page?: number | undefined;
37
39
  limit?: number | undefined;
38
40
  search?: string | undefined;
39
41
  id?: string | undefined;
40
42
  msisdn?: string | undefined;
41
43
  channel?: import("./payout.dtos").MOBILE_PAYOUT_CHANNEL | import("./payout.dtos").BANK_PAYOUT_CHANNEL | undefined;
42
- sortBy?: "transactionDate" | "amount" | "createdAt" | "statusCodeText" | undefined;
44
+ sortBy?: string | undefined;
43
45
  sortOrder?: "asc" | "desc" | undefined;
44
- startDate?: string | undefined;
45
- endDate?: string | undefined;
46
46
  minAmount?: number | undefined;
47
47
  maxAmount?: number | undefined;
48
48
  ref?: string | undefined;
@@ -53,7 +53,7 @@ export declare const payoutContract: {
53
53
  path: "";
54
54
  responses: {
55
55
  200: z.ZodObject<{
56
- data: z.ZodArray<z.ZodObject<{
56
+ results: z.ZodArray<z.ZodObject<{
57
57
  id: z.ZodString;
58
58
  statusCode: z.ZodString;
59
59
  statusCodeText: z.ZodNativeEnum<typeof import("./payout.dtos").PAYOUT_STATUS>;
@@ -84,13 +84,13 @@ export declare const payoutContract: {
84
84
  updatedAt: z.ZodOptional<z.ZodString>;
85
85
  }, "strip", z.ZodTypeAny, {
86
86
  statusCode: string;
87
+ createdAt: string;
87
88
  id: string;
88
89
  transactionDate: string;
89
90
  narration: string;
90
91
  msisdn: string;
91
92
  amount: number;
92
93
  transactionId: string;
93
- createdAt: string;
94
94
  currencyCode: string;
95
95
  statusCodeText: import("./payout.dtos").PAYOUT_STATUS;
96
96
  statusDescription: string;
@@ -113,13 +113,13 @@ export declare const payoutContract: {
113
113
  isReconciled?: number | undefined;
114
114
  }, {
115
115
  statusCode: string;
116
+ createdAt: string;
116
117
  id: string;
117
118
  transactionDate: string;
118
119
  narration: string;
119
120
  msisdn: string;
120
121
  amount: number;
121
122
  transactionId: string;
122
- createdAt: string;
123
123
  currencyCode: string;
124
124
  statusCodeText: import("./payout.dtos").PAYOUT_STATUS;
125
125
  statusDescription: string;
@@ -144,15 +144,15 @@ export declare const payoutContract: {
144
144
  total: z.ZodNumber;
145
145
  }, "strip", z.ZodTypeAny, {
146
146
  total: number;
147
- data: {
147
+ results: {
148
148
  statusCode: string;
149
+ createdAt: string;
149
150
  id: string;
150
151
  transactionDate: string;
151
152
  narration: string;
152
153
  msisdn: string;
153
154
  amount: number;
154
155
  transactionId: string;
155
- createdAt: string;
156
156
  currencyCode: string;
157
157
  statusCodeText: import("./payout.dtos").PAYOUT_STATUS;
158
158
  statusDescription: string;
@@ -176,15 +176,15 @@ export declare const payoutContract: {
176
176
  }[];
177
177
  }, {
178
178
  total: number;
179
- data: {
179
+ results: {
180
180
  statusCode: string;
181
+ createdAt: string;
181
182
  id: string;
182
183
  transactionDate: string;
183
184
  narration: string;
184
185
  msisdn: string;
185
186
  amount: number;
186
187
  transactionId: string;
187
- createdAt: string;
188
188
  currencyCode: string;
189
189
  statusCodeText: import("./payout.dtos").PAYOUT_STATUS;
190
190
  statusDescription: string;
@@ -267,13 +267,13 @@ export declare const payoutContract: {
267
267
  updatedAt: z.ZodOptional<z.ZodString>;
268
268
  }, "strip", z.ZodTypeAny, {
269
269
  statusCode: string;
270
+ createdAt: string;
270
271
  id: string;
271
272
  transactionDate: string;
272
273
  narration: string;
273
274
  msisdn: string;
274
275
  amount: number;
275
276
  transactionId: string;
276
- createdAt: string;
277
277
  currencyCode: string;
278
278
  statusCodeText: import("./payout.dtos").PAYOUT_STATUS;
279
279
  statusDescription: string;
@@ -296,13 +296,13 @@ export declare const payoutContract: {
296
296
  isReconciled?: number | undefined;
297
297
  }, {
298
298
  statusCode: string;
299
+ createdAt: string;
299
300
  id: string;
300
301
  transactionDate: string;
301
302
  narration: string;
302
303
  msisdn: string;
303
304
  amount: number;
304
305
  transactionId: string;
305
- createdAt: string;
306
306
  currencyCode: string;
307
307
  statusCodeText: import("./payout.dtos").PAYOUT_STATUS;
308
308
  statusDescription: string;
@@ -54,13 +54,13 @@ export declare const PayoutDTOSchemas: {
54
54
  updatedAt: z.ZodOptional<z.ZodString>;
55
55
  }, "strip", z.ZodTypeAny, {
56
56
  statusCode: string;
57
+ createdAt: string;
57
58
  id: string;
58
59
  transactionDate: string;
59
60
  narration: string;
60
61
  msisdn: string;
61
62
  amount: number;
62
63
  transactionId: string;
63
- createdAt: string;
64
64
  currencyCode: string;
65
65
  statusCodeText: PAYOUT_STATUS;
66
66
  statusDescription: string;
@@ -83,13 +83,13 @@ export declare const PayoutDTOSchemas: {
83
83
  isReconciled?: number | undefined;
84
84
  }, {
85
85
  statusCode: string;
86
+ createdAt: string;
86
87
  id: string;
87
88
  transactionDate: string;
88
89
  narration: string;
89
90
  msisdn: string;
90
91
  amount: number;
91
92
  transactionId: string;
92
- createdAt: string;
93
93
  currencyCode: string;
94
94
  statusCodeText: PAYOUT_STATUS;
95
95
  statusDescription: string;
@@ -114,7 +114,7 @@ export declare const PayoutDTOSchemas: {
114
114
  payoutQueryParams: z.ZodObject<{
115
115
  page: z.ZodDefault<z.ZodNumber>;
116
116
  limit: z.ZodDefault<z.ZodNumber>;
117
- sortBy: z.ZodDefault<z.ZodEnum<["transactionDate", "amount", "statusCodeText", "createdAt"]>>;
117
+ sortBy: z.ZodDefault<z.ZodString>;
118
118
  sortOrder: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
119
119
  startDate: z.ZodOptional<z.ZodString>;
120
120
  endDate: z.ZodOptional<z.ZodString>;
@@ -129,30 +129,30 @@ export declare const PayoutDTOSchemas: {
129
129
  }, "strip", z.ZodTypeAny, {
130
130
  page: number;
131
131
  limit: number;
132
- sortBy: "transactionDate" | "amount" | "createdAt" | "statusCodeText";
132
+ sortBy: string;
133
133
  sortOrder: "asc" | "desc";
134
134
  status?: PAYOUT_STATUS | undefined;
135
+ startDate?: string | undefined;
136
+ endDate?: string | undefined;
135
137
  search?: string | undefined;
136
138
  id?: string | undefined;
137
139
  msisdn?: string | undefined;
138
140
  channel?: MOBILE_PAYOUT_CHANNEL | BANK_PAYOUT_CHANNEL | undefined;
139
- startDate?: string | undefined;
140
- endDate?: string | undefined;
141
141
  minAmount?: number | undefined;
142
142
  maxAmount?: number | undefined;
143
143
  ref?: string | undefined;
144
144
  }, {
145
145
  status?: PAYOUT_STATUS | undefined;
146
+ startDate?: string | undefined;
147
+ endDate?: string | undefined;
146
148
  page?: number | undefined;
147
149
  limit?: number | undefined;
148
150
  search?: string | undefined;
149
151
  id?: string | undefined;
150
152
  msisdn?: string | undefined;
151
153
  channel?: MOBILE_PAYOUT_CHANNEL | BANK_PAYOUT_CHANNEL | undefined;
152
- sortBy?: "transactionDate" | "amount" | "createdAt" | "statusCodeText" | undefined;
154
+ sortBy?: string | undefined;
153
155
  sortOrder?: "asc" | "desc" | undefined;
154
- startDate?: string | undefined;
155
- endDate?: string | undefined;
156
156
  minAmount?: number | undefined;
157
157
  maxAmount?: number | undefined;
158
158
  ref?: string | undefined;
@@ -4,6 +4,8 @@ import { PAYOUT_STATUS, PAYOUT_CHANNEL, PayoutQueryParamsDTO } from "./payout.dt
4
4
  * Specialized query builder for payout queries
5
5
  */
6
6
  export declare class PayoutQueryBuilder extends QueryBuilder {
7
+ static create(): PayoutQueryBuilder;
8
+ static fromDTO(dto: PayoutQueryParamsDTO): PayoutQueryBuilder;
7
9
  whereStatus(status: PAYOUT_STATUS): this;
8
10
  whereChannel(channel: PAYOUT_CHANNEL): this;
9
11
  wherePending(): this;
@@ -11,5 +13,13 @@ export declare class PayoutQueryBuilder extends QueryBuilder {
11
13
  whereFailed(): this;
12
14
  whereAmountBetween(min: number, max: number): this;
13
15
  whereRecipient(msisdn: string): this;
16
+ whereReference(ref: string): this;
17
+ whereSearch(searchTerm: string): this;
14
18
  toPayoutQuery(): PayoutQueryParamsDTO;
19
+ private extractFilterValues;
20
+ private extractSortField;
21
+ private extractSortOrder;
22
+ private isValidChannel;
23
+ private isValidStatus;
24
+ static forPayouts(): PayoutQueryBuilder;
15
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@temboplus/tembo-dashboard",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "A foundational library for Temboplus-Dashboard projects providing type-safe data layer abstraction with API contracts, domain models, and repositories.",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.esm.js",