@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,7 +1,58 @@
1
1
  import { z } from "zod";
2
2
  export declare const collectionContract: {
3
3
  getCollections: {
4
- query: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
4
+ query: z.ZodObject<{
5
+ page: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
6
+ limit: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
7
+ sortBy: z.ZodDefault<z.ZodString>;
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.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("./collection.types").COLLECTION_CHANNEL, string>>;
17
+ status: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("./collection.types").COLLECTION_STATUS, string>>;
18
+ minAmount: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
19
+ maxAmount: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
20
+ search: z.ZodOptional<z.ZodString>;
21
+ }, "strip", z.ZodTypeAny, {
22
+ sortBy: string;
23
+ sortOrder: "asc" | "desc";
24
+ status?: import("./collection.types").COLLECTION_STATUS | undefined;
25
+ startDate?: string | undefined;
26
+ endDate?: string | undefined;
27
+ page?: number | undefined;
28
+ limit?: number | undefined;
29
+ accountNo?: string | undefined;
30
+ search?: string | undefined;
31
+ id?: string | undefined;
32
+ msisdn?: string | undefined;
33
+ channel?: import("./collection.types").COLLECTION_CHANNEL | undefined;
34
+ reference?: string | undefined;
35
+ partnerReference?: string | undefined;
36
+ minAmount?: number | undefined;
37
+ maxAmount?: number | undefined;
38
+ }, {
39
+ status?: string | undefined;
40
+ startDate?: string | undefined;
41
+ endDate?: string | undefined;
42
+ page?: string | undefined;
43
+ limit?: string | undefined;
44
+ accountNo?: string | undefined;
45
+ search?: string | undefined;
46
+ id?: string | undefined;
47
+ msisdn?: string | undefined;
48
+ channel?: string | undefined;
49
+ reference?: string | undefined;
50
+ partnerReference?: string | undefined;
51
+ sortBy?: string | undefined;
52
+ sortOrder?: "asc" | "desc" | undefined;
53
+ minAmount?: string | undefined;
54
+ maxAmount?: string | undefined;
55
+ }>;
5
56
  summary: "List collections";
6
57
  description: "Retrieve a paginated list of collections with optional filtering";
7
58
  method: "GET";
@@ -133,18 +184,64 @@ export declare const collectionContract: {
133
184
  }[];
134
185
  }>;
135
186
  401: z.ZodObject<{
187
+ reason: z.ZodOptional<z.ZodString>;
188
+ error: z.ZodOptional<z.ZodString>;
189
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
136
190
  message: z.ZodOptional<z.ZodString>;
191
+ } & {
192
+ statusCode: z.ZodLiteral<401>;
137
193
  }, "strip", z.ZodTypeAny, {
194
+ statusCode: 401;
138
195
  message?: string | undefined;
196
+ error?: string | undefined;
197
+ details?: Record<string, unknown> | undefined;
198
+ reason?: string | undefined;
139
199
  }, {
200
+ statusCode: 401;
140
201
  message?: string | undefined;
202
+ error?: string | undefined;
203
+ details?: Record<string, unknown> | undefined;
204
+ reason?: string | undefined;
141
205
  }>;
142
206
  403: z.ZodObject<{
207
+ reason: z.ZodOptional<z.ZodString>;
208
+ error: z.ZodOptional<z.ZodString>;
209
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
210
+ message: z.ZodOptional<z.ZodString>;
211
+ } & {
212
+ statusCode: z.ZodLiteral<403>;
213
+ }, "strip", z.ZodTypeAny, {
214
+ statusCode: 403;
215
+ message?: string | undefined;
216
+ error?: string | undefined;
217
+ details?: Record<string, unknown> | undefined;
218
+ reason?: string | undefined;
219
+ }, {
220
+ statusCode: 403;
221
+ message?: string | undefined;
222
+ error?: string | undefined;
223
+ details?: Record<string, unknown> | undefined;
224
+ reason?: string | undefined;
225
+ }>;
226
+ 500: z.ZodObject<{
227
+ reason: z.ZodOptional<z.ZodString>;
228
+ error: z.ZodOptional<z.ZodString>;
229
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
143
230
  message: z.ZodOptional<z.ZodString>;
231
+ } & {
232
+ statusCode: z.ZodLiteral<500>;
144
233
  }, "strip", z.ZodTypeAny, {
234
+ statusCode: 500;
145
235
  message?: string | undefined;
236
+ error?: string | undefined;
237
+ details?: Record<string, unknown> | undefined;
238
+ reason?: string | undefined;
146
239
  }, {
240
+ statusCode: 500;
147
241
  message?: string | undefined;
242
+ error?: string | undefined;
243
+ details?: Record<string, unknown> | undefined;
244
+ reason?: string | undefined;
148
245
  }>;
149
246
  };
