@livechat/developer-studio-api 3.1.24 → 3.1.25

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.d.mts CHANGED
@@ -3171,6 +3171,7 @@ interface PlatformAdapterClientAuthorization {
3171
3171
  neon?: NeonClientAuthorization;
3172
3172
  mailchimp?: MailchimpClientAuthorization;
3173
3173
  shopify?: ShopifyClientAuthorization;
3174
+ hubspot?: HubspotClientAuthorization;
3174
3175
  text?: TextClientAuthorization;
3175
3176
  }
3176
3177
  type PlatformAdapterClientOptions = PlatformAdapterClientAuthorization & {
@@ -3183,6 +3184,7 @@ type PlatformAdapterClientOptions = PlatformAdapterClientAuthorization & {
3183
3184
  neon?: boolean;
3184
3185
  mailchimp?: boolean;
3185
3186
  shopify?: boolean;
3187
+ hubspot?: boolean;
3186
3188
  text?: boolean;
3187
3189
  };
3188
3190
  };
@@ -3208,6 +3210,7 @@ declare function initPlatformAdapterClient(baseUrl?: string, tokens?: {
3208
3210
  neon?: NeonClientAuthorization;
3209
3211
  mailchimp?: MailchimpClientAuthorization;
3210
3212
  shopify?: ShopifyClientAuthorization;
3213
+ hubspot?: HubspotClientAuthorization;
3211
3214
  text?: TextClientAuthorization;
3212
3215
  }): void;
