trucoshi 0.6.5 → 0.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types.d.ts +7 -2
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -61,6 +61,9 @@ export interface IChatMessage {
|
|
|
61
61
|
export interface IChatRoom {
|
|
62
62
|
id: string;
|
|
63
63
|
messages: Array<IChatMessage>;
|
|
64
|
+
socket: {
|
|
65
|
+
emit(socket: string): void;
|
|
66
|
+
};
|
|
64
67
|
send(user: IChatMessage["user"], message: string): void;
|
|
65
68
|
card(user: IChatMessage["user"], card: ICard): void;
|
|
66
69
|
command(team: 0 | 1, command: ECommand | number): void;
|
|
@@ -140,7 +143,7 @@ export interface ServerToClientEvents {
|
|
|
140
143
|
[EServerEvent.PREVIOUS_HAND]: (value: IMatchPreviousHand, callback: () => void) => void;
|
|
141
144
|
[EServerEvent.UPDATE_CHAT]: (room: IPublicChatRoom, message?: IChatMessage) => void;
|
|
142
145
|
[EServerEvent.UPDATE_ACTIVE_MATCHES]: (activeMatches: IPublicMatchInfo[]) => void;
|
|
143
|
-
[EServerEvent.UPDATE_MATCH]: (match: IPublicMatch) => void;
|
|
146
|
+
[EServerEvent.UPDATE_MATCH]: (match: IPublicMatch, callback?: () => void) => void;
|
|
144
147
|
[EServerEvent.PLAYER_USED_CARD]: (match: IPublicMatch, card: IPlayedCard) => void;
|
|
145
148
|
[EServerEvent.PLAYER_SAID_COMMAND]: (match: IPublicMatch, command: ISaidCommand) => void;
|
|
146
149
|
[EServerEvent.WAITING_PLAY]: (match: IPublicMatch, callback: (data: IWaitingPlayData) => void) => void;
|
|
@@ -156,7 +159,9 @@ export interface ClientToServerEvents {
|
|
|
156
159
|
[EClientEvent.START_MATCH]: (matchId: string, callback: IEventCallback<{
|
|
157
160
|
matchSessionId?: string;
|
|
158
161
|
}>) => void;
|
|
159
|
-
[EClientEvent.FETCH_MATCH]: (session: string | null, matchId: string, callback: IEventCallback
|
|
162
|
+
[EClientEvent.FETCH_MATCH]: (session: string | null, matchId: string, callback: IEventCallback<{
|
|
163
|
+
match: IPublicMatch | null;
|
|
164
|
+
}>) => void;
|
|
160
165
|
[EClientEvent.LIST_MATCHES]: (filters: {
|
|
161
166
|
state?: Array<EMatchState>;
|
|
162
167
|
}, callback: IEventCallback<{
|