taxtank-core 0.32.16 → 0.32.18

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 (176) hide show
  1. package/esm2022/lib/collections/collection.mjs +9 -3
  2. package/esm2022/lib/collections/property/index.mjs +2 -1
  3. package/esm2022/lib/collections/property/property-category-movement.collection.mjs +12 -4
  4. package/esm2022/lib/collections/property/property-valuation.collection.mjs +4 -0
  5. package/esm2022/lib/collections/property/property.collection.mjs +31 -33
  6. package/esm2022/lib/db/Models/firm/client-movement.mjs +3 -3
  7. package/esm2022/lib/db/Models/property/property.mjs +1 -1
  8. package/esm2022/lib/db/Models/user/registration-invite.mjs +1 -1
  9. package/esm2022/lib/forms/property/index.mjs +5 -1
  10. package/esm2022/lib/forms/property/property-add.form.mjs +69 -0
  11. package/esm2022/lib/forms/property/property-category-movement-form.mjs +22 -0
  12. package/esm2022/lib/forms/property/property-forecast.form.mjs +29 -0
  13. package/esm2022/lib/forms/property/property-share.form.mjs +16 -0
  14. package/esm2022/lib/forms/property/property-valuation.form.mjs +5 -3
  15. package/esm2022/lib/models/client/client-movement.mjs +3 -3
  16. package/esm2022/lib/models/depreciation/depreciation.mjs +1 -1
  17. package/esm2022/lib/models/endpoint/endpoints.const.mjs +10 -12
  18. package/esm2022/lib/models/event/app-event-type.enum.mjs +55 -57
  19. package/esm2022/lib/models/property/index.mjs +1 -2
  20. package/esm2022/lib/models/property/property-category-movement.mjs +5 -1
  21. package/esm2022/lib/models/property/property-valuation.mjs +1 -4
  22. package/esm2022/lib/models/property/property.mjs +15 -26
  23. package/esm2022/lib/services/data.service.mjs +2 -3
  24. package/esm2022/lib/services/event/sse.service.mjs +2 -2
  25. package/esm2022/lib/services/http/address/address.service.mjs +2 -2
  26. package/esm2022/lib/services/http/bank/bank-account/bank-account.service.mjs +8 -7
  27. package/esm2022/lib/services/http/bank/bank-connection/bank-connection.service.mjs +11 -20
  28. package/esm2022/lib/services/http/bank/bank-transaction/bank-transaction.service.mjs +11 -6
  29. package/esm2022/lib/services/http/bank/bank.service.mjs +1 -2
  30. package/esm2022/lib/services/http/bank/basiq/basiq.service.mjs +7 -7
  31. package/esm2022/lib/services/http/budget/budget.service.mjs +1 -2
  32. package/esm2022/lib/services/http/chart-accounts/chart-accounts-depreciations/chart-accounts-depreciations.service.mjs +1 -2
  33. package/esm2022/lib/services/http/chat/chat.service.mjs +11 -13
  34. package/esm2022/lib/services/http/chat/message-document.service.mjs +13 -9
  35. package/esm2022/lib/services/http/chat/message.service.mjs +9 -41
  36. package/esm2022/lib/services/http/client/capital-gain/annual-client-details.service.mjs +1 -2
  37. package/esm2022/lib/services/http/depreciation/depreciation.service.mjs +6 -5
  38. package/esm2022/lib/services/http/document/document.service.mjs +1 -2
  39. package/esm2022/lib/services/http/file/file.service.mjs +1 -2
  40. package/esm2022/lib/services/http/firm/client-income/client-income-types.service.mjs +1 -2
  41. package/esm2022/lib/services/http/firm/client-invite/client-invite.service.mjs +17 -31
  42. package/esm2022/lib/services/http/firm/client-movement/client-movement.service.mjs +21 -25
  43. package/esm2022/lib/services/http/firm/firm.service.mjs +2 -2
  44. package/esm2022/lib/services/http/firm/portfolio-report/client-portfolio-report.service.mjs +1 -1
  45. package/esm2022/lib/services/http/holding/holding-sale.service.mjs +1 -2
  46. package/esm2022/lib/services/http/holding/holding-type.service.mjs +1 -2
  47. package/esm2022/lib/services/http/holding/holding.service.mjs +12 -8
  48. package/esm2022/lib/services/http/income-source/income-source-forecast/income-source-forecast.service.mjs +12 -7
  49. package/esm2022/lib/services/http/income-source/income-source.service.mjs +12 -7
  50. package/esm2022/lib/services/http/income-source/salary-forecast/salary-forecast.service.mjs +12 -10
  51. package/esm2022/lib/services/http/income-source/sole-forecast/sole-forecast.service.mjs +12 -10
  52. package/esm2022/lib/services/http/loan/borrowing-expense/borrowing-expense.service.mjs +1 -1
  53. package/esm2022/lib/services/http/loan/loan.service.mjs +14 -9
  54. package/esm2022/lib/services/http/property/borrowing-report/borrowing-report.service.mjs +1 -2
  55. package/esm2022/lib/services/http/property/property-category-movement/property-category-movement.service.mjs +6 -4
  56. package/esm2022/lib/services/http/property/property-document/property-document.service.mjs +2 -28
  57. package/esm2022/lib/services/http/property/property-share/property-share.service.mjs +12 -7
  58. package/esm2022/lib/services/http/property/property-valuation/property-valuation.service.mjs +5 -16
  59. package/esm2022/lib/services/http/property/property.service.mjs +26 -50
  60. package/esm2022/lib/services/http/rest/rest-old.service.mjs +13 -19
  61. package/esm2022/lib/services/http/rest/rest.service.mjs +53 -34
  62. package/esm2022/lib/services/http/service-notification/service-notification.service.mjs +16 -18
  63. package/esm2022/lib/services/http/setup-item/setup-item.service.mjs +1 -2
  64. package/esm2022/lib/services/http/sole/bas-report/bas-report.service.mjs +1 -2
  65. package/esm2022/lib/services/http/sole/sole-business/sole-business.service.mjs +2 -4
  66. package/esm2022/lib/services/http/sole/sole-business-activity/sole-business-activity.service.mjs +1 -2
  67. package/esm2022/lib/services/http/sole/sole-business-loss/sole-business-loss-rules/sole-business-loss-offset-rule.service.mjs +1 -2
  68. package/esm2022/lib/services/http/sole/sole-business-loss/sole-business-loss.service.mjs +12 -8
  69. package/esm2022/lib/services/http/sole/sole-contact/sole-contact.service.mjs +1 -2
  70. package/esm2022/lib/services/http/sole/sole-depreciation-method/sole-depreciation-method.service.mjs +7 -7
  71. package/esm2022/lib/services/http/sole/sole-details/sole-details.service.mjs +2 -2
  72. package/esm2022/lib/services/http/sole/sole-invoice/sole-invoice.service.mjs +12 -9
  73. package/esm2022/lib/services/http/sole/sole-invoice-template/sole-invoice-template.service.mjs +1 -2
  74. package/esm2022/lib/services/http/subscription/service-payment/service-payment.service.mjs +1 -2
  75. package/esm2022/lib/services/http/subscription/service-payment-method/service-payment-method.service.mjs +10 -27
  76. package/esm2022/lib/services/http/subscription/service-price/service-price.service.mjs +1 -2
  77. package/esm2022/lib/services/http/subscription/service-product/service-product.service.mjs +1 -2
  78. package/esm2022/lib/services/http/subscription/service-subscription/subscription.service.mjs +11 -28
  79. package/esm2022/lib/services/http/tax-review/tax-review-history/tax-review-history.service.mjs +12 -7
  80. package/esm2022/lib/services/http/tax-review/tax-review.service.mjs +11 -6
  81. package/esm2022/lib/services/http/tax-summary/tax-summary.service.mjs +3 -3
  82. package/esm2022/lib/services/http/transaction/transaction-allocation/allocation-rule/allocation-rule.service.mjs +1 -2
  83. package/esm2022/lib/services/http/transaction/transaction-allocation/transaction-allocation.service.mjs +11 -6
  84. package/esm2022/lib/services/http/transaction/transaction.service.mjs +6 -7
  85. package/esm2022/lib/services/http/tutorial-video/tutorial-video.service.mjs +1 -1
  86. package/esm2022/lib/services/http/user/user-event-setting/user-event-setting.service.mjs +1 -2
  87. package/esm2022/lib/services/http/user/user-event-type/user-event-type.service.mjs +1 -2
  88. package/esm2022/lib/services/http/user/user.service.mjs +20 -17
  89. package/esm2022/lib/services/http/vehicle/vehicle-claim-details.service.mjs +5 -6
  90. package/esm2022/lib/services/http/vehicle/vehicle-claim.service.mjs +1 -1
  91. package/esm2022/lib/services/property/property-calculation/property-calculation.service.mjs +2 -3
  92. package/fesm2022/taxtank-core.mjs +747 -720
  93. package/fesm2022/taxtank-core.mjs.map +1 -1
  94. package/lib/collections/collection.d.ts +2 -1
  95. package/lib/collections/property/index.d.ts +1 -0
  96. package/lib/collections/property/property-category-movement.collection.d.ts +5 -1
  97. package/lib/collections/property/property-valuation.collection.d.ts +4 -0
  98. package/lib/collections/property/property.collection.d.ts +12 -16
  99. package/lib/db/Models/firm/client-movement.d.ts +2 -2
  100. package/lib/db/Models/property/property.d.ts +1 -0
  101. package/lib/db/Models/user/registration-invite.d.ts +1 -0
  102. package/lib/forms/property/index.d.ts +4 -0
  103. package/lib/forms/property/property-add.form.d.ts +16 -0
  104. package/lib/forms/property/property-category-movement-form.d.ts +6 -0
  105. package/lib/forms/property/property-forecast.form.d.ts +13 -0
  106. package/lib/forms/property/property-share.form.d.ts +8 -0
  107. package/lib/forms/property/property-valuation.form.d.ts +1 -1
  108. package/lib/models/client/client-movement.d.ts +2 -2
  109. package/lib/models/event/app-event-type.enum.d.ts +54 -56
  110. package/lib/models/property/index.d.ts +0 -1
  111. package/lib/models/property/property-category-movement.d.ts +1 -0
  112. package/lib/models/property/property-valuation.d.ts +0 -1
  113. package/lib/models/property/property.d.ts +5 -7
  114. package/lib/services/data.service.d.ts +1 -1
  115. package/lib/services/event/sse.service.d.ts +1 -1
  116. package/lib/services/http/bank/bank-account/bank-account.service.d.ts +1 -1
  117. package/lib/services/http/bank/bank-connection/bank-connection.service.d.ts +3 -11
  118. package/lib/services/http/bank/bank-transaction/bank-transaction.service.d.ts +2 -0
  119. package/lib/services/http/bank/bank.service.d.ts +0 -1
  120. package/lib/services/http/budget/budget.service.d.ts +0 -1
  121. package/lib/services/http/chart-accounts/chart-accounts-depreciations/chart-accounts-depreciations.service.d.ts +0 -1
  122. package/lib/services/http/chat/chat.service.d.ts +3 -7
  123. package/lib/services/http/chat/message-document.service.d.ts +2 -1
  124. package/lib/services/http/chat/message.service.d.ts +3 -19
  125. package/lib/services/http/client/capital-gain/annual-client-details.service.d.ts +0 -1
  126. package/lib/services/http/depreciation/depreciation.service.d.ts +2 -1
  127. package/lib/services/http/document/document.service.d.ts +0 -1
  128. package/lib/services/http/file/file.service.d.ts +0 -1
  129. package/lib/services/http/firm/client-income/client-income-types.service.d.ts +0 -1
  130. package/lib/services/http/firm/client-invite/client-invite.service.d.ts +5 -6
  131. package/lib/services/http/firm/client-movement/client-movement.service.d.ts +7 -10
  132. package/lib/services/http/holding/holding-sale.service.d.ts +0 -1
  133. package/lib/services/http/holding/holding-type.service.d.ts +0 -1
  134. package/lib/services/http/holding/holding.service.d.ts +2 -1
  135. package/lib/services/http/income-source/income-source-forecast/income-source-forecast.service.d.ts +2 -0
  136. package/lib/services/http/income-source/income-source.service.d.ts +4 -2
  137. package/lib/services/http/income-source/salary-forecast/salary-forecast.service.d.ts +4 -2
  138. package/lib/services/http/income-source/sole-forecast/sole-forecast.service.d.ts +4 -2
  139. package/lib/services/http/loan/loan.service.d.ts +2 -0
  140. package/lib/services/http/property/borrowing-report/borrowing-report.service.d.ts +0 -1
  141. package/lib/services/http/property/property-document/property-document.service.d.ts +1 -10
  142. package/lib/services/http/property/property-share/property-share.service.d.ts +2 -0
  143. package/lib/services/http/property/property-valuation/property-valuation.service.d.ts +2 -7
  144. package/lib/services/http/property/property.service.d.ts +8 -17
  145. package/lib/services/http/rest/rest-old.service.d.ts +4 -10
  146. package/lib/services/http/rest/rest.service.d.ts +7 -20
  147. package/lib/services/http/service-notification/service-notification.service.d.ts +9 -10
  148. package/lib/services/http/setup-item/setup-item.service.d.ts +1 -2
  149. package/lib/services/http/sole/bas-report/bas-report.service.d.ts +0 -1
  150. package/lib/services/http/sole/sole-business/sole-business.service.d.ts +0 -1
  151. package/lib/services/http/sole/sole-business-activity/sole-business-activity.service.d.ts +0 -1
  152. package/lib/services/http/sole/sole-business-loss/sole-business-loss-rules/sole-business-loss-offset-rule.service.d.ts +0 -1
  153. package/lib/services/http/sole/sole-business-loss/sole-business-loss.service.d.ts +3 -2
  154. package/lib/services/http/sole/sole-contact/sole-contact.service.d.ts +0 -1
  155. package/lib/services/http/sole/sole-depreciation-method/sole-depreciation-method.service.d.ts +3 -3
  156. package/lib/services/http/sole/sole-invoice/sole-invoice.service.d.ts +3 -2
  157. package/lib/services/http/sole/sole-invoice-template/sole-invoice-template.service.d.ts +0 -1
  158. package/lib/services/http/subscription/service-payment/service-payment.service.d.ts +0 -1
  159. package/lib/services/http/subscription/service-payment-method/service-payment-method.service.d.ts +4 -8
  160. package/lib/services/http/subscription/service-price/service-price.service.d.ts +0 -1
  161. package/lib/services/http/subscription/service-product/service-product.service.d.ts +0 -1
  162. package/lib/services/http/subscription/service-subscription/subscription.service.d.ts +5 -6
  163. package/lib/services/http/tax-review/tax-review-history/tax-review-history.service.d.ts +3 -1
  164. package/lib/services/http/tax-review/tax-review.service.d.ts +2 -0
  165. package/lib/services/http/tax-summary/tax-summary.service.d.ts +2 -2
  166. package/lib/services/http/transaction/transaction-allocation/allocation-rule/allocation-rule.service.d.ts +0 -1
  167. package/lib/services/http/transaction/transaction-allocation/transaction-allocation.service.d.ts +2 -0
  168. package/lib/services/http/transaction/transaction.service.d.ts +1 -3
  169. package/lib/services/http/user/user-event-setting/user-event-setting.service.d.ts +0 -1
  170. package/lib/services/http/user/user-event-type/user-event-type.service.d.ts +0 -1
  171. package/lib/services/http/user/user.service.d.ts +4 -6
  172. package/lib/services/http/vehicle/vehicle-claim-details.service.d.ts +1 -1
  173. package/lib/services/property/property-calculation/property-calculation.service.d.ts +6 -6
  174. package/package.json +1 -1
  175. package/esm2022/lib/models/property/share-filter-options.enum.mjs +0 -11
  176. package/lib/models/property/share-filter-options.enum.d.ts +0 -9
