taxtank-core 0.29.4 → 0.29.6

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 (37) hide show
  1. package/bundles/taxtank-core.umd.js +71 -13
  2. package/bundles/taxtank-core.umd.js.map +1 -1
  3. package/esm2015/lib/collections/sole/sole-business-losses.collection.js +2 -2
  4. package/esm2015/lib/collections/transaction/transaction.collection.js +3 -3
  5. package/esm2015/lib/db/Enums/file-type.enum.js +14 -0
  6. package/esm2015/lib/db/Models/file.js +4 -0
  7. package/esm2015/lib/db/Models/index.js +2 -1
  8. package/esm2015/lib/db/Models/sole/sole-invoice-template.js +1 -1
  9. package/esm2015/lib/forms/report/my-tax/my-tax-business-income-or-losses/my-tax-business-income-or-losses.form.js +1 -4
  10. package/esm2015/lib/forms/sole/sole-business-loss.form.js +3 -3
  11. package/esm2015/lib/forms/sole/sole-invoice-template.form.js +3 -2
  12. package/esm2015/lib/models/file/file.js +8 -0
  13. package/esm2015/lib/models/file/index.js +2 -0
  14. package/esm2015/lib/models/index.js +2 -1
  15. package/esm2015/lib/models/report/my-tax/my-tax-business-income-or-losses/my-tax-business-losses/my-tax-business-losses.js +4 -4
  16. package/esm2015/lib/models/report/sole/sole-business/sole-business-loss-report.js +3 -3
  17. package/esm2015/lib/models/sole/sole-invoice-template.js +12 -1
  18. package/esm2015/lib/services/http/file/file.service.js +32 -0
  19. package/esm2015/lib/services/http/file/index.js +2 -0
  20. package/esm2015/lib/services/http/index.js +2 -1
  21. package/fesm2015/taxtank-core.js +56 -14
  22. package/fesm2015/taxtank-core.js.map +1 -1
  23. package/lib/collections/transaction/transaction.collection.d.ts +1 -1
  24. package/lib/db/Enums/file-type.enum.d.ts +12 -0
  25. package/lib/db/Models/file.d.ts +16 -0
  26. package/lib/db/Models/index.d.ts +1 -0
  27. package/lib/db/Models/sole/sole-invoice-template.d.ts +2 -0
  28. package/lib/forms/report/my-tax/my-tax-business-income-or-losses/my-tax-business-income-or-losses.form.d.ts +0 -3
  29. package/lib/models/file/file.d.ts +7 -0
  30. package/lib/models/file/index.d.ts +1 -0
  31. package/lib/models/index.d.ts +1 -0
  32. package/lib/models/report/sole/sole-business/sole-business-loss-report.d.ts +2 -3
  33. package/lib/models/sole/sole-invoice-template.d.ts +6 -1
  34. package/lib/services/http/file/file.service.d.ts +16 -0
  35. package/lib/services/http/file/index.d.ts +1 -0
  36. package/lib/services/http/index.d.ts +1 -0
  37. package/package.json +1 -1
@@ -98,5 +98,5 @@ export declare class TransactionCollection extends ExportableCollection<Transact
98
98
  /**
99
99
  * @TODO vik business transactions calculated differently, separated collection?
100
100
  */
101
- getBusinessClaimAmount(businessId: number, allocations: TransactionAllocationCollection): number;
101
+ getBusinessClaimAmount(allocations: TransactionAllocationCollection, businessId?: number): number;
102
102
  }
@@ -0,0 +1,12 @@
1
+ export declare enum FileTypeEnum {
2
+ USER_PHOTO = 1,
3
+ PROPERTY_PHOTO = 2,
4
+ BUSINESS_LOGO = 3,
5
+ INVOICE_LOGO = 4,
6
+ FIRM_LOGO = 5,
7
+ PROPERTY = 6,
8
+ TRANSACTION_RECEIPT = 7,
9
+ DEPRECIATION_RECEIPT = 8,
10
+ MESSAGE = 9,
11
+ DOCUMENT = 10
12
+ }
@@ -0,0 +1,16 @@
1
+ import { FileTypeEnum } from '../Enums/file-type.enum';
2
+ import { AbstractModel } from './abstract-model';
3
+ import { User } from './user/user';
4
+ export declare class File extends AbstractModel {
5
+ name?: string;
6
+ originalName?: string;
7
+ size?: number;
8
+ mimeType?: string;
9
+ type?: FileTypeEnum;
10
+ publicUrl?: string;
11
+ id?: number;
12
+ deletedAt?: Date;
13
+ createdAt?: Date;
14
+ updatedAt?: Date;
15
+ user?: User;
16
+ }
@@ -95,6 +95,7 @@ export * from './vehicle/vehicle';
95
95
  export * from './abstract-model';
96
96
  export * from './address';
97
97
  export * from './country';
98
+ export * from './file';
98
99
  export * from './observable-model';
99
100
  export * from './phone';
100
101
  export * from './service-notification';
@@ -2,6 +2,7 @@ import { SoleBusiness } from './sole-business';
2
2
  import { BankAccount } from '../bank/bank-account';
3
3
  import { AbstractModel } from '../abstract-model';
