taxtank-core 0.30.75 → 0.30.77

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 (179) hide show
  1. package/esm2020/lib/collections/bank-account.collection.mjs +1 -1
  2. package/esm2020/lib/db/Enums/bank/bank-account-status.enum.mjs +6 -0
  3. package/esm2020/lib/db/Enums/{bank-account-type.enum.mjs → bank/bank-account-type.enum.mjs} +1 -1
  4. package/esm2020/lib/db/Enums/bank/bank-connection-status.enum.mjs +9 -0
  5. package/esm2020/lib/db/Enums/bank/bank-popular.enum.mjs +14 -0
  6. package/esm2020/lib/db/Enums/bank/bank-provider.enum.mjs +7 -0
  7. package/esm2020/lib/db/Enums/bank/bank-transaction-type.enum.mjs +6 -0
  8. package/esm2020/lib/db/Enums/bank/index.mjs +7 -0
  9. package/esm2020/lib/db/Enums/index.mjs +2 -1
  10. package/esm2020/lib/db/Models/bank/bank-account.mjs +1 -1
  11. package/esm2020/lib/db/Models/bank/bank-connection.mjs +1 -1
  12. package/esm2020/lib/db/Models/bank/bank-transaction.mjs +1 -1
  13. package/esm2020/lib/db/Models/bank/bank.mjs +1 -1
  14. package/esm2020/lib/db/Models/index.mjs +1 -2
  15. package/esm2020/lib/forms/bank/bank-account/bank-account-add-manual.form.mjs +2 -2
  16. package/esm2020/lib/interceptors/basiq-client-id.interceptor.mjs +3 -3
  17. package/esm2020/lib/interceptors/basiq-token.interceptor.mjs +3 -3
  18. package/esm2020/lib/interceptors/corelogic-interceptor.mjs +3 -3
  19. package/esm2020/lib/interceptors/financial-year-interceptor.mjs +3 -3
  20. package/esm2020/lib/interceptors/interceptors.module.mjs +4 -4
  21. package/esm2020/lib/interceptors/jwt-interceptor.mjs +3 -3
  22. package/esm2020/lib/interceptors/preloader.interceptor.mjs +3 -3
  23. package/esm2020/lib/interceptors/user-switcher-interceptor.mjs +3 -3
  24. package/esm2020/lib/models/bank/bank-account-types.const.mjs +2 -2
  25. package/esm2020/lib/models/bank/bank-account.mjs +3 -3
  26. package/esm2020/lib/models/bank/bank-connection.mjs +34 -13
  27. package/esm2020/lib/models/bank/bank-transaction.mjs +2 -2
  28. package/esm2020/lib/models/bank/bank.mjs +8 -2
  29. package/esm2020/lib/models/bank/type-loan.const.mjs +2 -2
  30. package/esm2020/lib/services/account-setup/account-setup.service.mjs +3 -3
  31. package/esm2020/lib/services/affiliate/rewardful/rewardful.service.mjs +3 -3
  32. package/esm2020/lib/services/asset/assets.service.mjs +3 -3
  33. package/esm2020/lib/services/auth/auth.service.mjs +3 -3
  34. package/esm2020/lib/services/auth/jwt.service.mjs +3 -3
  35. package/esm2020/lib/services/bank/bank-account-calculation.service.mjs +3 -3
  36. package/esm2020/lib/services/bank/bank-transaction-calculation.service.mjs +3 -3
  37. package/esm2020/lib/services/data.service.mjs +3 -3
  38. package/esm2020/lib/services/event/event-dispatcher.service.mjs +3 -3
  39. package/esm2020/lib/services/event/sse.service.mjs +3 -3
  40. package/esm2020/lib/services/export/export-formatter.service.mjs +3 -3
  41. package/esm2020/lib/services/header-title/header-title.service.mjs +3 -3
  42. package/esm2020/lib/services/http/address/address.service.mjs +3 -3
  43. package/esm2020/lib/services/http/bank/bank-account/bank-account.service.mjs +27 -8
  44. package/esm2020/lib/services/http/bank/bank-connection/bank-connection-messages.enum.mjs +17 -0
  45. package/esm2020/lib/services/http/bank/bank-connection/bank-connection.service.mjs +29 -28
  46. package/esm2020/lib/services/http/bank/bank-connection/index.mjs +2 -1
  47. package/esm2020/lib/services/http/bank/bank-transaction/bank-transaction.service.mjs +3 -3
  48. package/esm2020/lib/services/http/bank/bank.service.mjs +9 -8
  49. package/esm2020/lib/services/http/bank/basiq/basiq-token.service.mjs +8 -4
  50. package/esm2020/lib/services/http/bank/basiq/basiq.service.mjs +7 -8
  51. package/esm2020/lib/services/http/chart-accounts/chart-accounts-depreciations/chart-accounts-depreciations.service.mjs +3 -3
  52. package/esm2020/lib/services/http/chart-accounts/chart-accounts.service.mjs +3 -3
  53. package/esm2020/lib/services/http/chat/chat.service.mjs +3 -3
  54. package/esm2020/lib/services/http/chat/message-document.service.mjs +3 -3
  55. package/esm2020/lib/services/http/chat/message.service.mjs +3 -3
  56. package/esm2020/lib/services/http/client/capital-gain/annual-client-details.service.mjs +3 -3
  57. package/esm2020/lib/services/http/client/occupation/occupation.service.mjs +3 -3
  58. package/esm2020/lib/services/http/depreciation/depreciation-capital-project/depreciation-capital-project.service.mjs +3 -3
  59. package/esm2020/lib/services/http/depreciation/depreciation-receipt/depreciation-receipt.service.mjs +3 -3
  60. package/esm2020/lib/services/http/depreciation/depreciation.service.mjs +3 -3
  61. package/esm2020/lib/services/http/document/document-folder/document-folder.service.mjs +3 -3
  62. package/esm2020/lib/services/http/document/document.service.mjs +3 -3
  63. package/esm2020/lib/services/http/facebook/facebook.service.mjs +3 -3
  64. package/esm2020/lib/services/http/file/file.service.mjs +3 -3
  65. package/esm2020/lib/services/http/firm/client-income/client-income-types.service.mjs +3 -3
  66. package/esm2020/lib/services/http/firm/client-invite/client-invite.service.mjs +3 -3
  67. package/esm2020/lib/services/http/firm/client-movement/client-movement.service.mjs +3 -3
  68. package/esm2020/lib/services/http/firm/employee/employee.service.mjs +3 -3
  69. package/esm2020/lib/services/http/firm/employee-invite/employee-invite.service.mjs +3 -3
  70. package/esm2020/lib/services/http/firm/firm.service.mjs +3 -3
  71. package/esm2020/lib/services/http/firm/portfolio-report/client-portfolio-report.service.mjs +3 -3
  72. package/esm2020/lib/services/http/google/google.service.mjs +3 -3
  73. package/esm2020/lib/services/http/holding/holding-sale.service.mjs +3 -3
  74. package/esm2020/lib/services/http/holding/holding-type.service.mjs +3 -3
  75. package/esm2020/lib/services/http/holding/holding.service.mjs +3 -3
  76. package/esm2020/lib/services/http/income-source/income-source-forecast/income-source-forecast.service.mjs +3 -3
  77. package/esm2020/lib/services/http/income-source/income-source.service.mjs +3 -3
  78. package/esm2020/lib/services/http/income-source/salary-forecast/salary-forecast.service.mjs +3 -3
  79. package/esm2020/lib/services/http/income-source/sole-forecast/sole-forecast.service.mjs +3 -3
  80. package/esm2020/lib/services/http/loan/borrowing-expense/borrowing-expense.service.mjs +3 -3
  81. package/esm2020/lib/services/http/loan/loan.service.mjs +3 -3
  82. package/esm2020/lib/services/http/property/property-category/property-category.service.mjs +3 -3
  83. package/esm2020/lib/services/http/property/property-category-movement/property-category-movement.service.mjs +3 -3
  84. package/esm2020/lib/services/http/property/property-document/property-document.service.mjs +3 -3
  85. package/esm2020/lib/services/http/property/property-sale/property-sale.service.mjs +3 -3
  86. package/esm2020/lib/services/http/property/property-share/property-share.service.mjs +3 -3
  87. package/esm2020/lib/services/http/property/property.service.mjs +3 -3
  88. package/esm2020/lib/services/http/receipt/receipt.service.mjs +3 -3
  89. package/esm2020/lib/services/http/rest/rest-old.service.mjs +3 -3
  90. package/esm2020/lib/services/http/rest/rest.service.mjs +8 -6
  91. package/esm2020/lib/services/http/service-notification/service-notification.service.mjs +3 -3
  92. package/esm2020/lib/services/http/sole/bas-report/bas-report.service.mjs +3 -3
  93. package/esm2020/lib/services/http/sole/sole-business/sole-business.service.mjs +3 -3
  94. package/esm2020/lib/services/http/sole/sole-business-activity/sole-business-activity.service.mjs +3 -3
  95. package/esm2020/lib/services/http/sole/sole-business-loss/sole-business-loss-rules/sole-business-loss-offset-rule.service.mjs +3 -3
  96. package/esm2020/lib/services/http/sole/sole-business-loss/sole-business-loss.service.mjs +3 -3
  97. package/esm2020/lib/services/http/sole/sole-contact/sole-contact.service.mjs +3 -3
  98. package/esm2020/lib/services/http/sole/sole-depreciation-method/sole-depreciation-method.service.mjs +3 -3
  99. package/esm2020/lib/services/http/sole/sole-details/sole-details.service.mjs +3 -3
  100. package/esm2020/lib/services/http/sole/sole-invoice/sole-invoice.service.mjs +3 -3
  101. package/esm2020/lib/services/http/sole/sole-invoice-template/sole-invoice-template.service.mjs +3 -3
  102. package/esm2020/lib/services/http/subscription/service-payment/service-payment.service.mjs +3 -3
  103. package/esm2020/lib/services/http/subscription/service-payment-method/service-payment-method.service.mjs +3 -3
  104. package/esm2020/lib/services/http/subscription/service-price/service-price.service.mjs +3 -3
  105. package/esm2020/lib/services/http/subscription/service-product/service-product.service.mjs +3 -3
  106. package/esm2020/lib/services/http/subscription/service-subscription/subscription.service.mjs +3 -3
  107. package/esm2020/lib/services/http/tax-review/tax-review-history/tax-review-history.service.mjs +3 -3
  108. package/esm2020/lib/services/http/tax-review/tax-review.service.mjs +3 -3
  109. package/esm2020/lib/services/http/tax-summary/tax-summary.service.mjs +3 -3
  110. package/esm2020/lib/services/http/transaction/transaction-allocation/allocation-rule/allocation-rule.service.mjs +3 -3
  111. package/esm2020/lib/services/http/transaction/transaction-allocation/transaction-allocation.service.mjs +3 -3
  112. package/esm2020/lib/services/http/transaction/transaction-receipt/transaction-receipt.service.mjs +3 -3
  113. package/esm2020/lib/services/http/transaction/transaction.service.mjs +3 -3
  114. package/esm2020/lib/services/http/tutorial-video/tutorial-video.service.mjs +3 -3
  115. package/esm2020/lib/services/http/user/user-event-setting/user-event-setting.service.mjs +3 -3
  116. package/esm2020/lib/services/http/user/user-event-type/user-event-type.service.mjs +3 -3
  117. package/esm2020/lib/services/http/user/user.service.mjs +3 -3
  118. package/esm2020/lib/services/http/user/users-invite/users-invite.service.mjs +3 -3
  119. package/esm2020/lib/services/http/vehicle/vehicle-claim-details.service.mjs +3 -3
  120. package/esm2020/lib/services/http/vehicle/vehicle-claim.service.mjs +3 -3
  121. package/esm2020/lib/services/http/vehicle/vehicle-logbook.service.mjs +3 -3
  122. package/esm2020/lib/services/http/vehicle/vehicle.service.mjs +3 -3
  123. package/esm2020/lib/services/intercom/intercom.service.mjs +3 -3
  124. package/esm2020/lib/services/json/holding/holding-type-exchange.service.mjs +3 -3
  125. package/esm2020/lib/services/json/income-source/income-source-type.service.mjs +3 -3
  126. package/esm2020/lib/services/json/tax-exemption/tax-exemption.service.mjs +3 -3
  127. package/esm2020/lib/services/pdf/pdf-from-dom-element/pdf-from-dom-element.service.mjs +3 -3
  128. package/esm2020/lib/services/pdf/pdf-from-table/pdf-from-data-table/pdf-from-data-table.service.mjs +3 -3
  129. package/esm2020/lib/services/pdf/pdf-from-table/pdf-from-html-table/pdf-from-html-table.service.mjs +3 -3
  130. package/esm2020/lib/services/pdf/pdf-from-table/pdf-from-table.service.mjs +3 -3
  131. package/esm2020/lib/services/preloader/preloader.service.mjs +3 -3
  132. package/esm2020/lib/services/property/corelogic/corelogic.service.mjs +3 -3
  133. package/esm2020/lib/services/property/equity-position-chart/equity-position-chart.service.mjs +3 -3
  134. package/esm2020/lib/services/property/property-calculation/property-calculation.service.mjs +3 -3
  135. package/esm2020/lib/services/report/property/property-transaction-report.service.mjs +3 -3
  136. package/esm2020/lib/services/toast/toast.service.mjs +3 -3
  137. package/esm2020/lib/services/transaction/transaction-calculation.service.mjs +3 -3
  138. package/esm2020/lib/services/user/user-switcher.service.mjs +3 -3
  139. package/esm2020/lib/services/vehicle/logbook-best-period.service.mjs +3 -3
  140. package/esm2020/lib/services/xlsx/xlsx.service.mjs +3 -3
  141. package/esm2020/lib/tt-core.module.mjs +4 -4
  142. package/esm2020/public-api.mjs +1 -5
  143. package/fesm2015/taxtank-core.mjs +14245 -14169
  144. package/fesm2015/taxtank-core.mjs.map +1 -1
  145. package/fesm2020/taxtank-core.mjs +14132 -14058
  146. package/fesm2020/taxtank-core.mjs.map +1 -1
  147. package/lib/collections/bank-account.collection.d.ts +1 -1
  148. package/lib/db/Enums/{bank-connection-status.enum.d.ts → bank/bank-connection-status.enum.d.ts} +3 -1
  149. package/lib/db/Enums/bank/bank-provider.enum.d.ts +5 -0
  150. package/lib/db/Enums/bank/index.d.ts +6 -0
  151. package/lib/db/Enums/index.d.ts +1 -0
  152. package/lib/db/Models/bank/bank-account.d.ts +2 -2
  153. package/lib/db/Models/bank/bank-connection.d.ts +2 -1
  154. package/lib/db/Models/bank/bank-transaction.d.ts +1 -1
  155. package/lib/db/Models/bank/bank.d.ts +2 -3
  156. package/lib/db/Models/index.d.ts +0 -1
  157. package/lib/models/bank/bank-account.d.ts +1 -1
  158. package/lib/models/bank/bank-connection.d.ts +9 -9
  159. package/lib/models/bank/bank.d.ts +3 -1
  160. package/lib/models/bank/type-loan.const.d.ts +1 -1
  161. package/lib/services/http/bank/bank-account/bank-account.service.d.ts +12 -0
  162. package/lib/services/http/bank/bank-connection/bank-connection-messages.enum.d.ts +15 -0
  163. package/lib/services/http/bank/bank-connection/bank-connection.service.d.ts +14 -7
  164. package/lib/services/http/bank/bank-connection/index.d.ts +1 -0
  165. package/lib/services/http/bank/basiq/basiq-token.service.d.ts +3 -0
  166. package/lib/services/http/bank/basiq/basiq.service.d.ts +2 -3
  167. package/lib/services/http/rest/rest.service.d.ts +2 -1
  168. package/package.json +1 -1
  169. package/public-api.d.ts +0 -4
  170. package/esm2020/lib/db/Enums/bank-account-status.enum.mjs +0 -6
  171. package/esm2020/lib/db/Enums/bank-connection-status.enum.mjs +0 -7
  172. package/esm2020/lib/db/Enums/bank-popular.enum.mjs +0 -14
  173. package/esm2020/lib/db/Enums/bank-transaction-type.enum.mjs +0 -6
  174. package/esm2020/lib/db/Models/bank/financial-data-system.mjs +0 -4
  175. package/lib/db/Models/bank/financial-data-system.d.ts +0 -10
  176. /package/lib/db/Enums/{bank-account-status.enum.d.ts → bank/bank-account-status.enum.d.ts} +0 -0
  177. /package/lib/db/Enums/{bank-account-type.enum.d.ts → bank/bank-account-type.enum.d.ts} +0 -0
  178. /package/lib/db/Enums/{bank-popular.enum.d.ts → bank/bank-popular.enum.d.ts} +0 -0
  179. /package/lib/db/Enums/{bank-transaction-type.enum.d.ts → bank/bank-transaction-type.enum.d.ts} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { Collection } from './collection';