@@ -20,6 +20,7 @@ export declare class Collection<Model extends AbstractModel> implements Iterable
20
20
  toArray(): Model[];
21
21
  get first(): Model;
22
22
  get last(): Model;
23
+ get previous(): Model;
23
24
  reset(): Model;
24
25
  next(): Model;
25
26
  back(): Model;
@@ -37,7 +38,7 @@ export declare class Collection<Model extends AbstractModel> implements Iterable
37
38
  filter(callback: (item: Model) => boolean): this;
38
39
  filterBy(path: string, values: any): this;
39
40
  filterByRange(path: string, from: any, to: any): this;
40
- filterByFinancialYear(path: string, financialYear?: FinancialYear): this;
41
+ filterByFinancialYear(pathFrom: string, pathTo?: string, financialYear?: FinancialYear): this;
41
42
  find(callback: (item: Model) => boolean): Model | null;
42
43
  findBy(path: string, value: any): Model | null;
43
44
  findIndexBy(path: string, value: any): number;
@@ -2,3 +2,4 @@ export * from './property-sale';
2
2
  export * from './property.collection';
3
3
  export * from './property-category-movement.collection';
4
4
  export * from './property-share.collection';
5
+ export * from './property-valuation.collection';
@@ -4,6 +4,10 @@ export declare class PropertyCategoryMovementCollection extends Collection<Prope
4
4
  /**
5
5
  * @TODO TT-2355 Alex refactor propertyForecast, use separated api (then I can remove property from param)
6
6
  */