150
247
  };
@@ -232,25 +329,84 @@ export declare const collectionContract: {
232
329
  currencyCode?: string | undefined;
233
330
  }>;
234
331
  401: z.ZodObject<{
332
+ reason: z.ZodOptional<z.ZodString>;
333
+ error: z.ZodOptional<z.ZodString>;
334
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
235
335
  message: z.ZodOptional<z.ZodString>;
336
+ } & {
337
+ statusCode: z.ZodLiteral<401>;
236
338
  }, "strip", z.ZodTypeAny, {
339
+ statusCode: 401;
237
340
  message?: string | undefined;
341
+ error?: string | undefined;
342
+ details?: Record<string, unknown> | undefined;
343
+ reason?: string | undefined;
238
344
  }, {
345
+ statusCode: 401;
239
346
  message?: string | undefined;
347
+ error?: string | undefined;
348
+ details?: Record<string, unknown> | undefined;
349
+ reason?: string | undefined;
240
350
  }>;
241
351
  403: z.ZodObject<{
352
+ reason: z.ZodOptional<z.ZodString>;
353
+ error: z.ZodOptional<z.ZodString>;
354
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
242
355
  message: z.ZodOptional<z.ZodString>;
356
+ } & {
357
+ statusCode: z.ZodLiteral<403>;
243
358
  }, "strip", z.ZodTypeAny, {
359
+ statusCode: 403;
244
360
  message?: string | undefined;
361
+ error?: string | undefined;
362
+ details?: Record<string, unknown> | undefined;
363
+ reason?: string | undefined;
245
364
  }, {
365
+ statusCode: 403;
246
366
  message?: string | undefined;
367
+ error?: string | undefined;
368
+ details?: Record<string, unknown> | undefined;
369
+ reason?: string | undefined;
247
370
  }>;
248
371
  404: z.ZodObject<{
372
+ reason: z.ZodOptional<z.ZodString>;
373
+ error: z.ZodOptional<z.ZodString>;
374
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
375
+ message: z.ZodOptional<z.ZodString>;
376
+ } & {
377
+ statusCode: z.ZodLiteral<404>;
378
+ }, "strip", z.ZodTypeAny, {
379
+ statusCode: 404;
380
+ message?: string | undefined;
381
+ error?: string | undefined;
382
+ details?: Record<string, unknown> | undefined;
383
+ reason?: string | undefined;
384
+ }, {
385
+ statusCode: 404;
386
+ message?: string | undefined;
387
+ error?: string | undefined;
388
+ details?: Record<string, unknown> | undefined;
389
+ reason?: string | undefined;
390
+ }>;
391
+ 500: z.ZodObject<{
392
+ reason: z.ZodOptional<z.ZodString>;
393
+ error: z.ZodOptional<z.ZodString>;
394
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
249
395
  message: z.ZodOptional<z.ZodString>;
396
+ } & {
397
+ statusCode: z.ZodLiteral<500>;
250
398
  }, "strip", z.ZodTypeAny, {
399
+ statusCode: 500;
251
400
  message?: string | undefined;
401
+ error?: string | undefined;
402
+ details?: Record<string, unknown> | undefined;
403
+ reason?: string | undefined;
252
404
  }, {
405
+ statusCode: 500;
253
406
  message?: string | undefined;
407
+ error?: string | undefined;
408
+ details?: Record<string, unknown> | undefined;
409
+ reason?: string | undefined;
254
410
  }>;
255
411
  };
256
412
  };