4
4
  import { SoleInvoiceTemplateTaxTypeEnum } from '../../Enums/sole-invoice-template-tax-type.enum';
5
+ import { File } from '../file';
5
6
  export declare class SoleInvoiceTemplate extends AbstractModel {
6
7
  name?: string;
7
8
  taxType?: SoleInvoiceTemplateTaxTypeEnum;
@@ -9,4 +10,5 @@ export declare class SoleInvoiceTemplate extends AbstractModel {
9
10
  id?: number;
10
11
  business?: SoleBusiness;
11
12
  bankAccount?: BankAccount;
13
+ file?: File;
12
14
  }
@@ -1,8 +1,5 @@
1
1
  import { AbstractForm } from '../../../abstract.form';
2
2
  import { MyTaxBusinessDetails, MyTaxBusinessIncome, MyTaxBusinessLosses } from '../../../../models/report';
3
- /**
4
- * @Todo waiting for the Sole tank implementation
5
- */
6
3
  export declare class MyTaxBusinessIncomeOrLossesForm extends AbstractForm<object> {
7
4
  constructor(businessDetails: MyTaxBusinessDetails, businessIncome: MyTaxBusinessIncome, businessLosses: MyTaxBusinessLosses);
8
5
  }
@@ -0,0 +1,7 @@
1
+ import { File } from '../../db/Models';
2
+ /**
3
+ * The model renamed for more comfortable work because File already exist in JS
4
+ * @TODO Alex: consider a better name like document
5
+ */
6
+ export declare class AppFile extends File {
7
+ }
@@ -0,0 +1 @@
1
+ export * from './file';
@@ -6,6 +6,7 @@ export * from './chat';
6
6
  export * from './depreciation';
7
7
  export * from './dictionary';
8
8
  export * from './event';
9
+ export * from './file';
9
10
  export * from './financial-year';
10
11
  export * from './loan';
11
12
  export * from './notification';
@@ -1,7 +1,6 @@
1
1
  import { SoleBusinessLoss } from '../../../sole';
2
- import { TransactionCollection } from '../../../../collections';
3
- import { DepreciationCollection } from '../../../../collections/depreciation.collection';
4
- import { AbstractModel } from '../../../../db/Models/abstract-model';
2
+ import { TransactionCollection, DepreciationCollection } from '../../../../collections';
3
+ import { AbstractModel } from '../../../../db/Models';
5
4
  import { TransactionAllocation } from '../../../transaction';
6
5
  /**
7
6
  * Class with business loss details
@@ -2,9 +2,12 @@ import { SoleBusiness } from './sole-business';
2
2
  import { BankAccount } from '../bank/bank-account';
3
3
  import { SoleInvoiceTemplate as SoleInvoiceTemplateBase } from '../../db/Models/sole/sole-invoice-template';
4
4
  import { SoleInvoiceTemplateTaxTypeEnum } from '../../db/Enums/sole-invoice-template-tax-type.enum';
5
- export declare class SoleInvoiceTemplate extends SoleInvoiceTemplateBase {
5
+ import { AppFile } from '../file';
6
+ import { Photoable } from '../../interfaces';
7
+ export declare class SoleInvoiceTemplate extends SoleInvoiceTemplateBase implements Photoable {
6
8
  business: SoleBusiness;
7
9
  bankAccount: BankAccount;
10
+ file: AppFile;
8
11
  /**
9
12
  * Affects to SoleInvoiceItem.isGST flag availability.
10
13
  * When NONE: isGST is unavailable
@@ -16,4 +19,6 @@ export declare class SoleInvoiceTemplate extends SoleInvoiceTemplateBase {
16
19
  * Get term duration in milliseconds
17
20
  */
18
21
  get termTime(): number;
22
+ getPhoto(): string;
23
+ getPhotoPlaceholder(): string;
19
24
  }
@@ -0,0 +1,16 @@
1
+ import { RestMethod, RestService } from '../rest';
2
+ import { File as FileBase } from '../../../db/Models';
3
+ import { Collection } from '../../../collections';
4
+ import { AppFile } from '../../../models';
5
+ import { Observable } from 'rxjs';
6
+ import * as i0 from "@angular/core";
7
+ export declare class FileService extends RestService<FileBase, AppFile, Collection<AppFile>> {
8
+ protected endpointUri: string;
9
+ modelClass: typeof AppFile;
10
+ collectionClass: typeof Collection;
11
+ isApiPlatform: boolean;
12
+ disabledMethods: RestMethod[];
13
+ upload(file: File): Observable<AppFile>;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<FileService, never>;
15
+ static ɵprov: i0.ɵɵInjectableDeclaration<FileService>;
16
+ }
@@ -0,0 +1 @@
1
+ export * from './file.service';
@@ -5,6 +5,7 @@ export * from './chat';
5
5
  export * from './depreciation';
6
6
  export * from './document';
7
7
  export * from './facebook';
8
+ export * from './file';
8
9
  export * from './firm';
9
10
  export * from './income-source';
10
11
  export * from './loan';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "0.29.4",
3
+ "version": "0.29.6",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^12.2.3 || ~13.0.0",