@botpress/cli 4.17.14 → 4.17.16
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.
- package/.turbo/turbo-build.log +16 -12
- package/bin.js +1 -1
- package/dist/api/bot-body.d.ts +5 -0
- package/dist/api/client.d.ts +50 -0
- package/dist/api/index.d.ts +6 -0
- package/dist/api/integration-body.d.ts +5 -0
- package/dist/api/interface-body.d.ts +7 -0
- package/dist/api/paging.d.ts +9 -0
- package/dist/api/plugin-body.d.ts +5 -0
- package/dist/api/retry.d.ts +2 -0
- package/dist/api/types.d.ts +62 -0
- package/dist/chat/index.d.ts +25 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +51 -0
- package/dist/cli.js.map +7 -0
- package/dist/code-generation/bot-implementation/bot-implementation.d.ts +8 -0
- package/dist/code-generation/bot-implementation/bot-plugins/index.d.ts +7 -0
- package/dist/code-generation/bot-implementation/bot-plugins/plugin-module.d.ts +13 -0
- package/dist/code-generation/bot-implementation/bot-typings/actions-module.d.ts +21 -0
- package/dist/code-generation/bot-implementation/bot-typings/events-module.d.ts +10 -0
- package/dist/code-generation/bot-implementation/bot-typings/index.d.ts +7 -0
- package/dist/code-generation/bot-implementation/bot-typings/states-module.d.ts +17 -0
- package/dist/code-generation/bot-implementation/bot-typings/tables-module.d.ts +10 -0
- package/dist/code-generation/bot-implementation/bot-typings/workflows-module.d.ts +27 -0
- package/dist/code-generation/bot-implementation/index.d.ts +3 -0
- package/dist/code-generation/consts.d.ts +5 -0
- package/dist/code-generation/generators.d.ts +10 -0
- package/dist/code-generation/index.d.ts +8 -0
- package/dist/code-generation/integration-implementation/index.d.ts +3 -0
- package/dist/code-generation/integration-implementation/integration-implementation.d.ts +7 -0
- package/dist/code-generation/integration-implementation/integration-secret.d.ts +8 -0
- package/dist/code-generation/integration-implementation/integration-typings/actions-module.d.ts +21 -0
- package/dist/code-generation/integration-implementation/integration-typings/channels-module.d.ts +5 -0
- package/dist/code-generation/integration-implementation/integration-typings/configuration-module.d.ts +7 -0
- package/dist/code-generation/integration-implementation/integration-typings/configurations-module.d.ts +10 -0
- package/dist/code-generation/integration-implementation/integration-typings/entities-module.d.ts +10 -0
- package/dist/code-generation/integration-implementation/integration-typings/events-module.d.ts +10 -0
- package/dist/code-generation/integration-implementation/integration-typings/index.d.ts +8 -0
- package/dist/code-generation/integration-implementation/integration-typings/states-module.d.ts +17 -0
- package/dist/code-generation/integration-package/index.d.ts +2 -0
- package/dist/code-generation/integration-package/integration-package-definition/actions-module.d.ts +21 -0
- package/dist/code-generation/integration-package/integration-package-definition/channels-module.d.ts +5 -0
- package/dist/code-generation/integration-package/integration-package-definition/configuration-module.d.ts +7 -0
- package/dist/code-generation/integration-package/integration-package-definition/configurations-module.d.ts +10 -0
- package/dist/code-generation/integration-package/integration-package-definition/entities-module.d.ts +10 -0
- package/dist/code-generation/integration-package/integration-package-definition/events-module.d.ts +10 -0
- package/dist/code-generation/integration-package/integration-package-definition/index.d.ts +8 -0
- package/dist/code-generation/integration-package/integration-package-definition/interfaces-module.d.ts +10 -0
- package/dist/code-generation/integration-package/integration-package-definition/states-module.d.ts +10 -0
- package/dist/code-generation/integration-package/integration-package-definition/typings.d.ts +10 -0
- package/dist/code-generation/interface-implementation/index.d.ts +4 -0
- package/dist/code-generation/interface-implementation/integration-typings/actions-module.d.ts +21 -0
- package/dist/code-generation/interface-implementation/integration-typings/channels-module.d.ts +5 -0
- package/dist/code-generation/interface-implementation/integration-typings/entities-module.d.ts +10 -0
- package/dist/code-generation/interface-implementation/integration-typings/events-module.d.ts +10 -0
- package/dist/code-generation/interface-implementation/integration-typings/index.d.ts +8 -0
- package/dist/code-generation/interface-package/index.d.ts +2 -0
- package/dist/code-generation/interface-package/interface-package-definition/actions-module.d.ts +21 -0
- package/dist/code-generation/interface-package/interface-package-definition/channels-module.d.ts +5 -0
- package/dist/code-generation/interface-package/interface-package-definition/entities-module.d.ts +10 -0
- package/dist/code-generation/interface-package/interface-package-definition/events-module.d.ts +10 -0
- package/dist/code-generation/interface-package/interface-package-definition/index.d.ts +8 -0
- package/dist/code-generation/interface-package/interface-package-definition/typings.d.ts +7 -0
- package/dist/code-generation/module.d.ts +49 -0
- package/dist/code-generation/plugin-implementation/index.d.ts +3 -0
- package/dist/code-generation/plugin-implementation/plugin-implementation.d.ts +7 -0
- package/dist/code-generation/plugin-implementation/plugin-typings/actions-module.d.ts +21 -0
- package/dist/code-generation/plugin-implementation/plugin-typings/configuration-module.d.ts +7 -0
- package/dist/code-generation/plugin-implementation/plugin-typings/events-module.d.ts +10 -0
- package/dist/code-generation/plugin-implementation/plugin-typings/index.d.ts +8 -0
- package/dist/code-generation/plugin-implementation/plugin-typings/states-module.d.ts +17 -0
- package/dist/code-generation/plugin-implementation/plugin-typings/tables-module.d.ts +10 -0
- package/dist/code-generation/plugin-implementation/plugin-typings/workflows-module.d.ts +27 -0
- package/dist/code-generation/plugin-package/index.d.ts +2 -0
- package/dist/code-generation/plugin-package/plugin-package-definition/actions-module.d.ts +21 -0
- package/dist/code-generation/plugin-package/plugin-package-definition/configuration-module.d.ts +7 -0
- package/dist/code-generation/plugin-package/plugin-package-definition/events-module.d.ts +10 -0
- package/dist/code-generation/plugin-package/plugin-package-definition/index.d.ts +8 -0
- package/dist/code-generation/plugin-package/plugin-package-definition/interfaces-module.d.ts +7 -0
- package/dist/code-generation/plugin-package/plugin-package-definition/recurring-events-module.d.ts +5 -0
- package/dist/code-generation/plugin-package/plugin-package-definition/states-module.d.ts +10 -0
- package/dist/code-generation/plugin-package/plugin-package-definition/typings.d.ts +7 -0
- package/dist/code-generation/strings.d.ts +4 -0
- package/dist/code-generation/typings.d.ts +162 -0
- package/dist/code-generation/typings.test.d.ts +1 -0
- package/dist/command-definitions.d.ts +1480 -0
- package/dist/command-implementations/add-command.d.ts +15 -0
- package/dist/command-implementations/add-command.js +3 -2
- package/dist/command-implementations/add-command.js.map +2 -2
- package/dist/command-implementations/base-command.d.ts +13 -0
- package/dist/command-implementations/bot-commands.d.ts +20 -0
- package/dist/command-implementations/build-command.d.ts +9 -0
- package/dist/command-implementations/build-command.js +2 -4
- package/dist/command-implementations/build-command.js.map +2 -2
- package/dist/command-implementations/bundle-command.d.ts +10 -0
- package/dist/command-implementations/bundle-command.js +6 -5
- package/dist/command-implementations/bundle-command.js.map +2 -2
- package/dist/command-implementations/chat-command.d.ts +13 -0
- package/dist/command-implementations/deploy-command.d.ts +18 -0
- package/dist/command-implementations/deploy-command.js +9 -5
- package/dist/command-implementations/deploy-command.js.map +2 -2
- package/dist/command-implementations/dev-command.d.ts +21 -0
- package/dist/command-implementations/dev-command.js +9 -6
- package/dist/command-implementations/dev-command.js.map +2 -2
- package/dist/command-implementations/gen-command.d.ts +11 -0
- package/dist/command-implementations/gen-command.js +8 -5
- package/dist/command-implementations/gen-command.js.map +2 -2
- package/dist/command-implementations/global-command.d.ts +57 -0
- package/dist/command-implementations/index.d.ts +1534 -0
- package/dist/command-implementations/init-command.d.ts +17 -0
- package/dist/command-implementations/integration-commands.d.ts +15 -0
- package/dist/command-implementations/interface-commands.d.ts +14 -0
- package/dist/command-implementations/lint-command.d.ts +15 -0
- package/dist/command-implementations/lint-command.js +15 -8
- package/dist/command-implementations/lint-command.js.map +3 -3
- package/dist/command-implementations/login-command.d.ts +6 -0
- package/dist/command-implementations/logout-command.d.ts +6 -0
- package/dist/command-implementations/plugin-commands.d.ts +14 -0
- package/dist/command-implementations/profile-commands.d.ts +14 -0
- package/dist/command-implementations/project-command.d.ts +94 -0
- package/dist/command-implementations/project-command.js +54 -18
- package/dist/command-implementations/project-command.js.map +2 -2
- package/dist/command-implementations/read-command.d.ts +10 -0
- package/dist/command-implementations/read-command.js +9 -5
- package/dist/command-implementations/read-command.js.map +2 -2
- package/dist/command-implementations/serve-command.d.ts +6 -0
- package/dist/command-implementations/serve-command.js +5 -4
- package/dist/command-implementations/serve-command.js.map +2 -2
- package/dist/command-tree.d.ts +39 -0
- package/dist/config.d.ts +1441 -0
- package/dist/consts.d.ts +41 -0
- package/dist/errors.d.ts +56 -0
- package/dist/index.d.ts +1524 -0
- package/dist/index.js +50 -25
- package/dist/index.js.map +3 -3
- package/dist/init.d.ts +1 -0
- package/dist/linter/base-linter.d.ts +21 -0
- package/dist/linter/base-linter.test.d.ts +1 -0
- package/dist/linter/bot-linter.d.ts +5 -0
- package/dist/linter/integration-linter.d.ts +7 -0
- package/dist/linter/interface-linter.d.ts +5 -0
- package/dist/linter/ruleset-tests/bot.ruleset.test.d.ts +1 -0
- package/dist/linter/ruleset-tests/common.d.ts +9 -0
- package/dist/linter/ruleset-tests/integration.ruleset.test.d.ts +1 -0
- package/dist/linter/ruleset-tests/interface.ruleset.test.d.ts +1 -0
- package/dist/linter/rulesets/bot.ruleset.d.ts +165 -0
- package/dist/linter/rulesets/integration.ruleset.d.ts +390 -0
- package/dist/linter/rulesets/interface.ruleset.d.ts +141 -0
- package/dist/linter/spectral-functions.d.ts +11 -0
- package/dist/logger/base-logger.d.ts +43 -0
- package/dist/logger/index.d.ts +22 -0
- package/dist/logger/logger.test.d.ts +1 -0
- package/dist/package-ref.d.ts +22 -0
- package/dist/package-ref.test.d.ts +1 -0
- package/dist/project-templates.d.ts +42 -0
- package/dist/register-yargs.d.ts +4 -0
- package/dist/root.d.ts +7 -0
- package/dist/sdk/index.d.ts +2 -0
- package/dist/sdk/validate-bot.d.ts +2 -0
- package/dist/sdk/validate-bot.test.d.ts +1 -0
- package/dist/sdk/validate-integration.d.ts +2 -0
- package/dist/tables/index.d.ts +1 -0
- package/dist/tables/schemas.d.ts +1259 -0
- package/dist/tables/tables-publisher.d.ts +22 -0
- package/dist/typings.d.ts +27 -0
- package/dist/utils/attribute-utils.d.ts +10 -0
- package/dist/utils/cache-utils.d.ts +14 -0
- package/dist/utils/case-utils.d.ts +14 -0
- package/dist/utils/case-utils.test.d.ts +1 -0
- package/dist/utils/concurrency-utils.d.ts +1 -0
- package/dist/utils/concurrency-utils.test.d.ts +1 -0
- package/dist/utils/esbuild-utils.d.ts +29 -0
- package/dist/utils/event-emitter.d.ts +7 -0
- package/dist/utils/file-watcher.d.ts +17 -0
- package/dist/utils/guard-utils.d.ts +4 -0
- package/dist/utils/id-utils.d.ts +2 -0
- package/dist/utils/index.d.ts +22 -0
- package/dist/utils/object-utils.d.ts +1 -0
- package/dist/utils/path-utils.d.ts +28 -0
- package/dist/utils/path-utils.test.d.ts +1 -0
- package/dist/utils/pkgjson-utils.d.ts +17 -0
- package/dist/utils/promise-utils.d.ts +2 -0
- package/dist/utils/promise-utils.test.d.ts +1 -0
- package/dist/utils/prompt-utils.d.ts +33 -0
- package/dist/utils/record-utils.d.ts +8 -0
- package/dist/utils/record-utils.test.d.ts +1 -0
- package/dist/utils/require-utils.d.ts +2 -0
- package/dist/utils/require-utils.test.d.ts +1 -0
- package/dist/utils/schema-utils.d.ts +13 -0
- package/dist/utils/schema-utils.test.d.ts +1 -0
- package/dist/utils/semver-utils.d.ts +8 -0
- package/dist/utils/string-utils.d.ts +2 -0
- package/dist/utils/template-utils.d.ts +1 -0
- package/dist/utils/tunnel-utils.d.ts +49 -0
- package/dist/utils/type-utils.d.ts +19 -0
- package/dist/utils/url-utils.d.ts +19 -0
- package/dist/worker/child-entrypoint.d.ts +1 -0
- package/dist/worker/child-wrapper.d.ts +18 -0
- package/dist/worker/config.d.ts +28 -0
- package/dist/worker/index.d.ts +2 -0
- package/dist/worker/is-child.d.ts +14 -0
- package/dist/worker/worker-state.d.ts +30 -0
- package/dist/worker/worker.d.ts +20 -0
- package/package.json +6 -4
- package/tsconfig.build.json +14 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,19 +1,26 @@
|
|
|
1
1
|
|
|
2
|
-
> @botpress/cli@4.17.
|
|
3
|
-
> pnpm run bundle && pnpm run template:gen
|
|
2
|
+
> @botpress/cli@4.17.16 build /home/runner/work/botpress/botpress/packages/cli
|
|
3
|
+
> pnpm run build:types && pnpm run bundle && pnpm run template:gen
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @botpress/cli@4.17.
|
|
6
|
+
> @botpress/cli@4.17.16 build:types /home/runner/work/botpress/botpress/packages/cli
|
|
7
|
+
> tsc -p ./tsconfig.build.json
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
> @botpress/cli@4.17.16 bundle /home/runner/work/botpress/botpress/packages/cli
|
|
7
11
|
> ts-node -T build.ts
|
|
8
12
|
|
|
9
13
|
|
|
10
|
-
> @botpress/cli@4.17.
|
|
14
|
+
> @botpress/cli@4.17.16 template:gen /home/runner/work/botpress/botpress/packages/cli
|
|
11
15
|
> pnpm -r --stream -F @bp-templates/* exec bp gen
|
|
12
16
|
|
|
13
|
-
🤖 Botpress CLI v4.17.
|
|
14
|
-
🤖 Botpress CLI v4.17.
|
|
15
|
-
🤖 Botpress CLI v4.17.
|
|
16
|
-
🤖 Botpress CLI v4.17.
|
|
17
|
+
🤖 Botpress CLI v4.17.16
|
|
18
|
+
🤖 Botpress CLI v4.17.16
|
|
19
|
+
🤖 Botpress CLI v4.17.16
|
|
20
|
+
🤖 Botpress CLI v4.17.16
|
|
21
|
+
○ Generating typings for plugin empty-plugin...
|
|
22
|
+
✓ Typings available at .botpress
|
|
23
|
+
|
|
17
24
|
○ Generating typings for bot...
|
|
18
25
|
○ Generating typings for integration empty-integration...
|
|
19
26
|
✓ Typings available at .botpress
|
|
@@ -21,12 +28,9 @@
|
|
|
21
28
|
✓ Typings available at .botpress
|
|
22
29
|
|
|
23
30
|
○ Generating typings for integration hello-world...
|
|
24
|
-
○ Generating typings for plugin empty-plugin...
|
|
25
|
-
✓ Typings available at .botpress
|
|
26
|
-
|
|
27
31
|
✓ Typings available at .botpress
|
|
28
32
|
|
|
29
|
-
🤖 Botpress CLI v4.17.
|
|
33
|
+
🤖 Botpress CLI v4.17.16
|
|
30
34
|
○ Generating typings for integration webhook-message...
|
|
31
35
|
✓ Typings available at .botpress
|
|
32
36
|
|
package/bin.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
require("./dist/
|
|
2
|
+
require("./dist/cli.js");
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as client from '@botpress/client';
|
|
2
|
+
import * as sdk from '@botpress/sdk';
|
|
3
|
+
import * as types from './types';
|
|
4
|
+
export declare const prepareCreateBotBody: (bot: sdk.BotDefinition) => Promise<types.CreateBotRequestBody>;
|
|
5
|
+
export declare const prepareUpdateBotBody: (localBot: types.UpdateBotRequestBody, remoteBot: client.Bot) => types.UpdateBotRequestBody;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as client from '@botpress/client';
|
|
2
|
+
import type { Logger } from '../logger';
|
|
3
|
+
import { ApiPackageRef, NamePackageRef } from '../package-ref';
|
|
4
|
+
import * as utils from '../utils';
|
|
5
|
+
import * as paging from './paging';
|
|
6
|
+
import { ApiClientProps, PublicOrUnlistedIntegration, PrivateIntegration, PublicOrPrivateIntegration, PublicInterface, PrivateInterface, PublicOrPrivateInterface, PrivatePlugin, PublicPlugin, PublicOrPrivatePlugin, BotSummary } from './types';
|
|
7
|
+
export * from './types';
|
|
8
|
+
/**
|
|
9
|
+
* This class is used to wrap the Botpress API and provide a more convenient way to interact with it.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ApiClient {
|
|
12
|
+
private _logger;
|
|
13
|
+
readonly client: client.Client;
|
|
14
|
+
readonly url: string;
|
|
15
|
+
readonly token: string;
|
|
16
|
+
readonly workspaceId: string;
|
|
17
|
+
readonly botId?: string;
|
|
18
|
+
static newClient: (props: ApiClientProps, logger: Logger) => ApiClient;
|
|
19
|
+
constructor(props: ApiClientProps, _logger: Logger);
|
|
20
|
+
get isBotpressWorkspace(): boolean;
|
|
21
|
+
safeListTables(req: client.ClientInputs['listTables']): Promise<{
|
|
22
|
+
success: true;
|
|
23
|
+
tables: client.ClientOutputs['listTables']['tables'];
|
|
24
|
+
} | {
|
|
25
|
+
success: false;
|
|
26
|
+
error: Error;
|
|
27
|
+
}>;
|
|
28
|
+
getWorkspace(): Promise<client.ClientOutputs['getWorkspace']>;
|
|
29
|
+
findWorkspaceByHandle(handle: string): Promise<client.ClientOutputs['getWorkspace'] | undefined>;
|
|
30
|
+
switchWorkspace(workspaceId: string): ApiClient;
|
|
31
|
+
switchBot(botId: string): ApiClient;
|
|
32
|
+
updateWorkspace(props: utils.types.SafeOmit<client.ClientInputs['updateWorkspace'], 'id'>): Promise<client.ClientOutputs['updateWorkspace']>;
|
|
33
|
+
getPublicOrPrivateIntegration(ref: ApiPackageRef): Promise<PublicOrPrivateIntegration>;
|
|
34
|
+
findPublicOrPrivateIntegration(ref: ApiPackageRef): Promise<PublicOrPrivateIntegration | undefined>;
|
|
35
|
+
findPrivateIntegration(ref: ApiPackageRef): Promise<PrivateIntegration | undefined>;
|
|
36
|
+
findPublicIntegration(ref: ApiPackageRef): Promise<PublicOrUnlistedIntegration | undefined>;
|
|
37
|
+
findPublicOrPrivateInterface(ref: ApiPackageRef): Promise<PublicOrPrivateInterface | undefined>;
|
|
38
|
+
findPrivateInterface(ref: ApiPackageRef): Promise<PrivateInterface | undefined>;
|
|
39
|
+
getPublicInterface(ref: ApiPackageRef): Promise<PublicInterface>;
|
|
40
|
+
findPublicInterface(ref: ApiPackageRef): Promise<PublicInterface | undefined>;
|
|
41
|
+
findPublicPlugin(ref: ApiPackageRef): Promise<PublicPlugin | undefined>;
|
|
42
|
+
getPublicOrPrivatePlugin(ref: ApiPackageRef): Promise<PublicOrPrivatePlugin>;
|
|
43
|
+
findPublicOrPrivatePlugin(ref: ApiPackageRef): Promise<PublicOrPrivatePlugin | undefined>;
|
|
44
|
+
findPrivatePlugin(ref: ApiPackageRef): Promise<PrivatePlugin | undefined>;
|
|
45
|
+
testLogin(): Promise<void>;
|
|
46
|
+
listAllPages: typeof paging.listAllPages;
|
|
47
|
+
findPreviousIntegrationVersion(ref: NamePackageRef): Promise<PublicOrPrivateIntegration | undefined>;
|
|
48
|
+
findBotByName(name: string): Promise<BotSummary | undefined>;
|
|
49
|
+
private _returnUndefinedOnError;
|
|
50
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as client from '@botpress/client';
|
|
2
|
+
import * as sdk from '@botpress/sdk';
|
|
3
|
+
import * as types from './types';
|
|
4
|
+
export declare const prepareCreateIntegrationBody: (integration: sdk.IntegrationDefinition | sdk.IntegrationPackage["definition"]) => Promise<types.CreateIntegrationRequestBody>;
|
|
5
|
+
export declare const prepareUpdateIntegrationBody: (localIntegration: types.UpdateIntegrationRequestBody, remoteIntegration: client.Integration) => types.UpdateIntegrationRequestBody;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as client from '@botpress/client';
|
|
2
|
+
import * as sdk from '@botpress/sdk';
|
|
3
|
+
import * as types from './types';
|
|
4
|
+
export declare const prepareCreateInterfaceBody: (intrface: sdk.InterfaceDefinition | sdk.InterfacePackage["definition"]) => Promise<types.CreateInterfaceRequestBody>;
|
|
5
|
+
export declare const prepareUpdateInterfaceBody: (localInterface: types.CreateInterfaceRequestBody & {
|
|
6
|
+
id: string;
|
|
7
|
+
}, remoteInterface: client.Interface) => types.UpdateInterfaceRequestBody;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type PageLister<R extends object> = (t: {
|
|
2
|
+
nextToken?: string;
|
|
3
|
+
}) => Promise<R & {
|
|
4
|
+
meta: {
|
|
5
|
+
nextToken?: string;
|
|
6
|
+
};
|
|
7
|
+
}>;
|
|
8
|
+
export declare function listAllPages<R extends object>(lister: PageLister<R>): Promise<R[]>;
|
|
9
|
+
export declare function listAllPages<R extends object, M>(lister: PageLister<R>, mapper?: (r: R) => M[]): Promise<M[]>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as client from '@botpress/client';
|
|
2
|
+
import * as sdk from '@botpress/sdk';
|
|
3
|
+
import * as types from './types';
|
|
4
|
+
export declare const prepareCreatePluginBody: (plugin: sdk.PluginDefinition | sdk.PluginPackage["definition"]) => Promise<types.CreatePluginRequestBody>;
|
|
5
|
+
export declare const prepareUpdatePluginBody: (localPlugin: types.UpdatePluginRequestBody, remotePlugin: client.Plugin) => types.UpdatePluginRequestBody;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import * as client from '@botpress/client';
|
|
2
|
+
import { Logger } from '../logger';
|
|
3
|
+
import { SafeOmit, Merge } from '../utils/type-utils';
|
|
4
|
+
import { ApiClient } from './client';
|
|
5
|
+
export type ApiClientProps = {
|
|
6
|
+
apiUrl: string;
|
|
7
|
+
token: string;
|
|
8
|
+
workspaceId: string;
|
|
9
|
+
botId?: string;
|
|
10
|
+
};
|
|
11
|
+
export type ApiClientFactory = {
|
|
12
|
+
newClient: (props: ApiClientProps, logger: Logger) => ApiClient;
|
|
13
|
+
};
|
|
14
|
+
export type PublicOrUnlistedIntegration = client.Integration & {
|
|
15
|
+
visibility: 'public' | 'unlisted';
|
|
16
|
+
};
|
|
17
|
+
export type PrivateIntegration = client.Integration & {
|
|
18
|
+
workspaceId: string;
|
|
19
|
+
};
|
|
20
|
+
export type PublicOrPrivateIntegration = client.Integration & {
|
|
21
|
+
workspaceId?: string;
|
|
22
|
+
};
|
|
23
|
+
export type IntegrationSummary = client.ClientOutputs['listIntegrations']['integrations'][number];
|
|
24
|
+
export type BotSummary = client.ClientOutputs['listBots']['bots'][number];
|
|
25
|
+
export type PublicInterface = client.Interface & {
|
|
26
|
+
public: true;
|
|
27
|
+
};
|
|
28
|
+
export type PrivateInterface = client.Interface & {
|
|
29
|
+
workspaceId: string;
|
|
30
|
+
};
|
|
31
|
+
export type PublicOrPrivateInterface = client.Interface & {
|
|
32
|
+
workspaceId?: string;
|
|
33
|
+
};
|
|
34
|
+
export type PublicPlugin = client.Plugin & {
|
|
35
|
+
public: true;
|
|
36
|
+
};
|
|
37
|
+
export type PrivatePlugin = client.Plugin & {
|
|
38
|
+
workspaceId: string;
|
|
39
|
+
};
|
|
40
|
+
export type PublicOrPrivatePlugin = client.Plugin & {
|
|
41
|
+
workspaceId?: string;
|
|
42
|
+
};
|
|
43
|
+
export type CreateBotRequestBody = client.ClientInputs['createBot'];
|
|
44
|
+
export type UpdateBotRequestBody = client.ClientInputs['updateBot'];
|
|
45
|
+
export type CreateIntegrationRequestBody = client.ClientInputs['createIntegration'];
|
|
46
|
+
export type UpdateIntegrationRequestBody = client.ClientInputs['updateIntegration'];
|
|
47
|
+
export type CreateInterfaceRequestBody = client.ClientInputs['createInterface'];
|
|
48
|
+
export type UpdateInterfaceRequestBody = client.ClientInputs['updateInterface'];
|
|
49
|
+
type PluginDependency = client.Plugin['dependencies']['integrations'][string];
|
|
50
|
+
export type CreatePluginRequestBody = Merge<SafeOmit<client.ClientInputs['createPlugin'], 'code'>, {
|
|
51
|
+
dependencies?: {
|
|
52
|
+
integrations?: Record<string, PluginDependency>;
|
|
53
|
+
interfaces?: Record<string, PluginDependency>;
|
|
54
|
+
};
|
|
55
|
+
}>;
|
|
56
|
+
export type UpdatePluginRequestBody = Merge<client.ClientInputs['updatePlugin'], {
|
|
57
|
+
dependencies?: {
|
|
58
|
+
integrations?: Record<string, PluginDependency | null>;
|
|
59
|
+
interfaces?: Record<string, PluginDependency | null>;
|
|
60
|
+
};
|
|
61
|
+
}>;
|
|
62
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as chat from '@botpress/chat';
|
|
2
|
+
export type ChatProps = {
|
|
3
|
+
client: chat.AuthenticatedClient;
|
|
4
|
+
conversationId: string;
|
|
5
|
+
};
|
|
6
|
+
export declare class Chat {
|
|
7
|
+
private _props;
|
|
8
|
+
private _events;
|
|
9
|
+
private _state;
|
|
10
|
+
static launch(props: ChatProps): Chat;
|
|
11
|
+
private constructor();
|
|
12
|
+
private _run;
|
|
13
|
+
private _setState;
|
|
14
|
+
private _onMessageReceived;
|
|
15
|
+
private _onKeyboardInput;
|
|
16
|
+
private _onExit;
|
|
17
|
+
wait(): Promise<void>;
|
|
18
|
+
private _renderMessages;
|
|
19
|
+
private _printHeader;
|
|
20
|
+
private _switchAlternateScreenBuffer;
|
|
21
|
+
private _restoreOriginalScreenBuffer;
|
|
22
|
+
private _clearStdOut;
|
|
23
|
+
private _messageToText;
|
|
24
|
+
private _textToMessage;
|
|
25
|
+
}
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import 'dotenv/config';
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var import_config = require("dotenv/config");
|
|
25
|
+
var import_yargs_extra = __toESM(require("@bpinternal/yargs-extra"));
|
|
26
|
+
var import_command_definitions = __toESM(require("./command-definitions"));
|
|
27
|
+
var import_command_implementations = __toESM(require("./command-implementations"));
|
|
28
|
+
var tree = __toESM(require("./command-tree"));
|
|
29
|
+
var errors = __toESM(require("./errors"));
|
|
30
|
+
var import_logger = require("./logger");
|
|
31
|
+
var import_register_yargs = require("./register-yargs");
|
|
32
|
+
const logError = (thrown) => {
|
|
33
|
+
const error = errors.BotpressCLIError.map(thrown);
|
|
34
|
+
new import_logger.Logger().error(error.message);
|
|
35
|
+
};
|
|
36
|
+
const onError = (thrown) => {
|
|
37
|
+
logError(thrown);
|
|
38
|
+
process.exit(1);
|
|
39
|
+
};
|
|
40
|
+
const yargsFail = (msg) => {
|
|
41
|
+
logError(`${msg}
|
|
42
|
+
`);
|
|
43
|
+
import_yargs_extra.default.showHelp();
|
|
44
|
+
process.exit(1);
|
|
45
|
+
};
|
|
46
|
+
process.on("uncaughtException", (thrown) => onError(thrown));
|
|
47
|
+
process.on("unhandledRejection", (thrown) => onError(thrown));
|
|
48
|
+
const commands = tree.zipTree(import_command_definitions.default, import_command_implementations.default);
|
|
49
|
+
(0, import_register_yargs.registerYargs)(import_yargs_extra.default, commands);
|
|
50
|
+
void import_yargs_extra.default.version().scriptName("bp").demandCommand(1, "You didn't provide any command. Use the --help flag to see the list of available commands.").recommendCommands().strict().help().fail(yargsFail).parse();
|
|
51
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/cli.ts"],
|
|
4
|
+
"sourcesContent": ["import 'dotenv/config'\nimport yargs from '@bpinternal/yargs-extra'\nimport commandDefinitions from './command-definitions'\nimport commandImplementations from './command-implementations'\nimport * as tree from './command-tree'\nimport * as errors from './errors'\nimport { Logger } from './logger'\nimport { registerYargs } from './register-yargs'\n\nconst logError = (thrown: unknown) => {\n const error = errors.BotpressCLIError.map(thrown)\n new Logger().error(error.message)\n}\n\nconst onError = (thrown: unknown) => {\n logError(thrown)\n process.exit(1)\n}\n\nconst yargsFail = (msg: string) => {\n logError(`${msg}\\n`)\n yargs.showHelp()\n process.exit(1)\n}\n\nprocess.on('uncaughtException', (thrown: unknown) => onError(thrown))\nprocess.on('unhandledRejection', (thrown: unknown) => onError(thrown))\n\nconst commands = tree.zipTree(commandDefinitions, commandImplementations)\n\nregisterYargs(yargs, commands)\n\nvoid yargs\n .version()\n .scriptName('bp')\n .demandCommand(1, \"You didn't provide any command. Use the --help flag to see the list of available commands.\")\n .recommendCommands()\n .strict()\n .help()\n .fail(yargsFail)\n .parse()\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,oBAAO;AACP,yBAAkB;AAClB,iCAA+B;AAC/B,qCAAmC;AACnC,WAAsB;AACtB,aAAwB;AACxB,oBAAuB;AACvB,4BAA8B;AAE9B,MAAM,WAAW,CAAC,WAAoB;AACpC,QAAM,QAAQ,OAAO,iBAAiB,IAAI,MAAM;AAChD,MAAI,qBAAO,EAAE,MAAM,MAAM,OAAO;AAClC;AAEA,MAAM,UAAU,CAAC,WAAoB;AACnC,WAAS,MAAM;AACf,UAAQ,KAAK,CAAC;AAChB;AAEA,MAAM,YAAY,CAAC,QAAgB;AACjC,WAAS,GAAG,GAAG;AAAA,CAAI;AACnB,qBAAAA,QAAM,SAAS;AACf,UAAQ,KAAK,CAAC;AAChB;AAEA,QAAQ,GAAG,qBAAqB,CAAC,WAAoB,QAAQ,MAAM,CAAC;AACpE,QAAQ,GAAG,sBAAsB,CAAC,WAAoB,QAAQ,MAAM,CAAC;AAErE,MAAM,WAAW,KAAK,QAAQ,2BAAAC,SAAoB,+BAAAC,OAAsB;AAAA,IAExE,qCAAc,mBAAAF,SAAO,QAAQ;AAE7B,KAAK,mBAAAA,QACF,QAAQ,EACR,WAAW,IAAI,EACf,cAAc,GAAG,4FAA4F,EAC7G,kBAAkB,EAClB,OAAO,EACP,KAAK,EACL,KAAK,SAAS,EACd,MAAM;",
|
|
6
|
+
"names": ["yargs", "commandDefinitions", "commandImplementations"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as sdk from '@botpress/sdk';
|
|
2
|
+
import { Module } from '../module';
|
|
3
|
+
export declare class BotImplementationModule extends Module {
|
|
4
|
+
private _typingsModule;
|
|
5
|
+
private _pluginsModule;
|
|
6
|
+
constructor(bot: sdk.BotDefinition);
|
|
7
|
+
getContent(): Promise<string>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as sdk from '@botpress/sdk';
|
|
2
|
+
import { Module } from '../../module';
|
|
3
|
+
type PluginInstance = NonNullable<sdk.BotDefinition['plugins']>[string];
|
|
4
|
+
export declare class BotPluginModule extends Module {
|
|
5
|
+
private _typingsModule;
|
|
6
|
+
private _bundleJsModule;
|
|
7
|
+
private _bundleDtsModule;
|
|
8
|
+
private _configModule;
|
|
9
|
+
readonly pluginKey: string;
|
|
10
|
+
constructor(plugin: PluginInstance);
|
|
11
|
+
getContent(): Promise<string>;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as sdk from '@botpress/sdk';
|
|
2
|
+
import { Module, ReExportTypeModule } from '../../module';
|
|
3
|
+
type ActionInput = sdk.BotActionDefinition['input'];
|
|
4
|
+
type ActionOutput = sdk.BotActionDefinition['output'];
|
|
5
|
+
export declare class ActionInputModule extends Module {
|
|
6
|
+
private _input;
|
|
7
|
+
constructor(_input: ActionInput);
|
|
8
|
+
getContent(): Promise<string>;
|
|
9
|
+
}
|
|
10
|
+
export declare class ActionOutputModule extends Module {
|
|
11
|
+
private _output;
|
|
12
|
+
constructor(_output: ActionOutput);
|
|
13
|
+
getContent(): Promise<string>;
|
|
14
|
+
}
|
|
15
|
+
export declare class ActionModule extends ReExportTypeModule {
|
|
16
|
+
constructor(actionName: string, action: sdk.BotActionDefinition);
|
|
17
|
+
}
|
|
18
|
+
export declare class ActionsModule extends ReExportTypeModule {
|
|
19
|
+
constructor(actions: Record<string, sdk.BotActionDefinition>);
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as sdk from '@botpress/sdk';
|
|
2
|
+
import { Module, ReExportTypeModule } from '../../module';
|
|
3
|
+
export declare class EventModule extends Module {
|
|
4
|
+
private _event;
|
|
5
|
+
constructor(name: string, _event: sdk.BotEventDefinition);
|
|
6
|
+
getContent(): Promise<string>;
|
|
7
|
+
}
|
|
8
|
+
export declare class EventsModule extends ReExportTypeModule {
|
|
9
|
+
constructor(events: Record<string, sdk.BotEventDefinition>);
|
|
10
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as sdk from '@botpress/sdk';
|
|
2
|
+
import { Module, ReExportTypeModule } from '../../module';
|
|
3
|
+
export declare class StatePayloadModule extends Module {
|
|
4
|
+
private _state;
|
|
5
|
+
constructor(_state: sdk.BotStateDefinition);
|
|
6
|
+
getContent(): Promise<string>;
|
|
7
|
+
}
|
|
8
|
+
export declare class StateModule extends Module {
|
|
9
|
+
private _name;
|
|
10
|
+
private _state;
|
|
11
|
+
private _payloadModule;
|
|
12
|
+
constructor(_name: string, _state: sdk.BotStateDefinition);
|
|
13
|
+
getContent(): Promise<string>;
|
|
14
|
+
}
|
|
15
|
+
export declare class StatesModule extends ReExportTypeModule {
|
|
16
|
+
constructor(states: Record<string, sdk.BotStateDefinition>);
|
|
17
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as sdk from '@botpress/sdk';
|
|
2
|
+
import { Module, ReExportTypeModule } from '../../module';
|
|
3
|
+
export declare class TableModule extends Module {
|
|
4
|
+
private _table;
|
|
5
|
+
constructor(name: string, _table: sdk.BotTableDefinition);
|
|
6
|
+
getContent(): Promise<string>;
|
|
7
|
+
}
|
|
8
|
+
export declare class TablesModule extends ReExportTypeModule {
|
|
9
|
+
constructor(tables: Record<string, sdk.BotTableDefinition>);
|
|
10
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as sdk from '@botpress/sdk';
|
|
2
|
+
import { Module, ReExportTypeModule } from '../../module';
|
|
3
|
+
type WorkflowInput = sdk.BotWorkflowDefinition['input'];
|
|
4
|
+
type WorkflowOutput = sdk.BotWorkflowDefinition['output'];
|
|
5
|
+
type WorkflowTags = sdk.BotWorkflowDefinition['tags'];
|
|
6
|
+
export declare class WorkflowInputModule extends Module {
|
|
7
|
+
private _input;
|
|
8
|
+
constructor(_input: WorkflowInput);
|
|
9
|
+
getContent(): Promise<string>;
|
|
10
|
+
}
|
|
11
|
+
export declare class WorkflowOutputModule extends Module {
|
|
12
|
+
private _output;
|
|
13
|
+
constructor(_output: WorkflowOutput);
|
|
14
|
+
getContent(): Promise<string>;
|
|
15
|
+
}
|
|
16
|
+
export declare class WorkflowTagsModule extends Module {
|
|
17
|
+
private _tags;
|
|
18
|
+
constructor(_tags: WorkflowTags);
|
|
19
|
+
getContent(): Promise<string>;
|
|
20
|
+
}
|
|
21
|
+
export declare class WorkflowModule extends ReExportTypeModule {
|
|
22
|
+
constructor(workflowName: string, workflow: sdk.BotWorkflowDefinition);
|
|
23
|
+
}
|
|
24
|
+
export declare class WorkflowsModule extends ReExportTypeModule {
|
|
25
|
+
constructor(workflows: Record<string, sdk.BotWorkflowDefinition>);
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as sdk from '@botpress/sdk';
|
|
2
|
+
import { JSONSchema7 } from 'json-schema';
|
|
3
|
+
export type Primitive = string | number | boolean | null | undefined;
|
|
4
|
+
export declare const zuiSchemaToTypeScriptType: (zuiSchema: sdk.z.Schema, name: string) => Promise<string>;
|
|
5
|
+
export declare const jsonSchemaToTypescriptZuiSchema: (schema: JSONSchema7, name: string, extraProps?: Record<string, string>) => Promise<string>;
|
|
6
|
+
export declare const stringifySingleLine: (x: object) => string;
|
|
7
|
+
export declare function primitiveToTypescriptValue(x: Primitive): string;
|
|
8
|
+
export declare function primitiveRecordToTypescriptValues(x: Record<string, Primitive>): Record<string, string>;
|
|
9
|
+
export declare const primitiveRecordToRecordString: (record: Record<string, Primitive>) => string;
|
|
10
|
+
export declare const typescriptValuesToRecordString: (record: Record<string, string>) => string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './typings';
|
|
2
|
+
export { secretEnvVariableName } from './integration-implementation/integration-secret';
|
|
3
|
+
export { generateBotImplementation } from './bot-implementation';
|
|
4
|
+
export { generateIntegrationImplementation } from './integration-implementation';
|
|
5
|
+
export { generatePluginImplementation } from './plugin-implementation';
|
|
6
|
+
export { generateIntegrationPackage } from './integration-package';
|
|
7
|
+
export { generateInterfacePackage } from './interface-package';
|
|
8
|
+
export { generatePluginPackage } from './plugin-package';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IntegrationDefinition } from '@botpress/sdk';
|
|
2
|
+
import { Module } from '../module';
|
|
3
|
+
export declare const secretEnvVariableName: (secretName: string) => string;
|
|
4
|
+
export declare class IntegrationSecretIndexModule extends Module {
|
|
5
|
+
private _integration;
|
|
6
|
+
constructor(_integration: IntegrationDefinition);
|
|
7
|
+
getContent(): Promise<string>;
|
|
8
|
+
}
|
package/dist/code-generation/integration-implementation/integration-typings/actions-module.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as sdk from '@botpress/sdk';
|
|
2
|
+
import { Module, ReExportTypeModule } from '../../module';
|
|
3
|
+
type ActionInput = sdk.ActionDefinition['input'];
|
|
4
|
+
type ActionOutput = sdk.ActionDefinition['output'];
|
|
5
|
+
export declare class ActionInputModule extends Module {
|
|
6
|
+
private _input;
|
|
7
|
+
constructor(_input: ActionInput);
|
|
8
|
+
getContent(): Promise<string>;
|
|
9
|
+
}
|
|
10
|
+
export declare class ActionOutputModule extends Module {
|
|
11
|
+
private _output;
|
|
12
|
+
constructor(_output: ActionOutput);
|
|
13
|
+
getContent(): Promise<string>;
|
|
14
|
+
}
|
|
15
|
+
export declare class ActionModule extends ReExportTypeModule {
|
|
16
|
+
constructor(actionName: string, action: sdk.ActionDefinition);
|
|
17
|
+
}
|
|
18
|
+
export declare class ActionsModule extends ReExportTypeModule {
|
|
19
|
+
constructor(actions: Record<string, sdk.ActionDefinition>);
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as sdk from '@botpress/sdk';
|
|
2
|
+
import { Module } from '../../module';
|
|
3
|
+
export declare class DefaultConfigurationModule extends Module {
|
|
4
|
+
private _configuration;
|
|
5
|
+
constructor(_configuration: sdk.ConfigurationDefinition | undefined);
|
|
6
|
+
getContent(): Promise<string>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as sdk from '@botpress/sdk';
|
|
2
|
+
import { Module, ReExportTypeModule } from '../../module';
|
|
3
|
+
export declare class ConfigurationModule extends Module {
|
|
4
|
+
private _configuration;
|
|
5
|
+
constructor(name: string, _configuration: sdk.ConfigurationDefinition);
|
|
6
|
+
getContent(): Promise<string>;
|
|
7
|
+
}
|
|
8
|
+
export declare class ConfigurationsModule extends ReExportTypeModule {
|
|
9
|
+
constructor(configurations: Record<string, sdk.ConfigurationDefinition>);
|
|
10
|
+
}
|
package/dist/code-generation/integration-implementation/integration-typings/entities-module.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as sdk from '@botpress/sdk';
|
|
2
|
+
import { Module, ReExportTypeModule } from '../../module';
|
|
3
|
+
export declare class EntityModule extends Module {
|
|
4
|
+
private _entity;
|
|
5
|
+
constructor(name: string, _entity: sdk.EntityDefinition);
|
|
6
|
+
getContent(): Promise<string>;
|
|
7
|
+
}
|
|
8
|
+
export declare class EntitiesModule extends ReExportTypeModule {
|
|
9
|
+
constructor(entities: Record<string, sdk.EntityDefinition>);
|
|
10
|
+
}
|
package/dist/code-generation/integration-implementation/integration-typings/events-module.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as sdk from '@botpress/sdk';
|
|
2
|
+
import { Module, ReExportTypeModule } from '../../module';
|
|
3
|
+
export declare class EventModule extends Module {
|
|
4
|
+
private _event;
|
|
5
|
+
constructor(name: string, _event: sdk.EventDefinition);
|
|
6
|
+
getContent(): Promise<string>;
|
|
7
|
+
}
|
|
8
|
+
export declare class EventsModule extends ReExportTypeModule {
|
|
9
|
+
constructor(events: Record<string, sdk.EventDefinition>);
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as sdk from '@botpress/sdk';
|
|
2
|
+
import { Module } from '../../module';
|
|
3
|
+
export declare class IntegrationTypingsModule extends Module {
|
|
4
|
+
private _integration;
|
|
5
|
+
private _dependencies;
|
|
6
|
+
constructor(_integration: sdk.IntegrationPackage['definition']);
|
|
7
|
+
getContent(): Promise<string>;
|
|
8
|
+
}
|
package/dist/code-generation/integration-implementation/integration-typings/states-module.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as sdk from '@botpress/sdk';
|
|
2
|
+
import { Module, ReExportTypeModule } from '../../module';
|
|
3
|
+
export declare class StatePayloadModule extends Module {
|
|
4
|
+
private _state;
|
|
5
|
+
constructor(_state: sdk.StateDefinition);
|
|
6
|
+
getContent(): Promise<string>;
|
|
7
|
+
}
|
|
8
|
+
export declare class StateModule extends Module {
|
|
9
|
+
private _name;
|
|
10
|
+
private _state;
|
|
11
|
+
private _payloadModule;
|
|
12
|
+
constructor(_name: string, _state: sdk.StateDefinition);
|
|
13
|
+
getContent(): Promise<string>;
|
|
14
|
+
}
|
|
15
|
+
export declare class StatesModule extends ReExportTypeModule {
|
|
16
|
+
constructor(states: Record<string, sdk.StateDefinition>);
|
|
17
|
+
}
|
package/dist/code-generation/integration-package/integration-package-definition/actions-module.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Module, ReExportVariableModule } from '../../module';
|
|
2
|
+
import * as types from './typings';
|
|
3
|
+
type ActionInput = types.ActionDefinition['input'];
|
|
4
|
+
type ActionOutput = types.ActionDefinition['output'];
|
|
5
|
+
export declare class ActionInputModule extends Module {
|
|
6
|
+
private _input;
|
|
7
|
+
constructor(_input: ActionInput);
|
|
8
|
+
getContent(): Promise<string>;
|
|
9
|
+
}
|
|
10
|
+
export declare class ActionOutputModule extends Module {
|
|
11
|
+
private _output;
|
|
12
|
+
constructor(_output: ActionOutput);
|
|
13
|
+
getContent(): Promise<string>;
|
|
14
|
+
}
|
|
15
|
+
export declare class ActionModule extends ReExportVariableModule {
|
|
16
|
+
constructor(actionName: string, action: types.ActionDefinition);
|
|
17
|
+
}
|
|
18
|
+
export declare class ActionsModule extends ReExportVariableModule {
|
|
19
|
+
constructor(actions: Record<string, types.ActionDefinition>);
|
|
20
|
+
}
|
|
21
|
+
export {};
|