@botpress/api 0.15.7 → 0.15.8

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,3 +1,5 @@
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" | "File", never, "user" | "conversation" | "event" | "message" | "file" | "state" | "hub" | "action" | "bot" | "integration" | "workspace" | "workspaceMember" | "account" | "usage" | "quotas" | "helper">;
1
3
  export declare const state: {
2
4
  operations: {
3
5
  createConversation: {
@@ -1402,6 +1404,51 @@ export declare const state: {
1402
1404
  };
1403
1405
  parameters: {};
1404
1406
  };
1407
+ runVrl: {
1408
+ name: string;
1409
+ description: string;
1410
+ method: "post";
1411
+ path: string;
1412
+ section: "helper";
1413
+ requestBody: {
1414
+ description: string;
1415
+ schema: {
1416
+ type: "object";
1417
+ properties: {
1418
+ data: {
1419
+ type: "object";
1420
+ additionalProperties: true;
1421
+ };
1422
+ script: {
1423
+ type: "string";
1424
+ };
1425
+ };
1426
+ required: string[];
1427
+ title: string;
1428
+ additionalProperties: false;
1429
+ };
1430
+ };
1431
+ response: {
1432
+ description: string;
1433
+ schema: {
1434
+ type: "object";
1435
+ properties: {
1436
+ data: {
1437
+ type: "object";
1438
+ additionalProperties: true;
1439
+ };
1440
+ result: {
1441
+ type: "object";
1442
+ additionalProperties: true;
1443
+ };
1444
+ };
1445
+ required: string[];
1446
+ title: string;
1447
+ additionalProperties: false;
1448
+ };
1449
+ };
1450
+ parameters: {};
1451
+ };
1405
1452
  getAccount: {
1406
1453
  name: string;
1407
1454
  description: string;
@@ -5374,6 +5421,7 @@ export declare const state: {
5374
5421
  patchStateBody: true;
5375
5422
  callActionBody: true;
5376
5423
  configureIntegrationBody: true;
5424
+ runVrlBody: true;
5377
5425
  createPersonalAccessTokenBody: true;
5378
5426
  createBotBody: true;
5379
5427
  updateBotBody: true;
@@ -5422,6 +5470,7 @@ export declare const state: {
5422
5470
  patchStateResponse: true;
5423
5471
  callActionResponse: true;
5424
5472
  configureIntegrationResponse: true;
5473
+ runVrlResponse: true;
5425
5474
  getAccountResponse: true;
5426
5475
  listPersonalAccessTokensResponse: true;
5427
5476
  createPersonalAccessTokenResponse: true;
@@ -6779,6 +6828,12 @@ export declare const state: {
6779
6828
  name: "quotas";
6780
6829
  operations: string[];
6781
6830
  schema?: undefined;
6831
+ } | {
6832
+ title: string;
6833
+ description: string;
6834
+ name: "helper";
6835
+ operations: string[];
6836
+ schema?: undefined;
6782
6837
  })[];
6783
6838
  options: {
6784
6839
  allowUnions: false;
package/dist/index.d.ts CHANGED
@@ -1,11 +1,13 @@
1
+ export * from './gen/state';
1
2
  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" | "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" | "quotas", 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" | "helper", 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>;
8
8
  exportOpenapi: (dir?: string | undefined) => void;
9
- exportState: (dir?: string | undefined) => void;
9
+ exportState: (dir?: string | undefined, opts?: Partial<{
10
+ importPath: string;
11
+ }> | undefined) => void;
10
12
  exportErrors: (dir?: string | undefined) => void;
11
13
  };