taxtank-core 0.31.5 → 0.31.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 (27) hide show
  1. package/esm2020/lib/forms/register/register-client.form.mjs +2 -2
  2. package/esm2020/lib/services/http/user/user.service.mjs +1 -1
  3. package/esm2020/lib/services/http/vehicle/index.mjs +3 -2
  4. package/esm2020/lib/services/http/vehicle/vehicle-logbook/index.mjs +3 -0
  5. package/esm2020/lib/services/http/vehicle/vehicle-logbook/vehicle-logbook-messages.enum.mjs +8 -0
  6. package/esm2020/lib/services/http/vehicle/vehicle-logbook/vehicle-logbook.service.mjs +25 -0
  7. package/esm2020/lib/services/http/vehicle/vehicle-messages.enum.mjs +8 -0
  8. package/esm2020/lib/services/http/vehicle/vehicle.service.mjs +5 -3
  9. package/esm2020/lib/services/vehicle/logbook-best-period.service.mjs +3 -4
  10. package/esm2020/lib/validators/index.mjs +2 -1
  11. package/esm2020/lib/validators/unique-email.validator.mjs +20 -0
  12. package/fesm2015/taxtank-core.mjs +72 -39
  13. package/fesm2015/taxtank-core.mjs.map +1 -1
  14. package/fesm2020/taxtank-core.mjs +71 -38
  15. package/fesm2020/taxtank-core.mjs.map +1 -1
  16. package/lib/forms/register/register-client.form.d.ts +1 -1
  17. package/lib/services/http/vehicle/index.d.ts +2 -1
  18. package/lib/services/http/vehicle/vehicle-logbook/index.d.ts +2 -0
  19. package/lib/services/http/vehicle/vehicle-logbook/vehicle-logbook-messages.enum.d.ts +6 -0
  20. package/lib/services/http/vehicle/vehicle-logbook/vehicle-logbook.service.d.ts +15 -0
  21. package/lib/services/http/vehicle/vehicle-messages.enum.d.ts +6 -0
  22. package/lib/services/http/vehicle/vehicle.service.d.ts +5 -3
  23. package/lib/validators/index.d.ts +1 -0
  24. package/lib/validators/unique-email.validator.d.ts +11 -0
  25. package/package.json +1 -1
  26. package/esm2020/lib/services/http/vehicle/vehicle-logbook.service.mjs +0 -23
  27. package/lib/services/http/vehicle/vehicle-logbook.service.d.ts +0 -13
@@ -1,5 +1,5 @@
1
1
  import { AbstractForm } from '../abstract.form';