@@ -277,118 +433,64 @@ export declare const collectionContract: {
277
433
  lastMonth: number;
278
434
  }>;
279
435
  401: z.ZodObject<{
436
+ reason: z.ZodOptional<z.ZodString>;
437
+ error: z.ZodOptional<z.ZodString>;
438
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
280
439
  message: z.ZodOptional<z.ZodString>;
440
+ } & {
441
+ statusCode: z.ZodLiteral<401>;
281
442
  }, "strip", z.ZodTypeAny, {
443
+ statusCode: 401;
282
444
  message?: string | undefined;
445
+ error?: string | undefined;
446
+ details?: Record<string, unknown> | undefined;
447
+ reason?: string | undefined;
283
448
  }, {
449
+ statusCode: 401;
284
450
  message?: string | undefined;
451
+ error?: string | undefined;
452
+ details?: Record<string, unknown> | undefined;
453
+ reason?: string | undefined;
285
454
  }>;
286
455
  403: z.ZodObject<{
456
+ reason: z.ZodOptional<z.ZodString>;
457
+ error: z.ZodOptional<z.ZodString>;
458
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
287
459
  message: z.ZodOptional<z.ZodString>;
460
+ } & {
461
+ statusCode: z.ZodLiteral<403>;
288
462
  }, "strip", z.ZodTypeAny, {
463
+ statusCode: 403;
289
464
  message?: string | undefined;
465
+ error?: string | undefined;
466
+ details?: Record<string, unknown> | undefined;
467
+ reason?: string | undefined;
290
468
  }, {
469
+ statusCode: 403;
291
470
  message?: string | undefined;
471
+ error?: string | undefined;
472
+ details?: Record<string, unknown> | undefined;
473
+ reason?: string | undefined;
292
474
  }>;
293
- };
294
- };
295
- getWalletInfo: {
296
- summary: "Get account balance";
297
- description: "Retrieve current account balance and summary information";
298
- method: "GET";
299
- path: "/balance";
300
- responses: {
301
- 200: z.ZodObject<{
302
- balance: z.ZodNumber;
303
- availableBalance: z.ZodNumber;
304
- accountNumber: z.ZodString;
305
- accountName: z.ZodString;
306
- }, "strip", z.ZodTypeAny, {
307
- balance: number;
308
- availableBalance: number;
309
- accountNumber: string;
310
- accountName: string;
311
- }, {
312
- balance: number;
313
- availableBalance: number;
314
- accountNumber: string;
315
- accountName: string;
316
- }>;
317
- 401: z.ZodObject<{
318
- message: z.ZodOptional<z.ZodString>;
319
- }, "strip", z.ZodTypeAny, {
320
- message?: string | undefined;
321
- }, {
322
- message?: string | undefined;
323
- }>;
324
- 403: z.ZodObject<{
325
- message: z.ZodOptional<z.ZodString>;
326
- }, "strip", z.ZodTypeAny, {
327
- message?: string | undefined;
328
- }, {
329
- message?: string | undefined;
330
- }>;
331
- };
332
- };
333
- getStatement: {
334
- summary: "Get account statement";
335
- method: "POST";
336
- body: z.ZodObject<{
337
- startDate: z.ZodString;
338
- endDate: z.ZodString;
339
- }, "strip", z.ZodTypeAny, {
340
- startDate: string;
341
- endDate: string;
342
- }, {
343
- startDate: string;
344
- endDate: string;
345
- }>;
346
- path: "/collection-statement";
347
- responses: {
348
- 200: z.ZodObject<{
349
- accountNo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
350
- debitOrCredit: z.ZodEnum<["CR", "DR"]>;
351
- tranRefNo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
352
- narration: z.ZodOptional<z.ZodNullable<z.ZodString>>;
353
- txnDate: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null, string | null | undefined>;
354
- valueDate: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null, string | null | undefined>;
355
- amountCredited: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>>>;
356
- amountDebited: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodString, number, string>]>>>;
357
- balance: z.ZodNumber;
358
- }, "strip", z.ZodTypeAny, {
359
- balance: number;
360
- debitOrCredit: "CR" | "DR";
361
- txnDate: string | null;
362
- valueDate: string | null;
363
- accountNo?: string | null | undefined;
364
- tranRefNo?: string | null | undefined;
365
- narration?: string | null | undefined;
366
- amountCredited?: number | null | undefined;
367
- amountDebited?: number | null | undefined;
368
- }, {
369
- balance: number;
370
- debitOrCredit: "CR" | "DR";
371
- accountNo?: string | null | undefined;
372
- tranRefNo?: string | null | undefined;
373
- narration?: string | null | undefined;
374
- txnDate?: string | null | undefined;
375
- valueDate?: string | null | undefined;
376
- amountCredited?: string | number | null | undefined;
377
- amountDebited?: string | number | null | undefined;
378
- }>;
379
- 401: z.ZodObject<{
380
- message: z.ZodOptional<z.ZodString>;
381
- }, "strip", z.ZodTypeAny, {
382
- message?: string | undefined;
383
- }, {
384
- message?: string | undefined;
385
- }>;
386
- 403: z.ZodObject<{
475
+ 500: z.ZodObject<{
476
+ reason: z.ZodOptional<z.ZodString>;
477
+ error: z.ZodOptional<z.ZodString>;
478
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
387
479
  message: z.ZodOptional<z.ZodString>;
480
+ } & {
481
+ statusCode: z.ZodLiteral<500>;
388
482
  }, "strip", z.ZodTypeAny, {
483
+ statusCode: 500;
389
484
  message?: string | undefined;
485
+ error?: string | undefined;
486
+ details?: Record<string, unknown> | undefined;
487
+ reason?: string | undefined;
390
488
  }, {
489
+ statusCode: 500;
391
490
  message?: string | undefined;
491
+ error?: string | undefined;
492
+ details?: Record<string, unknown> | undefined;
493
+ reason?: string | undefined;
392
494
  }>;
393
495
  };
394
496
  };
