@botpress/api 0.15.3 → 0.15.4

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.
@@ -3277,6 +3277,62 @@ export declare const state: {
3277
3277
  };
3278
3278
  };
3279
3279
  };
3280
+ breakDownWorkspaceUsageByBot: {
3281
+ name: string;
3282
+ description: string;
3283
+ section: "workspace";
3284
+ method: "get";
3285
+ path: string;
3286
+ disableDefaultParameters: {
3287
+ "x-workspace-id": boolean;
3288
+ };
3289
+ parameters: {
3290
+ id: {
3291
+ type: "string";
3292
+ description: string;
3293
+ in: "path";
3294
+ };
3295
+ type: {
3296
+ in: "query";
3297
+ description: string;
3298
+ type: "string";
3299
+ enum: string[];
3300
+ required: true;
3301
+ };
3302
+ period: {
3303
+ in: "query";
3304
+ description: string;
3305
+ type: "string";
3306
+ required: false;
3307
+ };
3308
+ };
3309
+ response: {
3310
+ description: string;
3311
+ schema: {
3312
+ type: "object";
3313
+ properties: {
3314
+ data: {
3315
+ type: "array";
3316
+ items: {
3317
+ type: "object";
3318
+ properties: {
3319
+ botId: {
3320
+ type: "string";
3321
+ };
3322
+ value: {
3323
+ type: "number";
3324
+ };
3325
+ };
3326
+ required: string[];
3327
+ };
3328
+ };
3329
+ };
3330
+ required: string[];
3331
+ title: string;
3332
+ additionalProperties: false;
3333
+ };
3334
+ };
3335
+ };
3280
3336
  getWorkspaceQuota: {
3281
3337
  name: string;
3282
3338
  description: string;
@@ -5356,6 +5412,7 @@ export declare const state: {
5356
5412
  createWorkspaceResponse: true;
5357
5413
  getWorkspaceResponse: true;
5358
5414
  listWorkspaceUsagesResponse: true;
5415
+ breakDownWorkspaceUsageByBotResponse: true;
5359
5416
  getWorkspaceQuotaResponse: true;
5360
5417
  listWorkspaceQuotasResponse: true;
5361
5418
  updateWorkspaceResponse: true;
package/dist/index.js CHANGED
@@ -430082,6 +430082,75 @@ var state = {
430082
430082
  }
430083
430083
  }
430084
430084
  },
