@livechat/developer-studio-api 3.0.22 → 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 } : {})
@@ -2930,9 +2931,10 @@ function getPlatformAccountsClientAuthorization(req) {
2930
2931
  };
2931
2932
  }
2932
2933
  function getPlatformAccountsClientConfig(options = {}) {
2934
+ var _a;
2933
2935
  const defaultAuthorization = platformAccountsClientInstance.defaults.headers.Authorization;
2934
2936
  const headers = {
2935
- authorization: defaultAuthorization != null ? defaultAuthorization : options.token ? `Bearer ${options.token}` : void 0
2937
+ authorization: (_a = options.token ? `Bearer ${options.token}` : void 0) != null ? _a : defaultAuthorization
2936
2938
  };
2937
2939
  return {
2938
2940
  headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
@@ -3275,10 +3277,11 @@ function getPlatformDpsAdminClientAuthorization() {
3275
3277
  };
3276
3278
  }
3277
3279
  function getPlatformDpsClientConfig(options = {}) {
3280
+ var _a;
3278
3281
  const currentHeaders = platformDpsClientInstance.defaults.headers;
3279
3282
  const defaultAuthorization = currentHeaders.Authorization;
3280
3283
  const headers = {
3281
- authorization: defaultAuthorization != null ? defaultAuthorization : options.token ? `Bearer ${options.token}` : void 0
3284
+ authorization: (_a = options.token ? `Bearer ${options.token}` : void 0) != null ? _a : defaultAuthorization
3282
3285
  };
3283
3286
  return {
3284
3287
  headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
@@ -5428,9 +5431,10 @@ function getPlatformBillingClientAuthorization(req) {
5428
5431
  };
5429
5432
  }
5430
5433
  function getPlatformBillingClientConfig(options = {}) {
5434
+ var _a;
5431
5435
  const defaultAuthorization = platformBillingClientInstance.defaults.headers.Authorization;
5432
5436
  const headers = {
5433
- authorization: defaultAuthorization != null ? defaultAuthorization : options.token ? `Bearer ${options.token}` : void 0
5437
+ authorization: (_a = options.token ? `Bearer ${options.token}` : void 0) != null ? _a : defaultAuthorization
5434
5438
  };
5435
5439
  return {
5436
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 } : {})
@@ -2828,9 +2829,10 @@ function getPlatformAccountsClientAuthorization(req) {
2828
2829
  };
2829
2830
  }
2830
2831
  function getPlatformAccountsClientConfig(options = {}) {
2832
+ var _a;
2831
2833
  const defaultAuthorization = platformAccountsClientInstance.defaults.headers.Authorization;
2832
2834
  const headers = {
2833
- authorization: defaultAuthorization != null ? defaultAuthorization : options.token ? `Bearer ${options.token}` : void 0
2835
+ authorization: (_a = options.token ? `Bearer ${options.token}` : void 0) != null ? _a : defaultAuthorization
2834
2836
  };
2835
2837
  return {
2836
2838
  headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
@@ -3173,10 +3175,11 @@ function getPlatformDpsAdminClientAuthorization() {
3173
3175
  };
3174
3176
  }
3175
3177
  function getPlatformDpsClientConfig(options = {}) {
3178
+ var _a;
3176
3179
  const currentHeaders = platformDpsClientInstance.defaults.headers;
3177
3180
  const defaultAuthorization = currentHeaders.Authorization;
3178
3181
  const headers = {
3179
- authorization: defaultAuthorization != null ? defaultAuthorization : options.token ? `Bearer ${options.token}` : void 0
3182
+ authorization: (_a = options.token ? `Bearer ${options.token}` : void 0) != null ? _a : defaultAuthorization
3180
3183
  };
3181
3184
  return {
3182
3185
  headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
@@ -5326,9 +5329,10 @@ function getPlatformBillingClientAuthorization(req) {
5326
5329
  };
5327
5330
  }
5328
5331
  function getPlatformBillingClientConfig(options = {}) {
5332
+ var _a;
5329
5333
  const defaultAuthorization = platformBillingClientInstance.defaults.headers.Authorization;
5330
5334
  const headers = {
5331
- authorization: defaultAuthorization != null ? defaultAuthorization : options.token ? `Bearer ${options.token}` : void 0
5335
+ authorization: (_a = options.token ? `Bearer ${options.token}` : void 0) != null ? _a : defaultAuthorization
5332
5336
  };
5333
5337
  return {
5334
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.22",
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",