2
- import { BankAccountTypeEnum } from '../db/Enums/bank-account-type.enum';
2
+ import { BankAccountTypeEnum } from '../db/Enums/bank/bank-account-type.enum';
3
3
  import { TankTypeEnum } from '../db/Enums/tank-type.enum';
4
4
  import { BankAccount } from '../models/bank/bank-account';
5
5
  import { BankAccountProperty } from '../models/bank/bank-account-property';
@@ -1,5 +1,7 @@
1
1
  export declare enum BankConnectionStatusEnum {
2
2
  PENDING = 1,
3
3
  ACTIVE = 2,
4
- INVALID = 3
4
+ INVALID = 3,
5
+ RECONNECTING = 4,
6
+ INACTIVE = 5
5
7
  }
@@ -0,0 +1,5 @@
1
+ export declare enum BankProviderEnum {
2
+ MANUAL = 0,
3
+ WEB_SCRAPPER = 1,
4
+ OPEN_BANKING = 2
5
+ }
@@ -0,0 +1,6 @@
1
+ export * from './bank-account-status.enum';
2
+ export * from './bank-account-type.enum';
3
+ export * from './bank-connection-status.enum';
4
+ export * from './bank-popular.enum';
5
+ export * from './bank-provider.enum';
6
+ export * from './bank-transaction-type.enum';
@@ -2,6 +2,7 @@ export * from './allocation-rule-condition-comparison-operator.enum';
2
2
  export * from './allocation-rule-condition-field.enum';
