-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.ts
36 lines (30 loc) · 878 Bytes
/
types.ts
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
import { Server as NetServer, Socket } from 'net';
import { NextApiResponse } from 'next';
import { Server as SocketIOServer } from 'socket.io';
import { DirectMessage, Member, Message, Profile, Server } from '@prisma/client';
export type ServerWithMemberWithProfiles = Server & {
members: MemberWithProfile[];
};
export type MessageWithMemberWithProfile = Message & {
member: MemberWithProfile;
};
export type DirectMessageWithMemberWithProfile = DirectMessage & {
member: MemberWithProfile;
};
export type MemberWithProfile = Member & { profile: Profile };
export type NextApiResponseServerIo = NextApiResponse & {
socket: Socket & {
server: NetServer & {
io: SocketIOServer,
},
},
};
export interface Emoji {
emoticons: string[];
id: string;
keywords: string[];
name: string;
native: string;
shortcodes: string;
unified: string;
}