Jovo v4 Google List Reponse

google-assistant

#1

Hello
I’m trying to implement a list of response for the Google Assistant. https://developers.google.com/assistant/conversational/prompts-selection#json. I created ListResponseOutput with this format:

@Output() export class ListResponseOutput extends BaseOutput { build(): OutputTemplate | OutputTemplate[] { return { platforms: { googleAssistant: { nativeResponse: { session: { id: 'session_id', params: {}, languageCode: 'en-US', typeOverrides: [ { name: 'prompt_option', synonym: { entries: [ { name: 'ITEM_1', synonyms: ['Item 1', 'First item'], display: { title: 'Item #1', description: 'Description of Item #1', image: { alt: 'Google Assistant logo', height: 0, url: 'https://developers.google.com/assistant/assistant_96.png', width: 0, }, }, }, { name: 'ITEM_2', synonyms: ['Item 2', 'Second item'], display: { title: 'Item #2', description: 'Description of Item #2', image: { alt: 'Google Assistant logo', height: 0, url: 'https://developers.google.com/assistant/assistant_96.png', width: 0, }, }, }, { name: 'ITEM_3', synonyms: ['Item 3', 'Third item'], display: { title: 'Item #3', description: 'Description of Item #3', image: { alt: 'Google Assistant logo', height: 0, url: 'https://developers.google.com/assistant/assistant_96.png', width: 0, }, }, }, { name: 'ITEM_4', synonyms: ['Item 4', 'Fourth item'], display: { title: 'Item #4', description: 'Description of Item #4', image: { alt: 'Google Assistant logo', height: 0, url: 'https://developers.google.com/assistant/assistant_96.png', width: 0, }, }, }, ], }, typeOverrideMode: 'TYPE_REPLACE', }, ], }, prompt: { override: false, content: { list: { items: [ { key: 'ITEM_1', }, { key: 'ITEM_2', }, { key: 'ITEM_3', }, { key: 'ITEM_4', }, ], subtitle: 'List subtitle', title: 'List title', }, }, firstSimple: { speech: 'This is a list.', text: 'This is a list.', }, }, }, }, }, }; } }.

I call the output function in the component class:
START() { return this.$send(ListResponseOutput); }

Or it is imperative to create a scene and add the scene in my output like this
scene: { name: this.jovo.$googleAssistant?.$request.scene?.name, slots: {}, next: { name: 'MainScene', }, },

But when I would like to replace name by this
scene: { name: this.jovo.$googleAssistant?.$request.scene?.name, slots: this.options.slots || {}, next: { name: this.options.name, }, },

We have an error message “No overload matches this call.” Because this.options? I don’t find slots.
And how to define name for this.options.name

Can you help me to build output if necessary and create a scene if it’s mandatory.

Thanks