taxtank-core 0.33.63 → 0.33.65

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.
Files changed (24) hide show
  1. package/esm2022/src/lib/collections/bank-account.collection.mjs +4 -1
  2. package/esm2022/src/lib/forms/transaction/work/work-income.form.mjs +7 -4
  3. package/esm2022/src/lib/models/bank/type-loan.const.mjs +2 -2
  4. package/esm2022/src/lib/models/endpoint/endpoints.const.mjs +2 -1
  5. package/esm2022/src/lib/models/holding/holding-sale.mjs +5 -2
  6. package/esm2022/src/lib/models/holding/holding-trade.mjs +10 -1
  7. package/esm2022/src/lib/models/property/property-equity-chart-data.mjs +2 -2
  8. package/esm2022/src/lib/services/http/holding/holding-type.service.mjs +24 -7
  9. package/esm2022/src/lib/services/http/home-office/home-office-claim.service.mjs +3 -1
  10. package/esm2022/src/lib/services/http/rest/rest.service.mjs +2 -2
  11. package/esm2022/src/lib/services/http/user/user-messages.enum.mjs +4 -2
  12. package/esm2022/src/lib/services/http/user/user.service.mjs +9 -2
  13. package/fesm2022/taxtank-core.mjs +57 -12
  14. package/fesm2022/taxtank-core.mjs.map +1 -1
  15. package/package.json +1 -1
  16. package/src/lib/collections/bank-account.collection.d.ts +1 -0
  17. package/src/lib/forms/transaction/work/work-income.form.d.ts +1 -1
  18. package/src/lib/models/holding/holding-sale.d.ts +1 -0
  19. package/src/lib/models/holding/holding-trade.d.ts +4 -0
  20. package/src/lib/services/http/holding/holding-type.service.d.ts +7 -1
  21. package/src/lib/services/http/home-office/home-office-claim.service.d.ts +2 -0
  22. package/src/lib/services/http/rest/rest.service.d.ts +1 -1
  23. package/src/lib/services/http/user/user-messages.enum.d.ts +3 -1
  24. package/src/lib/services/http/user/user.service.d.ts +2 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "0.33.63",
