mirror of
https://github.com/turt2live/matrix-dimension.git
synced 2024-10-01 01:05:53 -04:00
6c4e8f75d4
The useful bit for sending stickers. Implements the rest of #156
66 lines
1.4 KiB
TypeScript
66 lines
1.4 KiB
TypeScript
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 {
|
|
response: { error: { message: string, _error: Error } };
|
|
}
|
|
|
|
export interface ScalarSuccessResponse extends ScalarResponse {
|
|
response: { success: boolean };
|
|
}
|
|
|
|
export interface MembershipStateResponse extends ScalarUserResponse {
|
|
response: {
|
|
membership: string;
|
|
avatar_url: string;
|
|
displayname: string;
|
|
};
|
|
}
|
|
|
|
export interface JoinRuleStateResponse extends ScalarRoomResponse {
|
|
response: {
|
|
join_rule: string;
|
|
};
|
|
}
|
|
|
|
export interface WidgetsResponse extends ScalarRoomResponse {
|
|
response: ScalarWidget[];
|
|
}
|
|
|
|
export interface ScalarWidget {
|
|
type: "im.vector.modular.widgets";
|
|
state_key: string;
|
|
sender: string;
|
|
room_id: string;
|
|
content: {
|
|
type: string;
|
|
url: string;
|
|
name?: string;
|
|
data?: any;
|
|
}
|
|
}
|
|
|
|
export interface CanSendEventResponse extends ScalarRoomResponse {
|
|
event_type: string;
|
|
is_state: boolean;
|
|
response: boolean;
|
|
}
|
|
|
|
export interface RoomEncryptionStatusResponse extends ScalarRoomResponse {
|
|
response: boolean;
|
|
}
|
|
|
|
export interface SetPowerLevelResponse extends ScalarRoomResponse {
|
|
response: {
|
|
success: boolean;
|
|
};
|
|
} |