@livechat/developer-studio-api 5.2.0-beta.v3 → 5.3.0-beta.v1
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-NCXZIYUE.mjs → chunk-WMWSKU4M.mjs} +85 -60
- package/dist/{events-DluLBHoq.d.mts → events-DAbR7Qk8.d.mts} +203 -179
- package/dist/{events-DluLBHoq.d.ts → events-DAbR7Qk8.d.ts} +203 -179
- package/dist/index.d.mts +43 -36
- package/dist/index.d.ts +43 -36
- package/dist/index.js +90 -65
- package/dist/index.mjs +1 -1
- package/dist/workflow-contracts.d.mts +1 -1
- package/dist/workflow-contracts.d.ts +1 -1
- package/dist/workflow-contracts.js +53 -50
- package/dist/workflow-contracts.mjs +1 -1
- package/package.json +1 -1
|
@@ -462,7 +462,7 @@ var API_NOTIFICATIONS = {
|
|
|
462
462
|
};
|
|
463
463
|
|
|
464
464
|
// src/apis/integrations/text/instance.ts
|
|
465
|
-
import
|
|
465
|
+
import axios29 from "axios";
|
|
466
466
|
|
|
467
467
|
// src/types/api/client.ts
|
|
468
468
|
var ApiClient = class {
|
|
@@ -1528,11 +1528,35 @@ var hubspotApi = {
|
|
|
1528
1528
|
}
|
|
1529
1529
|
};
|
|
1530
1530
|
|
|
1531
|
+
// src/apis/integrations/klaviyo/api.ts
|
|
1532
|
+
import axios6 from "axios";
|
|
1533
|
+
var KLAVIYO_API_REVISION = "2025-07-15";
|
|
1534
|
+
var klaviyoApi = {
|
|
1535
|
+
getAccount(_0) {
|
|
1536
|
+
return __async(this, arguments, function* ({ token }) {
|
|
1537
|
+
var _a, _b, _c, _d;
|
|
1538
|
+
const { data } = yield axios6.get(
|
|
1539
|
+
"https://a.klaviyo.com/api/accounts/",
|
|
1540
|
+
{
|
|
1541
|
+
headers: {
|
|
1542
|
+
Authorization: `Bearer ${token}`,
|
|
1543
|
+
revision: KLAVIYO_API_REVISION
|
|
1544
|
+
}
|
|
1545
|
+
}
|
|
1546
|
+
);
|
|
1547
|
+
const contactInformationEmail = (_d = (_c = (_b = (_a = data.data) == null ? void 0 : _a[0]) == null ? void 0 : _b.attributes) == null ? void 0 : _c.contact_information) == null ? void 0 : _d.default_sender_email;
|
|
1548
|
+
return {
|
|
1549
|
+
email: contactInformationEmail
|
|
1550
|
+
};
|
|
1551
|
+
});
|
|
1552
|
+
}
|
|
1553
|
+
};
|
|
1554
|
+
|
|
1531
1555
|
// src/apis/integrations/mailchimp/api.ts
|
|
1532
|
-
import
|
|
1556
|
+
import axios8 from "axios";
|
|
1533
1557
|
|
|
1534
1558
|
// src/apis/integrations/mailchimp/instance.ts
|
|
1535
|
-
import
|
|
1559
|
+
import axios7 from "axios";
|
|
1536
1560
|
function getMailchimpClientAuthorization(req, authorization) {
|
|
1537
1561
|
var _a, _b;
|
|
1538
1562
|
const headerPrefix = "x-adapter-mailchimp";
|
|
@@ -1562,7 +1586,7 @@ var MailchimpApiError = class extends ApiErrorBase {
|
|
|
1562
1586
|
}
|
|
1563
1587
|
};
|
|
1564
1588
|
var getMailchimpClientUrl = (server) => `https://${server}.api.mailchimp.com/3.0`;
|
|
1565
|
-
var mailchimpClientInstance =
|
|
1589
|
+
var mailchimpClientInstance = axios7.create({
|
|
1566
1590
|
headers: {
|
|
1567
1591
|
"Content-Type": "application/json"
|
|
1568
1592
|
}
|
|
@@ -1571,7 +1595,7 @@ mailchimpClientInstance.interceptors.response.use(
|
|
|
1571
1595
|
(r) => r,
|
|
1572
1596
|
(error) => {
|
|
1573
1597
|
var _a, _b, _c, _d;
|
|
1574
|
-
if (
|
|
1598
|
+
if (axios7.isAxiosError(error)) {
|
|
1575
1599
|
if (((_a = error.response) == null ? void 0 : _a.status) === 401) {
|
|
1576
1600
|
throw new UnauthorizeApiError("mailchimp");
|
|
1577
1601
|
}
|
|
@@ -1676,7 +1700,7 @@ var mailchimpApi = {
|
|
|
1676
1700
|
redirect_uri: redirectUri,
|
|
1677
1701
|
grant_type: "authorization_code"
|
|
1678
1702
|
});
|
|
1679
|
-
const tokenResponse = yield
|
|
1703
|
+
const tokenResponse = yield axios8.post(
|
|
1680
1704
|
"https://login.mailchimp.com/oauth2/token",
|
|
1681
1705
|
data,
|
|
1682
1706
|
{
|
|
@@ -1696,7 +1720,7 @@ var mailchimpApi = {
|
|
|
1696
1720
|
getMetadata(_0) {
|
|
1697
1721
|
return __async(this, arguments, function* ({ token }) {
|
|
1698
1722
|
var _a, _b, _c, _d;
|
|
1699
|
-
const { data } = yield
|
|
1723
|
+
const { data } = yield axios8.get("https://login.mailchimp.com/oauth2/metadata", {
|
|
1700
1724
|
headers: {
|
|
1701
1725
|
"Content-Type": "application/json",
|
|
1702
1726
|
Authorization: `OAuth ${token}`
|
|
@@ -1712,11 +1736,11 @@ var mailchimpApi = {
|
|
|
1712
1736
|
};
|
|
1713
1737
|
|
|
1714
1738
|
// src/apis/integrations/neon/api.ts
|
|
1715
|
-
import
|
|
1739
|
+
import axios10 from "axios";
|
|
1716
1740
|
|
|
1717
1741
|
// src/apis/integrations/neon/instance.ts
|
|
1718
|
-
import
|
|
1719
|
-
var neonClientInstance =
|
|
1742
|
+
import axios9 from "axios";
|
|
1743
|
+
var neonClientInstance = axios9.create({
|
|
1720
1744
|
baseURL: "https://console.neon.tech/api/v2",
|
|
1721
1745
|
headers: {
|
|
1722
1746
|
"Content-Type": "application/json"
|
|
@@ -1726,7 +1750,7 @@ neonClientInstance.interceptors.response.use(
|
|
|
1726
1750
|
(r) => r,
|
|
1727
1751
|
(error) => {
|
|
1728
1752
|
var _a;
|
|
1729
|
-
if (
|
|
1753
|
+
if (axios9.isAxiosError(error)) {
|
|
1730
1754
|
if (((_a = error.response) == null ? void 0 : _a.status) === 401) {
|
|
1731
1755
|
throw new UnauthorizeApiError("neon");
|
|
1732
1756
|
}
|
|
@@ -2003,7 +2027,7 @@ var neonApi = {
|
|
|
2003
2027
|
redirect_uri: redirectUri,
|
|
2004
2028
|
grant_type: "authorization_code"
|
|
2005
2029
|
});
|
|
2006
|
-
const response = yield
|
|
2030
|
+
const response = yield axios10.post(
|
|
2007
2031
|
"https://oauth2.neon.tech/oauth2/token",
|
|
2008
2032
|
data,
|
|
2009
2033
|
{
|
|
@@ -2028,7 +2052,7 @@ var neonApi = {
|
|
|
2028
2052
|
client_secret: clientSecret,
|
|
2029
2053
|
grant_type: "refresh_token"
|
|
2030
2054
|
});
|
|
2031
|
-
const response = yield
|
|
2055
|
+
const response = yield axios10.post("https://oauth2.neon.tech/oauth2/token", data, {
|
|
2032
2056
|
headers: {
|
|
2033
2057
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
2034
2058
|
}
|
|
@@ -2043,13 +2067,13 @@ var neonApi = {
|
|
|
2043
2067
|
};
|
|
2044
2068
|
|
|
2045
2069
|
// src/apis/integrations/netlify/api.ts
|
|
2046
|
-
import
|
|
2070
|
+
import axios12 from "axios";
|
|
2047
2071
|
|
|
2048
2072
|
// src/apis/integrations/netlify/account/api.ts
|
|
2049
2073
|
import { AxiosError as AxiosError2 } from "axios";
|
|
2050
2074
|
|
|
2051
2075
|
// src/apis/integrations/netlify/instance.ts
|
|
2052
|
-
import
|
|
2076
|
+
import axios11 from "axios";
|
|
2053
2077
|
function getNetlifyClientAuthorization(req, headerPrefix = "x-adapter-netlify-token") {
|
|
2054
2078
|
if (req.headers instanceof Headers) {
|
|
2055
2079
|
return {
|
|
@@ -2060,7 +2084,7 @@ function getNetlifyClientAuthorization(req, headerPrefix = "x-adapter-netlify-to
|
|
|
2060
2084
|
token: req.headers[`${headerPrefix}-token`]
|
|
2061
2085
|
};
|
|
2062
2086
|
}
|
|
2063
|
-
var netlifyClientInstance =
|
|
2087
|
+
var netlifyClientInstance = axios11.create({
|
|
2064
2088
|
baseURL: "https://api.netlify.com/api/v1",
|
|
2065
2089
|
headers: {
|
|
2066
2090
|
"Content-Type": "application/json"
|
|
@@ -2070,7 +2094,7 @@ netlifyClientInstance.interceptors.response.use(
|
|
|
2070
2094
|
(r) => r,
|
|
2071
2095
|
(error) => {
|
|
2072
2096
|
var _a;
|
|
2073
|
-
if (
|
|
2097
|
+
if (axios11.isAxiosError(error)) {
|
|
2074
2098
|
if (((_a = error.response) == null ? void 0 : _a.status) === 401) {
|
|
2075
2099
|
throw new UnauthorizeApiError("netlify");
|
|
2076
2100
|
}
|
|
@@ -2535,7 +2559,7 @@ var netlifyApi = {
|
|
|
2535
2559
|
redirect_uri: redirectUri,
|
|
2536
2560
|
grant_type: "authorization_code"
|
|
2537
2561
|
});
|
|
2538
|
-
const response = yield
|
|
2562
|
+
const response = yield axios12.post(
|
|
2539
2563
|
"https://api.netlify.com/oauth/token",
|
|
2540
2564
|
data,
|
|
2541
2565
|
{
|
|
@@ -2553,11 +2577,11 @@ var netlifyApi = {
|
|
|
2553
2577
|
};
|
|
2554
2578
|
|
|
2555
2579
|
// src/apis/integrations/openai/api.ts
|
|
2556
|
-
import
|
|
2580
|
+
import axios13 from "axios";
|
|
2557
2581
|
var openaiApi = {
|
|
2558
2582
|
verifyToken(token) {
|
|
2559
2583
|
return __async(this, null, function* () {
|
|
2560
|
-
const response = yield
|
|
2584
|
+
const response = yield axios13.get("https://api.openai.com/v1/models", {
|
|
2561
2585
|
headers: {
|
|
2562
2586
|
Authorization: `Bearer ${token}`
|
|
2563
2587
|
}
|
|
@@ -2568,11 +2592,11 @@ var openaiApi = {
|
|
|
2568
2592
|
};
|
|
2569
2593
|
|
|
2570
2594
|
// src/apis/integrations/planetscale/api.ts
|
|
2571
|
-
import
|
|
2595
|
+
import axios15 from "axios";
|
|
2572
2596
|
|
|
2573
2597
|
// src/apis/integrations/planetscale/instance.ts
|
|
2574
|
-
import
|
|
2575
|
-
var planetScaleClientInstance =
|
|
2598
|
+
import axios14 from "axios";
|
|
2599
|
+
var planetScaleClientInstance = axios14.create({
|
|
2576
2600
|
baseURL: "https://api.planetscale.com",
|
|
2577
2601
|
headers: {
|
|
2578
2602
|
"Content-Type": "application/json"
|
|
@@ -2582,7 +2606,7 @@ planetScaleClientInstance.interceptors.response.use(
|
|
|
2582
2606
|
(r) => r,
|
|
2583
2607
|
(error) => {
|
|
2584
2608
|
var _a;
|
|
2585
|
-
if (
|
|
2609
|
+
if (axios14.isAxiosError(error)) {
|
|
2586
2610
|
if (((_a = error.response) == null ? void 0 : _a.status) === 401) {
|
|
2587
2611
|
throw new UnauthorizeApiError("planetscale");
|
|
2588
2612
|
}
|
|
@@ -2797,7 +2821,7 @@ var planetscaleApi = {
|
|
|
2797
2821
|
redirect_uri: redirectUrl,
|
|
2798
2822
|
grant_type: "authorization_code"
|
|
2799
2823
|
});
|
|
2800
|
-
const response = yield
|
|
2824
|
+
const response = yield axios15.post(
|
|
2801
2825
|
`https://api.planetscale.com/v1/organizations/${encodeURIComponent(
|
|
2802
2826
|
organization
|
|
2803
2827
|
)}/oauth-applications/${encodeURIComponent(applicationId)}/token`,
|
|
@@ -2819,14 +2843,14 @@ var planetscaleApi = {
|
|
|
2819
2843
|
};
|
|
2820
2844
|
|
|
2821
2845
|
// src/apis/integrations/salesforce/api.ts
|
|
2822
|
-
import
|
|
2846
|
+
import axios16 from "axios";
|
|
2823
2847
|
var salesforceApi = {
|
|
2824
2848
|
getUserInfo(_0) {
|
|
2825
2849
|
return __async(this, arguments, function* ({
|
|
2826
2850
|
token,
|
|
2827
2851
|
loginUrl
|
|
2828
2852
|
}) {
|
|
2829
|
-
const { data } = yield
|
|
2853
|
+
const { data } = yield axios16.get(
|
|
2830
2854
|
`${loginUrl}/services/oauth2/userinfo`,
|
|
2831
2855
|
{
|
|
2832
2856
|
headers: {
|
|
@@ -2848,10 +2872,10 @@ var salesforceApi = {
|
|
|
2848
2872
|
};
|
|
2849
2873
|
|
|
2850
2874
|
// src/apis/integrations/shopify/api.ts
|
|
2851
|
-
import
|
|
2875
|
+
import axios18 from "axios";
|
|
2852
2876
|
|
|
2853
2877
|
// src/apis/integrations/shopify/instance.ts
|
|
2854
|
-
import
|
|
2878
|
+
import axios17 from "axios";
|
|
2855
2879
|
function getShopifyClientAuthorization(req, authorization) {
|
|
2856
2880
|
var _a, _b;
|
|
2857
2881
|
const headerPrefix = "x-adapter-shopify";
|
|
@@ -2880,12 +2904,12 @@ var ShopifyApiError = class extends ApiErrorBase {
|
|
|
2880
2904
|
this.name = "shopify";
|
|
2881
2905
|
}
|
|
2882
2906
|
};
|
|
2883
|
-
var shopifyClientInstance =
|
|
2907
|
+
var shopifyClientInstance = axios17.create();
|
|
2884
2908
|
shopifyClientInstance.interceptors.response.use(
|
|
2885
2909
|
(r) => r,
|
|
2886
2910
|
(error) => {
|
|
2887
2911
|
var _a, _b, _c, _d;
|
|
2888
|
-
if (
|
|
2912
|
+
if (axios17.isAxiosError(error)) {
|
|
2889
2913
|
if (((_a = error.response) == null ? void 0 : _a.status) === 401) {
|
|
2890
2914
|
throw new UnauthorizeApiError("shopify");
|
|
2891
2915
|
}
|
|
@@ -2989,7 +3013,7 @@ var shopifyApi = {
|
|
|
2989
3013
|
redirect_uri: redirectUri,
|
|
2990
3014
|
grant_type: "authorization_code"
|
|
2991
3015
|
});
|
|
2992
|
-
const response = yield
|
|
3016
|
+
const response = yield axios18.post(
|
|
2993
3017
|
`https://${encodeURIComponent(
|
|
2994
3018
|
shop
|
|
2995
3019
|
)}.myshopify.com/admin/oauth/access_token`,
|
|
@@ -3009,7 +3033,7 @@ var shopifyApi = {
|
|
|
3009
3033
|
};
|
|
3010
3034
|
|
|
3011
3035
|
// src/apis/integrations/slack/instance.ts
|
|
3012
|
-
import
|
|
3036
|
+
import axios19 from "axios";
|
|
3013
3037
|
var SlackApiError = class extends ApiErrorBase {
|
|
3014
3038
|
constructor() {
|
|
3015
3039
|
super(...arguments);
|
|
@@ -3035,7 +3059,7 @@ function getSlackClientAuthorization(req, authorization) {
|
|
|
3035
3059
|
token: req.headers[`${headerPrefix}-token`]
|
|
3036
3060
|
};
|
|
3037
3061
|
}
|
|
3038
|
-
var slackClientInstance =
|
|
3062
|
+
var slackClientInstance = axios19.create({
|
|
3039
3063
|
baseURL: "https://slack.com/api",
|
|
3040
3064
|
headers: {
|
|
3041
3065
|
"Content-Type": "application/json"
|
|
@@ -3054,7 +3078,7 @@ slackClientInstance.interceptors.response.use(
|
|
|
3054
3078
|
},
|
|
3055
3079
|
(error) => {
|
|
3056
3080
|
var _a, _b, _c, _d;
|
|
3057
|
-
if (
|
|
3081
|
+
if (axios19.isAxiosError(error)) {
|
|
3058
3082
|
if (((_a = error.response) == null ? void 0 : _a.status) === 401) {
|
|
3059
3083
|
throw new UnauthorizeApiError("slack");
|
|
3060
3084
|
}
|
|
@@ -3555,7 +3579,7 @@ var SlackMessageEventSubTypes = /* @__PURE__ */ ((SlackMessageEventSubTypes2) =>
|
|
|
3555
3579
|
})(SlackMessageEventSubTypes || {});
|
|
3556
3580
|
|
|
3557
3581
|
// src/apis/integrations/vercel/instance.ts
|
|
3558
|
-
import
|
|
3582
|
+
import axios20 from "axios";
|
|
3559
3583
|
function getVercelClientAuthorization(req, headerPrefix = "x-adapter-vercel") {
|
|
3560
3584
|
if (req.headers instanceof Headers) {
|
|
3561
3585
|
return {
|
|
@@ -3566,14 +3590,14 @@ function getVercelClientAuthorization(req, headerPrefix = "x-adapter-vercel") {
|
|
|
3566
3590
|
token: req.headers[`${headerPrefix}-token`]
|
|
3567
3591
|
};
|
|
3568
3592
|
}
|
|
3569
|
-
var vercelClientInstance =
|
|
3593
|
+
var vercelClientInstance = axios20.create({
|
|
3570
3594
|
baseURL: "https://api.vercel.com"
|
|
3571
3595
|
});
|
|
3572
3596
|
vercelClientInstance.interceptors.response.use(
|
|
3573
3597
|
(r) => r,
|
|
3574
3598
|
(error) => {
|
|
3575
3599
|
var _a, _b;
|
|
3576
|
-
if (
|
|
3600
|
+
if (axios20.isAxiosError(error)) {
|
|
3577
3601
|
if (((_a = error.response) == null ? void 0 : _a.status) === 401 || ((_b = error.response) == null ? void 0 : _b.status) === 403) {
|
|
3578
3602
|
throw new UnauthorizeApiError("vercel");
|
|
3579
3603
|
}
|
|
@@ -3647,8 +3671,8 @@ function initPlatformAccountsClient(baseUrl, token) {
|
|
|
3647
3671
|
}
|
|
3648
3672
|
|
|
3649
3673
|
// src/apis/platform/billing/instance.ts
|
|
3650
|
-
import
|
|
3651
|
-
var billingClientInstance =
|
|
3674
|
+
import axios21 from "axios";
|
|
3675
|
+
var billingClientInstance = axios21.create({
|
|
3652
3676
|
baseURL: "https://billing.labs.livechatinc.com"
|
|
3653
3677
|
});
|
|
3654
3678
|
function getBillingClientConfig(options = {}) {
|
|
@@ -3715,7 +3739,7 @@ var cdpCustomerEventMessageZod = z.discriminatedUnion("type", [
|
|
|
3715
3739
|
]);
|
|
3716
3740
|
|
|
3717
3741
|
// src/apis/platform/console/instance.ts
|
|
3718
|
-
import
|
|
3742
|
+
import axios22 from "axios";
|
|
3719
3743
|
var REGION = {
|
|
3720
3744
|
FRA: "fra",
|
|
3721
3745
|
DAL: "dal",
|
|
@@ -3745,7 +3769,7 @@ var ConsoleApiError = class _ConsoleApiError extends ApiErrorBase {
|
|
|
3745
3769
|
);
|
|
3746
3770
|
}
|
|
3747
3771
|
};
|
|
3748
|
-
var consoleClientInstance =
|
|
3772
|
+
var consoleClientInstance = axios22.create({
|
|
3749
3773
|
baseURL: "https://platform.labs.text.com/console/api",
|
|
3750
3774
|
headers: {
|
|
3751
3775
|
"Content-Type": "application/json"
|
|
@@ -3924,14 +3948,14 @@ var getAppAutoReviewPayload = (value) => {
|
|
|
3924
3948
|
};
|
|
3925
3949
|
|
|
3926
3950
|
// src/apis/platform/dps/instance.ts
|
|
3927
|
-
import
|
|
3951
|
+
import axios23 from "axios";
|
|
3928
3952
|
var DpsApiError = class extends ApiErrorBase {
|
|
3929
3953
|
constructor() {
|
|
3930
3954
|
super(...arguments);
|
|
3931
3955
|
this.name = "dps";
|
|
3932
3956
|
}
|
|
3933
3957
|
};
|
|
3934
|
-
var dpsClientInstance =
|
|
3958
|
+
var dpsClientInstance = axios23.create({
|
|
3935
3959
|
baseURL: "https://dev-platform.labs.livechatinc.com"
|
|
3936
3960
|
});
|
|
3937
3961
|
dpsClientInstance.interceptors.response.use(
|
|
@@ -3997,14 +4021,14 @@ var TicketPriority = /* @__PURE__ */ ((TicketPriority2) => {
|
|
|
3997
4021
|
})(TicketPriority || {});
|
|
3998
4022
|
|
|
3999
4023
|
// src/apis/products/helpdesk/instance.ts
|
|
4000
|
-
import
|
|
4024
|
+
import axios24 from "axios";
|
|
4001
4025
|
var HelpDeskApiError = class extends ApiErrorBase {
|
|
4002
4026
|
constructor() {
|
|
4003
4027
|
super(...arguments);
|
|
4004
4028
|
this.name = "helpdesk";
|
|
4005
4029
|
}
|
|
4006
4030
|
};
|
|
4007
|
-
var helpdeskClientInstance =
|
|
4031
|
+
var helpdeskClientInstance = axios24.create({
|
|
4008
4032
|
baseURL: "https://api.labs.helpdesk.com"
|
|
4009
4033
|
});
|
|
4010
4034
|
helpdeskClientInstance.interceptors.response.use(
|
|
@@ -4103,7 +4127,7 @@ var LivechatWebhookSystemMessages = /* @__PURE__ */ ((LivechatWebhookSystemMessa
|
|
|
4103
4127
|
})(LivechatWebhookSystemMessages || {});
|
|
4104
4128
|
|
|
4105
4129
|
// src/apis/products/livechat/instance.ts
|
|
4106
|
-
import
|
|
4130
|
+
import axios25 from "axios";
|
|
4107
4131
|
var REGION2 = {
|
|
4108
4132
|
FRA: "fra",
|
|
4109
4133
|
DAL: "dal",
|
|
@@ -4123,7 +4147,7 @@ var LivechatApiError = class extends ApiErrorBase {
|
|
|
4123
4147
|
this.name = "livechat";
|
|
4124
4148
|
}
|
|
4125
4149
|
};
|
|
4126
|
-
var livechatClientInstance =
|
|
4150
|
+
var livechatClientInstance = axios25.create({
|
|
4127
4151
|
baseURL: "https://api.labs.livechatinc.com"
|
|
4128
4152
|
});
|
|
4129
4153
|
livechatClientInstance.interceptors.response.use(
|
|
@@ -4288,7 +4312,7 @@ var integrationSubscriptionRequestZods = {
|
|
|
4288
4312
|
};
|
|
4289
4313
|
|
|
4290
4314
|
// src/apis/text-intelligence/workflows/adapter/instance.ts
|
|
4291
|
-
import
|
|
4315
|
+
import axios26 from "axios";
|
|
4292
4316
|
var REGION3 = {
|
|
4293
4317
|
FRA: "fra",
|
|
4294
4318
|
DAL: "dal",
|
|
@@ -4318,7 +4342,7 @@ var AdapterApiError = class _AdapterApiError extends ApiErrorBase {
|
|
|
4318
4342
|
);
|
|
4319
4343
|
}
|
|
4320
4344
|
};
|
|
4321
|
-
var adapterClientInstance =
|
|
4345
|
+
var adapterClientInstance = axios26.create({
|
|
4322
4346
|
baseURL: "https://platform.labs.text.com/console-adapter/api",
|
|
4323
4347
|
headers: {
|
|
4324
4348
|
"Content-Type": "application/json"
|
|
@@ -4898,7 +4922,7 @@ var textCustomerEventsZods = {
|
|
|
4898
4922
|
properties: z12.array(
|
|
4899
4923
|
z12.object({
|
|
4900
4924
|
id: z12.string().min(1),
|
|
4901
|
-
to: z12.union([z12.string(), z12.number(), z12.boolean()]).
|
|
4925
|
+
to: z12.union([z12.string(), z12.number(), z12.boolean()]).nullish()
|
|
4902
4926
|
})
|
|
4903
4927
|
).optional()
|
|
4904
4928
|
})
|
|
@@ -4996,8 +5020,8 @@ var textHelpDeskEventsZods = {
|
|
|
4996
5020
|
customFields: z13.array(
|
|
4997
5021
|
z13.object({
|
|
4998
5022
|
id: z13.string().min(1),
|
|
4999
|
-
from: z13.string().min(1).
|
|
5000
|
-
to: z13.string().min(1).
|
|
5023
|
+
from: z13.string().min(1).nullish(),
|
|
5024
|
+
to: z13.string().min(1).nullish()
|
|
5001
5025
|
})
|
|
5002
5026
|
).optional()
|
|
5003
5027
|
}).extend(baseFiltersZod.shape),
|
|
@@ -5282,7 +5306,7 @@ var integrationEventsZods = {
|
|
|
5282
5306
|
};
|
|
5283
5307
|
|
|
5284
5308
|
// src/apis/text-intelligence/workflows/workflow/instance.ts
|
|
5285
|
-
import
|
|
5309
|
+
import axios27 from "axios";
|
|
5286
5310
|
var REGION4 = {
|
|
5287
5311
|
FRA: "fra",
|
|
5288
5312
|
DAL: "dal",
|
|
@@ -5312,7 +5336,7 @@ var WorkflowsApiError = class _WorkflowsApiError extends ApiErrorBase {
|
|
|
5312
5336
|
);
|
|
5313
5337
|
}
|
|
5314
5338
|
};
|
|
5315
|
-
var workflowsClientInstance =
|
|
5339
|
+
var workflowsClientInstance = axios27.create({
|
|
5316
5340
|
baseURL: "https://platform.labs.text.com/workflows/api",
|
|
5317
5341
|
headers: {
|
|
5318
5342
|
"Content-Type": "application/json"
|
|
@@ -5871,7 +5895,7 @@ var textApi = {
|
|
|
5871
5895
|
};
|
|
5872
5896
|
|
|
5873
5897
|
// src/apis/integrations/vercel/api.ts
|
|
5874
|
-
import
|
|
5898
|
+
import axios28 from "axios";
|
|
5875
5899
|
|
|
5876
5900
|
// src/apis/integrations/vercel/deploy/api.ts
|
|
5877
5901
|
var vercelDeployApi = {
|
|
@@ -6135,7 +6159,7 @@ var vercelApi = {
|
|
|
6135
6159
|
client_secret: clientSecret,
|
|
6136
6160
|
redirect_uri: redirectUrl
|
|
6137
6161
|
});
|
|
6138
|
-
const response = yield
|
|
6162
|
+
const response = yield axios28.post("https://api.vercel.com/v2/oauth/access_token", data, {
|
|
6139
6163
|
headers: {
|
|
6140
6164
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
6141
6165
|
}
|
|
@@ -6164,7 +6188,8 @@ var integrationsApi = {
|
|
|
6164
6188
|
openai: openaiApi,
|
|
6165
6189
|
text: textApi,
|
|
6166
6190
|
slack: slackApi,
|
|
6167
|
-
salesforce: salesforceApi
|
|
6191
|
+
salesforce: salesforceApi,
|
|
6192
|
+
klaviyo: klaviyoApi
|
|
6168
6193
|
};
|
|
6169
6194
|
|
|
6170
6195
|
// src/apis/platform/accounts/accounts/api.ts
|
|
@@ -9557,14 +9582,14 @@ var TextApiError = class extends ApiErrorBase {
|
|
|
9557
9582
|
this.name = "text";
|
|
9558
9583
|
}
|
|
9559
9584
|
};
|
|
9560
|
-
var textClientInstance =
|
|
9585
|
+
var textClientInstance = axios29.create({
|
|
9561
9586
|
baseURL: "https://api.labs.text.com"
|
|
9562
9587
|
});
|
|
9563
9588
|
textClientInstance.interceptors.response.use(
|
|
9564
9589
|
(r) => r,
|
|
9565
9590
|
(error) => {
|
|
9566
9591
|
var _a, _b, _c, _d;
|
|
9567
|
-
if (
|
|
9592
|
+
if (axios29.isAxiosError(error)) {
|
|
9568
9593
|
if (((_a = error.response) == null ? void 0 : _a.status) === 401) {
|
|
9569
9594
|
throw new UnauthorizeApiError("text");
|
|
9570
9595
|
}
|