money-lover-app-client 1.0.0 → 1.0.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/client.d.ts CHANGED
@@ -3,9 +3,10 @@ import { MoneyLoverTransaction } from "./interfaces/transaction";
3
3
  import { MoneyLoverWallet } from "./interfaces/wallet";
4
4
  declare class MoneyLoverClient {
5
5
  private _jwtToken;
6
- constructor(jwtToken?: string | null);
6
+ constructor();
7
7
  private _postRequest;
8
8
  static getToken(email: string, password: string): Promise<any>;
9
+ setToken(token: string): void;
9
10
  isTokenValid(): boolean;
10
11
  getUserInfo(): Promise<any>;
11
12
  getWallets(): Promise<MoneyLoverWallet[]>;
@@ -14,3 +15,4 @@ declare class MoneyLoverClient {
14
15
  addTransaction(transaction: MoneyLoverTransaction): Promise<any>;
15
16
  }
16
17
  export default MoneyLoverClient;
18
+ export declare const NewMoneyLoverClient: () => MoneyLoverClient;
@@ -1,3 +1,4 @@
1
+ import MoneyLoverClient from "../client";
1
2
  import { UserProfile } from "../interfaces/user-profile";
2
- declare const login: (username: string, password: string) => Promise<UserProfile | null>;
3
+ declare const login: (client: MoneyLoverClient, username: string, password: string) => Promise<UserProfile | null>;
3
4
  export default login;
@@ -1,3 +1,3 @@
1
1
  import MoneyLoverClient from "../client";
2
- declare const getWallets: (client: MoneyLoverClient) => Promise<import("../interfaces/wallet").MoneyLoverWallet[]>;
2
+ declare const getWallets: (client: MoneyLoverClient) => Promise<import("..").MoneyLoverWallet[]>;
3
3
  export default getWallets;
package/dist/index.d.ts CHANGED
@@ -0,0 +1,12 @@
1
+ import MoneyLoverClient, { NewMoneyLoverClient } from "./client";
2
+ import getCategories from "./commands/categories";
3
+ import login from "./commands/login";
4
+ import logout from "./commands/logout";
5
+ import { addTransaction, getTransactions } from "./commands/transactions";
6
+ import getWallets from "./commands/wallets";
7
+ import { MoneyLoverCategory } from "./interfaces/category";
8
+ import { CategoryType } from "./interfaces/category-type";
9
+ import { MoneyLoverTransaction } from "./interfaces/transaction";
10
+ import { UserProfile } from "./interfaces/user-profile";
11
+ import { MoneyLoverWallet } from "./interfaces/wallet";
12
+ export { MoneyLoverClient, NewMoneyLoverClient, getCategories, login, logout, getTransactions, addTransaction, getWallets, CategoryType, MoneyLoverCategory, MoneyLoverTransaction, UserProfile, MoneyLoverWallet, };
@@ -2,3 +2,4 @@ declare enum CategoryType {
2
2
  INCOME = 1,
3
3
  EXPENSE = 2
4
4
  }
5
+ export { CategoryType };
package/package.json CHANGED
@@ -1,36 +1,36 @@
1
- {
2
- "name": "money-lover-app-client",
3
- "version": "1.0.0",
4
- "main": "dist/bundle.js",
5
- "types": "dist/index.d.ts",
6
- "scripts": {
7
- "build": "rollup -c",
8
- "prepublishOnly": "npm run build"
9
- },
10
- "repository": {
11
- "type": "git",
12
- "url": "git+https://github.com/Nexo-Technology/money-lover-client.git"
13
- },
14
- "keywords": [],
15
- "author": "",
16
- "license": "ISC",
17
- "type": "commonjs",
18
- "bugs": {
19
- "url": "https://github.com/Nexo-Technology/money-lover-client/issues"
20
- },
21
- "homepage": "https://github.com/Nexo-Technology/money-lover-client#readme",
22
- "devDependencies": {
23
- "@rollup/plugin-commonjs": "^29.0.0",
24
- "@rollup/plugin-node-resolve": "^16.0.3",
25
- "@rollup/plugin-typescript": "^12.3.0",
26
- "@types/jsonwebtoken": "^9.0.10",
27
- "@types/node": "^25.0.3",
28
- "rollup": "^4.54.0",
29
- "ts-node": "^10.9.2",
30
- "typescript": "^5.9.3"
31
- },
32
- "dependencies": {
33
- "jsonwebtoken": "^9.0.3",
34
- "tslib": "^2.8.1"
35
- }
36
- }
1
+ {
2
+ "name": "money-lover-app-client",
3
+ "version": "1.0.2",
4
+ "main": "dist/bundle.js",
5
+ "types": "dist/index.d.ts",
6
+ "scripts": {
7
+ "build": "rollup -c",
8
+ "prepublishOnly": "npm run build"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/Nexo-Technology/money-lover-client.git"
13
+ },
14
+ "keywords": [],
15
+ "author": "",
16
+ "license": "ISC",
17
+ "type": "commonjs",
18
+ "bugs": {
19
+ "url": "https://github.com/Nexo-Technology/money-lover-client/issues"
20
+ },
21
+ "homepage": "https://github.com/Nexo-Technology/money-lover-client#readme",
22
+ "devDependencies": {
23
+ "@rollup/plugin-commonjs": "^29.0.0",
24
+ "@rollup/plugin-node-resolve": "^16.0.3",
25
+ "@rollup/plugin-typescript": "^12.3.0",
26
+ "@types/jsonwebtoken": "^9.0.10",
27
+ "@types/node": "^25.0.3",
28
+ "rollup": "^4.54.0",
29
+ "ts-node": "^10.9.2",
30
+ "typescript": "^5.9.3"
31
+ },
32
+ "dependencies": {
33
+ "jsonwebtoken": "^9.0.3",
34
+ "tslib": "^2.8.1"
35
+ }
36
+ }