@go-avro/avro-js 0.0.4-beta.16 → 0.0.4-beta.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.
@@ -16,8 +16,8 @@ export declare class AuthManager {
16
16
  onTokenRefreshFailed(callback: () => void): void;
17
17
  refreshTokens(): Promise<Tokens>;
18
18
  setTokens(tokens: Tokens): Promise<void>;
19
- setCache(data: Partial<CacheData>): Promise<void>;
20
- getCache(key?: keyof CacheData): Promise<CacheData | string | null>;
19
+ setCache(data: Partial<CacheData> | Object): Promise<void>;
20
+ getCache(key?: keyof CacheData | string): Promise<CacheData[keyof CacheData] | Object | string | null>;
21
21
  clearCache(): Promise<void>;
22
22
  getCompanyId(): Promise<string | undefined>;
23
23
  setCompanyId(companyId: string): Promise<void[]>;
@@ -488,8 +488,8 @@ export declare class AvroQueryClient {
488
488
  cancelToken?: CancelToken;
489
489
  }>>;
490
490
  setTokens(tokens: Tokens): Promise<void>;
491
- setCache(data: Partial<CacheData>): Promise<void>;
492
- getCache(key?: keyof CacheData | undefined): Promise<CacheData | string | null>;
491
+ setCache(data: Partial<CacheData> | Object): Promise<void>;
492
+ getCache(key?: keyof CacheData | string): Promise<CacheData[keyof CacheData] | Object | string | null>;
493
493
  setCompanyId(companyId: string): Promise<void[]>;
494
494
  getCompanyId(): Promise<string | undefined>;
495
495
  clearCache(): Promise<void>;
@@ -176,7 +176,7 @@ export class AvroQueryClient {
176
176
  setCache(data) {
177
177
  return this.config.authManager.setCache(data);
178
178
  }
179
- getCache(key) {
179
+ async getCache(key) {
180
180
  return this.config.authManager.getCache(key);
181
181
  }
182
182
  setCompanyId(companyId) {
@@ -3,7 +3,7 @@ export interface CacheData extends Tokens {
3
3
  companyId: string;
4
4
  }
5
5
  export interface Cache {
6
- get(key?: keyof CacheData): Promise<CacheData | string | null>;
7
- set(data: Partial<CacheData>): Promise<void>;
6
+ get(key?: keyof CacheData | string): Promise<CacheData | string | null>;
7
+ set(data: Partial<CacheData> | Object): Promise<void>;
8
8
  clear(): Promise<void>;
9
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-avro/avro-js",
3
- "version": "0.0.4-beta.16",
3
+ "version": "0.0.4-beta.18",
4
4
  "description": "JS client for Avro backend integration.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",