1 | export interface PacketId {
|
2 | id: string;
|
3 | }
|
4 | export interface ReadPacket<T = any> {
|
5 | pattern: any;
|
6 | data: T;
|
7 | }
|
8 | export interface WritePacket<T = any> {
|
9 | err?: any;
|
10 | response?: T;
|
11 | isDisposed?: boolean;
|
12 | status?: string;
|
13 | }
|
14 | export type OutgoingRequest = ReadPacket & PacketId;
|
15 | export type IncomingRequest = ReadPacket & PacketId;
|
16 | export type OutgoingEvent = ReadPacket;
|
17 | export type IncomingEvent = ReadPacket;
|
18 | export type IncomingResponse = WritePacket & PacketId;
|
19 | export type OutgoingResponse = WritePacket & PacketId;
|