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
@@ -8,7 +8,6 @@ export declare class FileService extends RestService<FileBase, AppFile, Collecti
8
8
  protected endpointUri: string;
9
9
  modelClass: typeof AppFile;
10
10
  collectionClass: typeof Collection;
11
- isApiPlatform: boolean;
12
11
  disabledMethods: RestMethod[];
13
12
  getById(id: number): Observable<AppFile>;
14
13
  getLink(id: number): Observable<string>;
@@ -7,7 +7,6 @@ export declare class ClientIncomeTypesService extends RestService<ClientIncomeTy
7
7
  modelClass: typeof ClientIncomeTypes;
8
8
  collectionClass: typeof Collection;
9
9
  endpointUri: string;
10
- isApiPlatform: boolean;
11
10
  disabledMethods: RestMethod[];
12
11
  static ɵfac: i0.ɵɵFactoryDeclaration<ClientIncomeTypesService, never>;
13
12
  static ɵprov: i0.ɵɵInjectableDeclaration<ClientIncomeTypesService>;
@@ -1,14 +1,18 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { ClientInvite as ClientInviteBase } from '../../../../db/Models/firm/client-invite';
3
- import { RestService } from '../../rest/rest.service';
3
+ import { RestService } from '../../rest';
4
4
  import { ClientInvite } from '../../../../models';
5
5
  import { IEventListener } from '../../../../interfaces';
6
6
  import { ClientInviteCollection } from '../../../../collections';
7
7
  import * as i0 from "@angular/core";
8
8
  export declare class ClientInviteService extends RestService<ClientInviteBase, ClientInvite, ClientInviteCollection> implements IEventListener {
9
+ protected environment: any;
9
10
  protected endpointUri: string;
10
11
  collectionClass: typeof ClientInviteCollection;
11
12
  modelClass: typeof ClientInvite;
13
+ mercureTopic: string;
14
+ constructor(environment: any);
15
+ listenEvents(): void;
12
16
  getFirmInvites(): Observable<ClientInviteCollection>;
13
17
  /**
14
18
  * Get invite which employee is TaxTank Advisor
@@ -35,11 +39,6 @@ export declare class ClientInviteService extends RestService<ClientInviteBase, C
35
39
  * Send invitation from client to firm
36
40
  */
37
41
  inviteFirmByUser(invite: ClientInvite): Observable<ClientInvite>;
38
- /**
39
- * Listem clientInvites db changes via mercure to update cache
40
- * @TODO make it universal and move to parent
41
- */
42
- listenSSE(): void;
43
42
  static ɵfac: i0.ɵɵFactoryDeclaration<ClientInviteService, never>;
44
43
  static ɵprov: i0.ɵɵInjectableDeclaration<ClientInviteService>;
45
44
  }
@@ -1,18 +1,20 @@
1
1
  import { ClientMovement as ClientMovementBase } from '../../../../db/Models/firm/client-movement';
2
2
  import { Observable } from 'rxjs';
3
- import { ClientMovementCollection } from '../../../../collections/client-movement.collection';
3
+ import { ClientMovementCollection } from '../../../../collections';
4
4
  import { FirmTypeEnum } from '../../../../db/Enums/firm-type.enum';
5
- import { RestService } from '../../rest/rest.service';
6
- import { ClientMovement } from '../../../../models/client/client-movement';
7
- import { IEventListener } from '../../../../interfaces/event-listener.interface';
5
+ import { RestService } from '../../rest';
6
+ import { ClientMovement } from '../../../../models';
7
+ import { IEventListener } from '../../../../interfaces';
8
8
  import { RestMethod } from '../../rest';
9
9
  import * as i0 from "@angular/core";
