@botpress/api 0.15.3 → 0.15.5

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.
@@ -27,6 +27,7 @@ export declare const state: {
27
27
  type: "string";
28
28
  maxLength: number;
29
29
  description: string;
30
+ deprecated: true;
30
31
  };
31
32
  };
32
33
  required: string[];
@@ -164,6 +165,7 @@ export declare const state: {
164
165
  type: "string";
165
166
  maxLength: number;
166
167
  description: string;
168
+ deprecated: true;
167
169
  };
168
170
  };
169
171
  required: string[];
@@ -911,6 +913,7 @@ export declare const state: {
911
913
  type: "string";
912
914
  maxLength: number;
913
915
  description: string;
916
+ deprecated: true;
914
917
  };
915
918
  name: {
916
919
  type: "string";
@@ -1053,6 +1056,7 @@ export declare const state: {
1053
1056
  type: "string";
1054
1057
  maxLength: number;
1055
1058
  description: string;
1059
+ deprecated: true;
1056
1060
  };
1057
1061
  name: {
1058
1062
  type: "string";
@@ -3277,6 +3281,62 @@ export declare const state: {
3277
3281
  };
3278
3282
  };
3279
3283
  };
3284
+ breakDownWorkspaceUsageByBot: {
3285
+ name: string;
3286
+ description: string;
3287
+ section: "workspace";
3288
+ method: "get";
3289
+ path: string;
3290
+ disableDefaultParameters: {
3291
+ "x-workspace-id": boolean;
3292
+ };
3293
+ parameters: {
3294
+ id: {
3295
+ type: "string";
3296
+ description: string;
3297
+ in: "path";
3298
+ };
3299
+ type: {
3300
+ in: "query";
3301
+ description: string;
3302
+ type: "string";
3303
+ enum: string[];
3304
+ required: true;
3305
+ };
3306
+ period: {
3307
+ in: "query";
3308
+ description: string;
3309
+ type: "string";
3310
+ required: false;
3311
+ };
3312
+ };
3313
+ response: {
3314
+ description: string;
3315
+ schema: {
3316
+ type: "object";
3317
+ properties: {
3318
+ data: {
3319
+ type: "array";
3320
+ items: {
3321
+ type: "object";
3322
+ properties: {
3323
+ botId: {
3324
+ type: "string";
3325
+ };
3326
+ value: {
3327
+ type: "number";
3328
+ };
3329
+ };
3330
+ required: string[];
3331
+ };
3332
+ };
3333
+ };
3334
+ required: string[];
3335
+ title: string;
3336
+ additionalProperties: false;
3337
+ };
3338
+ };
3339
+ };
3280
3340
  getWorkspaceQuota: {
3281
3341
  name: string;
3282
3342
  description: string;
@@ -5356,6 +5416,7 @@ export declare const state: {
5356
5416
  createWorkspaceResponse: true;
5357
5417
  getWorkspaceResponse: true;
5358
5418
  listWorkspaceUsagesResponse: true;
5419
+ breakDownWorkspaceUsageByBotResponse: true;
5359
5420
  getWorkspaceQuotaResponse: true;
5360
5421
  listWorkspaceQuotasResponse: true;
5361
5422
  updateWorkspaceResponse: true;
package/dist/index.js CHANGED
@@ -426740,7 +426740,8 @@ var state = {
426740
426740
  integrationName: {
426741
426741
  type: "string",
426742
426742
  maxLength: 200,
426743
- description: "[DEPRECATED] To create a conversation from within a bot, call an action of the integration instead."
426743
+ description: "[DEPRECATED] To create a conversation from within a bot, call an action of the integration instead.",
426744
+ deprecated: true
426744
426745
  }
426745
426746
  },
426746
426747
  required: ["channel", "tags"],
@@ -426877,7 +426878,8 @@ var state = {
426877
426878
  integrationName: {
426878
426879
  type: "string",
426879
426880
  maxLength: 200,
426880
- description: "[DEPRECATED] To create a conversation from within a bot, call an action of the integration instead."
426881
+ description: "[DEPRECATED] To create a conversation from within a bot, call an action of the integration instead.",
426882
+ deprecated: true
426881
426883
  }
426882
426884
  },
426883
426885
  required: ["channel", "tags"],
@@ -427624,7 +427626,8 @@ var state = {
427624
427626
  integrationName: {
427625
427627
  type: "string",
427626
427628
  maxLength: 200,
427627
- description: "[DEPRECATED] To create a user from within a bot, call an action of the integration instead."
427629
+ description: "[DEPRECATED] To create a user from within a bot, call an action of the integration instead.",
427630
+ deprecated: true
427628
427631
  },
427629
427632
  name: {
427630
427633
  type: "string",
@@ -427766,7 +427769,8 @@ var state = {
427766
427769
  integrationName: {
427767
427770
  type: "string",
427768
427771
  maxLength: 200,
427769
- description: "[DEPRECATED] To create a user from within a bot, call an action of the integration instead."
427772
+ description: "[DEPRECATED] To create a user from within a bot, call an action of the integration instead.",
427773
+ deprecated: true
427770
427774
  },
427771
427775
  name: {
427772
427776
  type: "string",
@@ -430082,6 +430086,75 @@ var state = {
430082
430086
  }
430083
430087
  }
430084
430088
  },
430089
+ breakDownWorkspaceUsageByBot: {
430090
+ name: "breakDownWorkspaceUsageByBot",
430091
+ description: "Break down workspace usage by bot",
430092
+ section: "workspace",
430093
+ method: "get",
430094
+ path: "/v1/admin/workspaces/{id}/usages/by-bot",
430095
+ disableDefaultParameters: {
430096
+ "x-workspace-id": true
430097
+ },
430098
+ parameters: {
430099
+ id: {
430100
+ type: "string",
430101
+ description: "Workspace ID",
430102
+ in: "path"
430103
+ },
430104
+ type: {
430105
+ in: "query",
430106
+ description: "Type of usage",
430107
+ type: "string",
430108
+ enum: [
430109
+ "invocation_timeout",
430110
+ "invocation_calls",
430111
+ "storage_count",
430112
+ "bot_count",
430113
+ "knowledgebase_vector_storage",
430114
+ "workspace_ratelimit",
430115
+ "table_row_count",
430116
+ "workspace_member_count",
430117
+ "integrations_owned_count",
430118
+ "ai_spend",
430119
+ "openai_spend",
430120
+ "bing_search_spend"
430121
+ ],
430122
+ required: true
430123
+ },
430124
+ period: {
430125
+ in: "query",
430126
+ description: "Period to get",
430127
+ type: "string",
430128
+ required: false
430129
+ }
430130
+ },
430131
+ response: {
430132
+ description: "Success",
430133
+ schema: {
430134
+ type: "object",
430135
+ properties: {
430136
+ data: {
430137
+ type: "array",
430138
+ items: {
430139
+ type: "object",
430140
+ properties: {
430141
+ botId: {
430142
+ type: "string"
430143
+ },
430144
+ value: {
430145
+ type: "number"
430146
+ }
430147
+ },
430148
+ required: ["botId", "value"]
430149
+ }
430150
+ }
430151
+ },
430152
+ required: ["data"],
430153
+ title: "breakDownWorkspaceUsageByBotResponse",
430154
+ additionalProperties: false
430155
+ }
430156
+ }
430157
+ },
430085
430158
  getWorkspaceQuota: {
430086
430159
  name: "getWorkspaceQuota",
430087
430160
  description: "Get workspace quota",
@@ -432192,7 +432265,7 @@ var state = {
432192
432265
  title: "Botpress API",
432193
432266
  description: "API for Botpress Cloud",
432194
432267
  server: "https://api.botpress.cloud",
432195
- version: "0.15.3",
432268
+ version: "0.15.5",
432196
432269
  prefix: "v1"
432197
432270
  },
432198
432271
  errors: [
@@ -432394,6 +432467,7 @@ var state = {
432394
432467
  createWorkspaceResponse: true,
432395
432468
  getWorkspaceResponse: true,
432396
432469
  listWorkspaceUsagesResponse: true,
432470
+ breakDownWorkspaceUsageByBotResponse: true,
432397
432471
  getWorkspaceQuotaResponse: true,
432398
432472
  listWorkspaceQuotasResponse: true,
432399
432473
  updateWorkspaceResponse: true,
@@ -433893,6 +433967,7 @@ var state = {
433893
433967
  "createWorkspace",
433894
433968
  "getWorkspace",
433895
433969
  "listWorkspaceUsages",
433970
+ "breakDownWorkspaceUsageByBot",
433896
433971
  "getWorkspaceQuota",
433897
433972
  "listWorkspaceQuotas",
433898
433973
  "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.5",
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."}]}