summaryrefslogtreecommitdiff
path: root/includes/external/matrix/node_modules/matrix-widget-api/lib/models/Widget.d.ts
blob: d2278e68d5e82594528082d27077d234644a60b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import { IWidget, IWidgetData, WidgetType } from "..";
import { ITemplateParams } from "..";
/**
 * Represents the barest form of widget.
 */
export declare class Widget {
    private definition;
    constructor(definition: IWidget);
    /**
     * The user ID who created the widget.
     */
    get creatorUserId(): string;
    /**
     * The type of widget.
     */
    get type(): WidgetType;
    /**
     * The ID of the widget.
     */
    get id(): string;
    /**
     * The name of the widget, or null if not set.
     */
    get name(): string | null;
    /**
     * The title for the widget, or null if not set.
     */
    get title(): string | null;
    /**
     * The templated URL for the widget.
     */
    get templateUrl(): string;
    /**
     * The origin for this widget.
     */
    get origin(): string;
    /**
     * Whether or not the client should wait for the iframe to load. Defaults
     * to true.
     */
    get waitForIframeLoad(): boolean;
    /**
     * The raw data for the widget. This will always be defined, though
     * may be empty.
     */
    get rawData(): IWidgetData;
    /**
     * Gets a complete widget URL for the client to render.
     * @param {ITemplateParams} params The template parameters.
     * @returns {string} A templated URL.
     */
    getCompleteUrl(params: ITemplateParams): string;
}