taxtank-core 0.5.4 → 0.7.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.
Files changed (156) hide show
  1. package/bundles/taxtank-core.umd.js +443 -177
  2. package/bundles/taxtank-core.umd.js.map +1 -1
  3. package/esm2015/lib/collections/depreciation.collection.js +13 -2
  4. package/esm2015/lib/collections/property/property-sale/property-sale-tax-exemption-metadata.collection.js +20 -0
  5. package/esm2015/lib/collections/property/property.collection.js +72 -0
  6. package/esm2015/lib/db/Enums/property/property-category-list.enum.js +5 -0
  7. package/esm2015/lib/db/Enums/{property-depreciation-calculation.enum.js → property/property-depreciation-calculation.enum.js} +1 -1
  8. package/esm2015/lib/db/Enums/property/property-owner-access.enum.js +6 -0
  9. package/esm2015/lib/db/Enums/property/property-owner-status.enum.js +7 -0
  10. package/esm2015/lib/db/Enums/property/property-sale/tax-exemption-metadata.enum.js +9 -0
  11. package/esm2015/lib/db/Enums/property/property-sale/tax-exemption.enum.js +12 -0
  12. package/esm2015/lib/db/Models/bank-account-property.js +1 -1
  13. package/esm2015/lib/db/Models/depreciation-capital-project.js +1 -1
  14. package/esm2015/lib/db/Models/depreciation.js +1 -1
  15. package/esm2015/lib/db/Models/property/property-category-movement.js +3 -0
  16. package/esm2015/lib/db/Models/property/property-category.js +3 -0
  17. package/esm2015/lib/db/Models/property/property-document.js +3 -0
  18. package/esm2015/lib/db/Models/property/property-forecast.js +3 -0
  19. package/esm2015/lib/db/Models/property/property-owner.js +3 -0
  20. package/esm2015/lib/db/Models/property/property-sale/property-sale-tax-exemption-metadata.js +3 -0
  21. package/esm2015/lib/db/Models/property/property-sale/property-sale.js +3 -0
  22. package/esm2015/lib/db/Models/property/property-sale/tax-exemption-metadata.js +3 -0
  23. package/esm2015/lib/db/Models/property/property-sale/tax-exemption.js +3 -0
  24. package/esm2015/lib/db/Models/property/property-subscription.js +3 -0
  25. package/esm2015/lib/db/Models/property/property-valuation.js +3 -0
  26. package/esm2015/lib/db/Models/property/property.js +3 -0
  27. package/esm2015/lib/db/Models/transaction-base.js +1 -1
  28. package/esm2015/lib/db/Models/transaction.js +1 -1
  29. package/esm2015/lib/db/Models/user.js +1 -1
  30. package/esm2015/lib/forms/abstract.form.js +11 -0
  31. package/esm2015/lib/forms/index.js +7 -0
  32. package/esm2015/lib/forms/login/login.form.js +11 -0
  33. package/esm2015/lib/forms/register/register-client.form.js +29 -0
  34. package/esm2015/lib/forms/register/register-firm.form.js +26 -0
  35. package/esm2015/lib/forms/user/password.form.js +11 -0
  36. package/esm2015/lib/forms/user/reset-password.form.js +10 -0
  37. package/esm2015/lib/interceptors/corelogic-interceptor.js +2 -2
  38. package/esm2015/lib/models/depreciation/depreciation.js +5 -1
  39. package/esm2015/lib/models/endpoint/endpoints.const.js +1 -2
  40. package/esm2015/lib/models/property/property-category-movement.js +2 -2
  41. package/esm2015/lib/models/property/property-category.js +2 -2
  42. package/esm2015/lib/models/property/property-document.js +2 -2
  43. package/esm2015/lib/models/property/property-equity-chart-data.js +3 -3
  44. package/esm2015/lib/models/property/property-forecast.js +2 -2
  45. package/esm2015/lib/models/property/property-owner.js +3 -3
  46. package/esm2015/lib/models/property/property-sale/property-sale-tax-exemption-metadata.js +4 -0
  47. package/esm2015/lib/models/property/property-sale/property-sale.js +19 -0
  48. package/esm2015/lib/models/property/property-sale/tax-exemption-metadata.js +4 -0
  49. package/esm2015/lib/models/property/property-sale/tax-exemption.js +4 -0
  50. package/esm2015/lib/models/property/property-subscription.js +2 -2
  51. package/esm2015/lib/models/property/property-valuation.js +2 -2
  52. package/esm2015/lib/models/property/property.js +88 -4
  53. package/esm2015/lib/services/depreciation/depreciation.service.js +1 -1
  54. package/esm2015/lib/services/property/corelogic/corelogic.service.js +46 -0
  55. package/esm2015/lib/services/property/property-calculation/property-calculation.service.js +121 -0
  56. package/esm2015/lib/services/property/property-category/property-category.service.js +23 -0
  57. package/esm2015/lib/services/property/property-category-movement.service.js +1 -1
  58. package/esm2015/lib/services/property/property-document/property-document.service.js +70 -0
  59. package/esm2015/lib/services/property/{property-owner.service.js → property-owner/property-owner.service.js} +7 -7
  60. package/esm2015/lib/services/property/property-sale/property-sale.service.js +20 -0
  61. package/esm2015/lib/services/property/property-sale/tax-exemption/tax-exemption.service.js +21 -0
  62. package/esm2015/lib/services/property/property.service.js +1 -1
  63. package/esm2015/public-api.js +22 -14
  64. package/fesm2015/taxtank-core.js +361 -147
  65. package/fesm2015/taxtank-core.js.map +1 -1
  66. package/lib/collections/depreciation.collection.d.ts +4 -1
  67. package/lib/collections/property/property-sale/property-sale-tax-exemption-metadata.collection.d.ts +8 -0
  68. package/lib/collections/{property.collection.d.ts → property/property.collection.d.ts} +4 -4
  69. package/lib/db/Enums/property/property-category-list.enum.d.ts +3 -0
  70. package/lib/db/Enums/{property-depreciation-calculation.enum.d.ts → property/property-depreciation-calculation.enum.d.ts} +0 -0
  71. package/lib/db/Enums/{property-owner-access.enum.d.ts → property/property-owner-access.enum.d.ts} +0 -0
  72. package/lib/db/Enums/{property-owner-status.enum.d.ts → property/property-owner-status.enum.d.ts} +0 -0
  73. package/lib/db/Enums/property/property-sale/tax-exemption-metadata.enum.d.ts +5 -0
  74. package/lib/db/Enums/property/property-sale/tax-exemption.enum.d.ts +9 -0
  75. package/lib/db/Models/bank-account-property.d.ts +1 -1
  76. package/lib/db/Models/depreciation-capital-project.d.ts +1 -1
  77. package/lib/db/Models/depreciation.d.ts +1 -1
  78. package/lib/db/Models/{property-category-movement.d.ts → property/property-category-movement.d.ts} +1 -1
  79. package/lib/db/Models/{property-category.d.ts → property/property-category.d.ts} +1 -1
  80. package/lib/db/Models/{property-document.d.ts → property/property-document.d.ts} +1 -1
  81. package/lib/db/Models/{property-forecast.d.ts → property/property-forecast.d.ts} +0 -0
  82. package/lib/db/Models/{property-owner.d.ts → property/property-owner.d.ts} +4 -4
  83. package/lib/db/Models/property/property-sale/property-sale-tax-exemption-metadata.d.ts +8 -0
  84. package/lib/db/Models/property/property-sale/property-sale.d.ts +20 -0
  85. package/lib/db/Models/property/property-sale/tax-exemption-metadata.d.ts +6 -0
  86. package/lib/db/Models/property/property-sale/tax-exemption.d.ts +7 -0
  87. package/lib/db/Models/{property-subscription.d.ts → property/property-subscription.d.ts} +1 -1
  88. package/lib/db/Models/{property-valuation.d.ts → property/property-valuation.d.ts} +0 -0
  89. package/lib/db/Models/{property.d.ts → property/property.d.ts} +9 -8
  90. package/lib/db/Models/transaction-base.d.ts +1 -1
  91. package/lib/db/Models/transaction.d.ts +1 -1
  92. package/lib/db/Models/user.d.ts +3 -3
  93. package/lib/forms/abstract.form.d.ts +4 -0
  94. package/lib/forms/index.d.ts +6 -0
  95. package/lib/forms/login/login.form.d.ts +4 -0
  96. package/lib/forms/register/register-client.form.d.ts +5 -0
  97. package/lib/forms/register/register-firm.form.d.ts +7 -0
  98. package/lib/forms/user/password.form.d.ts +4 -0
  99. package/lib/forms/user/reset-password.form.d.ts +4 -0
  100. package/lib/interceptors/corelogic-interceptor.d.ts +1 -1
  101. package/lib/models/depreciation/depreciation.d.ts +1 -0
  102. package/lib/models/property/property-category-movement.d.ts +1 -1
  103. package/lib/models/property/property-category.d.ts +1 -1
  104. package/lib/models/property/property-document.d.ts +1 -1
  105. package/lib/models/property/property-equity-chart-data.d.ts +1 -1
  106. package/lib/models/property/property-forecast.d.ts +1 -1
  107. package/lib/models/property/property-owner.d.ts +1 -1
  108. package/lib/models/property/property-sale/property-sale-tax-exemption-metadata.d.ts +3 -0
  109. package/lib/models/property/property-sale/property-sale.d.ts +8 -0
  110. package/lib/models/property/property-sale/tax-exemption-metadata.d.ts +3 -0
  111. package/lib/models/property/property-sale/tax-exemption.d.ts +3 -0
  112. package/lib/models/property/property-subscription.d.ts +1 -1
  113. package/lib/models/property/property-valuation.d.ts +1 -1
  114. package/lib/models/property/property.d.ts +34 -3
  115. package/lib/services/property/{corelogic.service.d.ts → corelogic/corelogic.service.d.ts} +1 -1
  116. package/lib/services/property/{property-calculation.service.d.ts → property-calculation/property-calculation.service.d.ts} +5 -5
  117. package/lib/services/property/{property-category.service.d.ts → property-category/property-category.service.d.ts} +3 -3
  118. package/lib/services/property/property-category-movement.service.d.ts +1 -1
  119. package/lib/services/property/{property-document.service.d.ts → property-document/property-document.service.d.ts} +4 -4
  120. package/lib/services/property/{property-owner.service.d.ts → property-owner/property-owner.service.d.ts} +4 -4
  121. package/lib/services/property/property-sale/property-sale.service.d.ts +10 -0
  122. package/lib/services/property/property-sale/tax-exemption/tax-exemption.service.d.ts +11 -0
  123. package/lib/services/property/property.service.d.ts +1 -1
  124. package/package.json +2 -1
  125. package/public-api.d.ts +21 -13
  126. package/esm2015/lib/collections/property.collection.js +0 -72
  127. package/esm2015/lib/db/Enums/property-owner-access.enum.js +0 -6
  128. package/esm2015/lib/db/Enums/property-owner-status.enum.js +0 -7
  129. package/esm2015/lib/db/Models/capital-cost-property.js +0 -3
  130. package/esm2015/lib/db/Models/capital-cost.js +0 -3
  131. package/esm2015/lib/db/Models/property-capital-cost.js +0 -3
  132. package/esm2015/lib/db/Models/property-category-movement.js +0 -3
  133. package/esm2015/lib/db/Models/property-category.js +0 -3
  134. package/esm2015/lib/db/Models/property-document.js +0 -3
  135. package/esm2015/lib/db/Models/property-forecast.js +0 -3
  136. package/esm2015/lib/db/Models/property-owner.js +0 -3
  137. package/esm2015/lib/db/Models/property-sold.js +0 -3
  138. package/esm2015/lib/db/Models/property-subscription.js +0 -3
  139. package/esm2015/lib/db/Models/property-valuation.js +0 -3
  140. package/esm2015/lib/db/Models/property.js +0 -3
  141. package/esm2015/lib/models/property/property-capital-cost.js +0 -4
  142. package/esm2015/lib/models/property/property-sold.js +0 -12
  143. package/esm2015/lib/services/property/corelogic.service.js +0 -46
  144. package/esm2015/lib/services/property/property-calculation.service.js +0 -121
  145. package/esm2015/lib/services/property/property-capital-cost.service.js +0 -46
  146. package/esm2015/lib/services/property/property-category.service.js +0 -23
  147. package/esm2015/lib/services/property/property-document.service.js +0 -68
  148. package/esm2015/lib/services/property/property-sold.service.js +0 -23
  149. package/lib/db/Models/capital-cost-property.d.ts +0 -13
  150. package/lib/db/Models/capital-cost.d.ts +0 -4
  151. package/lib/db/Models/property-capital-cost.d.ts +0 -13
  152. package/lib/db/Models/property-sold.d.ts +0 -12
  153. package/lib/models/property/property-capital-cost.d.ts +0 -3
  154. package/lib/models/property/property-sold.d.ts +0 -5
  155. package/lib/services/property/property-capital-cost.service.d.ts +0 -20
  156. package/lib/services/property/property-sold.service.d.ts +0 -13