3
3
  export * from './allocation-rule-condition-operator.enum';
4
4
  export * from './allocation-rule-type.enum';
5
+ export * from './bank';
5
6
  export * from './annual-frequency.enum';
6
7
  export * from './chart-accounts';
7
8
  export * from './document-type.enum';
@@ -1,5 +1,5 @@
1
- import { BankAccountStatusEnum } from '../../Enums/bank-account-status.enum';
2
- import { BankAccountTypeEnum } from '../../Enums/bank-account-type.enum';
1
+ import { BankAccountStatusEnum } from '../../Enums/bank/bank-account-status.enum';
2
+ import { BankAccountTypeEnum } from '../../Enums/bank/bank-account-type.enum';
3
3
  import { BankConnection } from './bank-connection';
4
4
  import { BankAccountProperty } from './bank-account-property';
5
5
  import { BankTransaction } from './bank-transaction';
@@ -1,4 +1,4 @@
1
- import { BankConnectionStatusEnum } from '../../Enums/bank-connection-status.enum';
1
+ import { BankConnectionStatusEnum, BankProviderEnum } from '../../Enums';
2
2
  import { User } from '../user/user';
3
3
  import { Bank } from './bank';
4
4
  import { BankAccount } from './bank-account';
@@ -13,4 +13,5 @@ export declare class BankConnection extends ObservableModel {
13
13
  bankAccounts?: BankAccount[];
14
14
  basiqJob?: BasiqJob;
15
15
  lastSuccessImportDate?: Date;
16
+ provider?: BankProviderEnum;
16
17
  }
