@livechat/developer-studio-api 5.4.2-beta.generator.28 → 5.6.0-beta.generator.30
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-CUYIP4UJ.mjs → chunk-AVPZPHAU.mjs} +187 -69
- package/dist/index.d.mts +80 -5
- package/dist/index.d.ts +80 -5
- package/dist/index.js +191 -69
- package/dist/index.mjs +9 -1
- package/dist/workflow-contracts.js +29 -0
- package/dist/workflow-contracts.mjs +1 -1
- package/package.json +4 -4
|
@@ -3206,8 +3206,117 @@ var textAiAgentApi = {
|
|
|
3206
3206
|
}
|
|
3207
3207
|
};
|
|
3208
3208
|
|
|
3209
|
-
// 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
|
|
3210
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 = {
|
|
3211
3320
|
getOAuthState: () => "/external-account-manager/v1/oauth/state",
|
|
3212
3321
|
getAccounts: () => "/external-account-manager/v1/accounts"
|
|
3213
3322
|
};
|
|
@@ -3220,7 +3329,7 @@ var textExternalAccountManagerApi = {
|
|
|
3220
3329
|
getOAuthState(accessToken) {
|
|
3221
3330
|
return __async(this, null, function* () {
|
|
3222
3331
|
return textClientInstance.get(
|
|
3223
|
-
|
|
3332
|
+
urls2.getOAuthState(),
|
|
3224
3333
|
getTextClientConfig({
|
|
3225
3334
|
token: accessToken,
|
|
3226
3335
|
ensureAuthorizationToken: true
|
|
@@ -3240,7 +3349,7 @@ var textExternalAccountManagerApi = {
|
|
|
3240
3349
|
getAccounts(authorization) {
|
|
3241
3350
|
return __async(this, null, function* () {
|
|
3242
3351
|
return textClientInstance.get(
|
|
3243
|
-
|
|
3352
|
+
urls2.getAccounts(),
|
|
3244
3353
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
3245
3354
|
ensureAuthorizationToken: true
|
|
3246
3355
|
}))
|
|
@@ -3343,7 +3452,7 @@ var getUrl = (segments = [], version) => buildUrlFromSegments(
|
|
|
3343
3452
|
segments,
|
|
3344
3453
|
`/workflow_platform/${version ? `${version}/` : ""}credentials`
|
|
3345
3454
|
);
|
|
3346
|
-
var
|
|
3455
|
+
var urls3 = {
|
|
3347
3456
|
get: (id) => getUrl([id], "v1.0" /* V1 */),
|
|
3348
3457
|
getList: (queryParams) => enrichUrlWithQueryParams(getUrl([], "v1.0" /* V1 */), queryParams),
|
|
3349
3458
|
create: () => getUrl([], "v1.0" /* V1 */),
|
|
@@ -3355,12 +3464,12 @@ var urls2 = {
|
|
|
3355
3464
|
};
|
|
3356
3465
|
var textPlatformWorkflowsCredentialsApi = {
|
|
3357
3466
|
meta: {
|
|
3358
|
-
urls:
|
|
3467
|
+
urls: urls3
|
|
3359
3468
|
},
|
|
3360
3469
|
get(id, authorization) {
|
|
3361
3470
|
return __async(this, null, function* () {
|
|
3362
3471
|
return textClientInstance.get(
|
|
3363
|
-
|
|
3472
|
+
urls3.get(id),
|
|
3364
3473
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
3365
3474
|
ensureAuthorizationToken: true
|
|
3366
3475
|
}))
|
|
@@ -3377,7 +3486,7 @@ var textPlatformWorkflowsCredentialsApi = {
|
|
|
3377
3486
|
getList(queryParams, authorization) {
|
|
3378
3487
|
return __async(this, null, function* () {
|
|
3379
3488
|
return textClientInstance.get(
|
|
3380
|
-
|
|
3489
|
+
urls3.getList(queryParams),
|
|
3381
3490
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
3382
3491
|
ensureAuthorizationToken: true
|
|
3383
3492
|
}))
|
|
@@ -3394,7 +3503,7 @@ var textPlatformWorkflowsCredentialsApi = {
|
|
|
3394
3503
|
create(payload, authorization) {
|
|
3395
3504
|
return __async(this, null, function* () {
|
|
3396
3505
|
return textClientInstance.post(
|
|
3397
|
-
|
|
3506
|
+
urls3.create(),
|
|
3398
3507
|
payload,
|
|
3399
3508
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
3400
3509
|
ensureAuthorizationToken: true
|
|
@@ -3412,7 +3521,7 @@ var textPlatformWorkflowsCredentialsApi = {
|
|
|
3412
3521
|
update(id, payload, authorization) {
|
|
3413
3522
|
return __async(this, null, function* () {
|
|
3414
3523
|
return textClientInstance.put(
|
|
3415
|
-
|
|
3524
|
+
urls3.update(id),
|
|
3416
3525
|
payload,
|
|
3417
3526
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
3418
3527
|
ensureAuthorizationToken: true
|
|
@@ -3430,7 +3539,7 @@ var textPlatformWorkflowsCredentialsApi = {
|
|
|
3430
3539
|
delete(id, authorization) {
|
|
3431
3540
|
return __async(this, null, function* () {
|
|
3432
3541
|
return textClientInstance.delete(
|
|
3433
|
-
|
|
3542
|
+
urls3.delete(id),
|
|
3434
3543
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
3435
3544
|
ensureAuthorizationToken: true
|
|
3436
3545
|
}))
|
|
@@ -3447,7 +3556,7 @@ var textPlatformWorkflowsCredentialsApi = {
|
|
|
3447
3556
|
connect(id, code, codeVerifier, authorization) {
|
|
3448
3557
|
return __async(this, null, function* () {
|
|
3449
3558
|
return textClientInstance.put(
|
|
3450
|
-
|
|
3559
|
+
urls3.connect(id),
|
|
3451
3560
|
{
|
|
3452
3561
|
code,
|
|
3453
3562
|
code_verifier: codeVerifier
|
|
@@ -3468,7 +3577,7 @@ var textPlatformWorkflowsCredentialsApi = {
|
|
|
3468
3577
|
disconnect(id, authorization) {
|
|
3469
3578
|
return __async(this, null, function* () {
|
|
3470
3579
|
return textClientInstance.put(
|
|
3471
|
-
|
|
3580
|
+
urls3.disconnect(id),
|
|
3472
3581
|
{},
|
|
3473
3582
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
3474
3583
|
ensureAuthorizationToken: true
|
|
@@ -3486,7 +3595,7 @@ var textPlatformWorkflowsCredentialsApi = {
|
|
|
3486
3595
|
importCredential(externalAccountId, authorization) {
|
|
3487
3596
|
return __async(this, null, function* () {
|
|
3488
3597
|
return textClientInstance.post(
|
|
3489
|
-
|
|
3598
|
+
urls3.import(),
|
|
3490
3599
|
{
|
|
3491
3600
|
source: "external_account_manager",
|
|
3492
3601
|
data: {
|
|
@@ -3512,17 +3621,17 @@ var textPlatformWorkflowsCredentialsApi = {
|
|
|
3512
3621
|
|
|
3513
3622
|
// src/apis/integrations/text/platform/workflow/functions/api.ts
|
|
3514
3623
|
var getUrl2 = (segments = []) => buildUrlFromSegments(segments, "/workflow_platform/functions");
|
|
3515
|
-
var
|
|
3624
|
+
var urls4 = {
|
|
3516
3625
|
get: () => getUrl2()
|
|
3517
3626
|
};
|
|
3518
3627
|
var textPlatformWorkflowsFunctionsApi = {
|
|
3519
3628
|
meta: {
|
|
3520
|
-
urls:
|
|
3629
|
+
urls: urls4
|
|
3521
3630
|
},
|
|
3522
3631
|
get(authorization) {
|
|
3523
3632
|
return __async(this, null, function* () {
|
|
3524
3633
|
return textClientInstance.get(
|
|
3525
|
-
|
|
3634
|
+
urls4.get(),
|
|
3526
3635
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
3527
3636
|
ensureAuthorizationToken: true
|
|
3528
3637
|
}))
|
|
@@ -5471,18 +5580,18 @@ var getUrl3 = (segments = [], version) => buildUrlFromSegments(
|
|
|
5471
5580
|
segments,
|
|
5472
5581
|
`/workflow_platform/${version ? `${version}/` : ""}workflows/templates`
|
|
5473
5582
|
);
|
|
5474
|
-
var
|
|
5583
|
+
var urls5 = {
|
|
5475
5584
|
getList: (queryParams) => enrichUrlWithQueryParams(getUrl3([], "v1.0" /* V1 */), queryParams),
|
|
5476
5585
|
get: (templateId) => getUrl3([templateId], "v1.0" /* V1 */)
|
|
5477
5586
|
};
|
|
5478
5587
|
var textPlatformWorkflowsTemplatesApi = {
|
|
5479
5588
|
meta: {
|
|
5480
|
-
urls:
|
|
5589
|
+
urls: urls5
|
|
5481
5590
|
},
|
|
5482
5591
|
getList(queryParams, authorization) {
|
|
5483
5592
|
return __async(this, null, function* () {
|
|
5484
5593
|
return textClientInstance.get(
|
|
5485
|
-
|
|
5594
|
+
urls5.getList(queryParams),
|
|
5486
5595
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
5487
5596
|
ensureAuthorizationToken: true
|
|
5488
5597
|
}))
|
|
@@ -5499,7 +5608,7 @@ var textPlatformWorkflowsTemplatesApi = {
|
|
|
5499
5608
|
get(templateId, authorization) {
|
|
5500
5609
|
return __async(this, null, function* () {
|
|
5501
5610
|
return textClientInstance.get(
|
|
5502
|
-
|
|
5611
|
+
urls5.get(templateId),
|
|
5503
5612
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
5504
5613
|
ensureAuthorizationToken: true
|
|
5505
5614
|
}))
|
|
@@ -5517,7 +5626,7 @@ var textPlatformWorkflowsTemplatesApi = {
|
|
|
5517
5626
|
|
|
5518
5627
|
// src/apis/integrations/text/platform/workflow/workflows/internal/crm/api.ts
|
|
5519
5628
|
var getUrl4 = (segments = []) => buildUrlFromSegments(segments, "/internal/crm");
|
|
5520
|
-
var
|
|
5629
|
+
var urls6 = {
|
|
5521
5630
|
getOrganizations: (queryParams) => enrichUrlWithQueryParams(getUrl4(["stats"]), queryParams),
|
|
5522
5631
|
getOrganization: (organizationId) => getUrl4(["stats", organizationId]),
|
|
5523
5632
|
getWorkflows: (queryParams) => enrichUrlWithQueryParams(getUrl4(["workflows"]), queryParams),
|
|
@@ -5531,12 +5640,12 @@ var urls5 = {
|
|
|
5531
5640
|
};
|
|
5532
5641
|
var textPlatformWorkflowsInternalCrmApi = {
|
|
5533
5642
|
meta: {
|
|
5534
|
-
urls:
|
|
5643
|
+
urls: urls6
|
|
5535
5644
|
},
|
|
5536
5645
|
getOrganizations(queryParams, authorization) {
|
|
5537
5646
|
return __async(this, null, function* () {
|
|
5538
5647
|
const { data: organizations } = yield textClientInstance.get(
|
|
5539
|
-
|
|
5648
|
+
urls6.getOrganizations(queryParams),
|
|
5540
5649
|
getWorkflowApiCrmConfig(authorization)
|
|
5541
5650
|
);
|
|
5542
5651
|
return organizations;
|
|
@@ -5545,7 +5654,7 @@ var textPlatformWorkflowsInternalCrmApi = {
|
|
|
5545
5654
|
getOrganization(organizationId, authorization) {
|
|
5546
5655
|
return __async(this, null, function* () {
|
|
5547
5656
|
const { data: organization } = yield textClientInstance.get(
|
|
5548
|
-
|
|
5657
|
+
urls6.getOrganization(organizationId),
|
|
5549
5658
|
getWorkflowApiCrmConfig(authorization)
|
|
5550
5659
|
);
|
|
5551
5660
|
return organization;
|
|
@@ -5553,7 +5662,7 @@ var textPlatformWorkflowsInternalCrmApi = {
|
|
|
5553
5662
|
},
|
|
5554
5663
|
getWorkflows(queryParams, authorization) {
|
|
5555
5664
|
return __async(this, null, function* () {
|
|
5556
|
-
const { data: workflows } = yield textClientInstance.get(
|
|
5665
|
+
const { data: workflows } = yield textClientInstance.get(urls6.getWorkflows(queryParams), getWorkflowApiCrmConfig(authorization));
|
|
5557
5666
|
workflows.data = workflows.data.map(enrichWorkflowTrigger);
|
|
5558
5667
|
return workflows;
|
|
5559
5668
|
});
|
|
@@ -5563,7 +5672,7 @@ var textPlatformWorkflowsInternalCrmApi = {
|
|
|
5563
5672
|
const searchParams = new URLSearchParams();
|
|
5564
5673
|
const query = searchParams.toString();
|
|
5565
5674
|
const { data: workflow } = yield textClientInstance.get(
|
|
5566
|
-
`${
|
|
5675
|
+
`${urls6.getWorkflow(workflowId)}${query ? `?${query}` : ""}`,
|
|
5567
5676
|
getWorkflowApiCrmConfig(authorization)
|
|
5568
5677
|
);
|
|
5569
5678
|
return enrichWorkflowTrigger(workflow);
|
|
@@ -5572,7 +5681,7 @@ var textPlatformWorkflowsInternalCrmApi = {
|
|
|
5572
5681
|
getWorkflowExecutions(workflowId, queryParams, authorization) {
|
|
5573
5682
|
return __async(this, null, function* () {
|
|
5574
5683
|
const { data: executions } = yield textClientInstance.get(
|
|
5575
|
-
|
|
5684
|
+
urls6.getWorkflowExecutions(workflowId, queryParams),
|
|
5576
5685
|
getWorkflowApiCrmConfig(authorization)
|
|
5577
5686
|
);
|
|
5578
5687
|
return executions;
|
|
@@ -5581,7 +5690,7 @@ var textPlatformWorkflowsInternalCrmApi = {
|
|
|
5581
5690
|
getWorkflowExecution(workflowId, executionId, authorization) {
|
|
5582
5691
|
return __async(this, null, function* () {
|
|
5583
5692
|
const { data: execution } = yield textClientInstance.get(
|
|
5584
|
-
|
|
5693
|
+
urls6.getWorkflowExecution(workflowId, executionId),
|
|
5585
5694
|
getWorkflowApiCrmConfig(authorization)
|
|
5586
5695
|
);
|
|
5587
5696
|
return execution;
|
|
@@ -5595,7 +5704,7 @@ var textPlatformWorkflowsInternalCrmApi = {
|
|
|
5595
5704
|
}
|
|
5596
5705
|
const query = searchParams.toString();
|
|
5597
5706
|
const { data: introspection } = yield textClientInstance.get(
|
|
5598
|
-
`${
|
|
5707
|
+
`${urls6.getWorkflowIntrospection(workflowId)}${query ? `?${query}` : ""}`,
|
|
5599
5708
|
getWorkflowApiCrmConfig(authorization)
|
|
5600
5709
|
);
|
|
5601
5710
|
return {
|
|
@@ -5639,7 +5748,7 @@ var getUrl5 = (segments = [], version) => buildUrlFromSegments(
|
|
|
5639
5748
|
segments,
|
|
5640
5749
|
`/workflow_platform/${version ? `${version}/` : ""}workflows`
|
|
5641
5750
|
);
|
|
5642
|
-
var
|
|
5751
|
+
var urls7 = {
|
|
5643
5752
|
getWorkflows: (queryParams) => enrichUrlWithQueryParams(getUrl5([], "v1.0" /* V1 */), queryParams),
|
|
5644
5753
|
createWorkflow: () => getUrl5(),
|
|
5645
5754
|
getWorkflow: (id) => getUrl5([id], "v1.0" /* V1 */),
|
|
@@ -5660,12 +5769,12 @@ var urls6 = {
|
|
|
5660
5769
|
var textPlatformWorkflowsApi = {
|
|
5661
5770
|
internal: textPlatformWorkflowsInternalApi,
|
|
5662
5771
|
meta: {
|
|
5663
|
-
urls:
|
|
5772
|
+
urls: urls7
|
|
5664
5773
|
},
|
|
5665
5774
|
getWorkflows(queryParams, authorization) {
|
|
5666
5775
|
return __async(this, null, function* () {
|
|
5667
5776
|
const { data: workflows } = yield textClientInstance.get(
|
|
5668
|
-
|
|
5777
|
+
urls7.getWorkflows(queryParams),
|
|
5669
5778
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
5670
5779
|
ensureAuthorizationToken: true
|
|
5671
5780
|
}))
|
|
@@ -5682,7 +5791,7 @@ var textPlatformWorkflowsApi = {
|
|
|
5682
5791
|
}
|
|
5683
5792
|
const query = searchParams.toString();
|
|
5684
5793
|
const { data: workflow } = yield textClientInstance.get(
|
|
5685
|
-
`${
|
|
5794
|
+
`${urls7.getWorkflow(workflowId)}${query ? `?${query}` : ""}`,
|
|
5686
5795
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
5687
5796
|
ensureAuthorizationToken: true
|
|
5688
5797
|
}))
|
|
@@ -5693,7 +5802,7 @@ var textPlatformWorkflowsApi = {
|
|
|
5693
5802
|
createWorkflow(payload, authorization) {
|
|
5694
5803
|
return __async(this, null, function* () {
|
|
5695
5804
|
return textClientInstance.post(
|
|
5696
|
-
|
|
5805
|
+
urls7.createWorkflow(),
|
|
5697
5806
|
__spreadProps(__spreadValues({}, payload), {
|
|
5698
5807
|
trigger: payload.trigger || {}
|
|
5699
5808
|
}),
|
|
@@ -5706,7 +5815,7 @@ var textPlatformWorkflowsApi = {
|
|
|
5706
5815
|
updateWorkflow(workflowId, payload, authorization) {
|
|
5707
5816
|
return __async(this, null, function* () {
|
|
5708
5817
|
return textClientInstance.put(
|
|
5709
|
-
|
|
5818
|
+
urls7.updateWorkflow(workflowId),
|
|
5710
5819
|
__spreadProps(__spreadValues({}, payload), {
|
|
5711
5820
|
trigger: payload.trigger || {}
|
|
5712
5821
|
}),
|
|
@@ -5718,7 +5827,7 @@ var textPlatformWorkflowsApi = {
|
|
|
5718
5827
|
},
|
|
5719
5828
|
deleteWorkflow(workflowId, authorization) {
|
|
5720
5829
|
return __async(this, null, function* () {
|
|
5721
|
-
return textClientInstance.delete(
|
|
5830
|
+
return textClientInstance.delete(urls7.deleteWorkflow(workflowId), __spreadValues({}, getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
5722
5831
|
ensureAuthorizationToken: true
|
|
5723
5832
|
}))));
|
|
5724
5833
|
});
|
|
@@ -5726,7 +5835,7 @@ var textPlatformWorkflowsApi = {
|
|
|
5726
5835
|
createWorkflowDraft(workflowId, payload, authorization) {
|
|
5727
5836
|
return __async(this, null, function* () {
|
|
5728
5837
|
return textClientInstance.post(
|
|
5729
|
-
|
|
5838
|
+
urls7.createWorkflowDraft(workflowId),
|
|
5730
5839
|
__spreadProps(__spreadValues({}, payload), {
|
|
5731
5840
|
trigger: payload.trigger || {}
|
|
5732
5841
|
}),
|
|
@@ -5739,7 +5848,7 @@ var textPlatformWorkflowsApi = {
|
|
|
5739
5848
|
publishWorkflowDraft(workflowId, authorization) {
|
|
5740
5849
|
return __async(this, null, function* () {
|
|
5741
5850
|
return textClientInstance.post(
|
|
5742
|
-
|
|
5851
|
+
urls7.publishWorkflowDraft(workflowId),
|
|
5743
5852
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
5744
5853
|
ensureAuthorizationToken: true
|
|
5745
5854
|
}))
|
|
@@ -5749,7 +5858,7 @@ var textPlatformWorkflowsApi = {
|
|
|
5749
5858
|
toggleWorkflowActivation(workflowId, isActive, authorization) {
|
|
5750
5859
|
return __async(this, null, function* () {
|
|
5751
5860
|
return textClientInstance.put(
|
|
5752
|
-
|
|
5861
|
+
urls7.toggleWorkflowActivation(workflowId),
|
|
5753
5862
|
{
|
|
5754
5863
|
active: isActive
|
|
5755
5864
|
},
|
|
@@ -5762,7 +5871,7 @@ var textPlatformWorkflowsApi = {
|
|
|
5762
5871
|
executeWorkflow(workflowId, input, authorization) {
|
|
5763
5872
|
return __async(this, null, function* () {
|
|
5764
5873
|
const { data: execution } = yield textClientInstance.post(
|
|
5765
|
-
|
|
5874
|
+
urls7.executeWorkflow(workflowId),
|
|
5766
5875
|
{
|
|
5767
5876
|
input
|
|
5768
5877
|
},
|
|
@@ -5776,7 +5885,7 @@ var textPlatformWorkflowsApi = {
|
|
|
5776
5885
|
getWorkflowExecutions(workflowId, queryParams, authorization) {
|
|
5777
5886
|
return __async(this, null, function* () {
|
|
5778
5887
|
const { data: executions } = yield textClientInstance.get(
|
|
5779
|
-
|
|
5888
|
+
urls7.getWorkflowExecutions(workflowId, queryParams),
|
|
5780
5889
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
5781
5890
|
ensureAuthorizationToken: true
|
|
5782
5891
|
}))
|
|
@@ -5787,7 +5896,7 @@ var textPlatformWorkflowsApi = {
|
|
|
5787
5896
|
getWorkflowExecution(workflowId, executionId, authorization) {
|
|
5788
5897
|
return __async(this, null, function* () {
|
|
5789
5898
|
const { data: execution } = yield textClientInstance.get(
|
|
5790
|
-
|
|
5899
|
+
urls7.getWorkflowExecution(workflowId, executionId),
|
|
5791
5900
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
5792
5901
|
ensureAuthorizationToken: true
|
|
5793
5902
|
}))
|
|
@@ -5803,7 +5912,7 @@ var textPlatformWorkflowsApi = {
|
|
|
5803
5912
|
}
|
|
5804
5913
|
const query = searchParams.toString();
|
|
5805
5914
|
const { data: introspection } = yield textClientInstance.get(
|
|
5806
|
-
`${
|
|
5915
|
+
`${urls7.getWorkflowIntrospection(workflowId)}${query ? `?${query}` : ""}`,
|
|
5807
5916
|
getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
5808
5917
|
ensureAuthorizationToken: true
|
|
5809
5918
|
}))
|
|
@@ -5816,7 +5925,7 @@ var textPlatformWorkflowsApi = {
|
|
|
5816
5925
|
introspectWorkflowTask(workflowId, payload, authorization) {
|
|
5817
5926
|
return __async(this, null, function* () {
|
|
5818
5927
|
const response = yield textClientInstance.post(
|
|
5819
|
-
|
|
5928
|
+
urls7.introspectWorkflowTask(workflowId),
|
|
5820
5929
|
{
|
|
5821
5930
|
task_reference_name: payload.taskReferenceName,
|
|
5822
5931
|
input_parameters: payload.inputParameters
|
|
@@ -5855,7 +5964,7 @@ var buildResourcePath = ({ provider, domain, name }) => {
|
|
|
5855
5964
|
}
|
|
5856
5965
|
return [targetProvider, domain, name].filter(notEmpty).join("/");
|
|
5857
5966
|
};
|
|
5858
|
-
var
|
|
5967
|
+
var urls8 = {
|
|
5859
5968
|
listSchema: () => "/workflow_resources/schema",
|
|
5860
5969
|
getSchema: (provider) => `/workflow_resources/schema/${provider}`,
|
|
5861
5970
|
getResource: (resource) => `/workflow_resources/resources/${buildResourcePath(resource)}`
|
|
@@ -5866,7 +5975,7 @@ var textResourcerApi = {
|
|
|
5866
5975
|
const config = getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
5867
5976
|
ensureAuthorizationToken: true
|
|
5868
5977
|
}));
|
|
5869
|
-
return textClientInstance.get(
|
|
5978
|
+
return textClientInstance.get(urls8.getResource(resource), __spreadProps(__spreadValues({}, config), {
|
|
5870
5979
|
headers: __spreadProps(__spreadValues({}, config.headers), {
|
|
5871
5980
|
"X-Credential-ID": credentialId
|
|
5872
5981
|
})
|
|
@@ -5885,7 +5994,7 @@ var textResourcerApi = {
|
|
|
5885
5994
|
const config = getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
5886
5995
|
ensureAuthorizationToken: true
|
|
5887
5996
|
}));
|
|
5888
|
-
return textClientInstance.get(
|
|
5997
|
+
return textClientInstance.get(urls8.listSchema(), __spreadProps(__spreadValues({}, config), {
|
|
5889
5998
|
headers: __spreadProps(__spreadValues({}, config.headers), {
|
|
5890
5999
|
"X-Credential-ID": credentialId
|
|
5891
6000
|
})
|
|
@@ -5904,7 +6013,7 @@ var textResourcerApi = {
|
|
|
5904
6013
|
const config = getTextClientConfig(__spreadProps(__spreadValues({}, authorization), {
|
|
5905
6014
|
ensureAuthorizationToken: true
|
|
5906
6015
|
}));
|
|
5907
|
-
return textClientInstance.get(
|
|
6016
|
+
return textClientInstance.get(urls8.getSchema(provider), __spreadProps(__spreadValues({}, config), {
|
|
5908
6017
|
headers: __spreadProps(__spreadValues({}, config.headers), {
|
|
5909
6018
|
"X-Credential-ID": credentialId
|
|
5910
6019
|
})
|
|
@@ -5924,6 +6033,7 @@ var textResourcerApi = {
|
|
|
5924
6033
|
var textApi = {
|
|
5925
6034
|
platform: textPlatformApi,
|
|
5926
6035
|
ai: textAiAgentApi,
|
|
6036
|
+
billing: textBillingApi,
|
|
5927
6037
|
externalAccountManager: textExternalAccountManagerApi,
|
|
5928
6038
|
resourcer: textResourcerApi
|
|
5929
6039
|
};
|
|
@@ -6227,7 +6337,7 @@ var integrationsApi = {
|
|
|
6227
6337
|
};
|
|
6228
6338
|
|
|
6229
6339
|
// src/apis/platform/accounts/accounts/api.ts
|
|
6230
|
-
var
|
|
6340
|
+
var urls9 = (withBaseUrl = false) => {
|
|
6231
6341
|
const getUrl7 = (segments = []) => buildUrlFromSegments(
|
|
6232
6342
|
segments,
|
|
6233
6343
|
"/v2/accounts",
|
|
@@ -6243,7 +6353,7 @@ var api = {
|
|
|
6243
6353
|
getAccounts(authorization) {
|
|
6244
6354
|
return __async(this, null, function* () {
|
|
6245
6355
|
return platformAccountsClientInstance.get(
|
|
6246
|
-
|
|
6356
|
+
urls9().getAccounts(),
|
|
6247
6357
|
{
|
|
6248
6358
|
authorization,
|
|
6249
6359
|
customErrorMessage: "Accounts couldn't be fetched."
|
|
@@ -6254,7 +6364,7 @@ var api = {
|
|
|
6254
6364
|
getAccount(accountId, authorization) {
|
|
6255
6365
|
return __async(this, null, function* () {
|
|
6256
6366
|
return platformAccountsClientInstance.get(
|
|
6257
|
-
|
|
6367
|
+
urls9().getAccount(accountId),
|
|
6258
6368
|
{
|
|
6259
6369
|
authorization,
|
|
6260
6370
|
customErrorMessage: "Account couldn't be fetched."
|
|
@@ -6276,7 +6386,7 @@ var api = {
|
|
|
6276
6386
|
};
|
|
6277
6387
|
var platformAccountsAccountApi = __spreadProps(__spreadValues({}, api), {
|
|
6278
6388
|
meta: {
|
|
6279
|
-
urls:
|
|
6389
|
+
urls: urls9
|
|
6280
6390
|
}
|
|
6281
6391
|
});
|
|
6282
6392
|
|
|
@@ -6442,18 +6552,18 @@ var platformAccountsPersonalAccessTokenApi = {
|
|
|
6442
6552
|
|
|
6443
6553
|
// src/apis/platform/accounts/products/api.ts
|
|
6444
6554
|
var getUrl6 = (segments = []) => buildUrlFromSegments(segments, "/v2/organizations");
|
|
6445
|
-
var
|
|
6555
|
+
var urls10 = {
|
|
6446
6556
|
getOrganizationProducts: () => getUrl6(["my", "products"]),
|
|
6447
6557
|
updateOrganizationProducts: () => getUrl6(["my", "products"])
|
|
6448
6558
|
};
|
|
6449
6559
|
var platformAccountsProductsApi = {
|
|
6450
6560
|
meta: {
|
|
6451
|
-
urls:
|
|
6561
|
+
urls: urls10
|
|
6452
6562
|
},
|
|
6453
6563
|
getOrganizationProducts(authorization) {
|
|
6454
6564
|
return __async(this, null, function* () {
|
|
6455
6565
|
return platformAccountsClientInstance.get(
|
|
6456
|
-
|
|
6566
|
+
urls10.getOrganizationProducts(),
|
|
6457
6567
|
{ authorization, customErrorMessage: "Products couldn't be fetched." }
|
|
6458
6568
|
);
|
|
6459
6569
|
});
|
|
@@ -6461,7 +6571,7 @@ var platformAccountsProductsApi = {
|
|
|
6461
6571
|
updateOrganizationProducts(payload, authorization) {
|
|
6462
6572
|
return __async(this, null, function* () {
|
|
6463
6573
|
return platformAccountsClientInstance.post(
|
|
6464
|
-
|
|
6574
|
+
urls10.updateOrganizationProducts(),
|
|
6465
6575
|
payload,
|
|
6466
6576
|
{ authorization, customErrorMessage: "Products couldn't be updated." }
|
|
6467
6577
|
);
|
|
@@ -9424,7 +9534,7 @@ var api2 = {
|
|
|
9424
9534
|
isInitialized: false
|
|
9425
9535
|
};
|
|
9426
9536
|
function initApi(config, tokens) {
|
|
9427
|
-
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;
|
|
9428
9538
|
initPlatformAccountsClient(
|
|
9429
9539
|
(_a = config.urls.platform) == null ? void 0 : _a.accounts,
|
|
9430
9540
|
(_b = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _b.token
|
|
@@ -9444,14 +9554,18 @@ function initApi(config, tokens) {
|
|
|
9444
9554
|
initLiveChatClient((_h = config.urls.products) == null ? void 0 : _h.livechat, (_i = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _i.token);
|
|
9445
9555
|
initHelpDeskClient((_j = config.urls.products) == null ? void 0 : _j.helpdesk, (_k = tokens == null ? void 0 : tokens.platform) == null ? void 0 : _k.token);
|
|
9446
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
|
+
);
|
|
9447
9561
|
initWorkflowsClient(
|
|
9448
|
-
(
|
|
9562
|
+
(_q = (_p = config.urls.textIntelligence) == null ? void 0 : _p.workflows) == null ? void 0 : _q.workflows,
|
|
9449
9563
|
tokens ? {
|
|
9450
9564
|
platform: tokens.platform
|
|
9451
9565
|
} : void 0
|
|
9452
9566
|
);
|
|
9453
9567
|
initAdapterClient(
|
|
9454
|
-
(
|
|
9568
|
+
(_s = (_r = config.urls.textIntelligence) == null ? void 0 : _r.workflows) == null ? void 0 : _s.adapter,
|
|
9455
9569
|
tokens ? {
|
|
9456
9570
|
platform: tokens.platform,
|
|
9457
9571
|
github: tokens.github,
|
|
@@ -9464,16 +9578,16 @@ function initApi(config, tokens) {
|
|
|
9464
9578
|
slack: tokens.slack
|
|
9465
9579
|
} : void 0
|
|
9466
9580
|
);
|
|
9467
|
-
initGithubClient((
|
|
9468
|
-
initNetlifyClient((
|
|
9469
|
-
initVercelClient((
|
|
9470
|
-
initNeonClient((
|
|
9471
|
-
initPlanetScaleClient((
|
|
9472
|
-
initMailchimpClient((
|
|
9473
|
-
initShopifyClient((
|
|
9474
|
-
initBigCommerceClient((
|
|
9475
|
-
initHubspotClient((
|
|
9476
|
-
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);
|
|
9477
9591
|
api2.isInitialized = true;
|
|
9478
9592
|
}
|
|
9479
9593
|
|
|
@@ -9766,6 +9880,10 @@ export {
|
|
|
9766
9880
|
textClientInstance,
|
|
9767
9881
|
getTextClientConfig,
|
|
9768
9882
|
initTextClient,
|
|
9883
|
+
TextBillingApiError,
|
|
9884
|
+
UnauthorizeTextBillingApiError,
|
|
9885
|
+
textBillingClientInstance,
|
|
9886
|
+
initTextBillingClient,
|
|
9769
9887
|
BigCommerceWebhookScopes,
|
|
9770
9888
|
GitHubWebhookActions,
|
|
9771
9889
|
HubSpotWebhookEventTypes,
|