@livechat/developer-studio-api 5.4.2-beta.generator.27 → 5.5.0-beta.generator.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-ET3F7CIO.mjs → chunk-AVPZPHAU.mjs} +193 -73
- package/dist/index.d.mts +80 -5
- package/dist/index.d.ts +80 -5
- package/dist/index.js +197 -73
- package/dist/index.mjs +9 -1
- package/dist/workflow-contracts.js +29 -3
- package/dist/workflow-contracts.mjs +1 -1
- package/package.json +3 -5
|
@@ -613,9 +613,6 @@ var extractTokenFromAuthorizationHeader = (headerValue) => {
|
|
|
613
613
|
return headerValue.trim();
|
|
614
614
|
};
|
|
615
615
|
|
|
616
|
-
// src/utils/integrations/getIntegrationFlowUrl.ts
|
|
617
|
-
import { v4 as uuidv4 } from "uuid";
|
|
618
|
-
|
|
619
616
|
// ../../../private/utils/src/arrays/notEmpty.ts
|
|
620
617
|
function notEmpty(item) {
|
|
621
618
|
return Boolean(item);
|
|
@@ -678,6 +675,11 @@ var serializerBase64 = {
|
|
|
678
675
|
}
|
|
679
676
|
};
|
|
680
677
|
|
|
678
|
+
// ../../../private/utils/src/uuid/generate-uuid.ts
|
|
679
|
+
function generateUuid() {
|
|
680
|
+
return crypto.randomUUID();
|
|
681
|
+
}
|
|
682
|
+
|
|
681
683
|
// src/apis/integrations/bigcommerce/api.ts
|
|
682
684
|
import axios2 from "axios";
|
|
683
685
|
|
|
@@ -3204,8 +3206,117 @@ var textAiAgentApi = {
|
|
|
3204
3206
|
}
|
|
3205
3207
|
};
|
|
3206
3208
|
|
|
3207
|
-
// src/apis/integrations/text/
|
|
3209
|
+
// src/apis/integrations/text/billing/instance.ts
|
|
3210
|
+
var TextBillingApiError = class extends ApiErrorBase {
|
|
3211
|
+
constructor() {
|
|
3212
|
+
super(...arguments);
|
|
3213
|
+
this.name = "text";
|
|
3214
|
+
}
|
|
3215
|
+
};
|
|
3216
|
+
var UnauthorizeTextBillingApiError = class extends UnauthorizeApiError {
|
|
3217
|
+
constructor(message) {
|
|
3218
|
+
super("text", message);
|
|
3219
|
+
}
|
|
3220
|
+
};
|
|
3221
|
+
var TextBillingApiClient = class extends ApiClient {
|
|
3222
|
+
constructor() {
|
|
3223
|
+
super(...arguments);
|
|
3224
|
+
this.UnauthorizedError = UnauthorizeTextBillingApiError;
|
|
3225
|
+
this.Error = TextBillingApiError;
|
|
3226
|
+
this.options = {
|
|
3227
|
+
headers: {
|
|
3228
|
+
Accept: "application/json",
|
|
3229
|
+
"Content-Type": "application/json"
|
|
3230
|
+
}
|
|
3231
|
+
};
|
|
3232
|
+
}
|
|
3233
|
+
};
|
|
3234
|
+
var textBillingClientInstance = new TextBillingApiClient({
|
|
3235
|
+
baseURL: "https://billing.labs.text.com"
|
|
3236
|
+
});
|
|
3237
|
+
function initTextBillingClient(baseUrl, token) {
|
|
3238
|
+
if (baseUrl) {
|
|
3239
|
+
textBillingClientInstance.updateConfig({
|
|
3240
|
+
baseURL: baseUrl
|
|
3241
|
+
});
|
|
3242
|
+
}
|
|
3243
|
+
textBillingClientInstance.updateAuthorization({
|
|
3244
|
+
token
|
|
3245
|
+
});
|
|
3246
|
+
}
|
|
3247
|
+
|
|
3248
|
+
// src/apis/integrations/text/billing/api.ts
|
|
3208
3249
|
var urls = {
|
|
3250
|
+
getFeature: (featureName) => `/v4/organizations/my/features/${encodeURIComponent(featureName)}`,
|
|
3251
|
+
getSubscriptions: () => "/v4/subscriptions",
|
|
3252
|
+
getPlans: (billingProfileId) => `/v4/billing_profiles/${encodeURIComponent(billingProfileId)}/plans`,
|
|
3253
|
+
getBillingProfile: (billingProfileId) => `/v4/billing_profiles/${encodeURIComponent(billingProfileId)}`,
|
|
3254
|
+
deletePendingChange: (subscriptionId) => `/v4/subscriptions/${encodeURIComponent(subscriptionId)}:delete_pending_change`
|
|
3255
|
+
};
|
|
3256
|
+
var textBillingApi = {
|
|
3257
|
+
meta: {
|
|
3258
|
+
urls
|
|
3259
|
+
},
|
|
3260
|
+
getFeature(featureName, authorization) {
|
|
3261
|
+
return __async(this, null, function* () {
|
|
3262
|
+
return textBillingClientInstance.get(
|
|
3263
|
+
urls.getFeature(featureName),
|
|
3264
|
+
{
|
|
3265
|
+
authorization,
|
|
3266
|
+
customErrorMessage: "Feature couldn't be fetched."
|
|
3267
|
+
}
|
|
3268
|
+
);
|
|
3269
|
+
});
|
|
3270
|
+
},
|
|
3271
|
+
getSubscriptions(authorization) {
|
|
3272
|
+
return __async(this, null, function* () {
|
|
3273
|
+
return textBillingClientInstance.get(
|
|
3274
|
+
urls.getSubscriptions(),
|
|
3275
|
+
{
|
|
3276
|
+
authorization,
|
|
3277
|
+
customErrorMessage: "Subscriptions couldn't be fetched."
|
|
3278
|
+
}
|
|
3279
|
+
);
|
|
3280
|
+
});
|
|
3281
|
+
},
|
|
3282
|
+
getPlans(billingProfileId, authorization) {
|
|
3283
|
+
return __async(this, null, function* () {
|
|
3284
|
+
return textBillingClientInstance.get(
|
|
3285
|
+
urls.getPlans(billingProfileId),
|
|
3286
|
+
{
|
|
3287
|
+
authorization,
|
|
3288
|
+
customErrorMessage: "Plans couldn't be fetched."
|
|
3289
|
+
}
|
|
3290
|
+
);
|
|
3291
|
+
});
|
|
3292
|
+
},
|
|
3293
|
+
getBillingProfile(billingProfileId, authorization) {
|
|
3294
|
+
return __async(this, null, function* () {
|
|
3295
|
+
return textBillingClientInstance.get(
|
|
3296
|
+
urls.getBillingProfile(billingProfileId),
|
|
3297
|
+
{
|
|
3298
|
+
authorization,
|
|
3299
|
+
customErrorMessage: "Billing profile couldn't be fetched."
|
|
3300
|
+
}
|
|
3301
|
+
);
|
|
3302
|
+
});
|
|
3303
|
+
},
|
|
3304
|
+
deletePendingChange(subscriptionId, authorization) {
|
|
3305
|
+
return __async(this, null, function* () {
|
|
3306
|
+
return textBillingClientInstance.delete(
|
|
3307
|
+
urls.deletePendingChange(subscriptionId),
|
|
3308
|
+
void 0,
|
|
3309
|
+
{
|
|
3310
|
+
authorization,
|
|
3311
|
+
customErrorMessage: "Pending change couldn't be deleted."
|
|
3312
|
+
}
|
|
3313
|
+
);
|
|
3314
|
+
});
|
|
3315
|
+
}
|
|
3316
|
+
};
|
|
3317
|
+
|
|
3318
|
+
// src/apis/integrations/text/external-account-manager/api.ts
|
|
3319
|
+
var urls2 = {
|
|
3209
3320
|
getOAuthState: () => "/external-account-manager/v1/oauth/state",
|
|
3210
3321
|
getAccounts: () => "/external-account-manager/v1/accounts"
|
|
3211
3322
|
};
|
|
@@ -3218,7 +3329,7 @@ var textExternalAccountManagerApi = {
|
|
|
3218
3329
|
getOAuthState(accessToken) {
|
|
3219
3330
|
return __async(this, null, function* () {
|
|
3220
3331
|
return textClientInstance.get(
|
|
3221
|
-
|
|
3332
|
+
urls2.getOAuthState(),
|
|
3222
3333
|
getTextClientConfig({
|
|
3223
3334
|
token: accessToken,
|
|
3224
3335
|
ensureAuthorizationToken: true
|
|
@@ -3238,7 +3349,7 @@ var textExternalAccountManagerApi = {
|
|
|
3238
3349
|
getAccounts(authorization) {
|
|
3239
3350
|
return __async(this, null, function* () {
|
|
3240
3351
|
return textClientInstance.get(
|
|
3241
|
-
|
|
3352
|
+
urls2.getAccounts(),
|
|
3242
3353
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
3243
3354
|
ensureAuthorizationToken: true
|
|
3244
3355
|
}))
|
|
@@ -3341,7 +3452,7 @@ var getUrl = (segments = [], version) => buildUrlFromSegments(
|
|
|
3341
3452
|
segments,
|
|
3342
3453
|
`/workflow_platform/${version ? `${version}/` : ""}credentials`
|
|
3343
3454
|
);
|
|
3344
|
-
var
|
|
3455
|
+
var urls3 = {
|
|
3345
3456
|
get: (id) => getUrl([id], "v1.0" /* V1 */),
|
|
3346
3457
|
getList: (queryParams) => enrichUrlWithQueryParams(getUrl([], "v1.0" /* V1 */), queryParams),
|
|
3347
3458
|
create: () => getUrl([], "v1.0" /* V1 */),
|
|
@@ -3353,12 +3464,12 @@ var urls2 = {
|
|
|
3353
3464
|
};
|
|
3354
3465
|
var textPlatformWorkflowsCredentialsApi = {
|
|
3355
3466
|
meta: {
|
|
3356
|
-
urls:
|
|
3467
|
+
urls: urls3
|
|
3357
3468
|
},
|
|
3358
3469
|
get(id, authorization) {
|
|
3359
3470
|
return __async(this, null, function* () {
|
|
3360
3471
|
return textClientInstance.get(
|
|
3361
|
-
|
|
3472
|
+
urls3.get(id),
|
|
3362
3473
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
3363
3474
|
ensureAuthorizationToken: true
|
|
3364
3475
|
}))
|
|
@@ -3375,7 +3486,7 @@ var textPlatformWorkflowsCredentialsApi = {
|
|
|
3375
3486
|
getList(queryParams, authorization) {
|
|
3376
3487
|
return __async(this, null, function* () {
|
|
3377
3488
|
return textClientInstance.get(
|
|
3378
|
-
|
|
3489
|
+
urls3.getList(queryParams),
|
|
3379
3490
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
3380
3491
|
ensureAuthorizationToken: true
|
|
3381
3492
|
}))
|
|
@@ -3392,7 +3503,7 @@ var textPlatformWorkflowsCredentialsApi = {
|
|
|
3392
3503
|
create(payload, authorization) {
|
|
3393
3504
|
return __async(this, null, function* () {
|
|
3394
3505
|
return textClientInstance.post(
|
|
3395
|
-
|
|
3506
|
+
urls3.create(),
|
|
3396
3507
|
payload,
|
|
3397
3508
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
3398
3509
|
ensureAuthorizationToken: true
|
|
@@ -3410,7 +3521,7 @@ var textPlatformWorkflowsCredentialsApi = {
|
|
|
3410
3521
|
update(id, payload, authorization) {
|
|
3411
3522
|
return __async(this, null, function* () {
|
|
3412
3523
|
return textClientInstance.put(
|
|
3413
|
-
|
|
3524
|
+
urls3.update(id),
|
|
3414
3525
|
payload,
|
|
3415
3526
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
3416
3527
|
ensureAuthorizationToken: true
|
|
@@ -3428,7 +3539,7 @@ var textPlatformWorkflowsCredentialsApi = {
|
|
|
3428
3539
|
delete(id, authorization) {
|
|
3429
3540
|
return __async(this, null, function* () {
|
|
3430
3541
|
return textClientInstance.delete(
|
|
3431
|
-
|
|
3542
|
+
urls3.delete(id),
|
|
3432
3543
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
3433
3544
|
ensureAuthorizationToken: true
|
|
3434
3545
|
}))
|
|
@@ -3445,7 +3556,7 @@ var textPlatformWorkflowsCredentialsApi = {
|
|
|
3445
3556
|
connect(id, code, codeVerifier, authorization) {
|
|
3446
3557
|
return __async(this, null, function* () {
|
|
3447
3558
|
return textClientInstance.put(
|
|
3448
|
-
|
|
3559
|
+
urls3.connect(id),
|
|
3449
3560
|
{
|
|
3450
3561
|
code,
|
|
3451
3562
|
code_verifier: codeVerifier
|
|
@@ -3466,7 +3577,7 @@ var textPlatformWorkflowsCredentialsApi = {
|
|
|
3466
3577
|
disconnect(id, authorization) {
|
|
3467
3578
|
return __async(this, null, function* () {
|
|
3468
3579
|
return textClientInstance.put(
|
|
3469
|
-
|
|
3580
|
+
urls3.disconnect(id),
|
|
3470
3581
|
{},
|
|
3471
3582
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
3472
3583
|
ensureAuthorizationToken: true
|
|
@@ -3484,7 +3595,7 @@ var textPlatformWorkflowsCredentialsApi = {
|
|
|
3484
3595
|
importCredential(externalAccountId, authorization) {
|
|
3485
3596
|
return __async(this, null, function* () {
|
|
3486
3597
|
return textClientInstance.post(
|
|
3487
|
-
|
|
3598
|
+
urls3.import(),
|
|
3488
3599
|
{
|
|
3489
3600
|
source: "external_account_manager",
|
|
3490
3601
|
data: {
|
|
@@ -3510,17 +3621,17 @@ var textPlatformWorkflowsCredentialsApi = {
|
|
|
3510
3621
|
|
|
3511
3622
|
// src/apis/integrations/text/platform/workflow/functions/api.ts
|
|
3512
3623
|
var getUrl2 = (segments = []) => buildUrlFromSegments(segments, "/workflow_platform/functions");
|
|
3513
|
-
var
|
|
3624
|
+
var urls4 = {
|
|
3514
3625
|
get: () => getUrl2()
|
|
3515
3626
|
};
|
|
3516
3627
|
var textPlatformWorkflowsFunctionsApi = {
|
|
3517
3628
|
meta: {
|
|
3518
|
-
urls:
|
|
3629
|
+
urls: urls4
|
|
3519
3630
|
},
|
|
3520
3631
|
get(authorization) {
|
|
3521
3632
|
return __async(this, null, function* () {
|
|
3522
3633
|
return textClientInstance.get(
|
|
3523
|
-
|
|
3634
|
+
urls4.get(),
|
|
3524
3635
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
3525
3636
|
ensureAuthorizationToken: true
|
|
3526
3637
|
}))
|
|
@@ -5469,18 +5580,18 @@ var getUrl3 = (segments = [], version) => buildUrlFromSegments(
|
|
|
5469
5580
|
segments,
|
|
5470
5581
|
`/workflow_platform/${version ? `${version}/` : ""}workflows/templates`
|
|
5471
5582
|
);
|
|
5472
|
-
var
|
|
5583
|
+
var urls5 = {
|
|
5473
5584
|
getList: (queryParams) => enrichUrlWithQueryParams(getUrl3([], "v1.0" /* V1 */), queryParams),
|
|
5474
5585
|
get: (templateId) => getUrl3([templateId], "v1.0" /* V1 */)
|
|
5475
5586
|
};
|
|
5476
5587
|
var textPlatformWorkflowsTemplatesApi = {
|
|
5477
5588
|
meta: {
|
|
5478
|
-
urls:
|
|
5589
|
+
urls: urls5
|
|
5479
5590
|
},
|
|
5480
5591
|
getList(queryParams, authorization) {
|
|
5481
5592
|
return __async(this, null, function* () {
|
|
5482
5593
|
return textClientInstance.get(
|
|
5483
|
-
|
|
5594
|
+
urls5.getList(queryParams),
|
|
5484
5595
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
5485
5596
|
ensureAuthorizationToken: true
|
|
5486
5597
|
}))
|
|
@@ -5497,7 +5608,7 @@ var textPlatformWorkflowsTemplatesApi = {
|
|
|
5497
5608
|
get(templateId, authorization) {
|
|
5498
5609
|
return __async(this, null, function* () {
|
|
5499
5610
|
return textClientInstance.get(
|
|
5500
|
-
|
|
5611
|
+
urls5.get(templateId),
|
|
5501
5612
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
5502
5613
|
ensureAuthorizationToken: true
|
|
5503
5614
|
}))
|
|
@@ -5515,7 +5626,7 @@ var textPlatformWorkflowsTemplatesApi = {
|
|
|
5515
5626
|
|
|
5516
5627
|
// src/apis/integrations/text/platform/workflow/workflows/internal/crm/api.ts
|
|
5517
5628
|
var getUrl4 = (segments = []) => buildUrlFromSegments(segments, "/internal/crm");
|
|
5518
|
-
var
|
|
5629
|
+
var urls6 = {
|
|
5519
5630
|
getOrganizations: (queryParams) => enrichUrlWithQueryParams(getUrl4(["stats"]), queryParams),
|
|
5520
5631
|
getOrganization: (organizationId) => getUrl4(["stats", organizationId]),
|
|
5521
5632
|
getWorkflows: (queryParams) => enrichUrlWithQueryParams(getUrl4(["workflows"]), queryParams),
|
|
@@ -5529,12 +5640,12 @@ var urls5 = {
|
|
|
5529
5640
|
};
|
|
5530
5641
|
var textPlatformWorkflowsInternalCrmApi = {
|
|
5531
5642
|
meta: {
|
|
5532
|
-
urls:
|
|
5643
|
+
urls: urls6
|
|
5533
5644
|
},
|
|
5534
5645
|
getOrganizations(queryParams, authorization) {
|
|
5535
5646
|
return __async(this, null, function* () {
|
|
5536
5647
|
const { data: organizations } = yield textClientInstance.get(
|
|
5537
|
-
|
|
5648
|
+
urls6.getOrganizations(queryParams),
|
|
5538
5649
|
getWorkflowApiCrmConfig(authorization)
|
|
5539
5650
|
);
|
|
5540
5651
|
return organizations;
|
|
@@ -5543,7 +5654,7 @@ var textPlatformWorkflowsInternalCrmApi = {
|
|
|
5543
5654
|
getOrganization(organizationId, authorization) {
|
|
5544
5655
|
return __async(this, null, function* () {
|
|
5545
5656
|
const { data: organization } = yield textClientInstance.get(
|
|
5546
|
-
|
|
5657
|
+
urls6.getOrganization(organizationId),
|
|
5547
5658
|
getWorkflowApiCrmConfig(authorization)
|
|
5548
5659
|
);
|
|
5549
5660
|
return organization;
|
|
@@ -5551,7 +5662,7 @@ var textPlatformWorkflowsInternalCrmApi = {
|
|
|
5551
5662
|
},
|
|
5552
5663
|
getWorkflows(queryParams, authorization) {
|
|
5553
5664
|
return __async(this, null, function* () {
|
|
5554
|
-
const { data: workflows } = yield textClientInstance.get(
|
|
5665
|
+
const { data: workflows } = yield textClientInstance.get(urls6.getWorkflows(queryParams), getWorkflowApiCrmConfig(authorization));
|
|
5555
5666
|
workflows.data = workflows.data.map(enrichWorkflowTrigger);
|
|
5556
5667
|
return workflows;
|
|
5557
5668
|
});
|
|
@@ -5561,7 +5672,7 @@ var textPlatformWorkflowsInternalCrmApi = {
|
|
|
5561
5672
|
const searchParams = new URLSearchParams();
|
|
5562
5673
|
const query = searchParams.toString();
|
|
5563
5674
|
const { data: workflow } = yield textClientInstance.get(
|
|
5564
|
-
`${
|
|
5675
|
+
`${urls6.getWorkflow(workflowId)}${query ? `?${query}` : ""}`,
|
|
5565
5676
|
getWorkflowApiCrmConfig(authorization)
|
|
5566
5677
|
);
|
|
5567
5678
|
return enrichWorkflowTrigger(workflow);
|
|
@@ -5570,7 +5681,7 @@ var textPlatformWorkflowsInternalCrmApi = {
|
|
|
5570
5681
|
getWorkflowExecutions(workflowId, queryParams, authorization) {
|
|
5571
5682
|
return __async(this, null, function* () {
|
|
5572
5683
|
const { data: executions } = yield textClientInstance.get(
|
|
5573
|
-
|
|
5684
|
+
urls6.getWorkflowExecutions(workflowId, queryParams),
|
|
5574
5685
|
getWorkflowApiCrmConfig(authorization)
|
|
5575
5686
|
);
|
|
5576
5687
|
return executions;
|
|
@@ -5579,7 +5690,7 @@ var textPlatformWorkflowsInternalCrmApi = {
|
|
|
5579
5690
|
getWorkflowExecution(workflowId, executionId, authorization) {
|
|
5580
5691
|
return __async(this, null, function* () {
|
|
5581
5692
|
const { data: execution } = yield textClientInstance.get(
|
|
5582
|
-
|
|
5693
|
+
urls6.getWorkflowExecution(workflowId, executionId),
|
|
5583
5694
|
getWorkflowApiCrmConfig(authorization)
|
|
5584
5695
|
);
|
|
5585
5696
|
return execution;
|
|
@@ -5593,7 +5704,7 @@ var textPlatformWorkflowsInternalCrmApi = {
|
|
|
5593
5704
|
}
|
|
5594
5705
|
const query = searchParams.toString();
|
|
5595
5706
|
const { data: introspection } = yield textClientInstance.get(
|
|
5596
|
-
`${
|
|
5707
|
+
`${urls6.getWorkflowIntrospection(workflowId)}${query ? `?${query}` : ""}`,
|
|
5597
5708
|
getWorkflowApiCrmConfig(authorization)
|
|
5598
5709
|
);
|
|
5599
5710
|
return {
|
|
@@ -5637,7 +5748,7 @@ var getUrl5 = (segments = [], version) => buildUrlFromSegments(
|
|
|
5637
5748
|
segments,
|
|
5638
5749
|
`/workflow_platform/${version ? `${version}/` : ""}workflows`
|
|
5639
5750
|
);
|
|
5640
|
-
var
|
|
5751
|
+
var urls7 = {
|
|
5641
5752
|
getWorkflows: (queryParams) => enrichUrlWithQueryParams(getUrl5([], "v1.0" /* V1 */), queryParams),
|
|
5642
5753
|
createWorkflow: () => getUrl5(),
|
|
5643
5754
|
getWorkflow: (id) => getUrl5([id], "v1.0" /* V1 */),
|
|
@@ -5658,12 +5769,12 @@ var urls6 = {
|
|
|
5658
5769
|
var textPlatformWorkflowsApi = {
|
|
5659
5770
|
internal: textPlatformWorkflowsInternalApi,
|
|
5660
5771
|
meta: {
|
|
5661
|
-
urls:
|
|
5772
|
+
urls: urls7
|
|
5662
5773
|
},
|
|
5663
5774
|
getWorkflows(queryParams, authorization) {
|
|
5664
5775
|
return __async(this, null, function* () {
|
|
5665
5776
|
const { data: workflows } = yield textClientInstance.get(
|
|
5666
|
-
|
|
5777
|
+
urls7.getWorkflows(queryParams),
|
|
5667
5778
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
5668
5779
|
ensureAuthorizationToken: true
|
|
5669
5780
|
}))
|
|
@@ -5680,7 +5791,7 @@ var textPlatformWorkflowsApi = {
|
|
|
5680
5791
|
}
|
|
5681
5792
|
const query = searchParams.toString();
|
|
5682
5793
|
const { data: workflow } = yield textClientInstance.get(
|
|
5683
|
-
`${
|
|
5794
|
+
`${urls7.getWorkflow(workflowId)}${query ? `?${query}` : ""}`,
|
|
5684
5795
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
5685
5796
|
ensureAuthorizationToken: true
|
|
5686
5797
|
}))
|
|
@@ -5691,7 +5802,7 @@ var textPlatformWorkflowsApi = {
|
|
|
5691
5802
|
createWorkflow(payload, authorization) {
|
|
5692
5803
|
return __async(this, null, function* () {
|
|
5693
5804
|
return textClientInstance.post(
|
|
5694
|
-
|
|
5805
|
+
urls7.createWorkflow(),
|
|
5695
5806
|
__spreadProps(__spreadValues({}, payload), {
|
|
5696
5807
|
trigger: payload.trigger || {}
|
|
5697
5808
|
}),
|
|
@@ -5704,7 +5815,7 @@ var textPlatformWorkflowsApi = {
|
|
|
5704
5815
|
updateWorkflow(workflowId, payload, authorization) {
|
|
5705
5816
|
return __async(this, null, function* () {
|
|
5706
5817
|
return textClientInstance.put(
|
|
5707
|
-
|
|
5818
|
+
urls7.updateWorkflow(workflowId),
|
|
5708
5819
|
__spreadProps(__spreadValues({}, payload), {
|
|
5709
5820
|
trigger: payload.trigger || {}
|
|
5710
5821
|
}),
|
|
@@ -5716,7 +5827,7 @@ var textPlatformWorkflowsApi = {
|
|
|
5716
5827
|
},
|
|
5717
5828
|
deleteWorkflow(workflowId, authorization) {
|
|
5718
5829
|
return __async(this, null, function* () {
|
|
5719
|
-
return textClientInstance.delete(
|
|
5830
|
+
return textClientInstance.delete(urls7.deleteWorkflow(workflowId), __spreadValues({}, getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
5720
5831
|
ensureAuthorizationToken: true
|
|
5721
5832
|
}))));
|
|
5722
5833
|
});
|
|
@@ -5724,7 +5835,7 @@ var textPlatformWorkflowsApi = {
|
|
|
5724
5835
|
createWorkflowDraft(workflowId, payload, authorization) {
|
|
5725
5836
|
return __async(this, null, function* () {
|
|
5726
5837
|
return textClientInstance.post(
|
|
5727
|
-
|
|
5838
|
+
urls7.createWorkflowDraft(workflowId),
|
|
5728
5839
|
__spreadProps(__spreadValues({}, payload), {
|
|
5729
5840
|
trigger: payload.trigger || {}
|
|
5730
5841
|
}),
|
|
@@ -5737,7 +5848,7 @@ var textPlatformWorkflowsApi = {
|
|
|
5737
5848
|
publishWorkflowDraft(workflowId, authorization) {
|
|
5738
5849
|
return __async(this, null, function* () {
|
|
5739
5850
|
return textClientInstance.post(
|
|
5740
|
-
|
|
5851
|
+
urls7.publishWorkflowDraft(workflowId),
|
|
5741
5852
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
5742
5853
|
ensureAuthorizationToken: true
|
|
5743
5854
|
}))
|
|
@@ -5747,7 +5858,7 @@ var textPlatformWorkflowsApi = {
|
|
|
5747
5858
|
toggleWorkflowActivation(workflowId, isActive, authorization) {
|
|
5748
5859
|
return __async(this, null, function* () {
|
|
5749
5860
|
return textClientInstance.put(
|
|
5750
|
-
|
|
5861
|
+
urls7.toggleWorkflowActivation(workflowId),
|
|
5751
5862
|
{
|
|
5752
5863
|
active: isActive
|
|
5753
5864
|
},
|
|
@@ -5760,7 +5871,7 @@ var textPlatformWorkflowsApi = {
|
|
|
5760
5871
|
executeWorkflow(workflowId, input, authorization) {
|
|
5761
5872
|
return __async(this, null, function* () {
|
|
5762
5873
|
const { data: execution } = yield textClientInstance.post(
|
|
5763
|
-
|
|
5874
|
+
urls7.executeWorkflow(workflowId),
|
|
5764
5875
|
{
|
|
5765
5876
|
input
|
|
5766
5877
|
},
|
|
@@ -5774,7 +5885,7 @@ var textPlatformWorkflowsApi = {
|
|
|
5774
5885
|
getWorkflowExecutions(workflowId, queryParams, authorization) {
|
|
5775
5886
|
return __async(this, null, function* () {
|
|
5776
5887
|
const { data: executions } = yield textClientInstance.get(
|
|
5777
|
-
|
|
5888
|
+
urls7.getWorkflowExecutions(workflowId, queryParams),
|
|
5778
5889
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
5779
5890
|
ensureAuthorizationToken: true
|
|
5780
5891
|
}))
|
|
@@ -5785,7 +5896,7 @@ var textPlatformWorkflowsApi = {
|
|
|
5785
5896
|
getWorkflowExecution(workflowId, executionId, authorization) {
|
|
5786
5897
|
return __async(this, null, function* () {
|
|
5787
5898
|
const { data: execution } = yield textClientInstance.get(
|
|
5788
|
-
|
|
5899
|
+
urls7.getWorkflowExecution(workflowId, executionId),
|
|
5789
5900
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
5790
5901
|
ensureAuthorizationToken: true
|
|
5791
5902
|
}))
|
|
@@ -5801,7 +5912,7 @@ var textPlatformWorkflowsApi = {
|
|
|
5801
5912
|
}
|
|
5802
5913
|
const query = searchParams.toString();
|
|
5803
5914
|
const { data: introspection } = yield textClientInstance.get(
|
|
5804
|
-
`${
|
|
5915
|
+
`${urls7.getWorkflowIntrospection(workflowId)}${query ? `?${query}` : ""}`,
|
|
5805
5916
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
5806
5917
|
ensureAuthorizationToken: true
|
|
5807
5918
|
}))
|
|
@@ -5814,7 +5925,7 @@ var textPlatformWorkflowsApi = {
|
|
|
5814
5925
|
introspectWorkflowTask(workflowId, payload, authorization) {
|
|
5815
5926
|
return __async(this, null, function* () {
|
|
5816
5927
|
const response = yield textClientInstance.post(
|
|
5817
|
-
|
|
5928
|
+
urls7.introspectWorkflowTask(workflowId),
|
|
5818
5929
|
{
|
|
5819
5930
|
task_reference_name: payload.taskReferenceName,
|
|
5820
5931
|
input_parameters: payload.inputParameters
|
|
@@ -5853,7 +5964,7 @@ var buildResourcePath = ({ provider, domain, name }) => {
|
|
|
5853
5964
|
}
|
|
5854
5965
|
return [targetProvider, domain, name].filter(notEmpty).join("/");
|
|
5855
5966
|
};
|
|
5856
|
-
var
|
|
5967
|
+
var urls8 = {
|
|
5857
5968
|
listSchema: () => "/workflow_resources/schema",
|
|
5858
5969
|
getSchema: (provider) => `/workflow_resources/schema/${provider}`,
|
|
5859
5970
|
getResource: (resource) => `/workflow_resources/resources/${buildResourcePath(resource)}`
|
|
@@ -5864,7 +5975,7 @@ var textResourcerApi = {
|
|
|
5864
5975
|
const config = getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
5865
5976
|
ensureAuthorizationToken: true
|
|
5866
5977
|
}));
|
|
5867
|
-
return textClientInstance.get(
|
|
5978
|
+
return textClientInstance.get(urls8.getResource(resource), __spreadProps(__spreadValues({}, config), {
|
|
5868
5979
|
headers: __spreadProps(__spreadValues({}, config.headers), {
|
|
5869
5980
|
"X-Credential-ID": credentialId
|
|
5870
5981
|
})
|
|
@@ -5883,7 +5994,7 @@ var textResourcerApi = {
|
|
|
5883
5994
|
const config = getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
5884
5995
|
ensureAuthorizationToken: true
|
|
5885
5996
|
}));
|
|
5886
|
-
return textClientInstance.get(
|
|
5997
|
+
return textClientInstance.get(urls8.listSchema(), __spreadProps(__spreadValues({}, config), {
|
|
5887
5998
|
headers: __spreadProps(__spreadValues({}, config.headers), {
|
|
5888
5999
|
"X-Credential-ID": credentialId
|
|
5889
6000
|
})
|
|
@@ -5902,7 +6013,7 @@ var textResourcerApi = {
|
|
|
5902
6013
|
const config = getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
5903
6014
|
ensureAuthorizationToken: true
|
|
5904
6015
|
}));
|
|
5905
|
-
return textClientInstance.get(
|
|
6016
|
+
return textClientInstance.get(urls8.getSchema(provider), __spreadProps(__spreadValues({}, config), {
|
|
5906
6017
|
headers: __spreadProps(__spreadValues({}, config.headers), {
|
|
5907
6018
|
"X-Credential-ID": credentialId
|
|
5908
6019
|
})
|
|
@@ -5922,6 +6033,7 @@ var textResourcerApi = {
|
|
|
5922
6033
|
var textApi = {
|
|
5923
6034
|
platform: textPlatformApi,
|
|
5924
6035
|
ai: textAiAgentApi,
|
|
6036
|
+
billing: textBillingApi,
|
|
5925
6037
|
externalAccountManager: textExternalAccountManagerApi,
|
|
5926
6038
|
resourcer: textResourcerApi
|
|
5927
6039
|
};
|
|
@@ -6225,7 +6337,7 @@ var integrationsApi = {
|
|
|
6225
6337
|
};
|
|
6226
6338
|
|
|
6227
6339
|
// src/apis/platform/accounts/accounts/api.ts
|
|
6228
|
-
var
|
|
6340
|
+
var urls9 = (withBaseUrl = false) => {
|
|
6229
6341
|
const getUrl7 = (segments = []) => buildUrlFromSegments(
|
|
6230
6342
|
segments,
|
|
6231
6343
|
"/v2/accounts",
|
|
@@ -6241,7 +6353,7 @@ var api = {
|
|
|
6241
6353
|
getAccounts(authorization) {
|
|
6242
6354
|
return __async(this, null, function* () {
|
|
6243
6355
|
return platformAccountsClientInstance.get(
|
|
6244
|
-
|
|
6356
|
+
urls9().getAccounts(),
|
|
6245
6357
|
{
|
|
6246
6358
|
authorization,
|
|
6247
6359
|
customErrorMessage: "Accounts couldn't be fetched."
|
|
@@ -6252,7 +6364,7 @@ var api = {
|
|
|
6252
6364
|
getAccount(accountId, authorization) {
|
|
6253
6365
|
return __async(this, null, function* () {
|
|
6254
6366
|
return platformAccountsClientInstance.get(
|
|
6255
|
-
|
|
6367
|
+
urls9().getAccount(accountId),
|
|
6256
6368
|
{
|
|
6257
6369
|
authorization,
|
|
6258
6370
|
customErrorMessage: "Account couldn't be fetched."
|
|
@@ -6274,7 +6386,7 @@ var api = {
|
|
|
6274
6386
|
};
|
|
6275
6387
|
var platformAccountsAccountApi = __spreadProps(__spreadValues({}, api), {
|
|
6276
6388
|
meta: {
|
|
6277
|
-
urls:
|
|
6389
|
+
urls: urls9
|
|
6278
6390
|
}
|
|
6279
6391
|
});
|
|
6280
6392
|
|
|
@@ -6440,18 +6552,18 @@ var platformAccountsPersonalAccessTokenApi = {
|
|
|
6440
6552
|
|
|
6441
6553
|
// src/apis/platform/accounts/products/api.ts
|
|
6442
6554
|
var getUrl6 = (segments = []) => buildUrlFromSegments(segments, "/v2/organizations");
|
|
6443
|
-
var
|
|
6555
|
+
var urls10 = {
|
|
6444
6556
|
getOrganizationProducts: () => getUrl6(["my", "products"]),
|
|
6445
6557
|
updateOrganizationProducts: () => getUrl6(["my", "products"])
|
|
6446
6558
|
};
|
|
6447
6559
|
var platformAccountsProductsApi = {
|
|
6448
6560
|
meta: {
|
|
6449
|
-
urls:
|
|
6561
|
+
urls: urls10
|
|
6450
6562
|
},
|
|
6451
6563
|
getOrganizationProducts(authorization) {
|
|
6452
6564
|
return __async(this, null, function* () {
|
|
6453
6565
|
return platformAccountsClientInstance.get(
|
|
6454
|
-
|
|
6566
|
+
urls10.getOrganizationProducts(),
|
|
6455
6567
|
{ authorization, customErrorMessage: "Products couldn't be fetched." }
|
|
6456
6568
|
);
|
|
6457
6569
|
});
|
|
@@ -6459,7 +6571,7 @@ var platformAccountsProductsApi = {
|
|
|
6459
6571
|
updateOrganizationProducts(payload, authorization) {
|
|
6460
6572
|
return __async(this, null, function* () {
|
|
6461
6573
|
return platformAccountsClientInstance.post(
|
|
6462
|
-
|
|
6574
|
+
urls10.updateOrganizationProducts(),
|
|
6463
6575
|
payload,
|
|
6464
6576
|
{ authorization, customErrorMessage: "Products couldn't be updated." }
|
|
6465
6577
|
);
|
|
@@ -9422,7 +9534,7 @@ var api2 = {
|
|
|
9422
9534
|
isInitialized: false
|
|
9423
9535
|
};
|
|
9424
9536
|
function initApi(config, tokens) {
|
|
9425
|
-
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;
|
|
9537
|
+
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;
|
|
9426
9538
|
initPlatformAccountsClient(
|
|
9427
9539
|
(_a = config.urls.platform) == null ? void 0 : _a.accounts,
|
|
9428
9540
|
(_b = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _b.token
|
|
@@ -9442,14 +9554,18 @@ function initApi(config, tokens) {
|
|
|
9442
9554
|
initLiveChatClient((_h = config.urls.products) == null ? void 0 : _h.livechat, (_i = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _i.token);
|
|
9443
9555
|
initHelpDeskClient((_j = config.urls.products) == null ? void 0 : _j.helpdesk, (_k = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _k.token);
|
|
9444
9556
|
initTextClient((_l = config.urls.integrations) == null ? void 0 : _l.text, (_m = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _m.token);
|
|
9557
|
+
initTextBillingClient(
|
|
9558
|
+
(_n = config.urls.integrations) == null ? void 0 : _n.textBilling,
|
|
9559
|
+
(_o = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _o.token
|
|
9560
|
+
);
|
|
9445
9561
|
initWorkflowsClient(
|
|
9446
|
-
(
|
|
9562
|
+
(_q = (_p = config.urls.textIntelligence) == null ? void 0 : _p.workflows) == null ? void 0 : _q.workflows,
|
|
9447
9563
|
tokens ? {
|
|
9448
9564
|
platform: tokens.platform
|
|
9449
9565
|
} : void 0
|
|
9450
9566
|
);
|
|
9451
9567
|
initAdapterClient(
|
|
9452
|
-
(
|
|
9568
|
+
(_s = (_r = config.urls.textIntelligence) == null ? void 0 : _r.workflows) == null ? void 0 : _s.adapter,
|
|
9453
9569
|
tokens ? {
|
|
9454
9570
|
platform: tokens.platform,
|
|
9455
9571
|
github: tokens.github,
|
|
@@ -9462,16 +9578,16 @@ function initApi(config, tokens) {
|
|
|
9462
9578
|
slack: tokens.slack
|
|
9463
9579
|
} : void 0
|
|
9464
9580
|
);
|
|
9465
|
-
initGithubClient((
|
|
9466
|
-
initNetlifyClient((
|
|
9467
|
-
initVercelClient((
|
|
9468
|
-
initNeonClient((
|
|
9469
|
-
initPlanetScaleClient((
|
|
9470
|
-
initMailchimpClient((
|
|
9471
|
-
initShopifyClient((
|
|
9472
|
-
initBigCommerceClient((
|
|
9473
|
-
initHubspotClient((
|
|
9474
|
-
initSlackClient((
|
|
9581
|
+
initGithubClient((_t = tokens == null ? void 0 : tokens.github) == null ? void 0 : _t.appToken);
|
|
9582
|
+
initNetlifyClient((_u = tokens == null ? void 0 : tokens.netlify) == null ? void 0 : _u.token);
|
|
9583
|
+
initVercelClient((_v = tokens == null ? void 0 : tokens.vercel) == null ? void 0 : _v.token);
|
|
9584
|
+
initNeonClient((_w = tokens == null ? void 0 : tokens.neon) == null ? void 0 : _w.token);
|
|
9585
|
+
initPlanetScaleClient((_x = tokens == null ? void 0 : tokens.planetscale) == null ? void 0 : _x.token);
|
|
9586
|
+
initMailchimpClient((_y = tokens == null ? void 0 : tokens.mailchimp) == null ? void 0 : _y.token, (_z = tokens == null ? void 0 : tokens.mailchimp) == null ? void 0 : _z.server);
|
|
9587
|
+
initShopifyClient((_A = tokens == null ? void 0 : tokens.shopify) == null ? void 0 : _A.token, (_B = tokens == null ? void 0 : tokens.shopify) == null ? void 0 : _B.shop);
|
|
9588
|
+
initBigCommerceClient((_C = tokens == null ? void 0 : tokens.bigcommerce) == null ? void 0 : _C.token, (_D = tokens == null ? void 0 : tokens.bigcommerce) == null ? void 0 : _D.shop);
|
|
9589
|
+
initHubspotClient((_E = tokens == null ? void 0 : tokens.hubspot) == null ? void 0 : _E.token);
|
|
9590
|
+
initSlackClient((_F = tokens == null ? void 0 : tokens.slack) == null ? void 0 : _F.token);
|
|
9475
9591
|
api2.isInitialized = true;
|
|
9476
9592
|
}
|
|
9477
9593
|
|
|
@@ -9486,7 +9602,7 @@ function getIntegrationFlowUrlForRedirection(provider, flow, state, context, con
|
|
|
9486
9602
|
}
|
|
9487
9603
|
function getIntegrationFlowUrl(name, flow, trigger, context, state, config) {
|
|
9488
9604
|
return __async(this, null, function* () {
|
|
9489
|
-
const sessionId =
|
|
9605
|
+
const sessionId = generateUuid();
|
|
9490
9606
|
const serializedState = typeof state === "string" ? state : serializerBase64.serialize(state);
|
|
9491
9607
|
const serializedContext = serializerBase64.serialize(__spreadValues(__spreadValues({
|
|
9492
9608
|
state: serializedState,
|
|
@@ -9764,6 +9880,10 @@ export {
|
|
|
9764
9880
|
textClientInstance,
|
|
9765
9881
|
getTextClientConfig,
|
|
9766
9882
|
initTextClient,
|
|
9883
|
+
TextBillingApiError,
|
|
9884
|
+
UnauthorizeTextBillingApiError,
|
|
9885
|
+
textBillingClientInstance,
|
|
9886
|
+
initTextBillingClient,
|
|
9767
9887
|
BigCommerceWebhookScopes,
|
|
9768
9888
|
GitHubWebhookActions,
|
|
9769
9889
|
HubSpotWebhookEventTypes,
|