7
- getByForecast(property: Property, forecast: PropertyForecast): this;
7
+ filterByForecast(property: Property, forecast: PropertyForecast): this;
8
8
  hasCategory(categoryId: number): boolean;
9
+ /**
10
+ * active movement by property based on selected year
11
+ */
12
+ getCurrent(): this;
9
13
  }
@@ -0,0 +1,4 @@
1
+ import { Collection } from '../collection';
2
+ import { PropertyValuation } from '../../models';
3
+ export declare class PropertyValuationCollection extends Collection<PropertyValuation> {
4
+ }
@@ -2,12 +2,8 @@ import { Collection } from '../collection';
2
2
  import { Property, PropertyCategory } from '../../models';
3
3
  import { DepreciationCollection } from '../depreciation.collection';
4
4
  import { TransactionCollection } from '../transaction';
5
+ import { PropertyCategoryMovementCollection } from './property-category-movement.collection';
5
6
  export declare class PropertyCollection extends Collection<Property> {
6
- /**
7
- * Get new property collection filtered by category id
8
- * @param id id of category for filter
9
- */
10
- getByCategoryId(id: number): PropertyCollection;
11
7
  /**
12
8
  * Get new property collection filtered by active status
13
9
  */
@@ -17,10 +13,6 @@ export declare class PropertyCollection extends Collection<Property> {
17
13
  * Get new property collection filtered by shared
18
14
  */
19
15
  getSharedProperties(): PropertyCollection;
20
- /**
21
- * Properties that are taxed and will be included in reports (Tax summary, My tax report, e.t.c.)
22
- */
23
- getTaxInclusive(): this;
24
16
  getUnsold(): this;
25
17
  /**
26
18
  * Get total purchase price for all properties in the collection
@@ -28,18 +20,15 @@ export declare class PropertyCollection extends Collection<Property> {
28
20
  get purchasePrice(): number;
29
21
  get growthPercent(): number;
30
22
  get marketValue(): number;
31
- get firstForecastYear(): number;
32
23
  get marketValueGrowth(): number;
33
- /**
34
- * list of properties
35
- */
36
- getCGTApplicable(): this;
37
- getOwnerOccupiedProperties(): PropertyCollection;
38
- get earliestContractDate(): Date;
39
24
  /**
40
25
  * Get list of unique property categories from collection
41
26
  */
42
27
  getCategories(): PropertyCategory[];
28
+ /**
29
+ * list of properties
30
+ */
31
+ getCGTApplicable(): this;
43
32
  /**
44
33
  * Get property with the highest growth percent
45
34
  */
@@ -49,9 +38,16 @@ export declare class PropertyCollection extends Collection<Property> {
49
38
  */
50
39
  getBestPerformanceTaxProperty(transactions: TransactionCollection, depreciations: DepreciationCollection): Property;
51
40
  /**
41
+ * @TODO Nicole not needed anymore?
52
42
  * Show best performance properties first
53
43
  * https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/217677997/Property+Tank+Dashboard
54
44
  */
55
45
  sortByBestPerformance(transactions: TransactionCollection, depreciations: DepreciationCollection): this;
56
46
  get netMonthlyIncome(): number;
47
+ getOwnerOccupiedProperties(): PropertyCollection;
48
+ /**
49
+ * Properties that are taxed and will be included in reports (Tax summary, My tax report, e.t.c.)
50
+ */
51
+ getTaxInclusive(): this;
52
+ groupByCategory(categories: Collection<PropertyCategory>, movements: PropertyCategoryMovementCollection, allowEmpty?: boolean): Map<PropertyCategory, PropertyCollection>;
57
53
  }
@@ -1,8 +1,8 @@
1
1
  import { Firm } from './firm';
2
2
  import { User } from '../user/user';
3
3
  import { ServiceSubscription } from '../subscription/service-subscription';
4
- import { AbstractModel } from '../abstract-model';
5
- export declare class ClientMovement extends AbstractModel {
4
+ import { ObservableModel } from '../observable-model';
5
+ export declare class ClientMovement extends ObservableModel {
6
6
  dateFrom?: Date;
7
7
  dateTo?: Date;
8
8
  firm?: Firm;
@@ -27,6 +27,7 @@ export declare class Property extends ObservableModel {
27
27
  user?: User;
28
28
  address?: Address;
29
29
  category?: PropertyCategory;
30
+ valuation: PropertyValuation;
30
31
  forecasts?: PropertyForecast[];
31
32
  shares?: PropertyShare[];
32
33
  valuations?: PropertyValuation[];
@@ -4,6 +4,7 @@ import { AbstractModel } from '../abstract-model';
4
4
  export declare class RegistrationInvite extends AbstractModel {
5
5
  email?: string;
6
6
  firstName?: string;
7
+ lastName?: string;
7
8
  message?: string;
8
9
  status?: RegistrationInviteStatusEnum;
9
10
  createdAt?: Date;
@@ -2,4 +2,8 @@ export * from './borrowing-report.form';
2
2
  export * from './property-sale';
3
3
  export * from './property-edit.form';
4
4
  export * from './property-document.form';
5
+ export * from './property-category-movement-form';
5
6
  export * from './property-valuation.form';
7
+ export * from './property-share.form';
8
+ export * from './property-forecast.form';
9
+ export * from './property-add.form';
@@ -0,0 +1,16 @@
1
+ import { Property } from '../../models';
2
+ import { AbstractForm } from '../abstract.form';
3
+ import { PropertyValuationForm } from './property-valuation.form';
4
+ import { PropertyShareForm } from './property-share.form';
5
+ import { PropertyForecastForm } from './property-forecast.form';
6
+ import { PropertyCategoryMovementForm } from './property-category-movement-form';
7
+ /**
8
+ * Form class for the single new property
9
+ */
10
+ export declare class PropertyAddForm extends AbstractForm<Property> {
11
+ constructor();
12
+ get valuationForm(): PropertyValuationForm;
13
+ get forecastForm(): PropertyForecastForm;
14
+ get shareForm(): PropertyShareForm;
15
+ get categoryMovementForm(): PropertyCategoryMovementForm;
16
+ }
@@ -0,0 +1,6 @@
1
+ import { AbstractForm } from '../abstract.form';
2
+ import { PropertyCategoryMovement } from '../../models';
3
+ export declare class PropertyCategoryMovementForm extends AbstractForm<PropertyCategoryMovement> {
4
+ constructor(movement?: PropertyCategoryMovement);
5
+ submit(): PropertyCategoryMovement;
6
+ }
@@ -0,0 +1,13 @@
1
+ import { AbstractForm } from '../abstract.form';
2
+ import { PropertyForecast } from '../../models';
3
+ import { PropertyCategoryMovementCollection } from '../../collections';
4
+ /**
5
+ * Class describes property forecast form fields and form logic
6
+ */
7
+ export declare class PropertyForecastForm extends AbstractForm<PropertyForecast> {
8
+ /**
9
+ * @param forecast
10
+ * @param movements property could have multiple categories within forecast year, based on categories we hide/show some fields
11
+ */
12
+ constructor(forecast?: PropertyForecast, movements?: PropertyCategoryMovementCollection);
13
+ }
@@ -0,0 +1,8 @@
1
+ import { AbstractForm } from '../abstract.form';
2
+ import { PropertyShare } from '../../models';
3
+ /**
4
+ * Class describes property share form fields and form logic
5
+ */
6
+ export declare class PropertyShareForm extends AbstractForm<PropertyShare> {
7
+ constructor(share?: PropertyShare);
8
+ }
@@ -1,6 +1,6 @@
1
1
  import { PropertyValuation } from '../../models';
2
2
  import { AbstractForm } from '../abstract.form';
3
3
  export declare class PropertyValuationForm extends AbstractForm<PropertyValuation> {
4
- constructor(valuation: PropertyValuation);
4
+ constructor(valuation?: PropertyValuation);
5
5
  submit(): PropertyValuation;
6
6
  }
@@ -1,7 +1,7 @@
1
1
  import { ClientMovement as ClientMovementBase } from '../../db/Models/firm/client-movement';
2
- import { ServiceSubscription } from '../service-subscription/service-subscription';
2
+ import { ServiceSubscription } from '../service-subscription';
3
3
  import { Firm } from '../firm/firm';
4
- import { User } from '../user/user';
4
+ import { User } from '../user';
5
5
  export declare class ClientMovement extends ClientMovementBase {
6
6
  firm: Firm;
7
7
  client: User;
@@ -7,60 +7,58 @@ export declare enum AppEventTypeEnum {
7
7
  BANK_TRANSACTION_ALLOCATED = 2,
8
8
  BANK_TRANSACTIONS_ADDED = 3,
9
9
  BANK_TRANSACTIONS_DELETED = 4,
10
- BASIQ_CONSENT_UPDATED = 5,
11
- BASIQ_CONNECTION_UPDATED = 6,
12
- BASIQ_JOB_CREATED = 7,
13
- BASIQ_LOGIN_SUCCESS = 8,
14
- BASIQ_LOGIN_FAILED = 9,
15
- BASIQ_ACCOUNTS_RETRIEVED = 10,
16
- CLIENT_INVITE_ACCEPTED = 11,
17
- CLIENT_OPEN_CHAT = 12,
18
- CLIENT_TRANSFER_TO_OTHER_EMPLOYEE = 13,
19
- CURRENT_USER_GET_FAILED = 14,
20
- DEPRECIATION_DELETED = 15,
21
- DEPRECIATIONS_CREATED = 16,
22
- INCOME_SOURCES_CREATED = 17,
23
- INCOME_SOURCES_UPDATED = 18,
24
- INCOME_SOURCES_FORECASTS_CREATED = 19,
25
- INCOME_SOURCES_FORECASTS_UPDATED = 20,
26
- LOAN_UPDATED = 21,
27
- LOAN_PAYOUT_UPDATED = 22,
28
- MESSAGE_CREATED = 23,
29
- MESSAGE_FILE_CREATED = 24,
30
- MESSAGE_FILE_DELETED = 25,
31
- NOTIFICATION_ADDED = 26,
32
- PROPERTY_DEPRECIATION_CALCULATION_UPDATED = 27,
33
- PROPERTY_UPDATED = 28,
34
- PROPERTY_UPDATED_WITH_DOCUMENT = 29,
35
- PROPERTY_DOCUMENT_ADDED = 30,
36
- PROPERTY_MOVEMENT_CREATED = 31,
37
- PROPERTY_MOVEMENT_UPDATED = 32,
38
- PROPERTY_MOVEMENT_DELETED = 33,
39
- PROPERTY_SHARE_UPDATED = 34,
40
- PROPERTY_SALE_ADDED = 35,
41
- PROPERTY_SALE_DELETED = 36,
42
- PROPERTY_SUBSCRIPTION_ADDED = 37,
43
- PROPERTY_SUBSCRIPTION_DELETED = 38,
44
- PROPERTY_VALUATION_DOCUMENT_CREATED = 39,
45
- SERVICE_SUBSCRIPTION_UPDATED = 40,
46
- SOLE_BUSINESS_CREATED = 41,
47
- SOLE_DEPRECIATION_METHOD_UPDATED = 42,
48
- SOLE_DETAILS_CREATED = 43,
49
- SOLE_DETAILS_UPDATED = 44,
50
- SOLE_INVOICE_PUBLISHED = 45,
51
- TAX_REVIEW_UPDATED = 46,
52
- TRANSACTION_ALLOCATION_CREATED = 47,
53
- TRANSACTION_ALLOCATION_DELETED = 48,
54
- TRANSACTION_CREATED = 49,
55
- TRANSACTION_DELETED = 50,
56
- TRANSACTION_UPDATED = 51,
57
- TRANSACTIONS_CREATED = 52,
58
- VEHICLE_CLAIM_UPDATED = 53,
59
- VEHICLE_CLAIM_CREATED = 54,
60
- VEHICLE_CLAIM_DETAILS_UPDATED = 55,
61
- VEHICLE_CLAIM_DETAILS_CREATED = 56,
62
- VEHICLE_LOGBOOK_CREATED = 57,
63
- VEHICLE_LOGBOOK_UPDATED = 58,
64
- VEHICLE_LOGBOOK_DELETED = 59,
65
- VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED = 60
10
+ BASIQ_CONNECTION_UPDATED = 5,
11
+ BASIQ_JOB_CREATED = 6,
12
+ BASIQ_LOGIN_SUCCESS = 7,
13
+ BASIQ_LOGIN_FAILED = 8,
14
+ BASIQ_ACCOUNTS_RETRIEVED = 9,
15
+ CLIENT_INVITE_ACCEPTED = 10,
16
+ CLIENT_OPEN_CHAT = 11,
17
+ CLIENT_TRANSFER_TO_OTHER_EMPLOYEE = 12,
18
+ CURRENT_USER_GET_FAILED = 13,
19
+ DEPRECIATION_DELETED = 14,
20
+ DEPRECIATIONS_CREATED = 15,
21
+ INCOME_SOURCES_CREATED = 16,
22
+ INCOME_SOURCES_UPDATED = 17,
23
+ INCOME_SOURCES_FORECASTS_CREATED = 18,
24
+ INCOME_SOURCES_FORECASTS_UPDATED = 19,
25
+ LOAN_UPDATED = 20,
26
+ LOAN_PAYOUT_UPDATED = 21,
27
+ MESSAGE_CREATED = 22,
28
+ MESSAGE_FILE_CREATED = 23,
29
+ MESSAGE_FILE_DELETED = 24,
30
+ NOTIFICATION_ADDED = 25,
31
+ PROPERTY_DEPRECIATION_CALCULATION_UPDATED = 26,
32
+ PROPERTY_UPDATED = 27,
33
+ PROPERTY_UPDATED_WITH_DOCUMENT = 28,
34
+ PROPERTY_DOCUMENT_ADDED = 29,
35
+ PROPERTY_MOVEMENT_CREATED = 30,
36
+ PROPERTY_MOVEMENT_UPDATED = 31,
37
+ PROPERTY_MOVEMENT_DELETED = 32,
38
+ PROPERTY_SHARE_UPDATED = 33,
39
+ PROPERTY_SALE_ADDED = 34,
40
+ PROPERTY_SALE_DELETED = 35,
41
+ PROPERTY_SUBSCRIPTION_ADDED = 36,
42
+ PROPERTY_SUBSCRIPTION_DELETED = 37,
43
+ PROPERTY_VALUATION_DOCUMENT_CREATED = 38,
44
+ SOLE_BUSINESS_CREATED = 39,
45
+ SOLE_DEPRECIATION_METHOD_UPDATED = 40,
46
+ SOLE_DETAILS_CREATED = 41,
47
+ SOLE_DETAILS_UPDATED = 42,
48
+ SOLE_INVOICE_PUBLISHED = 43,
49
+ TAX_REVIEW_UPDATED = 44,
50
+ TRANSACTION_ALLOCATION_CREATED = 45,
51
+ TRANSACTION_ALLOCATION_DELETED = 46,
52
+ TRANSACTION_CREATED = 47,
53
+ TRANSACTION_DELETED = 48,
54
+ TRANSACTION_UPDATED = 49,
55
+ TRANSACTIONS_CREATED = 50,
56
+ VEHICLE_CLAIM_UPDATED = 51,
57
+ VEHICLE_CLAIM_CREATED = 52,
58
+ VEHICLE_CLAIM_DETAILS_UPDATED = 53,
59
+ VEHICLE_CLAIM_DETAILS_CREATED = 54,
60
+ VEHICLE_LOGBOOK_CREATED = 55,
61
+ VEHICLE_LOGBOOK_UPDATED = 56,
62
+ VEHICLE_LOGBOOK_DELETED = 57,
63
+ VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED = 58
66
64
  }
@@ -15,4 +15,3 @@ export * from './property-subscription';
15
15
  export * from './property-valuation';
16
16
  export * from './property';
17
17
  export * from './borrowing-report';
18
- export * from './share-filter-options.enum';
@@ -6,6 +6,7 @@ import { Property } from './property';
6
6
  export declare class PropertyCategoryMovement extends PropertyCategoryMovementBase implements MpTrackableInterface {
7
7
  valuation: PropertyValuation;
8
8
  propertyCategory: PropertyCategory;
9
+ property: Property;
9
10
  fromDate: Date;
10
11
  toDate: Date;
11
12
  getMpData(property: Property): {
@@ -5,7 +5,6 @@ import { Property } from './property';
5
5
  export declare class PropertyValuation extends PropertyValuationBase implements MpTrackableInterface {
6
6
  date: Date;
7
7
  document: PropertyDocument;
8
- marketValue: number;
9
8
  get financialYear(): number;
10
9
  isCurrentYear(): boolean;
11
10
  getMpData(property: Property): {
@@ -5,7 +5,6 @@ import { Address } from '../address';
5
5
  import { PropertyCategory } from './property-category';
6
6
  import { PropertyValuation } from './property-valuation';
7
7
  import { PropertyForecast } from './property-forecast';
8
- import { PropertyCategoryMovement } from './property-category-movement';
9
8
  import { User } from '../user';
10
9
  import { TaxExemptionEnum } from '../../db/Enums/property/property-sale/tax-exemption.enum';
11
10
  import { PropertySale } from './property-sale';
@@ -13,6 +12,7 @@ import { unitOfTime } from 'moment';
13
12
  import { DepreciationCollection, TransactionCollection } from '../../collections';
14
13
  import { AppFile } from '../file';
15
14
  import { MpTrackableInterface } from '../../interfaces';
15
+ import { PropertyCategoryMovement } from './property-category-movement';
16
16
  /**
17
17
  * propertySale docs - https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/4209508353/Property+Sold+button
18
18
  */
@@ -28,12 +28,14 @@ export declare class Property extends PropertyBase implements MpTrackableInterfa
28
28
  settlementDate: Date;
29
29
  address: Address;
30
30
  category: PropertyCategory;
31
+ categoryMovements: PropertyCategoryMovement[];
31
32
  stampDuty?: number;
32
33
  legalFees?: number;
33
34
  otherCapitalCosts?: number;
34
- valuations: PropertyValuation[];
35
35
  forecasts: PropertyForecast[];
36
- categoryMovements: PropertyCategoryMovement[];
36
+ shares: PropertyShare[];
37
+ valuations: PropertyValuation[];
38
+ valuation: PropertyValuation;
37
39
  user: User;
38
40
  subscriptions: PropertySubscription[];
39
41
  file: AppFile;
@@ -43,21 +45,17 @@ export declare class Property extends PropertyBase implements MpTrackableInterfa
43
45
  isOwn(): boolean;
44
46
  isSold(): boolean;
45
47
  get capitalCostsTotalAmount(): number;
46
- get currentYearValuations(): PropertyValuation[];
47
48
  get marketValue(): number;
48
49
  get currentYearForecast(): PropertyForecast;
49
50
  get forecastedRentalReturn(): number;
50
51
  get forecastedTaxPosition(): number;
51
52
  get forecastedCashPosition(): number;
52
- get firstForecastYear(): number;
53
53
  get marketValueGrowth(): number;
54
54
  get myShare(): PropertyShare;
55
- get actualValuation(): PropertyValuation;
56
55
  get claimPercent(): number;
57
56
  get claimCoefficient(): number;
58
57
  get sharePercent(): number;
59
58
  get shareRatio(): number;
60
- get previousCategory(): PropertyCategory;
61
59
  getCurrentSubscription(): PropertySubscription;
62
60
  getForecastByYear(year: number): PropertyForecast;
63
61
  get isShared(): boolean;
@@ -20,7 +20,7 @@ export declare abstract class DataService<BaseModel, Model extends AbstractModel
20
20
  * Create new instance of class
21
21
  * @param model Single object or array from which will be created model instance(s)
22
22
  */
23
- protected createModelInstance(model: BaseModel): Model;
23
+ protected createModelInstance(model: object): Model;
24
24
  protected createCollectionInstance(collectionClass: new (items: Model[]) => CollectionModel, items: Model[]): CollectionModel;
25
25
  /**
26
26
  * never return cache directly to prevent update
@@ -1,6 +1,6 @@
1
1
  import { NgZone } from '@angular/core';
2
2
  import { Observable } from 'rxjs';
3
- import { JwtService } from '../auth/jwt.service';
3
+ import { JwtService } from '../auth';
4
4
  import * as i0 from "@angular/core";
5
5
  /**
6
6
  * server sent events service
@@ -34,7 +34,7 @@ export declare class BankAccountService extends RestService<BankAccountBase, Ban
34
34
  */
35
35
  private listenToEventDispatcherChanges;
36
36
  /**
37
- * @TODO don't refresh the whole cache, update what's needed
37
+ * @TODO remove when TT-3826 is ready
38
38
  * manualConnection moved to basiq, old manual bankAccounts closed to let user add automated bankAccounts (because there is no reliable way to merge)
39
39
  */
40
40
  private listenConnections;
@@ -3,25 +3,21 @@ import { BankConnection as BankConnectionBase } from '../../../../db/Models';
3
3
  import { RestMethod, RestService } from '../../rest';
4
4
  import { BankConnection } from '../../../../models';
5
5
  import { IEventListener } from '../../../../interfaces';
6
- import { HttpClient } from '@angular/common/http';
7
6
  import { Collection } from '../../../../collections';
8
- import { EventDispatcherService, SseService } from '../../../event';
9
7
  import * as i0 from "@angular/core";
10
8
  /**
11
9
  * BankConnection means user account at specific bank (usually each user has only one at the same bank)
12
10
  * service handles BankConnection management
13
11
  */
14
12
  export declare class BankConnectionService extends RestService<BankConnectionBase, BankConnection, Collection<BankConnection>> implements IEventListener {
15
- protected http: HttpClient;
16
- protected eventDispatcherService: EventDispatcherService;
17
- protected sseService: SseService;
18
13
  protected environment: any;
19
- isApiPlatform: boolean;
20
14
  modelClass: typeof BankConnection;
21
15
  collectionClass: typeof Collection;
22
16
  endpointUri: string;
23
17
  disabledMethods: RestMethod[];
24
- constructor(http: HttpClient, eventDispatcherService: EventDispatcherService, sseService: SseService, environment: any);
18
+ mercureTopic: string;
19
+ constructor(environment: any);
20
+ listenEvents(): void;
25
21
  /**
26
22
  * there is no put BankConnection method, we have to post to update
27
23
  * POST endpoint is using for create and for update.
@@ -29,10 +25,6 @@ export declare class BankConnectionService extends RestService<BankConnectionBas
29
25
  post(bankConnection: BankConnection): Observable<BankConnection>;
30
26
  activate(bankConnection: BankConnection): Observable<BankConnection>;
31
27
  deactivate(bankConnection: BankConnection): Observable<BankConnection>;
32
- /**
33
- * connection's status updated in background on backend, so reset cache required to inform user
34
- */
35
- listenBankConnections(): void;
36
28
  static ɵfac: i0.ɵɵFactoryDeclaration<BankConnectionService, never>;
37
29
  static ɵprov: i0.ɵɵInjectableDeclaration<BankConnectionService>;
38
30
  }
@@ -9,10 +9,12 @@ import * as i0 from "@angular/core";
9
9
  * Service for bank transactions business logic
10
10
  */
11
11
  export declare class BankTransactionService extends RestService<BankTransactionBase, BankTransaction, BankTransactionCollection> implements IEventListener {
12
+ protected environment: any;
12
13
  endpointUri: string;
13
14
  modelClass: typeof BankTransaction;
14
15
  collectionClass: typeof BankTransactionCollection;
15
16
  disabledMethods: RestMethod[];
17
+ constructor(environment: any);
16
18
  listenEvents(): void;
17
19
  /**
18
20
  * Get list of bank transactions for provided financial year
@@ -10,7 +10,6 @@ export declare class BankService extends RestService<BankBase, Bank, Collection<
10
10
  modelClass: typeof Bank;
11
11
  collectionClass: typeof Collection;
12
12
  endpointUri: string;
13
- isApiPlatform: boolean;
14
13
  disabledMethods: RestMethod[];
15
14
  static ɵfac: i0.ɵɵFactoryDeclaration<BankService, never>;
16
15
  static ɵprov: i0.ɵɵInjectableDeclaration<BankService>;
@@ -7,7 +7,6 @@ export declare class BudgetService extends RestService<BudgetBase, Budget, Colle
7
7
  modelClass: typeof Budget;
8
8
  collectionClass: typeof Collection;
9
9
  endpointUri: string;
10
- isApiPlatform: boolean;
11
10
  disabledMethods: RestMethod[];
12
11
  static ɵfac: i0.ɵɵFactoryDeclaration<BudgetService, never>;
13
12
  static ɵprov: i0.ɵɵInjectableDeclaration<BudgetService>;
@@ -10,7 +10,6 @@ export declare class ChartAccountsDepreciationService extends RestService<ChartA
10
10
  endpointUri: string;
11
11
  modelClass: typeof ChartAccountsDepreciation;
12
12
  collectionClass: typeof Collection;
13
- isApiPlatform: boolean;
14
13
  disabledMethods: RestMethod[];
15
14
  static ɵfac: i0.ɵɵFactoryDeclaration<ChartAccountsDepreciationService, never>;
16
15
  static ɵprov: i0.ɵɵInjectableDeclaration<ChartAccountsDepreciationService>;
@@ -1,6 +1,4 @@
1
1
  import { Chat as ChatBase } from '../../../db/Models';
2
- import { HttpClient } from '@angular/common/http';
3
- import { EventDispatcherService } from '../../event';
4
2
  import { RestMethod, RestService } from '../rest';
5
3
  import { Chat } from '../../../models';
6
4
  import { ChatCollection } from '../../../collections';
@@ -11,18 +9,16 @@ import * as i0 from "@angular/core";
11
9
  * Service for work with chats
12
10
  */
13
11
  export declare class ChatService extends RestService<ChatBase, Chat, ChatCollection> implements IEventListener {
14
- protected http: HttpClient;
15
- protected eventDispatcherService: EventDispatcherService;
16
12
  protected environment: any;
17
13
  modelClass: typeof Chat;
18
14
  collectionClass: typeof ChatCollection;
19
15
  endpointUri: string;
20
- isApiPlatform: boolean;
21
16
  disabledMethods: RestMethod[];
22
- constructor(http: HttpClient, eventDispatcherService: EventDispatcherService, environment: any);
17
+ constructor(environment: any);
18
+ listenEvents(): void;
23
19
  get(path?: string): Observable<ChatCollection>;
24
20
  /**
25
- * Listen chats events
21
+ * @TODO refactor with listenSSE method
26
22
  */
27
23
  listenChats(): void;
28
24
  /**
@@ -9,11 +9,12 @@ import * as i0 from "@angular/core";
9
9
  * Service for work with Message Documents
10
10
  */
11
11
  export declare class MessageDocumentService extends RestService<MessageDocumentBase, MessageDocument, MessageDocumentCollection> implements IEventListener {
12
+ protected environment: any;
12
13
  modelClass: typeof MessageDocument;
13
14
  collectionClass: typeof MessageDocumentCollection;
14
15
  endpointUri: string;
15
16
  disabledMethods: RestMethod[];
16
- isApiPlatform: boolean;
17
+ constructor(environment: any);
17
18
  /**
18
19
  * SSE and Event Dispatcher Services listeners
19
20
  */
@@ -1,37 +1,21 @@
1
1
  import { Message as MessageBase } from '../../../db/Models';
2
- import { HttpClient } from '@angular/common/http';
3
2
  import { Message } from '../../../models';
4
3
  import { RestMethod, RestService } from '../rest';
5
- import { EventDispatcherService } from '../../event';
6
4
  import { MessageCollection } from '../../../collections';
7
5
  import { IEventListener } from '../../../interfaces';
8
- import { Observable } from 'rxjs';
9
6
  import * as i0 from "@angular/core";
10
7
  /**
11
8
  * Service for work with messages
12
9
  */
13
10
  export declare class MessageService extends RestService<MessageBase, Message, MessageCollection> implements IEventListener {
14
- protected http: HttpClient;
15
- protected eventDispatcherService: EventDispatcherService;
16
11
  protected environment: any;
17
12
  modelClass: typeof Message;
18
13
  collectionClass: typeof MessageCollection;
19
14
  endpointUri: string;
20
- isApiPlatform: boolean;
21
15
  disabledMethods: RestMethod[];
22
- constructor(http: HttpClient, eventDispatcherService: EventDispatcherService, environment: any);
23
- /**
24
- * Overwrite default methods because we need to handle messages via SSE events only
25
- */
26
- post(message: Message): Observable<Message>;
27
- /**
28
- * Overwrite default methods because we need to handle messages via SSE events only
29
- */
30
- put(message: Message): Observable<Message>;
31
- /**
32
- * subscribe to new chat messages
33
- */
34
- private listenMessages;
16
+ mercureTopic: string;
17
+ constructor(environment: any);
18
+ listenEvents(): void;
35
19
  static ɵfac: i0.ɵɵFactoryDeclaration<MessageService, never>;
36
20
  static ɵprov: i0.ɵɵInjectableDeclaration<MessageService>;
37
21
  }
@@ -7,7 +7,6 @@ export declare class AnnualClientDetailsService extends RestService<AnnualClient
7
7
  modelClass: typeof AnnualClientDetails;
8
8
  collectionClass: typeof Collection;
9
9
  endpointUri: string;
10
- isApiPlatform: boolean;
11
10
  disabledMethods: RestMethod[];
12
11
  static ɵfac: i0.ɵɵFactoryDeclaration<AnnualClientDetailsService, never>;
13
12
  static ɵprov: i0.ɵɵInjectableDeclaration<AnnualClientDetailsService>;
@@ -5,8 +5,9 @@ import { Depreciation } from '../../../models';
5
5
  import { DepreciationCollection } from '../../../collections';
6
6
  import { HttpClient } from '@angular/common/http';
7
7
  import { EventDispatcherService } from '../../event';
8
+ import { IEventListener } from '../../../interfaces';
8
9
  import * as i0 from "@angular/core";
9
- export declare class DepreciationService extends RestService<DepreciationBase, Depreciation, DepreciationCollection> {
10
+ export declare class DepreciationService extends RestService<DepreciationBase, Depreciation, DepreciationCollection> implements IEventListener {
10
11
  protected http: HttpClient;
11
12
  protected eventDispatcherService: EventDispatcherService;
12
13
  protected environment: any;
@@ -8,7 +8,6 @@ export declare class DocumentService extends RestService<DocumentBase, Document,
8
8
  modelClass: typeof Document;
9
9
  collectionClass: typeof Collection;
10
10
  disabledMethods: RestMethod[];
11
- protected isApiPlatform: boolean;
12
11
  static ɵfac: i0.ɵɵFactoryDeclaration<DocumentService, never>;
13
12
  static ɵprov: i0.ɵɵInjectableDeclaration<DocumentService>;
14
13
  }