blob: 52089b8891e1e31acab0e2464a6a97e2f61f8458 (
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
54
55
|
import { IWidgetApiRequest, IWidgetApiRequestData } from "./IWidgetApiRequest";
import { WidgetApiFromWidgetAction, WidgetApiToWidgetAction } from "./WidgetApiAction";
import { IWidgetApiAcknowledgeResponseData, IWidgetApiResponse } from "./IWidgetApiResponse";
import { IWidget } from "./IWidget";
import { ModalButtonKind } from "./ModalButtonKind";
export declare enum BuiltInModalButtonID {
Close = "m.close"
}
export declare type ModalButtonID = BuiltInModalButtonID | string;
export interface IModalWidgetCreateData extends IWidgetApiRequestData {
[key: string]: unknown;
}
export interface IModalWidgetReturnData {
[key: string]: unknown;
}
export interface IModalWidgetOpenRequestDataButton {
id: ModalButtonID;
label: string;
kind: ModalButtonKind | string;
disabled?: boolean;
}
export interface IModalWidgetOpenRequestData extends IModalWidgetCreateData, Omit<IWidget, "id" | "creatorUserId"> {
buttons?: IModalWidgetOpenRequestDataButton[];
}
export interface IModalWidgetOpenRequest extends IWidgetApiRequest {
action: WidgetApiFromWidgetAction.OpenModalWidget;
data: IModalWidgetOpenRequestData;
}
export interface IModalWidgetOpenResponse extends IWidgetApiResponse {
response: IWidgetApiAcknowledgeResponseData;
}
export interface IModalWidgetButtonClickedRequestData extends IWidgetApiRequestData {
id: IModalWidgetOpenRequestDataButton["id"];
}
export interface IModalWidgetButtonClickedRequest extends IWidgetApiRequest {
action: WidgetApiToWidgetAction.ButtonClicked;
data: IModalWidgetButtonClickedRequestData;
}
export interface IModalWidgetButtonClickedResponse extends IWidgetApiResponse {
response: IWidgetApiAcknowledgeResponseData;
}
export interface IModalWidgetCloseRequest extends IWidgetApiRequest {
action: WidgetApiFromWidgetAction.CloseModalWidget;
data: IModalWidgetReturnData;
}
export interface IModalWidgetCloseResponse extends IWidgetApiResponse {
response: IWidgetApiAcknowledgeResponseData;
}
export interface IModalWidgetCloseNotificationRequest extends IWidgetApiRequest {
action: WidgetApiToWidgetAction.CloseModalWidget;
data: IModalWidgetReturnData;
}
export interface IModalWidgetCloseNotificationResponse extends IWidgetApiResponse {
response: IWidgetApiAcknowledgeResponseData;
}
|