@botpress/api 0.29.6 → 0.30.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 CHANGED
@@ -270575,7 +270575,7 @@ var state = {
270575
270575
  },
270576
270576
  "type": {
270577
270577
  "in": "query",
270578
- "description": "Type of usage",
270578
+ "description": "Usage type",
270579
270579
  "type": "string",
270580
270580
  "enum": [
270581
270581
  "invocation_timeout",
@@ -270638,7 +270638,7 @@ var state = {
270638
270638
  },
270639
270639
  "type": {
270640
270640
  "in": "query",
270641
- "description": "Type of usage",
270641
+ "description": "Usage type",
270642
270642
  "type": "string",
270643
270643
  "enum": [
270644
270644
  "invocation_timeout",
@@ -270762,7 +270762,7 @@ var state = {
270762
270762
  },
270763
270763
  "type": {
270764
270764
  "in": "query",
270765
- "description": "Type of usage",
270765
+ "description": "Usage type",
270766
270766
  "type": "string",
270767
270767
  "enum": [
270768
270768
  "invocation_timeout",
@@ -273086,7 +273086,7 @@ var state = {
273086
273086
  "parameters": {
273087
273087
  "type": {
273088
273088
  "in": "query",
273089
- "description": "Type of usage",
273089
+ "description": "Usage type",
273090
273090
  "type": "string",
273091
273091
  "enum": [
273092
273092
  "invocation_timeout",
@@ -273134,6 +273134,55 @@ var state = {
273134
273134
  }
273135
273135
  }
273136
273136
  },
273137
+ "getMultipleUsages": {
273138
+ "name": "getMultipleUsages",
273139
+ "path": "/v1/admin/usages/multiple",
273140
+ "description": "Get multiple usages",
273141
+ "method": "get",
273142
+ "section": "usage",
273143
+ "disableDefaultParameters": {
273144
+ "x-workspace-id": true
273145
+ },
273146
+ "parameters": {
273147
+ "types": {
273148
+ "in": "query",
273149
+ "description": "Usage types to retrieve. All types have to belong to the same type of entity (e.g. workspace or bot).",
273150
+ "type": "string[]",
273151
+ "required": true
273152
+ },
273153
+ "ids": {
273154
+ "in": "query",
273155
+ "type": "string[]",
273156
+ "description": "IDs of either workspaces or bots to retrieve usages for.",
273157
+ "required": true
273158
+ },
273159
+ "period": {
273160
+ "in": "query",
273161
+ "description": "Period to get",
273162
+ "type": "string",
273163
+ "required": false
273164
+ }
273165
+ },
273166
+ "response": {
273167
+ "description": "Success",
273168
+ "schema": {
273169
+ "type": "object",
273170
+ "properties": {
273171
+ "usages": {
273172
+ "type": "array",
273173
+ "items": {
273174
+ "$ref": "#/components/schemas/Usage"
273175
+ }
273176
+ }
273177
+ },
273178
+ "required": [
273179
+ "usages"
273180
+ ],
273181
+ "title": "getMultipleUsagesResponse",
273182
+ "additionalProperties": false
273183
+ }
273184
+ }
273185
+ },
273137
273186
  "listUsageHistory": {
273138
273187
  "name": "listUsageHistory",
273139
273188
  "path": "/v1/admin/usages/{id}/history",
@@ -273142,7 +273191,7 @@ var state = {
273142
273191
  "parameters": {
273143
273192
  "type": {
273144
273193
  "in": "query",
273145
- "description": "Type of usage",
273194
+ "description": "Usage type",
273146
273195
  "type": "string",
273147
273196
  "enum": [
273148
273197
  "invocation_timeout",
@@ -274939,7 +274988,7 @@ var state = {
274939
274988
  "title": "Botpress API",
274940
274989
  "description": "API for Botpress Cloud",
274941
274990
  "server": "https://api.botpress.cloud",
274942
- "version": "0.29.6",
274991
+ "version": "0.30.0",
274943
274992
  "prefix": "v1"
274944
274993
  },
274945
274994
  "errors": [
@@ -275208,6 +275257,7 @@ var state = {
275208
275257
  "getIntegrationByNameResponse": true,
275209
275258
  "deleteIntegrationResponse": true,
275210
275259
  "getUsageResponse": true,
275260
+ "getMultipleUsagesResponse": true,
275211
275261
  "listUsageHistoryResponse": true,
275212
275262
  "changeAISpendQuotaResponse": true,
275213
275263
  "listActivitiesResponse": true,
@@ -277761,7 +277811,8 @@ var state = {
277761
277811
  "description": "",
277762
277812
  "name": "usage",
277763
277813
  "operations": [
277764
- "getUsage"
277814
+ "getUsage",
277815
+ "getMultipleUsages"
277765
277816
  ],
277766
277817
  "schema": "Usage"
277767
277818
  },
@@ -7230,6 +7230,53 @@ export declare const state: {
7230
7230
  };
7231
7231
  };
7232
7232
  };
7233
+ getMultipleUsages: {
7234
+ name: string;
7235
+ path: string;
7236
+ description: string;
7237
+ method: "get";
7238
+ section: "usage";
7239
+ disableDefaultParameters: {
7240
+ "x-workspace-id": boolean;
7241
+ };
7242
+ parameters: {
7243
+ types: {
7244
+ in: "query";
7245
+ description: string;
7246
+ type: "string[]";
7247
+ required: true;
7248
+ };
7249
+ ids: {
7250
+ in: "query";
7251
+ type: "string[]";
7252
+ description: string;
7253
+ required: true;
7254
+ };
7255
+ period: {
7256
+ in: "query";
7257
+ description: string;
7258
+ type: "string";
7259
+ required: false;
7260
+ };
7261
+ };
7262
+ response: {
7263
+ description: string;
7264
+ schema: {
7265
+ type: "object";
7266
+ properties: {
7267
+ usages: {
7268
+ type: "array";
7269
+ items: {
7270
+ $ref: string;
7271
+ };
7272
+ };
7273
+ };
7274
+ required: string[];
7275
+ title: string;
7276
+ additionalProperties: false;
7277
+ };
7278
+ };
7279
+ };
7233
7280
  listUsageHistory: {
7234
7281
  name: string;
7235
7282
  path: string;
@@ -9027,6 +9074,7 @@ export declare const state: {
9027
9074
  getIntegrationByNameResponse: true;
9028
9075
  deleteIntegrationResponse: true;
9029
9076
  getUsageResponse: true;
9077
+ getMultipleUsagesResponse: true;
9030
9078
  listUsageHistoryResponse: true;
9031
9079
  changeAISpendQuotaResponse: true;
9032
9080
  listActivitiesResponse: true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/api",
3
- "version": "0.29.6",
3
+ "version": "0.30.0",
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","getBotIssue","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","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"],"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":"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 Office, HTML, CSV, 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":["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."}]}
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","getBotIssue","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","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"],"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":"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 Office, HTML, CSV, 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":["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."}]}