1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | import * as Api from '../../api/v2';
|
17 | import { SimpleResponse } from './simple';
|
18 | import { BasicCard, Table } from './card';
|
19 | import { BrowseCarousel } from './browse';
|
20 | import { MediaResponse } from './media';
|
21 | import { OrderUpdate } from './order';
|
22 | import { LinkOutSuggestion } from './linkout';
|
23 | import { Suggestions } from './suggestion';
|
24 | import { HtmlResponse } from './html';
|
25 |
|
26 | export declare type RichResponseItem = string | SimpleResponse | BasicCard | Table | BrowseCarousel | MediaResponse | OrderUpdate | LinkOutSuggestion | HtmlResponse | Api.GoogleActionsV2RichResponseItem;
|
27 |
|
28 | export interface RichResponseOptions {
|
29 | |
30 |
|
31 |
|
32 |
|
33 |
|
34 | items?: RichResponseItem[];
|
35 | |
36 |
|
37 |
|
38 |
|
39 | suggestions?: string[] | Suggestions;
|
40 | |
41 |
|
42 |
|
43 |
|
44 | link?: Api.GoogleActionsV2UiElementsLinkOutSuggestion;
|
45 | }
|
46 |
|
47 |
|
48 |
|
49 |
|
50 | export interface RichResponse extends Api.GoogleActionsV2RichResponse {
|
51 | }
|
52 | export declare class RichResponse implements Api.GoogleActionsV2RichResponse {
|
53 | |
54 |
|
55 |
|
56 |
|
57 | constructor(options: RichResponseOptions);
|
58 | /**
|
59 | * @param items RichResponse items
|
60 | * @public
|
61 | */
|
62 | constructor(items: RichResponseItem[]);
|
63 | /**
|
64 | * @param items RichResponse items
|
65 | * @public
|
66 | */
|
67 | constructor(...items: RichResponseItem[]);
|
68 | /**
|
69 | * Add a RichResponse item
|
70 | * @public
|
71 | */
|
72 | add(...items: RichResponseItem[]): this;
|
73 | /**
|
74 | * Adds a single suggestion or list of suggestions to list of items.
|
75 | * @public
|
76 | */
|
77 | addSuggestion(...suggestions: (string | Suggestions)[]): this;
|
78 | }
|