3213
3216
  declare function updatePlatformAdapterClient(tokens?: {
@@ -3219,6 +3222,7 @@ declare function updatePlatformAdapterClient(tokens?: {
3219
3222
  neon?: NeonClientAuthorization;
3220
3223
  mailchimp?: MailchimpClientAuthorization;
3221
3224
  shopify?: ShopifyClientAuthorization;
3225
+ hubspot?: HubspotClientAuthorization;
3222
3226
  text?: TextClientAuthorization;
3223
3227
  }): void;
3224
3228
 
package/dist/index.d.ts CHANGED
@@ -3171,6 +3171,7 @@ interface PlatformAdapterClientAuthorization {
3171
3171
  neon?: NeonClientAuthorization;
3172
3172
  mailchimp?: MailchimpClientAuthorization;
3173
3173
  shopify?: ShopifyClientAuthorization;
3174
+ hubspot?: HubspotClientAuthorization;
3174
3175
  text?: TextClientAuthorization;
3175
3176
  }
3176
3177
  type PlatformAdapterClientOptions = PlatformAdapterClientAuthorization & {
@@ -3183,6 +3184,7 @@ type PlatformAdapterClientOptions = PlatformAdapterClientAuthorization & {
3183
3184
  neon?: boolean;
3184
3185
  mailchimp?: boolean;
3185
3186
  shopify?: boolean;
3187
+ hubspot?: boolean;
3186
3188
  text?: boolean;
3187
3189
  };
3188
3190
  };
@@ -3208,6 +3210,7 @@ declare function initPlatformAdapterClient(baseUrl?: string, tokens?: {
3208
3210
  neon?: NeonClientAuthorization;
3209
3211
  mailchimp?: MailchimpClientAuthorization;
3210
3212
  shopify?: ShopifyClientAuthorization;
3213
+ hubspot?: HubspotClientAuthorization;
3211
3214
  text?: TextClientAuthorization;
3212
3215
  }): void;
3213
3216
  declare function updatePlatformAdapterClient(tokens?: {
@@ -3219,6 +3222,7 @@ declare function updatePlatformAdapterClient(tokens?: {
3219
3222
  neon?: NeonClientAuthorization;
3220
3223
  mailchimp?: MailchimpClientAuthorization;
3221
3224
  shopify?: ShopifyClientAuthorization;
3225
+ hubspot?: HubspotClientAuthorization;
3222
3226
  text?: TextClientAuthorization;
3223
3227
  }): void;
3224
3228
 
package/dist/index.js CHANGED
@@ -5882,6 +5882,9 @@ function getPlatformAdapterClientAuthorization(req) {
5882
5882
  token: req.headers.get("x-adapter-shopify-token"),
5883
5883
  shop: req.headers.get("x-adapter-shopify-shop")
5884
5884
  },
5885
+ hubspot: {
5886
+ token: req.headers.get("x-adapter-hubspot-token")
5887
+ },
5885
5888
  text: {
5886
5889
  token: req.headers.get("x-adapter-text-token")
5887
5890
  }
@@ -5915,13 +5918,16 @@ function getPlatformAdapterClientAuthorization(req) {
5915
5918
  token: req.headers["x-adapter-shopify-token"],
5916
5919
  shop: req.headers["x-adapter-shopify-shop"]
5917
5920
  },
5921
+ hubspot: {
5922
+ token: req.headers["x-adapter-hubspot-token"]
5923
+ },
5918
5924
  text: {
5919
5925
  token: req.headers["x-adapter-text-token"]
5920
5926
  }
5921
5927
  };
5922
5928
  }
5923
5929
  function getPlatformAdapterClientConfig(options = {}) {
5924
- 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;
5930
+ 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;
5925
5931
  const currentHeaders = platformAdapterClientInstance.defaults.headers;
5926
5932
  const headers = {
5927
5933
  platform: {
@@ -5940,41 +5946,45 @@ function getPlatformAdapterClientConfig(options = {}) {
5940
5946
  mailchimpServer: (_r = currentHeaders["x-adapter-mailchimp-server"]) != null ? _r : (_q = options.mailchimp) == null ? void 0 : _q.server,
5941
5947
  shopify: (_t = currentHeaders["x-adapter-shopify-token"]) != null ? _t : (_s = options.shopify) == null ? void 0 : _s.token,
5942
5948
  shopifyShop: (_v = currentHeaders["x-adapter-shopify-shop"]) != null ? _v : (_u = options.shopify) == null ? void 0 : _u.shop,
5943
- text: (_x = currentHeaders["x-adapter-text-token"]) != null ? _x : (_w = options.text) == null ? void 0 : _w.token
5949
+ hubspot: (_x = currentHeaders["x-adapter-hubspot-token"]) != null ? _x : (_w = options.hubspot) == null ? void 0 : _w.token,
5950
+ text: (_z = currentHeaders["x-adapter-text-token"]) != null ? _z : (_y = options.text) == null ? void 0 : _y.token
5944
5951
  }
5945
5952
  };
5946
5953
  if (currentHeaders["x-adapter-platform-token"]) {
5947
- currentHeaders["X-Region"] = (_y = getRegion2(currentHeaders["x-adapter-platform-token"])) != null ? _y : void 0;
5954
+ currentHeaders["X-Region"] = (_A = getRegion2(currentHeaders["x-adapter-platform-token"])) != null ? _A : void 0;
5948
5955
  }
5949
- if (((_z = options.ensureAuthorizationToken) == null ? void 0 : _z.platform) && !headers.platform.token) {
5956
+ if (((_B = options.ensureAuthorizationToken) == null ? void 0 : _B.platform) && !headers.platform.token) {
5950
5957
  throw new UnauthorizeApiError("accounts");
5951
5958
  }
5952
- if (((_A = options.ensureAuthorizationToken) == null ? void 0 : _A.github) && (!headers.integrations.github.app || !headers.integrations.github.oauth)) {
5959
+ if (((_C = options.ensureAuthorizationToken) == null ? void 0 : _C.github) && (!headers.integrations.github.app || !headers.integrations.github.oauth)) {
5953
5960
  throw new UnauthorizeApiError("github");
5954
5961
  }
5955
- if (((_B = options.ensureAuthorizationToken) == null ? void 0 : _B.vercel) && !headers.integrations.vercel) {
5962
+ if (((_D = options.ensureAuthorizationToken) == null ? void 0 : _D.vercel) && !headers.integrations.vercel) {
5956
5963
  throw new UnauthorizeApiError("vercel");
5957
5964
  }
5958
- if (((_C = options.ensureAuthorizationToken) == null ? void 0 : _C.netlify) && !headers.integrations.netlify) {
5965
+ if (((_E = options.ensureAuthorizationToken) == null ? void 0 : _E.netlify) && !headers.integrations.netlify) {
5959
5966
  throw new UnauthorizeApiError("netlify");
5960
5967
  }
5961
- if (((_D = options.ensureAuthorizationToken) == null ? void 0 : _D.planetscale) && !headers.integrations.planetscale) {
5968
+ if (((_F = options.ensureAuthorizationToken) == null ? void 0 : _F.planetscale) && !headers.integrations.planetscale) {
5962
5969
  throw new UnauthorizeApiError("planetscale");
5963
5970
  }
5964
- if (((_E = options.ensureAuthorizationToken) == null ? void 0 : _E.neon) && !headers.integrations.neon) {
5971
+ if (((_G = options.ensureAuthorizationToken) == null ? void 0 : _G.neon) && !headers.integrations.neon) {
5965
5972
  throw new UnauthorizeApiError("neon");
5966
5973
  }
5967
- if (((_F = options.ensureAuthorizationToken) == null ? void 0 : _F.mailchimp) && (!headers.integrations.mailchimp || !headers.integrations.mailchimpServer)) {
5974
+ if (((_H = options.ensureAuthorizationToken) == null ? void 0 : _H.mailchimp) && (!headers.integrations.mailchimp || !headers.integrations.mailchimpServer)) {
5968
5975
  throw new UnauthorizeApiError("mailchimp");
5969
5976
  }
5970
- if (((_G = options.ensureAuthorizationToken) == null ? void 0 : _G.shopify) && (!headers.integrations.shopify || !headers.integrations.shopifyShop)) {
5977
+ if (((_I = options.ensureAuthorizationToken) == null ? void 0 : _I.shopify) && (!headers.integrations.shopify || !headers.integrations.shopifyShop)) {
5971
5978
  throw new UnauthorizeApiError("shopify");
5972
5979
  }
5973
- if (((_H = options.ensureAuthorizationToken) == null ? void 0 : _H.text) && !headers.integrations.text) {
5980
+ if (((_J = options.ensureAuthorizationToken) == null ? void 0 : _J.hubspot) && !headers.integrations.hubspot) {
5981
+ throw new UnauthorizeApiError("hubspot");
5982
+ }
5983
+ if (((_K = options.ensureAuthorizationToken) == null ? void 0 : _K.text) && !headers.integrations.text) {
5974
5984
  throw new UnauthorizeApiError("text");
5975
5985
  }
5976
5986
  return {
5977
- headers: __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, headers.platform.token ? { "x-adapter-platform-token": headers.platform.token } : {}), headers.integrations.github.app ? { "x-adapter-github-app-token": headers.integrations.github.app } : {}), headers.integrations.github.oauth ? { "x-adapter-github-oauth-token": headers.integrations.github.oauth } : {}), headers.integrations.netlify ? { "x-adapter-netlify-token": headers.integrations.netlify } : {}), headers.integrations.vercel ? { "x-adapter-vercel-token": headers.integrations.vercel } : {}), headers.integrations.planetscale ? { "x-adapter-planetscale-token": headers.integrations.planetscale } : {}), headers.integrations.neon ? { "x-adapter-neon-token": headers.integrations.neon } : {}), headers.integrations.mailchimp ? { "x-adapter-mailchimp-token": headers.integrations.mailchimp } : {}), headers.integrations.mailchimpServer ? { "x-adapter-mailchimp-server": headers.integrations.mailchimpServer } : {}), headers.integrations.shopify ? { "x-adapter-shopify-token": headers.integrations.shopify } : {}), headers.integrations.shopifyShop ? { "x-adapter-shopify-shop": headers.integrations.shopifyShop } : {}), headers.integrations.text ? { "x-adapter-text-token": headers.integrations.text } : {})
5987
+ headers: __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, headers.platform.token ? { "x-adapter-platform-token": headers.platform.token } : {}), headers.integrations.github.app ? { "x-adapter-github-app-token": headers.integrations.github.app } : {}), headers.integrations.github.oauth ? { "x-adapter-github-oauth-token": headers.integrations.github.oauth } : {}), headers.integrations.netlify ? { "x-adapter-netlify-token": headers.integrations.netlify } : {}), headers.integrations.vercel ? { "x-adapter-vercel-token": headers.integrations.vercel } : {}), headers.integrations.planetscale ? { "x-adapter-planetscale-token": headers.integrations.planetscale } : {}), headers.integrations.neon ? { "x-adapter-neon-token": headers.integrations.neon } : {}), headers.integrations.mailchimp ? { "x-adapter-mailchimp-token": headers.integrations.mailchimp } : {}), headers.integrations.mailchimpServer ? { "x-adapter-mailchimp-server": headers.integrations.mailchimpServer } : {}), headers.integrations.shopify ? { "x-adapter-shopify-token": headers.integrations.shopify } : {}), headers.integrations.shopifyShop ? { "x-adapter-shopify-shop": headers.integrations.shopifyShop } : {}), headers.integrations.hubspot ? { "x-adapter-hubspot-token": headers.integrations.hubspot } : {}), headers.integrations.text ? { "x-adapter-text-token": headers.integrations.text } : {})
5978
5988
  };
