@livechat/developer-studio-api 3.1.40 → 3.1.41

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.js CHANGED
@@ -3676,11 +3676,11 @@ function getLiveChatClientAuthorization(req) {
3676
3676
  };
3677
3677
  }
3678
3678
  function getLiveChatClientConfig(options = {}) {
3679
- var _a;
3679
+ var _a, _b;
3680
3680
  const currentHeaders = livechatClientInstance.defaults.headers;
3681
3681
  const defaultAuthorization = currentHeaders.Authorization;
3682
3682
  const headers = {
3683
- authorization: (_a = options.token ? `Bearer ${options.token}` : void 0) != null ? _a : defaultAuthorization
3683
+ authorization: (_b = options.token ? `${(_a = options.tokenType) != null ? _a : "Bearer"} ${options.token}` : void 0) != null ? _b : defaultAuthorization
3684
3684
  };
3685
3685
  return {
3686
3686
  headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
@@ -4587,11 +4587,11 @@ function getPlatformDpsAdminClientAuthorization() {
4587
4587
  };
4588
4588
  }
4589
4589
  function getPlatformDpsClientConfig(options = {}) {
4590
- var _a;
4590
+ var _a, _b;
4591
4591
  const currentHeaders = platformDpsClientInstance.defaults.headers;
4592
4592
  const defaultAuthorization = currentHeaders.Authorization;
4593
4593
  const headers = {
4594
- authorization: (_a = options.token ? `Bearer ${options.token}` : void 0) != null ? _a : defaultAuthorization
4594
+ authorization: (_b = options.token ? `${(_a = options.tokenType) != null ? _a : "Bearer"} ${options.token}` : void 0) != null ? _b : defaultAuthorization
4595
4595
  };
4596
4596
  return {
4597
4597
  headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
package/dist/index.mjs CHANGED
@@ -3524,11 +3524,11 @@ function getLiveChatClientAuthorization(req) {
3524
3524
  };
3525
3525
  }
3526
3526
  function getLiveChatClientConfig(options = {}) {
3527
- var _a;
3527
+ var _a, _b;
3528
3528
  const currentHeaders = livechatClientInstance.defaults.headers;
3529
3529
  const defaultAuthorization = currentHeaders.Authorization;
3530
3530
  const headers = {
3531
- authorization: (_a = options.token ? `Bearer ${options.token}` : void 0) != null ? _a : defaultAuthorization
3531
+ authorization: (_b = options.token ? `${(_a = options.tokenType) != null ? _a : "Bearer"} ${options.token}` : void 0) != null ? _b : defaultAuthorization
3532
3532
  };
3533
3533
  return {
3534
3534
  headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
@@ -4435,11 +4435,11 @@ function getPlatformDpsAdminClientAuthorization() {
4435
4435
  };
4436
4436
  }
4437
4437
  function getPlatformDpsClientConfig(options = {}) {
4438
- var _a;
4438
+ var _a, _b;
4439
4439
  const currentHeaders = platformDpsClientInstance.defaults.headers;
4440
4440
  const defaultAuthorization = currentHeaders.Authorization;
4441
4441
  const headers = {
4442
- authorization: (_a = options.token ? `Bearer ${options.token}` : void 0) != null ? _a : defaultAuthorization
4442
+ authorization: (_b = options.token ? `${(_a = options.tokenType) != null ? _a : "Bearer"} ${options.token}` : void 0) != null ? _b : defaultAuthorization
4443
4443
  };
4444
4444
  return {
4445
4445
  headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livechat/developer-studio-api",
3
- "version": "3.1.40",
3
+ "version": "3.1.41",
4
4
  "description": "This project is API for LiveChat Developer Studio.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -20,8 +20,8 @@
20
20
  "@types/node": "^17.0.12",
21
21
  "tsup": "^7.1.0",
22
22
  "typescript": "^5.1.6",
23
- "tsconfig": "0.0.1",
24
23
  "eslint-config-custom": "0.0.8",
24
+ "tsconfig": "0.0.1",
25
25
  "utils": "0.0.4"
26
26
  },
27
27
  "scripts": {