taxtank-core 1.0.39 → 1.0.41

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 (40) hide show
  1. package/README.md +5 -5
  2. package/fesm2022/taxtank-core-common.mjs +1 -1
  3. package/fesm2022/taxtank-core-common.mjs.map +1 -1
  4. package/fesm2022/taxtank-core.mjs +386 -219
  5. package/fesm2022/taxtank-core.mjs.map +1 -1
  6. package/package.json +1 -1
  7. package/public-api.d.ts +2 -0
  8. package/src/lib/collections/account-setup-item.collection.d.ts +5 -1
  9. package/src/lib/collections/bank-account.collection.d.ts +1 -1
  10. package/src/lib/collections/subscription/service-subscription.collection.d.ts +6 -0
  11. package/src/lib/collections/tax-summary/tax-return-categories.const.d.ts +3 -0
  12. package/src/lib/db/Enums/index.d.ts +1 -0
  13. package/src/lib/db/Enums/setup-item-type.enum.d.ts +9 -2
  14. package/src/lib/db/Enums/tax-return/tax-return-category-list.enum.d.ts +4 -3
  15. package/src/lib/db/Enums/tax-summary-section.enum.d.ts +4 -3
  16. package/src/lib/db/Enums/youtube-videos.enum.d.ts +18 -0
  17. package/src/lib/db/Models/property/property.d.ts +1 -0
  18. package/src/lib/db/Models/setup-item.d.ts +4 -1
  19. package/src/lib/db/Models/sole/sole-business.d.ts +0 -1
  20. package/src/lib/forms/abstract.form.d.ts +3 -0
  21. package/src/lib/forms/transaction/holding/holding-expense.form.d.ts +8 -0
  22. package/src/lib/forms/transaction/index.d.ts +1 -0
  23. package/src/lib/models/account-setup/account-setup-item-status.enum.d.ts +5 -0
  24. package/src/lib/models/account-setup/account-setup-item.d.ts +5 -12
  25. package/src/lib/models/account-setup/account-setup-items.enum.d.ts +31 -11
  26. package/src/lib/models/account-setup/index.d.ts +3 -0
  27. package/src/lib/models/index.d.ts +1 -0
  28. package/src/lib/models/tax-summary/tax-summary.d.ts +5 -5
  29. package/src/lib/models/user/user.d.ts +2 -1
  30. package/src/lib/resolvers/business/business.resolver.d.ts +11 -0
  31. package/src/lib/resolvers/business/sole-details.resolver.d.ts +11 -0
  32. package/src/lib/resolvers/index.d.ts +2 -0
  33. package/src/lib/services/account-setup/account-setup.service.d.ts +33 -15
  34. package/src/lib/services/http/firm/firm.service.d.ts +0 -4
  35. package/src/lib/services/http/loan/borrowing-expense/borrowing-expense.service.d.ts +2 -1
  36. package/src/lib/services/http/rest/rest-old.service.d.ts +1 -0
  37. package/src/lib/services/http/rest/rest.service.d.ts +1 -0
  38. package/src/lib/services/http/setup-item/setup-item.service.d.ts +1 -1
  39. package/src/lib/services/http/subscription/service-subscription/subscription.service.d.ts +1 -0
  40. package/src/lib/services/http/user/user.service.d.ts +3 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "1.0.39",
3
+ "version": "1.0.41",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^19.0.2",
package/public-api.d.ts CHANGED
@@ -37,6 +37,7 @@ export * from './src/lib/db/Enums/depreciation-write-off-amount.enum';
37
37
  export * from './src/lib/db/Enums/firm/firm-type.enum';
38
38
  export * from './src/lib/db/Enums/income-source';
39
39
  export * from './src/lib/db/Enums/invite-status.enum';
40
+ export * from './src/lib/db/Enums/youtube-videos.enum';
40
41
  export * from './src/lib/db/Enums/bank/loan';
41
42
  export * from './src/lib/db/Enums/phone-type.enum';
42
43
  export * from './src/lib/db/Enums/property/property-depreciation-calculation.enum';
