@botpress/api 0.15.9 → 0.15.11
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 +520 -161
- package/dist/{gen → src/gen}/state.d.ts +263 -7
- 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 +289 -11
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",
|
|
@@ -1563,11 +1567,10 @@ export const state = {
|
|
|
1563
1567
|
additionalProperties: true,
|
|
1564
1568
|
},
|
|
1565
1569
|
result: {
|
|
1566
|
-
|
|
1567
|
-
additionalProperties: true,
|
|
1570
|
+
nullable: true,
|
|
1568
1571
|
},
|
|
1569
1572
|
},
|
|
1570
|
-
required: ["data"
|
|
1573
|
+
required: ["data"],
|
|
1571
1574
|
title: "runVrlResponse",
|
|
1572
1575
|
additionalProperties: false,
|
|
1573
1576
|
},
|
|
@@ -1741,6 +1744,74 @@ export const state = {
|
|
|
1741
1744
|
},
|
|
1742
1745
|
},
|
|
1743
1746
|
},
|
|
1747
|
+
setAccountPreference: {
|
|
1748
|
+
name: "setAccountPreference",
|
|
1749
|
+
description: "Set a preference for the account",
|
|
1750
|
+
method: "post",
|
|
1751
|
+
path: "/v1/admin/account/preferences/{key}",
|
|
1752
|
+
section: "account",
|
|
1753
|
+
disableDefaultParameters: {
|
|
1754
|
+
"x-workspace-id": true,
|
|
1755
|
+
},
|
|
1756
|
+
parameters: {
|
|
1757
|
+
key: {
|
|
1758
|
+
type: "string",
|
|
1759
|
+
description: "Preference key",
|
|
1760
|
+
in: "path",
|
|
1761
|
+
},
|
|
1762
|
+
},
|
|
1763
|
+
requestBody: {
|
|
1764
|
+
description: "Preference value",
|
|
1765
|
+
schema: {
|
|
1766
|
+
type: "object",
|
|
1767
|
+
properties: {
|
|
1768
|
+
value: {
|
|
1769
|
+
nullable: true,
|
|
1770
|
+
},
|
|
1771
|
+
},
|
|
1772
|
+
title: "setAccountPreferenceBody",
|
|
1773
|
+
additionalProperties: false,
|
|
1774
|
+
},
|
|
1775
|
+
},
|
|
1776
|
+
response: {
|
|
1777
|
+
description: "Success",
|
|
1778
|
+
schema: {
|
|
1779
|
+
type: "object",
|
|
1780
|
+
title: "setAccountPreferenceResponse",
|
|
1781
|
+
additionalProperties: false,
|
|
1782
|
+
},
|
|
1783
|
+
},
|
|
1784
|
+
},
|
|
1785
|
+
getAccountPreference: {
|
|
1786
|
+
name: "getAccountPreference",
|
|
1787
|
+
description: "Get a preference of the account",
|
|
1788
|
+
method: "get",
|
|
1789
|
+
path: "/v1/admin/account/preferences/{key}",
|
|
1790
|
+
section: "account",
|
|
1791
|
+
disableDefaultParameters: {
|
|
1792
|
+
"x-workspace-id": true,
|
|
1793
|
+
},
|
|
1794
|
+
parameters: {
|
|
1795
|
+
key: {
|
|
1796
|
+
type: "string",
|
|
1797
|
+
description: "Preference key",
|
|
1798
|
+
in: "path",
|
|
1799
|
+
},
|
|
1800
|
+
},
|
|
1801
|
+
response: {
|
|
1802
|
+
description: "Success",
|
|
1803
|
+
schema: {
|
|
1804
|
+
type: "object",
|
|
1805
|
+
properties: {
|
|
1806
|
+
value: {
|
|
1807
|
+
nullable: true,
|
|
1808
|
+
},
|
|
1809
|
+
},
|
|
1810
|
+
title: "getAccountPreferenceResponse",
|
|
1811
|
+
additionalProperties: false,
|
|
1812
|
+
},
|
|
1813
|
+
},
|
|
1814
|
+
},
|
|
1744
1815
|
listPublicIntegrations: {
|
|
1745
1816
|
name: "listPublicIntegrations",
|
|
1746
1817
|
description: "List public integration",
|
|
@@ -2229,6 +2300,11 @@ export const state = {
|
|
|
2229
2300
|
blocked: {
|
|
2230
2301
|
type: "boolean",
|
|
2231
2302
|
},
|
|
2303
|
+
alwaysAlive: {
|
|
2304
|
+
type: "boolean",
|
|
2305
|
+
description:
|
|
2306
|
+
"Indicates if the [Bot](#schema_bot) should be in always alive mode",
|
|
2307
|
+
},
|
|
2232
2308
|
user: {
|
|
2233
2309
|
type: "object",
|
|
2234
2310
|
properties: {
|
|
@@ -2445,11 +2521,6 @@ export const state = {
|
|
|
2445
2521
|
},
|
|
2446
2522
|
description: "Media files associated with the [Bot](#schema_bot)",
|
|
2447
2523
|
},
|
|
2448
|
-
alwaysAlive: {
|
|
2449
|
-
type: "boolean",
|
|
2450
|
-
description:
|
|
2451
|
-
"Indicates if the [Bot](#schema_bot) should be in always alive mode",
|
|
2452
|
-
},
|
|
2453
2524
|
},
|
|
2454
2525
|
title: "updateBotBody",
|
|
2455
2526
|
additionalProperties: false,
|
|
@@ -4837,6 +4908,14 @@ export const state = {
|
|
|
4837
4908
|
},
|
|
4838
4909
|
additionalProperties: false,
|
|
4839
4910
|
},
|
|
4911
|
+
secrets: {
|
|
4912
|
+
type: "object",
|
|
4913
|
+
additionalProperties: {
|
|
4914
|
+
type: "string",
|
|
4915
|
+
},
|
|
4916
|
+
description:
|
|
4917
|
+
"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.",
|
|
4918
|
+
},
|
|
4840
4919
|
code: {
|
|
4841
4920
|
type: "string",
|
|
4842
4921
|
description: "JavaScript code of the integration",
|
|
@@ -5215,6 +5294,15 @@ export const state = {
|
|
|
5215
5294
|
},
|
|
5216
5295
|
additionalProperties: false,
|
|
5217
5296
|
},
|
|
5297
|
+
secrets: {
|
|
5298
|
+
type: "object",
|
|
5299
|
+
additionalProperties: {
|
|
5300
|
+
type: "string",
|
|
5301
|
+
nullable: true,
|
|
5302
|
+
},
|
|
5303
|
+
description:
|
|
5304
|
+
"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.",
|
|
5305
|
+
},
|
|
5218
5306
|
code: {
|
|
5219
5307
|
type: "string",
|
|
5220
5308
|
description: "JavaScript code of the integration",
|
|
@@ -5895,7 +5983,7 @@ export const state = {
|
|
|
5895
5983
|
title: "Botpress API",
|
|
5896
5984
|
description: "API for Botpress Cloud",
|
|
5897
5985
|
server: "https://api.botpress.cloud",
|
|
5898
|
-
version: "0.15.
|
|
5986
|
+
version: "0.15.11",
|
|
5899
5987
|
prefix: "v1",
|
|
5900
5988
|
},
|
|
5901
5989
|
errors: [
|
|
@@ -6034,6 +6122,7 @@ export const state = {
|
|
|
6034
6122
|
configureIntegrationBody: true,
|
|
6035
6123
|
runVrlBody: true,
|
|
6036
6124
|
createPersonalAccessTokenBody: true,
|
|
6125
|
+
setAccountPreferenceBody: true,
|
|
6037
6126
|
createBotBody: true,
|
|
6038
6127
|
updateBotBody: true,
|
|
6039
6128
|
transferBotBody: true,
|
|
@@ -6086,6 +6175,8 @@ export const state = {
|
|
|
6086
6175
|
listPersonalAccessTokensResponse: true,
|
|
6087
6176
|
createPersonalAccessTokenResponse: true,
|
|
6088
6177
|
deletePersonalAccessTokenResponse: true,
|
|
6178
|
+
setAccountPreferenceResponse: true,
|
|
6179
|
+
getAccountPreferenceResponse: true,
|
|
6089
6180
|
listPublicIntegrationsResponse: true,
|
|
6090
6181
|
getPublicIntegrationByIdResponse: true,
|
|
6091
6182
|
getPublicIntegrationResponse: true,
|
|
@@ -6153,6 +6244,9 @@ export const state = {
|
|
|
6153
6244
|
Message: true,
|
|
6154
6245
|
State: true,
|
|
6155
6246
|
File: true,
|
|
6247
|
+
Table: true,
|
|
6248
|
+
Column: true,
|
|
6249
|
+
Row: true,
|
|
6156
6250
|
},
|
|
6157
6251
|
},
|
|
6158
6252
|
schemas: {
|
|
@@ -6933,6 +7027,14 @@ export const state = {
|
|
|
6933
7027
|
description:
|
|
6934
7028
|
"URL of the readme of the integration. This is the readme that will be displayed in the UI",
|
|
6935
7029
|
},
|
|
7030
|
+
secrets: {
|
|
7031
|
+
type: "array",
|
|
7032
|
+
items: {
|
|
7033
|
+
type: "string",
|
|
7034
|
+
},
|
|
7035
|
+
description:
|
|
7036
|
+
"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.",
|
|
7037
|
+
},
|
|
6936
7038
|
},
|
|
6937
7039
|
required: [
|
|
6938
7040
|
"id",
|
|
@@ -6952,6 +7054,7 @@ export const state = {
|
|
|
6952
7054
|
"description",
|
|
6953
7055
|
"iconUrl",
|
|
6954
7056
|
"readmeUrl",
|
|
7057
|
+
"secrets",
|
|
6955
7058
|
],
|
|
6956
7059
|
additionalProperties: false,
|
|
6957
7060
|
},
|
|
@@ -7559,6 +7662,172 @@ export const state = {
|
|
|
7559
7662
|
additionalProperties: false,
|
|
7560
7663
|
},
|
|
7561
7664
|
},
|
|
7665
|
+
Table: {
|
|
7666
|
+
section: "tables",
|
|
7667
|
+
schema: {
|
|
7668
|
+
type: "object",
|
|
7669
|
+
properties: {
|
|
7670
|
+
id: {
|
|
7671
|
+
type: "string",
|
|
7672
|
+
description: "Unique identifier for the table",
|
|
7673
|
+
},
|
|
7674
|
+
name: {
|
|
7675
|
+
type: "string",
|
|
7676
|
+
description: "Required. This name is used to identify your table.",
|
|
7677
|
+
},
|
|
7678
|
+
factor: {
|
|
7679
|
+
default: 1,
|
|
7680
|
+
type: "number",
|
|
7681
|
+
minimum: 1,
|
|
7682
|
+
maximum: 30,
|
|
7683
|
+
description:
|
|
7684
|
+
"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.",
|
|
7685
|
+
},
|
|
7686
|
+
columns: {
|
|
7687
|
+
type: "array",
|
|
7688
|
+
items: {
|
|
7689
|
+
type: "object",
|
|
7690
|
+
properties: {
|
|
7691
|
+
id: {
|
|
7692
|
+
type: "string",
|
|
7693
|
+
description: "Unique identifier for the column.",
|
|
7694
|
+
},
|
|
7695
|
+
name: {
|
|
7696
|
+
type: "string",
|
|
7697
|
+
minLength: 1,
|
|
7698
|
+
maxLength: 30,
|
|
7699
|
+
description:
|
|
7700
|
+
"Name of the column, must be within length limits.",
|
|
7701
|
+
},
|
|
7702
|
+
description: {
|
|
7703
|
+
type: "string",
|
|
7704
|
+
description: "Optional descriptive text about the column.",
|
|
7705
|
+
},
|
|
7706
|
+
searchable: {
|
|
7707
|
+
type: "boolean",
|
|
7708
|
+
description:
|
|
7709
|
+
"Indicates if the column is vectorized and searchable.",
|
|
7710
|
+
},
|
|
7711
|
+
type: {
|
|
7712
|
+
type: "string",
|
|
7713
|
+
enum: ["string", "number", "boolean", "date", "object"],
|
|
7714
|
+
description:
|
|
7715
|
+
'Specifies the data type of the column. Use "object" for complex data structures.',
|
|
7716
|
+
},
|
|
7717
|
+
typings: {
|
|
7718
|
+
type: "string",
|
|
7719
|
+
description:
|
|
7720
|
+
'TypeScript typings for the column. Recommended if the type is "object", ex: "\\{ foo: string; bar: number \\}"',
|
|
7721
|
+
},
|
|
7722
|
+
schema: {
|
|
7723
|
+
type: "object",
|
|
7724
|
+
properties: {},
|
|
7725
|
+
additionalProperties: true,
|
|
7726
|
+
},
|
|
7727
|
+
},
|
|
7728
|
+
required: ["name", "type"],
|
|
7729
|
+
},
|
|
7730
|
+
maxItems: 20,
|
|
7731
|
+
description: "Array of columns in the table.",
|
|
7732
|
+
},
|
|
7733
|
+
schema: {
|
|
7734
|
+
type: "object",
|
|
7735
|
+
additionalProperties: true,
|
|
7736
|
+
description:
|
|
7737
|
+
"Provide an object or a JSON schema to define the columns of the table. A maximum of 20 keys in the object/schema is allowed.",
|
|
7738
|
+
},
|
|
7739
|
+
tags: {
|
|
7740
|
+
type: "object",
|
|
7741
|
+
additionalProperties: {
|
|
7742
|
+
type: "string",
|
|
7743
|
+
},
|
|
7744
|
+
description:
|
|
7745
|
+
"Optional tags to help organize your tables. These should be passed here as an object representing key/value pairs.",
|
|
7746
|
+
},
|
|
7747
|
+
createdAt: {
|
|
7748
|
+
type: "string",
|
|
7749
|
+
description: "Timestamp of table creation.",
|
|
7750
|
+
},
|
|
7751
|
+
updatedAt: {
|
|
7752
|
+
type: "string",
|
|
7753
|
+
description: "Timestamp of the last table update.",
|
|
7754
|
+
},
|
|
7755
|
+
},
|
|
7756
|
+
required: ["id", "name", "columns", "schema"],
|
|
7757
|
+
additionalProperties: false,
|
|
7758
|
+
},
|
|
7759
|
+
},
|
|
7760
|
+
Column: {
|
|
7761
|
+
section: "tables",
|
|
7762
|
+
schema: {
|
|
7763
|
+
type: "object",
|
|
7764
|
+
properties: {
|
|
7765
|
+
id: {
|
|
7766
|
+
type: "string",
|
|
7767
|
+
description: "Unique identifier for the column.",
|
|
7768
|
+
},
|
|
7769
|
+
name: {
|
|
7770
|
+
type: "string",
|
|
7771
|
+
minLength: 1,
|
|
7772
|
+
maxLength: 30,
|
|
7773
|
+
description: "Name of the column, must be within length limits.",
|
|
7774
|
+
},
|
|
7775
|
+
description: {
|
|
7776
|
+
type: "string",
|
|
7777
|
+
description: "Optional descriptive text about the column.",
|
|
7778
|
+
},
|
|
7779
|
+
searchable: {
|
|
7780
|
+
type: "boolean",
|
|
7781
|
+
description:
|
|
7782
|
+
"Indicates if the column is vectorized and searchable.",
|
|
7783
|
+
},
|
|
7784
|
+
type: {
|
|
7785
|
+
type: "string",
|
|
7786
|
+
enum: ["string", "number", "boolean", "date", "object"],
|
|
7787
|
+
description:
|
|
7788
|
+
'Specifies the data type of the column. Use "object" for complex data structures.',
|
|
7789
|
+
},
|
|
7790
|
+
typings: {
|
|
7791
|
+
type: "string",
|
|
7792
|
+
description:
|
|
7793
|
+
'TypeScript typings for the column. Recommended if the type is "object", ex: "\\{ foo: string; bar: number \\}"',
|
|
7794
|
+
},
|
|
7795
|
+
schema: {
|
|
7796
|
+
type: "object",
|
|
7797
|
+
additionalProperties: true,
|
|
7798
|
+
},
|
|
7799
|
+
},
|
|
7800
|
+
required: ["name", "type"],
|
|
7801
|
+
additionalProperties: false,
|
|
7802
|
+
},
|
|
7803
|
+
},
|
|
7804
|
+
Row: {
|
|
7805
|
+
section: "tables",
|
|
7806
|
+
schema: {
|
|
7807
|
+
type: "object",
|
|
7808
|
+
properties: {
|
|
7809
|
+
id: {
|
|
7810
|
+
type: "number",
|
|
7811
|
+
description: "Unique identifier for the row.",
|
|
7812
|
+
},
|
|
7813
|
+
createdAt: {
|
|
7814
|
+
type: "string",
|
|
7815
|
+
description: "Timestamp of row creation.",
|
|
7816
|
+
},
|
|
7817
|
+
updatedAt: {
|
|
7818
|
+
type: "string",
|
|
7819
|
+
description: "Timestamp of the last row update.",
|
|
7820
|
+
},
|
|
7821
|
+
similarity: {
|
|
7822
|
+
type: "number",
|
|
7823
|
+
description:
|
|
7824
|
+
"Optional numeric value indicating similarity, when using findTableRows.",
|
|
7825
|
+
},
|
|
7826
|
+
},
|
|
7827
|
+
required: ["id"],
|
|
7828
|
+
additionalProperties: true,
|
|
7829
|
+
},
|
|
7830
|
+
},
|
|
7562
7831
|
},
|
|
7563
7832
|
sections: [
|
|
7564
7833
|
{
|
|
@@ -7730,6 +7999,8 @@ export const state = {
|
|
|
7730
7999
|
"listPersonalAccessTokens",
|
|
7731
8000
|
"createPersonalAccessToken",
|
|
7732
8001
|
"deletePersonalAccessToken",
|
|
8002
|
+
"setAccountPreference",
|
|
8003
|
+
"getAccountPreference",
|
|
7733
8004
|
],
|
|
7734
8005
|
schema: "Account",
|
|
7735
8006
|
},
|
|
@@ -7752,6 +8023,13 @@ export const state = {
|
|
|
7752
8023
|
name: "helper",
|
|
7753
8024
|
operations: ["runVrl"],
|
|
7754
8025
|
},
|
|
8026
|
+
{
|
|
8027
|
+
title: "Tables",
|
|
8028
|
+
description: "Operations related to table management.",
|
|
8029
|
+
name: "tables",
|
|
8030
|
+
operations: [],
|
|
8031
|
+
schema: "Table",
|
|
8032
|
+
},
|
|
7755
8033
|
],
|
|
7756
8034
|
options: {
|
|
7757
8035
|
allowUnions: false,
|