@@ -1,4 +1,4 @@
1
- import { BankTransactionTypeEnum } from '../../Enums/bank-transaction-type.enum';
1
+ import { BankTransactionTypeEnum } from '../../Enums/bank/bank-transaction-type.enum';
2
2
  import { BankAccount } from './bank-account';
3
3
  import { BankTransactionImport } from './bank-transaction-import';
4
4
  import { TransactionAllocation } from '../transaction/transaction-allocation';
@@ -1,16 +1,15 @@
1
- import { FinancialDataSystem } from './financial-data-system';
2
1
  import { AbstractModel } from '../abstract-model';
2
+ import { BankProviderEnum } from '../../Enums';
3
3
  export declare class Bank extends AbstractModel {
4
4
  id?: number;
5
5
  name?: string;
6
6
  shortName?: string;
7
7
  externalId?: string;
8
8
  externalStats?: object;
9
- isManual?: boolean;
10
9
  loginFields?: unknown;
11
10
  logo?: string;
12
11
  deletedAt?: Date;
13
12
  createdAt?: Date;
14
13
  updatedAt?: Date;
15
- financialDataSystem?: FinancialDataSystem;
14
+ provider?: BankProviderEnum;
16
15
  }
@@ -6,7 +6,6 @@ export * from './bank/bank-transaction-import';
6
6
  export * from './bank/bank-transaction';
7
7
  export * from './bank/bank';
8
8
  export * from './bank/basiq-job';
9
- export * from './bank/financial-data-system';
10
9
  export * from './chart-accounts/chart-accounts-depreciation';
11
10
  export * from './chart-accounts/chart-accounts-heading';
12
11
  export * from './chart-accounts/chart-accounts-meta-field';
@@ -1,5 +1,5 @@
1
1
  import { BankAccount as BankAccountBase } from '../../db/Models/bank/bank-account';
2
- import { BankAccountTypeEnum } from '../../db/Enums/bank-account-type.enum';
2
+ import { BankAccountTypeEnum } from '../../db/Enums/bank/bank-account-type.enum';
3
3
  import { Loan } from '../loan/loan';
4
4
  import { TankTypeEnum } from '../../db/Enums/tank-type.enum';
5
5
  import { BankAccountBalance } from '../../db/Models/bank/bank-account-balance';
@@ -1,19 +1,19 @@
1
1
  import { BankConnection as BankConnectionBase } from '../../db/Models/bank/bank-connection';
2
- import { BasiqJob } from './basiq/basiq-job';
2
+ import { BasiqJob } from './basiq';
3
3
  import { Bank } from './bank';
4
+ import { BankConnectionMessagesEnum } from '../../services';
4
5
  export declare class BankConnection extends BankConnectionBase {
5
6
  basiqJob: BasiqJob;
6
7
  bank: Bank;
7
8
  lastSuccessImportDate: Date;
8
- /**
9
- * Check if status of connection is inactive (invalid)
10
- */
11
- isInvalid(): boolean;
9
+ isReconnectRequired(): boolean;
12
10
  isPending(): boolean;
13
11
  isActive(): boolean;
14
- /**
15
- * login required for new or disconnected external connections
16
- */
17
- isLoginRequired(): boolean;
12
+ isInactive(): boolean;
18
13
  setPending(): void;
14
+ isOpenBanking(): boolean;
15
+ isBasiq(): boolean;
16
+ isBasiqAvailable(): boolean;
17
+ isOpenBankingAvailable(): boolean;
18
+ get actionRequired(): BankConnectionMessagesEnum;
19
19
  }
@@ -1,10 +1,12 @@
1
1
  import { Bank as BankBase } from '../../db/Models/bank/bank';
2
- import { Photoable } from '../../interfaces/photoable';
2
+ import { Photoable } from '../../interfaces';
3
3
  import { BankExternalStats } from './bank-external-stats';
4
4
  export declare class Bank extends BankBase implements Photoable {
5
5
  logo: string;
6
6
  isPopular: boolean;
7
7
  externalStats: BankExternalStats;
8
8
  getPhotoPlaceholder(): string;
9
+ isManual(): boolean;
10
+ isBasiq(): boolean;
9
11
  getPhoto(): string;
10
12
  }
@@ -1,2 +1,2 @@
1
- import { BankAccountTypeEnum } from '../../db/Enums/bank-account-type.enum';
1
+ import { BankAccountTypeEnum } from '../../db/Enums/bank/bank-account-type.enum';
2
2
  export declare const TYPE_LOAN: BankAccountTypeEnum[];
@@ -4,15 +4,22 @@ import { BankAccount } from '../../../../models';
4
4
  import { RestMethod, RestService } from '../../rest';
5
5
  import { IEventListener } from '../../../../interfaces';
6
6
  import { BankAccountCollection } from '../../../../collections';
7
+ import { EventDispatcherService, SseService } from '../../../event';
8
+ import { HttpClient } from '@angular/common/http';
7
9
  import * as i0 from "@angular/core";
8
10
  /**
9
11
  * Service that handling user's bank accounts logic
10
12
  */
11
13
  export declare class BankAccountService extends RestService<BankAccountBase, BankAccount, BankAccountCollection> implements IEventListener {
14
+ protected http: HttpClient;
15
+ protected eventDispatcherService: EventDispatcherService;
16
+ protected sseService: SseService;
17
+ protected environment: any;
12
18
  endpointUri: string;
13
19
  modelClass: typeof BankAccount;
14
20
  collectionClass: typeof BankAccountCollection;
15
21
  disabledMethods: RestMethod[];
22
+ constructor(http: HttpClient, eventDispatcherService: EventDispatcherService, sseService: SseService, environment: any);
16
23
  /**
17
24
  * Listen system notifications and update cache when got basiq notification received
18
25
  */
@@ -26,6 +33,11 @@ export declare class BankAccountService extends RestService<BankAccountBase, Ban
26
33
  * Listen to EventDispatcherService events
27
34
  */
28
35
  private listenToEventDispatcherChanges;
36
+ /**
37
+ * @TODO don't refresh the whole cache, update what's needed
38
+ * manualConnection moved to basiq, old manual bankAccounts closed to let user add automated bankAccounts (because there is no reliable way to merge)
39
+ */
40
+ private listenConnections;
29
41
  static ɵfac: i0.ɵɵFactoryDeclaration<BankAccountService, never>;
30
42
  static ɵprov: i0.ɵɵInjectableDeclaration<BankAccountService>;
31
43
  }