@@ -156,6 +157,7 @@ export * from './src/lib/models/user-event/user-event-type';
156
157
  * Services
157
158
  */
158
159
  export * from './src/lib/services';
160
+ export * from './src/lib/resolvers';
159
161
  /**
160
162
  * Interfaces
161
163
  */
@@ -1,6 +1,10 @@
1
- import { AccountSetupItem } from '../models/account-setup/account-setup-item';
1
+ import { AccountSetupItem } from '../models';
2
2
  import { Collection } from './collection';
3
+ import { User } from '../models';
3
4
  export declare class AccountSetupItemCollection extends Collection<AccountSetupItem> {
4
5
  constructor(items: AccountSetupItem[]);
5
6
  isCompleted(): boolean;
7
+ getByUser(user: User): this;
8
+ getScore(): number;
9
+ setUrlId(id: string): void;
6
10
  }
@@ -31,7 +31,7 @@ export declare class BankAccountCollection extends Collection<BankAccount> {
31
31
  /**
32
32
  * Get Collection of bank accounts by tank type
33
33
  */
34
- getByTankType(tankType: TankTypeEnum): BankAccountCollection;
34
+ getByTankType(tankType?: TankTypeEnum): BankAccountCollection;
35
35
  /**
36
36
  * Get list of all bank account properties
37
37
  */
@@ -10,6 +10,11 @@ export declare class ServiceSubscriptionCollection extends Collection<ServiceSub
10
10
  getExpiredTrials(): this;
11
11
  getExpiredAfter(date?: Date): this;
12
12
  getPaid(): this;
13
+ getRoles(): UserRolesEnum[];
14
+ /**
15
+ * search roles including hierarchy
16
+ */
17
+ hasRoles(roles: UserRolesEnum | UserRolesEnum[]): boolean;
13
18
  getActivePaid(): ServiceSubscription;
14
19
  /**
15
20
  * @TODO vik remove trials replaced by paid item
@@ -19,5 +24,6 @@ export declare class ServiceSubscriptionCollection extends Collection<ServiceSub
19
24
  findByProduct(product: ServiceProduct): ServiceSubscription;
20
25
  filterByProduct(product: ServiceProduct): this;
21
26
  filterByRole(role: UserRolesEnum): this;
27
+ findByRole(role: UserRolesEnum): ServiceSubscription;
22
28
  hasPropertyTank(): boolean;
23
29
  }
@@ -1,4 +1,7 @@
1
1
  import { TaxReturnCategoryListEnum } from '../../db/Enums';
2
+ /**
3
+ * @TODO vik check (tax_return_category/tax_return_item/chart_accounts)
4
+ */
2
5
  export declare const TAX_RETURN_CATEGORIES: {
3
6
  [key: string]: {
4
7
  [key: string]: TaxReturnCategoryListEnum[];
@@ -10,3 +10,4 @@ export * from './subscription';
10
10
  export * from './user';
11
11
  export * from './sole';
12
12
  export * from './home-office';
13
+ export * from './setup-item-type.enum';
@@ -1,4 +1,11 @@
1
1
  export declare enum SetupItemTypeEnum {
2
- CLIENT = 1,
3
- EMPLOYEE = 2
2
+ EMPLOYEE = 0,
3
+ WORK = 1,
4
+ PROPERTIES = 2,
5
+ PROPERTY = 3,
6
+ BUSINESSES = 4,
7
+ HOLDING = 5,
8
+ BANK_ACCOUNTS = 6,
9
+ BANK_ACCOUNT = 7,
10
+ BUSINESS = 8
4
11
  }
@@ -12,13 +12,10 @@ export declare enum TaxReturnCategoryListEnum {
12
12
  DIVIDENDS = 6,
13
13
  SHARE_SCHEMES = 35,
14
14
  GROSS_RENT = 8,
15
- PARTNERSHIPS_TRUSTS = 13,
16
15
  PARTNERSHIPS = 36,
17
16
  TRUSTS = 37,
18
17
  PSI_SBE_INCOME = 14,
19
- SOLE_TRADER_BUSINESS_INCOME = 38,
20
18
  CAPITAL_GAINS = 15,
21
- FOREIGN_SOURCE_INCOME = 16,
22
19
  BONUSES_FROM_LIFE_INSURANCE = 17,
23
20
  FORESTRY_MANAGED_INVESTMENT_SCHEMES = 39,
24
21
  OTHER_INCOME = 40,
@@ -45,6 +42,7 @@ export declare enum TaxReturnCategoryListEnum {
45
42
  DEPRECIATION_EXPENSES = 56,
46
43
  MOTOR_VEHICLE_EXPENSES = 57,
47
44
  ALL_OTHER_EXPENSES = 58,
45
+ WORK_RELATED_DEPRECIATION = 69,
48
46
  GROSS_TAX_PAYABLE = 19,
49
47
  TAX_ON_TAXABLE_INCOME = 20,
50
48
  MEDICARE = 21,
@@ -60,5 +58,8 @@ export declare enum TaxReturnCategoryListEnum {
60
58
  TAX_PAYABLE = 28,
61
59
  BUSINESS_INCOME_OR_LOSS = 59,
62
60
  DEFERRED_BUSINESS_LOSSES = 60,
61
+ TAX_OFFSET_LOW = 61,
62
+ tAX_OFFSET_MIDDLE = 62,
63
+ TAX_OFFSET_SOLE = 63,
63
64
  DEFERRED_BUSINESS_LOSSES_FROM_PRIOR_YEAR = 64
64
65
  }
@@ -1,7 +1,8 @@
1
1
  export declare enum TaxSummarySectionEnum {
2
2
  WORK_TANK = 1,
3
3
  PROPERTY_TANK = 2,
4
- OTHER_TANK = 3,
5
- SOLE_TANK = 4,
6
- SUMMARY = 5
4
+ HOLDINGS_TANK = 3,
5
+ CAPITAL_GAINS = 4,
6
+ SOLE_TANK = 5,
7
+ SUMMARY = 6
7
8
  }
@@ -0,0 +1,18 @@
1
+ export declare enum YoutubeVideosEnum {
2
+ HOLDING_ONBOARDING = "r3RhObELk-E",
3
+ MONEY_ONBOARDING = "E9NU14ndjhc",
4
+ PROPERTY_ONBOARDING = "llUV98-EMdI",
5
+ SOLE_ONBOARDING = "rqfTQFGwkUM",
6
+ WORK_ONBOARDING = "QEKolzS1B0U",
7
+ PROPERTY_RENTAL = "MPkB0NBd-9E",
8
+ PROPERTY_DEPRECIATION = "_34lK9ooFzc",
9
+ VEHICLE_CLAIM = "4-6WaM83cw0",
10
+ SOLE_DEPRECIATION = "Bw3tx4miFF8",
11
+ SOLE_HOME_OFFICE = "fF8_kJHEKRE",
12
+ WORK_DEPRECIATION = "gNa9M4xovuI",
13
+ WORK_HOME_OFFICE = "qrQu4Yl72bU",
14
+ BANK_FEEDS = "meQmpw7ZY7c",
15
+ BANK_ACCOUNT_TRANSACTION = "meQmpw7ZY7c",
16
+ BANK_ALLOCATION_RULE = "meQmpw7ZY7c",
17
+ ALLOCATE_TRANSACTION = "meQmpw7ZY7c"
18
+ }
@@ -42,4 +42,5 @@ export declare class Property extends ObservableModel {
42
42
  depreciations?: Depreciation[];
43
43
  file: File;
44
44
  corelogicLastRequest: Date;
45
+ get capitalCosts(): number;
45
46
  }
@@ -1,4 +1,4 @@
1
- import { SetupItemTypeEnum } from '../Enums/setup-item-type.enum';
1
+ import { SetupItemTypeEnum } from '../Enums';
2
2
  import { UserRolesEnum } from 'taxtank-core/common';
3
3
  import { AbstractModel } from './abstract-model';
4
4
  export declare class SetupItem extends AbstractModel {
@@ -7,5 +7,8 @@ export declare class SetupItem extends AbstractModel {
7
7
  description?: string;
8
8
  url?: string;
9
9
  urlFragment?: string;
10
+ isRequired?: boolean;
11
+ order?: number;
12
+ score?: number;
10
13
  roles?: UserRolesEnum;
11
14
  }
@@ -16,7 +16,6 @@ export declare class SoleBusiness extends ObservableModel {
16
16
  name?: string;
17
17
  description?: string;
18
18
  website?: string;
19
- logo?: string;
20
19
  deletedAt?: Date;
21
20
  user?: User;
22
21
  activity?: SoleBusinessActivity;
@@ -61,6 +61,9 @@ export declare abstract class AbstractForm<Model, Controls extends ControlsInter
61
61
  * upgraded version of patchValue to skip duplicated changes
62
62
  */
63
63
  patchField(name: string, value: any): void;
64
+ patch(fields: {
65
+ [key: string]: any;
66
+ }): void;
64
67
  fieldChanged(name: string): boolean;
65
68
  addValidators(validators: ValidatorFn | ValidatorFn[], controls?: AbstractControl[]): void;
66
69
  removeValidators(validators: ValidatorFn | ValidatorFn[], controls?: AbstractControl[]): void;
@@ -0,0 +1,8 @@
1
+ import { Transaction, TransactionAllocation } from '../../../models';
2
+ import { AbstractControl } from '@angular/forms';
3
+ import { TransactionForm } from '../transaction.form';
4
+ export declare class HoldingExpenseForm extends TransactionForm {
5
+ constructor(transaction: Transaction, registeredForGst: boolean, allocations: TransactionAllocation[], controls?: {
6
+ [key: string]: AbstractControl;
7
+ });
8
+ }
@@ -5,4 +5,5 @@ export * from './sole/sole-income.form';
5
5
  export * from './work/work-income.form';
6
6
  export * from './work/work-expense.form';
7
7
  export * from './holding/holding-income.form';
8
+ export * from './holding/holding-expense.form';
8
9
  export * from './transaction-base-filter.form';
@@ -0,0 +1,5 @@
1
+ export declare enum AccountSetupItemStatusEnum {
2
+ PENDING = 1,
3
+ ACHIEVED = 2,
4
+ SKIPPED = 3
5
+ }
@@ -1,15 +1,8 @@
1
1
  import { SetupItem } from '../../db/Models/setup-item';
2
2
  export declare class AccountSetupItem extends SetupItem {
3
- isCompleted: boolean;
4
- get isSalary(): boolean;
5
- get isOtherIncome(): boolean;
6
- get isProperty(): boolean;
7
- get isBankFeeds(): boolean;
8
- get isWorkLogbook(): boolean;
9
- get isTransactionAllocate(): boolean;
10
- get isSoleBusiness(): boolean;
11
- get isHoldings(): boolean;
12
- get isFirmDetails(): boolean;
13
- get isInviteTeam(): boolean;
14
- get isInviteClients(): boolean;
3
+ status: number;
4
+ get isPending(): boolean;
5
+ get isAchieved(): boolean;
6
+ get isCompleted(): boolean;
7
+ get isSkipped(): boolean;
15
8
  }
@@ -1,17 +1,37 @@
1
1
  /**
2
- * Enum list of all possible account setup items ids. Using with [ACCOUNT_SETUP_ITEMS]{@link ACCOUNT_SETUP_ITEMS}
3
- * @TODO Vik/Nikita: Do we need to generate it from backend? If some ids changed?
2
+ * TODO remove
4
3
  */
5
4
  export declare enum AccountSetupItemsEnum {
6
- SALARY = 1,
7
- OTHER_INCOME = 2,
5
+ FIRM_DETAILS = 9,
6
+ FIRM_EMPLOYEES = 10,
7
+ FIRM_CLIENTS = 11,
8
+ WORK_SALARY = 1,
9
+ WORK_OTHER_INCOME = 2,
10
+ WORK_VEHICLE_CLAIM = 5,
11
+ WORK_HOME_OFFICE = 13,
12
+ WORK_BANK_ACCOUNT = 14,
13
+ WORK_DEPRECIATION = 15,
8
14
  PROPERTY = 3,
9
- BANK_FEEDS = 4,
10
- WORK_LOGBOOK = 5,
11
- TRANSACTION_ALLOCATE = 6,
15
+ PROPERTIES = 29,
16
+ PROPERTIES_BANK_ACCOUNT = 30,
17
+ PROPERTY_CAPITAL_COST = 17,
18
+ PROPERTY_RENT_INCOME = 18,
19
+ PROPERTY_DEPRECIATION = 19,
20
+ PROPERTY_CO_OWNER = 20,
12
21
  SOLE_BUSINESS = 7,
13
- HOLDINGS = 8,
14
- FIRM_DETAILS = 9,
15
- INVITE_TEAM = 10,
16
- INVITE_CLIENTS = 11
22
+ SOLE_BUSINESSES = 33,
23
+ SOLE_VEHICLE_CLAIM = 12,
24
+ SOLE_HOME_OFFICE = 21,
25
+ SOLE_DEPRECIATION = 22,
26
+ SOLE_BANK_ACCOUNT = 23,
27
+ SOLE_LOGO = 16,
28
+ HOLDING_TRADE = 8,
29
+ HOLDING_INTEGRATION = 25,
30
+ HOLDING_REPORTS = 36,
31
+ BANK_CONNECTION = 4,
32
+ BANK_ACCOUNT = 26,
33
+ BANK_TRANSACTION = 24,
34
+ BANK_ALLOCATION = 6,
35
+ BANK_RULE = 27,
36
+ BANK_BORROWING_EXPENSE = 28
17
37
  }
@@ -0,0 +1,3 @@
1
+ export * from './account-setup-item';
2
+ export * from './account-setup-items.enum';
3
+ export * from './account-setup-item-status.enum';
@@ -29,3 +29,4 @@ export * from './firm';
29
29
  export * from './home-office';
30
30
  export * from './aussie';
31
31
  export * from './date-range';
32
+ export * from './account-setup';
@@ -8,7 +8,7 @@ import { SoleBusiness } from '../sole';
8
8
  export declare class TaxSummary {
9
9
  work: TaxSummarySection;
10
10
  property: TaxSummarySection;
11
- other: TaxSummarySection;
11
+ holdings: TaxSummarySection;
12
12
  sole: TaxSummarySection;
13
13
  summary: TaxSummarySection;
14
14
  projectedTaxPosition: number;
@@ -40,15 +40,15 @@ export declare class TaxSummary {
40
40
  */
41
41
  get propertyNetTotal(): number;
42
42
  /**
43
- * Other Net Cash = gross income – expenses – tax withheld - tax instalments
43
+ * Holdings Net Cash = gross income – expenses – tax withheld - tax instalments
44
44
  * https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/217677990/Dashboard+Main
45
45
  */
46
- get otherNetCash(): number;
46
+ get holdingsNetCash(): number;
47
47
  /**
48
- * Other Net Total = Gross income - expenses + tax offsets + tax instalments + franking credits
48
+ * Holding Net Total = Gross income - expenses + tax offsets + tax instalments + franking credits
49
49
  * https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/217677990/Dashboard+Main
50
50
  */
51
- get otherNetTotal(): number;
51
+ get holdingsNetTotal(): number;
52
52
  /**
53
53
  * Sole Net Cash = gross income – expenses
54
54
  * https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/217677990/Dashboard+Main
@@ -7,7 +7,7 @@ import { Phone } from '../phone/phone';
7
7
  import { ServiceSubscription } from '../service-subscription';
8
8
  import { SoleDetails } from '../sole';
9
9
  import { AppFile } from '../file';
10
- import { AccountSetupItem } from '../account-setup/account-setup-item';
10
+ import { AccountSetupItem } from '../account-setup';
11
11
  import { TankTypeEnum } from '../../db/Enums/tank-type.enum';
12
12
  export declare class User extends BaseUser {
13
13
  subscriptions: ServiceSubscription[];
@@ -29,6 +29,7 @@ export declare class User extends BaseUser {
29
29
  *
30
30
  */
31
31
  get position(): string;
32
+ addRoles(roles?: UserRolesEnum[]): void;
32
33
  /**
33
34
  * search roles including hierarchy
34
35
  */
@@ -0,0 +1,11 @@
1
+ import { Observable } from 'rxjs';
2
+ import { SoleDetails } from '../../models';
3
+ import { SoleDetailsService } from '../../services';
4
+ import * as i0 from "@angular/core";
5
+ export declare class BusinessResolver {
6
+ private soleDetailsService;
7
+ constructor(soleDetailsService: SoleDetailsService);
8
+ resolve(): Observable<SoleDetails>;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<BusinessResolver, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<BusinessResolver>;
11
+ }
@@ -0,0 +1,11 @@
1
+ import { Observable } from 'rxjs';
2
+ import { SoleDetails } from '../../models';
3
+ import { SoleDetailsService } from '../../services';
4
+ import * as i0 from "@angular/core";
5
+ export declare class SoleDetailsResolver {
6
+ private soleDetails;
7
+ constructor(soleDetails: SoleDetailsService);
8
+ resolve(): Observable<SoleDetails>;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<SoleDetailsResolver, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<SoleDetailsResolver>;
11
+ }
@@ -0,0 +1,2 @@
1
+ export * from './business/business.resolver';
2
+ export * from './business/sole-details.resolver';
@@ -1,8 +1,7 @@
1
- import { BankAccountService, ClientInviteService, ClientMovementService, EmployeeInviteService, EmployeeService, FirmService, HoldingTradeService, IncomeSourceService, PropertyService, SoleBusinessService, TransactionAllocationService, TransactionService, UserService, VehicleClaimService } from '../http';
2
- import { User } from '../../models';
1
+ import { BankAccount, Property, SoleBusiness, User } from '../../models';
2
+ import { AllocationRuleService, BankAccountService, BankConnectionService, BankTransactionService, ClientInviteService, ClientMovementService, DepreciationService, EmployeeInviteService, EmployeeService, FirmService, HoldingTradeService, HomeOfficeClaimService, IncomeSourceService, LoanService, PropertyService, PropertyShareService, SharesightDetailsService, SoleBusinessService, TransactionAllocationService, TransactionService, UserService, VehicleClaimService } from '../http';
3
3
  import { AccountSetupItemCollection } from '../../collections';
4
4
  import { Observable } from 'rxjs';
5
- import { SetupItemTypeEnum } from '../../db/Enums/setup-item-type.enum';
6
5
  import { SetupItemService } from '../http/setup-item/setup-item.service';
7
6
  import * as i0 from "@angular/core";
8
7
  /**
@@ -13,11 +12,17 @@ export declare class AccountSetupService {
13
12
  private setupItemService;
14
13
  private propertyService;
15
14
  private incomeSourceService;
15
+ private bankConnectionService;
16
16
  private bankAccountsService;
17
+ private bankTransactionService;
18
+ private loanService;
19
+ private allocationRuleService;
17
20
  private transactionAllocationService;
18
21
  private vehicleClaimService;
22
+ private homeOfficeClaimService;
19
23
  private transactionService;
20
- private soleBusinessService;
24
+ private depreciationService;
25
+ private businessService;
21
26
  private holdingService;
22
27
  private userService;
23
28
  private clientMovementService;
@@ -25,32 +30,45 @@ export declare class AccountSetupService {
25
30
  private employeeService;
26
31
  private employeeInviteService;
27
32
  private firmService;
33
+ private sharesightDetailsService;
34
+ private propertyShareService;
28
35
  items: AccountSetupItemCollection;
29
36
  user: User;
30
- constructor(setupItemService: SetupItemService, propertyService: PropertyService, incomeSourceService: IncomeSourceService, bankAccountsService: BankAccountService, transactionAllocationService: TransactionAllocationService, vehicleClaimService: VehicleClaimService, transactionService: TransactionService, soleBusinessService: SoleBusinessService, holdingService: HoldingTradeService, userService: UserService, clientMovementService: ClientMovementService, clientInviteService: ClientInviteService, employeeService: EmployeeService, employeeInviteService: EmployeeInviteService, firmService: FirmService);
37
+ constructor(setupItemService: SetupItemService, propertyService: PropertyService, incomeSourceService: IncomeSourceService, bankConnectionService: BankConnectionService, bankAccountsService: BankAccountService, bankTransactionService: BankTransactionService, loanService: LoanService, allocationRuleService: AllocationRuleService, transactionAllocationService: TransactionAllocationService, vehicleClaimService: VehicleClaimService, homeOfficeClaimService: HomeOfficeClaimService, transactionService: TransactionService, depreciationService: DepreciationService, businessService: SoleBusinessService, holdingService: HoldingTradeService, userService: UserService, clientMovementService: ClientMovementService, clientInviteService: ClientInviteService, employeeService: EmployeeService, employeeInviteService: EmployeeInviteService, firmService: FirmService, sharesightDetailsService: SharesightDetailsService, propertyShareService: PropertyShareService);
31
38
  /**
32
39
  * Get list of account setup items for current user/firm
33
40
  */
34
- get(type: SetupItemTypeEnum): Observable<AccountSetupItemCollection>;
35
- getClientItems$(): Observable<AccountSetupItemCollection>;
36
- getFirmItems$(): Observable<AccountSetupItemCollection>;
41
+ get(property?: Property, business?: SoleBusiness, bankAccount?: BankAccount): Observable<AccountSetupItemCollection>;
42
+ setItemsStatus(property?: Property, business?: SoleBusiness, bankAccount?: BankAccount): Observable<AccountSetupItemCollection>;
37
43
  /**
38
44
  * Check and update isCompleted flag for passed item
39
45
  */
40
46
  private setItemStatus;
47
+ private getAllocations;
48
+ private getTransactions;
49
+ private getCoOwners;
41
50
  /**
42
- * @TODO Alex: work with collection when services refactored
43
- * @TODO Vik: waiting for income sources refactoring
51
+ * AccountSetupItemsEnum.FIRM_CLIENTS completed when client invites sent or accepted
44
52
  */
45
- private getIncomeSources;
53
+ private getClients;
54
+ /**
55
+ * AccountSetupItemsEnum.FIRM_EMPLOYEES completed when employee invites sent or accepted
56
+ */
57
+ private getEmployees;
46
58
  /**
47
- * Show logbook item when user has at least 1 vehicle transaction
59
+ * AccountSetupItemsEnum.FIRM_DETAILS when firm data filled
48
60
  */
49
- private getLogbookItem;
61
+ private getFirms;
50
62
  /**
51
- * Hide bank feeds item when user has only holding tank
63
+ * @TODO Alex: work with collection when services refactored
64
+ * @TODO Vik: waiting for income sources refactoring
52
65
  */
53
- private getBankFeedsItem;
66
+ private getIncomeSources;
67
+ private getVehicleClaims;
68
+ private getHomeOfficeClaims;
69
+ private getBankAccounts;
70
+ private getDepreciations;
71
+ private getSharesightDetails;
54
72
  static ɵfac: i0.ɵɵFactoryDeclaration<AccountSetupService, never>;
55
73
  static ɵprov: i0.ɵɵInjectableDeclaration<AccountSetupService>;
56
74
  }
@@ -9,10 +9,6 @@ export declare class FirmService {
9
9
  firm: Firm;
10
10
  firmSubject: ReplaySubject<Firm>;
11
11
  constructor(http: HttpClient, environment: any);
12
- /**
13
- * Register new firm
14
- * @param data: firm and firm owner data to register
15
- */
16
12
  register(data: Firm): Observable<Firm>;
17
13
  get(): Observable<Firm>;
18
14
  update(firm: Firm): Observable<void>;
@@ -2,6 +2,7 @@ import { Observable, ReplaySubject } from 'rxjs';
2
2
  import { HttpClient } from '@angular/common/http';
3
3
  import { BorrowingExpense } from '../../../../models/borrowing-expense/borrowing-expense';
4
4
  import { Loan } from '../../../../models/loan/loan';
5
+ import { BorrowingExpenseLoan } from '../../../../models/borrowing-expense/borrowing-expense-loan';
5
6
  import * as i0 from "@angular/core";
6
7
  /**
7
8
  * @TODO Alex (TT-1777): Refactor with rest service
@@ -16,7 +17,7 @@ export declare class BorrowingExpenseService {
16
17
  * Get borrowing expenses
17
18
  */
18
19
  get(): Observable<BorrowingExpense[]>;
19
- getLoanBorrowingExpenses(loan?: Loan): Observable<any>;
20
+ getLoanBorrowingExpenses(loan?: Loan): Observable<BorrowingExpenseLoan[]>;
20
21
  static ɵfac: i0.ɵɵFactoryDeclaration<BorrowingExpenseService, never>;
21
22
  static ɵprov: i0.ɵɵInjectableDeclaration<BorrowingExpenseService>;
22
23
  }
@@ -13,6 +13,7 @@ import * as i0 from "@angular/core";
13
13
  */
14
14
  export declare abstract class RestService<BaseModel, Model extends BaseModel> {
15
15
  protected environment: any;
16
+ private inFlight$?;
16
17
  protected toastService: ToastService;
17
18
  protected http: HttpClient;
18
19
  protected eventDispatcherService: EventDispatcherService;
@@ -19,6 +19,7 @@ import * as i0 from "@angular/core";
19
19
  */
20
20
  export declare abstract class RestService<BaseModel, Model extends AbstractModel, CollectionModel extends Collection<Model>> extends DataService<BaseModel, Model, CollectionModel> {
21
21
  protected environment: any;
22
+ private inFlight$?;
22
23
  /**
23
24
  * Url part for service entity API
24
25
  */
@@ -1,6 +1,6 @@
1
1
  import { AccountSetupItemCollection } from '../../../collections';
2
2
  import { SetupItem } from '../../../db/Models/setup-item';
3
- import { AccountSetupItem } from '../../../models/account-setup/account-setup-item';
3
+ import { AccountSetupItem } from '../../../models';
4
4
  import { RestMethod, RestService } from '../rest';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class SetupItemService extends RestService<SetupItem, AccountSetupItem, AccountSetupItemCollection> {
@@ -36,6 +36,7 @@ export declare class SubscriptionService extends RestService<ServiceSubscription
36
36
  cancel(subscription: ServiceSubscription): Observable<object>;
37
37
  renew(subscription: ServiceSubscription): Observable<object>;
38
38
  getCoupon(code: string): Observable<any>;
39
+ setCache(data: any[], next?: boolean): void;
39
40
  static ɵfac: i0.ɵɵFactoryDeclaration<SubscriptionService, never>;
40
41
  static ɵprov: i0.ɵɵInjectableDeclaration<SubscriptionService>;
41
42
  }
@@ -1,9 +1,8 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { User as UserBase } from '../../../db/Models/user/user';
3
- import { User } from '../../../models';
3
+ import { AccountSetupItem, User } from '../../../models';
4
4
  import { RestMethod, RestService } from '../rest';
5
5
  import { Collection } from '../../../collections';
6
- import { AccountSetupItem } from '../../../models/account-setup/account-setup-item';
7
6
  import { IEventListener } from '../../../interfaces';
8
7
  import { MixpanelService } from 'taxtank-core/common';
9
8
  import * as i0 from "@angular/core";
@@ -35,7 +34,9 @@ export declare class UserService extends RestService<UserBase, User, Collection<
35
34
  updatePhoto(photo: FormData): Observable<void>;
36
35
  createBasiq(): Observable<string>;
37
36
  skipSetupItem(item: AccountSetupItem): Observable<User>;
37
+ restoreSetupItem(item: AccountSetupItem): Observable<User>;
38
38
  /**
39
+ * @TODO stop using user for roles
39
40
  * Update cache when user's service subscription is updated
40
41
  */
41
42
  private listenServiceSubscriptionUpdated;