@koalarx/ui 13.2.4 → 13.2.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.
@@ -1,15 +1,18 @@
1
- import { BehaviorSubject } from "rxjs";
2
- import { KoalaApiRequesterService } from "./koala.api-requester.service";
1
+ import { BehaviorSubject, Observable } from "rxjs";
2
+ import { ApiRequesterType, KoalaApiRequesterService } from "./koala.api-requester.service";
3
3
  import { KoalaResponseInterface } from "./helpers/error/koala.errors.helper";
4
4
  export declare abstract class KoalaApiRequesterBase<EntityType, GetAllType, DataType> {
5
5
  protected koalaService: KoalaApiRequesterService;
6
6
  protected endpoint: string;
7
- protected constructor(koalaService: KoalaApiRequesterService, endpoint: string, environmentNameToEndpointApi?: string, isMockup?: boolean);
8
- getAll(filter?: BehaviorSubject<any> | any): import("rxjs").Observable<GetAllType>;
9
- getById(id: number): import("rxjs").Observable<EntityType>;
10
- getBySomething<Type>(something: any): import("rxjs").Observable<Type>;
11
- save(data: DataType, id?: number): import("rxjs").Observable<KoalaResponseInterface>;
12
- delete(id: number): import("rxjs").Observable<KoalaResponseInterface>;
7
+ protected enableCache: boolean;
8
+ protected constructor(koalaService: KoalaApiRequesterService, endpoint: string, enableCache?: boolean, environmentNameToEndpointApi?: string, isMockup?: boolean);
9
+ getAll(filter?: BehaviorSubject<any> | any): Observable<GetAllType>;
10
+ getById(id: number): Observable<EntityType>;
11
+ getBySomething<Type>(something: any): Observable<Type>;
12
+ save(data: DataType, id?: number): Observable<KoalaResponseInterface>;
13
+ delete(id: number): Observable<KoalaResponseInterface>;
13
14
  cancelRequests(): Promise<void>;
14
15
  getParams(params?: BehaviorSubject<any> | any): Promise<any>;
16
+ request<T>(method: ApiRequesterType, url: string, data?: any): Observable<T>;
17
+ private startCache;
15
18
  }
@@ -0,0 +1,13 @@
1
+ import { BehaviorSubject, Observable } from "rxjs";
2
+ export interface KoalaCacheData {
3
+ name: string;
4
+ data: BehaviorSubject<any>;
5
+ }
6
+ export declare class KoalaApiRequesterCache {
7
+ private static cache;
8
+ static createCache(name: string): void;
9
+ static setDataInCache(name: string, data: any): void;
10
+ static getCacheSubject(name: string): BehaviorSubject<any>;
11
+ static getCacheAsObservable<T>(name: string): Observable<T>;
12
+ static hasCache(name: string): boolean;
13
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koalarx/ui",
3
- "version": "13.2.4",
3
+ "version": "13.2.7",
4
4
  "description": "Koala UI is a Design System developed in Angular whose objective is to facilitate and make your development faster and simpler, making this framework your greatest ally.",
5
5
  "repository": {
6
6
  "type": "git",