@bagelink/sdk 1.4.182 → 1.4.188

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/dist/index.cjs CHANGED
@@ -795,10 +795,12 @@ class BagelAuth {
795
795
  class Bagel {
796
796
  host;
797
797
  fileBaseUrl;
798
+ fileVersion;
798
799
  onError;
799
- constructor({ host, fileBaseUrl, onError }) {
800
+ constructor({ host, fileBaseUrl, fileVersion, onError }) {
800
801
  this.host = host?.replace(/\/$/, "");
801
802
  this.fileBaseUrl = fileBaseUrl?.replace(/\/$/, "");
803
+ this.fileVersion = fileVersion || "files";
802
804
  if (!this.host) {
803
805
  return this;
804
806
  }
package/dist/index.d.cts CHANGED
@@ -425,8 +425,9 @@ declare class BagelAuth {
425
425
  declare class Bagel {
426
426
  host?: string;
427
427
  fileBaseUrl?: string;
428
+ fileVersion: string;
428
429
  onError?: (err: any) => void;
429
- constructor({ host, fileBaseUrl, onError }: {
430
+ constructor({ host, fileBaseUrl, fileVersion, onError }: {
430
431
  [key: string]: any;
431
432
  });
432
433
  read_table: Tables | undefined;
package/dist/index.d.mts CHANGED
@@ -425,8 +425,9 @@ declare class BagelAuth {
425
425
  declare class Bagel {
426
426
  host?: string;
427
427
  fileBaseUrl?: string;
428
+ fileVersion: string;
428
429
  onError?: (err: any) => void;
429
- constructor({ host, fileBaseUrl, onError }: {
430
+ constructor({ host, fileBaseUrl, fileVersion, onError }: {
430
431
  [key: string]: any;
431
432
  });
432
433
  read_table: Tables | undefined;
package/dist/index.d.ts CHANGED
@@ -425,8 +425,9 @@ declare class BagelAuth {
425
425
  declare class Bagel {
426
426
  host?: string;
427
427
  fileBaseUrl?: string;
428
+ fileVersion: string;
428
429
  onError?: (err: any) => void;
429
- constructor({ host, fileBaseUrl, onError }: {
430
+ constructor({ host, fileBaseUrl, fileVersion, onError }: {
430
431
  [key: string]: any;
431
432
  });
432
433
  read_table: Tables | undefined;
package/dist/index.mjs CHANGED
@@ -789,10 +789,12 @@ class BagelAuth {
789
789
  class Bagel {
790
790
  host;
791
791
  fileBaseUrl;
792
+ fileVersion;
792
793
  onError;
793
- constructor({ host, fileBaseUrl, onError }) {
794
+ constructor({ host, fileBaseUrl, fileVersion, onError }) {
794
795
  this.host = host?.replace(/\/$/, "");
795
796
  this.fileBaseUrl = fileBaseUrl?.replace(/\/$/, "");
797
+ this.fileVersion = fileVersion || "files";
796
798
  if (!this.host) {
797
799
  return this;
798
800
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/sdk",
3
3
  "type": "module",
4
- "version": "1.4.182",
4
+ "version": "1.4.188",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Neveh Allon",
package/src/index.ts CHANGED
@@ -188,12 +188,14 @@ class BagelAuth {
188
188
  export class Bagel {
189
189
  host?: string
190
190
  fileBaseUrl?: string
191
+ fileVersion: string
191
192
 
192
193
  onError?: (err: any) => void
193
194
 
194
- constructor({ host, fileBaseUrl, onError }: { [key: string]: any }) {
195
+ constructor({ host, fileBaseUrl, fileVersion, onError }: { [key: string]: any }) {
195
196
  this.host = host?.replace(/\/$/, '')
196
197
  this.fileBaseUrl = fileBaseUrl?.replace(/\/$/, '')
198
+ this.fileVersion = fileVersion || 'files' // Default to 'files_v2'
197
199
  if (!this.host) {
198
200
  return this
199
201
  }