@@ -0,0 +1,15 @@
1
+ export declare enum BankConnectionMessagesEnum {
2
+ ACTIVATE = "Live bank feeds are deactivated, activate to start receiving daily bank transactions",
3
+ ACTIVATED = "Bank transactions will be delivered daily",
4
+ DEACTIVATE = "Deactivate to stop receiving daily bank transactions",
5
+ CONFIRM_DEACTIVATE = "We are unable to deliver daily bank transactions to deactivated banks",
6
+ DEACTIVATED = "Your live bank feeds are deactivated",
7
+ RECONNECT = "Disconnected, There has been an issue with your bank connection. Please reconnect to continue receiving bank transactions",
8
+ UPGRADE = "Upgrade needed from traditional feeds to an Open Banking connection to continue receiving bank transactions",
9
+ CONFIRM_UPGRADE = "Upgrading to open banking improves stability and data integrity",
10
+ AUTOMATE = "Upgrade from manual imports to an Open Banking connection to receive daily bank transactions",
11
+ CONFIRM_AUTOMATE = "When you upgrade we will deactivate your manual bank and create a new bank in TaxTank with live transactions delivered daily. Manual banks can still be viewed at any time",
12
+ MANAGE = "Select more banks to share with TaxTank",
13
+ CONFIRM_MANAGE = "Reconnect your bank to select more accounts to share with TaxTank",
14
+ PENDING = "We are organising banks and accounts, we will let you know when you are good to go"
15
+ }
@@ -3,11 +3,10 @@ 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 { UserEventTypeTypeEnum } from '../../../../db/Enums/user-event-type-type.enum';
7
6
  import { HttpClient } from '@angular/common/http';
8
7
  import { Collection } from '../../../../collections';
9
8
  import { ToastService } from '../../../toast';
10
- import { EventDispatcherService } from '../../../event';
9
+ import { EventDispatcherService, SseService } from '../../../event';
11
10
  import * as i0 from "@angular/core";
12
11
  /**
13
12
  * BankConnection means user account at specific bank (usually each user has only one at the same bank)
@@ -16,23 +15,31 @@ import * as i0 from "@angular/core";
16
15
  export declare class BankConnectionService extends RestService<BankConnectionBase, BankConnection, Collection<BankConnection>> implements IEventListener {
17
16
  protected http: HttpClient;
18
17
  protected eventDispatcherService: EventDispatcherService;
18
+ protected sseService: SseService;
19
19
  protected environment: any;
20
20
  private toastService;
21
- static userEventTypes: UserEventTypeTypeEnum[];
21
+ isApiPlatform: boolean;
22
22
  modelClass: typeof BankConnection;
23
23
  collectionClass: typeof Collection;
24
24
  endpointUri: string;
25
25
  disabledMethods: RestMethod[];
26
- constructor(http: HttpClient, eventDispatcherService: EventDispatcherService, environment: any, toastService: ToastService);
27
- listenEvents(): void;
26
+ constructor(http: HttpClient, eventDispatcherService: EventDispatcherService, sseService: SseService, environment: any, toastService: ToastService);
28
27
  /**
28
+ * there is no put BankConnection method, we have to post to update
29
29
  * POST endpoint is using for create and for update.
30
30
  */
31
31
  post(bankConnection: BankConnection): Observable<BankConnection>;
32
+ activate(bankConnection: BankConnection): Observable<BankConnection>;
33
+ deactivate(bankConnection: BankConnection): Observable<BankConnection>;
32
34
  /**
33
- * Update cache when basiq accounts were retrieved or login to basic was failed to get actual connections statuses
35
+ * remove basiq connection to create a new one (because basiq has no update option),
36
+ * used for upgrade to openBanking and manage shared bank accounts flow
34
37
  */
35
- listenNotifications(): void;
38
+ deleteBasiq(bankConnection: BankConnection): Observable<BankConnection>;
39
+ /**
40
+ * connection's status updated in background on backend, so reset cache required to inform user
41
+ */
42
+ listenBankConnections(): void;
36
43
  static ɵfac: i0.ɵɵFactoryDeclaration<BankConnectionService, never>;
37
44
  static ɵprov: i0.ɵɵInjectableDeclaration<BankConnectionService>;
38
45
  }
@@ -1 +1,2 @@
1
1
  export * from './bank-connection.service';
2
+ export * from './bank-connection-messages.enum';
@@ -4,6 +4,9 @@ import { BasiqToken } from '../../../../models';
4
4
  import { RestMethod, RestService } from '../../rest';
5
5
  import { Collection } from '../../../../collections';
6
6
  import * as i0 from "@angular/core";
