1 | /**
|
2 | * Copyright 2019 Google Inc. All Rights Reserved.
|
3 | *
|
4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | * you may not use this file except in compliance with the License.
|
6 | * You may obtain a copy of the License at
|
7 | *
|
8 | * http://www.apache.org/licenses/LICENSE-2.0
|
9 | *
|
10 | * Unless required by applicable law or agreed to in writing, software
|
11 | * distributed under the License is distributed on an "AS IS" BASIS,
|
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13 | * See the License for the specific language governing permissions and
|
14 | * limitations under the License.
|
15 | */
|
16 | import * as Api from '../../api/v2';
|
17 | import { JsonObject } from '../../../../common';
|
18 | /** @public */
|
19 | export interface HtmlResponseOptions<TData extends JsonObject = JsonObject> {
|
20 | /**
|
21 | * The url of the web app.
|
22 | *
|
23 | * @public
|
24 | */
|
25 | url?: string;
|
26 | /**
|
27 | * Configure if the mic is closed after this html response.
|
28 | *
|
29 | * Alias of `suppressMic`
|
30 | * @public
|
31 | */
|
32 | suppress?: boolean;
|
33 | /**
|
34 | * Communicate the following JSON object to the web app.
|
35 | *
|
36 | * Alias of `updatedState`
|
37 | * @public
|
38 | */
|
39 | data?: TData;
|
40 | }
|
41 | /**
|
42 | * Html Canvas Response
|
43 | * @public
|
44 | */
|
45 | export interface HtmlResponse extends Api.GoogleActionsV2UiElementsHtmlResponse {
|
46 | }
|
47 | export declare class HtmlResponse<TData extends JsonObject = JsonObject> implements Api.GoogleActionsV2UiElementsHtmlResponse {
|
48 | /**
|
49 | * @param options Canvas options
|
50 | * @public
|
51 | */
|
52 | constructor(options?: HtmlResponseOptions<TData> | Api.GoogleActionsV2UiElementsHtmlResponse);
|
53 | /** @public */
|
54 | get suppress(): boolean;
|
55 | /** @public */
|
56 | set suppress(suppress: boolean);
|
57 | /** @public */
|
58 | get data(): TData;
|
59 | /** @public */
|
60 | set data(data: TData);
|
61 | }
|