1.1.5 • Published 20 days ago

dialogflow-cx-messenger-ts v1.1.5

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
20 days ago

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.

Stargazers over time

Stargazers over time

License

FOSSA Status

1.1.5

20 days ago

1.1.4

3 months ago

1.1.3

7 months ago

1.1.2

7 months ago

1.1.1

7 months ago

1.1.0

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago