@livechat/developer-studio-api 3.0.47 → 3.0.48
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 +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +96 -0
- package/dist/index.mjs +96 -0
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -58,7 +58,7 @@ interface GithubClientOptions {
|
|
|
58
58
|
}
|
|
59
59
|
declare const githubClientInstance: axios.AxiosInstance;
|
|
60
60
|
declare function getGitHubClientAuthorization(req: {
|
|
61
|
-
headers: Record<string, string | string[] | undefined
|
|
61
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
62
62
|
}): GithubClientAuthorization;
|
|
63
63
|
declare function getGithubClientConfig(options?: GithubClientOptions | undefined): AxiosRequestConfig;
|
|
64
64
|
declare function initGithubClient(token?: string): void;
|
|
@@ -182,7 +182,7 @@ interface NetlifyClientOptions extends NetlifyClientAuthorization {
|
|
|
182
182
|
}
|
|
183
183
|
declare const netlifyClientInstance: axios.AxiosInstance;
|
|
184
184
|
declare function getNetlifyClientAuthorization(req: {
|
|
185
|
-
headers: Record<string, string | string[] | undefined
|
|
185
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
186
186
|
}): NetlifyClientAuthorization;
|
|
187
187
|
declare function getNetlifyClientConfig(options?: NetlifyClientOptions): AxiosRequestConfig;
|
|
188
188
|
declare function initNetlifyClient(token?: string): void;
|
|
@@ -267,7 +267,7 @@ interface PlanetScaleClientOptions extends PlanetScaleClientAuthorization {
|
|
|
267
267
|
}
|
|
268
268
|
declare const planetScaleClientInstance: axios.AxiosInstance;
|
|
269
269
|
declare function getPlanetScaleClientAuthorization(req: {
|
|
270
|
-
headers: Record<string, string | string[] | undefined
|
|
270
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
271
271
|
}): PlanetScaleClientAuthorization;
|
|
272
272
|
declare function getPlanetScaleClientConfig(options?: PlanetScaleClientOptions): AxiosRequestConfig;
|
|
273
273
|
declare function initPlanetScaleClient(token?: string): void;
|
|
@@ -390,7 +390,7 @@ interface TextClientOptions extends TextClientAuthorization {
|
|
|
390
390
|
}
|
|
391
391
|
declare const textClientInstance: axios.AxiosInstance;
|
|
392
392
|
declare function getTextClientAuthorization(req: {
|
|
393
|
-
headers: Record<string, string | string[] | undefined
|
|
393
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
394
394
|
}): TextClientAuthorization;
|
|
395
395
|
declare function getTextClientConfig(option?: TextClientOptions): AxiosRequestConfig;
|
|
396
396
|
declare function initTextClient(baseUrl?: string, token?: string): void;
|
|
@@ -408,7 +408,7 @@ interface VercelClientOptions extends VercelClientAuthorization {
|
|
|
408
408
|
}
|
|
409
409
|
declare const vercelClientInstance: axios.AxiosInstance;
|
|
410
410
|
declare function getVercelClientAuthorization(req: {
|
|
411
|
-
headers: Record<string, string | string[] | undefined
|
|
411
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
412
412
|
}): VercelClientAuthorization;
|
|
413
413
|
declare function getVercelClientConfig(options?: VercelClientOptions): AxiosRequestConfig;
|
|
414
414
|
declare function initVercelClient(token?: string): void;
|
|
@@ -566,7 +566,7 @@ interface NeonClientOptions extends NeonClientAuthorization {
|
|
|
566
566
|
}
|
|
567
567
|
declare const neonClientInstance: axios.AxiosInstance;
|
|
568
568
|
declare function getNeonClientAuthorization(req: {
|
|
569
|
-
headers: Record<string, string | string[] | undefined
|
|
569
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
570
570
|
}): NeonClientAuthorization;
|
|
571
571
|
declare function getNeonClientConfig(options?: NeonClientOptions): AxiosRequestConfig;
|
|
572
572
|
declare function initNeonClient(token?: string): void;
|
|
@@ -686,7 +686,7 @@ declare class MailchimpApiError extends ApiErrorBase<{
|
|
|
686
686
|
declare const getMailchimpClientUrl: (server: string) => string;
|
|
687
687
|
declare const mailchimpClientInstance: axios.AxiosInstance;
|
|
688
688
|
declare function getMailchimpClientAuthorization(req: {
|
|
689
|
-
headers: Record<string, string | string[] | undefined
|
|
689
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
690
690
|
}): MailchimpClientAuthorization;
|
|
691
691
|
declare function getMailchimpClientConfig(options?: MailchimpClientInstanceOptions): AxiosRequestConfig;
|
|
692
692
|
declare function initMailchimpClient(token?: string, server?: string): void;
|
|
@@ -707,7 +707,7 @@ declare class ShopifyApiError extends ApiErrorBase<{
|
|
|
707
707
|
declare const shopifyClientInstance: axios.AxiosInstance;
|
|
708
708
|
declare const getShopifyClientUrl: (store: string) => string;
|
|
709
709
|
declare function getShopifyClientAuthorization(req: {
|
|
710
|
-
headers: Record<string, string | string[] | undefined
|
|
710
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
711
711
|
}): ShopifyClientAuthorization;
|
|
712
712
|
declare function getShopifyClientConfig(options: ShopifyClientOptions): AxiosRequestConfig;
|
|
713
713
|
declare function initShopifyClient(token?: string, shop?: string): void;
|
|
@@ -843,7 +843,7 @@ declare class AccountsApiError extends ApiErrorBase<{
|
|
|
843
843
|
}
|
|
844
844
|
declare const platformAccountsClientInstance: axios.AxiosInstance;
|
|
845
845
|
declare function getPlatformAccountsClientAuthorization(req: {
|
|
846
|
-
headers: Record<string, string | string[] | undefined
|
|
846
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
847
847
|
}): PlatformAccountsClientAuthorization;
|
|
848
848
|
declare function getPlatformAccountsClientConfig(options?: PlatformAccountsClientInstanceOptions): AxiosRequestConfig;
|
|
849
849
|
declare function initPlatformAccountsClient(baseUrl?: string, token?: string): void;
|
|
@@ -912,7 +912,7 @@ interface PlatformBillingClientOptions extends PlatformBillingClientAuthorizatio
|
|
|
912
912
|
}
|
|
913
913
|
declare const platformBillingClientInstance: axios.AxiosInstance;
|
|
914
914
|
declare function getPlatformBillingClientAuthorization(req: {
|
|
915
|
-
headers: Record<string, string | string[] | undefined
|
|
915
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
916
916
|
}): PlatformBillingClientAuthorization;
|
|
917
917
|
declare function getPlatformBillingClientConfig(options?: PlatformBillingClientOptions): AxiosRequestConfig;
|
|
918
918
|
declare function initPlatformBillingClient(baseUrl?: string, token?: string): void;
|
|
@@ -1647,7 +1647,7 @@ declare class AdapterApiError extends ApiErrorBase<{
|
|
|
1647
1647
|
}
|
|
1648
1648
|
declare const platformAdapterClientInstance: axios.AxiosInstance;
|
|
1649
1649
|
declare function getPlatformAdapterClientAuthorization(req: {
|
|
1650
|
-
headers: Record<string, string | string[] | undefined
|
|
1650
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
1651
1651
|
}): PlatformAdapterClientAuthorization;
|
|
1652
1652
|
declare function getPlatformAdapterClientConfig(options?: PlatformAdapterClientOptions): AxiosRequestConfig;
|
|
1653
1653
|
declare const getPlatformAdapterClientDefaultConfig: (authorization?: PlatformAdapterClientAuthorization) => AxiosRequestConfig<any>;
|
|
@@ -2229,7 +2229,7 @@ declare class DpsApiError extends ApiErrorBase<{
|
|
|
2229
2229
|
}
|
|
2230
2230
|
declare const platformDpsClientInstance: axios.AxiosInstance;
|
|
2231
2231
|
declare function getPlatformDpsClientAuthorization(req: {
|
|
2232
|
-
headers: Record<string, string | string[] | undefined
|
|
2232
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
2233
2233
|
}): PlatformDpsClientAuthorization;
|
|
2234
2234
|
declare function getPlatformDpsAdminClientAuthorization(): PlatformDpsClientAuthorization;
|
|
2235
2235
|
declare function getPlatformDpsClientConfig(options?: PlatformDpsClientOptions): AxiosRequestConfig;
|
|
@@ -2498,7 +2498,7 @@ declare class LivechatApiError extends ApiErrorBase<{
|
|
|
2498
2498
|
}
|
|
2499
2499
|
declare const livechatClientInstance: axios.AxiosInstance;
|
|
2500
2500
|
declare function getLiveChatClientAuthorization(req: {
|
|
2501
|
-
headers: Record<string, string | string[] | undefined
|
|
2501
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
2502
2502
|
}): LiveChatClientAuthorization;
|
|
2503
2503
|
declare function getLiveChatClientConfig(options?: LiveChatClientOptions): AxiosRequestConfig;
|
|
2504
2504
|
declare function initLiveChatClient(baseUrl?: string, token?: string): void;
|
package/dist/index.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ interface GithubClientOptions {
|
|
|
58
58
|
}
|
|
59
59
|
declare const githubClientInstance: axios.AxiosInstance;
|
|
60
60
|
declare function getGitHubClientAuthorization(req: {
|
|
61
|
-
headers: Record<string, string | string[] | undefined
|
|
61
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
62
62
|
}): GithubClientAuthorization;
|
|
63
63
|
declare function getGithubClientConfig(options?: GithubClientOptions | undefined): AxiosRequestConfig;
|
|
64
64
|
declare function initGithubClient(token?: string): void;
|
|
@@ -182,7 +182,7 @@ interface NetlifyClientOptions extends NetlifyClientAuthorization {
|
|
|
182
182
|
}
|
|
183
183
|
declare const netlifyClientInstance: axios.AxiosInstance;
|
|
184
184
|
declare function getNetlifyClientAuthorization(req: {
|
|
185
|
-
headers: Record<string, string | string[] | undefined
|
|
185
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
186
186
|
}): NetlifyClientAuthorization;
|
|
187
187
|
declare function getNetlifyClientConfig(options?: NetlifyClientOptions): AxiosRequestConfig;
|
|
188
188
|
declare function initNetlifyClient(token?: string): void;
|
|
@@ -267,7 +267,7 @@ interface PlanetScaleClientOptions extends PlanetScaleClientAuthorization {
|
|
|
267
267
|
}
|
|
268
268
|
declare const planetScaleClientInstance: axios.AxiosInstance;
|
|
269
269
|
declare function getPlanetScaleClientAuthorization(req: {
|
|
270
|
-
headers: Record<string, string | string[] | undefined
|
|
270
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
271
271
|
}): PlanetScaleClientAuthorization;
|
|
272
272
|
declare function getPlanetScaleClientConfig(options?: PlanetScaleClientOptions): AxiosRequestConfig;
|
|
273
273
|
declare function initPlanetScaleClient(token?: string): void;
|
|
@@ -390,7 +390,7 @@ interface TextClientOptions extends TextClientAuthorization {
|
|
|
390
390
|
}
|
|
391
391
|
declare const textClientInstance: axios.AxiosInstance;
|
|
392
392
|
declare function getTextClientAuthorization(req: {
|
|
393
|
-
headers: Record<string, string | string[] | undefined
|
|
393
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
394
394
|
}): TextClientAuthorization;
|
|
395
395
|
declare function getTextClientConfig(option?: TextClientOptions): AxiosRequestConfig;
|
|
396
396
|
declare function initTextClient(baseUrl?: string, token?: string): void;
|
|
@@ -408,7 +408,7 @@ interface VercelClientOptions extends VercelClientAuthorization {
|
|
|
408
408
|
}
|
|
409
409
|
declare const vercelClientInstance: axios.AxiosInstance;
|
|
410
410
|
declare function getVercelClientAuthorization(req: {
|
|
411
|
-
headers: Record<string, string | string[] | undefined
|
|
411
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
412
412
|
}): VercelClientAuthorization;
|
|
413
413
|
declare function getVercelClientConfig(options?: VercelClientOptions): AxiosRequestConfig;
|
|
414
414
|
declare function initVercelClient(token?: string): void;
|
|
@@ -566,7 +566,7 @@ interface NeonClientOptions extends NeonClientAuthorization {
|
|
|
566
566
|
}
|
|
567
567
|
declare const neonClientInstance: axios.AxiosInstance;
|
|
568
568
|
declare function getNeonClientAuthorization(req: {
|
|
569
|
-
headers: Record<string, string | string[] | undefined
|
|
569
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
570
570
|
}): NeonClientAuthorization;
|
|
571
571
|
declare function getNeonClientConfig(options?: NeonClientOptions): AxiosRequestConfig;
|
|
572
572
|
declare function initNeonClient(token?: string): void;
|
|
@@ -686,7 +686,7 @@ declare class MailchimpApiError extends ApiErrorBase<{
|
|
|
686
686
|
declare const getMailchimpClientUrl: (server: string) => string;
|
|
687
687
|
declare const mailchimpClientInstance: axios.AxiosInstance;
|
|
688
688
|
declare function getMailchimpClientAuthorization(req: {
|
|
689
|
-
headers: Record<string, string | string[] | undefined
|
|
689
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
690
690
|
}): MailchimpClientAuthorization;
|
|
691
691
|
declare function getMailchimpClientConfig(options?: MailchimpClientInstanceOptions): AxiosRequestConfig;
|
|
692
692
|
declare function initMailchimpClient(token?: string, server?: string): void;
|
|
@@ -707,7 +707,7 @@ declare class ShopifyApiError extends ApiErrorBase<{
|
|
|
707
707
|
declare const shopifyClientInstance: axios.AxiosInstance;
|
|
708
708
|
declare const getShopifyClientUrl: (store: string) => string;
|
|
709
709
|
declare function getShopifyClientAuthorization(req: {
|
|
710
|
-
headers: Record<string, string | string[] | undefined
|
|
710
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
711
711
|
}): ShopifyClientAuthorization;
|
|
712
712
|
declare function getShopifyClientConfig(options: ShopifyClientOptions): AxiosRequestConfig;
|
|
713
713
|
declare function initShopifyClient(token?: string, shop?: string): void;
|
|
@@ -843,7 +843,7 @@ declare class AccountsApiError extends ApiErrorBase<{
|
|
|
843
843
|
}
|
|
844
844
|
declare const platformAccountsClientInstance: axios.AxiosInstance;
|
|
845
845
|
declare function getPlatformAccountsClientAuthorization(req: {
|
|
846
|
-
headers: Record<string, string | string[] | undefined
|
|
846
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
847
847
|
}): PlatformAccountsClientAuthorization;
|
|
848
848
|
declare function getPlatformAccountsClientConfig(options?: PlatformAccountsClientInstanceOptions): AxiosRequestConfig;
|
|
849
849
|
declare function initPlatformAccountsClient(baseUrl?: string, token?: string): void;
|
|
@@ -912,7 +912,7 @@ interface PlatformBillingClientOptions extends PlatformBillingClientAuthorizatio
|
|
|
912
912
|
}
|
|
913
913
|
declare const platformBillingClientInstance: axios.AxiosInstance;
|
|
914
914
|
declare function getPlatformBillingClientAuthorization(req: {
|
|
915
|
-
headers: Record<string, string | string[] | undefined
|
|
915
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
916
916
|
}): PlatformBillingClientAuthorization;
|
|
917
917
|
declare function getPlatformBillingClientConfig(options?: PlatformBillingClientOptions): AxiosRequestConfig;
|
|
918
918
|
declare function initPlatformBillingClient(baseUrl?: string, token?: string): void;
|
|
@@ -1647,7 +1647,7 @@ declare class AdapterApiError extends ApiErrorBase<{
|
|
|
1647
1647
|
}
|
|
1648
1648
|
declare const platformAdapterClientInstance: axios.AxiosInstance;
|
|
1649
1649
|
declare function getPlatformAdapterClientAuthorization(req: {
|
|
1650
|
-
headers: Record<string, string | string[] | undefined
|
|
1650
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
1651
1651
|
}): PlatformAdapterClientAuthorization;
|
|
1652
1652
|
declare function getPlatformAdapterClientConfig(options?: PlatformAdapterClientOptions): AxiosRequestConfig;
|
|
1653
1653
|
declare const getPlatformAdapterClientDefaultConfig: (authorization?: PlatformAdapterClientAuthorization) => AxiosRequestConfig<any>;
|
|
@@ -2229,7 +2229,7 @@ declare class DpsApiError extends ApiErrorBase<{
|
|
|
2229
2229
|
}
|
|
2230
2230
|
declare const platformDpsClientInstance: axios.AxiosInstance;
|
|
2231
2231
|
declare function getPlatformDpsClientAuthorization(req: {
|
|
2232
|
-
headers: Record<string, string | string[] | undefined
|
|
2232
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
2233
2233
|
}): PlatformDpsClientAuthorization;
|
|
2234
2234
|
declare function getPlatformDpsAdminClientAuthorization(): PlatformDpsClientAuthorization;
|
|
2235
2235
|
declare function getPlatformDpsClientConfig(options?: PlatformDpsClientOptions): AxiosRequestConfig;
|
|
@@ -2498,7 +2498,7 @@ declare class LivechatApiError extends ApiErrorBase<{
|
|
|
2498
2498
|
}
|
|
2499
2499
|
declare const livechatClientInstance: axios.AxiosInstance;
|
|
2500
2500
|
declare function getLiveChatClientAuthorization(req: {
|
|
2501
|
-
headers: Record<string, string | string[] | undefined
|
|
2501
|
+
headers: Record<string, string | string[] | undefined> | Headers;
|
|
2502
2502
|
}): LiveChatClientAuthorization;
|
|
2503
2503
|
declare function getLiveChatClientConfig(options?: LiveChatClientOptions): AxiosRequestConfig;
|
|
2504
2504
|
declare function initLiveChatClient(baseUrl?: string, token?: string): void;
|
package/dist/index.js
CHANGED
|
@@ -208,6 +208,12 @@ githubClientInstance.interceptors.response.use(
|
|
|
208
208
|
}
|
|
209
209
|
);
|
|
210
210
|
function getGitHubClientAuthorization(req) {
|
|
211
|
+
if (req.headers instanceof Headers) {
|
|
212
|
+
return {
|
|
213
|
+
appToken: req.headers.get("github-app-token"),
|
|
214
|
+
oauthToken: req.headers.get("github-oauth-token")
|
|
215
|
+
};
|
|
216
|
+
}
|
|
211
217
|
return {
|
|
212
218
|
appToken: req.headers["github-app-token"],
|
|
213
219
|
oauthToken: req.headers["github-oauth-token"]
|
|
@@ -665,6 +671,11 @@ netlifyClientInstance.interceptors.response.use(
|
|
|
665
671
|
}
|
|
666
672
|
);
|
|
667
673
|
function getNetlifyClientAuthorization(req) {
|
|
674
|
+
if (req.headers instanceof Headers) {
|
|
675
|
+
return {
|
|
676
|
+
token: req.headers.get("netlify-token")
|
|
677
|
+
};
|
|
678
|
+
}
|
|
668
679
|
return {
|
|
669
680
|
token: req.headers["netlify-token"]
|
|
670
681
|
};
|
|
@@ -1124,6 +1135,11 @@ planetScaleClientInstance.interceptors.response.use(
|
|
|
1124
1135
|
}
|
|
1125
1136
|
);
|
|
1126
1137
|
function getPlanetScaleClientAuthorization(req) {
|
|
1138
|
+
if (req.headers instanceof Headers) {
|
|
1139
|
+
return {
|
|
1140
|
+
token: req.headers.get("planetscale-token")
|
|
1141
|
+
};
|
|
1142
|
+
}
|
|
1127
1143
|
return {
|
|
1128
1144
|
token: req.headers["planetscale-token"]
|
|
1129
1145
|
};
|
|
@@ -1336,6 +1352,12 @@ var textClientInstance = import_axios8.default.create({
|
|
|
1336
1352
|
baseURL: "https://api.labs.text.com"
|
|
1337
1353
|
});
|
|
1338
1354
|
function getTextClientAuthorization(req) {
|
|
1355
|
+
if (req.headers instanceof Headers) {
|
|
1356
|
+
return {
|
|
1357
|
+
token: req.headers.get("platform-token"),
|
|
1358
|
+
tokenType: "Bearer"
|
|
1359
|
+
};
|
|
1360
|
+
}
|
|
1339
1361
|
return {
|
|
1340
1362
|
token: req.headers["platform-token"],
|
|
1341
1363
|
tokenType: "Bearer"
|
|
@@ -1755,6 +1777,11 @@ vercelClientInstance.interceptors.response.use(
|
|
|
1755
1777
|
}
|
|
1756
1778
|
);
|
|
1757
1779
|
function getVercelClientAuthorization(req) {
|
|
1780
|
+
if (req.headers instanceof Headers) {
|
|
1781
|
+
return {
|
|
1782
|
+
token: req.headers.get("vercel-token")
|
|
1783
|
+
};
|
|
1784
|
+
}
|
|
1758
1785
|
return {
|
|
1759
1786
|
token: req.headers["vercel-token"]
|
|
1760
1787
|
};
|
|
@@ -2074,6 +2101,11 @@ neonClientInstance.interceptors.response.use(
|
|
|
2074
2101
|
}
|
|
2075
2102
|
);
|
|
2076
2103
|
function getNeonClientAuthorization(req) {
|
|
2104
|
+
if (req.headers instanceof Headers) {
|
|
2105
|
+
return {
|
|
2106
|
+
token: req.headers.get("neon-token")
|
|
2107
|
+
};
|
|
2108
|
+
}
|
|
2077
2109
|
return {
|
|
2078
2110
|
token: req.headers["neon-token"]
|
|
2079
2111
|
};
|
|
@@ -2402,6 +2434,12 @@ mailchimpClientInstance.interceptors.response.use(
|
|
|
2402
2434
|
}
|
|
2403
2435
|
);
|
|
2404
2436
|
function getMailchimpClientAuthorization(req) {
|
|
2437
|
+
if (req.headers instanceof Headers) {
|
|
2438
|
+
return {
|
|
2439
|
+
server: req.headers.get("mailchimp-server"),
|
|
2440
|
+
token: req.headers.get("mailchimp-token")
|
|
2441
|
+
};
|
|
2442
|
+
}
|
|
2405
2443
|
return {
|
|
2406
2444
|
server: req.headers["mailchimp-server"],
|
|
2407
2445
|
token: req.headers["mailchimp-token"]
|
|
@@ -2567,6 +2605,12 @@ shopifyClientInstance.interceptors.response.use(
|
|
|
2567
2605
|
);
|
|
2568
2606
|
var getShopifyClientUrl = (store) => `https://${store}.myshopify.com/admin/api/2024-04`;
|
|
2569
2607
|
function getShopifyClientAuthorization(req) {
|
|
2608
|
+
if (req.headers instanceof Headers) {
|
|
2609
|
+
return {
|
|
2610
|
+
shop: req.headers.get("shopify-shop"),
|
|
2611
|
+
token: req.headers.get("shopify-token")
|
|
2612
|
+
};
|
|
2613
|
+
}
|
|
2570
2614
|
return {
|
|
2571
2615
|
shop: req.headers["shopify-shop"],
|
|
2572
2616
|
token: req.headers["shopify-token"]
|
|
@@ -2731,6 +2775,11 @@ livechatClientInstance.interceptors.response.use(
|
|
|
2731
2775
|
}
|
|
2732
2776
|
);
|
|
2733
2777
|
function getLiveChatClientAuthorization(req) {
|
|
2778
|
+
if (req.headers instanceof Headers) {
|
|
2779
|
+
return {
|
|
2780
|
+
token: req.headers.get("platform-token")
|
|
2781
|
+
};
|
|
2782
|
+
}
|
|
2734
2783
|
return {
|
|
2735
2784
|
token: req.headers["platform-token"]
|
|
2736
2785
|
};
|
|
@@ -3298,6 +3347,11 @@ platformAccountsClientInstance.interceptors.response.use(
|
|
|
3298
3347
|
}
|
|
3299
3348
|
);
|
|
3300
3349
|
function getPlatformAccountsClientAuthorization(req) {
|
|
3350
|
+
if (req.headers instanceof Headers) {
|
|
3351
|
+
return {
|
|
3352
|
+
token: req.headers.get("platform-token")
|
|
3353
|
+
};
|
|
3354
|
+
}
|
|
3301
3355
|
return {
|
|
3302
3356
|
token: req.headers["platform-token"]
|
|
3303
3357
|
};
|
|
@@ -3635,6 +3689,12 @@ platformDpsClientInstance.interceptors.response.use(
|
|
|
3635
3689
|
}
|
|
3636
3690
|
);
|
|
3637
3691
|
function getPlatformDpsClientAuthorization(req) {
|
|
3692
|
+
if (req.headers instanceof Headers) {
|
|
3693
|
+
return {
|
|
3694
|
+
token: req.headers.get("platform-token"),
|
|
3695
|
+
tokenType: "Bearer"
|
|
3696
|
+
};
|
|
3697
|
+
}
|
|
3638
3698
|
return {
|
|
3639
3699
|
token: req.headers["platform-token"],
|
|
3640
3700
|
tokenType: "Bearer"
|
|
@@ -5217,6 +5277,37 @@ platformAdapterClientInstance.interceptors.response.use(
|
|
|
5217
5277
|
}
|
|
5218
5278
|
);
|
|
5219
5279
|
function getPlatformAdapterClientAuthorization(req) {
|
|
5280
|
+
if (req.headers instanceof Headers) {
|
|
5281
|
+
return {
|
|
5282
|
+
platform: {
|
|
5283
|
+
token: req.headers.get("platform-token")
|
|
5284
|
+
},
|
|
5285
|
+
github: {
|
|
5286
|
+
appToken: req.headers.get("github-app-token"),
|
|
5287
|
+
oauthToken: req.headers.get("github-oauth-token")
|
|
5288
|
+
},
|
|
5289
|
+
netlify: {
|
|
5290
|
+
token: req.headers.get("netlify-token")
|
|
5291
|
+
},
|
|
5292
|
+
vercel: {
|
|
5293
|
+
token: req.headers.get("vercel-token")
|
|
5294
|
+
},
|
|
5295
|
+
planetscale: {
|
|
5296
|
+
token: req.headers.get("planetscale-token")
|
|
5297
|
+
},
|
|
5298
|
+
neon: {
|
|
5299
|
+
token: req.headers.get("neon-token")
|
|
5300
|
+
},
|
|
5301
|
+
mailchimp: {
|
|
5302
|
+
token: req.headers.get("mailchimp-token"),
|
|
5303
|
+
server: req.headers.get("mailchimp-server")
|
|
5304
|
+
},
|
|
5305
|
+
shopify: {
|
|
5306
|
+
token: req.headers.get("shopify-token"),
|
|
5307
|
+
shop: req.headers.get("shopify-shop")
|
|
5308
|
+
}
|
|
5309
|
+
};
|
|
5310
|
+
}
|
|
5220
5311
|
return {
|
|
5221
5312
|
platform: {
|
|
5222
5313
|
token: req.headers["platform-token"]
|
|
@@ -5851,6 +5942,11 @@ var platformBillingClientInstance = import_axios21.default.create({
|
|
|
5851
5942
|
baseURL: "https://billing.labs.livechatinc.com"
|
|
5852
5943
|
});
|
|
5853
5944
|
function getPlatformBillingClientAuthorization(req) {
|
|
5945
|
+
if (req.headers instanceof Headers) {
|
|
5946
|
+
return {
|
|
5947
|
+
token: req.headers.get("platform-token")
|
|
5948
|
+
};
|
|
5949
|
+
}
|
|
5854
5950
|
return {
|
|
5855
5951
|
token: req.headers["platform-token"]
|
|
5856
5952
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -91,6 +91,12 @@ githubClientInstance.interceptors.response.use(
|
|
|
91
91
|
}
|
|
92
92
|
);
|
|
93
93
|
function getGitHubClientAuthorization(req) {
|
|
94
|
+
if (req.headers instanceof Headers) {
|
|
95
|
+
return {
|
|
96
|
+
appToken: req.headers.get("github-app-token"),
|
|
97
|
+
oauthToken: req.headers.get("github-oauth-token")
|
|
98
|
+
};
|
|
99
|
+
}
|
|
94
100
|
return {
|
|
95
101
|
appToken: req.headers["github-app-token"],
|
|
96
102
|
oauthToken: req.headers["github-oauth-token"]
|
|
@@ -548,6 +554,11 @@ netlifyClientInstance.interceptors.response.use(
|
|
|
548
554
|
}
|
|
549
555
|
);
|
|
550
556
|
function getNetlifyClientAuthorization(req) {
|
|
557
|
+
if (req.headers instanceof Headers) {
|
|
558
|
+
return {
|
|
559
|
+
token: req.headers.get("netlify-token")
|
|
560
|
+
};
|
|
561
|
+
}
|
|
551
562
|
return {
|
|
552
563
|
token: req.headers["netlify-token"]
|
|
553
564
|
};
|
|
@@ -1007,6 +1018,11 @@ planetScaleClientInstance.interceptors.response.use(
|
|
|
1007
1018
|
}
|
|
1008
1019
|
);
|
|
1009
1020
|
function getPlanetScaleClientAuthorization(req) {
|
|
1021
|
+
if (req.headers instanceof Headers) {
|
|
1022
|
+
return {
|
|
1023
|
+
token: req.headers.get("planetscale-token")
|
|
1024
|
+
};
|
|
1025
|
+
}
|
|
1010
1026
|
return {
|
|
1011
1027
|
token: req.headers["planetscale-token"]
|
|
1012
1028
|
};
|
|
@@ -1219,6 +1235,12 @@ var textClientInstance = axios6.create({
|
|
|
1219
1235
|
baseURL: "https://api.labs.text.com"
|
|
1220
1236
|
});
|
|
1221
1237
|
function getTextClientAuthorization(req) {
|
|
1238
|
+
if (req.headers instanceof Headers) {
|
|
1239
|
+
return {
|
|
1240
|
+
token: req.headers.get("platform-token"),
|
|
1241
|
+
tokenType: "Bearer"
|
|
1242
|
+
};
|
|
1243
|
+
}
|
|
1222
1244
|
return {
|
|
1223
1245
|
token: req.headers["platform-token"],
|
|
1224
1246
|
tokenType: "Bearer"
|
|
@@ -1638,6 +1660,11 @@ vercelClientInstance.interceptors.response.use(
|
|
|
1638
1660
|
}
|
|
1639
1661
|
);
|
|
1640
1662
|
function getVercelClientAuthorization(req) {
|
|
1663
|
+
if (req.headers instanceof Headers) {
|
|
1664
|
+
return {
|
|
1665
|
+
token: req.headers.get("vercel-token")
|
|
1666
|
+
};
|
|
1667
|
+
}
|
|
1641
1668
|
return {
|
|
1642
1669
|
token: req.headers["vercel-token"]
|
|
1643
1670
|
};
|
|
@@ -1957,6 +1984,11 @@ neonClientInstance.interceptors.response.use(
|
|
|
1957
1984
|
}
|
|
1958
1985
|
);
|
|
1959
1986
|
function getNeonClientAuthorization(req) {
|
|
1987
|
+
if (req.headers instanceof Headers) {
|
|
1988
|
+
return {
|
|
1989
|
+
token: req.headers.get("neon-token")
|
|
1990
|
+
};
|
|
1991
|
+
}
|
|
1960
1992
|
return {
|
|
1961
1993
|
token: req.headers["neon-token"]
|
|
1962
1994
|
};
|
|
@@ -2285,6 +2317,12 @@ mailchimpClientInstance.interceptors.response.use(
|
|
|
2285
2317
|
}
|
|
2286
2318
|
);
|
|
2287
2319
|
function getMailchimpClientAuthorization(req) {
|
|
2320
|
+
if (req.headers instanceof Headers) {
|
|
2321
|
+
return {
|
|
2322
|
+
server: req.headers.get("mailchimp-server"),
|
|
2323
|
+
token: req.headers.get("mailchimp-token")
|
|
2324
|
+
};
|
|
2325
|
+
}
|
|
2288
2326
|
return {
|
|
2289
2327
|
server: req.headers["mailchimp-server"],
|
|
2290
2328
|
token: req.headers["mailchimp-token"]
|
|
@@ -2450,6 +2488,12 @@ shopifyClientInstance.interceptors.response.use(
|
|
|
2450
2488
|
);
|
|
2451
2489
|
var getShopifyClientUrl = (store) => `https://${store}.myshopify.com/admin/api/2024-04`;
|
|
2452
2490
|
function getShopifyClientAuthorization(req) {
|
|
2491
|
+
if (req.headers instanceof Headers) {
|
|
2492
|
+
return {
|
|
2493
|
+
shop: req.headers.get("shopify-shop"),
|
|
2494
|
+
token: req.headers.get("shopify-token")
|
|
2495
|
+
};
|
|
2496
|
+
}
|
|
2453
2497
|
return {
|
|
2454
2498
|
shop: req.headers["shopify-shop"],
|
|
2455
2499
|
token: req.headers["shopify-token"]
|
|
@@ -2614,6 +2658,11 @@ livechatClientInstance.interceptors.response.use(
|
|
|
2614
2658
|
}
|
|
2615
2659
|
);
|
|
2616
2660
|
function getLiveChatClientAuthorization(req) {
|
|
2661
|
+
if (req.headers instanceof Headers) {
|
|
2662
|
+
return {
|
|
2663
|
+
token: req.headers.get("platform-token")
|
|
2664
|
+
};
|
|
2665
|
+
}
|
|
2617
2666
|
return {
|
|
2618
2667
|
token: req.headers["platform-token"]
|
|
2619
2668
|
};
|
|
@@ -3181,6 +3230,11 @@ platformAccountsClientInstance.interceptors.response.use(
|
|
|
3181
3230
|
}
|
|
3182
3231
|
);
|
|
3183
3232
|
function getPlatformAccountsClientAuthorization(req) {
|
|
3233
|
+
if (req.headers instanceof Headers) {
|
|
3234
|
+
return {
|
|
3235
|
+
token: req.headers.get("platform-token")
|
|
3236
|
+
};
|
|
3237
|
+
}
|
|
3184
3238
|
return {
|
|
3185
3239
|
token: req.headers["platform-token"]
|
|
3186
3240
|
};
|
|
@@ -3518,6 +3572,12 @@ platformDpsClientInstance.interceptors.response.use(
|
|
|
3518
3572
|
}
|
|
3519
3573
|
);
|
|
3520
3574
|
function getPlatformDpsClientAuthorization(req) {
|
|
3575
|
+
if (req.headers instanceof Headers) {
|
|
3576
|
+
return {
|
|
3577
|
+
token: req.headers.get("platform-token"),
|
|
3578
|
+
tokenType: "Bearer"
|
|
3579
|
+
};
|
|
3580
|
+
}
|
|
3521
3581
|
return {
|
|
3522
3582
|
token: req.headers["platform-token"],
|
|
3523
3583
|
tokenType: "Bearer"
|
|
@@ -5100,6 +5160,37 @@ platformAdapterClientInstance.interceptors.response.use(
|
|
|
5100
5160
|
}
|
|
5101
5161
|
);
|
|
5102
5162
|
function getPlatformAdapterClientAuthorization(req) {
|
|
5163
|
+
if (req.headers instanceof Headers) {
|
|
5164
|
+
return {
|
|
5165
|
+
platform: {
|
|
5166
|
+
token: req.headers.get("platform-token")
|
|
5167
|
+
},
|
|
5168
|
+
github: {
|
|
5169
|
+
appToken: req.headers.get("github-app-token"),
|
|
5170
|
+
oauthToken: req.headers.get("github-oauth-token")
|
|
5171
|
+
},
|
|
5172
|
+
netlify: {
|
|
5173
|
+
token: req.headers.get("netlify-token")
|
|
5174
|
+
},
|
|
5175
|
+
vercel: {
|
|
5176
|
+
token: req.headers.get("vercel-token")
|
|
5177
|
+
},
|
|
5178
|
+
planetscale: {
|
|
5179
|
+
token: req.headers.get("planetscale-token")
|
|
5180
|
+
},
|
|
5181
|
+
neon: {
|
|
5182
|
+
token: req.headers.get("neon-token")
|
|
5183
|
+
},
|
|
5184
|
+
mailchimp: {
|
|
5185
|
+
token: req.headers.get("mailchimp-token"),
|
|
5186
|
+
server: req.headers.get("mailchimp-server")
|
|
5187
|
+
},
|
|
5188
|
+
shopify: {
|
|
5189
|
+
token: req.headers.get("shopify-token"),
|
|
5190
|
+
shop: req.headers.get("shopify-shop")
|
|
5191
|
+
}
|
|
5192
|
+
};
|
|
5193
|
+
}
|
|
5103
5194
|
return {
|
|
5104
5195
|
platform: {
|
|
5105
5196
|
token: req.headers["platform-token"]
|
|
@@ -5734,6 +5825,11 @@ var platformBillingClientInstance = axios19.create({
|
|
|
5734
5825
|
baseURL: "https://billing.labs.livechatinc.com"
|
|
5735
5826
|
});
|
|
5736
5827
|
function getPlatformBillingClientAuthorization(req) {
|
|
5828
|
+
if (req.headers instanceof Headers) {
|
|
5829
|
+
return {
|
|
5830
|
+
token: req.headers.get("platform-token")
|
|
5831
|
+
};
|
|
5832
|
+
}
|
|
5737
5833
|
return {
|
|
5738
5834
|
token: req.headers["platform-token"]
|
|
5739
5835
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livechat/developer-studio-api",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.48",
|
|
4
4
|
"description": "This project is API for LiveChat Developer Studio.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"@types/node": "^17.0.12",
|
|
20
20
|
"tsup": "^7.1.0",
|
|
21
21
|
"typescript": "^5.1.6",
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
22
|
+
"tsconfig": "0.0.1",
|
|
23
|
+
"eslint-config-custom": "0.0.8",
|
|
24
|
+
"utils": "0.0.4"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"build": "tsup",
|