taxtank-core 0.32.27 → 0.32.29

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.
@@ -1,20 +1,18 @@
1
- import { RestService } from '../../rest/rest-old.service';
1
+ import { RestMethod, RestService } from '../../rest';
2
2
  import { User as UserBase } from '../../../../db/Models/user/user';
3
3
  import { Observable } from 'rxjs';
4
- import { User } from '../../../../models/user/user';
4
+ import { User } from '../../../../models';
5
5
  import { EmployeeMessagesEnum } from './employee-messages.enum';
6
+ import { Collection } from '../../../../collections';
6
7
  import * as i0 from "@angular/core";
7
- export declare class EmployeeService extends RestService<UserBase, User> {
8
- url: string;
8
+ export declare class EmployeeService extends RestService<UserBase, User, Collection<User>> {
9
+ protected endpointUri: string;
9
10
  modelClass: typeof User;
11
+ collectionClass: typeof Collection<User>;
12
+ disabledMethods: RestMethod[];
10
13
  messages: typeof EmployeeMessagesEnum;
11
- /**
12
- * Grant/Remove Manager role to employee
13
- * @param employee
14
- */
15
- toggleManagerRole(employee: User): Observable<User>;
16
- activateEmployee(employee: User, path?: string): Observable<User>;
17
- deactivateEmployee(employee: User, path?: string): Observable<User>;
14
+ activateEmployee(employee: User): Observable<User>;
15
+ deactivateEmployee(employee: User): Observable<User>;
18
16
  static ɵfac: i0.ɵɵFactoryDeclaration<EmployeeService, never>;
19
17
  static ɵprov: i0.ɵɵInjectableDeclaration<EmployeeService>;
20
18
  }
@@ -3,7 +3,6 @@ import { ToastService } from '../../toast';
3
3
  import { JwtService } from '../../auth';
4
4
  import { Router } from '@angular/router';
5
5
  import { BehaviorSubject } from 'rxjs';
6
- import { MixpanelService } from '../../mixpanel/mixpanel.service';
7
6
  import * as i0 from "@angular/core";
8
7
  /**
9
8
  * Google instance
@@ -15,12 +14,11 @@ export declare class GoogleService {
15
14
  private toastService;
16
15
  private jwtService;
17
16
  private router;
18
- private mpService;
19
17
  private environment;
20
18
  isLoggedInSubject: BehaviorSubject<boolean>;
21
19
  isGoogleEnabled: boolean;
22
20
  googleScope: string;
23
- constructor(http: HttpClient, toastService: ToastService, jwtService: JwtService, router: Router, mpService: MixpanelService, environment: any);
21
+ constructor(http: HttpClient, toastService: ToastService, jwtService: JwtService, router: Router, environment: any);
24
22
  /**
25
23
  * prompt for user consent and obtain an access token to work with user data
26
24
  * requestAccessToken() method to trigger the token UX flow and obtain an access token.
@@ -102,6 +102,10 @@ export declare abstract class RestService<BaseModel, Model extends BaseModel> {
102
102
  * Update cache subject with current cache array value
103
103
  */
104
104
  protected updateCache(): void;
105
+ /**
106
+ * perform a shallow copy of the emitted data to make it immutable
107
+ */
108
+ getCacheSubjectObservable(): Observable<Model[]>;
105
109
  /**
106
110
  * @TODO use excludeExtraneousValues when all models refactored (exposed all needed properties)
107
111
  * Create new instance of class
@@ -45,6 +45,10 @@ export declare abstract class RestService<BaseModel, Model extends AbstractModel
45
45
  * Refresh cache with actual backend data
46
46
  */
47
47
  refreshCache(): void;
48
+ /**
49
+ * perform a shallow copy of the emitted data to make it immutable
50
+ */
51
+ getCacheSubjectObservable(): Observable<CollectionModel>;
48
52
  /**
49
53
  * Get data from backend and fill the cache
50
54
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "0.32.27",
3
+ "version": "0.32.29",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/compiler": "^16.2.12",