2017-05-27 19:45:07 -04:00
|
|
|
export interface ScalarResponse {
|
|
|
|
action: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ScalarRoomResponse extends ScalarResponse {
|
|
|
|
room_id: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ScalarUserResponse extends ScalarRoomResponse {
|
|
|
|
user_id: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ScalarErrorResponse extends ScalarResponse {
|
2017-12-09 18:34:59 -05:00
|
|
|
response: { error: { message: string, _error: Error } };
|
2017-05-27 19:45:07 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface ScalarSuccessResponse extends ScalarResponse {
|
2017-12-09 18:34:59 -05:00
|
|
|
response: { success: boolean };
|
2017-05-27 19:45:07 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface MembershipStateResponse extends ScalarUserResponse {
|
|
|
|
response: {
|
|
|
|
membership: string;
|
|
|
|
avatar_url: string;
|
|
|
|
displayname: string;
|
|
|
|
};
|
2017-06-04 23:31:31 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface JoinRuleStateResponse extends ScalarRoomResponse {
|
|
|
|
response: {
|
|
|
|
join_rule: string;
|
|
|
|
};
|
2017-08-29 00:08:32 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface WidgetsResponse extends ScalarRoomResponse {
|
|
|
|
response: {
|
|
|
|
type: "im.vector.modular.widgets";
|
|
|
|
state_key: string;
|
|
|
|
sender: string;
|
|
|
|
room_id: string;
|
|
|
|
content: {
|
|
|
|
type: string;
|
|
|
|
url: string;
|
|
|
|
name?: string;
|
|
|
|
data?: any;
|
|
|
|
}
|
|
|
|
}[];
|
2017-12-10 04:35:24 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface CanSendEventResponse extends ScalarRoomResponse {
|
|
|
|
event_type: string;
|
|
|
|
is_state: boolean;
|
|
|
|
response: boolean;
|
2017-12-10 05:17:33 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface RoomEncryptionStatusResponse extends ScalarRoomResponse {
|
|
|
|
response: boolean;
|
2017-05-27 19:45:07 -04:00
|
|
|
}
|