@botpress/api 0.25.1 → 0.26.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.
@@ -1748,6 +1748,45 @@ export declare const state: {
1748
1748
  };
1749
1749
  };
1750
1750
  };
1751
+ trackAnalytics: {
1752
+ name: string;
1753
+ description: string;
1754
+ method: "post";
1755
+ path: string;
1756
+ disableDefaultParameters: {
1757
+ "x-integration-id": boolean;
1758
+ };
1759
+ requestBody: {
1760
+ description: string;
1761
+ schema: {
1762
+ type: "object";
1763
+ properties: {
1764
+ name: {
1765
+ type: "string";
1766
+ minLength: number;
1767
+ maxLength: number;
1768
+ };
1769
+ count: {
1770
+ type: "integer";
1771
+ minimum: number;
1772
+ };
1773
+ };
1774
+ required: string[];
1775
+ title: string;
1776
+ additionalProperties: false;
1777
+ };
1778
+ };
1779
+ response: {
1780
+ description: string;
1781
+ status: 200;
1782
+ schema: {
1783
+ type: "object";
1784
+ title: string;
1785
+ additionalProperties: false;
1786
+ };
1787
+ };
1788
+ parameters: {};
1789
+ };
1751
1790
  runVrl: {
1752
1791
  name: string;
1753
1792
  description: string;
@@ -5352,115 +5391,6 @@ export declare const state: {
5352
5391
  };
5353
5392
  };
5354
5393
  };
