@botpress/api 0.14.2 → 0.15.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.
@@ -4936,6 +4936,36 @@ export declare const state: {
4936
4936
  };
4937
4937
  };
4938
4938
  };
4939
+ changeAISpendQuota: {
4940
+ name: string;
4941
+ path: string;
4942
+ description: string;
4943
+ method: "put";
4944
+ section: "quotas";
4945
+ requestBody: {
4946
+ description: string;
4947
+ schema: {
4948
+ type: "object";
4949
+ properties: {
4950
+ monthlySpendingLimit: {
4951
+ type: "number";
4952
+ };
4953
+ };
4954
+ required: string[];
4955
+ title: string;
4956
+ additionalProperties: false;
4957
+ };
4958
+ };
4959
+ response: {
4960
+ description: string;
4961
+ schema: {
4962
+ type: "object";
4963
+ title: string;
4964
+ additionalProperties: false;
4965
+ };
4966
+ };
4967
+ parameters: {};
4968
+ };
4939
4969
  introspect: {
4940
4970
  name: string;
4941
4971
  description: string;
@@ -5233,6 +5263,7 @@ export declare const state: {
5233
5263
  updateWorkspaceMemberBody: true;
5234
5264
  createIntegrationBody: true;
5235
5265
  updateIntegrationBody: true;
5266
+ changeAISpendQuotaBody: true;
5236
5267
  introspectBody: true;
5237
5268
  createFileBody: true;
5238
5269
  };
@@ -5313,6 +5344,7 @@ export declare const state: {
5313
5344
  deleteIntegrationResponse: true;
5314
5345
  getUsageResponse: true;
5315
5346
  listUsageHistoryResponse: true;
5347
+ changeAISpendQuotaResponse: true;
5316
5348
  introspectResponse: true;
5317
5349
  createFileResponse: true;
5318
5350
  getFileResponse: true;
@@ -6564,8 +6596,8 @@ export declare const state: {
6564
6596
  operations: string[];
6565
6597
  schema: string;
6566
6598
  } | {
6567
- description: string;
6568
6599
  title: string;
6600
+ description: string;
6569
6601
  name: "hub";
6570
6602
  operations: string[];
6571
6603
  schema?: undefined;
@@ -6576,41 +6608,47 @@ export declare const state: {
6576
6608
  operations: string[];
6577
6609
  schema?: undefined;
6578
6610
  } | {
6579
- description: string;
6580
6611
  title: string;
6612
+ description: string;
6581
6613
  name: "bot";
6582
6614
  operations: string[];
6583
6615
  schema: string;
6584
6616
  } | {
6585
- description: string;
6586
6617
  title: string;
6618
+ description: string;
6587
6619
  name: "integration";
6588
6620
  operations: string[];
6589
6621
  schema: string;
6590
6622
  } | {
6591
- description: string;
6592
6623
  title: string;
6624
+ description: string;
6593
6625
  name: "workspace";
6594
6626
  operations: string[];
6595
6627
  schema: string;
6596
6628
  } | {
6597
- description: string;
6598
6629
  title: string;
6630
+ description: string;
6599
6631
  name: "workspaceMember";
6600
6632
  operations: string[];
6601
6633
  schema: string;
6602
6634
  } | {
6603
- description: string;
6604
6635
  title: string;
6636
+ description: string;
6605
6637
  name: "account";
6606
6638
  operations: string[];
6607
6639
  schema: string;
6608
6640
  } | {
6609
- description: string;
6610
6641
  title: string;
6642
+ description: string;
6611
6643
  name: "usage";
6612
6644
  operations: string[];
6613
6645
  schema: string;
6646
+ } | {
6647
+ title: string;
6648
+ description: string;
6649
+ name: "quotas";
6650
+ operations: string[];
6651
+ schema?: undefined;
6614
6652
  })[];
6615
6653
  options: {
6616
6654
  allowUnions: false;
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export declare const api: {
2
- getState: () => import("@bpinternal/opapi").State<"Bot" | "Integration" | "Workspace" | "WorkspaceMember" | "Account" | "Usage" | "Issue" | "IssueEvent" | "User" | "Conversation" | "Event" | "Message" | "State" | "File", "x-workspace-id", "user" | "conversation" | "event" | "message" | "file" | "state" | "hub" | "action" | "bot" | "integration" | "workspace" | "workspaceMember" | "account" | "usage">;
2
+ getState: () => import("@bpinternal/opapi").State<"Bot" | "Integration" | "Workspace" | "WorkspaceMember" | "Account" | "Usage" | "Issue" | "IssueEvent" | "User" | "Conversation" | "Event" | "Message" | "State" | "File", "x-workspace-id", "user" | "conversation" | "event" | "message" | "file" | "state" | "hub" | "action" | "bot" | "integration" | "workspace" | "workspaceMember" | "account" | "usage" | "quotas">;
3
3
  getModelRef: (name: "Bot" | "Integration" | "Workspace" | "WorkspaceMember" | "Account" | "Usage" | "Issue" | "IssueEvent" | "User" | "Conversation" | "Event" | "Message" | "State" | "File") => import("@bpinternal/opapi").OpenApiZodAny;
4
- addOperation: <Path extends string>(operationProps: import("@bpinternal/opapi").Operation<"x-workspace-id", "user" | "conversation" | "event" | "message" | "file" | "state" | "hub" | "action" | "bot" | "integration" | "workspace" | "workspaceMember" | "account" | "usage", Path, "zod-schema">) => void;
4
+ addOperation: <Path extends string>(operationProps: import("@bpinternal/opapi").Operation<"x-workspace-id", "user" | "conversation" | "event" | "message" | "file" | "state" | "hub" | "action" | "bot" | "integration" | "workspace" | "workspaceMember" | "account" | "usage" | "quotas", Path, "zod-schema">) => void;
5
5
  exportClient: (dir: string | undefined, openapiGeneratorEndpoint: string, postProcessors?: import("@bpinternal/opapi").OpenApiPostProcessors | undefined) => Promise<void>;
6
6
  exportTypesBySection: (dir?: string | undefined) => Promise<void>;
7
7
  exportServer: (dir: string | undefined, useExpressTypes: boolean) => Promise<void>;
package/dist/index.js CHANGED
@@ -431824,7 +431824,7 @@ var state = {
431824
431824
  },
431825
431825
  id: {
431826
431826
  type: "string",
431827
- description: "id of a bot or a workspace depending on the usage type",
431827
+ description: 'ID of a bot or a workspace, depending on the "type" parameter',
431828
431828
  in: "path"
431829
431829
  }
431830
431830
  },
@@ -431871,7 +431871,7 @@ var state = {
431871
431871
  },
431872
431872
  id: {
431873
431873
  type: "string",
431874
- description: "id of a bot or a workspace depending on the usage type",
431874
+ description: 'ID of a bot or a workspace, depending on the "type" parameter',
431875
431875
  in: "path"
431876
431876
  }
431877
431877
  },
@@ -431893,6 +431893,36 @@ var state = {
431893
431893
  }
431894
431894
  }
431895
431895
  },