@@ -9,7 +9,8 @@ export declare class DepreciationCollection extends Collection<Depreciation> {
9
9
  */
10
10
  get amount(): number;
11
11
  get claimAmount(): number;
12
- getClaimAmountByYear(year: number): number;
12
+ getClaimAmountByYear(year?: number): number;
13
+ getCloseBalanceByYear(year?: number): number;
13
14
  getCurrentYearForecastAmount(): number;
14
15
  get assetValue(): number;
15
16
  /**
@@ -17,6 +18,8 @@ export declare class DepreciationCollection extends Collection<Depreciation> {
17
18
  */
18
19
  getByTankType(tankType: TankTypeEnum): DepreciationCollection;
19
20
  getByPropertiesIds(ids: number[]): DepreciationCollection;
21
+ getWithCapitalProject(): DepreciationCollection;
22
+ getWithoutCapitalProject(): DepreciationCollection;
20
23
  getWithoutBorrowingExpenses(): DepreciationCollection;
21
24
  getWorkDepreciations(): DepreciationCollection;
22
25
  getPropertyDepreciations(): DepreciationCollection;
@@ -0,0 +1,8 @@
1
+ import { Collection } from '../../collection';
2
+ import { PropertySaleTaxExemptionMetadata } from '../../../models/property/property-sale/property-sale-tax-exemption-metadata';
3
+ export declare class PropertySaleTaxExemptionMetadataCollection extends Collection<PropertySaleTaxExemptionMetadata> {
4
+ getPPRDays(): number;
5
+ getMarketValue(): number;
6
+ getClaimPercent(): number;
7
+ getByMetadataId(id: number): PropertySaleTaxExemptionMetadata;
8
+ }
@@ -1,6 +1,6 @@
1
- import { Collection } from './collection';
2
- import { Property } from '../models/property/property';
3
- import { PropertyCategory } from '../models/property/property-category';
1
+ import { Collection } from '../collection';
2
+ import { Property } from '../../models/property/property';
3
+ import { PropertyCategory } from '../../models/property/property-category';
4
4
  export declare class PropertyCollection extends Collection<Property> {
5
5
  /**
6
6
  * Get new property collection filtered by category id
@@ -30,7 +30,7 @@ export declare class PropertyCollection extends Collection<Property> {
30
30
  get firstForecastYear(): number;
31
31
  get marketValueGrowth(): number;
32
32
  getOwnerOccupiedProperties(): PropertyCollection;
33
- get earliestPurchaseDate(): Date;
33
+ get earliestContractDate(): Date;
34
34
  /**
35
35
  * Get list of unique property categories from collection
36
36
  */
@@ -0,0 +1,3 @@
1
+ export declare enum PropertyCategoryListEnum {
2
+ OWNER_OCCUPIED = 3
3
+ }
@@ -0,0 +1,5 @@
1
+ export declare enum TaxExemptionMetadataEnum {
2
+ PPR_DAYS = 1,
3
+ MARKET_VALUE = 2,
4
+ CLAIM_PERCENT = 3
5
+ }
@@ -0,0 +1,9 @@
1
+ export declare enum TaxExemptionEnum {
2
+ ONE_YEAR_RULE = 1,
3
+ PPR = 2,
4
+ SIX_YEARS_RULE = 3,
5
+ INVESTMENT_TO_PPR = 4,
6
+ PPR_TO_INVESTMENT = 5,
7
+ TRANSFER = 6,
8
+ OTHER = 7
9
+ }
@@ -1,5 +1,5 @@
1
1
  import { BankAccount } from './bank-account';
2
- import { Property } from './property';
2
+ import { Property } from './property/property';
3
3
  export declare class BankAccountProperty {
4
4
  percent?: number;
5
5
  id?: number;
@@ -1,4 +1,4 @@
1
- import { Property } from './property';
1
+ import { Property } from './property/property';
2
2
  import { User } from './user';
3
3
  export declare class DepreciationCapitalProject {
4
4
  id?: number;
@@ -2,7 +2,7 @@ import { DepreciationTypeEnum } from '../Enums/depreciation-type.enum';
2
2
  import { DepreciationCalculationEnum } from '../Enums/depreciation-calculation.enum';
3
3
  import { DepreciationCalculationPercentEnum } from '../Enums/depreciation-calculation-percent.enum';
4
4
  import { User } from './user';
5
- import { Property } from './property';
5
+ import { Property } from './property/property';
6
6
  import { BankTransaction } from './bank-transaction';
7
7
  import { DepreciationCapitalProject } from './depreciation-capital-project';
8
8
  import { ChartAccounts } from './chart-accounts';
@@ -1,7 +1,7 @@
1
1
  import { Property } from './property';
2
2
  import { PropertyCategory } from './property-category';
3
3
  import { PropertyValuation } from './property-valuation';
4
- import { User } from './user';
4
+ import { User } from '../user';
5
5
  export declare class PropertyCategoryMovement {
6
6
  id?: number;
7
7
  fromDate?: Date;
@@ -1,4 +1,4 @@
1
- import { User } from './user';
1
+ import { User } from '../user';
2
2
  import { Property } from './property';
3
3
  export declare class PropertyCategory {
4
4
  id?: number;
@@ -1,5 +1,5 @@
1
1
  import { Property } from './property';
2
- import { User } from './user';
2
+ import { User } from '../user';
3
3
  export declare class PropertyDocument {
4
4
  id?: number;
5
5
  name?: string;
@@ -1,8 +1,8 @@
1
- import { PropertyOwnerStatusEnum } from '../Enums/property-owner-status.enum';
2
- import { PropertyOwnerAccessEnum } from '../Enums/property-owner-access.enum';
1
+ import { PropertyOwnerStatusEnum } from '../../Enums/property/property-owner-status.enum';
2
+ import { PropertyOwnerAccessEnum } from '../../Enums/property/property-owner-access.enum';
3
3
  import { Property } from './property';
4
- import { User } from './user';
5
- import { RegistrationInvite } from './registration-invite';
4
+ import { User } from '../user';
5
+ import { RegistrationInvite } from '../registration-invite';
6
6
  export declare class PropertyOwner {
7
7
  id?: number;
8
8
  email?: string;
@@ -0,0 +1,8 @@
1
+ import { PropertySale } from './property-sale';
2
+ import { TaxExemptionMetadata } from './tax-exemption-metadata';
3
+ export declare class PropertySaleTaxExemptionMetadata {
4
+ value?: number;
5
+ id?: number;
6
+ propertySale?: PropertySale;
7
+ metadata?: TaxExemptionMetadata;
8
+ }
@@ -0,0 +1,20 @@
1
+ import { Property } from '../property';
2
+ import { TaxExemption } from './tax-exemption';
3
+ import { TaxExemptionMetadata } from '../../../../models/property/property-sale/tax-exemption-metadata';
4
+ export declare class PropertySale {
5
+ id?: number;
6
+ structuralImprovementsWDV?: number;
7
+ buildingAtCostClaimed?: number;
8
+ settlementDate?: Date;
9
+ contractDate?: Date;
10
+ price?: number;
11
+ commission?: number;
12
+ legalFees?: number;
13
+ otherCost?: number;
14
+ capitalLoss?: number;
15
+ createdAt?: Date;
16
+ updatedAt?: Date;
17
+ property?: Property;
18
+ taxExemption?: TaxExemption;
19
+ taxExemptionMetadata?: TaxExemptionMetadata[];
20
+ }
@@ -0,0 +1,6 @@
1
+ import { TaxExemption } from './tax-exemption';
2
+ export declare class TaxExemptionMetadata {
3
+ name?: string;
4
+ id?: number;
5
+ taxExemption?: TaxExemption;
6
+ }
@@ -0,0 +1,7 @@
1
+ import { TaxExemptionMetadata } from './tax-exemption-metadata';
2
+ export declare class TaxExemption {
3
+ name?: string;
4
+ description?: string;
5
+ id?: number;
6
+ metadata?: TaxExemptionMetadata[];
7
+ }
@@ -1,5 +1,5 @@
1
1
  import { Property } from './property';
2
- import { User } from './user';
2
+ import { User } from '../user';
3
3
  export declare class PropertySubscription {
4
4
  id?: number;
5
5
  createdAt?: Date;
@@ -1,21 +1,20 @@
1
- import { PropertyDepreciationCalculationEnum } from '../Enums/property-depreciation-calculation.enum';
2
- import { User } from './user';
3
- import { Address } from './address';
1
+ import { PropertyDepreciationCalculationEnum } from '../../Enums/property/property-depreciation-calculation.enum';
2
+ import { User } from '../user';
3
+ import { Address } from '../address';
4
4
  import { PropertyCategory } from './property-category';
5
5
  import { PropertyForecast } from './property-forecast';
6
6
  import { PropertyOwner } from './property-owner';
7
7
  import { PropertyValuation } from './property-valuation';
8
8
  import { PropertyCategoryMovement } from './property-category-movement';
9
- import { CapitalCostProperty } from './capital-cost-property';
10
- import { BankAccountProperty } from './bank-account-property';
9
+ import { BankAccountProperty } from '../bank-account-property';
11
10
  import { PropertyDocument } from './property-document';
12
- import { Depreciation } from './depreciation';
11
+ import { Depreciation } from '../depreciation';
13
12
  import { PropertySubscription } from './property-subscription';
14
13
  export declare class Property {
15
14
  id?: number;
16
15
  photo?: string;
17
16
  purchasePrice?: number;
18
- purchaseDate?: Date;
17
+ contractDate?: Date;
19
18
  settlementDate?: Date;
20
19
  depreciationCalculation?: PropertyDepreciationCalculationEnum;
21
20
  shareWith?: string;
@@ -32,7 +31,9 @@ export declare class Property {
32
31
  owners?: PropertyOwner[];
33
32
  valuations?: PropertyValuation[];
34
33
  categoryMovements?: PropertyCategoryMovement[];
35
- capitalCosts?: CapitalCostProperty[];
34
+ stampDuty?: number;
35
+ legalFees?: number;
36
+ otherCapitalCosts?: number;
36
37
  propertyBankAccounts?: BankAccountProperty[];
37
38
  createdBy?: User;
38
39
  updatedBy?: User;
@@ -1,4 +1,4 @@
1
- import { Property } from './property';
1
+ import { Property } from './property/property';
2
2
  import { ChartAccounts } from './chart-accounts';
3
3
  import { TankTypeEnum } from '../Enums/tank-type.enum';
4
4
  export declare class TransactionBase {
@@ -9,7 +9,7 @@ import { TransactionMetadata } from './transaction-metadata';
9
9
  import { TransactionAllocation } from './transaction-allocation';
10
10
  import { Loan } from './loan';
11
11
  import { TransactionBase } from './transaction-base';
12
- import { Property } from './property';
12
+ import { Property } from './property/property';
13
13
  import { Depreciation } from './depreciation';
14
14
  export declare class Transaction extends TransactionBase {
15
15
  id?: number;
@@ -1,13 +1,13 @@
1
1
  import { UserTitleEnum } from '../Enums/user-title.enum';
2
2
  import { UserStatusEnum } from '../Enums/user-status.enum';
3
3
  import { UserRolesEnum } from '../Enums/user-roles.enum';
4
- import { Property } from './property';
5
- import { PropertySubscription } from './property-subscription';
4
+ import { Property } from './property/property';
5
+ import { PropertySubscription } from './property/property-subscription';
6
6
  import { ServiceSubscription } from './service-subscription';
7
7
  import { UserEventSetting } from './user-event-setting';
8
8
  import { BankConnection } from './bank-connection';
9
9
  import { TaxReview } from './tax-review';
10
- import { PropertyOwner } from './property-owner';
10
+ import { PropertyOwner } from './property/property-owner';
11
11
  import { Address } from './address';
12
12
  import { Phone } from './phone';
13
13
  import { ClientMovement } from './client-movement';
@@ -0,0 +1,4 @@
1
+ import { FormGroup } from '@angular/forms';
2
+ export declare abstract class AbstractForm extends FormGroup {
3
+ submit(): object;
4
+ }
@@ -0,0 +1,6 @@
1
+ export * from './abstract.form';
2
+ export * from './login/login.form';
3
+ export * from './register/register-client.form';
4
+ export * from './register/register-firm.form';
5
+ export * from './user/password.form';
6
+ export * from './user/reset-password.form';
@@ -0,0 +1,4 @@
1
+ import { AbstractForm } from '../abstract.form';
2
+ export declare class LoginForm extends AbstractForm {
3
+ constructor();
4
+ }
@@ -0,0 +1,5 @@
1
+ import { AbstractForm } from '../abstract.form';
2
+ export declare class RegisterClientForm extends AbstractForm {
3
+ constructor(referenceCode?: string);
4
+ submit(): object;
5
+ }
@@ -0,0 +1,7 @@
1
+ import { AbstractForm } from '../abstract.form';
2
+ import { FirmTypeEnum } from '../../db/Enums/firm-type.enum';
3
+ export declare class RegisterFirmForm extends AbstractForm {
4
+ private firmType;
5
+ constructor(firmType: FirmTypeEnum, referenceCode?: string);
6
+ submit(): object;
7
+ }
@@ -0,0 +1,4 @@
1
+ import { AbstractForm } from '../abstract.form';
2
+ export declare class PasswordForm extends AbstractForm {
3
+ constructor();
4
+ }
@@ -0,0 +1,4 @@
1
+ import { AbstractForm } from '../abstract.form';
2
+ export declare class ResetPasswordForm extends AbstractForm {
3
+ constructor();
4
+ }
@@ -1,6 +1,6 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http';
3
- import { CorelogicService } from '../services/property/corelogic.service';
3
+ import { CorelogicService } from '../services/property/corelogic/corelogic.service';
4
4
  import * as i0 from "@angular/core";
5
5
  /**
6
6
  * Corelogic interceptor add Core Logic access token for each search requests related with Core Logic API
@@ -64,6 +64,7 @@ export declare class Depreciation extends DepreciationBase implements ITank, IRe
64
64
  getCloseBalance(): number;
65
65
  get claimAmount(): number;
66
66
  getClaimAmountByYear(year: number): number;
67
+ getCloseBalanceByYear(year: number): number;
67
68
  get assetValue(): number;
68
69
  getClaimPercent(): number;
69
70
  getCurrentYearForecastAmount(): number;
@@ -1,4 +1,4 @@
1
- import { PropertyCategoryMovement as PropertyCategoryMovementBase } from '../../db/Models/property-category-movement';
1
+ import { PropertyCategoryMovement as PropertyCategoryMovementBase } from '../../db/Models/property/property-category-movement';
2
2
  import { PropertyValuation } from './property-valuation';
3
3
  import { PropertyCategory } from './property-category';
4
4
  export declare class PropertyCategoryMovement extends PropertyCategoryMovementBase {
@@ -1,4 +1,4 @@
1
- import { PropertyCategory as PropertyCategoryBase } from '../../db/Models/property-category';
1
+ import { PropertyCategory as PropertyCategoryBase } from '../../db/Models/property/property-category';
2
2
  export declare class PropertyCategory extends PropertyCategoryBase {
3
3
  isOwnerOccupied(): boolean;
4
4
  isVacantLand(): boolean;
@@ -1,4 +1,4 @@
1
- import { PropertyDocument as PropertyDocumentBase } from '../../db/Models/property-document';
1
+ import { PropertyDocument as PropertyDocumentBase } from '../../db/Models/property/property-document';
2
2
  import { IAsset } from '../../interfaces/asset.interface';
3
3
  import { IDocument } from '../../interfaces/document.interface';
4
4
  import { AssetTypeEnum } from '../../interfaces/asset-type.enum';
@@ -1,5 +1,5 @@
1
1
  import { PropertyEquityChartItem } from './property-equity-chart-item';
2
- import { PropertyCollection } from '../../collections/property.collection';
2
+ import { PropertyCollection } from '../../collections/property/property.collection';
3
3
  import { BankAccountCollection } from '../../collections/bank-account.collection';
4
4
  import { LoanCollection } from '../../collections/loan.collection';
5
5
  import { PropertyEquityChartTypeEnum } from './property-equity-chart-type.enum';
@@ -1,4 +1,4 @@
1
- import { PropertyForecast as PropertyForecastBase } from '../../db/Models/property-forecast';
1
+ import { PropertyForecast as PropertyForecastBase } from '../../db/Models/property/property-forecast';
2
2
  export declare class PropertyForecast extends PropertyForecastBase {
3
3
  income: number;
4
4
  expense: number;
@@ -1,4 +1,4 @@
1
- import { PropertyOwner as PropertyOwnerBase } from '../../db/Models/property-owner';
1
+ import { PropertyOwner as PropertyOwnerBase } from '../../db/Models/property/property-owner';
2
2
  import { User } from '../user/user';
3
3
  import { RegistrationInvite } from '../registration-invite/registration-invite';
4
4
  import { Property } from './property';
@@ -0,0 +1,3 @@
1
+ import { PropertySaleTaxExemptionMetadata as BasePropertySaleTaxExemptionMetadata } from '../../../db/Models/property/property-sale/property-sale-tax-exemption-metadata';
2
+ export declare class PropertySaleTaxExemptionMetadata extends BasePropertySaleTaxExemptionMetadata {
3
+ }
@@ -0,0 +1,8 @@
1
+ import { PropertySale as BasePropertySale } from '../../../db/Models/property/property-sale/property-sale';
2
+ import { PropertySaleTaxExemptionMetadata } from '../../../db/Models/property/property-sale/property-sale-tax-exemption-metadata';
3
+ export declare class PropertySale extends BasePropertySale {
4
+ settlementDate: Date;
5
+ contractDate: Date;
6
+ taxExemptionMetadata: PropertySaleTaxExemptionMetadata[];
7
+ get saleCostsTotalAmount(): number;
8
+ }
@@ -0,0 +1,3 @@
1
+ import { TaxExemptionMetadata as BaseTaxExemptionMetadata } from '../../../db/Models/property/property-sale/tax-exemption-metadata';
2
+ export declare class TaxExemptionMetadata extends BaseTaxExemptionMetadata {
3
+ }
@@ -0,0 +1,3 @@
1
+ import { TaxExemption as BaseTaxExemption } from '../../../db/Models/property/property-sale/tax-exemption';
2
+ export declare class TaxExemption extends BaseTaxExemption {
3
+ }
@@ -1,4 +1,4 @@
1
- import { PropertySubscription as PropertySubscriptionBase } from '../../db/Models/property-subscription';
1
+ import { PropertySubscription as PropertySubscriptionBase } from '../../db/Models/property/property-subscription';
2
2
  import { User } from '../user/user';
3
3
  export declare class PropertySubscription extends PropertySubscriptionBase {
4
4
  createdAt: Date;
@@ -1,4 +1,4 @@
1
- import { PropertyValuation as PropertyValuationBase } from '../../db/Models/property-valuation';
1
+ import { PropertyValuation as PropertyValuationBase } from '../../db/Models/property/property-valuation';
2
2
  import { PropertyDocument } from './property-document';
3
3
  export declare class PropertyValuation extends PropertyValuationBase {
4
4
  date: Date;
@@ -1,7 +1,7 @@
1
- import { Property as PropertyBase } from '../../db/Models/property';
1
+ import { Property as PropertyBase } from '../../db/Models/property/property';
2
2
  import { Documentable } from '../../interfaces/documentable.interface';
3
3
  import { IDocument } from '../../interfaces/document.interface';
4
- import { PropertyOwner } from '../../db/Models/property-owner';
4
+ import { PropertyOwner } from '../../db/Models/property/property-owner';
5
5
  import { PropertySubscription } from './property-subscription';
6
6
  import { Photoable } from '../../interfaces/photoable';
7
7
  import { Address } from '../address/address';
@@ -10,8 +10,14 @@ import { PropertyValuation } from './property-valuation';
10
10
  import { PropertyForecast } from './property-forecast';
11
11
  import { PropertyCategoryMovement } from './property-category-movement';
12
12
  import { User } from '../user/user';
13
+ import { TaxExemptionEnum } from '../../db/Enums/property/property-sale/tax-exemption.enum';
14
+ import { PropertySale } from './property-sale/property-sale';
15
+ import { unitOfTime } from 'moment';
16
+ /**
17
+ * propertySale docs - https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/4209508353/Property+Sold+button
18
+ */
13
19
  export declare class Property extends PropertyBase implements Photoable, Documentable {
14
- purchaseDate: Date;
20
+ contractDate: Date;
15
21
  settlementDate: Date;
16
22
  address: Address;
17
23
  category: PropertyCategory;
@@ -52,4 +58,29 @@ export declare class Property extends PropertyBase implements Photoable, Documen
52
58
  getCurrentSubscription(): PropertySubscription;
53
59
  getForecastByYear(year: number): PropertyForecast;
54
60
  get isShared(): boolean;
61
+ /**
62
+ * purchase costs - claimed costs, except `ppr to investment` exemption,
63
+ * in that case it's equal to market value, when property became an investment property
64
+ */
65
+ calculateCostBase(sale: PropertySale): number;
66
+ /**
67
+ * gross capital gain tax: sale costs - cost base
68
+ */
69
+ calculateCGT(sale: PropertySale): number;
70
+ /**
71
+ * net capital gain tax (includes tax exemptions)
72
+ */
73
+ calculateNetCGT(sale: PropertySale): number;
74
+ /**
75
+ * guess tax exemption based on property details
76
+ */
77
+ getCGTExemption(sale: PropertySale): TaxExemptionEnum;
78
+ /**
79
+ * tax exemption can reduce cgt from 100% to less (up to zero)
80
+ */
81
+ getCGTExemptionRatio(sale: PropertySale): number;
82
+ /**
83
+ * ownership duration from purchase till sale
84
+ */
85
+ getOwnershipDuration(sale: PropertySale, unitOfTime?: unitOfTime.Diff): number;
55
86
  }
@@ -1,6 +1,6 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
2
  import { Observable, ReplaySubject } from 'rxjs';
3
- import { CorelogicSuggestion } from '../../models/property/corelogic-suggestion';
3
+ import { CorelogicSuggestion } from '../../../models/property/corelogic-suggestion';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class CorelogicService {
6
6
  private http;
@@ -1,9 +1,9 @@
1
1
  import { Observable } from 'rxjs';
2
- import { BankAccountCollection } from '../../collections/bank-account.collection';
3
- import { DepreciationCollection } from '../../collections/depreciation.collection';
4
- import { LoanCollection } from '../../collections/loan.collection';
5
- import { PropertyCollection } from '../../collections/property.collection';
6
- import { TransactionCollection } from '../../collections/transaction.collection';
2
+ import { BankAccountCollection } from '../../../collections/bank-account.collection';
3
+ import { DepreciationCollection } from '../../../collections/depreciation.collection';
4
+ import { LoanCollection } from '../../../collections/loan.collection';
5
+ import { PropertyCollection } from '../../../collections/property/property.collection';
6
+ import { TransactionCollection } from '../../../collections/transaction.collection';
7
7
  import * as i0 from "@angular/core";
8
8
  /**
9
9
  * Service with calculations methods for properties related with other entities.
@@ -1,6 +1,6 @@
1
- import { PropertyCategory as PropertyCategoryBase } from '../../db/Models/property-category';
2
- import { BaseRestService } from '../base-rest.service';
3
- import { PropertyCategory } from '../../models/property/property-category';
1
+ import { PropertyCategory as PropertyCategoryBase } from '../../../db/Models/property/property-category';
2
+ import { BaseRestService } from '../../base-rest.service';
3
+ import { PropertyCategory } from '../../../models/property/property-category';
4
4
  import * as i0 from "@angular/core";
5
5
  /**
6
6
  * Service for work with Property Categories
@@ -1,5 +1,5 @@
1
1
  import { PropertyCategoryMovement } from '../../models/property/property-category-movement';
2
- import { PropertyCategoryMovement as PropertyCategoryMovementBase } from '../../db/Models/property-category-movement';
2
+ import { PropertyCategoryMovement as PropertyCategoryMovementBase } from '../../db/Models/property/property-category-movement';
3
3
  import { BaseRestService } from '../base-rest.service';
4
4
  import { Observable } from 'rxjs';
5
5
  import * as i0 from "@angular/core";
@@ -1,9 +1,9 @@
1
1
  import { Observable } from 'rxjs';
2
- import { PropertyDocument as PropertyDocumentBase } from '../../db/Models/property-document';
2
+ import { PropertyDocument as PropertyDocumentBase } from '../../../db/Models/property/property-document';
3
3
  import { HttpClient } from '@angular/common/http';
4
- import { EventDispatcherService } from '../event/event-dispatcher.service';
5
- import { PropertyDocument } from '../../models/property/property-document';
6
- import { BaseRestService } from '../base-rest.service';
4
+ import { EventDispatcherService } from '../../event/event-dispatcher.service';
5
+ import { PropertyDocument } from '../../../models/property/property-document';
6
+ import { BaseRestService } from '../../base-rest.service';
7
7
  import * as i0 from "@angular/core";
8
8
  /**
9
9
  * Class for work with Property Documents
@@ -1,9 +1,9 @@
1
1
  import { Observable } from 'rxjs';
2
- import { PropertyOwner as PropertyOwnerBase } from '../../db/Models/property-owner';
2
+ import { PropertyOwner as PropertyOwnerBase } from '../../../db/Models/property/property-owner';
3
3
  import { HttpClient } from '@angular/common/http';
4
- import { EventDispatcherService } from '../event/event-dispatcher.service';
5
- import { PropertyOwner } from '../../models/property/property-owner';
6
- import { BaseRestService } from '../base-rest.service';
4
+ import { EventDispatcherService } from '../../event/event-dispatcher.service';
5
+ import { PropertyOwner } from '../../../models/property/property-owner';
6
+ import { BaseRestService } from '../../base-rest.service';
7
7
  import * as i0 from "@angular/core";
8
8
  export declare class PropertyOwnerService extends BaseRestService<PropertyOwnerBase, PropertyOwner> {
9
9
  protected http: HttpClient;
@@ -0,0 +1,10 @@
1
+ import { PropertySale as PropertySaleBase } from '../../../db/Models/property/property-sale/property-sale';
2
+ import { PropertySale } from '../../../models/property/property-sale/property-sale';
3
+ import { BaseRestService } from '../../base-rest.service';
4
+ import * as i0 from "@angular/core";
5
+ export declare class PropertySaleService extends BaseRestService<PropertySaleBase, PropertySale> {
6
+ modelClass: typeof PropertySale;
7
+ url: string;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<PropertySaleService, never>;
9
+ static ɵprov: i0.ɵɵInjectableDeclaration<PropertySaleService>;
10
+ }
@@ -0,0 +1,11 @@
1
+ import { BaseRestService } from '../../../base-rest.service';
2
+ import { TaxExemption as BaseTaxExemption } from '../../../../db/Models/property/property-sale/tax-exemption';
3
+ import { TaxExemption } from '../../../../models/property/property-sale/tax-exemption';
4
+ import * as i0 from "@angular/core";
5
+ export declare class TaxExemptionService extends BaseRestService<BaseTaxExemption, TaxExemption> {
6
+ modelClass: typeof TaxExemption;
7
+ url: string;
8
+ isHydra: boolean;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<TaxExemptionService, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<TaxExemptionService>;
11
+ }
@@ -1,4 +1,4 @@
1
- import { Property as PropertyBase } from '../../db/Models/property';
1
+ import { Property as PropertyBase } from '../../db/Models/property/property';
2
2
  import { Observable } from 'rxjs';
3
3
  import { HttpClient } from '@angular/common/http';
4
4
  import { BaseRestService } from '../base-rest.service';
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "0.5.4",
3
+ "version": "0.7.1",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^12.2.3 || ~13.0.0",
7
7
  "@angular/core": "^12.2.3 || ~13.0.0",
8
+ "@angular/forms": "^12.2.3 || ~13.0.0",
8
9
  "@angular/router": "^12.2.3 || ~13.0.0",
9
10
  "@auth0/angular-jwt": "^5.0.2",
10
11
  "@stripe/stripe-js": "^1.11.0",