@auxilium/datalynk-client 0.7.0 → 0.7.1

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
@@ -660,8 +660,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
660
660
  return setTimeout.apply(void 0, __spreadArray([handler, timeout], __read(args)));
661
661
  },
662
662
  clearTimeout: function(handle) {
663
- var delegate = timeoutProvider.delegate;
664
- return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);
663
+ return clearTimeout(handle);
665
664
  },
666
665
  delegate: void 0
667
666
  };
@@ -1551,7 +1550,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
1551
1550
  * @returns {Promise<any>} Session information returned from login request
1552
1551
  */
1553
1552
  login(spoke, login, password, twoFactor) {
1554
- return fetch(`${this.api.url}login`, {
1553
+ return fetch(`${this.api.url + "login"}`, {
1555
1554
  method: "POST",
1556
1555
  body: St(ot({
1557
1556
  realm: spoke.trim(),
@@ -1573,7 +1572,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
1573
1572
  * @return {Promise<any>}
1574
1573
  */
1575
1574
  loginGuest() {
1576
- return fetch(`${this.api.url}guest`).then(async (resp) => {
1575
+ return fetch(`${this.api.url.replace("/api/", "/guest/")}`).then(async (resp) => {
1577
1576
  const data = await resp.json().catch(() => ({}));
1578
1577
  if (!resp.ok || data["error"]) throw Object.assign(kt(resp.status, data.error) || {}, data);
1579
1578
  this.api.token = data["token"];
package/dist/index.mjs CHANGED
@@ -656,8 +656,7 @@ var timeoutProvider = {
656
656
  return setTimeout.apply(void 0, __spreadArray([handler, timeout], __read(args)));
657
657
  },
658
658
  clearTimeout: function(handle) {
659
- var delegate = timeoutProvider.delegate;
660
- return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);
659
+ return clearTimeout(handle);
661
660
  },
662
661
  delegate: void 0
663
662
  };
@@ -1547,7 +1546,7 @@ class Auth {
1547
1546
  * @returns {Promise<any>} Session information returned from login request
1548
1547
  */
1549
1548
  login(spoke, login, password, twoFactor) {
1550
- return fetch(`${this.api.url}login`, {
1549
+ return fetch(`${this.api.url + "login"}`, {
1551
1550
  method: "POST",
1552
1551
  body: St(ot({
1553
1552
  realm: spoke.trim(),
@@ -1569,7 +1568,7 @@ class Auth {
1569
1568
  * @return {Promise<any>}
1570
1569
  */
1571
1570
  loginGuest() {
1572
- return fetch(`${this.api.url}guest`).then(async (resp) => {
1571
+ return fetch(`${this.api.url.replace("/api/", "/guest/")}`).then(async (resp) => {
1573
1572
  const data = await resp.json().catch(() => ({}));
1574
1573
  if (!resp.ok || data["error"]) throw Object.assign(kt(resp.status, data.error) || {}, data);
1575
1574
  this.api.token = data["token"];
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@auxilium/datalynk-client",
3
3
  "description": "Datalynk client library",
4
4
  "repository": "https://gitlab.auxiliumgroup.com/auxilium/datalynk/datalynk-client",
5
- "version": "0.7.0",
5
+ "version": "0.7.1",
6
6
  "author": "Zak Timson <zaktimson@gmail.com>",
7
7
  "private": false,
8
8
  "main": "./dist/index.cjs",
@@ -30,10 +30,8 @@
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/node": "^20.14.10",
33
- "@types/read": "^0.0.32",
34
33
  "ts-node": "^10.9.2",
35
34
  "typedoc": "^0.26.7",
36
- "typedoc-plugin-markdown": "^4.2.7",
37
35
  "typescript": "^5.5.3",
38
36
  "vite": "^5.0.12",
39
37
  "vite-plugin-dts": "^3.7.2"