@temboplus/tembo-dashboard 0.0.25 → 0.0.26-beta.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.
@@ -1,4 +1,123 @@
1
1
  import z from "zod";
2
+ declare const apiErrorSchema: z.ZodObject<{
3
+ statusCode: z.ZodNumber;
4
+ reason: z.ZodOptional<z.ZodString>;
5
+ error: z.ZodOptional<z.ZodString>;
6
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
7
+ message: z.ZodOptional<z.ZodString>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ statusCode: number;
10
+ message?: string | undefined;
11
+ error?: string | undefined;
12
+ details?: Record<string, unknown> | undefined;
13
+ reason?: string | undefined;
14
+ }, {
15
+ statusCode: number;
16
+ message?: string | undefined;
17
+ error?: string | undefined;
18
+ details?: Record<string, unknown> | undefined;
19
+ reason?: string | undefined;
20
+ }>;
21
+ declare const validationErrorSchema: z.ZodObject<{
22
+ reason: z.ZodOptional<z.ZodString>;
23
+ error: z.ZodOptional<z.ZodString>;
24
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
25
+ message: z.ZodOptional<z.ZodString>;
26
+ } & {
27
+ statusCode: z.ZodLiteral<400>;
28
+ }, "strip", z.ZodTypeAny, {
29
+ statusCode: 400;
30
+ message?: string | undefined;
31
+ error?: string | undefined;
32
+ details?: Record<string, unknown> | undefined;
33
+ reason?: string | undefined;
34
+ }, {
35
+ statusCode: 400;
36
+ message?: string | undefined;
37
+ error?: string | undefined;
38
+ details?: Record<string, unknown> | undefined;
39
+ reason?: string | undefined;
40
+ }>;
41
+ declare const unauthorizedErrorSchema: z.ZodObject<{
42
+ reason: z.ZodOptional<z.ZodString>;
43
+ error: z.ZodOptional<z.ZodString>;
44
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
45
+ message: z.ZodOptional<z.ZodString>;
46
+ } & {
47
+ statusCode: z.ZodLiteral<401>;
48
+ }, "strip", z.ZodTypeAny, {
49
+ statusCode: 401;
50
+ message?: string | undefined;
51
+ error?: string | undefined;
52
+ details?: Record<string, unknown> | undefined;
53
+ reason?: string | undefined;
54
+ }, {
55
+ statusCode: 401;
56
+ message?: string | undefined;
57
+ error?: string | undefined;
58
+ details?: Record<string, unknown> | undefined;
59
+ reason?: string | undefined;
60
+ }>;
61
+ declare const forbiddenErrorSchema: z.ZodObject<{
62
+ reason: z.ZodOptional<z.ZodString>;
63
+ error: z.ZodOptional<z.ZodString>;
64
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
65
+ message: z.ZodOptional<z.ZodString>;
66
+ } & {
67
+ statusCode: z.ZodLiteral<403>;
68
+ }, "strip", z.ZodTypeAny, {
69
+ statusCode: 403;
70
+ message?: string | undefined;
71
+ error?: string | undefined;
72
+ details?: Record<string, unknown> | undefined;
73
+ reason?: string | undefined;
74
+ }, {
75
+ statusCode: 403;
76
+ message?: string | undefined;
77
+ error?: string | undefined;
78
+ details?: Record<string, unknown> | undefined;
79
+ reason?: string | undefined;
80
+ }>;
81
+ declare const notFoundErrorSchema: z.ZodObject<{
82
+ reason: z.ZodOptional<z.ZodString>;
83
+ error: z.ZodOptional<z.ZodString>;
84
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
85
+ message: z.ZodOptional<z.ZodString>;
86
+ } & {
87
+ statusCode: z.ZodLiteral<404>;
88
+ }, "strip", z.ZodTypeAny, {
89
+ statusCode: 404;
90
+ message?: string | undefined;
91
+ error?: string | undefined;
92
+ details?: Record<string, unknown> | undefined;
93
+ reason?: string | undefined;
94
+ }, {
95
+ statusCode: 404;
96
+ message?: string | undefined;
97
+ error?: string | undefined;
98
+ details?: Record<string, unknown> | undefined;
99
+ reason?: string | undefined;
100
+ }>;
101
+ declare const serverErrorSchema: z.ZodObject<{
102
+ reason: z.ZodOptional<z.ZodString>;
103
+ error: z.ZodOptional<z.ZodString>;
104
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
105
+ message: z.ZodOptional<z.ZodString>;
106
+ } & {
107
+ statusCode: z.ZodLiteral<500>;
108
+ }, "strip", z.ZodTypeAny, {
109
+ statusCode: 500;
110
+ message?: string | undefined;
111
+ error?: string | undefined;
112
+ details?: Record<string, unknown> | undefined;
113
+ reason?: string | undefined;
114
+ }, {
115
+ statusCode: 500;
116
+ message?: string | undefined;
117
+ error?: string | undefined;
118
+ details?: Record<string, unknown> | undefined;
119
+ reason?: string | undefined;
120
+ }>;
2
121
  declare const paginationSchema: z.ZodObject<{
3
122
  page: z.ZodNumber;
4
123
  limit: z.ZodNumber;
@@ -88,6 +207,125 @@ export declare const statementEntrySchema: z.ZodObject<{
88
207
  amountDebited?: string | number | null | undefined;
89
208
  }>;
90
209
  export declare const CommonSchemas: {
210
+ apiError: z.ZodObject<{
211
+ statusCode: z.ZodNumber;
212
+ reason: z.ZodOptional<z.ZodString>;
213
+ error: z.ZodOptional<z.ZodString>;
214
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
215
+ message: z.ZodOptional<z.ZodString>;
216
+ }, "strip", z.ZodTypeAny, {
217
+ statusCode: number;
218
+ message?: string | undefined;
219
+ error?: string | undefined;
220
+ details?: Record<string, unknown> | undefined;
221
+ reason?: string | undefined;
222
+ }, {
223
+ statusCode: number;
224
+ message?: string | undefined;
225
+ error?: string | undefined;
226
+ details?: Record<string, unknown> | undefined;
227
+ reason?: string | undefined;
228
+ }>;
229
+ validationError: z.ZodObject<{
230
+ reason: z.ZodOptional<z.ZodString>;
231
+ error: z.ZodOptional<z.ZodString>;
232
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
233
+ message: z.ZodOptional<z.ZodString>;
234
+ } & {
235
+ statusCode: z.ZodLiteral<400>;
236
+ }, "strip", z.ZodTypeAny, {
237
+ statusCode: 400;
238
+ message?: string | undefined;
239
+ error?: string | undefined;
240
+ details?: Record<string, unknown> | undefined;
241
+ reason?: string | undefined;
242
+ }, {
243
+ statusCode: 400;
244
+ message?: string | undefined;
245
+ error?: string | undefined;
246
+ details?: Record<string, unknown> | undefined;
247
+ reason?: string | undefined;
248
+ }>;
249
+ unauthorizedError: z.ZodObject<{
250
+ reason: z.ZodOptional<z.ZodString>;
251
+ error: z.ZodOptional<z.ZodString>;
252
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
253
+ message: z.ZodOptional<z.ZodString>;
254
+ } & {
255
+ statusCode: z.ZodLiteral<401>;
256
+ }, "strip", z.ZodTypeAny, {
257
+ statusCode: 401;
258
+ message?: string | undefined;
259
+ error?: string | undefined;
260
+ details?: Record<string, unknown> | undefined;
261
+ reason?: string | undefined;
262
+ }, {
263
+ statusCode: 401;
264
+ message?: string | undefined;
265
+ error?: string | undefined;
266
+ details?: Record<string, unknown> | undefined;
267
+ reason?: string | undefined;
268
+ }>;
269
+ forbiddenError: z.ZodObject<{
270
+ reason: z.ZodOptional<z.ZodString>;
271
+ error: z.ZodOptional<z.ZodString>;
272
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
273
+ message: z.ZodOptional<z.ZodString>;
274
+ } & {
275
+ statusCode: z.ZodLiteral<403>;
276
+ }, "strip", z.ZodTypeAny, {
277
+ statusCode: 403;
278
+ message?: string | undefined;
279
+ error?: string | undefined;
280
+ details?: Record<string, unknown> | undefined;
281
+ reason?: string | undefined;
282
+ }, {
283
+ statusCode: 403;
284
+ message?: string | undefined;
285
+ error?: string | undefined;
286
+ details?: Record<string, unknown> | undefined;
287
+ reason?: string | undefined;
288
+ }>;
289
+ notFoundError: z.ZodObject<{
290
+ reason: z.ZodOptional<z.ZodString>;
291
+ error: z.ZodOptional<z.ZodString>;
292
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
293
+ message: z.ZodOptional<z.ZodString>;
294
+ } & {
295
+ statusCode: z.ZodLiteral<404>;
296
+ }, "strip", z.ZodTypeAny, {
297
+ statusCode: 404;
298
+ message?: string | undefined;
299
+ error?: string | undefined;
300
+ details?: Record<string, unknown> | undefined;
301
+ reason?: string | undefined;
302
+ }, {
303
+ statusCode: 404;
304
+ message?: string | undefined;
305
+ error?: string | undefined;
306
+ details?: Record<string, unknown> | undefined;
307
+ reason?: string | undefined;
308
+ }>;
309
+ serverError: z.ZodObject<{
310
+ reason: z.ZodOptional<z.ZodString>;
311
+ error: z.ZodOptional<z.ZodString>;
312
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
313
+ message: z.ZodOptional<z.ZodString>;
314
+ } & {
315
+ statusCode: z.ZodLiteral<500>;
316
+ }, "strip", z.ZodTypeAny, {
317
+ statusCode: 500;
318
+ message?: string | undefined;
319
+ error?: string | undefined;
320
+ details?: Record<string, unknown> | undefined;
321
+ reason?: string | undefined;
322
+ }, {
323
+ statusCode: 500;
324
+ message?: string | undefined;
325
+ error?: string | undefined;
326
+ details?: Record<string, unknown> | undefined;
327
+ reason?: string | undefined;
328
+ }>;
91
329
  pagination: z.ZodObject<{
92
330
  page: z.ZodNumber;
93
331
  limit: z.ZodNumber;
@@ -174,6 +412,12 @@ export declare const CommonSchemas: {
174
412
  amountDebited?: string | number | null | undefined;
175
413
  }>;
176
414
  };
415
+ export type ApiErrorDTO = z.infer<typeof apiErrorSchema>;
416
+ export type ValidationErrorDTO = z.infer<typeof validationErrorSchema>;
417
+ export type UnauthorizedErrorDTO = z.infer<typeof unauthorizedErrorSchema>;
418
+ export type ForbiddenErrorDTO = z.infer<typeof forbiddenErrorSchema>;
419
+ export type NotFoundErrorDTO = z.infer<typeof notFoundErrorSchema>;
420
+ export type ServerErrorDTO = z.infer<typeof serverErrorSchema>;
177
421
  export type PaginationDTO = z.infer<typeof paginationSchema>;
178
422
  export type TransactionSummaryDTO = z.infer<typeof transactionSummarySchema>;
179
423
  export type WalletSummaryDTO = z.infer<typeof walletSummarySchema>;
@@ -58,11 +58,11 @@ export declare class StatementEntry {
58
58
  /**
59
59
  * Convert to JSON representation with serialized Amount objects
60
60
  */
61
- toJson(): StatementEntryJson;
61
+ toJSON(): StatementEntryJson;
62
62
  /**
63
63
  * Create StatementEntry instance from JSON representation
64
64
  */
65
- static fromJson(json: StatementEntryJson): StatementEntry | undefined;
65
+ static fromJSON(json: StatementEntryJson): StatementEntry | undefined;
66
66
  /**
67
67
  * Create multiple StatementEntry instances from JSON array
68
68
  */
@@ -35,9 +35,9 @@ export declare class TransactionSummary {
35
35
  /**
36
36
  * Convert to JSON representation with serialized Amount objects
37
37
  */
38
- toJson(): TransactionSummaryJson;
38
+ toJSON(): TransactionSummaryJson;
39
39
  /**
40
40
  * Create TransactionSummary instance from JSON representation
41
41
  */
42
- static fromJson(json: TransactionSummaryJson): TransactionSummary | undefined;
42
+ static fromJSON(json: TransactionSummaryJson): TransactionSummary | undefined;
43
43
  }
@@ -1,25 +1,46 @@
1
1
  import { Amount, AmountJson, CurrencyCode } from "@temboplus/frontend-core";
2
- import { WalletSummaryDTO } from "../api";
2
+ export interface WalletInfoData {
3
+ accountName: string;
4
+ accountNo: string;
5
+ availableBalance: number;
6
+ currentBalance: number;
7
+ accountStatus: string;
8
+ type: string;
9
+ currencyCode: string;
10
+ countryCode: string;
11
+ }
3
12
  /**
4
13
  * JSON representation of WalletInfo with serialized Amount objects
5
14
  */
6
15
  export interface WalletInfoJson {
7
16
  accountName: string;
8
- accountNumber: string;
17
+ accountNo?: string;
18
+ accountNumber?: string;
9
19
  availableBalance: AmountJson;
20
+ currentBalance?: AmountJson;
10
21
  actualBalance: AmountJson;
11
- currency: CurrencyCode;
22
+ accountStatus?: string;
23
+ type?: string;
24
+ currencyCode?: CurrencyCode;
25
+ countryCode?: string;
26
+ currency?: CurrencyCode;
12
27
  }
13
28
  /**
14
29
  * Represents account balance information
15
30
  */
16
31
  export declare class WalletInfo {
17
32
  readonly accountName: string;
33
+ readonly accountNo: string;
18
34
  readonly accountNumber: string;
19
35
  readonly availableBalance: Amount;
36
+ readonly currentBalance: Amount;
20
37
  readonly actualBalance: Amount;
38
+ readonly accountStatus: string;
39
+ readonly type: string;
40
+ readonly currencyCode: CurrencyCode;
41
+ readonly countryCode: string;
21
42
  readonly currency: CurrencyCode;
22
- constructor(data: WalletSummaryDTO);
43
+ constructor(data: WalletInfoData);
23
44
  /**
24
45
  * Check if there are sufficient funds for a payout
25
46
  */
@@ -27,15 +48,15 @@ export declare class WalletInfo {
27
48
  /**
28
49
  * Create WalletInfo from DTO
29
50
  */
30
- static from(data: WalletSummaryDTO): WalletInfo;
51
+ static from(data: WalletInfoData): WalletInfo;
31
52
  /**
32
53
  * Convert to JSON representation with serialized Amount objects
33
54
  */
34
- toJson(): WalletInfoJson;
55
+ toJSON(): WalletInfoJson;
35
56
  /**
36
57
  * Create WalletInfo instance from JSON representation
37
58
  */
38
- static fromJson(json: WalletInfoJson): WalletInfo | undefined;
59
+ static fromJSON(json: WalletInfoJson): WalletInfo | undefined;
39
60
  /**
40
61
  * Create multiple WalletInfo instances from JSON array
41
62
  */
@@ -1,4 +1,4 @@
1
- export type MobileChannelKey = "AIRTEL" | "VODACOM" | "TIGO" | "HALOTEL";
1
+ export type MobileChannelKey = "AIRTEL" | "VODACOM" | "TIGO" | "HALOTEL" | "SAFARICOM";
2
2
  export interface MobileChannelInfo {
3
3
  key: MobileChannelKey;
4
4
  networkOperator: string;
@@ -1,13 +1,12 @@
1
- import { z } from "zod";
2
1
  export declare const authContract: {
3
2
  login: {
4
3
  summary: "User login";
5
4
  description: "Authenticate user with email and password";
6
5
  method: "POST";
7
- body: z.ZodObject<{
8
- identity: z.ZodString;
9
- password: z.ZodString;
10
- }, "strip", z.ZodTypeAny, {
6
+ body: import("zod").ZodObject<{
7
+ identity: import("zod").ZodString;
8
+ password: import("zod").ZodString;
9
+ }, "strip", import("zod").ZodTypeAny, {
11
10
  identity: string;
12
11
  password: string;
13
12
  }, {
@@ -16,11 +15,11 @@ export declare const authContract: {
16
15
  }>;
17
16
  path: "/login";
18
17
  responses: {
19
- 201: z.ZodObject<{
20
- token: z.ZodString;
21
- identity: z.ZodString;
22
- name: z.ZodString;
23
- }, "strip", z.ZodTypeAny, {
18
+ 201: import("zod").ZodObject<{
19
+ token: import("zod").ZodString;
20
+ identity: import("zod").ZodString;
21
+ name: import("zod").ZodString;
22
+ }, "strip", import("zod").ZodTypeAny, {
24
23
  token: string;
25
24
  identity: string;
26
25
  name: string;
@@ -29,19 +28,65 @@ export declare const authContract: {
29
28
  identity: string;
30
29
  name: string;
31
30
  }>;
32
- 400: z.ZodObject<{
33
- message: z.ZodOptional<z.ZodString>;
34
- }, "strip", z.ZodTypeAny, {
31
+ 400: import("zod").ZodObject<{
32
+ reason: import("zod").ZodOptional<import("zod").ZodString>;
33
+ error: import("zod").ZodOptional<import("zod").ZodString>;
34
+ details: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
35
+ message: import("zod").ZodOptional<import("zod").ZodString>;
36
+ } & {
37
+ statusCode: import("zod").ZodLiteral<400>;
38
+ }, "strip", import("zod").ZodTypeAny, {
39
+ statusCode: 400;
35
40
  message?: string | undefined;
41
+ error?: string | undefined;
42
+ details?: Record<string, unknown> | undefined;
43
+ reason?: string | undefined;
36
44
  }, {
45
+ statusCode: 400;
37
46
  message?: string | undefined;
47
+ error?: string | undefined;
48
+ details?: Record<string, unknown> | undefined;
49
+ reason?: string | undefined;
38
50
  }>;
39
- 401: z.ZodObject<{
40
- message: z.ZodOptional<z.ZodString>;
41
- }, "strip", z.ZodTypeAny, {
51
+ 401: import("zod").ZodObject<{
52
+ reason: import("zod").ZodOptional<import("zod").ZodString>;
53
+ error: import("zod").ZodOptional<import("zod").ZodString>;
54
+ details: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
55
+ message: import("zod").ZodOptional<import("zod").ZodString>;
56
+ } & {
57
+ statusCode: import("zod").ZodLiteral<401>;
58
+ }, "strip", import("zod").ZodTypeAny, {
59
+ statusCode: 401;
42
60
  message?: string | undefined;
61
+ error?: string | undefined;
62
+ details?: Record<string, unknown> | undefined;
63
+ reason?: string | undefined;
43
64
  }, {
65
+ statusCode: 401;
44
66
  message?: string | undefined;
67
+ error?: string | undefined;
68
+ details?: Record<string, unknown> | undefined;
69
+ reason?: string | undefined;
70
+ }>;
71
+ 500: import("zod").ZodObject<{
72
+ reason: import("zod").ZodOptional<import("zod").ZodString>;
73
+ error: import("zod").ZodOptional<import("zod").ZodString>;
74
+ details: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
75
+ message: import("zod").ZodOptional<import("zod").ZodString>;
76
+ } & {
77
+ statusCode: import("zod").ZodLiteral<500>;
78
+ }, "strip", import("zod").ZodTypeAny, {
79
+ statusCode: 500;
80
+ message?: string | undefined;
81
+ error?: string | undefined;
82
+ details?: Record<string, unknown> | undefined;
83
+ reason?: string | undefined;
84
+ }, {
85
+ statusCode: 500;
86
+ message?: string | undefined;
87
+ error?: string | undefined;
88
+ details?: Record<string, unknown> | undefined;
89
+ reason?: string | undefined;
45
90
  }>;
46
91
  };
47
92
  };