@botpress/api 0.15.7 → 0.15.9
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 +68 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.js +292 -175
- package/package.json +2 -2
- package/src/gen/metadata.json +1 -1
- package/src/gen/openapi.json +1 -1
- package/src/gen/state.ts +115 -34
- 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,6 +2445,11 @@ export const state = {
|
|
|
2367
2445
|
},
|
|
2368
2446
|
description: "Media files associated with the [Bot](#schema_bot)",
|
|
2369
2447
|
},
|
|
2448
|
+
alwaysAlive: {
|
|
2449
|
+
type: "boolean",
|
|
2450
|
+
description:
|
|
2451
|
+
"Indicates if the [Bot](#schema_bot) should be in always alive mode",
|
|
2452
|
+
},
|
|
2370
2453
|
},
|
|
2371
2454
|
title: "updateBotBody",
|
|
2372
2455
|
additionalProperties: false,
|
|
@@ -3494,6 +3577,7 @@ export const state = {
|
|
|
3494
3577
|
"ai_spend",
|
|
3495
3578
|
"openai_spend",
|
|
3496
3579
|
"bing_search_spend",
|
|
3580
|
+
"always_alive",
|
|
3497
3581
|
],
|
|
3498
3582
|
required: true,
|
|
3499
3583
|
},
|
|
@@ -3554,6 +3638,7 @@ export const state = {
|
|
|
3554
3638
|
"ai_spend",
|
|
3555
3639
|
"openai_spend",
|
|
3556
3640
|
"bing_search_spend",
|
|
3641
|
+
"always_alive",
|
|
3557
3642
|
],
|
|
3558
3643
|
required: true,
|
|
3559
3644
|
},
|
|
@@ -3623,6 +3708,7 @@ export const state = {
|
|
|
3623
3708
|
"ai_spend",
|
|
3624
3709
|
"openai_spend",
|
|
3625
3710
|
"bing_search_spend",
|
|
3711
|
+
"always_alive",
|
|
3626
3712
|
],
|
|
3627
3713
|
},
|
|
3628
3714
|
completion: {
|
|
@@ -3669,6 +3755,7 @@ export const state = {
|
|
|
3669
3755
|
"ai_spend",
|
|
3670
3756
|
"openai_spend",
|
|
3671
3757
|
"bing_search_spend",
|
|
3758
|
+
"always_alive",
|
|
3672
3759
|
],
|
|
3673
3760
|
required: true,
|
|
3674
3761
|
},
|
|
@@ -3710,6 +3797,7 @@ export const state = {
|
|
|
3710
3797
|
"ai_spend",
|
|
3711
3798
|
"openai_spend",
|
|
3712
3799
|
"bing_search_spend",
|
|
3800
|
+
"always_alive",
|
|
3713
3801
|
],
|
|
3714
3802
|
description: "Usage type that can be used",
|
|
3715
3803
|
},
|
|
@@ -3779,6 +3867,7 @@ export const state = {
|
|
|
3779
3867
|
"ai_spend",
|
|
3780
3868
|
"openai_spend",
|
|
3781
3869
|
"bing_search_spend",
|
|
3870
|
+
"always_alive",
|
|
3782
3871
|
],
|
|
3783
3872
|
description: "Usage type that can be used",
|
|
3784
3873
|
},
|
|
@@ -5471,6 +5560,7 @@ export const state = {
|
|
|
5471
5560
|
"ai_spend",
|
|
5472
5561
|
"openai_spend",
|
|
5473
5562
|
"bing_search_spend",
|
|
5563
|
+
"always_alive",
|
|
5474
5564
|
],
|
|
5475
5565
|
required: true,
|
|
5476
5566
|
},
|
|
@@ -5525,6 +5615,7 @@ export const state = {
|
|
|
5525
5615
|
"ai_spend",
|
|
5526
5616
|
"openai_spend",
|
|
5527
5617
|
"bing_search_spend",
|
|
5618
|
+
"always_alive",
|
|
5528
5619
|
],
|
|
5529
5620
|
required: true,
|
|
5530
5621
|
},
|
|
@@ -5804,7 +5895,7 @@ export const state = {
|
|
|
5804
5895
|
title: "Botpress API",
|
|
5805
5896
|
description: "API for Botpress Cloud",
|
|
5806
5897
|
server: "https://api.botpress.cloud",
|
|
5807
|
-
version: "0.15.
|
|
5898
|
+
version: "0.15.9",
|
|
5808
5899
|
prefix: "v1",
|
|
5809
5900
|
},
|
|
5810
5901
|
errors: [
|
|
@@ -5941,6 +6032,7 @@ export const state = {
|
|
|
5941
6032
|
patchStateBody: true,
|
|
5942
6033
|
callActionBody: true,
|
|
5943
6034
|
configureIntegrationBody: true,
|
|
6035
|
+
runVrlBody: true,
|
|
5944
6036
|
createPersonalAccessTokenBody: true,
|
|
5945
6037
|
createBotBody: true,
|
|
5946
6038
|
updateBotBody: true,
|
|
@@ -5989,6 +6081,7 @@ export const state = {
|
|
|
5989
6081
|
patchStateResponse: true,
|
|
5990
6082
|
callActionResponse: true,
|
|
5991
6083
|
configureIntegrationResponse: true,
|
|
6084
|
+
runVrlResponse: true,
|
|
5992
6085
|
getAccountResponse: true,
|
|
5993
6086
|
listPersonalAccessTokensResponse: true,
|
|
5994
6087
|
createPersonalAccessTokenResponse: true,
|
|
@@ -6419,6 +6512,16 @@ export const state = {
|
|
|
6419
6512
|
type: "string",
|
|
6420
6513
|
description: "Id of the user that created the bot",
|
|
6421
6514
|
},
|
|
6515
|
+
alwaysAlive: {
|
|
6516
|
+
type: "boolean",
|
|
6517
|
+
description:
|
|
6518
|
+
"Indicates if the [Bot](#schema_bot) should be in always alive mode",
|
|
6519
|
+
},
|
|
6520
|
+
status: {
|
|
6521
|
+
type: "string",
|
|
6522
|
+
enum: ["active", "deploying"],
|
|
6523
|
+
description: "Status of the bot",
|
|
6524
|
+
},
|
|
6422
6525
|
medias: {
|
|
6423
6526
|
type: "array",
|
|
6424
6527
|
items: {
|
|
@@ -6453,6 +6556,8 @@ export const state = {
|
|
|
6453
6556
|
"recurringEvents",
|
|
6454
6557
|
"name",
|
|
6455
6558
|
"dev",
|
|
6559
|
+
"alwaysAlive",
|
|
6560
|
+
"status",
|
|
6456
6561
|
"medias",
|
|
6457
6562
|
],
|
|
6458
6563
|
additionalProperties: false,
|
|
@@ -6999,6 +7104,7 @@ export const state = {
|
|
|
6999
7104
|
"ai_spend",
|
|
7000
7105
|
"openai_spend",
|
|
7001
7106
|
"bing_search_spend",
|
|
7107
|
+
"always_alive",
|
|
7002
7108
|
],
|
|
7003
7109
|
description: "Usage type that can be used",
|
|
7004
7110
|
},
|
|
@@ -7640,39 +7746,14 @@ export const state = {
|
|
|
7640
7746
|
name: "quotas",
|
|
7641
7747
|
operations: ["changeAISpendQuota"],
|
|
7642
7748
|
},
|
|
7749
|
+
{
|
|
7750
|
+
title: "Helper",
|
|
7751
|
+
description: "",
|
|
7752
|
+
name: "helper",
|
|
7753
|
+
operations: ["runVrl"],
|
|
7754
|
+
},
|
|
7643
7755
|
],
|
|
7644
7756
|
options: {
|
|
7645
7757
|
allowUnions: false,
|
|
7646
7758
|
},
|
|
7647
|
-
} satisfies State
|
|
7648
|
-
| "Bot"
|
|
7649
|
-
| "Integration"
|
|
7650
|
-
| "Workspace"
|
|
7651
|
-
| "WorkspaceMember"
|
|
7652
|
-
| "Account"
|
|
7653
|
-
| "Usage"
|
|
7654
|
-
| "Issue"
|
|
7655
|
-
| "IssueEvent"
|
|
7656
|
-
| "User"
|
|
7657
|
-
| "Conversation"
|
|
7658
|
-
| "Event"
|
|
7659
|
-
| "Message"
|
|
7660
|
-
| "State"
|
|
7661
|
-
| "File",
|
|
7662
|
-
never,
|
|
7663
|
-
| "user"
|
|
7664
|
-
| "conversation"
|
|
7665
|
-
| "event"
|
|
7666
|
-
| "message"
|
|
7667
|
-
| "file"
|
|
7668
|
-
| "state"
|
|
7669
|
-
| "hub"
|
|
7670
|
-
| "action"
|
|
7671
|
-
| "bot"
|
|
7672
|
-
| "integration"
|
|
7673
|
-
| "workspace"
|
|
7674
|
-
| "workspaceMember"
|
|
7675
|
-
| "account"
|
|
7676
|
-
| "usage"
|
|
7677
|
-
| "quotas"
|
|
7678
|
-
>;
|
|
7759
|
+
} satisfies State;
|
package/src/index.ts
CHANGED