npm
, but feel free to use the package manager of your choice like yarn
or pnpm
.integrations.definition.ts
: Contains the integration definition. It exports a data structure that describes your integration—what it is, what it can do, and how it can be used. This includes the integration’s name, version, actions, events, channels, and other capabilities. The template you chose declares a single action, helloWorld
, which accepts an optional name
parameter and returns a greeting message. Keep reading this documentation to learn about all the concepts you can define in this file.
src/index.ts
: Contains the integration implementation. It exports a data structure that implements what was defined in the integration definition. Keep reading this documentation to learn about the available callbacks you can implement.
.botpress/
: Contains the integration output, generated by the build command. It includes typings to help you implement your integration, and bundled JavaScript used to execute it. You can explore its contents, but avoid importing from nested files or folders, as its structure may change. Everything meant to be imported is available from the root of this folder.
icon.svg
, hub.md
: These files contain the integration’s icon and README. They are referenced in the integration definition.
package.json
, tsconfig.json
: As with any Node.js TypeScript project, these files contain your package’s metadata and dependencies, and the TypeScript configuration. The tsconfig.json
file is preconfigured to offer the best experience with the Botpress SDK. Run npm run check:type
to check for typing errors.
src/index.ts
, you’ll see register
and unregister
functions with a body that looks like this:
helloWorld
Card. It will return a greeting message.