@livechat/developer-studio-api 3.3.12 → 3.4.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 +252 -298
- package/dist/index.d.ts +252 -298
- package/dist/index.js +339 -624
- package/dist/index.mjs +328 -597
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -175,18 +175,6 @@ githubClientInstance.interceptors.response.use(
|
|
|
175
175
|
throw error;
|
|
176
176
|
}
|
|
177
177
|
);
|
|
178
|
-
function getGitHubClientAuthorization(req) {
|
|
179
|
-
if (req.headers instanceof Headers) {
|
|
180
|
-
return {
|
|
181
|
-
appToken: req.headers.get("x-adapter-github-app-token"),
|
|
182
|
-
oauthToken: req.headers.get("x-adapter-github-oauth-token")
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
return {
|
|
186
|
-
appToken: req.headers["x-adapter-github-app-token"],
|
|
187
|
-
oauthToken: req.headers["x-adapter-github-oauth-token"]
|
|
188
|
-
};
|
|
189
|
-
}
|
|
190
178
|
function getGithubClientConfig(options = {}) {
|
|
191
179
|
var _a;
|
|
192
180
|
const currentHeaders = githubClientInstance.defaults.headers;
|
|
@@ -645,16 +633,6 @@ netlifyClientInstance.interceptors.response.use(
|
|
|
645
633
|
throw error;
|
|
646
634
|
}
|
|
647
635
|
);
|
|
648
|
-
function getNetlifyClientAuthorization(req) {
|
|
649
|
-
if (req.headers instanceof Headers) {
|
|
650
|
-
return {
|
|
651
|
-
token: req.headers.get("x-adapter-netlify-token")
|
|
652
|
-
};
|
|
653
|
-
}
|
|
654
|
-
return {
|
|
655
|
-
token: req.headers["x-adapter-netlify-token"]
|
|
656
|
-
};
|
|
657
|
-
}
|
|
658
636
|
function getNetlifyClientConfig(options = {}) {
|
|
659
637
|
var _a;
|
|
660
638
|
const currentHeaders = netlifyClientInstance.defaults.headers;
|
|
@@ -1152,16 +1130,6 @@ planetScaleClientInstance.interceptors.response.use(
|
|
|
1152
1130
|
throw error;
|
|
1153
1131
|
}
|
|
1154
1132
|
);
|
|
1155
|
-
function getPlanetScaleClientAuthorization(req) {
|
|
1156
|
-
if (req.headers instanceof Headers) {
|
|
1157
|
-
return {
|
|
1158
|
-
token: req.headers.get("x-adapter-planetscale-token")
|
|
1159
|
-
};
|
|
1160
|
-
}
|
|
1161
|
-
return {
|
|
1162
|
-
token: req.headers["x-adapter-planetscale-token"]
|
|
1163
|
-
};
|
|
1164
|
-
}
|
|
1165
1133
|
function getPlanetScaleClientConfig(options = {}) {
|
|
1166
1134
|
var _a;
|
|
1167
1135
|
const currentHeaders = planetScaleClientInstance.defaults.headers;
|
|
@@ -1419,20 +1387,6 @@ textClientInstance.interceptors.response.use(
|
|
|
1419
1387
|
);
|
|
1420
1388
|
}
|
|
1421
1389
|
);
|
|
1422
|
-
function getTextClientAuthorization(req, usePlatformToken = true) {
|
|
1423
|
-
if (req.headers instanceof Headers) {
|
|
1424
|
-
return {
|
|
1425
|
-
token: req.headers.get(
|
|
1426
|
-
usePlatformToken ? "x-adapter-platform-token" : "x-adapter-text-token"
|
|
1427
|
-
),
|
|
1428
|
-
tokenType: "Bearer"
|
|
1429
|
-
};
|
|
1430
|
-
}
|
|
1431
|
-
return {
|
|
1432
|
-
token: req.headers[usePlatformToken ? "x-adapter-platform-token" : "x-adapter-text-token"],
|
|
1433
|
-
tokenType: "Bearer"
|
|
1434
|
-
};
|
|
1435
|
-
}
|
|
1436
1390
|
function getTextClientConfig(option = {}) {
|
|
1437
1391
|
var _a;
|
|
1438
1392
|
const currentHeaders = textClientInstance.defaults.headers;
|
|
@@ -1625,16 +1579,6 @@ vercelClientInstance.interceptors.response.use(
|
|
|
1625
1579
|
throw error;
|
|
1626
1580
|
}
|
|
1627
1581
|
);
|
|
1628
|
-
function getVercelClientAuthorization(req) {
|
|
1629
|
-
if (req.headers instanceof Headers) {
|
|
1630
|
-
return {
|
|
1631
|
-
token: req.headers.get("x-adapter-vercel-token")
|
|
1632
|
-
};
|
|
1633
|
-
}
|
|
1634
|
-
return {
|
|
1635
|
-
token: req.headers["x-adapter-vercel-token"]
|
|
1636
|
-
};
|
|
1637
|
-
}
|
|
1638
1582
|
function getVercelClientConfig(options = {}) {
|
|
1639
1583
|
var _a;
|
|
1640
1584
|
const currentHeaders = vercelClientInstance.defaults.headers;
|
|
@@ -1682,16 +1626,6 @@ neonClientInstance.interceptors.response.use(
|
|
|
1682
1626
|
throw error;
|
|
1683
1627
|
}
|
|
1684
1628
|
);
|
|
1685
|
-
function getNeonClientAuthorization(req) {
|
|
1686
|
-
if (req.headers instanceof Headers) {
|
|
1687
|
-
return {
|
|
1688
|
-
token: req.headers.get("x-adapter-neon-token")
|
|
1689
|
-
};
|
|
1690
|
-
}
|
|
1691
|
-
return {
|
|
1692
|
-
token: req.headers["x-adapter-neon-token"]
|
|
1693
|
-
};
|
|
1694
|
-
}
|
|
1695
1629
|
function getNeonClientConfig(options = {}) {
|
|
1696
1630
|
var _a;
|
|
1697
1631
|
const currentHeaders = neonClientInstance.defaults.headers;
|
|
@@ -1751,18 +1685,6 @@ mailchimpClientInstance.interceptors.response.use(
|
|
|
1751
1685
|
);
|
|
1752
1686
|
}
|
|
1753
1687
|
);
|
|
1754
|
-
function getMailchimpClientAuthorization(req) {
|
|
1755
|
-
if (req.headers instanceof Headers) {
|
|
1756
|
-
return {
|
|
1757
|
-
server: req.headers.get("x-adapter-mailchimp-server"),
|
|
1758
|
-
token: req.headers.get("x-adapter-mailchimp-token")
|
|
1759
|
-
};
|
|
1760
|
-
}
|
|
1761
|
-
return {
|
|
1762
|
-
server: req.headers["x-adapter-mailchimp-server"],
|
|
1763
|
-
token: req.headers["x-adapter-mailchimp-token"]
|
|
1764
|
-
};
|
|
1765
|
-
}
|
|
1766
1688
|
function getMailchimpClientConfig(options = {}) {
|
|
1767
1689
|
var _a, _b;
|
|
1768
1690
|
const currentBaseUrl = mailchimpClientInstance.defaults.baseURL;
|
|
@@ -1827,18 +1749,6 @@ shopifyClientInstance.interceptors.response.use(
|
|
|
1827
1749
|
}
|
|
1828
1750
|
);
|
|
1829
1751
|
var getShopifyClientUrl = (store) => `https://${store}.myshopify.com/admin/api/2024-04`;
|
|
1830
|
-
function getShopifyClientAuthorization(req) {
|
|
1831
|
-
if (req.headers instanceof Headers) {
|
|
1832
|
-
return {
|
|
1833
|
-
shop: req.headers.get("x-adapter-shopify-shop"),
|
|
1834
|
-
token: req.headers.get("x-adapter-shopify-token")
|
|
1835
|
-
};
|
|
1836
|
-
}
|
|
1837
|
-
return {
|
|
1838
|
-
shop: req.headers["x-adapter-shopify-shop"],
|
|
1839
|
-
token: req.headers["x-adapter-shopify-token"]
|
|
1840
|
-
};
|
|
1841
|
-
}
|
|
1842
1752
|
function getShopifyClientConfig(options = {}) {
|
|
1843
1753
|
var _a, _b;
|
|
1844
1754
|
const currentBaseUrl = shopifyClientInstance.defaults.baseURL;
|
|
@@ -1914,16 +1824,6 @@ hubspotClientInstance.interceptors.response.use(
|
|
|
1914
1824
|
);
|
|
1915
1825
|
}
|
|
1916
1826
|
);
|
|
1917
|
-
function getHubspotClientAuthorization(req) {
|
|
1918
|
-
if (req.headers instanceof Headers) {
|
|
1919
|
-
return {
|
|
1920
|
-
token: req.headers.get("x-adapter-hubspot-token")
|
|
1921
|
-
};
|
|
1922
|
-
}
|
|
1923
|
-
return {
|
|
1924
|
-
token: req.headers["x-adapter-hubspot-token"]
|
|
1925
|
-
};
|
|
1926
|
-
}
|
|
1927
1827
|
function getHubspotClientConfig(options = {}) {
|
|
1928
1828
|
var _a;
|
|
1929
1829
|
const currentHeaders = hubspotClientInstance.defaults.headers;
|
|
@@ -1991,18 +1891,6 @@ bigCommerceClientInstance.interceptors.response.use(
|
|
|
1991
1891
|
}
|
|
1992
1892
|
);
|
|
1993
1893
|
var getBigCommerceClientUrl = (store) => `https://api.bigcommerce.com/stores/${store}/v3`;
|
|
1994
|
-
function getBigCommerceClientAuthorization(req) {
|
|
1995
|
-
if (req.headers instanceof Headers) {
|
|
1996
|
-
return {
|
|
1997
|
-
shop: req.headers.get("x-adapter-bigcommerce-shop"),
|
|
1998
|
-
token: req.headers.get("x-adapter-bigcommerce-token")
|
|
1999
|
-
};
|
|
2000
|
-
}
|
|
2001
|
-
return {
|
|
2002
|
-
shop: req.headers["x-adapter-bigcommerce-shop"],
|
|
2003
|
-
token: req.headers["x-adapter-bigcommerce-token"]
|
|
2004
|
-
};
|
|
2005
|
-
}
|
|
2006
1894
|
function getBigCommerceClientConfig(options = {}) {
|
|
2007
1895
|
var _a, _b;
|
|
2008
1896
|
const currentBaseUrl = bigCommerceClientInstance.defaults.baseURL;
|
|
@@ -2066,16 +1954,6 @@ var AccountApiClient = class extends ApiClient {
|
|
|
2066
1954
|
var platformAccountsClientInstance = new AccountApiClient({
|
|
2067
1955
|
baseURL: "https://accounts.labs.livechatinc.com"
|
|
2068
1956
|
});
|
|
2069
|
-
function getPlatformAccountsClientAuthorization(req) {
|
|
2070
|
-
if (req.headers instanceof Headers) {
|
|
2071
|
-
return {
|
|
2072
|
-
token: req.headers.get("x-adapter-platform-token")
|
|
2073
|
-
};
|
|
2074
|
-
}
|
|
2075
|
-
return {
|
|
2076
|
-
token: req.headers["x-adapter-platform-token"]
|
|
2077
|
-
};
|
|
2078
|
-
}
|
|
2079
1957
|
function initPlatformAccountsClient(baseUrl, token) {
|
|
2080
1958
|
if (baseUrl) {
|
|
2081
1959
|
platformAccountsClientInstance.updateConfig({
|
|
@@ -2089,22 +1967,12 @@ function initPlatformAccountsClient(baseUrl, token) {
|
|
|
2089
1967
|
|
|
2090
1968
|
// src/apis/platform/billing/instance.ts
|
|
2091
1969
|
import axios14 from "axios";
|
|
2092
|
-
var
|
|
1970
|
+
var billingClientInstance = axios14.create({
|
|
2093
1971
|
baseURL: "https://billing.labs.livechatinc.com"
|
|
2094
1972
|
});
|
|
2095
|
-
function
|
|
2096
|
-
if (req.headers instanceof Headers) {
|
|
2097
|
-
return {
|
|
2098
|
-
token: req.headers.get("x-adapter-platform-token")
|
|
2099
|
-
};
|
|
2100
|
-
}
|
|
2101
|
-
return {
|
|
2102
|
-
token: req.headers["x-adapter-platform-token"]
|
|
2103
|
-
};
|
|
2104
|
-
}
|
|
2105
|
-
function getPlatformBillingClientConfig(options = {}) {
|
|
1973
|
+
function getBillingClientConfig(options = {}) {
|
|
2106
1974
|
var _a;
|
|
2107
|
-
const defaultAuthorization =
|
|
1975
|
+
const defaultAuthorization = billingClientInstance.defaults.headers.Authorization;
|
|
2108
1976
|
const headers = {
|
|
2109
1977
|
authorization: (_a = options.token ? `Bearer ${options.token}` : void 0) != null ? _a : defaultAuthorization
|
|
2110
1978
|
};
|
|
@@ -2112,9 +1980,9 @@ function getPlatformBillingClientConfig(options = {}) {
|
|
|
2112
1980
|
headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
|
|
2113
1981
|
};
|
|
2114
1982
|
}
|
|
2115
|
-
function
|
|
1983
|
+
function initBillingClient(baseUrl, token) {
|
|
2116
1984
|
if (baseUrl) {
|
|
2117
|
-
|
|
1985
|
+
billingClientInstance.interceptors.request.use(
|
|
2118
1986
|
(config) => {
|
|
2119
1987
|
config.baseURL = baseUrl;
|
|
2120
1988
|
return config;
|
|
@@ -2123,9 +1991,9 @@ function initPlatformBillingClient(baseUrl, token) {
|
|
|
2123
1991
|
);
|
|
2124
1992
|
}
|
|
2125
1993
|
if (token) {
|
|
2126
|
-
|
|
1994
|
+
billingClientInstance.defaults.headers.Authorization = `Bearer ${token}`;
|
|
2127
1995
|
} else {
|
|
2128
|
-
delete
|
|
1996
|
+
delete billingClientInstance.defaults.headers.Authorization;
|
|
2129
1997
|
}
|
|
2130
1998
|
}
|
|
2131
1999
|
|
|
@@ -2614,13 +2482,13 @@ var AdapterApiError = class _AdapterApiError extends ApiErrorBase {
|
|
|
2614
2482
|
);
|
|
2615
2483
|
}
|
|
2616
2484
|
};
|
|
2617
|
-
var
|
|
2485
|
+
var adapterClientInstance = axios15.create({
|
|
2618
2486
|
baseURL: "https://platform.labs.text.com/console-adapter/api",
|
|
2619
2487
|
headers: {
|
|
2620
2488
|
"Content-Type": "application/json"
|
|
2621
2489
|
}
|
|
2622
2490
|
});
|
|
2623
|
-
|
|
2491
|
+
adapterClientInstance.interceptors.response.use(
|
|
2624
2492
|
(response) => response,
|
|
2625
2493
|
(error) => {
|
|
2626
2494
|
var _a, _b;
|
|
@@ -2636,91 +2504,9 @@ platformAdapterClientInstance.interceptors.response.use(
|
|
|
2636
2504
|
return Promise.reject(error);
|
|
2637
2505
|
}
|
|
2638
2506
|
);
|
|
2639
|
-
function
|
|
2640
|
-
if (req.headers instanceof Headers) {
|
|
2641
|
-
return {
|
|
2642
|
-
platform: {
|
|
2643
|
-
token: req.headers.get("x-adapter-platform-token")
|
|
2644
|
-
},
|
|
2645
|
-
github: {
|
|
2646
|
-
appToken: req.headers.get("x-adapter-github-app-token"),
|
|
2647
|
-
oauthToken: req.headers.get("x-adapter-github-oauth-token")
|
|
2648
|
-
},
|
|
2649
|
-
netlify: {
|
|
2650
|
-
token: req.headers.get("x-adapter-netlify-token")
|
|
2651
|
-
},
|
|
2652
|
-
vercel: {
|
|
2653
|
-
token: req.headers.get("x-adapter-vercel-token")
|
|
2654
|
-
},
|
|
2655
|
-
planetscale: {
|
|
2656
|
-
token: req.headers.get("x-adapter-planetscale-token")
|
|
2657
|
-
},
|
|
2658
|
-
neon: {
|
|
2659
|
-
token: req.headers.get("x-adapter-neon-token")
|
|
2660
|
-
},
|
|
2661
|
-
mailchimp: {
|
|
2662
|
-
token: req.headers.get("x-adapter-mailchimp-token"),
|
|
2663
|
-
server: req.headers.get("x-adapter-mailchimp-server")
|
|
2664
|
-
},
|
|
2665
|
-
shopify: {
|
|
2666
|
-
token: req.headers.get("x-adapter-shopify-token"),
|
|
2667
|
-
shop: req.headers.get("x-adapter-shopify-shop")
|
|
2668
|
-
},
|
|
2669
|
-
hubspot: {
|
|
2670
|
-
token: req.headers.get("x-adapter-hubspot-token")
|
|
2671
|
-
},
|
|
2672
|
-
bigcommerce: {
|
|
2673
|
-
token: req.headers.get("x-adapter-bigcommerce-token"),
|
|
2674
|
-
shop: req.headers.get("x-adapter-bigcommerce-shop")
|
|
2675
|
-
},
|
|
2676
|
-
text: {
|
|
2677
|
-
token: req.headers.get("x-adapter-text-token")
|
|
2678
|
-
}
|
|
2679
|
-
};
|
|
2680
|
-
}
|
|
2681
|
-
return {
|
|
2682
|
-
platform: {
|
|
2683
|
-
token: req.headers["x-adapter-platform-token"]
|
|
2684
|
-
},
|
|
2685
|
-
github: {
|
|
2686
|
-
appToken: req.headers["x-adapter-github-app-token"],
|
|
2687
|
-
oauthToken: req.headers["x-adapter-github-oauth-token"]
|
|
2688
|
-
},
|
|
2689
|
-
netlify: {
|
|
2690
|
-
token: req.headers["x-adapter-netlify-token"]
|
|
2691
|
-
},
|
|
2692
|
-
vercel: {
|
|
2693
|
-
token: req.headers["x-adapter-vercel-token"]
|
|
2694
|
-
},
|
|
2695
|
-
planetscale: {
|
|
2696
|
-
token: req.headers["x-adapter-planetscale-token"]
|
|
2697
|
-
},
|
|
2698
|
-
neon: {
|
|
2699
|
-
token: req.headers["x-adapter-neon-token"]
|
|
2700
|
-
},
|
|
2701
|
-
mailchimp: {
|
|
2702
|
-
token: req.headers["x-adapter-mailchimp-token"],
|
|
2703
|
-
server: req.headers["x-adapter-mailchimp-server"]
|
|
2704
|
-
},
|
|
2705
|
-
shopify: {
|
|
2706
|
-
token: req.headers["x-adapter-shopify-token"],
|
|
2707
|
-
shop: req.headers["x-adapter-shopify-shop"]
|
|
2708
|
-
},
|
|
2709
|
-
hubspot: {
|
|
2710
|
-
token: req.headers["x-adapter-hubspot-token"]
|
|
2711
|
-
},
|
|
2712
|
-
bigcommerce: {
|
|
2713
|
-
token: req.headers["x-adapter-bigcommerce-token"],
|
|
2714
|
-
shop: req.headers["x-adapter-bigcommerce-shop"]
|
|
2715
|
-
},
|
|
2716
|
-
text: {
|
|
2717
|
-
token: req.headers["x-adapter-text-token"]
|
|
2718
|
-
}
|
|
2719
|
-
};
|
|
2720
|
-
}
|
|
2721
|
-
function getPlatformAdapterClientConfig(options = {}) {
|
|
2507
|
+
function getAdapterClientConfig(options = {}) {
|
|
2722
2508
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P;
|
|
2723
|
-
const currentHeaders =
|
|
2509
|
+
const currentHeaders = adapterClientInstance.defaults.headers;
|
|
2724
2510
|
const headers = {
|
|
2725
2511
|
platform: {
|
|
2726
2512
|
token: (_b = currentHeaders["x-adapter-platform-token"]) != null ? _b : (_a = options.platform) == null ? void 0 : _a.token
|
|
@@ -2784,14 +2570,14 @@ function getPlatformAdapterClientConfig(options = {}) {
|
|
|
2784
2570
|
headers: __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, headers.platform.token ? { "x-adapter-platform-token": headers.platform.token } : {}), headers.integrations.github.app ? { "x-adapter-github-app-token": headers.integrations.github.app } : {}), headers.integrations.github.oauth ? { "x-adapter-github-oauth-token": headers.integrations.github.oauth } : {}), headers.integrations.netlify ? { "x-adapter-netlify-token": headers.integrations.netlify } : {}), headers.integrations.vercel ? { "x-adapter-vercel-token": headers.integrations.vercel } : {}), headers.integrations.planetscale ? { "x-adapter-planetscale-token": headers.integrations.planetscale } : {}), headers.integrations.neon ? { "x-adapter-neon-token": headers.integrations.neon } : {}), headers.integrations.mailchimp ? { "x-adapter-mailchimp-token": headers.integrations.mailchimp } : {}), headers.integrations.mailchimpServer ? { "x-adapter-mailchimp-server": headers.integrations.mailchimpServer } : {}), headers.integrations.shopify ? { "x-adapter-shopify-token": headers.integrations.shopify } : {}), headers.integrations.shopifyShop ? { "x-adapter-shopify-shop": headers.integrations.shopifyShop } : {}), headers.integrations.hubspot ? { "x-adapter-hubspot-token": headers.integrations.hubspot } : {}), headers.integrations.bigcommerce ? { "x-adapter-bigcommerce-token": headers.integrations.bigcommerce } : {}), headers.integrations.bigcommerceShop ? { "x-adapter-bigcommerce-shop": headers.integrations.bigcommerceShop } : {}), headers.integrations.text ? { "x-adapter-text-token": headers.integrations.text } : {})
|
|
2785
2571
|
};
|
|
2786
2572
|
}
|
|
2787
|
-
var
|
|
2573
|
+
var getAdapterClientDefaultConfig = (authorization) => getAdapterClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
2788
2574
|
ensureAuthorizationToken: {
|
|
2789
2575
|
platform: true
|
|
2790
2576
|
}
|
|
2791
2577
|
}));
|
|
2792
|
-
function
|
|
2578
|
+
function initAdapterClient(baseUrl, tokens) {
|
|
2793
2579
|
if (baseUrl) {
|
|
2794
|
-
|
|
2580
|
+
adapterClientInstance.interceptors.request.use(
|
|
2795
2581
|
(config) => {
|
|
2796
2582
|
config.baseURL = baseUrl;
|
|
2797
2583
|
return config;
|
|
@@ -2800,12 +2586,12 @@ function initPlatformAdapterClient(baseUrl, tokens) {
|
|
|
2800
2586
|
);
|
|
2801
2587
|
}
|
|
2802
2588
|
if (tokens) {
|
|
2803
|
-
|
|
2589
|
+
updateAdapterClient(tokens);
|
|
2804
2590
|
}
|
|
2805
2591
|
}
|
|
2806
|
-
function
|
|
2592
|
+
function updateAdapterClient(tokens) {
|
|
2807
2593
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
2808
|
-
const headers =
|
|
2594
|
+
const headers = adapterClientInstance.defaults.headers;
|
|
2809
2595
|
if ((_a = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _a.token) {
|
|
2810
2596
|
headers["x-adapter-platform-token"] = tokens.platform.token;
|
|
2811
2597
|
}
|
|
@@ -2928,10 +2714,10 @@ var DpsApiError = class extends ApiErrorBase {
|
|
|
2928
2714
|
this.name = "dps";
|
|
2929
2715
|
}
|
|
2930
2716
|
};
|
|
2931
|
-
var
|
|
2717
|
+
var dpsClientInstance = axios16.create({
|
|
2932
2718
|
baseURL: "https://dev-platform.labs.livechatinc.com"
|
|
2933
2719
|
});
|
|
2934
|
-
|
|
2720
|
+
dpsClientInstance.interceptors.response.use(
|
|
2935
2721
|
(response) => response,
|
|
2936
2722
|
(error) => {
|
|
2937
2723
|
var _a, _b, _c, _d;
|
|
@@ -2947,28 +2733,9 @@ platformDpsClientInstance.interceptors.response.use(
|
|
|
2947
2733
|
);
|
|
2948
2734
|
}
|
|
2949
2735
|
);
|
|
2950
|
-
function
|
|
2951
|
-
if (req.headers instanceof Headers) {
|
|
2952
|
-
return {
|
|
2953
|
-
token: req.headers.get("x-adapter-platform-token"),
|
|
2954
|
-
tokenType: "Bearer"
|
|
2955
|
-
};
|
|
2956
|
-
}
|
|
2957
|
-
return {
|
|
2958
|
-
token: req.headers["x-adapter-platform-token"],
|
|
2959
|
-
tokenType: "Bearer"
|
|
2960
|
-
};
|
|
2961
|
-
}
|
|
2962
|
-
function getPlatformDpsAdminClientAuthorization() {
|
|
2963
|
-
const token = process.env.PLATFORM_DPS_TOKEN_FOR_GITHUB;
|
|
2964
|
-
return {
|
|
2965
|
-
token: btoa(`apps@livechatinc.com:${token}`),
|
|
2966
|
-
tokenType: "Basic"
|
|
2967
|
-
};
|
|
2968
|
-
}
|
|
2969
|
-
function getPlatformDpsClientConfig(options = {}) {
|
|
2736
|
+
function getDpsClientConfig(options = {}) {
|
|
2970
2737
|
var _a, _b;
|
|
2971
|
-
const currentHeaders =
|
|
2738
|
+
const currentHeaders = dpsClientInstance.defaults.headers;
|
|
2972
2739
|
const defaultAuthorization = currentHeaders.Authorization;
|
|
2973
2740
|
const headers = {
|
|
2974
2741
|
authorization: (_b = options.token ? `${(_a = options.tokenType) != null ? _a : "Bearer"} ${options.token}` : void 0) != null ? _b : defaultAuthorization
|
|
@@ -2977,10 +2744,10 @@ function getPlatformDpsClientConfig(options = {}) {
|
|
|
2977
2744
|
headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
|
|
2978
2745
|
};
|
|
2979
2746
|
}
|
|
2980
|
-
function
|
|
2981
|
-
const headers =
|
|
2747
|
+
function initDpsClient(baseUrl, token) {
|
|
2748
|
+
const headers = dpsClientInstance.defaults.headers;
|
|
2982
2749
|
if (baseUrl) {
|
|
2983
|
-
|
|
2750
|
+
dpsClientInstance.interceptors.request.use(
|
|
2984
2751
|
(config) => {
|
|
2985
2752
|
config.baseURL = baseUrl;
|
|
2986
2753
|
return config;
|
|
@@ -3061,16 +2828,6 @@ livechatClientInstance.interceptors.response.use(
|
|
|
3061
2828
|
);
|
|
3062
2829
|
}
|
|
3063
2830
|
);
|
|
3064
|
-
function getLiveChatClientAuthorization(req) {
|
|
3065
|
-
if (req.headers instanceof Headers) {
|
|
3066
|
-
return {
|
|
3067
|
-
token: req.headers.get("x-adapter-platform-token")
|
|
3068
|
-
};
|
|
3069
|
-
}
|
|
3070
|
-
return {
|
|
3071
|
-
token: req.headers["x-adapter-platform-token"]
|
|
3072
|
-
};
|
|
3073
|
-
}
|
|
3074
2831
|
function getLiveChatClientConfig(options = {}) {
|
|
3075
2832
|
var _a, _b;
|
|
3076
2833
|
const currentHeaders = livechatClientInstance.defaults.headers;
|
|
@@ -3272,10 +3029,10 @@ var textAppMonitoringReportsApi = {
|
|
|
3272
3029
|
getUptimeDetails(appId, authorization) {
|
|
3273
3030
|
return __async(this, null, function* () {
|
|
3274
3031
|
try {
|
|
3275
|
-
const response = yield
|
|
3032
|
+
const response = yield dpsClientInstance.get(
|
|
3276
3033
|
`/v2/applications/${encodeURIComponent(appId)}/monitoring`,
|
|
3277
3034
|
// proxy endpoint
|
|
3278
|
-
|
|
3035
|
+
getDpsClientConfig(authorization)
|
|
3279
3036
|
);
|
|
3280
3037
|
return response.data;
|
|
3281
3038
|
} catch (error) {
|
|
@@ -5775,10 +5532,10 @@ var platformAccountsApi = {
|
|
|
5775
5532
|
var platformDpsApplicationAuthorizationApi = {
|
|
5776
5533
|
createAuth(appId, payload, authorization) {
|
|
5777
5534
|
return __async(this, null, function* () {
|
|
5778
|
-
yield
|
|
5535
|
+
yield dpsClientInstance.post(
|
|
5779
5536
|
`/v2/applications/${encodeURIComponent(appId)}/authorization`,
|
|
5780
5537
|
payload,
|
|
5781
|
-
|
|
5538
|
+
getDpsClientConfig(authorization)
|
|
5782
5539
|
).catch((error) => {
|
|
5783
5540
|
throw error.withCustomMessage(
|
|
5784
5541
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.CREATED} [${error.message}]`
|
|
@@ -5788,9 +5545,9 @@ var platformDpsApplicationAuthorizationApi = {
|
|
|
5788
5545
|
},
|
|
5789
5546
|
deleteAuth(appId, authorization) {
|
|
5790
5547
|
return __async(this, null, function* () {
|
|
5791
|
-
yield
|
|
5548
|
+
yield dpsClientInstance.delete(
|
|
5792
5549
|
`/v2/applications/${encodeURIComponent(appId)}/authorization`,
|
|
5793
|
-
|
|
5550
|
+
getDpsClientConfig(authorization)
|
|
5794
5551
|
).catch((error) => {
|
|
5795
5552
|
throw error.withCustomMessage(
|
|
5796
5553
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
@@ -5804,9 +5561,9 @@ var platformDpsApplicationAuthorizationApi = {
|
|
|
5804
5561
|
var platformDpsApplicationAutoReviewApi = {
|
|
5805
5562
|
getAutoReview(appId, authorization) {
|
|
5806
5563
|
return __async(this, null, function* () {
|
|
5807
|
-
return
|
|
5564
|
+
return dpsClientInstance.get(
|
|
5808
5565
|
`/v2/applications/${encodeURIComponent(appId)}/auto-review`,
|
|
5809
|
-
|
|
5566
|
+
getDpsClientConfig(authorization)
|
|
5810
5567
|
).then(({ status, data }) => {
|
|
5811
5568
|
if (status === 204) {
|
|
5812
5569
|
return getEmptyAppAutoReview();
|
|
@@ -5821,10 +5578,10 @@ var platformDpsApplicationAutoReviewApi = {
|
|
|
5821
5578
|
},
|
|
5822
5579
|
submitAutoReview(appId, payload, authorization) {
|
|
5823
5580
|
return __async(this, null, function* () {
|
|
5824
|
-
yield
|
|
5581
|
+
yield dpsClientInstance.post(
|
|
5825
5582
|
`/v2/applications/${encodeURIComponent(appId)}/auto-review`,
|
|
5826
5583
|
payload,
|
|
5827
|
-
|
|
5584
|
+
getDpsClientConfig(authorization)
|
|
5828
5585
|
).catch((error) => {
|
|
5829
5586
|
throw error.withCustomMessage(
|
|
5830
5587
|
`The review couldn\u2019t be requested. [${error.message}]`
|
|
@@ -5838,12 +5595,12 @@ var platformDpsApplicationAutoReviewApi = {
|
|
|
5838
5595
|
var platformDpsApplicationChatActionsApi = {
|
|
5839
5596
|
createChatAction(appId, payload, authorization) {
|
|
5840
5597
|
return __async(this, null, function* () {
|
|
5841
|
-
yield
|
|
5598
|
+
yield dpsClientInstance.put(
|
|
5842
5599
|
`/v2/applications/${encodeURIComponent(
|
|
5843
5600
|
appId
|
|
5844
5601
|
)}/chat-actions/${encodeURIComponent(payload.id)}`,
|
|
5845
5602
|
payload,
|
|
5846
|
-
|
|
5603
|
+
getDpsClientConfig(authorization)
|
|
5847
5604
|
).catch((error) => {
|
|
5848
5605
|
throw error.withCustomMessage(
|
|
5849
5606
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.CREATED} [${error.message}]`
|
|
@@ -5853,12 +5610,12 @@ var platformDpsApplicationChatActionsApi = {
|
|
|
5853
5610
|
},
|
|
5854
5611
|
updateChatAction(appId, payload, authorization) {
|
|
5855
5612
|
return __async(this, null, function* () {
|
|
5856
|
-
yield
|
|
5613
|
+
yield dpsClientInstance.patch(
|
|
5857
5614
|
`/v2/applications/${encodeURIComponent(
|
|
5858
5615
|
appId
|
|
5859
5616
|
)}/chat-actions/${encodeURIComponent(payload.id)}`,
|
|
5860
5617
|
payload,
|
|
5861
|
-
|
|
5618
|
+
getDpsClientConfig(authorization)
|
|
5862
5619
|
).catch((error) => {
|
|
5863
5620
|
throw error.withCustomMessage(
|
|
5864
5621
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
@@ -5868,11 +5625,11 @@ var platformDpsApplicationChatActionsApi = {
|
|
|
5868
5625
|
},
|
|
5869
5626
|
deleteChatAction(appId, chatActionId, authorization) {
|
|
5870
5627
|
return __async(this, null, function* () {
|
|
5871
|
-
yield
|
|
5628
|
+
yield dpsClientInstance.delete(
|
|
5872
5629
|
`/v2/applications/${encodeURIComponent(
|
|
5873
5630
|
appId
|
|
5874
5631
|
)}/chat-actions/${encodeURIComponent(chatActionId)}`,
|
|
5875
|
-
__spreadValues({},
|
|
5632
|
+
__spreadValues({}, getDpsClientConfig(authorization))
|
|
5876
5633
|
).catch((error) => {
|
|
5877
5634
|
throw error.withCustomMessage(
|
|
5878
5635
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
@@ -5885,12 +5642,12 @@ var platformDpsApplicationChatActionsApi = {
|
|
|
5885
5642
|
// src/apis/platform/dps/applications/application/chatBoosters/api.ts
|
|
5886
5643
|
var platformDpsApplicationChatBoostersApi = {
|
|
5887
5644
|
createChatBooster(appId, chatBoosterId, payload, authorization) {
|
|
5888
|
-
return
|
|
5645
|
+
return dpsClientInstance.put(
|
|
5889
5646
|
`/v2/applications/${encodeURIComponent(
|
|
5890
5647
|
appId
|
|
5891
5648
|
)}/chat-boosters/${encodeURIComponent(chatBoosterId)}`,
|
|
5892
5649
|
payload,
|
|
5893
|
-
|
|
5650
|
+
getDpsClientConfig(authorization)
|
|
5894
5651
|
).catch((error) => {
|
|
5895
5652
|
throw error.withCustomMessage(
|
|
5896
5653
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.CREATED} [${error.message}]`
|
|
@@ -5899,12 +5656,12 @@ var platformDpsApplicationChatBoostersApi = {
|
|
|
5899
5656
|
},
|
|
5900
5657
|
updateChatBooster(appId, chatBoosterId, payload, authorization) {
|
|
5901
5658
|
return __async(this, null, function* () {
|
|
5902
|
-
return
|
|
5659
|
+
return dpsClientInstance.put(
|
|
5903
5660
|
`/v2/applications/${encodeURIComponent(
|
|
5904
5661
|
appId
|
|
5905
5662
|
)}/chat-boosters/${encodeURIComponent(chatBoosterId)}`,
|
|
5906
5663
|
payload,
|
|
5907
|
-
|
|
5664
|
+
getDpsClientConfig(authorization)
|
|
5908
5665
|
).catch((error) => {
|
|
5909
5666
|
throw error.withCustomMessage(
|
|
5910
5667
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
@@ -5914,11 +5671,11 @@ var platformDpsApplicationChatBoostersApi = {
|
|
|
5914
5671
|
},
|
|
5915
5672
|
deleteChatBooster(appId, chatBoosterId, authorization) {
|
|
5916
5673
|
return __async(this, null, function* () {
|
|
5917
|
-
return
|
|
5674
|
+
return dpsClientInstance.delete(
|
|
5918
5675
|
`/v2/applications/${encodeURIComponent(
|
|
5919
5676
|
appId
|
|
5920
5677
|
)}/chat-boosters/${encodeURIComponent(chatBoosterId)}`,
|
|
5921
|
-
|
|
5678
|
+
getDpsClientConfig(authorization)
|
|
5922
5679
|
).catch((error) => {
|
|
5923
5680
|
throw error.withCustomMessage(
|
|
5924
5681
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
@@ -5932,10 +5689,10 @@ var platformDpsApplicationChatBoostersApi = {
|
|
|
5932
5689
|
var platformDpsApplicationDisplayApi = {
|
|
5933
5690
|
updateVersionHistory(appId, payload, authorization) {
|
|
5934
5691
|
return __async(this, null, function* () {
|
|
5935
|
-
yield
|
|
5692
|
+
yield dpsClientInstance.put(
|
|
5936
5693
|
`/v2/applications/${encodeURIComponent(appId)}/display/changelog`,
|
|
5937
5694
|
payload,
|
|
5938
|
-
|
|
5695
|
+
getDpsClientConfig(authorization)
|
|
5939
5696
|
).catch((error) => {
|
|
5940
5697
|
throw error.withCustomMessage(
|
|
5941
5698
|
`Listing details couldn't be updated. [${error.message}]`
|
|
@@ -5945,10 +5702,10 @@ var platformDpsApplicationDisplayApi = {
|
|
|
5945
5702
|
},
|
|
5946
5703
|
updateBasicDetails(appId, basicDetails, authorization) {
|
|
5947
5704
|
return __async(this, null, function* () {
|
|
5948
|
-
yield
|
|
5705
|
+
yield dpsClientInstance.put(
|
|
5949
5706
|
`/v2/applications/${encodeURIComponent(appId)}/display`,
|
|
5950
5707
|
basicDetails,
|
|
5951
|
-
|
|
5708
|
+
getDpsClientConfig(authorization)
|
|
5952
5709
|
).catch((error) => {
|
|
5953
5710
|
throw error.withCustomMessage(
|
|
5954
5711
|
`Listing details couldn't be updated. [${error.message}]`
|
|
@@ -5958,10 +5715,10 @@ var platformDpsApplicationDisplayApi = {
|
|
|
5958
5715
|
},
|
|
5959
5716
|
patchBasicDetails(appId, basicDetails, authorization) {
|
|
5960
5717
|
return __async(this, null, function* () {
|
|
5961
|
-
yield
|
|
5718
|
+
yield dpsClientInstance.patch(
|
|
5962
5719
|
`/v2/applications/${encodeURIComponent(appId)}/display`,
|
|
5963
5720
|
basicDetails,
|
|
5964
|
-
|
|
5721
|
+
getDpsClientConfig(authorization)
|
|
5965
5722
|
).catch((error) => {
|
|
5966
5723
|
throw error.withCustomMessage(
|
|
5967
5724
|
`Listing details couldn't be updated. [${error.message}]`
|
|
@@ -5971,10 +5728,10 @@ var platformDpsApplicationDisplayApi = {
|
|
|
5971
5728
|
},
|
|
5972
5729
|
updateOverview(appId, data, authorization) {
|
|
5973
5730
|
return __async(this, null, function* () {
|
|
5974
|
-
yield
|
|
5731
|
+
yield dpsClientInstance.put(
|
|
5975
5732
|
`/v2/applications/${encodeURIComponent(appId)}/listing/overview`,
|
|
5976
5733
|
data,
|
|
5977
|
-
|
|
5734
|
+
getDpsClientConfig(authorization)
|
|
5978
5735
|
).catch((error) => {
|
|
5979
5736
|
throw error.withCustomMessage(
|
|
5980
5737
|
`Listing details couldn't be updated. [${error.message}]`
|
|
@@ -5984,10 +5741,10 @@ var platformDpsApplicationDisplayApi = {
|
|
|
5984
5741
|
},
|
|
5985
5742
|
updateTutorialAndSupport(appId, data, authorization) {
|
|
5986
5743
|
return __async(this, null, function* () {
|
|
5987
|
-
yield
|
|
5744
|
+
yield dpsClientInstance.put(
|
|
5988
5745
|
`/v2/applications/${encodeURIComponent(appId)}/listing/support`,
|
|
5989
5746
|
data,
|
|
5990
|
-
|
|
5747
|
+
getDpsClientConfig(authorization)
|
|
5991
5748
|
).catch((error) => {
|
|
5992
5749
|
throw error.withCustomMessage(
|
|
5993
5750
|
`Listing details couldn't be updated. [${error.message}]`
|
|
@@ -5997,10 +5754,10 @@ var platformDpsApplicationDisplayApi = {
|
|
|
5997
5754
|
},
|
|
5998
5755
|
updateAppIcon(appId, payload, authorization) {
|
|
5999
5756
|
return __async(this, null, function* () {
|
|
6000
|
-
yield
|
|
5757
|
+
yield dpsClientInstance.put(
|
|
6001
5758
|
`/v2/applications/${encodeURIComponent(appId)}/display/icons`,
|
|
6002
5759
|
payload,
|
|
6003
|
-
|
|
5760
|
+
getDpsClientConfig(authorization)
|
|
6004
5761
|
).catch((error) => {
|
|
6005
5762
|
throw error.withCustomMessage(
|
|
6006
5763
|
`Listing details couldn't be updated. [${error.message}]`
|
|
@@ -6010,10 +5767,10 @@ var platformDpsApplicationDisplayApi = {
|
|
|
6010
5767
|
},
|
|
6011
5768
|
updateDisplayImages(appId, screenshots, authorization) {
|
|
6012
5769
|
return __async(this, null, function* () {
|
|
6013
|
-
yield
|
|
5770
|
+
yield dpsClientInstance.put(
|
|
6014
5771
|
`/v2/applications/${encodeURIComponent(appId)}/screenshots/commit`,
|
|
6015
5772
|
screenshots,
|
|
6016
|
-
|
|
5773
|
+
getDpsClientConfig(authorization)
|
|
6017
5774
|
).catch((error) => {
|
|
6018
5775
|
throw error.withCustomMessage(
|
|
6019
5776
|
`Listing details couldn't be updated. [${error.message}]`
|
|
@@ -6023,10 +5780,10 @@ var platformDpsApplicationDisplayApi = {
|
|
|
6023
5780
|
},
|
|
6024
5781
|
updateDisplayFeatures(appId, features, authorization) {
|
|
6025
5782
|
return __async(this, null, function* () {
|
|
6026
|
-
yield
|
|
5783
|
+
yield dpsClientInstance.put(
|
|
6027
5784
|
`/v2/applications/${encodeURIComponent(appId)}/features`,
|
|
6028
5785
|
features,
|
|
6029
|
-
|
|
5786
|
+
getDpsClientConfig(authorization)
|
|
6030
5787
|
).catch((error) => {
|
|
6031
5788
|
throw error.withCustomMessage(
|
|
6032
5789
|
`Listing details couldn't be updated. [${error.message}]`
|
|
@@ -6036,10 +5793,10 @@ var platformDpsApplicationDisplayApi = {
|
|
|
6036
5793
|
},
|
|
6037
5794
|
updateDisplayBenefits(appId, benefits, authorization) {
|
|
6038
5795
|
return __async(this, null, function* () {
|
|
6039
|
-
yield
|
|
5796
|
+
yield dpsClientInstance.put(
|
|
6040
5797
|
`/v2/applications/${encodeURIComponent(appId)}/benefits`,
|
|
6041
5798
|
benefits,
|
|
6042
|
-
|
|
5799
|
+
getDpsClientConfig(authorization)
|
|
6043
5800
|
).catch((error) => {
|
|
6044
5801
|
throw error.withCustomMessage(
|
|
6045
5802
|
`Listing details couldn't be updated. [${error.message}]`
|
|
@@ -6049,10 +5806,10 @@ var platformDpsApplicationDisplayApi = {
|
|
|
6049
5806
|
},
|
|
6050
5807
|
uploadImage(appId, body, authorization) {
|
|
6051
5808
|
return __async(this, null, function* () {
|
|
6052
|
-
return
|
|
5809
|
+
return dpsClientInstance.post(
|
|
6053
5810
|
`/v2/applications/${encodeURIComponent(appId)}/image`,
|
|
6054
5811
|
body,
|
|
6055
|
-
|
|
5812
|
+
getDpsClientConfig(authorization)
|
|
6056
5813
|
).catch((error) => {
|
|
6057
5814
|
throw error.withCustomMessage(`Image couldn't be uploaded`);
|
|
6058
5815
|
});
|
|
@@ -6064,9 +5821,9 @@ var platformDpsApplicationDisplayApi = {
|
|
|
6064
5821
|
var platformDpsApplicationEventApi = {
|
|
6065
5822
|
getEvents(appId, authorization) {
|
|
6066
5823
|
return __async(this, null, function* () {
|
|
6067
|
-
return
|
|
5824
|
+
return dpsClientInstance.get(
|
|
6068
5825
|
`/v2/applications/${encodeURIComponent(appId)}/events?limit=300`,
|
|
6069
|
-
|
|
5826
|
+
getDpsClientConfig(authorization)
|
|
6070
5827
|
).then(({ data }) => data).catch((error) => {
|
|
6071
5828
|
throw error.withCustomMessage(
|
|
6072
5829
|
`App Events couldn't be fetched. [${error.message}]`
|
|
@@ -6080,9 +5837,9 @@ var platformDpsApplicationEventApi = {
|
|
|
6080
5837
|
var platformDpsApplicationInfrastructureBlocksApi = {
|
|
6081
5838
|
getBlocks(appId, authorization) {
|
|
6082
5839
|
return __async(this, null, function* () {
|
|
6083
|
-
const response = yield
|
|
5840
|
+
const response = yield dpsClientInstance.get(
|
|
6084
5841
|
`/v2/applications/${encodeURIComponent(appId)}/infrastructure/blocks`,
|
|
6085
|
-
|
|
5842
|
+
getDpsClientConfig(authorization)
|
|
6086
5843
|
);
|
|
6087
5844
|
delete response.data.appId;
|
|
6088
5845
|
return response.data;
|
|
@@ -6090,26 +5847,26 @@ var platformDpsApplicationInfrastructureBlocksApi = {
|
|
|
6090
5847
|
},
|
|
6091
5848
|
updateBlocks(appId, payload, authorization) {
|
|
6092
5849
|
return __async(this, null, function* () {
|
|
6093
|
-
yield
|
|
5850
|
+
yield dpsClientInstance.patch(
|
|
6094
5851
|
`/v2/applications/${encodeURIComponent(appId)}/infrastructure/blocks`,
|
|
6095
5852
|
payload,
|
|
6096
|
-
|
|
5853
|
+
getDpsClientConfig(authorization)
|
|
6097
5854
|
);
|
|
6098
5855
|
});
|
|
6099
5856
|
},
|
|
6100
5857
|
deleteBlock(appId, block, authorization) {
|
|
6101
5858
|
return __async(this, null, function* () {
|
|
6102
|
-
yield
|
|
5859
|
+
yield dpsClientInstance.delete(
|
|
6103
5860
|
`/v2/applications/${encodeURIComponent(
|
|
6104
5861
|
appId
|
|
6105
5862
|
)}/infrastructure/blocks/${encodeURIComponent(block)}`,
|
|
6106
|
-
|
|
5863
|
+
getDpsClientConfig(authorization)
|
|
6107
5864
|
);
|
|
6108
5865
|
});
|
|
6109
5866
|
},
|
|
6110
5867
|
updateRepository(appId, payload, authorization) {
|
|
6111
5868
|
return __async(this, null, function* () {
|
|
6112
|
-
yield
|
|
5869
|
+
yield dpsClientInstance.patch(
|
|
6113
5870
|
`/v2/applications/${encodeURIComponent(appId)}/infrastructure/blocks`,
|
|
6114
5871
|
{
|
|
6115
5872
|
appId,
|
|
@@ -6117,14 +5874,14 @@ var platformDpsApplicationInfrastructureBlocksApi = {
|
|
|
6117
5874
|
provider: payload.provider
|
|
6118
5875
|
}
|
|
6119
5876
|
},
|
|
6120
|
-
|
|
5877
|
+
getDpsClientConfig(authorization)
|
|
6121
5878
|
);
|
|
6122
5879
|
});
|
|
6123
5880
|
},
|
|
6124
5881
|
updateDeployment(appId, payload, authorization) {
|
|
6125
5882
|
return __async(this, null, function* () {
|
|
6126
5883
|
const config = payload.customUrl ? { custom: { url: payload.customUrl } } : { custom: null };
|
|
6127
|
-
yield
|
|
5884
|
+
yield dpsClientInstance.patch(
|
|
6128
5885
|
`/v2/applications/${encodeURIComponent(appId)}/infrastructure/blocks`,
|
|
6129
5886
|
{
|
|
6130
5887
|
appId,
|
|
@@ -6133,13 +5890,13 @@ var platformDpsApplicationInfrastructureBlocksApi = {
|
|
|
6133
5890
|
config
|
|
6134
5891
|
}
|
|
6135
5892
|
},
|
|
6136
|
-
|
|
5893
|
+
getDpsClientConfig(authorization)
|
|
6137
5894
|
);
|
|
6138
5895
|
});
|
|
6139
5896
|
},
|
|
6140
5897
|
updateStorage(appId, payload, authorization) {
|
|
6141
5898
|
return __async(this, null, function* () {
|
|
6142
|
-
yield
|
|
5899
|
+
yield dpsClientInstance.patch(
|
|
6143
5900
|
`/v2/applications/${encodeURIComponent(appId)}/infrastructure/blocks`,
|
|
6144
5901
|
{
|
|
6145
5902
|
appId,
|
|
@@ -6147,7 +5904,7 @@ var platformDpsApplicationInfrastructureBlocksApi = {
|
|
|
6147
5904
|
provider: payload.provider
|
|
6148
5905
|
}
|
|
6149
5906
|
},
|
|
6150
|
-
|
|
5907
|
+
getDpsClientConfig(authorization)
|
|
6151
5908
|
);
|
|
6152
5909
|
});
|
|
6153
5910
|
}
|
|
@@ -6162,9 +5919,9 @@ var platformDpsApplicationInfrastructureApi = {
|
|
|
6162
5919
|
var platformDpsApplicationInstallApi = {
|
|
6163
5920
|
getInstallationsCount(appId, authorization) {
|
|
6164
5921
|
return __async(this, null, function* () {
|
|
6165
|
-
return
|
|
5922
|
+
return dpsClientInstance.get(
|
|
6166
5923
|
`/v2/applications/${encodeURIComponent(appId)}/installations/count`,
|
|
6167
|
-
|
|
5924
|
+
getDpsClientConfig(authorization)
|
|
6168
5925
|
).catch((error) => {
|
|
6169
5926
|
throw error.withCustomMessage(
|
|
6170
5927
|
`Couldn't get app installation count. [${error.message}]`
|
|
@@ -6174,10 +5931,10 @@ var platformDpsApplicationInstallApi = {
|
|
|
6174
5931
|
},
|
|
6175
5932
|
install(appId, authorization) {
|
|
6176
5933
|
return __async(this, null, function* () {
|
|
6177
|
-
yield
|
|
5934
|
+
yield dpsClientInstance.put(
|
|
6178
5935
|
`/v2/applications/${encodeURIComponent(appId)}/install`,
|
|
6179
5936
|
{},
|
|
6180
|
-
|
|
5937
|
+
getDpsClientConfig(authorization)
|
|
6181
5938
|
).catch((error) => {
|
|
6182
5939
|
throw error.withCustomMessage(
|
|
6183
5940
|
`App couldn't be installed. [${error.message}]`
|
|
@@ -6187,9 +5944,9 @@ var platformDpsApplicationInstallApi = {
|
|
|
6187
5944
|
},
|
|
6188
5945
|
uninstall(appId, authorization) {
|
|
6189
5946
|
return __async(this, null, function* () {
|
|
6190
|
-
yield
|
|
5947
|
+
yield dpsClientInstance.delete(
|
|
6191
5948
|
`/v2/applications/${encodeURIComponent(appId)}/install`,
|
|
6192
|
-
|
|
5949
|
+
getDpsClientConfig(authorization)
|
|
6193
5950
|
).catch((error) => {
|
|
6194
5951
|
throw error.withCustomMessage(
|
|
6195
5952
|
`App couldn't be uninstalled. [${error.message}]`
|
|
@@ -6199,10 +5956,10 @@ var platformDpsApplicationInstallApi = {
|
|
|
6199
5956
|
},
|
|
6200
5957
|
updateDirectInstallationUrl(appId, payload, authorization) {
|
|
6201
5958
|
return __async(this, null, function* () {
|
|
6202
|
-
yield
|
|
5959
|
+
yield dpsClientInstance.put(
|
|
6203
5960
|
`/v2/applications/${encodeURIComponent(appId)}/install/direct`,
|
|
6204
5961
|
payload,
|
|
6205
|
-
|
|
5962
|
+
getDpsClientConfig(authorization)
|
|
6206
5963
|
).catch((error) => {
|
|
6207
5964
|
throw error.withCustomMessage(
|
|
6208
5965
|
`Direct installation URL couldn't be updated. [${error.message}]`
|
|
@@ -6212,10 +5969,10 @@ var platformDpsApplicationInstallApi = {
|
|
|
6212
5969
|
},
|
|
6213
5970
|
getInstalledApplication(appId, license, authorization) {
|
|
6214
5971
|
return __async(this, null, function* () {
|
|
6215
|
-
return
|
|
5972
|
+
return dpsClientInstance.get(
|
|
6216
5973
|
`/v1/applications/${encodeURIComponent(appId)}/installed`,
|
|
6217
5974
|
{
|
|
6218
|
-
headers: __spreadProps(__spreadValues({},
|
|
5975
|
+
headers: __spreadProps(__spreadValues({}, getDpsClientConfig(authorization).headers), {
|
|
6219
5976
|
"X-License": license
|
|
6220
5977
|
})
|
|
6221
5978
|
}
|
|
@@ -6230,10 +5987,10 @@ var platformDpsApplicationInstallApi = {
|
|
|
6230
5987
|
var platformDpsApplicationOnboardingApi = {
|
|
6231
5988
|
updateOnboarding(appId, payload, authorization) {
|
|
6232
5989
|
return __async(this, null, function* () {
|
|
6233
|
-
yield
|
|
5990
|
+
yield dpsClientInstance.put(
|
|
6234
5991
|
`/v2/applications/${encodeURIComponent(appId)}/onboarding`,
|
|
6235
5992
|
payload,
|
|
6236
|
-
|
|
5993
|
+
getDpsClientConfig(authorization)
|
|
6237
5994
|
).catch((error) => {
|
|
6238
5995
|
throw error.withCustomMessage(
|
|
6239
5996
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
@@ -6243,9 +6000,9 @@ var platformDpsApplicationOnboardingApi = {
|
|
|
6243
6000
|
},
|
|
6244
6001
|
deleteOnboarding(appId, authorization) {
|
|
6245
6002
|
return __async(this, null, function* () {
|
|
6246
|
-
yield
|
|
6003
|
+
yield dpsClientInstance.delete(
|
|
6247
6004
|
`/v2/applications/${encodeURIComponent(appId)}/onboarding`,
|
|
6248
|
-
__spreadValues({},
|
|
6005
|
+
__spreadValues({}, getDpsClientConfig(authorization))
|
|
6249
6006
|
).catch((error) => {
|
|
6250
6007
|
throw error.withCustomMessage(
|
|
6251
6008
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
@@ -6260,12 +6017,12 @@ var platformDpsApplicationPaymentApi = {
|
|
|
6260
6017
|
updatePaymentBlock(appId, payment, authorization) {
|
|
6261
6018
|
return __async(this, null, function* () {
|
|
6262
6019
|
var _a;
|
|
6263
|
-
yield
|
|
6020
|
+
yield dpsClientInstance.put(
|
|
6264
6021
|
`/v2/applications/${encodeURIComponent(appId)}/payment`,
|
|
6265
6022
|
__spreadProps(__spreadValues({}, payment), {
|
|
6266
6023
|
creditCardRequired: (_a = payment.creditCardRequired) != null ? _a : true
|
|
6267
6024
|
}),
|
|
6268
|
-
|
|
6025
|
+
getDpsClientConfig(authorization)
|
|
6269
6026
|
).catch((error) => {
|
|
6270
6027
|
throw error.withCustomMessage(
|
|
6271
6028
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
@@ -6275,9 +6032,9 @@ var platformDpsApplicationPaymentApi = {
|
|
|
6275
6032
|
},
|
|
6276
6033
|
deletePaymentBlock(appId, authorization) {
|
|
6277
6034
|
return __async(this, null, function* () {
|
|
6278
|
-
yield
|
|
6035
|
+
yield dpsClientInstance.delete(
|
|
6279
6036
|
`/v2/applications/${encodeURIComponent(appId)}/payment`,
|
|
6280
|
-
|
|
6037
|
+
getDpsClientConfig(authorization)
|
|
6281
6038
|
).catch((error) => {
|
|
6282
6039
|
throw error.withCustomMessage(
|
|
6283
6040
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
@@ -6291,10 +6048,10 @@ var platformDpsApplicationPaymentApi = {
|
|
|
6291
6048
|
var platformDpsApplicationProductApi = {
|
|
6292
6049
|
updateProduct(appId, payload, authorization) {
|
|
6293
6050
|
return __async(this, null, function* () {
|
|
6294
|
-
yield
|
|
6051
|
+
yield dpsClientInstance.put(
|
|
6295
6052
|
`/v2/applications/${encodeURIComponent(appId)}/product`,
|
|
6296
6053
|
payload,
|
|
6297
|
-
|
|
6054
|
+
getDpsClientConfig(authorization)
|
|
6298
6055
|
).catch((error) => {
|
|
6299
6056
|
throw error.withCustomMessage(
|
|
6300
6057
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
@@ -6308,10 +6065,10 @@ var platformDpsApplicationProductApi = {
|
|
|
6308
6065
|
var platformDpsApplicationCustomPropsApi = {
|
|
6309
6066
|
createCustomProps(appId, property, authorization) {
|
|
6310
6067
|
return __async(this, null, function* () {
|
|
6311
|
-
return
|
|
6068
|
+
return dpsClientInstance.post(
|
|
6312
6069
|
`/v2/applications/${encodeURIComponent(appId)}/property`,
|
|
6313
6070
|
property,
|
|
6314
|
-
|
|
6071
|
+
getDpsClientConfig(authorization)
|
|
6315
6072
|
).then(({ data }) => data).catch((error) => {
|
|
6316
6073
|
throw error.withCustomMessage(
|
|
6317
6074
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.CREATED} [${error.message}]`
|
|
@@ -6321,10 +6078,10 @@ var platformDpsApplicationCustomPropsApi = {
|
|
|
6321
6078
|
},
|
|
6322
6079
|
updateCustomProps(appId, property, authorization) {
|
|
6323
6080
|
return __async(this, null, function* () {
|
|
6324
|
-
return
|
|
6081
|
+
return dpsClientInstance.put(
|
|
6325
6082
|
`/v2/applications/${encodeURIComponent(appId)}/property`,
|
|
6326
6083
|
property,
|
|
6327
|
-
|
|
6084
|
+
getDpsClientConfig(authorization)
|
|
6328
6085
|
).then(({ data }) => data).catch((error) => {
|
|
6329
6086
|
throw error.withCustomMessage(
|
|
6330
6087
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
@@ -6334,11 +6091,11 @@ var platformDpsApplicationCustomPropsApi = {
|
|
|
6334
6091
|
},
|
|
6335
6092
|
deleteCustomProps(appId, property, authorization) {
|
|
6336
6093
|
return __async(this, null, function* () {
|
|
6337
|
-
return
|
|
6094
|
+
return dpsClientInstance.delete(
|
|
6338
6095
|
`/v2/applications/${encodeURIComponent(appId)}/property`,
|
|
6339
6096
|
__spreadValues({
|
|
6340
6097
|
data: property
|
|
6341
|
-
},
|
|
6098
|
+
}, getDpsClientConfig(authorization))
|
|
6342
6099
|
).then(({ data }) => data).catch((error) => {
|
|
6343
6100
|
throw error.withCustomMessage(
|
|
6344
6101
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
@@ -6352,9 +6109,9 @@ var platformDpsApplicationCustomPropsApi = {
|
|
|
6352
6109
|
var platformDpsApplicationResourcesApi = {
|
|
6353
6110
|
getAppUpgrades(appId, authorization) {
|
|
6354
6111
|
return __async(this, null, function* () {
|
|
6355
|
-
return
|
|
6112
|
+
return dpsClientInstance.get(
|
|
6356
6113
|
`/v2/applications/${encodeURIComponent(appId)}/resources`,
|
|
6357
|
-
|
|
6114
|
+
getDpsClientConfig(authorization)
|
|
6358
6115
|
).catch((error) => {
|
|
6359
6116
|
throw error.withCustomMessage(
|
|
6360
6117
|
`App Resources couldn't be loaded. [${error.message}]`
|
|
@@ -6364,10 +6121,10 @@ var platformDpsApplicationResourcesApi = {
|
|
|
6364
6121
|
},
|
|
6365
6122
|
createAppUpgrade(appId, body, authorization) {
|
|
6366
6123
|
return __async(this, null, function* () {
|
|
6367
|
-
return
|
|
6124
|
+
return dpsClientInstance.put(
|
|
6368
6125
|
`/v2/applications/${encodeURIComponent(appId)}/resources`,
|
|
6369
6126
|
body,
|
|
6370
|
-
|
|
6127
|
+
getDpsClientConfig(authorization)
|
|
6371
6128
|
).catch((error) => {
|
|
6372
6129
|
throw error.withCustomMessage(
|
|
6373
6130
|
`App Resources couldn't be created. [${error.message}]`
|
|
@@ -6377,10 +6134,10 @@ var platformDpsApplicationResourcesApi = {
|
|
|
6377
6134
|
},
|
|
6378
6135
|
updateAppUpgrade(appId, body, authorization) {
|
|
6379
6136
|
return __async(this, null, function* () {
|
|
6380
|
-
return
|
|
6137
|
+
return dpsClientInstance.put(
|
|
6381
6138
|
`/v2/applications/${encodeURIComponent(appId)}/resources`,
|
|
6382
6139
|
body,
|
|
6383
|
-
|
|
6140
|
+
getDpsClientConfig(authorization)
|
|
6384
6141
|
).catch((error) => {
|
|
6385
6142
|
throw error.withCustomMessage(
|
|
6386
6143
|
`App Resources couldn't be updated. [${error.message}]`
|
|
@@ -6390,11 +6147,11 @@ var platformDpsApplicationResourcesApi = {
|
|
|
6390
6147
|
},
|
|
6391
6148
|
deleteAppUpgrade(appId, resourceId, authorization) {
|
|
6392
6149
|
return __async(this, null, function* () {
|
|
6393
|
-
return
|
|
6150
|
+
return dpsClientInstance.delete(
|
|
6394
6151
|
`/v2/applications/${encodeURIComponent(
|
|
6395
6152
|
appId
|
|
6396
6153
|
)}/resources/${encodeURIComponent(resourceId)}`,
|
|
6397
|
-
|
|
6154
|
+
getDpsClientConfig(authorization)
|
|
6398
6155
|
).catch((error) => {
|
|
6399
6156
|
throw error.withCustomMessage(
|
|
6400
6157
|
`App Resource couldn't be delete. [${error.message}]`
|
|
@@ -6404,12 +6161,12 @@ var platformDpsApplicationResourcesApi = {
|
|
|
6404
6161
|
},
|
|
6405
6162
|
copyUpgrade(sourceAppId, destinationAppId, authorization) {
|
|
6406
6163
|
return __async(this, null, function* () {
|
|
6407
|
-
return
|
|
6164
|
+
return dpsClientInstance.put(
|
|
6408
6165
|
`/v2/applications/${encodeURIComponent(
|
|
6409
6166
|
sourceAppId
|
|
6410
6167
|
)}/resources/copy?application=${encodeURIComponent(destinationAppId)}`,
|
|
6411
6168
|
{},
|
|
6412
|
-
|
|
6169
|
+
getDpsClientConfig(authorization)
|
|
6413
6170
|
).catch((error) => {
|
|
6414
6171
|
throw error.withCustomMessage(
|
|
6415
6172
|
`App Resources couldn't be copied. [${error.message}]`
|
|
@@ -6423,10 +6180,10 @@ var platformDpsApplicationResourcesApi = {
|
|
|
6423
6180
|
var platformDpsApplicationReviewApi = {
|
|
6424
6181
|
createSubmission(appId, payload, authorization) {
|
|
6425
6182
|
return __async(this, null, function* () {
|
|
6426
|
-
return
|
|
6183
|
+
return dpsClientInstance.put(
|
|
6427
6184
|
`/v2/applications/${encodeURIComponent(appId)}/review/submit`,
|
|
6428
6185
|
payload,
|
|
6429
|
-
|
|
6186
|
+
getDpsClientConfig(authorization)
|
|
6430
6187
|
).then(({ data }) => data).catch((error) => {
|
|
6431
6188
|
throw error.withCustomMessage(
|
|
6432
6189
|
`App couldn't be submitted for review. [${error.message}]`
|
|
@@ -6436,9 +6193,9 @@ var platformDpsApplicationReviewApi = {
|
|
|
6436
6193
|
},
|
|
6437
6194
|
cancelSubmission(appId, authorization) {
|
|
6438
6195
|
return __async(this, null, function* () {
|
|
6439
|
-
return
|
|
6196
|
+
return dpsClientInstance.put(
|
|
6440
6197
|
`/v2/applications/${encodeURIComponent(appId)}/review/cancel`,
|
|
6441
|
-
|
|
6198
|
+
getDpsClientConfig(authorization)
|
|
6442
6199
|
).then(({ data }) => data).catch((error) => {
|
|
6443
6200
|
throw error.withCustomMessage(
|
|
6444
6201
|
`App review couldn't be cancelled. [${error.message}]`
|
|
@@ -6452,9 +6209,9 @@ var platformDpsApplicationReviewApi = {
|
|
|
6452
6209
|
var platformDpsApplicationStatsApi = {
|
|
6453
6210
|
getStats(appId, authorization) {
|
|
6454
6211
|
return __async(this, null, function* () {
|
|
6455
|
-
return
|
|
6212
|
+
return dpsClientInstance.get(
|
|
6456
6213
|
`/v2/applications/${encodeURIComponent(appId)}/stats`,
|
|
6457
|
-
|
|
6214
|
+
getDpsClientConfig(authorization)
|
|
6458
6215
|
).catch((error) => {
|
|
6459
6216
|
throw error.withCustomMessage(
|
|
6460
6217
|
`App Stats couldn't be fetched. [${error.message}]`
|
|
@@ -6468,10 +6225,10 @@ var platformDpsApplicationStatsApi = {
|
|
|
6468
6225
|
var platformDpsApplicationWebhooksApi = {
|
|
6469
6226
|
updateAppWebhooks(appId, payload, authorization) {
|
|
6470
6227
|
return __async(this, null, function* () {
|
|
6471
|
-
yield
|
|
6228
|
+
yield dpsClientInstance.put(
|
|
6472
6229
|
`/v2/applications/${encodeURIComponent(appId)}/webhook`,
|
|
6473
6230
|
payload,
|
|
6474
|
-
|
|
6231
|
+
getDpsClientConfig(authorization)
|
|
6475
6232
|
).catch((error) => {
|
|
6476
6233
|
throw error.withCustomMessage(
|
|
6477
6234
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
@@ -6481,9 +6238,9 @@ var platformDpsApplicationWebhooksApi = {
|
|
|
6481
6238
|
},
|
|
6482
6239
|
deleteAppWebhooks(appId, authorization) {
|
|
6483
6240
|
return __async(this, null, function* () {
|
|
6484
|
-
yield
|
|
6241
|
+
yield dpsClientInstance.delete(
|
|
6485
6242
|
`/v2/applications/${encodeURIComponent(appId)}/webhook`,
|
|
6486
|
-
|
|
6243
|
+
getDpsClientConfig(authorization)
|
|
6487
6244
|
).catch((error) => {
|
|
6488
6245
|
throw error.withCustomMessage(
|
|
6489
6246
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
@@ -6493,9 +6250,9 @@ var platformDpsApplicationWebhooksApi = {
|
|
|
6493
6250
|
},
|
|
6494
6251
|
getChatWebhook(appId, authorization) {
|
|
6495
6252
|
return __async(this, null, function* () {
|
|
6496
|
-
return
|
|
6253
|
+
return dpsClientInstance.get(
|
|
6497
6254
|
`/v2/applications/${encodeURIComponent(appId)}/chat-webhooks`,
|
|
6498
|
-
|
|
6255
|
+
getDpsClientConfig(authorization)
|
|
6499
6256
|
).catch((error) => {
|
|
6500
6257
|
throw error.withCustomMessage(
|
|
6501
6258
|
`Couldn't get the chat webhook. [${error.message}]`
|
|
@@ -6505,10 +6262,10 @@ var platformDpsApplicationWebhooksApi = {
|
|
|
6505
6262
|
},
|
|
6506
6263
|
updateChatWebhook(appId, payload, authorization) {
|
|
6507
6264
|
return __async(this, null, function* () {
|
|
6508
|
-
yield
|
|
6265
|
+
yield dpsClientInstance.post(
|
|
6509
6266
|
`/v2/applications/${encodeURIComponent(appId)}/chat-webhooks`,
|
|
6510
6267
|
payload,
|
|
6511
|
-
|
|
6268
|
+
getDpsClientConfig(authorization)
|
|
6512
6269
|
).catch((error) => {
|
|
6513
6270
|
throw error.withCustomMessage(
|
|
6514
6271
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
@@ -6518,9 +6275,9 @@ var platformDpsApplicationWebhooksApi = {
|
|
|
6518
6275
|
},
|
|
6519
6276
|
deleteChatWebhook(appId, authorization) {
|
|
6520
6277
|
return __async(this, null, function* () {
|
|
6521
|
-
yield
|
|
6278
|
+
yield dpsClientInstance.delete(
|
|
6522
6279
|
`/v2/applications/${encodeURIComponent(appId)}/chat-webhooks`,
|
|
6523
|
-
__spreadValues({},
|
|
6280
|
+
__spreadValues({}, getDpsClientConfig(authorization))
|
|
6524
6281
|
).catch((error) => {
|
|
6525
6282
|
throw error.withCustomMessage(
|
|
6526
6283
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
@@ -6534,12 +6291,12 @@ var platformDpsApplicationWebhooksApi = {
|
|
|
6534
6291
|
var platformDpsApplicationWidgetsApi = {
|
|
6535
6292
|
createWidget(appId, widgetId, widget, authorization) {
|
|
6536
6293
|
return __async(this, null, function* () {
|
|
6537
|
-
yield
|
|
6294
|
+
yield dpsClientInstance.put(
|
|
6538
6295
|
`/v2/applications/${encodeURIComponent(
|
|
6539
6296
|
appId
|
|
6540
6297
|
)}/widgets/${encodeURIComponent(widgetId)}`,
|
|
6541
6298
|
widget,
|
|
6542
|
-
|
|
6299
|
+
getDpsClientConfig(authorization)
|
|
6543
6300
|
).catch((error) => {
|
|
6544
6301
|
throw error.withCustomMessage(
|
|
6545
6302
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.CREATED} [${error.message}]`
|
|
@@ -6549,12 +6306,12 @@ var platformDpsApplicationWidgetsApi = {
|
|
|
6549
6306
|
},
|
|
6550
6307
|
updateWidget(appId, widgetId, widget, authorization) {
|
|
6551
6308
|
return __async(this, null, function* () {
|
|
6552
|
-
yield
|
|
6309
|
+
yield dpsClientInstance.patch(
|
|
6553
6310
|
`/v2/applications/${encodeURIComponent(
|
|
6554
6311
|
appId
|
|
6555
6312
|
)}/widgets/${encodeURIComponent(widgetId)}`,
|
|
6556
6313
|
widget,
|
|
6557
|
-
|
|
6314
|
+
getDpsClientConfig(authorization)
|
|
6558
6315
|
).catch((error) => {
|
|
6559
6316
|
throw error.withCustomMessage(
|
|
6560
6317
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
@@ -6564,11 +6321,11 @@ var platformDpsApplicationWidgetsApi = {
|
|
|
6564
6321
|
},
|
|
6565
6322
|
deleteWidget(appId, widgetId, authorization) {
|
|
6566
6323
|
return __async(this, null, function* () {
|
|
6567
|
-
yield
|
|
6324
|
+
yield dpsClientInstance.delete(
|
|
6568
6325
|
`/v2/applications/${encodeURIComponent(
|
|
6569
6326
|
appId
|
|
6570
6327
|
)}/widgets/${encodeURIComponent(widgetId)}`,
|
|
6571
|
-
__spreadValues({},
|
|
6328
|
+
__spreadValues({}, getDpsClientConfig(authorization))
|
|
6572
6329
|
).catch((error) => {
|
|
6573
6330
|
throw error.withCustomMessage(
|
|
6574
6331
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
@@ -6600,9 +6357,9 @@ var platformDpsApplicationApi = {
|
|
|
6600
6357
|
getApp(appId, authorization) {
|
|
6601
6358
|
return __async(this, null, function* () {
|
|
6602
6359
|
try {
|
|
6603
|
-
const response = yield
|
|
6360
|
+
const response = yield dpsClientInstance.get(
|
|
6604
6361
|
`/v2/applications/${encodeURIComponent(appId)}`,
|
|
6605
|
-
|
|
6362
|
+
getDpsClientConfig(authorization)
|
|
6606
6363
|
);
|
|
6607
6364
|
return response.data;
|
|
6608
6365
|
} catch (error) {
|
|
@@ -6617,10 +6374,10 @@ var platformDpsApplicationApi = {
|
|
|
6617
6374
|
},
|
|
6618
6375
|
createApp(payload, authorization) {
|
|
6619
6376
|
return __async(this, null, function* () {
|
|
6620
|
-
return
|
|
6377
|
+
return dpsClientInstance.post(
|
|
6621
6378
|
`/v2/applications`,
|
|
6622
6379
|
payload,
|
|
6623
|
-
|
|
6380
|
+
getDpsClientConfig(authorization)
|
|
6624
6381
|
).then(({ data }) => data).catch((error) => {
|
|
6625
6382
|
throw error.withCustomMessage(
|
|
6626
6383
|
`App couldn't be created. [${error.message}]`
|
|
@@ -6630,10 +6387,10 @@ var platformDpsApplicationApi = {
|
|
|
6630
6387
|
},
|
|
6631
6388
|
fork(appId, authorization) {
|
|
6632
6389
|
return __async(this, null, function* () {
|
|
6633
|
-
return
|
|
6390
|
+
return dpsClientInstance.post(
|
|
6634
6391
|
`/v2/applications/${encodeURIComponent(appId)}/fork`,
|
|
6635
6392
|
{},
|
|
6636
|
-
|
|
6393
|
+
getDpsClientConfig(authorization)
|
|
6637
6394
|
).catch((error) => {
|
|
6638
6395
|
throw error.withCustomMessage(
|
|
6639
6396
|
`App couldn't be forked. [${error.message}]`
|
|
@@ -6643,10 +6400,10 @@ var platformDpsApplicationApi = {
|
|
|
6643
6400
|
},
|
|
6644
6401
|
publish(appId, authorization) {
|
|
6645
6402
|
return __async(this, null, function* () {
|
|
6646
|
-
return
|
|
6403
|
+
return dpsClientInstance.put(
|
|
6647
6404
|
`/v2/applications/${encodeURIComponent(appId)}/publish`,
|
|
6648
6405
|
{},
|
|
6649
|
-
|
|
6406
|
+
getDpsClientConfig(authorization)
|
|
6650
6407
|
).catch((error) => {
|
|
6651
6408
|
throw error.withCustomMessage(
|
|
6652
6409
|
`App couldn't be published. [${error.message}]`
|
|
@@ -6656,7 +6413,7 @@ var platformDpsApplicationApi = {
|
|
|
6656
6413
|
},
|
|
6657
6414
|
updateQL(appId) {
|
|
6658
6415
|
return __async(this, null, function* () {
|
|
6659
|
-
yield
|
|
6416
|
+
yield dpsClientInstance.patch(`/v2/applications/${encodeURIComponent(appId)}/qualified-lead`).catch((error) => {
|
|
6660
6417
|
throw error.withCustomMessage(
|
|
6661
6418
|
`QL couldn't be updated. [${error.message}]`
|
|
6662
6419
|
);
|
|
@@ -6665,9 +6422,9 @@ var platformDpsApplicationApi = {
|
|
|
6665
6422
|
},
|
|
6666
6423
|
deleteApp(appId, authorization) {
|
|
6667
6424
|
return __async(this, null, function* () {
|
|
6668
|
-
yield
|
|
6425
|
+
yield dpsClientInstance.delete(
|
|
6669
6426
|
`/v2/applications/${encodeURIComponent(appId)}`,
|
|
6670
|
-
|
|
6427
|
+
getDpsClientConfig(authorization)
|
|
6671
6428
|
).catch((error) => {
|
|
6672
6429
|
throw error.withCustomMessage(
|
|
6673
6430
|
`App couldn't be deleted. [${error.message}]`
|
|
@@ -6677,7 +6434,7 @@ var platformDpsApplicationApi = {
|
|
|
6677
6434
|
},
|
|
6678
6435
|
createAiContent(appId, appName, appSummary) {
|
|
6679
6436
|
return __async(this, null, function* () {
|
|
6680
|
-
return
|
|
6437
|
+
return dpsClientInstance.post(`/v2/ai/application/${encodeURIComponent(appId)}/content`, {
|
|
6681
6438
|
name: appName,
|
|
6682
6439
|
summary: appSummary
|
|
6683
6440
|
}).catch((error) => {
|
|
@@ -6697,9 +6454,9 @@ var platformDpsApplicationsPurchasesApi = {
|
|
|
6697
6454
|
const { from, to, duration } = options;
|
|
6698
6455
|
const response = apps.map((app) => __async(this, null, function* () {
|
|
6699
6456
|
const params = `applications=${app.clientId}${from ? `&from=${from}` : ""}${to ? `&to=${to}` : ""}&duration=${duration}&by=supplier`;
|
|
6700
|
-
const singleResponse = yield
|
|
6457
|
+
const singleResponse = yield dpsClientInstance.get(
|
|
6701
6458
|
`/v2/applications/purchases?${params}`,
|
|
6702
|
-
|
|
6459
|
+
getDpsClientConfig(authorization)
|
|
6703
6460
|
);
|
|
6704
6461
|
return {
|
|
6705
6462
|
appId: app.appId,
|
|
@@ -6722,9 +6479,9 @@ var platformDpsApplicationsPurchasesApi = {
|
|
|
6722
6479
|
const { from, to, duration } = options;
|
|
6723
6480
|
const clientIds = apps.map((app) => app.clientId);
|
|
6724
6481
|
const params = `applications=${clientIds.join(",")}${from ? `&from=${from}` : ""}${to ? `&to=${to}` : ""}&duration=${duration}&by=supplier`;
|
|
6725
|
-
return
|
|
6482
|
+
return dpsClientInstance.get(
|
|
6726
6483
|
`/v2/applications/purchases?${params}`,
|
|
6727
|
-
|
|
6484
|
+
getDpsClientConfig(authorization)
|
|
6728
6485
|
).then(({ data }) => {
|
|
6729
6486
|
return [{ data, appId: "All apps" }];
|
|
6730
6487
|
}).catch((error) => {
|
|
@@ -6738,9 +6495,9 @@ var platformDpsApplicationsPurchasesApi = {
|
|
|
6738
6495
|
return __async(this, null, function* () {
|
|
6739
6496
|
const { from, to, duration } = options;
|
|
6740
6497
|
const params = `applications=${apps.join(",")}${from ? `&from=${from}` : ""}${to ? `&to=${to}` : ""}&duration=${duration}`;
|
|
6741
|
-
return
|
|
6498
|
+
return dpsClientInstance.get(
|
|
6742
6499
|
`/v2/applications/purchases/history?${params}`,
|
|
6743
|
-
|
|
6500
|
+
getDpsClientConfig(authorization)
|
|
6744
6501
|
).then(({ data }) => {
|
|
6745
6502
|
return [{ data, appId: "All apps" }];
|
|
6746
6503
|
}).catch((error) => {
|
|
@@ -6764,9 +6521,9 @@ var platformDpsApplicationsUsageApi = {
|
|
|
6764
6521
|
params += duration ? `&duration=${duration}` : "";
|
|
6765
6522
|
params += from ? `&from=${from}` : "";
|
|
6766
6523
|
params += to ? `&to=${to}` : "";
|
|
6767
|
-
const singleResponse = yield
|
|
6524
|
+
const singleResponse = yield dpsClientInstance.get(
|
|
6768
6525
|
`/v2/applications/usage/organization?${params}`,
|
|
6769
|
-
|
|
6526
|
+
getDpsClientConfig(authorization)
|
|
6770
6527
|
);
|
|
6771
6528
|
return singleResponse.data;
|
|
6772
6529
|
}));
|
|
@@ -6789,7 +6546,7 @@ var platformDpsApplicationsApi = {
|
|
|
6789
6546
|
getApps() {
|
|
6790
6547
|
return __async(this, arguments, function* ({ filter = "licensed" } = {}) {
|
|
6791
6548
|
const params = `filter=${filter}`;
|
|
6792
|
-
return
|
|
6549
|
+
return dpsClientInstance.get(`/v2/applications?${params}`).then(({ data }) => data).catch((error) => {
|
|
6793
6550
|
throw error.withCustomMessage(
|
|
6794
6551
|
`Apps couldn't be fetched. [${error.message}]`
|
|
6795
6552
|
);
|
|
@@ -6801,7 +6558,7 @@ var platformDpsApplicationsApi = {
|
|
|
6801
6558
|
filter = "organization"
|
|
6802
6559
|
} = {}) {
|
|
6803
6560
|
const params = `filter=${filter}`;
|
|
6804
|
-
return
|
|
6561
|
+
return dpsClientInstance.get(`/v2/applications/installations/counters?${params}`).then(({ data }) => data).catch((error) => {
|
|
6805
6562
|
throw error.withCustomMessage(
|
|
6806
6563
|
`Apps installations couldn't be fetched. [${error.message}]`
|
|
6807
6564
|
);
|
|
@@ -6814,10 +6571,7 @@ var platformDpsApplicationsApi = {
|
|
|
6814
6571
|
var platformDpsCategoriesApi = {
|
|
6815
6572
|
getCategories(authorization) {
|
|
6816
6573
|
return __async(this, null, function* () {
|
|
6817
|
-
return
|
|
6818
|
-
`/v2/categories`,
|
|
6819
|
-
getPlatformDpsClientConfig(authorization)
|
|
6820
|
-
).then(({ data }) => data).catch((error) => {
|
|
6574
|
+
return dpsClientInstance.get(`/v2/categories`, getDpsClientConfig(authorization)).then(({ data }) => data).catch((error) => {
|
|
6821
6575
|
throw error.withCustomMessage(
|
|
6822
6576
|
`Categories couldn't be fetched. [${error.message}]`
|
|
6823
6577
|
);
|
|
@@ -6844,9 +6598,9 @@ var platformDpsDeveloperApi = {
|
|
|
6844
6598
|
params += `size=${size}&page=${page}`;
|
|
6845
6599
|
}
|
|
6846
6600
|
}
|
|
6847
|
-
return
|
|
6601
|
+
return dpsClientInstance.get(
|
|
6848
6602
|
`/v2/developers/${encodeURIComponent(userId)}/account/ledger${params}`,
|
|
6849
|
-
|
|
6603
|
+
getDpsClientConfig(authorization)
|
|
6850
6604
|
).then(({ data }) => data).catch((error) => {
|
|
6851
6605
|
throw error.withCustomMessage(
|
|
6852
6606
|
`Ledger couldn't be fetched. [${error.message}]`
|
|
@@ -6860,12 +6614,12 @@ var platformDpsDeveloperApi = {
|
|
|
6860
6614
|
note,
|
|
6861
6615
|
userId
|
|
6862
6616
|
}, authorization) {
|
|
6863
|
-
return
|
|
6617
|
+
return dpsClientInstance.patch(
|
|
6864
6618
|
`/v2/developers/${encodeURIComponent(
|
|
6865
6619
|
userId
|
|
6866
6620
|
)}/account/withdrawal/request`,
|
|
6867
6621
|
{ amount, note },
|
|
6868
|
-
|
|
6622
|
+
getDpsClientConfig(authorization)
|
|
6869
6623
|
).then(({ data }) => data).catch((error) => {
|
|
6870
6624
|
throw error.withCustomMessage(
|
|
6871
6625
|
`Withdrawal couldn't be requested. [${error.message}]`
|
|
@@ -6884,11 +6638,7 @@ var platformDpsDevelopersApi = {
|
|
|
6884
6638
|
var platformDpsLinksApi = {
|
|
6885
6639
|
updateShortcuts(links, authorization) {
|
|
6886
6640
|
return __async(this, null, function* () {
|
|
6887
|
-
yield
|
|
6888
|
-
`/v2/links`,
|
|
6889
|
-
links,
|
|
6890
|
-
getPlatformDpsClientConfig(authorization)
|
|
6891
|
-
).catch((error) => {
|
|
6641
|
+
yield dpsClientInstance.put(`/v2/links`, links, getDpsClientConfig(authorization)).catch((error) => {
|
|
6892
6642
|
throw error.withCustomMessage(
|
|
6893
6643
|
`Shortcuts couldn't be updated. [${error.message}]`
|
|
6894
6644
|
);
|
|
@@ -6901,9 +6651,9 @@ var platformDpsLinksApi = {
|
|
|
6901
6651
|
var dpsResearchCustomerApi = {
|
|
6902
6652
|
getResearchCustomersLicenses(authorization) {
|
|
6903
6653
|
return __async(this, null, function* () {
|
|
6904
|
-
return
|
|
6654
|
+
return dpsClientInstance.get(
|
|
6905
6655
|
`/v2/research/customers/licenses`,
|
|
6906
|
-
|
|
6656
|
+
getDpsClientConfig(authorization)
|
|
6907
6657
|
).then(({ data }) => data).catch((error) => {
|
|
6908
6658
|
throw error.withCustomMessage(
|
|
6909
6659
|
`We couldn't fetch the research toolkit data. [${error.message}]`
|
|
@@ -6913,9 +6663,9 @@ var dpsResearchCustomerApi = {
|
|
|
6913
6663
|
},
|
|
6914
6664
|
getResearchCustomersBusiness(authorization) {
|
|
6915
6665
|
return __async(this, null, function* () {
|
|
6916
|
-
return
|
|
6666
|
+
return dpsClientInstance.get(
|
|
6917
6667
|
`/v2/research/customers/business`,
|
|
6918
|
-
|
|
6668
|
+
getDpsClientConfig(authorization)
|
|
6919
6669
|
).then(({ data }) => data).catch((error) => {
|
|
6920
6670
|
throw error.withCustomMessage(
|
|
6921
6671
|
`We couldn't fetch the research toolkit data. [${error.message}]`
|
|
@@ -6925,9 +6675,9 @@ var dpsResearchCustomerApi = {
|
|
|
6925
6675
|
},
|
|
6926
6676
|
getResearchCustomersLocation(authorization) {
|
|
6927
6677
|
return __async(this, null, function* () {
|
|
6928
|
-
return
|
|
6678
|
+
return dpsClientInstance.get(
|
|
6929
6679
|
`/v2/research/customers/location`,
|
|
6930
|
-
|
|
6680
|
+
getDpsClientConfig(authorization)
|
|
6931
6681
|
).then(({ data }) => data).catch((error) => {
|
|
6932
6682
|
throw error.withCustomMessage(
|
|
6933
6683
|
`We couldn't fetch the research toolkit data. [${error.message}]`
|
|
@@ -6942,9 +6692,9 @@ var dpsResearchDictionaryApi = {
|
|
|
6942
6692
|
getResearchDictionary() {
|
|
6943
6693
|
return __async(this, arguments, function* (options = {}, authorization) {
|
|
6944
6694
|
const params = new URLSearchParams(options);
|
|
6945
|
-
return
|
|
6695
|
+
return dpsClientInstance.get(
|
|
6946
6696
|
`/v2/research/dictionary?${params.toString()}`,
|
|
6947
|
-
|
|
6697
|
+
getDpsClientConfig(authorization)
|
|
6948
6698
|
).then(({ data }) => data).catch((error) => {
|
|
6949
6699
|
throw error.withCustomMessage(
|
|
6950
6700
|
`We couldn't fetch the research toolkit data. [${error.message}]`
|
|
@@ -6959,9 +6709,9 @@ var dpsResearchMarketplaceApi = {
|
|
|
6959
6709
|
getResearchMarketplaceApps() {
|
|
6960
6710
|
return __async(this, arguments, function* (options = {}, authorization) {
|
|
6961
6711
|
const params = new URLSearchParams(options);
|
|
6962
|
-
return
|
|
6712
|
+
return dpsClientInstance.get(
|
|
6963
6713
|
`/v2/research/marketplace/apps?${params.toString()}`,
|
|
6964
|
-
|
|
6714
|
+
getDpsClientConfig(authorization)
|
|
6965
6715
|
).then(({ data }) => data).catch((error) => {
|
|
6966
6716
|
throw error.withCustomMessage(
|
|
6967
6717
|
`We couldn't fetch the research toolkit data. [${error.message}]`
|
|
@@ -6972,9 +6722,9 @@ var dpsResearchMarketplaceApi = {
|
|
|
6972
6722
|
getResearchMarketplaceViews() {
|
|
6973
6723
|
return __async(this, arguments, function* (options = {}, authorization) {
|
|
6974
6724
|
const params = new URLSearchParams(options);
|
|
6975
|
-
return
|
|
6725
|
+
return dpsClientInstance.get(
|
|
6976
6726
|
`/v2/research/marketplace/views?${params.toString()}`,
|
|
6977
|
-
|
|
6727
|
+
getDpsClientConfig(authorization)
|
|
6978
6728
|
).then(({ data }) => data).catch((error) => {
|
|
6979
6729
|
throw error.withCustomMessage(
|
|
6980
6730
|
`We couldn't fetch the research toolkit data. [${error.message}]`
|
|
@@ -6989,9 +6739,9 @@ var dpsResearchTrafficApi = {
|
|
|
6989
6739
|
getResearchTrafficAgents() {
|
|
6990
6740
|
return __async(this, arguments, function* (options = {}, authorization) {
|
|
6991
6741
|
const params = new URLSearchParams(options);
|
|
6992
|
-
return
|
|
6742
|
+
return dpsClientInstance.get(
|
|
6993
6743
|
`/v2/research/traffic/agents?${params.toString()}`,
|
|
6994
|
-
|
|
6744
|
+
getDpsClientConfig(authorization)
|
|
6995
6745
|
).then(({ data }) => data).catch((error) => {
|
|
6996
6746
|
throw error.withCustomMessage(
|
|
6997
6747
|
`We couldn't fetch the research toolkit data. [${error.message}]`
|
|
@@ -7002,9 +6752,9 @@ var dpsResearchTrafficApi = {
|
|
|
7002
6752
|
getResearchTrafficChats() {
|
|
7003
6753
|
return __async(this, arguments, function* (options = {}, authorization) {
|
|
7004
6754
|
const params = new URLSearchParams(options);
|
|
7005
|
-
return
|
|
6755
|
+
return dpsClientInstance.get(
|
|
7006
6756
|
`/v2/research/traffic/chats?${params.toString()}`,
|
|
7007
|
-
|
|
6757
|
+
getDpsClientConfig(authorization)
|
|
7008
6758
|
).then(({ data }) => data).catch((error) => {
|
|
7009
6759
|
throw error.withCustomMessage(
|
|
7010
6760
|
`We couldn't fetch the research toolkit data. [${error.message}]`
|
|
@@ -7026,62 +6776,62 @@ var platformDpsResearchApi = {
|
|
|
7026
6776
|
var platformDpsUserApi = {
|
|
7027
6777
|
getUser(authorization) {
|
|
7028
6778
|
return __async(this, null, function* () {
|
|
7029
|
-
const response = yield
|
|
6779
|
+
const response = yield dpsClientInstance.get(
|
|
7030
6780
|
`/v2/me`,
|
|
7031
|
-
|
|
6781
|
+
getDpsClientConfig(authorization)
|
|
7032
6782
|
);
|
|
7033
6783
|
return response.data;
|
|
7034
6784
|
});
|
|
7035
6785
|
},
|
|
7036
6786
|
getUserIntegrations(authorization) {
|
|
7037
6787
|
return __async(this, null, function* () {
|
|
7038
|
-
const response = yield
|
|
6788
|
+
const response = yield dpsClientInstance.get(
|
|
7039
6789
|
`/v2/me/integrations`,
|
|
7040
|
-
|
|
6790
|
+
getDpsClientConfig(authorization)
|
|
7041
6791
|
);
|
|
7042
6792
|
return response.data;
|
|
7043
6793
|
});
|
|
7044
6794
|
},
|
|
7045
6795
|
updateUser(user, authorization) {
|
|
7046
6796
|
return __async(this, null, function* () {
|
|
7047
|
-
const { status } = yield
|
|
6797
|
+
const { status } = yield dpsClientInstance.put(
|
|
7048
6798
|
`/v2/me`,
|
|
7049
6799
|
user,
|
|
7050
|
-
|
|
6800
|
+
getDpsClientConfig(authorization)
|
|
7051
6801
|
);
|
|
7052
6802
|
return status;
|
|
7053
6803
|
});
|
|
7054
6804
|
},
|
|
7055
6805
|
updateUserIntegrations(payload, authorization) {
|
|
7056
6806
|
return __async(this, null, function* () {
|
|
7057
|
-
yield
|
|
6807
|
+
yield dpsClientInstance.patch(
|
|
7058
6808
|
`/v2/me/integrations`,
|
|
7059
6809
|
payload,
|
|
7060
|
-
|
|
6810
|
+
getDpsClientConfig(authorization)
|
|
7061
6811
|
);
|
|
7062
6812
|
});
|
|
7063
6813
|
},
|
|
7064
6814
|
updateUserFeatures(payload, authorization) {
|
|
7065
6815
|
return __async(this, null, function* () {
|
|
7066
|
-
yield
|
|
6816
|
+
yield dpsClientInstance.put(
|
|
7067
6817
|
"/v2/features",
|
|
7068
6818
|
payload,
|
|
7069
|
-
|
|
6819
|
+
getDpsClientConfig(authorization)
|
|
7070
6820
|
);
|
|
7071
6821
|
});
|
|
7072
6822
|
},
|
|
7073
6823
|
updateUserSurvey(payload, authorization) {
|
|
7074
6824
|
return __async(this, null, function* () {
|
|
7075
|
-
yield
|
|
6825
|
+
yield dpsClientInstance.post(
|
|
7076
6826
|
"/v2/survey",
|
|
7077
6827
|
payload,
|
|
7078
|
-
|
|
6828
|
+
getDpsClientConfig(authorization)
|
|
7079
6829
|
);
|
|
7080
6830
|
});
|
|
7081
6831
|
},
|
|
7082
6832
|
removeUserGitHubIntegrationByInstallationId(installationId, authorization) {
|
|
7083
6833
|
return __async(this, null, function* () {
|
|
7084
|
-
yield
|
|
6834
|
+
yield dpsClientInstance.delete(`/v2/me/integrations/github`, __spreadProps(__spreadValues({}, getDpsClientConfig(authorization)), {
|
|
7085
6835
|
data: {
|
|
7086
6836
|
githubInstallationId: installationId
|
|
7087
6837
|
}
|
|
@@ -7090,17 +6840,17 @@ var platformDpsUserApi = {
|
|
|
7090
6840
|
},
|
|
7091
6841
|
updateUserNetlifyIntegration(userNetlifyIntegration, authorization) {
|
|
7092
6842
|
return __async(this, null, function* () {
|
|
7093
|
-
const { status } = yield
|
|
6843
|
+
const { status } = yield dpsClientInstance.patch(
|
|
7094
6844
|
`/v2/me/integrations`,
|
|
7095
6845
|
{ netlify: userNetlifyIntegration },
|
|
7096
|
-
|
|
6846
|
+
getDpsClientConfig(authorization)
|
|
7097
6847
|
);
|
|
7098
6848
|
return status;
|
|
7099
6849
|
});
|
|
7100
6850
|
},
|
|
7101
6851
|
register(authorization) {
|
|
7102
6852
|
return __async(this, null, function* () {
|
|
7103
|
-
return
|
|
6853
|
+
return dpsClientInstance.post("/v2/register", void 0, getDpsClientConfig(authorization));
|
|
7104
6854
|
});
|
|
7105
6855
|
}
|
|
7106
6856
|
};
|
|
@@ -7119,35 +6869,35 @@ var platformDpsApi = {
|
|
|
7119
6869
|
var platformAdapterAppAuthorizationApi = {
|
|
7120
6870
|
get(appId, authorization) {
|
|
7121
6871
|
return __async(this, null, function* () {
|
|
7122
|
-
return
|
|
6872
|
+
return adapterClientInstance.get(
|
|
7123
6873
|
`/console/app/${encodeURIComponent(appId)}/blocks/authorization`,
|
|
7124
|
-
|
|
6874
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7125
6875
|
);
|
|
7126
6876
|
});
|
|
7127
6877
|
},
|
|
7128
6878
|
add(payload, authorization) {
|
|
7129
6879
|
return __async(this, null, function* () {
|
|
7130
|
-
return
|
|
6880
|
+
return adapterClientInstance.post(
|
|
7131
6881
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/authorization`,
|
|
7132
6882
|
payload,
|
|
7133
|
-
|
|
6883
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7134
6884
|
);
|
|
7135
6885
|
});
|
|
7136
6886
|
},
|
|
7137
6887
|
update(payload, authorization) {
|
|
7138
6888
|
return __async(this, null, function* () {
|
|
7139
|
-
return
|
|
6889
|
+
return adapterClientInstance.put(
|
|
7140
6890
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/authorization`,
|
|
7141
6891
|
payload,
|
|
7142
|
-
|
|
6892
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7143
6893
|
);
|
|
7144
6894
|
});
|
|
7145
6895
|
},
|
|
7146
6896
|
remove(payload, authorization) {
|
|
7147
6897
|
return __async(this, null, function* () {
|
|
7148
|
-
return
|
|
6898
|
+
return adapterClientInstance.delete(
|
|
7149
6899
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/authorization`,
|
|
7150
|
-
|
|
6900
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7151
6901
|
);
|
|
7152
6902
|
});
|
|
7153
6903
|
}
|
|
@@ -7157,47 +6907,47 @@ var platformAdapterAppAuthorizationApi = {
|
|
|
7157
6907
|
var platformAdapterAppDeploymentApi = {
|
|
7158
6908
|
getAggregate(appId, authorization) {
|
|
7159
6909
|
return __async(this, null, function* () {
|
|
7160
|
-
return
|
|
6910
|
+
return adapterClientInstance.get(
|
|
7161
6911
|
`/console/app/${encodeURIComponent(appId)}/blocks/deployment/aggregate`,
|
|
7162
|
-
|
|
6912
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7163
6913
|
);
|
|
7164
6914
|
});
|
|
7165
6915
|
},
|
|
7166
6916
|
get(appId, authorization) {
|
|
7167
6917
|
return __async(this, null, function* () {
|
|
7168
|
-
return
|
|
6918
|
+
return adapterClientInstance.get(
|
|
7169
6919
|
`/console/app/${encodeURIComponent(appId)}/blocks/deployment`,
|
|
7170
|
-
|
|
6920
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7171
6921
|
);
|
|
7172
6922
|
});
|
|
7173
6923
|
},
|
|
7174
6924
|
link(payload, authorization) {
|
|
7175
6925
|
return __async(this, null, function* () {
|
|
7176
|
-
return
|
|
6926
|
+
return adapterClientInstance.put(
|
|
7177
6927
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/deployment`,
|
|
7178
6928
|
payload,
|
|
7179
|
-
|
|
6929
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7180
6930
|
);
|
|
7181
6931
|
});
|
|
7182
6932
|
},
|
|
7183
6933
|
unlink(payload, authorization) {
|
|
7184
6934
|
return __async(this, null, function* () {
|
|
7185
|
-
return
|
|
6935
|
+
return adapterClientInstance.delete(
|
|
7186
6936
|
`/console/app/${encodeURIComponent(
|
|
7187
6937
|
payload.appId
|
|
7188
6938
|
)}/blocks/deployment?${new URLSearchParams(
|
|
7189
6939
|
payload
|
|
7190
6940
|
).toString()}`,
|
|
7191
|
-
|
|
6941
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7192
6942
|
);
|
|
7193
6943
|
});
|
|
7194
6944
|
},
|
|
7195
6945
|
upsert(payload, authorization) {
|
|
7196
6946
|
return __async(this, null, function* () {
|
|
7197
|
-
return
|
|
6947
|
+
return adapterClientInstance.patch(
|
|
7198
6948
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/deployment`,
|
|
7199
6949
|
payload,
|
|
7200
|
-
|
|
6950
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7201
6951
|
);
|
|
7202
6952
|
});
|
|
7203
6953
|
}
|
|
@@ -7207,26 +6957,26 @@ var platformAdapterAppDeploymentApi = {
|
|
|
7207
6957
|
var platformAdapterAppMonetizationApi = {
|
|
7208
6958
|
get(appId, authorization) {
|
|
7209
6959
|
return __async(this, null, function* () {
|
|
7210
|
-
return
|
|
6960
|
+
return adapterClientInstance.get(
|
|
7211
6961
|
`/console/app/${encodeURIComponent(appId)}/blocks/monetization`,
|
|
7212
|
-
|
|
6962
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7213
6963
|
);
|
|
7214
6964
|
});
|
|
7215
6965
|
},
|
|
7216
6966
|
upsert(payload, authorization) {
|
|
7217
6967
|
return __async(this, null, function* () {
|
|
7218
|
-
return
|
|
6968
|
+
return adapterClientInstance.post(
|
|
7219
6969
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/monetization`,
|
|
7220
6970
|
payload,
|
|
7221
|
-
|
|
6971
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7222
6972
|
);
|
|
7223
6973
|
});
|
|
7224
6974
|
},
|
|
7225
6975
|
remove(payload, authorization) {
|
|
7226
6976
|
return __async(this, null, function* () {
|
|
7227
|
-
return
|
|
6977
|
+
return adapterClientInstance.delete(
|
|
7228
6978
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/monetization`,
|
|
7229
|
-
|
|
6979
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7230
6980
|
);
|
|
7231
6981
|
});
|
|
7232
6982
|
}
|
|
@@ -7236,30 +6986,30 @@ var platformAdapterAppMonetizationApi = {
|
|
|
7236
6986
|
var platformAdapterAppPropertyApi = {
|
|
7237
6987
|
get(appId, propertyId, authorization) {
|
|
7238
6988
|
return __async(this, null, function* () {
|
|
7239
|
-
return
|
|
6989
|
+
return adapterClientInstance.get(
|
|
7240
6990
|
`/console/app/${encodeURIComponent(
|
|
7241
6991
|
appId
|
|
7242
6992
|
)}/blocks/properties/${encodeURIComponent(propertyId)}`,
|
|
7243
|
-
|
|
6993
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7244
6994
|
);
|
|
7245
6995
|
});
|
|
7246
6996
|
},
|
|
7247
6997
|
upsert(payload, authorization) {
|
|
7248
6998
|
return __async(this, null, function* () {
|
|
7249
|
-
return
|
|
6999
|
+
return adapterClientInstance.post(
|
|
7250
7000
|
`/console/app/${encodeURIComponent(
|
|
7251
7001
|
payload.appId
|
|
7252
7002
|
)}/blocks/properties/${encodeURIComponent(payload.propertyId)}`,
|
|
7253
7003
|
payload,
|
|
7254
|
-
|
|
7004
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7255
7005
|
);
|
|
7256
7006
|
});
|
|
7257
7007
|
},
|
|
7258
7008
|
remove(payload, authorization) {
|
|
7259
7009
|
return __async(this, null, function* () {
|
|
7260
|
-
return
|
|
7010
|
+
return adapterClientInstance.delete(
|
|
7261
7011
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/properties/${payload.propertyId}`,
|
|
7262
|
-
|
|
7012
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7263
7013
|
);
|
|
7264
7014
|
});
|
|
7265
7015
|
}
|
|
@@ -7270,26 +7020,26 @@ var platformAdapterAppPropertiesApi = {
|
|
|
7270
7020
|
property: platformAdapterAppPropertyApi,
|
|
7271
7021
|
get(appId, authorization) {
|
|
7272
7022
|
return __async(this, null, function* () {
|
|
7273
|
-
return
|
|
7023
|
+
return adapterClientInstance.get(
|
|
7274
7024
|
`/console/app/${encodeURIComponent(appId)}/blocks/properties`,
|
|
7275
|
-
|
|
7025
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7276
7026
|
);
|
|
7277
7027
|
});
|
|
7278
7028
|
},
|
|
7279
7029
|
upsert(payload, authorization) {
|
|
7280
7030
|
return __async(this, null, function* () {
|
|
7281
|
-
return
|
|
7031
|
+
return adapterClientInstance.post(
|
|
7282
7032
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/properties`,
|
|
7283
7033
|
payload,
|
|
7284
|
-
|
|
7034
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7285
7035
|
);
|
|
7286
7036
|
});
|
|
7287
7037
|
},
|
|
7288
7038
|
remove(payload, authorization) {
|
|
7289
7039
|
return __async(this, null, function* () {
|
|
7290
|
-
return
|
|
7040
|
+
return adapterClientInstance.delete(
|
|
7291
7041
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/properties`,
|
|
7292
|
-
|
|
7042
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7293
7043
|
);
|
|
7294
7044
|
});
|
|
7295
7045
|
}
|
|
@@ -7299,58 +7049,58 @@ var platformAdapterAppPropertiesApi = {
|
|
|
7299
7049
|
var platformAdapterAppRepositoryApi = {
|
|
7300
7050
|
getAggregate(appId, authorization) {
|
|
7301
7051
|
return __async(this, null, function* () {
|
|
7302
|
-
return
|
|
7052
|
+
return adapterClientInstance.get(
|
|
7303
7053
|
`/console/app/${encodeURIComponent(appId)}/blocks/repository/aggregate`,
|
|
7304
|
-
|
|
7054
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7305
7055
|
);
|
|
7306
7056
|
});
|
|
7307
7057
|
},
|
|
7308
7058
|
get(appId, authorization) {
|
|
7309
7059
|
return __async(this, null, function* () {
|
|
7310
|
-
return
|
|
7060
|
+
return adapterClientInstance.get(
|
|
7311
7061
|
`/console/app/${encodeURIComponent(appId)}/blocks/repository`,
|
|
7312
|
-
|
|
7062
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7313
7063
|
);
|
|
7314
7064
|
});
|
|
7315
7065
|
},
|
|
7316
7066
|
link(payload, authorization) {
|
|
7317
7067
|
return __async(this, null, function* () {
|
|
7318
|
-
return
|
|
7068
|
+
return adapterClientInstance.put(
|
|
7319
7069
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/repository`,
|
|
7320
7070
|
payload,
|
|
7321
|
-
|
|
7071
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7322
7072
|
);
|
|
7323
7073
|
});
|
|
7324
7074
|
},
|
|
7325
7075
|
unlink(payload, authorization) {
|
|
7326
7076
|
return __async(this, null, function* () {
|
|
7327
|
-
return
|
|
7077
|
+
return adapterClientInstance.delete(
|
|
7328
7078
|
`/console/app/${encodeURIComponent(
|
|
7329
7079
|
payload.appId
|
|
7330
7080
|
)}/blocks/repository?${new URLSearchParams(
|
|
7331
7081
|
payload
|
|
7332
7082
|
).toString()}`,
|
|
7333
|
-
|
|
7083
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7334
7084
|
);
|
|
7335
7085
|
});
|
|
7336
7086
|
},
|
|
7337
7087
|
upsert(payload, authorization) {
|
|
7338
7088
|
return __async(this, null, function* () {
|
|
7339
|
-
return
|
|
7089
|
+
return adapterClientInstance.patch(
|
|
7340
7090
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/repository`,
|
|
7341
7091
|
payload,
|
|
7342
|
-
|
|
7092
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7343
7093
|
);
|
|
7344
7094
|
});
|
|
7345
7095
|
},
|
|
7346
7096
|
seed(payload, authorization) {
|
|
7347
7097
|
return __async(this, null, function* () {
|
|
7348
|
-
return
|
|
7098
|
+
return adapterClientInstance.post(
|
|
7349
7099
|
`/console/app/${encodeURIComponent(
|
|
7350
7100
|
payload.appId
|
|
7351
7101
|
)}/blocks/repository/seed`,
|
|
7352
7102
|
payload,
|
|
7353
|
-
|
|
7103
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7354
7104
|
);
|
|
7355
7105
|
});
|
|
7356
7106
|
}
|
|
@@ -7360,47 +7110,47 @@ var platformAdapterAppRepositoryApi = {
|
|
|
7360
7110
|
var platformAdapterAppStorageApi = {
|
|
7361
7111
|
getAggregate(appId, authorization) {
|
|
7362
7112
|
return __async(this, null, function* () {
|
|
7363
|
-
return
|
|
7113
|
+
return adapterClientInstance.get(
|
|
7364
7114
|
`/console/app/${encodeURIComponent(appId)}/blocks/storage/aggregate`,
|
|
7365
|
-
|
|
7115
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7366
7116
|
);
|
|
7367
7117
|
});
|
|
7368
7118
|
},
|
|
7369
7119
|
get(appId, authorization) {
|
|
7370
7120
|
return __async(this, null, function* () {
|
|
7371
|
-
return
|
|
7121
|
+
return adapterClientInstance.get(
|
|
7372
7122
|
`/console/app/${encodeURIComponent(appId)}/blocks/storage`,
|
|
7373
|
-
|
|
7123
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7374
7124
|
);
|
|
7375
7125
|
});
|
|
7376
7126
|
},
|
|
7377
7127
|
link(payload, authorization) {
|
|
7378
7128
|
return __async(this, null, function* () {
|
|
7379
|
-
return
|
|
7129
|
+
return adapterClientInstance.put(
|
|
7380
7130
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/storage`,
|
|
7381
7131
|
payload,
|
|
7382
|
-
|
|
7132
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7383
7133
|
);
|
|
7384
7134
|
});
|
|
7385
7135
|
},
|
|
7386
7136
|
unlink(payload, authorization) {
|
|
7387
7137
|
return __async(this, null, function* () {
|
|
7388
|
-
return
|
|
7138
|
+
return adapterClientInstance.delete(
|
|
7389
7139
|
`/console/app/${encodeURIComponent(
|
|
7390
7140
|
payload.appId
|
|
7391
7141
|
)}/blocks/storage?${new URLSearchParams(
|
|
7392
7142
|
payload
|
|
7393
7143
|
).toString()}`,
|
|
7394
|
-
|
|
7144
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7395
7145
|
);
|
|
7396
7146
|
});
|
|
7397
7147
|
},
|
|
7398
7148
|
upsert(payload, authorization) {
|
|
7399
7149
|
return __async(this, null, function* () {
|
|
7400
|
-
return
|
|
7150
|
+
return adapterClientInstance.patch(
|
|
7401
7151
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/storage`,
|
|
7402
7152
|
payload,
|
|
7403
|
-
|
|
7153
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7404
7154
|
);
|
|
7405
7155
|
});
|
|
7406
7156
|
}
|
|
@@ -7410,32 +7160,32 @@ var platformAdapterAppStorageApi = {
|
|
|
7410
7160
|
var platformAdapterAppWidgetApi = {
|
|
7411
7161
|
get(appId, widgetId, authorization) {
|
|
7412
7162
|
return __async(this, null, function* () {
|
|
7413
|
-
return
|
|
7163
|
+
return adapterClientInstance.get(
|
|
7414
7164
|
`/console/app/${encodeURIComponent(
|
|
7415
7165
|
appId
|
|
7416
7166
|
)}/blocks/widgets/${encodeURIComponent(widgetId)}`,
|
|
7417
|
-
|
|
7167
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7418
7168
|
);
|
|
7419
7169
|
});
|
|
7420
7170
|
},
|
|
7421
7171
|
upsert(payload, authorization) {
|
|
7422
7172
|
return __async(this, null, function* () {
|
|
7423
|
-
return
|
|
7173
|
+
return adapterClientInstance.post(
|
|
7424
7174
|
`/console/app/${encodeURIComponent(
|
|
7425
7175
|
payload.appId
|
|
7426
7176
|
)}/blocks/widgets/${encodeURIComponent(payload.widgetId)}`,
|
|
7427
7177
|
payload,
|
|
7428
|
-
|
|
7178
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7429
7179
|
);
|
|
7430
7180
|
});
|
|
7431
7181
|
},
|
|
7432
7182
|
remove(payload, authorization) {
|
|
7433
7183
|
return __async(this, null, function* () {
|
|
7434
|
-
return
|
|
7184
|
+
return adapterClientInstance.delete(
|
|
7435
7185
|
`/console/app/${encodeURIComponent(
|
|
7436
7186
|
payload.appId
|
|
7437
7187
|
)}/blocks/widgets/${encodeURIComponent(payload.widgetId)}`,
|
|
7438
|
-
|
|
7188
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7439
7189
|
);
|
|
7440
7190
|
});
|
|
7441
7191
|
}
|
|
@@ -7446,26 +7196,26 @@ var platformAdapterAppWidgetsApi = {
|
|
|
7446
7196
|
widget: platformAdapterAppWidgetApi,
|
|
7447
7197
|
get(appId, authorization) {
|
|
7448
7198
|
return __async(this, null, function* () {
|
|
7449
|
-
return
|
|
7199
|
+
return adapterClientInstance.get(
|
|
7450
7200
|
`/console/app/${encodeURIComponent(appId)}/blocks/widgets`,
|
|
7451
|
-
|
|
7201
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7452
7202
|
);
|
|
7453
7203
|
});
|
|
7454
7204
|
},
|
|
7455
7205
|
upsert(payload, authorization) {
|
|
7456
7206
|
return __async(this, null, function* () {
|
|
7457
|
-
return
|
|
7207
|
+
return adapterClientInstance.post(
|
|
7458
7208
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/widgets`,
|
|
7459
7209
|
payload,
|
|
7460
|
-
|
|
7210
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7461
7211
|
);
|
|
7462
7212
|
});
|
|
7463
7213
|
},
|
|
7464
7214
|
remove(payload, authorization) {
|
|
7465
7215
|
return __async(this, null, function* () {
|
|
7466
|
-
return
|
|
7216
|
+
return adapterClientInstance.delete(
|
|
7467
7217
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/widgets`,
|
|
7468
|
-
|
|
7218
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7469
7219
|
);
|
|
7470
7220
|
});
|
|
7471
7221
|
}
|
|
@@ -7486,64 +7236,64 @@ var platformAdapterAppBlocksApi = {
|
|
|
7486
7236
|
var platformAdapterAppVariablesApi = {
|
|
7487
7237
|
getVariables(appId, decrypted, authorization) {
|
|
7488
7238
|
return __async(this, null, function* () {
|
|
7489
|
-
const response = yield
|
|
7239
|
+
const response = yield adapterClientInstance.get(
|
|
7490
7240
|
`/console/app/${encodeURIComponent(appId)}/variables`,
|
|
7491
7241
|
__spreadValues({
|
|
7492
7242
|
params: {
|
|
7493
7243
|
decrypted
|
|
7494
7244
|
}
|
|
7495
|
-
},
|
|
7245
|
+
}, getAdapterClientDefaultConfig(authorization))
|
|
7496
7246
|
);
|
|
7497
7247
|
return response.data;
|
|
7498
7248
|
});
|
|
7499
7249
|
},
|
|
7500
7250
|
getVariable(appId, key, authorization) {
|
|
7501
7251
|
return __async(this, null, function* () {
|
|
7502
|
-
const response = yield
|
|
7252
|
+
const response = yield adapterClientInstance.get(
|
|
7503
7253
|
`/console/app/${encodeURIComponent(appId)}/variables/${encodeURIComponent(
|
|
7504
7254
|
key
|
|
7505
7255
|
)}`,
|
|
7506
|
-
|
|
7256
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7507
7257
|
);
|
|
7508
7258
|
return response.data;
|
|
7509
7259
|
});
|
|
7510
7260
|
},
|
|
7511
7261
|
syncVariable(appId, key, payload, authorization) {
|
|
7512
7262
|
return __async(this, null, function* () {
|
|
7513
|
-
yield
|
|
7263
|
+
yield adapterClientInstance.post(
|
|
7514
7264
|
`/console/app/${encodeURIComponent(appId)}/variables/${encodeURIComponent(
|
|
7515
7265
|
key
|
|
7516
7266
|
)}/sync`,
|
|
7517
7267
|
payload,
|
|
7518
|
-
|
|
7268
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7519
7269
|
);
|
|
7520
7270
|
});
|
|
7521
7271
|
},
|
|
7522
7272
|
createVariable(appId, data, authorization) {
|
|
7523
7273
|
return __async(this, null, function* () {
|
|
7524
|
-
yield
|
|
7274
|
+
yield adapterClientInstance.post(
|
|
7525
7275
|
`/console/app/${encodeURIComponent(appId)}/variables/${encodeURIComponent(
|
|
7526
7276
|
data.key
|
|
7527
7277
|
)}`,
|
|
7528
7278
|
data,
|
|
7529
|
-
|
|
7279
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7530
7280
|
);
|
|
7531
7281
|
});
|
|
7532
7282
|
},
|
|
7533
7283
|
editVariable(appId, data, authorization) {
|
|
7534
7284
|
return __async(this, null, function* () {
|
|
7535
|
-
yield
|
|
7285
|
+
yield adapterClientInstance.post(
|
|
7536
7286
|
`/console/app/${encodeURIComponent(appId)}/variables/${encodeURIComponent(
|
|
7537
7287
|
data.key
|
|
7538
7288
|
)}/edit`,
|
|
7539
7289
|
data,
|
|
7540
|
-
|
|
7290
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7541
7291
|
);
|
|
7542
7292
|
});
|
|
7543
7293
|
},
|
|
7544
7294
|
deleteVariable(appId, key) {
|
|
7545
7295
|
return __async(this, null, function* () {
|
|
7546
|
-
yield
|
|
7296
|
+
yield adapterClientInstance.delete(
|
|
7547
7297
|
`/console/app/${encodeURIComponent(appId)}/variables/${encodeURIComponent(
|
|
7548
7298
|
key
|
|
7549
7299
|
)}`
|
|
@@ -7556,17 +7306,17 @@ var platformAdapterAppVariablesApi = {
|
|
|
7556
7306
|
var platformAdapterAppTemplatesApi = {
|
|
7557
7307
|
getTemplates(authorization) {
|
|
7558
7308
|
return __async(this, null, function* () {
|
|
7559
|
-
return
|
|
7309
|
+
return adapterClientInstance.get(
|
|
7560
7310
|
`/console/app/templates`,
|
|
7561
|
-
|
|
7311
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7562
7312
|
);
|
|
7563
7313
|
});
|
|
7564
7314
|
},
|
|
7565
7315
|
getRepositoryTemplates(authorization) {
|
|
7566
7316
|
return __async(this, null, function* () {
|
|
7567
|
-
return
|
|
7317
|
+
return adapterClientInstance.get(
|
|
7568
7318
|
`/console/app/templates/repository`,
|
|
7569
|
-
|
|
7319
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7570
7320
|
);
|
|
7571
7321
|
});
|
|
7572
7322
|
}
|
|
@@ -7579,39 +7329,39 @@ var platformAdapterAppApi = {
|
|
|
7579
7329
|
templates: platformAdapterAppTemplatesApi,
|
|
7580
7330
|
push(payload, authorization) {
|
|
7581
7331
|
return __async(this, null, function* () {
|
|
7582
|
-
return
|
|
7332
|
+
return adapterClientInstance.post(
|
|
7583
7333
|
`/console/app${payload.manifest.id ? `/${encodeURIComponent(payload.manifest.id)}` : ""}`,
|
|
7584
7334
|
payload,
|
|
7585
|
-
|
|
7335
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7586
7336
|
);
|
|
7587
7337
|
});
|
|
7588
7338
|
},
|
|
7589
7339
|
pull(appId, authorization) {
|
|
7590
7340
|
return __async(this, null, function* () {
|
|
7591
|
-
return
|
|
7341
|
+
return adapterClientInstance.get(
|
|
7592
7342
|
`/console/app/${encodeURIComponent(appId)}`,
|
|
7593
|
-
|
|
7343
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7594
7344
|
);
|
|
7595
7345
|
});
|
|
7596
7346
|
},
|
|
7597
7347
|
verify(payload, authorization) {
|
|
7598
7348
|
return __async(this, null, function* () {
|
|
7599
|
-
return
|
|
7349
|
+
return adapterClientInstance.post(
|
|
7600
7350
|
`/console/app/${encodeURIComponent(payload.appId)}/verify`,
|
|
7601
7351
|
payload,
|
|
7602
|
-
|
|
7352
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7603
7353
|
);
|
|
7604
7354
|
});
|
|
7605
7355
|
},
|
|
7606
7356
|
status(sagaId, authorization) {
|
|
7607
7357
|
return __async(this, null, function* () {
|
|
7608
|
-
return
|
|
7358
|
+
return adapterClientInstance.get(
|
|
7609
7359
|
`/console/app/status`,
|
|
7610
7360
|
__spreadValues({
|
|
7611
7361
|
params: {
|
|
7612
7362
|
sagaId
|
|
7613
7363
|
}
|
|
7614
|
-
},
|
|
7364
|
+
}, getAdapterClientDefaultConfig(authorization))
|
|
7615
7365
|
);
|
|
7616
7366
|
});
|
|
7617
7367
|
}
|
|
@@ -7622,7 +7372,7 @@ var platformAdapterBigCommerceApi = {
|
|
|
7622
7372
|
events: {
|
|
7623
7373
|
subscribe(payload, authorization) {
|
|
7624
7374
|
return __async(this, null, function* () {
|
|
7625
|
-
yield
|
|
7375
|
+
yield adapterClientInstance.post(
|
|
7626
7376
|
`/integrations/bigcommerce/events/subscribe`,
|
|
7627
7377
|
payload,
|
|
7628
7378
|
getBigCommerceClientConfig(authorization)
|
|
@@ -7631,7 +7381,7 @@ var platformAdapterBigCommerceApi = {
|
|
|
7631
7381
|
},
|
|
7632
7382
|
unsubscribe(payload, authorization) {
|
|
7633
7383
|
return __async(this, null, function* () {
|
|
7634
|
-
yield
|
|
7384
|
+
yield adapterClientInstance.post(
|
|
7635
7385
|
`/integrations/bigcommerce/events/unsubscribe`,
|
|
7636
7386
|
payload,
|
|
7637
7387
|
getBigCommerceClientConfig(authorization)
|
|
@@ -7646,7 +7396,7 @@ var platformAdapterHubspotApi = {
|
|
|
7646
7396
|
events: {
|
|
7647
7397
|
subscribe(payload, authorization) {
|
|
7648
7398
|
return __async(this, null, function* () {
|
|
7649
|
-
yield
|
|
7399
|
+
yield adapterClientInstance.post(
|
|
7650
7400
|
`/integrations/hubspot/events/subscribe`,
|
|
7651
7401
|
payload,
|
|
7652
7402
|
getHubspotClientConfig(authorization)
|
|
@@ -7655,7 +7405,7 @@ var platformAdapterHubspotApi = {
|
|
|
7655
7405
|
},
|
|
7656
7406
|
unsubscribe(payload, authorization) {
|
|
7657
7407
|
return __async(this, null, function* () {
|
|
7658
|
-
yield
|
|
7408
|
+
yield adapterClientInstance.post(
|
|
7659
7409
|
`/integrations/hubspot/events/unsubscribe`,
|
|
7660
7410
|
payload,
|
|
7661
7411
|
getHubspotClientConfig(authorization)
|
|
@@ -7670,7 +7420,7 @@ var platformAdapterMailchimpApi = {
|
|
|
7670
7420
|
events: {
|
|
7671
7421
|
subscribe(payload, authorization) {
|
|
7672
7422
|
return __async(this, null, function* () {
|
|
7673
|
-
yield
|
|
7423
|
+
yield adapterClientInstance.post(
|
|
7674
7424
|
`/integrations/mailchimp/events/subscribe`,
|
|
7675
7425
|
payload,
|
|
7676
7426
|
getMailchimpClientConfig(authorization)
|
|
@@ -7679,7 +7429,7 @@ var platformAdapterMailchimpApi = {
|
|
|
7679
7429
|
},
|
|
7680
7430
|
unsubscribe(payload, authorization) {
|
|
7681
7431
|
return __async(this, null, function* () {
|
|
7682
|
-
yield
|
|
7432
|
+
yield adapterClientInstance.post(
|
|
7683
7433
|
`/integrations/mailchimp/events/unsubscribe`,
|
|
7684
7434
|
payload,
|
|
7685
7435
|
getMailchimpClientConfig(authorization)
|
|
@@ -7693,7 +7443,7 @@ var platformAdapterMailchimpApi = {
|
|
|
7693
7443
|
var platformAdapterNeonProxyApi = {
|
|
7694
7444
|
user(authorization) {
|
|
7695
7445
|
return __async(this, null, function* () {
|
|
7696
|
-
const response = yield
|
|
7446
|
+
const response = yield adapterClientInstance.get(
|
|
7697
7447
|
`/integrations/neon/user`,
|
|
7698
7448
|
getNeonClientConfig(authorization)
|
|
7699
7449
|
);
|
|
@@ -7702,7 +7452,7 @@ var platformAdapterNeonProxyApi = {
|
|
|
7702
7452
|
},
|
|
7703
7453
|
projects(authorization) {
|
|
7704
7454
|
return __async(this, null, function* () {
|
|
7705
|
-
const response = yield
|
|
7455
|
+
const response = yield adapterClientInstance.get(
|
|
7706
7456
|
`/integrations/neon/projects`,
|
|
7707
7457
|
getNeonClientConfig(authorization)
|
|
7708
7458
|
);
|
|
@@ -7711,7 +7461,7 @@ var platformAdapterNeonProxyApi = {
|
|
|
7711
7461
|
},
|
|
7712
7462
|
databases(projectId, authorization) {
|
|
7713
7463
|
return __async(this, null, function* () {
|
|
7714
|
-
const response = yield
|
|
7464
|
+
const response = yield adapterClientInstance.get(
|
|
7715
7465
|
`/integrations/neon/projects/${encodeURIComponent(projectId)}/databases`,
|
|
7716
7466
|
getNeonClientConfig(authorization)
|
|
7717
7467
|
);
|
|
@@ -7725,7 +7475,7 @@ var platformAdapterShopifyApi = {
|
|
|
7725
7475
|
events: {
|
|
7726
7476
|
subscribe(payload, authorization) {
|
|
7727
7477
|
return __async(this, null, function* () {
|
|
7728
|
-
yield
|
|
7478
|
+
yield adapterClientInstance.post(
|
|
7729
7479
|
`/integrations/shopify/events/subscribe`,
|
|
7730
7480
|
payload,
|
|
7731
7481
|
getShopifyClientConfig(authorization)
|
|
@@ -7734,7 +7484,7 @@ var platformAdapterShopifyApi = {
|
|
|
7734
7484
|
},
|
|
7735
7485
|
unsubscribe(payload, authorization) {
|
|
7736
7486
|
return __async(this, null, function* () {
|
|
7737
|
-
yield
|
|
7487
|
+
yield adapterClientInstance.post(
|
|
7738
7488
|
`/integrations/shopify/events/unsubscribe`,
|
|
7739
7489
|
payload,
|
|
7740
7490
|
getShopifyClientConfig(authorization)
|
|
@@ -7749,7 +7499,7 @@ var platformAdapterTextApi = {
|
|
|
7749
7499
|
events: {
|
|
7750
7500
|
subscribe(payload, authorization) {
|
|
7751
7501
|
return __async(this, null, function* () {
|
|
7752
|
-
yield
|
|
7502
|
+
yield adapterClientInstance.post(
|
|
7753
7503
|
`/integrations/text/events/subscribe`,
|
|
7754
7504
|
payload,
|
|
7755
7505
|
getTextClientConfig(authorization)
|
|
@@ -7758,7 +7508,7 @@ var platformAdapterTextApi = {
|
|
|
7758
7508
|
},
|
|
7759
7509
|
unsubscribe(payload, authorization) {
|
|
7760
7510
|
return __async(this, null, function* () {
|
|
7761
|
-
yield
|
|
7511
|
+
yield adapterClientInstance.post(
|
|
7762
7512
|
`/integrations/text/events/unsubscribe`,
|
|
7763
7513
|
payload,
|
|
7764
7514
|
getTextClientConfig(authorization)
|
|
@@ -7784,10 +7534,10 @@ var platformAdapterApi = {
|
|
|
7784
7534
|
integrations: platformAdapterIntegrationsApi,
|
|
7785
7535
|
log(payload, authorization) {
|
|
7786
7536
|
return __async(this, null, function* () {
|
|
7787
|
-
return
|
|
7537
|
+
return adapterClientInstance.post(
|
|
7788
7538
|
`/log`,
|
|
7789
7539
|
payload,
|
|
7790
|
-
|
|
7540
|
+
getAdapterClientConfig(authorization)
|
|
7791
7541
|
);
|
|
7792
7542
|
});
|
|
7793
7543
|
}
|
|
@@ -7798,9 +7548,9 @@ var platformBillingAccountApi = {
|
|
|
7798
7548
|
getAccount(authorization) {
|
|
7799
7549
|
return __async(this, null, function* () {
|
|
7800
7550
|
try {
|
|
7801
|
-
return yield
|
|
7551
|
+
return yield billingClientInstance.get(
|
|
7802
7552
|
`/v3/account`,
|
|
7803
|
-
|
|
7553
|
+
getBillingClientConfig(authorization)
|
|
7804
7554
|
);
|
|
7805
7555
|
} catch (error) {
|
|
7806
7556
|
if (error instanceof Error) {
|
|
@@ -7814,9 +7564,9 @@ var platformBillingAccountApi = {
|
|
|
7814
7564
|
getAccountInfo(product, authorization) {
|
|
7815
7565
|
return __async(this, null, function* () {
|
|
7816
7566
|
try {
|
|
7817
|
-
return yield
|
|
7567
|
+
return yield billingClientInstance.get(
|
|
7818
7568
|
`/v3/account/${encodeURIComponent(product)}/billing_info`,
|
|
7819
|
-
|
|
7569
|
+
getBillingClientConfig(authorization)
|
|
7820
7570
|
);
|
|
7821
7571
|
} catch (error) {
|
|
7822
7572
|
if (error instanceof Error) {
|
|
@@ -7836,9 +7586,9 @@ var platformBillingInvoicesApi = {
|
|
|
7836
7586
|
getInvoices(product, authorization) {
|
|
7837
7587
|
return __async(this, null, function* () {
|
|
7838
7588
|
try {
|
|
7839
|
-
return yield
|
|
7589
|
+
return yield billingClientInstance.get(
|
|
7840
7590
|
`/v2/invoices/${encodeURIComponent(product)}`,
|
|
7841
|
-
|
|
7591
|
+
getBillingClientConfig(authorization)
|
|
7842
7592
|
);
|
|
7843
7593
|
} catch (error) {
|
|
7844
7594
|
if (error instanceof Error) {
|
|
@@ -7852,7 +7602,7 @@ var platformBillingInvoicesApi = {
|
|
|
7852
7602
|
downloadInvoices(number, authorization) {
|
|
7853
7603
|
return __async(this, null, function* () {
|
|
7854
7604
|
try {
|
|
7855
|
-
const response = yield
|
|
7605
|
+
const response = yield billingClientInstance.request(__spreadValues({
|
|
7856
7606
|
url: `https://api.labs.livechatinc.com/v2/invoices/${encodeURIComponent(
|
|
7857
7607
|
number
|
|
7858
7608
|
)}`,
|
|
@@ -7861,7 +7611,7 @@ var platformBillingInvoicesApi = {
|
|
|
7861
7611
|
//gave the values directly for testing
|
|
7862
7612
|
}),
|
|
7863
7613
|
responseType: "blob"
|
|
7864
|
-
},
|
|
7614
|
+
}, getBillingClientConfig(authorization)));
|
|
7865
7615
|
const href = URL.createObjectURL(response.data);
|
|
7866
7616
|
const link = document.createElement("a");
|
|
7867
7617
|
link.href = href;
|
|
@@ -7908,12 +7658,9 @@ function initApi(config, tokens) {
|
|
|
7908
7658
|
(_a = config.urls.platform) == null ? void 0 : _a.accounts,
|
|
7909
7659
|
(_b = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _b.token
|
|
7910
7660
|
);
|
|
7911
|
-
|
|
7912
|
-
|
|
7913
|
-
|
|
7914
|
-
);
|
|
7915
|
-
initPlatformDpsClient((_e = config.urls.platform) == null ? void 0 : _e.dps, (_f = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _f.token);
|
|
7916
|
-
initPlatformAdapterClient(
|
|
7661
|
+
initBillingClient((_c = config.urls.platform) == null ? void 0 : _c.billing, (_d = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _d.token);
|
|
7662
|
+
initDpsClient((_e = config.urls.platform) == null ? void 0 : _e.dps, (_f = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _f.token);
|
|
7663
|
+
initAdapterClient(
|
|
7917
7664
|
(_g = config.urls.platform) == null ? void 0 : _g.adapter,
|
|
7918
7665
|
tokens ? {
|
|
7919
7666
|
platform: tokens.platform,
|
|
@@ -8070,6 +7817,7 @@ export {
|
|
|
8070
7817
|
UnauthorizeAccountsApiError,
|
|
8071
7818
|
UnauthorizeApiError,
|
|
8072
7819
|
WorkflowDefinitionTaskType,
|
|
7820
|
+
adapterClientInstance,
|
|
8073
7821
|
allAppTemplates,
|
|
8074
7822
|
api,
|
|
8075
7823
|
appBaseTemplates,
|
|
@@ -8079,51 +7827,40 @@ export {
|
|
|
8079
7827
|
appTemplatesMap,
|
|
8080
7828
|
bigCommerceClientInstance,
|
|
8081
7829
|
bigcommerceEventsZods,
|
|
7830
|
+
billingClientInstance,
|
|
8082
7831
|
debounce,
|
|
7832
|
+
dpsClientInstance,
|
|
7833
|
+
getAdapterClientConfig,
|
|
7834
|
+
getAdapterClientDefaultConfig,
|
|
8083
7835
|
getAppAutoReviewPayload,
|
|
8084
|
-
getBigCommerceClientAuthorization,
|
|
8085
7836
|
getBigCommerceClientConfig,
|
|
8086
7837
|
getBigCommerceClientUrl,
|
|
7838
|
+
getBillingClientConfig,
|
|
7839
|
+
getDpsClientConfig,
|
|
8087
7840
|
getEmptyAppAutoReview,
|
|
8088
|
-
getGitHubClientAuthorization,
|
|
8089
7841
|
getGithubClientConfig,
|
|
8090
|
-
getHubspotClientAuthorization,
|
|
8091
7842
|
getHubspotClientConfig,
|
|
8092
7843
|
getIntegrationFlowUrl,
|
|
8093
7844
|
getIntegrationFlowUrlOld,
|
|
8094
|
-
getLiveChatClientAuthorization,
|
|
8095
7845
|
getLiveChatClientConfig,
|
|
8096
|
-
getMailchimpClientAuthorization,
|
|
8097
7846
|
getMailchimpClientConfig,
|
|
8098
7847
|
getMailchimpClientUrl,
|
|
8099
|
-
getNeonClientAuthorization,
|
|
8100
7848
|
getNeonClientConfig,
|
|
8101
|
-
getNetlifyClientAuthorization,
|
|
8102
7849
|
getNetlifyClientConfig,
|
|
8103
|
-
getPlanetScaleClientAuthorization,
|
|
8104
7850
|
getPlanetScaleClientConfig,
|
|
8105
|
-
getPlatformAccountsClientAuthorization,
|
|
8106
|
-
getPlatformAdapterClientAuthorization,
|
|
8107
|
-
getPlatformAdapterClientConfig,
|
|
8108
|
-
getPlatformAdapterClientDefaultConfig,
|
|
8109
|
-
getPlatformBillingClientAuthorization,
|
|
8110
|
-
getPlatformBillingClientConfig,
|
|
8111
|
-
getPlatformDpsAdminClientAuthorization,
|
|
8112
|
-
getPlatformDpsClientAuthorization,
|
|
8113
|
-
getPlatformDpsClientConfig,
|
|
8114
7851
|
getRegion2 as getRegion,
|
|
8115
|
-
getShopifyClientAuthorization,
|
|
8116
7852
|
getShopifyClientConfig,
|
|
8117
7853
|
getShopifyClientUrl,
|
|
8118
|
-
getTextClientAuthorization,
|
|
8119
7854
|
getTextClientConfig,
|
|
8120
|
-
getVercelClientAuthorization,
|
|
8121
7855
|
getVercelClientConfig,
|
|
8122
7856
|
githubClientInstance,
|
|
8123
7857
|
hubspotClientInstance,
|
|
8124
7858
|
hubspotEventsZods,
|
|
7859
|
+
initAdapterClient,
|
|
8125
7860
|
initApi,
|
|
8126
7861
|
initBigCommerceClient,
|
|
7862
|
+
initBillingClient,
|
|
7863
|
+
initDpsClient,
|
|
8127
7864
|
initGithubClient,
|
|
8128
7865
|
initHubspotClient,
|
|
8129
7866
|
initLiveChatClient,
|
|
@@ -8132,9 +7869,6 @@ export {
|
|
|
8132
7869
|
initNetlifyClient,
|
|
8133
7870
|
initPlanetScaleClient,
|
|
8134
7871
|
initPlatformAccountsClient,
|
|
8135
|
-
initPlatformAdapterClient,
|
|
8136
|
-
initPlatformBillingClient,
|
|
8137
|
-
initPlatformDpsClient,
|
|
8138
7872
|
initShopifyClient,
|
|
8139
7873
|
initTextClient,
|
|
8140
7874
|
initVercelClient,
|
|
@@ -8147,13 +7881,11 @@ export {
|
|
|
8147
7881
|
netlifyClientInstance,
|
|
8148
7882
|
planetScaleClientInstance,
|
|
8149
7883
|
platformAccountsClientInstance,
|
|
8150
|
-
platformAdapterClientInstance,
|
|
8151
|
-
platformBillingClientInstance,
|
|
8152
|
-
platformDpsClientInstance,
|
|
8153
7884
|
shopifyClientInstance,
|
|
8154
7885
|
shopifyEventsZods,
|
|
8155
7886
|
textClientInstance,
|
|
8156
7887
|
textLivechatEventsZods,
|
|
7888
|
+
updateAdapterClient,
|
|
8157
7889
|
updateBigCommerceClient,
|
|
8158
7890
|
updateGithubClient,
|
|
8159
7891
|
updateHubspotClient,
|
|
@@ -8161,7 +7893,6 @@ export {
|
|
|
8161
7893
|
updateNeonClient,
|
|
8162
7894
|
updateNetlifyClient,
|
|
8163
7895
|
updatePlanetScaleClient,
|
|
8164
|
-
updatePlatformAdapterClient,
|
|
8165
7896
|
updateShopifyClient,
|
|
8166
7897
|
updateVercelClient,
|
|
8167
7898
|
vercelClientInstance
|