@temboplus/tembo-dashboard 0.0.26-beta.1 → 0.0.26-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/modules/wallet/wallet.api-contract.d.ts +129 -0
- package/dist/modules/wallet/wallet.repository.d.ts +2 -0
- package/dist/modules/wallet/wallet.types.d.ts +43 -0
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import { BaseRepository } from "@/lib/api";
|
|
|
2
2
|
import { StatementEntry, WalletInfo } from "@/lib/models";
|
|
3
3
|
import { Wallet } from "./wallet.model";
|
|
4
4
|
import { walletContract } from "./wallet.api-contract";
|
|
5
|
+
import { TransferRequestDTO, TransferResponseDTO } from "./wallet.types";
|
|
5
6
|
export interface WalletStatementInput {
|
|
6
7
|
accountNo: string;
|
|
7
8
|
startDate: Date | string;
|
|
@@ -16,5 +17,6 @@ export declare class WalletRepository extends BaseRepository<typeof walletContra
|
|
|
16
17
|
getWalletInfo(accountNo: string): Promise<Wallet>;
|
|
17
18
|
getWalletBalance(accountNo: string): Promise<WalletInfo>;
|
|
18
19
|
getWalletStatement(input: WalletStatementInput): Promise<StatementEntry[]>;
|
|
20
|
+
transferLocal(input: TransferRequestDTO): Promise<TransferResponseDTO>;
|
|
19
21
|
private formatStatementDate;
|
|
20
22
|
}
|
|
@@ -77,8 +77,51 @@ export declare const WalletDTOSchemas: {
|
|
|
77
77
|
endDate: string;
|
|
78
78
|
accountNo: string;
|
|
79
79
|
}>;
|
|
80
|
+
transferRequest: z.ZodObject<{
|
|
81
|
+
amount: z.ZodNumber;
|
|
82
|
+
from: z.ZodString;
|
|
83
|
+
to: z.ZodString;
|
|
84
|
+
description: z.ZodString;
|
|
85
|
+
}, "strip", z.ZodTypeAny, {
|
|
86
|
+
description: string;
|
|
87
|
+
amount: number;
|
|
88
|
+
from: string;
|
|
89
|
+
to: string;
|
|
90
|
+
}, {
|
|
91
|
+
description: string;
|
|
92
|
+
amount: number;
|
|
93
|
+
from: string;
|
|
94
|
+
to: string;
|
|
95
|
+
}>;
|
|
96
|
+
transferResponse: z.ZodObject<{
|
|
97
|
+
transactionId: z.ZodString;
|
|
98
|
+
from: z.ZodString;
|
|
99
|
+
to: z.ZodString;
|
|
100
|
+
transactionDate: z.ZodString;
|
|
101
|
+
narration: z.ZodString;
|
|
102
|
+
amount: z.ZodNumber;
|
|
103
|
+
transactionRef: z.ZodString;
|
|
104
|
+
}, "strip", z.ZodTypeAny, {
|
|
105
|
+
narration: string;
|
|
106
|
+
transactionDate: string;
|
|
107
|
+
amount: number;
|
|
108
|
+
transactionId: string;
|
|
109
|
+
transactionRef: string;
|
|
110
|
+
from: string;
|
|
111
|
+
to: string;
|
|
112
|
+
}, {
|
|
113
|
+
narration: string;
|
|
114
|
+
transactionDate: string;
|
|
115
|
+
amount: number;
|
|
116
|
+
transactionId: string;
|
|
117
|
+
transactionRef: string;
|
|
118
|
+
from: string;
|
|
119
|
+
to: string;
|
|
120
|
+
}>;
|
|
80
121
|
};
|
|
81
122
|
export type WalletDTO = z.infer<typeof WalletDTOSchemas.wallet>;
|
|
82
123
|
export type WalletBalanceRequestDTO = z.infer<typeof WalletDTOSchemas.walletBalanceRequest>;
|
|
83
124
|
export type WalletBalanceDTO = z.infer<typeof WalletDTOSchemas.walletBalance>;
|
|
84
125
|
export type WalletStatementRequestDTO = z.infer<typeof WalletDTOSchemas.walletStatementRequest>;
|
|
126
|
+
export type TransferRequestDTO = z.infer<typeof WalletDTOSchemas.transferRequest>;
|
|
127
|
+
export type TransferResponseDTO = z.infer<typeof WalletDTOSchemas.transferResponse>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@temboplus/tembo-dashboard",
|
|
3
|
-
"version": "0.0.26-beta.
|
|
3
|
+
"version": "0.0.26-beta.2",
|
|
4
4
|
"description": "A foundational library for Temboplus-Dashboard projects providing type-safe data layer abstraction with API contracts, domain models, and repositories.",
|
|
5
5
|
"main": "./dist/index.cjs.js",
|
|
6
6
|
"module": "./dist/index.esm.js",
|