@botpress/api 0.35.1 → 0.37.0
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 +32892 -15591
- package/dist/src/gen/state.d.ts +103 -0
- package/package.json +2 -2
- package/src/gen/metadata.json +1 -1
- package/src/gen/openapi.json +1 -1
- package/src/gen/state.ts +132 -5
package/src/gen/state.ts
CHANGED
|
@@ -104,6 +104,24 @@ export const state = {
|
|
|
104
104
|
"description": "Provide the `meta.nextToken` value provided in the last API response to retrieve the next page of results",
|
|
105
105
|
"type": "string"
|
|
106
106
|
},
|
|
107
|
+
"sortField": {
|
|
108
|
+
"in": "query",
|
|
109
|
+
"description": "Sort results by this field",
|
|
110
|
+
"type": "string",
|
|
111
|
+
"enum": [
|
|
112
|
+
"createdAt",
|
|
113
|
+
"updatedAt"
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
"sortDirection": {
|
|
117
|
+
"in": "query",
|
|
118
|
+
"description": "Sort results in this direction",
|
|
119
|
+
"type": "string",
|
|
120
|
+
"enum": [
|
|
121
|
+
"asc",
|
|
122
|
+
"desc"
|
|
123
|
+
]
|
|
124
|
+
},
|
|
107
125
|
"tags": {
|
|
108
126
|
"in": "query",
|
|
109
127
|
"type": "object",
|
|
@@ -9956,7 +9974,7 @@ export const state = {
|
|
|
9956
9974
|
"contextDepth": {
|
|
9957
9975
|
"in": "query",
|
|
9958
9976
|
"type": "integer",
|
|
9959
|
-
"description": "The number of neighbor passages to prepend and append as surrounding context to the content of each returned passage
|
|
9977
|
+
"description": "The number of neighbor passages to prepend and append as surrounding context to the content of each returned passage (default: 1, minimum: 0, maximum: 10)."
|
|
9960
9978
|
},
|
|
9961
9979
|
"limit": {
|
|
9962
9980
|
"in": "query",
|
|
@@ -10003,14 +10021,18 @@ export const state = {
|
|
|
10003
10021
|
"table",
|
|
10004
10022
|
"code"
|
|
10005
10023
|
],
|
|
10006
|
-
"description": "The subtype of passage, if
|
|
10024
|
+
"description": "The subtype of passage, if available."
|
|
10007
10025
|
},
|
|
10008
10026
|
"pageNumber": {
|
|
10009
10027
|
"type": "integer",
|
|
10010
10028
|
"description": "Page number the passage is located on. Only applicable if the passage was extracted from a PDF file."
|
|
10029
|
+
},
|
|
10030
|
+
"position": {
|
|
10031
|
+
"type": "integer",
|
|
10032
|
+
"description": "Position number of the passage in the file relative to the other passages, if available. Can be used to know the order of passages within a file."
|
|
10011
10033
|
}
|
|
10012
10034
|
},
|
|
10013
|
-
"description": "The passage metadata"
|
|
10035
|
+
"description": "The passage metadata."
|
|
10014
10036
|
},
|
|
10015
10037
|
"file": {
|
|
10016
10038
|
"type": "object",
|
|
@@ -10061,6 +10083,109 @@ export const state = {
|
|
|
10061
10083
|
}
|
|
10062
10084
|
}
|
|
10063
10085
|
},
|
|
10086
|
+
"listFilePassages": {
|
|
10087
|
+
"name": "listFilePassages",
|
|
10088
|
+
"path": "/v1/files/{fileId}/passages",
|
|
10089
|
+
"description": "List passages for a file",
|
|
10090
|
+
"method": "get",
|
|
10091
|
+
"section": "files",
|
|
10092
|
+
"parameters": {
|
|
10093
|
+
"nextToken": {
|
|
10094
|
+
"in": "query",
|
|
10095
|
+
"description": "Provide the `meta.nextToken` value provided in the last API response to retrieve the next page of results",
|
|
10096
|
+
"type": "string"
|
|
10097
|
+
},
|
|
10098
|
+
"limit": {
|
|
10099
|
+
"type": "number",
|
|
10100
|
+
"description": "The maximum number of passages to return per request (optional, default: 20, max: 200).",
|
|
10101
|
+
"in": "query"
|
|
10102
|
+
},
|
|
10103
|
+
"fileId": {
|
|
10104
|
+
"type": "string",
|
|
10105
|
+
"description": "File ID",
|
|
10106
|
+
"in": "path"
|
|
10107
|
+
}
|
|
10108
|
+
},
|
|
10109
|
+
"response": {
|
|
10110
|
+
"description": "Returns the list of passages extracted from a file.",
|
|
10111
|
+
"schema": {
|
|
10112
|
+
"type": "object",
|
|
10113
|
+
"properties": {
|
|
10114
|
+
"passages": {
|
|
10115
|
+
"type": "array",
|
|
10116
|
+
"items": {
|
|
10117
|
+
"type": "object",
|
|
10118
|
+
"properties": {
|
|
10119
|
+
"id": {
|
|
10120
|
+
"type": "string",
|
|
10121
|
+
"description": "Passage ID"
|
|
10122
|
+
},
|
|
10123
|
+
"content": {
|
|
10124
|
+
"type": "string",
|
|
10125
|
+
"description": "The content of the passage."
|
|
10126
|
+
},
|
|
10127
|
+
"meta": {
|
|
10128
|
+
"type": "object",
|
|
10129
|
+
"properties": {
|
|
10130
|
+
"type": {
|
|
10131
|
+
"type": "string",
|
|
10132
|
+
"enum": [
|
|
10133
|
+
"chunk"
|
|
10134
|
+
],
|
|
10135
|
+
"description": "The type of passage"
|
|
10136
|
+
},
|
|
10137
|
+
"subtype": {
|
|
10138
|
+
"type": "string",
|
|
10139
|
+
"enum": [
|
|
10140
|
+
"title",
|
|
10141
|
+
"subtitle",
|
|
10142
|
+
"paragraph",
|
|
10143
|
+
"list",
|
|
10144
|
+
"blockquote",
|
|
10145
|
+
"table",
|
|
10146
|
+
"code"
|
|
10147
|
+
],
|
|
10148
|
+
"description": "The subtype of passage, if available."
|
|
10149
|
+
},
|
|
10150
|
+
"pageNumber": {
|
|
10151
|
+
"type": "integer",
|
|
10152
|
+
"description": "Page number the passage is located on. Only applicable if the passage was extracted from a PDF file."
|
|
10153
|
+
},
|
|
10154
|
+
"position": {
|
|
10155
|
+
"type": "integer",
|
|
10156
|
+
"description": "Position number of the passage in the file relative to the other passages, if available. Can be used to know the order of passages within a file."
|
|
10157
|
+
}
|
|
10158
|
+
},
|
|
10159
|
+
"description": "The passage metadata."
|
|
10160
|
+
}
|
|
10161
|
+
},
|
|
10162
|
+
"required": [
|
|
10163
|
+
"id",
|
|
10164
|
+
"content",
|
|
10165
|
+
"meta"
|
|
10166
|
+
]
|
|
10167
|
+
}
|
|
10168
|
+
},
|
|
10169
|
+
"meta": {
|
|
10170
|
+
"type": "object",
|
|
10171
|
+
"properties": {
|
|
10172
|
+
"nextToken": {
|
|
10173
|
+
"type": "string",
|
|
10174
|
+
"description": "The token to use to retrieve the next page of results, passed as a query string parameter (value should be URL-encoded) to this API endpoint."
|
|
10175
|
+
}
|
|
10176
|
+
},
|
|
10177
|
+
"additionalProperties": false
|
|
10178
|
+
}
|
|
10179
|
+
},
|
|
10180
|
+
"required": [
|
|
10181
|
+
"passages",
|
|
10182
|
+
"meta"
|
|
10183
|
+
],
|
|
10184
|
+
"title": "listFilePassagesResponse",
|
|
10185
|
+
"additionalProperties": false
|
|
10186
|
+
}
|
|
10187
|
+
}
|
|
10188
|
+
},
|
|
10064
10189
|
"listTables": {
|
|
10065
10190
|
"name": "listTables",
|
|
10066
10191
|
"path": "/v1/tables",
|
|
@@ -10962,7 +11087,7 @@ export const state = {
|
|
|
10962
11087
|
"title": "Botpress API",
|
|
10963
11088
|
"description": "API for Botpress Cloud",
|
|
10964
11089
|
"server": "https://api.botpress.cloud",
|
|
10965
|
-
"version": "0.
|
|
11090
|
+
"version": "0.37.0",
|
|
10966
11091
|
"prefix": "v1"
|
|
10967
11092
|
},
|
|
10968
11093
|
"errors": [
|
|
@@ -11262,6 +11387,7 @@ export const state = {
|
|
|
11262
11387
|
"getFileResponse": true,
|
|
11263
11388
|
"updateFileMetadataResponse": true,
|
|
11264
11389
|
"searchFilesResponse": true,
|
|
11390
|
+
"listFilePassagesResponse": true,
|
|
11265
11391
|
"listTablesResponse": true,
|
|
11266
11392
|
"getTableResponse": true,
|
|
11267
11393
|
"getOrCreateTableResponse": true,
|
|
@@ -14046,7 +14172,8 @@ export const state = {
|
|
|
14046
14172
|
"listFiles",
|
|
14047
14173
|
"getFile",
|
|
14048
14174
|
"updateFileMetadata",
|
|
14049
|
-
"searchFiles"
|
|
14175
|
+
"searchFiles",
|
|
14176
|
+
"listFilePassages"
|
|
14050
14177
|
],
|
|
14051
14178
|
"schema": "File"
|
|
14052
14179
|
}
|