@livechat/developer-studio-api 3.0.23 → 3.0.24

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
@@ -2389,10 +2389,11 @@ function getLiveChatClientAuthorization(req) {
2389
2389
  };
2390
2390
  }
2391
2391
  function getLiveChatClientConfig(options = {}) {
2392
+ var _a;
2392
2393
  const currentHeaders = livechatClientInstance.defaults.headers;
2393
2394
  const defaultAuthorization = currentHeaders.Authorization;
2394
2395
  const headers = {
2395
- authorization: defaultAuthorization != null ? defaultAuthorization : options.token ? `Bearer ${options.token}` : void 0
2396
+ authorization: (_a = options.token ? `Bearer ${options.token}` : void 0) != null ? _a : defaultAuthorization
2396
2397
  };
2397
2398
  return {
2398
2399
  headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
@@ -3276,10 +3277,11 @@ function getPlatformDpsAdminClientAuthorization() {
3276
3277
  };
3277
3278
  }
3278
3279
  function getPlatformDpsClientConfig(options = {}) {
3280
+ var _a;
3279
3281
  const currentHeaders = platformDpsClientInstance.defaults.headers;
3280
3282
  const defaultAuthorization = currentHeaders.Authorization;
3281
3283
  const headers = {
3282
- authorization: defaultAuthorization != null ? defaultAuthorization : options.token ? `Bearer ${options.token}` : void 0
3284
+ authorization: (_a = options.token ? `Bearer ${options.token}` : void 0) != null ? _a : defaultAuthorization
3283
3285
  };
3284
3286
  return {
3285
3287
  headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
@@ -5429,9 +5431,10 @@ function getPlatformBillingClientAuthorization(req) {
5429
5431
  };
5430
5432
  }
5431
5433
  function getPlatformBillingClientConfig(options = {}) {
5434
+ var _a;
5432
5435
  const defaultAuthorization = platformBillingClientInstance.defaults.headers.Authorization;
5433
5436
  const headers = {
5434
- authorization: defaultAuthorization != null ? defaultAuthorization : options.token ? `Bearer ${options.token}` : void 0
5437
+ authorization: (_a = options.token ? `Bearer ${options.token}` : void 0) != null ? _a : defaultAuthorization
5435
5438
  };
5436
5439
  return {
5437
5440
  headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
package/dist/index.mjs CHANGED
@@ -2287,10 +2287,11 @@ function getLiveChatClientAuthorization(req) {
2287
2287
  };
2288
2288
  }
2289
2289
  function getLiveChatClientConfig(options = {}) {
2290
+ var _a;
2290
2291
  const currentHeaders = livechatClientInstance.defaults.headers;
2291
2292
  const defaultAuthorization = currentHeaders.Authorization;
2292
2293
  const headers = {
2293
- authorization: defaultAuthorization != null ? defaultAuthorization : options.token ? `Bearer ${options.token}` : void 0
2294
+ authorization: (_a = options.token ? `Bearer ${options.token}` : void 0) != null ? _a : defaultAuthorization
2294
2295
  };
2295
2296
  return {
2296
2297
  headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
@@ -3174,10 +3175,11 @@ function getPlatformDpsAdminClientAuthorization() {
3174
3175
  };
3175
3176
  }
3176
3177
  function getPlatformDpsClientConfig(options = {}) {
3178
+ var _a;
3177
3179
  const currentHeaders = platformDpsClientInstance.defaults.headers;
3178
3180
  const defaultAuthorization = currentHeaders.Authorization;
3179
3181
  const headers = {
3180
- authorization: defaultAuthorization != null ? defaultAuthorization : options.token ? `Bearer ${options.token}` : void 0
3182
+ authorization: (_a = options.token ? `Bearer ${options.token}` : void 0) != null ? _a : defaultAuthorization
3181
3183
  };
3182
3184
  return {
3183
3185
  headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
@@ -5327,9 +5329,10 @@ function getPlatformBillingClientAuthorization(req) {
5327
5329
  };
5328
5330
  }
5329
5331
  function getPlatformBillingClientConfig(options = {}) {
5332
+ var _a;
5330
5333
  const defaultAuthorization = platformBillingClientInstance.defaults.headers.Authorization;
5331
5334
  const headers = {
5332
- authorization: defaultAuthorization != null ? defaultAuthorization : options.token ? `Bearer ${options.token}` : void 0
5335
+ authorization: (_a = options.token ? `Bearer ${options.token}` : void 0) != null ? _a : defaultAuthorization
5333
5336
  };
5334
5337
  return {
5335
5338
  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.0.23",
3
+ "version": "3.0.24",
4
4
  "description": "This project is API for LiveChat Developer Studio.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -17,9 +17,9 @@
17
17
  "@types/node": "^17.0.12",
18
18
  "tsup": "^7.1.0",
19
19
  "typescript": "^5.1.6",
20
+ "tsconfig": "0.0.1",
20
21
  "eslint-config-custom": "0.0.7",
21
- "utils": "0.0.3",
22
- "tsconfig": "0.0.1"
22
+ "utils": "0.0.3"
23
23
  },
24
24
  "scripts": {
25
25
  "build": "tsup",