@luxfi/bank 1.2.0 → 1.3.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/dist/index.d.ts +7 -5
- package/dist/index.js +3 -1
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -186,9 +186,7 @@ export declare class Bank {
|
|
|
186
186
|
}>;
|
|
187
187
|
config(): Promise<Config>;
|
|
188
188
|
plans(): Promise<Plan[]>;
|
|
189
|
-
onboard(profile: Record<string, unknown>): Promise<
|
|
190
|
-
account: Account;
|
|
191
|
-
}>;
|
|
189
|
+
onboard(profile: Record<string, unknown>): Promise<Overview>;
|
|
192
190
|
overview(): Promise<Overview>;
|
|
193
191
|
transactions(): Promise<Transaction[]>;
|
|
194
192
|
accounts(): Promise<Account[]>;
|
|
@@ -205,8 +203,12 @@ export declare class Bank {
|
|
|
205
203
|
wallets(accountId: string): Promise<Wallet[]>;
|
|
206
204
|
accountTransactions(accountId: string): Promise<Transaction[]>;
|
|
207
205
|
beneficiaries(): Promise<Beneficiary[]>;
|
|
208
|
-
createBeneficiary(beneficiary: Record<string, unknown>): Promise<
|
|
209
|
-
|
|
206
|
+
createBeneficiary(beneficiary: Record<string, unknown>): Promise<{
|
|
207
|
+
id: string;
|
|
208
|
+
}>;
|
|
209
|
+
deleteBeneficiary(id: string): Promise<{
|
|
210
|
+
deleted: string;
|
|
211
|
+
}>;
|
|
210
212
|
cards(): Promise<Card[]>;
|
|
211
213
|
issueCard(currency?: string): Promise<{
|
|
212
214
|
card: Card;
|
package/dist/index.js
CHANGED
|
@@ -5,11 +5,13 @@
|
|
|
5
5
|
export class BankError extends Error {
|
|
6
6
|
status;
|
|
7
7
|
body;
|
|
8
|
+
// Fields declared explicitly (not via constructor parameter properties) so
|
|
9
|
+
// the source runs under type-stripping runtimes — Node's native TS, Deno, bun.
|
|
8
10
|
constructor(message, status, body) {
|
|
9
11
|
super(message);
|
|
12
|
+
this.name = 'BankError';
|
|
10
13
|
this.status = status;
|
|
11
14
|
this.body = body;
|
|
12
|
-
this.name = 'BankError';
|
|
13
15
|
}
|
|
14
16
|
}
|
|
15
17
|
// enc encodes a path segment so an id can never traverse or inject into the URL.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luxfi/bank",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "Typed client for the Lux banking API (/v1/bank) — accounts, payments, cards, crypto, FX, and membership plans.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"typescript": "^5.9.0"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
|
-
"build": "tsc"
|
|
28
|
+
"build": "tsc",
|
|
29
|
+
"test": "node --test test/bank.test.ts"
|
|
29
30
|
}
|
|
30
31
|
}
|