@livechat/developer-studio-api 3.4.23 → 3.5.0
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 +1370 -1246
- package/dist/index.d.ts +1370 -1246
- package/dist/index.js +931 -594
- package/dist/index.mjs +915 -594
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -156,6 +156,18 @@ var UnauthorizeApiError = class extends Error {
|
|
|
156
156
|
};
|
|
157
157
|
|
|
158
158
|
// src/apis/integrations/bigcommerce/instance.ts
|
|
159
|
+
function getBigCommerceClientAuthorization(req, headerPrefix = "x-adapter-bigcommerce") {
|
|
160
|
+
if (req.headers instanceof Headers) {
|
|
161
|
+
return {
|
|
162
|
+
shop: req.headers.get(`${headerPrefix}-shop`),
|
|
163
|
+
token: req.headers.get(`${headerPrefix}-token`)
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
return {
|
|
167
|
+
shop: req.headers[`${headerPrefix}-shop`],
|
|
168
|
+
token: req.headers[`${headerPrefix}-token`]
|
|
169
|
+
};
|
|
170
|
+
}
|
|
159
171
|
var BigCommerceApiError = class extends ApiErrorBase {
|
|
160
172
|
constructor() {
|
|
161
173
|
super(...arguments);
|
|
@@ -294,6 +306,18 @@ import axios4 from "axios";
|
|
|
294
306
|
|
|
295
307
|
// src/apis/integrations/github/instance.ts
|
|
296
308
|
import axios3 from "axios";
|
|
309
|
+
function getGitHubClientAuthorization(req, headerPrefix = "x-adapter-github") {
|
|
310
|
+
if (req.headers instanceof Headers) {
|
|
311
|
+
return {
|
|
312
|
+
appToken: req.headers.get(`${headerPrefix}-app-token`),
|
|
313
|
+
oauthToken: req.headers.get(`${headerPrefix}-oauth-token`)
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
return {
|
|
317
|
+
appToken: req.headers[`${headerPrefix}-app-token`],
|
|
318
|
+
oauthToken: req.headers[`${headerPrefix}-oauth-token`]
|
|
319
|
+
};
|
|
320
|
+
}
|
|
297
321
|
var githubClientInstance = axios3.create({
|
|
298
322
|
baseURL: "https://api.github.com",
|
|
299
323
|
headers: {
|
|
@@ -747,6 +771,16 @@ var gitHubApi = {
|
|
|
747
771
|
|
|
748
772
|
// src/apis/integrations/hubspot/instance.ts
|
|
749
773
|
import axios5 from "axios";
|
|
774
|
+
function getHubspotClientAuthorization(req, headerPrefix = "x-adapter-hubspot") {
|
|
775
|
+
if (req.headers instanceof Headers) {
|
|
776
|
+
return {
|
|
777
|
+
token: req.headers.get(`${headerPrefix}-token`)
|
|
778
|
+
};
|
|
779
|
+
}
|
|
780
|
+
return {
|
|
781
|
+
token: req.headers[`${headerPrefix}-token`]
|
|
782
|
+
};
|
|
783
|
+
}
|
|
750
784
|
var HubspotApiError = class extends ApiErrorBase {
|
|
751
785
|
constructor() {
|
|
752
786
|
super(...arguments);
|
|
@@ -968,6 +1002,18 @@ import axios7 from "axios";
|
|
|
968
1002
|
|
|
969
1003
|
// src/apis/integrations/mailchimp/instance.ts
|
|
970
1004
|
import axios6 from "axios";
|
|
1005
|
+
function getMailchimpClientAuthorization(req, headerPrefix = "x-adapter-mailchimp") {
|
|
1006
|
+
if (req.headers instanceof Headers) {
|
|
1007
|
+
return {
|
|
1008
|
+
server: req.headers.get(`${headerPrefix}-server`),
|
|
1009
|
+
token: req.headers.get(`${headerPrefix}-token`)
|
|
1010
|
+
};
|
|
1011
|
+
}
|
|
1012
|
+
return {
|
|
1013
|
+
server: req.headers[`${headerPrefix}-server`],
|
|
1014
|
+
token: req.headers[`${headerPrefix}-token`]
|
|
1015
|
+
};
|
|
1016
|
+
}
|
|
971
1017
|
var MailchimpApiError = class extends ApiErrorBase {
|
|
972
1018
|
constructor() {
|
|
973
1019
|
super(...arguments);
|
|
@@ -1465,6 +1511,16 @@ import { AxiosError as AxiosError2 } from "axios";
|
|
|
1465
1511
|
|
|
1466
1512
|
// src/apis/integrations/netlify/instance.ts
|
|
1467
1513
|
import axios10 from "axios";
|
|
1514
|
+
function getNetlifyClientAuthorization(req, headerPrefix = "x-adapter-netlify-token") {
|
|
1515
|
+
if (req.headers instanceof Headers) {
|
|
1516
|
+
return {
|
|
1517
|
+
token: req.headers.get(`${headerPrefix}-token`)
|
|
1518
|
+
};
|
|
1519
|
+
}
|
|
1520
|
+
return {
|
|
1521
|
+
token: req.headers[`${headerPrefix}-token`]
|
|
1522
|
+
};
|
|
1523
|
+
}
|
|
1468
1524
|
var netlifyClientInstance = axios10.create({
|
|
1469
1525
|
baseURL: "https://api.netlify.com/api/v1",
|
|
1470
1526
|
headers: {
|
|
@@ -2228,6 +2284,18 @@ import axios16 from "axios";
|
|
|
2228
2284
|
|
|
2229
2285
|
// src/apis/integrations/shopify/instance.ts
|
|
2230
2286
|
import axios15 from "axios";
|
|
2287
|
+
function getShopifyClientAuthorization(req, headerPrefix = "x-adapter-shopify") {
|
|
2288
|
+
if (req.headers instanceof Headers) {
|
|
2289
|
+
return {
|
|
2290
|
+
shop: req.headers.get(`${headerPrefix}-shop`),
|
|
2291
|
+
token: req.headers.get(`${headerPrefix}-token`)
|
|
2292
|
+
};
|
|
2293
|
+
}
|
|
2294
|
+
return {
|
|
2295
|
+
shop: req.headers[`${headerPrefix}-shop`],
|
|
2296
|
+
token: req.headers[`${headerPrefix}-token`]
|
|
2297
|
+
};
|
|
2298
|
+
}
|
|
2231
2299
|
var ShopifyApiError = class extends ApiErrorBase {
|
|
2232
2300
|
constructor() {
|
|
2233
2301
|
super(...arguments);
|
|
@@ -2370,6 +2438,16 @@ var SlackApiError = class extends ApiErrorBase {
|
|
|
2370
2438
|
this.name = "slack";
|
|
2371
2439
|
}
|
|
2372
2440
|
};
|
|
2441
|
+
function getSlackClientAuthorization(req, headerPrefix = "x-adapter-slack") {
|
|
2442
|
+
if (req.headers instanceof Headers) {
|
|
2443
|
+
return {
|
|
2444
|
+
token: req.headers.get(`${headerPrefix}-token`)
|
|
2445
|
+
};
|
|
2446
|
+
}
|
|
2447
|
+
return {
|
|
2448
|
+
token: req.headers[`${headerPrefix}-token`]
|
|
2449
|
+
};
|
|
2450
|
+
}
|
|
2373
2451
|
var slackClientInstance = axios17.create({
|
|
2374
2452
|
baseURL: "https://slack.com/api",
|
|
2375
2453
|
headers: {
|
|
@@ -2474,6 +2552,18 @@ var slackApi = {
|
|
|
2474
2552
|
|
|
2475
2553
|
// src/apis/integrations/text/instance.ts
|
|
2476
2554
|
import axios18 from "axios";
|
|
2555
|
+
function getTextClientAuthorization(req, headerPrefix = "x-adapter-text") {
|
|
2556
|
+
if (req.headers instanceof Headers) {
|
|
2557
|
+
return {
|
|
2558
|
+
token: req.headers.get(`${headerPrefix}-token`),
|
|
2559
|
+
tokenType: "Bearer"
|
|
2560
|
+
};
|
|
2561
|
+
}
|
|
2562
|
+
return {
|
|
2563
|
+
token: req.headers[`${headerPrefix}-token`],
|
|
2564
|
+
tokenType: "Bearer"
|
|
2565
|
+
};
|
|
2566
|
+
}
|
|
2477
2567
|
var TextApiError = class extends ApiErrorBase {
|
|
2478
2568
|
constructor() {
|
|
2479
2569
|
super(...arguments);
|
|
@@ -2687,6 +2777,42 @@ var SlackEventTypes = /* @__PURE__ */ ((SlackEventTypes2) => {
|
|
|
2687
2777
|
SlackEventTypes2["MessagePosted"] = "message";
|
|
2688
2778
|
return SlackEventTypes2;
|
|
2689
2779
|
})(SlackEventTypes || {});
|
|
2780
|
+
var SlackMessageEventSubTypes = /* @__PURE__ */ ((SlackMessageEventSubTypes2) => {
|
|
2781
|
+
SlackMessageEventSubTypes2["AssistantAppThread"] = "assistant_app_thread";
|
|
2782
|
+
SlackMessageEventSubTypes2["BotMessage"] = "bot_message";
|
|
2783
|
+
SlackMessageEventSubTypes2["ChannelArchive"] = "channel_archive";
|
|
2784
|
+
SlackMessageEventSubTypes2["ChannelConvertToPrivate"] = "channel_convert_to_private";
|
|
2785
|
+
SlackMessageEventSubTypes2["ChannelConvertToPublic"] = "channel_convert_to_public";
|
|
2786
|
+
SlackMessageEventSubTypes2["ChannelJoin"] = "channel_join";
|
|
2787
|
+
SlackMessageEventSubTypes2["ChannelLeave"] = "channel_leave";
|
|
2788
|
+
SlackMessageEventSubTypes2["ChannelName"] = "channel_name";
|
|
2789
|
+
SlackMessageEventSubTypes2["ChannelPostingPermissions"] = "channel_posting_permissions";
|
|
2790
|
+
SlackMessageEventSubTypes2["ChannelPurpose"] = "channel_purpose";
|
|
2791
|
+
SlackMessageEventSubTypes2["ChannelTopic"] = "channel_topic";
|
|
2792
|
+
SlackMessageEventSubTypes2["ChannelUnarchive"] = "channel_unarchive";
|
|
2793
|
+
SlackMessageEventSubTypes2["DocumentMention"] = "document_mention";
|
|
2794
|
+
SlackMessageEventSubTypes2["EkmAccessDenied"] = "ekm_access_denied";
|
|
2795
|
+
SlackMessageEventSubTypes2["FileComment"] = "file_comment";
|
|
2796
|
+
SlackMessageEventSubTypes2["FileMention"] = "file_mention";
|
|
2797
|
+
SlackMessageEventSubTypes2["FileShare"] = "file_share";
|
|
2798
|
+
SlackMessageEventSubTypes2["GroupArchive"] = "group_archive";
|
|
2799
|
+
SlackMessageEventSubTypes2["GroupJoin"] = "group_join";
|
|
2800
|
+
SlackMessageEventSubTypes2["GroupLeave"] = "group_leave";
|
|
2801
|
+
SlackMessageEventSubTypes2["GroupName"] = "group_name";
|
|
2802
|
+
SlackMessageEventSubTypes2["GroupPurpose"] = "group_purpose";
|
|
2803
|
+
SlackMessageEventSubTypes2["GroupTopic"] = "group_topic";
|
|
2804
|
+
SlackMessageEventSubTypes2["GroupUnarchive"] = "group_unarchive";
|
|
2805
|
+
SlackMessageEventSubTypes2["MessageChanged"] = "message_changed";
|
|
2806
|
+
SlackMessageEventSubTypes2["MessageDeleted"] = "message_deleted";
|
|
2807
|
+
SlackMessageEventSubTypes2["MeMessage"] = "me_message";
|
|
2808
|
+
SlackMessageEventSubTypes2["MessageReplied"] = "message_replied";
|
|
2809
|
+
SlackMessageEventSubTypes2["PinnedItem"] = "pinned_item";
|
|
2810
|
+
SlackMessageEventSubTypes2["ReminderAdd"] = "reminder_add";
|
|
2811
|
+
SlackMessageEventSubTypes2["ReplyBroadcast"] = "reply_broadcast";
|
|
2812
|
+
SlackMessageEventSubTypes2["ThreadBroadcast"] = "thread_broadcast";
|
|
2813
|
+
SlackMessageEventSubTypes2["UnpinnedItem"] = "unpinned_item";
|
|
2814
|
+
return SlackMessageEventSubTypes2;
|
|
2815
|
+
})(SlackMessageEventSubTypes || {});
|
|
2690
2816
|
|
|
2691
2817
|
// src/apis/integrations/text/platform/workflow/workflows/_contracts/dtos/workflows.ts
|
|
2692
2818
|
var WorkflowTemplateCategory = /* @__PURE__ */ ((WorkflowTemplateCategory2) => {
|
|
@@ -2714,6 +2840,16 @@ var WorkflowExecutionStatus = /* @__PURE__ */ ((WorkflowExecutionStatus2) => {
|
|
|
2714
2840
|
|
|
2715
2841
|
// src/apis/integrations/vercel/instance.ts
|
|
2716
2842
|
import axios19 from "axios";
|
|
2843
|
+
function getVercelClientAuthorization(req, headerPrefix = "x-adapter-vercel") {
|
|
2844
|
+
if (req.headers instanceof Headers) {
|
|
2845
|
+
return {
|
|
2846
|
+
token: req.headers.get(`${headerPrefix}-token`)
|
|
2847
|
+
};
|
|
2848
|
+
}
|
|
2849
|
+
return {
|
|
2850
|
+
token: req.headers[`${headerPrefix}-token`]
|
|
2851
|
+
};
|
|
2852
|
+
}
|
|
2717
2853
|
var vercelClientInstance = axios19.create({
|
|
2718
2854
|
baseURL: "https://api.vercel.com"
|
|
2719
2855
|
});
|
|
@@ -3656,6 +3792,147 @@ function initBillingClient(baseUrl, token) {
|
|
|
3656
3792
|
}
|
|
3657
3793
|
}
|
|
3658
3794
|
|
|
3795
|
+
// src/apis/platform/console/instance.ts
|
|
3796
|
+
import axios22 from "axios";
|
|
3797
|
+
var REGION2 = {
|
|
3798
|
+
FRA: "fra",
|
|
3799
|
+
DAL: "dal",
|
|
3800
|
+
FRA_A: "fra-a",
|
|
3801
|
+
FRA_B: "fra-b"
|
|
3802
|
+
};
|
|
3803
|
+
var supportedRegions2 = Object.values(REGION2);
|
|
3804
|
+
var getRegion2 = (token) => {
|
|
3805
|
+
const region = token.split(":")[0];
|
|
3806
|
+
if (supportedRegions2.includes(region)) {
|
|
3807
|
+
return region;
|
|
3808
|
+
}
|
|
3809
|
+
};
|
|
3810
|
+
var ConsoleApiError = class _ConsoleApiError extends ApiErrorBase {
|
|
3811
|
+
constructor() {
|
|
3812
|
+
super(...arguments);
|
|
3813
|
+
this.name = "console";
|
|
3814
|
+
}
|
|
3815
|
+
static notFound(message) {
|
|
3816
|
+
return new _ConsoleApiError(
|
|
3817
|
+
message != null ? message : "Not found",
|
|
3818
|
+
{
|
|
3819
|
+
errorCode: "not_found",
|
|
3820
|
+
errorMessage: "Not found"
|
|
3821
|
+
},
|
|
3822
|
+
404
|
|
3823
|
+
);
|
|
3824
|
+
}
|
|
3825
|
+
};
|
|
3826
|
+
var consoleClientInstance = axios22.create({
|
|
3827
|
+
baseURL: "https://platform.labs.text.com/console/api",
|
|
3828
|
+
headers: {
|
|
3829
|
+
"Content-Type": "application/json"
|
|
3830
|
+
}
|
|
3831
|
+
});
|
|
3832
|
+
consoleClientInstance.interceptors.response.use(
|
|
3833
|
+
(response) => response,
|
|
3834
|
+
(error) => {
|
|
3835
|
+
var _a, _b;
|
|
3836
|
+
const apiError = (_a = error.response) == null ? void 0 : _a.data;
|
|
3837
|
+
if ((apiError == null ? void 0 : apiError.kind) === "unauthorized") {
|
|
3838
|
+
return Promise.reject(new UnauthorizeApiError(apiError.source));
|
|
3839
|
+
} else if ((apiError == null ? void 0 : apiError.kind) === "error") {
|
|
3840
|
+
const data = (_b = error.response) == null ? void 0 : _b.data;
|
|
3841
|
+
return Promise.reject(
|
|
3842
|
+
new ConsoleApiError(data.message, data.data, data.code)
|
|
3843
|
+
);
|
|
3844
|
+
}
|
|
3845
|
+
return Promise.reject(error);
|
|
3846
|
+
}
|
|
3847
|
+
);
|
|
3848
|
+
function getConsoleClientConfig(options = {}) {
|
|
3849
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
3850
|
+
const currentHeaders = consoleClientInstance.defaults.headers;
|
|
3851
|
+
const headers = {
|
|
3852
|
+
platform: {
|
|
3853
|
+
token: (_c = currentHeaders.Authorization) != null ? _c : ((_a = options.platform) == null ? void 0 : _a.token) ? `${(_b = options.platform.tokenType) != null ? _b : "Bearer"} ${options.platform.token}` : void 0
|
|
3854
|
+
},
|
|
3855
|
+
integrations: {
|
|
3856
|
+
github: {
|
|
3857
|
+
app: (_e = currentHeaders["x-adapter-github-app-token"]) != null ? _e : (_d = options.github) == null ? void 0 : _d.appToken,
|
|
3858
|
+
oauth: (_g = currentHeaders["x-adapter-github-oauth-token"]) != null ? _g : (_f = options.github) == null ? void 0 : _f.oauthToken
|
|
3859
|
+
},
|
|
3860
|
+
netlify: (_i = currentHeaders["x-adapter-netlify-token"]) != null ? _i : (_h = options.netlify) == null ? void 0 : _h.token,
|
|
3861
|
+
vercel: (_k = currentHeaders["x-adapter-vercel-token"]) != null ? _k : (_j = options.vercel) == null ? void 0 : _j.token,
|
|
3862
|
+
planetscale: (_m = currentHeaders["x-adapter-planetscale-token"]) != null ? _m : (_l = options.planetscale) == null ? void 0 : _l.token,
|
|
3863
|
+
neon: (_o = currentHeaders["x-adapter-neon-token"]) != null ? _o : (_n = options.neon) == null ? void 0 : _n.token
|
|
3864
|
+
}
|
|
3865
|
+
};
|
|
3866
|
+
if (currentHeaders.Authorization) {
|
|
3867
|
+
currentHeaders["X-Region"] = (_p = getRegion2(currentHeaders.Authorization)) != null ? _p : void 0;
|
|
3868
|
+
}
|
|
3869
|
+
if (((_q = options.ensureAuthorizationToken) == null ? void 0 : _q.platform) && !headers.platform.token) {
|
|
3870
|
+
throw new UnauthorizeApiError("accounts");
|
|
3871
|
+
}
|
|
3872
|
+
if (((_r = options.ensureAuthorizationToken) == null ? void 0 : _r.github) && (!headers.integrations.github.app || !headers.integrations.github.oauth)) {
|
|
3873
|
+
throw new UnauthorizeApiError("github");
|
|
3874
|
+
}
|
|
3875
|
+
if (((_s = options.ensureAuthorizationToken) == null ? void 0 : _s.vercel) && !headers.integrations.vercel) {
|
|
3876
|
+
throw new UnauthorizeApiError("vercel");
|
|
3877
|
+
}
|
|
3878
|
+
if (((_t = options.ensureAuthorizationToken) == null ? void 0 : _t.netlify) && !headers.integrations.netlify) {
|
|
3879
|
+
throw new UnauthorizeApiError("netlify");
|
|
3880
|
+
}
|
|
3881
|
+
if (((_u = options.ensureAuthorizationToken) == null ? void 0 : _u.planetscale) && !headers.integrations.planetscale) {
|
|
3882
|
+
throw new UnauthorizeApiError("planetscale");
|
|
3883
|
+
}
|
|
3884
|
+
if (((_v = options.ensureAuthorizationToken) == null ? void 0 : _v.neon) && !headers.integrations.neon) {
|
|
3885
|
+
throw new UnauthorizeApiError("neon");
|
|
3886
|
+
}
|
|
3887
|
+
return {
|
|
3888
|
+
headers: __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, headers.platform.token ? { Authorization: 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 } : {})
|
|
3889
|
+
};
|
|
3890
|
+
}
|
|
3891
|
+
var getConsoleClientDefaultConfig = (authorization) => getConsoleClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
3892
|
+
ensureAuthorizationToken: {
|
|
3893
|
+
platform: true
|
|
3894
|
+
}
|
|
3895
|
+
}));
|
|
3896
|
+
function initConsoleClient(baseUrl, tokens) {
|
|
3897
|
+
if (baseUrl) {
|
|
3898
|
+
consoleClientInstance.interceptors.request.use(
|
|
3899
|
+
(config) => {
|
|
3900
|
+
config.baseURL = baseUrl;
|
|
3901
|
+
return config;
|
|
3902
|
+
},
|
|
3903
|
+
(error) => Promise.reject(error)
|
|
3904
|
+
);
|
|
3905
|
+
}
|
|
3906
|
+
if (tokens) {
|
|
3907
|
+
updateConsoleClient(tokens);
|
|
3908
|
+
}
|
|
3909
|
+
}
|
|
3910
|
+
function updateConsoleClient(tokens) {
|
|
3911
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
3912
|
+
const headers = consoleClientInstance.defaults.headers;
|
|
3913
|
+
if ((_a = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _a.token) {
|
|
3914
|
+
headers.Authorization = `${(_b = tokens.platform.tokenType) != null ? _b : "Bearer"} ${tokens.platform.token}`;
|
|
3915
|
+
}
|
|
3916
|
+
if ((_c = tokens == null ? void 0 : tokens.github) == null ? void 0 : _c.appToken) {
|
|
3917
|
+
headers["x-adapter-github-app-token"] = tokens.github.appToken;
|
|
3918
|
+
}
|
|
3919
|
+
if ((_d = tokens == null ? void 0 : tokens.github) == null ? void 0 : _d.oauthToken) {
|
|
3920
|
+
headers["x-adapter-github-oauth-token"] = tokens.github.oauthToken;
|
|
3921
|
+
}
|
|
3922
|
+
if ((_e = tokens == null ? void 0 : tokens.netlify) == null ? void 0 : _e.token) {
|
|
3923
|
+
headers["x-adapter-netlify-token"] = tokens.netlify.token;
|
|
3924
|
+
}
|
|
3925
|
+
if ((_f = tokens == null ? void 0 : tokens.vercel) == null ? void 0 : _f.token) {
|
|
3926
|
+
headers["x-adapter-vercel-token"] = tokens.vercel.token;
|
|
3927
|
+
}
|
|
3928
|
+
if ((_g = tokens == null ? void 0 : tokens.planetscale) == null ? void 0 : _g.token) {
|
|
3929
|
+
headers["x-adapter-planetscale-token"] = tokens.planetscale.token;
|
|
3930
|
+
}
|
|
3931
|
+
if ((_h = tokens == null ? void 0 : tokens.neon) == null ? void 0 : _h.token) {
|
|
3932
|
+
headers["x-adapter-neon-token"] = tokens.neon.token;
|
|
3933
|
+
}
|
|
3934
|
+
}
|
|
3935
|
+
|
|
3659
3936
|
// src/apis/platform/dps/applications/application/autoReview/_contracts/dtos/autoReview.ts
|
|
3660
3937
|
var getEmptyAppAutoReview = () => ({
|
|
3661
3938
|
isReviewed: false,
|
|
@@ -3725,14 +4002,14 @@ var getAppAutoReviewPayload = (value) => {
|
|
|
3725
4002
|
};
|
|
3726
4003
|
|
|
3727
4004
|
// src/apis/platform/dps/instance.ts
|
|
3728
|
-
import
|
|
4005
|
+
import axios23 from "axios";
|
|
3729
4006
|
var DpsApiError = class extends ApiErrorBase {
|
|
3730
4007
|
constructor() {
|
|
3731
4008
|
super(...arguments);
|
|
3732
4009
|
this.name = "dps";
|
|
3733
4010
|
}
|
|
3734
4011
|
};
|
|
3735
|
-
var dpsClientInstance =
|
|
4012
|
+
var dpsClientInstance = axios23.create({
|
|
3736
4013
|
baseURL: "https://dev-platform.labs.livechatinc.com"
|
|
3737
4014
|
});
|
|
3738
4015
|
dpsClientInstance.interceptors.response.use(
|
|
@@ -3781,14 +4058,14 @@ function initDpsClient(baseUrl, token) {
|
|
|
3781
4058
|
}
|
|
3782
4059
|
|
|
3783
4060
|
// src/apis/products/helpdesk/instance.ts
|
|
3784
|
-
import
|
|
4061
|
+
import axios24 from "axios";
|
|
3785
4062
|
var HelpDeskApiError = class extends ApiErrorBase {
|
|
3786
4063
|
constructor() {
|
|
3787
4064
|
super(...arguments);
|
|
3788
4065
|
this.name = "helpdesk";
|
|
3789
4066
|
}
|
|
3790
4067
|
};
|
|
3791
|
-
var helpdeskClientInstance =
|
|
4068
|
+
var helpdeskClientInstance = axios24.create({
|
|
3792
4069
|
baseURL: "https://api.labs.helpdesk.com"
|
|
3793
4070
|
});
|
|
3794
4071
|
helpdeskClientInstance.interceptors.response.use(
|
|
@@ -3876,17 +4153,17 @@ var LivechatWebhookSystemMessages = /* @__PURE__ */ ((LivechatWebhookSystemMessa
|
|
|
3876
4153
|
})(LivechatWebhookSystemMessages || {});
|
|
3877
4154
|
|
|
3878
4155
|
// src/apis/products/livechat/instance.ts
|
|
3879
|
-
import
|
|
3880
|
-
var
|
|
4156
|
+
import axios25 from "axios";
|
|
4157
|
+
var REGION3 = {
|
|
3881
4158
|
FRA: "fra",
|
|
3882
4159
|
DAL: "dal",
|
|
3883
4160
|
FRA_A: "fra-a",
|
|
3884
4161
|
FRA_B: "fra-b"
|
|
3885
4162
|
};
|
|
3886
|
-
var
|
|
3887
|
-
var
|
|
4163
|
+
var supportedRegions3 = Object.values(REGION3);
|
|
4164
|
+
var getRegion3 = (token) => {
|
|
3888
4165
|
const region = token.split(":")[0];
|
|
3889
|
-
if (
|
|
4166
|
+
if (supportedRegions3.includes(region)) {
|
|
3890
4167
|
return region;
|
|
3891
4168
|
}
|
|
3892
4169
|
};
|
|
@@ -3896,7 +4173,7 @@ var LivechatApiError = class extends ApiErrorBase {
|
|
|
3896
4173
|
this.name = "livechat";
|
|
3897
4174
|
}
|
|
3898
4175
|
};
|
|
3899
|
-
var livechatClientInstance =
|
|
4176
|
+
var livechatClientInstance = axios25.create({
|
|
3900
4177
|
baseURL: "https://api.labs.livechatinc.com"
|
|
3901
4178
|
});
|
|
3902
4179
|
livechatClientInstance.interceptors.response.use(
|
|
@@ -3931,7 +4208,7 @@ function getLiveChatClientConfig(options = {}) {
|
|
|
3931
4208
|
};
|
|
3932
4209
|
}
|
|
3933
4210
|
function initLiveChatClient(baseUrl, token) {
|
|
3934
|
-
const region = token ?
|
|
4211
|
+
const region = token ? getRegion3(token) : void 0;
|
|
3935
4212
|
const headers = livechatClientInstance.defaults.headers;
|
|
3936
4213
|
if (baseUrl) {
|
|
3937
4214
|
livechatClientInstance.interceptors.request.use(
|
|
@@ -4292,7 +4569,8 @@ var urls = {
|
|
|
4292
4569
|
create: () => getUrl(),
|
|
4293
4570
|
update: (id) => getUrl([id]),
|
|
4294
4571
|
delete: (id) => getUrl([id]),
|
|
4295
|
-
connect: (id) => getUrl([id, "connection"])
|
|
4572
|
+
connect: (id) => getUrl([id, "connection"]),
|
|
4573
|
+
disconnect: (id) => getUrl([id, "disconnect"])
|
|
4296
4574
|
};
|
|
4297
4575
|
var textPlatformWorkflowsCredentialsApi = {
|
|
4298
4576
|
meta: {
|
|
@@ -4404,6 +4682,24 @@ var textPlatformWorkflowsCredentialsApi = {
|
|
|
4404
4682
|
throw error;
|
|
4405
4683
|
});
|
|
4406
4684
|
});
|
|
4685
|
+
},
|
|
4686
|
+
disconnect(id, authorization) {
|
|
4687
|
+
return __async(this, null, function* () {
|
|
4688
|
+
return textClientInstance.put(
|
|
4689
|
+
urls.disconnect(id),
|
|
4690
|
+
{},
|
|
4691
|
+
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
4692
|
+
ensureAuthorizationToken: true
|
|
4693
|
+
}))
|
|
4694
|
+
).catch((error) => {
|
|
4695
|
+
if (error instanceof TextApiError) {
|
|
4696
|
+
throw error.withCustomMessage(
|
|
4697
|
+
`Couldn't disconnect to credentials. [${error.message}]`
|
|
4698
|
+
);
|
|
4699
|
+
}
|
|
4700
|
+
throw error;
|
|
4701
|
+
});
|
|
4702
|
+
});
|
|
4407
4703
|
}
|
|
4408
4704
|
};
|
|
4409
4705
|
|
|
@@ -4637,7 +4933,7 @@ var textApi = {
|
|
|
4637
4933
|
};
|
|
4638
4934
|
|
|
4639
4935
|
// src/apis/integrations/vercel/api.ts
|
|
4640
|
-
import
|
|
4936
|
+
import axios26 from "axios";
|
|
4641
4937
|
|
|
4642
4938
|
// src/apis/integrations/vercel/deploy/api.ts
|
|
4643
4939
|
var vercelDeployApi = {
|
|
@@ -4897,7 +5193,7 @@ var vercelApi = {
|
|
|
4897
5193
|
client_secret: clientSecret,
|
|
4898
5194
|
redirect_uri: redirectUrl
|
|
4899
5195
|
});
|
|
4900
|
-
const response = yield
|
|
5196
|
+
const response = yield axios26.post("https://api.vercel.com/v2/oauth/access_token", data, {
|
|
4901
5197
|
headers: {
|
|
4902
5198
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
4903
5199
|
}
|
|
@@ -5238,769 +5534,767 @@ var platformAccountsApi = {
|
|
|
5238
5534
|
token: platformAccountsTokenApi
|
|
5239
5535
|
};
|
|
5240
5536
|
|
|
5241
|
-
// src/apis/platform/adapter/
|
|
5242
|
-
var
|
|
5243
|
-
|
|
5244
|
-
|
|
5245
|
-
return
|
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
|
|
5249
|
-
|
|
5250
|
-
|
|
5251
|
-
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
|
|
5261
|
-
|
|
5262
|
-
return adapterClientInstance.put(
|
|
5263
|
-
`/console/app/${encodeURIComponent(payload.appId)}/blocks/authorization`,
|
|
5264
|
-
payload,
|
|
5265
|
-
getAdapterClientDefaultConfig(authorization)
|
|
5266
|
-
);
|
|
5267
|
-
});
|
|
5268
|
-
},
|
|
5269
|
-
remove(payload, authorization) {
|
|
5270
|
-
return __async(this, null, function* () {
|
|
5271
|
-
return adapterClientInstance.delete(
|
|
5272
|
-
`/console/app/${encodeURIComponent(payload.appId)}/blocks/authorization`,
|
|
5273
|
-
getAdapterClientDefaultConfig(authorization)
|
|
5274
|
-
);
|
|
5275
|
-
});
|
|
5537
|
+
// src/apis/platform/adapter/integrations/bigcommerce/api.ts
|
|
5538
|
+
var platformAdapterBigCommerceApi = {
|
|
5539
|
+
events: {
|
|
5540
|
+
subscribe(payload, authorization) {
|
|
5541
|
+
return __async(this, null, function* () {
|
|
5542
|
+
yield adapterClientInstance.post(
|
|
5543
|
+
"/integrations/bigcommerce/events/subscribe",
|
|
5544
|
+
payload,
|
|
5545
|
+
getBigCommerceClientConfig(authorization)
|
|
5546
|
+
);
|
|
5547
|
+
});
|
|
5548
|
+
},
|
|
5549
|
+
unsubscribe(payload, authorization) {
|
|
5550
|
+
return __async(this, null, function* () {
|
|
5551
|
+
yield adapterClientInstance.post(
|
|
5552
|
+
"/integrations/bigcommerce/events/unsubscribe",
|
|
5553
|
+
payload,
|
|
5554
|
+
getBigCommerceClientConfig(authorization)
|
|
5555
|
+
);
|
|
5556
|
+
});
|
|
5557
|
+
}
|
|
5276
5558
|
}
|
|
5277
5559
|
};
|
|
5278
5560
|
|
|
5279
|
-
// src/apis/platform/adapter/
|
|
5280
|
-
var
|
|
5281
|
-
|
|
5282
|
-
|
|
5283
|
-
return
|
|
5284
|
-
|
|
5285
|
-
|
|
5286
|
-
|
|
5287
|
-
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
|
|
5293
|
-
|
|
5294
|
-
|
|
5295
|
-
|
|
5296
|
-
|
|
5297
|
-
|
|
5298
|
-
|
|
5299
|
-
|
|
5300
|
-
`/console/app/${encodeURIComponent(payload.appId)}/blocks/deployment`,
|
|
5301
|
-
payload,
|
|
5302
|
-
getAdapterClientDefaultConfig(authorization)
|
|
5303
|
-
);
|
|
5304
|
-
});
|
|
5305
|
-
},
|
|
5306
|
-
unlink(payload, authorization) {
|
|
5307
|
-
return __async(this, null, function* () {
|
|
5308
|
-
return adapterClientInstance.delete(
|
|
5309
|
-
`/console/app/${encodeURIComponent(
|
|
5310
|
-
payload.appId
|
|
5311
|
-
)}/blocks/deployment?${new URLSearchParams(
|
|
5312
|
-
payload
|
|
5313
|
-
).toString()}`,
|
|
5314
|
-
getAdapterClientDefaultConfig(authorization)
|
|
5315
|
-
);
|
|
5316
|
-
});
|
|
5317
|
-
},
|
|
5318
|
-
upsert(payload, authorization) {
|
|
5319
|
-
return __async(this, null, function* () {
|
|
5320
|
-
return adapterClientInstance.patch(
|
|
5321
|
-
`/console/app/${encodeURIComponent(payload.appId)}/blocks/deployment`,
|
|
5322
|
-
payload,
|
|
5323
|
-
getAdapterClientDefaultConfig(authorization)
|
|
5324
|
-
);
|
|
5325
|
-
});
|
|
5561
|
+
// src/apis/platform/adapter/integrations/hubspot/api.ts
|
|
5562
|
+
var platformAdapterHubspotApi = {
|
|
5563
|
+
events: {
|
|
5564
|
+
subscribe(payload, authorization) {
|
|
5565
|
+
return __async(this, null, function* () {
|
|
5566
|
+
yield adapterClientInstance.post(
|
|
5567
|
+
"/integrations/hubspot/events/subscribe",
|
|
5568
|
+
payload,
|
|
5569
|
+
getHubspotClientConfig(authorization)
|
|
5570
|
+
);
|
|
5571
|
+
});
|
|
5572
|
+
},
|
|
5573
|
+
unsubscribe(payload, authorization) {
|
|
5574
|
+
return __async(this, null, function* () {
|
|
5575
|
+
yield adapterClientInstance.post(
|
|
5576
|
+
"/integrations/hubspot/events/unsubscribe",
|
|
5577
|
+
payload,
|
|
5578
|
+
getHubspotClientConfig(authorization)
|
|
5579
|
+
);
|
|
5580
|
+
});
|
|
5581
|
+
}
|
|
5326
5582
|
}
|
|
5327
5583
|
};
|
|
5328
5584
|
|
|
5329
|
-
// src/apis/platform/adapter/
|
|
5330
|
-
var
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
return
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5585
|
+
// src/apis/platform/adapter/integrations/mailchimp/api.ts
|
|
5586
|
+
var platformAdapterMailchimpApi = {
|
|
5587
|
+
events: {
|
|
5588
|
+
subscribe(payload, authorization) {
|
|
5589
|
+
return __async(this, null, function* () {
|
|
5590
|
+
yield adapterClientInstance.post(
|
|
5591
|
+
"/integrations/mailchimp/events/subscribe",
|
|
5592
|
+
payload,
|
|
5593
|
+
getMailchimpClientConfig(authorization)
|
|
5594
|
+
);
|
|
5595
|
+
});
|
|
5596
|
+
},
|
|
5597
|
+
unsubscribe(payload, authorization) {
|
|
5598
|
+
return __async(this, null, function* () {
|
|
5599
|
+
yield adapterClientInstance.post(
|
|
5600
|
+
"/integrations/mailchimp/events/unsubscribe",
|
|
5601
|
+
payload,
|
|
5602
|
+
getMailchimpClientConfig(authorization)
|
|
5603
|
+
);
|
|
5604
|
+
});
|
|
5605
|
+
}
|
|
5606
|
+
}
|
|
5607
|
+
};
|
|
5608
|
+
|
|
5609
|
+
// src/apis/platform/adapter/integrations/shopify/api.ts
|
|
5610
|
+
var platformAdapterShopifyApi = {
|
|
5611
|
+
events: {
|
|
5612
|
+
subscribe(payload, authorization) {
|
|
5613
|
+
return __async(this, null, function* () {
|
|
5614
|
+
yield adapterClientInstance.post(
|
|
5615
|
+
"/integrations/shopify/events/subscribe",
|
|
5616
|
+
payload,
|
|
5617
|
+
getShopifyClientConfig(authorization)
|
|
5618
|
+
);
|
|
5619
|
+
});
|
|
5620
|
+
},
|
|
5621
|
+
unsubscribe(payload, authorization) {
|
|
5622
|
+
return __async(this, null, function* () {
|
|
5623
|
+
yield adapterClientInstance.post(
|
|
5624
|
+
"/integrations/shopify/events/unsubscribe",
|
|
5625
|
+
payload,
|
|
5626
|
+
getShopifyClientConfig(authorization)
|
|
5627
|
+
);
|
|
5628
|
+
});
|
|
5629
|
+
}
|
|
5630
|
+
}
|
|
5631
|
+
};
|
|
5632
|
+
|
|
5633
|
+
// src/apis/platform/adapter/integrations/slack/api.ts
|
|
5634
|
+
var platformAdapterSlackApi = {
|
|
5635
|
+
events: {
|
|
5636
|
+
subscribe(payload, authorization) {
|
|
5637
|
+
return __async(this, null, function* () {
|
|
5638
|
+
yield adapterClientInstance.post(
|
|
5639
|
+
"/integrations/slack/events/subscribe",
|
|
5640
|
+
payload,
|
|
5641
|
+
getSlackClientConfig(authorization)
|
|
5642
|
+
);
|
|
5643
|
+
});
|
|
5644
|
+
},
|
|
5645
|
+
unsubscribe(payload, authorization) {
|
|
5646
|
+
return __async(this, null, function* () {
|
|
5647
|
+
yield adapterClientInstance.post(
|
|
5648
|
+
"/integrations/slack/events/unsubscribe",
|
|
5649
|
+
payload,
|
|
5650
|
+
getSlackClientConfig(authorization)
|
|
5651
|
+
);
|
|
5652
|
+
});
|
|
5653
|
+
}
|
|
5654
|
+
}
|
|
5655
|
+
};
|
|
5656
|
+
|
|
5657
|
+
// src/apis/platform/adapter/integrations/text/api.ts
|
|
5658
|
+
var platformAdapterTextApi = {
|
|
5659
|
+
events: {
|
|
5660
|
+
subscribe(payload, authorization) {
|
|
5661
|
+
return __async(this, null, function* () {
|
|
5662
|
+
yield adapterClientInstance.post(
|
|
5663
|
+
"/integrations/text/events/subscribe",
|
|
5664
|
+
payload,
|
|
5665
|
+
getTextClientConfig(authorization)
|
|
5666
|
+
);
|
|
5667
|
+
});
|
|
5668
|
+
},
|
|
5669
|
+
unsubscribe(payload, authorization) {
|
|
5670
|
+
return __async(this, null, function* () {
|
|
5671
|
+
yield adapterClientInstance.post(
|
|
5672
|
+
"/integrations/text/events/unsubscribe",
|
|
5673
|
+
payload,
|
|
5674
|
+
getTextClientConfig(authorization)
|
|
5675
|
+
);
|
|
5676
|
+
});
|
|
5677
|
+
}
|
|
5678
|
+
}
|
|
5679
|
+
};
|
|
5680
|
+
|
|
5681
|
+
// src/apis/platform/adapter/integrations/api.ts
|
|
5682
|
+
var platformAdapterIntegrationsApi = {
|
|
5683
|
+
mailchimp: platformAdapterMailchimpApi,
|
|
5684
|
+
shopify: platformAdapterShopifyApi,
|
|
5685
|
+
hubspot: platformAdapterHubspotApi,
|
|
5686
|
+
slack: platformAdapterSlackApi,
|
|
5687
|
+
bigcommerce: platformAdapterBigCommerceApi,
|
|
5688
|
+
text: platformAdapterTextApi
|
|
5689
|
+
};
|
|
5690
|
+
|
|
5691
|
+
// src/apis/platform/adapter/api.ts
|
|
5692
|
+
var platformAdapterApi = {
|
|
5693
|
+
integrations: platformAdapterIntegrationsApi
|
|
5694
|
+
};
|
|
5695
|
+
|
|
5696
|
+
// src/apis/platform/billing/account/api.ts
|
|
5697
|
+
var platformBillingAccountApi = {
|
|
5698
|
+
getAccount(authorization) {
|
|
5340
5699
|
return __async(this, null, function* () {
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5700
|
+
try {
|
|
5701
|
+
return yield billingClientInstance.get(
|
|
5702
|
+
"/v3/account",
|
|
5703
|
+
getBillingClientConfig(authorization)
|
|
5704
|
+
);
|
|
5705
|
+
} catch (error) {
|
|
5706
|
+
if (error instanceof Error) {
|
|
5707
|
+
throw new Error(`Account couldn't be fetched. [${error.message}]`);
|
|
5708
|
+
} else {
|
|
5709
|
+
throw error;
|
|
5710
|
+
}
|
|
5711
|
+
}
|
|
5346
5712
|
});
|
|
5347
5713
|
},
|
|
5348
|
-
|
|
5714
|
+
getAccountInfo(product, authorization) {
|
|
5349
5715
|
return __async(this, null, function* () {
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5716
|
+
try {
|
|
5717
|
+
return yield billingClientInstance.get(
|
|
5718
|
+
`/v3/account/${encodeURIComponent(product)}/billing_info`,
|
|
5719
|
+
getBillingClientConfig(authorization)
|
|
5720
|
+
);
|
|
5721
|
+
} catch (error) {
|
|
5722
|
+
if (error instanceof Error) {
|
|
5723
|
+
throw new Error(
|
|
5724
|
+
`Account billing info couldn't be fetched. [${error.message}]`
|
|
5725
|
+
);
|
|
5726
|
+
} else {
|
|
5727
|
+
throw error;
|
|
5728
|
+
}
|
|
5729
|
+
}
|
|
5354
5730
|
});
|
|
5355
5731
|
}
|
|
5356
5732
|
};
|
|
5357
5733
|
|
|
5358
|
-
// src/apis/platform/
|
|
5359
|
-
var
|
|
5360
|
-
|
|
5361
|
-
return __async(this, null, function* () {
|
|
5362
|
-
return adapterClientInstance.get(
|
|
5363
|
-
`/console/app/${encodeURIComponent(
|
|
5364
|
-
appId
|
|
5365
|
-
)}/blocks/properties/${encodeURIComponent(propertyId)}`,
|
|
5366
|
-
getAdapterClientDefaultConfig(authorization)
|
|
5367
|
-
);
|
|
5368
|
-
});
|
|
5369
|
-
},
|
|
5370
|
-
upsert(payload, authorization) {
|
|
5734
|
+
// src/apis/platform/billing/invoices/api.ts
|
|
5735
|
+
var platformBillingInvoicesApi = {
|
|
5736
|
+
getInvoices(product, authorization) {
|
|
5371
5737
|
return __async(this, null, function* () {
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5738
|
+
try {
|
|
5739
|
+
return yield billingClientInstance.get(
|
|
5740
|
+
`/v2/invoices/${encodeURIComponent(product)}`,
|
|
5741
|
+
getBillingClientConfig(authorization)
|
|
5742
|
+
);
|
|
5743
|
+
} catch (error) {
|
|
5744
|
+
if (error instanceof Error) {
|
|
5745
|
+
throw new Error(`Invoices couldn't be fetched. [${error.message}]`);
|
|
5746
|
+
} else {
|
|
5747
|
+
throw error;
|
|
5748
|
+
}
|
|
5749
|
+
}
|
|
5379
5750
|
});
|
|
5380
5751
|
},
|
|
5381
|
-
|
|
5752
|
+
downloadInvoices(number, authorization) {
|
|
5382
5753
|
return __async(this, null, function* () {
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5754
|
+
try {
|
|
5755
|
+
const response = yield billingClientInstance.request(__spreadValues({
|
|
5756
|
+
url: `https://api.labs.livechatinc.com/v2/invoices/${encodeURIComponent(
|
|
5757
|
+
number
|
|
5758
|
+
)}`,
|
|
5759
|
+
data: new URLSearchParams({
|
|
5760
|
+
_method: "GET"
|
|
5761
|
+
//gave the values directly for testing
|
|
5762
|
+
}),
|
|
5763
|
+
responseType: "blob"
|
|
5764
|
+
}, getBillingClientConfig(authorization)));
|
|
5765
|
+
const href = URL.createObjectURL(response.data);
|
|
5766
|
+
const link = document.createElement("a");
|
|
5767
|
+
link.href = href;
|
|
5768
|
+
link.setAttribute("download", `invoice-${number}.pdf`);
|
|
5769
|
+
document.body.appendChild(link);
|
|
5770
|
+
link.click();
|
|
5771
|
+
document.body.removeChild(link);
|
|
5772
|
+
URL.revokeObjectURL(href);
|
|
5773
|
+
} catch (error) {
|
|
5774
|
+
if (error instanceof Error) {
|
|
5775
|
+
throw new Error(`Invoice couldn't be downloaded. [${error.message}]`);
|
|
5776
|
+
} else {
|
|
5777
|
+
throw error;
|
|
5778
|
+
}
|
|
5779
|
+
}
|
|
5387
5780
|
});
|
|
5388
5781
|
}
|
|
5389
5782
|
};
|
|
5390
5783
|
|
|
5391
|
-
// src/apis/platform/
|
|
5392
|
-
var
|
|
5393
|
-
|
|
5784
|
+
// src/apis/platform/billing/api.ts
|
|
5785
|
+
var platformBillingApi = {
|
|
5786
|
+
account: platformBillingAccountApi,
|
|
5787
|
+
invoices: platformBillingInvoicesApi
|
|
5788
|
+
};
|
|
5789
|
+
|
|
5790
|
+
// src/apis/platform/console/app/blocks/authorization/api.ts
|
|
5791
|
+
var platformConsoleAppAuthorizationApi = {
|
|
5394
5792
|
get(appId, authorization) {
|
|
5395
5793
|
return __async(this, null, function* () {
|
|
5396
|
-
return
|
|
5397
|
-
`/
|
|
5398
|
-
|
|
5794
|
+
return consoleClientInstance.get(
|
|
5795
|
+
`/app/${encodeURIComponent(appId)}/blocks/authorization`,
|
|
5796
|
+
getConsoleClientDefaultConfig(authorization)
|
|
5399
5797
|
);
|
|
5400
5798
|
});
|
|
5401
5799
|
},
|
|
5402
|
-
|
|
5800
|
+
add(payload, authorization) {
|
|
5801
|
+
return __async(this, null, function* () {
|
|
5802
|
+
return consoleClientInstance.post(
|
|
5803
|
+
`/app/${encodeURIComponent(payload.appId)}/blocks/authorization`,
|
|
5804
|
+
payload,
|
|
5805
|
+
getConsoleClientDefaultConfig(authorization)
|
|
5806
|
+
);
|
|
5807
|
+
});
|
|
5808
|
+
},
|
|
5809
|
+
update(payload, authorization) {
|
|
5403
5810
|
return __async(this, null, function* () {
|
|
5404
|
-
return
|
|
5405
|
-
`/
|
|
5811
|
+
return consoleClientInstance.put(
|
|
5812
|
+
`/app/${encodeURIComponent(payload.appId)}/blocks/authorization`,
|
|
5406
5813
|
payload,
|
|
5407
|
-
|
|
5814
|
+
getConsoleClientDefaultConfig(authorization)
|
|
5408
5815
|
);
|
|
5409
5816
|
});
|
|
5410
5817
|
},
|
|
5411
5818
|
remove(payload, authorization) {
|
|
5412
5819
|
return __async(this, null, function* () {
|
|
5413
|
-
return
|
|
5414
|
-
`/
|
|
5415
|
-
|
|
5820
|
+
return consoleClientInstance.delete(
|
|
5821
|
+
`/app/${encodeURIComponent(payload.appId)}/blocks/authorization`,
|
|
5822
|
+
getConsoleClientDefaultConfig(authorization)
|
|
5416
5823
|
);
|
|
5417
5824
|
});
|
|
5418
5825
|
}
|
|
5419
5826
|
};
|
|
5420
5827
|
|
|
5421
|
-
// src/apis/platform/
|
|
5422
|
-
var
|
|
5828
|
+
// src/apis/platform/console/app/blocks/deployment/api.ts
|
|
5829
|
+
var platformConsoleAppDeploymentApi = {
|
|
5423
5830
|
getAggregate(appId, authorization) {
|
|
5424
5831
|
return __async(this, null, function* () {
|
|
5425
|
-
return
|
|
5426
|
-
`/
|
|
5427
|
-
|
|
5832
|
+
return consoleClientInstance.get(
|
|
5833
|
+
`/app/${encodeURIComponent(appId)}/blocks/deployment/aggregate`,
|
|
5834
|
+
getConsoleClientDefaultConfig(authorization)
|
|
5428
5835
|
);
|
|
5429
5836
|
});
|
|
5430
5837
|
},
|
|
5431
5838
|
get(appId, authorization) {
|
|
5432
5839
|
return __async(this, null, function* () {
|
|
5433
|
-
return
|
|
5434
|
-
`/
|
|
5435
|
-
|
|
5840
|
+
return consoleClientInstance.get(
|
|
5841
|
+
`/app/${encodeURIComponent(appId)}/blocks/deployment`,
|
|
5842
|
+
getConsoleClientDefaultConfig(authorization)
|
|
5436
5843
|
);
|
|
5437
5844
|
});
|
|
5438
5845
|
},
|
|
5439
5846
|
link(payload, authorization) {
|
|
5440
5847
|
return __async(this, null, function* () {
|
|
5441
|
-
return
|
|
5442
|
-
`/
|
|
5848
|
+
return consoleClientInstance.put(
|
|
5849
|
+
`/app/${encodeURIComponent(payload.appId)}/blocks/deployment`,
|
|
5443
5850
|
payload,
|
|
5444
|
-
|
|
5851
|
+
getConsoleClientDefaultConfig(authorization)
|
|
5445
5852
|
);
|
|
5446
5853
|
});
|
|
5447
5854
|
},
|
|
5448
5855
|
unlink(payload, authorization) {
|
|
5449
5856
|
return __async(this, null, function* () {
|
|
5450
|
-
return
|
|
5451
|
-
`/
|
|
5857
|
+
return consoleClientInstance.delete(
|
|
5858
|
+
`/app/${encodeURIComponent(
|
|
5452
5859
|
payload.appId
|
|
5453
|
-
)}/blocks/
|
|
5860
|
+
)}/blocks/deployment?${new URLSearchParams(
|
|
5454
5861
|
payload
|
|
5455
5862
|
).toString()}`,
|
|
5456
|
-
|
|
5863
|
+
getConsoleClientDefaultConfig(authorization)
|
|
5457
5864
|
);
|
|
5458
5865
|
});
|
|
5459
5866
|
},
|
|
5460
5867
|
upsert(payload, authorization) {
|
|
5461
5868
|
return __async(this, null, function* () {
|
|
5462
|
-
return
|
|
5463
|
-
`/
|
|
5869
|
+
return consoleClientInstance.patch(
|
|
5870
|
+
`/app/${encodeURIComponent(payload.appId)}/blocks/deployment`,
|
|
5464
5871
|
payload,
|
|
5465
|
-
|
|
5466
|
-
);
|
|
5467
|
-
});
|
|
5468
|
-
},
|
|
5469
|
-
seed(payload, authorization) {
|
|
5470
|
-
return __async(this, null, function* () {
|
|
5471
|
-
return adapterClientInstance.post(
|
|
5472
|
-
`/console/app/${encodeURIComponent(
|
|
5473
|
-
payload.appId
|
|
5474
|
-
)}/blocks/repository/seed`,
|
|
5475
|
-
payload,
|
|
5476
|
-
getAdapterClientDefaultConfig(authorization)
|
|
5872
|
+
getConsoleClientDefaultConfig(authorization)
|
|
5477
5873
|
);
|
|
5478
5874
|
});
|
|
5479
5875
|
}
|
|
5480
5876
|
};
|
|
5481
5877
|
|
|
5482
|
-
// src/apis/platform/
|
|
5483
|
-
var
|
|
5484
|
-
getAggregate(appId, authorization) {
|
|
5485
|
-
return __async(this, null, function* () {
|
|
5486
|
-
return adapterClientInstance.get(
|
|
5487
|
-
`/console/app/${encodeURIComponent(appId)}/blocks/storage/aggregate`,
|
|
5488
|
-
getAdapterClientDefaultConfig(authorization)
|
|
5489
|
-
);
|
|
5490
|
-
});
|
|
5491
|
-
},
|
|
5878
|
+
// src/apis/platform/console/app/blocks/monetization/api.ts
|
|
5879
|
+
var platformConsoleAppMonetizationApi = {
|
|
5492
5880
|
get(appId, authorization) {
|
|
5493
5881
|
return __async(this, null, function* () {
|
|
5494
|
-
return
|
|
5495
|
-
`/
|
|
5496
|
-
|
|
5882
|
+
return consoleClientInstance.get(
|
|
5883
|
+
`/app/${encodeURIComponent(appId)}/blocks/monetization`,
|
|
5884
|
+
getConsoleClientDefaultConfig(authorization)
|
|
5497
5885
|
);
|
|
5498
5886
|
});
|
|
5499
5887
|
},
|
|
5500
|
-
|
|
5888
|
+
upsert(payload, authorization) {
|
|
5501
5889
|
return __async(this, null, function* () {
|
|
5502
|
-
return
|
|
5503
|
-
`/
|
|
5890
|
+
return consoleClientInstance.post(
|
|
5891
|
+
`/app/${encodeURIComponent(payload.appId)}/blocks/monetization`,
|
|
5504
5892
|
payload,
|
|
5505
|
-
|
|
5893
|
+
getConsoleClientDefaultConfig(authorization)
|
|
5506
5894
|
);
|
|
5507
5895
|
});
|
|
5508
5896
|
},
|
|
5509
|
-
|
|
5510
|
-
return __async(this, null, function* () {
|
|
5511
|
-
return adapterClientInstance.delete(
|
|
5512
|
-
`/console/app/${encodeURIComponent(
|
|
5513
|
-
payload.appId
|
|
5514
|
-
)}/blocks/storage?${new URLSearchParams(
|
|
5515
|
-
payload
|
|
5516
|
-
).toString()}`,
|
|
5517
|
-
getAdapterClientDefaultConfig(authorization)
|
|
5518
|
-
);
|
|
5519
|
-
});
|
|
5520
|
-
},
|
|
5521
|
-
upsert(payload, authorization) {
|
|
5897
|
+
remove(payload, authorization) {
|
|
5522
5898
|
return __async(this, null, function* () {
|
|
5523
|
-
return
|
|
5524
|
-
`/
|
|
5525
|
-
|
|
5526
|
-
getAdapterClientDefaultConfig(authorization)
|
|
5899
|
+
return consoleClientInstance.delete(
|
|
5900
|
+
`/app/${encodeURIComponent(payload.appId)}/blocks/monetization`,
|
|
5901
|
+
getConsoleClientDefaultConfig(authorization)
|
|
5527
5902
|
);
|
|
5528
5903
|
});
|
|
5529
5904
|
}
|
|
5530
5905
|
};
|
|
5531
5906
|
|
|
5532
|
-
// src/apis/platform/
|
|
5533
|
-
var
|
|
5534
|
-
get(appId,
|
|
5907
|
+
// src/apis/platform/console/app/blocks/properties/property/api.ts
|
|
5908
|
+
var platformConsoleAppPropertyApi = {
|
|
5909
|
+
get(appId, propertyId, authorization) {
|
|
5535
5910
|
return __async(this, null, function* () {
|
|
5536
|
-
return
|
|
5537
|
-
`/
|
|
5911
|
+
return consoleClientInstance.get(
|
|
5912
|
+
`/app/${encodeURIComponent(
|
|
5538
5913
|
appId
|
|
5539
|
-
)}/blocks/
|
|
5540
|
-
|
|
5914
|
+
)}/blocks/properties/${encodeURIComponent(propertyId)}`,
|
|
5915
|
+
getConsoleClientDefaultConfig(authorization)
|
|
5541
5916
|
);
|
|
5542
5917
|
});
|
|
5543
5918
|
},
|
|
5544
5919
|
upsert(payload, authorization) {
|
|
5545
5920
|
return __async(this, null, function* () {
|
|
5546
|
-
return
|
|
5547
|
-
`/
|
|
5921
|
+
return consoleClientInstance.post(
|
|
5922
|
+
`/app/${encodeURIComponent(
|
|
5548
5923
|
payload.appId
|
|
5549
|
-
)}/blocks/
|
|
5924
|
+
)}/blocks/properties/${encodeURIComponent(payload.propertyId)}`,
|
|
5550
5925
|
payload,
|
|
5551
|
-
|
|
5926
|
+
getConsoleClientDefaultConfig(authorization)
|
|
5552
5927
|
);
|
|
5553
5928
|
});
|
|
5554
5929
|
},
|
|
5555
5930
|
remove(payload, authorization) {
|
|
5556
5931
|
return __async(this, null, function* () {
|
|
5557
|
-
return
|
|
5558
|
-
`/
|
|
5559
|
-
|
|
5560
|
-
)}/blocks/widgets/${encodeURIComponent(payload.widgetId)}`,
|
|
5561
|
-
getAdapterClientDefaultConfig(authorization)
|
|
5932
|
+
return consoleClientInstance.delete(
|
|
5933
|
+
`/app/${encodeURIComponent(payload.appId)}/blocks/properties/${payload.propertyId}`,
|
|
5934
|
+
getConsoleClientDefaultConfig(authorization)
|
|
5562
5935
|
);
|
|
5563
5936
|
});
|
|
5564
5937
|
}
|
|
5565
5938
|
};
|
|
5566
5939
|
|
|
5567
|
-
// src/apis/platform/
|
|
5568
|
-
var
|
|
5569
|
-
|
|
5940
|
+
// src/apis/platform/console/app/blocks/properties/api.ts
|
|
5941
|
+
var platformConsoleAppPropertiesApi = {
|
|
5942
|
+
property: platformConsoleAppPropertyApi,
|
|
5570
5943
|
get(appId, authorization) {
|
|
5571
5944
|
return __async(this, null, function* () {
|
|
5572
|
-
return
|
|
5573
|
-
`/
|
|
5574
|
-
|
|
5945
|
+
return consoleClientInstance.get(
|
|
5946
|
+
`/app/${encodeURIComponent(appId)}/blocks/properties`,
|
|
5947
|
+
getConsoleClientDefaultConfig(authorization)
|
|
5575
5948
|
);
|
|
5576
5949
|
});
|
|
5577
5950
|
},
|
|
5578
5951
|
upsert(payload, authorization) {
|
|
5579
5952
|
return __async(this, null, function* () {
|
|
5580
|
-
return
|
|
5581
|
-
`/
|
|
5953
|
+
return consoleClientInstance.post(
|
|
5954
|
+
`/app/${encodeURIComponent(payload.appId)}/blocks/properties`,
|
|
5582
5955
|
payload,
|
|
5583
|
-
|
|
5956
|
+
getConsoleClientDefaultConfig(authorization)
|
|
5584
5957
|
);
|
|
5585
5958
|
});
|
|
5586
5959
|
},
|
|
5587
5960
|
remove(payload, authorization) {
|
|
5588
5961
|
return __async(this, null, function* () {
|
|
5589
|
-
return
|
|
5590
|
-
`/
|
|
5591
|
-
|
|
5962
|
+
return consoleClientInstance.delete(
|
|
5963
|
+
`/app/${encodeURIComponent(payload.appId)}/blocks/properties`,
|
|
5964
|
+
getConsoleClientDefaultConfig(authorization)
|
|
5592
5965
|
);
|
|
5593
5966
|
});
|
|
5594
5967
|
}
|
|
5595
5968
|
};
|
|
5596
5969
|
|
|
5597
|
-
// src/apis/platform/
|
|
5598
|
-
var
|
|
5599
|
-
authorization
|
|
5600
|
-
monetization: platformAdapterAppMonetizationApi,
|
|
5601
|
-
repository: platformAdapterAppRepositoryApi,
|
|
5602
|
-
deployment: platformAdapterAppDeploymentApi,
|
|
5603
|
-
storage: platformAdapterAppStorageApi,
|
|
5604
|
-
properties: platformAdapterAppPropertiesApi,
|
|
5605
|
-
widgets: platformAdapterAppWidgetsApi
|
|
5606
|
-
};
|
|
5607
|
-
|
|
5608
|
-
// src/apis/platform/adapter/app/templates/api.ts
|
|
5609
|
-
var platformAdapterAppTemplatesApi = {
|
|
5610
|
-
getTemplates(authorization) {
|
|
5970
|
+
// src/apis/platform/console/app/blocks/repository/api.ts
|
|
5971
|
+
var platformConsoleAppRepositoryApi = {
|
|
5972
|
+
getAggregate(appId, authorization) {
|
|
5611
5973
|
return __async(this, null, function* () {
|
|
5612
|
-
return
|
|
5613
|
-
|
|
5614
|
-
|
|
5974
|
+
return consoleClientInstance.get(
|
|
5975
|
+
`/app/${encodeURIComponent(appId)}/blocks/repository/aggregate`,
|
|
5976
|
+
getConsoleClientDefaultConfig(authorization)
|
|
5615
5977
|
);
|
|
5616
5978
|
});
|
|
5617
5979
|
},
|
|
5618
|
-
|
|
5619
|
-
return __async(this, null, function* () {
|
|
5620
|
-
return adapterClientInstance.get(
|
|
5621
|
-
"/console/app/templates/repository",
|
|
5622
|
-
getAdapterClientDefaultConfig(authorization)
|
|
5623
|
-
);
|
|
5624
|
-
});
|
|
5625
|
-
}
|
|
5626
|
-
};
|
|
5627
|
-
|
|
5628
|
-
// src/apis/platform/adapter/app/variables/api.ts
|
|
5629
|
-
var platformAdapterAppVariablesApi = {
|
|
5630
|
-
getVariables(appId, decrypted, authorization) {
|
|
5980
|
+
get(appId, authorization) {
|
|
5631
5981
|
return __async(this, null, function* () {
|
|
5632
|
-
|
|
5633
|
-
`/
|
|
5634
|
-
|
|
5635
|
-
params: {
|
|
5636
|
-
decrypted
|
|
5637
|
-
}
|
|
5638
|
-
}, getAdapterClientDefaultConfig(authorization))
|
|
5982
|
+
return consoleClientInstance.get(
|
|
5983
|
+
`/app/${encodeURIComponent(appId)}/blocks/repository`,
|
|
5984
|
+
getConsoleClientDefaultConfig(authorization)
|
|
5639
5985
|
);
|
|
5640
|
-
return response.data;
|
|
5641
5986
|
});
|
|
5642
5987
|
},
|
|
5643
|
-
|
|
5644
|
-
return __async(this, null, function* () {
|
|
5645
|
-
const response = yield adapterClientInstance.get(
|
|
5646
|
-
`/console/app/${encodeURIComponent(appId)}/variables/${encodeURIComponent(
|
|
5647
|
-
key
|
|
5648
|
-
)}`,
|
|
5649
|
-
getAdapterClientDefaultConfig(authorization)
|
|
5650
|
-
);
|
|
5651
|
-
return response.data;
|
|
5652
|
-
});
|
|
5653
|
-
},
|
|
5654
|
-
syncVariable(appId, key, payload, authorization) {
|
|
5988
|
+
link(payload, authorization) {
|
|
5655
5989
|
return __async(this, null, function* () {
|
|
5656
|
-
|
|
5657
|
-
`/
|
|
5658
|
-
key
|
|
5659
|
-
)}/sync`,
|
|
5990
|
+
return consoleClientInstance.put(
|
|
5991
|
+
`/app/${encodeURIComponent(payload.appId)}/blocks/repository`,
|
|
5660
5992
|
payload,
|
|
5661
|
-
|
|
5993
|
+
getConsoleClientDefaultConfig(authorization)
|
|
5662
5994
|
);
|
|
5663
5995
|
});
|
|
5664
5996
|
},
|
|
5665
|
-
|
|
5997
|
+
unlink(payload, authorization) {
|
|
5666
5998
|
return __async(this, null, function* () {
|
|
5667
|
-
|
|
5668
|
-
`/
|
|
5669
|
-
|
|
5670
|
-
)}
|
|
5671
|
-
|
|
5672
|
-
|
|
5999
|
+
return consoleClientInstance.delete(
|
|
6000
|
+
`/app/${encodeURIComponent(
|
|
6001
|
+
payload.appId
|
|
6002
|
+
)}/blocks/repository?${new URLSearchParams(
|
|
6003
|
+
payload
|
|
6004
|
+
).toString()}`,
|
|
6005
|
+
getConsoleClientDefaultConfig(authorization)
|
|
5673
6006
|
);
|
|
5674
6007
|
});
|
|
5675
6008
|
},
|
|
5676
|
-
|
|
6009
|
+
upsert(payload, authorization) {
|
|
5677
6010
|
return __async(this, null, function* () {
|
|
5678
|
-
|
|
5679
|
-
`/
|
|
5680
|
-
|
|
5681
|
-
)
|
|
5682
|
-
data,
|
|
5683
|
-
getAdapterClientDefaultConfig(authorization)
|
|
6011
|
+
return consoleClientInstance.patch(
|
|
6012
|
+
`/app/${encodeURIComponent(payload.appId)}/blocks/repository`,
|
|
6013
|
+
payload,
|
|
6014
|
+
getConsoleClientDefaultConfig(authorization)
|
|
5684
6015
|
);
|
|
5685
6016
|
});
|
|
5686
6017
|
},
|
|
5687
|
-
|
|
6018
|
+
seed(payload, authorization) {
|
|
5688
6019
|
return __async(this, null, function* () {
|
|
5689
|
-
|
|
5690
|
-
`/
|
|
5691
|
-
|
|
5692
|
-
)
|
|
6020
|
+
return consoleClientInstance.post(
|
|
6021
|
+
`/app/${encodeURIComponent(payload.appId)}/blocks/repository/seed`,
|
|
6022
|
+
payload,
|
|
6023
|
+
getConsoleClientDefaultConfig(authorization)
|
|
5693
6024
|
);
|
|
5694
6025
|
});
|
|
5695
6026
|
}
|
|
5696
6027
|
};
|
|
5697
6028
|
|
|
5698
|
-
// src/apis/platform/
|
|
5699
|
-
var
|
|
5700
|
-
|
|
5701
|
-
variables: platformAdapterAppVariablesApi,
|
|
5702
|
-
templates: platformAdapterAppTemplatesApi,
|
|
5703
|
-
push(payload, authorization) {
|
|
6029
|
+
// src/apis/platform/console/app/blocks/storage/api.ts
|
|
6030
|
+
var platformConsoleAppStorageApi = {
|
|
6031
|
+
getAggregate(appId, authorization) {
|
|
5704
6032
|
return __async(this, null, function* () {
|
|
5705
|
-
return
|
|
5706
|
-
`/
|
|
5707
|
-
|
|
5708
|
-
getAdapterClientDefaultConfig(authorization)
|
|
6033
|
+
return consoleClientInstance.get(
|
|
6034
|
+
`/app/${encodeURIComponent(appId)}/blocks/storage/aggregate`,
|
|
6035
|
+
getConsoleClientDefaultConfig(authorization)
|
|
5709
6036
|
);
|
|
5710
6037
|
});
|
|
5711
6038
|
},
|
|
5712
|
-
|
|
6039
|
+
get(appId, authorization) {
|
|
5713
6040
|
return __async(this, null, function* () {
|
|
5714
|
-
return
|
|
5715
|
-
`/
|
|
5716
|
-
|
|
6041
|
+
return consoleClientInstance.get(
|
|
6042
|
+
`/app/${encodeURIComponent(appId)}/blocks/storage`,
|
|
6043
|
+
getConsoleClientDefaultConfig(authorization)
|
|
5717
6044
|
);
|
|
5718
6045
|
});
|
|
5719
6046
|
},
|
|
5720
|
-
|
|
6047
|
+
link(payload, authorization) {
|
|
5721
6048
|
return __async(this, null, function* () {
|
|
5722
|
-
return
|
|
5723
|
-
`/
|
|
6049
|
+
return consoleClientInstance.put(
|
|
6050
|
+
`/app/${encodeURIComponent(payload.appId)}/blocks/storage`,
|
|
5724
6051
|
payload,
|
|
5725
|
-
|
|
6052
|
+
getConsoleClientDefaultConfig(authorization)
|
|
5726
6053
|
);
|
|
5727
6054
|
});
|
|
5728
6055
|
},
|
|
5729
|
-
|
|
6056
|
+
unlink(payload, authorization) {
|
|
5730
6057
|
return __async(this, null, function* () {
|
|
5731
|
-
return
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
);
|
|
5739
|
-
});
|
|
5740
|
-
}
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
"/integrations/bigcommerce/events/subscribe",
|
|
5750
|
-
payload,
|
|
5751
|
-
getBigCommerceClientConfig(authorization)
|
|
5752
|
-
);
|
|
5753
|
-
});
|
|
5754
|
-
},
|
|
5755
|
-
unsubscribe(payload, authorization) {
|
|
5756
|
-
return __async(this, null, function* () {
|
|
5757
|
-
yield adapterClientInstance.post(
|
|
5758
|
-
"/integrations/bigcommerce/events/unsubscribe",
|
|
5759
|
-
payload,
|
|
5760
|
-
getBigCommerceClientConfig(authorization)
|
|
5761
|
-
);
|
|
5762
|
-
});
|
|
5763
|
-
}
|
|
5764
|
-
}
|
|
5765
|
-
};
|
|
5766
|
-
|
|
5767
|
-
// src/apis/platform/adapter/integrations/hubspot/api.ts
|
|
5768
|
-
var platformAdapterHubspotApi = {
|
|
5769
|
-
events: {
|
|
5770
|
-
subscribe(payload, authorization) {
|
|
5771
|
-
return __async(this, null, function* () {
|
|
5772
|
-
yield adapterClientInstance.post(
|
|
5773
|
-
"/integrations/hubspot/events/subscribe",
|
|
5774
|
-
payload,
|
|
5775
|
-
getHubspotClientConfig(authorization)
|
|
5776
|
-
);
|
|
5777
|
-
});
|
|
5778
|
-
},
|
|
5779
|
-
unsubscribe(payload, authorization) {
|
|
5780
|
-
return __async(this, null, function* () {
|
|
5781
|
-
yield adapterClientInstance.post(
|
|
5782
|
-
"/integrations/hubspot/events/unsubscribe",
|
|
5783
|
-
payload,
|
|
5784
|
-
getHubspotClientConfig(authorization)
|
|
5785
|
-
);
|
|
5786
|
-
});
|
|
5787
|
-
}
|
|
5788
|
-
}
|
|
5789
|
-
};
|
|
5790
|
-
|
|
5791
|
-
// src/apis/platform/adapter/integrations/mailchimp/api.ts
|
|
5792
|
-
var platformAdapterMailchimpApi = {
|
|
5793
|
-
events: {
|
|
5794
|
-
subscribe(payload, authorization) {
|
|
5795
|
-
return __async(this, null, function* () {
|
|
5796
|
-
yield adapterClientInstance.post(
|
|
5797
|
-
"/integrations/mailchimp/events/subscribe",
|
|
5798
|
-
payload,
|
|
5799
|
-
getMailchimpClientConfig(authorization)
|
|
5800
|
-
);
|
|
5801
|
-
});
|
|
5802
|
-
},
|
|
5803
|
-
unsubscribe(payload, authorization) {
|
|
5804
|
-
return __async(this, null, function* () {
|
|
5805
|
-
yield adapterClientInstance.post(
|
|
5806
|
-
"/integrations/mailchimp/events/unsubscribe",
|
|
5807
|
-
payload,
|
|
5808
|
-
getMailchimpClientConfig(authorization)
|
|
5809
|
-
);
|
|
5810
|
-
});
|
|
5811
|
-
}
|
|
5812
|
-
}
|
|
5813
|
-
};
|
|
5814
|
-
|
|
5815
|
-
// src/apis/platform/adapter/integrations/shopify/api.ts
|
|
5816
|
-
var platformAdapterShopifyApi = {
|
|
5817
|
-
events: {
|
|
5818
|
-
subscribe(payload, authorization) {
|
|
5819
|
-
return __async(this, null, function* () {
|
|
5820
|
-
yield adapterClientInstance.post(
|
|
5821
|
-
"/integrations/shopify/events/subscribe",
|
|
5822
|
-
payload,
|
|
5823
|
-
getShopifyClientConfig(authorization)
|
|
5824
|
-
);
|
|
5825
|
-
});
|
|
5826
|
-
},
|
|
5827
|
-
unsubscribe(payload, authorization) {
|
|
5828
|
-
return __async(this, null, function* () {
|
|
5829
|
-
yield adapterClientInstance.post(
|
|
5830
|
-
"/integrations/shopify/events/unsubscribe",
|
|
5831
|
-
payload,
|
|
5832
|
-
getShopifyClientConfig(authorization)
|
|
5833
|
-
);
|
|
5834
|
-
});
|
|
5835
|
-
}
|
|
6058
|
+
return consoleClientInstance.delete(
|
|
6059
|
+
`/app/${encodeURIComponent(
|
|
6060
|
+
payload.appId
|
|
6061
|
+
)}/blocks/storage?${new URLSearchParams(
|
|
6062
|
+
payload
|
|
6063
|
+
).toString()}`,
|
|
6064
|
+
getConsoleClientDefaultConfig(authorization)
|
|
6065
|
+
);
|
|
6066
|
+
});
|
|
6067
|
+
},
|
|
6068
|
+
upsert(payload, authorization) {
|
|
6069
|
+
return __async(this, null, function* () {
|
|
6070
|
+
return consoleClientInstance.patch(
|
|
6071
|
+
`/app/${encodeURIComponent(payload.appId)}/blocks/storage`,
|
|
6072
|
+
payload,
|
|
6073
|
+
getConsoleClientDefaultConfig(authorization)
|
|
6074
|
+
);
|
|
6075
|
+
});
|
|
5836
6076
|
}
|
|
5837
6077
|
};
|
|
5838
6078
|
|
|
5839
|
-
// src/apis/platform/
|
|
5840
|
-
var
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
return
|
|
5844
|
-
|
|
5845
|
-
|
|
5846
|
-
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
|
|
5851
|
-
|
|
5852
|
-
|
|
5853
|
-
|
|
5854
|
-
|
|
5855
|
-
payload
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
6079
|
+
// src/apis/platform/console/app/blocks/widgets/widget/api.ts
|
|
6080
|
+
var platformConsoleAppWidgetApi = {
|
|
6081
|
+
get(appId, widgetId, authorization) {
|
|
6082
|
+
return __async(this, null, function* () {
|
|
6083
|
+
return consoleClientInstance.get(
|
|
6084
|
+
`/app/${encodeURIComponent(
|
|
6085
|
+
appId
|
|
6086
|
+
)}/blocks/widgets/${encodeURIComponent(widgetId)}`,
|
|
6087
|
+
getConsoleClientDefaultConfig(authorization)
|
|
6088
|
+
);
|
|
6089
|
+
});
|
|
6090
|
+
},
|
|
6091
|
+
upsert(payload, authorization) {
|
|
6092
|
+
return __async(this, null, function* () {
|
|
6093
|
+
return consoleClientInstance.post(
|
|
6094
|
+
`/app/${encodeURIComponent(
|
|
6095
|
+
payload.appId
|
|
6096
|
+
)}/blocks/widgets/${encodeURIComponent(payload.widgetId)}`,
|
|
6097
|
+
payload,
|
|
6098
|
+
getConsoleClientDefaultConfig(authorization)
|
|
6099
|
+
);
|
|
6100
|
+
});
|
|
6101
|
+
},
|
|
6102
|
+
remove(payload, authorization) {
|
|
6103
|
+
return __async(this, null, function* () {
|
|
6104
|
+
return consoleClientInstance.delete(
|
|
6105
|
+
`/app/${encodeURIComponent(
|
|
6106
|
+
payload.appId
|
|
6107
|
+
)}/blocks/widgets/${encodeURIComponent(payload.widgetId)}`,
|
|
6108
|
+
getConsoleClientDefaultConfig(authorization)
|
|
6109
|
+
);
|
|
6110
|
+
});
|
|
5860
6111
|
}
|
|
5861
6112
|
};
|
|
5862
6113
|
|
|
5863
|
-
// src/apis/platform/
|
|
5864
|
-
var
|
|
5865
|
-
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
return
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
|
|
6114
|
+
// src/apis/platform/console/app/blocks/widgets/api.ts
|
|
6115
|
+
var platformConsoleAppWidgetsApi = {
|
|
6116
|
+
widget: platformConsoleAppWidgetApi,
|
|
6117
|
+
get(appId, authorization) {
|
|
6118
|
+
return __async(this, null, function* () {
|
|
6119
|
+
return consoleClientInstance.get(
|
|
6120
|
+
`/app/${encodeURIComponent(appId)}/blocks/widgets`,
|
|
6121
|
+
getConsoleClientDefaultConfig(authorization)
|
|
6122
|
+
);
|
|
6123
|
+
});
|
|
6124
|
+
},
|
|
6125
|
+
upsert(payload, authorization) {
|
|
6126
|
+
return __async(this, null, function* () {
|
|
6127
|
+
return consoleClientInstance.post(
|
|
6128
|
+
`/app/${encodeURIComponent(payload.appId)}/blocks/widgets`,
|
|
6129
|
+
payload,
|
|
6130
|
+
getConsoleClientDefaultConfig(authorization)
|
|
6131
|
+
);
|
|
6132
|
+
});
|
|
6133
|
+
},
|
|
6134
|
+
remove(payload, authorization) {
|
|
6135
|
+
return __async(this, null, function* () {
|
|
6136
|
+
return consoleClientInstance.delete(
|
|
6137
|
+
`/app/${encodeURIComponent(payload.appId)}/blocks/widgets`,
|
|
6138
|
+
getConsoleClientDefaultConfig(authorization)
|
|
6139
|
+
);
|
|
6140
|
+
});
|
|
5884
6141
|
}
|
|
5885
6142
|
};
|
|
5886
6143
|
|
|
5887
|
-
// src/apis/platform/
|
|
5888
|
-
var
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
6144
|
+
// src/apis/platform/console/app/blocks/api.ts
|
|
6145
|
+
var platformConsoleAppBlocksApi = {
|
|
6146
|
+
authorization: platformConsoleAppAuthorizationApi,
|
|
6147
|
+
monetization: platformConsoleAppMonetizationApi,
|
|
6148
|
+
repository: platformConsoleAppRepositoryApi,
|
|
6149
|
+
deployment: platformConsoleAppDeploymentApi,
|
|
6150
|
+
storage: platformConsoleAppStorageApi,
|
|
6151
|
+
properties: platformConsoleAppPropertiesApi,
|
|
6152
|
+
widgets: platformConsoleAppWidgetsApi
|
|
5895
6153
|
};
|
|
5896
6154
|
|
|
5897
|
-
// src/apis/platform/
|
|
5898
|
-
var
|
|
5899
|
-
|
|
5900
|
-
integrations: platformAdapterIntegrationsApi,
|
|
5901
|
-
log(payload, authorization) {
|
|
6155
|
+
// src/apis/platform/console/app/templates/api.ts
|
|
6156
|
+
var platformConsoleAppTemplatesApi = {
|
|
6157
|
+
getTemplates(authorization) {
|
|
5902
6158
|
return __async(this, null, function* () {
|
|
5903
|
-
return
|
|
5904
|
-
"/
|
|
5905
|
-
|
|
5906
|
-
|
|
6159
|
+
return consoleClientInstance.get(
|
|
6160
|
+
"/app/templates",
|
|
6161
|
+
getConsoleClientDefaultConfig(authorization)
|
|
6162
|
+
);
|
|
6163
|
+
});
|
|
6164
|
+
},
|
|
6165
|
+
getRepositoryTemplates(authorization) {
|
|
6166
|
+
return __async(this, null, function* () {
|
|
6167
|
+
return consoleClientInstance.get(
|
|
6168
|
+
"/app/templates/repository",
|
|
6169
|
+
getConsoleClientDefaultConfig(authorization)
|
|
5907
6170
|
);
|
|
5908
6171
|
});
|
|
5909
6172
|
}
|
|
5910
6173
|
};
|
|
5911
6174
|
|
|
5912
|
-
// src/apis/platform/
|
|
5913
|
-
var
|
|
5914
|
-
|
|
6175
|
+
// src/apis/platform/console/app/variables/api.ts
|
|
6176
|
+
var platformConsoleAppVariablesApi = {
|
|
6177
|
+
getVariables(appId, decrypted, authorization) {
|
|
5915
6178
|
return __async(this, null, function* () {
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
throw error;
|
|
5926
|
-
}
|
|
5927
|
-
}
|
|
6179
|
+
const response = yield consoleClientInstance.get(
|
|
6180
|
+
`/app/${encodeURIComponent(appId)}/variables`,
|
|
6181
|
+
__spreadValues({
|
|
6182
|
+
params: {
|
|
6183
|
+
decrypted
|
|
6184
|
+
}
|
|
6185
|
+
}, getConsoleClientDefaultConfig(authorization))
|
|
6186
|
+
);
|
|
6187
|
+
return response.data;
|
|
5928
6188
|
});
|
|
5929
6189
|
},
|
|
5930
|
-
|
|
6190
|
+
getVariable(appId, key, authorization) {
|
|
5931
6191
|
return __async(this, null, function* () {
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
}
|
|
5943
|
-
|
|
5944
|
-
}
|
|
5945
|
-
|
|
6192
|
+
const response = yield consoleClientInstance.get(
|
|
6193
|
+
`/app/${encodeURIComponent(appId)}/variables/${encodeURIComponent(key)}`,
|
|
6194
|
+
getConsoleClientDefaultConfig(authorization)
|
|
6195
|
+
);
|
|
6196
|
+
return response.data;
|
|
6197
|
+
});
|
|
6198
|
+
},
|
|
6199
|
+
syncVariable(appId, key, payload, authorization) {
|
|
6200
|
+
return __async(this, null, function* () {
|
|
6201
|
+
yield consoleClientInstance.post(
|
|
6202
|
+
`/app/${encodeURIComponent(appId)}/variables/${encodeURIComponent(
|
|
6203
|
+
key
|
|
6204
|
+
)}/sync`,
|
|
6205
|
+
payload,
|
|
6206
|
+
getConsoleClientDefaultConfig(authorization)
|
|
6207
|
+
);
|
|
6208
|
+
});
|
|
6209
|
+
},
|
|
6210
|
+
createVariable(appId, data, authorization) {
|
|
6211
|
+
return __async(this, null, function* () {
|
|
6212
|
+
yield consoleClientInstance.post(
|
|
6213
|
+
`/app/${encodeURIComponent(appId)}/variables/${encodeURIComponent(
|
|
6214
|
+
data.key
|
|
6215
|
+
)}`,
|
|
6216
|
+
data,
|
|
6217
|
+
getConsoleClientDefaultConfig(authorization)
|
|
6218
|
+
);
|
|
6219
|
+
});
|
|
6220
|
+
},
|
|
6221
|
+
editVariable(appId, data, authorization) {
|
|
6222
|
+
return __async(this, null, function* () {
|
|
6223
|
+
yield consoleClientInstance.post(
|
|
6224
|
+
`/app/${encodeURIComponent(appId)}/variables/${encodeURIComponent(
|
|
6225
|
+
data.key
|
|
6226
|
+
)}/edit`,
|
|
6227
|
+
data,
|
|
6228
|
+
getConsoleClientDefaultConfig(authorization)
|
|
6229
|
+
);
|
|
6230
|
+
});
|
|
6231
|
+
},
|
|
6232
|
+
deleteVariable(appId, key) {
|
|
6233
|
+
return __async(this, null, function* () {
|
|
6234
|
+
yield consoleClientInstance.delete(
|
|
6235
|
+
`/app/${encodeURIComponent(appId)}/variables/${encodeURIComponent(key)}`
|
|
6236
|
+
);
|
|
5946
6237
|
});
|
|
5947
6238
|
}
|
|
5948
6239
|
};
|
|
5949
6240
|
|
|
5950
|
-
// src/apis/platform/
|
|
5951
|
-
var
|
|
5952
|
-
|
|
6241
|
+
// src/apis/platform/console/app/api.ts
|
|
6242
|
+
var platformConsoleAppApi = {
|
|
6243
|
+
blocks: platformConsoleAppBlocksApi,
|
|
6244
|
+
variables: platformConsoleAppVariablesApi,
|
|
6245
|
+
templates: platformConsoleAppTemplatesApi,
|
|
6246
|
+
push(payload, authorization) {
|
|
5953
6247
|
return __async(this, null, function* () {
|
|
5954
|
-
|
|
5955
|
-
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
|
|
5959
|
-
} catch (error) {
|
|
5960
|
-
if (error instanceof Error) {
|
|
5961
|
-
throw new Error(`Invoices couldn't be fetched. [${error.message}]`);
|
|
5962
|
-
} else {
|
|
5963
|
-
throw error;
|
|
5964
|
-
}
|
|
5965
|
-
}
|
|
6248
|
+
return consoleClientInstance.post(
|
|
6249
|
+
`/app${payload.manifest.id ? `/${encodeURIComponent(payload.manifest.id)}` : ""}`,
|
|
6250
|
+
payload,
|
|
6251
|
+
getConsoleClientDefaultConfig(authorization)
|
|
6252
|
+
);
|
|
5966
6253
|
});
|
|
5967
6254
|
},
|
|
5968
|
-
|
|
6255
|
+
pull(appId, authorization) {
|
|
5969
6256
|
return __async(this, null, function* () {
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
}
|
|
6257
|
+
return consoleClientInstance.get(
|
|
6258
|
+
`/app/${encodeURIComponent(appId)}`,
|
|
6259
|
+
getConsoleClientDefaultConfig(authorization)
|
|
6260
|
+
);
|
|
6261
|
+
});
|
|
6262
|
+
},
|
|
6263
|
+
verify(payload, authorization) {
|
|
6264
|
+
return __async(this, null, function* () {
|
|
6265
|
+
return consoleClientInstance.post(
|
|
6266
|
+
`/app/${encodeURIComponent(payload.appId)}/verify`,
|
|
6267
|
+
payload,
|
|
6268
|
+
getConsoleClientDefaultConfig(authorization)
|
|
6269
|
+
);
|
|
6270
|
+
});
|
|
6271
|
+
},
|
|
6272
|
+
status(sagaId, authorization) {
|
|
6273
|
+
return __async(this, null, function* () {
|
|
6274
|
+
return consoleClientInstance.get(
|
|
6275
|
+
"/app/status",
|
|
6276
|
+
__spreadValues({
|
|
6277
|
+
params: {
|
|
6278
|
+
sagaId
|
|
6279
|
+
}
|
|
6280
|
+
}, getConsoleClientDefaultConfig(authorization))
|
|
6281
|
+
);
|
|
5996
6282
|
});
|
|
5997
6283
|
}
|
|
5998
6284
|
};
|
|
5999
6285
|
|
|
6000
|
-
// src/apis/platform/
|
|
6001
|
-
var
|
|
6002
|
-
|
|
6003
|
-
|
|
6286
|
+
// src/apis/platform/console/api.ts
|
|
6287
|
+
var platformConsoleApi = {
|
|
6288
|
+
app: platformConsoleAppApi,
|
|
6289
|
+
log(payload, authorization) {
|
|
6290
|
+
return __async(this, null, function* () {
|
|
6291
|
+
return consoleClientInstance.post(
|
|
6292
|
+
"/log",
|
|
6293
|
+
payload,
|
|
6294
|
+
getConsoleClientConfig(authorization)
|
|
6295
|
+
);
|
|
6296
|
+
});
|
|
6297
|
+
}
|
|
6004
6298
|
};
|
|
6005
6299
|
|
|
6006
6300
|
// src/constants/app/templates/repository.ts
|
|
@@ -7519,6 +7813,7 @@ var platformApi = {
|
|
|
7519
7813
|
accounts: platformAccountsApi,
|
|
7520
7814
|
billing: platformBillingApi,
|
|
7521
7815
|
adapter: platformAdapterApi,
|
|
7816
|
+
console: platformConsoleApi,
|
|
7522
7817
|
dps: platformDpsApi
|
|
7523
7818
|
};
|
|
7524
7819
|
|
|
@@ -8219,7 +8514,7 @@ var api2 = {
|
|
|
8219
8514
|
isInitialized: false
|
|
8220
8515
|
};
|
|
8221
8516
|
function initApi(config, tokens) {
|
|
8222
|
-
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;
|
|
8517
|
+
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;
|
|
8223
8518
|
initPlatformAccountsClient(
|
|
8224
8519
|
(_a = config.urls.platform) == null ? void 0 : _a.accounts,
|
|
8225
8520
|
(_b = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _b.token
|
|
@@ -8240,19 +8535,29 @@ function initApi(config, tokens) {
|
|
|
8240
8535
|
slack: tokens.slack
|
|
8241
8536
|
} : void 0
|
|
8242
8537
|
);
|
|
8243
|
-
|
|
8244
|
-
|
|
8245
|
-
|
|
8246
|
-
|
|
8247
|
-
|
|
8248
|
-
|
|
8249
|
-
|
|
8250
|
-
|
|
8251
|
-
|
|
8252
|
-
|
|
8253
|
-
|
|
8254
|
-
|
|
8255
|
-
|
|
8538
|
+
initConsoleClient(
|
|
8539
|
+
(_h = config.urls.platform) == null ? void 0 : _h.console,
|
|
8540
|
+
tokens ? {
|
|
8541
|
+
platform: tokens.platform,
|
|
8542
|
+
github: tokens.github,
|
|
8543
|
+
netlify: tokens.netlify,
|
|
8544
|
+
vercel: tokens.vercel,
|
|
8545
|
+
neon: tokens.neon
|
|
8546
|
+
} : void 0
|
|
8547
|
+
);
|
|
8548
|
+
initLiveChatClient((_i = config.urls.products) == null ? void 0 : _i.livechat, (_j = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _j.token);
|
|
8549
|
+
initHelpDeskClient((_k = config.urls.products) == null ? void 0 : _k.helpdesk, (_l = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _l.token);
|
|
8550
|
+
initTextClient((_m = config.urls.integrations) == null ? void 0 : _m.text, (_n = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _n.token);
|
|
8551
|
+
initGithubClient((_o = tokens == null ? void 0 : tokens.github) == null ? void 0 : _o.appToken);
|
|
8552
|
+
initNetlifyClient((_p = tokens == null ? void 0 : tokens.netlify) == null ? void 0 : _p.token);
|
|
8553
|
+
initVercelClient((_q = tokens == null ? void 0 : tokens.vercel) == null ? void 0 : _q.token);
|
|
8554
|
+
initNeonClient((_r = tokens == null ? void 0 : tokens.neon) == null ? void 0 : _r.token);
|
|
8555
|
+
initPlanetScaleClient((_s = tokens == null ? void 0 : tokens.planetscale) == null ? void 0 : _s.token);
|
|
8556
|
+
initMailchimpClient((_t = tokens == null ? void 0 : tokens.mailchimp) == null ? void 0 : _t.token, (_u = tokens == null ? void 0 : tokens.mailchimp) == null ? void 0 : _u.server);
|
|
8557
|
+
initShopifyClient((_v = tokens == null ? void 0 : tokens.shopify) == null ? void 0 : _v.token, (_w = tokens == null ? void 0 : tokens.shopify) == null ? void 0 : _w.shop);
|
|
8558
|
+
initBigCommerceClient((_x = tokens == null ? void 0 : tokens.bigcommerce) == null ? void 0 : _x.token, (_y = tokens == null ? void 0 : tokens.bigcommerce) == null ? void 0 : _y.shop);
|
|
8559
|
+
initHubspotClient((_z = tokens == null ? void 0 : tokens.hubspot) == null ? void 0 : _z.token);
|
|
8560
|
+
initSlackClient((_A = tokens == null ? void 0 : tokens.slack) == null ? void 0 : _A.token);
|
|
8256
8561
|
api2.isInitialized = true;
|
|
8257
8562
|
}
|
|
8258
8563
|
|
|
@@ -8312,6 +8617,7 @@ export {
|
|
|
8312
8617
|
BigCommerceApiError,
|
|
8313
8618
|
BigCommerceEventNames,
|
|
8314
8619
|
BigCommerceWebhookScopes,
|
|
8620
|
+
ConsoleApiError,
|
|
8315
8621
|
DpsApiError,
|
|
8316
8622
|
HelpDeskApiError,
|
|
8317
8623
|
HelpDeskWebhookEventType,
|
|
@@ -8332,6 +8638,7 @@ export {
|
|
|
8332
8638
|
SlackApiError,
|
|
8333
8639
|
SlackEventNames,
|
|
8334
8640
|
SlackEventTypes,
|
|
8641
|
+
SlackMessageEventSubTypes,
|
|
8335
8642
|
TextApiError,
|
|
8336
8643
|
TextHelpDeskEventNames,
|
|
8337
8644
|
TextLivechatEventNames,
|
|
@@ -8352,31 +8659,43 @@ export {
|
|
|
8352
8659
|
bigcommerceEventsZods,
|
|
8353
8660
|
billingClientInstance,
|
|
8354
8661
|
buildUrlFromSegments,
|
|
8662
|
+
consoleClientInstance,
|
|
8355
8663
|
dpsClientInstance,
|
|
8356
8664
|
getAdapterClientConfig,
|
|
8357
8665
|
getAdapterClientDefaultConfig,
|
|
8358
8666
|
getAppAutoReviewPayload,
|
|
8667
|
+
getBigCommerceClientAuthorization,
|
|
8359
8668
|
getBigCommerceClientConfig,
|
|
8360
8669
|
getBigCommerceClientUrl,
|
|
8361
8670
|
getBillingClientConfig,
|
|
8671
|
+
getConsoleClientConfig,
|
|
8672
|
+
getConsoleClientDefaultConfig,
|
|
8362
8673
|
getDpsClientConfig,
|
|
8363
8674
|
getEmptyAppAutoReview,
|
|
8675
|
+
getGitHubClientAuthorization,
|
|
8364
8676
|
getGithubClientConfig,
|
|
8365
8677
|
getHelpDeskClientConfig,
|
|
8678
|
+
getHubspotClientAuthorization,
|
|
8366
8679
|
getHubspotClientConfig,
|
|
8367
8680
|
getIntegrationFlowUrl,
|
|
8368
8681
|
getIntegrationFlowUrlForRedirection,
|
|
8369
8682
|
getLiveChatClientConfig,
|
|
8683
|
+
getMailchimpClientAuthorization,
|
|
8370
8684
|
getMailchimpClientConfig,
|
|
8371
8685
|
getMailchimpClientUrl,
|
|
8372
8686
|
getNeonClientConfig,
|
|
8687
|
+
getNetlifyClientAuthorization,
|
|
8373
8688
|
getNetlifyClientConfig,
|
|
8374
8689
|
getPlanetScaleClientConfig,
|
|
8375
|
-
|
|
8690
|
+
getRegion3 as getRegion,
|
|
8691
|
+
getShopifyClientAuthorization,
|
|
8376
8692
|
getShopifyClientConfig,
|
|
8377
8693
|
getShopifyClientUrl,
|
|
8694
|
+
getSlackClientAuthorization,
|
|
8378
8695
|
getSlackClientConfig,
|
|
8696
|
+
getTextClientAuthorization,
|
|
8379
8697
|
getTextClientConfig,
|
|
8698
|
+
getVercelClientAuthorization,
|
|
8380
8699
|
getVercelClientConfig,
|
|
8381
8700
|
githubClientInstance,
|
|
8382
8701
|
helpdeskClientInstance,
|
|
@@ -8386,6 +8705,7 @@ export {
|
|
|
8386
8705
|
initApi,
|
|
8387
8706
|
initBigCommerceClient,
|
|
8388
8707
|
initBillingClient,
|
|
8708
|
+
initConsoleClient,
|
|
8389
8709
|
initDpsClient,
|
|
8390
8710
|
initGithubClient,
|
|
8391
8711
|
initHelpDeskClient,
|
|
@@ -8418,6 +8738,7 @@ export {
|
|
|
8418
8738
|
textLivechatEventsZods,
|
|
8419
8739
|
updateAdapterClient,
|
|
8420
8740
|
updateBigCommerceClient,
|
|
8741
|
+
updateConsoleClient,
|
|
8421
8742
|
updateGithubClient,
|
|
8422
8743
|
updateHubspotClient,
|
|
8423
8744
|
updateMailchimpClient,
|