@livechat/developer-studio-api 5.2.0-generator-beta-v1.0 → 5.3.1-beta.generator
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/chunk-WXTWJG7Z.mjs +9844 -0
- package/dist/events-D6Wj4603.d.mts +13056 -0
- package/dist/events-D6Wj4603.d.ts +13056 -0
- package/dist/index.d.mts +475 -13490
- package/dist/index.d.ts +475 -13490
- package/dist/index.js +91 -65
- package/dist/index.mjs +196 -9625
- package/dist/workflow-contracts.d.mts +5 -0
- package/dist/workflow-contracts.d.ts +5 -0
- package/dist/workflow-contracts.js +2310 -0
- package/dist/workflow-contracts.mjs +56 -0
- package/package.json +16 -2
package/dist/index.js
CHANGED
|
@@ -877,7 +877,7 @@ var textCustomerEventsZods = {
|
|
|
877
877
|
properties: import_zod7.z.array(
|
|
878
878
|
import_zod7.z.object({
|
|
879
879
|
id: import_zod7.z.string().min(1),
|
|
880
|
-
to: import_zod7.z.union([import_zod7.z.string(), import_zod7.z.number(), import_zod7.z.boolean()]).
|
|
880
|
+
to: import_zod7.z.union([import_zod7.z.string(), import_zod7.z.number(), import_zod7.z.boolean()]).nullish()
|
|
881
881
|
})
|
|
882
882
|
).optional()
|
|
883
883
|
})
|
|
@@ -994,8 +994,8 @@ var textHelpDeskEventsZods = {
|
|
|
994
994
|
customFields: import_zod8.z.array(
|
|
995
995
|
import_zod8.z.object({
|
|
996
996
|
id: import_zod8.z.string().min(1),
|
|
997
|
-
from: import_zod8.z.string().min(1).
|
|
998
|
-
to: import_zod8.z.string().min(1).
|
|
997
|
+
from: import_zod8.z.string().min(1).nullish(),
|
|
998
|
+
to: import_zod8.z.string().min(1).nullish()
|
|
999
999
|
})
|
|
1000
1000
|
).optional()
|
|
1001
1001
|
}).extend(baseFiltersZod.shape),
|
|
@@ -2264,11 +2264,36 @@ var hubspotApi = {
|
|
|
2264
2264
|
}
|
|
2265
2265
|
};
|
|
2266
2266
|
|
|
2267
|
+
// src/apis/integrations/klaviyo/api.ts
|
|
2268
|
+
var import_axios7 = __toESM(require("axios"));
|
|
2269
|
+
var KLAVIYO_API_REVISION = "2025-07-15";
|
|
2270
|
+
var klaviyoApi = {
|
|
2271
|
+
getAccount(_0) {
|
|
2272
|
+
return __async(this, arguments, function* ({ token }) {
|
|
2273
|
+
var _a, _b, _c;
|
|
2274
|
+
const { data } = yield import_axios7.default.get(
|
|
2275
|
+
"https://a.klaviyo.com/api/accounts/",
|
|
2276
|
+
{
|
|
2277
|
+
headers: {
|
|
2278
|
+
Authorization: `Bearer ${token}`,
|
|
2279
|
+
revision: KLAVIYO_API_REVISION
|
|
2280
|
+
}
|
|
2281
|
+
}
|
|
2282
|
+
);
|
|
2283
|
+
const contactInformation = (_c = (_b = (_a = data.data) == null ? void 0 : _a[0]) == null ? void 0 : _b.attributes) == null ? void 0 : _c.contact_information;
|
|
2284
|
+
return {
|
|
2285
|
+
email: contactInformation == null ? void 0 : contactInformation.default_sender_email,
|
|
2286
|
+
organizationName: contactInformation == null ? void 0 : contactInformation.organization_name
|
|
2287
|
+
};
|
|
2288
|
+
});
|
|
2289
|
+
}
|
|
2290
|
+
};
|
|
2291
|
+
|
|
2267
2292
|
// src/apis/integrations/mailchimp/api.ts
|
|
2268
|
-
var
|
|
2293
|
+
var import_axios9 = __toESM(require("axios"));
|
|
2269
2294
|
|
|
2270
2295
|
// src/apis/integrations/mailchimp/instance.ts
|
|
2271
|
-
var
|
|
2296
|
+
var import_axios8 = __toESM(require("axios"));
|
|
2272
2297
|
function getMailchimpClientAuthorization(req, authorization) {
|
|
2273
2298
|
var _a, _b;
|
|
2274
2299
|
const headerPrefix = "x-adapter-mailchimp";
|
|
@@ -2298,7 +2323,7 @@ var MailchimpApiError = class extends ApiErrorBase {
|
|
|
2298
2323
|
}
|
|
2299
2324
|
};
|
|
2300
2325
|
var getMailchimpClientUrl = (server) => `https://${server}.api.mailchimp.com/3.0`;
|
|
2301
|
-
var mailchimpClientInstance =
|
|
2326
|
+
var mailchimpClientInstance = import_axios8.default.create({
|
|
2302
2327
|
headers: {
|
|
2303
2328
|
"Content-Type": "application/json"
|
|
2304
2329
|
}
|
|
@@ -2307,7 +2332,7 @@ mailchimpClientInstance.interceptors.response.use(
|
|
|
2307
2332
|
(r) => r,
|
|
2308
2333
|
(error) => {
|
|
2309
2334
|
var _a, _b, _c, _d;
|
|
2310
|
-
if (
|
|
2335
|
+
if (import_axios8.default.isAxiosError(error)) {
|
|
2311
2336
|
if (((_a = error.response) == null ? void 0 : _a.status) === 401) {
|
|
2312
2337
|
throw new UnauthorizeApiError("mailchimp");
|
|
2313
2338
|
}
|
|
@@ -2412,7 +2437,7 @@ var mailchimpApi = {
|
|
|
2412
2437
|
redirect_uri: redirectUri,
|
|
2413
2438
|
grant_type: "authorization_code"
|
|
2414
2439
|
});
|
|
2415
|
-
const tokenResponse = yield
|
|
2440
|
+
const tokenResponse = yield import_axios9.default.post(
|
|
2416
2441
|
"https://login.mailchimp.com/oauth2/token",
|
|
2417
2442
|
data,
|
|
2418
2443
|
{
|
|
@@ -2432,7 +2457,7 @@ var mailchimpApi = {
|
|
|
2432
2457
|
getMetadata(_0) {
|
|
2433
2458
|
return __async(this, arguments, function* ({ token }) {
|
|
2434
2459
|
var _a, _b, _c, _d;
|
|
2435
|
-
const { data } = yield
|
|
2460
|
+
const { data } = yield import_axios9.default.get("https://login.mailchimp.com/oauth2/metadata", {
|
|
2436
2461
|
headers: {
|
|
2437
2462
|
"Content-Type": "application/json",
|
|
2438
2463
|
Authorization: `OAuth ${token}`
|
|
@@ -2448,11 +2473,11 @@ var mailchimpApi = {
|
|
|
2448
2473
|
};
|
|
2449
2474
|
|
|
2450
2475
|
// src/apis/integrations/neon/api.ts
|
|
2451
|
-
var
|
|
2476
|
+
var import_axios11 = __toESM(require("axios"));
|
|
2452
2477
|
|
|
2453
2478
|
// src/apis/integrations/neon/instance.ts
|
|
2454
|
-
var
|
|
2455
|
-
var neonClientInstance =
|
|
2479
|
+
var import_axios10 = __toESM(require("axios"));
|
|
2480
|
+
var neonClientInstance = import_axios10.default.create({
|
|
2456
2481
|
baseURL: "https://console.neon.tech/api/v2",
|
|
2457
2482
|
headers: {
|
|
2458
2483
|
"Content-Type": "application/json"
|
|
@@ -2462,7 +2487,7 @@ neonClientInstance.interceptors.response.use(
|
|
|
2462
2487
|
(r) => r,
|
|
2463
2488
|
(error) => {
|
|
2464
2489
|
var _a;
|
|
2465
|
-
if (
|
|
2490
|
+
if (import_axios10.default.isAxiosError(error)) {
|
|
2466
2491
|
if (((_a = error.response) == null ? void 0 : _a.status) === 401) {
|
|
2467
2492
|
throw new UnauthorizeApiError("neon");
|
|
2468
2493
|
}
|
|
@@ -2739,7 +2764,7 @@ var neonApi = {
|
|
|
2739
2764
|
redirect_uri: redirectUri,
|
|
2740
2765
|
grant_type: "authorization_code"
|
|
2741
2766
|
});
|
|
2742
|
-
const response = yield
|
|
2767
|
+
const response = yield import_axios11.default.post(
|
|
2743
2768
|
"https://oauth2.neon.tech/oauth2/token",
|
|
2744
2769
|
data,
|
|
2745
2770
|
{
|
|
@@ -2764,7 +2789,7 @@ var neonApi = {
|
|
|
2764
2789
|
client_secret: clientSecret,
|
|
2765
2790
|
grant_type: "refresh_token"
|
|
2766
2791
|
});
|
|
2767
|
-
const response = yield
|
|
2792
|
+
const response = yield import_axios11.default.post("https://oauth2.neon.tech/oauth2/token", data, {
|
|
2768
2793
|
headers: {
|
|
2769
2794
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
2770
2795
|
}
|
|
@@ -2779,13 +2804,13 @@ var neonApi = {
|
|
|
2779
2804
|
};
|
|
2780
2805
|
|
|
2781
2806
|
// src/apis/integrations/netlify/api.ts
|
|
2782
|
-
var
|
|
2807
|
+
var import_axios14 = __toESM(require("axios"));
|
|
2783
2808
|
|
|
2784
2809
|
// src/apis/integrations/netlify/account/api.ts
|
|
2785
|
-
var
|
|
2810
|
+
var import_axios13 = require("axios");
|
|
2786
2811
|
|
|
2787
2812
|
// src/apis/integrations/netlify/instance.ts
|
|
2788
|
-
var
|
|
2813
|
+
var import_axios12 = __toESM(require("axios"));
|
|
2789
2814
|
function getNetlifyClientAuthorization(req, headerPrefix = "x-adapter-netlify-token") {
|
|
2790
2815
|
if (req.headers instanceof Headers) {
|
|
2791
2816
|
return {
|
|
@@ -2796,7 +2821,7 @@ function getNetlifyClientAuthorization(req, headerPrefix = "x-adapter-netlify-to
|
|
|
2796
2821
|
token: req.headers[`${headerPrefix}-token`]
|
|
2797
2822
|
};
|
|
2798
2823
|
}
|
|
2799
|
-
var netlifyClientInstance =
|
|
2824
|
+
var netlifyClientInstance = import_axios12.default.create({
|
|
2800
2825
|
baseURL: "https://api.netlify.com/api/v1",
|
|
2801
2826
|
headers: {
|
|
2802
2827
|
"Content-Type": "application/json"
|
|
@@ -2806,7 +2831,7 @@ netlifyClientInstance.interceptors.response.use(
|
|
|
2806
2831
|
(r) => r,
|
|
2807
2832
|
(error) => {
|
|
2808
2833
|
var _a;
|
|
2809
|
-
if (
|
|
2834
|
+
if (import_axios12.default.isAxiosError(error)) {
|
|
2810
2835
|
if (((_a = error.response) == null ? void 0 : _a.status) === 401) {
|
|
2811
2836
|
throw new UnauthorizeApiError("netlify");
|
|
2812
2837
|
}
|
|
@@ -2861,7 +2886,7 @@ var netlifyAccountApi = {
|
|
|
2861
2886
|
targetAccountId = yield this.getAccount(authorization);
|
|
2862
2887
|
}
|
|
2863
2888
|
if (!targetAccountId) {
|
|
2864
|
-
throw new
|
|
2889
|
+
throw new import_axios13.AxiosError("No account", "404");
|
|
2865
2890
|
}
|
|
2866
2891
|
const { data: envs } = yield netlifyClientInstance.get(
|
|
2867
2892
|
`/accounts/${encodeURIComponent(
|
|
@@ -2881,7 +2906,7 @@ var netlifyAccountApi = {
|
|
|
2881
2906
|
targetAccountId = yield this.getAccount(authorization);
|
|
2882
2907
|
}
|
|
2883
2908
|
if (!targetAccountId) {
|
|
2884
|
-
throw new
|
|
2909
|
+
throw new import_axios13.AxiosError("No account", "404");
|
|
2885
2910
|
}
|
|
2886
2911
|
const { data: envs } = yield netlifyClientInstance.get(
|
|
2887
2912
|
`/accounts/${encodeURIComponent(
|
|
@@ -2902,7 +2927,7 @@ var netlifyAccountApi = {
|
|
|
2902
2927
|
targetAccountId = yield this.getAccount(authorization);
|
|
2903
2928
|
}
|
|
2904
2929
|
if (!targetAccountId) {
|
|
2905
|
-
throw new
|
|
2930
|
+
throw new import_axios13.AxiosError("No account", "404");
|
|
2906
2931
|
}
|
|
2907
2932
|
if (!targetEnvs) {
|
|
2908
2933
|
const response = yield netlifyClientInstance.get(
|
|
@@ -2954,7 +2979,7 @@ var netlifyAccountApi = {
|
|
|
2954
2979
|
targetAccountId = yield this.getAccount(authorization);
|
|
2955
2980
|
}
|
|
2956
2981
|
if (!targetAccountId) {
|
|
2957
|
-
throw new
|
|
2982
|
+
throw new import_axios13.AxiosError("No account", "404");
|
|
2958
2983
|
}
|
|
2959
2984
|
yield netlifyClientInstance.delete(
|
|
2960
2985
|
`/accounts/${encodeURIComponent(
|
|
@@ -3271,7 +3296,7 @@ var netlifyApi = {
|
|
|
3271
3296
|
redirect_uri: redirectUri,
|
|
3272
3297
|
grant_type: "authorization_code"
|
|
3273
3298
|
});
|
|
3274
|
-
const response = yield
|
|
3299
|
+
const response = yield import_axios14.default.post(
|
|
3275
3300
|
"https://api.netlify.com/oauth/token",
|
|
3276
3301
|
data,
|
|
3277
3302
|
{
|
|
@@ -3289,11 +3314,11 @@ var netlifyApi = {
|
|
|
3289
3314
|
};
|
|
3290
3315
|
|
|
3291
3316
|
// src/apis/integrations/openai/api.ts
|
|
3292
|
-
var
|
|
3317
|
+
var import_axios15 = __toESM(require("axios"));
|
|
3293
3318
|
var openaiApi = {
|
|
3294
3319
|
verifyToken(token) {
|
|
3295
3320
|
return __async(this, null, function* () {
|
|
3296
|
-
const response = yield
|
|
3321
|
+
const response = yield import_axios15.default.get("https://api.openai.com/v1/models", {
|
|
3297
3322
|
headers: {
|
|
3298
3323
|
Authorization: `Bearer ${token}`
|
|
3299
3324
|
}
|
|
@@ -3304,11 +3329,11 @@ var openaiApi = {
|
|
|
3304
3329
|
};
|
|
3305
3330
|
|
|
3306
3331
|
// src/apis/integrations/planetscale/api.ts
|
|
3307
|
-
var
|
|
3332
|
+
var import_axios17 = __toESM(require("axios"));
|
|
3308
3333
|
|
|
3309
3334
|
// src/apis/integrations/planetscale/instance.ts
|
|
3310
|
-
var
|
|
3311
|
-
var planetScaleClientInstance =
|
|
3335
|
+
var import_axios16 = __toESM(require("axios"));
|
|
3336
|
+
var planetScaleClientInstance = import_axios16.default.create({
|
|
3312
3337
|
baseURL: "https://api.planetscale.com",
|
|
3313
3338
|
headers: {
|
|
3314
3339
|
"Content-Type": "application/json"
|
|
@@ -3318,7 +3343,7 @@ planetScaleClientInstance.interceptors.response.use(
|
|
|
3318
3343
|
(r) => r,
|
|
3319
3344
|
(error) => {
|
|
3320
3345
|
var _a;
|
|
3321
|
-
if (
|
|
3346
|
+
if (import_axios16.default.isAxiosError(error)) {
|
|
3322
3347
|
if (((_a = error.response) == null ? void 0 : _a.status) === 401) {
|
|
3323
3348
|
throw new UnauthorizeApiError("planetscale");
|
|
3324
3349
|
}
|
|
@@ -3533,7 +3558,7 @@ var planetscaleApi = {
|
|
|
3533
3558
|
redirect_uri: redirectUrl,
|
|
3534
3559
|
grant_type: "authorization_code"
|
|
3535
3560
|
});
|
|
3536
|
-
const response = yield
|
|
3561
|
+
const response = yield import_axios17.default.post(
|
|
3537
3562
|
`https://api.planetscale.com/v1/organizations/${encodeURIComponent(
|
|
3538
3563
|
organization
|
|
3539
3564
|
)}/oauth-applications/${encodeURIComponent(applicationId)}/token`,
|
|
@@ -3555,14 +3580,14 @@ var planetscaleApi = {
|
|
|
3555
3580
|
};
|
|
3556
3581
|
|
|
3557
3582
|
// src/apis/integrations/salesforce/api.ts
|
|
3558
|
-
var
|
|
3583
|
+
var import_axios18 = __toESM(require("axios"));
|
|
3559
3584
|
var salesforceApi = {
|
|
3560
3585
|
getUserInfo(_0) {
|
|
3561
3586
|
return __async(this, arguments, function* ({
|
|
3562
3587
|
token,
|
|
3563
3588
|
loginUrl
|
|
3564
3589
|
}) {
|
|
3565
|
-
const { data } = yield
|
|
3590
|
+
const { data } = yield import_axios18.default.get(
|
|
3566
3591
|
`${loginUrl}/services/oauth2/userinfo`,
|
|
3567
3592
|
{
|
|
3568
3593
|
headers: {
|
|
@@ -3584,10 +3609,10 @@ var salesforceApi = {
|
|
|
3584
3609
|
};
|
|
3585
3610
|
|
|
3586
3611
|
// src/apis/integrations/shopify/api.ts
|
|
3587
|
-
var
|
|
3612
|
+
var import_axios20 = __toESM(require("axios"));
|
|
3588
3613
|
|
|
3589
3614
|
// src/apis/integrations/shopify/instance.ts
|
|
3590
|
-
var
|
|
3615
|
+
var import_axios19 = __toESM(require("axios"));
|
|
3591
3616
|
function getShopifyClientAuthorization(req, authorization) {
|
|
3592
3617
|
var _a, _b;
|
|
3593
3618
|
const headerPrefix = "x-adapter-shopify";
|
|
@@ -3616,12 +3641,12 @@ var ShopifyApiError = class extends ApiErrorBase {
|
|
|
3616
3641
|
this.name = "shopify";
|
|
3617
3642
|
}
|
|
3618
3643
|
};
|
|
3619
|
-
var shopifyClientInstance =
|
|
3644
|
+
var shopifyClientInstance = import_axios19.default.create();
|
|
3620
3645
|
shopifyClientInstance.interceptors.response.use(
|
|
3621
3646
|
(r) => r,
|
|
3622
3647
|
(error) => {
|
|
3623
3648
|
var _a, _b, _c, _d;
|
|
3624
|
-
if (
|
|
3649
|
+
if (import_axios19.default.isAxiosError(error)) {
|
|
3625
3650
|
if (((_a = error.response) == null ? void 0 : _a.status) === 401) {
|
|
3626
3651
|
throw new UnauthorizeApiError("shopify");
|
|
3627
3652
|
}
|
|
@@ -3725,7 +3750,7 @@ var shopifyApi = {
|
|
|
3725
3750
|
redirect_uri: redirectUri,
|
|
3726
3751
|
grant_type: "authorization_code"
|
|
3727
3752
|
});
|
|
3728
|
-
const response = yield
|
|
3753
|
+
const response = yield import_axios20.default.post(
|
|
3729
3754
|
`https://${encodeURIComponent(
|
|
3730
3755
|
shop
|
|
3731
3756
|
)}.myshopify.com/admin/oauth/access_token`,
|
|
@@ -3745,7 +3770,7 @@ var shopifyApi = {
|
|
|
3745
3770
|
};
|
|
3746
3771
|
|
|
3747
3772
|
// src/apis/integrations/slack/instance.ts
|
|
3748
|
-
var
|
|
3773
|
+
var import_axios21 = __toESM(require("axios"));
|
|
3749
3774
|
var SlackApiError = class extends ApiErrorBase {
|
|
3750
3775
|
constructor() {
|
|
3751
3776
|
super(...arguments);
|
|
@@ -3771,7 +3796,7 @@ function getSlackClientAuthorization(req, authorization) {
|
|
|
3771
3796
|
token: req.headers[`${headerPrefix}-token`]
|
|
3772
3797
|
};
|
|
3773
3798
|
}
|
|
3774
|
-
var slackClientInstance =
|
|
3799
|
+
var slackClientInstance = import_axios21.default.create({
|
|
3775
3800
|
baseURL: "https://slack.com/api",
|
|
3776
3801
|
headers: {
|
|
3777
3802
|
"Content-Type": "application/json"
|
|
@@ -3790,7 +3815,7 @@ slackClientInstance.interceptors.response.use(
|
|
|
3790
3815
|
},
|
|
3791
3816
|
(error) => {
|
|
3792
3817
|
var _a, _b, _c, _d;
|
|
3793
|
-
if (
|
|
3818
|
+
if (import_axios21.default.isAxiosError(error)) {
|
|
3794
3819
|
if (((_a = error.response) == null ? void 0 : _a.status) === 401) {
|
|
3795
3820
|
throw new UnauthorizeApiError("slack");
|
|
3796
3821
|
}
|
|
@@ -3874,7 +3899,7 @@ var slackApi = {
|
|
|
3874
3899
|
};
|
|
3875
3900
|
|
|
3876
3901
|
// src/apis/integrations/text/instance.ts
|
|
3877
|
-
var
|
|
3902
|
+
var import_axios22 = __toESM(require("axios"));
|
|
3878
3903
|
function getTextClientAuthorization(req, authorization) {
|
|
3879
3904
|
var _a;
|
|
3880
3905
|
const headerPrefix = "x-adapter-text";
|
|
@@ -3903,14 +3928,14 @@ var TextApiError = class extends ApiErrorBase {
|
|
|
3903
3928
|
this.name = "text";
|
|
3904
3929
|
}
|
|
3905
3930
|
};
|
|
3906
|
-
var textClientInstance =
|
|
3931
|
+
var textClientInstance = import_axios22.default.create({
|
|
3907
3932
|
baseURL: "https://api.labs.text.com"
|
|
3908
3933
|
});
|
|
3909
3934
|
textClientInstance.interceptors.response.use(
|
|
3910
3935
|
(r) => r,
|
|
3911
3936
|
(error) => {
|
|
3912
3937
|
var _a, _b, _c, _d;
|
|
3913
|
-
if (
|
|
3938
|
+
if (import_axios22.default.isAxiosError(error)) {
|
|
3914
3939
|
if (((_a = error.response) == null ? void 0 : _a.status) === 401) {
|
|
3915
3940
|
throw new UnauthorizeApiError("text");
|
|
3916
3941
|
}
|
|
@@ -5115,7 +5140,7 @@ var textPlatformWorkflowsApi = {
|
|
|
5115
5140
|
};
|
|
5116
5141
|
|
|
5117
5142
|
// src/apis/integrations/vercel/instance.ts
|
|
5118
|
-
var
|
|
5143
|
+
var import_axios23 = __toESM(require("axios"));
|
|
5119
5144
|
function getVercelClientAuthorization(req, headerPrefix = "x-adapter-vercel") {
|
|
5120
5145
|
if (req.headers instanceof Headers) {
|
|
5121
5146
|
return {
|
|
@@ -5126,14 +5151,14 @@ function getVercelClientAuthorization(req, headerPrefix = "x-adapter-vercel") {
|
|
|
5126
5151
|
token: req.headers[`${headerPrefix}-token`]
|
|
5127
5152
|
};
|
|
5128
5153
|
}
|
|
5129
|
-
var vercelClientInstance =
|
|
5154
|
+
var vercelClientInstance = import_axios23.default.create({
|
|
5130
5155
|
baseURL: "https://api.vercel.com"
|
|
5131
5156
|
});
|
|
5132
5157
|
vercelClientInstance.interceptors.response.use(
|
|
5133
5158
|
(r) => r,
|
|
5134
5159
|
(error) => {
|
|
5135
5160
|
var _a, _b;
|
|
5136
|
-
if (
|
|
5161
|
+
if (import_axios23.default.isAxiosError(error)) {
|
|
5137
5162
|
if (((_a = error.response) == null ? void 0 : _a.status) === 401 || ((_b = error.response) == null ? void 0 : _b.status) === 403) {
|
|
5138
5163
|
throw new UnauthorizeApiError("vercel");
|
|
5139
5164
|
}
|
|
@@ -5207,8 +5232,8 @@ function initPlatformAccountsClient(baseUrl, token) {
|
|
|
5207
5232
|
}
|
|
5208
5233
|
|
|
5209
5234
|
// src/apis/platform/billing/instance.ts
|
|
5210
|
-
var
|
|
5211
|
-
var billingClientInstance =
|
|
5235
|
+
var import_axios24 = __toESM(require("axios"));
|
|
5236
|
+
var billingClientInstance = import_axios24.default.create({
|
|
5212
5237
|
baseURL: "https://billing.labs.livechatinc.com"
|
|
5213
5238
|
});
|
|
5214
5239
|
function getBillingClientConfig(options = {}) {
|
|
@@ -5275,7 +5300,7 @@ var cdpCustomerEventMessageZod = import_zod12.z.discriminatedUnion("type", [
|
|
|
5275
5300
|
]);
|
|
5276
5301
|
|
|
5277
5302
|
// src/apis/platform/console/instance.ts
|
|
5278
|
-
var
|
|
5303
|
+
var import_axios25 = __toESM(require("axios"));
|
|
5279
5304
|
var REGION = {
|
|
5280
5305
|
FRA: "fra",
|
|
5281
5306
|
DAL: "dal",
|
|
@@ -5305,7 +5330,7 @@ var ConsoleApiError = class _ConsoleApiError extends ApiErrorBase {
|
|
|
5305
5330
|
);
|
|
5306
5331
|
}
|
|
5307
5332
|
};
|
|
5308
|
-
var consoleClientInstance =
|
|
5333
|
+
var consoleClientInstance = import_axios25.default.create({
|
|
5309
5334
|
baseURL: "https://platform.labs.text.com/console/api",
|
|
5310
5335
|
headers: {
|
|
5311
5336
|
"Content-Type": "application/json"
|
|
@@ -5484,14 +5509,14 @@ var getAppAutoReviewPayload = (value) => {
|
|
|
5484
5509
|
};
|
|
5485
5510
|
|
|
5486
5511
|
// src/apis/platform/dps/instance.ts
|
|
5487
|
-
var
|
|
5512
|
+
var import_axios26 = __toESM(require("axios"));
|
|
5488
5513
|
var DpsApiError = class extends ApiErrorBase {
|
|
5489
5514
|
constructor() {
|
|
5490
5515
|
super(...arguments);
|
|
5491
5516
|
this.name = "dps";
|
|
5492
5517
|
}
|
|
5493
5518
|
};
|
|
5494
|
-
var dpsClientInstance =
|
|
5519
|
+
var dpsClientInstance = import_axios26.default.create({
|
|
5495
5520
|
baseURL: "https://dev-platform.labs.livechatinc.com"
|
|
5496
5521
|
});
|
|
5497
5522
|
dpsClientInstance.interceptors.response.use(
|
|
@@ -5540,14 +5565,14 @@ function initDpsClient(baseUrl, token) {
|
|
|
5540
5565
|
}
|
|
5541
5566
|
|
|
5542
5567
|
// src/apis/products/helpdesk/instance.ts
|
|
5543
|
-
var
|
|
5568
|
+
var import_axios27 = __toESM(require("axios"));
|
|
5544
5569
|
var HelpDeskApiError = class extends ApiErrorBase {
|
|
5545
5570
|
constructor() {
|
|
5546
5571
|
super(...arguments);
|
|
5547
5572
|
this.name = "helpdesk";
|
|
5548
5573
|
}
|
|
5549
5574
|
};
|
|
5550
|
-
var helpdeskClientInstance =
|
|
5575
|
+
var helpdeskClientInstance = import_axios27.default.create({
|
|
5551
5576
|
baseURL: "https://api.labs.helpdesk.com"
|
|
5552
5577
|
});
|
|
5553
5578
|
helpdeskClientInstance.interceptors.response.use(
|
|
@@ -5646,7 +5671,7 @@ var LivechatWebhookSystemMessages = /* @__PURE__ */ ((LivechatWebhookSystemMessa
|
|
|
5646
5671
|
})(LivechatWebhookSystemMessages || {});
|
|
5647
5672
|
|
|
5648
5673
|
// src/apis/products/livechat/instance.ts
|
|
5649
|
-
var
|
|
5674
|
+
var import_axios28 = __toESM(require("axios"));
|
|
5650
5675
|
var REGION2 = {
|
|
5651
5676
|
FRA: "fra",
|
|
5652
5677
|
DAL: "dal",
|
|
@@ -5666,7 +5691,7 @@ var LivechatApiError = class extends ApiErrorBase {
|
|
|
5666
5691
|
this.name = "livechat";
|
|
5667
5692
|
}
|
|
5668
5693
|
};
|
|
5669
|
-
var livechatClientInstance =
|
|
5694
|
+
var livechatClientInstance = import_axios28.default.create({
|
|
5670
5695
|
baseURL: "https://api.labs.livechatinc.com"
|
|
5671
5696
|
});
|
|
5672
5697
|
livechatClientInstance.interceptors.response.use(
|
|
@@ -5831,7 +5856,7 @@ var integrationSubscriptionRequestZods = {
|
|
|
5831
5856
|
};
|
|
5832
5857
|
|
|
5833
5858
|
// src/apis/text-intelligence/workflows/adapter/instance.ts
|
|
5834
|
-
var
|
|
5859
|
+
var import_axios29 = __toESM(require("axios"));
|
|
5835
5860
|
var REGION3 = {
|
|
5836
5861
|
FRA: "fra",
|
|
5837
5862
|
DAL: "dal",
|
|
@@ -5861,7 +5886,7 @@ var AdapterApiError = class _AdapterApiError extends ApiErrorBase {
|
|
|
5861
5886
|
);
|
|
5862
5887
|
}
|
|
5863
5888
|
};
|
|
5864
|
-
var adapterClientInstance =
|
|
5889
|
+
var adapterClientInstance = import_axios29.default.create({
|
|
5865
5890
|
baseURL: "https://platform.labs.text.com/console-adapter/api",
|
|
5866
5891
|
headers: {
|
|
5867
5892
|
"Content-Type": "application/json"
|
|
@@ -6022,7 +6047,7 @@ function updateAdapterClient(tokens) {
|
|
|
6022
6047
|
}
|
|
6023
6048
|
|
|
6024
6049
|
// src/apis/text-intelligence/workflows/workflow/instance.ts
|
|
6025
|
-
var
|
|
6050
|
+
var import_axios30 = __toESM(require("axios"));
|
|
6026
6051
|
var REGION4 = {
|
|
6027
6052
|
FRA: "fra",
|
|
6028
6053
|
DAL: "dal",
|
|
@@ -6052,7 +6077,7 @@ var WorkflowsApiError = class _WorkflowsApiError extends ApiErrorBase {
|
|
|
6052
6077
|
);
|
|
6053
6078
|
}
|
|
6054
6079
|
};
|
|
6055
|
-
var workflowsClientInstance =
|
|
6080
|
+
var workflowsClientInstance = import_axios30.default.create({
|
|
6056
6081
|
baseURL: "https://platform.labs.text.com/workflows/api",
|
|
6057
6082
|
headers: {
|
|
6058
6083
|
"Content-Type": "application/json"
|
|
@@ -6301,7 +6326,7 @@ var textApi = {
|
|
|
6301
6326
|
};
|
|
6302
6327
|
|
|
6303
6328
|
// src/apis/integrations/vercel/api.ts
|
|
6304
|
-
var
|
|
6329
|
+
var import_axios31 = __toESM(require("axios"));
|
|
6305
6330
|
|
|
6306
6331
|
// src/apis/integrations/vercel/deploy/api.ts
|
|
6307
6332
|
var vercelDeployApi = {
|
|
@@ -6565,7 +6590,7 @@ var vercelApi = {
|
|
|
6565
6590
|
client_secret: clientSecret,
|
|
6566
6591
|
redirect_uri: redirectUrl
|
|
6567
6592
|
});
|
|
6568
|
-
const response = yield
|
|
6593
|
+
const response = yield import_axios31.default.post("https://api.vercel.com/v2/oauth/access_token", data, {
|
|
6569
6594
|
headers: {
|
|
6570
6595
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
6571
6596
|
}
|
|
@@ -6594,7 +6619,8 @@ var integrationsApi = {
|
|
|
6594
6619
|
openai: openaiApi,
|
|
6595
6620
|
text: textApi,
|
|
6596
6621
|
slack: slackApi,
|
|
6597
|
-
salesforce: salesforceApi
|
|
6622
|
+
salesforce: salesforceApi,
|
|
6623
|
+
klaviyo: klaviyoApi
|
|
6598
6624
|
};
|
|
6599
6625
|
|
|
6600
6626
|
// src/apis/platform/accounts/accounts/api.ts
|