431896
+ changeAISpendQuota: {
431897
+ name: "changeAISpendQuota",
431898
+ path: "/v1/admin/quotas/ai-spend",
431899
+ description: "Change AI Spend quota",
431900
+ method: "put",
431901
+ section: "quotas",
431902
+ requestBody: {
431903
+ description: "New AI Spend quota",
431904
+ schema: {
431905
+ type: "object",
431906
+ properties: {
431907
+ monthlySpendingLimit: {
431908
+ type: "number"
431909
+ }
431910
+ },
431911
+ required: ["monthlySpendingLimit"],
431912
+ title: "changeAISpendQuotaBody",
431913
+ additionalProperties: false
431914
+ }
431915
+ },
431916
+ response: {
431917
+ description: "Success",
431918
+ schema: {
431919
+ type: "object",
431920
+ title: "changeAISpendQuotaResponse",
431921
+ additionalProperties: false
431922
+ }
431923
+ },
431924
+ parameters: {}
431925
+ },
431896
431926
  introspect: {
431897
431927
  name: "introspect",
431898
431928
  description: "Introspect the API",
@@ -432111,7 +432141,7 @@ var state = {
432111
432141
  title: "Botpress API",
432112
432142
  description: "API for Botpress Cloud",
432113
432143
  server: "https://api.botpress.cloud",
432114
- version: "0.14.2",
432144
+ version: "0.15.0",
432115
432145
  prefix: "v1"
432116
432146
  },
432117
432147
  errors: [
@@ -432252,6 +432282,7 @@ var state = {
432252
432282
  updateWorkspaceMemberBody: true,
432253
432283
  createIntegrationBody: true,
432254
432284
  updateIntegrationBody: true,
432285
+ changeAISpendQuotaBody: true,
432255
432286
  introspectBody: true,
432256
432287
  createFileBody: true
432257
432288
  },
@@ -432332,6 +432363,7 @@ var state = {
432332
432363
  deleteIntegrationResponse: true,
432333
432364
  getUsageResponse: true,
432334
432365
  listUsageHistoryResponse: true,
432366
+ changeAISpendQuotaResponse: true,
432335
432367
  introspectResponse: true,
432336
432368
  createFileResponse: true,
432337
432369
  getFileResponse: true,
@@ -433743,8 +433775,8 @@ var state = {
433743
433775
  schema: "State"
433744
433776
  },
433745
433777
  {
433746
- description: "",
433747
433778
  title: "Hub",
433779
+ description: "",
433748
433780
  name: "hub",
433749
433781
  operations: [
433750
433782
  "listPublicIntegrations",
@@ -433759,8 +433791,8 @@ var state = {
433759
433791
  operations: ["callAction"]
433760
433792
  },
433761
433793
  {
433762
- description: "",
433763
433794
  title: "Bot",
433795
+ description: "",
433764
433796
  name: "bot",
433765
433797
  operations: [
433766
433798
  "createBot",
@@ -433779,8 +433811,8 @@ var state = {
433779
433811
  schema: "Bot"
433780
433812
  },
433781
433813
  {
433782
- description: "",
433783
433814
  title: "Integration",
433815
+ description: "",
433784
433816
  name: "integration",
433785
433817
  operations: [
433786
433818
  "createIntegration",
@@ -433794,8 +433826,8 @@ var state = {
433794
433826
  schema: "Integration"
433795
433827
  },
433796
433828
  {
433797
- description: "",
433798
433829
  title: "Workspace",
433830
+ description: "",
433799
433831
  name: "workspace",
433800
433832
  operations: [
433801
433833
  "getWorkspaceBillingDetails",
@@ -433816,8 +433848,8 @@ var state = {
433816
433848
  schema: "Workspace"
433817
433849
  },
433818
433850
  {
433819
- description: "",
433820
433851
  title: "Workspace Member",
433852
+ description: "",
433821
433853
  name: "workspaceMember",
433822
433854
  operations: [
433823
433855
  "listWorkspaceMembers",
@@ -433828,8 +433860,8 @@ var state = {
433828
433860
  schema: "WorkspaceMember"
433829
433861
  },
433830
433862
  {
433831
- description: "",
433832
433863
  title: "Account",
433864
+ description: "",
433833
433865
  name: "account",
433834
433866
  operations: [
433835
433867
  "getAccount",
@@ -433840,11 +433872,17 @@ var state = {
433840
433872
  schema: "Account"
433841
433873
  },
433842
433874
  {
433843
- description: "",
433844
433875
  title: "Usage",
433876
+ description: "",
433845
433877
  name: "usage",
433846
433878
  operations: ["getUsage"],
433847
433879
  schema: "Usage"
433880
+ },
433881
+ {
433882
+ title: "Quotas",
433883
+ description: "",
433884
+ name: "quotas",
433885
+ operations: ["changeAISpendQuota"]
433848
433886
  }
433849
433887
  ],
433850
433888
  options: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/api",
3
- "version": "0.14.2",
3
+ "version": "0.15.0",
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"},{"description":"","title":"Hub","name":"hub","operations":["listPublicIntegrations","getPublicIntegrationById","getPublicIntegration"]},{"description":"","title":"Action","name":"action","operations":["callAction"]},{"description":"","title":"Bot","name":"bot","operations":["createBot","updateBot","transferBot","listBots","getBot","deleteBot","getBotLogs","getBotWebchat","getBotAnalytics","listBotIssues","deleteBotIssue","listBotIssueEvents"],"schema":"Bot"},{"description":"","title":"Integration","name":"integration","operations":["createIntegration","updateIntegration","listIntegrations","getIntegration","getIntegrationLogs","getIntegrationByName","deleteIntegration"],"schema":"Integration"},{"description":"","title":"Workspace","name":"workspace","operations":["getWorkspaceBillingDetails","setWorkspacePaymentMethod","listWorkspaceInvoices","chargeWorkspaceUnpaidInvoices","createWorkspace","getWorkspace","listWorkspaceUsages","getWorkspaceQuota","listWorkspaceQuotas","updateWorkspace","listWorkspaces","changeWorkspacePlan","deleteWorkspace","getAuditRecords"],"schema":"Workspace"},{"description":"","title":"Workspace Member","name":"workspaceMember","operations":["listWorkspaceMembers","deleteWorkspaceMember","createWorkspaceMember","updateWorkspaceMember"],"schema":"WorkspaceMember"},{"description":"","title":"Account","name":"account","operations":["getAccount","listPersonalAccessTokens","createPersonalAccessToken","deletePersonalAccessToken"],"schema":"Account"},{"description":"","title":"Usage","name":"usage","operations":["getUsage"],"schema":"Usage"}],"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","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."}]}