@livechat/developer-studio-api 3.0.53 → 3.0.55
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 +460 -35
- package/dist/index.d.ts +460 -35
- package/dist/index.js +276 -20
- package/dist/index.mjs +269 -20
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -74,7 +74,10 @@ __export(src_exports, {
|
|
|
74
74
|
DpsApiError: () => DpsApiError,
|
|
75
75
|
LivechatApiError: () => LivechatApiError,
|
|
76
76
|
MailchimpApiError: () => MailchimpApiError,
|
|
77
|
+
MailchimpEvents: () => MailchimpEvents,
|
|
77
78
|
ShopifyApiError: () => ShopifyApiError,
|
|
79
|
+
ShopifyEvents: () => ShopifyEvents,
|
|
80
|
+
TextLivechatEvents: () => TextLivechatEvents,
|
|
78
81
|
UnauthorizeApiError: () => UnauthorizeApiError,
|
|
79
82
|
WorkflowDefinitionTaskType: () => WorkflowDefinitionTaskType,
|
|
80
83
|
allAppTemplates: () => allAppTemplates,
|
|
@@ -133,8 +136,10 @@ __export(src_exports, {
|
|
|
133
136
|
initShopifyClient: () => initShopifyClient,
|
|
134
137
|
initTextClient: () => initTextClient,
|
|
135
138
|
initVercelClient: () => initVercelClient,
|
|
139
|
+
integrationEventsZods: () => integrationEventsZods,
|
|
136
140
|
livechatClientInstance: () => livechatClientInstance,
|
|
137
141
|
mailchimpClientInstance: () => mailchimpClientInstance,
|
|
142
|
+
mailchimpEventsZods: () => mailchimpEventsZods,
|
|
138
143
|
neonClientInstance: () => neonClientInstance,
|
|
139
144
|
netlifyClientInstance: () => netlifyClientInstance,
|
|
140
145
|
planetScaleClientInstance: () => planetScaleClientInstance,
|
|
@@ -143,7 +148,9 @@ __export(src_exports, {
|
|
|
143
148
|
platformBillingClientInstance: () => platformBillingClientInstance,
|
|
144
149
|
platformDpsClientInstance: () => platformDpsClientInstance,
|
|
145
150
|
shopifyClientInstance: () => shopifyClientInstance,
|
|
151
|
+
shopifyEventsZods: () => shopifyEventsZods,
|
|
146
152
|
textClientInstance: () => textClientInstance,
|
|
153
|
+
textLivechatEventsZods: () => textLivechatEventsZods,
|
|
147
154
|
updateGithubClient: () => updateGithubClient,
|
|
148
155
|
updateMailchimpClient: () => updateMailchimpClient,
|
|
149
156
|
updateNeonClient: () => updateNeonClient,
|
|
@@ -1352,15 +1359,17 @@ var import_axios8 = __toESM(require("axios"));
|
|
|
1352
1359
|
var textClientInstance = import_axios8.default.create({
|
|
1353
1360
|
baseURL: "https://api.labs.text.com"
|
|
1354
1361
|
});
|
|
1355
|
-
function getTextClientAuthorization(req) {
|
|
1362
|
+
function getTextClientAuthorization(req, useIntegration) {
|
|
1356
1363
|
if (req.headers instanceof Headers) {
|
|
1357
1364
|
return {
|
|
1358
|
-
token: req.headers.get(
|
|
1365
|
+
token: req.headers.get(
|
|
1366
|
+
useIntegration ? "x-adapter-text-token" : "x-adapter-platform-token"
|
|
1367
|
+
),
|
|
1359
1368
|
tokenType: "Bearer"
|
|
1360
1369
|
};
|
|
1361
1370
|
}
|
|
1362
1371
|
return {
|
|
1363
|
-
token: req.headers["x-adapter-platform-token"],
|
|
1372
|
+
token: req.headers[useIntegration ? "x-adapter-text-token" : "x-adapter-platform-token"],
|
|
1364
1373
|
tokenType: "Bearer"
|
|
1365
1374
|
};
|
|
1366
1375
|
}
|
|
@@ -2711,7 +2720,7 @@ function getShopifyClientAuthorization(req) {
|
|
|
2711
2720
|
token: req.headers["x-adapter-shopify-token"]
|
|
2712
2721
|
};
|
|
2713
2722
|
}
|
|
2714
|
-
function getShopifyClientConfig(options) {
|
|
2723
|
+
function getShopifyClientConfig(options = {}) {
|
|
2715
2724
|
var _a, _b;
|
|
2716
2725
|
const currentBaseUrl = shopifyClientInstance.defaults.baseURL;
|
|
2717
2726
|
const currentHeaders = shopifyClientInstance.defaults.headers;
|
|
@@ -5400,6 +5409,9 @@ function getPlatformAdapterClientAuthorization(req) {
|
|
|
5400
5409
|
shopify: {
|
|
5401
5410
|
token: req.headers.get("x-adapter-shopify-token"),
|
|
5402
5411
|
shop: req.headers.get("x-adapter-shopify-shop")
|
|
5412
|
+
},
|
|
5413
|
+
text: {
|
|
5414
|
+
token: req.headers.get("x-adapter-text-token")
|
|
5403
5415
|
}
|
|
5404
5416
|
};
|
|
5405
5417
|
}
|
|
@@ -5430,11 +5442,14 @@ function getPlatformAdapterClientAuthorization(req) {
|
|
|
5430
5442
|
shopify: {
|
|
5431
5443
|
token: req.headers["x-adapter-shopify-token"],
|
|
5432
5444
|
shop: req.headers["x-adapter-shopify-shop"]
|
|
5445
|
+
},
|
|
5446
|
+
text: {
|
|
5447
|
+
token: req.headers["x-adapter-text-token"]
|
|
5433
5448
|
}
|
|
5434
5449
|
};
|
|
5435
5450
|
}
|
|
5436
5451
|
function getPlatformAdapterClientConfig(options = {}) {
|
|
5437
|
-
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;
|
|
5452
|
+
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;
|
|
5438
5453
|
const currentHeaders = platformAdapterClientInstance.defaults.headers;
|
|
5439
5454
|
const headers = {
|
|
5440
5455
|
platform: {
|
|
@@ -5452,38 +5467,42 @@ function getPlatformAdapterClientConfig(options = {}) {
|
|
|
5452
5467
|
mailchimp: (_p = currentHeaders["x-adapter-mailchimp-token"]) != null ? _p : (_o = options.mailchimp) == null ? void 0 : _o.token,
|
|
5453
5468
|
mailchimpServer: (_r = currentHeaders["x-adapter-mailchimp-server"]) != null ? _r : (_q = options.mailchimp) == null ? void 0 : _q.server,
|
|
5454
5469
|
shopify: (_t = currentHeaders["x-adapter-shopify-token"]) != null ? _t : (_s = options.shopify) == null ? void 0 : _s.token,
|
|
5455
|
-
shopifyShop: (_v = currentHeaders["x-adapter-shopify-shop"]) != null ? _v : (_u = options.shopify) == null ? void 0 : _u.shop
|
|
5470
|
+
shopifyShop: (_v = currentHeaders["x-adapter-shopify-shop"]) != null ? _v : (_u = options.shopify) == null ? void 0 : _u.shop,
|
|
5471
|
+
text: (_x = currentHeaders["x-adapter-text-token"]) != null ? _x : (_w = options.text) == null ? void 0 : _w.token
|
|
5456
5472
|
}
|
|
5457
5473
|
};
|
|
5458
5474
|
if (currentHeaders["x-adapter-platform-token"]) {
|
|
5459
|
-
currentHeaders["X-Region"] = (
|
|
5475
|
+
currentHeaders["X-Region"] = (_y = getRegion2(currentHeaders["x-adapter-platform-token"])) != null ? _y : void 0;
|
|
5460
5476
|
}
|
|
5461
|
-
if (((
|
|
5477
|
+
if (((_z = options.ensureAuthorizationToken) == null ? void 0 : _z.platform) && !headers.platform.token) {
|
|
5462
5478
|
throw new UnauthorizeApiError("accounts");
|
|
5463
5479
|
}
|
|
5464
|
-
if (((
|
|
5480
|
+
if (((_A = options.ensureAuthorizationToken) == null ? void 0 : _A.github) && (!headers.integrations.github.app || !headers.integrations.github.oauth)) {
|
|
5465
5481
|
throw new UnauthorizeApiError("github");
|
|
5466
5482
|
}
|
|
5467
|
-
if (((
|
|
5483
|
+
if (((_B = options.ensureAuthorizationToken) == null ? void 0 : _B.vercel) && !headers.integrations.vercel) {
|
|
5468
5484
|
throw new UnauthorizeApiError("vercel");
|
|
5469
5485
|
}
|
|
5470
|
-
if (((
|
|
5486
|
+
if (((_C = options.ensureAuthorizationToken) == null ? void 0 : _C.netlify) && !headers.integrations.netlify) {
|
|
5471
5487
|
throw new UnauthorizeApiError("netlify");
|
|
5472
5488
|
}
|
|
5473
|
-
if (((
|
|
5489
|
+
if (((_D = options.ensureAuthorizationToken) == null ? void 0 : _D.planetscale) && !headers.integrations.planetscale) {
|
|
5474
5490
|
throw new UnauthorizeApiError("planetscale");
|
|
5475
5491
|
}
|
|
5476
|
-
if (((
|
|
5492
|
+
if (((_E = options.ensureAuthorizationToken) == null ? void 0 : _E.neon) && !headers.integrations.neon) {
|
|
5477
5493
|
throw new UnauthorizeApiError("neon");
|
|
5478
5494
|
}
|
|
5479
|
-
if (((
|
|
5495
|
+
if (((_F = options.ensureAuthorizationToken) == null ? void 0 : _F.mailchimp) && (!headers.integrations.mailchimp || !headers.integrations.mailchimpServer)) {
|
|
5480
5496
|
throw new UnauthorizeApiError("mailchimp");
|
|
5481
5497
|
}
|
|
5482
|
-
if (((
|
|
5498
|
+
if (((_G = options.ensureAuthorizationToken) == null ? void 0 : _G.shopify) && (!headers.integrations.shopify || !headers.integrations.shopifyShop)) {
|
|
5483
5499
|
throw new UnauthorizeApiError("shopify");
|
|
5484
5500
|
}
|
|
5501
|
+
if (((_H = options.ensureAuthorizationToken) == null ? void 0 : _H.text) && !headers.integrations.text) {
|
|
5502
|
+
throw new UnauthorizeApiError("text");
|
|
5503
|
+
}
|
|
5485
5504
|
return {
|
|
5486
|
-
headers: __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 } : {})
|
|
5505
|
+
headers: __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.text ? { "x-adapter-text-token": headers.integrations.text } : {})
|
|
5487
5506
|
};
|
|
5488
5507
|
}
|
|
5489
5508
|
var getPlatformAdapterClientDefaultConfig = (authorization) => getPlatformAdapterClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
@@ -5506,7 +5525,7 @@ function initPlatformAdapterClient(baseUrl, tokens) {
|
|
|
5506
5525
|
}
|
|
5507
5526
|
}
|
|
5508
5527
|
function updatePlatformAdapterClient(tokens) {
|
|
5509
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
5528
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
5510
5529
|
const headers = platformAdapterClientInstance.defaults.headers;
|
|
5511
5530
|
if ((_a = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _a.token) {
|
|
5512
5531
|
headers["x-adapter-platform-token"] = tokens.platform.token;
|
|
@@ -5541,6 +5560,9 @@ function updatePlatformAdapterClient(tokens) {
|
|
|
5541
5560
|
if ((_k = tokens == null ? void 0 : tokens.shopify) == null ? void 0 : _k.token) {
|
|
5542
5561
|
headers["x-adapter-shopify-token"] = tokens.shopify.token;
|
|
5543
5562
|
}
|
|
5563
|
+
if ((_l = tokens == null ? void 0 : tokens.text) == null ? void 0 : _l.token) {
|
|
5564
|
+
headers["x-adapter-text-token"] = tokens.text.token;
|
|
5565
|
+
}
|
|
5544
5566
|
}
|
|
5545
5567
|
|
|
5546
5568
|
// src/apis/platform/adapter/app/blocks/authorization/api.ts
|
|
@@ -6070,6 +6092,182 @@ function initPlatformBillingClient(baseUrl, token) {
|
|
|
6070
6092
|
}
|
|
6071
6093
|
}
|
|
6072
6094
|
|
|
6095
|
+
// src/apis/platform/adapter/integrations/_contracts/requests/events.ts
|
|
6096
|
+
var import_zod4 = require("zod");
|
|
6097
|
+
|
|
6098
|
+
// src/apis/platform/adapter/integrations/shopify/_contracts/dtos/events.ts
|
|
6099
|
+
var ShopifyEvents = /* @__PURE__ */ ((ShopifyEvents2) => {
|
|
6100
|
+
ShopifyEvents2["OrdersCreate"] = "orders/create";
|
|
6101
|
+
return ShopifyEvents2;
|
|
6102
|
+
})(ShopifyEvents || {});
|
|
6103
|
+
|
|
6104
|
+
// src/apis/platform/adapter/integrations/shopify/_contracts/requests/events.ts
|
|
6105
|
+
var import_zod = require("zod");
|
|
6106
|
+
var shopifyEventsZods = {
|
|
6107
|
+
event: import_zod.z.nativeEnum(ShopifyEvents),
|
|
6108
|
+
get body() {
|
|
6109
|
+
return import_zod.z.object({
|
|
6110
|
+
event: this.event
|
|
6111
|
+
});
|
|
6112
|
+
},
|
|
6113
|
+
get provider() {
|
|
6114
|
+
return import_zod.z.object({
|
|
6115
|
+
provider: import_zod.z.literal("shopify"),
|
|
6116
|
+
event: this.event
|
|
6117
|
+
});
|
|
6118
|
+
},
|
|
6119
|
+
get source() {
|
|
6120
|
+
return import_zod.z.object({
|
|
6121
|
+
sourceName: import_zod.z.enum(["apps", "workflows"]),
|
|
6122
|
+
sourceKey: import_zod.z.string()
|
|
6123
|
+
});
|
|
6124
|
+
},
|
|
6125
|
+
get subscribe() {
|
|
6126
|
+
return this.source.and(this.body).and(
|
|
6127
|
+
import_zod.z.object({
|
|
6128
|
+
callback: import_zod.z.string()
|
|
6129
|
+
})
|
|
6130
|
+
);
|
|
6131
|
+
},
|
|
6132
|
+
get unsubscribe() {
|
|
6133
|
+
return this.source.and(this.body);
|
|
6134
|
+
}
|
|
6135
|
+
};
|
|
6136
|
+
|
|
6137
|
+
// src/apis/platform/adapter/integrations/mailchimp/_contracts/requests/events.ts
|
|
6138
|
+
var import_zod2 = require("zod");
|
|
6139
|
+
|
|
6140
|
+
// src/apis/platform/adapter/integrations/mailchimp/_contracts/dtos/events.ts
|
|
6141
|
+
var MailchimpEvents = /* @__PURE__ */ ((MailchimpEvents2) => {
|
|
6142
|
+
MailchimpEvents2["Subscribe"] = "subscribe";
|
|
6143
|
+
MailchimpEvents2["Unsubscribe"] = "unsubscribe";
|
|
6144
|
+
return MailchimpEvents2;
|
|
6145
|
+
})(MailchimpEvents || {});
|
|
6146
|
+
|
|
6147
|
+
// src/apis/platform/adapter/integrations/mailchimp/_contracts/requests/events.ts
|
|
6148
|
+
var mailchimpEventsZods = {
|
|
6149
|
+
event: import_zod2.z.nativeEnum(MailchimpEvents),
|
|
6150
|
+
get body() {
|
|
6151
|
+
return import_zod2.z.object({
|
|
6152
|
+
event: this.event,
|
|
6153
|
+
listId: import_zod2.z.string()
|
|
6154
|
+
});
|
|
6155
|
+
},
|
|
6156
|
+
get provider() {
|
|
6157
|
+
return import_zod2.z.object({
|
|
6158
|
+
provider: import_zod2.z.literal("mailchimp"),
|
|
6159
|
+
event: this.event,
|
|
6160
|
+
listId: import_zod2.z.string()
|
|
6161
|
+
});
|
|
6162
|
+
},
|
|
6163
|
+
get source() {
|
|
6164
|
+
return import_zod2.z.object({
|
|
6165
|
+
sourceName: import_zod2.z.enum(["apps", "workflows"]),
|
|
6166
|
+
sourceKey: import_zod2.z.string()
|
|
6167
|
+
});
|
|
6168
|
+
},
|
|
6169
|
+
get subscribe() {
|
|
6170
|
+
return this.source.and(this.body).and(
|
|
6171
|
+
import_zod2.z.object({
|
|
6172
|
+
callback: import_zod2.z.string()
|
|
6173
|
+
})
|
|
6174
|
+
);
|
|
6175
|
+
},
|
|
6176
|
+
get unsubscribe() {
|
|
6177
|
+
return this.source.and(this.body);
|
|
6178
|
+
}
|
|
6179
|
+
};
|
|
6180
|
+
|
|
6181
|
+
// src/apis/platform/adapter/integrations/text/_contracts/dtos/events.ts
|
|
6182
|
+
var TextLivechatEvents = /* @__PURE__ */ ((TextLivechatEvents2) => {
|
|
6183
|
+
TextLivechatEvents2["IncomingChat"] = "incoming_chat";
|
|
6184
|
+
return TextLivechatEvents2;
|
|
6185
|
+
})(TextLivechatEvents || {});
|
|
6186
|
+
|
|
6187
|
+
// src/apis/platform/adapter/integrations/text/_contracts/requests/events.ts
|
|
6188
|
+
var import_zod3 = require("zod");
|
|
6189
|
+
var textLivechatEventsZods = {
|
|
6190
|
+
event: import_zod3.z.nativeEnum(TextLivechatEvents),
|
|
6191
|
+
get body() {
|
|
6192
|
+
return import_zod3.z.object({
|
|
6193
|
+
event: this.event
|
|
6194
|
+
});
|
|
6195
|
+
},
|
|
6196
|
+
get provider() {
|
|
6197
|
+
return import_zod3.z.object({
|
|
6198
|
+
provider: import_zod3.z.literal("text-livechat"),
|
|
6199
|
+
event: this.event
|
|
6200
|
+
});
|
|
6201
|
+
},
|
|
6202
|
+
get source() {
|
|
6203
|
+
return import_zod3.z.object({
|
|
6204
|
+
sourceName: import_zod3.z.enum(["apps", "workflows"]),
|
|
6205
|
+
sourceKey: import_zod3.z.string()
|
|
6206
|
+
});
|
|
6207
|
+
},
|
|
6208
|
+
get subscribe() {
|
|
6209
|
+
return this.source.and(this.body).and(
|
|
6210
|
+
import_zod3.z.object({
|
|
6211
|
+
callback: import_zod3.z.string()
|
|
6212
|
+
})
|
|
6213
|
+
);
|
|
6214
|
+
},
|
|
6215
|
+
get unsubscribe() {
|
|
6216
|
+
return this.source.and(this.body);
|
|
6217
|
+
}
|
|
6218
|
+
};
|
|
6219
|
+
|
|
6220
|
+
// src/apis/platform/adapter/integrations/_contracts/requests/events.ts
|
|
6221
|
+
var integrationEventsZods = {
|
|
6222
|
+
sourceName: import_zod4.z.enum(["apps", "workflows"]),
|
|
6223
|
+
providerName: import_zod4.z.enum(["text-livechat", "mailchimp", "shopify"]),
|
|
6224
|
+
get source() {
|
|
6225
|
+
return import_zod4.z.object({
|
|
6226
|
+
sourceName: this.sourceName,
|
|
6227
|
+
sourceKey: import_zod4.z.string()
|
|
6228
|
+
});
|
|
6229
|
+
},
|
|
6230
|
+
provider: import_zod4.z.discriminatedUnion("provider", [
|
|
6231
|
+
textLivechatEventsZods.provider,
|
|
6232
|
+
mailchimpEventsZods.provider,
|
|
6233
|
+
shopifyEventsZods.provider
|
|
6234
|
+
]),
|
|
6235
|
+
get subscribe() {
|
|
6236
|
+
return this.source.and(this.provider).and(
|
|
6237
|
+
import_zod4.z.object({
|
|
6238
|
+
callback: import_zod4.z.string()
|
|
6239
|
+
})
|
|
6240
|
+
);
|
|
6241
|
+
},
|
|
6242
|
+
get unsubscribe() {
|
|
6243
|
+
return this.source.and(this.provider);
|
|
6244
|
+
}
|
|
6245
|
+
};
|
|
6246
|
+
|
|
6247
|
+
// src/apis/platform/adapter/integrations/mailchimp/api.ts
|
|
6248
|
+
var platformAdapterMailchimpApi = {
|
|
6249
|
+
events: {
|
|
6250
|
+
subscribe(payload, authorization) {
|
|
6251
|
+
return __async(this, null, function* () {
|
|
6252
|
+
yield platformAdapterClientInstance.post(
|
|
6253
|
+
`/integrations/mailchimp/events/subscribe`,
|
|
6254
|
+
payload,
|
|
6255
|
+
getMailchimpClientConfig(authorization)
|
|
6256
|
+
);
|
|
6257
|
+
});
|
|
6258
|
+
},
|
|
6259
|
+
unsubscribe(payload, authorization) {
|
|
6260
|
+
return __async(this, null, function* () {
|
|
6261
|
+
yield platformAdapterClientInstance.post(
|
|
6262
|
+
`/integrations/mailchimp/events/unsubscribe`,
|
|
6263
|
+
payload,
|
|
6264
|
+
getMailchimpClientConfig(authorization)
|
|
6265
|
+
);
|
|
6266
|
+
});
|
|
6267
|
+
}
|
|
6268
|
+
}
|
|
6269
|
+
};
|
|
6270
|
+
|
|
6073
6271
|
// src/apis/platform/adapter/integrations/neon/api.ts
|
|
6074
6272
|
var platformAdapterNeonProxyApi = {
|
|
6075
6273
|
user(authorization) {
|
|
@@ -6107,15 +6305,66 @@ var platformAdapterNeonProxyApi = {
|
|
|
6107
6305
|
}
|
|
6108
6306
|
};
|
|
6109
6307
|
|
|
6308
|
+
// src/apis/platform/adapter/integrations/shopify/api.ts
|
|
6309
|
+
var platformAdapterShopifyApi = {
|
|
6310
|
+
events: {
|
|
6311
|
+
subscribe(payload, authorization) {
|
|
6312
|
+
return __async(this, null, function* () {
|
|
6313
|
+
yield platformAdapterClientInstance.post(
|
|
6314
|
+
`/integrations/shopify/events/subscribe`,
|
|
6315
|
+
payload,
|
|
6316
|
+
getShopifyClientConfig(authorization)
|
|
6317
|
+
);
|
|
6318
|
+
});
|
|
6319
|
+
},
|
|
6320
|
+
unsubscribe(payload, authorization) {
|
|
6321
|
+
return __async(this, null, function* () {
|
|
6322
|
+
yield platformAdapterClientInstance.post(
|
|
6323
|
+
`/integrations/shopify/events/unsubscribe`,
|
|
6324
|
+
payload,
|
|
6325
|
+
getShopifyClientConfig(authorization)
|
|
6326
|
+
);
|
|
6327
|
+
});
|
|
6328
|
+
}
|
|
6329
|
+
}
|
|
6330
|
+
};
|
|
6331
|
+
|
|
6332
|
+
// src/apis/platform/adapter/integrations/text/api.ts
|
|
6333
|
+
var platformAdapterTextApi = {
|
|
6334
|
+
events: {
|
|
6335
|
+
subscribe(payload, authorization) {
|
|
6336
|
+
return __async(this, null, function* () {
|
|
6337
|
+
yield platformAdapterClientInstance.post(
|
|
6338
|
+
`/integrations/text/events/subscribe`,
|
|
6339
|
+
payload,
|
|
6340
|
+
getTextClientConfig(authorization)
|
|
6341
|
+
);
|
|
6342
|
+
});
|
|
6343
|
+
},
|
|
6344
|
+
unsubscribe(payload, authorization) {
|
|
6345
|
+
return __async(this, null, function* () {
|
|
6346
|
+
yield platformAdapterClientInstance.post(
|
|
6347
|
+
`/integrations/text/events/unsubscribe`,
|
|
6348
|
+
payload,
|
|
6349
|
+
getTextClientConfig(authorization)
|
|
6350
|
+
);
|
|
6351
|
+
});
|
|
6352
|
+
}
|
|
6353
|
+
}
|
|
6354
|
+
};
|
|
6355
|
+
|
|
6110
6356
|
// src/apis/platform/adapter/integrations/api.ts
|
|
6111
|
-
var
|
|
6112
|
-
neon: platformAdapterNeonProxyApi
|
|
6357
|
+
var platformAdapterIntegrationsApi = {
|
|
6358
|
+
neon: platformAdapterNeonProxyApi,
|
|
6359
|
+
text: platformAdapterTextApi,
|
|
6360
|
+
mailchimp: platformAdapterMailchimpApi,
|
|
6361
|
+
shopify: platformAdapterShopifyApi
|
|
6113
6362
|
};
|
|
6114
6363
|
|
|
6115
6364
|
// src/apis/platform/adapter/api.ts
|
|
6116
6365
|
var platformAdapterApi = {
|
|
6117
6366
|
app: platformAdapterAppApi,
|
|
6118
|
-
|
|
6367
|
+
integrations: platformAdapterIntegrationsApi,
|
|
6119
6368
|
log(payload, authorization) {
|
|
6120
6369
|
return __async(this, null, function* () {
|
|
6121
6370
|
return platformAdapterClientInstance.post(
|
|
@@ -6297,7 +6546,10 @@ function getIntegrationFlowUrl(provider, flow, data, context, config) {
|
|
|
6297
6546
|
DpsApiError,
|
|
6298
6547
|
LivechatApiError,
|
|
6299
6548
|
MailchimpApiError,
|
|
6549
|
+
MailchimpEvents,
|
|
6300
6550
|
ShopifyApiError,
|
|
6551
|
+
ShopifyEvents,
|
|
6552
|
+
TextLivechatEvents,
|
|
6301
6553
|
UnauthorizeApiError,
|
|
6302
6554
|
WorkflowDefinitionTaskType,
|
|
6303
6555
|
allAppTemplates,
|
|
@@ -6356,8 +6608,10 @@ function getIntegrationFlowUrl(provider, flow, data, context, config) {
|
|
|
6356
6608
|
initShopifyClient,
|
|
6357
6609
|
initTextClient,
|
|
6358
6610
|
initVercelClient,
|
|
6611
|
+
integrationEventsZods,
|
|
6359
6612
|
livechatClientInstance,
|
|
6360
6613
|
mailchimpClientInstance,
|
|
6614
|
+
mailchimpEventsZods,
|
|
6361
6615
|
neonClientInstance,
|
|
6362
6616
|
netlifyClientInstance,
|
|
6363
6617
|
planetScaleClientInstance,
|
|
@@ -6366,7 +6620,9 @@ function getIntegrationFlowUrl(provider, flow, data, context, config) {
|
|
|
6366
6620
|
platformBillingClientInstance,
|
|
6367
6621
|
platformDpsClientInstance,
|
|
6368
6622
|
shopifyClientInstance,
|
|
6623
|
+
shopifyEventsZods,
|
|
6369
6624
|
textClientInstance,
|
|
6625
|
+
textLivechatEventsZods,
|
|
6370
6626
|
updateGithubClient,
|
|
6371
6627
|
updateMailchimpClient,
|
|
6372
6628
|
updateNeonClient,
|