taxtank-core 0.23.10 → 0.24.2

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 (112) hide show
  1. package/bundles/taxtank-core.umd.js +457 -303
  2. package/bundles/taxtank-core.umd.js.map +1 -1
  3. package/esm2015/lib/collections/client-invite.collection.js +10 -0
  4. package/esm2015/lib/forms/index.js +2 -3
  5. package/esm2015/lib/forms/user/index.js +4 -0
  6. package/esm2015/lib/forms/user/user-invite.form.js +16 -0
  7. package/esm2015/lib/interceptors/basiq.interceptor.js +3 -3
  8. package/esm2015/lib/interceptors/corelogic-interceptor.js +3 -3
  9. package/esm2015/lib/interceptors/financial-year-interceptor.js +3 -3
  10. package/esm2015/lib/interceptors/interceptors.module.js +4 -4
  11. package/esm2015/lib/interceptors/jwt-interceptor.js +3 -3
  12. package/esm2015/lib/interceptors/preloader.interceptor.js +3 -3
  13. package/esm2015/lib/interceptors/user-switcher-interceptor.js +3 -3
  14. package/esm2015/lib/models/endpoint/endpoints.const.js +3 -1
  15. package/esm2015/lib/models/event/app-event-type.enum.js +13 -8
  16. package/esm2015/lib/services/account-setup/account-setup.service.js +3 -3
  17. package/esm2015/lib/services/asset/assets.service.js +3 -3
  18. package/esm2015/lib/services/auth/auth.service.js +3 -3
  19. package/esm2015/lib/services/auth/jwt.service.js +3 -3
  20. package/esm2015/lib/services/bank/bank-account-calculation.service.js +3 -3
  21. package/esm2015/lib/services/bank/bank-transaction-calculation.service.js +3 -3
  22. package/esm2015/lib/services/event/event-dispatcher.service.js +3 -3
  23. package/esm2015/lib/services/event/sse.service.js +3 -3
  24. package/esm2015/lib/services/export/export-formatter.service.js +3 -3
  25. package/esm2015/lib/services/header-title/header-title.service.js +3 -3
  26. package/esm2015/lib/services/http/address/address.service.js +3 -3
  27. package/esm2015/lib/services/http/bank/bank-account/bank-account.service.js +3 -3
  28. package/esm2015/lib/services/http/bank/bank-connection/bank-connection.service.js +3 -3
  29. package/esm2015/lib/services/http/bank/bank-transaction/bank-transaction.service.js +3 -3
  30. package/esm2015/lib/services/http/bank/bank.service.js +3 -3
  31. package/esm2015/lib/services/http/bank/basiq/basiq-token.service.js +3 -3
  32. package/esm2015/lib/services/http/bank/basiq/basiq.service.js +3 -3
  33. package/esm2015/lib/services/http/chart-accounts/chart-accounts-depreciations/chart-accounts-depreciations.service.js +3 -3
  34. package/esm2015/lib/services/http/chart-accounts/chart-accounts.service.js +3 -3
  35. package/esm2015/lib/services/http/chat/chat.service.js +3 -3
  36. package/esm2015/lib/services/http/chat/message/message.service.js +3 -3
  37. package/esm2015/lib/services/http/chat/message-document/message-document.service.js +3 -3
  38. package/esm2015/lib/services/http/depreciation/depreciation-capital-project/depreciation-capital-project.service.js +3 -3
  39. package/esm2015/lib/services/http/depreciation/depreciation.service.js +3 -3
  40. package/esm2015/lib/services/http/document/document-folder/document-folder.service.js +3 -3
  41. package/esm2015/lib/services/http/facebook/facebook.service.js +3 -3
  42. package/esm2015/lib/services/http/firm/client-income/client-income-types.service.js +3 -3
  43. package/esm2015/lib/services/http/firm/client-invite/client-invite.service.js +3 -3
  44. package/esm2015/lib/services/http/firm/client-movement/client-movement.service.js +3 -3
  45. package/esm2015/lib/services/http/firm/employee/employee.service.js +3 -3
  46. package/esm2015/lib/services/http/firm/employee-invite/employee-invite.service.js +3 -3
  47. package/esm2015/lib/services/http/firm/firm.service.js +3 -3
  48. package/esm2015/lib/services/http/firm/portfolio-report/client-portfolio-report.service.js +3 -3
  49. package/esm2015/lib/services/http/income-source/income-source-forecast/income-source-forecast.service.js +3 -3
  50. package/esm2015/lib/services/http/income-source/income-source.service.js +3 -3
  51. package/esm2015/lib/services/http/income-source/salary-forecast/salary-forecast.service.js +3 -3
  52. package/esm2015/lib/services/http/income-source/sole-forecast/sole-forecast.service.js +3 -3
  53. package/esm2015/lib/services/http/loan/borrowing-expense/borrowing-expense.service.js +3 -3
  54. package/esm2015/lib/services/http/loan/loan.service.js +3 -3
  55. package/esm2015/lib/services/http/property/property-category/property-category.service.js +3 -3
  56. package/esm2015/lib/services/http/property/property-category-movement/property-category-movement.service.js +3 -3
  57. package/esm2015/lib/services/http/property/property-document/property-document.service.js +3 -3
  58. package/esm2015/lib/services/http/property/property-sale/property-sale.service.js +3 -3
  59. package/esm2015/lib/services/http/property/property-sale/tax-exemption/tax-exemption.service.js +3 -3
  60. package/esm2015/lib/services/http/property/property-share/property-share.service.js +3 -3
  61. package/esm2015/lib/services/http/property/property.service.js +3 -3
  62. package/esm2015/lib/services/http/rest/rest.service.js +3 -3
  63. package/esm2015/lib/services/http/service-notification/service-notification.service.js +3 -3
  64. package/esm2015/lib/services/http/sole/sole-business/sole-business.service.js +3 -3
  65. package/esm2015/lib/services/http/sole/sole-contact/sole-contact.service.js +3 -3
  66. package/esm2015/lib/services/http/sole/sole-details/sole-details.service.js +3 -3
  67. package/esm2015/lib/services/http/subscription/service-price.service.js +3 -3
  68. package/esm2015/lib/services/http/subscription/subscription.service.js +3 -3
  69. package/esm2015/lib/services/http/tax-review/tax-review-history/tax-review-history.service.js +3 -3
  70. package/esm2015/lib/services/http/tax-review/tax-review.service.js +3 -3
  71. package/esm2015/lib/services/http/tax-summary/tax-summary.service.js +3 -3
  72. package/esm2015/lib/services/http/transaction/transaction-allocation/transaction-allocation.service.js +3 -3
  73. package/esm2015/lib/services/http/transaction/transaction-receipt/transaction-receipt.service.js +70 -0
  74. package/esm2015/lib/services/http/transaction/transaction.service.js +46 -30
  75. package/esm2015/lib/services/http/tutorial-video/tutorial-video.service.js +3 -3
  76. package/esm2015/lib/services/http/user/occupation/occupation.service.js +3 -3
  77. package/esm2015/lib/services/http/user/user-event-setting/user-event-setting.service.js +3 -3
  78. package/esm2015/lib/services/http/user/user-event-type/user-event-type.service.js +3 -3
  79. package/esm2015/lib/services/http/user/user.service.js +3 -3
  80. package/esm2015/lib/services/http/user/users-invite/users-invite.service.js +23 -0
  81. package/esm2015/lib/services/http/vehicle/vehicle-claim.service.js +3 -3
  82. package/esm2015/lib/services/http/vehicle/vehicle-logbook.service.js +3 -3
  83. package/esm2015/lib/services/http/vehicle/vehicle.service.js +3 -3
  84. package/esm2015/lib/services/intercom/intercom.service.js +3 -3
  85. package/esm2015/lib/services/kompassify/kompassify.service.js +3 -3
  86. package/esm2015/lib/services/pdf/pdf-from-dom-element/pdf-from-dom-element.service.js +3 -3
  87. package/esm2015/lib/services/pdf/pdf-from-table/pdf-from-data-table/pdf-from-data-table.service.js +3 -3
  88. package/esm2015/lib/services/pdf/pdf-from-table/pdf-from-html-table/pdf-from-html-table.service.js +3 -3
  89. package/esm2015/lib/services/pdf/pdf-from-table/pdf-from-table.service.js +3 -3
  90. package/esm2015/lib/services/preloader/preloader.service.js +3 -3
  91. package/esm2015/lib/services/property/corelogic/corelogic.service.js +3 -3
  92. package/esm2015/lib/services/property/equity-position-chart/equity-position-chart.service.js +3 -3
  93. package/esm2015/lib/services/property/property-calculation/property-calculation.service.js +3 -3
  94. package/esm2015/lib/services/report/property/property-transaction-report.service.js +3 -3
  95. package/esm2015/lib/services/toast/toast.service.js +3 -3
  96. package/esm2015/lib/services/transaction/transaction-calculation.service.js +3 -3
  97. package/esm2015/lib/services/user/user-switcher.service.js +3 -3
  98. package/esm2015/lib/services/xlsx/xlsx.service.js +3 -3
  99. package/esm2015/lib/tt-core.module.js +4 -4
  100. package/esm2015/public-api.js +3 -1
  101. package/fesm2015/taxtank-core.js +423 -301
  102. package/fesm2015/taxtank-core.js.map +1 -1
  103. package/lib/collections/client-invite.collection.d.ts +8 -0
  104. package/lib/forms/index.d.ts +1 -2
  105. package/lib/forms/user/index.d.ts +3 -0
  106. package/lib/forms/user/user-invite.form.d.ts +8 -0
  107. package/lib/models/event/app-event-type.enum.d.ts +12 -7
  108. package/lib/services/http/transaction/transaction-receipt/transaction-receipt.service.d.ts +28 -0
  109. package/lib/services/http/transaction/transaction.service.d.ts +12 -5
  110. package/lib/services/http/user/users-invite/users-invite.service.d.ts +13 -0
  111. package/package.json +1 -1
  112. package/public-api.d.ts +2 -0
