taxtank-core 0.28.4 → 0.28.7

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 (41) hide show
  1. package/bundles/taxtank-core.umd.js +328 -49
  2. package/bundles/taxtank-core.umd.js.map +1 -1
  3. package/esm2015/lib/db/Enums/user-event-type-type.enum.js +48 -0
  4. package/esm2015/lib/db/Models/bank/bank.js +1 -1
  5. package/esm2015/lib/forms/index.js +2 -1
  6. package/esm2015/lib/forms/property/index.js +2 -0
  7. package/esm2015/lib/forms/property/property-sale/index.js +4 -0
  8. package/esm2015/lib/forms/property/property-sale/property-sale-cost-base.form.js +39 -0
  9. package/esm2015/lib/forms/property/property-sale/property-sale-cost-sale.form.js +74 -0
  10. package/esm2015/lib/forms/property/property-sale/property-sale-exemptions.form.js +75 -0
  11. package/esm2015/lib/models/bank/bank-connection.js +2 -2
  12. package/esm2015/lib/models/endpoint/endpoints.const.js +2 -1
  13. package/esm2015/lib/models/notification/notification.js +1 -1
  14. package/esm2015/lib/models/property/property-sale/index.js +6 -0
  15. package/esm2015/lib/models/property/property-sale/property-sale-cost-base.js +20 -0
  16. package/esm2015/lib/services/http/bank/bank-connection/bank-connection.service.js +13 -4
  17. package/esm2015/lib/services/http/bank/bank-transaction/bank-transaction.service.js +3 -3
  18. package/esm2015/lib/services/http/bank/bank.service.js +2 -2
  19. package/esm2015/lib/services/http/bank/basiq/basiq.service.js +3 -3
  20. package/esm2015/lib/services/http/firm/client-invite/client-invite.service.js +3 -3
  21. package/esm2015/lib/services/http/firm/client-movement/client-movement.service.js +3 -3
  22. package/esm2015/lib/services/http/service-notification/service-notification.service.js +2 -1
  23. package/esm2015/lib/services/http/tax-review/tax-review.service.js +3 -3
  24. package/esm2015/lib/services/http/transaction/transaction.service.js +8 -4
  25. package/esm2015/public-api.js +2 -5
  26. package/fesm2015/taxtank-core.js +298 -45
  27. package/fesm2015/taxtank-core.js.map +1 -1
  28. package/lib/db/Enums/user-event-type-type.enum.d.ts +46 -0
  29. package/lib/db/Models/bank/bank.d.ts +1 -0
  30. package/lib/forms/index.d.ts +1 -0
  31. package/lib/forms/property/index.d.ts +1 -0
  32. package/lib/forms/property/property-sale/index.d.ts +3 -0
  33. package/lib/forms/property/property-sale/property-sale-cost-base.form.d.ts +14 -0
  34. package/lib/forms/property/property-sale/property-sale-cost-sale.form.d.ts +25 -0
  35. package/lib/forms/property/property-sale/property-sale-exemptions.form.d.ts +26 -0
  36. package/lib/models/notification/notification.d.ts +2 -4
  37. package/lib/models/property/property-sale/index.d.ts +5 -0
  38. package/lib/models/property/property-sale/property-sale-cost-base.d.ts +12 -0
  39. package/lib/services/http/bank/bank-connection/bank-connection.service.d.ts +3 -1
  40. package/package.json +1 -1
  41. package/public-api.d.ts +1 -4
