@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.js
CHANGED
|
@@ -95,6 +95,7 @@ __export(src_exports, {
|
|
|
95
95
|
UnauthorizeAccountsApiError: () => UnauthorizeAccountsApiError,
|
|
96
96
|
UnauthorizeApiError: () => UnauthorizeApiError,
|
|
97
97
|
WorkflowDefinitionTaskType: () => WorkflowDefinitionTaskType,
|
|
98
|
+
adapterClientInstance: () => adapterClientInstance,
|
|
98
99
|
allAppTemplates: () => allAppTemplates,
|
|
99
100
|
api: () => api,
|
|
100
101
|
appBaseTemplates: () => appBaseTemplates,
|
|
@@ -104,51 +105,40 @@ __export(src_exports, {
|
|
|
104
105
|
appTemplatesMap: () => appTemplatesMap,
|
|
105
106
|
bigCommerceClientInstance: () => bigCommerceClientInstance,
|
|
106
107
|
bigcommerceEventsZods: () => bigcommerceEventsZods,
|
|
108
|
+
billingClientInstance: () => billingClientInstance,
|
|
107
109
|
debounce: () => debounce,
|
|
110
|
+
dpsClientInstance: () => dpsClientInstance,
|
|
111
|
+
getAdapterClientConfig: () => getAdapterClientConfig,
|
|
112
|
+
getAdapterClientDefaultConfig: () => getAdapterClientDefaultConfig,
|
|
108
113
|
getAppAutoReviewPayload: () => getAppAutoReviewPayload,
|
|
109
|
-
getBigCommerceClientAuthorization: () => getBigCommerceClientAuthorization,
|
|
110
114
|
getBigCommerceClientConfig: () => getBigCommerceClientConfig,
|
|
111
115
|
getBigCommerceClientUrl: () => getBigCommerceClientUrl,
|
|
116
|
+
getBillingClientConfig: () => getBillingClientConfig,
|
|
117
|
+
getDpsClientConfig: () => getDpsClientConfig,
|
|
112
118
|
getEmptyAppAutoReview: () => getEmptyAppAutoReview,
|
|
113
|
-
getGitHubClientAuthorization: () => getGitHubClientAuthorization,
|
|
114
119
|
getGithubClientConfig: () => getGithubClientConfig,
|
|
115
|
-
getHubspotClientAuthorization: () => getHubspotClientAuthorization,
|
|
116
120
|
getHubspotClientConfig: () => getHubspotClientConfig,
|
|
117
121
|
getIntegrationFlowUrl: () => getIntegrationFlowUrl,
|
|
118
122
|
getIntegrationFlowUrlOld: () => getIntegrationFlowUrlOld,
|
|
119
|
-
getLiveChatClientAuthorization: () => getLiveChatClientAuthorization,
|
|
120
123
|
getLiveChatClientConfig: () => getLiveChatClientConfig,
|
|
121
|
-
getMailchimpClientAuthorization: () => getMailchimpClientAuthorization,
|
|
122
124
|
getMailchimpClientConfig: () => getMailchimpClientConfig,
|
|
123
125
|
getMailchimpClientUrl: () => getMailchimpClientUrl,
|
|
124
|
-
getNeonClientAuthorization: () => getNeonClientAuthorization,
|
|
125
126
|
getNeonClientConfig: () => getNeonClientConfig,
|
|
126
|
-
getNetlifyClientAuthorization: () => getNetlifyClientAuthorization,
|
|
127
127
|
getNetlifyClientConfig: () => getNetlifyClientConfig,
|
|
128
|
-
getPlanetScaleClientAuthorization: () => getPlanetScaleClientAuthorization,
|
|
129
128
|
getPlanetScaleClientConfig: () => getPlanetScaleClientConfig,
|
|
130
|
-
getPlatformAccountsClientAuthorization: () => getPlatformAccountsClientAuthorization,
|
|
131
|
-
getPlatformAdapterClientAuthorization: () => getPlatformAdapterClientAuthorization,
|
|
132
|
-
getPlatformAdapterClientConfig: () => getPlatformAdapterClientConfig,
|
|
133
|
-
getPlatformAdapterClientDefaultConfig: () => getPlatformAdapterClientDefaultConfig,
|
|
134
|
-
getPlatformBillingClientAuthorization: () => getPlatformBillingClientAuthorization,
|
|
135
|
-
getPlatformBillingClientConfig: () => getPlatformBillingClientConfig,
|
|
136
|
-
getPlatformDpsAdminClientAuthorization: () => getPlatformDpsAdminClientAuthorization,
|
|
137
|
-
getPlatformDpsClientAuthorization: () => getPlatformDpsClientAuthorization,
|
|
138
|
-
getPlatformDpsClientConfig: () => getPlatformDpsClientConfig,
|
|
139
129
|
getRegion: () => getRegion2,
|
|
140
|
-
getShopifyClientAuthorization: () => getShopifyClientAuthorization,
|
|
141
130
|
getShopifyClientConfig: () => getShopifyClientConfig,
|
|
142
131
|
getShopifyClientUrl: () => getShopifyClientUrl,
|
|
143
|
-
getTextClientAuthorization: () => getTextClientAuthorization,
|
|
144
132
|
getTextClientConfig: () => getTextClientConfig,
|
|
145
|
-
getVercelClientAuthorization: () => getVercelClientAuthorization,
|
|
146
133
|
getVercelClientConfig: () => getVercelClientConfig,
|
|
147
134
|
githubClientInstance: () => githubClientInstance,
|
|
148
135
|
hubspotClientInstance: () => hubspotClientInstance,
|
|
149
136
|
hubspotEventsZods: () => hubspotEventsZods,
|
|
137
|
+
initAdapterClient: () => initAdapterClient,
|
|
150
138
|
initApi: () => initApi,
|
|
151
139
|
initBigCommerceClient: () => initBigCommerceClient,
|
|
140
|
+
initBillingClient: () => initBillingClient,
|
|
141
|
+
initDpsClient: () => initDpsClient,
|
|
152
142
|
initGithubClient: () => initGithubClient,
|
|
153
143
|
initHubspotClient: () => initHubspotClient,
|
|
154
144
|
initLiveChatClient: () => initLiveChatClient,
|
|
@@ -157,9 +147,6 @@ __export(src_exports, {
|
|
|
157
147
|
initNetlifyClient: () => initNetlifyClient,
|
|
158
148
|
initPlanetScaleClient: () => initPlanetScaleClient,
|
|
159
149
|
initPlatformAccountsClient: () => initPlatformAccountsClient,
|
|
160
|
-
initPlatformAdapterClient: () => initPlatformAdapterClient,
|
|
161
|
-
initPlatformBillingClient: () => initPlatformBillingClient,
|
|
162
|
-
initPlatformDpsClient: () => initPlatformDpsClient,
|
|
163
150
|
initShopifyClient: () => initShopifyClient,
|
|
164
151
|
initTextClient: () => initTextClient,
|
|
165
152
|
initVercelClient: () => initVercelClient,
|
|
@@ -172,13 +159,11 @@ __export(src_exports, {
|
|
|
172
159
|
netlifyClientInstance: () => netlifyClientInstance,
|
|
173
160
|
planetScaleClientInstance: () => planetScaleClientInstance,
|
|
174
161
|
platformAccountsClientInstance: () => platformAccountsClientInstance,
|
|
175
|
-
platformAdapterClientInstance: () => platformAdapterClientInstance,
|
|
176
|
-
platformBillingClientInstance: () => platformBillingClientInstance,
|
|
177
|
-
platformDpsClientInstance: () => platformDpsClientInstance,
|
|
178
162
|
shopifyClientInstance: () => shopifyClientInstance,
|
|
179
163
|
shopifyEventsZods: () => shopifyEventsZods,
|
|
180
164
|
textClientInstance: () => textClientInstance,
|
|
181
165
|
textLivechatEventsZods: () => textLivechatEventsZods,
|
|
166
|
+
updateAdapterClient: () => updateAdapterClient,
|
|
182
167
|
updateBigCommerceClient: () => updateBigCommerceClient,
|
|
183
168
|
updateGithubClient: () => updateGithubClient,
|
|
184
169
|
updateHubspotClient: () => updateHubspotClient,
|
|
@@ -186,7 +171,6 @@ __export(src_exports, {
|
|
|
186
171
|
updateNeonClient: () => updateNeonClient,
|
|
187
172
|
updateNetlifyClient: () => updateNetlifyClient,
|
|
188
173
|
updatePlanetScaleClient: () => updatePlanetScaleClient,
|
|
189
|
-
updatePlatformAdapterClient: () => updatePlatformAdapterClient,
|
|
190
174
|
updateShopifyClient: () => updateShopifyClient,
|
|
191
175
|
updateVercelClient: () => updateVercelClient,
|
|
192
176
|
vercelClientInstance: () => vercelClientInstance
|
|
@@ -330,18 +314,6 @@ githubClientInstance.interceptors.response.use(
|
|
|
330
314
|
throw error;
|
|
331
315
|
}
|
|
332
316
|
);
|
|
333
|
-
function getGitHubClientAuthorization(req) {
|
|
334
|
-
if (req.headers instanceof Headers) {
|
|
335
|
-
return {
|
|
336
|
-
appToken: req.headers.get("x-adapter-github-app-token"),
|
|
337
|
-
oauthToken: req.headers.get("x-adapter-github-oauth-token")
|
|
338
|
-
};
|
|
339
|
-
}
|
|
340
|
-
return {
|
|
341
|
-
appToken: req.headers["x-adapter-github-app-token"],
|
|
342
|
-
oauthToken: req.headers["x-adapter-github-oauth-token"]
|
|
343
|
-
};
|
|
344
|
-
}
|
|
345
317
|
function getGithubClientConfig(options = {}) {
|
|
346
318
|
var _a;
|
|
347
319
|
const currentHeaders = githubClientInstance.defaults.headers;
|
|
@@ -800,16 +772,6 @@ netlifyClientInstance.interceptors.response.use(
|
|
|
800
772
|
throw error;
|
|
801
773
|
}
|
|
802
774
|
);
|
|
803
|
-
function getNetlifyClientAuthorization(req) {
|
|
804
|
-
if (req.headers instanceof Headers) {
|
|
805
|
-
return {
|
|
806
|
-
token: req.headers.get("x-adapter-netlify-token")
|
|
807
|
-
};
|
|
808
|
-
}
|
|
809
|
-
return {
|
|
810
|
-
token: req.headers["x-adapter-netlify-token"]
|
|
811
|
-
};
|
|
812
|
-
}
|
|
813
775
|
function getNetlifyClientConfig(options = {}) {
|
|
814
776
|
var _a;
|
|
815
777
|
const currentHeaders = netlifyClientInstance.defaults.headers;
|
|
@@ -1307,16 +1269,6 @@ planetScaleClientInstance.interceptors.response.use(
|
|
|
1307
1269
|
throw error;
|
|
1308
1270
|
}
|
|
1309
1271
|
);
|
|
1310
|
-
function getPlanetScaleClientAuthorization(req) {
|
|
1311
|
-
if (req.headers instanceof Headers) {
|
|
1312
|
-
return {
|
|
1313
|
-
token: req.headers.get("x-adapter-planetscale-token")
|
|
1314
|
-
};
|
|
1315
|
-
}
|
|
1316
|
-
return {
|
|
1317
|
-
token: req.headers["x-adapter-planetscale-token"]
|
|
1318
|
-
};
|
|
1319
|
-
}
|
|
1320
1272
|
function getPlanetScaleClientConfig(options = {}) {
|
|
1321
1273
|
var _a;
|
|
1322
1274
|
const currentHeaders = planetScaleClientInstance.defaults.headers;
|
|
@@ -1574,20 +1526,6 @@ textClientInstance.interceptors.response.use(
|
|
|
1574
1526
|
);
|
|
1575
1527
|
}
|
|
1576
1528
|
);
|
|
1577
|
-
function getTextClientAuthorization(req, usePlatformToken = true) {
|
|
1578
|
-
if (req.headers instanceof Headers) {
|
|
1579
|
-
return {
|
|
1580
|
-
token: req.headers.get(
|
|
1581
|
-
usePlatformToken ? "x-adapter-platform-token" : "x-adapter-text-token"
|
|
1582
|
-
),
|
|
1583
|
-
tokenType: "Bearer"
|
|
1584
|
-
};
|
|
1585
|
-
}
|
|
1586
|
-
return {
|
|
1587
|
-
token: req.headers[usePlatformToken ? "x-adapter-platform-token" : "x-adapter-text-token"],
|
|
1588
|
-
tokenType: "Bearer"
|
|
1589
|
-
};
|
|
1590
|
-
}
|
|
1591
1529
|
function getTextClientConfig(option = {}) {
|
|
1592
1530
|
var _a;
|
|
1593
1531
|
const currentHeaders = textClientInstance.defaults.headers;
|
|
@@ -1780,16 +1718,6 @@ vercelClientInstance.interceptors.response.use(
|
|
|
1780
1718
|
throw error;
|
|
1781
1719
|
}
|
|
1782
1720
|
);
|
|
1783
|
-
function getVercelClientAuthorization(req) {
|
|
1784
|
-
if (req.headers instanceof Headers) {
|
|
1785
|
-
return {
|
|
1786
|
-
token: req.headers.get("x-adapter-vercel-token")
|
|
1787
|
-
};
|
|
1788
|
-
}
|
|
1789
|
-
return {
|
|
1790
|
-
token: req.headers["x-adapter-vercel-token"]
|
|
1791
|
-
};
|
|
1792
|
-
}
|
|
1793
1721
|
function getVercelClientConfig(options = {}) {
|
|
1794
1722
|
var _a;
|
|
1795
1723
|
const currentHeaders = vercelClientInstance.defaults.headers;
|
|
@@ -1837,16 +1765,6 @@ neonClientInstance.interceptors.response.use(
|
|
|
1837
1765
|
throw error;
|
|
1838
1766
|
}
|
|
1839
1767
|
);
|
|
1840
|
-
function getNeonClientAuthorization(req) {
|
|
1841
|
-
if (req.headers instanceof Headers) {
|
|
1842
|
-
return {
|
|
1843
|
-
token: req.headers.get("x-adapter-neon-token")
|
|
1844
|
-
};
|
|
1845
|
-
}
|
|
1846
|
-
return {
|
|
1847
|
-
token: req.headers["x-adapter-neon-token"]
|
|
1848
|
-
};
|
|
1849
|
-
}
|
|
1850
1768
|
function getNeonClientConfig(options = {}) {
|
|
1851
1769
|
var _a;
|
|
1852
1770
|
const currentHeaders = neonClientInstance.defaults.headers;
|
|
@@ -1906,18 +1824,6 @@ mailchimpClientInstance.interceptors.response.use(
|
|
|
1906
1824
|
);
|
|
1907
1825
|
}
|
|
1908
1826
|
);
|
|
1909
|
-
function getMailchimpClientAuthorization(req) {
|
|
1910
|
-
if (req.headers instanceof Headers) {
|
|
1911
|
-
return {
|
|
1912
|
-
server: req.headers.get("x-adapter-mailchimp-server"),
|
|
1913
|
-
token: req.headers.get("x-adapter-mailchimp-token")
|
|
1914
|
-
};
|
|
1915
|
-
}
|
|
1916
|
-
return {
|
|
1917
|
-
server: req.headers["x-adapter-mailchimp-server"],
|
|
1918
|
-
token: req.headers["x-adapter-mailchimp-token"]
|
|
1919
|
-
};
|
|
1920
|
-
}
|
|
1921
1827
|
function getMailchimpClientConfig(options = {}) {
|
|
1922
1828
|
var _a, _b;
|
|
1923
1829
|
const currentBaseUrl = mailchimpClientInstance.defaults.baseURL;
|
|
@@ -1982,18 +1888,6 @@ shopifyClientInstance.interceptors.response.use(
|
|
|
1982
1888
|
}
|
|
1983
1889
|
);
|
|
1984
1890
|
var getShopifyClientUrl = (store) => `https://${store}.myshopify.com/admin/api/2024-04`;
|
|
1985
|
-
function getShopifyClientAuthorization(req) {
|
|
1986
|
-
if (req.headers instanceof Headers) {
|
|
1987
|
-
return {
|
|
1988
|
-
shop: req.headers.get("x-adapter-shopify-shop"),
|
|
1989
|
-
token: req.headers.get("x-adapter-shopify-token")
|
|
1990
|
-
};
|
|
1991
|
-
}
|
|
1992
|
-
return {
|
|
1993
|
-
shop: req.headers["x-adapter-shopify-shop"],
|
|
1994
|
-
token: req.headers["x-adapter-shopify-token"]
|
|
1995
|
-
};
|
|
1996
|
-
}
|
|
1997
1891
|
function getShopifyClientConfig(options = {}) {
|
|
1998
1892
|
var _a, _b;
|
|
1999
1893
|
const currentBaseUrl = shopifyClientInstance.defaults.baseURL;
|
|
@@ -2069,16 +1963,6 @@ hubspotClientInstance.interceptors.response.use(
|
|
|
2069
1963
|
);
|
|
2070
1964
|
}
|
|
2071
1965
|
);
|
|
2072
|
-
function getHubspotClientAuthorization(req) {
|
|
2073
|
-
if (req.headers instanceof Headers) {
|
|
2074
|
-
return {
|
|
2075
|
-
token: req.headers.get("x-adapter-hubspot-token")
|
|
2076
|
-
};
|
|
2077
|
-
}
|
|
2078
|
-
return {
|
|
2079
|
-
token: req.headers["x-adapter-hubspot-token"]
|
|
2080
|
-
};
|
|
2081
|
-
}
|
|
2082
1966
|
function getHubspotClientConfig(options = {}) {
|
|
2083
1967
|
var _a;
|
|
2084
1968
|
const currentHeaders = hubspotClientInstance.defaults.headers;
|
|
@@ -2146,18 +2030,6 @@ bigCommerceClientInstance.interceptors.response.use(
|
|
|
2146
2030
|
}
|
|
2147
2031
|
);
|
|
2148
2032
|
var getBigCommerceClientUrl = (store) => `https://api.bigcommerce.com/stores/${store}/v3`;
|
|
2149
|
-
function getBigCommerceClientAuthorization(req) {
|
|
2150
|
-
if (req.headers instanceof Headers) {
|
|
2151
|
-
return {
|
|
2152
|
-
shop: req.headers.get("x-adapter-bigcommerce-shop"),
|
|
2153
|
-
token: req.headers.get("x-adapter-bigcommerce-token")
|
|
2154
|
-
};
|
|
2155
|
-
}
|
|
2156
|
-
return {
|
|
2157
|
-
shop: req.headers["x-adapter-bigcommerce-shop"],
|
|
2158
|
-
token: req.headers["x-adapter-bigcommerce-token"]
|
|
2159
|
-
};
|
|
2160
|
-
}
|
|
2161
2033
|
function getBigCommerceClientConfig(options = {}) {
|
|
2162
2034
|
var _a, _b;
|
|
2163
2035
|
const currentBaseUrl = bigCommerceClientInstance.defaults.baseURL;
|
|
@@ -2221,16 +2093,6 @@ var AccountApiClient = class extends ApiClient {
|
|
|
2221
2093
|
var platformAccountsClientInstance = new AccountApiClient({
|
|
2222
2094
|
baseURL: "https://accounts.labs.livechatinc.com"
|
|
2223
2095
|
});
|
|
2224
|
-
function getPlatformAccountsClientAuthorization(req) {
|
|
2225
|
-
if (req.headers instanceof Headers) {
|
|
2226
|
-
return {
|
|
2227
|
-
token: req.headers.get("x-adapter-platform-token")
|
|
2228
|
-
};
|
|
2229
|
-
}
|
|
2230
|
-
return {
|
|
2231
|
-
token: req.headers["x-adapter-platform-token"]
|
|
2232
|
-
};
|
|
2233
|
-
}
|
|
2234
2096
|
function initPlatformAccountsClient(baseUrl, token) {
|
|
2235
2097
|
if (baseUrl) {
|
|
2236
2098
|
platformAccountsClientInstance.updateConfig({
|
|
@@ -2244,22 +2106,12 @@ function initPlatformAccountsClient(baseUrl, token) {
|
|
|
2244
2106
|
|
|
2245
2107
|
// src/apis/platform/billing/instance.ts
|
|
2246
2108
|
var import_axios16 = __toESM(require("axios"));
|
|
2247
|
-
var
|
|
2109
|
+
var billingClientInstance = import_axios16.default.create({
|
|
2248
2110
|
baseURL: "https://billing.labs.livechatinc.com"
|
|
2249
2111
|
});
|
|
2250
|
-
function
|
|
2251
|
-
if (req.headers instanceof Headers) {
|
|
2252
|
-
return {
|
|
2253
|
-
token: req.headers.get("x-adapter-platform-token")
|
|
2254
|
-
};
|
|
2255
|
-
}
|
|
2256
|
-
return {
|
|
2257
|
-
token: req.headers["x-adapter-platform-token"]
|
|
2258
|
-
};
|
|
2259
|
-
}
|
|
2260
|
-
function getPlatformBillingClientConfig(options = {}) {
|
|
2112
|
+
function getBillingClientConfig(options = {}) {
|
|
2261
2113
|
var _a;
|
|
2262
|
-
const defaultAuthorization =
|
|
2114
|
+
const defaultAuthorization = billingClientInstance.defaults.headers.Authorization;
|
|
2263
2115
|
const headers = {
|
|
2264
2116
|
authorization: (_a = options.token ? `Bearer ${options.token}` : void 0) != null ? _a : defaultAuthorization
|
|
2265
2117
|
};
|
|
@@ -2267,9 +2119,9 @@ function getPlatformBillingClientConfig(options = {}) {
|
|
|
2267
2119
|
headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
|
|
2268
2120
|
};
|
|
2269
2121
|
}
|
|
2270
|
-
function
|
|
2122
|
+
function initBillingClient(baseUrl, token) {
|
|
2271
2123
|
if (baseUrl) {
|
|
2272
|
-
|
|
2124
|
+
billingClientInstance.interceptors.request.use(
|
|
2273
2125
|
(config) => {
|
|
2274
2126
|
config.baseURL = baseUrl;
|
|
2275
2127
|
return config;
|
|
@@ -2278,9 +2130,9 @@ function initPlatformBillingClient(baseUrl, token) {
|
|
|
2278
2130
|
);
|
|
2279
2131
|
}
|
|
2280
2132
|
if (token) {
|
|
2281
|
-
|
|
2133
|
+
billingClientInstance.defaults.headers.Authorization = `Bearer ${token}`;
|
|
2282
2134
|
} else {
|
|
2283
|
-
delete
|
|
2135
|
+
delete billingClientInstance.defaults.headers.Authorization;
|
|
2284
2136
|
}
|
|
2285
2137
|
}
|
|
2286
2138
|
|
|
@@ -2769,13 +2621,13 @@ var AdapterApiError = class _AdapterApiError extends ApiErrorBase {
|
|
|
2769
2621
|
);
|
|
2770
2622
|
}
|
|
2771
2623
|
};
|
|
2772
|
-
var
|
|
2624
|
+
var adapterClientInstance = import_axios17.default.create({
|
|
2773
2625
|
baseURL: "https://platform.labs.text.com/console-adapter/api",
|
|
2774
2626
|
headers: {
|
|
2775
2627
|
"Content-Type": "application/json"
|
|
2776
2628
|
}
|
|
2777
2629
|
});
|
|
2778
|
-
|
|
2630
|
+
adapterClientInstance.interceptors.response.use(
|
|
2779
2631
|
(response) => response,
|
|
2780
2632
|
(error) => {
|
|
2781
2633
|
var _a, _b;
|
|
@@ -2791,91 +2643,9 @@ platformAdapterClientInstance.interceptors.response.use(
|
|
|
2791
2643
|
return Promise.reject(error);
|
|
2792
2644
|
}
|
|
2793
2645
|
);
|
|
2794
|
-
function
|
|
2795
|
-
if (req.headers instanceof Headers) {
|
|
2796
|
-
return {
|
|
2797
|
-
platform: {
|
|
2798
|
-
token: req.headers.get("x-adapter-platform-token")
|
|
2799
|
-
},
|
|
2800
|
-
github: {
|
|
2801
|
-
appToken: req.headers.get("x-adapter-github-app-token"),
|
|
2802
|
-
oauthToken: req.headers.get("x-adapter-github-oauth-token")
|
|
2803
|
-
},
|
|
2804
|
-
netlify: {
|
|
2805
|
-
token: req.headers.get("x-adapter-netlify-token")
|
|
2806
|
-
},
|
|
2807
|
-
vercel: {
|
|
2808
|
-
token: req.headers.get("x-adapter-vercel-token")
|
|
2809
|
-
},
|
|
2810
|
-
planetscale: {
|
|
2811
|
-
token: req.headers.get("x-adapter-planetscale-token")
|
|
2812
|
-
},
|
|
2813
|
-
neon: {
|
|
2814
|
-
token: req.headers.get("x-adapter-neon-token")
|
|
2815
|
-
},
|
|
2816
|
-
mailchimp: {
|
|
2817
|
-
token: req.headers.get("x-adapter-mailchimp-token"),
|
|
2818
|
-
server: req.headers.get("x-adapter-mailchimp-server")
|
|
2819
|
-
},
|
|
2820
|
-
shopify: {
|
|
2821
|
-
token: req.headers.get("x-adapter-shopify-token"),
|
|
2822
|
-
shop: req.headers.get("x-adapter-shopify-shop")
|
|
2823
|
-
},
|
|
2824
|
-
hubspot: {
|
|
2825
|
-
token: req.headers.get("x-adapter-hubspot-token")
|
|
2826
|
-
},
|
|
2827
|
-
bigcommerce: {
|
|
2828
|
-
token: req.headers.get("x-adapter-bigcommerce-token"),
|
|
2829
|
-
shop: req.headers.get("x-adapter-bigcommerce-shop")
|
|
2830
|
-
},
|
|
2831
|
-
text: {
|
|
2832
|
-
token: req.headers.get("x-adapter-text-token")
|
|
2833
|
-
}
|
|
2834
|
-
};
|
|
2835
|
-
}
|
|
2836
|
-
return {
|
|
2837
|
-
platform: {
|
|
2838
|
-
token: req.headers["x-adapter-platform-token"]
|
|
2839
|
-
},
|
|
2840
|
-
github: {
|
|
2841
|
-
appToken: req.headers["x-adapter-github-app-token"],
|
|
2842
|
-
oauthToken: req.headers["x-adapter-github-oauth-token"]
|
|
2843
|
-
},
|
|
2844
|
-
netlify: {
|
|
2845
|
-
token: req.headers["x-adapter-netlify-token"]
|
|
2846
|
-
},
|
|
2847
|
-
vercel: {
|
|
2848
|
-
token: req.headers["x-adapter-vercel-token"]
|
|
2849
|
-
},
|
|
2850
|
-
planetscale: {
|
|
2851
|
-
token: req.headers["x-adapter-planetscale-token"]
|
|
2852
|
-
},
|
|
2853
|
-
neon: {
|
|
2854
|
-
token: req.headers["x-adapter-neon-token"]
|
|
2855
|
-
},
|
|
2856
|
-
mailchimp: {
|
|
2857
|
-
token: req.headers["x-adapter-mailchimp-token"],
|
|
2858
|
-
server: req.headers["x-adapter-mailchimp-server"]
|
|
2859
|
-
},
|
|
2860
|
-
shopify: {
|
|
2861
|
-
token: req.headers["x-adapter-shopify-token"],
|
|
2862
|
-
shop: req.headers["x-adapter-shopify-shop"]
|
|
2863
|
-
},
|
|
2864
|
-
hubspot: {
|
|
2865
|
-
token: req.headers["x-adapter-hubspot-token"]
|
|
2866
|
-
},
|
|
2867
|
-
bigcommerce: {
|
|
2868
|
-
token: req.headers["x-adapter-bigcommerce-token"],
|
|
2869
|
-
shop: req.headers["x-adapter-bigcommerce-shop"]
|
|
2870
|
-
},
|
|
2871
|
-
text: {
|
|
2872
|
-
token: req.headers["x-adapter-text-token"]
|
|
2873
|
-
}
|
|
2874
|
-
};
|
|
2875
|
-
}
|
|
2876
|
-
function getPlatformAdapterClientConfig(options = {}) {
|
|
2646
|
+
function getAdapterClientConfig(options = {}) {
|
|
2877
2647
|
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;
|
|
2878
|
-
const currentHeaders =
|
|
2648
|
+
const currentHeaders = adapterClientInstance.defaults.headers;
|
|
2879
2649
|
const headers = {
|
|
2880
2650
|
platform: {
|
|
2881
2651
|
token: (_b = currentHeaders["x-adapter-platform-token"]) != null ? _b : (_a = options.platform) == null ? void 0 : _a.token
|
|
@@ -2939,14 +2709,14 @@ function getPlatformAdapterClientConfig(options = {}) {
|
|
|
2939
2709
|
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 } : {})
|
|
2940
2710
|
};
|
|
2941
2711
|
}
|
|
2942
|
-
var
|
|
2712
|
+
var getAdapterClientDefaultConfig = (authorization) => getAdapterClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
2943
2713
|
ensureAuthorizationToken: {
|
|
2944
2714
|
platform: true
|
|
2945
2715
|
}
|
|
2946
2716
|
}));
|
|
2947
|
-
function
|
|
2717
|
+
function initAdapterClient(baseUrl, tokens) {
|
|
2948
2718
|
if (baseUrl) {
|
|
2949
|
-
|
|
2719
|
+
adapterClientInstance.interceptors.request.use(
|
|
2950
2720
|
(config) => {
|
|
2951
2721
|
config.baseURL = baseUrl;
|
|
2952
2722
|
return config;
|
|
@@ -2955,12 +2725,12 @@ function initPlatformAdapterClient(baseUrl, tokens) {
|
|
|
2955
2725
|
);
|
|
2956
2726
|
}
|
|
2957
2727
|
if (tokens) {
|
|
2958
|
-
|
|
2728
|
+
updateAdapterClient(tokens);
|
|
2959
2729
|
}
|
|
2960
2730
|
}
|
|
2961
|
-
function
|
|
2731
|
+
function updateAdapterClient(tokens) {
|
|
2962
2732
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
2963
|
-
const headers =
|
|
2733
|
+
const headers = adapterClientInstance.defaults.headers;
|
|
2964
2734
|
if ((_a = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _a.token) {
|
|
2965
2735
|
headers["x-adapter-platform-token"] = tokens.platform.token;
|
|
2966
2736
|
}
|
|
@@ -3083,10 +2853,10 @@ var DpsApiError = class extends ApiErrorBase {
|
|
|
3083
2853
|
this.name = "dps";
|
|
3084
2854
|
}
|
|
3085
2855
|
};
|
|
3086
|
-
var
|
|
2856
|
+
var dpsClientInstance = import_axios18.default.create({
|
|
3087
2857
|
baseURL: "https://dev-platform.labs.livechatinc.com"
|
|
3088
2858
|
});
|
|
3089
|
-
|
|
2859
|
+
dpsClientInstance.interceptors.response.use(
|
|
3090
2860
|
(response) => response,
|
|
3091
2861
|
(error) => {
|
|
3092
2862
|
var _a, _b, _c, _d;
|
|
@@ -3102,28 +2872,9 @@ platformDpsClientInstance.interceptors.response.use(
|
|
|
3102
2872
|
);
|
|
3103
2873
|
}
|
|
3104
2874
|
);
|
|
3105
|
-
function
|
|
3106
|
-
if (req.headers instanceof Headers) {
|
|
3107
|
-
return {
|
|
3108
|
-
token: req.headers.get("x-adapter-platform-token"),
|
|
3109
|
-
tokenType: "Bearer"
|
|
3110
|
-
};
|
|
3111
|
-
}
|
|
3112
|
-
return {
|
|
3113
|
-
token: req.headers["x-adapter-platform-token"],
|
|
3114
|
-
tokenType: "Bearer"
|
|
3115
|
-
};
|
|
3116
|
-
}
|
|
3117
|
-
function getPlatformDpsAdminClientAuthorization() {
|
|
3118
|
-
const token = process.env.PLATFORM_DPS_TOKEN_FOR_GITHUB;
|
|
3119
|
-
return {
|
|
3120
|
-
token: btoa(`apps@livechatinc.com:${token}`),
|
|
3121
|
-
tokenType: "Basic"
|
|
3122
|
-
};
|
|
3123
|
-
}
|
|
3124
|
-
function getPlatformDpsClientConfig(options = {}) {
|
|
2875
|
+
function getDpsClientConfig(options = {}) {
|
|
3125
2876
|
var _a, _b;
|
|
3126
|
-
const currentHeaders =
|
|
2877
|
+
const currentHeaders = dpsClientInstance.defaults.headers;
|
|
3127
2878
|
const defaultAuthorization = currentHeaders.Authorization;
|
|
3128
2879
|
const headers = {
|
|
3129
2880
|
authorization: (_b = options.token ? `${(_a = options.tokenType) != null ? _a : "Bearer"} ${options.token}` : void 0) != null ? _b : defaultAuthorization
|
|
@@ -3132,10 +2883,10 @@ function getPlatformDpsClientConfig(options = {}) {
|
|
|
3132
2883
|
headers: __spreadValues({}, headers.authorization ? { Authorization: headers.authorization } : {})
|
|
3133
2884
|
};
|
|
3134
2885
|
}
|
|
3135
|
-
function
|
|
3136
|
-
const headers =
|
|
2886
|
+
function initDpsClient(baseUrl, token) {
|
|
2887
|
+
const headers = dpsClientInstance.defaults.headers;
|
|
3137
2888
|
if (baseUrl) {
|
|
3138
|
-
|
|
2889
|
+
dpsClientInstance.interceptors.request.use(
|
|
3139
2890
|
(config) => {
|
|
3140
2891
|
config.baseURL = baseUrl;
|
|
3141
2892
|
return config;
|
|
@@ -3216,16 +2967,6 @@ livechatClientInstance.interceptors.response.use(
|
|
|
3216
2967
|
);
|
|
3217
2968
|
}
|
|
3218
2969
|
);
|
|
3219
|
-
function getLiveChatClientAuthorization(req) {
|
|
3220
|
-
if (req.headers instanceof Headers) {
|
|
3221
|
-
return {
|
|
3222
|
-
token: req.headers.get("x-adapter-platform-token")
|
|
3223
|
-
};
|
|
3224
|
-
}
|
|
3225
|
-
return {
|
|
3226
|
-
token: req.headers["x-adapter-platform-token"]
|
|
3227
|
-
};
|
|
3228
|
-
}
|
|
3229
2970
|
function getLiveChatClientConfig(options = {}) {
|
|
3230
2971
|
var _a, _b;
|
|
3231
2972
|
const currentHeaders = livechatClientInstance.defaults.headers;
|
|
@@ -3427,10 +3168,10 @@ var textAppMonitoringReportsApi = {
|
|
|
3427
3168
|
getUptimeDetails(appId, authorization) {
|
|
3428
3169
|
return __async(this, null, function* () {
|
|
3429
3170
|
try {
|
|
3430
|
-
const response = yield
|
|
3171
|
+
const response = yield dpsClientInstance.get(
|
|
3431
3172
|
`/v2/applications/${encodeURIComponent(appId)}/monitoring`,
|
|
3432
3173
|
// proxy endpoint
|
|
3433
|
-
|
|
3174
|
+
getDpsClientConfig(authorization)
|
|
3434
3175
|
);
|
|
3435
3176
|
return response.data;
|
|
3436
3177
|
} catch (error) {
|
|
@@ -5930,10 +5671,10 @@ var platformAccountsApi = {
|
|
|
5930
5671
|
var platformDpsApplicationAuthorizationApi = {
|
|
5931
5672
|
createAuth(appId, payload, authorization) {
|
|
5932
5673
|
return __async(this, null, function* () {
|
|
5933
|
-
yield
|
|
5674
|
+
yield dpsClientInstance.post(
|
|
5934
5675
|
`/v2/applications/${encodeURIComponent(appId)}/authorization`,
|
|
5935
5676
|
payload,
|
|
5936
|
-
|
|
5677
|
+
getDpsClientConfig(authorization)
|
|
5937
5678
|
).catch((error) => {
|
|
5938
5679
|
throw error.withCustomMessage(
|
|
5939
5680
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.CREATED} [${error.message}]`
|
|
@@ -5943,9 +5684,9 @@ var platformDpsApplicationAuthorizationApi = {
|
|
|
5943
5684
|
},
|
|
5944
5685
|
deleteAuth(appId, authorization) {
|
|
5945
5686
|
return __async(this, null, function* () {
|
|
5946
|
-
yield
|
|
5687
|
+
yield dpsClientInstance.delete(
|
|
5947
5688
|
`/v2/applications/${encodeURIComponent(appId)}/authorization`,
|
|
5948
|
-
|
|
5689
|
+
getDpsClientConfig(authorization)
|
|
5949
5690
|
).catch((error) => {
|
|
5950
5691
|
throw error.withCustomMessage(
|
|
5951
5692
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
@@ -5959,9 +5700,9 @@ var platformDpsApplicationAuthorizationApi = {
|
|
|
5959
5700
|
var platformDpsApplicationAutoReviewApi = {
|
|
5960
5701
|
getAutoReview(appId, authorization) {
|
|
5961
5702
|
return __async(this, null, function* () {
|
|
5962
|
-
return
|
|
5703
|
+
return dpsClientInstance.get(
|
|
5963
5704
|
`/v2/applications/${encodeURIComponent(appId)}/auto-review`,
|
|
5964
|
-
|
|
5705
|
+
getDpsClientConfig(authorization)
|
|
5965
5706
|
).then(({ status, data }) => {
|
|
5966
5707
|
if (status === 204) {
|
|
5967
5708
|
return getEmptyAppAutoReview();
|
|
@@ -5976,10 +5717,10 @@ var platformDpsApplicationAutoReviewApi = {
|
|
|
5976
5717
|
},
|
|
5977
5718
|
submitAutoReview(appId, payload, authorization) {
|
|
5978
5719
|
return __async(this, null, function* () {
|
|
5979
|
-
yield
|
|
5720
|
+
yield dpsClientInstance.post(
|
|
5980
5721
|
`/v2/applications/${encodeURIComponent(appId)}/auto-review`,
|
|
5981
5722
|
payload,
|
|
5982
|
-
|
|
5723
|
+
getDpsClientConfig(authorization)
|
|
5983
5724
|
).catch((error) => {
|
|
5984
5725
|
throw error.withCustomMessage(
|
|
5985
5726
|
`The review couldn\u2019t be requested. [${error.message}]`
|
|
@@ -5993,12 +5734,12 @@ var platformDpsApplicationAutoReviewApi = {
|
|
|
5993
5734
|
var platformDpsApplicationChatActionsApi = {
|
|
5994
5735
|
createChatAction(appId, payload, authorization) {
|
|
5995
5736
|
return __async(this, null, function* () {
|
|
5996
|
-
yield
|
|
5737
|
+
yield dpsClientInstance.put(
|
|
5997
5738
|
`/v2/applications/${encodeURIComponent(
|
|
5998
5739
|
appId
|
|
5999
5740
|
)}/chat-actions/${encodeURIComponent(payload.id)}`,
|
|
6000
5741
|
payload,
|
|
6001
|
-
|
|
5742
|
+
getDpsClientConfig(authorization)
|
|
6002
5743
|
).catch((error) => {
|
|
6003
5744
|
throw error.withCustomMessage(
|
|
6004
5745
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.CREATED} [${error.message}]`
|
|
@@ -6008,12 +5749,12 @@ var platformDpsApplicationChatActionsApi = {
|
|
|
6008
5749
|
},
|
|
6009
5750
|
updateChatAction(appId, payload, authorization) {
|
|
6010
5751
|
return __async(this, null, function* () {
|
|
6011
|
-
yield
|
|
5752
|
+
yield dpsClientInstance.patch(
|
|
6012
5753
|
`/v2/applications/${encodeURIComponent(
|
|
6013
5754
|
appId
|
|
6014
5755
|
)}/chat-actions/${encodeURIComponent(payload.id)}`,
|
|
6015
5756
|
payload,
|
|
6016
|
-
|
|
5757
|
+
getDpsClientConfig(authorization)
|
|
6017
5758
|
).catch((error) => {
|
|
6018
5759
|
throw error.withCustomMessage(
|
|
6019
5760
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
@@ -6023,11 +5764,11 @@ var platformDpsApplicationChatActionsApi = {
|
|
|
6023
5764
|
},
|
|
6024
5765
|
deleteChatAction(appId, chatActionId, authorization) {
|
|
6025
5766
|
return __async(this, null, function* () {
|
|
6026
|
-
yield
|
|
5767
|
+
yield dpsClientInstance.delete(
|
|
6027
5768
|
`/v2/applications/${encodeURIComponent(
|
|
6028
5769
|
appId
|
|
6029
5770
|
)}/chat-actions/${encodeURIComponent(chatActionId)}`,
|
|
6030
|
-
__spreadValues({},
|
|
5771
|
+
__spreadValues({}, getDpsClientConfig(authorization))
|
|
6031
5772
|
).catch((error) => {
|
|
6032
5773
|
throw error.withCustomMessage(
|
|
6033
5774
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
@@ -6040,12 +5781,12 @@ var platformDpsApplicationChatActionsApi = {
|
|
|
6040
5781
|
// src/apis/platform/dps/applications/application/chatBoosters/api.ts
|
|
6041
5782
|
var platformDpsApplicationChatBoostersApi = {
|
|
6042
5783
|
createChatBooster(appId, chatBoosterId, payload, authorization) {
|
|
6043
|
-
return
|
|
5784
|
+
return dpsClientInstance.put(
|
|
6044
5785
|
`/v2/applications/${encodeURIComponent(
|
|
6045
5786
|
appId
|
|
6046
5787
|
)}/chat-boosters/${encodeURIComponent(chatBoosterId)}`,
|
|
6047
5788
|
payload,
|
|
6048
|
-
|
|
5789
|
+
getDpsClientConfig(authorization)
|
|
6049
5790
|
).catch((error) => {
|
|
6050
5791
|
throw error.withCustomMessage(
|
|
6051
5792
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.CREATED} [${error.message}]`
|
|
@@ -6054,12 +5795,12 @@ var platformDpsApplicationChatBoostersApi = {
|
|
|
6054
5795
|
},
|
|
6055
5796
|
updateChatBooster(appId, chatBoosterId, payload, authorization) {
|
|
6056
5797
|
return __async(this, null, function* () {
|
|
6057
|
-
return
|
|
5798
|
+
return dpsClientInstance.put(
|
|
6058
5799
|
`/v2/applications/${encodeURIComponent(
|
|
6059
5800
|
appId
|
|
6060
5801
|
)}/chat-boosters/${encodeURIComponent(chatBoosterId)}`,
|
|
6061
5802
|
payload,
|
|
6062
|
-
|
|
5803
|
+
getDpsClientConfig(authorization)
|
|
6063
5804
|
).catch((error) => {
|
|
6064
5805
|
throw error.withCustomMessage(
|
|
6065
5806
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
@@ -6069,11 +5810,11 @@ var platformDpsApplicationChatBoostersApi = {
|
|
|
6069
5810
|
},
|
|
6070
5811
|
deleteChatBooster(appId, chatBoosterId, authorization) {
|
|
6071
5812
|
return __async(this, null, function* () {
|
|
6072
|
-
return
|
|
5813
|
+
return dpsClientInstance.delete(
|
|
6073
5814
|
`/v2/applications/${encodeURIComponent(
|
|
6074
5815
|
appId
|
|
6075
5816
|
)}/chat-boosters/${encodeURIComponent(chatBoosterId)}`,
|
|
6076
|
-
|
|
5817
|
+
getDpsClientConfig(authorization)
|
|
6077
5818
|
).catch((error) => {
|
|
6078
5819
|
throw error.withCustomMessage(
|
|
6079
5820
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
@@ -6087,10 +5828,10 @@ var platformDpsApplicationChatBoostersApi = {
|
|
|
6087
5828
|
var platformDpsApplicationDisplayApi = {
|
|
6088
5829
|
updateVersionHistory(appId, payload, authorization) {
|
|
6089
5830
|
return __async(this, null, function* () {
|
|
6090
|
-
yield
|
|
5831
|
+
yield dpsClientInstance.put(
|
|
6091
5832
|
`/v2/applications/${encodeURIComponent(appId)}/display/changelog`,
|
|
6092
5833
|
payload,
|
|
6093
|
-
|
|
5834
|
+
getDpsClientConfig(authorization)
|
|
6094
5835
|
).catch((error) => {
|
|
6095
5836
|
throw error.withCustomMessage(
|
|
6096
5837
|
`Listing details couldn't be updated. [${error.message}]`
|
|
@@ -6100,10 +5841,10 @@ var platformDpsApplicationDisplayApi = {
|
|
|
6100
5841
|
},
|
|
6101
5842
|
updateBasicDetails(appId, basicDetails, authorization) {
|
|
6102
5843
|
return __async(this, null, function* () {
|
|
6103
|
-
yield
|
|
5844
|
+
yield dpsClientInstance.put(
|
|
6104
5845
|
`/v2/applications/${encodeURIComponent(appId)}/display`,
|
|
6105
5846
|
basicDetails,
|
|
6106
|
-
|
|
5847
|
+
getDpsClientConfig(authorization)
|
|
6107
5848
|
).catch((error) => {
|
|
6108
5849
|
throw error.withCustomMessage(
|
|
6109
5850
|
`Listing details couldn't be updated. [${error.message}]`
|
|
@@ -6113,10 +5854,10 @@ var platformDpsApplicationDisplayApi = {
|
|
|
6113
5854
|
},
|
|
6114
5855
|
patchBasicDetails(appId, basicDetails, authorization) {
|
|
6115
5856
|
return __async(this, null, function* () {
|
|
6116
|
-
yield
|
|
5857
|
+
yield dpsClientInstance.patch(
|
|
6117
5858
|
`/v2/applications/${encodeURIComponent(appId)}/display`,
|
|
6118
5859
|
basicDetails,
|
|
6119
|
-
|
|
5860
|
+
getDpsClientConfig(authorization)
|
|
6120
5861
|
).catch((error) => {
|
|
6121
5862
|
throw error.withCustomMessage(
|
|
6122
5863
|
`Listing details couldn't be updated. [${error.message}]`
|
|
@@ -6126,10 +5867,10 @@ var platformDpsApplicationDisplayApi = {
|
|
|
6126
5867
|
},
|
|
6127
5868
|
updateOverview(appId, data, authorization) {
|
|
6128
5869
|
return __async(this, null, function* () {
|
|
6129
|
-
yield
|
|
5870
|
+
yield dpsClientInstance.put(
|
|
6130
5871
|
`/v2/applications/${encodeURIComponent(appId)}/listing/overview`,
|
|
6131
5872
|
data,
|
|
6132
|
-
|
|
5873
|
+
getDpsClientConfig(authorization)
|
|
6133
5874
|
).catch((error) => {
|
|
6134
5875
|
throw error.withCustomMessage(
|
|
6135
5876
|
`Listing details couldn't be updated. [${error.message}]`
|
|
@@ -6139,10 +5880,10 @@ var platformDpsApplicationDisplayApi = {
|
|
|
6139
5880
|
},
|
|
6140
5881
|
updateTutorialAndSupport(appId, data, authorization) {
|
|
6141
5882
|
return __async(this, null, function* () {
|
|
6142
|
-
yield
|
|
5883
|
+
yield dpsClientInstance.put(
|
|
6143
5884
|
`/v2/applications/${encodeURIComponent(appId)}/listing/support`,
|
|
6144
5885
|
data,
|
|
6145
|
-
|
|
5886
|
+
getDpsClientConfig(authorization)
|
|
6146
5887
|
).catch((error) => {
|
|
6147
5888
|
throw error.withCustomMessage(
|
|
6148
5889
|
`Listing details couldn't be updated. [${error.message}]`
|
|
@@ -6152,10 +5893,10 @@ var platformDpsApplicationDisplayApi = {
|
|
|
6152
5893
|
},
|
|
6153
5894
|
updateAppIcon(appId, payload, authorization) {
|
|
6154
5895
|
return __async(this, null, function* () {
|
|
6155
|
-
yield
|
|
5896
|
+
yield dpsClientInstance.put(
|
|
6156
5897
|
`/v2/applications/${encodeURIComponent(appId)}/display/icons`,
|
|
6157
5898
|
payload,
|
|
6158
|
-
|
|
5899
|
+
getDpsClientConfig(authorization)
|
|
6159
5900
|
).catch((error) => {
|
|
6160
5901
|
throw error.withCustomMessage(
|
|
6161
5902
|
`Listing details couldn't be updated. [${error.message}]`
|
|
@@ -6165,10 +5906,10 @@ var platformDpsApplicationDisplayApi = {
|
|
|
6165
5906
|
},
|
|
6166
5907
|
updateDisplayImages(appId, screenshots, authorization) {
|
|
6167
5908
|
return __async(this, null, function* () {
|
|
6168
|
-
yield
|
|
5909
|
+
yield dpsClientInstance.put(
|
|
6169
5910
|
`/v2/applications/${encodeURIComponent(appId)}/screenshots/commit`,
|
|
6170
5911
|
screenshots,
|
|
6171
|
-
|
|
5912
|
+
getDpsClientConfig(authorization)
|
|
6172
5913
|
).catch((error) => {
|
|
6173
5914
|
throw error.withCustomMessage(
|
|
6174
5915
|
`Listing details couldn't be updated. [${error.message}]`
|
|
@@ -6178,10 +5919,10 @@ var platformDpsApplicationDisplayApi = {
|
|
|
6178
5919
|
},
|
|
6179
5920
|
updateDisplayFeatures(appId, features, authorization) {
|
|
6180
5921
|
return __async(this, null, function* () {
|
|
6181
|
-
yield
|
|
5922
|
+
yield dpsClientInstance.put(
|
|
6182
5923
|
`/v2/applications/${encodeURIComponent(appId)}/features`,
|
|
6183
5924
|
features,
|
|
6184
|
-
|
|
5925
|
+
getDpsClientConfig(authorization)
|
|
6185
5926
|
).catch((error) => {
|
|
6186
5927
|
throw error.withCustomMessage(
|
|
6187
5928
|
`Listing details couldn't be updated. [${error.message}]`
|
|
@@ -6191,10 +5932,10 @@ var platformDpsApplicationDisplayApi = {
|
|
|
6191
5932
|
},
|
|
6192
5933
|
updateDisplayBenefits(appId, benefits, authorization) {
|
|
6193
5934
|
return __async(this, null, function* () {
|
|
6194
|
-
yield
|
|
5935
|
+
yield dpsClientInstance.put(
|
|
6195
5936
|
`/v2/applications/${encodeURIComponent(appId)}/benefits`,
|
|
6196
5937
|
benefits,
|
|
6197
|
-
|
|
5938
|
+
getDpsClientConfig(authorization)
|
|
6198
5939
|
).catch((error) => {
|
|
6199
5940
|
throw error.withCustomMessage(
|
|
6200
5941
|
`Listing details couldn't be updated. [${error.message}]`
|
|
@@ -6204,10 +5945,10 @@ var platformDpsApplicationDisplayApi = {
|
|
|
6204
5945
|
},
|
|
6205
5946
|
uploadImage(appId, body, authorization) {
|
|
6206
5947
|
return __async(this, null, function* () {
|
|
6207
|
-
return
|
|
5948
|
+
return dpsClientInstance.post(
|
|
6208
5949
|
`/v2/applications/${encodeURIComponent(appId)}/image`,
|
|
6209
5950
|
body,
|
|
6210
|
-
|
|
5951
|
+
getDpsClientConfig(authorization)
|
|
6211
5952
|
).catch((error) => {
|
|
6212
5953
|
throw error.withCustomMessage(`Image couldn't be uploaded`);
|
|
6213
5954
|
});
|
|
@@ -6219,9 +5960,9 @@ var platformDpsApplicationDisplayApi = {
|
|
|
6219
5960
|
var platformDpsApplicationEventApi = {
|
|
6220
5961
|
getEvents(appId, authorization) {
|
|
6221
5962
|
return __async(this, null, function* () {
|
|
6222
|
-
return
|
|
5963
|
+
return dpsClientInstance.get(
|
|
6223
5964
|
`/v2/applications/${encodeURIComponent(appId)}/events?limit=300`,
|
|
6224
|
-
|
|
5965
|
+
getDpsClientConfig(authorization)
|
|
6225
5966
|
).then(({ data }) => data).catch((error) => {
|
|
6226
5967
|
throw error.withCustomMessage(
|
|
6227
5968
|
`App Events couldn't be fetched. [${error.message}]`
|
|
@@ -6235,9 +5976,9 @@ var platformDpsApplicationEventApi = {
|
|
|
6235
5976
|
var platformDpsApplicationInfrastructureBlocksApi = {
|
|
6236
5977
|
getBlocks(appId, authorization) {
|
|
6237
5978
|
return __async(this, null, function* () {
|
|
6238
|
-
const response = yield
|
|
5979
|
+
const response = yield dpsClientInstance.get(
|
|
6239
5980
|
`/v2/applications/${encodeURIComponent(appId)}/infrastructure/blocks`,
|
|
6240
|
-
|
|
5981
|
+
getDpsClientConfig(authorization)
|
|
6241
5982
|
);
|
|
6242
5983
|
delete response.data.appId;
|
|
6243
5984
|
return response.data;
|
|
@@ -6245,26 +5986,26 @@ var platformDpsApplicationInfrastructureBlocksApi = {
|
|
|
6245
5986
|
},
|
|
6246
5987
|
updateBlocks(appId, payload, authorization) {
|
|
6247
5988
|
return __async(this, null, function* () {
|
|
6248
|
-
yield
|
|
5989
|
+
yield dpsClientInstance.patch(
|
|
6249
5990
|
`/v2/applications/${encodeURIComponent(appId)}/infrastructure/blocks`,
|
|
6250
5991
|
payload,
|
|
6251
|
-
|
|
5992
|
+
getDpsClientConfig(authorization)
|
|
6252
5993
|
);
|
|
6253
5994
|
});
|
|
6254
5995
|
},
|
|
6255
5996
|
deleteBlock(appId, block, authorization) {
|
|
6256
5997
|
return __async(this, null, function* () {
|
|
6257
|
-
yield
|
|
5998
|
+
yield dpsClientInstance.delete(
|
|
6258
5999
|
`/v2/applications/${encodeURIComponent(
|
|
6259
6000
|
appId
|
|
6260
6001
|
)}/infrastructure/blocks/${encodeURIComponent(block)}`,
|
|
6261
|
-
|
|
6002
|
+
getDpsClientConfig(authorization)
|
|
6262
6003
|
);
|
|
6263
6004
|
});
|
|
6264
6005
|
},
|
|
6265
6006
|
updateRepository(appId, payload, authorization) {
|
|
6266
6007
|
return __async(this, null, function* () {
|
|
6267
|
-
yield
|
|
6008
|
+
yield dpsClientInstance.patch(
|
|
6268
6009
|
`/v2/applications/${encodeURIComponent(appId)}/infrastructure/blocks`,
|
|
6269
6010
|
{
|
|
6270
6011
|
appId,
|
|
@@ -6272,14 +6013,14 @@ var platformDpsApplicationInfrastructureBlocksApi = {
|
|
|
6272
6013
|
provider: payload.provider
|
|
6273
6014
|
}
|
|
6274
6015
|
},
|
|
6275
|
-
|
|
6016
|
+
getDpsClientConfig(authorization)
|
|
6276
6017
|
);
|
|
6277
6018
|
});
|
|
6278
6019
|
},
|
|
6279
6020
|
updateDeployment(appId, payload, authorization) {
|
|
6280
6021
|
return __async(this, null, function* () {
|
|
6281
6022
|
const config = payload.customUrl ? { custom: { url: payload.customUrl } } : { custom: null };
|
|
6282
|
-
yield
|
|
6023
|
+
yield dpsClientInstance.patch(
|
|
6283
6024
|
`/v2/applications/${encodeURIComponent(appId)}/infrastructure/blocks`,
|
|
6284
6025
|
{
|
|
6285
6026
|
appId,
|
|
@@ -6288,13 +6029,13 @@ var platformDpsApplicationInfrastructureBlocksApi = {
|
|
|
6288
6029
|
config
|
|
6289
6030
|
}
|
|
6290
6031
|
},
|
|
6291
|
-
|
|
6032
|
+
getDpsClientConfig(authorization)
|
|
6292
6033
|
);
|
|
6293
6034
|
});
|
|
6294
6035
|
},
|
|
6295
6036
|
updateStorage(appId, payload, authorization) {
|
|
6296
6037
|
return __async(this, null, function* () {
|
|
6297
|
-
yield
|
|
6038
|
+
yield dpsClientInstance.patch(
|
|
6298
6039
|
`/v2/applications/${encodeURIComponent(appId)}/infrastructure/blocks`,
|
|
6299
6040
|
{
|
|
6300
6041
|
appId,
|
|
@@ -6302,7 +6043,7 @@ var platformDpsApplicationInfrastructureBlocksApi = {
|
|
|
6302
6043
|
provider: payload.provider
|
|
6303
6044
|
}
|
|
6304
6045
|
},
|
|
6305
|
-
|
|
6046
|
+
getDpsClientConfig(authorization)
|
|
6306
6047
|
);
|
|
6307
6048
|
});
|
|
6308
6049
|
}
|
|
@@ -6317,9 +6058,9 @@ var platformDpsApplicationInfrastructureApi = {
|
|
|
6317
6058
|
var platformDpsApplicationInstallApi = {
|
|
6318
6059
|
getInstallationsCount(appId, authorization) {
|
|
6319
6060
|
return __async(this, null, function* () {
|
|
6320
|
-
return
|
|
6061
|
+
return dpsClientInstance.get(
|
|
6321
6062
|
`/v2/applications/${encodeURIComponent(appId)}/installations/count`,
|
|
6322
|
-
|
|
6063
|
+
getDpsClientConfig(authorization)
|
|
6323
6064
|
).catch((error) => {
|
|
6324
6065
|
throw error.withCustomMessage(
|
|
6325
6066
|
`Couldn't get app installation count. [${error.message}]`
|
|
@@ -6329,10 +6070,10 @@ var platformDpsApplicationInstallApi = {
|
|
|
6329
6070
|
},
|
|
6330
6071
|
install(appId, authorization) {
|
|
6331
6072
|
return __async(this, null, function* () {
|
|
6332
|
-
yield
|
|
6073
|
+
yield dpsClientInstance.put(
|
|
6333
6074
|
`/v2/applications/${encodeURIComponent(appId)}/install`,
|
|
6334
6075
|
{},
|
|
6335
|
-
|
|
6076
|
+
getDpsClientConfig(authorization)
|
|
6336
6077
|
).catch((error) => {
|
|
6337
6078
|
throw error.withCustomMessage(
|
|
6338
6079
|
`App couldn't be installed. [${error.message}]`
|
|
@@ -6342,9 +6083,9 @@ var platformDpsApplicationInstallApi = {
|
|
|
6342
6083
|
},
|
|
6343
6084
|
uninstall(appId, authorization) {
|
|
6344
6085
|
return __async(this, null, function* () {
|
|
6345
|
-
yield
|
|
6086
|
+
yield dpsClientInstance.delete(
|
|
6346
6087
|
`/v2/applications/${encodeURIComponent(appId)}/install`,
|
|
6347
|
-
|
|
6088
|
+
getDpsClientConfig(authorization)
|
|
6348
6089
|
).catch((error) => {
|
|
6349
6090
|
throw error.withCustomMessage(
|
|
6350
6091
|
`App couldn't be uninstalled. [${error.message}]`
|
|
@@ -6354,10 +6095,10 @@ var platformDpsApplicationInstallApi = {
|
|
|
6354
6095
|
},
|
|
6355
6096
|
updateDirectInstallationUrl(appId, payload, authorization) {
|
|
6356
6097
|
return __async(this, null, function* () {
|
|
6357
|
-
yield
|
|
6098
|
+
yield dpsClientInstance.put(
|
|
6358
6099
|
`/v2/applications/${encodeURIComponent(appId)}/install/direct`,
|
|
6359
6100
|
payload,
|
|
6360
|
-
|
|
6101
|
+
getDpsClientConfig(authorization)
|
|
6361
6102
|
).catch((error) => {
|
|
6362
6103
|
throw error.withCustomMessage(
|
|
6363
6104
|
`Direct installation URL couldn't be updated. [${error.message}]`
|
|
@@ -6367,10 +6108,10 @@ var platformDpsApplicationInstallApi = {
|
|
|
6367
6108
|
},
|
|
6368
6109
|
getInstalledApplication(appId, license, authorization) {
|
|
6369
6110
|
return __async(this, null, function* () {
|
|
6370
|
-
return
|
|
6111
|
+
return dpsClientInstance.get(
|
|
6371
6112
|
`/v1/applications/${encodeURIComponent(appId)}/installed`,
|
|
6372
6113
|
{
|
|
6373
|
-
headers: __spreadProps(__spreadValues({},
|
|
6114
|
+
headers: __spreadProps(__spreadValues({}, getDpsClientConfig(authorization).headers), {
|
|
6374
6115
|
"X-License": license
|
|
6375
6116
|
})
|
|
6376
6117
|
}
|
|
@@ -6385,10 +6126,10 @@ var platformDpsApplicationInstallApi = {
|
|
|
6385
6126
|
var platformDpsApplicationOnboardingApi = {
|
|
6386
6127
|
updateOnboarding(appId, payload, authorization) {
|
|
6387
6128
|
return __async(this, null, function* () {
|
|
6388
|
-
yield
|
|
6129
|
+
yield dpsClientInstance.put(
|
|
6389
6130
|
`/v2/applications/${encodeURIComponent(appId)}/onboarding`,
|
|
6390
6131
|
payload,
|
|
6391
|
-
|
|
6132
|
+
getDpsClientConfig(authorization)
|
|
6392
6133
|
).catch((error) => {
|
|
6393
6134
|
throw error.withCustomMessage(
|
|
6394
6135
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
@@ -6398,9 +6139,9 @@ var platformDpsApplicationOnboardingApi = {
|
|
|
6398
6139
|
},
|
|
6399
6140
|
deleteOnboarding(appId, authorization) {
|
|
6400
6141
|
return __async(this, null, function* () {
|
|
6401
|
-
yield
|
|
6142
|
+
yield dpsClientInstance.delete(
|
|
6402
6143
|
`/v2/applications/${encodeURIComponent(appId)}/onboarding`,
|
|
6403
|
-
__spreadValues({},
|
|
6144
|
+
__spreadValues({}, getDpsClientConfig(authorization))
|
|
6404
6145
|
).catch((error) => {
|
|
6405
6146
|
throw error.withCustomMessage(
|
|
6406
6147
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
@@ -6415,12 +6156,12 @@ var platformDpsApplicationPaymentApi = {
|
|
|
6415
6156
|
updatePaymentBlock(appId, payment, authorization) {
|
|
6416
6157
|
return __async(this, null, function* () {
|
|
6417
6158
|
var _a;
|
|
6418
|
-
yield
|
|
6159
|
+
yield dpsClientInstance.put(
|
|
6419
6160
|
`/v2/applications/${encodeURIComponent(appId)}/payment`,
|
|
6420
6161
|
__spreadProps(__spreadValues({}, payment), {
|
|
6421
6162
|
creditCardRequired: (_a = payment.creditCardRequired) != null ? _a : true
|
|
6422
6163
|
}),
|
|
6423
|
-
|
|
6164
|
+
getDpsClientConfig(authorization)
|
|
6424
6165
|
).catch((error) => {
|
|
6425
6166
|
throw error.withCustomMessage(
|
|
6426
6167
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
@@ -6430,9 +6171,9 @@ var platformDpsApplicationPaymentApi = {
|
|
|
6430
6171
|
},
|
|
6431
6172
|
deletePaymentBlock(appId, authorization) {
|
|
6432
6173
|
return __async(this, null, function* () {
|
|
6433
|
-
yield
|
|
6174
|
+
yield dpsClientInstance.delete(
|
|
6434
6175
|
`/v2/applications/${encodeURIComponent(appId)}/payment`,
|
|
6435
|
-
|
|
6176
|
+
getDpsClientConfig(authorization)
|
|
6436
6177
|
).catch((error) => {
|
|
6437
6178
|
throw error.withCustomMessage(
|
|
6438
6179
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
@@ -6446,10 +6187,10 @@ var platformDpsApplicationPaymentApi = {
|
|
|
6446
6187
|
var platformDpsApplicationProductApi = {
|
|
6447
6188
|
updateProduct(appId, payload, authorization) {
|
|
6448
6189
|
return __async(this, null, function* () {
|
|
6449
|
-
yield
|
|
6190
|
+
yield dpsClientInstance.put(
|
|
6450
6191
|
`/v2/applications/${encodeURIComponent(appId)}/product`,
|
|
6451
6192
|
payload,
|
|
6452
|
-
|
|
6193
|
+
getDpsClientConfig(authorization)
|
|
6453
6194
|
).catch((error) => {
|
|
6454
6195
|
throw error.withCustomMessage(
|
|
6455
6196
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
@@ -6463,10 +6204,10 @@ var platformDpsApplicationProductApi = {
|
|
|
6463
6204
|
var platformDpsApplicationCustomPropsApi = {
|
|
6464
6205
|
createCustomProps(appId, property, authorization) {
|
|
6465
6206
|
return __async(this, null, function* () {
|
|
6466
|
-
return
|
|
6207
|
+
return dpsClientInstance.post(
|
|
6467
6208
|
`/v2/applications/${encodeURIComponent(appId)}/property`,
|
|
6468
6209
|
property,
|
|
6469
|
-
|
|
6210
|
+
getDpsClientConfig(authorization)
|
|
6470
6211
|
).then(({ data }) => data).catch((error) => {
|
|
6471
6212
|
throw error.withCustomMessage(
|
|
6472
6213
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.CREATED} [${error.message}]`
|
|
@@ -6476,10 +6217,10 @@ var platformDpsApplicationCustomPropsApi = {
|
|
|
6476
6217
|
},
|
|
6477
6218
|
updateCustomProps(appId, property, authorization) {
|
|
6478
6219
|
return __async(this, null, function* () {
|
|
6479
|
-
return
|
|
6220
|
+
return dpsClientInstance.put(
|
|
6480
6221
|
`/v2/applications/${encodeURIComponent(appId)}/property`,
|
|
6481
6222
|
property,
|
|
6482
|
-
|
|
6223
|
+
getDpsClientConfig(authorization)
|
|
6483
6224
|
).then(({ data }) => data).catch((error) => {
|
|
6484
6225
|
throw error.withCustomMessage(
|
|
6485
6226
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
@@ -6489,11 +6230,11 @@ var platformDpsApplicationCustomPropsApi = {
|
|
|
6489
6230
|
},
|
|
6490
6231
|
deleteCustomProps(appId, property, authorization) {
|
|
6491
6232
|
return __async(this, null, function* () {
|
|
6492
|
-
return
|
|
6233
|
+
return dpsClientInstance.delete(
|
|
6493
6234
|
`/v2/applications/${encodeURIComponent(appId)}/property`,
|
|
6494
6235
|
__spreadValues({
|
|
6495
6236
|
data: property
|
|
6496
|
-
},
|
|
6237
|
+
}, getDpsClientConfig(authorization))
|
|
6497
6238
|
).then(({ data }) => data).catch((error) => {
|
|
6498
6239
|
throw error.withCustomMessage(
|
|
6499
6240
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
@@ -6507,9 +6248,9 @@ var platformDpsApplicationCustomPropsApi = {
|
|
|
6507
6248
|
var platformDpsApplicationResourcesApi = {
|
|
6508
6249
|
getAppUpgrades(appId, authorization) {
|
|
6509
6250
|
return __async(this, null, function* () {
|
|
6510
|
-
return
|
|
6251
|
+
return dpsClientInstance.get(
|
|
6511
6252
|
`/v2/applications/${encodeURIComponent(appId)}/resources`,
|
|
6512
|
-
|
|
6253
|
+
getDpsClientConfig(authorization)
|
|
6513
6254
|
).catch((error) => {
|
|
6514
6255
|
throw error.withCustomMessage(
|
|
6515
6256
|
`App Resources couldn't be loaded. [${error.message}]`
|
|
@@ -6519,10 +6260,10 @@ var platformDpsApplicationResourcesApi = {
|
|
|
6519
6260
|
},
|
|
6520
6261
|
createAppUpgrade(appId, body, authorization) {
|
|
6521
6262
|
return __async(this, null, function* () {
|
|
6522
|
-
return
|
|
6263
|
+
return dpsClientInstance.put(
|
|
6523
6264
|
`/v2/applications/${encodeURIComponent(appId)}/resources`,
|
|
6524
6265
|
body,
|
|
6525
|
-
|
|
6266
|
+
getDpsClientConfig(authorization)
|
|
6526
6267
|
).catch((error) => {
|
|
6527
6268
|
throw error.withCustomMessage(
|
|
6528
6269
|
`App Resources couldn't be created. [${error.message}]`
|
|
@@ -6532,10 +6273,10 @@ var platformDpsApplicationResourcesApi = {
|
|
|
6532
6273
|
},
|
|
6533
6274
|
updateAppUpgrade(appId, body, authorization) {
|
|
6534
6275
|
return __async(this, null, function* () {
|
|
6535
|
-
return
|
|
6276
|
+
return dpsClientInstance.put(
|
|
6536
6277
|
`/v2/applications/${encodeURIComponent(appId)}/resources`,
|
|
6537
6278
|
body,
|
|
6538
|
-
|
|
6279
|
+
getDpsClientConfig(authorization)
|
|
6539
6280
|
).catch((error) => {
|
|
6540
6281
|
throw error.withCustomMessage(
|
|
6541
6282
|
`App Resources couldn't be updated. [${error.message}]`
|
|
@@ -6545,11 +6286,11 @@ var platformDpsApplicationResourcesApi = {
|
|
|
6545
6286
|
},
|
|
6546
6287
|
deleteAppUpgrade(appId, resourceId, authorization) {
|
|
6547
6288
|
return __async(this, null, function* () {
|
|
6548
|
-
return
|
|
6289
|
+
return dpsClientInstance.delete(
|
|
6549
6290
|
`/v2/applications/${encodeURIComponent(
|
|
6550
6291
|
appId
|
|
6551
6292
|
)}/resources/${encodeURIComponent(resourceId)}`,
|
|
6552
|
-
|
|
6293
|
+
getDpsClientConfig(authorization)
|
|
6553
6294
|
).catch((error) => {
|
|
6554
6295
|
throw error.withCustomMessage(
|
|
6555
6296
|
`App Resource couldn't be delete. [${error.message}]`
|
|
@@ -6559,12 +6300,12 @@ var platformDpsApplicationResourcesApi = {
|
|
|
6559
6300
|
},
|
|
6560
6301
|
copyUpgrade(sourceAppId, destinationAppId, authorization) {
|
|
6561
6302
|
return __async(this, null, function* () {
|
|
6562
|
-
return
|
|
6303
|
+
return dpsClientInstance.put(
|
|
6563
6304
|
`/v2/applications/${encodeURIComponent(
|
|
6564
6305
|
sourceAppId
|
|
6565
6306
|
)}/resources/copy?application=${encodeURIComponent(destinationAppId)}`,
|
|
6566
6307
|
{},
|
|
6567
|
-
|
|
6308
|
+
getDpsClientConfig(authorization)
|
|
6568
6309
|
).catch((error) => {
|
|
6569
6310
|
throw error.withCustomMessage(
|
|
6570
6311
|
`App Resources couldn't be copied. [${error.message}]`
|
|
@@ -6578,10 +6319,10 @@ var platformDpsApplicationResourcesApi = {
|
|
|
6578
6319
|
var platformDpsApplicationReviewApi = {
|
|
6579
6320
|
createSubmission(appId, payload, authorization) {
|
|
6580
6321
|
return __async(this, null, function* () {
|
|
6581
|
-
return
|
|
6322
|
+
return dpsClientInstance.put(
|
|
6582
6323
|
`/v2/applications/${encodeURIComponent(appId)}/review/submit`,
|
|
6583
6324
|
payload,
|
|
6584
|
-
|
|
6325
|
+
getDpsClientConfig(authorization)
|
|
6585
6326
|
).then(({ data }) => data).catch((error) => {
|
|
6586
6327
|
throw error.withCustomMessage(
|
|
6587
6328
|
`App couldn't be submitted for review. [${error.message}]`
|
|
@@ -6591,9 +6332,9 @@ var platformDpsApplicationReviewApi = {
|
|
|
6591
6332
|
},
|
|
6592
6333
|
cancelSubmission(appId, authorization) {
|
|
6593
6334
|
return __async(this, null, function* () {
|
|
6594
|
-
return
|
|
6335
|
+
return dpsClientInstance.put(
|
|
6595
6336
|
`/v2/applications/${encodeURIComponent(appId)}/review/cancel`,
|
|
6596
|
-
|
|
6337
|
+
getDpsClientConfig(authorization)
|
|
6597
6338
|
).then(({ data }) => data).catch((error) => {
|
|
6598
6339
|
throw error.withCustomMessage(
|
|
6599
6340
|
`App review couldn't be cancelled. [${error.message}]`
|
|
@@ -6607,9 +6348,9 @@ var platformDpsApplicationReviewApi = {
|
|
|
6607
6348
|
var platformDpsApplicationStatsApi = {
|
|
6608
6349
|
getStats(appId, authorization) {
|
|
6609
6350
|
return __async(this, null, function* () {
|
|
6610
|
-
return
|
|
6351
|
+
return dpsClientInstance.get(
|
|
6611
6352
|
`/v2/applications/${encodeURIComponent(appId)}/stats`,
|
|
6612
|
-
|
|
6353
|
+
getDpsClientConfig(authorization)
|
|
6613
6354
|
).catch((error) => {
|
|
6614
6355
|
throw error.withCustomMessage(
|
|
6615
6356
|
`App Stats couldn't be fetched. [${error.message}]`
|
|
@@ -6623,10 +6364,10 @@ var platformDpsApplicationStatsApi = {
|
|
|
6623
6364
|
var platformDpsApplicationWebhooksApi = {
|
|
6624
6365
|
updateAppWebhooks(appId, payload, authorization) {
|
|
6625
6366
|
return __async(this, null, function* () {
|
|
6626
|
-
yield
|
|
6367
|
+
yield dpsClientInstance.put(
|
|
6627
6368
|
`/v2/applications/${encodeURIComponent(appId)}/webhook`,
|
|
6628
6369
|
payload,
|
|
6629
|
-
|
|
6370
|
+
getDpsClientConfig(authorization)
|
|
6630
6371
|
).catch((error) => {
|
|
6631
6372
|
throw error.withCustomMessage(
|
|
6632
6373
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
@@ -6636,9 +6377,9 @@ var platformDpsApplicationWebhooksApi = {
|
|
|
6636
6377
|
},
|
|
6637
6378
|
deleteAppWebhooks(appId, authorization) {
|
|
6638
6379
|
return __async(this, null, function* () {
|
|
6639
|
-
yield
|
|
6380
|
+
yield dpsClientInstance.delete(
|
|
6640
6381
|
`/v2/applications/${encodeURIComponent(appId)}/webhook`,
|
|
6641
|
-
|
|
6382
|
+
getDpsClientConfig(authorization)
|
|
6642
6383
|
).catch((error) => {
|
|
6643
6384
|
throw error.withCustomMessage(
|
|
6644
6385
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
@@ -6648,9 +6389,9 @@ var platformDpsApplicationWebhooksApi = {
|
|
|
6648
6389
|
},
|
|
6649
6390
|
getChatWebhook(appId, authorization) {
|
|
6650
6391
|
return __async(this, null, function* () {
|
|
6651
|
-
return
|
|
6392
|
+
return dpsClientInstance.get(
|
|
6652
6393
|
`/v2/applications/${encodeURIComponent(appId)}/chat-webhooks`,
|
|
6653
|
-
|
|
6394
|
+
getDpsClientConfig(authorization)
|
|
6654
6395
|
).catch((error) => {
|
|
6655
6396
|
throw error.withCustomMessage(
|
|
6656
6397
|
`Couldn't get the chat webhook. [${error.message}]`
|
|
@@ -6660,10 +6401,10 @@ var platformDpsApplicationWebhooksApi = {
|
|
|
6660
6401
|
},
|
|
6661
6402
|
updateChatWebhook(appId, payload, authorization) {
|
|
6662
6403
|
return __async(this, null, function* () {
|
|
6663
|
-
yield
|
|
6404
|
+
yield dpsClientInstance.post(
|
|
6664
6405
|
`/v2/applications/${encodeURIComponent(appId)}/chat-webhooks`,
|
|
6665
6406
|
payload,
|
|
6666
|
-
|
|
6407
|
+
getDpsClientConfig(authorization)
|
|
6667
6408
|
).catch((error) => {
|
|
6668
6409
|
throw error.withCustomMessage(
|
|
6669
6410
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
@@ -6673,9 +6414,9 @@ var platformDpsApplicationWebhooksApi = {
|
|
|
6673
6414
|
},
|
|
6674
6415
|
deleteChatWebhook(appId, authorization) {
|
|
6675
6416
|
return __async(this, null, function* () {
|
|
6676
|
-
yield
|
|
6417
|
+
yield dpsClientInstance.delete(
|
|
6677
6418
|
`/v2/applications/${encodeURIComponent(appId)}/chat-webhooks`,
|
|
6678
|
-
__spreadValues({},
|
|
6419
|
+
__spreadValues({}, getDpsClientConfig(authorization))
|
|
6679
6420
|
).catch((error) => {
|
|
6680
6421
|
throw error.withCustomMessage(
|
|
6681
6422
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
@@ -6689,12 +6430,12 @@ var platformDpsApplicationWebhooksApi = {
|
|
|
6689
6430
|
var platformDpsApplicationWidgetsApi = {
|
|
6690
6431
|
createWidget(appId, widgetId, widget, authorization) {
|
|
6691
6432
|
return __async(this, null, function* () {
|
|
6692
|
-
yield
|
|
6433
|
+
yield dpsClientInstance.put(
|
|
6693
6434
|
`/v2/applications/${encodeURIComponent(
|
|
6694
6435
|
appId
|
|
6695
6436
|
)}/widgets/${encodeURIComponent(widgetId)}`,
|
|
6696
6437
|
widget,
|
|
6697
|
-
|
|
6438
|
+
getDpsClientConfig(authorization)
|
|
6698
6439
|
).catch((error) => {
|
|
6699
6440
|
throw error.withCustomMessage(
|
|
6700
6441
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.CREATED} [${error.message}]`
|
|
@@ -6704,12 +6445,12 @@ var platformDpsApplicationWidgetsApi = {
|
|
|
6704
6445
|
},
|
|
6705
6446
|
updateWidget(appId, widgetId, widget, authorization) {
|
|
6706
6447
|
return __async(this, null, function* () {
|
|
6707
|
-
yield
|
|
6448
|
+
yield dpsClientInstance.patch(
|
|
6708
6449
|
`/v2/applications/${encodeURIComponent(
|
|
6709
6450
|
appId
|
|
6710
6451
|
)}/widgets/${encodeURIComponent(widgetId)}`,
|
|
6711
6452
|
widget,
|
|
6712
|
-
|
|
6453
|
+
getDpsClientConfig(authorization)
|
|
6713
6454
|
).catch((error) => {
|
|
6714
6455
|
throw error.withCustomMessage(
|
|
6715
6456
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.UPDATED} [${error.message}]`
|
|
@@ -6719,11 +6460,11 @@ var platformDpsApplicationWidgetsApi = {
|
|
|
6719
6460
|
},
|
|
6720
6461
|
deleteWidget(appId, widgetId, authorization) {
|
|
6721
6462
|
return __async(this, null, function* () {
|
|
6722
|
-
yield
|
|
6463
|
+
yield dpsClientInstance.delete(
|
|
6723
6464
|
`/v2/applications/${encodeURIComponent(
|
|
6724
6465
|
appId
|
|
6725
6466
|
)}/widgets/${encodeURIComponent(widgetId)}`,
|
|
6726
|
-
__spreadValues({},
|
|
6467
|
+
__spreadValues({}, getDpsClientConfig(authorization))
|
|
6727
6468
|
).catch((error) => {
|
|
6728
6469
|
throw error.withCustomMessage(
|
|
6729
6470
|
`${API_NOTIFICATIONS.BUILDING_BLOCKS.FAILURE.DELETED} [${error.message}]`
|
|
@@ -6755,9 +6496,9 @@ var platformDpsApplicationApi = {
|
|
|
6755
6496
|
getApp(appId, authorization) {
|
|
6756
6497
|
return __async(this, null, function* () {
|
|
6757
6498
|
try {
|
|
6758
|
-
const response = yield
|
|
6499
|
+
const response = yield dpsClientInstance.get(
|
|
6759
6500
|
`/v2/applications/${encodeURIComponent(appId)}`,
|
|
6760
|
-
|
|
6501
|
+
getDpsClientConfig(authorization)
|
|
6761
6502
|
);
|
|
6762
6503
|
return response.data;
|
|
6763
6504
|
} catch (error) {
|
|
@@ -6772,10 +6513,10 @@ var platformDpsApplicationApi = {
|
|
|
6772
6513
|
},
|
|
6773
6514
|
createApp(payload, authorization) {
|
|
6774
6515
|
return __async(this, null, function* () {
|
|
6775
|
-
return
|
|
6516
|
+
return dpsClientInstance.post(
|
|
6776
6517
|
`/v2/applications`,
|
|
6777
6518
|
payload,
|
|
6778
|
-
|
|
6519
|
+
getDpsClientConfig(authorization)
|
|
6779
6520
|
).then(({ data }) => data).catch((error) => {
|
|
6780
6521
|
throw error.withCustomMessage(
|
|
6781
6522
|
`App couldn't be created. [${error.message}]`
|
|
@@ -6785,10 +6526,10 @@ var platformDpsApplicationApi = {
|
|
|
6785
6526
|
},
|
|
6786
6527
|
fork(appId, authorization) {
|
|
6787
6528
|
return __async(this, null, function* () {
|
|
6788
|
-
return
|
|
6529
|
+
return dpsClientInstance.post(
|
|
6789
6530
|
`/v2/applications/${encodeURIComponent(appId)}/fork`,
|
|
6790
6531
|
{},
|
|
6791
|
-
|
|
6532
|
+
getDpsClientConfig(authorization)
|
|
6792
6533
|
).catch((error) => {
|
|
6793
6534
|
throw error.withCustomMessage(
|
|
6794
6535
|
`App couldn't be forked. [${error.message}]`
|
|
@@ -6798,10 +6539,10 @@ var platformDpsApplicationApi = {
|
|
|
6798
6539
|
},
|
|
6799
6540
|
publish(appId, authorization) {
|
|
6800
6541
|
return __async(this, null, function* () {
|
|
6801
|
-
return
|
|
6542
|
+
return dpsClientInstance.put(
|
|
6802
6543
|
`/v2/applications/${encodeURIComponent(appId)}/publish`,
|
|
6803
6544
|
{},
|
|
6804
|
-
|
|
6545
|
+
getDpsClientConfig(authorization)
|
|
6805
6546
|
).catch((error) => {
|
|
6806
6547
|
throw error.withCustomMessage(
|
|
6807
6548
|
`App couldn't be published. [${error.message}]`
|
|
@@ -6811,7 +6552,7 @@ var platformDpsApplicationApi = {
|
|
|
6811
6552
|
},
|
|
6812
6553
|
updateQL(appId) {
|
|
6813
6554
|
return __async(this, null, function* () {
|
|
6814
|
-
yield
|
|
6555
|
+
yield dpsClientInstance.patch(`/v2/applications/${encodeURIComponent(appId)}/qualified-lead`).catch((error) => {
|
|
6815
6556
|
throw error.withCustomMessage(
|
|
6816
6557
|
`QL couldn't be updated. [${error.message}]`
|
|
6817
6558
|
);
|
|
@@ -6820,9 +6561,9 @@ var platformDpsApplicationApi = {
|
|
|
6820
6561
|
},
|
|
6821
6562
|
deleteApp(appId, authorization) {
|
|
6822
6563
|
return __async(this, null, function* () {
|
|
6823
|
-
yield
|
|
6564
|
+
yield dpsClientInstance.delete(
|
|
6824
6565
|
`/v2/applications/${encodeURIComponent(appId)}`,
|
|
6825
|
-
|
|
6566
|
+
getDpsClientConfig(authorization)
|
|
6826
6567
|
).catch((error) => {
|
|
6827
6568
|
throw error.withCustomMessage(
|
|
6828
6569
|
`App couldn't be deleted. [${error.message}]`
|
|
@@ -6832,7 +6573,7 @@ var platformDpsApplicationApi = {
|
|
|
6832
6573
|
},
|
|
6833
6574
|
createAiContent(appId, appName, appSummary) {
|
|
6834
6575
|
return __async(this, null, function* () {
|
|
6835
|
-
return
|
|
6576
|
+
return dpsClientInstance.post(`/v2/ai/application/${encodeURIComponent(appId)}/content`, {
|
|
6836
6577
|
name: appName,
|
|
6837
6578
|
summary: appSummary
|
|
6838
6579
|
}).catch((error) => {
|
|
@@ -6852,9 +6593,9 @@ var platformDpsApplicationsPurchasesApi = {
|
|
|
6852
6593
|
const { from, to, duration } = options;
|
|
6853
6594
|
const response = apps.map((app) => __async(this, null, function* () {
|
|
6854
6595
|
const params = `applications=${app.clientId}${from ? `&from=${from}` : ""}${to ? `&to=${to}` : ""}&duration=${duration}&by=supplier`;
|
|
6855
|
-
const singleResponse = yield
|
|
6596
|
+
const singleResponse = yield dpsClientInstance.get(
|
|
6856
6597
|
`/v2/applications/purchases?${params}`,
|
|
6857
|
-
|
|
6598
|
+
getDpsClientConfig(authorization)
|
|
6858
6599
|
);
|
|
6859
6600
|
return {
|
|
6860
6601
|
appId: app.appId,
|
|
@@ -6877,9 +6618,9 @@ var platformDpsApplicationsPurchasesApi = {
|
|
|
6877
6618
|
const { from, to, duration } = options;
|
|
6878
6619
|
const clientIds = apps.map((app) => app.clientId);
|
|
6879
6620
|
const params = `applications=${clientIds.join(",")}${from ? `&from=${from}` : ""}${to ? `&to=${to}` : ""}&duration=${duration}&by=supplier`;
|
|
6880
|
-
return
|
|
6621
|
+
return dpsClientInstance.get(
|
|
6881
6622
|
`/v2/applications/purchases?${params}`,
|
|
6882
|
-
|
|
6623
|
+
getDpsClientConfig(authorization)
|
|
6883
6624
|
).then(({ data }) => {
|
|
6884
6625
|
return [{ data, appId: "All apps" }];
|
|
6885
6626
|
}).catch((error) => {
|
|
@@ -6893,9 +6634,9 @@ var platformDpsApplicationsPurchasesApi = {
|
|
|
6893
6634
|
return __async(this, null, function* () {
|
|
6894
6635
|
const { from, to, duration } = options;
|
|
6895
6636
|
const params = `applications=${apps.join(",")}${from ? `&from=${from}` : ""}${to ? `&to=${to}` : ""}&duration=${duration}`;
|
|
6896
|
-
return
|
|
6637
|
+
return dpsClientInstance.get(
|
|
6897
6638
|
`/v2/applications/purchases/history?${params}`,
|
|
6898
|
-
|
|
6639
|
+
getDpsClientConfig(authorization)
|
|
6899
6640
|
).then(({ data }) => {
|
|
6900
6641
|
return [{ data, appId: "All apps" }];
|
|
6901
6642
|
}).catch((error) => {
|
|
@@ -6919,9 +6660,9 @@ var platformDpsApplicationsUsageApi = {
|
|
|
6919
6660
|
params += duration ? `&duration=${duration}` : "";
|
|
6920
6661
|
params += from ? `&from=${from}` : "";
|
|
6921
6662
|
params += to ? `&to=${to}` : "";
|
|
6922
|
-
const singleResponse = yield
|
|
6663
|
+
const singleResponse = yield dpsClientInstance.get(
|
|
6923
6664
|
`/v2/applications/usage/organization?${params}`,
|
|
6924
|
-
|
|
6665
|
+
getDpsClientConfig(authorization)
|
|
6925
6666
|
);
|
|
6926
6667
|
return singleResponse.data;
|
|
6927
6668
|
}));
|
|
@@ -6944,7 +6685,7 @@ var platformDpsApplicationsApi = {
|
|
|
6944
6685
|
getApps() {
|
|
6945
6686
|
return __async(this, arguments, function* ({ filter = "licensed" } = {}) {
|
|
6946
6687
|
const params = `filter=${filter}`;
|
|
6947
|
-
return
|
|
6688
|
+
return dpsClientInstance.get(`/v2/applications?${params}`).then(({ data }) => data).catch((error) => {
|
|
6948
6689
|
throw error.withCustomMessage(
|
|
6949
6690
|
`Apps couldn't be fetched. [${error.message}]`
|
|
6950
6691
|
);
|
|
@@ -6956,7 +6697,7 @@ var platformDpsApplicationsApi = {
|
|
|
6956
6697
|
filter = "organization"
|
|
6957
6698
|
} = {}) {
|
|
6958
6699
|
const params = `filter=${filter}`;
|
|
6959
|
-
return
|
|
6700
|
+
return dpsClientInstance.get(`/v2/applications/installations/counters?${params}`).then(({ data }) => data).catch((error) => {
|
|
6960
6701
|
throw error.withCustomMessage(
|
|
6961
6702
|
`Apps installations couldn't be fetched. [${error.message}]`
|
|
6962
6703
|
);
|
|
@@ -6969,10 +6710,7 @@ var platformDpsApplicationsApi = {
|
|
|
6969
6710
|
var platformDpsCategoriesApi = {
|
|
6970
6711
|
getCategories(authorization) {
|
|
6971
6712
|
return __async(this, null, function* () {
|
|
6972
|
-
return
|
|
6973
|
-
`/v2/categories`,
|
|
6974
|
-
getPlatformDpsClientConfig(authorization)
|
|
6975
|
-
).then(({ data }) => data).catch((error) => {
|
|
6713
|
+
return dpsClientInstance.get(`/v2/categories`, getDpsClientConfig(authorization)).then(({ data }) => data).catch((error) => {
|
|
6976
6714
|
throw error.withCustomMessage(
|
|
6977
6715
|
`Categories couldn't be fetched. [${error.message}]`
|
|
6978
6716
|
);
|
|
@@ -6999,9 +6737,9 @@ var platformDpsDeveloperApi = {
|
|
|
6999
6737
|
params += `size=${size}&page=${page}`;
|
|
7000
6738
|
}
|
|
7001
6739
|
}
|
|
7002
|
-
return
|
|
6740
|
+
return dpsClientInstance.get(
|
|
7003
6741
|
`/v2/developers/${encodeURIComponent(userId)}/account/ledger${params}`,
|
|
7004
|
-
|
|
6742
|
+
getDpsClientConfig(authorization)
|
|
7005
6743
|
).then(({ data }) => data).catch((error) => {
|
|
7006
6744
|
throw error.withCustomMessage(
|
|
7007
6745
|
`Ledger couldn't be fetched. [${error.message}]`
|
|
@@ -7015,12 +6753,12 @@ var platformDpsDeveloperApi = {
|
|
|
7015
6753
|
note,
|
|
7016
6754
|
userId
|
|
7017
6755
|
}, authorization) {
|
|
7018
|
-
return
|
|
6756
|
+
return dpsClientInstance.patch(
|
|
7019
6757
|
`/v2/developers/${encodeURIComponent(
|
|
7020
6758
|
userId
|
|
7021
6759
|
)}/account/withdrawal/request`,
|
|
7022
6760
|
{ amount, note },
|
|
7023
|
-
|
|
6761
|
+
getDpsClientConfig(authorization)
|
|
7024
6762
|
).then(({ data }) => data).catch((error) => {
|
|
7025
6763
|
throw error.withCustomMessage(
|
|
7026
6764
|
`Withdrawal couldn't be requested. [${error.message}]`
|
|
@@ -7039,11 +6777,7 @@ var platformDpsDevelopersApi = {
|
|
|
7039
6777
|
var platformDpsLinksApi = {
|
|
7040
6778
|
updateShortcuts(links, authorization) {
|
|
7041
6779
|
return __async(this, null, function* () {
|
|
7042
|
-
yield
|
|
7043
|
-
`/v2/links`,
|
|
7044
|
-
links,
|
|
7045
|
-
getPlatformDpsClientConfig(authorization)
|
|
7046
|
-
).catch((error) => {
|
|
6780
|
+
yield dpsClientInstance.put(`/v2/links`, links, getDpsClientConfig(authorization)).catch((error) => {
|
|
7047
6781
|
throw error.withCustomMessage(
|
|
7048
6782
|
`Shortcuts couldn't be updated. [${error.message}]`
|
|
7049
6783
|
);
|
|
@@ -7056,9 +6790,9 @@ var platformDpsLinksApi = {
|
|
|
7056
6790
|
var dpsResearchCustomerApi = {
|
|
7057
6791
|
getResearchCustomersLicenses(authorization) {
|
|
7058
6792
|
return __async(this, null, function* () {
|
|
7059
|
-
return
|
|
6793
|
+
return dpsClientInstance.get(
|
|
7060
6794
|
`/v2/research/customers/licenses`,
|
|
7061
|
-
|
|
6795
|
+
getDpsClientConfig(authorization)
|
|
7062
6796
|
).then(({ data }) => data).catch((error) => {
|
|
7063
6797
|
throw error.withCustomMessage(
|
|
7064
6798
|
`We couldn't fetch the research toolkit data. [${error.message}]`
|
|
@@ -7068,9 +6802,9 @@ var dpsResearchCustomerApi = {
|
|
|
7068
6802
|
},
|
|
7069
6803
|
getResearchCustomersBusiness(authorization) {
|
|
7070
6804
|
return __async(this, null, function* () {
|
|
7071
|
-
return
|
|
6805
|
+
return dpsClientInstance.get(
|
|
7072
6806
|
`/v2/research/customers/business`,
|
|
7073
|
-
|
|
6807
|
+
getDpsClientConfig(authorization)
|
|
7074
6808
|
).then(({ data }) => data).catch((error) => {
|
|
7075
6809
|
throw error.withCustomMessage(
|
|
7076
6810
|
`We couldn't fetch the research toolkit data. [${error.message}]`
|
|
@@ -7080,9 +6814,9 @@ var dpsResearchCustomerApi = {
|
|
|
7080
6814
|
},
|
|
7081
6815
|
getResearchCustomersLocation(authorization) {
|
|
7082
6816
|
return __async(this, null, function* () {
|
|
7083
|
-
return
|
|
6817
|
+
return dpsClientInstance.get(
|
|
7084
6818
|
`/v2/research/customers/location`,
|
|
7085
|
-
|
|
6819
|
+
getDpsClientConfig(authorization)
|
|
7086
6820
|
).then(({ data }) => data).catch((error) => {
|
|
7087
6821
|
throw error.withCustomMessage(
|
|
7088
6822
|
`We couldn't fetch the research toolkit data. [${error.message}]`
|
|
@@ -7097,9 +6831,9 @@ var dpsResearchDictionaryApi = {
|
|
|
7097
6831
|
getResearchDictionary() {
|
|
7098
6832
|
return __async(this, arguments, function* (options = {}, authorization) {
|
|
7099
6833
|
const params = new URLSearchParams(options);
|
|
7100
|
-
return
|
|
6834
|
+
return dpsClientInstance.get(
|
|
7101
6835
|
`/v2/research/dictionary?${params.toString()}`,
|
|
7102
|
-
|
|
6836
|
+
getDpsClientConfig(authorization)
|
|
7103
6837
|
).then(({ data }) => data).catch((error) => {
|
|
7104
6838
|
throw error.withCustomMessage(
|
|
7105
6839
|
`We couldn't fetch the research toolkit data. [${error.message}]`
|
|
@@ -7114,9 +6848,9 @@ var dpsResearchMarketplaceApi = {
|
|
|
7114
6848
|
getResearchMarketplaceApps() {
|
|
7115
6849
|
return __async(this, arguments, function* (options = {}, authorization) {
|
|
7116
6850
|
const params = new URLSearchParams(options);
|
|
7117
|
-
return
|
|
6851
|
+
return dpsClientInstance.get(
|
|
7118
6852
|
`/v2/research/marketplace/apps?${params.toString()}`,
|
|
7119
|
-
|
|
6853
|
+
getDpsClientConfig(authorization)
|
|
7120
6854
|
).then(({ data }) => data).catch((error) => {
|
|
7121
6855
|
throw error.withCustomMessage(
|
|
7122
6856
|
`We couldn't fetch the research toolkit data. [${error.message}]`
|
|
@@ -7127,9 +6861,9 @@ var dpsResearchMarketplaceApi = {
|
|
|
7127
6861
|
getResearchMarketplaceViews() {
|
|
7128
6862
|
return __async(this, arguments, function* (options = {}, authorization) {
|
|
7129
6863
|
const params = new URLSearchParams(options);
|
|
7130
|
-
return
|
|
6864
|
+
return dpsClientInstance.get(
|
|
7131
6865
|
`/v2/research/marketplace/views?${params.toString()}`,
|
|
7132
|
-
|
|
6866
|
+
getDpsClientConfig(authorization)
|
|
7133
6867
|
).then(({ data }) => data).catch((error) => {
|
|
7134
6868
|
throw error.withCustomMessage(
|
|
7135
6869
|
`We couldn't fetch the research toolkit data. [${error.message}]`
|
|
@@ -7144,9 +6878,9 @@ var dpsResearchTrafficApi = {
|
|
|
7144
6878
|
getResearchTrafficAgents() {
|
|
7145
6879
|
return __async(this, arguments, function* (options = {}, authorization) {
|
|
7146
6880
|
const params = new URLSearchParams(options);
|
|
7147
|
-
return
|
|
6881
|
+
return dpsClientInstance.get(
|
|
7148
6882
|
`/v2/research/traffic/agents?${params.toString()}`,
|
|
7149
|
-
|
|
6883
|
+
getDpsClientConfig(authorization)
|
|
7150
6884
|
).then(({ data }) => data).catch((error) => {
|
|
7151
6885
|
throw error.withCustomMessage(
|
|
7152
6886
|
`We couldn't fetch the research toolkit data. [${error.message}]`
|
|
@@ -7157,9 +6891,9 @@ var dpsResearchTrafficApi = {
|
|
|
7157
6891
|
getResearchTrafficChats() {
|
|
7158
6892
|
return __async(this, arguments, function* (options = {}, authorization) {
|
|
7159
6893
|
const params = new URLSearchParams(options);
|
|
7160
|
-
return
|
|
6894
|
+
return dpsClientInstance.get(
|
|
7161
6895
|
`/v2/research/traffic/chats?${params.toString()}`,
|
|
7162
|
-
|
|
6896
|
+
getDpsClientConfig(authorization)
|
|
7163
6897
|
).then(({ data }) => data).catch((error) => {
|
|
7164
6898
|
throw error.withCustomMessage(
|
|
7165
6899
|
`We couldn't fetch the research toolkit data. [${error.message}]`
|
|
@@ -7181,62 +6915,62 @@ var platformDpsResearchApi = {
|
|
|
7181
6915
|
var platformDpsUserApi = {
|
|
7182
6916
|
getUser(authorization) {
|
|
7183
6917
|
return __async(this, null, function* () {
|
|
7184
|
-
const response = yield
|
|
6918
|
+
const response = yield dpsClientInstance.get(
|
|
7185
6919
|
`/v2/me`,
|
|
7186
|
-
|
|
6920
|
+
getDpsClientConfig(authorization)
|
|
7187
6921
|
);
|
|
7188
6922
|
return response.data;
|
|
7189
6923
|
});
|
|
7190
6924
|
},
|
|
7191
6925
|
getUserIntegrations(authorization) {
|
|
7192
6926
|
return __async(this, null, function* () {
|
|
7193
|
-
const response = yield
|
|
6927
|
+
const response = yield dpsClientInstance.get(
|
|
7194
6928
|
`/v2/me/integrations`,
|
|
7195
|
-
|
|
6929
|
+
getDpsClientConfig(authorization)
|
|
7196
6930
|
);
|
|
7197
6931
|
return response.data;
|
|
7198
6932
|
});
|
|
7199
6933
|
},
|
|
7200
6934
|
updateUser(user, authorization) {
|
|
7201
6935
|
return __async(this, null, function* () {
|
|
7202
|
-
const { status } = yield
|
|
6936
|
+
const { status } = yield dpsClientInstance.put(
|
|
7203
6937
|
`/v2/me`,
|
|
7204
6938
|
user,
|
|
7205
|
-
|
|
6939
|
+
getDpsClientConfig(authorization)
|
|
7206
6940
|
);
|
|
7207
6941
|
return status;
|
|
7208
6942
|
});
|
|
7209
6943
|
},
|
|
7210
6944
|
updateUserIntegrations(payload, authorization) {
|
|
7211
6945
|
return __async(this, null, function* () {
|
|
7212
|
-
yield
|
|
6946
|
+
yield dpsClientInstance.patch(
|
|
7213
6947
|
`/v2/me/integrations`,
|
|
7214
6948
|
payload,
|
|
7215
|
-
|
|
6949
|
+
getDpsClientConfig(authorization)
|
|
7216
6950
|
);
|
|
7217
6951
|
});
|
|
7218
6952
|
},
|
|
7219
6953
|
updateUserFeatures(payload, authorization) {
|
|
7220
6954
|
return __async(this, null, function* () {
|
|
7221
|
-
yield
|
|
6955
|
+
yield dpsClientInstance.put(
|
|
7222
6956
|
"/v2/features",
|
|
7223
6957
|
payload,
|
|
7224
|
-
|
|
6958
|
+
getDpsClientConfig(authorization)
|
|
7225
6959
|
);
|
|
7226
6960
|
});
|
|
7227
6961
|
},
|
|
7228
6962
|
updateUserSurvey(payload, authorization) {
|
|
7229
6963
|
return __async(this, null, function* () {
|
|
7230
|
-
yield
|
|
6964
|
+
yield dpsClientInstance.post(
|
|
7231
6965
|
"/v2/survey",
|
|
7232
6966
|
payload,
|
|
7233
|
-
|
|
6967
|
+
getDpsClientConfig(authorization)
|
|
7234
6968
|
);
|
|
7235
6969
|
});
|
|
7236
6970
|
},
|
|
7237
6971
|
removeUserGitHubIntegrationByInstallationId(installationId, authorization) {
|
|
7238
6972
|
return __async(this, null, function* () {
|
|
7239
|
-
yield
|
|
6973
|
+
yield dpsClientInstance.delete(`/v2/me/integrations/github`, __spreadProps(__spreadValues({}, getDpsClientConfig(authorization)), {
|
|
7240
6974
|
data: {
|
|
7241
6975
|
githubInstallationId: installationId
|
|
7242
6976
|
}
|
|
@@ -7245,17 +6979,17 @@ var platformDpsUserApi = {
|
|
|
7245
6979
|
},
|
|
7246
6980
|
updateUserNetlifyIntegration(userNetlifyIntegration, authorization) {
|
|
7247
6981
|
return __async(this, null, function* () {
|
|
7248
|
-
const { status } = yield
|
|
6982
|
+
const { status } = yield dpsClientInstance.patch(
|
|
7249
6983
|
`/v2/me/integrations`,
|
|
7250
6984
|
{ netlify: userNetlifyIntegration },
|
|
7251
|
-
|
|
6985
|
+
getDpsClientConfig(authorization)
|
|
7252
6986
|
);
|
|
7253
6987
|
return status;
|
|
7254
6988
|
});
|
|
7255
6989
|
},
|
|
7256
6990
|
register(authorization) {
|
|
7257
6991
|
return __async(this, null, function* () {
|
|
7258
|
-
return
|
|
6992
|
+
return dpsClientInstance.post("/v2/register", void 0, getDpsClientConfig(authorization));
|
|
7259
6993
|
});
|
|
7260
6994
|
}
|
|
7261
6995
|
};
|
|
@@ -7274,35 +7008,35 @@ var platformDpsApi = {
|
|
|
7274
7008
|
var platformAdapterAppAuthorizationApi = {
|
|
7275
7009
|
get(appId, authorization) {
|
|
7276
7010
|
return __async(this, null, function* () {
|
|
7277
|
-
return
|
|
7011
|
+
return adapterClientInstance.get(
|
|
7278
7012
|
`/console/app/${encodeURIComponent(appId)}/blocks/authorization`,
|
|
7279
|
-
|
|
7013
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7280
7014
|
);
|
|
7281
7015
|
});
|
|
7282
7016
|
},
|
|
7283
7017
|
add(payload, authorization) {
|
|
7284
7018
|
return __async(this, null, function* () {
|
|
7285
|
-
return
|
|
7019
|
+
return adapterClientInstance.post(
|
|
7286
7020
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/authorization`,
|
|
7287
7021
|
payload,
|
|
7288
|
-
|
|
7022
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7289
7023
|
);
|
|
7290
7024
|
});
|
|
7291
7025
|
},
|
|
7292
7026
|
update(payload, authorization) {
|
|
7293
7027
|
return __async(this, null, function* () {
|
|
7294
|
-
return
|
|
7028
|
+
return adapterClientInstance.put(
|
|
7295
7029
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/authorization`,
|
|
7296
7030
|
payload,
|
|
7297
|
-
|
|
7031
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7298
7032
|
);
|
|
7299
7033
|
});
|
|
7300
7034
|
},
|
|
7301
7035
|
remove(payload, authorization) {
|
|
7302
7036
|
return __async(this, null, function* () {
|
|
7303
|
-
return
|
|
7037
|
+
return adapterClientInstance.delete(
|
|
7304
7038
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/authorization`,
|
|
7305
|
-
|
|
7039
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7306
7040
|
);
|
|
7307
7041
|
});
|
|
7308
7042
|
}
|
|
@@ -7312,47 +7046,47 @@ var platformAdapterAppAuthorizationApi = {
|
|
|
7312
7046
|
var platformAdapterAppDeploymentApi = {
|
|
7313
7047
|
getAggregate(appId, authorization) {
|
|
7314
7048
|
return __async(this, null, function* () {
|
|
7315
|
-
return
|
|
7049
|
+
return adapterClientInstance.get(
|
|
7316
7050
|
`/console/app/${encodeURIComponent(appId)}/blocks/deployment/aggregate`,
|
|
7317
|
-
|
|
7051
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7318
7052
|
);
|
|
7319
7053
|
});
|
|
7320
7054
|
},
|
|
7321
7055
|
get(appId, authorization) {
|
|
7322
7056
|
return __async(this, null, function* () {
|
|
7323
|
-
return
|
|
7057
|
+
return adapterClientInstance.get(
|
|
7324
7058
|
`/console/app/${encodeURIComponent(appId)}/blocks/deployment`,
|
|
7325
|
-
|
|
7059
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7326
7060
|
);
|
|
7327
7061
|
});
|
|
7328
7062
|
},
|
|
7329
7063
|
link(payload, authorization) {
|
|
7330
7064
|
return __async(this, null, function* () {
|
|
7331
|
-
return
|
|
7065
|
+
return adapterClientInstance.put(
|
|
7332
7066
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/deployment`,
|
|
7333
7067
|
payload,
|
|
7334
|
-
|
|
7068
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7335
7069
|
);
|
|
7336
7070
|
});
|
|
7337
7071
|
},
|
|
7338
7072
|
unlink(payload, authorization) {
|
|
7339
7073
|
return __async(this, null, function* () {
|
|
7340
|
-
return
|
|
7074
|
+
return adapterClientInstance.delete(
|
|
7341
7075
|
`/console/app/${encodeURIComponent(
|
|
7342
7076
|
payload.appId
|
|
7343
7077
|
)}/blocks/deployment?${new URLSearchParams(
|
|
7344
7078
|
payload
|
|
7345
7079
|
).toString()}`,
|
|
7346
|
-
|
|
7080
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7347
7081
|
);
|
|
7348
7082
|
});
|
|
7349
7083
|
},
|
|
7350
7084
|
upsert(payload, authorization) {
|
|
7351
7085
|
return __async(this, null, function* () {
|
|
7352
|
-
return
|
|
7086
|
+
return adapterClientInstance.patch(
|
|
7353
7087
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/deployment`,
|
|
7354
7088
|
payload,
|
|
7355
|
-
|
|
7089
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7356
7090
|
);
|
|
7357
7091
|
});
|
|
7358
7092
|
}
|
|
@@ -7362,26 +7096,26 @@ var platformAdapterAppDeploymentApi = {
|
|
|
7362
7096
|
var platformAdapterAppMonetizationApi = {
|
|
7363
7097
|
get(appId, authorization) {
|
|
7364
7098
|
return __async(this, null, function* () {
|
|
7365
|
-
return
|
|
7099
|
+
return adapterClientInstance.get(
|
|
7366
7100
|
`/console/app/${encodeURIComponent(appId)}/blocks/monetization`,
|
|
7367
|
-
|
|
7101
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7368
7102
|
);
|
|
7369
7103
|
});
|
|
7370
7104
|
},
|
|
7371
7105
|
upsert(payload, authorization) {
|
|
7372
7106
|
return __async(this, null, function* () {
|
|
7373
|
-
return
|
|
7107
|
+
return adapterClientInstance.post(
|
|
7374
7108
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/monetization`,
|
|
7375
7109
|
payload,
|
|
7376
|
-
|
|
7110
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7377
7111
|
);
|
|
7378
7112
|
});
|
|
7379
7113
|
},
|
|
7380
7114
|
remove(payload, authorization) {
|
|
7381
7115
|
return __async(this, null, function* () {
|
|
7382
|
-
return
|
|
7116
|
+
return adapterClientInstance.delete(
|
|
7383
7117
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/monetization`,
|
|
7384
|
-
|
|
7118
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7385
7119
|
);
|
|
7386
7120
|
});
|
|
7387
7121
|
}
|
|
@@ -7391,30 +7125,30 @@ var platformAdapterAppMonetizationApi = {
|
|
|
7391
7125
|
var platformAdapterAppPropertyApi = {
|
|
7392
7126
|
get(appId, propertyId, authorization) {
|
|
7393
7127
|
return __async(this, null, function* () {
|
|
7394
|
-
return
|
|
7128
|
+
return adapterClientInstance.get(
|
|
7395
7129
|
`/console/app/${encodeURIComponent(
|
|
7396
7130
|
appId
|
|
7397
7131
|
)}/blocks/properties/${encodeURIComponent(propertyId)}`,
|
|
7398
|
-
|
|
7132
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7399
7133
|
);
|
|
7400
7134
|
});
|
|
7401
7135
|
},
|
|
7402
7136
|
upsert(payload, authorization) {
|
|
7403
7137
|
return __async(this, null, function* () {
|
|
7404
|
-
return
|
|
7138
|
+
return adapterClientInstance.post(
|
|
7405
7139
|
`/console/app/${encodeURIComponent(
|
|
7406
7140
|
payload.appId
|
|
7407
7141
|
)}/blocks/properties/${encodeURIComponent(payload.propertyId)}`,
|
|
7408
7142
|
payload,
|
|
7409
|
-
|
|
7143
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7410
7144
|
);
|
|
7411
7145
|
});
|
|
7412
7146
|
},
|
|
7413
7147
|
remove(payload, authorization) {
|
|
7414
7148
|
return __async(this, null, function* () {
|
|
7415
|
-
return
|
|
7149
|
+
return adapterClientInstance.delete(
|
|
7416
7150
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/properties/${payload.propertyId}`,
|
|
7417
|
-
|
|
7151
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7418
7152
|
);
|
|
7419
7153
|
});
|
|
7420
7154
|
}
|
|
@@ -7425,26 +7159,26 @@ var platformAdapterAppPropertiesApi = {
|
|
|
7425
7159
|
property: platformAdapterAppPropertyApi,
|
|
7426
7160
|
get(appId, authorization) {
|
|
7427
7161
|
return __async(this, null, function* () {
|
|
7428
|
-
return
|
|
7162
|
+
return adapterClientInstance.get(
|
|
7429
7163
|
`/console/app/${encodeURIComponent(appId)}/blocks/properties`,
|
|
7430
|
-
|
|
7164
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7431
7165
|
);
|
|
7432
7166
|
});
|
|
7433
7167
|
},
|
|
7434
7168
|
upsert(payload, authorization) {
|
|
7435
7169
|
return __async(this, null, function* () {
|
|
7436
|
-
return
|
|
7170
|
+
return adapterClientInstance.post(
|
|
7437
7171
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/properties`,
|
|
7438
7172
|
payload,
|
|
7439
|
-
|
|
7173
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7440
7174
|
);
|
|
7441
7175
|
});
|
|
7442
7176
|
},
|
|
7443
7177
|
remove(payload, authorization) {
|
|
7444
7178
|
return __async(this, null, function* () {
|
|
7445
|
-
return
|
|
7179
|
+
return adapterClientInstance.delete(
|
|
7446
7180
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/properties`,
|
|
7447
|
-
|
|
7181
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7448
7182
|
);
|
|
7449
7183
|
});
|
|
7450
7184
|
}
|
|
@@ -7454,58 +7188,58 @@ var platformAdapterAppPropertiesApi = {
|
|
|
7454
7188
|
var platformAdapterAppRepositoryApi = {
|
|
7455
7189
|
getAggregate(appId, authorization) {
|
|
7456
7190
|
return __async(this, null, function* () {
|
|
7457
|
-
return
|
|
7191
|
+
return adapterClientInstance.get(
|
|
7458
7192
|
`/console/app/${encodeURIComponent(appId)}/blocks/repository/aggregate`,
|
|
7459
|
-
|
|
7193
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7460
7194
|
);
|
|
7461
7195
|
});
|
|
7462
7196
|
},
|
|
7463
7197
|
get(appId, authorization) {
|
|
7464
7198
|
return __async(this, null, function* () {
|
|
7465
|
-
return
|
|
7199
|
+
return adapterClientInstance.get(
|
|
7466
7200
|
`/console/app/${encodeURIComponent(appId)}/blocks/repository`,
|
|
7467
|
-
|
|
7201
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7468
7202
|
);
|
|
7469
7203
|
});
|
|
7470
7204
|
},
|
|
7471
7205
|
link(payload, authorization) {
|
|
7472
7206
|
return __async(this, null, function* () {
|
|
7473
|
-
return
|
|
7207
|
+
return adapterClientInstance.put(
|
|
7474
7208
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/repository`,
|
|
7475
7209
|
payload,
|
|
7476
|
-
|
|
7210
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7477
7211
|
);
|
|
7478
7212
|
});
|
|
7479
7213
|
},
|
|
7480
7214
|
unlink(payload, authorization) {
|
|
7481
7215
|
return __async(this, null, function* () {
|
|
7482
|
-
return
|
|
7216
|
+
return adapterClientInstance.delete(
|
|
7483
7217
|
`/console/app/${encodeURIComponent(
|
|
7484
7218
|
payload.appId
|
|
7485
7219
|
)}/blocks/repository?${new URLSearchParams(
|
|
7486
7220
|
payload
|
|
7487
7221
|
).toString()}`,
|
|
7488
|
-
|
|
7222
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7489
7223
|
);
|
|
7490
7224
|
});
|
|
7491
7225
|
},
|
|
7492
7226
|
upsert(payload, authorization) {
|
|
7493
7227
|
return __async(this, null, function* () {
|
|
7494
|
-
return
|
|
7228
|
+
return adapterClientInstance.patch(
|
|
7495
7229
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/repository`,
|
|
7496
7230
|
payload,
|
|
7497
|
-
|
|
7231
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7498
7232
|
);
|
|
7499
7233
|
});
|
|
7500
7234
|
},
|
|
7501
7235
|
seed(payload, authorization) {
|
|
7502
7236
|
return __async(this, null, function* () {
|
|
7503
|
-
return
|
|
7237
|
+
return adapterClientInstance.post(
|
|
7504
7238
|
`/console/app/${encodeURIComponent(
|
|
7505
7239
|
payload.appId
|
|
7506
7240
|
)}/blocks/repository/seed`,
|
|
7507
7241
|
payload,
|
|
7508
|
-
|
|
7242
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7509
7243
|
);
|
|
7510
7244
|
});
|
|
7511
7245
|
}
|
|
@@ -7515,47 +7249,47 @@ var platformAdapterAppRepositoryApi = {
|
|
|
7515
7249
|
var platformAdapterAppStorageApi = {
|
|
7516
7250
|
getAggregate(appId, authorization) {
|
|
7517
7251
|
return __async(this, null, function* () {
|
|
7518
|
-
return
|
|
7252
|
+
return adapterClientInstance.get(
|
|
7519
7253
|
`/console/app/${encodeURIComponent(appId)}/blocks/storage/aggregate`,
|
|
7520
|
-
|
|
7254
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7521
7255
|
);
|
|
7522
7256
|
});
|
|
7523
7257
|
},
|
|
7524
7258
|
get(appId, authorization) {
|
|
7525
7259
|
return __async(this, null, function* () {
|
|
7526
|
-
return
|
|
7260
|
+
return adapterClientInstance.get(
|
|
7527
7261
|
`/console/app/${encodeURIComponent(appId)}/blocks/storage`,
|
|
7528
|
-
|
|
7262
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7529
7263
|
);
|
|
7530
7264
|
});
|
|
7531
7265
|
},
|
|
7532
7266
|
link(payload, authorization) {
|
|
7533
7267
|
return __async(this, null, function* () {
|
|
7534
|
-
return
|
|
7268
|
+
return adapterClientInstance.put(
|
|
7535
7269
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/storage`,
|
|
7536
7270
|
payload,
|
|
7537
|
-
|
|
7271
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7538
7272
|
);
|
|
7539
7273
|
});
|
|
7540
7274
|
},
|
|
7541
7275
|
unlink(payload, authorization) {
|
|
7542
7276
|
return __async(this, null, function* () {
|
|
7543
|
-
return
|
|
7277
|
+
return adapterClientInstance.delete(
|
|
7544
7278
|
`/console/app/${encodeURIComponent(
|
|
7545
7279
|
payload.appId
|
|
7546
7280
|
)}/blocks/storage?${new URLSearchParams(
|
|
7547
7281
|
payload
|
|
7548
7282
|
).toString()}`,
|
|
7549
|
-
|
|
7283
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7550
7284
|
);
|
|
7551
7285
|
});
|
|
7552
7286
|
},
|
|
7553
7287
|
upsert(payload, authorization) {
|
|
7554
7288
|
return __async(this, null, function* () {
|
|
7555
|
-
return
|
|
7289
|
+
return adapterClientInstance.patch(
|
|
7556
7290
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/storage`,
|
|
7557
7291
|
payload,
|
|
7558
|
-
|
|
7292
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7559
7293
|
);
|
|
7560
7294
|
});
|
|
7561
7295
|
}
|
|
@@ -7565,32 +7299,32 @@ var platformAdapterAppStorageApi = {
|
|
|
7565
7299
|
var platformAdapterAppWidgetApi = {
|
|
7566
7300
|
get(appId, widgetId, authorization) {
|
|
7567
7301
|
return __async(this, null, function* () {
|
|
7568
|
-
return
|
|
7302
|
+
return adapterClientInstance.get(
|
|
7569
7303
|
`/console/app/${encodeURIComponent(
|
|
7570
7304
|
appId
|
|
7571
7305
|
)}/blocks/widgets/${encodeURIComponent(widgetId)}`,
|
|
7572
|
-
|
|
7306
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7573
7307
|
);
|
|
7574
7308
|
});
|
|
7575
7309
|
},
|
|
7576
7310
|
upsert(payload, authorization) {
|
|
7577
7311
|
return __async(this, null, function* () {
|
|
7578
|
-
return
|
|
7312
|
+
return adapterClientInstance.post(
|
|
7579
7313
|
`/console/app/${encodeURIComponent(
|
|
7580
7314
|
payload.appId
|
|
7581
7315
|
)}/blocks/widgets/${encodeURIComponent(payload.widgetId)}`,
|
|
7582
7316
|
payload,
|
|
7583
|
-
|
|
7317
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7584
7318
|
);
|
|
7585
7319
|
});
|
|
7586
7320
|
},
|
|
7587
7321
|
remove(payload, authorization) {
|
|
7588
7322
|
return __async(this, null, function* () {
|
|
7589
|
-
return
|
|
7323
|
+
return adapterClientInstance.delete(
|
|
7590
7324
|
`/console/app/${encodeURIComponent(
|
|
7591
7325
|
payload.appId
|
|
7592
7326
|
)}/blocks/widgets/${encodeURIComponent(payload.widgetId)}`,
|
|
7593
|
-
|
|
7327
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7594
7328
|
);
|
|
7595
7329
|
});
|
|
7596
7330
|
}
|
|
@@ -7601,26 +7335,26 @@ var platformAdapterAppWidgetsApi = {
|
|
|
7601
7335
|
widget: platformAdapterAppWidgetApi,
|
|
7602
7336
|
get(appId, authorization) {
|
|
7603
7337
|
return __async(this, null, function* () {
|
|
7604
|
-
return
|
|
7338
|
+
return adapterClientInstance.get(
|
|
7605
7339
|
`/console/app/${encodeURIComponent(appId)}/blocks/widgets`,
|
|
7606
|
-
|
|
7340
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7607
7341
|
);
|
|
7608
7342
|
});
|
|
7609
7343
|
},
|
|
7610
7344
|
upsert(payload, authorization) {
|
|
7611
7345
|
return __async(this, null, function* () {
|
|
7612
|
-
return
|
|
7346
|
+
return adapterClientInstance.post(
|
|
7613
7347
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/widgets`,
|
|
7614
7348
|
payload,
|
|
7615
|
-
|
|
7349
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7616
7350
|
);
|
|
7617
7351
|
});
|
|
7618
7352
|
},
|
|
7619
7353
|
remove(payload, authorization) {
|
|
7620
7354
|
return __async(this, null, function* () {
|
|
7621
|
-
return
|
|
7355
|
+
return adapterClientInstance.delete(
|
|
7622
7356
|
`/console/app/${encodeURIComponent(payload.appId)}/blocks/widgets`,
|
|
7623
|
-
|
|
7357
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7624
7358
|
);
|
|
7625
7359
|
});
|
|
7626
7360
|
}
|
|
@@ -7641,64 +7375,64 @@ var platformAdapterAppBlocksApi = {
|
|
|
7641
7375
|
var platformAdapterAppVariablesApi = {
|
|
7642
7376
|
getVariables(appId, decrypted, authorization) {
|
|
7643
7377
|
return __async(this, null, function* () {
|
|
7644
|
-
const response = yield
|
|
7378
|
+
const response = yield adapterClientInstance.get(
|
|
7645
7379
|
`/console/app/${encodeURIComponent(appId)}/variables`,
|
|
7646
7380
|
__spreadValues({
|
|
7647
7381
|
params: {
|
|
7648
7382
|
decrypted
|
|
7649
7383
|
}
|
|
7650
|
-
},
|
|
7384
|
+
}, getAdapterClientDefaultConfig(authorization))
|
|
7651
7385
|
);
|
|
7652
7386
|
return response.data;
|
|
7653
7387
|
});
|
|
7654
7388
|
},
|
|
7655
7389
|
getVariable(appId, key, authorization) {
|
|
7656
7390
|
return __async(this, null, function* () {
|
|
7657
|
-
const response = yield
|
|
7391
|
+
const response = yield adapterClientInstance.get(
|
|
7658
7392
|
`/console/app/${encodeURIComponent(appId)}/variables/${encodeURIComponent(
|
|
7659
7393
|
key
|
|
7660
7394
|
)}`,
|
|
7661
|
-
|
|
7395
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7662
7396
|
);
|
|
7663
7397
|
return response.data;
|
|
7664
7398
|
});
|
|
7665
7399
|
},
|
|
7666
7400
|
syncVariable(appId, key, payload, authorization) {
|
|
7667
7401
|
return __async(this, null, function* () {
|
|
7668
|
-
yield
|
|
7402
|
+
yield adapterClientInstance.post(
|
|
7669
7403
|
`/console/app/${encodeURIComponent(appId)}/variables/${encodeURIComponent(
|
|
7670
7404
|
key
|
|
7671
7405
|
)}/sync`,
|
|
7672
7406
|
payload,
|
|
7673
|
-
|
|
7407
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7674
7408
|
);
|
|
7675
7409
|
});
|
|
7676
7410
|
},
|
|
7677
7411
|
createVariable(appId, data, authorization) {
|
|
7678
7412
|
return __async(this, null, function* () {
|
|
7679
|
-
yield
|
|
7413
|
+
yield adapterClientInstance.post(
|
|
7680
7414
|
`/console/app/${encodeURIComponent(appId)}/variables/${encodeURIComponent(
|
|
7681
7415
|
data.key
|
|
7682
7416
|
)}`,
|
|
7683
7417
|
data,
|
|
7684
|
-
|
|
7418
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7685
7419
|
);
|
|
7686
7420
|
});
|
|
7687
7421
|
},
|
|
7688
7422
|
editVariable(appId, data, authorization) {
|
|
7689
7423
|
return __async(this, null, function* () {
|
|
7690
|
-
yield
|
|
7424
|
+
yield adapterClientInstance.post(
|
|
7691
7425
|
`/console/app/${encodeURIComponent(appId)}/variables/${encodeURIComponent(
|
|
7692
7426
|
data.key
|
|
7693
7427
|
)}/edit`,
|
|
7694
7428
|
data,
|
|
7695
|
-
|
|
7429
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7696
7430
|
);
|
|
7697
7431
|
});
|
|
7698
7432
|
},
|
|
7699
7433
|
deleteVariable(appId, key) {
|
|
7700
7434
|
return __async(this, null, function* () {
|
|
7701
|
-
yield
|
|
7435
|
+
yield adapterClientInstance.delete(
|
|
7702
7436
|
`/console/app/${encodeURIComponent(appId)}/variables/${encodeURIComponent(
|
|
7703
7437
|
key
|
|
7704
7438
|
)}`
|
|
@@ -7711,17 +7445,17 @@ var platformAdapterAppVariablesApi = {
|
|
|
7711
7445
|
var platformAdapterAppTemplatesApi = {
|
|
7712
7446
|
getTemplates(authorization) {
|
|
7713
7447
|
return __async(this, null, function* () {
|
|
7714
|
-
return
|
|
7448
|
+
return adapterClientInstance.get(
|
|
7715
7449
|
`/console/app/templates`,
|
|
7716
|
-
|
|
7450
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7717
7451
|
);
|
|
7718
7452
|
});
|
|
7719
7453
|
},
|
|
7720
7454
|
getRepositoryTemplates(authorization) {
|
|
7721
7455
|
return __async(this, null, function* () {
|
|
7722
|
-
return
|
|
7456
|
+
return adapterClientInstance.get(
|
|
7723
7457
|
`/console/app/templates/repository`,
|
|
7724
|
-
|
|
7458
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7725
7459
|
);
|
|
7726
7460
|
});
|
|
7727
7461
|
}
|
|
@@ -7734,39 +7468,39 @@ var platformAdapterAppApi = {
|
|
|
7734
7468
|
templates: platformAdapterAppTemplatesApi,
|
|
7735
7469
|
push(payload, authorization) {
|
|
7736
7470
|
return __async(this, null, function* () {
|
|
7737
|
-
return
|
|
7471
|
+
return adapterClientInstance.post(
|
|
7738
7472
|
`/console/app${payload.manifest.id ? `/${encodeURIComponent(payload.manifest.id)}` : ""}`,
|
|
7739
7473
|
payload,
|
|
7740
|
-
|
|
7474
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7741
7475
|
);
|
|
7742
7476
|
});
|
|
7743
7477
|
},
|
|
7744
7478
|
pull(appId, authorization) {
|
|
7745
7479
|
return __async(this, null, function* () {
|
|
7746
|
-
return
|
|
7480
|
+
return adapterClientInstance.get(
|
|
7747
7481
|
`/console/app/${encodeURIComponent(appId)}`,
|
|
7748
|
-
|
|
7482
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7749
7483
|
);
|
|
7750
7484
|
});
|
|
7751
7485
|
},
|
|
7752
7486
|
verify(payload, authorization) {
|
|
7753
7487
|
return __async(this, null, function* () {
|
|
7754
|
-
return
|
|
7488
|
+
return adapterClientInstance.post(
|
|
7755
7489
|
`/console/app/${encodeURIComponent(payload.appId)}/verify`,
|
|
7756
7490
|
payload,
|
|
7757
|
-
|
|
7491
|
+
getAdapterClientDefaultConfig(authorization)
|
|
7758
7492
|
);
|
|
7759
7493
|
});
|
|
7760
7494
|
},
|
|
7761
7495
|
status(sagaId, authorization) {
|
|
7762
7496
|
return __async(this, null, function* () {
|
|
7763
|
-
return
|
|
7497
|
+
return adapterClientInstance.get(
|
|
7764
7498
|
`/console/app/status`,
|
|
7765
7499
|
__spreadValues({
|
|
7766
7500
|
params: {
|
|
7767
7501
|
sagaId
|
|
7768
7502
|
}
|
|
7769
|
-
},
|
|
7503
|
+
}, getAdapterClientDefaultConfig(authorization))
|
|
7770
7504
|
);
|
|
7771
7505
|
});
|
|
7772
7506
|
}
|
|
@@ -7777,7 +7511,7 @@ var platformAdapterBigCommerceApi = {
|
|
|
7777
7511
|
events: {
|
|
7778
7512
|
subscribe(payload, authorization) {
|
|
7779
7513
|
return __async(this, null, function* () {
|
|
7780
|
-
yield
|
|
7514
|
+
yield adapterClientInstance.post(
|
|
7781
7515
|
`/integrations/bigcommerce/events/subscribe`,
|
|
7782
7516
|
payload,
|
|
7783
7517
|
getBigCommerceClientConfig(authorization)
|
|
@@ -7786,7 +7520,7 @@ var platformAdapterBigCommerceApi = {
|
|
|
7786
7520
|
},
|
|
7787
7521
|
unsubscribe(payload, authorization) {
|
|
7788
7522
|
return __async(this, null, function* () {
|
|
7789
|
-
yield
|
|
7523
|
+
yield adapterClientInstance.post(
|
|
7790
7524
|
`/integrations/bigcommerce/events/unsubscribe`,
|
|
7791
7525
|
payload,
|
|
7792
7526
|
getBigCommerceClientConfig(authorization)
|
|
@@ -7801,7 +7535,7 @@ var platformAdapterHubspotApi = {
|
|
|
7801
7535
|
events: {
|
|
7802
7536
|
subscribe(payload, authorization) {
|
|
7803
7537
|
return __async(this, null, function* () {
|
|
7804
|
-
yield
|
|
7538
|
+
yield adapterClientInstance.post(
|
|
7805
7539
|
`/integrations/hubspot/events/subscribe`,
|
|
7806
7540
|
payload,
|
|
7807
7541
|
getHubspotClientConfig(authorization)
|
|
@@ -7810,7 +7544,7 @@ var platformAdapterHubspotApi = {
|
|
|
7810
7544
|
},
|
|
7811
7545
|
unsubscribe(payload, authorization) {
|
|
7812
7546
|
return __async(this, null, function* () {
|
|
7813
|
-
yield
|
|
7547
|
+
yield adapterClientInstance.post(
|
|
7814
7548
|
`/integrations/hubspot/events/unsubscribe`,
|
|
7815
7549
|
payload,
|
|
7816
7550
|
getHubspotClientConfig(authorization)
|
|
@@ -7825,7 +7559,7 @@ var platformAdapterMailchimpApi = {
|
|
|
7825
7559
|
events: {
|
|
7826
7560
|
subscribe(payload, authorization) {
|
|
7827
7561
|
return __async(this, null, function* () {
|
|
7828
|
-
yield
|
|
7562
|
+
yield adapterClientInstance.post(
|
|
7829
7563
|
`/integrations/mailchimp/events/subscribe`,
|
|
7830
7564
|
payload,
|
|
7831
7565
|
getMailchimpClientConfig(authorization)
|
|
@@ -7834,7 +7568,7 @@ var platformAdapterMailchimpApi = {
|
|
|
7834
7568
|
},
|
|
7835
7569
|
unsubscribe(payload, authorization) {
|
|
7836
7570
|
return __async(this, null, function* () {
|
|
7837
|
-
yield
|
|
7571
|
+
yield adapterClientInstance.post(
|
|
7838
7572
|
`/integrations/mailchimp/events/unsubscribe`,
|
|
7839
7573
|
payload,
|
|
7840
7574
|
getMailchimpClientConfig(authorization)
|
|
@@ -7848,7 +7582,7 @@ var platformAdapterMailchimpApi = {
|
|
|
7848
7582
|
var platformAdapterNeonProxyApi = {
|
|
7849
7583
|
user(authorization) {
|
|
7850
7584
|
return __async(this, null, function* () {
|
|
7851
|
-
const response = yield
|
|
7585
|
+
const response = yield adapterClientInstance.get(
|
|
7852
7586
|
`/integrations/neon/user`,
|
|
7853
7587
|
getNeonClientConfig(authorization)
|
|
7854
7588
|
);
|
|
@@ -7857,7 +7591,7 @@ var platformAdapterNeonProxyApi = {
|
|
|
7857
7591
|
},
|
|
7858
7592
|
projects(authorization) {
|
|
7859
7593
|
return __async(this, null, function* () {
|
|
7860
|
-
const response = yield
|
|
7594
|
+
const response = yield adapterClientInstance.get(
|
|
7861
7595
|
`/integrations/neon/projects`,
|
|
7862
7596
|
getNeonClientConfig(authorization)
|
|
7863
7597
|
);
|
|
@@ -7866,7 +7600,7 @@ var platformAdapterNeonProxyApi = {
|
|
|
7866
7600
|
},
|
|
7867
7601
|
databases(projectId, authorization) {
|
|
7868
7602
|
return __async(this, null, function* () {
|
|
7869
|
-
const response = yield
|
|
7603
|
+
const response = yield adapterClientInstance.get(
|
|
7870
7604
|
`/integrations/neon/projects/${encodeURIComponent(projectId)}/databases`,
|
|
7871
7605
|
getNeonClientConfig(authorization)
|
|
7872
7606
|
);
|
|
@@ -7880,7 +7614,7 @@ var platformAdapterShopifyApi = {
|
|
|
7880
7614
|
events: {
|
|
7881
7615
|
subscribe(payload, authorization) {
|
|
7882
7616
|
return __async(this, null, function* () {
|
|
7883
|
-
yield
|
|
7617
|
+
yield adapterClientInstance.post(
|
|
7884
7618
|
`/integrations/shopify/events/subscribe`,
|
|
7885
7619
|
payload,
|
|
7886
7620
|
getShopifyClientConfig(authorization)
|
|
@@ -7889,7 +7623,7 @@ var platformAdapterShopifyApi = {
|
|
|
7889
7623
|
},
|
|
7890
7624
|
unsubscribe(payload, authorization) {
|
|
7891
7625
|
return __async(this, null, function* () {
|
|
7892
|
-
yield
|
|
7626
|
+
yield adapterClientInstance.post(
|
|
7893
7627
|
`/integrations/shopify/events/unsubscribe`,
|
|
7894
7628
|
payload,
|
|
7895
7629
|
getShopifyClientConfig(authorization)
|
|
@@ -7904,7 +7638,7 @@ var platformAdapterTextApi = {
|
|
|
7904
7638
|
events: {
|
|
7905
7639
|
subscribe(payload, authorization) {
|
|
7906
7640
|
return __async(this, null, function* () {
|
|
7907
|
-
yield
|
|
7641
|
+
yield adapterClientInstance.post(
|
|
7908
7642
|
`/integrations/text/events/subscribe`,
|
|
7909
7643
|
payload,
|
|
7910
7644
|
getTextClientConfig(authorization)
|
|
@@ -7913,7 +7647,7 @@ var platformAdapterTextApi = {
|
|
|
7913
7647
|
},
|
|
7914
7648
|
unsubscribe(payload, authorization) {
|
|
7915
7649
|
return __async(this, null, function* () {
|
|
7916
|
-
yield
|
|
7650
|
+
yield adapterClientInstance.post(
|
|
7917
7651
|
`/integrations/text/events/unsubscribe`,
|
|
7918
7652
|
payload,
|
|
7919
7653
|
getTextClientConfig(authorization)
|
|
@@ -7939,10 +7673,10 @@ var platformAdapterApi = {
|
|
|
7939
7673
|
integrations: platformAdapterIntegrationsApi,
|
|
7940
7674
|
log(payload, authorization) {
|
|
7941
7675
|
return __async(this, null, function* () {
|
|
7942
|
-
return
|
|
7676
|
+
return adapterClientInstance.post(
|
|
7943
7677
|
`/log`,
|
|
7944
7678
|
payload,
|
|
7945
|
-
|
|
7679
|
+
getAdapterClientConfig(authorization)
|
|
7946
7680
|
);
|
|
7947
7681
|
});
|
|
7948
7682
|
}
|
|
@@ -7953,9 +7687,9 @@ var platformBillingAccountApi = {
|
|
|
7953
7687
|
getAccount(authorization) {
|
|
7954
7688
|
return __async(this, null, function* () {
|
|
7955
7689
|
try {
|
|
7956
|
-
return yield
|
|
7690
|
+
return yield billingClientInstance.get(
|
|
7957
7691
|
`/v3/account`,
|
|
7958
|
-
|
|
7692
|
+
getBillingClientConfig(authorization)
|
|
7959
7693
|
);
|
|
7960
7694
|
} catch (error) {
|
|
7961
7695
|
if (error instanceof Error) {
|
|
@@ -7969,9 +7703,9 @@ var platformBillingAccountApi = {
|
|
|
7969
7703
|
getAccountInfo(product, authorization) {
|
|
7970
7704
|
return __async(this, null, function* () {
|
|
7971
7705
|
try {
|
|
7972
|
-
return yield
|
|
7706
|
+
return yield billingClientInstance.get(
|
|
7973
7707
|
`/v3/account/${encodeURIComponent(product)}/billing_info`,
|
|
7974
|
-
|
|
7708
|
+
getBillingClientConfig(authorization)
|
|
7975
7709
|
);
|
|
7976
7710
|
} catch (error) {
|
|
7977
7711
|
if (error instanceof Error) {
|
|
@@ -7991,9 +7725,9 @@ var platformBillingInvoicesApi = {
|
|
|
7991
7725
|
getInvoices(product, authorization) {
|
|
7992
7726
|
return __async(this, null, function* () {
|
|
7993
7727
|
try {
|
|
7994
|
-
return yield
|
|
7728
|
+
return yield billingClientInstance.get(
|
|
7995
7729
|
`/v2/invoices/${encodeURIComponent(product)}`,
|
|
7996
|
-
|
|
7730
|
+
getBillingClientConfig(authorization)
|
|
7997
7731
|
);
|
|
7998
7732
|
} catch (error) {
|
|
7999
7733
|
if (error instanceof Error) {
|
|
@@ -8007,7 +7741,7 @@ var platformBillingInvoicesApi = {
|
|
|
8007
7741
|
downloadInvoices(number, authorization) {
|
|
8008
7742
|
return __async(this, null, function* () {
|
|
8009
7743
|
try {
|
|
8010
|
-
const response = yield
|
|
7744
|
+
const response = yield billingClientInstance.request(__spreadValues({
|
|
8011
7745
|
url: `https://api.labs.livechatinc.com/v2/invoices/${encodeURIComponent(
|
|
8012
7746
|
number
|
|
8013
7747
|
)}`,
|
|
@@ -8016,7 +7750,7 @@ var platformBillingInvoicesApi = {
|
|
|
8016
7750
|
//gave the values directly for testing
|
|
8017
7751
|
}),
|
|
8018
7752
|
responseType: "blob"
|
|
8019
|
-
},
|
|
7753
|
+
}, getBillingClientConfig(authorization)));
|
|
8020
7754
|
const href = URL.createObjectURL(response.data);
|
|
8021
7755
|
const link = document.createElement("a");
|
|
8022
7756
|
link.href = href;
|
|
@@ -8063,12 +7797,9 @@ function initApi(config, tokens) {
|
|
|
8063
7797
|
(_a = config.urls.platform) == null ? void 0 : _a.accounts,
|
|
8064
7798
|
(_b = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _b.token
|
|
8065
7799
|
);
|
|
8066
|
-
|
|
8067
|
-
|
|
8068
|
-
|
|
8069
|
-
);
|
|
8070
|
-
initPlatformDpsClient((_e = config.urls.platform) == null ? void 0 : _e.dps, (_f = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _f.token);
|
|
8071
|
-
initPlatformAdapterClient(
|
|
7800
|
+
initBillingClient((_c = config.urls.platform) == null ? void 0 : _c.billing, (_d = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _d.token);
|
|
7801
|
+
initDpsClient((_e = config.urls.platform) == null ? void 0 : _e.dps, (_f = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _f.token);
|
|
7802
|
+
initAdapterClient(
|
|
8072
7803
|
(_g = config.urls.platform) == null ? void 0 : _g.adapter,
|
|
8073
7804
|
tokens ? {
|
|
8074
7805
|
platform: tokens.platform,
|
|
@@ -8226,6 +7957,7 @@ var debounce = (func, wait) => {
|
|
|
8226
7957
|
UnauthorizeAccountsApiError,
|
|
8227
7958
|
UnauthorizeApiError,
|
|
8228
7959
|
WorkflowDefinitionTaskType,
|
|
7960
|
+
adapterClientInstance,
|
|
8229
7961
|
allAppTemplates,
|
|
8230
7962
|
api,
|
|
8231
7963
|
appBaseTemplates,
|
|
@@ -8235,51 +7967,40 @@ var debounce = (func, wait) => {
|
|
|
8235
7967
|
appTemplatesMap,
|
|
8236
7968
|
bigCommerceClientInstance,
|
|
8237
7969
|
bigcommerceEventsZods,
|
|
7970
|
+
billingClientInstance,
|
|
8238
7971
|
debounce,
|
|
7972
|
+
dpsClientInstance,
|
|
7973
|
+
getAdapterClientConfig,
|
|
7974
|
+
getAdapterClientDefaultConfig,
|
|
8239
7975
|
getAppAutoReviewPayload,
|
|
8240
|
-
getBigCommerceClientAuthorization,
|
|
8241
7976
|
getBigCommerceClientConfig,
|
|
8242
7977
|
getBigCommerceClientUrl,
|
|
7978
|
+
getBillingClientConfig,
|
|
7979
|
+
getDpsClientConfig,
|
|
8243
7980
|
getEmptyAppAutoReview,
|
|
8244
|
-
getGitHubClientAuthorization,
|
|
8245
7981
|
getGithubClientConfig,
|
|
8246
|
-
getHubspotClientAuthorization,
|
|
8247
7982
|
getHubspotClientConfig,
|
|
8248
7983
|
getIntegrationFlowUrl,
|
|
8249
7984
|
getIntegrationFlowUrlOld,
|
|
8250
|
-
getLiveChatClientAuthorization,
|
|
8251
7985
|
getLiveChatClientConfig,
|
|
8252
|
-
getMailchimpClientAuthorization,
|
|
8253
7986
|
getMailchimpClientConfig,
|
|
8254
7987
|
getMailchimpClientUrl,
|
|
8255
|
-
getNeonClientAuthorization,
|
|
8256
7988
|
getNeonClientConfig,
|
|
8257
|
-
getNetlifyClientAuthorization,
|
|
8258
7989
|
getNetlifyClientConfig,
|
|
8259
|
-
getPlanetScaleClientAuthorization,
|
|
8260
7990
|
getPlanetScaleClientConfig,
|
|
8261
|
-
getPlatformAccountsClientAuthorization,
|
|
8262
|
-
getPlatformAdapterClientAuthorization,
|
|
8263
|
-
getPlatformAdapterClientConfig,
|
|
8264
|
-
getPlatformAdapterClientDefaultConfig,
|
|
8265
|
-
getPlatformBillingClientAuthorization,
|
|
8266
|
-
getPlatformBillingClientConfig,
|
|
8267
|
-
getPlatformDpsAdminClientAuthorization,
|
|
8268
|
-
getPlatformDpsClientAuthorization,
|
|
8269
|
-
getPlatformDpsClientConfig,
|
|
8270
7991
|
getRegion,
|
|
8271
|
-
getShopifyClientAuthorization,
|
|
8272
7992
|
getShopifyClientConfig,
|
|
8273
7993
|
getShopifyClientUrl,
|
|
8274
|
-
getTextClientAuthorization,
|
|
8275
7994
|
getTextClientConfig,
|
|
8276
|
-
getVercelClientAuthorization,
|
|
8277
7995
|
getVercelClientConfig,
|
|
8278
7996
|
githubClientInstance,
|
|
8279
7997
|
hubspotClientInstance,
|
|
8280
7998
|
hubspotEventsZods,
|
|
7999
|
+
initAdapterClient,
|
|
8281
8000
|
initApi,
|
|
8282
8001
|
initBigCommerceClient,
|
|
8002
|
+
initBillingClient,
|
|
8003
|
+
initDpsClient,
|
|
8283
8004
|
initGithubClient,
|
|
8284
8005
|
initHubspotClient,
|
|
8285
8006
|
initLiveChatClient,
|
|
@@ -8288,9 +8009,6 @@ var debounce = (func, wait) => {
|
|
|
8288
8009
|
initNetlifyClient,
|
|
8289
8010
|
initPlanetScaleClient,
|
|
8290
8011
|
initPlatformAccountsClient,
|
|
8291
|
-
initPlatformAdapterClient,
|
|
8292
|
-
initPlatformBillingClient,
|
|
8293
|
-
initPlatformDpsClient,
|
|
8294
8012
|
initShopifyClient,
|
|
8295
8013
|
initTextClient,
|
|
8296
8014
|
initVercelClient,
|
|
@@ -8303,13 +8021,11 @@ var debounce = (func, wait) => {
|
|
|
8303
8021
|
netlifyClientInstance,
|
|
8304
8022
|
planetScaleClientInstance,
|
|
8305
8023
|
platformAccountsClientInstance,
|
|
8306
|
-
platformAdapterClientInstance,
|
|
8307
|
-
platformBillingClientInstance,
|
|
8308
|
-
platformDpsClientInstance,
|
|
8309
8024
|
shopifyClientInstance,
|
|
8310
8025
|
shopifyEventsZods,
|
|
8311
8026
|
textClientInstance,
|
|
8312
8027
|
textLivechatEventsZods,
|
|
8028
|
+
updateAdapterClient,
|
|
8313
8029
|
updateBigCommerceClient,
|
|
8314
8030
|
updateGithubClient,
|
|
8315
8031
|
updateHubspotClient,
|
|
@@ -8317,7 +8033,6 @@ var debounce = (func, wait) => {
|
|
|
8317
8033
|
updateNeonClient,
|
|
8318
8034
|
updateNetlifyClient,
|
|
8319
8035
|
updatePlanetScaleClient,
|
|
8320
|
-
updatePlatformAdapterClient,
|
|
8321
8036
|
updateShopifyClient,
|
|
8322
8037
|
updateVercelClient,
|
|
8323
8038
|
vercelClientInstance
|