larapi 0.0.2 → 0.0.4

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.
package/lib/Core.d.ts CHANGED
@@ -14,7 +14,7 @@ declare abstract class Core {
14
14
  private getCache;
15
15
  setHost(host: string): void;
16
16
  private setCache;
17
- private deleteCacheGroup;
17
+ deleteCacheGroup(group: string): void;
18
18
  private deleteCache;
19
19
  setInitData(data: TGroupsData): void;
20
20
  }
package/lib/index.d.ts CHANGED
@@ -37,5 +37,6 @@ declare class API extends Core {
37
37
  static setToken: (token: string) => void;
38
38
  static addListener: (event: import("./types").TListenerEvents, callback: (data: any) => void) => import("easy-event-emitter").Event;
39
39
  static setInitData: (data: import("./types").TGroupsData) => void;
40
+ static deleteCacheGroup: (group: string) => void;
40
41
  }
41
42
  export default API;
package/lib/index.js CHANGED
@@ -142,5 +142,11 @@ Object.defineProperty(API, "setInitData", {
142
142
  writable: true,
143
143
  value: _a.instance.setInitData
144
144
  });
145
+ Object.defineProperty(API, "deleteCacheGroup", {
146
+ enumerable: true,
147
+ configurable: true,
148
+ writable: true,
149
+ value: _a.instance.deleteCacheGroup
150
+ });
145
151
  globalThis.apiSetInitData = API.setInitData;
146
152
  exports.default = API;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "larapi",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "API client for laravel",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
package/src/Core.ts CHANGED
@@ -198,7 +198,7 @@ abstract class Core {
198
198
  };
199
199
  }
200
200
 
201
- private deleteCacheGroup(group: string): void {
201
+ public deleteCacheGroup(group: string): void {
202
202
  for(const key in this.cache) {
203
203
  if (this.cache[key].group === group) {
204
204
  delete this.cache[key];
package/src/index.ts CHANGED
@@ -98,6 +98,7 @@ class API extends Core {
98
98
  public static setToken = this.instance.setToken;
99
99
  public static addListener = this.instance.addListener;
100
100
  public static setInitData = this.instance.setInitData;
101
+ public static deleteCacheGroup = this.instance.deleteCacheGroup;
101
102
  }
102
103
 
103
104
  (globalThis as any).apiSetInitData = API.setInitData;