@botpress/api 0.15.8 → 0.15.10
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.js +500 -145
- package/dist/{gen → src/gen}/state.d.ts +242 -1
- package/dist/{index.d.ts → src/index.d.ts} +2 -2
- package/package.json +4 -3
- package/src/gen/metadata.json +1 -1
- package/src/gen/openapi.json +1 -1
- package/src/gen/state.ts +277 -3
package/src/gen/state.ts
CHANGED
|
@@ -16,7 +16,10 @@ export type State = opapi.State<
|
|
|
16
16
|
| "Event"
|
|
17
17
|
| "Message"
|
|
18
18
|
| "State"
|
|
19
|
-
| "File"
|
|
19
|
+
| "File"
|
|
20
|
+
| "Table"
|
|
21
|
+
| "Column"
|
|
22
|
+
| "Row",
|
|
20
23
|
never,
|
|
21
24
|
| "user"
|
|
22
25
|
| "conversation"
|
|
@@ -34,6 +37,7 @@ export type State = opapi.State<
|
|
|
34
37
|
| "usage"
|
|
35
38
|
| "quotas"
|
|
36
39
|
| "helper"
|
|
40
|
+
| "tables"
|
|
37
41
|
>;
|
|
38
42
|
export const state = {
|
|
39
43
|
operations: {
|
|
@@ -593,7 +597,7 @@ export const state = {
|
|
|
593
597
|
listEvents: {
|
|
594
598
|
name: "listEvents",
|
|
595
599
|
description:
|
|
596
|
-
"
|
|
600
|
+
"Retrieves a list of [Event](#schema_event) you’ve previously created. The events are returned in sorted order, with the most recent appearing first.",
|
|
597
601
|
method: "get",
|
|
598
602
|
path: "/v1/chat/events",
|
|
599
603
|
section: "event",
|
|
@@ -1741,6 +1745,74 @@ export const state = {
|
|
|
1741
1745
|
},
|
|
1742
1746
|
},
|
|
1743
1747
|
},
|
|
1748
|
+
setAccountPreference: {
|
|
1749
|
+
name: "setAccountPreference",
|
|
1750
|
+
description: "Set a preference for the account",
|
|
1751
|
+
method: "post",
|
|
1752
|
+
path: "/v1/admin/account/preferences/{key}",
|
|
1753
|
+
section: "account",
|
|
1754
|
+
disableDefaultParameters: {
|
|
1755
|
+
"x-workspace-id": true,
|
|
1756
|
+
},
|
|
1757
|
+
parameters: {
|
|
1758
|
+
key: {
|
|
1759
|
+
type: "string",
|
|
1760
|
+
description: "Preference key",
|
|
1761
|
+
in: "path",
|
|
1762
|
+
},
|
|
1763
|
+
},
|
|
1764
|
+
requestBody: {
|
|
1765
|
+
description: "Preference value",
|
|
1766
|
+
schema: {
|
|
1767
|
+
type: "object",
|
|
1768
|
+
properties: {
|
|
1769
|
+
value: {
|
|
1770
|
+
nullable: true,
|
|
1771
|
+
},
|
|
1772
|
+
},
|
|
1773
|
+
title: "setAccountPreferenceBody",
|
|
1774
|
+
additionalProperties: false,
|
|
1775
|
+
},
|
|
1776
|
+
},
|
|
1777
|
+
response: {
|
|
1778
|
+
description: "Success",
|
|
1779
|
+
schema: {
|
|
1780
|
+
type: "object",
|
|
1781
|
+
title: "setAccountPreferenceResponse",
|
|
1782
|
+
additionalProperties: false,
|
|
1783
|
+
},
|
|
1784
|
+
},
|
|
1785
|
+
},
|
|
1786
|
+
getAccountPreference: {
|
|
1787
|
+
name: "getAccountPreference",
|
|
1788
|
+
description: "Get a preference of the account",
|
|
1789
|
+
method: "get",
|
|
1790
|
+
path: "/v1/admin/account/preferences/{key}",
|
|
1791
|
+
section: "account",
|
|
1792
|
+
disableDefaultParameters: {
|
|
1793
|
+
"x-workspace-id": true,
|
|
1794
|
+
},
|
|
1795
|
+
parameters: {
|
|
1796
|
+
key: {
|
|
1797
|
+
type: "string",
|
|
1798
|
+
description: "Preference key",
|
|
1799
|
+
in: "path",
|
|
1800
|
+
},
|
|
1801
|
+
},
|
|
1802
|
+
response: {
|
|
1803
|
+
description: "Success",
|
|
1804
|
+
schema: {
|
|
1805
|
+
type: "object",
|
|
1806
|
+
properties: {
|
|
1807
|
+
value: {
|
|
1808
|
+
nullable: true,
|
|
1809
|
+
},
|
|
1810
|
+
},
|
|
1811
|
+
title: "getAccountPreferenceResponse",
|
|
1812
|
+
additionalProperties: false,
|
|
1813
|
+
},
|
|
1814
|
+
},
|
|
1815
|
+
},
|
|
1744
1816
|
listPublicIntegrations: {
|
|
1745
1817
|
name: "listPublicIntegrations",
|
|
1746
1818
|
description: "List public integration",
|
|
@@ -2229,6 +2301,11 @@ export const state = {
|
|
|
2229
2301
|
blocked: {
|
|
2230
2302
|
type: "boolean",
|
|
2231
2303
|
},
|
|
2304
|
+
alwaysAlive: {
|
|
2305
|
+
type: "boolean",
|
|
2306
|
+
description:
|
|
2307
|
+
"Indicates if the [Bot](#schema_bot) should be in always alive mode",
|
|
2308
|
+
},
|
|
2232
2309
|
user: {
|
|
2233
2310
|
type: "object",
|
|
2234
2311
|
properties: {
|
|
@@ -3572,6 +3649,7 @@ export const state = {
|
|
|
3572
3649
|
"ai_spend",
|
|
3573
3650
|
"openai_spend",
|
|
3574
3651
|
"bing_search_spend",
|
|
3652
|
+
"always_alive",
|
|
3575
3653
|
],
|
|
3576
3654
|
required: true,
|
|
3577
3655
|
},
|
|
@@ -3632,6 +3710,7 @@ export const state = {
|
|
|
3632
3710
|
"ai_spend",
|
|
3633
3711
|
"openai_spend",
|
|
3634
3712
|
"bing_search_spend",
|
|
3713
|
+
"always_alive",
|
|
3635
3714
|
],
|
|
3636
3715
|
required: true,
|
|
3637
3716
|
},
|
|
@@ -3701,6 +3780,7 @@ export const state = {
|
|
|
3701
3780
|
"ai_spend",
|
|
3702
3781
|
"openai_spend",
|
|
3703
3782
|
"bing_search_spend",
|
|
3783
|
+
"always_alive",
|
|
3704
3784
|
],
|
|
3705
3785
|
},
|
|
3706
3786
|
completion: {
|
|
@@ -3747,6 +3827,7 @@ export const state = {
|
|
|
3747
3827
|
"ai_spend",
|
|
3748
3828
|
"openai_spend",
|
|
3749
3829
|
"bing_search_spend",
|
|
3830
|
+
"always_alive",
|
|
3750
3831
|
],
|
|
3751
3832
|
required: true,
|
|
3752
3833
|
},
|
|
@@ -3788,6 +3869,7 @@ export const state = {
|
|
|
3788
3869
|
"ai_spend",
|
|
3789
3870
|
"openai_spend",
|
|
3790
3871
|
"bing_search_spend",
|
|
3872
|
+
"always_alive",
|
|
3791
3873
|
],
|
|
3792
3874
|
description: "Usage type that can be used",
|
|
3793
3875
|
},
|
|
@@ -3857,6 +3939,7 @@ export const state = {
|
|
|
3857
3939
|
"ai_spend",
|
|
3858
3940
|
"openai_spend",
|
|
3859
3941
|
"bing_search_spend",
|
|
3942
|
+
"always_alive",
|
|
3860
3943
|
],
|
|
3861
3944
|
description: "Usage type that can be used",
|
|
3862
3945
|
},
|
|
@@ -4826,6 +4909,14 @@ export const state = {
|
|
|
4826
4909
|
},
|
|
4827
4910
|
additionalProperties: false,
|
|
4828
4911
|
},
|
|
4912
|
+
secrets: {
|
|
4913
|
+
type: "object",
|
|
4914
|
+
additionalProperties: {
|
|
4915
|
+
type: "string",
|
|
4916
|
+
},
|
|
4917
|
+
description:
|
|
4918
|
+
"Secrets are integration-wide values available in the code via environment variables formatted as SECRET_${YOUR_SECRET_NAME}. A secret name must respect SCREAMING_SNAKE casing.",
|
|
4919
|
+
},
|
|
4829
4920
|
code: {
|
|
4830
4921
|
type: "string",
|
|
4831
4922
|
description: "JavaScript code of the integration",
|
|
@@ -5204,6 +5295,15 @@ export const state = {
|
|
|
5204
5295
|
},
|
|
5205
5296
|
additionalProperties: false,
|
|
5206
5297
|
},
|
|
5298
|
+
secrets: {
|
|
5299
|
+
type: "object",
|
|
5300
|
+
additionalProperties: {
|
|
5301
|
+
type: "string",
|
|
5302
|
+
nullable: true,
|
|
5303
|
+
},
|
|
5304
|
+
description:
|
|
5305
|
+
"Secrets are integration-wide values available in the code via environment variables formatted as SECRET_${YOUR_SECRET_NAME}. A secret name must respect SCREAMING_SNAKE casing.",
|
|
5306
|
+
},
|
|
5207
5307
|
code: {
|
|
5208
5308
|
type: "string",
|
|
5209
5309
|
description: "JavaScript code of the integration",
|
|
@@ -5549,6 +5649,7 @@ export const state = {
|
|
|
5549
5649
|
"ai_spend",
|
|
5550
5650
|
"openai_spend",
|
|
5551
5651
|
"bing_search_spend",
|
|
5652
|
+
"always_alive",
|
|
5552
5653
|
],
|
|
5553
5654
|
required: true,
|
|
5554
5655
|
},
|
|
@@ -5603,6 +5704,7 @@ export const state = {
|
|
|
5603
5704
|
"ai_spend",
|
|
5604
5705
|
"openai_spend",
|
|
5605
5706
|
"bing_search_spend",
|
|
5707
|
+
"always_alive",
|
|
5606
5708
|
],
|
|
5607
5709
|
required: true,
|
|
5608
5710
|
},
|
|
@@ -5882,7 +5984,7 @@ export const state = {
|
|
|
5882
5984
|
title: "Botpress API",
|
|
5883
5985
|
description: "API for Botpress Cloud",
|
|
5884
5986
|
server: "https://api.botpress.cloud",
|
|
5885
|
-
version: "0.15.
|
|
5987
|
+
version: "0.15.10",
|
|
5886
5988
|
prefix: "v1",
|
|
5887
5989
|
},
|
|
5888
5990
|
errors: [
|
|
@@ -6021,6 +6123,7 @@ export const state = {
|
|
|
6021
6123
|
configureIntegrationBody: true,
|
|
6022
6124
|
runVrlBody: true,
|
|
6023
6125
|
createPersonalAccessTokenBody: true,
|
|
6126
|
+
setAccountPreferenceBody: true,
|
|
6024
6127
|
createBotBody: true,
|
|
6025
6128
|
updateBotBody: true,
|
|
6026
6129
|
transferBotBody: true,
|
|
@@ -6073,6 +6176,8 @@ export const state = {
|
|
|
6073
6176
|
listPersonalAccessTokensResponse: true,
|
|
6074
6177
|
createPersonalAccessTokenResponse: true,
|
|
6075
6178
|
deletePersonalAccessTokenResponse: true,
|
|
6179
|
+
setAccountPreferenceResponse: true,
|
|
6180
|
+
getAccountPreferenceResponse: true,
|
|
6076
6181
|
listPublicIntegrationsResponse: true,
|
|
6077
6182
|
getPublicIntegrationByIdResponse: true,
|
|
6078
6183
|
getPublicIntegrationResponse: true,
|
|
@@ -6140,6 +6245,9 @@ export const state = {
|
|
|
6140
6245
|
Message: true,
|
|
6141
6246
|
State: true,
|
|
6142
6247
|
File: true,
|
|
6248
|
+
Table: true,
|
|
6249
|
+
Column: true,
|
|
6250
|
+
Row: true,
|
|
6143
6251
|
},
|
|
6144
6252
|
},
|
|
6145
6253
|
schemas: {
|
|
@@ -6499,6 +6607,16 @@ export const state = {
|
|
|
6499
6607
|
type: "string",
|
|
6500
6608
|
description: "Id of the user that created the bot",
|
|
6501
6609
|
},
|
|
6610
|
+
alwaysAlive: {
|
|
6611
|
+
type: "boolean",
|
|
6612
|
+
description:
|
|
6613
|
+
"Indicates if the [Bot](#schema_bot) should be in always alive mode",
|
|
6614
|
+
},
|
|
6615
|
+
status: {
|
|
6616
|
+
type: "string",
|
|
6617
|
+
enum: ["active", "deploying"],
|
|
6618
|
+
description: "Status of the bot",
|
|
6619
|
+
},
|
|
6502
6620
|
medias: {
|
|
6503
6621
|
type: "array",
|
|
6504
6622
|
items: {
|
|
@@ -6533,6 +6651,8 @@ export const state = {
|
|
|
6533
6651
|
"recurringEvents",
|
|
6534
6652
|
"name",
|
|
6535
6653
|
"dev",
|
|
6654
|
+
"alwaysAlive",
|
|
6655
|
+
"status",
|
|
6536
6656
|
"medias",
|
|
6537
6657
|
],
|
|
6538
6658
|
additionalProperties: false,
|
|
@@ -6908,6 +7028,14 @@ export const state = {
|
|
|
6908
7028
|
description:
|
|
6909
7029
|
"URL of the readme of the integration. This is the readme that will be displayed in the UI",
|
|
6910
7030
|
},
|
|
7031
|
+
secrets: {
|
|
7032
|
+
type: "array",
|
|
7033
|
+
items: {
|
|
7034
|
+
type: "string",
|
|
7035
|
+
},
|
|
7036
|
+
description:
|
|
7037
|
+
"Secrets are integration-wide values available in the code via environment variables formatted as SECRET_${YOUR_SECRET_NAME}. A secret name must respect SCREAMING_SNAKE casing.",
|
|
7038
|
+
},
|
|
6911
7039
|
},
|
|
6912
7040
|
required: [
|
|
6913
7041
|
"id",
|
|
@@ -6927,6 +7055,7 @@ export const state = {
|
|
|
6927
7055
|
"description",
|
|
6928
7056
|
"iconUrl",
|
|
6929
7057
|
"readmeUrl",
|
|
7058
|
+
"secrets",
|
|
6930
7059
|
],
|
|
6931
7060
|
additionalProperties: false,
|
|
6932
7061
|
},
|
|
@@ -7079,6 +7208,7 @@ export const state = {
|
|
|
7079
7208
|
"ai_spend",
|
|
7080
7209
|
"openai_spend",
|
|
7081
7210
|
"bing_search_spend",
|
|
7211
|
+
"always_alive",
|
|
7082
7212
|
],
|
|
7083
7213
|
description: "Usage type that can be used",
|
|
7084
7214
|
},
|
|
@@ -7533,6 +7663,141 @@ export const state = {
|
|
|
7533
7663
|
additionalProperties: false,
|
|
7534
7664
|
},
|
|
7535
7665
|
},
|
|
7666
|
+
Table: {
|
|
7667
|
+
section: "tables",
|
|
7668
|
+
schema: {
|
|
7669
|
+
type: "object",
|
|
7670
|
+
properties: {
|
|
7671
|
+
id: {
|
|
7672
|
+
type: "string",
|
|
7673
|
+
description: "Unique identifier for the table",
|
|
7674
|
+
},
|
|
7675
|
+
name: {
|
|
7676
|
+
type: "string",
|
|
7677
|
+
description: "Required. This name is used to identify your table.",
|
|
7678
|
+
},
|
|
7679
|
+
factor: {
|
|
7680
|
+
default: 1,
|
|
7681
|
+
type: "number",
|
|
7682
|
+
minimum: 1,
|
|
7683
|
+
maximum: 30,
|
|
7684
|
+
description:
|
|
7685
|
+
"The 'factor' multiplies the row's data storage limit by 4KB and its quota count, but can only be set at table creation and not modified later. For instance, a factor of 2 increases storage to 8KB but counts as 2 rows in your quota. The default factor is 1.",
|
|
7686
|
+
},
|
|
7687
|
+
columns: {
|
|
7688
|
+
type: "array",
|
|
7689
|
+
items: {
|
|
7690
|
+
type: "object",
|
|
7691
|
+
properties: {
|
|
7692
|
+
id: {
|
|
7693
|
+
type: "string",
|
|
7694
|
+
description: "Unique identifier for the column.",
|
|
7695
|
+
},
|
|
7696
|
+
name: {
|
|
7697
|
+
type: "string",
|
|
7698
|
+
minLength: 1,
|
|
7699
|
+
maxLength: 30,
|
|
7700
|
+
description:
|
|
7701
|
+
"Name of the column, must be within length limits.",
|
|
7702
|
+
},
|
|
7703
|
+
description: {
|
|
7704
|
+
type: "string",
|
|
7705
|
+
description: "Optional descriptive text about the column.",
|
|
7706
|
+
},
|
|
7707
|
+
searchable: {
|
|
7708
|
+
type: "boolean",
|
|
7709
|
+
description:
|
|
7710
|
+
"Indicates if the column is vectorized and searchable.",
|
|
7711
|
+
},
|
|
7712
|
+
type: {
|
|
7713
|
+
type: "string",
|
|
7714
|
+
enum: ["string", "number", "boolean", "date", "object"],
|
|
7715
|
+
description:
|
|
7716
|
+
'Specifies the data type of the column. Use "object" for complex data structures.',
|
|
7717
|
+
},
|
|
7718
|
+
typings: {
|
|
7719
|
+
type: "string",
|
|
7720
|
+
description:
|
|
7721
|
+
'TypeScript typings for the column. Recommended if the type is "object", ex: "\\{ foo: string; bar: number \\}"',
|
|
7722
|
+
},
|
|
7723
|
+
},
|
|
7724
|
+
required: ["id", "name", "type"],
|
|
7725
|
+
},
|
|
7726
|
+
maxItems: 20,
|
|
7727
|
+
description: "Array of columns in the table.",
|
|
7728
|
+
},
|
|
7729
|
+
},
|
|
7730
|
+
required: ["id", "name", "columns"],
|
|
7731
|
+
additionalProperties: false,
|
|
7732
|
+
},
|
|
7733
|
+
},
|
|
7734
|
+
Column: {
|
|
7735
|
+
section: "tables",
|
|
7736
|
+
schema: {
|
|
7737
|
+
type: "object",
|
|
7738
|
+
properties: {
|
|
7739
|
+
id: {
|
|
7740
|
+
type: "string",
|
|
7741
|
+
description: "Unique identifier for the column.",
|
|
7742
|
+
},
|
|
7743
|
+
name: {
|
|
7744
|
+
type: "string",
|
|
7745
|
+
minLength: 1,
|
|
7746
|
+
maxLength: 30,
|
|
7747
|
+
description: "Name of the column, must be within length limits.",
|
|
7748
|
+
},
|
|
7749
|
+
description: {
|
|
7750
|
+
type: "string",
|
|
7751
|
+
description: "Optional descriptive text about the column.",
|
|
7752
|
+
},
|
|
7753
|
+
searchable: {
|
|
7754
|
+
type: "boolean",
|
|
7755
|
+
description:
|
|
7756
|
+
"Indicates if the column is vectorized and searchable.",
|
|
7757
|
+
},
|
|
7758
|
+
type: {
|
|
7759
|
+
type: "string",
|
|
7760
|
+
enum: ["string", "number", "boolean", "date", "object"],
|
|
7761
|
+
description:
|
|
7762
|
+
'Specifies the data type of the column. Use "object" for complex data structures.',
|
|
7763
|
+
},
|
|
7764
|
+
typings: {
|
|
7765
|
+
type: "string",
|
|
7766
|
+
description:
|
|
7767
|
+
'TypeScript typings for the column. Recommended if the type is "object", ex: "\\{ foo: string; bar: number \\}"',
|
|
7768
|
+
},
|
|
7769
|
+
},
|
|
7770
|
+
required: ["id", "name", "type"],
|
|
7771
|
+
additionalProperties: false,
|
|
7772
|
+
},
|
|
7773
|
+
},
|
|
7774
|
+
Row: {
|
|
7775
|
+
section: "tables",
|
|
7776
|
+
schema: {
|
|
7777
|
+
type: "object",
|
|
7778
|
+
properties: {
|
|
7779
|
+
id: {
|
|
7780
|
+
type: "number",
|
|
7781
|
+
description: "Unique identifier for the row.",
|
|
7782
|
+
},
|
|
7783
|
+
createdAt: {
|
|
7784
|
+
type: "string",
|
|
7785
|
+
description: "Timestamp of row creation.",
|
|
7786
|
+
},
|
|
7787
|
+
updatedAt: {
|
|
7788
|
+
type: "string",
|
|
7789
|
+
description: "Timestamp of the last row update.",
|
|
7790
|
+
},
|
|
7791
|
+
similarity: {
|
|
7792
|
+
type: "number",
|
|
7793
|
+
description:
|
|
7794
|
+
"Optional numeric value indicating similarity, when using findTableRows.",
|
|
7795
|
+
},
|
|
7796
|
+
},
|
|
7797
|
+
required: ["id"],
|
|
7798
|
+
additionalProperties: true,
|
|
7799
|
+
},
|
|
7800
|
+
},
|
|
7536
7801
|
},
|
|
7537
7802
|
sections: [
|
|
7538
7803
|
{
|
|
@@ -7704,6 +7969,8 @@ export const state = {
|
|
|
7704
7969
|
"listPersonalAccessTokens",
|
|
7705
7970
|
"createPersonalAccessToken",
|
|
7706
7971
|
"deletePersonalAccessToken",
|
|
7972
|
+
"setAccountPreference",
|
|
7973
|
+
"getAccountPreference",
|
|
7707
7974
|
],
|
|
7708
7975
|
schema: "Account",
|
|
7709
7976
|
},
|
|
@@ -7726,6 +7993,13 @@ export const state = {
|
|
|
7726
7993
|
name: "helper",
|
|
7727
7994
|
operations: ["runVrl"],
|
|
7728
7995
|
},
|
|
7996
|
+
{
|
|
7997
|
+
title: "Tables",
|
|
7998
|
+
description: "Operations related to table management.",
|
|
7999
|
+
name: "tables",
|
|
8000
|
+
operations: [],
|
|
8001
|
+
schema: "Table",
|
|
8002
|
+
},
|
|
7729
8003
|
],
|
|
7730
8004
|
options: {
|
|
7731
8005
|
allowUnions: false,
|