money-lover-app-client 1.0.6 → 1.0.8
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/bundle.js.map +1 -1
- package/dist/client.d.ts +6 -6
- package/dist/commands/categories.d.ts +2 -2
- package/dist/commands/transactions.d.ts +2 -2
- package/dist/commands/wallets.d.ts +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/interfaces/account.d.ts +7 -0
- package/dist/interfaces/category-parent.d.ts +7 -0
- package/dist/interfaces/category.d.ts +3 -2
- package/dist/interfaces/transaction.d.ts +18 -1
- package/dist/interfaces/user-snippet.d.ts +4 -0
- package/dist/interfaces/wallet.d.ts +3 -6
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Category } from "./interfaces/category";
|
|
2
|
+
import { UpsertTransaction } from "./interfaces/transaction";
|
|
3
|
+
import { Wallet } from "./interfaces/wallet";
|
|
4
4
|
declare class MoneyLoverClient {
|
|
5
5
|
private _jwtToken;
|
|
6
6
|
constructor();
|
|
@@ -10,10 +10,10 @@ declare class MoneyLoverClient {
|
|
|
10
10
|
isTokenValid(): boolean;
|
|
11
11
|
getToken(): string | null;
|
|
12
12
|
getUserInfo(): Promise<any>;
|
|
13
|
-
getWallets(): Promise<
|
|
14
|
-
getCategories(walletId: string): Promise<
|
|
13
|
+
getWallets(): Promise<Wallet[]>;
|
|
14
|
+
getCategories(walletId: string): Promise<Category[]>;
|
|
15
15
|
getTransactions(walletId: string, startDate: Date, endDate: Date): Promise<any>;
|
|
16
|
-
addTransaction(transaction:
|
|
16
|
+
addTransaction(transaction: UpsertTransaction): Promise<UpsertTransaction>;
|
|
17
17
|
}
|
|
18
18
|
export default MoneyLoverClient;
|
|
19
19
|
export declare const NewMoneyLoverClient: () => MoneyLoverClient;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import MoneyLoverClient from "../client";
|
|
2
|
-
import {
|
|
3
|
-
declare const getCategories: (client: MoneyLoverClient, walletId: string) => Promise<
|
|
2
|
+
import { Category } from "../interfaces/category";
|
|
3
|
+
declare const getCategories: (client: MoneyLoverClient, walletId: string) => Promise<Category[]>;
|
|
4
4
|
export default getCategories;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import MoneyLoverClient from "../client";
|
|
2
|
-
import {
|
|
2
|
+
import { UpsertTransaction } from "../interfaces/transaction";
|
|
3
3
|
declare const getTransactions: (client: MoneyLoverClient, walletId: string, startDate: Date, endDate: Date) => Promise<any>;
|
|
4
|
-
declare const addTransaction: (client: MoneyLoverClient, transaction:
|
|
4
|
+
declare const addTransaction: (client: MoneyLoverClient, transaction: UpsertTransaction) => Promise<UpsertTransaction>;
|
|
5
5
|
export { getTransactions, addTransaction };
|
package/dist/index.d.ts
CHANGED
|
@@ -4,9 +4,9 @@ import login from "./commands/login";
|
|
|
4
4
|
import logout from "./commands/logout";
|
|
5
5
|
import { addTransaction, getTransactions } from "./commands/transactions";
|
|
6
6
|
import getWallets from "./commands/wallets";
|
|
7
|
-
import {
|
|
7
|
+
import { Category } from "./interfaces/category";
|
|
8
8
|
import { CategoryType } from "./interfaces/category-type";
|
|
9
|
-
import {
|
|
9
|
+
import { Transaction, UpsertTransaction } from "./interfaces/transaction";
|
|
10
10
|
import { UserProfile } from "./interfaces/user-profile";
|
|
11
|
-
import {
|
|
12
|
-
export { MoneyLoverClient, NewMoneyLoverClient, getCategories, login, logout, getTransactions, addTransaction, getWallets, CategoryType,
|
|
11
|
+
import { Wallet } from "./interfaces/wallet";
|
|
12
|
+
export { MoneyLoverClient, NewMoneyLoverClient, getCategories, login, logout, getTransactions, addTransaction, getWallets, CategoryType, Category, Transaction, UpsertTransaction, UserProfile, Wallet, };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { CategoryParent } from "./category-parent";
|
|
2
|
+
export interface Category {
|
|
2
3
|
/** Internal unique identifier for the specific item */
|
|
3
4
|
_id: string;
|
|
4
5
|
/** Display name (e.g., "Tejas") */
|
|
@@ -20,6 +21,6 @@ export interface MoneyLoverCategory {
|
|
|
20
21
|
/** Duplicate of _id, often used for legacy or specific API compatibility */
|
|
21
22
|
id: string;
|
|
22
23
|
/** Optional parent category ID for hierarchical categorization */
|
|
23
|
-
parent?:
|
|
24
|
+
parent?: CategoryParent;
|
|
24
25
|
exclude_accounts: string[];
|
|
25
26
|
}
|
|
@@ -1,7 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
import { Account } from "./account";
|
|
2
|
+
import { Category } from "./category";
|
|
3
|
+
import { UserSnippet } from "./user-snippet";
|
|
4
|
+
export interface UpsertTransaction {
|
|
2
5
|
account: string;
|
|
3
6
|
category: string;
|
|
4
7
|
amount: string;
|
|
5
8
|
note: string;
|
|
6
9
|
date: Date;
|
|
7
10
|
}
|
|
11
|
+
export interface Transaction {
|
|
12
|
+
_id: string;
|
|
13
|
+
note: string;
|
|
14
|
+
account: Account;
|
|
15
|
+
category: Category;
|
|
16
|
+
amount: number;
|
|
17
|
+
displayDate: string;
|
|
18
|
+
with: any[];
|
|
19
|
+
campaign: any[];
|
|
20
|
+
lastEditBy: UserSnippet;
|
|
21
|
+
exclude_report: boolean;
|
|
22
|
+
images: any[];
|
|
23
|
+
createdAt: string;
|
|
24
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { UserSnippet } from "./user-snippet";
|
|
2
|
+
export interface Wallet {
|
|
2
3
|
_id: string;
|
|
3
4
|
name: string;
|
|
4
5
|
currency_id: number;
|
|
@@ -9,16 +10,12 @@ export interface MoneyLoverWallet {
|
|
|
9
10
|
account_type: number;
|
|
10
11
|
exclude_total: boolean;
|
|
11
12
|
icon: string;
|
|
12
|
-
listUser:
|
|
13
|
+
listUser: UserSnippet[];
|
|
13
14
|
createdAt: string;
|
|
14
15
|
updateAt: string;
|
|
15
16
|
isDelete: boolean;
|
|
16
17
|
balance: MoneyLoverBankTransaction[];
|
|
17
18
|
}
|
|
18
|
-
export interface MoneyLoverObjectUser {
|
|
19
|
-
_id: string;
|
|
20
|
-
email: string;
|
|
21
|
-
}
|
|
22
19
|
export interface MoneyLoverBankTransaction {
|
|
23
20
|
date: string;
|
|
24
21
|
valueDate: string;
|