@botpress/api 0.27.1 → 0.27.3

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 CHANGED
@@ -281073,7 +281073,7 @@ var state = {
281073
281073
  }
281074
281074
  },
281075
281075
  "response": {
281076
- "description": "File metadata and URL",
281076
+ "description": "An object containing the file metadata and URL",
281077
281077
  "schema": {
281078
281078
  "type": "object",
281079
281079
  "properties": {
@@ -281176,10 +281176,10 @@ var state = {
281176
281176
  }
281177
281177
  }
281178
281178
  },
281179
- "updateFileMetadata": {
281180
- "name": "updateFileMetadata",
281181
- "path": "/v1/files/{id}/metadata",
281182
- "description": "Update file metadata",
281179
+ "updateFile": {
281180
+ "name": "updateFile",
281181
+ "path": "/v1/files/{id}",
281182
+ "description": "Update file",
281183
281183
  "method": "put",
281184
281184
  "section": "files",
281185
281185
  "parameters": {
@@ -281207,28 +281207,104 @@ var state = {
281207
281207
  "required": [
281208
281208
  "tags"
281209
281209
  ],
281210
- "title": "updateFileMetadataBody",
281210
+ "title": "updateFileBody",
281211
281211
  "additionalProperties": false
281212
281212
  }
281213
281213
  },
281214
281214
  "response": {
281215
- "description": "An object containing the updated metadata of the file.",
281215
+ "description": "An object containing the updated file metadata.",
281216
281216
  "schema": {
281217
281217
  "type": "object",
281218
281218
  "properties": {
281219
- "tags": {
281219
+ "file": {
281220
281220
  "type": "object",
281221
- "additionalProperties": {
281222
- "type": "string",
281223
- "maxLength": 1e3
281221
+ "properties": {
281222
+ "id": {
281223
+ "type": "string",
281224
+ "description": "File ID"
281225
+ },
281226
+ "botId": {
281227
+ "type": "string",
281228
+ "description": "The ID of the bot the file belongs to"
281229
+ },
281230
+ "name": {
281231
+ "type": "string",
281232
+ "description": "File name",
281233
+ "nullable": true
281234
+ },
281235
+ "size": {
281236
+ "type": "number",
281237
+ "description": 'File size in bytes. Non-null if file upload status is "COMPLETE".',
281238
+ "nullable": true
281239
+ },
281240
+ "contentType": {
281241
+ "type": "string",
281242
+ "description": "MIME type of the file's content"
281243
+ },
281244
+ "tags": {
281245
+ "type": "object",
281246
+ "additionalProperties": {
281247
+ "type": "string",
281248
+ "maxLength": 1e3
281249
+ },
281250
+ "description": "The tags of the file as an object of key/value pairs"
281251
+ },
281252
+ "createdAt": {
281253
+ "type": "string",
281254
+ "description": "File creation timestamp in ISO 8601 format"
281255
+ },
281256
+ "updatedAt": {
281257
+ "type": "string",
281258
+ "description": "File last update timestamp in ISO 8601 format"
281259
+ },
281260
+ "accessPolicies": {
281261
+ "type": "array",
281262
+ "items": {
281263
+ "type": "string"
281264
+ },
281265
+ "description": "Access policies configured for the file."
281266
+ },
281267
+ "index": {
281268
+ "type": "boolean",
281269
+ "description": "Whether the file was requested to be indexed for search or not."
281270
+ },
281271
+ "status": {
281272
+ "type": "string",
281273
+ "enum": [
281274
+ "UPLOAD_PENDING",
281275
+ "UPLOAD_FAILED",
281276
+ "UPLOAD_COMPLETED",
281277
+ "INDEXING_PENDING",
281278
+ "INDEXING_FAILED",
281279
+ "INDEXING_COMPLETED"
281280
+ ],
281281
+ "description": 'Status of the file. If the status is "UPLOAD_PENDING", the file content has not been uploaded yet. The status will be set to "UPLOAD_COMPLETED" once the file content has been uploaded successfully.\n\nIf the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to "UPLOAD_FAILED" and the reason for the failure will be available in the `failedStatusReason` field of the file.\n\nHowever, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the "INDEXING_PENDING" status (the "UPLOAD_COMPLETED" status step will be skipped).\n\nOnce the indexing is completed and the file is ready to be used for searching its status will be set to "INDEXING_COMPLETED". If the indexing failed the status will be set to "INDEXING_FAILED" and the reason for the failure will be available in the `failedStatusReason` field.'
281282
+ },
281283
+ "failedStatusReason": {
281284
+ "type": "string",
281285
+ "description": 'If the file status is "UPLOAD_FAILED" or "INDEXING_FAILED" this will contain the reason of the failure.'
281286
+ }
281224
281287
  },
281225
- "description": "The updated tags of the file."
281288
+ "required": [
281289
+ "id",
281290
+ "botId",
281291
+ "name",
281292
+ "size",
281293
+ "contentType",
281294
+ "tags",
281295
+ "createdAt",
281296
+ "updatedAt",
281297
+ "accessPolicies",
281298
+ "index",
281299
+ "status"
281300
+ ],
281301
+ "additionalProperties": false
281226
281302
  }
281227
281303
  },
281228
281304
  "required": [
281229
- "tags"
281305
+ "file"
281230
281306
  ],
281231
- "title": "updateFileMetadataResponse",
281307
+ "title": "updateFileResponse",
281232
281308
  "additionalProperties": false
281233
281309
  }
281234
281310
  }
@@ -282205,7 +282281,7 @@ var state = {
282205
282281
  "title": "Botpress API",
282206
282282
  "description": "API for Botpress Cloud",
282207
282283
  "server": "https://api.botpress.cloud",
282208
- "version": "0.27.1",
282284
+ "version": "0.27.3",
282209
282285
  "prefix": "v1"
282210
282286
  },
282211
282287
  "errors": [
@@ -282367,7 +282443,7 @@ var state = {
282367
282443
  "changeAISpendQuotaBody": true,
282368
282444
  "introspectBody": true,
282369
282445
  "createFileBody": true,
282370
- "updateFileMetadataBody": true,
282446
+ "updateFileBody": true,
282371
282447
  "getOrCreateTableBody": true,
282372
282448
  "createTableBody": true,
282373
282449
  "duplicateTableBody": true,
@@ -282480,7 +282556,7 @@ var state = {
282480
282556
  "deleteFileResponse": true,
282481
282557
  "listFilesResponse": true,
282482
282558
  "getFileResponse": true,
282483
- "updateFileMetadataResponse": true,
282559
+ "updateFileResponse": true,
282484
282560
  "searchFilesResponse": true,
282485
282561
  "listTablesResponse": true,
282486
282562
  "getTableResponse": true,
@@ -284866,7 +284942,7 @@ var state = {
284866
284942
  "deleteFile",
284867
284943
  "listFiles",
284868
284944
  "getFile",
284869
- "updateFileMetadata",
284945
+ "updateFile",
284870
284946
  "searchFiles"
284871
284947
  ],
284872
284948
  "schema": "File"
@@ -7422,7 +7422,7 @@ export declare const state: {
7422
7422
  };
7423
7423
  };
7424
7424
  };
7425
- updateFileMetadata: {
7425
+ updateFile: {
7426
7426
  name: string;
7427
7427
  path: string;
7428
7428
  description: string;
@@ -7460,13 +7460,70 @@ export declare const state: {
7460
7460
  schema: {
7461
7461
  type: "object";
7462
7462
  properties: {
7463
- tags: {
7463
+ file: {
7464
7464
  type: "object";
7465
- additionalProperties: {
7466
- type: "string";
7467
- maxLength: number;
7465
+ properties: {
7466
+ id: {
7467
+ type: "string";
7468
+ description: string;
7469
+ };
7470
+ botId: {
7471
+ type: "string";
7472
+ description: string;
7473
+ };
7474
+ name: {
7475
+ type: "string";
7476
+ description: string;
7477
+ nullable: true;
7478
+ };
7479
+ size: {
7480
+ type: "number";
7481
+ description: string;
7482
+ nullable: true;
7483
+ };
7484
+ contentType: {
7485
+ type: "string";
7486
+ description: string;
7487
+ };
7488
+ tags: {
7489
+ type: "object";
7490
+ additionalProperties: {
7491
+ type: "string";
7492
+ maxLength: number;
7493
+ };
7494
+ description: string;
7495
+ };
7496
+ createdAt: {
7497
+ type: "string";
7498
+ description: string;
7499
+ };
7500
+ updatedAt: {
7501
+ type: "string";
7502
+ description: string;
7503
+ };
7504
+ accessPolicies: {
7505
+ type: "array";
7506
+ items: {
7507
+ type: "string";
7508
+ };
7509
+ description: string;
7510
+ };
7511
+ index: {
7512
+ type: "boolean";
7513
+ description: string;
7514
+ };
7515
+ status: {
7516
+ type: "string";
7517
+ enum: string[];
7518
+ description: string;
7519
+ };
7520
+ failedStatusReason: {
7521
+ type: "string";
7522
+ description: string;
7523
+ };
7468
7524
  };
7469
- description: string;
7525
+ required: string[];
7526
+ additionalProperties: false;
7470
7527
  };
7471
7528
  };
7472
7529
  required: string[];
@@ -8470,7 +8527,7 @@ export declare const state: {
8470
8527
  changeAISpendQuotaBody: true;
8471
8528
  introspectBody: true;
8472
8529
  createFileBody: true;
8473
- updateFileMetadataBody: true;
8530
+ updateFileBody: true;
8474
8531
  getOrCreateTableBody: true;
8475
8532
  createTableBody: true;
8476
8533
  duplicateTableBody: true;
@@ -8583,7 +8640,7 @@ export declare const state: {
8583
8640
  deleteFileResponse: true;
8584
8641
  listFilesResponse: true;
8585
8642
  getFileResponse: true;
8586
- updateFileMetadataResponse: true;
8643
+ updateFileResponse: true;
8587
8644
  searchFilesResponse: true;
8588
8645
  listTablesResponse: true;
8589
8646
  getTableResponse: true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/api",
3
- "version": "0.27.1",
3
+ "version": "0.27.3",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {
@@ -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":"File","name":"file","operations":[]},{"description":"","title":"State","name":"state","operations":["getState","setState","getOrSetState","patchState"],"schema":"State"},{"title":"Hub","description":"","name":"hub","operations":["listPublicIntegrations","getPublicIntegrationById","getPublicIntegration"]},{"description":"","title":"Action","name":"action","operations":["callAction"]},{"description":"","title":"Task","name":"task","operations":["getTask","createTask","updateTask","deleteTask","listTasks"],"schema":"Task"},{"title":"Bot","description":"","name":"bot","operations":["createBot","updateBot","transferBot","listBots","getBot","deleteBot","getBotLogs","getBotWebchat","getBotAnalytics","listBotIssues","deleteBotIssue","listBotIssueEvents"],"schema":"Bot"},{"title":"Integration","description":"","name":"integration","operations":["listIntegrationApiKeys","createIntegrationApiKey","deleteIntegrationApiKey","createIntegration","updateIntegration","listIntegrations","getIntegration","getIntegrationLogs","getIntegrationByName","deleteIntegration"],"schema":"Integration"},{"title":"Workspace","description":"","name":"workspace","operations":["setWorkspacePaymentMethod","listWorkspaceInvoices","getUpcomingInvoice","chargeWorkspaceUnpaidInvoices","createWorkspace","getPublicWorkspace","getWorkspace","listWorkspaceUsages","breakDownWorkspaceUsageByBot","getAllWorkspaceQuotaCompletion","getWorkspaceQuota","listWorkspaceQuotas","updateWorkspace","checkHandleAvailability","listWorkspaces","deleteWorkspace","getAuditRecords"],"schema":"Workspace"},{"title":"Workspace Member","description":"","name":"workspaceMember","operations":["listWorkspaceMembers","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"],"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","updateTable","renameTableColumn","deleteTable","getTableRow","findTableRows","createTableRows","deleteTableRows","updateTableRows","upsertTableRows"],"schema":"Table"},{"title":"Files","description":"Operations related to file management.","name":"files","operations":["createFile","deleteFile","listFiles","getFile","updateFileMetadata","searchFiles"],"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":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":"File","name":"file","operations":[]},{"description":"","title":"State","name":"state","operations":["getState","setState","getOrSetState","patchState"],"schema":"State"},{"title":"Hub","description":"","name":"hub","operations":["listPublicIntegrations","getPublicIntegrationById","getPublicIntegration"]},{"description":"","title":"Action","name":"action","operations":["callAction"]},{"description":"","title":"Task","name":"task","operations":["getTask","createTask","updateTask","deleteTask","listTasks"],"schema":"Task"},{"title":"Bot","description":"","name":"bot","operations":["createBot","updateBot","transferBot","listBots","getBot","deleteBot","getBotLogs","getBotWebchat","getBotAnalytics","listBotIssues","deleteBotIssue","listBotIssueEvents"],"schema":"Bot"},{"title":"Integration","description":"","name":"integration","operations":["listIntegrationApiKeys","createIntegrationApiKey","deleteIntegrationApiKey","createIntegration","updateIntegration","listIntegrations","getIntegration","getIntegrationLogs","getIntegrationByName","deleteIntegration"],"schema":"Integration"},{"title":"Workspace","description":"","name":"workspace","operations":["setWorkspacePaymentMethod","listWorkspaceInvoices","getUpcomingInvoice","chargeWorkspaceUnpaidInvoices","createWorkspace","getPublicWorkspace","getWorkspace","listWorkspaceUsages","breakDownWorkspaceUsageByBot","getAllWorkspaceQuotaCompletion","getWorkspaceQuota","listWorkspaceQuotas","updateWorkspace","checkHandleAvailability","listWorkspaces","deleteWorkspace","getAuditRecords"],"schema":"Workspace"},{"title":"Workspace Member","description":"","name":"workspaceMember","operations":["listWorkspaceMembers","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"],"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","updateTable","renameTableColumn","deleteTable","getTableRow","findTableRows","createTableRows","deleteTableRows","updateTableRows","upsertTableRows"],"schema":"Table"},{"title":"Files","description":"Operations related to file management.","name":"files","operations":["createFile","deleteFile","listFiles","getFile","updateFile","searchFiles"],"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":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."}]}