@@ -0,0 +1,8 @@
1
+ import { Collection } from './collection';
2
+ import { ClientInvite } from '../models/client/client-invite';
3
+ /**
4
+ * Collection of tax review
5
+ */
6
+ export declare class ClientInviteCollection extends Collection<ClientInvite> {
7
+ getPending(): this;
8
+ }
@@ -10,8 +10,7 @@ export * from './client/client-income-types.form';
10
10
  export * from './login/login.form';
11
11
  export * from './register/register-client.form';
12
12
  export * from './register/register-firm.form';
13
- export * from './user/password.form';
14
- export * from './user/reset-password.form';
13
+ export * from './user';
15
14
  export * from './vehicle/vehicle.form';
16
15
  export * from './vehicle/vehicle-claim.form';
17
16
  export * from './report/my-tax';
@@ -0,0 +1,3 @@
1
+ export * from './password.form';
2
+ export * from './reset-password.form';
3
+ export * from './user-invite.form';
@@ -0,0 +1,8 @@
1
+ import { AbstractForm } from '../abstract.form';
2
+ import { RegistrationInvite } from '../../models/registration-invite/registration-invite';
3
+ /**
4
+ * Form for inviting an unregistered user
5
+ */
6
+ export declare class UserInviteForm extends AbstractForm<RegistrationInvite> {
7
+ constructor();
8
+ }
@@ -39,11 +39,16 @@ export declare enum AppEventTypeEnum {
39
39
  TRANSACTION_CREATED = 37,
40
40
  TRANSACTION_DELETED = 38,
41
41
  TRANSACTION_UPDATED = 39,
42
- TRANSACTIONS_CREATED = 40,
43
- USER_UPDATED = 41,
44
- VEHICLE_CLAIM_UPDATED = 42,
45
- VEHICLE_CLAIM_CREATED = 43,
46
- VEHICLE_LOGBOOK_CREATED = 44,
47
- VEHICLE_LOGBOOK_UPDATED = 45,
48
- VEHICLE_LOGBOOK_DELETED = 46
42
+ TRANSACTION_CREATED_WITH_NEW_RECEIPT = 40,
43
+ TRANSACTION_UPDATED_WITH_NEW_RECEIPT = 41,
44
+ TRANSACTION_UPDATED_WITH_DELETED_RECEIPT = 42,
45
+ TRANSACTION_RECEIPT_CREATED = 43,
46
+ TRANSACTION_RECEIPT_DELETED = 44,
47
+ TRANSACTIONS_CREATED = 45,
48
+ USER_UPDATED = 46,
49
+ VEHICLE_CLAIM_UPDATED = 47,
50
+ VEHICLE_CLAIM_CREATED = 48,
51
+ VEHICLE_LOGBOOK_CREATED = 49,
52
+ VEHICLE_LOGBOOK_UPDATED = 50,
53
+ VEHICLE_LOGBOOK_DELETED = 51
49
54
  }
