@tachybase/sdk 0.23.58 → 1.0.18

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.
@@ -75,11 +75,15 @@ export declare class APIClient {
75
75
  axios: AxiosInstance;
76
76
  auth: Auth;
77
77
  storage: Storage;
78
+ options: APIClientOptions;
78
79
  constructor(instance?: APIClientOptions);
79
80
  private initStorage;
80
81
  getHeaders(): {};
81
82
  interceptors(): void;
82
- request<T = any, R = AxiosResponse<T>, D = any>(config: AxiosRequestConfig<D> | ResourceActionOptions): Promise<R>;
83
+ request<T = any, R = AxiosResponse<T>, D = any>(config: (AxiosRequestConfig<D> | ResourceActionOptions) & {
84
+ skipNotify?: boolean | ((error: any) => boolean);
85
+ skipAuth?: boolean;
86
+ }): Promise<R>;
83
87
  resource(name: string, of?: any, headers?: AxiosRequestHeaders): IResource;
84
88
  }
85
89
  export {};
package/lib/APIClient.js CHANGED
@@ -66,6 +66,9 @@ const _Auth = class _Auth {
66
66
  }
67
67
  this.KEYS["role"] = `${appName.toUpperCase()}_` + this.KEYS["role"];
68
68
  this.KEYS["locale"] = `${appName.toUpperCase()}_` + this.KEYS["locale"];
69
+ this.KEYS["token"] = `${appName.toUpperCase()}_` + this.KEYS["token"];
70
+ this.KEYS["theme"] = `${appName.toUpperCase()}_` + this.KEYS["theme"];
71
+ this.KEYS["authenticator"] = `${appName.toUpperCase()}_` + this.KEYS["authenticator"];
69
72
  }
70
73
  get locale() {
71
74
  return this.getLocale();
@@ -207,6 +210,7 @@ __name(_MemoryStorage, "MemoryStorage");
207
210
  let MemoryStorage = _MemoryStorage;
208
211
  const _APIClient = class _APIClient {
209
212
  constructor(instance) {
213
+ this.options = instance;
210
214
  if (typeof instance === "function") {
211
215
  this.axios = instance;
212
216
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tachybase/sdk",
3
- "version": "0.23.58",
3
+ "version": "1.0.18",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",