/** * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import * as Schema from '../../api/schema'; import { Simple } from './simple'; import { Suggestion } from './suggestion'; import { Canvas } from './canvas'; import { Link } from './content/link'; import { Content } from './content/content'; import { Card } from './content/card'; import { Collection } from './content/collection'; import { CollectionBrowse } from './content/collectionBrowse'; import { Image } from './content/image'; import { List } from './content/list'; import { Media } from './content/media'; import { Table } from './content/table'; import { OrderUpdate } from './content/order'; /** * Prompts define how your Action renders responses to users and how your * Action prompts them to continue. As you build your Action, you can add * prompts to invocations and to various places within scenes. Prompts can be * as simple as a text or speech response, or can be more complex and contain * rich content like cards, images, and tables. * * @see {@link https://developers.google.com/assistant/conversational/prompts | Developer Documentation} * @see {@link https://github.com/actions-on-google/actions-builder-conversation-components-nodejs/ | Conversation Components code sample} */ export declare type PromptItem = string | Simple | Content | Card | Collection | CollectionBrowse | Canvas | Image | List | Media | Table | Link | Suggestion | OrderUpdate; export declare class Prompt implements Schema.Prompt { content: Content | undefined; firstSimple: Simple | undefined; lastSimple: Simple | undefined; link: Link | undefined; suggestions: Suggestion[] | undefined; canvas: Canvas | undefined; orderUpdate: OrderUpdate | undefined; override: boolean | undefined; /** @hidden */ constructor(input?: Schema.Prompt); append(item: string): this; add(...items: PromptItem[]): this; }