@botpress/cli 1.4.10 → 1.6.0

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,20 +1,20 @@
1
1
 
2
- > @botpress/cli@1.4.10 build /home/runner/work/botpress/botpress/packages/cli
2
+ > @botpress/cli@1.6.0 build /home/runner/work/botpress/botpress/packages/cli
3
3
  > pnpm run bundle && pnpm run template:gen
4
4
 
5
5
 
6
- > @botpress/cli@1.4.10 bundle /home/runner/work/botpress/botpress/packages/cli
6
+ > @botpress/cli@1.6.0 bundle /home/runner/work/botpress/botpress/packages/cli
7
7
  > ts-node -T build.ts
8
8
 
9
9
 
10
- > @botpress/cli@1.4.10 template:gen /home/runner/work/botpress/botpress/packages/cli
10
+ > @botpress/cli@1.6.0 template:gen /home/runner/work/botpress/botpress/packages/cli
11
11
  > pnpm -r --stream -F @bp-templates/* exec bp gen
12
12
 
13
- šŸ¤– Botpress CLI v1.4.10
14
- šŸ¤– Botpress CLI v1.4.10
15
- šŸ¤– Botpress CLI v1.4.10
16
- šŸ¤– Botpress CLI v1.4.10
17
- ā—‹ Generating typings for bot...ā—‹ Generating typings for integration webhook-message...āœ“ Typings available at .botpress
18
- ā—‹ Generating typings for integration hello-world...ā—‹ Generating typings for integration empty-integration...āœ“ Typings available at .botpress
13
+ šŸ¤– Botpress CLI v1.6.0
14
+ šŸ¤– Botpress CLI v1.6.0
15
+ šŸ¤– Botpress CLI v1.6.0
16
+ šŸ¤– Botpress CLI v1.6.0
17
+ ā—‹ Generating typings for bot...ā—‹ Generating typings for integration hello-world...āœ“ Typings available at .botpress
18
+ ā—‹ Generating typings for integration empty-integration...ā—‹ Generating typings for integration webhook-message...āœ“ Typings available at .botpress
19
19
  āœ“ Typings available at .botpress
20
20
  āœ“ Typings available at .botpress
@@ -49,7 +49,7 @@ class BotImplementationModule extends import_module.Module {
49
49
  `import * as ${this._typingsModule.name} from "./${typingsImport}"`,
50
50
  `export * from "./${typingsImport}"`,
51
51
  "",
52
- `type TBot = ${this._typingsModule.name}.${this._typingsModule.exportName}`,
52
+ `type TBot = sdk.DefaultBot<${this._typingsModule.name}.${this._typingsModule.exportName}>`,
53
53
  "",
54
54
  "export class Bot extends sdk.Bot<TBot> {}",
55
55
  "",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/code-generation/bot-implementation/bot-implementation.ts"],
4
- "sourcesContent": ["import * as sdk from '@botpress/sdk'\nimport * as consts from '../consts'\nimport { Module } from '../module'\nimport { BotTypingsModule } from './bot-typings'\n\nexport class BotImplementationModule extends Module {\n private _typingsModule: BotTypingsModule\n\n public constructor(bot: sdk.BotDefinition) {\n super({\n exportName: 'Bot',\n path: consts.INDEX_FILE,\n })\n\n this._typingsModule = new BotTypingsModule(bot)\n this._typingsModule.unshift('typings')\n this.pushDep(this._typingsModule)\n }\n\n public async getContent() {\n const typingsImport = this._typingsModule.import(this)\n\n return [\n consts.GENERATED_HEADER,\n 'import * as sdk from \"@botpress/sdk\"',\n `import * as ${this._typingsModule.name} from \"./${typingsImport}\"`,\n `export * from \"./${typingsImport}\"`,\n '',\n `type TBot = ${this._typingsModule.name}.${this._typingsModule.exportName}`,\n '',\n 'export class Bot extends sdk.Bot<TBot> {}',\n '',\n '// extra types',\n '',\n 'type AsyncFunction = (...args: any[]) => Promise<any>',\n \"export type EventHandler = Parameters<Bot['event']>[0]\",\n 'export type EventHandlerProps = Parameters<EventHandler>[0]',\n \"export type MessageHandler = Parameters<Bot['message']>[0]\",\n 'export type MessageHandlerProps = Parameters<MessageHandler>[0]',\n \"export type Client = EventHandlerProps['client']\",\n 'export type ClientOperation = keyof {',\n ' [K in keyof Client as Client[K] extends AsyncFunction ? K : never]: null',\n '}',\n 'export type ClientInputs = {',\n ' [K in ClientOperation]: Parameters<Client[K]>[0]',\n '}',\n 'export type ClientOutputs = {',\n ' [K in ClientOperation]: Awaited<ReturnType<Client[K]>>',\n '}',\n '// @deprecated',\n \"export type BotEvent = EventHandlerProps['event']\",\n '// @deprecated',\n 'export type BotEvents = {',\n \" [K in BotEvent['type']]: Extract<BotEvent, { type: K }>\",\n '}',\n '// @deprecated',\n \"export type BotState = ClientOutputs['getState']['state']\",\n '// @deprecated',\n 'export type BotStates = {',\n \" [K in BotState['name']]: Extract<BotState, { type: K }>['payload']\",\n '}',\n ].join('\\n')\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,aAAwB;AACxB,oBAAuB;AACvB,yBAAiC;AAE1B,MAAM,gCAAgC,qBAAO;AAAA,EAC1C;AAAA,EAED,YAAY,KAAwB;AACzC,UAAM;AAAA,MACJ,YAAY;AAAA,MACZ,MAAM,OAAO;AAAA,IACf,CAAC;AAED,SAAK,iBAAiB,IAAI,oCAAiB,GAAG;AAC9C,SAAK,eAAe,QAAQ,SAAS;AACrC,SAAK,QAAQ,KAAK,cAAc;AAAA,EAClC;AAAA,EAEA,MAAa,aAAa;AACxB,UAAM,gBAAgB,KAAK,eAAe,OAAO,IAAI;AAErD,WAAO;AAAA,MACL,OAAO;AAAA,MACP;AAAA,MACA,eAAe,KAAK,eAAe,gBAAgB;AAAA,MACnD,oBAAoB;AAAA,MACpB;AAAA,MACA,eAAe,KAAK,eAAe,QAAQ,KAAK,eAAe;AAAA,MAC/D;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,EAAE,KAAK,IAAI;AAAA,EACb;AACF;",
4
+ "sourcesContent": ["import * as sdk from '@botpress/sdk'\nimport * as consts from '../consts'\nimport { Module } from '../module'\nimport { BotTypingsModule } from './bot-typings'\n\nexport class BotImplementationModule extends Module {\n private _typingsModule: BotTypingsModule\n\n public constructor(bot: sdk.BotDefinition) {\n super({\n exportName: 'Bot',\n path: consts.INDEX_FILE,\n })\n\n this._typingsModule = new BotTypingsModule(bot)\n this._typingsModule.unshift('typings')\n this.pushDep(this._typingsModule)\n }\n\n public async getContent() {\n const typingsImport = this._typingsModule.import(this)\n\n return [\n consts.GENERATED_HEADER,\n 'import * as sdk from \"@botpress/sdk\"',\n `import * as ${this._typingsModule.name} from \"./${typingsImport}\"`,\n `export * from \"./${typingsImport}\"`,\n '',\n `type TBot = sdk.DefaultBot<${this._typingsModule.name}.${this._typingsModule.exportName}>`,\n '',\n 'export class Bot extends sdk.Bot<TBot> {}',\n '',\n '// extra types',\n '',\n 'type AsyncFunction = (...args: any[]) => Promise<any>',\n \"export type EventHandler = Parameters<Bot['event']>[0]\",\n 'export type EventHandlerProps = Parameters<EventHandler>[0]',\n \"export type MessageHandler = Parameters<Bot['message']>[0]\",\n 'export type MessageHandlerProps = Parameters<MessageHandler>[0]',\n \"export type Client = EventHandlerProps['client']\",\n 'export type ClientOperation = keyof {',\n ' [K in keyof Client as Client[K] extends AsyncFunction ? K : never]: null',\n '}',\n 'export type ClientInputs = {',\n ' [K in ClientOperation]: Parameters<Client[K]>[0]',\n '}',\n 'export type ClientOutputs = {',\n ' [K in ClientOperation]: Awaited<ReturnType<Client[K]>>',\n '}',\n '// @deprecated',\n \"export type BotEvent = EventHandlerProps['event']\",\n '// @deprecated',\n 'export type BotEvents = {',\n \" [K in BotEvent['type']]: Extract<BotEvent, { type: K }>\",\n '}',\n '// @deprecated',\n \"export type BotState = ClientOutputs['getState']['state']\",\n '// @deprecated',\n 'export type BotStates = {',\n \" [K in BotState['name']]: Extract<BotState, { type: K }>['payload']\",\n '}',\n ].join('\\n')\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,aAAwB;AACxB,oBAAuB;AACvB,yBAAiC;AAE1B,MAAM,gCAAgC,qBAAO;AAAA,EAC1C;AAAA,EAED,YAAY,KAAwB;AACzC,UAAM;AAAA,MACJ,YAAY;AAAA,MACZ,MAAM,OAAO;AAAA,IACf,CAAC;AAED,SAAK,iBAAiB,IAAI,oCAAiB,GAAG;AAC9C,SAAK,eAAe,QAAQ,SAAS;AACrC,SAAK,QAAQ,KAAK,cAAc;AAAA,EAClC;AAAA,EAEA,MAAa,aAAa;AACxB,UAAM,gBAAgB,KAAK,eAAe,OAAO,IAAI;AAErD,WAAO;AAAA,MACL,OAAO;AAAA,MACP;AAAA,MACA,eAAe,KAAK,eAAe,gBAAgB;AAAA,MACnD,oBAAoB;AAAA,MACpB;AAAA,MACA,8BAA8B,KAAK,eAAe,QAAQ,KAAK,eAAe;AAAA,MAC9E;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,EAAE,KAAK,IAAI;AAAA,EACb;AACF;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,84 @@
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 __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
+ var actions_module_exports = {};
26
+ __export(actions_module_exports, {
27
+ ActionInputModule: () => ActionInputModule,
28
+ ActionModule: () => ActionModule,
29
+ ActionOutputModule: () => ActionOutputModule,
30
+ ActionsModule: () => ActionsModule
31
+ });
32
+ module.exports = __toCommonJS(actions_module_exports);
33
+ var import_generators = require("../../generators");
34
+ var import_module = require("../../module");
35
+ var strings = __toESM(require("../../strings"));
36
+ class ActionInputModule extends import_module.Module {
37
+ constructor(_input) {
38
+ const name = "input";
39
+ const exportName = strings.typeName(name);
40
+ super({ path: `${name}.ts`, exportName });
41
+ this._input = _input;
42
+ }
43
+ async getContent() {
44
+ return (0, import_generators.zuiSchemaToTypeScriptType)(this._input.schema, this.exportName);
45
+ }
46
+ }
47
+ class ActionOutputModule extends import_module.Module {
48
+ constructor(_output) {
49
+ const name = "output";
50
+ const exportName = strings.typeName(name);
51
+ super({ path: `${name}.ts`, exportName });
52
+ this._output = _output;
53
+ }
54
+ async getContent() {
55
+ return (0, import_generators.zuiSchemaToTypeScriptType)(this._output.schema, this.exportName);
56
+ }
57
+ }
58
+ class ActionModule extends import_module.ReExportTypeModule {
59
+ constructor(actionName, action) {
60
+ super({ exportName: strings.typeName(actionName) });
61
+ const inputModule = new ActionInputModule(action.input);
62
+ const outputModule = new ActionOutputModule(action.output);
63
+ this.pushDep(inputModule);
64
+ this.pushDep(outputModule);
65
+ }
66
+ }
67
+ class ActionsModule extends import_module.ReExportTypeModule {
68
+ constructor(actions) {
69
+ super({ exportName: strings.typeName("actions") });
70
+ for (const [actionName, action] of Object.entries(actions)) {
71
+ const module2 = new ActionModule(actionName, action);
72
+ module2.unshift(actionName);
73
+ this.pushDep(module2);
74
+ }
75
+ }
76
+ }
77
+ // Annotate the CommonJS export names for ESM import in node:
78
+ 0 && (module.exports = {
79
+ ActionInputModule,
80
+ ActionModule,
81
+ ActionOutputModule,
82
+ ActionsModule
83
+ });
84
+ //# sourceMappingURL=actions-module.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/code-generation/bot-implementation/bot-typings/actions-module.ts"],
4
+ "sourcesContent": ["import * as sdk from '@botpress/sdk'\nimport { zuiSchemaToTypeScriptType } from '../../generators'\nimport { Module, ReExportTypeModule } from '../../module'\nimport * as strings from '../../strings'\n\ntype ActionInput = sdk.BotActionDefinition['input']\ntype ActionOutput = sdk.BotActionDefinition['output']\n\nexport class ActionInputModule extends Module {\n public constructor(private _input: ActionInput) {\n const name = 'input'\n const exportName = strings.typeName(name)\n super({ path: `${name}.ts`, exportName })\n }\n\n public async getContent() {\n return zuiSchemaToTypeScriptType(this._input.schema, this.exportName)\n }\n}\n\nexport class ActionOutputModule extends Module {\n public constructor(private _output: ActionOutput) {\n const name = 'output'\n const exportName = strings.typeName(name)\n super({ path: `${name}.ts`, exportName })\n }\n\n public async getContent() {\n return zuiSchemaToTypeScriptType(this._output.schema, this.exportName)\n }\n}\n\nexport class ActionModule extends ReExportTypeModule {\n public constructor(actionName: string, action: sdk.BotActionDefinition) {\n super({ exportName: strings.typeName(actionName) })\n\n const inputModule = new ActionInputModule(action.input)\n const outputModule = new ActionOutputModule(action.output)\n\n this.pushDep(inputModule)\n this.pushDep(outputModule)\n }\n}\n\nexport class ActionsModule extends ReExportTypeModule {\n public constructor(actions: Record<string, sdk.BotActionDefinition>) {\n super({ exportName: strings.typeName('actions') })\n for (const [actionName, action] of Object.entries(actions)) {\n const module = new ActionModule(actionName, action)\n module.unshift(actionName)\n this.pushDep(module)\n }\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,wBAA0C;AAC1C,oBAA2C;AAC3C,cAAyB;AAKlB,MAAM,0BAA0B,qBAAO;AAAA,EACrC,YAAoB,QAAqB;AAC9C,UAAM,OAAO;AACb,UAAM,aAAa,QAAQ,SAAS,IAAI;AACxC,UAAM,EAAE,MAAM,GAAG,WAAW,WAAW,CAAC;AAHf;AAAA,EAI3B;AAAA,EAEA,MAAa,aAAa;AACxB,eAAO,6CAA0B,KAAK,OAAO,QAAQ,KAAK,UAAU;AAAA,EACtE;AACF;AAEO,MAAM,2BAA2B,qBAAO;AAAA,EACtC,YAAoB,SAAuB;AAChD,UAAM,OAAO;AACb,UAAM,aAAa,QAAQ,SAAS,IAAI;AACxC,UAAM,EAAE,MAAM,GAAG,WAAW,WAAW,CAAC;AAHf;AAAA,EAI3B;AAAA,EAEA,MAAa,aAAa;AACxB,eAAO,6CAA0B,KAAK,QAAQ,QAAQ,KAAK,UAAU;AAAA,EACvE;AACF;AAEO,MAAM,qBAAqB,iCAAmB;AAAA,EAC5C,YAAY,YAAoB,QAAiC;AACtE,UAAM,EAAE,YAAY,QAAQ,SAAS,UAAU,EAAE,CAAC;AAElD,UAAM,cAAc,IAAI,kBAAkB,OAAO,KAAK;AACtD,UAAM,eAAe,IAAI,mBAAmB,OAAO,MAAM;AAEzD,SAAK,QAAQ,WAAW;AACxB,SAAK,QAAQ,YAAY;AAAA,EAC3B;AACF;AAEO,MAAM,sBAAsB,iCAAmB;AAAA,EAC7C,YAAY,SAAkD;AACnE,UAAM,EAAE,YAAY,QAAQ,SAAS,SAAS,EAAE,CAAC;AACjD,eAAW,CAAC,YAAY,MAAM,KAAK,OAAO,QAAQ,OAAO,GAAG;AAC1D,YAAMA,UAAS,IAAI,aAAa,YAAY,MAAM;AAClD,MAAAA,QAAO,QAAQ,UAAU;AACzB,WAAK,QAAQA,OAAM;AAAA,IACrB;AAAA,EACF;AACF;",
6
+ "names": ["module"]
7
+ }
@@ -30,6 +30,7 @@ module.exports = __toCommonJS(bot_typings_exports);
30
30
  var consts = __toESM(require("../../consts"));
31
31
  var import_integration_typings = require("../../integration-implementation/integration-typings");
32
32
  var import_module = require("../../module");
33
+ var import_actions_module = require("./actions-module");
33
34
  var import_events_module = require("./events-module");
34
35
  var import_states_module = require("./states-module");
35
36
  class BotIntegrationsModule extends import_module.ReExportTypeModule {
@@ -60,31 +61,39 @@ class BotTypingsModule extends import_module.Module {
60
61
  const statesModule = new import_states_module.StatesModule(bot.states ?? {});
61
62
  statesModule.unshift("states");
62
63
  this.pushDep(statesModule);
64
+ const actionsModule = new import_actions_module.ActionsModule(bot.actions ?? {});
65
+ actionsModule.unshift("actions");
66
+ this.pushDep(actionsModule);
63
67
  this._dependencies = {
64
68
  integrationsModule,
65
69
  eventsModule,
66
- statesModule
70
+ statesModule,
71
+ actionsModule
67
72
  };
68
73
  }
69
74
  async getContent() {
70
- const { integrationsModule, eventsModule, statesModule } = this._dependencies;
75
+ const { integrationsModule, eventsModule, statesModule, actionsModule } = this._dependencies;
71
76
  const integrationsImport = integrationsModule.import(this);
72
77
  const eventsImport = eventsModule.import(this);
73
78
  const statesImport = statesModule.import(this);
79
+ const actionsImport = actionsModule;
74
80
  return [
75
81
  consts.GENERATED_HEADER,
76
82
  `import * as ${integrationsModule.name} from './${integrationsImport}'`,
77
83
  `import * as ${eventsModule.name} from './${eventsModule.name}'`,
78
84
  `import * as ${statesModule.name} from './${statesModule.name}'`,
85
+ `import * as ${actionsModule.name} from './${actionsImport.name}'`,
79
86
  "",
80
87
  `export * as ${integrationsModule.name} from './${integrationsImport}'`,
81
88
  `export * as ${eventsModule.name} from './${eventsImport}'`,
82
89
  `export * as ${statesModule.name} from './${statesImport}'`,
90
+ `export * as ${actionsModule.name} from './${actionsImport.name}'`,
83
91
  "",
84
92
  "export type TBot = {",
85
93
  ` integrations: ${integrationsModule.name}.${integrationsModule.exportName}`,
86
94
  ` events: ${eventsModule.name}.${eventsModule.exportName}`,
87
95
  ` states: ${statesModule.name}.${statesModule.exportName}`,
96
+ ` actions: ${actionsModule.name}.${actionsModule.exportName}`,
88
97
  "}"
89
98
  ].join("\n");
90
99
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/code-generation/bot-implementation/bot-typings/index.ts"],
4
- "sourcesContent": ["import * as sdk from '@botpress/sdk'\nimport * as consts from '../../consts'\nimport { IntegrationTypingsModule } from '../../integration-implementation/integration-typings'\nimport { Module, ReExportTypeModule } from '../../module'\nimport { EventsModule } from './events-module'\nimport { StatesModule } from './states-module'\n\nclass BotIntegrationsModule extends ReExportTypeModule {\n public constructor(bot: sdk.BotDefinition) {\n super({\n exportName: 'Integrations',\n })\n\n for (const [alias, integration] of Object.entries(bot.integrations ?? {})) {\n const integrationModule = new IntegrationTypingsModule(integration.definition)\n integrationModule.unshift(alias)\n this.pushDep(integrationModule)\n }\n }\n}\n\ntype BotTypingsIndexDependencies = {\n integrationsModule: BotIntegrationsModule\n eventsModule: EventsModule\n statesModule: StatesModule\n}\n\nexport class BotTypingsModule extends Module {\n private _dependencies: BotTypingsIndexDependencies\n\n public constructor(bot: sdk.BotDefinition) {\n super({\n exportName: 'TBot',\n path: consts.INDEX_FILE,\n })\n\n const integrationsModule = new BotIntegrationsModule(bot)\n integrationsModule.unshift('integrations')\n this.pushDep(integrationsModule)\n\n const eventsModule = new EventsModule(bot.events ?? {})\n eventsModule.unshift('events')\n this.pushDep(eventsModule)\n\n const statesModule = new StatesModule(bot.states ?? {})\n statesModule.unshift('states')\n this.pushDep(statesModule)\n\n this._dependencies = {\n integrationsModule,\n eventsModule,\n statesModule,\n }\n }\n\n public async getContent() {\n const { integrationsModule, eventsModule, statesModule } = this._dependencies\n\n const integrationsImport = integrationsModule.import(this)\n const eventsImport = eventsModule.import(this)\n const statesImport = statesModule.import(this)\n return [\n consts.GENERATED_HEADER,\n `import * as ${integrationsModule.name} from './${integrationsImport}'`,\n `import * as ${eventsModule.name} from './${eventsModule.name}'`,\n `import * as ${statesModule.name} from './${statesModule.name}'`,\n '',\n `export * as ${integrationsModule.name} from './${integrationsImport}'`,\n `export * as ${eventsModule.name} from './${eventsImport}'`,\n `export * as ${statesModule.name} from './${statesImport}'`,\n '',\n 'export type TBot = {',\n ` integrations: ${integrationsModule.name}.${integrationsModule.exportName}`,\n ` events: ${eventsModule.name}.${eventsModule.exportName}`,\n ` states: ${statesModule.name}.${statesModule.exportName}`,\n '}',\n ].join('\\n')\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,aAAwB;AACxB,iCAAyC;AACzC,oBAA2C;AAC3C,2BAA6B;AAC7B,2BAA6B;AAE7B,MAAM,8BAA8B,iCAAmB;AAAA,EAC9C,YAAY,KAAwB;AACzC,UAAM;AAAA,MACJ,YAAY;AAAA,IACd,CAAC;AAED,eAAW,CAAC,OAAO,WAAW,KAAK,OAAO,QAAQ,IAAI,gBAAgB,CAAC,CAAC,GAAG;AACzE,YAAM,oBAAoB,IAAI,oDAAyB,YAAY,UAAU;AAC7E,wBAAkB,QAAQ,KAAK;AAC/B,WAAK,QAAQ,iBAAiB;AAAA,IAChC;AAAA,EACF;AACF;AAQO,MAAM,yBAAyB,qBAAO;AAAA,EACnC;AAAA,EAED,YAAY,KAAwB;AACzC,UAAM;AAAA,MACJ,YAAY;AAAA,MACZ,MAAM,OAAO;AAAA,IACf,CAAC;AAED,UAAM,qBAAqB,IAAI,sBAAsB,GAAG;AACxD,uBAAmB,QAAQ,cAAc;AACzC,SAAK,QAAQ,kBAAkB;AAE/B,UAAM,eAAe,IAAI,kCAAa,IAAI,UAAU,CAAC,CAAC;AACtD,iBAAa,QAAQ,QAAQ;AAC7B,SAAK,QAAQ,YAAY;AAEzB,UAAM,eAAe,IAAI,kCAAa,IAAI,UAAU,CAAC,CAAC;AACtD,iBAAa,QAAQ,QAAQ;AAC7B,SAAK,QAAQ,YAAY;AAEzB,SAAK,gBAAgB;AAAA,MACnB;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EAEA,MAAa,aAAa;AACxB,UAAM,EAAE,oBAAoB,cAAc,aAAa,IAAI,KAAK;AAEhE,UAAM,qBAAqB,mBAAmB,OAAO,IAAI;AACzD,UAAM,eAAe,aAAa,OAAO,IAAI;AAC7C,UAAM,eAAe,aAAa,OAAO,IAAI;AAC7C,WAAO;AAAA,MACL,OAAO;AAAA,MACP,eAAe,mBAAmB,gBAAgB;AAAA,MAClD,eAAe,aAAa,gBAAgB,aAAa;AAAA,MACzD,eAAe,aAAa,gBAAgB,aAAa;AAAA,MACzD;AAAA,MACA,eAAe,mBAAmB,gBAAgB;AAAA,MAClD,eAAe,aAAa,gBAAgB;AAAA,MAC5C,eAAe,aAAa,gBAAgB;AAAA,MAC5C;AAAA,MACA;AAAA,MACA,mBAAmB,mBAAmB,QAAQ,mBAAmB;AAAA,MACjE,aAAa,aAAa,QAAQ,aAAa;AAAA,MAC/C,aAAa,aAAa,QAAQ,aAAa;AAAA,MAC/C;AAAA,IACF,EAAE,KAAK,IAAI;AAAA,EACb;AACF;",
4
+ "sourcesContent": ["import * as sdk from '@botpress/sdk'\nimport * as consts from '../../consts'\nimport { IntegrationTypingsModule } from '../../integration-implementation/integration-typings'\nimport { Module, ReExportTypeModule } from '../../module'\nimport { ActionsModule } from './actions-module'\nimport { EventsModule } from './events-module'\nimport { StatesModule } from './states-module'\n\nclass BotIntegrationsModule extends ReExportTypeModule {\n public constructor(bot: sdk.BotDefinition) {\n super({\n exportName: 'Integrations',\n })\n\n for (const [alias, integration] of Object.entries(bot.integrations ?? {})) {\n const integrationModule = new IntegrationTypingsModule(integration.definition)\n integrationModule.unshift(alias)\n this.pushDep(integrationModule)\n }\n }\n}\n\ntype BotTypingsIndexDependencies = {\n integrationsModule: BotIntegrationsModule\n eventsModule: EventsModule\n statesModule: StatesModule\n actionsModule: ActionsModule\n}\n\nexport class BotTypingsModule extends Module {\n private _dependencies: BotTypingsIndexDependencies\n\n public constructor(bot: sdk.BotDefinition) {\n super({\n exportName: 'TBot',\n path: consts.INDEX_FILE,\n })\n\n const integrationsModule = new BotIntegrationsModule(bot)\n integrationsModule.unshift('integrations')\n this.pushDep(integrationsModule)\n\n const eventsModule = new EventsModule(bot.events ?? {})\n eventsModule.unshift('events')\n this.pushDep(eventsModule)\n\n const statesModule = new StatesModule(bot.states ?? {})\n statesModule.unshift('states')\n this.pushDep(statesModule)\n\n const actionsModule = new ActionsModule(bot.actions ?? {})\n actionsModule.unshift('actions')\n this.pushDep(actionsModule)\n\n this._dependencies = {\n integrationsModule,\n eventsModule,\n statesModule,\n actionsModule,\n }\n }\n\n public async getContent() {\n const { integrationsModule, eventsModule, statesModule, actionsModule } = this._dependencies\n\n const integrationsImport = integrationsModule.import(this)\n const eventsImport = eventsModule.import(this)\n const statesImport = statesModule.import(this)\n const actionsImport = actionsModule\n\n return [\n consts.GENERATED_HEADER,\n `import * as ${integrationsModule.name} from './${integrationsImport}'`,\n `import * as ${eventsModule.name} from './${eventsModule.name}'`,\n `import * as ${statesModule.name} from './${statesModule.name}'`,\n `import * as ${actionsModule.name} from './${actionsImport.name}'`,\n '',\n `export * as ${integrationsModule.name} from './${integrationsImport}'`,\n `export * as ${eventsModule.name} from './${eventsImport}'`,\n `export * as ${statesModule.name} from './${statesImport}'`,\n `export * as ${actionsModule.name} from './${actionsImport.name}'`,\n '',\n 'export type TBot = {',\n ` integrations: ${integrationsModule.name}.${integrationsModule.exportName}`,\n ` events: ${eventsModule.name}.${eventsModule.exportName}`,\n ` states: ${statesModule.name}.${statesModule.exportName}`,\n ` actions: ${actionsModule.name}.${actionsModule.exportName}`,\n '}',\n ].join('\\n')\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,aAAwB;AACxB,iCAAyC;AACzC,oBAA2C;AAC3C,4BAA8B;AAC9B,2BAA6B;AAC7B,2BAA6B;AAE7B,MAAM,8BAA8B,iCAAmB;AAAA,EAC9C,YAAY,KAAwB;AACzC,UAAM;AAAA,MACJ,YAAY;AAAA,IACd,CAAC;AAED,eAAW,CAAC,OAAO,WAAW,KAAK,OAAO,QAAQ,IAAI,gBAAgB,CAAC,CAAC,GAAG;AACzE,YAAM,oBAAoB,IAAI,oDAAyB,YAAY,UAAU;AAC7E,wBAAkB,QAAQ,KAAK;AAC/B,WAAK,QAAQ,iBAAiB;AAAA,IAChC;AAAA,EACF;AACF;AASO,MAAM,yBAAyB,qBAAO;AAAA,EACnC;AAAA,EAED,YAAY,KAAwB;AACzC,UAAM;AAAA,MACJ,YAAY;AAAA,MACZ,MAAM,OAAO;AAAA,IACf,CAAC;AAED,UAAM,qBAAqB,IAAI,sBAAsB,GAAG;AACxD,uBAAmB,QAAQ,cAAc;AACzC,SAAK,QAAQ,kBAAkB;AAE/B,UAAM,eAAe,IAAI,kCAAa,IAAI,UAAU,CAAC,CAAC;AACtD,iBAAa,QAAQ,QAAQ;AAC7B,SAAK,QAAQ,YAAY;AAEzB,UAAM,eAAe,IAAI,kCAAa,IAAI,UAAU,CAAC,CAAC;AACtD,iBAAa,QAAQ,QAAQ;AAC7B,SAAK,QAAQ,YAAY;AAEzB,UAAM,gBAAgB,IAAI,oCAAc,IAAI,WAAW,CAAC,CAAC;AACzD,kBAAc,QAAQ,SAAS;AAC/B,SAAK,QAAQ,aAAa;AAE1B,SAAK,gBAAgB;AAAA,MACnB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EAEA,MAAa,aAAa;AACxB,UAAM,EAAE,oBAAoB,cAAc,cAAc,cAAc,IAAI,KAAK;AAE/E,UAAM,qBAAqB,mBAAmB,OAAO,IAAI;AACzD,UAAM,eAAe,aAAa,OAAO,IAAI;AAC7C,UAAM,eAAe,aAAa,OAAO,IAAI;AAC7C,UAAM,gBAAgB;AAEtB,WAAO;AAAA,MACL,OAAO;AAAA,MACP,eAAe,mBAAmB,gBAAgB;AAAA,MAClD,eAAe,aAAa,gBAAgB,aAAa;AAAA,MACzD,eAAe,aAAa,gBAAgB,aAAa;AAAA,MACzD,eAAe,cAAc,gBAAgB,cAAc;AAAA,MAC3D;AAAA,MACA,eAAe,mBAAmB,gBAAgB;AAAA,MAClD,eAAe,aAAa,gBAAgB;AAAA,MAC5C,eAAe,aAAa,gBAAgB;AAAA,MAC5C,eAAe,cAAc,gBAAgB,cAAc;AAAA,MAC3D;AAAA,MACA;AAAA,MACA,mBAAmB,mBAAmB,QAAQ,mBAAmB;AAAA,MACjE,aAAa,aAAa,QAAQ,aAAa;AAAA,MAC/C,aAAa,aAAa,QAAQ,aAAa;AAAA,MAC/C,cAAc,cAAc,QAAQ,cAAc;AAAA,MAClD;AAAA,IACF,EAAE,KAAK,IAAI;AAAA,EACb;AACF;",
6
6
  "names": []
7
7
  }
@@ -50,7 +50,7 @@ class IntegrationImplementationModule extends import_module.Module {
50
50
  `import * as ${this._typingsModule.name} from "./${typingsImport}"`,
51
51
  `export * from "./${typingsImport}"`,
52
52
  "",
53
- `type TIntegration = ${this._typingsModule.name}.${this._typingsModule.exportName}`,
53
+ `type TIntegration = sdk.DefaultIntegration<${this._typingsModule.name}.${this._typingsModule.exportName}>`,
54
54
  "",
55
55
  "export type IntegrationProps = sdk.IntegrationProps<TIntegration>",
56
56
  "",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/code-generation/integration-implementation/integration-implementation.ts"],
4
- "sourcesContent": ["import * as sdk from '@botpress/sdk'\nimport * as consts from '../consts'\nimport { Module } from '../module'\nimport { IntegrationTypingsModule } from './integration-typings'\n\nexport class IntegrationImplementationModule extends Module {\n private _typingsModule: IntegrationTypingsModule\n\n public constructor(integration: sdk.IntegrationDefinition) {\n super({\n path: consts.INDEX_FILE,\n exportName: 'Integration',\n })\n this._typingsModule = new IntegrationTypingsModule(integration)\n this._typingsModule.unshift('typings')\n this.pushDep(this._typingsModule)\n }\n\n public async getContent() {\n let content = ''\n\n const typingsImport = this._typingsModule.import(this)\n\n content += [\n consts.GENERATED_HEADER,\n 'import * as sdk from \"@botpress/sdk\"',\n `import * as ${this._typingsModule.name} from \"./${typingsImport}\"`,\n `export * from \"./${typingsImport}\"`,\n '',\n `type TIntegration = ${this._typingsModule.name}.${this._typingsModule.exportName}`,\n '',\n 'export type IntegrationProps = sdk.IntegrationProps<TIntegration>',\n '',\n 'export class Integration extends sdk.Integration<TIntegration> {}',\n '',\n 'export type Client = sdk.IntegrationSpecificClient<TIntegration>',\n '',\n '// extra types',\n '',\n 'type Cast<X, Y> = X extends Y ? X : Y',\n 'type ValueOf<T> = T[keyof T]',\n 'type AsyncFunction = (...args: any[]) => Promise<any>',\n '',\n \"export type HandlerProps = Parameters<IntegrationProps['handler']>[0]\",\n '',\n 'export type ActionProps = {',\n \" [K in keyof IntegrationProps['actions']]: Parameters<IntegrationProps['actions'][K]>[0]\",\n '}',\n 'export type AnyActionProps = ValueOf<ActionProps>',\n '',\n 'export type MessageProps = {',\n \" [TChannel in keyof IntegrationProps['channels']]: {\",\n \" [TMessage in keyof IntegrationProps['channels'][TChannel]['messages']]: Parameters<\",\n \" IntegrationProps['channels'][TChannel]['messages'][TMessage]\",\n ' >[0]',\n ' }',\n '}',\n 'export type AnyMessageProps = ValueOf<ValueOf<MessageProps>>',\n '',\n \"export type Context = HandlerProps['ctx']\",\n \"export type Logger = HandlerProps['logger']\",\n '',\n 'export type AckFunctions = {',\n ' [TChannel in keyof MessageProps]: {',\n \" [TMessage in keyof MessageProps[TChannel]]: Cast<MessageProps[TChannel][TMessage], AnyMessageProps>['ack']\",\n ' }',\n '}',\n 'export type AnyAckFunction = ValueOf<ValueOf<AckFunctions>>',\n '',\n 'export type ClientOperation = ValueOf<{',\n ' [K in keyof Client as Client[K] extends AsyncFunction ? K : never]: K',\n '}>',\n 'export type ClientRequests = {',\n ' [K in ClientOperation]: Parameters<Client[K]>[0]',\n '}',\n 'export type ClientResponses = {',\n ' [K in ClientOperation]: Awaited<ReturnType<Client[K]>>',\n '}',\n ].join('\\n')\n\n return content\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,aAAwB;AACxB,oBAAuB;AACvB,iCAAyC;AAElC,MAAM,wCAAwC,qBAAO;AAAA,EAClD;AAAA,EAED,YAAY,aAAwC;AACzD,UAAM;AAAA,MACJ,MAAM,OAAO;AAAA,MACb,YAAY;AAAA,IACd,CAAC;AACD,SAAK,iBAAiB,IAAI,oDAAyB,WAAW;AAC9D,SAAK,eAAe,QAAQ,SAAS;AACrC,SAAK,QAAQ,KAAK,cAAc;AAAA,EAClC;AAAA,EAEA,MAAa,aAAa;AACxB,QAAI,UAAU;AAEd,UAAM,gBAAgB,KAAK,eAAe,OAAO,IAAI;AAErD,eAAW;AAAA,MACT,OAAO;AAAA,MACP;AAAA,MACA,eAAe,KAAK,eAAe,gBAAgB;AAAA,MACnD,oBAAoB;AAAA,MACpB;AAAA,MACA,uBAAuB,KAAK,eAAe,QAAQ,KAAK,eAAe;AAAA,MACvE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,EAAE,KAAK,IAAI;AAEX,WAAO;AAAA,EACT;AACF;",
4
+ "sourcesContent": ["import * as sdk from '@botpress/sdk'\nimport * as consts from '../consts'\nimport { Module } from '../module'\nimport { IntegrationTypingsModule } from './integration-typings'\n\nexport class IntegrationImplementationModule extends Module {\n private _typingsModule: IntegrationTypingsModule\n\n public constructor(integration: sdk.IntegrationDefinition) {\n super({\n path: consts.INDEX_FILE,\n exportName: 'Integration',\n })\n this._typingsModule = new IntegrationTypingsModule(integration)\n this._typingsModule.unshift('typings')\n this.pushDep(this._typingsModule)\n }\n\n public async getContent() {\n let content = ''\n\n const typingsImport = this._typingsModule.import(this)\n\n content += [\n consts.GENERATED_HEADER,\n 'import * as sdk from \"@botpress/sdk\"',\n `import * as ${this._typingsModule.name} from \"./${typingsImport}\"`,\n `export * from \"./${typingsImport}\"`,\n '',\n `type TIntegration = sdk.DefaultIntegration<${this._typingsModule.name}.${this._typingsModule.exportName}>`,\n '',\n 'export type IntegrationProps = sdk.IntegrationProps<TIntegration>',\n '',\n 'export class Integration extends sdk.Integration<TIntegration> {}',\n '',\n 'export type Client = sdk.IntegrationSpecificClient<TIntegration>',\n '',\n '// extra types',\n '',\n 'type Cast<X, Y> = X extends Y ? X : Y',\n 'type ValueOf<T> = T[keyof T]',\n 'type AsyncFunction = (...args: any[]) => Promise<any>',\n '',\n \"export type HandlerProps = Parameters<IntegrationProps['handler']>[0]\",\n '',\n 'export type ActionProps = {',\n \" [K in keyof IntegrationProps['actions']]: Parameters<IntegrationProps['actions'][K]>[0]\",\n '}',\n 'export type AnyActionProps = ValueOf<ActionProps>',\n '',\n 'export type MessageProps = {',\n \" [TChannel in keyof IntegrationProps['channels']]: {\",\n \" [TMessage in keyof IntegrationProps['channels'][TChannel]['messages']]: Parameters<\",\n \" IntegrationProps['channels'][TChannel]['messages'][TMessage]\",\n ' >[0]',\n ' }',\n '}',\n 'export type AnyMessageProps = ValueOf<ValueOf<MessageProps>>',\n '',\n \"export type Context = HandlerProps['ctx']\",\n \"export type Logger = HandlerProps['logger']\",\n '',\n 'export type AckFunctions = {',\n ' [TChannel in keyof MessageProps]: {',\n \" [TMessage in keyof MessageProps[TChannel]]: Cast<MessageProps[TChannel][TMessage], AnyMessageProps>['ack']\",\n ' }',\n '}',\n 'export type AnyAckFunction = ValueOf<ValueOf<AckFunctions>>',\n '',\n 'export type ClientOperation = ValueOf<{',\n ' [K in keyof Client as Client[K] extends AsyncFunction ? K : never]: K',\n '}>',\n 'export type ClientRequests = {',\n ' [K in ClientOperation]: Parameters<Client[K]>[0]',\n '}',\n 'export type ClientResponses = {',\n ' [K in ClientOperation]: Awaited<ReturnType<Client[K]>>',\n '}',\n ].join('\\n')\n\n return content\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,aAAwB;AACxB,oBAAuB;AACvB,iCAAyC;AAElC,MAAM,wCAAwC,qBAAO;AAAA,EAClD;AAAA,EAED,YAAY,aAAwC;AACzD,UAAM;AAAA,MACJ,MAAM,OAAO;AAAA,MACb,YAAY;AAAA,IACd,CAAC;AACD,SAAK,iBAAiB,IAAI,oDAAyB,WAAW;AAC9D,SAAK,eAAe,QAAQ,SAAS;AACrC,SAAK,QAAQ,KAAK,cAAc;AAAA,EAClC;AAAA,EAEA,MAAa,aAAa;AACxB,QAAI,UAAU;AAEd,UAAM,gBAAgB,KAAK,eAAe,OAAO,IAAI;AAErD,eAAW;AAAA,MACT,OAAO;AAAA,MACP;AAAA,MACA,eAAe,KAAK,eAAe,gBAAgB;AAAA,MACnD,oBAAoB;AAAA,MACpB;AAAA,MACA,8CAA8C,KAAK,eAAe,QAAQ,KAAK,eAAe;AAAA,MAC9F;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,EAAE,KAAK,IAAI;AAEX,WAAO;AAAA,EACT;AACF;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/cli",
3
- "version": "1.4.10",
3
+ "version": "1.6.0",
4
4
  "description": "Botpress CLI",
5
5
  "scripts": {
6
6
  "build": "pnpm run bundle && pnpm run template:gen",
@@ -22,7 +22,7 @@
22
22
  "dependencies": {
23
23
  "@apidevtools/json-schema-ref-parser": "^11.7.0",
24
24
  "@botpress/client": "0.35.0",
25
- "@botpress/sdk": "1.4.0",
25
+ "@botpress/sdk": "1.6.0",
26
26
  "@bpinternal/const": "^0.0.20",
27
27
  "@bpinternal/tunnel": "^0.1.1",
28
28
  "@bpinternal/yargs-extra": "^0.0.3",
@@ -6,7 +6,7 @@ import * as sdk from "@botpress/sdk"
6
6
  import * as typings from "./typings/index"
7
7
  export * from "./typings/index"
8
8
 
9
- type TBot = typings.TBot
9
+ type TBot = sdk.DefaultBot<typings.TBot>
10
10
 
11
11
  export class Bot extends sdk.Bot<TBot> {}
12
12
 
@@ -0,0 +1,6 @@
1
+ /* eslint-disable */
2
+ /* tslint:disable */
3
+ // This file is generated. Do not edit it manually.
4
+
5
+ export type Actions = {
6
+ }
@@ -5,13 +5,16 @@
5
5
  import * as integrations from './integrations/index'
