UNPKG

2.98 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 BrowseCarouselOptions {
19 /**
20 * Sets the display options for the images in this carousel.
21 * @public
22 */
23 display?: Api.GoogleActionsV2UiElementsCarouselBrowseImageDisplayOptions;
24 /**
25 * List of 2-20 items to show in this carousel.
26 * @public
27 */
28 items: Api.GoogleActionsV2UiElementsCarouselBrowseItem[];
29}
30/** @public */
31export interface BrowseCarouselItemOptions {
32 /**
33 * Title of the option item.
34 * @public
35 */
36 title: string;
37 /**
38 * The URL of the link opened by clicking the BrowseCarouselItem.
39 * You should either set this field or `openUrlAction` but not both.
40 * @public
41 */
42 url?: string;
43 /**
44 * Description text of the item.
45 * @public
46 */
47 description?: string;
48 /**
49 * Footer text of the item.
50 * @public
51 */
52 footer?: string;
53 /**
54 * Image to show on item.
55 * @public
56 */
57 image?: Api.GoogleActionsV2UiElementsImage;
58 /**
59 * The URL action that occurs by clicking the BrowseCarouselItem.
60 * You should either set this field or `url` but not both.
61 * @public
62 */
63 openUrlAction?: Api.GoogleActionsV2UiElementsOpenUrlAction;
64}
65/**
66 * Class for initializing and constructing BrowseCarousel Items
67 * @public
68 */
69export interface BrowseCarouselItem extends Api.GoogleActionsV2UiElementsCarouselBrowseItem {
70}
71export declare class BrowseCarouselItem implements Api.GoogleActionsV2UiElementsCarouselBrowseItem {
72 /**
73 * @param options BrowseCarouselItem options
74 * @public
75 */
76 constructor(options: BrowseCarouselItemOptions);
77}
78/**
79 * Class for initializing and constructing Browse Carousel.
80 * @public
81 */
82export interface BrowseCarousel extends Api.GoogleActionsV2UiElementsCarouselBrowse {
83}
84export declare class BrowseCarousel implements Api.GoogleActionsV2UiElementsCarouselBrowse {
85 /**
86 * @param options BrowseCarousel options
87 * @public
88 */
89 constructor(options: BrowseCarouselOptions);
90 /**
91 * @param items BrowseCarousel items
92 * @public
93 */
94 constructor(items: Api.GoogleActionsV2UiElementsCarouselBrowseItem[]);
95 /**
96 * @param items BrowseCarousel items
97 * @public
98 */
99 constructor(...items: Api.GoogleActionsV2UiElementsCarouselBrowseItem[]);
100}