@@ -0,0 +1,46 @@
1
+ export declare enum UserEventTypeTypeEnum {
2
+ REGISTERED = 1000,
3
+ PASSWORD_RESET_REQUEST = 1001,
4
+ APP_FEATURES = 1010,
5
+ SUBSCRIBED = 2000,
6
+ UNSUBSCRIBED = 2001,
7
+ SUBSCRIPTION_UPDATE = 2004,
8
+ SUBSCRIPTION_TRIAL_UPDATE = 2005,
9
+ SUBSCRIPTION_PAYMENT_FAILED = 2006,
10
+ CLIENT_INVITE = 2010,
11
+ CLIENT_INVITE_TO_REGISTER = 2011,
12
+ FIRM_INVITE_ACCEPTED = 2012,
13
+ FIRM_INVITE_REJECTED = 2013,
14
+ FIRM_INVITE_REGISTERED = 2014,
15
+ PROPERTY_SHARE_INVITE = 2020,
16
+ PROPERTY_SHARE_INVITE_TO_REGISTER = 2021,
17
+ PROPERTY_SHARE_INVITE_ACCEPTED = 2022,
18
+ PROPERTY_SHARE_INVITE_REJECTED = 2023,
19
+ PROPERTY_SHARE_INVITE_REGISTERED = 2024,
20
+ PROPERTY_SHARE_CHANGE_REQUESTED = 2025,
21
+ PROPERTY_SHARE_CHANGE_ACCEPTED = 2026,
22
+ PROPERTY_SHARE_CHANGE_REJECTED = 2027,
23
+ OWNER_SUBSCRIBED = 2028,
24
+ OWNER_UNSUBSCRIBED = 2029,
25
+ BASIQ_NEW_ACCOUNTS = 2030,
26
+ BASIQ_FIRST_IMPORT_COMPLETE = 2031,
27
+ BASIQ_AUTHORIZATION_FAIL = 2032,
28
+ TRANSACTION_ALLOCATE_REMINDER = 2033,
29
+ REGISTRATION_INVITE = 2040,
30
+ REGISTRATION_INVITE_ACCEPTED = 2041,
31
+ CLIENT_EMAIL_CONFIRMED = 2050,
32
+ TAX_REVIEW_REQUESTED = 2060,
33
+ FIRM_INVITE_TO_REGISTER = 3000,
34
+ FIRM_INVITE = 3001,
35
+ CLIENT_INVITE_ACCEPTED = 3002,
36
+ CLIENT_INVITE_REJECTED = 3003,
37
+ CLIENT_INVITE_REGISTERED = 3004,
38
+ FIRM_NEW_CLIENT = 3005,
39
+ FIRM_LOST_CLIENT = 3006,
40
+ EMPLOYEE_INVITE = 3010,
41
+ EMPLOYEE_LOST_CLIENT = 3011,
42
+ EMPLOYEE_NEW_CLIENT = 3012,
43
+ EMPLOYEE_INVITE_ACCEPTED = 3013,
44
+ EMPLOYEE_EMAIL_CONFIRMED = 3020,
45
+ TAX_REVIEW_RECEIVED = 3030
46
+ }
@@ -13,4 +13,5 @@ export declare class Bank extends AbstractModel {
13
13
  createdAt?: Date;
14
14
  updatedAt?: Date;
15
15
  financialDataSystem?: FinancialDataSystem;
16
+ isManual: boolean;
16
17
  }
@@ -11,6 +11,7 @@ export * from './login/login.form';
11
11
  export * from './register/register-client.form';
12
12
  export * from './register/register-firm.form';
13
13
  export * from './user';
14
+ export * from './property';
14
15
  export * from './report/my-tax';
15
16
  export * from './sole';
16
17
  export * from './vehicle';
@@ -0,0 +1 @@
1
+ export * from './property-sale';
@@ -0,0 +1,3 @@
1
+ export * from './property-sale-cost-base.form';
2
+ export * from './property-sale-cost-sale.form';
3
+ export * from './property-sale-exemptions.form';
@@ -0,0 +1,14 @@
1
+ import { AbstractForm } from '../../abstract.form';
2
+ import { PropertySale, PropertySaleCostBase } from '../../../models/property/property-sale';
3
+ import { Property } from '../../../models/property/property';
4
+ /**
5
+ * @Todo TT-2143 remove Property stuff and use this form just for PropertySale
6
+ * @Todo TT-2143 create and extend from abstract PropertySale form
7
+ */
8
+ export declare class PropertySaleCostBaseForm extends AbstractForm<PropertySaleCostBase> {
9
+ private propertySaleCostBase;
10
+ constructor(propertySaleCostBase: PropertySaleCostBase);
11
+ getProperty(): Property;
12
+ getPropertySale(): PropertySale;
13
+ submit(data?: object): PropertySaleCostBase;
14
+ }
@@ -0,0 +1,25 @@
1
+ import { AbstractForm } from '../../abstract.form';
2
+ import { PropertySale } from '../../../models/property/property-sale';
3
+ import { Property } from '../../../models/property/property';
4
+ import { IEventListener } from '../../../interfaces/event-listener.interface';
5
+ /**
6
+ * @Todo TT-2143 Create and extend from abstract PropertySale form
7
+ */
8
+ export declare class PropertySaleCostSaleForm extends AbstractForm<PropertySale> implements IEventListener {
9
+ private propertySale;
10
+ private property;
11
+ constructor(propertySale: PropertySale, property: Property);
12
+ listenEvents(): void;
13
+ /**
14
+ * Get property instance based on provided property and form value to get actual form calculations
15
+ * @Todo TT-2143 Move to parent abstract PropertySale form
16
+ */
17
+ getPropertySale(): PropertySale;
18
+ submit(data?: object): PropertySale;
19
+ private updateGrossCGT;
20
+ private listenCommissionUpdated;
21
+ private listenLegalFeesUpdated;
22
+ private listenOtherCostUpdated;
23
+ private listenPriceUpdated;
24
+ private listenCapitalLossUpdated;
25
+ }
@@ -0,0 +1,26 @@
1
+ import { AbstractForm } from '../../abstract.form';
2
+ import { PropertySale } from '../../../models/property/property-sale';
3
+ import { Property } from '../../../models/property/property';
4
+ import { Collection } from '../../../collections/collection';
5
+ import { TaxExemption } from '../../../models/property/property-sale';
6
+ import { IEventListener } from '../../../interfaces/event-listener.interface';
7
+ /**
8
+ * @Todo TT-2143 Create and extend from abstract PropertySale form
9
+ */
10
+ export declare class PropertySaleExemptionsForm extends AbstractForm<PropertySale> implements IEventListener {
11
+ private propertySale;
12
+ private property;
13
+ private taxExemptions;
14
+ constructor(propertySale: PropertySale, property: Property, taxExemptions: Collection<TaxExemption>);
15
+ listenEvents(): void;
16
+ /**
17
+ * @Todo TT-2143 Move to parent abstract PropertySale form
18
+ */
19
+ getPropertySale(): PropertySale;
20
+ private updateNetCGT;
21
+ private listenTaxExemptionUpdated;
22
+ /**
23
+ * show metadata related to passed tax exemption or existing property sale metadata
24
+ */
25
+ private setFormMetadataControls;
26
+ }
@@ -1,12 +1,10 @@
1
1
  import { ServiceNotification as ServiceNotificationBase } from '../../db/Models/service-notification';
