@go-avro/avro-js 0.0.2-beta.114 → 0.0.2-beta.115

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.
@@ -312,7 +312,7 @@ export declare class AvroQueryClient {
312
312
  }>>;
313
313
  setTokens(tokens: Tokens): Promise<void>;
314
314
  setCache(data: Partial<CacheData>): Promise<void>;
315
- getCache(key: keyof CacheData | undefined): Promise<CacheData | string | null>;
315
+ getCache(key?: keyof CacheData | undefined): Promise<CacheData | string | null>;
316
316
  setCompanyId(companyId: string): Promise<void[]>;
317
317
  clearCache(): Promise<void>;
318
318
  isAuthenticated(): boolean;
@@ -145,6 +145,7 @@ export class AvroQueryClient {
145
145
  }
146
146
  throw new StandardError(401, 'Invalid Google login response');
147
147
  }
148
+ this._isAuthenticated = true;
148
149
  this.socket.auth = { token: resp.access_token };
149
150
  if (!this.socket.connected) {
150
151
  this.socket.connect();
@@ -220,7 +221,7 @@ export class AvroQueryClient {
220
221
  })
221
222
  .catch(err => {
222
223
  console.error('Failed to fetch jobs:', err);
223
- throw new StandardError(500, 'Failed to fetch jobs');
224
+ throw new StandardError(500, `Failed to fetch jobs: ${err.message ?? err}`);
224
225
  });
225
226
  }
226
227
  fetchChats(body = {}, cancelToken, headers = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-avro/avro-js",
3
- "version": "0.0.2-beta.114",
3
+ "version": "0.0.2-beta.115",
4
4
  "description": "JS client for Avro backend integration.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",