@@ -140,7 +140,7 @@ export declare class Collection {
140
140
  /**
141
141
  * Create Collection instance from JSON representation
142
142
  */
143
- static fromJson(json: CollectionJson): Collection | undefined;
143
+ static fromJSON(json: CollectionJson): Collection | undefined;
144
144
  /**
145
145
  * Create multiple Collection instances from JSON array
146
146
  */
@@ -148,5 +148,5 @@ export declare class Collection {
148
148
  /**
149
149
  * Convert to JSON representation with proper typing
150
150
  */
151
- toJson(): CollectionJson;
151
+ toJSON(): CollectionJson;
152
152
  }
@@ -3,8 +3,7 @@ import { collectionContract } from "./collection.api-contract";
3
3
  import { Collection } from "./collection.model";
4
4
  import { CollectionQuery } from "./collection.query";
5
5
  import { CollectionFilters } from "./collection.types";
6
- import { TransactionSummary, WalletInfo } from "@/lib/models";
7
- import { StatementEntry } from "@/lib/models/statement-entry.model";
6
+ import { TransactionSummary } from "@/lib/models";
8
7
  /**
9
8
  * Flexible query input type - supports the class, filters interface, URL params, etc.
10
9
  */
@@ -61,12 +60,4 @@ export declare class CollectionRepository extends BaseRepository<typeof collecti
61
60
  * Get collections summary statistics
62
61
  */
63
62
  getCollectionStats(): Promise<TransactionSummary>;
64
- /**
65
- * Get wallet information
66
- */
67
- getWalletInfo(): Promise<WalletInfo>;
68
- getCollectionStatement(range: {
69
- startDate: Date;
70
- endDate: Date;
71
- }): Promise<StatementEntry[]>;
72
63
  }
@@ -9,7 +9,8 @@ export declare enum COLLECTION_STATUS {
9
9
  export declare enum COLLECTION_CHANNEL {
10
10
  AIRTEL = "TZ-AIRTEL-C2B",
11
11
  TIGO = "TZ-TIGO-C2B",
12
- HALOTEL = "TZ-HALOTEL-C2B"
12
+ HALOTEL = "TZ-HALOTEL-C2B",
13
+ SAFARICOM = "TZ-SAFARICOM-C2B"
13
14
  }
14
15
  export declare const CollectionDTOSchemas: {
15
16
  collection: z.ZodObject<{