5355
- changeWorkspacePlan: {
5356
- name: string;
5357
- description: string;
5358
- section: "workspace";
5359
- method: "put";
5360
- path: string;
5361
- disableDefaultParameters: {
5362
- "x-workspace-id": boolean;
5363
- };
5364
- parameters: {
5365
- id: {
5366
- type: "string";
5367
- description: string;
5368
- in: "path";
5369
- };
5370
- };
5371
- requestBody: {
5372
- description: string;
5373
- schema: {
5374
- type: "object";
5375
- properties: {
5376
- plan: {
5377
- type: "string";
5378
- enum: string[];
5379
- };
5380
- };
5381
- required: string[];
5382
- title: string;
5383
- additionalProperties: false;
5384
- };
5385
- };
5386
- response: {
5387
- description: string;
5388
- schema: {
5389
- type: "object";
5390
- properties: {
5391
- id: {
5392
- type: "string";
5393
- };
5394
- name: {
5395
- type: "string";
5396
- };
5397
- ownerId: {
5398
- type: "string";
5399
- };
5400
- createdAt: {
5401
- type: "string";
5402
- };
5403
- updatedAt: {
5404
- type: "string";
5405
- };
5406
- botCount: {
5407
- type: "number";
5408
- };
5409
- accountType: {
5410
- type: "string";
5411
- enum: string[];
5412
- };
5413
- billingVersion: {
5414
- type: "string";
5415
- enum: string[];
5416
- };
5417
- plan: {
5418
- type: "string";
5419
- enum: string[];
5420
- };
5421
- blocked: {
5422
- type: "boolean";
5423
- };
5424
- spendingLimit: {
5425
- type: "number";
5426
- };
5427
- about: {
5428
- default: string;
5429
- type: "string";
5430
- };
5431
- profilePicture: {
5432
- default: string;
5433
- type: "string";
5434
- };
5435
- contactEmail: {
5436
- default: string;
5437
- type: "string";
5438
- };
5439
- website: {
5440
- default: string;
5441
- type: "string";
5442
- };
5443
- socialAccounts: {
5444
- default: never[];
5445
- type: "array";
5446
- items: {
5447
- type: "string";
5448
- };
5449
- };
5450
- isPublic: {
5451
- type: "boolean";
5452
- };
5453
- handle: {
5454
- default: string;
5455
- type: "string";
5456
- };
5457
- };
5458
- required: string[];
5459
- title: string;
5460
- additionalProperties: false;
5461
- };
5462
- };
5463
- };
5464
5394
  deleteWorkspace: {
5465
5395
  name: string;
5466
5396
  description: string;
@@ -7552,6 +7482,7 @@ export declare const state: {
7552
7482
  additionalProperties: {
7553
7483
  type: "string";
7554
7484
  maxLength: number;
7485
+ nullable: true;
7555
7486
  };
7556
7487
  description: string;
7557
7488
  };
@@ -8548,6 +8479,7 @@ export declare const state: {
8548
8479
  configureIntegrationBody: true;
8549
8480
  createTaskBody: true;
8550
8481
  updateTaskBody: true;
8482
+ trackAnalyticsBody: true;
8551
8483
  runVrlBody: true;
8552
8484
  updateAccountBody: true;
8553
8485
  createPersonalAccessTokenBody: true;
@@ -8560,7 +8492,6 @@ export declare const state: {
8560
8492
  createWorkspaceBody: true;
8561
8493
  updateWorkspaceBody: true;
8562
8494
  checkHandleAvailabilityBody: true;
8563
- changeWorkspacePlanBody: true;
8564
8495
  createWorkspaceMemberBody: true;
8565
8496
  updateWorkspaceMemberBody: true;
8566
8497
  createIntegrationApiKeyBody: true;
@@ -8618,6 +8549,7 @@ export declare const state: {
8618
8549
  updateTaskResponse: true;
8619
8550
  deleteTaskResponse: true;
8620
8551
  listTasksResponse: true;
8552
+ trackAnalyticsResponse: true;
8621
8553
  runVrlResponse: true;
8622
8554
  getAccountResponse: true;
8623
8555
  updateAccountResponse: true;
@@ -8656,7 +8588,6 @@ export declare const state: {
8656
8588
  updateWorkspaceResponse: true;
8657
8589
  checkHandleAvailabilityResponse: true;
8658
8590
  listWorkspacesResponse: true;
8659
- changeWorkspacePlanResponse: true;
8660
8591
  deleteWorkspaceResponse: true;
8661
8592
  getAuditRecordsResponse: true;
8662
8593
  listWorkspaceMembersResponse: true;
@@ -1,8 +1,11 @@
1
1
  export * from './gen/state';
2
2
  export declare const api: {
3
3
  getModelRef: (name: "Bot" | "Integration" | "Workspace" | "WorkspaceMember" | "Account" | "Usage" | "Issue" | "IssueEvent" | "Activity" | "User" | "Conversation" | "Event" | "Message" | "State" | "Task" | "Table" | "Column" | "Row" | "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" | "task" | "bot" | "integration" | "workspace" | "workspaceMember" | "account" | "usage" | "quotas" | "helper" | "activity" | "tables" | "files", Path, "zod-schema">) => void;
5
- exportClient: (dir: string | undefined, openapiGeneratorEndpoint: string, postProcessors?: import("@bpinternal/opapi").OpenApiPostProcessors | undefined) => Promise<void>;
4
+ addOperation: <Path extends string>(operationProps: import("@bpinternal/opapi").Operation<"x-integration-id" | "x-workspace-id", "user" | "conversation" | "event" | "message" | "file" | "state" | "hub" | "action" | "task" | "bot" | "integration" | "workspace" | "workspaceMember" | "account" | "usage" | "quotas" | "helper" | "activity" | "tables" | "files", Path, "zod-schema">) => void;
5
+ exportClient: {
6
+ (dir: string, openapiGeneratorEndpoint: string, postProcessors?: import("@bpinternal/opapi").OpenApiPostProcessors | undefined): Promise<void>;
7
+ (dir: string, props: import("@bpinternal/opapi").GenerateClientProps): Promise<void>;
8
+ };
6
9
  exportTypesBySection: (dir?: string | undefined) => Promise<void>;
7
10
  exportServer: (dir: string | undefined, useExpressTypes: boolean) => Promise<void>;
8
11
  exportOpenapi: (dir?: string | undefined) => void;
@@ -10,4 +13,5 @@ export declare const api: {
10
13
  importPath: string;
11
14
  }> | undefined) => void;
12
15
  exportErrors: (dir?: string | undefined) => void;
16
+ exportHandler: (dir?: string | undefined) => Promise<void>;
13
17
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/api",
3
- "version": "0.25.1",
3
+ "version": "0.26.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {
@@ -23,6 +23,6 @@
23
23
  "zod": "^3.22.4"
24
24
  },
25
25
  "dependencies": {
26
- "@bpinternal/opapi": "0.9.0"
26
+ "@bpinternal/opapi": "0.10.8"
27
27
  }
28
28
  }
@@ -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","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","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","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."}]}