@@ -0,0 +1,28 @@
1
+ import { Transaction } from '../../../../models/transaction/transaction';
2
+ import { HttpClient } from '@angular/common/http';
3
+ import { EventDispatcherService } from '../../../event/event-dispatcher.service';
4
+ import { IEventListener } from '../../../../interfaces/event-listener.interface';
5
+ import * as i0 from "@angular/core";
6
+ export declare class TransactionReceiptService implements IEventListener {
7
+ private http;
8
+ private eventDispatcherService;
9
+ private environment;
10
+ url: string;
11
+ constructor(http: HttpClient, eventDispatcherService: EventDispatcherService, environment: any);
12
+ /**
13
+ * Transaction instance is necessary to take the ID and the receipt file from it.
14
+ */
15
+ add(transaction: Transaction): void;
16
+ /**
17
+ * Transaction instance is necessary to take the ID and the receipt ID from it.
18
+ */
19
+ delete(transaction: Transaction): void;
20
+ listenEvents(): void;
21
+ private listenTransactionWithReceiptUpdated;
22
+ /**
23
+ * Case when transaction was updated, but receipt was removed
24
+ */
25
+ private listenTransactionWithoutReceiptUpdated;
26
+ static ɵfac: i0.ɵɵFactoryDeclaration<TransactionReceiptService, never>;
27
+ static ɵprov: i0.ɵɵInjectableDeclaration<TransactionReceiptService>;
28
+ }
@@ -5,14 +5,24 @@ import { RestService } from '../rest/rest.service';
5
5
  import { Transaction } from '../../../models/transaction/transaction';
