UNPKG

1.8 kBTypeScriptView Raw
1import { interfaces } from 'ask-sdk-model';
2import Image = interfaces.display.Image;
3/**
4 * Responsible for building image object using ask-sdk-model in Alexa skills kit display interface
5 * https://developer.amazon.com/docs/custom-skills/display-interface-reference.html#image-object-specifications.
6 */
7export declare class ImageHelper {
8 protected image: Image;
9 /**
10 * Sets content description in image object
11 * @param {string} description text used to describe the image for a screen reader
12 * @returns {ImageHelper}
13 */
14 withDescription(description: string): this;
15 /**
16 * Add image instance in image object
17 * @param {string} url source of the image
18 * @param {interfaces.display.ImageSize} size size of the image. Accepted values:
19 * X_SMALL: Displayed within extra small containers
20 * SMALL: Displayed within small containers
21 * MEDIUM: Displayed within medium containers
22 * LARGE: Displayed within large containers
23 * X_LARGE Displayed within extra large containers
24 * By default, for Echo Show, size takes the value X_SMALL. If the other size values are included,
25 * then the order of precedence for displaying images begins with X_LARGE and proceeds downward,
26 * which means that larger images will be downscaled for display on Echo Show if provided.
27 * For the best user experience, include the appropriately sized image, and do not include larger images.
28 * @param {number} widthPixels widthPixels of the image
29 * @param {number} heightPixels heightPixels of the image
30 * @returns {ImageHelper}
31 */
32 addImageInstance(url: string, size?: interfaces.display.ImageSize, widthPixels?: number, heightPixels?: number): this;
33 /**
34 * @returns {Image}
35 */
36 getImage(): Image;
37}