5979
5989
  }
5980
5990
  var getPlatformAdapterClientDefaultConfig = (authorization) => getPlatformAdapterClientConfig(__spreadProps(__spreadValues({}, authorization), {
@@ -5997,7 +6007,7 @@ function initPlatformAdapterClient(baseUrl, tokens) {
5997
6007
  }
5998
6008
  }
5999
6009
  function updatePlatformAdapterClient(tokens) {
6000
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
6010
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
6001
6011
  const headers = platformAdapterClientInstance.defaults.headers;
6002
6012
  if ((_a = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _a.token) {
6003
6013
  headers["x-adapter-platform-token"] = tokens.platform.token;
@@ -6032,7 +6042,10 @@ function updatePlatformAdapterClient(tokens) {
6032
6042
  if ((_k = tokens == null ? void 0 : tokens.shopify) == null ? void 0 : _k.token) {
6033
6043
  headers["x-adapter-shopify-token"] = tokens.shopify.token;
6034
6044
  }
6035
- if ((_l = tokens == null ? void 0 : tokens.text) == null ? void 0 : _l.token) {
6045
+ if ((_l = tokens == null ? void 0 : tokens.hubspot) == null ? void 0 : _l.token) {
6046
+ headers["x-adapter-hubspot-token"] = tokens.hubspot.token;
6047
+ }
6048
+ if ((_m = tokens == null ? void 0 : tokens.text) == null ? void 0 : _m.token) {
6036
6049
  headers["x-adapter-text-token"] = tokens.text.token;
6037
6050
  }
6038
6051
  }
package/dist/index.mjs CHANGED
@@ -5739,6 +5739,9 @@ function getPlatformAdapterClientAuthorization(req) {
5739
5739
  token: req.headers.get("x-adapter-shopify-token"),
5740
5740
  shop: req.headers.get("x-adapter-shopify-shop")
5741
5741
  },
5742
+ hubspot: {
5743
+ token: req.headers.get("x-adapter-hubspot-token")
5744
+ },
5742
5745
  text: {
5743
5746
  token: req.headers.get("x-adapter-text-token")
5744
5747
  }
@@ -5772,13 +5775,16 @@ function getPlatformAdapterClientAuthorization(req) {
5772
5775
  token: req.headers["x-adapter-shopify-token"],
5773
5776
  shop: req.headers["x-adapter-shopify-shop"]
5774
5777
  },
5778
+ hubspot: {
5779
+ token: req.headers["x-adapter-hubspot-token"]
5780
+ },
5775
5781
  text: {
5776
5782
  token: req.headers["x-adapter-text-token"]
5777
5783
  }
5778
5784
  };
5779
5785
  }
5780
5786
  function getPlatformAdapterClientConfig(options = {}) {
5781
- 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;
5787
+ 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;
5782
5788
  const currentHeaders = platformAdapterClientInstance.defaults.headers;
5783
5789
  const headers = {
5784
5790
  platform: {
@@ -5797,41 +5803,45 @@ function getPlatformAdapterClientConfig(options = {}) {
5797
5803
  mailchimpServer: (_r = currentHeaders["x-adapter-mailchimp-server"]) != null ? _r : (_q = options.mailchimp) == null ? void 0 : _q.server,
5798
5804
  shopify: (_t = currentHeaders["x-adapter-shopify-token"]) != null ? _t : (_s = options.shopify) == null ? void 0 : _s.token,
5799
5805
  shopifyShop: (_v = currentHeaders["x-adapter-shopify-shop"]) != null ? _v : (_u = options.shopify) == null ? void 0 : _u.shop,
5800
- text: (_x = currentHeaders["x-adapter-text-token"]) != null ? _x : (_w = options.text) == null ? void 0 : _w.token
5806
+ hubspot: (_x = currentHeaders["x-adapter-hubspot-token"]) != null ? _x : (_w = options.hubspot) == null ? void 0 : _w.token,
5807
+ text: (_z = currentHeaders["x-adapter-text-token"]) != null ? _z : (_y = options.text) == null ? void 0 : _y.token
5801
5808
  }
5802
5809
  };
5803
5810
  if (currentHeaders["x-adapter-platform-token"]) {
5804
- currentHeaders["X-Region"] = (_y = getRegion2(currentHeaders["x-adapter-platform-token"])) != null ? _y : void 0;
5811
+ currentHeaders["X-Region"] = (_A = getRegion2(currentHeaders["x-adapter-platform-token"])) != null ? _A : void 0;
5805
5812
  }
5806
- if (((_z = options.ensureAuthorizationToken) == null ? void 0 : _z.platform) && !headers.platform.token) {
5813
+ if (((_B = options.ensureAuthorizationToken) == null ? void 0 : _B.platform) && !headers.platform.token) {
5807
5814
  throw new UnauthorizeApiError("accounts");
5808
5815
  }
5809
- if (((_A = options.ensureAuthorizationToken) == null ? void 0 : _A.github) && (!headers.integrations.github.app || !headers.integrations.github.oauth)) {
5816
+ if (((_C = options.ensureAuthorizationToken) == null ? void 0 : _C.github) && (!headers.integrations.github.app || !headers.integrations.github.oauth)) {
5810
5817
  throw new UnauthorizeApiError("github");
5811
5818
  }
5812
- if (((_B = options.ensureAuthorizationToken) == null ? void 0 : _B.vercel) && !headers.integrations.vercel) {
5819
+ if (((_D = options.ensureAuthorizationToken) == null ? void 0 : _D.vercel) && !headers.integrations.vercel) {
5813
5820
  throw new UnauthorizeApiError("vercel");
5814
5821
  }
5815
- if (((_C = options.ensureAuthorizationToken) == null ? void 0 : _C.netlify) && !headers.integrations.netlify) {
5822
+ if (((_E = options.ensureAuthorizationToken) == null ? void 0 : _E.netlify) && !headers.integrations.netlify) {
5816
5823
  throw new UnauthorizeApiError("netlify");
5817
5824
  }
5818
- if (((_D = options.ensureAuthorizationToken) == null ? void 0 : _D.planetscale) && !headers.integrations.planetscale) {
5825
+ if (((_F = options.ensureAuthorizationToken) == null ? void 0 : _F.planetscale) && !headers.integrations.planetscale) {
5819
5826
  throw new UnauthorizeApiError("planetscale");
5820
5827
  }
5821
- if (((_E = options.ensureAuthorizationToken) == null ? void 0 : _E.neon) && !headers.integrations.neon) {
5828
+ if (((_G = options.ensureAuthorizationToken) == null ? void 0 : _G.neon) && !headers.integrations.neon) {
5822
5829
  throw new UnauthorizeApiError("neon");
5823
5830
  }
5824
- if (((_F = options.ensureAuthorizationToken) == null ? void 0 : _F.mailchimp) && (!headers.integrations.mailchimp || !headers.integrations.mailchimpServer)) {
5831
+ if (((_H = options.ensureAuthorizationToken) == null ? void 0 : _H.mailchimp) && (!headers.integrations.mailchimp || !headers.integrations.mailchimpServer)) {
5825
5832
  throw new UnauthorizeApiError("mailchimp");
5826
5833
  }
5827
- if (((_G = options.ensureAuthorizationToken) == null ? void 0 : _G.shopify) && (!headers.integrations.shopify || !headers.integrations.shopifyShop)) {
5834
+ if (((_I = options.ensureAuthorizationToken) == null ? void 0 : _I.shopify) && (!headers.integrations.shopify || !headers.integrations.shopifyShop)) {
5828
5835
  throw new UnauthorizeApiError("shopify");
5829
5836
  }
5830
- if (((_H = options.ensureAuthorizationToken) == null ? void 0 : _H.text) && !headers.integrations.text) {
5837
+ if (((_J = options.ensureAuthorizationToken) == null ? void 0 : _J.hubspot) && !headers.integrations.hubspot) {
5838
+ throw new UnauthorizeApiError("hubspot");
5839
+ }
5840
+ if (((_K = options.ensureAuthorizationToken) == null ? void 0 : _K.text) && !headers.integrations.text) {
5831
5841
  throw new UnauthorizeApiError("text");
5832
5842
  }
5833
5843
  return {
5834
- headers: __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, headers.platform.token ? { "x-adapter-platform-token": headers.platform.token } : {}), headers.integrations.github.app ? { "x-adapter-github-app-token": headers.integrations.github.app } : {}), headers.integrations.github.oauth ? { "x-adapter-github-oauth-token": headers.integrations.github.oauth } : {}), headers.integrations.netlify ? { "x-adapter-netlify-token": headers.integrations.netlify } : {}), headers.integrations.vercel ? { "x-adapter-vercel-token": headers.integrations.vercel } : {}), headers.integrations.planetscale ? { "x-adapter-planetscale-token": headers.integrations.planetscale } : {}), headers.integrations.neon ? { "x-adapter-neon-token": headers.integrations.neon } : {}), headers.integrations.mailchimp ? { "x-adapter-mailchimp-token": headers.integrations.mailchimp } : {}), headers.integrations.mailchimpServer ? { "x-adapter-mailchimp-server": headers.integrations.mailchimpServer } : {}), headers.integrations.shopify ? { "x-adapter-shopify-token": headers.integrations.shopify } : {}), headers.integrations.shopifyShop ? { "x-adapter-shopify-shop": headers.integrations.shopifyShop } : {}), headers.integrations.text ? { "x-adapter-text-token": headers.integrations.text } : {})
5844
+ headers: __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, headers.platform.token ? { "x-adapter-platform-token": headers.platform.token } : {}), headers.integrations.github.app ? { "x-adapter-github-app-token": headers.integrations.github.app } : {}), headers.integrations.github.oauth ? { "x-adapter-github-oauth-token": headers.integrations.github.oauth } : {}), headers.integrations.netlify ? { "x-adapter-netlify-token": headers.integrations.netlify } : {}), headers.integrations.vercel ? { "x-adapter-vercel-token": headers.integrations.vercel } : {}), headers.integrations.planetscale ? { "x-adapter-planetscale-token": headers.integrations.planetscale } : {}), headers.integrations.neon ? { "x-adapter-neon-token": headers.integrations.neon } : {}), headers.integrations.mailchimp ? { "x-adapter-mailchimp-token": headers.integrations.mailchimp } : {}), headers.integrations.mailchimpServer ? { "x-adapter-mailchimp-server": headers.integrations.mailchimpServer } : {}), headers.integrations.shopify ? { "x-adapter-shopify-token": headers.integrations.shopify } : {}), headers.integrations.shopifyShop ? { "x-adapter-shopify-shop": headers.integrations.shopifyShop } : {}), headers.integrations.hubspot ? { "x-adapter-hubspot-token": headers.integrations.hubspot } : {}), headers.integrations.text ? { "x-adapter-text-token": headers.integrations.text } : {})
5835
5845
  };
