@botpress/api 0.16.2 → 0.16.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.
@@ -1,5 +1,5 @@
1
1
  import * as opapi from "@bpinternal/opapi";
2
- export type State = opapi.State<"Bot" | "Integration" | "Workspace" | "WorkspaceMember" | "Account" | "Usage" | "Issue" | "IssueEvent" | "User" | "Conversation" | "Event" | "Message" | "State" | "Task" | "File" | "Table" | "Column" | "Row", never, "user" | "conversation" | "event" | "message" | "file" | "state" | "hub" | "action" | "task" | "bot" | "integration" | "workspace" | "workspaceMember" | "account" | "usage" | "quotas" | "helper" | "tables">;
2
+ export type State = opapi.State<"Bot" | "Integration" | "Workspace" | "WorkspaceMember" | "Account" | "Usage" | "Issue" | "IssueEvent" | "Activity" | "User" | "Conversation" | "Event" | "Message" | "State" | "Task" | "File" | "Table" | "Column" | "Row", never, "user" | "conversation" | "event" | "message" | "file" | "state" | "hub" | "action" | "task" | "bot" | "integration" | "workspace" | "workspaceMember" | "account" | "usage" | "quotas" | "helper" | "activity" | "tables">;
3
3
  export declare const state: {
4
4
  operations: {
5
5
  createConversation: {
@@ -209,6 +209,9 @@ export declare const state: {
209
209
  schema: {
210
210
  type: "object";
211
211
  properties: {
212
+ currentTaskId: {
213
+ type: "string";
214
+ };
212
215
  tags: {
213
216
  type: "object";
214
217
  additionalProperties: {
@@ -217,7 +220,6 @@ export declare const state: {
217
220
  description: string;
218
221
  };
219
222
  };
220
- required: string[];
221
223
  title: string;
222
224
  additionalProperties: false;
223
225
  };
@@ -1444,14 +1446,17 @@ export declare const state: {
1444
1446
  properties: {
1445
1447
  title: {
1446
1448
  type: "string";
1449
+ maxLength: number;
1447
1450
  description: string;
1448
1451
  };
1449
- instruction: {
1452
+ description: {
1450
1453
  type: "string";
1454
+ maxLength: number;
1451
1455
  description: string;
1452
1456
  };
1453
1457
  type: {
1454
1458
  type: "string";
1459
+ maxLength: number;
1455
1460
  description: string;
1456
1461
  };
1457
1462
  data: {
@@ -1529,7 +1534,7 @@ export declare const state: {
1529
1534
  type: "string";
1530
1535
  description: string;
1531
1536
  };
1532
- instruction: {
1537
+ description: {
1533
1538
  type: "string";
1534
1539
  description: string;
1535
1540
  };
@@ -1638,7 +1643,7 @@ export declare const state: {
1638
1643
  };
1639
1644
  status: {
1640
1645
  in: "query";
1641
- type: "string";
1646
+ type: "string[]";
1642
1647
  description: string;
1643
1648
  enum: string[];
1644
1649
  };
@@ -5771,6 +5776,62 @@ export declare const state: {
5771
5776
  };
5772
5777
  parameters: {};
5773
5778
  };
5779
+ listActivities: {
5780
+ name: string;
5781
+ description: string;
5782
+ method: "get";
5783
+ section: "activity";
5784
+ path: string;
5785
+ disableDefaultParameters: {
5786
+ "x-workspace-id": boolean;
5787
+ };
5788
+ parameters: {
5789
+ nextToken: {
5790
+ in: "query";
5791
+ description: string;
5792
+ type: "string";
5793
+ };
5794
+ taskId: {
5795
+ in: "query";
5796
+ description: string;
5797
+ type: "string";
5798
+ required: true;
5799
+ };
5800
+ botId: {
5801
+ in: "query";
5802
+ description: string;
5803
+ type: "string";
5804
+ required: true;
5805
+ };
5806
+ };
5807
+ response: {
5808
+ description: string;
5809
+ schema: {
5810
+ type: "object";
5811
+ properties: {
5812
+ activities: {
5813
+ type: "array";
5814
+ items: {
5815
+ $ref: string;
5816
+ };
5817
+ };
5818
+ meta: {
5819
+ type: "object";
5820
+ properties: {
5821
+ nextToken: {
5822
+ type: "string";
5823
+ description: string;
5824
+ };
5825
+ };
5826
+ additionalProperties: false;
5827
+ };
5828
+ };
5829
+ required: string[];
5830
+ title: string;
5831
+ additionalProperties: false;
5832
+ };
5833
+ };
5834
+ };
5774
5835
  introspect: {
5775
5836
  name: string;
5776
5837
  description: string;
@@ -6166,6 +6227,7 @@ export declare const state: {
6166
6227
  getUsageResponse: true;
6167
6228
  listUsageHistoryResponse: true;
6168
6229
  changeAISpendQuotaResponse: true;
6230
+ listActivitiesResponse: true;
6169
6231
  introspectResponse: true;
6170
6232
  createFileResponse: true;
6171
6233
  getFileResponse: true;
@@ -6182,6 +6244,7 @@ export declare const state: {
6182
6244
  Usage: true;
6183
6245
  Issue: true;
6184
6246
  IssueEvent: true;
6247
+ Activity: true;
6185
6248
  User: true;
6186
6249
  Conversation: true;
6187
6250
  Event: true;
@@ -7173,6 +7236,38 @@ export declare const state: {
7173
7236
  additionalProperties: false;
7174
7237
  };
7175
7238
  };
7239
+ Activity: {
7240
+ section: "activity";
7241
+ schema: {
7242
+ type: "object";
7243
+ properties: {
7244
+ id: {
7245
+ type: "string";
7246
+ };
7247
+ description: {
7248
+ type: "string";
7249
+ };
7250
+ taskId: {
7251
+ type: "string";
7252
+ };
7253
+ category: {
7254
+ type: "string";
7255
+ enum: string[];
7256
+ };
7257
+ data: {
7258
+ type: "object";
7259
+ additionalProperties: true;
7260
+ };
7261
+ createdAt: {
7262
+ type: "string";
7263
+ format: string;
7264
+ description: string;
7265
+ };
7266
+ };
7267
+ required: string[];
7268
+ additionalProperties: false;
7269
+ };
7270
+ };
7176
7271
  User: {
7177
7272
  section: "user";
7178
7273
  schema: {
@@ -7457,7 +7552,7 @@ export declare const state: {
7457
7552
  maxLength: number;
7458
7553
  description: string;
7459
7554
  };
7460
- instruction: {
7555
+ description: {
7461
7556
  type: "string";
7462
7557
  maxLength: number;
7463
7558
  description: string;
@@ -7619,6 +7714,10 @@ export declare const state: {
7619
7714
  index: {
7620
7715
  type: "integer";
7621
7716
  };
7717
+ id: {
7718
+ type: "string";
7719
+ description: string;
7720
+ };
7622
7721
  searchable: {
7623
7722
  type: "boolean";
7624
7723
  description: string;
@@ -7640,6 +7739,7 @@ export declare const state: {
7640
7739
  additionalProperties: {
7641
7740
  type: "boolean";
7642
7741
  enum: boolean[];
7742
+ description: string;
7643
7743
  };
7644
7744
  required: {
7645
7745
  type: "array";
@@ -7846,6 +7946,12 @@ export declare const state: {
7846
7946
  name: "helper";
7847
7947
  operations: string[];
7848
7948
  schema?: undefined;
7949
+ } | {
7950
+ title: string;
7951
+ description: string;
7952
+ name: "activity";
7953
+ operations: string[];
7954
+ schema: string;
7849
7955
  } | {
7850
7956
  title: string;
7851
7957
  description: string;
@@ -1,7 +1,7 @@
1
1
  export * from './gen/state';
2
2
  export declare const api: {
3
- getModelRef: (name: "Bot" | "Integration" | "Workspace" | "WorkspaceMember" | "Account" | "Usage" | "Issue" | "IssueEvent" | "User" | "Conversation" | "Event" | "Message" | "State" | "Task" | "File" | "Table" | "Column" | "Row") => 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" | "tables", Path, "zod-schema">) => void;
3
+ getModelRef: (name: "Bot" | "Integration" | "Workspace" | "WorkspaceMember" | "Account" | "Usage" | "Issue" | "IssueEvent" | "Activity" | "User" | "Conversation" | "Event" | "Message" | "State" | "Task" | "File" | "Table" | "Column" | "Row") => 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", 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/api",
3
- "version": "0.16.2",
3
+ "version": "0.16.4",
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":["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"]},{"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":["createIntegration","updateIntegration","listIntegrations","getIntegration","getIntegrationLogs","getIntegrationByName","deleteIntegration"],"schema":"Integration"},{"title":"Workspace","description":"","name":"workspace","operations":["getWorkspaceBillingDetails","setWorkspacePaymentMethod","listWorkspaceInvoices","chargeWorkspaceUnpaidInvoices","createWorkspace","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","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":"Tables","description":"Operations related to table management.","name":"tables","operations":[],"schema":"Table"}],"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"]},{"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":["createIntegration","updateIntegration","listIntegrations","getIntegration","getIntegrationLogs","getIntegrationByName","deleteIntegration"],"schema":"Integration"},{"title":"Workspace","description":"","name":"workspace","operations":["getWorkspaceBillingDetails","setWorkspacePaymentMethod","listWorkspaceInvoices","chargeWorkspaceUnpaidInvoices","createWorkspace","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","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":"Operations related to table management.","name":"tables","operations":[],"schema":"Table"}],"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."}]}