430085
+ breakDownWorkspaceUsageByBot: {
430086
+ name: "breakDownWorkspaceUsageByBot",
430087
+ description: "Break down workspace usage by bot",
430088
+ section: "workspace",
430089
+ method: "get",
430090
+ path: "/v1/admin/workspaces/{id}/usages/by-bot",
430091
+ disableDefaultParameters: {
430092
+ "x-workspace-id": true
430093
+ },
430094
+ parameters: {
430095
+ id: {
430096
+ type: "string",
430097
+ description: "Workspace ID",
430098
+ in: "path"
430099
+ },
430100
+ type: {
430101
+ in: "query",
430102
+ description: "Type of usage",
430103
+ type: "string",
430104
+ enum: [
430105
+ "invocation_timeout",
430106
+ "invocation_calls",
430107
+ "storage_count",
430108
+ "bot_count",
430109
+ "knowledgebase_vector_storage",
430110
+ "workspace_ratelimit",
430111
+ "table_row_count",
430112
+ "workspace_member_count",
430113
+ "integrations_owned_count",
430114
+ "ai_spend",
430115
+ "openai_spend",
430116
+ "bing_search_spend"
430117
+ ],
430118
+ required: true
430119
+ },
430120
+ period: {
430121
+ in: "query",
430122
+ description: "Period to get",
430123
+ type: "string",
430124
+ required: false
430125
+ }
430126
+ },
430127
+ response: {
430128
+ description: "Success",
430129
+ schema: {
430130
+ type: "object",
430131
+ properties: {
430132
+ data: {
430133
+ type: "array",
430134
+ items: {
430135
+ type: "object",
430136
+ properties: {
430137
+ botId: {
430138
+ type: "string"
430139
+ },
430140
+ value: {
430141
+ type: "number"
430142
+ }
430143
+ },
430144
+ required: ["botId", "value"]
430145
+ }
430146
+ }
430147
+ },
430148
+ required: ["data"],
430149
+ title: "breakDownWorkspaceUsageByBotResponse",
430150
+ additionalProperties: false
430151
+ }
430152
+ }
430153
+ },
430085
430154
  getWorkspaceQuota: {
430086
430155
  name: "getWorkspaceQuota",
430087
430156
  description: "Get workspace quota",
@@ -432192,7 +432261,7 @@ var state = {
432192
432261
  title: "Botpress API",
432193
432262
  description: "API for Botpress Cloud",
432194
432263
  server: "https://api.botpress.cloud",
432195
- version: "0.15.3",
432264
+ version: "0.15.4",
432196
432265
  prefix: "v1"
432197
432266
  },
432198
432267
  errors: [
@@ -432394,6 +432463,7 @@ var state = {
432394
432463
  createWorkspaceResponse: true,
432395
432464
  getWorkspaceResponse: true,
432396
432465
  listWorkspaceUsagesResponse: true,
432466
+ breakDownWorkspaceUsageByBotResponse: true,
432397
432467
  getWorkspaceQuotaResponse: true,
432398
432468
  listWorkspaceQuotasResponse: true,
432399
432469
  updateWorkspaceResponse: true,
@@ -433893,6 +433963,7 @@ var state = {
433893
433963
  "createWorkspace",
433894
433964
  "getWorkspace",
433895
433965
  "listWorkspaceUsages",
433966
+ "breakDownWorkspaceUsageByBot",
433896
433967
  "getWorkspaceQuota",
433897
433968
  "listWorkspaceQuotas",
433898
433969
  "updateWorkspace",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/api",
3
- "version": "0.15.3",
3
+ "version": "0.15.4",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/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":["createFile","getFile","downloadFile","deleteFile","listFiles"],"schema":"File"},{"description":"","title":"State","name":"state","operations":["getState","setState","patchState"],"schema":"State"},{"title":"Hub","description":"","name":"hub","operations":["listPublicIntegrations","getPublicIntegrationById","getPublicIntegration"]},{"description":"","title":"Action","name":"action","operations":["callAction"]},{"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":["createIntegration","updateIntegration","listIntegrations","getIntegration","getIntegrationLogs","getIntegrationByName","deleteIntegration"],"schema":"Integration"},{"title":"Workspace","description":"","name":"workspace","operations":["getWorkspaceBillingDetails","setWorkspacePaymentMethod","listWorkspaceInvoices","chargeWorkspaceUnpaidInvoices","createWorkspace","getWorkspace","listWorkspaceUsages","getWorkspaceQuota","listWorkspaceQuotas","updateWorkspace","listWorkspaces","changeWorkspacePlan","deleteWorkspace","getAuditRecords"],"schema":"Workspace"},{"title":"Workspace Member","description":"","name":"workspaceMember","operations":["listWorkspaceMembers","deleteWorkspaceMember","createWorkspaceMember","updateWorkspaceMember"],"schema":"WorkspaceMember"},{"title":"Account","description":"","name":"account","operations":["getAccount","listPersonalAccessTokens","createPersonalAccessToken","deletePersonalAccessToken"],"schema":"Account"},{"title":"Usage","description":"","name":"usage","operations":["getUsage"],"schema":"Usage"},{"title":"Quotas","description":"","name":"quotas","operations":["changeAISpendQuota"]}],"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 not related with another resource. This is usually caused when providing two resources that aren't linked together."},{"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."}]}
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":["createFile","getFile","downloadFile","deleteFile","listFiles"],"schema":"File"},{"description":"","title":"State","name":"state","operations":["getState","setState","patchState"],"schema":"State"},{"title":"Hub","description":"","name":"hub","operations":["listPublicIntegrations","getPublicIntegrationById","getPublicIntegration"]},{"description":"","title":"Action","name":"action","operations":["callAction"]},{"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":["createIntegration","updateIntegration","listIntegrations","getIntegration","getIntegrationLogs","getIntegrationByName","deleteIntegration"],"schema":"Integration"},{"title":"Workspace","description":"","name":"workspace","operations":["getWorkspaceBillingDetails","setWorkspacePaymentMethod","listWorkspaceInvoices","chargeWorkspaceUnpaidInvoices","createWorkspace","getWorkspace","listWorkspaceUsages","breakDownWorkspaceUsageByBot","getWorkspaceQuota","listWorkspaceQuotas","updateWorkspace","listWorkspaces","changeWorkspacePlan","deleteWorkspace","getAuditRecords"],"schema":"Workspace"},{"title":"Workspace Member","description":"","name":"workspaceMember","operations":["listWorkspaceMembers","deleteWorkspaceMember","createWorkspaceMember","updateWorkspaceMember"],"schema":"WorkspaceMember"},{"title":"Account","description":"","name":"account","operations":["getAccount","listPersonalAccessTokens","createPersonalAccessToken","deletePersonalAccessToken"],"schema":"Account"},{"title":"Usage","description":"","name":"usage","operations":["getUsage"],"schema":"Usage"},{"title":"Quotas","description":"","name":"quotas","operations":["changeAISpendQuota"]}],"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 not related with another resource. This is usually caused when providing two resources that aren't linked together."},{"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."}]}