@botpress/api 0.15.6 → 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;
@@ -2226,10 +2273,6 @@ export declare const state: {
2226
2273
  };
2227
2274
  description: string;
2228
2275
  };
2229
- alwaysAlive: {
2230
- type: "boolean";
2231
- description: string;
2232
- };
2233
2276
  };
2234
2277
  title: string;
2235
2278
  additionalProperties: false;
@@ -3341,6 +3384,38 @@ export declare const state: {
3341
3384
  };
3342
3385
  };
3343
3386
  };
3387
+ getAllWorkspaceQuotaCompletion: {
3388
+ name: string;
3389
+ description: string;
3390
+ section: "workspace";
3391
+ method: "get";
3392
+ path: string;
3393
+ disableDefaultParameters: {
3394
+ "x-workspace-id": boolean;
3395
+ };
3396
+ response: {
3397
+ description: string;
3398
+ schema: {
3399
+ type: "object";
3400
+ additionalProperties: {
3401
+ type: "object";
3402
+ properties: {
3403
+ type: {
3404
+ type: "string";
3405
+ enum: string[];
3406
+ };
3407
+ completion: {
3408
+ type: "number";
3409
+ };
3410
+ };
3411
+ required: string[];
3412
+ additionalProperties: false;
3413
+ };
3414
+ title: string;
3415
+ };
3416
+ };
3417
+ parameters: {};
3418
+ };
3344
3419
  getWorkspaceQuota: {
3345
3420
  name: string;
3346
3421
  description: string;
@@ -5346,6 +5421,7 @@ export declare const state: {
5346
5421
  patchStateBody: true;
5347
5422
  callActionBody: true;
5348
5423
  configureIntegrationBody: true;
5424
+ runVrlBody: true;
5349
5425
  createPersonalAccessTokenBody: true;
5350
5426
  createBotBody: true;
5351
5427
  updateBotBody: true;
@@ -5394,6 +5470,7 @@ export declare const state: {
5394
5470
  patchStateResponse: true;
5395
5471
  callActionResponse: true;
5396
5472
  configureIntegrationResponse: true;
5473
+ runVrlResponse: true;
5397
5474
  getAccountResponse: true;
5398
5475
  listPersonalAccessTokensResponse: true;
5399
5476
  createPersonalAccessTokenResponse: true;
@@ -5421,6 +5498,7 @@ export declare const state: {
5421
5498
  getWorkspaceResponse: true;
5422
5499
  listWorkspaceUsagesResponse: true;
5423
5500
  breakDownWorkspaceUsageByBotResponse: true;
5501
+ getAllWorkspaceQuotaCompletionResponse: true;
5424
5502
  getWorkspaceQuotaResponse: true;
5425
5503
  listWorkspaceQuotasResponse: true;
5426
5504
  updateWorkspaceResponse: true;
@@ -5780,15 +5858,6 @@ export declare const state: {
5780
5858
  type: "string";
5781
5859
  description: string;
5782
5860
  };
5783
- alwaysAlive: {
5784
- type: "boolean";
5785
- description: string;
5786
- };
5787
- status: {
5788
- type: "string";
5789
- enum: string[];
5790
- description: string;
5791
- };
5792
5861
  medias: {
5793
5862
  type: "array";
5794
5863
  items: {
@@ -6759,6 +6828,12 @@ export declare const state: {
6759
6828
  name: "quotas";
6760
6829
  operations: string[];
6761
6830
  schema?: undefined;
6831
+ } | {
6832
+ title: string;
6833
+ description: string;
6834
+ name: "helper";
6835
+ operations: string[];
6836
+ schema?: undefined;
6762
6837
  })[];
6763
6838
  options: {
6764
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
  };