dialogflow-cx-messenger-ts
v1.2.1
Published
Typescript classes to use Dialogflow Messenger Types in Typescript
Downloads
39
Readme
Typescript Types for Dialogflow CX Messenger Integration
Typescript classes and types to use Dialogflow Messenger Integration in Typescript. Please check the Official Dialogflow CX Messenger Integration documentation for more information.
Installation
To install:
npm install dialogflow-cx-messenger-ts
or
yarn add dialogflow-cx-messenger-ts
Usage
Once installed, you can import the types and use them in your code:
import * as dfcxmessenger from 'dialogflow-cx-messenger-ts';
Then you can use it to create a response:
const response = {};
const content = new dfcxmessenger.RichContent();
const richContentElement = new dfcxmessenger.RichContentElement();
richContentElement.type = "image";
richContentElement.rawUrl = "https://example.com/images/logo.png";
richContentElement.accessibilityText = "Example logo";
content.richContent = [[richContentElement]];
response.fulfillmentResponse = {
messages: [{
text: {
text: [
information,
],
},
},
{
payload: content,
}],
};
Documentation
You can find the documentation here.
Example
You can find an example here
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure that read the Contributing file.
Sponsors
Does your company use this package? Help keep the project bug-free and feature rich by sponsoring the project.
Contributors
This project exists thanks to all the people who contribute. Check our contributing guidelines. Check all contributors here.