2
- import { UserEventTypeUserTypeEnum } from '../../db/Enums/user-event-type-user-type.enum';
3
- import { UserEventTypeEmployeeTypeEnum } from '../../db/Enums/user-event-type-employee-type.enum';
4
- import { UserEventTypeClientTypeEnum } from '../../db/Enums/user-event-type-client-type.enum';
5
2
  import { User } from '../user/user';
3
+ import { UserEventTypeTypeEnum } from '../../db/Enums/user-event-type-type.enum';
6
4
  export declare class Notification extends ServiceNotificationBase {
7
5
  sender: User;
8
6
  redirectionLink: string;
9
- get eventType(): UserEventTypeUserTypeEnum | UserEventTypeEmployeeTypeEnum | UserEventTypeClientTypeEnum;
7
+ get eventType(): UserEventTypeTypeEnum;
10
8
  /**
11
9
  * Check if notification is from user or not
12
10
  */
@@ -0,0 +1,5 @@
1
+ export * from './property-sale';
2
+ export * from './property-sale-cost-base';
3
+ export * from './property-sale-tax-exemption-metadata';
4
+ export * from './tax-exemption';
5
+ export * from './tax-exemption-metadata';
@@ -0,0 +1,12 @@
1
+ import { Property } from '../property';
2
+ import { PropertySale } from './property-sale';
3
+ import { DepreciationCollection } from '../../../collections/depreciation.collection';
4
+ import { TransactionCollection } from '../../../collections/transaction/transaction.collection';
5
+ /**
6
+ * @Todo TT-2143 should be removed when PropertySaleCostBaseForm refactored (cut property to separated form)
7
+ */
8
+ export declare class PropertySaleCostBase {
9
+ property: Property;
10
+ sale: PropertySale;
11
+ static createFrom(property: Property, propertySale: PropertySale, depreciations: DepreciationCollection, holdingCosts: TransactionCollection): PropertySaleCostBase;
12
+ }
@@ -3,19 +3,21 @@ import { BankConnection as BankConnectionBase } from '../../../../db/Models/bank
3
3
  import { BankConnection } from '../../../../models/bank/bank-connection';
4
4
  import { RestService } from '../../rest/rest.service';
5
5
  import { IEventListener } from '../../../../interfaces/event-listener.interface';
6
+ import { UserEventTypeTypeEnum } from '../../../../db/Enums/user-event-type-type.enum';
6
7
  import * as i0 from "@angular/core";
7
8
  /**
8
9
  * BankConnection means user account at specific bank (usually each user has only one at the same bank)
9
10
  * service handles BankConnection management
10
11
  */
11
12
  export declare class BankConnectionService extends RestService<BankConnectionBase, BankConnection> implements IEventListener {
13
+ static userEventTypes: UserEventTypeTypeEnum[];
12
14
  modelClass: typeof BankConnection;
13
15
  url: string;
14
16
  listenEvents(): void;
15
17
  add(bankConnection: BankConnection): Observable<BankConnection>;
16
18
  listenToAddedBankAccounts(): void;
17
19
  /**
18
- * Update cache when basiq login failed to get actual connections statuses
20
+ * Update cache when basiq accounts were retrieved or login to basic was failed to get actual connections statuses
19
21
  */
20
22
  listenNotifications(): void;
21
23
  static ɵfac: i0.ɵɵFactoryDeclaration<BankConnectionService, never>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "0.28.4",
3
+ "version": "0.28.7",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^12.2.3 || ~13.0.0",
package/public-api.d.ts CHANGED
@@ -241,10 +241,7 @@ export * from './lib/models/property/property-equity-chart-data';
241
241
  export * from './lib/models/property/property-equity-chart-item';
242
242
  export * from './lib/models/property/property-forecast';
243
243
  export * from './lib/models/property/property-share';
244
- export * from './lib/models/property/property-sale/property-sale';
245
- export * from './lib/models/property/property-sale/tax-exemption';
246
- export * from './lib/models/property/property-sale/tax-exemption-metadata';
247
- export * from './lib/models/property/property-sale/property-sale-tax-exemption-metadata';
244
+ export * from './lib/models/property/property-sale';
248
245
  export * from './lib/models/property/property-subscription';
249
246
  export * from './lib/models/property/property-valuation';
250
247
  export * from './lib/models/registration-invite/registration-invite';