@botpress/api 1.51.0 → 1.52.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.
@@ -1,85 +1,11 @@
1
+ import { OpenApi } from '@bpinternal/opapi';
1
2
  export * from './gen/state';
2
- export declare const api: {
3
- getModelRef: (name: "User" | "Conversation" | "Event" | "Message" | "State" | "Task" | "Workflow" | "Bot" | "Integration" | "Interface" | "Plugin" | "Workspace" | "WorkspaceMember" | "Account" | "Usage" | "Issue" | "IssueEvent" | "Activity" | "Version" | "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" | "state" | "hub" | "action" | "task" | "workflow" | "tag" | "bot" | "integration" | "interface" | "plugin" | "workspace" | "workspaceMember" | "account" | "usage" | "quotas" | "helper" | "activity" | "files" | "tables", 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
- };
9
- exportTypesBySection: (dir?: string | undefined) => Promise<void>;
10
- exportServer: (dir: string | undefined, useExpressTypes: boolean) => Promise<void>;
11
- exportOpenapi: (dir?: string | undefined) => void;
12
- exportState: (dir?: string | undefined, opts?: Partial<{
13
- importPath: string;
14
- }> | undefined) => void;
15
- exportErrors: (dir?: string | undefined) => void;
16
- exportHandler: (dir?: string | undefined) => Promise<void>;
17
- };
3
+ export declare const api: OpenApi<string, string, string>;
18
4
  export * as runtime from './gen/runtime/state';
19
- export declare const runtimeApi: {
20
- getModelRef: (name: "User" | "Conversation" | "Event" | "Message" | "State" | "Task" | "Workflow") => import("@bpinternal/opapi").OpenApiZodAny;
21
- addOperation: <Path extends string>(operationProps: import("@bpinternal/opapi").Operation<string, "user" | "conversation" | "event" | "message" | "state" | "hub" | "action" | "task" | "workflow" | "tag", Path, "zod-schema">) => void;
22
- exportClient: {
23
- (dir: string, openapiGeneratorEndpoint: string, postProcessors?: import("@bpinternal/opapi").OpenApiPostProcessors | undefined): Promise<void>;
24
- (dir: string, props: import("@bpinternal/opapi").GenerateClientProps): Promise<void>;
25
- };
26
- exportTypesBySection: (dir?: string | undefined) => Promise<void>;
27
- exportServer: (dir: string | undefined, useExpressTypes: boolean) => Promise<void>;
28
- exportOpenapi: (dir?: string | undefined) => void;
29
- exportState: (dir?: string | undefined, opts?: Partial<{
30
- importPath: string;
31
- }> | undefined) => void;
32
- exportErrors: (dir?: string | undefined) => void;
33
- exportHandler: (dir?: string | undefined) => Promise<void>;
34
- };
5
+ export declare const runtimeApi: OpenApi<string, string, string>;
35
6
  export * as admin from './gen/admin/state';
36
- export declare const adminApi: {
37
- getModelRef: (name: "Bot" | "Integration" | "Interface" | "Plugin" | "Workspace" | "WorkspaceMember" | "Account" | "Usage" | "Issue" | "IssueEvent" | "Activity" | "Version") => import("@bpinternal/opapi").OpenApiZodAny;
38
- addOperation: <Path extends string>(operationProps: import("@bpinternal/opapi").Operation<"x-workspace-id", "hub" | "bot" | "integration" | "interface" | "plugin" | "workspace" | "workspaceMember" | "account" | "usage" | "quotas" | "helper" | "activity", Path, "zod-schema">) => void;
39
- exportClient: {
40
- (dir: string, openapiGeneratorEndpoint: string, postProcessors?: import("@bpinternal/opapi").OpenApiPostProcessors | undefined): Promise<void>;
41
- (dir: string, props: import("@bpinternal/opapi").GenerateClientProps): Promise<void>;
42
- };
43
- exportTypesBySection: (dir?: string | undefined) => Promise<void>;
44
- exportServer: (dir: string | undefined, useExpressTypes: boolean) => Promise<void>;
45
- exportOpenapi: (dir?: string | undefined) => void;
46
- exportState: (dir?: string | undefined, opts?: Partial<{
47
- importPath: string;
48
- }> | undefined) => void;
49
- exportErrors: (dir?: string | undefined) => void;
50
- exportHandler: (dir?: string | undefined) => Promise<void>;
51
- };
7
+ export declare const adminApi: OpenApi<string, string, string>;
52
8
  export * as files from './gen/files/state';
53
- export declare const filesApi: {
54
- getModelRef: (name: "File") => import("@bpinternal/opapi").OpenApiZodAny;
55
- addOperation: <Path extends string>(operationProps: import("@bpinternal/opapi").Operation<string, "files", Path, "zod-schema">) => void;
56
- exportClient: {
57
- (dir: string, openapiGeneratorEndpoint: string, postProcessors?: import("@bpinternal/opapi").OpenApiPostProcessors | undefined): Promise<void>;
58
- (dir: string, props: import("@bpinternal/opapi").GenerateClientProps): Promise<void>;
59
- };
60
- exportTypesBySection: (dir?: string | undefined) => Promise<void>;
61
- exportServer: (dir: string | undefined, useExpressTypes: boolean) => Promise<void>;
62
- exportOpenapi: (dir?: string | undefined) => void;
63
- exportState: (dir?: string | undefined, opts?: Partial<{
64
- importPath: string;
65
- }> | undefined) => void;
66
- exportErrors: (dir?: string | undefined) => void;
67
- exportHandler: (dir?: string | undefined) => Promise<void>;
68
- };
9
+ export declare const filesApi: OpenApi<string, string, string>;
69
10
  export * as tables from './gen/tables/state';
70
- export declare const tablesApi: {
71
- getModelRef: (name: "Table" | "Column" | "Row") => import("@bpinternal/opapi").OpenApiZodAny;
72
- addOperation: <Path extends string>(operationProps: import("@bpinternal/opapi").Operation<string, "tables", Path, "zod-schema">) => void;
73
- exportClient: {
74
- (dir: string, openapiGeneratorEndpoint: string, postProcessors?: import("@bpinternal/opapi").OpenApiPostProcessors | undefined): Promise<void>;
75
- (dir: string, props: import("@bpinternal/opapi").GenerateClientProps): Promise<void>;
76
- };
77
- exportTypesBySection: (dir?: string | undefined) => Promise<void>;
78
- exportServer: (dir: string | undefined, useExpressTypes: boolean) => Promise<void>;
79
- exportOpenapi: (dir?: string | undefined) => void;
80
- exportState: (dir?: string | undefined, opts?: Partial<{
81
- importPath: string;
82
- }> | undefined) => void;
83
- exportErrors: (dir?: string | undefined) => void;
84
- exportHandler: (dir?: string | undefined) => Promise<void>;
85
- };
11
+ export declare const tablesApi: OpenApi<string, string, string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/api",
3
- "version": "1.51.0",
3
+ "version": "1.52.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "devDependencies": {
@@ -15,7 +15,7 @@
15
15
  "@bpinternal/tables-api": "0.17.2"
16
16
  },
17
17
  "dependencies": {
18
- "@bpinternal/opapi": "0.17.1"
18
+ "@bpinternal/opapi": "1.0.0"
19
19
  },
20
20
  "scripts": {
21
21
  "openapi": "es-node openapi/generator.ts && pnpm run build",