@bagelink/sdk 1.0.54 → 1.0.60

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
@@ -49,7 +49,7 @@ function schemaToType(schema) {
49
49
  return "undefined";
50
50
  case "null":
51
51
  return "null";
52
- case undefined:
52
+ case void 0:
53
53
  return "any";
54
54
  default:
55
55
  console.log("Unknown type", schema.type);
@@ -61,7 +61,7 @@ function isOptional(schema) {
61
61
  const splitType = type.split(/\s+\|\s+/);
62
62
  const includesNull = splitType.includes("null");
63
63
  const includesUndefined = splitType.includes("undefined");
64
- return includesNull || includesUndefined || schema.default !== undefined;
64
+ return includesNull || includesUndefined || schema.default !== void 0;
65
65
  }
66
66
  function cleanOptionals(str) {
67
67
  return str.split(" | ").filter((t) => t !== "null" && t !== "undefined").join(" | ");
@@ -343,7 +343,7 @@ function generateFunctions(paths, baseUrl) {
343
343
  }, body);
344
344
  }
345
345
  for (const [parent, object] of Object.entries(body)) {
346
- tsString += `export const ${parent} = ${JSON.stringify(object, undefined, 2)};
346
+ tsString += `export const ${parent} = ${JSON.stringify(object, void 0, 2)};
347
347
  `;
348
348
  }
349
349
  Object.entries(functionsInventory).forEach(([key, value]) => {
@@ -470,7 +470,7 @@ class DataRequest {
470
470
  } catch (err) {
471
471
  console.log(err);
472
472
  this.bagel.onError?.(err);
473
- return undefined;
473
+ return void 0;
474
474
  }
475
475
  }
476
476
  item(id) {
@@ -507,7 +507,7 @@ class BagelAuth {
507
507
  this.bagel = bagel;
508
508
  this.bagel = bagel;
509
509
  }
510
- user = undefined;
510
+ user = void 0;
511
511
  async validateUser() {
512
512
  try {
513
513
  const { data: usr } = await axios.get("/users/me", {
@@ -555,7 +555,7 @@ class BagelAuth {
555
555
  this.bagel.onError?.(err);
556
556
  console.log(err);
557
557
  }
558
- this.user = undefined;
558
+ this.user = void 0;
559
559
  }
560
560
  async acceptInvite(token, user) {
561
561
  await axios.post(`/auth/accept-invite/${token}`, user);
@@ -585,7 +585,7 @@ class Bagel {
585
585
  axios.defaults.baseURL = this.host;
586
586
  this.onError = onError;
587
587
  }
588
- read_table = undefined;
588
+ read_table = void 0;
589
589
  data(table) {
590
590
  return new DataRequest(table, this);
591
591
  }
package/dist/index.mjs CHANGED
@@ -43,7 +43,7 @@ function schemaToType(schema) {
43
43
  return "undefined";
44
44
  case "null":
45
45
  return "null";
46
- case undefined:
46
+ case void 0:
47
47
  return "any";
48
48
  default:
49
49
  console.log("Unknown type", schema.type);
@@ -55,7 +55,7 @@ function isOptional(schema) {
55
55
  const splitType = type.split(/\s+\|\s+/);
56
56
  const includesNull = splitType.includes("null");
57
57
  const includesUndefined = splitType.includes("undefined");
58
- return includesNull || includesUndefined || schema.default !== undefined;
58
+ return includesNull || includesUndefined || schema.default !== void 0;
59
59
  }
60
60
  function cleanOptionals(str) {
61
61
  return str.split(" | ").filter((t) => t !== "null" && t !== "undefined").join(" | ");
@@ -337,7 +337,7 @@ function generateFunctions(paths, baseUrl) {
337
337
  }, body);
338
338
  }
339
339
  for (const [parent, object] of Object.entries(body)) {
340
- tsString += `export const ${parent} = ${JSON.stringify(object, undefined, 2)};
340
+ tsString += `export const ${parent} = ${JSON.stringify(object, void 0, 2)};
341
341
  `;
342
342
  }
343
343
  Object.entries(functionsInventory).forEach(([key, value]) => {
@@ -464,7 +464,7 @@ class DataRequest {
464
464
  } catch (err) {
465
465
  console.log(err);
466
466
  this.bagel.onError?.(err);
467
- return undefined;
467
+ return void 0;
468
468
  }
469
469
  }
470
470
  item(id) {
@@ -501,7 +501,7 @@ class BagelAuth {
501
501
  this.bagel = bagel;
502
502
  this.bagel = bagel;
503
503
  }
504
- user = undefined;
504
+ user = void 0;
505
505
  async validateUser() {
506
506
  try {
507
507
  const { data: usr } = await axios.get("/users/me", {
@@ -549,7 +549,7 @@ class BagelAuth {
549
549
  this.bagel.onError?.(err);
550
550
  console.log(err);
551
551
  }
552
- this.user = undefined;
552
+ this.user = void 0;
553
553
  }
554
554
  async acceptInvite(token, user) {
555
555
  await axios.post(`/auth/accept-invite/${token}`, user);
@@ -579,7 +579,7 @@ class Bagel {
579
579
  axios.defaults.baseURL = this.host;
580
580
  this.onError = onError;
581
581
  }
582
- read_table = undefined;
582
+ read_table = void 0;
583
583
  data(table) {
584
584
  return new DataRequest(table, this);
585
585
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/sdk",
3
3
  "type": "module",
4
- "version": "1.0.54",
4
+ "version": "1.0.60",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Neveh Allon",
@@ -50,7 +50,7 @@
50
50
  "access": "public"
51
51
  },
52
52
  "dependencies": {
53
- "axios": "^1.8.1"
53
+ "axios": "^1.8.2"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@apidevtools/swagger-parser": "^10.1.1",