@botpress/api 1.13.1 → 1.14.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 +151 -5
- package/dist/src/gen/files/state.d.ts +59 -0
- package/dist/src/gen/state.d.ts +59 -0
- package/package.json +1 -1
- package/src/gen/admin/openapi.json +1 -1
- package/src/gen/admin/state.ts +1 -1
- package/src/gen/files/metadata.json +1 -1
- package/src/gen/files/openapi.json +1 -1
- package/src/gen/files/state.ts +74 -1
- package/src/gen/metadata.json +1 -1
- package/src/gen/openapi.json +1 -1
- package/src/gen/runtime/openapi.json +1 -1
- package/src/gen/runtime/state.ts +1 -1
- package/src/gen/state.ts +74 -1
- package/src/gen/tables/openapi.json +1 -1
- package/src/gen/tables/state.ts +1 -1
package/src/gen/files/state.ts
CHANGED
|
@@ -1276,6 +1276,76 @@ export const state = {
|
|
|
1276
1276
|
}
|
|
1277
1277
|
}
|
|
1278
1278
|
},
|
|
1279
|
+
"setFilePassages": {
|
|
1280
|
+
"name": "setFilePassages",
|
|
1281
|
+
"path": "/v1/files/{id}/passages",
|
|
1282
|
+
"description": "Sets the indexed file passages asynchronously. All existing indexed passages will be deleted as soon as the indexing begins. This endpoint will return immediately and set the file status to \"indexing_pending\". Once the new passages are indexed the file status will be set to \"indexing_completed\", or \"indexing_failed\" if the passages failed to be indexed.",
|
|
1283
|
+
"method": "put",
|
|
1284
|
+
"section": "files",
|
|
1285
|
+
"parameters": {
|
|
1286
|
+
"id": {
|
|
1287
|
+
"type": "string",
|
|
1288
|
+
"description": "File ID or Key",
|
|
1289
|
+
"in": "path"
|
|
1290
|
+
}
|
|
1291
|
+
},
|
|
1292
|
+
"requestBody": {
|
|
1293
|
+
"description": "List of passages to index for the file. These will replacing all the existing passages. Indexing of the new passages will be done asynchronously in the background. You can check the file status to see when the indexing is complete.",
|
|
1294
|
+
"schema": {
|
|
1295
|
+
"type": "object",
|
|
1296
|
+
"properties": {
|
|
1297
|
+
"passages": {
|
|
1298
|
+
"type": "array",
|
|
1299
|
+
"items": {
|
|
1300
|
+
"type": "object",
|
|
1301
|
+
"properties": {
|
|
1302
|
+
"content": {
|
|
1303
|
+
"type": "string",
|
|
1304
|
+
"description": "The content of the passage, supports Markdown formatting."
|
|
1305
|
+
},
|
|
1306
|
+
"type": {
|
|
1307
|
+
"default": "paragraph",
|
|
1308
|
+
"type": "string",
|
|
1309
|
+
"enum": [
|
|
1310
|
+
"title",
|
|
1311
|
+
"subtitle",
|
|
1312
|
+
"paragraph",
|
|
1313
|
+
"blockquote",
|
|
1314
|
+
"list",
|
|
1315
|
+
"table",
|
|
1316
|
+
"code",
|
|
1317
|
+
"image"
|
|
1318
|
+
],
|
|
1319
|
+
"description": "The type should match the Markdown format used for the passage content."
|
|
1320
|
+
},
|
|
1321
|
+
"pageNumber": {
|
|
1322
|
+
"type": "integer"
|
|
1323
|
+
}
|
|
1324
|
+
},
|
|
1325
|
+
"required": [
|
|
1326
|
+
"content"
|
|
1327
|
+
]
|
|
1328
|
+
},
|
|
1329
|
+
"description": "Note: The passages should appear in the array in the same order as they appear in the original document."
|
|
1330
|
+
}
|
|
1331
|
+
},
|
|
1332
|
+
"required": [
|
|
1333
|
+
"passages"
|
|
1334
|
+
],
|
|
1335
|
+
"title": "setFilePassagesBody",
|
|
1336
|
+
"additionalProperties": false
|
|
1337
|
+
}
|
|
1338
|
+
},
|
|
1339
|
+
"contentType": "application/json",
|
|
1340
|
+
"response": {
|
|
1341
|
+
"description": "Empty response.",
|
|
1342
|
+
"schema": {
|
|
1343
|
+
"type": "object",
|
|
1344
|
+
"title": "setFilePassagesResponse",
|
|
1345
|
+
"additionalProperties": false
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
},
|
|
1279
1349
|
"listFileTags": {
|
|
1280
1350
|
"name": "listFileTags",
|
|
1281
1351
|
"path": "/v1/files/tags",
|
|
@@ -1579,7 +1649,7 @@ export const state = {
|
|
|
1579
1649
|
"title": "Botpress API",
|
|
1580
1650
|
"description": "API for Botpress Cloud",
|
|
1581
1651
|
"server": "https://api.botpress.cloud",
|
|
1582
|
-
"version": "1.
|
|
1652
|
+
"version": "1.14.0",
|
|
1583
1653
|
"prefix": "v1"
|
|
1584
1654
|
},
|
|
1585
1655
|
"errors": [
|
|
@@ -1710,6 +1780,7 @@ export const state = {
|
|
|
1710
1780
|
"upsertFileBody": true,
|
|
1711
1781
|
"updateFileMetadataBody": true,
|
|
1712
1782
|
"copyFileBody": true,
|
|
1783
|
+
"setFilePassagesBody": true,
|
|
1713
1784
|
"createKnowledgeBaseBody": true,
|
|
1714
1785
|
"updateKnowledgeBaseBody": true
|
|
1715
1786
|
},
|
|
@@ -1722,6 +1793,7 @@ export const state = {
|
|
|
1722
1793
|
"copyFileResponse": true,
|
|
1723
1794
|
"searchFilesResponse": true,
|
|
1724
1795
|
"listFilePassagesResponse": true,
|
|
1796
|
+
"setFilePassagesResponse": true,
|
|
1725
1797
|
"listFileTagsResponse": true,
|
|
1726
1798
|
"listFileTagValuesResponse": true,
|
|
1727
1799
|
"createKnowledgeBaseResponse": true,
|
|
@@ -5233,6 +5305,7 @@ export const state = {
|
|
|
5233
5305
|
"copyFile",
|
|
5234
5306
|
"searchFiles",
|
|
5235
5307
|
"listFilePassages",
|
|
5308
|
+
"setFilePassages",
|
|
5236
5309
|
"listFileTags",
|
|
5237
5310
|
"listFileTagValues",
|
|
5238
5311
|
"createKnowledgeBase",
|
package/src/gen/metadata.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"sections":[{"description":"","title":"User","name":"user","operations":["createUser","getUser","listUsers","getOrCreateUser","updateUser","deleteUser"],"schema":"User"},{"description":"","title":"Conversation","name":"conversation","operations":["createConversation","getConversation","listConversations","getOrCreateConversation","updateConversation","deleteConversation","listParticipants","addParticipant","getParticipant","removeParticipant"],"schema":"Conversation"},{"description":"","title":"Event","name":"event","operations":["createEvent","getEvent","listEvents"],"schema":"Event"},{"description":"","title":"Message","name":"message","operations":["createMessage","getOrCreateMessage","getMessage","updateMessage","listMessages","deleteMessage"],"schema":"Message"},{"description":"","title":"State","name":"state","operations":["setStateExpiry","getState","setState","getOrSetState","patchState"],"schema":"State"},{"title":"Hub","description":"","name":"hub","operations":["listPublicIntegrations","getPublicIntegrationById","getPublicIntegration","listPublicPlugins","getPublicPluginById","getPublicPlugin","getPublicPluginCode","listPublicInterfaces","getPublicInterfaceById","getPublicInterface"]},{"description":"","title":"Action","name":"action","operations":["callAction"]},{"description":"","title":"Task","name":"task","operations":["getTask","createTask","updateTask","deleteTask","listTasks"],"schema":"Task"},{"description":"","title":"Workflow","name":"workflow","operations":["createWorkflow","getWorkflow","updateWorkflow","deleteWorkflow","listWorkflows","getOrCreateWorkflow"],"schema":"Workflow"},{"description":"","title":"Tag","name":"tag","operations":["listTagValues"]},{"title":"Bot","description":"","name":"bot","operations":["createBot","updateBot","transferBot","listBots","getBot","deleteBot","getBotLogs","getBotWebchat","getBotAnalytics","getBotIssue","listBotIssues","deleteBotIssue","listBotIssueEvents","listBotVersions","getBotVersion","createBotVersion","deployBotVersion","createIntegrationShareableId","deleteIntegrationShareableId","getIntegrationShareableId","listBotApiKeys","createBotApiKey","deleteBotApiKey"],"schema":"Bot"},{"title":"Integration","description":"","name":"integration","operations":["listIntegrationApiKeys","createIntegrationApiKey","deleteIntegrationApiKey","createIntegration","validateIntegrationCreation","updateIntegration","validateIntegrationUpdate","listIntegrations","getIntegration","getIntegrationLogs","getIntegrationByName","deleteIntegration","requestIntegrationVerification"],"schema":"Integration"},{"title":"Interface","description":"","name":"interface","operations":["createInterface","getInterface","getInterfaceByName","updateInterface","deleteInterface","listInterfaces"],"schema":"Interface"},{"title":"Plugin","description":"","name":"plugin","operations":["createPlugin","getPlugin","getPluginByName","updatePlugin","deletePlugin","listPlugins","getPluginCode"],"schema":"Plugin"},{"title":"Workspace","description":"","name":"workspace","operations":["listWorkspaceInvoices","getUpcomingInvoice","chargeWorkspaceUnpaidInvoices","createWorkspace","getPublicWorkspace","getWorkspace","listWorkspaceUsages","breakDownWorkspaceUsageByBot","getAllWorkspaceQuotaCompletion","getWorkspaceQuota","listWorkspaceQuotas","updateWorkspace","checkHandleAvailability","listWorkspaces","listPublicWorkspaces","deleteWorkspace","getAuditRecords"],"schema":"Workspace"},{"title":"Workspace Member","description":"","name":"workspaceMember","operations":["listWorkspaceMembers","getWorkspaceMember","deleteWorkspaceMember","createWorkspaceMember","updateWorkspaceMember"],"schema":"WorkspaceMember"},{"title":"Account","description":"","name":"account","operations":["getAccount","updateAccount","listPersonalAccessTokens","createPersonalAccessToken","deletePersonalAccessToken","setAccountPreference","getAccountPreference"],"schema":"Account"},{"title":"Usage","description":"","name":"usage","operations":["getUsage","getMultipleUsages","listUsageActivityDaily"],"schema":"Usage"},{"title":"Quotas","description":"","name":"quotas","operations":["changeAISpendQuota"]},{"title":"Helper","description":"","name":"helper","operations":["runVrl"]},{"title":"Activity","description":"","name":"activity","operations":["listActivities"],"schema":"Activity"},{"title":"Tables","description":"Manage and interact with table structures, including creation, updates, and querying of tables and their rows.","name":"tables","operations":["listTables","getTable","getOrCreateTable","createTable","duplicateTable","exportTable","getTableJobs","importTable","updateTable","renameTableColumn","deleteTable","getTableRow","findTableRows","createTableRows","deleteTableRows","updateTableRows","upsertTableRows"],"schema":"Table"},{"title":"Files","description":"The Files API allows you to create, manage, and index files that can be used by your bots and integrations. Files can be in any text or binary format, and documents (such as PDF, Microsoft Word, HTML, Markdown, etc.) can be indexed to be used for semantic search in RAG (Retrieval Augmented Generation) implementations. Files are private by default but can be made publicly accessible through a permanent URL that's unique for each file.","name":"files","operations":["upsertFile","deleteFile","listFiles","getFile","updateFileMetadata","copyFile","searchFiles","listFilePassages","listFileTags","listFileTagValues","createKnowledgeBase","deleteKnowledgeBase","updateKnowledgeBase","listKnowledgeBases"],"schema":"File"}],"errors":[{"status":500,"type":"Unknown","description":"An unknown error occurred"},{"status":500,"type":"Internal","description":"An internal error occurred"},{"status":401,"type":"Unauthorized","description":"The request requires to be authenticated."},{"status":403,"type":"Forbidden","description":"The requested action can't be peform by this resource."},{"status":413,"type":"PayloadTooLarge","description":"The request payload is too large."},{"status":400,"type":"InvalidPayload","description":"The request payload is invalid."},{"status":415,"type":"UnsupportedMediaType","description":"The request is invalid because the content-type is not supported."},{"status":405,"type":"MethodNotFound","description":"The requested method does not exist."},{"status":404,"type":"ResourceNotFound","description":"The requested resource does not exist."},{"status":400,"type":"InvalidJsonSchema","description":"The provided JSON schema is invalid."},{"status":400,"type":"InvalidDataFormat","description":"The provided data doesn't respect the provided JSON schema."},{"status":400,"type":"InvalidIdentifier","description":"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."},{"status":409,"type":"RelationConflict","description":"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."},{"status":409,"type":"ReferenceConstraint","description":"The resource cannot be deleted because it's referenced by another resource"},{"status":409,"type":"ResourceLockedConflict","description":"The resource is current locked and cannot be operated on until the lock is released."},{"status":400,"type":"ReferenceNotFound","description":"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request."},{"status":400,"type":"InvalidQuery","description":"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource."},{"status":400,"type":"Runtime","description":"An error happened during the execution of a runtime (bot or integration)."},{"status":409,"type":"AlreadyExists","description":"The record attempted to be created already exists."},{"status":429,"type":"RateLimited","description":"The request has been rate limited."},{"status":402,"type":"PaymentRequired","description":"A payment is required to perform this request."},{"status":403,"type":"QuotaExceeded","description":"The request exceeds the allowed quota. Quotas are a soft limit that can be increased."},{"status":413,"type":"LimitExceeded","description":"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased."},{"status":400,"type":"BreakingChanges","description":"Request payload contains breaking changes which is not allowed for this resource without a version increment."}]}
|
|
1
|
+
{"sections":[{"description":"","title":"User","name":"user","operations":["createUser","getUser","listUsers","getOrCreateUser","updateUser","deleteUser"],"schema":"User"},{"description":"","title":"Conversation","name":"conversation","operations":["createConversation","getConversation","listConversations","getOrCreateConversation","updateConversation","deleteConversation","listParticipants","addParticipant","getParticipant","removeParticipant"],"schema":"Conversation"},{"description":"","title":"Event","name":"event","operations":["createEvent","getEvent","listEvents"],"schema":"Event"},{"description":"","title":"Message","name":"message","operations":["createMessage","getOrCreateMessage","getMessage","updateMessage","listMessages","deleteMessage"],"schema":"Message"},{"description":"","title":"State","name":"state","operations":["setStateExpiry","getState","setState","getOrSetState","patchState"],"schema":"State"},{"title":"Hub","description":"","name":"hub","operations":["listPublicIntegrations","getPublicIntegrationById","getPublicIntegration","listPublicPlugins","getPublicPluginById","getPublicPlugin","getPublicPluginCode","listPublicInterfaces","getPublicInterfaceById","getPublicInterface"]},{"description":"","title":"Action","name":"action","operations":["callAction"]},{"description":"","title":"Task","name":"task","operations":["getTask","createTask","updateTask","deleteTask","listTasks"],"schema":"Task"},{"description":"","title":"Workflow","name":"workflow","operations":["createWorkflow","getWorkflow","updateWorkflow","deleteWorkflow","listWorkflows","getOrCreateWorkflow"],"schema":"Workflow"},{"description":"","title":"Tag","name":"tag","operations":["listTagValues"]},{"title":"Bot","description":"","name":"bot","operations":["createBot","updateBot","transferBot","listBots","getBot","deleteBot","getBotLogs","getBotWebchat","getBotAnalytics","getBotIssue","listBotIssues","deleteBotIssue","listBotIssueEvents","listBotVersions","getBotVersion","createBotVersion","deployBotVersion","createIntegrationShareableId","deleteIntegrationShareableId","getIntegrationShareableId","listBotApiKeys","createBotApiKey","deleteBotApiKey"],"schema":"Bot"},{"title":"Integration","description":"","name":"integration","operations":["listIntegrationApiKeys","createIntegrationApiKey","deleteIntegrationApiKey","createIntegration","validateIntegrationCreation","updateIntegration","validateIntegrationUpdate","listIntegrations","getIntegration","getIntegrationLogs","getIntegrationByName","deleteIntegration","requestIntegrationVerification"],"schema":"Integration"},{"title":"Interface","description":"","name":"interface","operations":["createInterface","getInterface","getInterfaceByName","updateInterface","deleteInterface","listInterfaces"],"schema":"Interface"},{"title":"Plugin","description":"","name":"plugin","operations":["createPlugin","getPlugin","getPluginByName","updatePlugin","deletePlugin","listPlugins","getPluginCode"],"schema":"Plugin"},{"title":"Workspace","description":"","name":"workspace","operations":["listWorkspaceInvoices","getUpcomingInvoice","chargeWorkspaceUnpaidInvoices","createWorkspace","getPublicWorkspace","getWorkspace","listWorkspaceUsages","breakDownWorkspaceUsageByBot","getAllWorkspaceQuotaCompletion","getWorkspaceQuota","listWorkspaceQuotas","updateWorkspace","checkHandleAvailability","listWorkspaces","listPublicWorkspaces","deleteWorkspace","getAuditRecords"],"schema":"Workspace"},{"title":"Workspace Member","description":"","name":"workspaceMember","operations":["listWorkspaceMembers","getWorkspaceMember","deleteWorkspaceMember","createWorkspaceMember","updateWorkspaceMember"],"schema":"WorkspaceMember"},{"title":"Account","description":"","name":"account","operations":["getAccount","updateAccount","listPersonalAccessTokens","createPersonalAccessToken","deletePersonalAccessToken","setAccountPreference","getAccountPreference"],"schema":"Account"},{"title":"Usage","description":"","name":"usage","operations":["getUsage","getMultipleUsages","listUsageActivityDaily"],"schema":"Usage"},{"title":"Quotas","description":"","name":"quotas","operations":["changeAISpendQuota"]},{"title":"Helper","description":"","name":"helper","operations":["runVrl"]},{"title":"Activity","description":"","name":"activity","operations":["listActivities"],"schema":"Activity"},{"title":"Tables","description":"Manage and interact with table structures, including creation, updates, and querying of tables and their rows.","name":"tables","operations":["listTables","getTable","getOrCreateTable","createTable","duplicateTable","exportTable","getTableJobs","importTable","updateTable","renameTableColumn","deleteTable","getTableRow","findTableRows","createTableRows","deleteTableRows","updateTableRows","upsertTableRows"],"schema":"Table"},{"title":"Files","description":"The Files API allows you to create, manage, and index files that can be used by your bots and integrations. Files can be in any text or binary format, and documents (such as PDF, Microsoft Word, HTML, Markdown, etc.) can be indexed to be used for semantic search in RAG (Retrieval Augmented Generation) implementations. Files are private by default but can be made publicly accessible through a permanent URL that's unique for each file.","name":"files","operations":["upsertFile","deleteFile","listFiles","getFile","updateFileMetadata","copyFile","searchFiles","listFilePassages","setFilePassages","listFileTags","listFileTagValues","createKnowledgeBase","deleteKnowledgeBase","updateKnowledgeBase","listKnowledgeBases"],"schema":"File"}],"errors":[{"status":500,"type":"Unknown","description":"An unknown error occurred"},{"status":500,"type":"Internal","description":"An internal error occurred"},{"status":401,"type":"Unauthorized","description":"The request requires to be authenticated."},{"status":403,"type":"Forbidden","description":"The requested action can't be peform by this resource."},{"status":413,"type":"PayloadTooLarge","description":"The request payload is too large."},{"status":400,"type":"InvalidPayload","description":"The request payload is invalid."},{"status":415,"type":"UnsupportedMediaType","description":"The request is invalid because the content-type is not supported."},{"status":405,"type":"MethodNotFound","description":"The requested method does not exist."},{"status":404,"type":"ResourceNotFound","description":"The requested resource does not exist."},{"status":400,"type":"InvalidJsonSchema","description":"The provided JSON schema is invalid."},{"status":400,"type":"InvalidDataFormat","description":"The provided data doesn't respect the provided JSON schema."},{"status":400,"type":"InvalidIdentifier","description":"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."},{"status":409,"type":"RelationConflict","description":"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."},{"status":409,"type":"ReferenceConstraint","description":"The resource cannot be deleted because it's referenced by another resource"},{"status":409,"type":"ResourceLockedConflict","description":"The resource is current locked and cannot be operated on until the lock is released."},{"status":400,"type":"ReferenceNotFound","description":"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request."},{"status":400,"type":"InvalidQuery","description":"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource."},{"status":400,"type":"Runtime","description":"An error happened during the execution of a runtime (bot or integration)."},{"status":409,"type":"AlreadyExists","description":"The record attempted to be created already exists."},{"status":429,"type":"RateLimited","description":"The request has been rate limited."},{"status":402,"type":"PaymentRequired","description":"A payment is required to perform this request."},{"status":403,"type":"QuotaExceeded","description":"The request exceeds the allowed quota. Quotas are a soft limit that can be increased."},{"status":413,"type":"LimitExceeded","description":"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased."},{"status":400,"type":"BreakingChanges","description":"Request payload contains breaking changes which is not allowed for this resource without a version increment."}]}
|