@kiminix/tp-client 2.11.7 → 2.11.8

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.
@@ -36,6 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
36
36
  };
37
37
  import axios from "axios";
38
38
  import { base } from "../constants";
39
+ import { RequestUtils } from "../utils/request-utils";
39
40
  // iam module APIs
40
41
  var IamAdminAPIs = /** @class */ (function () {
41
42
  function IamAdminAPIs() {
@@ -43,21 +44,14 @@ var IamAdminAPIs = /** @class */ (function () {
43
44
  IamAdminAPIs.signIn = function (identifier, password) {
44
45
  return __awaiter(this, void 0, void 0, function () {
45
46
  return __generator(this, function (_a) {
46
- switch (_a.label) {
47
- case 0: return [4 /*yield*/, axios.post(base + "/iam/admin/sign-in", { identifier: identifier, password: password }, {
47
+ return [2 /*return*/, RequestUtils.send(function () {
48
+ return axios.post(base + "/iam/admin/sign-in", { identifier: identifier, password: password }, {
48
49
  headers: {
49
- // 'Authorization': `${user.token}`,
50
50
  'Content-Type': 'application/json'
51
51
  }
52
52
  })
53
- .then(function (response) {
54
- return response.data;
55
- })
56
- .catch(function (error) {
57
- throw Error('failed_login');
58
- })];
59
- case 1: return [2 /*return*/, _a.sent()];
60
- }
53
+ .then(function (response) { return response.data; });
54
+ })];
61
55
  });
62
56
  });
63
57
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiminix/tp-client",
3
- "version": "2.11.7",
3
+ "version": "2.11.8",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [