mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-10 15:03:08 +02:00
improve type definitions
This commit is contained in:
parent
0bab055441
commit
05a902f3a5
1 changed files with 36 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
|||
import { CustomEmoji, DriveFile, MeDetailed, MessagingMessage, Note, Notification, PageEvent, User, UserGroup } from './entities';
|
||||
|
||||
type FIXME = any;
|
||||
|
||||
export type Channels = {
|
||||
main: {
|
||||
params: null;
|
||||
|
@ -29,30 +31,35 @@ export type Channels = {
|
|||
unreadChannel: () => void;
|
||||
myTokenRegenerated: () => void;
|
||||
};
|
||||
receives: null;
|
||||
};
|
||||
homeTimeline: {
|
||||
params: null;
|
||||
events: {
|
||||
note: (payload: Note) => void;
|
||||
};
|
||||
receives: null;
|
||||
};
|
||||
localTimeline: {
|
||||
params: null;
|
||||
events: {
|
||||
note: (payload: Note) => void;
|
||||
};
|
||||
receives: null;
|
||||
};
|
||||
hybridTimeline: {
|
||||
params: null;
|
||||
events: {
|
||||
note: (payload: Note) => void;
|
||||
};
|
||||
receives: null;
|
||||
};
|
||||
globalTimeline: {
|
||||
params: null;
|
||||
events: {
|
||||
note: (payload: Note) => void;
|
||||
};
|
||||
receives: null;
|
||||
};
|
||||
messaging: {
|
||||
params: {
|
||||
|
@ -65,6 +72,35 @@ export type Channels = {
|
|||
read: (payload: MessagingMessage['id'][]) => void;
|
||||
typers: (payload: User[]) => void;
|
||||
};
|
||||
receives: {
|
||||
read: {
|
||||
id: MessagingMessage['id'];
|
||||
};
|
||||
};
|
||||
};
|
||||
serverStats: {
|
||||
params: null;
|
||||
events: {
|
||||
stats: (payload: FIXME) => void;
|
||||
};
|
||||
receives: {
|
||||
requestLog: {
|
||||
id: string | number;
|
||||
length: number;
|
||||
};
|
||||
};
|
||||
};
|
||||
queueStats: {
|
||||
params: null;
|
||||
events: {
|
||||
stats: (payload: FIXME) => void;
|
||||
};
|
||||
receives: {
|
||||
requestLog: {
|
||||
id: string | number;
|
||||
length: number;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue