@botpress/api 0.27.0 → 0.27.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 CHANGED
@@ -280794,7 +280794,7 @@ var state = {
280794
280794
  "contentType": "application/json",
280795
280795
  "section": "files",
280796
280796
  "response": {
280797
- "description": "The file metadata.",
280797
+ "description": "The created file",
280798
280798
  "schema": {
280799
280799
  "type": "object",
280800
280800
  "properties": {
@@ -281059,10 +281059,10 @@ var state = {
281059
281059
  }
281060
281060
  }
281061
281061
  },
281062
- "getFileMetadata": {
281063
- "name": "getFileMetadata",
281064
- "path": "/v1/files/{id}/metadata",
281065
- "description": "Get file metadata",
281062
+ "getFile": {
281063
+ "name": "getFile",
281064
+ "path": "/v1/files/{id}",
281065
+ "description": "Get file",
281066
281066
  "method": "get",
281067
281067
  "section": "files",
281068
281068
  "parameters": {
@@ -281073,7 +281073,7 @@ var state = {
281073
281073
  }
281074
281074
  },
281075
281075
  "response": {
281076
- "description": "The metadata of the file.",
281076
+ "description": "File metadata and URL",
281077
281077
  "schema": {
281078
281078
  "type": "object",
281079
281079
  "properties": {
@@ -281160,43 +281160,18 @@ var state = {
281160
281160
  "status"
281161
281161
  ],
281162
281162
  "additionalProperties": false
281163
- }
281164
- },
281165
- "required": [
281166
- "file"
281167
- ],
281168
- "title": "getFileMetadataResponse",
281169
- "additionalProperties": false
281170
- }
281171
- }
281172
- },
281173
- "getFileContent": {
281174
- "name": "getFileContent",
281175
- "path": "/v1/files/{id}/content",
281176
- "description": "Returns a presigned URL to download the file content.",
281177
- "method": "get",
281178
- "section": "files",
281179
- "parameters": {
281180
- "id": {
281181
- "type": "string",
281182
- "description": "File ID",
281183
- "in": "path"
281184
- }
281185
- },
281186
- "response": {
281187
- "description": "Returns a temporary pre-signed URL to download the file content.",
281188
- "schema": {
281189
- "type": "object",
281190
- "properties": {
281163
+ },
281191
281164
  "url": {
281192
281165
  "type": "string",
281193
- "description": "Temporary pre-signed URL to download the file, should be used shortly after retrieving and should not be stored long-term as the URL will expire after a short timeframe."
281166
+ "description": "If the file is not uploaded yet, this will be set to a `null` value.\n\nIf the file has a `public_content` policy, this will contain the permanent public URL to retrieve the file, otherwise this will contain a temporary pre-signed URL to download the file which should be used shortly after retrieving and should not be stored long-term as the URL will expire after a short timeframe.",
281167
+ "nullable": true
281194
281168
  }
281195
281169
  },
281196
281170
  "required": [
281171
+ "file",
281197
281172
  "url"
281198
281173
  ],
281199
- "title": "getFileContentResponse",
281174
+ "title": "getFileResponse",
281200
281175
  "additionalProperties": false
281201
281176
  }
281202
281177
  }
@@ -282230,7 +282205,7 @@ var state = {
282230
282205
  "title": "Botpress API",
282231
282206
  "description": "API for Botpress Cloud",
282232
282207
  "server": "https://api.botpress.cloud",
282233
- "version": "0.27.0",
282208
+ "version": "0.27.1",
282234
282209
  "prefix": "v1"
282235
282210
  },
282236
282211
  "errors": [
@@ -282504,8 +282479,7 @@ var state = {
282504
282479
  "createFileResponse": true,
282505
282480
  "deleteFileResponse": true,
282506
282481
  "listFilesResponse": true,
282507
- "getFileMetadataResponse": true,
282508
- "getFileContentResponse": true,
282482
+ "getFileResponse": true,
282509
282483
  "updateFileMetadataResponse": true,
282510
282484
  "searchFilesResponse": true,
282511
282485
  "listTablesResponse": true,
@@ -284891,8 +284865,7 @@ var state = {
284891
284865
  "createFile",
284892
284866
  "deleteFile",
284893
284867
  "listFiles",
284894
- "getFileMetadata",
284895
- "getFileContent",
284868
+ "getFile",
284896
284869
  "updateFileMetadata",
284897
284870
  "searchFiles"
284898
284871
  ],
@@ -7327,7 +7327,7 @@ export declare const state: {
7327
7327
  };
7328
7328
  };
7329
7329
  };
7330
- getFileMetadata: {
7330
+ getFile: {
7331
7331
  name: string;
7332
7332
  path: string;
7333
7333
  description: string;
@@ -7410,34 +7410,10 @@ export declare const state: {
7410
7410
  required: string[];
7411
7411
  additionalProperties: false;
7412
7412
  };
7413
- };
7414
- required: string[];
7415
- title: string;
7416
- additionalProperties: false;
7417
- };
7418
- };
7419
- };
7420
- getFileContent: {
7421
- name: string;
7422
- path: string;
7423
- description: string;
7424
- method: "get";
7425
- section: "files";
7426
- parameters: {
7427
- id: {
7428
- type: "string";
7429
- description: string;
7430
- in: "path";
7431
- };
7432
- };
7433
- response: {
7434
- description: string;
7435
- schema: {
7436
- type: "object";
7437
- properties: {
7438
7413
  url: {
7439
7414
  type: "string";
7440
7415
  description: string;
7416
+ nullable: true;
7441
7417
  };
7442
7418
  };
7443
7419
  required: string[];
@@ -8606,8 +8582,7 @@ export declare const state: {
8606
8582
  createFileResponse: true;
8607
8583
  deleteFileResponse: true;
8608
8584
  listFilesResponse: true;
8609
- getFileMetadataResponse: true;
8610
- getFileContentResponse: true;
8585
+ getFileResponse: true;
8611
8586
  updateFileMetadataResponse: true;
8612
8587
  searchFilesResponse: true;
8613
8588
  listTablesResponse: true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/api",
3
- "version": "0.27.0",
3
+ "version": "0.27.1",
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","getFileMetadata","getFileContent","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","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."}]}