6
6
  import * as events from './events'
7
7
  import * as states from './states'
8
+ import * as actions from './actions'
8
9
 
9
10
  export * as integrations from './integrations/index'
10
11
  export * as events from './events/index'
11
12
  export * as states from './states/index'
13
+ export * as actions from './actions'
12
14
 
13
15
  export type TBot = {
14
16
  integrations: integrations.Integrations
15
17
  events: events.Events
16
18
  states: states.States
19
+ actions: actions.Actions
17
20
  }
@@ -6,7 +6,7 @@
6
6
  "private": true,
7
7
  "dependencies": {
8
8
  "@botpress/client": "0.35.0",
9
- "@botpress/sdk": "1.4.0"
9
+ "@botpress/sdk": "1.6.0"
10
10
  },
11
11
  "devDependencies": {
12
12
  "@types/node": "^18.11.17",
@@ -1,5 +1,7 @@
1
1
  import * as bp from '.botpress'
2
2
 
3
- const bot = new bp.Bot({})
3
+ const bot = new bp.Bot({
4
+ actions: {},
5
+ })
4
6
 
5
7
  export default bot
@@ -6,7 +6,7 @@ import * as sdk from "@botpress/sdk"
6
6
  import * as typings from "./typings/index"
7
7
  export * from "./typings/index"
8
8
 
9
- type TIntegration = typings.TIntegration
9
+ type TIntegration = sdk.DefaultIntegration<typings.TIntegration>
10
10
 
11
11
  export type IntegrationProps = sdk.IntegrationProps<TIntegration>
12
12
 
@@ -7,7 +7,7 @@
7
7
  "private": true,
8
8
  "dependencies": {
9
9
  "@botpress/client": "0.35.0",
10
- "@botpress/sdk": "1.4.0"
10
+ "@botpress/sdk": "1.6.0"
11
11
  },
12
12
  "devDependencies": {
13
13
  "@types/node": "^18.11.17",
@@ -6,7 +6,7 @@ import * as sdk from "@botpress/sdk"
6
6
  import * as typings from "./typings/index"
7
7
  export * from "./typings/index"
8
8
 
9
- type TIntegration = typings.TIntegration
9
+ type TIntegration = sdk.DefaultIntegration<typings.TIntegration>
10
10
 
11
11
  export type IntegrationProps = sdk.IntegrationProps<TIntegration>
12
12
 
@@ -7,7 +7,7 @@
7
7
  "private": true,
8
8
  "dependencies": {
9
9
  "@botpress/client": "0.35.0",
10
- "@botpress/sdk": "1.4.0"
10
+ "@botpress/sdk": "1.6.0"
11
11
  },
12
12
  "devDependencies": {
13
13
  "@types/node": "^18.11.17",
@@ -6,7 +6,7 @@ import * as sdk from "@botpress/sdk"
6
6
  import * as typings from "./typings/index"
7
7
  export * from "./typings/index"
8
8
 
9
- type TIntegration = typings.TIntegration
9
+ type TIntegration = sdk.DefaultIntegration<typings.TIntegration>
10
10
 
11
11
  export type IntegrationProps = sdk.IntegrationProps<TIntegration>
12
12
 
@@ -7,7 +7,7 @@
7
7
  "private": true,
8
8
  "dependencies": {
9
9
  "@botpress/client": "0.35.0",
10
- "@botpress/sdk": "1.4.0",
10
+ "@botpress/sdk": "1.6.0",
11
11
  "axios": "^1.6.8"
12
12
  },
13
13
  "devDependencies": {