@temboplus/tembo-dashboard 0.1.3-beta.4 → 0.2.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/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +10 -10
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/lib/api/index.d.ts +2 -2
- package/dist/lib/error/index.d.ts +1 -1
- package/dist/lib/models/index.d.ts +3 -3
- package/dist/lib/models/statement-entry.model.d.ts +1 -1
- package/dist/lib/models/transaction-summary.model.d.ts +1 -1
- package/dist/lib/query/index.d.ts +2 -2
- package/dist/lib/query/query.builder.d.ts +1 -1
- package/dist/modules/auth/auth.repository.d.ts +3 -3
- package/dist/modules/auth/index.d.ts +4 -4
- package/dist/modules/collection/collection.api-contract.d.ts +32 -20
- package/dist/modules/collection/collection.model.d.ts +6 -6
- package/dist/modules/collection/collection.query.d.ts +37 -8
- package/dist/modules/collection/collection.repository.d.ts +7 -7
- package/dist/modules/collection/collection.types.d.ts +30 -0
- package/dist/modules/collection/index.d.ts +5 -5
- package/dist/modules/payout/index.d.ts +5 -5
- package/dist/modules/payout/payout.api-contract.d.ts +38 -20
- package/dist/modules/payout/payout.model.d.ts +2 -2
- package/dist/modules/payout/payout.query.d.ts +42 -9
- package/dist/modules/payout/payout.repository.d.ts +7 -7
- package/dist/modules/payout/payout.types.d.ts +42 -0
- package/dist/modules/transaction/index.d.ts +3 -3
- package/dist/modules/transaction/transaction.repository.d.ts +3 -3
- package/dist/modules/wallet/index.d.ts +4 -4
- package/dist/modules/wallet/wallet.repository.d.ts +4 -4
- package/package.json +2 -2
|
@@ -10,19 +10,23 @@ export declare const collectionContract: {
|
|
|
10
10
|
endDate: z.ZodOptional<z.ZodString>;
|
|
11
11
|
msisdn: z.ZodOptional<z.ZodString>;
|
|
12
12
|
id: z.ZodOptional<z.ZodString>;
|
|
13
|
+
idIn: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>;
|
|
13
14
|
reference: z.ZodOptional<z.ZodString>;
|
|
15
|
+
referenceIn: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>>;
|
|
14
16
|
accountNo: z.ZodOptional<z.ZodString>;
|
|
15
17
|
walletId: z.ZodOptional<z.ZodString>;
|
|
16
18
|
partnerReference: z.ZodOptional<z.ZodString>;
|
|
17
|
-
channel: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("./collection.types").COLLECTION_CHANNEL, string>>;
|
|
18
|
-
|
|
19
|
+
channel: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("./collection.types.js").COLLECTION_CHANNEL, string>>;
|
|
20
|
+
channelIn: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>, z.ZodArray<z.ZodNativeEnum<typeof import("./collection.types.js").COLLECTION_CHANNEL>, "many">>>;
|
|
21
|
+
status: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("./collection.types.js").COLLECTION_STATUS, string>>;
|
|
22
|
+
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("./collection.types.js").COLLECTION_STATUS>, "many">>>;
|
|
19
23
|
minAmount: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
|
|
20
24
|
maxAmount: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
|
|
21
25
|
search: z.ZodOptional<z.ZodString>;
|
|
22
26
|
}, "strip", z.ZodTypeAny, {
|
|
23
27
|
sortBy: string;
|
|
24
28
|
sortOrder: "asc" | "desc";
|
|
25
|
-
status?: import("./collection.types").COLLECTION_STATUS | undefined;
|
|
29
|
+
status?: import("./collection.types.js").COLLECTION_STATUS | undefined;
|
|
26
30
|
page?: number | undefined;
|
|
27
31
|
limit?: number | undefined;
|
|
28
32
|
accountNo?: string | undefined;
|
|
@@ -30,11 +34,15 @@ export declare const collectionContract: {
|
|
|
30
34
|
id?: string | undefined;
|
|
31
35
|
walletId?: string | undefined;
|
|
32
36
|
msisdn?: string | undefined;
|
|
33
|
-
channel?: import("./collection.types").COLLECTION_CHANNEL | undefined;
|
|
37
|
+
channel?: import("./collection.types.js").COLLECTION_CHANNEL | undefined;
|
|
34
38
|
reference?: string | undefined;
|
|
35
39
|
partnerReference?: string | undefined;
|
|
36
40
|
startDate?: string | undefined;
|
|
37
41
|
endDate?: string | undefined;
|
|
42
|
+
idIn?: string[] | undefined;
|
|
43
|
+
referenceIn?: string[] | undefined;
|
|
44
|
+
channelIn?: import("./collection.types.js").COLLECTION_CHANNEL[] | undefined;
|
|
45
|
+
statusIn?: import("./collection.types.js").COLLECTION_STATUS[] | undefined;
|
|
38
46
|
minAmount?: number | undefined;
|
|
39
47
|
maxAmount?: number | undefined;
|
|
40
48
|
}, {
|
|
@@ -53,6 +61,10 @@ export declare const collectionContract: {
|
|
|
53
61
|
sortOrder?: "asc" | "desc" | undefined;
|
|
54
62
|
startDate?: string | undefined;
|
|
55
63
|
endDate?: string | undefined;
|
|
64
|
+
idIn?: string | string[] | undefined;
|
|
65
|
+
referenceIn?: string | string[] | undefined;
|
|
66
|
+
channelIn?: string | string[] | undefined;
|
|
67
|
+
statusIn?: string | string[] | undefined;
|
|
56
68
|
minAmount?: string | undefined;
|
|
57
69
|
maxAmount?: string | undefined;
|
|
58
70
|
}>;
|
|
@@ -64,14 +76,14 @@ export declare const collectionContract: {
|
|
|
64
76
|
200: z.ZodObject<{
|
|
65
77
|
results: z.ZodArray<z.ZodObject<{
|
|
66
78
|
id: z.ZodString;
|
|
67
|
-
status: z.ZodNativeEnum<typeof import("./collection.types").COLLECTION_STATUS>;
|
|
79
|
+
status: z.ZodNativeEnum<typeof import("./collection.types.js").COLLECTION_STATUS>;
|
|
68
80
|
statusMessage: z.ZodString;
|
|
69
81
|
accountNo: z.ZodString;
|
|
70
82
|
walletId: z.ZodString;
|
|
71
83
|
transactionDate: z.ZodString;
|
|
72
84
|
narration: z.ZodString;
|
|
73
85
|
msisdn: z.ZodString;
|
|
74
|
-
channel: z.ZodNativeEnum<typeof import("./collection.types").COLLECTION_CHANNEL>;
|
|
86
|
+
channel: z.ZodNativeEnum<typeof import("./collection.types.js").COLLECTION_CHANNEL>;
|
|
75
87
|
amount: z.ZodNumber;
|
|
76
88
|
serviceFee: z.ZodOptional<z.ZodString>;
|
|
77
89
|
postedAmount: z.ZodOptional<z.ZodString>;
|
|
@@ -90,7 +102,7 @@ export declare const collectionContract: {
|
|
|
90
102
|
notes: z.ZodOptional<z.ZodString>;
|
|
91
103
|
currencyCode: z.ZodDefault<z.ZodString>;
|
|
92
104
|
}, "strip", z.ZodTypeAny, {
|
|
93
|
-
status: import("./collection.types").COLLECTION_STATUS;
|
|
105
|
+
status: import("./collection.types.js").COLLECTION_STATUS;
|
|
94
106
|
createdAt: string;
|
|
95
107
|
accountNo: string;
|
|
96
108
|
narration: string;
|
|
@@ -99,7 +111,7 @@ export declare const collectionContract: {
|
|
|
99
111
|
walletId: string;
|
|
100
112
|
transactionDate: string;
|
|
101
113
|
msisdn: string;
|
|
102
|
-
channel: import("./collection.types").COLLECTION_CHANNEL;
|
|
114
|
+
channel: import("./collection.types.js").COLLECTION_CHANNEL;
|
|
103
115
|
amount: number;
|
|
104
116
|
reference: string;
|
|
105
117
|
updatedAt: string;
|
|
@@ -117,7 +129,7 @@ export declare const collectionContract: {
|
|
|
117
129
|
completedAt?: string | null | undefined;
|
|
118
130
|
notes?: string | undefined;
|
|
119
131
|
}, {
|
|
120
|
-
status: import("./collection.types").COLLECTION_STATUS;
|
|
132
|
+
status: import("./collection.types.js").COLLECTION_STATUS;
|
|
121
133
|
createdAt: string;
|
|
122
134
|
accountNo: string;
|
|
123
135
|
narration: string;
|
|
@@ -126,7 +138,7 @@ export declare const collectionContract: {
|
|
|
126
138
|
walletId: string;
|
|
127
139
|
transactionDate: string;
|
|
128
140
|
msisdn: string;
|
|
129
|
-
channel: import("./collection.types").COLLECTION_CHANNEL;
|
|
141
|
+
channel: import("./collection.types.js").COLLECTION_CHANNEL;
|
|
130
142
|
amount: number;
|
|
131
143
|
reference: string;
|
|
132
144
|
updatedAt: string;
|
|
@@ -148,7 +160,7 @@ export declare const collectionContract: {
|
|
|
148
160
|
}, "strip", z.ZodTypeAny, {
|
|
149
161
|
total: number;
|
|
150
162
|
results: {
|
|
151
|
-
status: import("./collection.types").COLLECTION_STATUS;
|
|
163
|
+
status: import("./collection.types.js").COLLECTION_STATUS;
|
|
152
164
|
createdAt: string;
|
|
153
165
|
accountNo: string;
|
|
154
166
|
narration: string;
|
|
@@ -157,7 +169,7 @@ export declare const collectionContract: {
|
|
|
157
169
|
walletId: string;
|
|
158
170
|
transactionDate: string;
|
|
159
171
|
msisdn: string;
|
|
160
|
-
channel: import("./collection.types").COLLECTION_CHANNEL;
|
|
172
|
+
channel: import("./collection.types.js").COLLECTION_CHANNEL;
|
|
161
173
|
amount: number;
|
|
162
174
|
reference: string;
|
|
163
175
|
updatedAt: string;
|
|
@@ -178,7 +190,7 @@ export declare const collectionContract: {
|
|
|
178
190
|
}, {
|
|
179
191
|
total: number;
|
|
180
192
|
results: {
|
|
181
|
-
status: import("./collection.types").COLLECTION_STATUS;
|
|
193
|
+
status: import("./collection.types.js").COLLECTION_STATUS;
|
|
182
194
|
createdAt: string;
|
|
183
195
|
accountNo: string;
|
|
184
196
|
narration: string;
|
|
@@ -187,7 +199,7 @@ export declare const collectionContract: {
|
|
|
187
199
|
walletId: string;
|
|
188
200
|
transactionDate: string;
|
|
189
201
|
msisdn: string;
|
|
190
|
-
channel: import("./collection.types").COLLECTION_CHANNEL;
|
|
202
|
+
channel: import("./collection.types.js").COLLECTION_CHANNEL;
|
|
191
203
|
amount: number;
|
|
192
204
|
reference: string;
|
|
193
205
|
updatedAt: string;
|
|
@@ -283,14 +295,14 @@ export declare const collectionContract: {
|
|
|
283
295
|
responses: {
|
|
284
296
|
200: z.ZodObject<{
|
|
285
297
|
id: z.ZodString;
|
|
286
|
-
status: z.ZodNativeEnum<typeof import("./collection.types").COLLECTION_STATUS>;
|
|
298
|
+
status: z.ZodNativeEnum<typeof import("./collection.types.js").COLLECTION_STATUS>;
|
|
287
299
|
statusMessage: z.ZodString;
|
|
288
300
|
accountNo: z.ZodString;
|
|
289
301
|
walletId: z.ZodString;
|
|
290
302
|
transactionDate: z.ZodString;
|
|
291
303
|
narration: z.ZodString;
|
|
292
304
|
msisdn: z.ZodString;
|
|
293
|
-
channel: z.ZodNativeEnum<typeof import("./collection.types").COLLECTION_CHANNEL>;
|
|
305
|
+
channel: z.ZodNativeEnum<typeof import("./collection.types.js").COLLECTION_CHANNEL>;
|
|
294
306
|
amount: z.ZodNumber;
|
|
295
307
|
serviceFee: z.ZodOptional<z.ZodString>;
|
|
296
308
|
postedAmount: z.ZodOptional<z.ZodString>;
|
|
@@ -309,7 +321,7 @@ export declare const collectionContract: {
|
|
|
309
321
|
notes: z.ZodOptional<z.ZodString>;
|
|
310
322
|
currencyCode: z.ZodDefault<z.ZodString>;
|
|
311
323
|
}, "strip", z.ZodTypeAny, {
|
|
312
|
-
status: import("./collection.types").COLLECTION_STATUS;
|
|
324
|
+
status: import("./collection.types.js").COLLECTION_STATUS;
|
|
313
325
|
createdAt: string;
|
|
314
326
|
accountNo: string;
|
|
315
327
|
narration: string;
|
|
@@ -318,7 +330,7 @@ export declare const collectionContract: {
|
|
|
318
330
|
walletId: string;
|
|
319
331
|
transactionDate: string;
|
|
320
332
|
msisdn: string;
|
|
321
|
-
channel: import("./collection.types").COLLECTION_CHANNEL;
|
|
333
|
+
channel: import("./collection.types.js").COLLECTION_CHANNEL;
|
|
322
334
|
amount: number;
|
|
323
335
|
reference: string;
|
|
324
336
|
updatedAt: string;
|
|
@@ -336,7 +348,7 @@ export declare const collectionContract: {
|
|
|
336
348
|
completedAt?: string | null | undefined;
|
|
337
349
|
notes?: string | undefined;
|
|
338
350
|
}, {
|
|
339
|
-
status: import("./collection.types").COLLECTION_STATUS;
|
|
351
|
+
status: import("./collection.types.js").COLLECTION_STATUS;
|
|
340
352
|
createdAt: string;
|
|
341
353
|
accountNo: string;
|
|
342
354
|
narration: string;
|
|
@@ -345,7 +357,7 @@ export declare const collectionContract: {
|
|
|
345
357
|
walletId: string;
|
|
346
358
|
transactionDate: string;
|
|
347
359
|
msisdn: string;
|
|
348
|
-
channel: import("./collection.types").COLLECTION_CHANNEL;
|
|
360
|
+
channel: import("./collection.types.js").COLLECTION_CHANNEL;
|
|
349
361
|
amount: number;
|
|
350
362
|
reference: string;
|
|
351
363
|
updatedAt: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Amount,
|
|
2
|
-
import { COLLECTION_CHANNEL, COLLECTION_STATUS } from "./collection.types";
|
|
3
|
-
import { MobileChannelInfo } from "../../lib/types";
|
|
1
|
+
import { Amount, AmountJSON } from "@temboplus/frontend-core";
|
|
2
|
+
import { COLLECTION_CHANNEL, COLLECTION_STATUS } from "./collection.types.js";
|
|
3
|
+
import { MobileChannelInfo } from "../../lib/types.js";
|
|
4
4
|
export interface CollectionStatusInfo {
|
|
5
5
|
label: string;
|
|
6
6
|
description: string;
|
|
@@ -47,9 +47,9 @@ export interface CollectionJson {
|
|
|
47
47
|
narration: string;
|
|
48
48
|
msisdn: string;
|
|
49
49
|
channel: COLLECTION_CHANNEL;
|
|
50
|
-
amount:
|
|
51
|
-
serviceFee?:
|
|
52
|
-
postedAmount?:
|
|
50
|
+
amount: AmountJSON;
|
|
51
|
+
serviceFee?: AmountJSON;
|
|
52
|
+
postedAmount?: AmountJSON;
|
|
53
53
|
reference: string;
|
|
54
54
|
partnerReference?: string | null;
|
|
55
55
|
payerName?: string | null;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { QueryBuilder } from "../../lib/query";
|
|
2
|
-
import { COLLECTION_STATUS, COLLECTION_CHANNEL, CollectionFilters } from "./collection.types";
|
|
1
|
+
import { QueryBuilder } from "../../lib/query/index.js";
|
|
2
|
+
import { COLLECTION_STATUS, COLLECTION_CHANNEL, CollectionFilters } from "./collection.types.js";
|
|
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 {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { BaseRepository, PaginationDTO } from "../../lib/api";
|
|
2
|
-
import { collectionContract } from "./collection.api-contract";
|
|
3
|
-
import { Collection } from "./collection.model";
|
|
4
|
-
import { CollectionQuery } from "./collection.query";
|
|
5
|
-
import { CollectionFilters } from "./collection.types";
|
|
6
|
-
import { TransactionSummary } from "../../lib/models";
|
|
1
|
+
import { BaseRepository, PaginationDTO } from "../../lib/api/index.js";
|
|
2
|
+
import { collectionContract } from "./collection.api-contract.js";
|
|
3
|
+
import { Collection } from "./collection.model.js";
|
|
4
|
+
import { CollectionQuery } from "./collection.query.js";
|
|
5
|
+
import { CollectionFilters } from "./collection.types.js";
|
|
6
|
+
import { TransactionSummary } from "../../lib/models/index.js";
|
|
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
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./collection.api-contract";
|
|
2
|
-
export * from "./collection.repository";
|
|
3
|
-
export * from "./collection.model";
|
|
4
|
-
export * from "./collection.types";
|
|
5
|
-
export * from "./collection.query";
|
|
1
|
+
export * from "./collection.api-contract.js";
|
|
2
|
+
export * from "./collection.repository.js";
|
|
3
|
+
export * from "./collection.model.js";
|
|
4
|
+
export * from "./collection.types.js";
|
|
5
|
+
export * from "./collection.query.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./payout.api-contract";
|
|
2
|
-
export * from "./payout.repository";
|
|
3
|
-
export * from "./payout.types";
|
|
4
|
-
export * from "./payout.model";
|
|
5
|
-
export * from "./payout.query";
|
|
1
|
+
export * from "./payout.api-contract.js";
|
|
2
|
+
export * from "./payout.repository.js";
|
|
3
|
+
export * from "./payout.types.js";
|
|
4
|
+
export * from "./payout.model.js";
|
|
5
|
+
export * from "./payout.query.js";
|
|
@@ -12,16 +12,22 @@ 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>;
|
|
16
|
-
|
|
17
|
-
|
|
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[]>>;
|
|
20
|
+
channel: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("./payout.types.js").MOBILE_PAYOUT_CHANNEL | import("./payout.types.js").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.js").MOBILE_PAYOUT_CHANNEL>, z.ZodNativeEnum<typeof import("./payout.types.js").BANK_PAYOUT_CHANNEL>]>, "many">>>;
|
|
22
|
+
status: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("./payout.types.js").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.js").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>;
|
|
21
27
|
}, "strip", z.ZodTypeAny, {
|
|
22
28
|
sortBy: string;
|
|
23
29
|
sortOrder: "asc" | "desc";
|
|
24
|
-
status?: import("./payout.types").PAYOUT_STATUS | undefined;
|
|
30
|
+
status?: import("./payout.types.js").PAYOUT_STATUS | undefined;
|
|
25
31
|
page?: number | undefined;
|
|
26
32
|
limit?: number | undefined;
|
|
27
33
|
accountNo?: string | undefined;
|
|
@@ -29,12 +35,18 @@ export declare const payoutContract: {
|
|
|
29
35
|
id?: string | undefined;
|
|
30
36
|
walletId?: string | undefined;
|
|
31
37
|
msisdn?: string | undefined;
|
|
32
|
-
channel?: import("./payout.types").MOBILE_PAYOUT_CHANNEL | import("./payout.types").BANK_PAYOUT_CHANNEL | undefined;
|
|
38
|
+
channel?: import("./payout.types.js").MOBILE_PAYOUT_CHANNEL | import("./payout.types.js").BANK_PAYOUT_CHANNEL | undefined;
|
|
33
39
|
startDate?: string | undefined;
|
|
34
40
|
endDate?: string | undefined;
|
|
41
|
+
idIn?: string[] | undefined;
|
|
42
|
+
channelIn?: (import("./payout.types.js").MOBILE_PAYOUT_CHANNEL | import("./payout.types.js").BANK_PAYOUT_CHANNEL.BANK)[] | undefined;
|
|
43
|
+
statusIn?: import("./payout.types.js").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";
|
|
@@ -62,10 +80,10 @@ export declare const payoutContract: {
|
|
|
62
80
|
results: z.ZodArray<z.ZodObject<{
|
|
63
81
|
id: z.ZodString;
|
|
64
82
|
statusCode: z.ZodString;
|
|
65
|
-
statusCodeText: z.ZodNativeEnum<typeof import("./payout.types").PAYOUT_STATUS>;
|
|
83
|
+
statusCodeText: z.ZodNativeEnum<typeof import("./payout.types.js").PAYOUT_STATUS>;
|
|
66
84
|
statusDescription: z.ZodString;
|
|
67
85
|
countryCode: z.ZodString;
|
|
68
|
-
serviceCode: z.ZodUnion<[z.ZodNativeEnum<typeof import("./payout.types").MOBILE_PAYOUT_CHANNEL>, z.ZodNativeEnum<typeof import("./payout.types").BANK_PAYOUT_CHANNEL>]>;
|
|
86
|
+
serviceCode: z.ZodUnion<[z.ZodNativeEnum<typeof import("./payout.types.js").MOBILE_PAYOUT_CHANNEL>, z.ZodNativeEnum<typeof import("./payout.types.js").BANK_PAYOUT_CHANNEL>]>;
|
|
69
87
|
amount: z.ZodNumber;
|
|
70
88
|
serviceFee: z.ZodOptional<z.ZodString>;
|
|
71
89
|
postedAmount: z.ZodOptional<z.ZodString>;
|
|
@@ -98,10 +116,10 @@ export declare const payoutContract: {
|
|
|
98
116
|
amount: number;
|
|
99
117
|
transactionId: string;
|
|
100
118
|
currencyCode: string;
|
|
101
|
-
statusCodeText: import("./payout.types").PAYOUT_STATUS;
|
|
119
|
+
statusCodeText: import("./payout.types.js").PAYOUT_STATUS;
|
|
102
120
|
statusDescription: string;
|
|
103
121
|
countryCode: string;
|
|
104
|
-
serviceCode: import("./payout.types").MOBILE_PAYOUT_CHANNEL | import("./payout.types").BANK_PAYOUT_CHANNEL;
|
|
122
|
+
serviceCode: import("./payout.types.js").MOBILE_PAYOUT_CHANNEL | import("./payout.types.js").BANK_PAYOUT_CHANNEL;
|
|
105
123
|
transactionRef: string;
|
|
106
124
|
walletId?: string | undefined;
|
|
107
125
|
serviceFee?: string | undefined;
|
|
@@ -127,10 +145,10 @@ export declare const payoutContract: {
|
|
|
127
145
|
amount: number;
|
|
128
146
|
transactionId: string;
|
|
129
147
|
currencyCode: string;
|
|
130
|
-
statusCodeText: import("./payout.types").PAYOUT_STATUS;
|
|
148
|
+
statusCodeText: import("./payout.types.js").PAYOUT_STATUS;
|
|
131
149
|
statusDescription: string;
|
|
132
150
|
countryCode: string;
|
|
133
|
-
serviceCode: import("./payout.types").MOBILE_PAYOUT_CHANNEL | import("./payout.types").BANK_PAYOUT_CHANNEL;
|
|
151
|
+
serviceCode: import("./payout.types.js").MOBILE_PAYOUT_CHANNEL | import("./payout.types.js").BANK_PAYOUT_CHANNEL;
|
|
134
152
|
transactionRef: string;
|
|
135
153
|
walletId?: string | undefined;
|
|
136
154
|
serviceFee?: string | undefined;
|
|
@@ -160,10 +178,10 @@ export declare const payoutContract: {
|
|
|
160
178
|
amount: number;
|
|
161
179
|
transactionId: string;
|
|
162
180
|
currencyCode: string;
|
|
163
|
-
statusCodeText: import("./payout.types").PAYOUT_STATUS;
|
|
181
|
+
statusCodeText: import("./payout.types.js").PAYOUT_STATUS;
|
|
164
182
|
statusDescription: string;
|
|
165
183
|
countryCode: string;
|
|
166
|
-
serviceCode: import("./payout.types").MOBILE_PAYOUT_CHANNEL | import("./payout.types").BANK_PAYOUT_CHANNEL;
|
|
184
|
+
serviceCode: import("./payout.types.js").MOBILE_PAYOUT_CHANNEL | import("./payout.types.js").BANK_PAYOUT_CHANNEL;
|
|
167
185
|
transactionRef: string;
|
|
168
186
|
walletId?: string | undefined;
|
|
169
187
|
serviceFee?: string | undefined;
|
|
@@ -192,10 +210,10 @@ export declare const payoutContract: {
|
|
|
192
210
|
amount: number;
|
|
193
211
|
transactionId: string;
|
|
194
212
|
currencyCode: string;
|
|
195
|
-
statusCodeText: import("./payout.types").PAYOUT_STATUS;
|
|
213
|
+
statusCodeText: import("./payout.types.js").PAYOUT_STATUS;
|
|
196
214
|
statusDescription: string;
|
|
197
215
|
countryCode: string;
|
|
198
|
-
serviceCode: import("./payout.types").MOBILE_PAYOUT_CHANNEL | import("./payout.types").BANK_PAYOUT_CHANNEL;
|
|
216
|
+
serviceCode: import("./payout.types.js").MOBILE_PAYOUT_CHANNEL | import("./payout.types.js").BANK_PAYOUT_CHANNEL;
|
|
199
217
|
transactionRef: string;
|
|
200
218
|
walletId?: string | undefined;
|
|
201
219
|
serviceFee?: string | undefined;
|
|
@@ -291,10 +309,10 @@ export declare const payoutContract: {
|
|
|
291
309
|
200: z.ZodObject<{
|
|
292
310
|
id: z.ZodString;
|
|
293
311
|
statusCode: z.ZodString;
|
|
294
|
-
statusCodeText: z.ZodNativeEnum<typeof import("./payout.types").PAYOUT_STATUS>;
|
|
312
|
+
statusCodeText: z.ZodNativeEnum<typeof import("./payout.types.js").PAYOUT_STATUS>;
|
|
295
313
|
statusDescription: z.ZodString;
|
|
296
314
|
countryCode: z.ZodString;
|
|
297
|
-
serviceCode: z.ZodUnion<[z.ZodNativeEnum<typeof import("./payout.types").MOBILE_PAYOUT_CHANNEL>, z.ZodNativeEnum<typeof import("./payout.types").BANK_PAYOUT_CHANNEL>]>;
|
|
315
|
+
serviceCode: z.ZodUnion<[z.ZodNativeEnum<typeof import("./payout.types.js").MOBILE_PAYOUT_CHANNEL>, z.ZodNativeEnum<typeof import("./payout.types.js").BANK_PAYOUT_CHANNEL>]>;
|
|
298
316
|
amount: z.ZodNumber;
|
|
299
317
|
serviceFee: z.ZodOptional<z.ZodString>;
|
|
300
318
|
postedAmount: z.ZodOptional<z.ZodString>;
|
|
@@ -327,10 +345,10 @@ export declare const payoutContract: {
|
|
|
327
345
|
amount: number;
|
|
328
346
|
transactionId: string;
|
|
329
347
|
currencyCode: string;
|
|
330
|
-
statusCodeText: import("./payout.types").PAYOUT_STATUS;
|
|
348
|
+
statusCodeText: import("./payout.types.js").PAYOUT_STATUS;
|
|
331
349
|
statusDescription: string;
|
|
332
350
|
countryCode: string;
|
|
333
|
-
serviceCode: import("./payout.types").MOBILE_PAYOUT_CHANNEL | import("./payout.types").BANK_PAYOUT_CHANNEL;
|
|
351
|
+
serviceCode: import("./payout.types.js").MOBILE_PAYOUT_CHANNEL | import("./payout.types.js").BANK_PAYOUT_CHANNEL;
|
|
334
352
|
transactionRef: string;
|
|
335
353
|
walletId?: string | undefined;
|
|
336
354
|
serviceFee?: string | undefined;
|
|
@@ -356,10 +374,10 @@ export declare const payoutContract: {
|
|
|
356
374
|
amount: number;
|
|
357
375
|
transactionId: string;
|
|
358
376
|
currencyCode: string;
|
|
359
|
-
statusCodeText: import("./payout.types").PAYOUT_STATUS;
|
|
377
|
+
statusCodeText: import("./payout.types.js").PAYOUT_STATUS;
|
|
360
378
|
statusDescription: string;
|
|
361
379
|
countryCode: string;
|
|
362
|
-
serviceCode: import("./payout.types").MOBILE_PAYOUT_CHANNEL | import("./payout.types").BANK_PAYOUT_CHANNEL;
|
|
380
|
+
serviceCode: import("./payout.types.js").MOBILE_PAYOUT_CHANNEL | import("./payout.types.js").BANK_PAYOUT_CHANNEL;
|
|
363
381
|
transactionRef: string;
|
|
364
382
|
walletId?: string | undefined;
|
|
365
383
|
serviceFee?: string | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Amount, AmountJson, Bank } from "@temboplus/frontend-core";
|
|
2
|
-
import { PAYOUT_CHANNEL, PAYOUT_STATUS } from "./payout.types";
|
|
3
|
-
import { MobileChannelInfo } from "../../lib/types";
|
|
2
|
+
import { PAYOUT_CHANNEL, PAYOUT_STATUS } from "./payout.types.js";
|
|
3
|
+
import { MobileChannelInfo } from "../../lib/types.js";
|
|
4
4
|
export interface PayoutStatusInfo {
|
|
5
5
|
label: string;
|
|
6
6
|
description: string;
|