2
- import { User } from '../../models/user/user';
2
+ import { User } from '../../models';
3
3
  export declare class RegisterClientForm extends AbstractForm<User> {
4
4
  constructor(referenceCode?: string);
5
5
  submit(data?: object): User;
@@ -1,4 +1,5 @@
1
1
  export * from './vehicle.service';
2
+ export * from './vehicle-messages.enum';
2
3
  export * from './vehicle-claim.service';
3
4
  export * from './vehicle-claim-details.service';
4
- export * from './vehicle-logbook.service';
5
+ export * from './vehicle-logbook';
@@ -0,0 +1,2 @@
1
+ export * from './vehicle-logbook.service';
2
+ export * from './vehicle-logbook-messages.enum';
@@ -0,0 +1,6 @@
1
+ export declare enum VehicleLogbookMessages {
2
+ CREATED = "Vehicle logbook created successfully",
3
+ UPDATED = "Vehicle logbook updated successfully",
4
+ CONFIRM_DELETE = "Are you sure you want to delete this trip?",
5
+ DELETED = "Vehicle logbook deleted successfully"
6
+ }
@@ -0,0 +1,15 @@
1
+ import { VehicleLogbook as VehicleLogbookBase } from '../../../../db/Models/vehicle/vehicle-logbook';
2
+ import { VehicleLogbook } from '../../../../models';
3
+ import { RestService } from '../../rest/rest.service';
4
+ import { VehicleLogbookCollection } from '../../../../collections';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * Vehicle logbook service. Allows user to add, update or delete vehicle trips
8
+ */
9
+ export declare class VehicleLogbookService extends RestService<VehicleLogbookBase, VehicleLogbook, VehicleLogbookCollection> {
10
+ protected endpointUri: string;
11
+ collectionClass: typeof VehicleLogbookCollection;
12
+ modelClass: typeof VehicleLogbook;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<VehicleLogbookService, never>;
14
+ static ɵprov: i0.ɵɵInjectableDeclaration<VehicleLogbookService>;
15
+ }
@@ -0,0 +1,6 @@
1
+ export declare enum VehicleMessagesEnum {
2
+ CREATED = "Vehicle created successfully",
3
+ UPDATED = "Vehicle updated successfully",
4
+ CONFIRM_DELETE = "Are you sure you want to delete this vehicle?",
5
+ DELETED = "Vehicle deleted successfully"
6
+ }
@@ -1,12 +1,14 @@
1
1
  import { Vehicle as VehicleBase } from '../../../db/Models/vehicle/vehicle';
2
2
  import { Vehicle } from '../../../models';
3
- import { RestService } from '../rest/rest-old.service';
3
+ import { RestService } from '../rest/rest.service';
4
+ import { Collection } from '../../../collections';
4
5
  import * as i0 from "@angular/core";
5
6
  /**
6
7
  * Service that allows to work with WorkTank operations
7
8
  */
8
- export declare class VehicleService extends RestService<VehicleBase, Vehicle> {
9
- url: string;
9
+ export declare class VehicleService extends RestService<VehicleBase, Vehicle, Collection<Vehicle>> {
10
+ protected endpointUri: string;
11
+ collectionClass: typeof Collection<Vehicle>;
10
12
  modelClass: typeof Vehicle;
11
13
  static ɵfac: i0.ɵɵFactoryDeclaration<VehicleService, never>;
12
14
  static ɵprov: i0.ɵɵInjectableDeclaration<VehicleService>;
@@ -8,3 +8,4 @@ export * from './fields-sum.validator';
8
8
  export * from './current-fin-year.validator';
9
9
  export * from './file.validator';
10
10
  export * from './greater-than.validator';
11
+ export * from './unique-email.validator';
@@ -0,0 +1,11 @@
1
+ import { AbstractControl, ValidationErrors } from '@angular/forms';
2
+ import { Observable } from 'rxjs';
3
+ import { UserService } from '../services';
4
+ import * as i0 from "@angular/core";
5
+ export declare class UniqueEmailValidator {
6
+ private userService;
7
+ constructor(userService: UserService);
8
+ validate(control: AbstractControl): Observable<ValidationErrors | null>;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<UniqueEmailValidator, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<UniqueEmailValidator>;
11
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "0.31.5",
3
+ "version": "0.31.7",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/compiler": "^15.1.5",
@@ -1,23 +0,0 @@
1
- import { Injectable } from '@angular/core';
2
- import { VehicleLogbook } from '../../../models';
3
- import { RestService } from '../rest/rest-old.service';
4
- import * as i0 from "@angular/core";
5
- /**
6
- * Vehicle logbook service. Allows user to add, update or delete vehicle trips
7
- */
8
- export class VehicleLogbookService extends RestService {
9
- constructor() {
10
- super(...arguments);
11
- this.url = 'vehicles/logbooks';
12
- this.modelClass = VehicleLogbook;
13
- }
14
- }
15
- VehicleLogbookService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: VehicleLogbookService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
16
- VehicleLogbookService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: VehicleLogbookService, providedIn: 'root' });
17
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: VehicleLogbookService, decorators: [{
18
- type: Injectable,
19
- args: [{
20
- providedIn: 'root'
21
- }]
22
- }] });
23
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVoaWNsZS1sb2dib29rLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvc2VydmljZXMvaHR0cC92ZWhpY2xlL3ZlaGljbGUtbG9nYm9vay5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFM0MsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQ2pELE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQzs7QUFFdkQ7O0dBRUc7QUFJSCxNQUFNLE9BQU8scUJBQXNCLFNBQVEsV0FBK0M7SUFIMUY7O1FBSUUsUUFBRyxHQUFHLG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ogbook } from '../../../models';
3
- import { RestService } from '../rest/rest-old.service';
4
- import * as i0 from "@angular/core";
5
- /**
6
- * Vehicle logbook service. Allows user to add, update or delete vehicle trips
7
- */
8
- export declare class VehicleLogbookService extends RestService<VehicleLogbookBase, VehicleLogbook> {
9
- url: string;
10
- modelClass: typeof VehicleLogbook;
11
- static ɵfac: i0.ɵɵFactoryDeclaration<VehicleLogbookService, never>;
12
- static ɵprov: i0.ɵɵInjectableDeclaration<VehicleLogbookService>;
13
- }