taxtank-core 0.22.1 → 0.23.0

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 (72) hide show
  1. package/bundles/taxtank-core.umd.js +3965 -3568
  2. package/bundles/taxtank-core.umd.js.map +1 -1
  3. package/esm2015/lib/db/Models/sole/sole-details.js +4 -0
  4. package/esm2015/lib/db/Models/user/user.js +1 -1
  5. package/esm2015/lib/forms/index.js +2 -1
  6. package/esm2015/lib/forms/register/register-client.form.js +3 -6
  7. package/esm2015/lib/forms/sole/index.js +4 -0
  8. package/esm2015/lib/forms/sole/sole-business.form.js +15 -0
  9. package/esm2015/lib/forms/sole/sole-contact.form.js +20 -0
  10. package/esm2015/lib/forms/sole/sole-details.form.js +11 -0
  11. package/esm2015/lib/interceptors/financial-year-interceptor.js +3 -2
  12. package/esm2015/lib/interfaces/photoable.js +1 -1
  13. package/esm2015/lib/models/bank/bank.js +2 -2
  14. package/esm2015/lib/models/endpoint/endpoints.const.js +4 -1
  15. package/esm2015/lib/models/firm/firm.js +2 -2
  16. package/esm2015/lib/models/index.js +2 -0
  17. package/esm2015/lib/models/property/property.js +2 -2
  18. package/esm2015/lib/models/registration-invite/registration-invite.js +2 -2
  19. package/esm2015/lib/models/sole/index.js +9 -0
  20. package/esm2015/lib/models/sole/sole-business-allocation.js +14 -0
  21. package/esm2015/lib/models/sole/sole-business-loss.js +10 -0
  22. package/esm2015/lib/models/sole/sole-business.js +44 -0
  23. package/esm2015/lib/models/sole/sole-contact.js +33 -0
  24. package/esm2015/lib/models/sole/sole-details.js +10 -0
  25. package/esm2015/lib/models/sole/sole-invoice-item.js +14 -0
  26. package/esm2015/lib/models/sole/sole-invoice-template.js +14 -0
  27. package/esm2015/lib/models/sole/sole-invoice.js +32 -0
  28. package/esm2015/lib/models/tax-summary/tax-summary.js +5 -1
  29. package/esm2015/lib/models/user/user.js +6 -2
  30. package/esm2015/lib/services/http/index.js +2 -0
  31. package/esm2015/lib/services/http/rest/rest.service.js +6 -3
  32. package/esm2015/lib/services/http/sole/index.js +4 -0
  33. package/esm2015/lib/services/http/sole/sole-business/sole-business.service.js +21 -0
  34. package/esm2015/lib/services/http/sole/sole-contact/sole-contact.service.js +21 -0
  35. package/esm2015/lib/services/http/sole/sole-details/sole-details.service.js +59 -0
  36. package/esm2015/lib/services/http/user/user.service.js +1 -1
  37. package/esm2015/lib/services/index.js +2 -0
  38. package/esm2015/public-api.js +3 -1
  39. package/fesm2015/taxtank-core.js +3086 -2807
  40. package/fesm2015/taxtank-core.js.map +1 -1
  41. package/lib/db/Models/sole/sole-details.d.ts +11 -0
  42. package/lib/db/Models/user/user.d.ts +2 -0
  43. package/lib/forms/index.d.ts +1 -0
  44. package/lib/forms/sole/index.d.ts +3 -0
  45. package/lib/forms/sole/sole-business.form.d.ts +5 -0
  46. package/lib/forms/sole/sole-contact.form.d.ts +5 -0
  47. package/lib/forms/sole/sole-details.form.d.ts +5 -0
  48. package/lib/interfaces/photoable.d.ts +1 -1
  49. package/lib/models/bank/bank.d.ts +1 -1
  50. package/lib/models/firm/firm.d.ts +1 -1
  51. package/lib/models/index.d.ts +1 -0
  52. package/lib/models/property/property.d.ts +1 -1
  53. package/lib/models/registration-invite/registration-invite.d.ts +1 -1
  54. package/lib/models/sole/index.d.ts +8 -0
  55. package/lib/models/sole/sole-business-allocation.d.ts +7 -0
  56. package/lib/models/sole/sole-business-loss.d.ts +5 -0
  57. package/lib/models/sole/sole-business.d.ts +22 -0
  58. package/lib/models/sole/sole-contact.d.ts +15 -0
  59. package/lib/models/sole/sole-details.d.ts +5 -0
  60. package/lib/models/sole/sole-invoice-item.d.ts +7 -0
  61. package/lib/models/sole/sole-invoice-template.d.ts +7 -0
  62. package/lib/models/sole/sole-invoice.d.ts +15 -0
  63. package/lib/models/user/user.d.ts +3 -1
  64. package/lib/services/http/index.d.ts +1 -0
  65. package/lib/services/http/rest/rest.service.d.ts +5 -2
  66. package/lib/services/http/sole/index.d.ts +3 -0
  67. package/lib/services/http/sole/sole-business/sole-business.service.d.ts +11 -0
  68. package/lib/services/http/sole/sole-contact/sole-contact.service.d.ts +11 -0
  69. package/lib/services/http/sole/sole-details/sole-details.service.d.ts +19 -0
  70. package/lib/services/index.d.ts +1 -0
  71. package/package.json +1 -1
  72. package/public-api.d.ts +2 -0
