UNPKG

2.5 kBTypeScriptView Raw
1/**
2 * Copyright 2018 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 */
16import * as Api from '../../api/v2';
17/** @public */
18export interface MediaObjectOptions {
19 /**
20 * MediaObject URL.
21 * @public
22 */
23 url: string;
24 /** @public */
25 description?: string;
26 /**
27 * Name of the MediaObject.
28 * @public
29 */
30 name?: string;
31 /**
32 * Icon image.
33 * @public
34 */
35 icon?: Api.GoogleActionsV2UiElementsImage;
36 /**
37 * Large image.
38 * @public
39 */
40 image?: Api.GoogleActionsV2UiElementsImage;
41}
42/**
43 * Class for initializing and constructing MediaObject
44 * @public
45 */
46export interface MediaObject extends Api.GoogleActionsV2MediaObject {
47}
48export declare class MediaObject implements Api.GoogleActionsV2MediaObject {
49 /**
50 * @param options MediaObject options or just a string for the url
51 * @public
52 */
53 constructor(options: MediaObjectOptions | string);
54}
55export declare type MediaObjectString = Api.GoogleActionsV2MediaObject | string;
56/** @public */
57export interface MediaResponseOptions {
58 /**
59 * Array of MediaObject held in the MediaResponse.
60 * @public
61 */
62 objects: MediaObjectString[];
63 /**
64 * Type of the media within this MediaResponse.
65 * Defaults to 'AUDIO'
66 * @public
67 */
68 type?: Api.GoogleActionsV2MediaResponseMediaType;
69}
70/**
71 * Class for initializing and constructing MediaResponse.
72 * @public
73 */
74export interface MediaResponse extends Api.GoogleActionsV2MediaResponse {
75}
76export declare class MediaResponse implements Api.GoogleActionsV2MediaResponse {
77 /**
78 * @param options MediaResponse options
79 * @public
80 */
81 constructor(options: MediaResponseOptions);
82 /**
83 * @param objects MediaObjects
84 * @public
85 */
86 constructor(objects: MediaObjectString[]);
87 /**
88 * @param objects MediaObjects
89 * @public
90 */
91 constructor(...objects: MediaObjectString[]);
92}