@temboplus/tembo-dashboard 0.1.3-beta.4 → 0.1.3-beta.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.
- 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/modules/collection/collection.api-contract.d.ts +12 -0
- package/dist/modules/collection/collection.query.d.ts +35 -6
- package/dist/modules/collection/collection.repository.d.ts +1 -1
- package/dist/modules/collection/collection.types.d.ts +30 -0
- package/dist/modules/payout/payout.api-contract.d.ts +18 -0
- package/dist/modules/payout/payout.query.d.ts +40 -7
- package/dist/modules/payout/payout.repository.d.ts +1 -1
- package/dist/modules/payout/payout.types.d.ts +42 -0
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { QueryBuilder } from "../../lib/query";
|
|
2
2
|
import { COLLECTION_STATUS, COLLECTION_CHANNEL, CollectionFilters } from "./collection.types";
|
|
3
|
+
type CollectionUrlParams = Record<string, string | string[]>;
|
|
3
4
|
/**
|
|
4
5
|
* Collection-specific query builder that extends the base QueryBuilder
|
|
5
6
|
* and handles all possible input conversions (DTOs, URL params, etc.)
|
|
@@ -14,9 +15,9 @@ export declare class CollectionQuery extends QueryBuilder {
|
|
|
14
15
|
*/
|
|
15
16
|
static fromFilters(filters: CollectionFilters): CollectionQuery;
|
|
16
17
|
/**
|
|
17
|
-
* Create from URL search parameters (strings)
|
|
18
|
+
* Create from URL search parameters (strings or string arrays)
|
|
18
19
|
*/
|
|
19
|
-
static fromUrlParams(params:
|
|
20
|
+
static fromUrlParams(params: CollectionUrlParams): CollectionQuery;
|
|
20
21
|
/**
|
|
21
22
|
* Create from URLSearchParams object
|
|
22
23
|
*/
|
|
@@ -28,13 +29,31 @@ export declare class CollectionQuery extends QueryBuilder {
|
|
|
28
29
|
/**
|
|
29
30
|
* Create from any supported input type
|
|
30
31
|
*/
|
|
31
|
-
static from(input: QueryBuilder | CollectionFilters |
|
|
32
|
+
static from(input: QueryBuilder | CollectionFilters | CollectionUrlParams | URLSearchParams | null | undefined): CollectionQuery;
|
|
32
33
|
/**
|
|
33
|
-
* Type guard for string
|
|
34
|
+
* Type guard for URL param records (string or string[] values)
|
|
34
35
|
*/
|
|
35
|
-
private static
|
|
36
|
+
private static isUrlParamsRecord;
|
|
37
|
+
/**
|
|
38
|
+
* Convert URLSearchParams to a record, collecting repeated keys into arrays.
|
|
39
|
+
*/
|
|
40
|
+
private static searchParamsToRecord;
|
|
41
|
+
/**
|
|
42
|
+
* Fold the various URL spellings of multi-value filters into a single
|
|
43
|
+
* canonical `${field}In` key with an array value. Accepts:
|
|
44
|
+
* - `idIn=a,b,c`
|
|
45
|
+
* - `id:in=a,b,c` (objection-find wire format)
|
|
46
|
+
* - `id[]=a&id[]=b` (HTML-style bracket array)
|
|
47
|
+
* - `idIn[]=a&idIn[]=b`
|
|
48
|
+
* - `id=a&id=b` (repeated scalar)
|
|
49
|
+
*/
|
|
50
|
+
private static normalizeUrlParams;
|
|
36
51
|
whereStatus(status: COLLECTION_STATUS): this;
|
|
52
|
+
whereStatusIn(statuses: COLLECTION_STATUS[]): this;
|
|
37
53
|
whereChannel(channel: COLLECTION_CHANNEL): this;
|
|
54
|
+
whereChannelIn(channels: COLLECTION_CHANNEL[]): this;
|
|
55
|
+
whereIdIn(ids: string[]): this;
|
|
56
|
+
whereReferenceIn(references: string[]): this;
|
|
38
57
|
wherePending(): this;
|
|
39
58
|
whereSuccessful(): this;
|
|
40
59
|
whereFailed(): this;
|
|
@@ -54,7 +73,8 @@ export declare class CollectionQuery extends QueryBuilder {
|
|
|
54
73
|
*/
|
|
55
74
|
toFilters(): CollectionFilters;
|
|
56
75
|
/**
|
|
57
|
-
* Convert to URL-safe string parameters
|
|
76
|
+
* Convert to URL-safe string parameters.
|
|
77
|
+
* IN-filter arrays are emitted as comma-joined strings under the `${field}In` key.
|
|
58
78
|
*/
|
|
59
79
|
toUrlParams(): Record<string, string>;
|
|
60
80
|
/**
|
|
@@ -101,6 +121,14 @@ export declare class CollectionQuery extends QueryBuilder {
|
|
|
101
121
|
* Extract filter values from QueryBuilder options
|
|
102
122
|
*/
|
|
103
123
|
private extractFilterValues;
|
|
124
|
+
/**
|
|
125
|
+
* Apply an IN filter, silently no-op when the normalized list is empty.
|
|
126
|
+
*/
|
|
127
|
+
private whereInValues;
|
|
128
|
+
/** Narrow an unknown array to a `COLLECTION_STATUS[]` (preserving order). */
|
|
129
|
+
private getValidStatuses;
|
|
130
|
+
/** Narrow an unknown array to a `COLLECTION_CHANNEL[]` (preserving order). */
|
|
131
|
+
private getValidChannels;
|
|
104
132
|
/**
|
|
105
133
|
* Extract primary sort field
|
|
106
134
|
*/
|
|
@@ -118,3 +146,4 @@ export declare class CollectionQuery extends QueryBuilder {
|
|
|
118
146
|
*/
|
|
119
147
|
private isValidStatus;
|
|
120
148
|
}
|
|
149
|
+
export {};
|
|
@@ -7,7 +7,7 @@ import { TransactionSummary } from "../../lib/models";
|
|
|
7
7
|
/**
|
|
8
8
|
* Flexible query input type - supports the class, filters interface, URL params, etc.
|
|
9
9
|
*/
|
|
10
|
-
export type CollectionQueryInput = CollectionQuery | CollectionFilters | Record<string, string> | URLSearchParams | null | undefined;
|
|
10
|
+
export type CollectionQueryInput = CollectionQuery | CollectionFilters | Record<string, string | string[]> | URLSearchParams | null | undefined;
|
|
11
11
|
/**
|
|
12
12
|
* Repository class for managing collections through API interactions.
|
|
13
13
|
* Handles collection operations, filtering, and summary data retrieval.
|
|
@@ -14,6 +14,12 @@ export declare enum COLLECTION_CHANNEL {
|
|
|
14
14
|
SAFARICOM = "KE-SAFARICOM-C2B",
|
|
15
15
|
VODACOM = "TZ-VODACOM-C2B"
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Accepts a single string, a comma-separated string, or an array of strings,
|
|
19
|
+
* and normalizes to a deduplicated, trimmed, non-empty `string[]`.
|
|
20
|
+
*/
|
|
21
|
+
declare const toStringArray: (value: unknown) => string[];
|
|
22
|
+
export { toStringArray as collectionToStringArray };
|
|
17
23
|
export declare const CollectionDTOSchemas: {
|
|
18
24
|
collection: z.ZodObject<{
|
|
19
25
|
id: z.ZodString;
|
|
@@ -106,12 +112,16 @@ export declare const CollectionDTOSchemas: {
|
|
|
106
112
|
endDate: z.ZodOptional<z.ZodString>;
|
|
107
113
|
msisdn: z.ZodOptional<z.ZodString>;
|
|
108
114
|
id: z.ZodOptional<z.ZodString>;
|
|
115
|
+
idIn: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
109
116
|
reference: z.ZodOptional<z.ZodString>;
|
|
117
|
+
referenceIn: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
110
118
|
accountNo: z.ZodOptional<z.ZodString>;
|
|
111
119
|
walletId: z.ZodOptional<z.ZodString>;
|
|
112
120
|
partnerReference: z.ZodOptional<z.ZodString>;
|
|
113
121
|
channel: z.ZodOptional<z.ZodNativeEnum<typeof COLLECTION_CHANNEL>>;
|
|
122
|
+
channelIn: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof COLLECTION_CHANNEL>, "many">>;
|
|
114
123
|
status: z.ZodOptional<z.ZodNativeEnum<typeof COLLECTION_STATUS>>;
|
|
124
|
+
statusIn: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof COLLECTION_STATUS>, "many">>;
|
|
115
125
|
minAmount: z.ZodOptional<z.ZodNumber>;
|
|
116
126
|
maxAmount: z.ZodOptional<z.ZodNumber>;
|
|
117
127
|
search: z.ZodOptional<z.ZodString>;
|
|
@@ -131,6 +141,10 @@ export declare const CollectionDTOSchemas: {
|
|
|
131
141
|
partnerReference?: string | undefined;
|
|
132
142
|
startDate?: string | undefined;
|
|
133
143
|
endDate?: string | undefined;
|
|
144
|
+
idIn?: string[] | undefined;
|
|
145
|
+
referenceIn?: string[] | undefined;
|
|
146
|
+
channelIn?: COLLECTION_CHANNEL[] | undefined;
|
|
147
|
+
statusIn?: COLLECTION_STATUS[] | undefined;
|
|
134
148
|
minAmount?: number | undefined;
|
|
135
149
|
maxAmount?: number | undefined;
|
|
136
150
|
}, {
|
|
@@ -149,6 +163,10 @@ export declare const CollectionDTOSchemas: {
|
|
|
149
163
|
sortOrder?: "asc" | "desc" | undefined;
|
|
150
164
|
startDate?: string | undefined;
|
|
151
165
|
endDate?: string | undefined;
|
|
166
|
+
idIn?: string[] | undefined;
|
|
167
|
+
referenceIn?: string[] | undefined;
|
|
168
|
+
channelIn?: COLLECTION_CHANNEL[] | undefined;
|
|
169
|
+
statusIn?: COLLECTION_STATUS[] | undefined;
|
|
152
170
|
minAmount?: number | undefined;
|
|
153
171
|
maxAmount?: number | undefined;
|
|
154
172
|
}>;
|
|
@@ -161,12 +179,16 @@ export declare const CollectionDTOSchemas: {
|
|
|
161
179
|
endDate: z.ZodOptional<z.ZodString>;
|
|
162
180
|
msisdn: z.ZodOptional<z.ZodString>;
|
|
163
181
|
id: z.ZodOptional<z.ZodString>;
|
|
182
|
+
idIn: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>;
|
|
164
183
|
reference: z.ZodOptional<z.ZodString>;
|
|
184
|
+
referenceIn: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>;
|
|
165
185
|
accountNo: z.ZodOptional<z.ZodString>;
|
|
166
186
|
walletId: z.ZodOptional<z.ZodString>;
|
|
167
187
|
partnerReference: z.ZodOptional<z.ZodString>;
|
|
168
188
|
channel: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, COLLECTION_CHANNEL, string>>;
|
|
189
|
+
channelIn: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>, z.ZodArray<z.ZodNativeEnum<typeof COLLECTION_CHANNEL>, "many">>>;
|
|
169
190
|
status: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, COLLECTION_STATUS, string>>;
|
|
191
|
+
statusIn: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>, z.ZodArray<z.ZodNativeEnum<typeof COLLECTION_STATUS>, "many">>>;
|
|
170
192
|
minAmount: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
|
|
171
193
|
maxAmount: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
|
|
172
194
|
search: z.ZodOptional<z.ZodString>;
|
|
@@ -186,6 +208,10 @@ export declare const CollectionDTOSchemas: {
|
|
|
186
208
|
partnerReference?: string | undefined;
|
|
187
209
|
startDate?: string | undefined;
|
|
188
210
|
endDate?: string | undefined;
|
|
211
|
+
idIn?: string[] | undefined;
|
|
212
|
+
referenceIn?: string[] | undefined;
|
|
213
|
+
channelIn?: COLLECTION_CHANNEL[] | undefined;
|
|
214
|
+
statusIn?: COLLECTION_STATUS[] | undefined;
|
|
189
215
|
minAmount?: number | undefined;
|
|
190
216
|
maxAmount?: number | undefined;
|
|
191
217
|
}, {
|
|
@@ -204,6 +230,10 @@ export declare const CollectionDTOSchemas: {
|
|
|
204
230
|
sortOrder?: "asc" | "desc" | undefined;
|
|
205
231
|
startDate?: string | undefined;
|
|
206
232
|
endDate?: string | undefined;
|
|
233
|
+
idIn?: string | string[] | undefined;
|
|
234
|
+
referenceIn?: string | string[] | undefined;
|
|
235
|
+
channelIn?: string | string[] | undefined;
|
|
236
|
+
statusIn?: string | string[] | undefined;
|
|
207
237
|
minAmount?: string | undefined;
|
|
208
238
|
maxAmount?: string | undefined;
|
|
209
239
|
}>;
|
|
@@ -12,9 +12,15 @@ export declare const payoutContract: {
|
|
|
12
12
|
accountNo: z.ZodOptional<z.ZodString>;
|
|
13
13
|
walletId: z.ZodOptional<z.ZodString>;
|
|
14
14
|
id: z.ZodOptional<z.ZodString>;
|
|
15
|
+
idIn: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>;
|
|
15
16
|
ref: z.ZodOptional<z.ZodString>;
|
|
17
|
+
refIn: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>;
|
|
18
|
+
channelRef: z.ZodOptional<z.ZodString>;
|
|
19
|
+
channelRefIn: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>;
|
|
16
20
|
channel: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("./payout.types").MOBILE_PAYOUT_CHANNEL | import("./payout.types").BANK_PAYOUT_CHANNEL, string>>;
|
|
21
|
+
channelIn: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>, z.ZodArray<z.ZodUnion<[z.ZodNativeEnum<typeof import("./payout.types").MOBILE_PAYOUT_CHANNEL>, z.ZodNativeEnum<typeof import("./payout.types").BANK_PAYOUT_CHANNEL>]>, "many">>>;
|
|
17
22
|
status: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("./payout.types").PAYOUT_STATUS, string>>;
|
|
23
|
+
statusIn: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>, z.ZodArray<z.ZodNativeEnum<typeof import("./payout.types").PAYOUT_STATUS>, "many">>>;
|
|
18
24
|
minAmount: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
|
|
19
25
|
maxAmount: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
|
|
20
26
|
search: z.ZodOptional<z.ZodString>;
|
|
@@ -32,9 +38,15 @@ export declare const payoutContract: {
|
|
|
32
38
|
channel?: import("./payout.types").MOBILE_PAYOUT_CHANNEL | import("./payout.types").BANK_PAYOUT_CHANNEL | undefined;
|
|
33
39
|
startDate?: string | undefined;
|
|
34
40
|
endDate?: string | undefined;
|
|
41
|
+
idIn?: string[] | undefined;
|
|
42
|
+
channelIn?: (import("./payout.types").MOBILE_PAYOUT_CHANNEL | import("./payout.types").BANK_PAYOUT_CHANNEL.BANK)[] | undefined;
|
|
43
|
+
statusIn?: import("./payout.types").PAYOUT_STATUS[] | undefined;
|
|
35
44
|
minAmount?: number | undefined;
|
|
36
45
|
maxAmount?: number | undefined;
|
|
37
46
|
ref?: string | undefined;
|
|
47
|
+
refIn?: string[] | undefined;
|
|
48
|
+
channelRef?: string | undefined;
|
|
49
|
+
channelRefIn?: string[] | undefined;
|
|
38
50
|
}, {
|
|
39
51
|
status?: string | undefined;
|
|
40
52
|
page?: string | undefined;
|
|
@@ -49,9 +61,15 @@ export declare const payoutContract: {
|
|
|
49
61
|
sortOrder?: "asc" | "desc" | undefined;
|
|
50
62
|
startDate?: string | undefined;
|
|
51
63
|
endDate?: string | undefined;
|
|
64
|
+
idIn?: string | string[] | undefined;
|
|
65
|
+
channelIn?: string | string[] | undefined;
|
|
66
|
+
statusIn?: string | string[] | undefined;
|
|
52
67
|
minAmount?: string | undefined;
|
|
53
68
|
maxAmount?: string | undefined;
|
|
54
69
|
ref?: string | undefined;
|
|
70
|
+
refIn?: string | string[] | undefined;
|
|
71
|
+
channelRef?: string | undefined;
|
|
72
|
+
channelRefIn?: string | string[] | undefined;
|
|
55
73
|
}>;
|
|
56
74
|
summary: "List payouts";
|
|
57
75
|
description: "Retrieve a paginated list of payouts with optional filtering";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { QueryBuilder } from "../../lib/query";
|
|
2
2
|
import { PAYOUT_STATUS, PAYOUT_CHANNEL, PayoutFilters } from "./payout.types";
|
|
3
|
+
type PayoutUrlParams = Record<string, string | string[]>;
|
|
3
4
|
/**
|
|
4
5
|
* Payout-specific query builder that extends the base QueryBuilder
|
|
5
6
|
* and handles all possible input conversions (DTOs, URL params, etc.)
|
|
@@ -14,9 +15,9 @@ export declare class PayoutQuery extends QueryBuilder {
|
|
|
14
15
|
*/
|
|
15
16
|
static fromFilters(filters: PayoutFilters): PayoutQuery;
|
|
16
17
|
/**
|
|
17
|
-
* Create from URL search parameters (strings)
|
|
18
|
+
* Create from URL search parameters (strings or string arrays)
|
|
18
19
|
*/
|
|
19
|
-
static fromUrlParams(params:
|
|
20
|
+
static fromUrlParams(params: PayoutUrlParams): PayoutQuery;
|
|
20
21
|
/**
|
|
21
22
|
* Create from URLSearchParams object
|
|
22
23
|
*/
|
|
@@ -28,13 +29,33 @@ export declare class PayoutQuery extends QueryBuilder {
|
|
|
28
29
|
/**
|
|
29
30
|
* Create from any supported input type
|
|
30
31
|
*/
|
|
31
|
-
static from(input: QueryBuilder | PayoutFilters |
|
|
32
|
+
static from(input: QueryBuilder | PayoutFilters | PayoutUrlParams | URLSearchParams | null | undefined): PayoutQuery;
|
|
32
33
|
/**
|
|
33
|
-
* Type guard for string
|
|
34
|
+
* Type guard for URL param records (string or string[] values)
|
|
34
35
|
*/
|
|
35
|
-
private static
|
|
36
|
+
private static isUrlParamsRecord;
|
|
37
|
+
/**
|
|
38
|
+
* Convert URLSearchParams to a record, collecting repeated keys into arrays.
|
|
39
|
+
*/
|
|
40
|
+
private static searchParamsToRecord;
|
|
41
|
+
/**
|
|
42
|
+
* Fold the various URL spellings of multi-value filters into a single
|
|
43
|
+
* canonical `${field}In` key with an array value. Accepts:
|
|
44
|
+
* - `statusIn=a,b,c`
|
|
45
|
+
* - `status:in=a,b,c` (objection-find wire format)
|
|
46
|
+
* - `status[]=a&status[]=b` (HTML-style bracket array)
|
|
47
|
+
* - `statusIn[]=a&statusIn[]=b`
|
|
48
|
+
* - `status=a&status=b` (repeated scalar)
|
|
49
|
+
*/
|
|
50
|
+
private static normalizeUrlParams;
|
|
36
51
|
whereStatus(status: PAYOUT_STATUS): this;
|
|
52
|
+
whereStatusIn(statuses: PAYOUT_STATUS[]): this;
|
|
37
53
|
whereChannel(channel: PAYOUT_CHANNEL): this;
|
|
54
|
+
whereChannelIn(channels: PAYOUT_CHANNEL[]): this;
|
|
55
|
+
whereIdIn(ids: string[]): this;
|
|
56
|
+
whereRefIn(refs: string[]): this;
|
|
57
|
+
whereChannelRef(channelRef: string): this;
|
|
58
|
+
whereChannelRefIn(channelRefs: string[]): this;
|
|
38
59
|
wherePending(): this;
|
|
39
60
|
whereSuccessful(): this;
|
|
40
61
|
whereFailed(): this;
|
|
@@ -55,7 +76,8 @@ export declare class PayoutQuery extends QueryBuilder {
|
|
|
55
76
|
*/
|
|
56
77
|
toFilters(): PayoutFilters;
|
|
57
78
|
/**
|
|
58
|
-
* Convert to URL-safe string parameters
|
|
79
|
+
* Convert to URL-safe string parameters.
|
|
80
|
+
* IN-filter arrays are emitted as comma-joined strings under the `${field}In` key.
|
|
59
81
|
*/
|
|
60
82
|
toUrlParams(): Record<string, string>;
|
|
61
83
|
/**
|
|
@@ -99,9 +121,19 @@ export declare class PayoutQuery extends QueryBuilder {
|
|
|
99
121
|
*/
|
|
100
122
|
getActiveFilters(): string[];
|
|
101
123
|
/**
|
|
102
|
-
* Extract filter values from QueryBuilder options
|
|
124
|
+
* Extract filter values from QueryBuilder options. Maps wire-field names
|
|
125
|
+
* back onto surface-filter names (statusCodeText→status, etc.) for fields
|
|
126
|
+
* that have a friendly alias on `PayoutFilters`.
|
|
103
127
|
*/
|
|
104
128
|
private extractFilterValues;
|
|
129
|
+
/**
|
|
130
|
+
* Apply an IN filter, silently no-op when the normalized list is empty.
|
|
131
|
+
*/
|
|
132
|
+
private whereInValues;
|
|
133
|
+
/** Narrow an unknown array to a `PAYOUT_STATUS[]` (preserving order). */
|
|
134
|
+
private getValidStatuses;
|
|
135
|
+
/** Narrow an unknown array to a `PAYOUT_CHANNEL[]` (preserving order). */
|
|
136
|
+
private getValidChannels;
|
|
105
137
|
/**
|
|
106
138
|
* Extract primary sort field
|
|
107
139
|
*/
|
|
@@ -119,3 +151,4 @@ export declare class PayoutQuery extends QueryBuilder {
|
|
|
119
151
|
*/
|
|
120
152
|
private isValidStatus;
|
|
121
153
|
}
|
|
154
|
+
export {};
|
|
@@ -7,7 +7,7 @@ import { TransactionSummary } from "../../lib/models";
|
|
|
7
7
|
/**
|
|
8
8
|
* Flexible query input type - supports the class, filters interface, URL params, etc.
|
|
9
9
|
*/
|
|
10
|
-
export type PayoutQueryInput = PayoutQuery | PayoutFilters | Record<string, string> | URLSearchParams | null | undefined;
|
|
10
|
+
export type PayoutQueryInput = PayoutQuery | PayoutFilters | Record<string, string | string[]> | URLSearchParams | null | undefined;
|
|
11
11
|
/**
|
|
12
12
|
* Repository class for managing payouts through API interactions.
|
|
13
13
|
* Handles payout operations, filtering, and summary data retrieval.
|
|
@@ -25,6 +25,12 @@ export declare enum BANK_PAYOUT_CHANNEL {
|
|
|
25
25
|
BANK = "TZ-BANK-B2C"
|
|
26
26
|
}
|
|
27
27
|
export type PAYOUT_CHANNEL = MOBILE_PAYOUT_CHANNEL | BANK_PAYOUT_CHANNEL;
|
|
28
|
+
/**
|
|
29
|
+
* Accepts a single string, a comma-separated string, or an array of strings,
|
|
30
|
+
* and normalizes to a deduplicated, trimmed, non-empty `string[]`.
|
|
31
|
+
*/
|
|
32
|
+
declare const toStringArray: (value: unknown) => string[];
|
|
33
|
+
export { toStringArray as payoutToStringArray };
|
|
28
34
|
export declare const PayoutDTOSchemas: {
|
|
29
35
|
payout: z.ZodObject<{
|
|
30
36
|
id: z.ZodString;
|
|
@@ -125,9 +131,15 @@ export declare const PayoutDTOSchemas: {
|
|
|
125
131
|
accountNo: z.ZodOptional<z.ZodString>;
|
|
126
132
|
walletId: z.ZodOptional<z.ZodString>;
|
|
127
133
|
id: z.ZodOptional<z.ZodString>;
|
|
134
|
+
idIn: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
128
135
|
ref: z.ZodOptional<z.ZodString>;
|
|
136
|
+
refIn: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
137
|
+
channelRef: z.ZodOptional<z.ZodString>;
|
|
138
|
+
channelRefIn: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
129
139
|
channel: z.ZodOptional<z.ZodUnion<[z.ZodNativeEnum<typeof MOBILE_PAYOUT_CHANNEL>, z.ZodNativeEnum<typeof BANK_PAYOUT_CHANNEL>]>>;
|
|
140
|
+
channelIn: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodNativeEnum<typeof MOBILE_PAYOUT_CHANNEL>, z.ZodNativeEnum<typeof BANK_PAYOUT_CHANNEL>]>, "many">>;
|
|
130
141
|
status: z.ZodOptional<z.ZodNativeEnum<typeof PAYOUT_STATUS>>;
|
|
142
|
+
statusIn: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof PAYOUT_STATUS>, "many">>;
|
|
131
143
|
minAmount: z.ZodOptional<z.ZodNumber>;
|
|
132
144
|
maxAmount: z.ZodOptional<z.ZodNumber>;
|
|
133
145
|
search: z.ZodOptional<z.ZodString>;
|
|
@@ -145,9 +157,15 @@ export declare const PayoutDTOSchemas: {
|
|
|
145
157
|
channel?: MOBILE_PAYOUT_CHANNEL | BANK_PAYOUT_CHANNEL | undefined;
|
|
146
158
|
startDate?: string | undefined;
|
|
147
159
|
endDate?: string | undefined;
|
|
160
|
+
idIn?: string[] | undefined;
|
|
161
|
+
channelIn?: (MOBILE_PAYOUT_CHANNEL | BANK_PAYOUT_CHANNEL.BANK)[] | undefined;
|
|
162
|
+
statusIn?: PAYOUT_STATUS[] | undefined;
|
|
148
163
|
minAmount?: number | undefined;
|
|
149
164
|
maxAmount?: number | undefined;
|
|
150
165
|
ref?: string | undefined;
|
|
166
|
+
refIn?: string[] | undefined;
|
|
167
|
+
channelRef?: string | undefined;
|
|
168
|
+
channelRefIn?: string[] | undefined;
|
|
151
169
|
}, {
|
|
152
170
|
status?: PAYOUT_STATUS | undefined;
|
|
153
171
|
page?: number | undefined;
|
|
@@ -162,9 +180,15 @@ export declare const PayoutDTOSchemas: {
|
|
|
162
180
|
sortOrder?: "asc" | "desc" | undefined;
|
|
163
181
|
startDate?: string | undefined;
|
|
164
182
|
endDate?: string | undefined;
|
|
183
|
+
idIn?: string[] | undefined;
|
|
184
|
+
channelIn?: (MOBILE_PAYOUT_CHANNEL | BANK_PAYOUT_CHANNEL.BANK)[] | undefined;
|
|
185
|
+
statusIn?: PAYOUT_STATUS[] | undefined;
|
|
165
186
|
minAmount?: number | undefined;
|
|
166
187
|
maxAmount?: number | undefined;
|
|
167
188
|
ref?: string | undefined;
|
|
189
|
+
refIn?: string[] | undefined;
|
|
190
|
+
channelRef?: string | undefined;
|
|
191
|
+
channelRefIn?: string[] | undefined;
|
|
168
192
|
}>;
|
|
169
193
|
payoutURLQueryParams: z.ZodObject<{
|
|
170
194
|
page: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
|
|
@@ -177,9 +201,15 @@ export declare const PayoutDTOSchemas: {
|
|
|
177
201
|
accountNo: z.ZodOptional<z.ZodString>;
|
|
178
202
|
walletId: z.ZodOptional<z.ZodString>;
|
|
179
203
|
id: z.ZodOptional<z.ZodString>;
|
|
204
|
+
idIn: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>;
|
|
180
205
|
ref: z.ZodOptional<z.ZodString>;
|
|
206
|
+
refIn: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>;
|
|
207
|
+
channelRef: z.ZodOptional<z.ZodString>;
|
|
208
|
+
channelRefIn: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>;
|
|
181
209
|
channel: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, MOBILE_PAYOUT_CHANNEL | BANK_PAYOUT_CHANNEL, string>>;
|
|
210
|
+
channelIn: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>, z.ZodArray<z.ZodUnion<[z.ZodNativeEnum<typeof MOBILE_PAYOUT_CHANNEL>, z.ZodNativeEnum<typeof BANK_PAYOUT_CHANNEL>]>, "many">>>;
|
|
182
211
|
status: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, PAYOUT_STATUS, string>>;
|
|
212
|
+
statusIn: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>, z.ZodArray<z.ZodNativeEnum<typeof PAYOUT_STATUS>, "many">>>;
|
|
183
213
|
minAmount: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
|
|
184
214
|
maxAmount: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
|
|
185
215
|
search: z.ZodOptional<z.ZodString>;
|
|
@@ -197,9 +227,15 @@ export declare const PayoutDTOSchemas: {
|
|
|
197
227
|
channel?: MOBILE_PAYOUT_CHANNEL | BANK_PAYOUT_CHANNEL | undefined;
|
|
198
228
|
startDate?: string | undefined;
|
|
199
229
|
endDate?: string | undefined;
|
|
230
|
+
idIn?: string[] | undefined;
|
|
231
|
+
channelIn?: (MOBILE_PAYOUT_CHANNEL | BANK_PAYOUT_CHANNEL.BANK)[] | undefined;
|
|
232
|
+
statusIn?: PAYOUT_STATUS[] | undefined;
|
|
200
233
|
minAmount?: number | undefined;
|
|
201
234
|
maxAmount?: number | undefined;
|
|
202
235
|
ref?: string | undefined;
|
|
236
|
+
refIn?: string[] | undefined;
|
|
237
|
+
channelRef?: string | undefined;
|
|
238
|
+
channelRefIn?: string[] | undefined;
|
|
203
239
|
}, {
|
|
204
240
|
status?: string | undefined;
|
|
205
241
|
page?: string | undefined;
|
|
@@ -214,9 +250,15 @@ export declare const PayoutDTOSchemas: {
|
|
|
214
250
|
sortOrder?: "asc" | "desc" | undefined;
|
|
215
251
|
startDate?: string | undefined;
|
|
216
252
|
endDate?: string | undefined;
|
|
253
|
+
idIn?: string | string[] | undefined;
|
|
254
|
+
channelIn?: string | string[] | undefined;
|
|
255
|
+
statusIn?: string | string[] | undefined;
|
|
217
256
|
minAmount?: string | undefined;
|
|
218
257
|
maxAmount?: string | undefined;
|
|
219
258
|
ref?: string | undefined;
|
|
259
|
+
refIn?: string | string[] | undefined;
|
|
260
|
+
channelRef?: string | undefined;
|
|
261
|
+
channelRefIn?: string | string[] | undefined;
|
|
220
262
|
}>;
|
|
221
263
|
payoutStatus: z.ZodNativeEnum<typeof PAYOUT_STATUS>;
|
|
222
264
|
payoutChannel: z.ZodUnion<[z.ZodNativeEnum<typeof MOBILE_PAYOUT_CHANNEL>, z.ZodNativeEnum<typeof BANK_PAYOUT_CHANNEL>]>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@temboplus/tembo-dashboard",
|
|
3
|
-
"version": "0.1.3-beta.
|
|
3
|
+
"version": "0.1.3-beta.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",
|