@botpress/api 0.35.1 → 0.36.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/src/gen/state.ts CHANGED
@@ -9956,7 +9956,7 @@ export const state = {
9956
9956
  "contextDepth": {
9957
9957
  "in": "query",
9958
9958
  "type": "integer",
9959
- "description": "The number of neighbor passages to prepend and append as surrounding context to the content of each returned passage. Default: 0, Maximum: 10"
9959
+ "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
9960
  },
9961
9961
  "limit": {
9962
9962
  "in": "query",
@@ -10003,14 +10003,18 @@ export const state = {
10003
10003
  "table",
10004
10004
  "code"
10005
10005
  ],
10006
- "description": "The subtype of passage, if any."
10006
+ "description": "The subtype of passage, if available."
10007
10007
  },
10008
10008
  "pageNumber": {
10009
10009
  "type": "integer",
10010
10010
  "description": "Page number the passage is located on. Only applicable if the passage was extracted from a PDF file."
10011
+ },
10012
+ "position": {
10013
+ "type": "integer",
10014
+ "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
10015
  }
10012
10016
  },
10013
- "description": "The passage metadata"
10017
+ "description": "The passage metadata."
10014
10018
  },
10015
10019
  "file": {
10016
10020
  "type": "object",
@@ -10061,6 +10065,109 @@ export const state = {
10061
10065
  }
10062
10066
  }
10063
10067
  },
10068
+ "listFilePassages": {
10069
+ "name": "listFilePassages",
10070
+ "path": "/v1/files/{fileId}/passages",
10071
+ "description": "List passages for a file",
10072
+ "method": "get",
10073
+ "section": "files",
10074
+ "parameters": {
10075
+ "nextToken": {
10076
+ "in": "query",
10077
+ "description": "Provide the `meta.nextToken` value provided in the last API response to retrieve the next page of results",
10078
+ "type": "string"
10079
+ },
10080
+ "limit": {
10081
+ "type": "number",
10082
+ "description": "The maximum number of passages to return per request (optional, default: 20, max: 200).",
10083
+ "in": "query"
10084
+ },
10085
+ "fileId": {
10086
+ "type": "string",
10087
+ "description": "File ID",
10088
+ "in": "path"
10089
+ }
10090
+ },
10091
+ "response": {
10092
+ "description": "Returns the list of passages extracted from a file.",
10093
+ "schema": {
10094
+ "type": "object",
10095
+ "properties": {
10096
+ "passages": {
10097
+ "type": "array",
10098
+ "items": {
10099
+ "type": "object",
10100
+ "properties": {
10101
+ "id": {
10102
+ "type": "string",
10103
+ "description": "Passage ID"
10104
+ },
10105
+ "content": {
10106
+ "type": "string",
10107
+ "description": "The content of the passage."
10108
+ },
10109
+ "meta": {
10110
+ "type": "object",
10111
+ "properties": {
10112
+ "type": {
10113
+ "type": "string",
10114
+ "enum": [
10115
+ "chunk"
10116
+ ],
10117
+ "description": "The type of passage"
10118
+ },
10119
+ "subtype": {
10120
+ "type": "string",
10121
+ "enum": [
10122
+ "title",
10123
+ "subtitle",
10124
+ "paragraph",
10125
+ "list",
10126
+ "blockquote",
10127
+ "table",
10128
+ "code"
10129
+ ],
10130
+ "description": "The subtype of passage, if available."
10131
+ },
10132
+ "pageNumber": {
10133
+ "type": "integer",
10134
+ "description": "Page number the passage is located on. Only applicable if the passage was extracted from a PDF file."
10135
+ },
10136
+ "position": {
10137
+ "type": "integer",
10138
+ "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."
10139
+ }
10140
+ },
10141
+ "description": "The passage metadata."
10142
+ }
10143
+ },
10144
+ "required": [
10145
+ "id",
10146
+ "content",
10147
+ "meta"
10148
+ ]
10149
+ }
10150
+ },
10151
+ "meta": {
10152
+ "type": "object",
10153
+ "properties": {
10154
+ "nextToken": {
10155
+ "type": "string",
10156
+ "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."
10157
+ }
10158
+ },
10159
+ "additionalProperties": false
10160
+ }
10161
+ },
10162
+ "required": [
10163
+ "passages",
10164
+ "meta"
10165
+ ],
10166
+ "title": "listFilePassagesResponse",
10167
+ "additionalProperties": false
10168
+ }
10169
+ }
10170
+ },
10064
10171
  "listTables": {
10065
10172
  "name": "listTables",
10066
10173
  "path": "/v1/tables",
@@ -10962,7 +11069,7 @@ export const state = {
10962
11069
  "title": "Botpress API",
10963
11070
  "description": "API for Botpress Cloud",
10964
11071
  "server": "https://api.botpress.cloud",
10965
- "version": "0.35.1",
11072
+ "version": "0.36.0",
10966
11073
  "prefix": "v1"
10967
11074
  },
10968
11075
  "errors": [
@@ -11262,6 +11369,7 @@ export const state = {
11262
11369
  "getFileResponse": true,
11263
11370
  "updateFileMetadataResponse": true,
11264
11371
  "searchFilesResponse": true,
11372
+ "listFilePassagesResponse": true,
11265
11373
  "listTablesResponse": true,
11266
11374
  "getTableResponse": true,
11267
11375
  "getOrCreateTableResponse": true,
@@ -14046,7 +14154,8 @@ export const state = {
14046
14154
  "listFiles",
14047
14155
  "getFile",
14048
14156
  "updateFileMetadata",
14049
- "searchFiles"
14157
+ "searchFiles",
14158
+ "listFilePassages"
14050
14159
  ],
14051
14160
  "schema": "File"
14052
14161
  }