10
10
  export declare class ClientMovementService extends RestService<ClientMovementBase, ClientMovement, ClientMovementCollection> implements IEventListener {
11
+ protected environment: any;
11
12
  protected endpointUri: string;
12
13
  collectionClass: typeof ClientMovementCollection;
13
14
  modelClass: typeof ClientMovement;
14
- isApiPlatform: boolean;
15
15
  disabledMethods: RestMethod[];
16
+ mercureTopic: string;
17
+ constructor(environment: any);
16
18
  listenEvents(): void;
17
19
  getActive(): Observable<ClientMovementCollection>;
18
20
  getTTAdvisor(): Observable<ClientMovement>;
@@ -30,11 +32,6 @@ export declare class ClientMovementService extends RestService<ClientMovementBas
30
32
  * Reject current firm
31
33
  */
32
34
  close(clientMovement: ClientMovement): Observable<void>;
33
- /**
34
- * Listem clientMovements db changes via mercure to update cache
35
- * @TODO make it universal and move to parent
36
- */
37
- listenSSE(): void;
38
35
  static ɵfac: i0.ɵɵFactoryDeclaration<ClientMovementService, never>;
39
36
  static ɵprov: i0.ɵɵInjectableDeclaration<ClientMovementService>;
40
37
  }
@@ -8,7 +8,6 @@ export declare class HoldingSaleService extends RestService<HoldingSaleBase, Hol
8
8
  modelClass: typeof HoldingSale;
9
9
  collectionClass: typeof HoldingSaleCollection;
10
10
  endpointUri: string;
11
- isApiPlatform: boolean;
12
11
  disabledMethods: RestMethod[];
13
12
  static ɵfac: i0.ɵɵFactoryDeclaration<HoldingSaleService, never>;
14
13
  static ɵprov: i0.ɵɵInjectableDeclaration<HoldingSaleService>;
@@ -7,7 +7,6 @@ export declare class HoldingTypeService extends RestService<HoldingTypeBase, Hol
7
7
  modelClass: typeof HoldingType;
8
8
  collectionClass: typeof HoldingTypeCollection;
9
9
  endpointUri: string;
10
- isApiPlatform: boolean;
11
10
  disabledMethods: RestMethod[];
12
11
  static ɵfac: i0.ɵɵFactoryDeclaration<HoldingTypeService, never>;
13
12
  static ɵprov: i0.ɵɵInjectableDeclaration<HoldingTypeService>;
@@ -6,12 +6,13 @@ import { IEventListener } from '../../../interfaces';
6
6
  import { UserRolesEnum } from '../../../db/Enums/user-roles.enum';
7
7
  import * as i0 from "@angular/core";
