@temboplus/tembo-dashboard 0.0.1
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/README.md +130 -0
- package/dist/index.cjs.js +2 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.esm.js +2 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/lib/api/base-repository.d.ts +168 -0
- package/dist/lib/api/common-schemas.d.ts +115 -0
- package/dist/lib/api/index.d.ts +2 -0
- package/dist/lib/error/error.api.d.ts +62 -0
- package/dist/lib/error/index.d.ts +1 -0
- package/dist/lib/models/index.d.ts +2 -0
- package/dist/lib/models/transaction-summary.model.d.ts +22 -0
- package/dist/lib/models/wallet-info.model.d.ts +17 -0
- package/dist/lib/query/index.d.ts +2 -0
- package/dist/lib/query/query.builder.d.ts +65 -0
- package/dist/lib/query/query.types.d.ts +36 -0
- package/dist/modules/auth/auth.api-contract.d.ts +52 -0
- package/dist/modules/auth/auth.dtos.d.ts +31 -0
- package/dist/modules/auth/auth.repository.d.ts +17 -0
- package/dist/modules/auth/index.d.ts +4 -0
- package/dist/modules/auth/user.model.d.ts +48 -0
- package/dist/modules/collection/collection.api-contract.d.ts +385 -0
- package/dist/modules/collection/collection.dtos.d.ts +195 -0
- package/dist/modules/collection/collection.model.d.ts +145 -0
- package/dist/modules/collection/collection.query-builder.d.ts +18 -0
- package/dist/modules/collection/collection.repository.d.ts +38 -0
- package/dist/modules/collection/index.d.ts +5 -0
- package/dist/modules/payout/index.d.ts +5 -0
- package/dist/modules/payout/payout.api-contract.d.ts +427 -0
- package/dist/modules/payout/payout.dtos.d.ts +188 -0
- package/dist/modules/payout/payout.model.d.ts +156 -0
- package/dist/modules/payout/payout.query-builder.d.ts +15 -0
- package/dist/modules/payout/payout.repository.d.ts +34 -0
- package/package.json +60 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare enum FilterOperator {
|
|
2
|
+
EQUALS = "eq",
|
|
3
|
+
NOT_EQUALS = "neq",
|
|
4
|
+
LESS_THAN = "lt",
|
|
5
|
+
LESS_THAN_OR_EQUAL = "lte",
|
|
6
|
+
GREATER_THAN = "gt",
|
|
7
|
+
GREATER_THAN_OR_EQUAL = "gte",
|
|
8
|
+
LIKE = "like",
|
|
9
|
+
LIKE_LOWER = "likeLower",
|
|
10
|
+
IS_NULL = "isNull",
|
|
11
|
+
IS_NOT_NULL = "isNotNull",
|
|
12
|
+
IN = "in"
|
|
13
|
+
}
|
|
14
|
+
export declare enum SortDirection {
|
|
15
|
+
ASC = "asc",
|
|
16
|
+
DESC = "desc"
|
|
17
|
+
}
|
|
18
|
+
export interface FilterCriteria {
|
|
19
|
+
field: string;
|
|
20
|
+
operator: FilterOperator;
|
|
21
|
+
value?: any;
|
|
22
|
+
}
|
|
23
|
+
export interface SortCriteria {
|
|
24
|
+
field: string;
|
|
25
|
+
direction: SortDirection;
|
|
26
|
+
}
|
|
27
|
+
export interface QueryOptions {
|
|
28
|
+
page?: number;
|
|
29
|
+
pageSize?: number;
|
|
30
|
+
filters?: FilterCriteria[];
|
|
31
|
+
sort?: SortCriteria[];
|
|
32
|
+
includes?: string[];
|
|
33
|
+
join?: string[];
|
|
34
|
+
groupBy?: string[];
|
|
35
|
+
count?: string;
|
|
36
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const authContract: {
|
|
3
|
+
login: {
|
|
4
|
+
summary: "User login";
|
|
5
|
+
description: "Authenticate user with email and password";
|
|
6
|
+
method: "POST";
|
|
7
|
+
body: z.ZodObject<{
|
|
8
|
+
type: z.ZodDefault<z.ZodString>;
|
|
9
|
+
identity: z.ZodString;
|
|
10
|
+
password: z.ZodString;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
type: string;
|
|
13
|
+
identity: string;
|
|
14
|
+
password: string;
|
|
15
|
+
}, {
|
|
16
|
+
identity: string;
|
|
17
|
+
password: string;
|
|
18
|
+
type?: string | undefined;
|
|
19
|
+
}>;
|
|
20
|
+
path: "/auth/login";
|
|
21
|
+
responses: {
|
|
22
|
+
201: z.ZodObject<{
|
|
23
|
+
token: z.ZodString;
|
|
24
|
+
identity: z.ZodString;
|
|
25
|
+
name: z.ZodString;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
token: string;
|
|
28
|
+
identity: string;
|
|
29
|
+
name: string;
|
|
30
|
+
}, {
|
|
31
|
+
token: string;
|
|
32
|
+
identity: string;
|
|
33
|
+
name: string;
|
|
34
|
+
}>;
|
|
35
|
+
400: z.ZodObject<{
|
|
36
|
+
message: z.ZodOptional<z.ZodString>;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
message?: string | undefined;
|
|
39
|
+
}, {
|
|
40
|
+
message?: string | undefined;
|
|
41
|
+
}>;
|
|
42
|
+
401: z.ZodObject<{
|
|
43
|
+
message: z.ZodOptional<z.ZodString>;
|
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
|
+
message?: string | undefined;
|
|
46
|
+
}, {
|
|
47
|
+
message?: string | undefined;
|
|
48
|
+
}>;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export type AuthContract = typeof authContract;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const AuthDTOSchemas: {
|
|
3
|
+
user: z.ZodObject<{
|
|
4
|
+
token: z.ZodString;
|
|
5
|
+
identity: z.ZodString;
|
|
6
|
+
name: z.ZodString;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
token: string;
|
|
9
|
+
identity: string;
|
|
10
|
+
name: string;
|
|
11
|
+
}, {
|
|
12
|
+
token: string;
|
|
13
|
+
identity: string;
|
|
14
|
+
name: string;
|
|
15
|
+
}>;
|
|
16
|
+
loginRequest: z.ZodObject<{
|
|
17
|
+
type: z.ZodDefault<z.ZodString>;
|
|
18
|
+
identity: z.ZodString;
|
|
19
|
+
password: z.ZodString;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
type: string;
|
|
22
|
+
identity: string;
|
|
23
|
+
password: string;
|
|
24
|
+
}, {
|
|
25
|
+
identity: string;
|
|
26
|
+
password: string;
|
|
27
|
+
type?: string | undefined;
|
|
28
|
+
}>;
|
|
29
|
+
};
|
|
30
|
+
export type UserDTO = z.infer<typeof AuthDTOSchemas.user>;
|
|
31
|
+
export type LoginRequestDTO = z.infer<typeof AuthDTOSchemas.loginRequest>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseRepository } from "@/lib/api";
|
|
2
|
+
import { authContract } from "./auth.api-contract";
|
|
3
|
+
import { User, LoginCredentials } from "./user.model";
|
|
4
|
+
/**
|
|
5
|
+
* Repository class for managing authentication through API interactions.
|
|
6
|
+
* Handles user login and authentication operations.
|
|
7
|
+
*/
|
|
8
|
+
export declare class AuthRepository extends BaseRepository<typeof authContract> {
|
|
9
|
+
constructor(options?: {
|
|
10
|
+
token?: string;
|
|
11
|
+
root?: string;
|
|
12
|
+
});
|
|
13
|
+
/**
|
|
14
|
+
* Authenticate user with email and password
|
|
15
|
+
*/
|
|
16
|
+
login(credentials: LoginCredentials): Promise<User>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export interface UserData {
|
|
2
|
+
token: string;
|
|
3
|
+
identity: string;
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
export interface UserJson {
|
|
7
|
+
token: string;
|
|
8
|
+
identity: string;
|
|
9
|
+
name: string;
|
|
10
|
+
}
|
|
11
|
+
export interface LoginCredentials {
|
|
12
|
+
type?: string;
|
|
13
|
+
identity: string;
|
|
14
|
+
password: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Represents an authenticated user
|
|
18
|
+
*/
|
|
19
|
+
export declare class User {
|
|
20
|
+
readonly token: string;
|
|
21
|
+
readonly identity: string;
|
|
22
|
+
readonly name: string;
|
|
23
|
+
constructor(data: UserData);
|
|
24
|
+
/**
|
|
25
|
+
* Check if user has a valid token
|
|
26
|
+
*/
|
|
27
|
+
hasToken(): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Get user's display name
|
|
30
|
+
*/
|
|
31
|
+
getDisplayName(): string;
|
|
32
|
+
/**
|
|
33
|
+
* Check if user identity is an email
|
|
34
|
+
*/
|
|
35
|
+
isEmailIdentity(): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Create User instance from raw API data
|
|
38
|
+
*/
|
|
39
|
+
static from(data: any): User | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Create User instance from JSON representation
|
|
42
|
+
*/
|
|
43
|
+
static fromJson(json: UserJson): User | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Convert to JSON representation
|
|
46
|
+
*/
|
|
47
|
+
toJson(): UserJson;
|
|
48
|
+
}
|
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const collectionContract: {
|
|
3
|
+
getCollections: {
|
|
4
|
+
query: z.ZodObject<{
|
|
5
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
6
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
7
|
+
sortBy: z.ZodDefault<z.ZodEnum<["transactionDate", "amount", "status", "createdAt"]>>;
|
|
8
|
+
sortOrder: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
|
|
9
|
+
startDate: z.ZodOptional<z.ZodString>;
|
|
10
|
+
endDate: z.ZodOptional<z.ZodString>;
|
|
11
|
+
msisdn: z.ZodOptional<z.ZodString>;
|
|
12
|
+
id: z.ZodOptional<z.ZodString>;
|
|
13
|
+
reference: z.ZodOptional<z.ZodString>;
|
|
14
|
+
accountNo: z.ZodOptional<z.ZodString>;
|
|
15
|
+
partnerReference: z.ZodOptional<z.ZodString>;
|
|
16
|
+
channel: z.ZodOptional<z.ZodNativeEnum<typeof import("./collection.dtos").COLLECTION_CHANNEL>>;
|
|
17
|
+
status: z.ZodOptional<z.ZodNativeEnum<typeof import("./collection.dtos").COLLECTION_STATUS>>;
|
|
18
|
+
minAmount: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
maxAmount: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
search: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
page: number;
|
|
23
|
+
limit: number;
|
|
24
|
+
sortBy: "status" | "transactionDate" | "amount" | "createdAt";
|
|
25
|
+
sortOrder: "asc" | "desc";
|
|
26
|
+
status?: import("./collection.dtos").COLLECTION_STATUS | undefined;
|
|
27
|
+
search?: string | undefined;
|
|
28
|
+
id?: string | undefined;
|
|
29
|
+
accountNo?: string | undefined;
|
|
30
|
+
msisdn?: string | undefined;
|
|
31
|
+
channel?: import("./collection.dtos").COLLECTION_CHANNEL | undefined;
|
|
32
|
+
reference?: string | undefined;
|
|
33
|
+
partnerReference?: string | undefined;
|
|
34
|
+
startDate?: string | undefined;
|
|
35
|
+
endDate?: string | undefined;
|
|
36
|
+
minAmount?: number | undefined;
|
|
37
|
+
maxAmount?: number | undefined;
|
|
38
|
+
}, {
|
|
39
|
+
status?: import("./collection.dtos").COLLECTION_STATUS | undefined;
|
|
40
|
+
page?: number | undefined;
|
|
41
|
+
limit?: number | undefined;
|
|
42
|
+
search?: string | undefined;
|
|
43
|
+
id?: string | undefined;
|
|
44
|
+
accountNo?: string | undefined;
|
|
45
|
+
msisdn?: string | undefined;
|
|
46
|
+
channel?: import("./collection.dtos").COLLECTION_CHANNEL | undefined;
|
|
47
|
+
reference?: string | undefined;
|
|
48
|
+
partnerReference?: string | undefined;
|
|
49
|
+
sortBy?: "status" | "transactionDate" | "amount" | "createdAt" | undefined;
|
|
50
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
51
|
+
startDate?: string | undefined;
|
|
52
|
+
endDate?: string | undefined;
|
|
53
|
+
minAmount?: number | undefined;
|
|
54
|
+
maxAmount?: number | undefined;
|
|
55
|
+
}>;
|
|
56
|
+
summary: "List collections";
|
|
57
|
+
description: "Retrieve a paginated list of collections with optional filtering";
|
|
58
|
+
method: "GET";
|
|
59
|
+
path: "/";
|
|
60
|
+
responses: {
|
|
61
|
+
200: z.ZodObject<{
|
|
62
|
+
data: z.ZodArray<z.ZodObject<{
|
|
63
|
+
id: z.ZodString;
|
|
64
|
+
status: z.ZodNativeEnum<typeof import("./collection.dtos").COLLECTION_STATUS>;
|
|
65
|
+
statusMessage: z.ZodString;
|
|
66
|
+
accountNo: z.ZodString;
|
|
67
|
+
walletId: z.ZodString;
|
|
68
|
+
transactionDate: z.ZodString;
|
|
69
|
+
narration: z.ZodString;
|
|
70
|
+
msisdn: z.ZodString;
|
|
71
|
+
channel: z.ZodNativeEnum<typeof import("./collection.dtos").COLLECTION_CHANNEL>;
|
|
72
|
+
amount: z.ZodNumber;
|
|
73
|
+
serviceFee: z.ZodOptional<z.ZodString>;
|
|
74
|
+
postedAmount: z.ZodOptional<z.ZodString>;
|
|
75
|
+
reference: z.ZodString;
|
|
76
|
+
partnerReference: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
77
|
+
transactionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
78
|
+
serviceFeeTransactionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
79
|
+
requestId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
80
|
+
completedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
81
|
+
createdAt: z.ZodString;
|
|
82
|
+
updatedAt: z.ZodString;
|
|
83
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
84
|
+
currencyCode: z.ZodDefault<z.ZodString>;
|
|
85
|
+
}, "strip", z.ZodTypeAny, {
|
|
86
|
+
status: import("./collection.dtos").COLLECTION_STATUS;
|
|
87
|
+
id: string;
|
|
88
|
+
statusMessage: string;
|
|
89
|
+
accountNo: string;
|
|
90
|
+
walletId: string;
|
|
91
|
+
transactionDate: string;
|
|
92
|
+
narration: string;
|
|
93
|
+
msisdn: string;
|
|
94
|
+
channel: import("./collection.dtos").COLLECTION_CHANNEL;
|
|
95
|
+
amount: number;
|
|
96
|
+
reference: string;
|
|
97
|
+
createdAt: string;
|
|
98
|
+
updatedAt: string;
|
|
99
|
+
currencyCode: string;
|
|
100
|
+
serviceFee?: string | undefined;
|
|
101
|
+
postedAmount?: string | undefined;
|
|
102
|
+
partnerReference?: string | null | undefined;
|
|
103
|
+
transactionId?: string | null | undefined;
|
|
104
|
+
serviceFeeTransactionId?: string | null | undefined;
|
|
105
|
+
requestId?: string | null | undefined;
|
|
106
|
+
completedAt?: string | null | undefined;
|
|
107
|
+
notes?: string | undefined;
|
|
108
|
+
}, {
|
|
109
|
+
status: import("./collection.dtos").COLLECTION_STATUS;
|
|
110
|
+
id: string;
|
|
111
|
+
statusMessage: string;
|
|
112
|
+
accountNo: string;
|
|
113
|
+
walletId: string;
|
|
114
|
+
transactionDate: string;
|
|
115
|
+
narration: string;
|
|
116
|
+
msisdn: string;
|
|
117
|
+
channel: import("./collection.dtos").COLLECTION_CHANNEL;
|
|
118
|
+
amount: number;
|
|
119
|
+
reference: string;
|
|
120
|
+
createdAt: string;
|
|
121
|
+
updatedAt: string;
|
|
122
|
+
serviceFee?: string | undefined;
|
|
123
|
+
postedAmount?: string | undefined;
|
|
124
|
+
partnerReference?: string | null | undefined;
|
|
125
|
+
transactionId?: string | null | undefined;
|
|
126
|
+
serviceFeeTransactionId?: string | null | undefined;
|
|
127
|
+
requestId?: string | null | undefined;
|
|
128
|
+
completedAt?: string | null | undefined;
|
|
129
|
+
notes?: string | undefined;
|
|
130
|
+
currencyCode?: string | undefined;
|
|
131
|
+
}>, "many">;
|
|
132
|
+
total: z.ZodNumber;
|
|
133
|
+
}, "strip", z.ZodTypeAny, {
|
|
134
|
+
total: number;
|
|
135
|
+
data: {
|
|
136
|
+
status: import("./collection.dtos").COLLECTION_STATUS;
|
|
137
|
+
id: string;
|
|
138
|
+
statusMessage: string;
|
|
139
|
+
accountNo: string;
|
|
140
|
+
walletId: string;
|
|
141
|
+
transactionDate: string;
|
|
142
|
+
narration: string;
|
|
143
|
+
msisdn: string;
|
|
144
|
+
channel: import("./collection.dtos").COLLECTION_CHANNEL;
|
|
145
|
+
amount: number;
|
|
146
|
+
reference: string;
|
|
147
|
+
createdAt: string;
|
|
148
|
+
updatedAt: string;
|
|
149
|
+
currencyCode: string;
|
|
150
|
+
serviceFee?: string | undefined;
|
|
151
|
+
postedAmount?: string | undefined;
|
|
152
|
+
partnerReference?: string | null | undefined;
|
|
153
|
+
transactionId?: string | null | undefined;
|
|
154
|
+
serviceFeeTransactionId?: string | null | undefined;
|
|
155
|
+
requestId?: string | null | undefined;
|
|
156
|
+
completedAt?: string | null | undefined;
|
|
157
|
+
notes?: string | undefined;
|
|
158
|
+
}[];
|
|
159
|
+
}, {
|
|
160
|
+
total: number;
|
|
161
|
+
data: {
|
|
162
|
+
status: import("./collection.dtos").COLLECTION_STATUS;
|
|
163
|
+
id: string;
|
|
164
|
+
statusMessage: string;
|
|
165
|
+
accountNo: string;
|
|
166
|
+
walletId: string;
|
|
167
|
+
transactionDate: string;
|
|
168
|
+
narration: string;
|
|
169
|
+
msisdn: string;
|
|
170
|
+
channel: import("./collection.dtos").COLLECTION_CHANNEL;
|
|
171
|
+
amount: number;
|
|
172
|
+
reference: string;
|
|
173
|
+
createdAt: string;
|
|
174
|
+
updatedAt: string;
|
|
175
|
+
serviceFee?: string | undefined;
|
|
176
|
+
postedAmount?: string | undefined;
|
|
177
|
+
partnerReference?: string | null | undefined;
|
|
178
|
+
transactionId?: string | null | undefined;
|
|
179
|
+
serviceFeeTransactionId?: string | null | undefined;
|
|
180
|
+
requestId?: string | null | undefined;
|
|
181
|
+
completedAt?: string | null | undefined;
|
|
182
|
+
notes?: string | undefined;
|
|
183
|
+
currencyCode?: string | undefined;
|
|
184
|
+
}[];
|
|
185
|
+
}>;
|
|
186
|
+
401: z.ZodObject<{
|
|
187
|
+
message: z.ZodOptional<z.ZodString>;
|
|
188
|
+
}, "strip", z.ZodTypeAny, {
|
|
189
|
+
message?: string | undefined;
|
|
190
|
+
}, {
|
|
191
|
+
message?: string | undefined;
|
|
192
|
+
}>;
|
|
193
|
+
403: z.ZodObject<{
|
|
194
|
+
message: z.ZodOptional<z.ZodString>;
|
|
195
|
+
}, "strip", z.ZodTypeAny, {
|
|
196
|
+
message?: string | undefined;
|
|
197
|
+
}, {
|
|
198
|
+
message?: string | undefined;
|
|
199
|
+
}>;
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
getCollection: {
|
|
203
|
+
pathParams: z.ZodObject<{
|
|
204
|
+
id: z.ZodString;
|
|
205
|
+
}, "strip", z.ZodTypeAny, {
|
|
206
|
+
id: string;
|
|
207
|
+
}, {
|
|
208
|
+
id: string;
|
|
209
|
+
}>;
|
|
210
|
+
summary: "Get collection details";
|
|
211
|
+
description: "Retrieve detailed information about a specific collection";
|
|
212
|
+
method: "GET";
|
|
213
|
+
path: "/:id";
|
|
214
|
+
responses: {
|
|
215
|
+
200: z.ZodObject<{
|
|
216
|
+
id: z.ZodString;
|
|
217
|
+
status: z.ZodNativeEnum<typeof import("./collection.dtos").COLLECTION_STATUS>;
|
|
218
|
+
statusMessage: z.ZodString;
|
|
219
|
+
accountNo: z.ZodString;
|
|
220
|
+
walletId: z.ZodString;
|
|
221
|
+
transactionDate: z.ZodString;
|
|
222
|
+
narration: z.ZodString;
|
|
223
|
+
msisdn: z.ZodString;
|
|
224
|
+
channel: z.ZodNativeEnum<typeof import("./collection.dtos").COLLECTION_CHANNEL>;
|
|
225
|
+
amount: z.ZodNumber;
|
|
226
|
+
serviceFee: z.ZodOptional<z.ZodString>;
|
|
227
|
+
postedAmount: z.ZodOptional<z.ZodString>;
|
|
228
|
+
reference: z.ZodString;
|
|
229
|
+
partnerReference: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
230
|
+
transactionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
231
|
+
serviceFeeTransactionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
232
|
+
requestId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
233
|
+
completedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
234
|
+
createdAt: z.ZodString;
|
|
235
|
+
updatedAt: z.ZodString;
|
|
236
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
237
|
+
currencyCode: z.ZodDefault<z.ZodString>;
|
|
238
|
+
}, "strip", z.ZodTypeAny, {
|
|
239
|
+
status: import("./collection.dtos").COLLECTION_STATUS;
|
|
240
|
+
id: string;
|
|
241
|
+
statusMessage: string;
|
|
242
|
+
accountNo: string;
|
|
243
|
+
walletId: string;
|
|
244
|
+
transactionDate: string;
|
|
245
|
+
narration: string;
|
|
246
|
+
msisdn: string;
|
|
247
|
+
channel: import("./collection.dtos").COLLECTION_CHANNEL;
|
|
248
|
+
amount: number;
|
|
249
|
+
reference: string;
|
|
250
|
+
createdAt: string;
|
|
251
|
+
updatedAt: string;
|
|
252
|
+
currencyCode: string;
|
|
253
|
+
serviceFee?: string | undefined;
|
|
254
|
+
postedAmount?: string | undefined;
|
|
255
|
+
partnerReference?: string | null | undefined;
|
|
256
|
+
transactionId?: string | null | undefined;
|
|
257
|
+
serviceFeeTransactionId?: string | null | undefined;
|
|
258
|
+
requestId?: string | null | undefined;
|
|
259
|
+
completedAt?: string | null | undefined;
|
|
260
|
+
notes?: string | undefined;
|
|
261
|
+
}, {
|
|
262
|
+
status: import("./collection.dtos").COLLECTION_STATUS;
|
|
263
|
+
id: string;
|
|
264
|
+
statusMessage: string;
|
|
265
|
+
accountNo: string;
|
|
266
|
+
walletId: string;
|
|
267
|
+
transactionDate: string;
|
|
268
|
+
narration: string;
|
|
269
|
+
msisdn: string;
|
|
270
|
+
channel: import("./collection.dtos").COLLECTION_CHANNEL;
|
|
271
|
+
amount: number;
|
|
272
|
+
reference: string;
|
|
273
|
+
createdAt: string;
|
|
274
|
+
updatedAt: string;
|
|
275
|
+
serviceFee?: string | undefined;
|
|
276
|
+
postedAmount?: string | undefined;
|
|
277
|
+
partnerReference?: string | null | undefined;
|
|
278
|
+
transactionId?: string | null | undefined;
|
|
279
|
+
serviceFeeTransactionId?: string | null | undefined;
|
|
280
|
+
requestId?: string | null | undefined;
|
|
281
|
+
completedAt?: string | null | undefined;
|
|
282
|
+
notes?: string | undefined;
|
|
283
|
+
currencyCode?: string | undefined;
|
|
284
|
+
}>;
|
|
285
|
+
401: z.ZodObject<{
|
|
286
|
+
message: z.ZodOptional<z.ZodString>;
|
|
287
|
+
}, "strip", z.ZodTypeAny, {
|
|
288
|
+
message?: string | undefined;
|
|
289
|
+
}, {
|
|
290
|
+
message?: string | undefined;
|
|
291
|
+
}>;
|
|
292
|
+
403: z.ZodObject<{
|
|
293
|
+
message: z.ZodOptional<z.ZodString>;
|
|
294
|
+
}, "strip", z.ZodTypeAny, {
|
|
295
|
+
message?: string | undefined;
|
|
296
|
+
}, {
|
|
297
|
+
message?: string | undefined;
|
|
298
|
+
}>;
|
|
299
|
+
404: z.ZodObject<{
|
|
300
|
+
message: z.ZodOptional<z.ZodString>;
|
|
301
|
+
}, "strip", z.ZodTypeAny, {
|
|
302
|
+
message?: string | undefined;
|
|
303
|
+
}, {
|
|
304
|
+
message?: string | undefined;
|
|
305
|
+
}>;
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
getSummary: {
|
|
309
|
+
summary: "Get collections summary";
|
|
310
|
+
description: "Retrieve collection summary statistics for different time periods";
|
|
311
|
+
method: "GET";
|
|
312
|
+
path: "/summary";
|
|
313
|
+
responses: {
|
|
314
|
+
200: z.ZodObject<{
|
|
315
|
+
yesterday: z.ZodNumber;
|
|
316
|
+
today: z.ZodNumber;
|
|
317
|
+
thisMonth: z.ZodNumber;
|
|
318
|
+
lastMonth: z.ZodNumber;
|
|
319
|
+
}, "strip", z.ZodTypeAny, {
|
|
320
|
+
yesterday: number;
|
|
321
|
+
today: number;
|
|
322
|
+
thisMonth: number;
|
|
323
|
+
lastMonth: number;
|
|
324
|
+
}, {
|
|
325
|
+
yesterday: number;
|
|
326
|
+
today: number;
|
|
327
|
+
thisMonth: number;
|
|
328
|
+
lastMonth: number;
|
|
329
|
+
}>;
|
|
330
|
+
401: z.ZodObject<{
|
|
331
|
+
message: z.ZodOptional<z.ZodString>;
|
|
332
|
+
}, "strip", z.ZodTypeAny, {
|
|
333
|
+
message?: string | undefined;
|
|
334
|
+
}, {
|
|
335
|
+
message?: string | undefined;
|
|
336
|
+
}>;
|
|
337
|
+
403: z.ZodObject<{
|
|
338
|
+
message: z.ZodOptional<z.ZodString>;
|
|
339
|
+
}, "strip", z.ZodTypeAny, {
|
|
340
|
+
message?: string | undefined;
|
|
341
|
+
}, {
|
|
342
|
+
message?: string | undefined;
|
|
343
|
+
}>;
|
|
344
|
+
};
|
|
345
|
+
};
|
|
346
|
+
getBalance: {
|
|
347
|
+
summary: "Get account balance";
|
|
348
|
+
description: "Retrieve current account balance and summary information";
|
|
349
|
+
method: "GET";
|
|
350
|
+
path: "/balance";
|
|
351
|
+
responses: {
|
|
352
|
+
200: z.ZodObject<{
|
|
353
|
+
balance: z.ZodNumber;
|
|
354
|
+
availableBalance: z.ZodNumber;
|
|
355
|
+
accountNumber: z.ZodString;
|
|
356
|
+
accountName: z.ZodString;
|
|
357
|
+
}, "strip", z.ZodTypeAny, {
|
|
358
|
+
balance: number;
|
|
359
|
+
availableBalance: number;
|
|
360
|
+
accountNumber: string;
|
|
361
|
+
accountName: string;
|
|
362
|
+
}, {
|
|
363
|
+
balance: number;
|
|
364
|
+
availableBalance: number;
|
|
365
|
+
accountNumber: string;
|
|
366
|
+
accountName: string;
|
|
367
|
+
}>;
|
|
368
|
+
401: z.ZodObject<{
|
|
369
|
+
message: z.ZodOptional<z.ZodString>;
|
|
370
|
+
}, "strip", z.ZodTypeAny, {
|
|
371
|
+
message?: string | undefined;
|
|
372
|
+
}, {
|
|
373
|
+
message?: string | undefined;
|
|
374
|
+
}>;
|
|
375
|
+
403: z.ZodObject<{
|
|
376
|
+
message: z.ZodOptional<z.ZodString>;
|
|
377
|
+
}, "strip", z.ZodTypeAny, {
|
|
378
|
+
message?: string | undefined;
|
|
379
|
+
}, {
|
|
380
|
+
message?: string | undefined;
|
|
381
|
+
}>;
|
|
382
|
+
};
|
|
383
|
+
};
|
|
384
|
+
};
|
|
385
|
+
export type CollectionContract = typeof collectionContract;
|