3
+ "version": "0.33.65",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^17.0.0",
@@ -22,6 +22,7 @@ export declare class BankAccountCollection extends Collection<BankAccount> {
22
22
  */
23
23
  getActive(): BankAccountCollection;
24
24
  getLoanAccounts(): BankAccountCollection;
25
+ getLoanAndOffsetAccounts(): BankAccountCollection;
25
26
  getDebitAccounts(): BankAccountCollection;
26
27
  get loans(): LoanCollection;
27
28
  getOpeningBalance(): number;
@@ -4,6 +4,7 @@ import { WorkTransactionForm } from './work-transaction.form';
4
4
  export declare class WorkIncomeForm extends WorkTransactionForm implements IEventListener {
5
5
  constructor(transaction: Transaction, registeredForGst: boolean, allocations: TransactionAllocation[]);
6
6
  listenEvents(): void;
7
+ private watchNetAmount;
7
8
  private watchIncomeSource;
8
9
  private updateTaxValue;
9
10
  watchChartAccounts(): void;
@@ -15,5 +16,4 @@ export declare class WorkIncomeForm extends WorkTransactionForm implements IEven
15
16
  * ie bankTransaction=1000$ with 900$ salary and 100$ tips will create 2 transactions with 900$ and 100$
16
17
  */
17
18
  getAmount(): number;
18
- submit(data?: object): Transaction;
19
19
  }
@@ -12,6 +12,7 @@ export declare class HoldingSale extends AssetSale {
12
12
  isHalfExemption: boolean;
13
13
  ownershipPercent: number;
14
14
  isTaxFree: boolean;
15
+ buyDate: Date;
15
16
  holdingType: HoldingType;
16
17
  get concession(): string;
17
18
  getCostBase(holding: HoldingTrade): number;
@@ -10,6 +10,7 @@ export declare class HoldingTrade extends AbstractModel {
10
10
  price: number;
11
11
  fee: number;
12
12
  type: HoldingTradeTypeEnum;
13
+ externalId?: number;
13
14
  date: Date;
14
15
  user: User;
15
16
  /**
@@ -39,4 +40,7 @@ export declare class HoldingTrade extends AbstractModel {
39
40
  * get current category, in holding we are interested in 3 main categories: stock/crypto/other
40
41
  */
41
42
  category: HoldingTypeCategoryEnum;
43
+ get categoryLabel(): string;
44
+ get name(): string;
45
+ get ticker(): string;
42
46
  }
@@ -2,12 +2,18 @@ import { HoldingType as HoldingTypeBase } from '../../../db/Models';
2
2
  import { HoldingType } from '../../../models';
3
3
  import { RestMethod, RestService } from '../rest';
4
4
  import { HoldingTypeCollection } from '../../../collections';
5
+ import { IEventListener } from '../../../interfaces';
6
+ import { UserRolesEnum } from 'taxtank-core/common';
5
7
  import * as i0 from "@angular/core";
6
- export declare class HoldingTypeService extends RestService<HoldingTypeBase, HoldingType, HoldingTypeCollection> {
8
+ export declare class HoldingTypeService extends RestService<HoldingTypeBase, HoldingType, HoldingTypeCollection> implements IEventListener {
9
+ protected environment: any;
7
10
  modelClass: typeof HoldingType;
8
11
  collectionClass: typeof HoldingTypeCollection;
9
12
  endpointUri: string;
10
13
  disabledMethods: RestMethod[];
14
+ roles: UserRolesEnum[];
15
+ constructor(environment: any);
16
+ listenEvents(): void;
11
17
  static ɵfac: i0.ɵɵFactoryDeclaration<HoldingTypeService, never>;
12
18
  static ɵprov: i0.ɵɵInjectableDeclaration<HoldingTypeService>;
13
19
  }
@@ -1,12 +1,14 @@
1
1
  import { RestMethod, RestService } from '../rest';
2
2
  import { HomeOfficeClaimCollection } from '../../../collections';
3
3
  import { HomeOfficeClaim, HomeOfficeClaimInterface } from '../../../models';
4
+ import { UserRolesEnum } from 'taxtank-core/common';
4
5
  import * as i0 from "@angular/core";
5
6
  export declare class HomeOfficeClaimService extends RestService<HomeOfficeClaimInterface, HomeOfficeClaim, HomeOfficeClaimCollection> {
6
7
  protected endpointUri: string;
7
8
  modelClass: typeof HomeOfficeClaim;
8
9
  collectionClass: typeof HomeOfficeClaimCollection;
9
10
  disabledMethods: RestMethod[];
11
+ roles: UserRolesEnum[];
10
12
  static ɵfac: i0.ɵɵFactoryDeclaration<HomeOfficeClaimService, never>;
11
13
  static ɵprov: i0.ɵɵInjectableDeclaration<HomeOfficeClaimService>;
12
14
  }
@@ -69,7 +69,7 @@ export declare abstract class RestService<BaseModel, Model extends AbstractModel
69
69
  /**
70
70
  * Get data from backend and fill the cache
71
71
  */
72
- fetch(path?: string): Observable<CollectionModel>;
72
+ fetch(path?: string, cache?: boolean): Observable<CollectionModel>;
73
73
  get(path?: string): Observable<CollectionModel>;
74
74
  getBy(path: string, values: any): Observable<CollectionModel>;
75
75
  getFirst(): Observable<Model>;
@@ -3,6 +3,8 @@ export declare enum UserMessagesEnum {
3
3
  USER_DATA_UPDATED = "Data was successfully updated!",
4
4
  CLIENT_DETAILS_UPDATED = "Client details updated",
5
5
  DELETE = "Closing your account will mean you won't be able to access this account again. It will also revoke consent for all banks and delete all transaction data. This can not be undone.",
6
- SHARESIGHT_CONNECTED = "Sharesight connected",
6
+ SHARESIGHT_CONNECTED = "Login success, importing financial data",
7
+ SHARESIGHT_DISCONNECTED = "Sharesight disconnected",
8
+ SHARESIGHT_DISCONNECT_CONFIRM = "Are you sure?",
7
9
  SHARESIGHT_ERROR = "Sharesight connection error"
8
10
  }
@@ -34,7 +34,8 @@ export declare class UserService extends RestService<UserBase, User, Collection<
34
34
  deactivate(user: User): Observable<User>;
35
35
  updatePhoto(photo: FormData): Observable<void>;
36
36
  createBasiq(): Observable<string>;
37
- connectSharesight(code: string): Observable<void>;
37
+ connectSharesight(code: string): Observable<string>;
38
+ disconnectSharesight(): Observable<void>;
38
39
  skipSetupItem(item: AccountSetupItem): Observable<User>;
39
40
  /**
40
41
  * Update cache when user's service subscription is updated