@bagelink/sdk 0.0.270 → 0.0.280

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.ts +14 -14
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/sdk",
3
3
  "type": "module",
4
- "version": "0.0.270",
4
+ "version": "0.0.280",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Neveh Allon",
package/src/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- import ax, { type AxiosPromise, type AxiosInstance } from 'axios';
1
+ import ax, { type AxiosInstance } from 'axios';
2
2
 
3
3
  import openAPI from './openAPITools';
4
4
 
@@ -7,19 +7,19 @@ export type TableToTypeMapping = Record<Tables, any>;
7
7
 
8
8
  export { openAPI };
9
9
  export interface User {
10
- id: string
11
- first_name?: string
12
- last_name?: string
13
- email?: string
14
- password?: string
15
- is_verified?: boolean
16
- locale: string
17
- type: string
10
+ id: string
11
+ first_name?: string
12
+ last_name?: string
13
+ email?: string
14
+ password?: string
15
+ is_verified?: boolean
16
+ locale: string
17
+ type: string
18
18
  }
19
19
 
20
20
  interface UploadOptions {
21
- // eslint-disable-next-line no-unused-vars
22
- onUploadProgress?: (progressEvent: any) => void
21
+ // eslint-disable-next-line no-unused-vars
22
+ onUploadProgress?: (progressEvent: any) => void
23
23
  }
24
24
 
25
25
  const axios = ax.create({
@@ -194,7 +194,7 @@ class BagelAuth {
194
194
  export class Bagel {
195
195
  host: string;
196
196
 
197
- axiosInstance:AxiosInstance = axios;
197
+ axiosInstance: AxiosInstance = axios;
198
198
 
199
199
  // eslint-disable-next-line no-unused-vars
200
200
  onError?: (err: any) => void;
@@ -238,7 +238,7 @@ export class Bagel {
238
238
  if (endpoint.match(/undefined|null/)) throw new Error('Invalid endpoint');
239
239
  if (query) {
240
240
  const queryParams = Object.entries(query)
241
- // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
241
+ // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
242
242
  .filter(([_, value]) => !!value)
243
243
  .map(([key, value]) => `${key}=${value}`)
244
244
  .join('&');
@@ -304,7 +304,7 @@ export class Bagel {
304
304
  });
305
305
  }
306
306
 
307
- async uploadFile<T =any>(file: File, options?: UploadOptions): Promise<T> {
307
+ async uploadFile<T = any>(file: File, options?: UploadOptions): Promise<T> {
308
308
  const formData = new FormData();
309
309
  formData.append('file', file);
310
310
  // get an indication of the progress