@botpress/api 0.17.0 → 0.18.1
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 +768 -8
- package/dist/src/gen/state.d.ts +906 -164
- package/package.json +6 -6
- package/src/gen/metadata.json +1 -1
- package/src/gen/openapi.json +1 -1
- package/src/gen/state.ts +895 -73
package/src/gen/state.ts
CHANGED
|
@@ -1403,6 +1403,71 @@ export const state = {
|
|
|
1403
1403
|
},
|
|
1404
1404
|
},
|
|
1405
1405
|
},
|
|
1406
|
+
getOrSetState: {
|
|
1407
|
+
name: "getOrSetState",
|
|
1408
|
+
description:
|
|
1409
|
+
"Retrieves the [State](#schema_state) object for a valid identifiers. If the state does not exist, it creates a new state.",
|
|
1410
|
+
method: "post",
|
|
1411
|
+
path: "/v1/chat/states/{type}/{id}/{name}/get-or-set",
|
|
1412
|
+
parameters: {
|
|
1413
|
+
type: {
|
|
1414
|
+
in: "path",
|
|
1415
|
+
type: "string",
|
|
1416
|
+
description: "State type",
|
|
1417
|
+
enum: ["conversation", "user", "bot", "integration", "task"],
|
|
1418
|
+
},
|
|
1419
|
+
id: {
|
|
1420
|
+
in: "path",
|
|
1421
|
+
type: "string",
|
|
1422
|
+
description: "State id",
|
|
1423
|
+
},
|
|
1424
|
+
name: {
|
|
1425
|
+
in: "path",
|
|
1426
|
+
type: "string",
|
|
1427
|
+
description: "State name",
|
|
1428
|
+
},
|
|
1429
|
+
},
|
|
1430
|
+
requestBody: {
|
|
1431
|
+
description: "State content",
|
|
1432
|
+
schema: {
|
|
1433
|
+
type: "object",
|
|
1434
|
+
properties: {
|
|
1435
|
+
payload: {
|
|
1436
|
+
type: "object",
|
|
1437
|
+
additionalProperties: true,
|
|
1438
|
+
description:
|
|
1439
|
+
"Payload is the content of the state defined by your bot.",
|
|
1440
|
+
},
|
|
1441
|
+
expiry: {
|
|
1442
|
+
type: "number",
|
|
1443
|
+
minimum: 1,
|
|
1444
|
+
maximum: 2592000000,
|
|
1445
|
+
description:
|
|
1446
|
+
"Expiry of the [State](#schema_state) in milliseconds. The state will expire if it is idle for the configured value. By default, a state doesn't expire.",
|
|
1447
|
+
},
|
|
1448
|
+
},
|
|
1449
|
+
required: ["payload"],
|
|
1450
|
+
title: "getOrSetStateBody",
|
|
1451
|
+
additionalProperties: false,
|
|
1452
|
+
},
|
|
1453
|
+
},
|
|
1454
|
+
section: "state",
|
|
1455
|
+
response: {
|
|
1456
|
+
description:
|
|
1457
|
+
"Returns the [State](#schema_state) object if a valid identifiers were provided. Returns [an error](#errors) otherwise.",
|
|
1458
|
+
schema: {
|
|
1459
|
+
type: "object",
|
|
1460
|
+
properties: {
|
|
1461
|
+
state: {
|
|
1462
|
+
$ref: "#/components/schemas/State",
|
|
1463
|
+
},
|
|
1464
|
+
},
|
|
1465
|
+
required: ["state"],
|
|
1466
|
+
title: "getOrSetStateResponse",
|
|
1467
|
+
additionalProperties: false,
|
|
1468
|
+
},
|
|
1469
|
+
},
|
|
1470
|
+
},
|
|
1406
1471
|
patchState: {
|
|
1407
1472
|
name: "patchState",
|
|
1408
1473
|
description:
|
|
@@ -6679,83 +6744,803 @@ export const state = {
|
|
|
6679
6744
|
},
|
|
6680
6745
|
},
|
|
6681
6746
|
},
|
|
6682
|
-
|
|
6683
|
-
|
|
6684
|
-
|
|
6685
|
-
|
|
6686
|
-
|
|
6687
|
-
|
|
6688
|
-
|
|
6689
|
-
|
|
6690
|
-
|
|
6691
|
-
|
|
6692
|
-
|
|
6693
|
-
|
|
6694
|
-
|
|
6695
|
-
|
|
6696
|
-
|
|
6697
|
-
|
|
6698
|
-
|
|
6699
|
-
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
description: "The request payload is invalid.",
|
|
6747
|
+
listTables: {
|
|
6748
|
+
name: "listTables",
|
|
6749
|
+
path: "/v1/tables",
|
|
6750
|
+
description: "Retrieves a list of all tables associated with your bot.",
|
|
6751
|
+
method: "get",
|
|
6752
|
+
parameters: {
|
|
6753
|
+
tags: {
|
|
6754
|
+
in: "query",
|
|
6755
|
+
type: "object",
|
|
6756
|
+
schema: {
|
|
6757
|
+
type: "object",
|
|
6758
|
+
additionalProperties: {
|
|
6759
|
+
type: "string",
|
|
6760
|
+
},
|
|
6761
|
+
},
|
|
6762
|
+
description:
|
|
6763
|
+
"Optional filters to narrow down the list by tags associated with tables.",
|
|
6764
|
+
},
|
|
6765
|
+
},
|
|
6766
|
+
section: "tables",
|
|
6767
|
+
response: {
|
|
6768
|
+
description: "Returns a list of tables.",
|
|
6769
|
+
schema: {
|
|
6770
|
+
type: "object",
|
|
6771
|
+
properties: {
|
|
6772
|
+
tables: {
|
|
6773
|
+
type: "array",
|
|
6774
|
+
items: {
|
|
6775
|
+
$ref: "#/components/schemas/Table",
|
|
6776
|
+
},
|
|
6777
|
+
},
|
|
6778
|
+
},
|
|
6779
|
+
required: ["tables"],
|
|
6780
|
+
title: "listTablesResponse",
|
|
6781
|
+
additionalProperties: false,
|
|
6782
|
+
},
|
|
6783
|
+
},
|
|
6720
6784
|
},
|
|
6721
|
-
{
|
|
6722
|
-
|
|
6723
|
-
|
|
6785
|
+
getTable: {
|
|
6786
|
+
name: "getTable",
|
|
6787
|
+
path: "/v1/tables/{table}",
|
|
6724
6788
|
description:
|
|
6725
|
-
"
|
|
6726
|
-
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
|
|
6732
|
-
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
|
|
6739
|
-
|
|
6740
|
-
|
|
6789
|
+
"Retrieves detailed information about a specific table, identified by its name or unique identifier.",
|
|
6790
|
+
parameters: {
|
|
6791
|
+
table: {
|
|
6792
|
+
type: "string",
|
|
6793
|
+
description:
|
|
6794
|
+
"The table's name or unique identifier for targeting specific table operations.",
|
|
6795
|
+
in: "path",
|
|
6796
|
+
},
|
|
6797
|
+
},
|
|
6798
|
+
method: "get",
|
|
6799
|
+
section: "tables",
|
|
6800
|
+
response: {
|
|
6801
|
+
description:
|
|
6802
|
+
"Details of the requested table, including row count and indexing status.",
|
|
6803
|
+
schema: {
|
|
6804
|
+
type: "object",
|
|
6805
|
+
properties: {
|
|
6806
|
+
table: {
|
|
6807
|
+
$ref: "#/components/schemas/Table",
|
|
6808
|
+
},
|
|
6809
|
+
rows: {
|
|
6810
|
+
type: "number",
|
|
6811
|
+
description: "The total number of rows present in the table.",
|
|
6812
|
+
},
|
|
6813
|
+
indexingCount: {
|
|
6814
|
+
type: "number",
|
|
6815
|
+
description:
|
|
6816
|
+
"The number of rows pending indexing, relevant for search functionalities.",
|
|
6817
|
+
},
|
|
6818
|
+
},
|
|
6819
|
+
required: ["table", "rows", "indexingCount"],
|
|
6820
|
+
title: "getTableResponse",
|
|
6821
|
+
additionalProperties: false,
|
|
6822
|
+
},
|
|
6823
|
+
},
|
|
6741
6824
|
},
|
|
6742
|
-
{
|
|
6743
|
-
|
|
6744
|
-
|
|
6825
|
+
createTable: {
|
|
6826
|
+
name: "createTable",
|
|
6827
|
+
path: "/v1/tables",
|
|
6745
6828
|
description:
|
|
6746
|
-
"
|
|
6829
|
+
"Initiates the creation of a new table based on the provided schema, excluding system-managed fields like IDs and timestamps.",
|
|
6830
|
+
method: "post",
|
|
6831
|
+
requestBody: {
|
|
6832
|
+
description: "Schema defining the structure of the new table",
|
|
6833
|
+
schema: {
|
|
6834
|
+
type: "object",
|
|
6835
|
+
properties: {
|
|
6836
|
+
name: {
|
|
6837
|
+
description:
|
|
6838
|
+
"Required. This name is used to identify your table.",
|
|
6839
|
+
type: "string",
|
|
6840
|
+
minLength: 1,
|
|
6841
|
+
},
|
|
6842
|
+
factor: {
|
|
6843
|
+
default: 1,
|
|
6844
|
+
type: "number",
|
|
6845
|
+
minimum: 1,
|
|
6846
|
+
maximum: 30,
|
|
6847
|
+
description:
|
|
6848
|
+
"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.",
|
|
6849
|
+
},
|
|
6850
|
+
schema: {
|
|
6851
|
+
type: "object",
|
|
6852
|
+
additionalProperties: true,
|
|
6853
|
+
description:
|
|
6854
|
+
"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.",
|
|
6855
|
+
},
|
|
6856
|
+
tags: {
|
|
6857
|
+
type: "object",
|
|
6858
|
+
additionalProperties: {
|
|
6859
|
+
type: "string",
|
|
6860
|
+
},
|
|
6861
|
+
description:
|
|
6862
|
+
"Optional tags to help organize your tables. These should be passed here as an object representing key/value pairs.",
|
|
6863
|
+
},
|
|
6864
|
+
},
|
|
6865
|
+
required: ["name", "schema"],
|
|
6866
|
+
title: "createTableBody",
|
|
6867
|
+
additionalProperties: false,
|
|
6868
|
+
},
|
|
6869
|
+
},
|
|
6870
|
+
section: "tables",
|
|
6871
|
+
response: {
|
|
6872
|
+
description: "The created table object.",
|
|
6873
|
+
schema: {
|
|
6874
|
+
type: "object",
|
|
6875
|
+
properties: {
|
|
6876
|
+
table: {
|
|
6877
|
+
$ref: "#/components/schemas/Table",
|
|
6878
|
+
},
|
|
6879
|
+
},
|
|
6880
|
+
required: ["table"],
|
|
6881
|
+
title: "createTableResponse",
|
|
6882
|
+
additionalProperties: false,
|
|
6883
|
+
},
|
|
6884
|
+
},
|
|
6885
|
+
parameters: {},
|
|
6747
6886
|
},
|
|
6748
|
-
{
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
description:
|
|
6752
|
-
|
|
6887
|
+
updateTable: {
|
|
6888
|
+
name: "updateTable",
|
|
6889
|
+
path: "/v1/tables/{table}",
|
|
6890
|
+
description: "Updates the schema or the name of an existing table.",
|
|
6891
|
+
method: "put",
|
|
6892
|
+
parameters: {
|
|
6893
|
+
table: {
|
|
6894
|
+
type: "string",
|
|
6895
|
+
description:
|
|
6896
|
+
"The table's name or unique identifier for targeting specific table operations.",
|
|
6897
|
+
in: "path",
|
|
6898
|
+
},
|
|
6899
|
+
},
|
|
6900
|
+
requestBody: {
|
|
6901
|
+
description: "The updated schema/name of the table.",
|
|
6902
|
+
schema: {
|
|
6903
|
+
type: "object",
|
|
6904
|
+
properties: {
|
|
6905
|
+
name: {
|
|
6906
|
+
description:
|
|
6907
|
+
"Required. This name is used to identify your table.",
|
|
6908
|
+
type: "string",
|
|
6909
|
+
minLength: 1,
|
|
6910
|
+
},
|
|
6911
|
+
schema: {
|
|
6912
|
+
type: "object",
|
|
6913
|
+
additionalProperties: true,
|
|
6914
|
+
description:
|
|
6915
|
+
"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.",
|
|
6916
|
+
},
|
|
6917
|
+
tags: {
|
|
6918
|
+
type: "object",
|
|
6919
|
+
additionalProperties: {
|
|
6920
|
+
type: "string",
|
|
6921
|
+
},
|
|
6922
|
+
description:
|
|
6923
|
+
"Optional tags to help organize your tables. These should be passed here as an object representing key/value pairs.",
|
|
6924
|
+
},
|
|
6925
|
+
},
|
|
6926
|
+
title: "updateTableBody",
|
|
6927
|
+
additionalProperties: false,
|
|
6928
|
+
},
|
|
6929
|
+
},
|
|
6930
|
+
section: "tables",
|
|
6931
|
+
response: {
|
|
6932
|
+
description: "The updated table",
|
|
6933
|
+
schema: {
|
|
6934
|
+
type: "object",
|
|
6935
|
+
properties: {
|
|
6936
|
+
table: {
|
|
6937
|
+
$ref: "#/components/schemas/Table",
|
|
6938
|
+
},
|
|
6939
|
+
},
|
|
6940
|
+
required: ["table"],
|
|
6941
|
+
title: "updateTableResponse",
|
|
6942
|
+
additionalProperties: false,
|
|
6943
|
+
},
|
|
6944
|
+
},
|
|
6753
6945
|
},
|
|
6754
|
-
{
|
|
6755
|
-
|
|
6946
|
+
renameTableColumn: {
|
|
6947
|
+
name: "renameTableColumn",
|
|
6948
|
+
path: "/v1/tables/{table}/column",
|
|
6949
|
+
description:
|
|
6950
|
+
"Renames an existing column within a table to better reflect its content or usage. The operation targets a specific table and requires the current and new column names.",
|
|
6951
|
+
method: "put",
|
|
6952
|
+
parameters: {
|
|
6953
|
+
table: {
|
|
6954
|
+
type: "string",
|
|
6955
|
+
description:
|
|
6956
|
+
"The table's name or unique identifier for targeting specific table operations.",
|
|
6957
|
+
in: "path",
|
|
6958
|
+
},
|
|
6959
|
+
},
|
|
6960
|
+
requestBody: {
|
|
6961
|
+
description:
|
|
6962
|
+
"Details of the column to be renamed, including its current name and the desired new name.",
|
|
6963
|
+
schema: {
|
|
6964
|
+
type: "object",
|
|
6965
|
+
properties: {
|
|
6966
|
+
name: {
|
|
6967
|
+
type: "string",
|
|
6968
|
+
description: "The existing name of the column.",
|
|
6969
|
+
},
|
|
6970
|
+
newName: {
|
|
6971
|
+
description: "The new name to assign to the column.",
|
|
6972
|
+
type: "string",
|
|
6973
|
+
minLength: 1,
|
|
6974
|
+
maxLength: 30,
|
|
6975
|
+
},
|
|
6976
|
+
},
|
|
6977
|
+
required: ["name", "newName"],
|
|
6978
|
+
title: "renameTableColumnBody",
|
|
6979
|
+
additionalProperties: false,
|
|
6980
|
+
},
|
|
6981
|
+
},
|
|
6982
|
+
section: "tables",
|
|
6983
|
+
response: {
|
|
6984
|
+
description:
|
|
6985
|
+
"Confirmation of the column rename operation, including the updated table schema.",
|
|
6986
|
+
schema: {
|
|
6987
|
+
type: "object",
|
|
6988
|
+
properties: {
|
|
6989
|
+
table: {
|
|
6990
|
+
$ref: "#/components/schemas/Table",
|
|
6991
|
+
},
|
|
6992
|
+
},
|
|
6993
|
+
required: ["table"],
|
|
6994
|
+
title: "renameTableColumnResponse",
|
|
6995
|
+
additionalProperties: false,
|
|
6996
|
+
},
|
|
6997
|
+
},
|
|
6998
|
+
},
|
|
6999
|
+
deleteTable: {
|
|
7000
|
+
name: "deleteTable",
|
|
7001
|
+
path: "/v1/tables/{table}",
|
|
7002
|
+
description:
|
|
7003
|
+
"Permanently deletes a table and all its associated data from the system. Use with caution, as this action cannot be undone.",
|
|
7004
|
+
parameters: {
|
|
7005
|
+
table: {
|
|
7006
|
+
type: "string",
|
|
7007
|
+
description:
|
|
7008
|
+
"The table's name or unique identifier for targeting specific table operations.",
|
|
7009
|
+
in: "path",
|
|
7010
|
+
},
|
|
7011
|
+
},
|
|
7012
|
+
method: "delete",
|
|
7013
|
+
section: "tables",
|
|
7014
|
+
response: {
|
|
7015
|
+
description: "Confirmation that the table has been deleted.",
|
|
7016
|
+
schema: {
|
|
7017
|
+
type: "object",
|
|
7018
|
+
title: "deleteTableResponse",
|
|
7019
|
+
additionalProperties: false,
|
|
7020
|
+
},
|
|
7021
|
+
},
|
|
7022
|
+
},
|
|
7023
|
+
getTableRow: {
|
|
7024
|
+
name: "getTableRow",
|
|
7025
|
+
path: "/v1/tables/{table}/row",
|
|
7026
|
+
description:
|
|
7027
|
+
"Fetches a specific row from a table using the row's unique identifier.",
|
|
7028
|
+
parameters: {
|
|
7029
|
+
table: {
|
|
7030
|
+
type: "string",
|
|
7031
|
+
description:
|
|
7032
|
+
"The table's name or unique identifier for targeting specific table operations.",
|
|
7033
|
+
in: "path",
|
|
7034
|
+
},
|
|
7035
|
+
id: {
|
|
7036
|
+
type: "object",
|
|
7037
|
+
description: "Identifier of the row within the table.",
|
|
7038
|
+
in: "query",
|
|
7039
|
+
required: true,
|
|
7040
|
+
schema: {
|
|
7041
|
+
type: "integer",
|
|
7042
|
+
},
|
|
7043
|
+
},
|
|
7044
|
+
},
|
|
7045
|
+
method: "get",
|
|
7046
|
+
section: "tables",
|
|
7047
|
+
response: {
|
|
7048
|
+
description: "The requested row object.",
|
|
7049
|
+
schema: {
|
|
7050
|
+
type: "object",
|
|
7051
|
+
properties: {
|
|
7052
|
+
row: {
|
|
7053
|
+
$ref: "#/components/schemas/Row",
|
|
7054
|
+
},
|
|
7055
|
+
},
|
|
7056
|
+
required: ["row"],
|
|
7057
|
+
title: "getTableRowResponse",
|
|
7058
|
+
additionalProperties: false,
|
|
7059
|
+
},
|
|
7060
|
+
},
|
|
7061
|
+
},
|
|
7062
|
+
findTableRows: {
|
|
7063
|
+
name: "findTableRows",
|
|
7064
|
+
path: "/v1/tables/{table}/rows/find",
|
|
7065
|
+
description:
|
|
7066
|
+
"Enables the search and filtering of rows within a table based on specific criteria. This operation supports complex queries for advanced data manipulation and retrieval.",
|
|
7067
|
+
parameters: {
|
|
7068
|
+
table: {
|
|
7069
|
+
type: "string",
|
|
7070
|
+
description:
|
|
7071
|
+
"The table's name or unique identifier for targeting specific table operations.",
|
|
7072
|
+
in: "path",
|
|
7073
|
+
},
|
|
7074
|
+
},
|
|
7075
|
+
requestBody: {
|
|
7076
|
+
description:
|
|
7077
|
+
"The search criteria and filters to apply when searching for rows. This includes conditions, search terms, and pagination options.",
|
|
7078
|
+
schema: {
|
|
7079
|
+
type: "object",
|
|
7080
|
+
properties: {
|
|
7081
|
+
limit: {
|
|
7082
|
+
default: 100,
|
|
7083
|
+
type: "integer",
|
|
7084
|
+
minimum: 1,
|
|
7085
|
+
maximum: 1000,
|
|
7086
|
+
description:
|
|
7087
|
+
"Limit for pagination, specifying the maximum number of rows to return.",
|
|
7088
|
+
},
|
|
7089
|
+
offset: {
|
|
7090
|
+
default: 0,
|
|
7091
|
+
type: "integer",
|
|
7092
|
+
minimum: 0,
|
|
7093
|
+
description:
|
|
7094
|
+
"Offset for pagination, specifying where to start returning rows from.",
|
|
7095
|
+
},
|
|
7096
|
+
filter: {
|
|
7097
|
+
type: "object",
|
|
7098
|
+
additionalProperties: true,
|
|
7099
|
+
description:
|
|
7100
|
+
'Provide a mongodb-like filter to apply to the query. Example: \\{ "name": \\{ "$eq": "John" \\} \\}',
|
|
7101
|
+
},
|
|
7102
|
+
group: {
|
|
7103
|
+
type: "object",
|
|
7104
|
+
additionalProperties: true,
|
|
7105
|
+
description:
|
|
7106
|
+
'Group the rows by a specific column and apply aggregations to them. Allowed values: key, avg, max, min, sum, count. Example: \\{ "someId": "key", "orders": ["sum", "avg"] \\}',
|
|
7107
|
+
},
|
|
7108
|
+
search: {
|
|
7109
|
+
type: "string",
|
|
7110
|
+
maxLength: 1024,
|
|
7111
|
+
description:
|
|
7112
|
+
"Search term to apply to the row search. When using this parameter, some rows which doesn't match the search term will be returned, use the similarity field to know how much the row matches the search term. ",
|
|
7113
|
+
},
|
|
7114
|
+
orderBy: {
|
|
7115
|
+
default: "id",
|
|
7116
|
+
type: "string",
|
|
7117
|
+
description:
|
|
7118
|
+
"Specifies the column by which to order the results. By default it is ordered by id. Build-in columns: id, createdAt, updatedAt",
|
|
7119
|
+
},
|
|
7120
|
+
orderDirection: {
|
|
7121
|
+
default: "asc",
|
|
7122
|
+
type: "string",
|
|
7123
|
+
enum: ["asc", "desc"],
|
|
7124
|
+
description:
|
|
7125
|
+
"Specifies the direction of sorting, either ascending or descending.",
|
|
7126
|
+
},
|
|
7127
|
+
},
|
|
7128
|
+
title: "findTableRowsBody",
|
|
7129
|
+
additionalProperties: false,
|
|
7130
|
+
},
|
|
7131
|
+
},
|
|
7132
|
+
method: "post",
|
|
7133
|
+
section: "tables",
|
|
7134
|
+
response: {
|
|
7135
|
+
description:
|
|
7136
|
+
"A collection of rows that match the search criteria, along with metadata such as total count and pagination details.",
|
|
7137
|
+
schema: {
|
|
7138
|
+
type: "object",
|
|
7139
|
+
properties: {
|
|
7140
|
+
rows: {
|
|
7141
|
+
type: "array",
|
|
7142
|
+
items: {
|
|
7143
|
+
$ref: "#/components/schemas/Row",
|
|
7144
|
+
},
|
|
7145
|
+
},
|
|
7146
|
+
count: {
|
|
7147
|
+
type: "integer",
|
|
7148
|
+
description:
|
|
7149
|
+
"The total number of rows matching the search criteria, regardless of pagination.",
|
|
7150
|
+
},
|
|
7151
|
+
offset: {
|
|
7152
|
+
type: "integer",
|
|
7153
|
+
},
|
|
7154
|
+
limit: {
|
|
7155
|
+
type: "integer",
|
|
7156
|
+
},
|
|
7157
|
+
},
|
|
7158
|
+
required: ["rows", "count", "offset", "limit"],
|
|
7159
|
+
title: "findTableRowsResponse",
|
|
7160
|
+
additionalProperties: false,
|
|
7161
|
+
},
|
|
7162
|
+
},
|
|
7163
|
+
},
|
|
7164
|
+
createTableRows: {
|
|
7165
|
+
name: "createTableRows",
|
|
7166
|
+
path: "/v1/tables/{table}/rows",
|
|
7167
|
+
description: "Inserts one or multiple new rows into the specified table.",
|
|
7168
|
+
parameters: {
|
|
7169
|
+
table: {
|
|
7170
|
+
type: "string",
|
|
7171
|
+
description:
|
|
7172
|
+
"The table's name or unique identifier for targeting specific table operations.",
|
|
7173
|
+
in: "path",
|
|
7174
|
+
},
|
|
7175
|
+
},
|
|
7176
|
+
requestBody: {
|
|
7177
|
+
description:
|
|
7178
|
+
"A batch of new rows to insert into the table. Each row must adhere to the table’s schema. A maximum of 1000 rows can be inserted in a single request.",
|
|
7179
|
+
schema: {
|
|
7180
|
+
type: "object",
|
|
7181
|
+
properties: {
|
|
7182
|
+
rows: {
|
|
7183
|
+
type: "array",
|
|
7184
|
+
items: {
|
|
7185
|
+
type: "object",
|
|
7186
|
+
properties: {},
|
|
7187
|
+
additionalProperties: true,
|
|
7188
|
+
},
|
|
7189
|
+
minItems: 1,
|
|
7190
|
+
maxItems: 1000,
|
|
7191
|
+
},
|
|
7192
|
+
},
|
|
7193
|
+
required: ["rows"],
|
|
7194
|
+
title: "createTableRowsBody",
|
|
7195
|
+
additionalProperties: false,
|
|
7196
|
+
},
|
|
7197
|
+
},
|
|
7198
|
+
method: "post",
|
|
7199
|
+
section: "tables",
|
|
7200
|
+
response: {
|
|
7201
|
+
description:
|
|
7202
|
+
"A summary of the insertion operation, including any warnings or errors encountered, and the inserted row data.",
|
|
7203
|
+
schema: {
|
|
7204
|
+
type: "object",
|
|
7205
|
+
properties: {
|
|
7206
|
+
rows: {
|
|
7207
|
+
type: "array",
|
|
7208
|
+
items: {
|
|
7209
|
+
$ref: "#/components/schemas/Row",
|
|
7210
|
+
},
|
|
7211
|
+
},
|
|
7212
|
+
warnings: {
|
|
7213
|
+
type: "array",
|
|
7214
|
+
items: {
|
|
7215
|
+
type: "string",
|
|
7216
|
+
},
|
|
7217
|
+
description:
|
|
7218
|
+
"Alerts for minor issues that don't block the operation but suggest possible improvements.",
|
|
7219
|
+
},
|
|
7220
|
+
errors: {
|
|
7221
|
+
type: "array",
|
|
7222
|
+
items: {
|
|
7223
|
+
type: "string",
|
|
7224
|
+
},
|
|
7225
|
+
description:
|
|
7226
|
+
"Critical issues in specific elements that prevent their successful processing, allowing partial operation success.",
|
|
7227
|
+
},
|
|
7228
|
+
},
|
|
7229
|
+
required: ["rows"],
|
|
7230
|
+
title: "createTableRowsResponse",
|
|
7231
|
+
additionalProperties: false,
|
|
7232
|
+
},
|
|
7233
|
+
},
|
|
7234
|
+
},
|
|
7235
|
+
deleteTableRows: {
|
|
7236
|
+
name: "deleteTableRows",
|
|
7237
|
+
path: "/v1/tables/{table}/rows/delete",
|
|
7238
|
+
description:
|
|
7239
|
+
"Allows selective deletion of rows or complete clearance of a table.",
|
|
7240
|
+
parameters: {
|
|
7241
|
+
table: {
|
|
7242
|
+
type: "string",
|
|
7243
|
+
description:
|
|
7244
|
+
"The table's name or unique identifier for targeting specific table operations.",
|
|
7245
|
+
in: "path",
|
|
7246
|
+
},
|
|
7247
|
+
},
|
|
7248
|
+
requestBody: {
|
|
7249
|
+
description: "Identifiers of the rows to be deleted.",
|
|
7250
|
+
schema: {
|
|
7251
|
+
type: "object",
|
|
7252
|
+
properties: {
|
|
7253
|
+
ids: {
|
|
7254
|
+
type: "array",
|
|
7255
|
+
items: {
|
|
7256
|
+
type: "number",
|
|
7257
|
+
},
|
|
7258
|
+
maxItems: 1000,
|
|
7259
|
+
},
|
|
7260
|
+
filter: {
|
|
7261
|
+
type: "object",
|
|
7262
|
+
additionalProperties: true,
|
|
7263
|
+
description:
|
|
7264
|
+
'Filter to apply when deleting rows. Example: \\{ "name": \\{ "$eq": "John" \\} \\}',
|
|
7265
|
+
},
|
|
7266
|
+
deleteAllRows: {
|
|
7267
|
+
type: "boolean",
|
|
7268
|
+
description:
|
|
7269
|
+
"Flag to delete all rows. Use with caution as this action is irreversible.",
|
|
7270
|
+
},
|
|
7271
|
+
},
|
|
7272
|
+
title: "deleteTableRowsBody",
|
|
7273
|
+
additionalProperties: false,
|
|
7274
|
+
},
|
|
7275
|
+
},
|
|
7276
|
+
method: "post",
|
|
7277
|
+
section: "tables",
|
|
7278
|
+
response: {
|
|
7279
|
+
description: "Confirms the number of rows successfully deleted.",
|
|
7280
|
+
schema: {
|
|
7281
|
+
type: "object",
|
|
7282
|
+
properties: {
|
|
7283
|
+
deletedRows: {
|
|
7284
|
+
type: "number",
|
|
7285
|
+
},
|
|
7286
|
+
},
|
|
7287
|
+
required: ["deletedRows"],
|
|
7288
|
+
title: "deleteTableRowsResponse",
|
|
7289
|
+
additionalProperties: false,
|
|
7290
|
+
},
|
|
7291
|
+
},
|
|
7292
|
+
},
|
|
7293
|
+
updateTableRows: {
|
|
7294
|
+
name: "updateTableRows",
|
|
7295
|
+
path: "/v1/tables/{table}/rows",
|
|
7296
|
+
description:
|
|
7297
|
+
"Updates specified rows in a table, allowing partial success with detailed feedback on errors.",
|
|
7298
|
+
method: "put",
|
|
7299
|
+
parameters: {
|
|
7300
|
+
table: {
|
|
7301
|
+
type: "string",
|
|
7302
|
+
description:
|
|
7303
|
+
"The table's name or unique identifier for targeting specific table operations.",
|
|
7304
|
+
in: "path",
|
|
7305
|
+
},
|
|
7306
|
+
},
|
|
7307
|
+
requestBody: {
|
|
7308
|
+
description:
|
|
7309
|
+
"Data for rows to update, including IDs. Errors affect only specific rows, not the entire batch.",
|
|
7310
|
+
schema: {
|
|
7311
|
+
type: "object",
|
|
7312
|
+
properties: {
|
|
7313
|
+
rows: {
|
|
7314
|
+
type: "array",
|
|
7315
|
+
items: {
|
|
7316
|
+
type: "object",
|
|
7317
|
+
properties: {
|
|
7318
|
+
id: {
|
|
7319
|
+
type: "number",
|
|
7320
|
+
},
|
|
7321
|
+
},
|
|
7322
|
+
required: ["id"],
|
|
7323
|
+
additionalProperties: true,
|
|
7324
|
+
},
|
|
7325
|
+
minItems: 1,
|
|
7326
|
+
maxItems: 1000,
|
|
7327
|
+
description: "Rows with updated data, identified by ID.",
|
|
7328
|
+
},
|
|
7329
|
+
},
|
|
7330
|
+
required: ["rows"],
|
|
7331
|
+
title: "updateTableRowsBody",
|
|
7332
|
+
additionalProperties: false,
|
|
7333
|
+
},
|
|
7334
|
+
},
|
|
7335
|
+
section: "tables",
|
|
7336
|
+
response: {
|
|
7337
|
+
description:
|
|
7338
|
+
"Returns updated rows, including warnings for minor issues and errors for failed updates.",
|
|
7339
|
+
schema: {
|
|
7340
|
+
type: "object",
|
|
7341
|
+
properties: {
|
|
7342
|
+
rows: {
|
|
7343
|
+
type: "array",
|
|
7344
|
+
items: {
|
|
7345
|
+
$ref: "#/components/schemas/Row",
|
|
7346
|
+
},
|
|
7347
|
+
},
|
|
7348
|
+
warnings: {
|
|
7349
|
+
type: "array",
|
|
7350
|
+
items: {
|
|
7351
|
+
type: "string",
|
|
7352
|
+
},
|
|
7353
|
+
description:
|
|
7354
|
+
"Alerts for minor issues that don't block the operation but suggest possible improvements.",
|
|
7355
|
+
},
|
|
7356
|
+
errors: {
|
|
7357
|
+
type: "array",
|
|
7358
|
+
items: {
|
|
7359
|
+
type: "string",
|
|
7360
|
+
},
|
|
7361
|
+
description:
|
|
7362
|
+
"Critical issues in specific elements that prevent their successful processing, allowing partial operation success.",
|
|
7363
|
+
},
|
|
7364
|
+
},
|
|
7365
|
+
required: ["rows"],
|
|
7366
|
+
title: "updateTableRowsResponse",
|
|
7367
|
+
additionalProperties: false,
|
|
7368
|
+
},
|
|
7369
|
+
},
|
|
7370
|
+
},
|
|
7371
|
+
upsertTableRows: {
|
|
7372
|
+
name: "upsertTableRows",
|
|
7373
|
+
path: "/v1/tables/{table}/rows/upsert",
|
|
7374
|
+
description:
|
|
7375
|
+
"Inserts or updates rows based on a key. If a row exists, it is updated; otherwise, a new row is created.",
|
|
7376
|
+
method: "post",
|
|
7377
|
+
parameters: {
|
|
7378
|
+
table: {
|
|
7379
|
+
type: "string",
|
|
7380
|
+
description:
|
|
7381
|
+
"The table's name or unique identifier for targeting specific table operations.",
|
|
7382
|
+
in: "path",
|
|
7383
|
+
},
|
|
7384
|
+
},
|
|
7385
|
+
requestBody: {
|
|
7386
|
+
description:
|
|
7387
|
+
"Rows for insertion or update, with a key column to determine action. Supports partial successes.",
|
|
7388
|
+
schema: {
|
|
7389
|
+
type: "object",
|
|
7390
|
+
properties: {
|
|
7391
|
+
rows: {
|
|
7392
|
+
type: "array",
|
|
7393
|
+
items: {
|
|
7394
|
+
type: "object",
|
|
7395
|
+
properties: {
|
|
7396
|
+
id: {
|
|
7397
|
+
type: "number",
|
|
7398
|
+
},
|
|
7399
|
+
},
|
|
7400
|
+
additionalProperties: true,
|
|
7401
|
+
},
|
|
7402
|
+
minItems: 1,
|
|
7403
|
+
maxItems: 1000,
|
|
7404
|
+
},
|
|
7405
|
+
keyColumn: {
|
|
7406
|
+
default: "id",
|
|
7407
|
+
type: "string",
|
|
7408
|
+
minLength: 1,
|
|
7409
|
+
maxLength: 30,
|
|
7410
|
+
description:
|
|
7411
|
+
'Determines if a row is inserted or updated. Defaults to "id".',
|
|
7412
|
+
},
|
|
7413
|
+
},
|
|
7414
|
+
required: ["rows"],
|
|
7415
|
+
title: "upsertTableRowsBody",
|
|
7416
|
+
additionalProperties: false,
|
|
7417
|
+
},
|
|
7418
|
+
},
|
|
7419
|
+
section: "tables",
|
|
7420
|
+
response: {
|
|
7421
|
+
description:
|
|
7422
|
+
"Summary of insertions and updates, including any warnings or errors.",
|
|
7423
|
+
schema: {
|
|
7424
|
+
type: "object",
|
|
7425
|
+
properties: {
|
|
7426
|
+
inserted: {
|
|
7427
|
+
type: "array",
|
|
7428
|
+
items: {
|
|
7429
|
+
$ref: "#/components/schemas/Row",
|
|
7430
|
+
},
|
|
7431
|
+
},
|
|
7432
|
+
updated: {
|
|
7433
|
+
type: "array",
|
|
7434
|
+
items: {
|
|
7435
|
+
$ref: "#/components/schemas/Row",
|
|
7436
|
+
},
|
|
7437
|
+
},
|
|
7438
|
+
warnings: {
|
|
7439
|
+
type: "array",
|
|
7440
|
+
items: {
|
|
7441
|
+
type: "string",
|
|
7442
|
+
},
|
|
7443
|
+
description:
|
|
7444
|
+
"Alerts for minor issues that don't block the operation but suggest possible improvements.",
|
|
7445
|
+
},
|
|
7446
|
+
errors: {
|
|
7447
|
+
type: "array",
|
|
7448
|
+
items: {
|
|
7449
|
+
type: "string",
|
|
7450
|
+
},
|
|
7451
|
+
description:
|
|
7452
|
+
"Critical issues in specific elements that prevent their successful processing, allowing partial operation success.",
|
|
7453
|
+
},
|
|
7454
|
+
},
|
|
7455
|
+
required: ["inserted", "updated"],
|
|
7456
|
+
title: "upsertTableRowsResponse",
|
|
7457
|
+
additionalProperties: false,
|
|
7458
|
+
},
|
|
7459
|
+
},
|
|
7460
|
+
},
|
|
7461
|
+
},
|
|
7462
|
+
metadata: {
|
|
7463
|
+
title: "Botpress API",
|
|
7464
|
+
description: "API for Botpress Cloud",
|
|
7465
|
+
server: "https://api.botpress.cloud",
|
|
7466
|
+
version: "0.18.1",
|
|
7467
|
+
prefix: "v1",
|
|
7468
|
+
},
|
|
7469
|
+
errors: [
|
|
7470
|
+
{
|
|
7471
|
+
status: 500,
|
|
7472
|
+
type: "Unknown",
|
|
7473
|
+
description: "An unknown error occurred",
|
|
7474
|
+
},
|
|
7475
|
+
{
|
|
7476
|
+
status: 500,
|
|
7477
|
+
type: "Internal",
|
|
7478
|
+
description: "An internal error occurred",
|
|
7479
|
+
},
|
|
7480
|
+
{
|
|
7481
|
+
status: 401,
|
|
7482
|
+
type: "Unauthorized",
|
|
7483
|
+
description: "The request requires to be authenticated.",
|
|
7484
|
+
},
|
|
7485
|
+
{
|
|
7486
|
+
status: 403,
|
|
7487
|
+
type: "Forbidden",
|
|
7488
|
+
description: "The requested action can't be peform by this resource.",
|
|
7489
|
+
},
|
|
7490
|
+
{
|
|
7491
|
+
status: 413,
|
|
7492
|
+
type: "PayloadTooLarge",
|
|
7493
|
+
description: "The request payload is too large.",
|
|
7494
|
+
},
|
|
7495
|
+
{
|
|
7496
|
+
status: 400,
|
|
7497
|
+
type: "InvalidPayload",
|
|
7498
|
+
description: "The request payload is invalid.",
|
|
7499
|
+
},
|
|
7500
|
+
{
|
|
7501
|
+
status: 415,
|
|
7502
|
+
type: "UnsupportedMediaType",
|
|
7503
|
+
description:
|
|
7504
|
+
"The request is invalid because the content-type is not supported.",
|
|
7505
|
+
},
|
|
7506
|
+
{
|
|
7507
|
+
status: 405,
|
|
7508
|
+
type: "MethodNotFound",
|
|
7509
|
+
description: "The requested method does not exist.",
|
|
7510
|
+
},
|
|
7511
|
+
{
|
|
7512
|
+
status: 404,
|
|
7513
|
+
type: "ResourceNotFound",
|
|
7514
|
+
description: "The requested resource does not exist.",
|
|
7515
|
+
},
|
|
7516
|
+
{
|
|
7517
|
+
status: 400,
|
|
7518
|
+
type: "InvalidJsonSchema",
|
|
7519
|
+
description: "The provided JSON schema is invalid.",
|
|
7520
|
+
},
|
|
7521
|
+
{
|
|
7522
|
+
status: 400,
|
|
7523
|
+
type: "InvalidDataFormat",
|
|
7524
|
+
description:
|
|
7525
|
+
"The provided data doesn't respect the provided JSON schema.",
|
|
7526
|
+
},
|
|
7527
|
+
{
|
|
7528
|
+
status: 400,
|
|
7529
|
+
type: "InvalidIdentifier",
|
|
7530
|
+
description:
|
|
7531
|
+
"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.",
|
|
7532
|
+
},
|
|
7533
|
+
{
|
|
7534
|
+
status: 409,
|
|
6756
7535
|
type: "RelationConflict",
|
|
6757
7536
|
description:
|
|
6758
|
-
"The resource is
|
|
7537
|
+
"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together.",
|
|
7538
|
+
},
|
|
7539
|
+
{
|
|
7540
|
+
status: 409,
|
|
7541
|
+
type: "ReferenceConstraint",
|
|
7542
|
+
description:
|
|
7543
|
+
"The resource cannot be deleted because it's referenced by another resource",
|
|
6759
7544
|
},
|
|
6760
7545
|
{
|
|
6761
7546
|
status: 400,
|
|
@@ -6818,6 +7603,7 @@ export const state = {
|
|
|
6818
7603
|
getOrCreateUserBody: true,
|
|
6819
7604
|
updateUserBody: true,
|
|
6820
7605
|
setStateBody: true,
|
|
7606
|
+
getOrSetStateBody: true,
|
|
6821
7607
|
patchStateBody: true,
|
|
6822
7608
|
callActionBody: true,
|
|
6823
7609
|
configureIntegrationBody: true,
|
|
@@ -6842,6 +7628,14 @@ export const state = {
|
|
|
6842
7628
|
changeAISpendQuotaBody: true,
|
|
6843
7629
|
introspectBody: true,
|
|
6844
7630
|
createFileBody: true,
|
|
7631
|
+
createTableBody: true,
|
|
7632
|
+
updateTableBody: true,
|
|
7633
|
+
renameTableColumnBody: true,
|
|
7634
|
+
findTableRowsBody: true,
|
|
7635
|
+
createTableRowsBody: true,
|
|
7636
|
+
deleteTableRowsBody: true,
|
|
7637
|
+
updateTableRowsBody: true,
|
|
7638
|
+
upsertTableRowsBody: true,
|
|
6845
7639
|
},
|
|
6846
7640
|
responses: {
|
|
6847
7641
|
createConversationResponse: true,
|
|
@@ -6871,6 +7665,7 @@ export const state = {
|
|
|
6871
7665
|
deleteUserResponse: true,
|
|
6872
7666
|
getStateResponse: true,
|
|
6873
7667
|
setStateResponse: true,
|
|
7668
|
+
getOrSetStateResponse: true,
|
|
6874
7669
|
patchStateResponse: true,
|
|
6875
7670
|
callActionResponse: true,
|
|
6876
7671
|
configureIntegrationResponse: true,
|
|
@@ -6939,6 +7734,18 @@ export const state = {
|
|
|
6939
7734
|
downloadFileResponse: true,
|
|
6940
7735
|
deleteFileResponse: true,
|
|
6941
7736
|
listFilesResponse: true,
|
|
7737
|
+
listTablesResponse: true,
|
|
7738
|
+
getTableResponse: true,
|
|
7739
|
+
createTableResponse: true,
|
|
7740
|
+
updateTableResponse: true,
|
|
7741
|
+
renameTableColumnResponse: true,
|
|
7742
|
+
deleteTableResponse: true,
|
|
7743
|
+
getTableRowResponse: true,
|
|
7744
|
+
findTableRowsResponse: true,
|
|
7745
|
+
createTableRowsResponse: true,
|
|
7746
|
+
deleteTableRowsResponse: true,
|
|
7747
|
+
updateTableRowsResponse: true,
|
|
7748
|
+
upsertTableRowsResponse: true,
|
|
6942
7749
|
},
|
|
6943
7750
|
schemas: {
|
|
6944
7751
|
Bot: true,
|
|
@@ -8656,8 +9463,9 @@ export const state = {
|
|
|
8656
9463
|
description: "Unique identifier for the table",
|
|
8657
9464
|
},
|
|
8658
9465
|
name: {
|
|
8659
|
-
type: "string",
|
|
8660
9466
|
description: "Required. This name is used to identify your table.",
|
|
9467
|
+
type: "string",
|
|
9468
|
+
minLength: 1,
|
|
8661
9469
|
},
|
|
8662
9470
|
factor: {
|
|
8663
9471
|
default: 1,
|
|
@@ -8908,7 +9716,7 @@ export const state = {
|
|
|
8908
9716
|
description: "",
|
|
8909
9717
|
title: "State",
|
|
8910
9718
|
name: "state",
|
|
8911
|
-
operations: ["getState", "setState", "patchState"],
|
|
9719
|
+
operations: ["getState", "setState", "getOrSetState", "patchState"],
|
|
8912
9720
|
schema: "State",
|
|
8913
9721
|
},
|
|
8914
9722
|
{
|
|
@@ -9054,9 +9862,23 @@ export const state = {
|
|
|
9054
9862
|
},
|
|
9055
9863
|
{
|
|
9056
9864
|
title: "Tables",
|
|
9057
|
-
description:
|
|
9865
|
+
description:
|
|
9866
|
+
"Manage and interact with table structures, including creation, updates, and querying of tables and their rows.",
|
|
9058
9867
|
name: "tables",
|
|
9059
|
-
operations: [
|
|
9868
|
+
operations: [
|
|
9869
|
+
"listTables",
|
|
9870
|
+
"getTable",
|
|
9871
|
+
"createTable",
|
|
9872
|
+
"updateTable",
|
|
9873
|
+
"renameTableColumn",
|
|
9874
|
+
"deleteTable",
|
|
9875
|
+
"getTableRow",
|
|
9876
|
+
"findTableRows",
|
|
9877
|
+
"createTableRows",
|
|
9878
|
+
"deleteTableRows",
|
|
9879
|
+
"updateTableRows",
|
|
9880
|
+
"upsertTableRows",
|
|
9881
|
+
],
|
|
9060
9882
|
schema: "Table",
|
|
9061
9883
|
},
|
|
9062
9884
|
],
|