8
8
  export declare class HoldingService extends RestService<HoldingBase, Holding, HoldingCollection> implements IEventListener {
9
+ protected environment: any;
9
10
  modelClass: typeof Holding;
10
11
  collectionClass: typeof HoldingCollection;
11
12
  endpointUri: string;
12
- isApiPlatform: boolean;
13
13
  disabledMethods: RestMethod[];
14
14
  roles: UserRolesEnum[];
15
+ constructor(environment: any);
15
16
  listenEvents(): void;
16
17
  static ɵfac: i0.ɵɵFactoryDeclaration<HoldingService, never>;
17
18
  static ɵprov: i0.ɵɵInjectableDeclaration<HoldingService>;
@@ -7,8 +7,10 @@ import * as i0 from "@angular/core";
7
7
  * Service to work with Other Income Forecasts
8
8
  */
9
9
  export declare class IncomeSourceForecastService extends RestService<IncomeSourceForecastBase, IncomeSourceForecast> implements IEventListener {
10
+ protected environment: any;
10
11
  modelClass: typeof IncomeSourceForecast;
11
12
  url: string;
13
+ constructor(environment: any);
12
14
  /**
13
15
  * Listen to Income Sources events
14
16
  */
@@ -1,16 +1,18 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { IncomeSource as IncomeSourceBase } from '../../../db/Models/incomeSource/income-source';
3
3
  import { RestService } from '../rest/rest-old.service';
4
- import { SalaryForecast, IncomeSource } from '../../../models';
5
- import { IncomeSourceTypeEnum } from '../../../db/Enums/income-source/income-source-type.enum';
4
+ import { IncomeSource, SalaryForecast } from '../../../models';
5
+ import { IncomeSourceTypeEnum } from '../../../db/Enums/income-source';
6
6
  import { IEventListener } from '../../../interfaces';
7
7
  import * as i0 from "@angular/core";
8
8
  /**
9
9
  * Service to work with income sources
10
10
  */
11
11
  export declare class IncomeSourceService extends RestService<IncomeSourceBase, IncomeSource> implements IEventListener {
12
+ protected environment: any;
12
13
  url: string;
13
14
  modelClass: typeof IncomeSource;
15
+ constructor(environment: any);
14
16
  listenEvents(): void;
15
17
  /**
16
18
  * Get income sources tax calculation
@@ -1,14 +1,16 @@
1
1
  import { SalaryForecast as SalaryForecastBase } from '../../../../db/Models/incomeSource/salary-forecast';
2
2
  import { RestService } from '../../rest/rest-old.service';
3
- import { SalaryForecast } from '../../../../models/income-source/salary-forecast';
4
- import { IEventListener } from '../../../../interfaces/event-listener.interface';
3
+ import { SalaryForecast } from '../../../../models';
4
+ import { IEventListener } from '../../../../interfaces';
5
5
  import * as i0 from "@angular/core";
6
6
  /**
7
7
  * Service to work with Salary Forecasts
8
8
  */
9
9
  export declare class SalaryForecastService extends RestService<SalaryForecastBase, SalaryForecast> implements IEventListener {
10
+ protected environment: any;
10
11
  modelClass: typeof SalaryForecast;
11
12
  url: string;
13
+ constructor(environment: any);
12
14
  /**
13
15
  * Listen to Income Sources events
14
16
  */
@@ -1,11 +1,13 @@
1
1
  import { SoleForecast as SoleForecastBase } from '../../../../db/Models/sole/sole-forecast';
2
2
  import { RestService } from '../../rest/rest-old.service';
3
- import { SoleForecast } from '../../../../models/income-source/sole-forecast';
4
- import { IEventListener } from '../../../../interfaces/event-listener.interface';
3
+ import { SoleForecast } from '../../../../models';
4
+ import { IEventListener } from '../../../../interfaces';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class SoleForecastService extends RestService<SoleForecastBase, SoleForecast> implements IEventListener {
7
+ protected environment: any;
7
8
  modelClass: typeof SoleForecast;
8
9
  url: string;
10
+ constructor(environment: any);
9
11
  /**
10
12
  * Listen to Income Sources events
11
13
  */
@@ -9,10 +9,12 @@ import * as i0 from "@angular/core";
9
9
  * Service that handling loans logic
10
10
  */
11
11
  export declare class LoanService extends RestService<LoanBase, Loan, LoanCollection> implements IEventListener {
12
+ protected environment: any;
12
13
  endpointUri: string;
13
14
  modelClass: typeof Loan;
14
15
  collectionClass: typeof LoanCollection;
15
16
  disabledMethods: RestMethod[];
17
+ constructor(environment: any);
16
18
  /**
17
19
  * Listen to Loans events
18
20
  */
@@ -5,7 +5,6 @@ import { Collection } from '../../../../collections';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class BorrowingReportService extends RestService<BorrowingReportBase, BorrowingReport, Collection<BorrowingReport>> {
7
7
  endpointUri: string;
8
- isApiPlatform: boolean;
9
8
  modelClass: typeof BorrowingReport;
10
9
  collectionClass: typeof Collection;
11
10
  disabledMethods: RestMethod[];
@@ -1,25 +1,16 @@
1
- import { Observable } from 'rxjs';
2
1
  import { PropertyDocument as PropertyDocumentBase } from '../../../../db/Models';
3
2
  import { RestMethod, RestService } from '../../rest';
4
3
  import { PropertyDocument } from '../../../../models';
5
- import { IEventListener } from '../../../../interfaces';
6
4
  import { Collection } from '../../../../collections';
7
5
  import * as i0 from "@angular/core";
8
6
  /**
9
7
  * Class for work with Property Documents
10
8
  */
11
- export declare class PropertyDocumentService extends RestService<PropertyDocumentBase, PropertyDocument, Collection<PropertyDocument>> implements IEventListener {
9
+ export declare class PropertyDocumentService extends RestService<PropertyDocumentBase, PropertyDocument, Collection<PropertyDocument>> {
12
10
  modelClass: typeof PropertyDocument;
13
11
  collectionClass: typeof Collection;
14
12
  endpointUri: string;
15
13
  disabledMethods: RestMethod[];
16
- protected isApiPlatform: boolean;
17
- /**
18
- * Add new Property Document
19
- */
20
- upload(file: File, propertyId: number): Observable<PropertyDocument>;
21
- listenEvents(): void;
22
- private listenPropertyUpdateWithDocument;
23
14
  static ɵfac: i0.ɵɵFactoryDeclaration<PropertyDocumentService, never>;
24
15
  static ɵprov: i0.ɵɵInjectableDeclaration<PropertyDocumentService>;
25
16
  }
@@ -6,10 +6,12 @@ import { IEventListener } from '../../../../interfaces';
6
6
  import { PropertyShareCollection } from '../../../../collections';
7
7
  import * as i0 from "@angular/core";
8
8
  export declare class PropertyShareService extends RestService<PropertyShareBase, PropertyShare, PropertyShareCollection> implements IEventListener {
9
+ protected environment: any;
9
10
  endpointUri: string;
10
11
  modelClass: typeof PropertyShare;
11
12
  collectionClass: typeof PropertyShareCollection;
12
13
  disabledMethods: RestMethod[];
14
+ constructor(environment: any);
13
15
  /**
14
16
  * Listen to Event Dispatcher events
15
17
  */
@@ -3,19 +3,14 @@ import { PropertyValuation as PropertyValuationBase } from '../../../../db/Model
3
3
  import { Property, PropertyValuation } from '../../../../models';
4
4
  import { Collection } from '../../../../collections';
5
5
  import { Observable } from 'rxjs';
6
+ import { PropertyValuationCollection } from '../../../../collections';
6
7
  import * as i0 from "@angular/core";
7
- /**
8
- * @TODO Alex: refacotor with api platform (old endpoint)
9
- */
10
- export declare class PropertyValuationService extends RestService<PropertyValuationBase, PropertyValuation, Collection<PropertyValuation>> {
8
+ export declare class PropertyValuationService extends RestService<PropertyValuationBase, PropertyValuation, PropertyValuationCollection> {
11
9
  protected endpointUri: string;
12
10
  modelClass: typeof PropertyValuation;
13
11
  collectionClass: typeof Collection<PropertyValuation>;
14
12
  disabledMethods: RestMethod[];
15
- protected isApiPlatform: boolean;
16
- get(propertyId: string): Observable<Collection<PropertyValuation>>;
17
13
  post(valuation: PropertyValuation, property: Property): Observable<PropertyValuation>;
18
- put(valuation: PropertyValuation, property: Property): Observable<PropertyValuation>;
19
14
  static ɵfac: i0.ɵɵFactoryDeclaration<PropertyValuationService, never>;
20
15
  static ɵprov: i0.ɵɵInjectableDeclaration<PropertyValuationService>;
21
16
  }
@@ -11,40 +11,31 @@ import * as i0 from "@angular/core";
11
11
  * Service for work with Property
12
12
  */
13
13
  export declare class PropertyService extends RestService<PropertyBase, Property, PropertyCollection> implements IEventListener {
14
+ protected environment: any;
14
15
  modelClass: typeof Property;
15
16
  collectionClass: typeof PropertyCollection;
16
17
  endpointUri: string;
17
18
  disabledMethods: RestMethod[];
18
- put(property: Property): Observable<Property>;
19
- listenEvents(): void;
20
- /**
21
- * Update cache when share invitation accepted
22
- */
23
- private listenShareInviteAccepted;
19
+ constructor(environment: any);
24
20
  /**
25
- * Update cache when property category changed
21
+ * @TODO remove when forecast moved to separated api
26
22
  */
27
- private listenMovementsChanges;
23
+ put(property: Property): Observable<Property>;
28
24
  /**
29
- * Update cache when property sales changed
25
+ * @TODO no refresh cache with this.updateCache([this.getCache().findBy('id', change.model.property.id)], 'put');
30
26
  */
31
- private listenSalesChanges;
32
- private listenValuations;
27
+ listenEvents(): void;
33
28
  updateDepreciationCalculation(property: Property): Observable<void>;
34
29
  /**
30
+ * @TODO move to separated api
35
31
  * Activate deactivated property
36
32
  */
37
33
  activate(property: Property): Observable<void>;
38
34
  /**
35
+ * @TODO move to separated api
39
36
  * Deactivate activated property
40
37
  */
41
38
  deactivate(property: Property): Observable<void>;
42
- /**
43
- * Update property photo
44
- * @param property Property instance for photo update
45
- * @param photoFormData FormData with property photo image
46
- */
47
- updatePhoto(property: Property, photoFormData: FormData): Observable<void>;
48
39
  static ɵfac: i0.ɵɵFactoryDeclaration<PropertyService, never>;
49
40
  static ɵprov: i0.ɵɵInjectableDeclaration<PropertyService>;
50
41
  }
@@ -2,7 +2,6 @@ import { Observable, ReplaySubject } from 'rxjs';
2
2
  import { HttpClient } from '@angular/common/http';
3
3
  import { EventDispatcherService } from '../../event';
4
4
  import { ToastService } from '../../toast';
5
- import { IEventListener } from '../../../interfaces';
6
5
  import { UserRolesEnum } from '../../../db/Enums/user-roles.enum';
7
6
  import { MixpanelService } from '../../mixpanel/mixpanel.service';
8
7
  import * as i0 from "@angular/core";
@@ -13,16 +12,15 @@ import * as i0 from "@angular/core";
13
12
  * BaseModel - base entity model that extends by Model
14
13
  * @TODO TT-1777 Alex: remove when all services refactored
15
14
  */
16
- export declare abstract class RestService<BaseModel, Model extends BaseModel> implements IEventListener {
17
- protected http: HttpClient;
18
- protected eventDispatcherService: EventDispatcherService;
15
+ export declare abstract class RestService<BaseModel, Model extends BaseModel> {
19
16
  protected environment: any;
20
17
  protected toastService: ToastService;
18
+ protected http: HttpClient;
19
+ protected eventDispatcherService: EventDispatcherService;
21
20
  abstract url: string;
22
21
  abstract modelClass: any;
23
22
  protected cache: Model[];
24
23
  protected cacheSubject: ReplaySubject<Model[]>;
25
- protected isHydra: boolean;
26
24
  messageCreated: string;
27
25
  messageCreatedBatch: string;
28
26
  messageUpdated: string;
@@ -31,7 +29,7 @@ export declare abstract class RestService<BaseModel, Model extends BaseModel> im
31
29
  messageDeletedBatch: string;
32
30
  protected mpService: MixpanelService;
33
31
  roles: UserRolesEnum[];
34
- constructor(http: HttpClient, eventDispatcherService: EventDispatcherService, environment: any, toastService: ToastService);
32
+ constructor(environment: any);
35
33
  protected get apiUrl(): string;
36
34
  /**
37
35
  * get list of base class instances directly from backend
@@ -112,10 +110,6 @@ export declare abstract class RestService<BaseModel, Model extends BaseModel> im
112
110
  * @param model instance that we will use as constructor options
113
111
  */
114
112
  protected createModelInstance(model: BaseModel | object): Model;
115
- /**
116
- * Method that call all listeners. Empty by default. Should be redefined by child services if required
117
- */
118
- listenEvents(): void;
119
113
  static ɵfac: i0.ɵɵFactoryDeclaration<RestService<any, any>, never>;
120
114
  static ɵprov: i0.ɵɵInjectableDeclaration<RestService<any, any>>;
121
115
  }
@@ -1,7 +1,6 @@
1
1
  import { Observable, ReplaySubject } from 'rxjs';
2
2
  import { HttpClient } from '@angular/common/http';
3
3
  import { EventDispatcherService, SseService } from '../../event';
4
- import { IEventListener } from '../../../interfaces';
5
4
  import { Collection } from '../../../collections';
6
5
  import { AbstractModel, ObservableModel } from '../../../db/Models';
7
6
  import { RestMethod } from './rest-method.type';
@@ -18,9 +17,7 @@ import * as i0 from "@angular/core";
18
17
  * BaseModel - base entity model that extends by Model
19
18
  * CollectionModel - entity collection class
20
19
  */
21
- export declare abstract class RestService<BaseModel, Model extends AbstractModel, CollectionModel extends Collection<Model>> extends DataService<BaseModel, Model, CollectionModel> implements IEventListener {
22
- protected http: HttpClient;
23
- protected eventDispatcherService: EventDispatcherService;
20
+ export declare abstract class RestService<BaseModel, Model extends AbstractModel, CollectionModel extends Collection<Model>> extends DataService<BaseModel, Model, CollectionModel> {
24
21
  protected environment: any;
25
22
  /**
26
23
  * Url part for service entity API
@@ -30,10 +27,6 @@ export declare abstract class RestService<BaseModel, Model extends AbstractModel
30
27
  * Subject for service cache
31
28
  */
32
29
  protected cacheSubject: ReplaySubject<CollectionModel>;
33
- /**
34
- * Flag for work with API platform
35
- */
36
- protected isApiPlatform: boolean;
37
30
  /**
38
31
  * List of methods unavailable for current API
39
32
  * @TODO Alex: add and handle enabled methods too
@@ -43,12 +36,11 @@ export declare abstract class RestService<BaseModel, Model extends AbstractModel
43
36
  protected mpService: MixpanelService;
44
37
  protected sseService: SseService;
45
38
  protected toastService: ToastService;
39
+ protected http: HttpClient;
40
+ protected eventDispatcherService: EventDispatcherService;
46
41
  roles: UserRolesEnum[];
47
- /**
48
- * disable cache update by requests, update only by SSE events
49
- */
50
- disableCache: boolean;
51
- constructor(http: HttpClient, eventDispatcherService: EventDispatcherService, environment: any);
42
+ mercureTopic: string;
43
+ constructor(environment: any);
52
44
  protected get apiUrl(): string;
53
45
  setCache(data: any[], next?: boolean): void;
54
46
  /**
@@ -113,18 +105,13 @@ export declare abstract class RestService<BaseModel, Model extends AbstractModel
113
105
  * @param methods The list of http methods should be listened for
114
106
  * @param callback The function to be called when event triggered
115
107
  */
116
- protected listenCSE(modelClass: typeof ObservableModel, methods: HttpMethod[], callback: Function): void;
108
+ protected listenCSE(modelClass: typeof ObservableModel, callback: Function, methods?: HttpMethod[]): void;
117
109
  /**
118
110
  * check if user has subscription role to access api
119
111
  */
120
112
  hasRoles(): boolean;
121
113
  /**
122
- * // @TODO Alex remove
123
- * Method that call all listeners. Empty by default. Should be redefined by child services if required
124
- */
125
- listenEvents(): void;
126
- /**
127
- * Listen SSE events
114
+ * Listen for Server-Sent Events (SSE) on the specified Mercure topic
128
115
  */
129
116
  listenSSE(): void;
130
117
  static ɵfac: i0.ɵɵFactoryDeclaration<RestService<any, any, any>, never>;
@@ -1,26 +1,25 @@
1
1
  import { ServiceNotification as NotificationBase } from '../../../db/Models/service-notification';
2
- import { Notification } from '../../../models/notification/notification';
3
- import { HttpClient } from '@angular/common/http';
2
+ import { Notification } from '../../../models';
4
3
  import { RestService } from '../rest/rest-old.service';
5
- import { EventDispatcherService } from '../../event/event-dispatcher.service';
6
- import { SseService } from '../../event/sse.service';
7
- import { ToastService } from '../../toast/toast.service';
4
+ import { EventDispatcherService } from '../../event';
5
+ import { SseService } from '../../event';
6
+ import { ToastService } from '../../toast';
7
+ import { IEventListener } from '../../../interfaces';
8
8
  import * as i0 from "@angular/core";
9
9
  /**
10
10
  * Service to handle service notifications logic
11
11
  */
12
- export declare class ServiceNotificationService extends RestService<NotificationBase, Notification> {
13
- protected http: HttpClient;
12
+ export declare class ServiceNotificationService extends RestService<NotificationBase, Notification> implements IEventListener {
14
13
  protected eventDispatcherService: EventDispatcherService;
15
14
  protected environment: any;
16
15
  protected toastService: ToastService;
17
16
  private sseService;
18
17
  modelClass: typeof Notification;
19
18
  url: string;
20
- isHydra: boolean;
21
- constructor(http: HttpClient, eventDispatcherService: EventDispatcherService, environment: any, toastService: ToastService, sseService: SseService);
19
+ constructor(eventDispatcherService: EventDispatcherService, environment: any, toastService: ToastService, sseService: SseService);
20
+ listenEvents(): void;
22
21
  /**
23
- * subscribe to new chat messages
22
+ * @TODO refactor with listenSSE
24
23
  */
25
24
  private listenNotifications;
26
25
  static ɵfac: i0.ɵɵFactoryDeclaration<ServiceNotificationService, never>;
@@ -1,11 +1,10 @@
1
1
  import { AccountSetupItemCollection } from '../../../collections';
2
2
  import { SetupItem } from '../../../db/Models/setup-item';
3
3
  import { AccountSetupItem } from '../../../models/account-setup/account-setup-item';
4
- import { RestService, RestMethod } from '../rest';
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> {
7
7
  protected endpointUri: string;
8
- protected isApiPlatform: boolean;
9
8
  modelClass: typeof AccountSetupItem;
10
9
  collectionClass: typeof AccountSetupItemCollection;
11
10
  disabledMethods: RestMethod[];
@@ -5,7 +5,6 @@ import * as i0 from "@angular/core";
5
5
  export declare class BasReportService extends RestService<BasReportBase, BasReport> {
6
6
  modelClass: typeof BasReport;
7
7
  url: string;
8
- isHydra: boolean;
9
8
  static ɵfac: i0.ɵɵFactoryDeclaration<BasReportService, never>;
10
9
  static ɵprov: i0.ɵɵInjectableDeclaration<BasReportService>;
11
10
  }
@@ -6,7 +6,6 @@ import * as i0 from "@angular/core";
6
6
  export declare class SoleBusinessService extends RestService<SoleBusinessBase, SoleBusiness> {
7
7
  modelClass: typeof SoleBusiness;
8
8
  url: string;
9
- isHydra: boolean;
10
9
  add(soleBusiness: SoleBusiness): Observable<SoleBusiness>;
11
10
  static ɵfac: i0.ɵɵFactoryDeclaration<SoleBusinessService, never>;
12
11
  static ɵprov: i0.ɵɵInjectableDeclaration<SoleBusinessService>;
@@ -5,7 +5,6 @@ import * as i0 from "@angular/core";
5
5
  export declare class SoleBusinessActivityService extends RestService<SoleBusinessActivityBase, SoleBusinessActivity> {
6
6
  modelClass: typeof SoleBusinessActivity;
7
7
  url: string;
8
- isHydra: boolean;
9
8
  static ɵfac: i0.ɵɵFactoryDeclaration<SoleBusinessActivityService, never>;
10
9
  static ɵprov: i0.ɵɵInjectableDeclaration<SoleBusinessActivityService>;
11
10
  }
@@ -7,7 +7,6 @@ import * as i0 from "@angular/core";
7
7
  export declare class SoleBusinessLossOffsetRuleService extends RestService<SoleBusinessLossOffsetRule, SoleBusinessLossOffsetRule> {
8
8
  modelClass: typeof SoleBusinessLossOffsetRule;
9
9
  url: string;
10
- isHydra: boolean;
11
10
  static ɵfac: i0.ɵɵFactoryDeclaration<SoleBusinessLossOffsetRuleService, never>;
12
11
  static ɵprov: i0.ɵɵInjectableDeclaration<SoleBusinessLossOffsetRuleService>;
13
12
  }
@@ -1,12 +1,13 @@
1
1
  import { RestService } from '../../rest/rest-old.service';
2
2
  import { SoleBusinessLoss as SoleBusinessLossBase } from '../../../../db/Models/sole/sole-business-loss';
3
3
  import { SoleBusinessLoss } from '../../../../models';
4
- import { IEventListener } from '../../../../interfaces/event-listener.interface';
4
+ import { IEventListener } from '../../../../interfaces';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class SoleBusinessLossService extends RestService<SoleBusinessLossBase, SoleBusinessLoss> implements IEventListener {
7
+ protected environment: any;
7
8
  modelClass: typeof SoleBusinessLoss;
8
9
  url: string;
9
- isHydra: boolean;
10
+ constructor(environment: any);
10
11
  listenEvents(): void;
11
12
  /**
12
13
  * Listen business created because we create prior year losses together with business
@@ -5,7 +5,6 @@ import * as i0 from "@angular/core";
5
5
  export declare class SoleContactService extends RestService<SoleContactBase, SoleContact> {
6
6
  modelClass: typeof SoleContact;
7
7
  url: string;
8
- isHydra: boolean;
9
8
  static ɵfac: i0.ɵɵFactoryDeclaration<SoleContactService, never>;
10
9
  static ɵprov: i0.ɵɵInjectableDeclaration<SoleContactService>;
11
10
  }
@@ -1,9 +1,9 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
2
  import { SoleDepreciationMethod } from '../../../../models';
3
3
  import { Observable, ReplaySubject } from 'rxjs';
4
- import { EventDispatcherService } from '../../../event/event-dispatcher.service';
5
- import { ToastService } from '../../../toast/toast.service';
6
- import { IEventListener } from '../../../../interfaces/event-listener.interface';
4
+ import { EventDispatcherService } from '../../../event';
5
+ import { ToastService } from '../../../toast';
6
+ import { IEventListener } from '../../../../interfaces';
7
7
  import * as i0 from "@angular/core";
8
8
  /**
9
9
  * @TODO Alex: extend rest service when refactored
@@ -3,14 +3,15 @@ import { SoleInvoice as SoleInvoiceBase } from '../../../../db/Models/sole/sole-
3
3
  import { SoleInvoice } from '../../../../models';
4
4
  import { SoleInvoiceStatusesEnum } from '../../../../db/Enums/sole-invoice-statuses.enum';
5
5
  import { Observable } from 'rxjs';
6
- import { IEventListener } from '../../../../interfaces/event-listener.interface';
6
+ import { IEventListener } from '../../../../interfaces';
7
7
  import { UserRolesEnum } from '../../../../db/Enums/user-roles.enum';
8
8
  import * as i0 from "@angular/core";
9
9
  export declare class SoleInvoiceService extends RestService<SoleInvoiceBase, SoleInvoice> implements IEventListener {
10
+ protected environment: any;
10
11
  modelClass: typeof SoleInvoice;
11
12
  url: string;
12
- isHydra: boolean;
13
13
  roles: UserRolesEnum[];
14
+ constructor(environment: any);
14
15
  listenEvents(): void;
15
16
  add(invoice: SoleInvoice): Observable<SoleInvoice>;
16
17
  update(invoice: SoleInvoice): Observable<SoleInvoice>;
@@ -5,7 +5,6 @@ import * as i0 from "@angular/core";
5
5
  export declare class SoleInvoiceTemplateService extends RestService<SoleInvoiceTemplateBase, SoleInvoiceTemplate> {
6
6
  modelClass: typeof SoleInvoiceTemplate;
7
7
  url: string;
8
- isHydra: boolean;
9
8
  static ɵfac: i0.ɵɵFactoryDeclaration<SoleInvoiceTemplateService, never>;
10
9
  static ɵprov: i0.ɵɵInjectableDeclaration<SoleInvoiceTemplateService>;
11
10
  }
@@ -5,7 +5,6 @@ import { ServicePayment as ServicePaymentBase } from '../../../../db/Models';
5
5
  import { Observable } from 'rxjs';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class ServicePaymentService extends RestService<ServicePaymentBase, ServicePayment, Collection<ServicePayment>> {
8
- isApiPlatform: boolean;
9
8
  endpointUri: string;
10
9
  modelClass: typeof ServicePayment;
11
10
  collectionClass: typeof Collection;