@@ -0,0 +1,11 @@
1
+ import { User } from '../user/user';
2
+ import { AbstractModel } from '../abstract-model';
3
+ export declare class SoleDetails extends AbstractModel {
4
+ abn?: string;
5
+ id?: number;
6
+ isGST?: boolean;
7
+ createdAt?: Date;
8
+ updatedAt?: Date;
9
+ deletedAt?: Date;
10
+ user?: User;
11
+ }
@@ -14,6 +14,7 @@ import { ClientMovement } from '../firm/client-movement';
14
14
  import { ClientDetails } from './client-details';
15
15
  import { EmployeeDetails } from './employee-details';
16
16
  import { AbstractModel } from '../abstract-model';
17
+ import { SoleDetails } from '../sole/sole-details';
17
18
  export declare class User extends AbstractModel {
18
19
  id?: number;
19
20
  intercomId?: number;
@@ -49,4 +50,5 @@ export declare class User extends AbstractModel {
49
50
  clientMovements?: ClientMovement[];
50
51
  clientDetails?: ClientDetails;
51
52
  employeeDetails?: EmployeeDetails;
53
+ soleDetails?: SoleDetails;
52
54
  }
@@ -15,3 +15,4 @@ export * from './user/reset-password.form';
15
15
  export * from './vehicle/vehicle.form';
16
16
  export * from './vehicle/vehicle-claim.form';
17
17
  export * from './report/my-tax';
18
+ export * from './sole';
@@ -0,0 +1,3 @@
1
+ export * from './sole-business.form';
2
+ export * from './sole-contact.form';
3
+ export * from './sole-details.form';
@@ -0,0 +1,5 @@
1
+ import { AbstractForm } from '../abstract.form';
2
+ import { SoleBusiness } from '../../models/sole/sole-business';
3
+ export declare class SoleBusinessForm extends AbstractForm<SoleBusiness> {
4
+ constructor(business?: SoleBusiness);
5
+ }
@@ -0,0 +1,5 @@
1
+ import { AbstractForm } from '../abstract.form';
2
+ import { SoleContact } from '../../models';
3
+ export declare class SoleContactForm extends AbstractForm<SoleContact> {
4
+ constructor(contact?: SoleContact);
5
+ }
@@ -0,0 +1,5 @@
1
+ import { AbstractForm } from '../abstract.form';
2
+ import { SoleDetails } from '../../models';
3
+ export declare class SoleDetailsForm extends AbstractForm<SoleDetails> {
4
+ constructor(soleDetails: SoleDetails);
5
+ }
@@ -9,5 +9,5 @@ export interface Photoable {
9
9
  /**
10
10
  * get object's initials for photo placeholder
11
11
  */
12
- getInitials(): string;
12
+ getPhotoPlaceholder(): string;
13
13
  }
@@ -3,6 +3,6 @@ import { Photoable } from '../../interfaces/photoable';
3
3
  export declare class Bank extends BankBase implements Photoable {
4
4
  logo: string;
5
5
  isPopular: boolean;
6
- getInitials(): string;
6
+ getPhotoPlaceholder(): string;
7
7
  getPhoto(): string;
8
8
  }
@@ -14,5 +14,5 @@ export declare class Firm extends FirmBase implements Photoable {
14
14
  /**
15
15
  * get firm initials
16
16
  */
17
- getInitials(): string;
17
+ getPhotoPlaceholder(): string;
18
18
  }
@@ -0,0 +1 @@
1
+ export * from './sole';
@@ -35,7 +35,7 @@ export declare class Property extends PropertyBase implements Photoable, Documen
35
35
  /**
36
36
  * Get initials of property. Required by Photoable interface
37
37
  */
38
- getInitials(): string;
38
+ getPhotoPlaceholder(): string;
39
39
  /**
40
40
  * Get property photo. Required by Photoable interface
41
41
  */
@@ -1,6 +1,6 @@
1
1
  import { RegistrationInvite as RegistrationInviteBase } from '../../db/Models/user/registration-invite';
2
2
  import { Photoable } from '../../interfaces/photoable';
3
3
  export declare class RegistrationInvite extends RegistrationInviteBase implements Photoable {
4
- getInitials(): string;
4
+ getPhotoPlaceholder(): string;
5
5
  getPhoto(): string;
6
6
  }
@@ -0,0 +1,8 @@
1
+ export * from './sole-business';
2
+ export * from './sole-business-allocation';
3
+ export * from './sole-business-loss';
4
+ export * from './sole-contact';
5
+ export * from './sole-details';
6
+ export * from './sole-invoice';
7
+ export * from './sole-invoice-item';
8
+ export * from './sole-invoice-template';
@@ -0,0 +1,7 @@
1
+ import { SoleBusinessAllocation as SoleBusinessAllocationBase } from '../../db/Models/sole/sole-business-allocation';
2
+ import { BankAccount } from '../bank/bank-account';
3
+ import { SoleBusiness } from './sole-business';
4
+ export declare class SoleBusinessAllocation extends SoleBusinessAllocationBase {
5
+ bankAccount: BankAccount;
6
+ business: SoleBusiness;
7
+ }
@@ -0,0 +1,5 @@
1
+ import { SoleBusinessLoss as SoleBusinessLossBase } from '../../db/Models/sole/sole-business-loss';
2
+ import { SoleBusiness } from './sole-business';
3
+ export declare class SoleBusinessLoss extends SoleBusinessLossBase {
4
+ business: SoleBusiness;
5
+ }
@@ -0,0 +1,22 @@
1
+ import { SoleBusiness as SoleBusinessBase } from '../../db/Models/sole/sole-business';
2
+ import { User } from '../user/user';
3
+ import { SoleBusinessAllocation } from './sole-business-allocation';
4
+ import { SoleBusinessLoss } from './sole-business-loss';
5
+ import { SoleInvoice } from './sole-invoice';
6
+ import { SoleInvoiceTemplate } from './sole-invoice-template';
7
+ import { VehicleClaim } from '../logbook/vehicle-claim';
8
+ import { Depreciation } from '../depreciation/depreciation';
9
+ import { Transaction } from '../transaction/transaction';
10
+ import { Photoable } from '../../interfaces/photoable';
11
+ export declare class SoleBusiness extends SoleBusinessBase implements Photoable {
12
+ user: User;
13
+ allocations: SoleBusinessAllocation[];
14
+ losses: SoleBusinessLoss[];
15
+ invoices: SoleInvoice[];
16
+ invoiceTemplates: SoleInvoiceTemplate[];
17
+ vehicleClaims: VehicleClaim[];
18
+ transactions: Transaction[];
19
+ depreciations: Depreciation[];
20
+ getPhotoPlaceholder(): string;
21
+ getPhoto(): string;
22
+ }
@@ -0,0 +1,15 @@
1
+ import { SoleContact as SoleContactBase } from '../../db/Models/sole/sole-contact';
2
+ import { User } from '../user/user';
3
+ import { Address } from '../address/address';
4
+ import { Phone } from '../phone/phone';
5
+ import { SoleInvoice } from './sole-invoice';
6
+ import { Photoable } from '../../interfaces/photoable';
7
+ export declare class SoleContact extends SoleContactBase implements Photoable {
8
+ user: User;
9
+ phone: Phone;
10
+ address: Address;
11
+ invoices: SoleInvoice[];
12
+ get fullName(): string;
13
+ getPhotoPlaceholder(): string;
14
+ getPhoto(): string;
15
+ }
@@ -0,0 +1,5 @@
1
+ import { SoleDetails as SoleDetailsBase } from '../../db/Models/sole/sole-details';
2
+ import { User } from '../user/user';
3
+ export declare class SoleDetails extends SoleDetailsBase {
4
+ user: User;
5
+ }
@@ -0,0 +1,7 @@
1
+ import { SoleInvoiceItem as SoleInvoiceItemBase } from '../../db/Models/sole/sole-invoice-item';
2
+ import { SoleInvoice } from './sole-invoice';
3
+ import { ChartAccounts } from '../chart-accounts/chart-accounts';
4
+ export declare class SoleInvoiceItem extends SoleInvoiceItemBase {
5
+ invoice: SoleInvoice;
6
+ chartAccounts: ChartAccounts;
7
+ }
@@ -0,0 +1,7 @@
1
+ import { SoleBusiness } from './sole-business';
2
+ import { BankAccount } from '../bank/bank-account';
3
+ import { SoleInvoiceTemplate as SoleInvoiceTemplateBase } from '../../db/Models/sole/sole-invoice-template';
4
+ export declare class SoleInvoiceTemplate extends SoleInvoiceTemplateBase {
5
+ business: SoleBusiness;
6
+ bankAccount: BankAccount;
7
+ }
@@ -0,0 +1,15 @@
1
+ import { SoleInvoice as SoleInvoiceBase } from '../../db/Models/sole/sole-invoice';
2
+ import { User } from '../user/user';
3
+ import { SoleBusiness } from './sole-business';
4
+ import { SoleInvoiceItem } from './sole-invoice-item';
5
+ import { SoleContact } from './sole-contact';
6
+ import { SoleInvoiceTemplate } from './sole-invoice-template';
7
+ export declare class SoleInvoice extends SoleInvoiceBase {
8
+ dateFrom: Date;
9
+ dateTo: Date;
10
+ user: User;
11
+ business: SoleBusiness;
12
+ items: SoleInvoiceItem[];
13
+ payer: SoleContact;
14
+ template: SoleInvoiceTemplate;
15
+ }
@@ -7,10 +7,12 @@ import { Phone } from '../phone/phone';
7
7
  import { ServiceSubscription } from '../service-subscription/service-subscription';
8
8
  import { ServiceSubscriptionItem } from '../service-subscription/service-subscription-item';
9
9
  import { Photoable } from '../../interfaces/photoable';
10
+ import { SoleDetails } from '../sole';
10
11
  export declare class User extends BaseUser implements Photoable {
11
12
  subscriptions: ServiceSubscription[];
12
13
  clientDetails: ClientDetails;
13
14
  employeeDetails: EmployeeDetails;
15
+ soleDetails: SoleDetails;
14
16
  address: Address;
15
17
  phone: Phone;
16
18
  createdAt: Date;
@@ -60,5 +62,5 @@ export declare class User extends BaseUser implements Photoable {
60
62
  /**
61
63
  * get user's initials
62
64
  */
63
- getInitials(): string;
65
+ getPhotoPlaceholder(): string;
64
66
  }
@@ -0,0 +1 @@
1
+ export * from './sole';
@@ -9,8 +9,11 @@ import * as i0 from "@angular/core";
9
9
  * and describe abstract methods/properties that have to be implemented in child services
10
10
  * Model - entity service is working with
11
11
  * BaseModel - base entity model that extends by Model
12
- * @TODO Alex: refactor all services for work with collections instead of arrays
13
- * @TODO Alex: implement smart system of default toast messages
12
+ * @TODO TT-1777 Alex: refactor all services for work with collections instead of arrays
13
+ * @TODO TT-1777 Alex: implement smart system of default toast messages
14
+ * @TODO TT-1777 Alex: work not only with array/collection but with single objects
15
+ * @TODO TT-1777 Alex: automatic events generation (eventDispatcher)
16
+ * @TODO TT-1777 Alex: optional rest methods (not all services have all 4 methods)
14
17
  */
15
18
  export declare abstract class RestService<BaseModel, Model extends BaseModel> implements IEventListener {
16
19
  protected http: HttpClient;
@@ -0,0 +1,3 @@
1
+ export * from './sole-business/sole-business.service';
2
+ export * from './sole-contact/sole-contact.service';
3
+ export * from './sole-details/sole-details.service';
@@ -0,0 +1,11 @@
1
+ import { RestService } from '../../rest/rest.service';
2
+ import { SoleBusiness as SoleBusinessBase } from '../../../../db/Models/sole/sole-business';
3
+ import { SoleBusiness } from '../../../../models';
4
+ import * as i0 from "@angular/core";
5
+ export declare class SoleBusinessService extends RestService<SoleBusinessBase, SoleBusiness> {
6
+ modelClass: typeof SoleBusiness;
7
+ url: string;
8
+ isHydra: boolean;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<SoleBusinessService, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<SoleBusinessService>;
11
+ }
@@ -0,0 +1,11 @@
1
+ import { RestService } from '../../rest/rest.service';
2
+ import { SoleContact as SoleContactBase } from '../../../../db/Models/sole/sole-contact';
3
+ import { SoleContact } from '../../../../models';
4
+ import * as i0 from "@angular/core";
5
+ export declare class SoleContactService extends RestService<SoleContactBase, SoleContact> {
6
+ modelClass: typeof SoleContact;
7
+ url: string;
8
+ isHydra: boolean;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<SoleContactService, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<SoleContactService>;
11
+ }
@@ -0,0 +1,19 @@
1
+ import { SoleDetails } from '../../../../models';
2
+ import { Observable, ReplaySubject } from 'rxjs';
3
+ import { HttpClient } from '@angular/common/http';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * @TODO TT-1777 Alex: extend from rest service when it refactored
7
+ */
8
+ export declare class SoleDetailsService {
9
+ private http;
10
+ protected environment: any;
11
+ cache: SoleDetails;
12
+ cacheSubject: ReplaySubject<SoleDetails>;
13
+ constructor(http: HttpClient, environment: any);
14
+ get(): Observable<SoleDetails>;
15
+ add(soleDetails: SoleDetails): Observable<SoleDetails>;
16
+ update(soleDetails: SoleDetails): Observable<SoleDetails>;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<SoleDetailsService, never>;
18
+ static ɵprov: i0.ɵɵInjectableDeclaration<SoleDetailsService>;
19
+ }
@@ -0,0 +1 @@
1
+ export * from './http';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "0.22.1",
3
+ "version": "0.23.0",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^12.2.3 || ~13.0.0",
package/public-api.d.ts CHANGED
@@ -137,6 +137,7 @@ export * from './lib/db/Enums/property/property-sale/tax-exemption-metadata.enum
137
137
  /**
138
138
  * Models and related enums and consts
139
139
  */
140
+ export * from './lib/models';
140
141
  export * from './lib/models/account-setup/account-setup-item';
141
142
  export * from './lib/models/address/address';
142
143
  export * from './lib/models/address/country';
@@ -293,6 +294,7 @@ export * from './lib/models/user-event/user-event-type';
293
294
  /**
294
295
  * Services
295
296
  */
297
+ export * from './lib/services';
296
298
  export * from './lib/services/account-setup/account-setup.service';
297
299
  export * from './lib/services/http/address/address.service';
298
300
  export * from './lib/services/asset/assets.service';