7
+ /**
8
+ * @TODO Alex shouldn't be a separated service, move to basiqService or interceptor
9
+ */
7
10
  export declare class BasiqTokenService extends RestService<AbstractModel, BasiqToken, Collection<BasiqToken>> {
8
11
  protected endpointUri: string;
9
12
  modelClass: typeof BasiqToken;
@@ -47,12 +47,11 @@ export declare class BasiqService extends RestService<BankAccountBase, BankAccou
47
47
  listenEvents(): void;
48
48
  /**
49
49
  * Open basiq consent ui to allow user to log in to bank
50
- * More info: https://api.basiq.io/docs/consent-ui
51
50
  * @param token User's basiq token
52
51
  * @param bankId External id of selected bank
53
- * @param action 'connect' - create a new connection when consent already signed, null - user have to sign consent first
52
+ * @param consentExist
54
53
  */
55
- redirectToBasiqConsent(token: string, bankId: string, action?: null | 'connect'): void;
54
+ redirectToBasiqConsent(token: string, bankId: string, consentExist?: boolean): void;
56
55
  /**
57
56
  * Get Basiq job result
58
57
  */
@@ -56,7 +56,7 @@ export declare abstract class RestService<BaseModel, Model extends AbstractModel
56
56
  /**
57
57
  * Change an existing Model instance in database
58
58
  */
59
- put(model: Model): Observable<Model>;
59
+ put(model: Model, path?: string): Observable<Model>;
60
60
  /**
61
61
  * Change multiple existing Model instances in database
62
62
  */
@@ -103,6 +103,7 @@ export declare abstract class RestService<BaseModel, Model extends AbstractModel
103
103
  */
104
104
  protected listenCSE(modelClass: typeof ObservableModel, methods: HttpMethod[], callback: Function): void;
105
105
  /**
106
+ * // @TODO Alex remove
106
107
  * Method that call all listeners. Empty by default. Should be redefined by child services if required
107
108
  */
108
109
  listenEvents(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "0.30.75",
3
+ "version": "0.30.77",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/compiler": "^15.1.5",
package/public-api.d.ts CHANGED
@@ -17,10 +17,6 @@ export * from './lib/models/chart-accounts/chart-accounts-category.e-collection'
17
17
  */
18
18
  export * from './lib/db/Enums';
19
19
  export * from './lib/db/Enums/address-type.enum';
20
- export * from './lib/db/Enums/bank-account-status.enum';
21
- export * from './lib/db/Enums/bank-account-type.enum';
22
- export * from './lib/db/Enums/bank-connection-status.enum';
23
- export * from './lib/db/Enums/bank-transaction-type.enum';
24
20
  export * from './lib/db/Enums/chart-accounts/chart-accounts-category.enum';
25
21
  export * from './lib/db/Enums/chart-accounts/chart-accounts-etp.enum';
26
22
  export * from './lib/db/Enums/chart-accounts/chart-accounts-heading-list.enum';
@@ -1,6 +0,0 @@
1
- export var BankAccountStatusEnum;
2
- (function (BankAccountStatusEnum) {
3
- BankAccountStatusEnum[BankAccountStatusEnum["INACTIVE"] = 0] = "INACTIVE";
4
- BankAccountStatusEnum[BankAccountStatusEnum["ACTIVE"] = 1] = "ACTIVE";
5
- })(BankAccountStatusEnum || (BankAccountStatusEnum = {}));
6
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFuay1hY2NvdW50LXN0YXR1cy5lbnVtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHQtY29yZS9zcmMvbGliL2RiL0VudW1zL2JhbmstYWNjb3VudC1zdGF0dXMuZW51bS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQU4sSUFBWSxxQkFHWDtBQUhELFdBQVkscUJBQXFCO0lBQ2hDLHlFQUFZLENBQUE7SUFDWixxRUFBVSxDQUFBO0FBQ1gsQ0FBQyxFQUhXLHFCQUFxQixLQUFyQixxQkFBcUIsUUFHaEMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZW51bSBCYW5rQWNjb3VudFN0YXR1c0VudW0ge1xuXHRJTkFDVElWRSA9IDAsXG5cdEFDVElWRSA9IDEsXG59XG4iXX0=
@@ -1,7 +0,0 @@
1
- export var BankConnectionStatusEnum;
2
- (function (BankConnectionStatusEnum) {
3
- BankConnectionStatusEnum[BankConnectionStatusEnum["PENDING"] = 1] = "PENDING";
4
- BankConnectionStatusEnum[BankConnectionStatusEnum["ACTIVE"] = 2] = "ACTIVE";
5
- BankConnectionStatusEnum[BankConnectionStatusEnum["INVALID"] = 3] = "INVALID";
6
- })(BankConnectionStatusEnum || (BankConnectionStatusEnum = {}));
7
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFuay1jb25uZWN0aW9uLXN0YXR1cy5lbnVtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHQtY29yZS9zcmMvbGliL2RiL0VudW1zL2JhbmstY29ubmVjdGlvbi1zdGF0dXMuZW51bS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQU4sSUFBWSx3QkFJWDtBQUpELFdBQVksd0JBQXdCO0lBQ25DLDZFQUFXLENBQUE7SUFDWCwyRUFBVSxDQUFBO0lBQ1YsNkVBQVcsQ0FBQTtBQUNaLENBQUMsRUFKVyx3QkFBd0IsS0FBeEIsd0JBQXdCLFFBSW5DIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGVudW0gQmFua0Nvbm5lY3Rpb25TdGF0dXNFbnVtIHtcblx0UEVORElORyA9IDEsXG5cdEFDVElWRSA9IDIsXG5cdElOVkFMSUQgPSAzLFxufVxuIl19
@@ -1,14 +0,0 @@
1
- export var BankPopularEnum;
2
- (function (BankPopularEnum) {
3
- BankPopularEnum["BANKWEST"] = "Bank of Western Australia trading as BankWest";
4
- BankPopularEnum["ANZ"] = "Australia and New Zealand Banking Group Limited";
5
- BankPopularEnum["CBA"] = "Commonwealth Bank Australia";
6
- BankPopularEnum["WESTPAC"] = "Westpac Banking Corporation";
7
- BankPopularEnum["BENDIGO"] = "Bendigo and Adelaide Bank Limited";
8
- BankPopularEnum["ING_DIRECT"] = "ING Bank (Australia) Limited (trading as ING Direct)";
9
- BankPopularEnum["ST_GEORGE"] = "St. George Bank (a subsidiary of Westpac)";
10
- BankPopularEnum["SUNCORP"] = "Suncorp-Metway Limited";
11
- BankPopularEnum["CITIBANK"] = "Citibank";
12
- BankPopularEnum["BOQ"] = "Bank of Queensland Limited";
13
- })(BankPopularEnum || (BankPopularEnum = {}));
14
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFuay1wb3B1bGFyLmVudW0uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvZGIvRW51bXMvYmFuay1wb3B1bGFyLmVudW0udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxDQUFOLElBQVksZUFXWDtBQVhELFdBQVksZUFBZTtJQUN6Qiw2RUFBMEQsQ0FBQTtJQUMxRCwwRUFBdUQsQ0FBQTtJQUN2RCxzREFBbUMsQ0FBQTtJQUNuQywwREFBdUMsQ0FBQTtJQUN2QyxnRUFBNkMsQ0FBQTtJQUM3QyxzRkFBbUUsQ0FBQTtJQUNuRSwwRUFBdUQsQ0FBQTtJQUN2RCxxREFBa0MsQ0FBQTtJQUNsQyx3Q0FBcUIsQ0FBQTtJQUNyQixxREFBa0MsQ0FBQTtBQUNwQyxDQUFDLEVBWFcsZUFBZSxLQUFmLGVBQWUsUUFXMUIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZW51bSBCYW5rUG9wdWxhckVudW0ge1xuICBCQU5LV0VTVCA9ICdCYW5rIG9mIFdlc3Rlcm4gQXVzdHJhbGlhIHRyYWRpbmcgYXMgQmFua1dlc3QnLFxuICBBTlogPSAnQXVzdHJhbGlhIGFuZCBOZXcgWmVhbGFuZCBCYW5raW5nIEdyb3VwIExpbWl0ZWQnLFxuICBDQkEgPSAnQ29tbW9ud2VhbHRoIEJhbmsgQXVzdHJhbGlhJyxcbiAgV0VTVFBBQyA9ICdXZXN0cGFjIEJhbmtpbmcgQ29ycG9yYXRpb24nLFxuICBCRU5ESUdPID0gJ0JlbmRpZ28gYW5kIEFkZWxhaWRlIEJhbmsgTGltaXRlZCcsXG4gIElOR19ESVJFQ1QgPSAnSU5HIEJhbmsgKEF1c3RyYWxpYSkgTGltaXRlZCAodHJhZGluZyBhcyBJTkcgRGlyZWN0KScsXG4gIFNUX0dFT1JHRSA9ICdTdC4gR2VvcmdlIEJhbmsgKGEgc3Vic2lkaWFyeSBvZiBXZXN0cGFjKScsXG4gIFNVTkNPUlAgPSAnU3VuY29ycC1NZXR3YXkgTGltaXRlZCcsXG4gIENJVElCQU5LID0gJ0NpdGliYW5rJyxcbiAgQk9RID0gJ0Jhbmsgb2YgUXVlZW5zbGFuZCBMaW1pdGVkJyxcbn1cbiJdfQ==
@@ -1,6 +0,0 @@
1
- export var BankTransactionTypeEnum;
2
- (function (BankTransactionTypeEnum) {
3
- BankTransactionTypeEnum[BankTransactionTypeEnum["DEBIT"] = 1] = "DEBIT";
4
- BankTransactionTypeEnum[BankTransactionTypeEnum["CREDIT"] = 2] = "CREDIT";
5
- })(BankTransactionTypeEnum || (BankTransactionTypeEnum = {}));
6
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFuay10cmFuc2FjdGlvbi10eXBlLmVudW0uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvZGIvRW51bXMvYmFuay10cmFuc2FjdGlvbi10eXBlLmVudW0udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxDQUFOLElBQVksdUJBR1g7QUFIRCxXQUFZLHVCQUF1QjtJQUNsQyx1RUFBUyxDQUFBO0lBQ1QseUVBQVUsQ0FBQTtBQUNYLENBQUMsRUFIVyx1QkFBdUIsS0FBdkIsdUJBQXVCLFFBR2xDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGVudW0gQmFua1RyYW5zYWN0aW9uVHlwZUVudW0ge1xuXHRERUJJVCA9IDEsXG5cdENSRURJVCA9IDIsXG59XG4iXX0=
@@ -1,4 +0,0 @@
1
- import { AbstractModel } from '../abstract-model';
2
- export class FinancialDataSystem extends AbstractModel {
3
- }
4
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmluYW5jaWFsLWRhdGEtc3lzdGVtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHQtY29yZS9zcmMvbGliL2RiL01vZGVscy9iYW5rL2ZpbmFuY2lhbC1kYXRhLXN5c3RlbS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQUMsYUFBYSxFQUFDLE1BQU0sbUJBQW1CLENBQUM7QUFFaEQsTUFBTSxPQUFPLG1CQUFvQixTQUFRLGFBQWE7Q0FPckQiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBCYW5rIH0gZnJvbSAnLi9iYW5rJztcbmltcG9ydCB7QWJzdHJhY3RNb2RlbH0gZnJvbSAnLi4vYWJzdHJhY3QtbW9kZWwnO1xuXG5leHBvcnQgY2xhc3MgRmluYW5jaWFsRGF0YVN5c3RlbSBleHRlbmRzIEFic3RyYWN0TW9kZWwge1xuICBuYW1lPzogc3RyaW5nO1xuICBpZD86IG51bWJlcjtcbiAgZGVsZXRlZEF0PzogRGF0ZTtcbiAgY3JlYXRlZEF0PzogRGF0ZTtcbiAgdXBkYXRlZEF0PzogRGF0ZTtcbiAgYmFua3M/OiBCYW5rW107XG59XG4iXX0=
@@ -1,10 +0,0 @@
1
- import { Bank } from './bank';
2
- import { AbstractModel } from '../abstract-model';
3
- export declare class FinancialDataSystem extends AbstractModel {
4
- name?: string;
5
- id?: number;
6
- deletedAt?: Date;
7
- createdAt?: Date;
8
- updatedAt?: Date;
9
- banks?: Bank[];
10
- }