@botpress/api 0.15.6 → 0.15.8
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/gen/state.d.ts +88 -13
- package/dist/index.d.ts +5 -3
- package/dist/index.js +314 -197
- package/package.json +2 -2
- package/src/gen/metadata.json +1 -1
- package/src/gen/openapi.json +1 -1
- package/src/gen/state.ts +137 -59
- package/src/index.ts +1 -0
package/src/gen/state.ts
CHANGED
|
@@ -1,7 +1,40 @@
|
|
|
1
1
|
// This file was generated by the Opapi Generator
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/* prettier-ignore */
|
|
4
|
-
import
|
|
4
|
+
import * as opapi from "@bpinternal/opapi";
|
|
5
|
+
export type State = opapi.State<
|
|
6
|
+
| "Bot"
|
|
7
|
+
| "Integration"
|
|
8
|
+
| "Workspace"
|
|
9
|
+
| "WorkspaceMember"
|
|
10
|
+
| "Account"
|
|
11
|
+
| "Usage"
|
|
12
|
+
| "Issue"
|
|
13
|
+
| "IssueEvent"
|
|
14
|
+
| "User"
|
|
15
|
+
| "Conversation"
|
|
16
|
+
| "Event"
|
|
17
|
+
| "Message"
|
|
18
|
+
| "State"
|
|
19
|
+
| "File",
|
|
20
|
+
never,
|
|
21
|
+
| "user"
|
|
22
|
+
| "conversation"
|
|
23
|
+
| "event"
|
|
24
|
+
| "message"
|
|
25
|
+
| "file"
|
|
26
|
+
| "state"
|
|
27
|
+
| "hub"
|
|
28
|
+
| "action"
|
|
29
|
+
| "bot"
|
|
30
|
+
| "integration"
|
|
31
|
+
| "workspace"
|
|
32
|
+
| "workspaceMember"
|
|
33
|
+
| "account"
|
|
34
|
+
| "usage"
|
|
35
|
+
| "quotas"
|
|
36
|
+
| "helper"
|
|
37
|
+
>;
|
|
5
38
|
export const state = {
|
|
6
39
|
operations: {
|
|
7
40
|
createConversation: {
|
|
@@ -1496,6 +1529,51 @@ export const state = {
|
|
|
1496
1529
|
},
|
|
1497
1530
|
parameters: {},
|
|
1498
1531
|
},
|
|
1532
|
+
runVrl: {
|
|
1533
|
+
name: "runVrl",
|
|
1534
|
+
description: "Run a VRL script",
|
|
1535
|
+
method: "post",
|
|
1536
|
+
path: "/v1/admin/helper/vrl",
|
|
1537
|
+
section: "helper",
|
|
1538
|
+
requestBody: {
|
|
1539
|
+
description: "VRL script",
|
|
1540
|
+
schema: {
|
|
1541
|
+
type: "object",
|
|
1542
|
+
properties: {
|
|
1543
|
+
data: {
|
|
1544
|
+
type: "object",
|
|
1545
|
+
additionalProperties: true,
|
|
1546
|
+
},
|
|
1547
|
+
script: {
|
|
1548
|
+
type: "string",
|
|
1549
|
+
},
|
|
1550
|
+
},
|
|
1551
|
+
required: ["data", "script"],
|
|
1552
|
+
title: "runVrlBody",
|
|
1553
|
+
additionalProperties: false,
|
|
1554
|
+
},
|
|
1555
|
+
},
|
|
1556
|
+
response: {
|
|
1557
|
+
description: "Success",
|
|
1558
|
+
schema: {
|
|
1559
|
+
type: "object",
|
|
1560
|
+
properties: {
|
|
1561
|
+
data: {
|
|
1562
|
+
type: "object",
|
|
1563
|
+
additionalProperties: true,
|
|
1564
|
+
},
|
|
1565
|
+
result: {
|
|
1566
|
+
type: "object",
|
|
1567
|
+
additionalProperties: true,
|
|
1568
|
+
},
|
|
1569
|
+
},
|
|
1570
|
+
required: ["data", "result"],
|
|
1571
|
+
title: "runVrlResponse",
|
|
1572
|
+
additionalProperties: false,
|
|
1573
|
+
},
|
|
1574
|
+
},
|
|
1575
|
+
parameters: {},
|
|
1576
|
+
},
|
|
1499
1577
|
getAccount: {
|
|
1500
1578
|
name: "getAccount",
|
|
1501
1579
|
description:
|
|
@@ -2367,11 +2445,6 @@ export const state = {
|
|
|
2367
2445
|
},
|
|
2368
2446
|
description: "Media files associated with the [Bot](#schema_bot)",
|
|
2369
2447
|
},
|
|
2370
|
-
alwaysAlive: {
|
|
2371
|
-
type: "boolean",
|
|
2372
|
-
description:
|
|
2373
|
-
"Indicates if the [Bot](#schema_bot) should be executed in accelerated mode",
|
|
2374
|
-
},
|
|
2375
2448
|
},
|
|
2376
2449
|
title: "updateBotBody",
|
|
2377
2450
|
additionalProperties: false,
|
|
@@ -3499,7 +3572,6 @@ export const state = {
|
|
|
3499
3572
|
"ai_spend",
|
|
3500
3573
|
"openai_spend",
|
|
3501
3574
|
"bing_search_spend",
|
|
3502
|
-
"always_alive",
|
|
3503
3575
|
],
|
|
3504
3576
|
required: true,
|
|
3505
3577
|
},
|
|
@@ -3560,7 +3632,6 @@ export const state = {
|
|
|
3560
3632
|
"ai_spend",
|
|
3561
3633
|
"openai_spend",
|
|
3562
3634
|
"bing_search_spend",
|
|
3563
|
-
"always_alive",
|
|
3564
3635
|
],
|
|
3565
3636
|
required: true,
|
|
3566
3637
|
},
|
|
@@ -3598,6 +3669,52 @@ export const state = {
|
|
|
3598
3669
|
},
|
|
3599
3670
|
},
|
|
3600
3671
|
},
|
|
3672
|
+
getAllWorkspaceQuotaCompletion: {
|
|
3673
|
+
name: "getAllWorkspaceQuotaCompletion",
|
|
3674
|
+
description:
|
|
3675
|
+
"For a user, gets a map of workspace IDs to their highest quota completion rate",
|
|
3676
|
+
section: "workspace",
|
|
3677
|
+
method: "get",
|
|
3678
|
+
path: "/v1/admin/workspaces/usages/quota-completion",
|
|
3679
|
+
disableDefaultParameters: {
|
|
3680
|
+
"x-workspace-id": true,
|
|
3681
|
+
},
|
|
3682
|
+
response: {
|
|
3683
|
+
description: "Success",
|
|
3684
|
+
schema: {
|
|
3685
|
+
type: "object",
|
|
3686
|
+
additionalProperties: {
|
|
3687
|
+
type: "object",
|
|
3688
|
+
properties: {
|
|
3689
|
+
type: {
|
|
3690
|
+
type: "string",
|
|
3691
|
+
enum: [
|
|
3692
|
+
"invocation_timeout",
|
|
3693
|
+
"invocation_calls",
|
|
3694
|
+
"storage_count",
|
|
3695
|
+
"bot_count",
|
|
3696
|
+
"knowledgebase_vector_storage",
|
|
3697
|
+
"workspace_ratelimit",
|
|
3698
|
+
"table_row_count",
|
|
3699
|
+
"workspace_member_count",
|
|
3700
|
+
"integrations_owned_count",
|
|
3701
|
+
"ai_spend",
|
|
3702
|
+
"openai_spend",
|
|
3703
|
+
"bing_search_spend",
|
|
3704
|
+
],
|
|
3705
|
+
},
|
|
3706
|
+
completion: {
|
|
3707
|
+
type: "number",
|
|
3708
|
+
},
|
|
3709
|
+
},
|
|
3710
|
+
required: ["type", "completion"],
|
|
3711
|
+
additionalProperties: false,
|
|
3712
|
+
},
|
|
3713
|
+
title: "getAllWorkspaceQuotaCompletionResponse",
|
|
3714
|
+
},
|
|
3715
|
+
},
|
|
3716
|
+
parameters: {},
|
|
3717
|
+
},
|
|
3601
3718
|
getWorkspaceQuota: {
|
|
3602
3719
|
name: "getWorkspaceQuota",
|
|
3603
3720
|
description: "Get workspace quota",
|
|
@@ -3630,7 +3747,6 @@ export const state = {
|
|
|
3630
3747
|
"ai_spend",
|
|
3631
3748
|
"openai_spend",
|
|
3632
3749
|
"bing_search_spend",
|
|
3633
|
-
"always_alive",
|
|
3634
3750
|
],
|
|
3635
3751
|
required: true,
|
|
3636
3752
|
},
|
|
@@ -3672,7 +3788,6 @@ export const state = {
|
|
|
3672
3788
|
"ai_spend",
|
|
3673
3789
|
"openai_spend",
|
|
3674
3790
|
"bing_search_spend",
|
|
3675
|
-
"always_alive",
|
|
3676
3791
|
],
|
|
3677
3792
|
description: "Usage type that can be used",
|
|
3678
3793
|
},
|
|
@@ -3742,7 +3857,6 @@ export const state = {
|
|
|
3742
3857
|
"ai_spend",
|
|
3743
3858
|
"openai_spend",
|
|
3744
3859
|
"bing_search_spend",
|
|
3745
|
-
"always_alive",
|
|
3746
3860
|
],
|
|
3747
3861
|
description: "Usage type that can be used",
|
|
3748
3862
|
},
|
|
@@ -5435,7 +5549,6 @@ export const state = {
|
|
|
5435
5549
|
"ai_spend",
|
|
5436
5550
|
"openai_spend",
|
|
5437
5551
|
"bing_search_spend",
|
|
5438
|
-
"always_alive",
|
|
5439
5552
|
],
|
|
5440
5553
|
required: true,
|
|
5441
5554
|
},
|
|
@@ -5490,7 +5603,6 @@ export const state = {
|
|
|
5490
5603
|
"ai_spend",
|
|
5491
5604
|
"openai_spend",
|
|
5492
5605
|
"bing_search_spend",
|
|
5493
|
-
"always_alive",
|
|
5494
5606
|
],
|
|
5495
5607
|
required: true,
|
|
5496
5608
|
},
|
|
@@ -5770,7 +5882,7 @@ export const state = {
|
|
|
5770
5882
|
title: "Botpress API",
|
|
5771
5883
|
description: "API for Botpress Cloud",
|
|
5772
5884
|
server: "https://api.botpress.cloud",
|
|
5773
|
-
version: "0.15.
|
|
5885
|
+
version: "0.15.8",
|
|
5774
5886
|
prefix: "v1",
|
|
5775
5887
|
},
|
|
5776
5888
|
errors: [
|
|
@@ -5907,6 +6019,7 @@ export const state = {
|
|
|
5907
6019
|
patchStateBody: true,
|
|
5908
6020
|
callActionBody: true,
|
|
5909
6021
|
configureIntegrationBody: true,
|
|
6022
|
+
runVrlBody: true,
|
|
5910
6023
|
createPersonalAccessTokenBody: true,
|
|
5911
6024
|
createBotBody: true,
|
|
5912
6025
|
updateBotBody: true,
|
|
@@ -5955,6 +6068,7 @@ export const state = {
|
|
|
5955
6068
|
patchStateResponse: true,
|
|
5956
6069
|
callActionResponse: true,
|
|
5957
6070
|
configureIntegrationResponse: true,
|
|
6071
|
+
runVrlResponse: true,
|
|
5958
6072
|
getAccountResponse: true,
|
|
5959
6073
|
listPersonalAccessTokensResponse: true,
|
|
5960
6074
|
createPersonalAccessTokenResponse: true,
|
|
@@ -5982,6 +6096,7 @@ export const state = {
|
|
|
5982
6096
|
getWorkspaceResponse: true,
|
|
5983
6097
|
listWorkspaceUsagesResponse: true,
|
|
5984
6098
|
breakDownWorkspaceUsageByBotResponse: true,
|
|
6099
|
+
getAllWorkspaceQuotaCompletionResponse: true,
|
|
5985
6100
|
getWorkspaceQuotaResponse: true,
|
|
5986
6101
|
listWorkspaceQuotasResponse: true,
|
|
5987
6102
|
updateWorkspaceResponse: true,
|
|
@@ -6384,16 +6499,6 @@ export const state = {
|
|
|
6384
6499
|
type: "string",
|
|
6385
6500
|
description: "Id of the user that created the bot",
|
|
6386
6501
|
},
|
|
6387
|
-
alwaysAlive: {
|
|
6388
|
-
type: "boolean",
|
|
6389
|
-
description:
|
|
6390
|
-
"Indicates if the [Bot](#schema_bot) should be executed in accelerated mode",
|
|
6391
|
-
},
|
|
6392
|
-
status: {
|
|
6393
|
-
type: "string",
|
|
6394
|
-
enum: ["active", "deploying"],
|
|
6395
|
-
description: "Status of the bot",
|
|
6396
|
-
},
|
|
6397
6502
|
medias: {
|
|
6398
6503
|
type: "array",
|
|
6399
6504
|
items: {
|
|
@@ -6428,8 +6533,6 @@ export const state = {
|
|
|
6428
6533
|
"recurringEvents",
|
|
6429
6534
|
"name",
|
|
6430
6535
|
"dev",
|
|
6431
|
-
"alwaysAlive",
|
|
6432
|
-
"status",
|
|
6433
6536
|
"medias",
|
|
6434
6537
|
],
|
|
6435
6538
|
additionalProperties: false,
|
|
@@ -6976,7 +7079,6 @@ export const state = {
|
|
|
6976
7079
|
"ai_spend",
|
|
6977
7080
|
"openai_spend",
|
|
6978
7081
|
"bing_search_spend",
|
|
6979
|
-
"always_alive",
|
|
6980
7082
|
],
|
|
6981
7083
|
description: "Usage type that can be used",
|
|
6982
7084
|
},
|
|
@@ -7570,6 +7672,7 @@ export const state = {
|
|
|
7570
7672
|
"getWorkspace",
|
|
7571
7673
|
"listWorkspaceUsages",
|
|
7572
7674
|
"breakDownWorkspaceUsageByBot",
|
|
7675
|
+
"getAllWorkspaceQuotaCompletion",
|
|
7573
7676
|
"getWorkspaceQuota",
|
|
7574
7677
|
"listWorkspaceQuotas",
|
|
7575
7678
|
"updateWorkspace",
|
|
@@ -7617,39 +7720,14 @@ export const state = {
|
|
|
7617
7720
|
name: "quotas",
|
|
7618
7721
|
operations: ["changeAISpendQuota"],
|
|
7619
7722
|
},
|
|
7723
|
+
{
|
|
7724
|
+
title: "Helper",
|
|
7725
|
+
description: "",
|
|
7726
|
+
name: "helper",
|
|
7727
|
+
operations: ["runVrl"],
|
|
7728
|
+
},
|
|
7620
7729
|
],
|
|
7621
7730
|
options: {
|
|
7622
7731
|
allowUnions: false,
|
|
7623
7732
|
},
|
|
7624
|
-
} satisfies State
|
|
7625
|
-
| "Bot"
|
|
7626
|
-
| "Integration"
|
|
7627
|
-
| "Workspace"
|
|
7628
|
-
| "WorkspaceMember"
|
|
7629
|
-
| "Account"
|
|
7630
|
-
| "Usage"
|
|
7631
|
-
| "Issue"
|
|
7632
|
-
| "IssueEvent"
|
|
7633
|
-
| "User"
|
|
7634
|
-
| "Conversation"
|
|
7635
|
-
| "Event"
|
|
7636
|
-
| "Message"
|
|
7637
|
-
| "State"
|
|
7638
|
-
| "File",
|
|
7639
|
-
never,
|
|
7640
|
-
| "user"
|
|
7641
|
-
| "conversation"
|
|
7642
|
-
| "event"
|
|
7643
|
-
| "message"
|
|
7644
|
-
| "file"
|
|
7645
|
-
| "state"
|
|
7646
|
-
| "hub"
|
|
7647
|
-
| "action"
|
|
7648
|
-
| "bot"
|
|
7649
|
-
| "integration"
|
|
7650
|
-
| "workspace"
|
|
7651
|
-
| "workspaceMember"
|
|
7652
|
-
| "account"
|
|
7653
|
-
| "usage"
|
|
7654
|
-
| "quotas"
|
|
7655
|
-
>;
|
|
7733
|
+
} satisfies State;
|
package/src/index.ts
CHANGED