5836
5846
  }
5837
5847
  var getPlatformAdapterClientDefaultConfig = (authorization) => getPlatformAdapterClientConfig(__spreadProps(__spreadValues({}, authorization), {
@@ -5854,7 +5864,7 @@ function initPlatformAdapterClient(baseUrl, tokens) {
5854
5864
  }
5855
5865
  }
5856
5866
  function updatePlatformAdapterClient(tokens) {
5857
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
5867
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
5858
5868
  const headers = platformAdapterClientInstance.defaults.headers;
5859
5869
  if ((_a = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _a.token) {
5860
5870
  headers["x-adapter-platform-token"] = tokens.platform.token;
@@ -5889,7 +5899,10 @@ function updatePlatformAdapterClient(tokens) {
5889
5899
  if ((_k = tokens == null ? void 0 : tokens.shopify) == null ? void 0 : _k.token) {
5890
5900
  headers["x-adapter-shopify-token"] = tokens.shopify.token;
5891
5901
  }
5892
- if ((_l = tokens == null ? void 0 : tokens.text) == null ? void 0 : _l.token) {
5902
+ if ((_l = tokens == null ? void 0 : tokens.hubspot) == null ? void 0 : _l.token) {
5903
+ headers["x-adapter-hubspot-token"] = tokens.hubspot.token;
5904
+ }
5905
+ if ((_m = tokens == null ? void 0 : tokens.text) == null ? void 0 : _m.token) {
5893
5906
  headers["x-adapter-text-token"] = tokens.text.token;
5894
5907
  }
5895
5908
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livechat/developer-studio-api",
3
- "version": "3.1.24",
3
+ "version": "3.1.25",
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,9 +20,9 @@
20
20
  "@types/node": "^17.0.12",
21
21
  "tsup": "^7.1.0",
22
22
  "typescript": "^5.1.6",
23
+ "eslint-config-custom": "0.0.8",
23
24
  "tsconfig": "0.0.1",
24
- "utils": "0.0.4",
25
- "eslint-config-custom": "0.0.8"
25
+ "utils": "0.0.4"
26
26
  },
27
27
  "scripts": {
28
28
  "build": "tsup",