@livechat/developer-studio-api 3.4.4 → 3.4.5

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
@@ -2644,65 +2644,65 @@ adapterClientInstance.interceptors.response.use(
2644
2644
  }
2645
2645
  );
2646
2646
  function getAdapterClientConfig(options = {}) {
2647
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S;
2647
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q;
2648
2648
  const currentHeaders = adapterClientInstance.defaults.headers;
2649
2649
  const headers = {
2650
2650
  platform: {
2651
- token: ((_b = currentHeaders.Authorization) != null ? _b : (_a = options.platform) == null ? void 0 : _a.token) ? `${(_d = (_c = options.platform) == null ? void 0 : _c.tokenType) != null ? _d : "Bearer"} ${(_e = options.platform) == null ? void 0 : _e.token}` : void 0
2651
+ token: (_c = currentHeaders.Authorization) != null ? _c : ((_a = options.platform) == null ? void 0 : _a.token) ? `${(_b = options.platform.tokenType) != null ? _b : "Bearer"} ${options.platform.token}` : void 0
2652
2652
  },
2653
2653
  integrations: {
2654
2654
  github: {
2655
- app: (_g = currentHeaders["x-adapter-github-app-token"]) != null ? _g : (_f = options.github) == null ? void 0 : _f.appToken,
2656
- oauth: (_i = currentHeaders["x-adapter-github-oauth-token"]) != null ? _i : (_h = options.github) == null ? void 0 : _h.oauthToken
2655
+ app: (_e = currentHeaders["x-adapter-github-app-token"]) != null ? _e : (_d = options.github) == null ? void 0 : _d.appToken,
2656
+ oauth: (_g = currentHeaders["x-adapter-github-oauth-token"]) != null ? _g : (_f = options.github) == null ? void 0 : _f.oauthToken
2657
2657
  },
2658
- netlify: (_k = currentHeaders["x-adapter-netlify-token"]) != null ? _k : (_j = options.netlify) == null ? void 0 : _j.token,
2659
- vercel: (_m = currentHeaders["x-adapter-vercel-token"]) != null ? _m : (_l = options.vercel) == null ? void 0 : _l.token,
2660
- planetscale: (_o = currentHeaders["x-adapter-planetscale-token"]) != null ? _o : (_n = options.planetscale) == null ? void 0 : _n.token,
2661
- neon: (_q = currentHeaders["x-adapter-neon-token"]) != null ? _q : (_p = options.neon) == null ? void 0 : _p.token,
2662
- mailchimp: (_s = currentHeaders["x-adapter-mailchimp-token"]) != null ? _s : (_r = options.mailchimp) == null ? void 0 : _r.token,
2663
- mailchimpServer: (_u = currentHeaders["x-adapter-mailchimp-server"]) != null ? _u : (_t = options.mailchimp) == null ? void 0 : _t.server,
2664
- shopify: (_w = currentHeaders["x-adapter-shopify-token"]) != null ? _w : (_v = options.shopify) == null ? void 0 : _v.token,
2665
- shopifyShop: (_y = currentHeaders["x-adapter-shopify-shop"]) != null ? _y : (_x = options.shopify) == null ? void 0 : _x.shop,
2666
- hubspot: (_A = currentHeaders["x-adapter-hubspot-token"]) != null ? _A : (_z = options.hubspot) == null ? void 0 : _z.token,
2667
- bigcommerce: (_C = currentHeaders["x-adapter-bigcommerce-token"]) != null ? _C : (_B = options.bigcommerce) == null ? void 0 : _B.token,
2668
- bigcommerceShop: (_E = currentHeaders["x-adapter-bigcommerce-shop"]) != null ? _E : (_D = options.bigcommerce) == null ? void 0 : _D.shop,
2669
- text: (_G = currentHeaders["x-adapter-text-token"]) != null ? _G : (_F = options.text) == null ? void 0 : _F.token
2658
+ netlify: (_i = currentHeaders["x-adapter-netlify-token"]) != null ? _i : (_h = options.netlify) == null ? void 0 : _h.token,
2659
+ vercel: (_k = currentHeaders["x-adapter-vercel-token"]) != null ? _k : (_j = options.vercel) == null ? void 0 : _j.token,
2660
+ planetscale: (_m = currentHeaders["x-adapter-planetscale-token"]) != null ? _m : (_l = options.planetscale) == null ? void 0 : _l.token,
2661
+ neon: (_o = currentHeaders["x-adapter-neon-token"]) != null ? _o : (_n = options.neon) == null ? void 0 : _n.token,
2662
+ mailchimp: (_q = currentHeaders["x-adapter-mailchimp-token"]) != null ? _q : (_p = options.mailchimp) == null ? void 0 : _p.token,
2663
+ mailchimpServer: (_s = currentHeaders["x-adapter-mailchimp-server"]) != null ? _s : (_r = options.mailchimp) == null ? void 0 : _r.server,
2664
+ shopify: (_u = currentHeaders["x-adapter-shopify-token"]) != null ? _u : (_t = options.shopify) == null ? void 0 : _t.token,
2665
+ shopifyShop: (_w = currentHeaders["x-adapter-shopify-shop"]) != null ? _w : (_v = options.shopify) == null ? void 0 : _v.shop,
2666
+ hubspot: (_y = currentHeaders["x-adapter-hubspot-token"]) != null ? _y : (_x = options.hubspot) == null ? void 0 : _x.token,
2667
+ bigcommerce: (_A = currentHeaders["x-adapter-bigcommerce-token"]) != null ? _A : (_z = options.bigcommerce) == null ? void 0 : _z.token,
2668
+ bigcommerceShop: (_C = currentHeaders["x-adapter-bigcommerce-shop"]) != null ? _C : (_B = options.bigcommerce) == null ? void 0 : _B.shop,
2669
+ text: (_E = currentHeaders["x-adapter-text-token"]) != null ? _E : (_D = options.text) == null ? void 0 : _D.token
2670
2670
  }
2671
2671
  };
2672
2672
  if (currentHeaders.Authorization) {
2673
- currentHeaders["X-Region"] = (_H = getRegion(currentHeaders.Authorization)) != null ? _H : void 0;
2673
+ currentHeaders["X-Region"] = (_F = getRegion(currentHeaders.Authorization)) != null ? _F : void 0;
2674
2674
  }
2675
- if (((_I = options.ensureAuthorizationToken) == null ? void 0 : _I.platform) && !headers.platform.token) {
2675
+ if (((_G = options.ensureAuthorizationToken) == null ? void 0 : _G.platform) && !headers.platform.token) {
2676
2676
  throw new UnauthorizeApiError("accounts");
2677
2677
  }
2678
- if (((_J = options.ensureAuthorizationToken) == null ? void 0 : _J.github) && (!headers.integrations.github.app || !headers.integrations.github.oauth)) {
2678
+ if (((_H = options.ensureAuthorizationToken) == null ? void 0 : _H.github) && (!headers.integrations.github.app || !headers.integrations.github.oauth)) {
2679
2679
  throw new UnauthorizeApiError("github");
2680
2680
  }
2681
- if (((_K = options.ensureAuthorizationToken) == null ? void 0 : _K.vercel) && !headers.integrations.vercel) {
2681
+ if (((_I = options.ensureAuthorizationToken) == null ? void 0 : _I.vercel) && !headers.integrations.vercel) {
2682
2682
  throw new UnauthorizeApiError("vercel");
2683
2683
  }
2684
- if (((_L = options.ensureAuthorizationToken) == null ? void 0 : _L.netlify) && !headers.integrations.netlify) {
2684
+ if (((_J = options.ensureAuthorizationToken) == null ? void 0 : _J.netlify) && !headers.integrations.netlify) {
2685
2685
  throw new UnauthorizeApiError("netlify");
2686
2686
  }
2687
- if (((_M = options.ensureAuthorizationToken) == null ? void 0 : _M.planetscale) && !headers.integrations.planetscale) {
2687
+ if (((_K = options.ensureAuthorizationToken) == null ? void 0 : _K.planetscale) && !headers.integrations.planetscale) {
2688
2688
  throw new UnauthorizeApiError("planetscale");
2689
2689
  }
2690
- if (((_N = options.ensureAuthorizationToken) == null ? void 0 : _N.neon) && !headers.integrations.neon) {
2690
+ if (((_L = options.ensureAuthorizationToken) == null ? void 0 : _L.neon) && !headers.integrations.neon) {
2691
2691
  throw new UnauthorizeApiError("neon");
2692
2692
  }
2693
- if (((_O = options.ensureAuthorizationToken) == null ? void 0 : _O.mailchimp) && (!headers.integrations.mailchimp || !headers.integrations.mailchimpServer)) {
2693
+ if (((_M = options.ensureAuthorizationToken) == null ? void 0 : _M.mailchimp) && (!headers.integrations.mailchimp || !headers.integrations.mailchimpServer)) {
2694
2694
  throw new UnauthorizeApiError("mailchimp");
2695
2695
  }
2696
- if (((_P = options.ensureAuthorizationToken) == null ? void 0 : _P.shopify) && (!headers.integrations.shopify || !headers.integrations.shopifyShop)) {
2696
+ if (((_N = options.ensureAuthorizationToken) == null ? void 0 : _N.shopify) && (!headers.integrations.shopify || !headers.integrations.shopifyShop)) {
2697
2697
  throw new UnauthorizeApiError("shopify");
2698
2698
  }
2699
- if (((_Q = options.ensureAuthorizationToken) == null ? void 0 : _Q.hubspot) && !headers.integrations.hubspot) {
2699
+ if (((_O = options.ensureAuthorizationToken) == null ? void 0 : _O.hubspot) && !headers.integrations.hubspot) {
2700
2700
  throw new UnauthorizeApiError("hubspot");
2701
2701
  }
2702
- if (((_R = options.ensureAuthorizationToken) == null ? void 0 : _R.bigcommerce) && (!headers.integrations.bigcommerce || !headers.integrations.bigcommerceShop)) {
2702
+ if (((_P = options.ensureAuthorizationToken) == null ? void 0 : _P.bigcommerce) && (!headers.integrations.bigcommerce || !headers.integrations.bigcommerceShop)) {
2703
2703
  throw new UnauthorizeApiError("bigcommerce");
2704
2704
  }
2705
- if (((_S = options.ensureAuthorizationToken) == null ? void 0 : _S.text) && !headers.integrations.text) {
2705
+ if (((_Q = options.ensureAuthorizationToken) == null ? void 0 : _Q.text) && !headers.integrations.text) {
2706
2706
  throw new UnauthorizeApiError("text");
2707
2707
  }
2708
2708
  return {
package/dist/index.mjs CHANGED
@@ -2505,65 +2505,65 @@ adapterClientInstance.interceptors.response.use(
2505
2505
  }
2506
2506
  );
2507
2507
  function getAdapterClientConfig(options = {}) {
2508
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S;
2508
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q;
2509
2509
  const currentHeaders = adapterClientInstance.defaults.headers;
2510
2510
  const headers = {
2511
2511
  platform: {
2512
- token: ((_b = currentHeaders.Authorization) != null ? _b : (_a = options.platform) == null ? void 0 : _a.token) ? `${(_d = (_c = options.platform) == null ? void 0 : _c.tokenType) != null ? _d : "Bearer"} ${(_e = options.platform) == null ? void 0 : _e.token}` : void 0
2512
+ token: (_c = currentHeaders.Authorization) != null ? _c : ((_a = options.platform) == null ? void 0 : _a.token) ? `${(_b = options.platform.tokenType) != null ? _b : "Bearer"} ${options.platform.token}` : void 0
2513
2513
  },
2514
2514
  integrations: {
2515
2515
  github: {
2516
- app: (_g = currentHeaders["x-adapter-github-app-token"]) != null ? _g : (_f = options.github) == null ? void 0 : _f.appToken,
2517
- oauth: (_i = currentHeaders["x-adapter-github-oauth-token"]) != null ? _i : (_h = options.github) == null ? void 0 : _h.oauthToken
2516
+ app: (_e = currentHeaders["x-adapter-github-app-token"]) != null ? _e : (_d = options.github) == null ? void 0 : _d.appToken,
2517
+ oauth: (_g = currentHeaders["x-adapter-github-oauth-token"]) != null ? _g : (_f = options.github) == null ? void 0 : _f.oauthToken
2518
2518
  },
2519
- netlify: (_k = currentHeaders["x-adapter-netlify-token"]) != null ? _k : (_j = options.netlify) == null ? void 0 : _j.token,
2520
- vercel: (_m = currentHeaders["x-adapter-vercel-token"]) != null ? _m : (_l = options.vercel) == null ? void 0 : _l.token,
2521
- planetscale: (_o = currentHeaders["x-adapter-planetscale-token"]) != null ? _o : (_n = options.planetscale) == null ? void 0 : _n.token,
2522
- neon: (_q = currentHeaders["x-adapter-neon-token"]) != null ? _q : (_p = options.neon) == null ? void 0 : _p.token,
2523
- mailchimp: (_s = currentHeaders["x-adapter-mailchimp-token"]) != null ? _s : (_r = options.mailchimp) == null ? void 0 : _r.token,
2524
- mailchimpServer: (_u = currentHeaders["x-adapter-mailchimp-server"]) != null ? _u : (_t = options.mailchimp) == null ? void 0 : _t.server,
2525
- shopify: (_w = currentHeaders["x-adapter-shopify-token"]) != null ? _w : (_v = options.shopify) == null ? void 0 : _v.token,
2526
- shopifyShop: (_y = currentHeaders["x-adapter-shopify-shop"]) != null ? _y : (_x = options.shopify) == null ? void 0 : _x.shop,
2527
- hubspot: (_A = currentHeaders["x-adapter-hubspot-token"]) != null ? _A : (_z = options.hubspot) == null ? void 0 : _z.token,
2528
- bigcommerce: (_C = currentHeaders["x-adapter-bigcommerce-token"]) != null ? _C : (_B = options.bigcommerce) == null ? void 0 : _B.token,
2529
- bigcommerceShop: (_E = currentHeaders["x-adapter-bigcommerce-shop"]) != null ? _E : (_D = options.bigcommerce) == null ? void 0 : _D.shop,
2530
- text: (_G = currentHeaders["x-adapter-text-token"]) != null ? _G : (_F = options.text) == null ? void 0 : _F.token
2519
+ netlify: (_i = currentHeaders["x-adapter-netlify-token"]) != null ? _i : (_h = options.netlify) == null ? void 0 : _h.token,
2520
+ vercel: (_k = currentHeaders["x-adapter-vercel-token"]) != null ? _k : (_j = options.vercel) == null ? void 0 : _j.token,
2521
+ planetscale: (_m = currentHeaders["x-adapter-planetscale-token"]) != null ? _m : (_l = options.planetscale) == null ? void 0 : _l.token,
2522
+ neon: (_o = currentHeaders["x-adapter-neon-token"]) != null ? _o : (_n = options.neon) == null ? void 0 : _n.token,
2523
+ mailchimp: (_q = currentHeaders["x-adapter-mailchimp-token"]) != null ? _q : (_p = options.mailchimp) == null ? void 0 : _p.token,
2524
+ mailchimpServer: (_s = currentHeaders["x-adapter-mailchimp-server"]) != null ? _s : (_r = options.mailchimp) == null ? void 0 : _r.server,
2525
+ shopify: (_u = currentHeaders["x-adapter-shopify-token"]) != null ? _u : (_t = options.shopify) == null ? void 0 : _t.token,
2526
+ shopifyShop: (_w = currentHeaders["x-adapter-shopify-shop"]) != null ? _w : (_v = options.shopify) == null ? void 0 : _v.shop,
2527
+ hubspot: (_y = currentHeaders["x-adapter-hubspot-token"]) != null ? _y : (_x = options.hubspot) == null ? void 0 : _x.token,
2528
+ bigcommerce: (_A = currentHeaders["x-adapter-bigcommerce-token"]) != null ? _A : (_z = options.bigcommerce) == null ? void 0 : _z.token,
2529
+ bigcommerceShop: (_C = currentHeaders["x-adapter-bigcommerce-shop"]) != null ? _C : (_B = options.bigcommerce) == null ? void 0 : _B.shop,
2530
+ text: (_E = currentHeaders["x-adapter-text-token"]) != null ? _E : (_D = options.text) == null ? void 0 : _D.token
2531
2531
  }
2532
2532
  };
2533
2533
  if (currentHeaders.Authorization) {
2534
- currentHeaders["X-Region"] = (_H = getRegion(currentHeaders.Authorization)) != null ? _H : void 0;
2534
+ currentHeaders["X-Region"] = (_F = getRegion(currentHeaders.Authorization)) != null ? _F : void 0;
2535
2535
  }
2536
- if (((_I = options.ensureAuthorizationToken) == null ? void 0 : _I.platform) && !headers.platform.token) {
2536
+ if (((_G = options.ensureAuthorizationToken) == null ? void 0 : _G.platform) && !headers.platform.token) {
2537
2537
  throw new UnauthorizeApiError("accounts");
2538
2538
  }
2539
- if (((_J = options.ensureAuthorizationToken) == null ? void 0 : _J.github) && (!headers.integrations.github.app || !headers.integrations.github.oauth)) {
2539
+ if (((_H = options.ensureAuthorizationToken) == null ? void 0 : _H.github) && (!headers.integrations.github.app || !headers.integrations.github.oauth)) {
2540
2540
  throw new UnauthorizeApiError("github");
2541
2541
  }
2542
- if (((_K = options.ensureAuthorizationToken) == null ? void 0 : _K.vercel) && !headers.integrations.vercel) {
2542
+ if (((_I = options.ensureAuthorizationToken) == null ? void 0 : _I.vercel) && !headers.integrations.vercel) {
2543
2543
  throw new UnauthorizeApiError("vercel");
2544
2544
  }
2545
- if (((_L = options.ensureAuthorizationToken) == null ? void 0 : _L.netlify) && !headers.integrations.netlify) {
2545
+ if (((_J = options.ensureAuthorizationToken) == null ? void 0 : _J.netlify) && !headers.integrations.netlify) {
2546
2546
  throw new UnauthorizeApiError("netlify");
2547
2547
  }
2548
- if (((_M = options.ensureAuthorizationToken) == null ? void 0 : _M.planetscale) && !headers.integrations.planetscale) {
2548
+ if (((_K = options.ensureAuthorizationToken) == null ? void 0 : _K.planetscale) && !headers.integrations.planetscale) {
2549
2549
  throw new UnauthorizeApiError("planetscale");
2550
2550
  }
2551
- if (((_N = options.ensureAuthorizationToken) == null ? void 0 : _N.neon) && !headers.integrations.neon) {
2551
+ if (((_L = options.ensureAuthorizationToken) == null ? void 0 : _L.neon) && !headers.integrations.neon) {
2552
2552
  throw new UnauthorizeApiError("neon");
2553
2553
  }
2554
- if (((_O = options.ensureAuthorizationToken) == null ? void 0 : _O.mailchimp) && (!headers.integrations.mailchimp || !headers.integrations.mailchimpServer)) {
2554
+ if (((_M = options.ensureAuthorizationToken) == null ? void 0 : _M.mailchimp) && (!headers.integrations.mailchimp || !headers.integrations.mailchimpServer)) {
2555
2555
  throw new UnauthorizeApiError("mailchimp");
2556
2556
  }
2557
- if (((_P = options.ensureAuthorizationToken) == null ? void 0 : _P.shopify) && (!headers.integrations.shopify || !headers.integrations.shopifyShop)) {
2557
+ if (((_N = options.ensureAuthorizationToken) == null ? void 0 : _N.shopify) && (!headers.integrations.shopify || !headers.integrations.shopifyShop)) {
2558
2558
  throw new UnauthorizeApiError("shopify");
2559
2559
  }
2560
- if (((_Q = options.ensureAuthorizationToken) == null ? void 0 : _Q.hubspot) && !headers.integrations.hubspot) {
2560
+ if (((_O = options.ensureAuthorizationToken) == null ? void 0 : _O.hubspot) && !headers.integrations.hubspot) {
2561
2561
  throw new UnauthorizeApiError("hubspot");
2562
2562
  }
2563
- if (((_R = options.ensureAuthorizationToken) == null ? void 0 : _R.bigcommerce) && (!headers.integrations.bigcommerce || !headers.integrations.bigcommerceShop)) {
2563
+ if (((_P = options.ensureAuthorizationToken) == null ? void 0 : _P.bigcommerce) && (!headers.integrations.bigcommerce || !headers.integrations.bigcommerceShop)) {
2564
2564
  throw new UnauthorizeApiError("bigcommerce");
2565
2565
  }
2566
- if (((_S = options.ensureAuthorizationToken) == null ? void 0 : _S.text) && !headers.integrations.text) {
2566
+ if (((_Q = options.ensureAuthorizationToken) == null ? void 0 : _Q.text) && !headers.integrations.text) {
2567
2567
  throw new UnauthorizeApiError("text");
2568
2568
  }
2569
2569
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livechat/developer-studio-api",
3
- "version": "3.4.4",
3
+ "version": "3.4.5",
4
4
  "description": "This project is API for LiveChat Developer Studio.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",