6
6
  import { ChartAccounts } from '../../../models/chart-accounts/chart-accounts';
7
7
  import { ChartAccountsTaxLabelsEnum } from '../../../models/chart-accounts/chart-accounts-tax-labels.enum';
8
+ import { TransactionReceiptService } from './transaction-receipt/transaction-receipt.service';
9
+ import { HttpClient } from '@angular/common/http';
10
+ import { EventDispatcherService } from '../../event/event-dispatcher.service';
11
+ import { ToastService } from '../../toast/toast.service';
8
12
  import * as i0 from "@angular/core";
9
13
  /**
10
14
  * Service for transactions business logic
11
15
  */
12
16
  export declare class TransactionService extends RestService<TransactionBase, Transaction> {
17
+ protected http: HttpClient;
18
+ protected eventDispatcherService: EventDispatcherService;
19
+ protected environment: any;
20
+ protected toastService: ToastService;
21
+ private transactionReceiptService;
13
22
  url: string;
14
23
  modelClass: typeof Transaction;
15
24
  transactionDeleted: EventEmitter<Transaction>;
25
+ constructor(http: HttpClient, eventDispatcherService: EventDispatcherService, environment: any, toastService: ToastService, transactionReceiptService: TransactionReceiptService);
16
26
  /**
17
27
  * Listen events from Event Dispatcher services
18
28
  */
@@ -62,11 +72,6 @@ export declare class TransactionService extends RestService<TransactionBase, Tra
62
72
  * @param model
63
73
  */
64
74
  delete(model: Transaction): Observable<void>;
65
- /**
66
- * upload transaction receipt image
67
- * @param transaction Еhe transaction for which the receipt will be imported
68
- */
69
- uploadReceipt(transaction: Transaction): void;
70
75
  /**
71
76
  * calculate gross income amount based on transaction amount and taxes (fees)
72
77
  * @param transaction Transaction instance for calculation
@@ -85,6 +90,8 @@ export declare class TransactionService extends RestService<TransactionBase, Tra
85
90
  * Listen to EventDispatcherService event related to Property Share changing
86
91
  */
87
92
  private listenPropertyShareUpdate;
93
+ private listenReceiptAdded;
94
+ private listenReceiptDeleted;
88
95
  static ɵfac: i0.ɵɵFactoryDeclaration<TransactionService, never>;
89
96
  static ɵprov: i0.ɵɵInjectableDeclaration<TransactionService>;
90
97
  }
@@ -0,0 +1,13 @@
1
+ import { RestService } from '../../rest/rest.service';
2
+ import { RegistrationInvite as RegistrationInviteBase } from '../../../../db/Models/user/registration-invite';
3
+ import { RegistrationInvite } from '../../../../models/registration-invite/registration-invite';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Service to work with invitations for unregistered users
7
+ */
8
+ export declare class UsersInviteService extends RestService<RegistrationInviteBase, RegistrationInvite> {
9
+ modelClass: typeof RegistrationInvite;
10
+ url: string;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<UsersInviteService, never>;
12
+ static ɵprov: i0.ɵɵInjectableDeclaration<UsersInviteService>;
13
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "0.23.10",
3
+ "version": "0.24.2",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^12.2.3 || ~13.0.0",
package/public-api.d.ts CHANGED
@@ -40,6 +40,7 @@ export * from './lib/collections/user-event-setting.collection';
40
40
  export * from './lib/collections/vehicle.collection';
41
41
  export * from './lib/collections/vehicle-logbook.collection';
42
42
  export * from './lib/collections/exportable.collection';
43
+ export * from './lib/collections/client-invite.collection';
43
44
  /**
44
45
  * DB models
45
46
  */
@@ -367,6 +368,7 @@ export * from './lib/services/http/user/user.service';
367
368
  export * from './lib/services/user/user-switcher.service';
368
369
  export * from './lib/services/http/user/user-event-setting/user-event-setting.service';
369
370
  export * from './lib/services/http/user/user-event-type/user-event-type.service';
371
+ export * from './lib/services/http/user/users-invite/users-invite.service';
370
372
  export * from './lib/services/http/vehicle/vehicle.service';
371
373
  export * from './lib/services/http/vehicle/vehicle-claim.service';
372
374
  export * from './lib/services/http/vehicle/vehicle-logbook.service';