dialogflow-javascript-client icon indicating copy to clipboard operation
dialogflow-javascript-client copied to clipboard

Fulfillment in IServerResponse Interface is missing messages

Open gerhardcit opened this issue 6 years ago • 1 comments

When you enter new lines in a mesages, the json returned are like this:

 "fulfillment": {
      "speech": "Ok, lets do a demo. Start by saying: 'I want to book leave' OR 'Change my language'",
      "messages": [
        {
          "type": 0,
          "id": "124eb75e-c424-461e-a114-e94126f9233c",
          "speech": "Ok, lets do a demo. Start by saying:\n'I want to book leave'  OR  \n'Change my language'"
        }
      ]

but the type definition in Interfaces.ts only has this: (missing the messages where the newline characters are shown)

export interface IServerResponse {
    id?: string;
    result?: {
        action: string,
        resolvedQuery: string,
        speech: string;
        fulfillment?: {
            speech: string
        }
    };

can you please update the Interfaces to represent the latest json response?

gerhardcit avatar Oct 30 '17 10:10 gerhardcit

It seems that IServerResponse interface is missing a lot of properties.

image

mboughaba avatar Mar 08 '18 07:03 mboughaba