tachyon-protocol 1.7.0 → 1.8.0
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/README.md +9 -6
- package/dist/index.d.mts +60 -1976
- package/dist/index.d.ts +60 -1976
- package/dist/index.js +174 -161
- package/dist/index.mjs +171 -158
- package/dist/types.d.mts +603 -0
- package/dist/types.d.ts +603 -0
- package/dist/types.js +18 -0
- package/dist/types.mjs +0 -0
- package/dist/validators.d.mts +40 -53
- package/dist/validators.d.ts +40 -53
- package/dist/validators.js +1 -1
- package/dist/validators.mjs +2 -1
- package/license.md +19 -19
- package/package.json +38 -32
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,603 @@
|
|
|
1
|
+
type TachyonCommand = AutohostAddPlayerRequest | AutohostAddPlayerResponse | AutohostKickPlayerRequest | AutohostKickPlayerResponse | AutohostKillRequest | AutohostKillResponse | AutohostMutePlayerRequest | AutohostMutePlayerResponse | AutohostSendCommandRequest | AutohostSendCommandResponse | AutohostSendMessageRequest | AutohostSendMessageResponse | AutohostSpecPlayersRequest | AutohostSpecPlayersResponse | AutohostStartRequest | AutohostStartResponse | AutohostStatusEvent | AutohostSubscribeUpdatesRequest | AutohostSubscribeUpdatesResponse | AutohostUpdateEvent | BattleStartRequest | BattleStartResponse | MatchmakingCancelRequest | MatchmakingCancelResponse | MatchmakingFoundEvent | MatchmakingFoundUpdateEvent | MatchmakingListRequest | MatchmakingListResponse | MatchmakingLostEvent | MatchmakingQueueRequest | MatchmakingQueueResponse | MatchmakingQueueUpdateEvent | MatchmakingReadyRequest | MatchmakingReadyResponse | MatchmakingReadyUpdateEvent | SystemDisconnectRequest | SystemDisconnectResponse | SystemServerStatsRequest | SystemServerStatsResponse | UserUpdatedEvent;
|
|
2
|
+
type UserId = string;
|
|
3
|
+
type AutohostAddPlayerResponse = AutohostAddPlayerOkResponse | AutohostAddPlayerFailResponse;
|
|
4
|
+
type AutohostKickPlayerResponse = AutohostKickPlayerOkResponse | AutohostKickPlayerFailResponse;
|
|
5
|
+
type AutohostKillResponse = AutohostKillOkResponse | AutohostKillFailResponse;
|
|
6
|
+
type AutohostMutePlayerResponse = AutohostMutePlayerOkResponse | AutohostMutePlayerFailResponse;
|
|
7
|
+
type AutohostSendCommandResponse = AutohostSendCommandOkResponse | AutohostSendCommandFailResponse;
|
|
8
|
+
type AutohostSendMessageResponse = AutohostSendMessageOkResponse | AutohostSendMessageFailResponse;
|
|
9
|
+
type AutohostSpecPlayersResponse = AutohostSpecPlayersOkResponse | AutohostSpecPlayersFailResponse;
|
|
10
|
+
type StartPosType = "fixed" | "random" | "ingame" | "beforegame";
|
|
11
|
+
type AutohostStartResponse = AutohostStartOkResponse | AutohostStartFailResponse;
|
|
12
|
+
type UnixTime = number;
|
|
13
|
+
type AutohostSubscribeUpdatesResponse = AutohostSubscribeUpdatesOkResponse | AutohostSubscribeUpdatesFailResponse;
|
|
14
|
+
type PlayerChatUpdate = {
|
|
15
|
+
type: "player_chat";
|
|
16
|
+
userId: UserId;
|
|
17
|
+
message: string;
|
|
18
|
+
destination: "allies" | "all" | "spectators";
|
|
19
|
+
} | {
|
|
20
|
+
type: "player_chat";
|
|
21
|
+
userId: UserId;
|
|
22
|
+
message: string;
|
|
23
|
+
destination: "player";
|
|
24
|
+
toUserId: UserId;
|
|
25
|
+
};
|
|
26
|
+
type BattleStartResponse = BattleStartOkResponse | BattleStartFailResponse;
|
|
27
|
+
type MatchmakingCancelResponse = MatchmakingCancelOkResponse | MatchmakingCancelFailResponse;
|
|
28
|
+
type MatchmakingListResponse = MatchmakingListOkResponse | MatchmakingListFailResponse;
|
|
29
|
+
type MatchmakingQueueResponse = MatchmakingQueueOkResponse | MatchmakingQueueFailResponse;
|
|
30
|
+
type MatchmakingReadyResponse = MatchmakingReadyOkResponse | MatchmakingReadyFailResponse;
|
|
31
|
+
type SystemDisconnectResponse = SystemDisconnectOkResponse | SystemDisconnectFailResponse;
|
|
32
|
+
type SystemServerStatsResponse = SystemServerStatsOkResponse | SystemServerStatsFailResponse;
|
|
33
|
+
interface AutohostAddPlayerRequest {
|
|
34
|
+
type: "request";
|
|
35
|
+
messageId: string;
|
|
36
|
+
commandId: "autohost/addPlayer";
|
|
37
|
+
data: AutohostAddPlayerRequestData;
|
|
38
|
+
}
|
|
39
|
+
interface AutohostAddPlayerRequestData {
|
|
40
|
+
battleId: string;
|
|
41
|
+
userId: UserId;
|
|
42
|
+
name: string;
|
|
43
|
+
password: string;
|
|
44
|
+
}
|
|
45
|
+
interface AutohostAddPlayerOkResponse {
|
|
46
|
+
type: "response";
|
|
47
|
+
messageId: string;
|
|
48
|
+
commandId: "autohost/addPlayer";
|
|
49
|
+
status: "success";
|
|
50
|
+
}
|
|
51
|
+
interface AutohostAddPlayerFailResponse {
|
|
52
|
+
type: "response";
|
|
53
|
+
messageId: string;
|
|
54
|
+
commandId: "autohost/addPlayer";
|
|
55
|
+
status: "failed";
|
|
56
|
+
reason: "internal_error" | "unauthorized" | "invalid_request" | "command_unimplemented";
|
|
57
|
+
}
|
|
58
|
+
interface AutohostKickPlayerRequest {
|
|
59
|
+
type: "request";
|
|
60
|
+
messageId: string;
|
|
61
|
+
commandId: "autohost/kickPlayer";
|
|
62
|
+
data: AutohostKickPlayerRequestData;
|
|
63
|
+
}
|
|
64
|
+
interface AutohostKickPlayerRequestData {
|
|
65
|
+
battleId: string;
|
|
66
|
+
userId: UserId;
|
|
67
|
+
}
|
|
68
|
+
interface AutohostKickPlayerOkResponse {
|
|
69
|
+
type: "response";
|
|
70
|
+
messageId: string;
|
|
71
|
+
commandId: "autohost/kickPlayer";
|
|
72
|
+
status: "success";
|
|
73
|
+
}
|
|
74
|
+
interface AutohostKickPlayerFailResponse {
|
|
75
|
+
type: "response";
|
|
76
|
+
messageId: string;
|
|
77
|
+
commandId: "autohost/kickPlayer";
|
|
78
|
+
status: "failed";
|
|
79
|
+
reason: "internal_error" | "unauthorized" | "invalid_request" | "command_unimplemented";
|
|
80
|
+
}
|
|
81
|
+
interface AutohostKillRequest {
|
|
82
|
+
type: "request";
|
|
83
|
+
messageId: string;
|
|
84
|
+
commandId: "autohost/kill";
|
|
85
|
+
data: AutohostKillRequestData;
|
|
86
|
+
}
|
|
87
|
+
interface AutohostKillRequestData {
|
|
88
|
+
battleId: string;
|
|
89
|
+
}
|
|
90
|
+
interface AutohostKillOkResponse {
|
|
91
|
+
type: "response";
|
|
92
|
+
messageId: string;
|
|
93
|
+
commandId: "autohost/kill";
|
|
94
|
+
status: "success";
|
|
95
|
+
}
|
|
96
|
+
interface AutohostKillFailResponse {
|
|
97
|
+
type: "response";
|
|
98
|
+
messageId: string;
|
|
99
|
+
commandId: "autohost/kill";
|
|
100
|
+
status: "failed";
|
|
101
|
+
reason: "internal_error" | "unauthorized" | "invalid_request" | "command_unimplemented";
|
|
102
|
+
}
|
|
103
|
+
interface AutohostMutePlayerRequest {
|
|
104
|
+
type: "request";
|
|
105
|
+
messageId: string;
|
|
106
|
+
commandId: "autohost/mutePlayer";
|
|
107
|
+
data: AutohostMutePlayerRequestData;
|
|
108
|
+
}
|
|
109
|
+
interface AutohostMutePlayerRequestData {
|
|
110
|
+
battleId: string;
|
|
111
|
+
userId: UserId;
|
|
112
|
+
chat: boolean;
|
|
113
|
+
draw: boolean;
|
|
114
|
+
}
|
|
115
|
+
interface AutohostMutePlayerOkResponse {
|
|
116
|
+
type: "response";
|
|
117
|
+
messageId: string;
|
|
118
|
+
commandId: "autohost/mutePlayer";
|
|
119
|
+
status: "success";
|
|
120
|
+
}
|
|
121
|
+
interface AutohostMutePlayerFailResponse {
|
|
122
|
+
type: "response";
|
|
123
|
+
messageId: string;
|
|
124
|
+
commandId: "autohost/mutePlayer";
|
|
125
|
+
status: "failed";
|
|
126
|
+
reason: "internal_error" | "unauthorized" | "invalid_request" | "command_unimplemented";
|
|
127
|
+
}
|
|
128
|
+
interface AutohostSendCommandRequest {
|
|
129
|
+
type: "request";
|
|
130
|
+
messageId: string;
|
|
131
|
+
commandId: "autohost/sendCommand";
|
|
132
|
+
data: AutohostSendCommandRequestData;
|
|
133
|
+
}
|
|
134
|
+
interface AutohostSendCommandRequestData {
|
|
135
|
+
battleId: string;
|
|
136
|
+
command: string;
|
|
137
|
+
arguments?: string[];
|
|
138
|
+
}
|
|
139
|
+
interface AutohostSendCommandOkResponse {
|
|
140
|
+
type: "response";
|
|
141
|
+
messageId: string;
|
|
142
|
+
commandId: "autohost/sendCommand";
|
|
143
|
+
status: "success";
|
|
144
|
+
}
|
|
145
|
+
interface AutohostSendCommandFailResponse {
|
|
146
|
+
type: "response";
|
|
147
|
+
messageId: string;
|
|
148
|
+
commandId: "autohost/sendCommand";
|
|
149
|
+
status: "failed";
|
|
150
|
+
reason: "internal_error" | "unauthorized" | "invalid_request" | "command_unimplemented";
|
|
151
|
+
}
|
|
152
|
+
interface AutohostSendMessageRequest {
|
|
153
|
+
type: "request";
|
|
154
|
+
messageId: string;
|
|
155
|
+
commandId: "autohost/sendMessage";
|
|
156
|
+
data: AutohostSendMessageRequestData;
|
|
157
|
+
}
|
|
158
|
+
interface AutohostSendMessageRequestData {
|
|
159
|
+
battleId: string;
|
|
160
|
+
message: string;
|
|
161
|
+
}
|
|
162
|
+
interface AutohostSendMessageOkResponse {
|
|
163
|
+
type: "response";
|
|
164
|
+
messageId: string;
|
|
165
|
+
commandId: "autohost/sendMessage";
|
|
166
|
+
status: "success";
|
|
167
|
+
}
|
|
168
|
+
interface AutohostSendMessageFailResponse {
|
|
169
|
+
type: "response";
|
|
170
|
+
messageId: string;
|
|
171
|
+
commandId: "autohost/sendMessage";
|
|
172
|
+
status: "failed";
|
|
173
|
+
reason: "internal_error" | "unauthorized" | "invalid_request" | "command_unimplemented";
|
|
174
|
+
}
|
|
175
|
+
interface AutohostSpecPlayersRequest {
|
|
176
|
+
type: "request";
|
|
177
|
+
messageId: string;
|
|
178
|
+
commandId: "autohost/specPlayers";
|
|
179
|
+
data: AutohostSpecPlayersRequestData;
|
|
180
|
+
}
|
|
181
|
+
interface AutohostSpecPlayersRequestData {
|
|
182
|
+
battleId: string;
|
|
183
|
+
userIds: UserId[];
|
|
184
|
+
}
|
|
185
|
+
interface AutohostSpecPlayersOkResponse {
|
|
186
|
+
type: "response";
|
|
187
|
+
messageId: string;
|
|
188
|
+
commandId: "autohost/specPlayers";
|
|
189
|
+
status: "success";
|
|
190
|
+
}
|
|
191
|
+
interface AutohostSpecPlayersFailResponse {
|
|
192
|
+
type: "response";
|
|
193
|
+
messageId: string;
|
|
194
|
+
commandId: "autohost/specPlayers";
|
|
195
|
+
status: "failed";
|
|
196
|
+
reason: "internal_error" | "unauthorized" | "invalid_request" | "command_unimplemented";
|
|
197
|
+
}
|
|
198
|
+
interface AutohostStartRequest {
|
|
199
|
+
type: "request";
|
|
200
|
+
messageId: string;
|
|
201
|
+
commandId: "autohost/start";
|
|
202
|
+
data: AutohostStartRequestData;
|
|
203
|
+
}
|
|
204
|
+
interface AutohostStartRequestData {
|
|
205
|
+
battleId: string;
|
|
206
|
+
engineVersion: string;
|
|
207
|
+
gameName: string;
|
|
208
|
+
mapName: string;
|
|
209
|
+
gameArchiveHash?: string;
|
|
210
|
+
mapArchiveHash?: string;
|
|
211
|
+
startDelay?: number;
|
|
212
|
+
startPosType: StartPosType;
|
|
213
|
+
allyTeams: [AllyTeam, ...AllyTeam[]];
|
|
214
|
+
spectators?: Player[];
|
|
215
|
+
mapOptions?: {
|
|
216
|
+
[k: string]: string;
|
|
217
|
+
};
|
|
218
|
+
gameOptions?: {
|
|
219
|
+
[k: string]: string;
|
|
220
|
+
};
|
|
221
|
+
restrictions?: {
|
|
222
|
+
[k: string]: number;
|
|
223
|
+
};
|
|
224
|
+
luamsgRegexp?: string;
|
|
225
|
+
}
|
|
226
|
+
interface AllyTeam {
|
|
227
|
+
teams: [Team, ...Team[]];
|
|
228
|
+
startBox?: StartBox;
|
|
229
|
+
allies?: number[];
|
|
230
|
+
customProperties?: CustomStartScriptProperties;
|
|
231
|
+
}
|
|
232
|
+
interface Team {
|
|
233
|
+
players?: Player[];
|
|
234
|
+
bots?: Bot[];
|
|
235
|
+
advantage?: number;
|
|
236
|
+
incomeMultiplier?: number;
|
|
237
|
+
faction?: string;
|
|
238
|
+
color?: {
|
|
239
|
+
r: number;
|
|
240
|
+
g: number;
|
|
241
|
+
b: number;
|
|
242
|
+
};
|
|
243
|
+
startPos?: {
|
|
244
|
+
x: number;
|
|
245
|
+
y: number;
|
|
246
|
+
};
|
|
247
|
+
customProperties?: CustomStartScriptProperties;
|
|
248
|
+
}
|
|
249
|
+
interface Player {
|
|
250
|
+
userId: UserId;
|
|
251
|
+
name: string;
|
|
252
|
+
password: string;
|
|
253
|
+
rank?: number;
|
|
254
|
+
countryCode?: string;
|
|
255
|
+
customProperties?: CustomStartScriptProperties;
|
|
256
|
+
}
|
|
257
|
+
interface CustomStartScriptProperties {
|
|
258
|
+
[k: string]: string;
|
|
259
|
+
}
|
|
260
|
+
interface Bot {
|
|
261
|
+
hostUserId: string;
|
|
262
|
+
name?: string;
|
|
263
|
+
aiShortName: string;
|
|
264
|
+
aiVersion?: string;
|
|
265
|
+
aiOptions?: {
|
|
266
|
+
[k: string]: string;
|
|
267
|
+
};
|
|
268
|
+
customProperties?: CustomStartScriptProperties;
|
|
269
|
+
}
|
|
270
|
+
interface StartBox {
|
|
271
|
+
top: number;
|
|
272
|
+
bottom: number;
|
|
273
|
+
left: number;
|
|
274
|
+
right: number;
|
|
275
|
+
}
|
|
276
|
+
interface AutohostStartOkResponse {
|
|
277
|
+
type: "response";
|
|
278
|
+
messageId: string;
|
|
279
|
+
commandId: "autohost/start";
|
|
280
|
+
status: "success";
|
|
281
|
+
data: AutohostStartOkResponseData;
|
|
282
|
+
}
|
|
283
|
+
interface AutohostStartOkResponseData {
|
|
284
|
+
ips: string[];
|
|
285
|
+
port: number;
|
|
286
|
+
}
|
|
287
|
+
interface AutohostStartFailResponse {
|
|
288
|
+
type: "response";
|
|
289
|
+
messageId: string;
|
|
290
|
+
commandId: "autohost/start";
|
|
291
|
+
status: "failed";
|
|
292
|
+
reason: "battle_already_exists" | "engine_version_not_available" | "internal_error" | "unauthorized" | "invalid_request" | "command_unimplemented";
|
|
293
|
+
}
|
|
294
|
+
interface AutohostStatusEvent {
|
|
295
|
+
type: "event";
|
|
296
|
+
messageId: string;
|
|
297
|
+
commandId: "autohost/status";
|
|
298
|
+
data: AutohostStatusEventData;
|
|
299
|
+
}
|
|
300
|
+
interface AutohostStatusEventData {
|
|
301
|
+
maxBattles: number;
|
|
302
|
+
currentBattles: number;
|
|
303
|
+
}
|
|
304
|
+
interface AutohostSubscribeUpdatesRequest {
|
|
305
|
+
type: "request";
|
|
306
|
+
messageId: string;
|
|
307
|
+
commandId: "autohost/subscribeUpdates";
|
|
308
|
+
data: AutohostSubscribeUpdatesRequestData;
|
|
309
|
+
}
|
|
310
|
+
interface AutohostSubscribeUpdatesRequestData {
|
|
311
|
+
since: UnixTime;
|
|
312
|
+
}
|
|
313
|
+
interface AutohostSubscribeUpdatesOkResponse {
|
|
314
|
+
type: "response";
|
|
315
|
+
messageId: string;
|
|
316
|
+
commandId: "autohost/subscribeUpdates";
|
|
317
|
+
status: "success";
|
|
318
|
+
}
|
|
319
|
+
interface AutohostSubscribeUpdatesFailResponse {
|
|
320
|
+
type: "response";
|
|
321
|
+
messageId: string;
|
|
322
|
+
commandId: "autohost/subscribeUpdates";
|
|
323
|
+
status: "failed";
|
|
324
|
+
reason: "internal_error" | "unauthorized" | "invalid_request" | "command_unimplemented";
|
|
325
|
+
}
|
|
326
|
+
interface AutohostUpdateEvent {
|
|
327
|
+
type: "event";
|
|
328
|
+
messageId: string;
|
|
329
|
+
commandId: "autohost/update";
|
|
330
|
+
data: AutohostUpdateEventData;
|
|
331
|
+
}
|
|
332
|
+
interface AutohostUpdateEventData {
|
|
333
|
+
battleId: string;
|
|
334
|
+
time: UnixTime;
|
|
335
|
+
update: StartUpdate | FinishedUpdate | EngineMessageUpdate | EngineWarningUpdate | EngineQuitUpdate | EngineCrashUpdate | PlayerJoinedUpdate | PlayerLeftUpdate | PlayerChatUpdate | PlayerDefeatedUpdate | LuaMsgUpdate;
|
|
336
|
+
}
|
|
337
|
+
interface StartUpdate {
|
|
338
|
+
type: "start";
|
|
339
|
+
}
|
|
340
|
+
interface FinishedUpdate {
|
|
341
|
+
type: "finished";
|
|
342
|
+
userId: UserId;
|
|
343
|
+
winningAllyTeams: [number, ...number[]];
|
|
344
|
+
}
|
|
345
|
+
interface EngineMessageUpdate {
|
|
346
|
+
type: "engine_message";
|
|
347
|
+
message: string;
|
|
348
|
+
}
|
|
349
|
+
interface EngineWarningUpdate {
|
|
350
|
+
type: "engine_warning";
|
|
351
|
+
message: string;
|
|
352
|
+
}
|
|
353
|
+
interface EngineQuitUpdate {
|
|
354
|
+
type: "engine_quit";
|
|
355
|
+
}
|
|
356
|
+
interface EngineCrashUpdate {
|
|
357
|
+
type: "engine_crash";
|
|
358
|
+
details?: string;
|
|
359
|
+
}
|
|
360
|
+
interface PlayerJoinedUpdate {
|
|
361
|
+
type: "player_joined";
|
|
362
|
+
userId: UserId;
|
|
363
|
+
playerNumber: number;
|
|
364
|
+
}
|
|
365
|
+
interface PlayerLeftUpdate {
|
|
366
|
+
type: "player_left";
|
|
367
|
+
userId: UserId;
|
|
368
|
+
reason: "lost_connection" | "left" | "kicked";
|
|
369
|
+
}
|
|
370
|
+
interface PlayerDefeatedUpdate {
|
|
371
|
+
type: "player_defeated";
|
|
372
|
+
userId: UserId;
|
|
373
|
+
}
|
|
374
|
+
interface LuaMsgUpdate {
|
|
375
|
+
type: "luamsg";
|
|
376
|
+
userId: UserId;
|
|
377
|
+
script: "ui" | "game" | "rules";
|
|
378
|
+
uiMode?: "all" | "allies" | "spectators";
|
|
379
|
+
data: string;
|
|
380
|
+
}
|
|
381
|
+
interface BattleStartRequest {
|
|
382
|
+
type: "request";
|
|
383
|
+
messageId: string;
|
|
384
|
+
commandId: "battle/start";
|
|
385
|
+
data: BattleStartRequestData;
|
|
386
|
+
}
|
|
387
|
+
interface BattleStartRequestData {
|
|
388
|
+
username: string;
|
|
389
|
+
password: string;
|
|
390
|
+
ip: string;
|
|
391
|
+
port: number;
|
|
392
|
+
}
|
|
393
|
+
interface BattleStartOkResponse {
|
|
394
|
+
type: "response";
|
|
395
|
+
messageId: string;
|
|
396
|
+
commandId: "battle/start";
|
|
397
|
+
status: "success";
|
|
398
|
+
}
|
|
399
|
+
interface BattleStartFailResponse {
|
|
400
|
+
type: "response";
|
|
401
|
+
messageId: string;
|
|
402
|
+
commandId: "battle/start";
|
|
403
|
+
status: "failed";
|
|
404
|
+
reason: "internal_error" | "unauthorized" | "invalid_request" | "command_unimplemented";
|
|
405
|
+
}
|
|
406
|
+
interface MatchmakingCancelRequest {
|
|
407
|
+
type: "request";
|
|
408
|
+
messageId: string;
|
|
409
|
+
commandId: "matchmaking/cancel";
|
|
410
|
+
}
|
|
411
|
+
interface MatchmakingCancelOkResponse {
|
|
412
|
+
type: "response";
|
|
413
|
+
messageId: string;
|
|
414
|
+
commandId: "matchmaking/cancel";
|
|
415
|
+
status: "success";
|
|
416
|
+
}
|
|
417
|
+
interface MatchmakingCancelFailResponse {
|
|
418
|
+
type: "response";
|
|
419
|
+
messageId: string;
|
|
420
|
+
commandId: "matchmaking/cancel";
|
|
421
|
+
status: "failed";
|
|
422
|
+
reason: "not_queued" | "internal_error" | "unauthorized" | "invalid_request" | "command_unimplemented";
|
|
423
|
+
}
|
|
424
|
+
interface MatchmakingFoundEvent {
|
|
425
|
+
type: "event";
|
|
426
|
+
messageId: string;
|
|
427
|
+
commandId: "matchmaking/found";
|
|
428
|
+
data: MatchmakingFoundEventData;
|
|
429
|
+
}
|
|
430
|
+
interface MatchmakingFoundEventData {
|
|
431
|
+
queueId: string;
|
|
432
|
+
timeoutMs: number;
|
|
433
|
+
}
|
|
434
|
+
interface MatchmakingFoundUpdateEvent {
|
|
435
|
+
type: "event";
|
|
436
|
+
messageId: string;
|
|
437
|
+
commandId: "matchmaking/foundUpdate";
|
|
438
|
+
data: MatchmakingFoundUpdateEventData;
|
|
439
|
+
}
|
|
440
|
+
interface MatchmakingFoundUpdateEventData {
|
|
441
|
+
readyCount: number;
|
|
442
|
+
}
|
|
443
|
+
interface MatchmakingListRequest {
|
|
444
|
+
type: "request";
|
|
445
|
+
messageId: string;
|
|
446
|
+
commandId: "matchmaking/list";
|
|
447
|
+
}
|
|
448
|
+
interface MatchmakingListOkResponse {
|
|
449
|
+
type: "response";
|
|
450
|
+
messageId: string;
|
|
451
|
+
commandId: "matchmaking/list";
|
|
452
|
+
status: "success";
|
|
453
|
+
data: MatchmakingListOkResponseData;
|
|
454
|
+
}
|
|
455
|
+
interface MatchmakingListOkResponseData {
|
|
456
|
+
playlists: {
|
|
457
|
+
id: string;
|
|
458
|
+
name: string;
|
|
459
|
+
numOfTeams: number;
|
|
460
|
+
teamSize: number;
|
|
461
|
+
ranked: boolean;
|
|
462
|
+
}[];
|
|
463
|
+
}
|
|
464
|
+
interface MatchmakingListFailResponse {
|
|
465
|
+
type: "response";
|
|
466
|
+
messageId: string;
|
|
467
|
+
commandId: "matchmaking/list";
|
|
468
|
+
status: "failed";
|
|
469
|
+
reason: "internal_error" | "unauthorized" | "invalid_request" | "command_unimplemented";
|
|
470
|
+
}
|
|
471
|
+
interface MatchmakingLostEvent {
|
|
472
|
+
type: "event";
|
|
473
|
+
messageId: string;
|
|
474
|
+
commandId: "matchmaking/lost";
|
|
475
|
+
}
|
|
476
|
+
interface MatchmakingQueueRequest {
|
|
477
|
+
type: "request";
|
|
478
|
+
messageId: string;
|
|
479
|
+
commandId: "matchmaking/queue";
|
|
480
|
+
data: MatchmakingQueueRequestData;
|
|
481
|
+
}
|
|
482
|
+
interface MatchmakingQueueRequestData {
|
|
483
|
+
queues: [string, ...string[]];
|
|
484
|
+
}
|
|
485
|
+
interface MatchmakingQueueOkResponse {
|
|
486
|
+
type: "response";
|
|
487
|
+
messageId: string;
|
|
488
|
+
commandId: "matchmaking/queue";
|
|
489
|
+
status: "success";
|
|
490
|
+
}
|
|
491
|
+
interface MatchmakingQueueFailResponse {
|
|
492
|
+
type: "response";
|
|
493
|
+
messageId: string;
|
|
494
|
+
commandId: "matchmaking/queue";
|
|
495
|
+
status: "failed";
|
|
496
|
+
reason: "invalid_queue_specified" | "already_queued" | "already_inbattle" | "internal_error" | "unauthorized" | "invalid_request" | "command_unimplemented";
|
|
497
|
+
}
|
|
498
|
+
interface MatchmakingQueueUpdateEvent {
|
|
499
|
+
type: "event";
|
|
500
|
+
messageId: string;
|
|
501
|
+
commandId: "matchmaking/queueUpdate";
|
|
502
|
+
data: MatchmakingQueueUpdateEventData;
|
|
503
|
+
}
|
|
504
|
+
interface MatchmakingQueueUpdateEventData {
|
|
505
|
+
playersQueued: string;
|
|
506
|
+
}
|
|
507
|
+
interface MatchmakingReadyRequest {
|
|
508
|
+
type: "request";
|
|
509
|
+
messageId: string;
|
|
510
|
+
commandId: "matchmaking/ready";
|
|
511
|
+
}
|
|
512
|
+
interface MatchmakingReadyOkResponse {
|
|
513
|
+
type: "response";
|
|
514
|
+
messageId: string;
|
|
515
|
+
commandId: "matchmaking/ready";
|
|
516
|
+
status: "success";
|
|
517
|
+
}
|
|
518
|
+
interface MatchmakingReadyFailResponse {
|
|
519
|
+
type: "response";
|
|
520
|
+
messageId: string;
|
|
521
|
+
commandId: "matchmaking/ready";
|
|
522
|
+
status: "failed";
|
|
523
|
+
reason: "no_match" | "internal_error" | "unauthorized" | "invalid_request" | "command_unimplemented";
|
|
524
|
+
}
|
|
525
|
+
interface MatchmakingReadyUpdateEvent {
|
|
526
|
+
type: "event";
|
|
527
|
+
messageId: string;
|
|
528
|
+
commandId: "matchmaking/readyUpdate";
|
|
529
|
+
data: MatchmakingReadyUpdateEventData;
|
|
530
|
+
}
|
|
531
|
+
interface MatchmakingReadyUpdateEventData {
|
|
532
|
+
readyMax: number;
|
|
533
|
+
readyCurrent: number;
|
|
534
|
+
}
|
|
535
|
+
interface SystemDisconnectRequest {
|
|
536
|
+
type: "request";
|
|
537
|
+
messageId: string;
|
|
538
|
+
commandId: "system/disconnect";
|
|
539
|
+
data?: SystemDisconnectRequestData;
|
|
540
|
+
}
|
|
541
|
+
interface SystemDisconnectRequestData {
|
|
542
|
+
reason: string;
|
|
543
|
+
}
|
|
544
|
+
interface SystemDisconnectOkResponse {
|
|
545
|
+
type: "response";
|
|
546
|
+
messageId: string;
|
|
547
|
+
commandId: "system/disconnect";
|
|
548
|
+
status: "success";
|
|
549
|
+
}
|
|
550
|
+
interface SystemDisconnectFailResponse {
|
|
551
|
+
type: "response";
|
|
552
|
+
messageId: string;
|
|
553
|
+
commandId: "system/disconnect";
|
|
554
|
+
status: "failed";
|
|
555
|
+
reason: "internal_error" | "unauthorized" | "invalid_request" | "command_unimplemented";
|
|
556
|
+
}
|
|
557
|
+
interface SystemServerStatsRequest {
|
|
558
|
+
type: "request";
|
|
559
|
+
messageId: string;
|
|
560
|
+
commandId: "system/serverStats";
|
|
561
|
+
}
|
|
562
|
+
interface SystemServerStatsOkResponse {
|
|
563
|
+
type: "response";
|
|
564
|
+
messageId: string;
|
|
565
|
+
commandId: "system/serverStats";
|
|
566
|
+
status: "success";
|
|
567
|
+
data: SystemServerStatsOkResponseData;
|
|
568
|
+
}
|
|
569
|
+
interface SystemServerStatsOkResponseData {
|
|
570
|
+
userCount: number;
|
|
571
|
+
}
|
|
572
|
+
interface SystemServerStatsFailResponse {
|
|
573
|
+
type: "response";
|
|
574
|
+
messageId: string;
|
|
575
|
+
commandId: "system/serverStats";
|
|
576
|
+
status: "failed";
|
|
577
|
+
reason: "internal_error" | "unauthorized" | "invalid_request" | "command_unimplemented";
|
|
578
|
+
}
|
|
579
|
+
interface UserUpdatedEvent {
|
|
580
|
+
type: "event";
|
|
581
|
+
messageId: string;
|
|
582
|
+
commandId: "user/updated";
|
|
583
|
+
data: UserUpdatedEventData;
|
|
584
|
+
}
|
|
585
|
+
interface UserUpdatedEventData {
|
|
586
|
+
users: ({
|
|
587
|
+
userId?: string;
|
|
588
|
+
username?: string;
|
|
589
|
+
displayName?: string;
|
|
590
|
+
clanId?: string | null;
|
|
591
|
+
partyId?: string | null;
|
|
592
|
+
scopes?: string[];
|
|
593
|
+
countryCode?: string;
|
|
594
|
+
status?: "offline" | "menu" | "playing" | "lobby";
|
|
595
|
+
} & {
|
|
596
|
+
friendIds?: string[];
|
|
597
|
+
outgoingFriendRequestIds?: string[];
|
|
598
|
+
incomingFriendRequestIds?: string[];
|
|
599
|
+
ignoreIds?: string[];
|
|
600
|
+
})[];
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
export type { AllyTeam, AutohostAddPlayerFailResponse, AutohostAddPlayerOkResponse, AutohostAddPlayerRequest, AutohostAddPlayerRequestData, AutohostAddPlayerResponse, AutohostKickPlayerFailResponse, AutohostKickPlayerOkResponse, AutohostKickPlayerRequest, AutohostKickPlayerRequestData, AutohostKickPlayerResponse, AutohostKillFailResponse, AutohostKillOkResponse, AutohostKillRequest, AutohostKillRequestData, AutohostKillResponse, AutohostMutePlayerFailResponse, AutohostMutePlayerOkResponse, AutohostMutePlayerRequest, AutohostMutePlayerRequestData, AutohostMutePlayerResponse, AutohostSendCommandFailResponse, AutohostSendCommandOkResponse, AutohostSendCommandRequest, AutohostSendCommandRequestData, AutohostSendCommandResponse, AutohostSendMessageFailResponse, AutohostSendMessageOkResponse, AutohostSendMessageRequest, AutohostSendMessageRequestData, AutohostSendMessageResponse, AutohostSpecPlayersFailResponse, AutohostSpecPlayersOkResponse, AutohostSpecPlayersRequest, AutohostSpecPlayersRequestData, AutohostSpecPlayersResponse, AutohostStartFailResponse, AutohostStartOkResponse, AutohostStartOkResponseData, AutohostStartRequest, AutohostStartRequestData, AutohostStartResponse, AutohostStatusEvent, AutohostStatusEventData, AutohostSubscribeUpdatesFailResponse, AutohostSubscribeUpdatesOkResponse, AutohostSubscribeUpdatesRequest, AutohostSubscribeUpdatesRequestData, AutohostSubscribeUpdatesResponse, AutohostUpdateEvent, AutohostUpdateEventData, BattleStartFailResponse, BattleStartOkResponse, BattleStartRequest, BattleStartRequestData, BattleStartResponse, Bot, CustomStartScriptProperties, EngineCrashUpdate, EngineMessageUpdate, EngineQuitUpdate, EngineWarningUpdate, FinishedUpdate, LuaMsgUpdate, MatchmakingCancelFailResponse, MatchmakingCancelOkResponse, MatchmakingCancelRequest, MatchmakingCancelResponse, MatchmakingFoundEvent, MatchmakingFoundEventData, MatchmakingFoundUpdateEvent, MatchmakingFoundUpdateEventData, MatchmakingListFailResponse, MatchmakingListOkResponse, MatchmakingListOkResponseData, MatchmakingListRequest, MatchmakingListResponse, MatchmakingLostEvent, MatchmakingQueueFailResponse, MatchmakingQueueOkResponse, MatchmakingQueueRequest, MatchmakingQueueRequestData, MatchmakingQueueResponse, MatchmakingQueueUpdateEvent, MatchmakingQueueUpdateEventData, MatchmakingReadyFailResponse, MatchmakingReadyOkResponse, MatchmakingReadyRequest, MatchmakingReadyResponse, MatchmakingReadyUpdateEvent, MatchmakingReadyUpdateEventData, Player, PlayerChatUpdate, PlayerDefeatedUpdate, PlayerJoinedUpdate, PlayerLeftUpdate, StartBox, StartPosType, StartUpdate, SystemDisconnectFailResponse, SystemDisconnectOkResponse, SystemDisconnectRequest, SystemDisconnectRequestData, SystemDisconnectResponse, SystemServerStatsFailResponse, SystemServerStatsOkResponse, SystemServerStatsOkResponseData, SystemServerStatsRequest, SystemServerStatsResponse, TachyonCommand, Team, UnixTime, UserId, UserUpdatedEvent, UserUpdatedEventData };
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// dist/types.ts
|
|
17
|
+
var types_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(types_exports);
|
package/dist/types.mjs
ADDED
|
File without changes
|