tachyon-protocol 1.5.4 → 1.6.2

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.
Files changed (56) hide show
  1. package/dist/index.d.mts +214 -31
  2. package/dist/index.d.ts +214 -31
  3. package/dist/index.js +5 -7
  4. package/dist/index.mjs +2 -2
  5. package/dist/validators.d.mts +50 -47
  6. package/dist/validators.d.ts +50 -47
  7. package/dist/validators.js +1 -1
  8. package/dist/validators.mjs +3 -6
  9. package/package.json +10 -3
  10. package/dist/autohost/slave/request.json +0 -34
  11. package/dist/autohost/slave/response.json +0 -107
  12. package/dist/autohost/unslave/request.json +0 -20
  13. package/dist/autohost/unslave/response.json +0 -107
  14. package/dist/game/launch/response.json +0 -117
  15. package/dist/lobby/close/request.json +0 -18
  16. package/dist/lobby/close/response.json +0 -105
  17. package/dist/lobby/create/request.json +0 -55
  18. package/dist/lobby/create/response.json +0 -157
  19. package/dist/lobby/join/request.json +0 -39
  20. package/dist/lobby/join/response.json +0 -287
  21. package/dist/lobby/joined/response.json +0 -548
  22. package/dist/lobby/leave/request.json +0 -18
  23. package/dist/lobby/leave/response.json +0 -131
  24. package/dist/lobby/left/response.json +0 -105
  25. package/dist/lobby/list/request.json +0 -18
  26. package/dist/lobby/list/response.json +0 -698
  27. package/dist/lobby/receiveMessage/response.json +0 -127
  28. package/dist/lobby/sendMessage/request.json +0 -36
  29. package/dist/lobby/sendMessage/response.json +0 -157
  30. package/dist/lobby/subscribe/request.json +0 -33
  31. package/dist/lobby/subscribe/response.json +0 -105
  32. package/dist/lobby/unsubscribe/request.json +0 -30
  33. package/dist/lobby/unsubscribe/response.json +0 -131
  34. package/dist/lobby/updated/response.json +0 -603
  35. package/dist/matchmaking/cancel/request.json +0 -18
  36. package/dist/matchmaking/cancel/response.json +0 -131
  37. package/dist/matchmaking/found/response.json +0 -117
  38. package/dist/matchmaking/list/request.json +0 -18
  39. package/dist/matchmaking/list/response.json +0 -158
  40. package/dist/matchmaking/lost/response.json +0 -105
  41. package/dist/matchmaking/queue/request.json +0 -34
  42. package/dist/matchmaking/queue/response.json +0 -157
  43. package/dist/matchmaking/queueUpdate/response.json +0 -117
  44. package/dist/matchmaking/ready/request.json +0 -18
  45. package/dist/matchmaking/ready/response.json +0 -131
  46. package/dist/matchmaking/readyUpdate/response.json +0 -121
  47. package/dist/system/connected/response.json +0 -335
  48. package/dist/system/disconnect/request.json +0 -29
  49. package/dist/system/disconnect/response.json +0 -105
  50. package/dist/system/serverStats/request.json +0 -18
  51. package/dist/system/serverStats/response.json +0 -117
  52. package/dist/user/subscribe/request.json +0 -33
  53. package/dist/user/subscribe/response.json +0 -318
  54. package/dist/user/unsubscribe/request.json +0 -33
  55. package/dist/user/unsubscribe/response.json +0 -131
  56. package/dist/user/updated/response.json +0 -331
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { EmptyObject, KeysOfUnion } from 'type-fest';
2
2
 
3
3
  declare const tachyonMeta: {
4
- readonly version: "1.5.4";
4
+ readonly version: "1.6.2";
5
5
  readonly ids: {
6
6
  readonly autohost: {
7
7
  readonly slave: readonly ["request", "response"];
@@ -140,7 +140,13 @@ export type AutohostSlaveResponse =
140
140
  messageId: string;
141
141
  commandId: "autohost/slave/response";
142
142
  status: "failed";
143
- reason: "invalid_command";
143
+ reason: "invalid_request";
144
+ }
145
+ | {
146
+ messageId: string;
147
+ commandId: "autohost/slave/response";
148
+ status: "failed";
149
+ reason: "command_unimplemented";
144
150
  };
145
151
  export type AutohostUnslaveResponse =
146
152
  | {
@@ -164,7 +170,13 @@ export type AutohostUnslaveResponse =
164
170
  messageId: string;
165
171
  commandId: "autohost/unslave/response";
166
172
  status: "failed";
167
- reason: "invalid_command";
173
+ reason: "invalid_request";
174
+ }
175
+ | {
176
+ messageId: string;
177
+ commandId: "autohost/unslave/response";
178
+ status: "failed";
179
+ reason: "command_unimplemented";
168
180
  };
169
181
  export type GameLaunchResponse =
170
182
  | {
@@ -191,7 +203,13 @@ export type GameLaunchResponse =
191
203
  messageId: string;
192
204
  commandId: "game/launch/response";
193
205
  status: "failed";
194
- reason: "invalid_command";
206
+ reason: "invalid_request";
207
+ }
208
+ | {
209
+ messageId: string;
210
+ commandId: "game/launch/response";
211
+ status: "failed";
212
+ reason: "command_unimplemented";
195
213
  };
196
214
  export type LobbyCloseResponse =
197
215
  | {
@@ -215,7 +233,13 @@ export type LobbyCloseResponse =
215
233
  messageId: string;
216
234
  commandId: "lobby/close/response";
217
235
  status: "failed";
218
- reason: "invalid_command";
236
+ reason: "invalid_request";
237
+ }
238
+ | {
239
+ messageId: string;
240
+ commandId: "lobby/close/response";
241
+ status: "failed";
242
+ reason: "command_unimplemented";
219
243
  };
220
244
  export type LobbyCreateResponse =
221
245
  | {
@@ -251,7 +275,13 @@ export type LobbyCreateResponse =
251
275
  messageId: string;
252
276
  commandId: "lobby/create/response";
253
277
  status: "failed";
254
- reason: "invalid_command";
278
+ reason: "invalid_request";
279
+ }
280
+ | {
281
+ messageId: string;
282
+ commandId: "lobby/create/response";
283
+ status: "failed";
284
+ reason: "command_unimplemented";
255
285
  };
256
286
  export type LobbyJoinResponse =
257
287
  | {
@@ -317,7 +347,13 @@ export type LobbyJoinResponse =
317
347
  messageId: string;
318
348
  commandId: "lobby/join/response";
319
349
  status: "failed";
320
- reason: "invalid_command";
350
+ reason: "invalid_request";
351
+ }
352
+ | {
353
+ messageId: string;
354
+ commandId: "lobby/join/response";
355
+ status: "failed";
356
+ reason: "command_unimplemented";
321
357
  };
322
358
  export type LobbyJoinedResponse =
323
359
  | {
@@ -429,7 +465,13 @@ export type LobbyJoinedResponse =
429
465
  messageId: string;
430
466
  commandId: "lobby/joined/response";
431
467
  status: "failed";
432
- reason: "invalid_command";
468
+ reason: "invalid_request";
469
+ }
470
+ | {
471
+ messageId: string;
472
+ commandId: "lobby/joined/response";
473
+ status: "failed";
474
+ reason: "command_unimplemented";
433
475
  };
434
476
  export type LobbyLeaveResponse =
435
477
  | {
@@ -459,7 +501,13 @@ export type LobbyLeaveResponse =
459
501
  messageId: string;
460
502
  commandId: "lobby/leave/response";
461
503
  status: "failed";
462
- reason: "invalid_command";
504
+ reason: "invalid_request";
505
+ }
506
+ | {
507
+ messageId: string;
508
+ commandId: "lobby/leave/response";
509
+ status: "failed";
510
+ reason: "command_unimplemented";
463
511
  };
464
512
  export type LobbyLeftResponse =
465
513
  | {
@@ -483,7 +531,13 @@ export type LobbyLeftResponse =
483
531
  messageId: string;
484
532
  commandId: "lobby/left/response";
485
533
  status: "failed";
486
- reason: "invalid_command";
534
+ reason: "invalid_request";
535
+ }
536
+ | {
537
+ messageId: string;
538
+ commandId: "lobby/left/response";
539
+ status: "failed";
540
+ reason: "command_unimplemented";
487
541
  };
488
542
  export type LobbyListResponse =
489
543
  | {
@@ -609,7 +663,13 @@ export type LobbyListResponse =
609
663
  messageId: string;
610
664
  commandId: "lobby/list/response";
611
665
  status: "failed";
612
- reason: "invalid_command";
666
+ reason: "invalid_request";
667
+ }
668
+ | {
669
+ messageId: string;
670
+ commandId: "lobby/list/response";
671
+ status: "failed";
672
+ reason: "command_unimplemented";
613
673
  };
614
674
  export type LobbyReceiveMessageResponse =
615
675
  | {
@@ -637,7 +697,13 @@ export type LobbyReceiveMessageResponse =
637
697
  messageId: string;
638
698
  commandId: "lobby/receiveMessage/response";
639
699
  status: "failed";
640
- reason: "invalid_command";
700
+ reason: "invalid_request";
701
+ }
702
+ | {
703
+ messageId: string;
704
+ commandId: "lobby/receiveMessage/response";
705
+ status: "failed";
706
+ reason: "command_unimplemented";
641
707
  };
642
708
  export type LobbySendMessageResponse =
643
709
  | {
@@ -673,7 +739,13 @@ export type LobbySendMessageResponse =
673
739
  messageId: string;
674
740
  commandId: "lobby/sendMessage/response";
675
741
  status: "failed";
676
- reason: "invalid_command";
742
+ reason: "invalid_request";
743
+ }
744
+ | {
745
+ messageId: string;
746
+ commandId: "lobby/sendMessage/response";
747
+ status: "failed";
748
+ reason: "command_unimplemented";
677
749
  };
678
750
  export type LobbySubscribeResponse =
679
751
  | {
@@ -697,7 +769,13 @@ export type LobbySubscribeResponse =
697
769
  messageId: string;
698
770
  commandId: "lobby/subscribe/response";
699
771
  status: "failed";
700
- reason: "invalid_command";
772
+ reason: "invalid_request";
773
+ }
774
+ | {
775
+ messageId: string;
776
+ commandId: "lobby/subscribe/response";
777
+ status: "failed";
778
+ reason: "command_unimplemented";
701
779
  };
702
780
  export type LobbyUnsubscribeResponse =
703
781
  | {
@@ -727,7 +805,13 @@ export type LobbyUnsubscribeResponse =
727
805
  messageId: string;
728
806
  commandId: "lobby/unsubscribe/response";
729
807
  status: "failed";
730
- reason: "invalid_command";
808
+ reason: "invalid_request";
809
+ }
810
+ | {
811
+ messageId: string;
812
+ commandId: "lobby/unsubscribe/response";
813
+ status: "failed";
814
+ reason: "command_unimplemented";
731
815
  };
732
816
  export type LobbyUpdatedResponse =
733
817
  | {
@@ -853,7 +937,13 @@ export type LobbyUpdatedResponse =
853
937
  messageId: string;
854
938
  commandId: "lobby/updated/response";
855
939
  status: "failed";
856
- reason: "invalid_command";
940
+ reason: "invalid_request";
941
+ }
942
+ | {
943
+ messageId: string;
944
+ commandId: "lobby/updated/response";
945
+ status: "failed";
946
+ reason: "command_unimplemented";
857
947
  };
858
948
  export type MatchmakingCancelResponse =
859
949
  | {
@@ -883,7 +973,13 @@ export type MatchmakingCancelResponse =
883
973
  messageId: string;
884
974
  commandId: "matchmaking/cancel/response";
885
975
  status: "failed";
886
- reason: "invalid_command";
976
+ reason: "invalid_request";
977
+ }
978
+ | {
979
+ messageId: string;
980
+ commandId: "matchmaking/cancel/response";
981
+ status: "failed";
982
+ reason: "command_unimplemented";
887
983
  };
888
984
  export type MatchmakingFoundResponse =
889
985
  | {
@@ -910,7 +1006,13 @@ export type MatchmakingFoundResponse =
910
1006
  messageId: string;
911
1007
  commandId: "matchmaking/found/response";
912
1008
  status: "failed";
913
- reason: "invalid_command";
1009
+ reason: "invalid_request";
1010
+ }
1011
+ | {
1012
+ messageId: string;
1013
+ commandId: "matchmaking/found/response";
1014
+ status: "failed";
1015
+ reason: "command_unimplemented";
914
1016
  };
915
1017
  export type MatchmakingListResponse =
916
1018
  | {
@@ -921,8 +1023,9 @@ export type MatchmakingListResponse =
921
1023
  playlists: {
922
1024
  id: string;
923
1025
  name: string;
924
- ranked: boolean;
1026
+ numOfTeams: number;
925
1027
  teamSize: number;
1028
+ ranked: boolean;
926
1029
  }[];
927
1030
  };
928
1031
  }
@@ -942,7 +1045,13 @@ export type MatchmakingListResponse =
942
1045
  messageId: string;
943
1046
  commandId: "matchmaking/list/response";
944
1047
  status: "failed";
945
- reason: "invalid_command";
1048
+ reason: "invalid_request";
1049
+ }
1050
+ | {
1051
+ messageId: string;
1052
+ commandId: "matchmaking/list/response";
1053
+ status: "failed";
1054
+ reason: "command_unimplemented";
946
1055
  };
947
1056
  export type MatchmakingLostResponse =
948
1057
  | {
@@ -966,7 +1075,13 @@ export type MatchmakingLostResponse =
966
1075
  messageId: string;
967
1076
  commandId: "matchmaking/lost/response";
968
1077
  status: "failed";
969
- reason: "invalid_command";
1078
+ reason: "invalid_request";
1079
+ }
1080
+ | {
1081
+ messageId: string;
1082
+ commandId: "matchmaking/lost/response";
1083
+ status: "failed";
1084
+ reason: "command_unimplemented";
970
1085
  };
971
1086
  export type MatchmakingQueueResponse =
972
1087
  | {
@@ -1002,7 +1117,13 @@ export type MatchmakingQueueResponse =
1002
1117
  messageId: string;
1003
1118
  commandId: "matchmaking/queue/response";
1004
1119
  status: "failed";
1005
- reason: "invalid_command";
1120
+ reason: "invalid_request";
1121
+ }
1122
+ | {
1123
+ messageId: string;
1124
+ commandId: "matchmaking/queue/response";
1125
+ status: "failed";
1126
+ reason: "command_unimplemented";
1006
1127
  };
1007
1128
  export type MatchmakingQueueUpdateResponse =
1008
1129
  | {
@@ -1029,7 +1150,13 @@ export type MatchmakingQueueUpdateResponse =
1029
1150
  messageId: string;
1030
1151
  commandId: "matchmaking/queueUpdate/response";
1031
1152
  status: "failed";
1032
- reason: "invalid_command";
1153
+ reason: "invalid_request";
1154
+ }
1155
+ | {
1156
+ messageId: string;
1157
+ commandId: "matchmaking/queueUpdate/response";
1158
+ status: "failed";
1159
+ reason: "command_unimplemented";
1033
1160
  };
1034
1161
  export type MatchmakingReadyResponse =
1035
1162
  | {
@@ -1059,7 +1186,13 @@ export type MatchmakingReadyResponse =
1059
1186
  messageId: string;
1060
1187
  commandId: "matchmaking/ready/response";
1061
1188
  status: "failed";
1062
- reason: "invalid_command";
1189
+ reason: "invalid_request";
1190
+ }
1191
+ | {
1192
+ messageId: string;
1193
+ commandId: "matchmaking/ready/response";
1194
+ status: "failed";
1195
+ reason: "command_unimplemented";
1063
1196
  };
1064
1197
  export type MatchmakingReadyUpdateResponse =
1065
1198
  | {
@@ -1087,7 +1220,13 @@ export type MatchmakingReadyUpdateResponse =
1087
1220
  messageId: string;
1088
1221
  commandId: "matchmaking/readyUpdate/response";
1089
1222
  status: "failed";
1090
- reason: "invalid_command";
1223
+ reason: "invalid_request";
1224
+ }
1225
+ | {
1226
+ messageId: string;
1227
+ commandId: "matchmaking/readyUpdate/response";
1228
+ status: "failed";
1229
+ reason: "command_unimplemented";
1091
1230
  };
1092
1231
  export type SystemConnectedResponse =
1093
1232
  | {
@@ -1152,7 +1291,13 @@ export type SystemConnectedResponse =
1152
1291
  messageId: string;
1153
1292
  commandId: "system/connected/response";
1154
1293
  status: "failed";
1155
- reason: "invalid_command";
1294
+ reason: "invalid_request";
1295
+ }
1296
+ | {
1297
+ messageId: string;
1298
+ commandId: "system/connected/response";
1299
+ status: "failed";
1300
+ reason: "command_unimplemented";
1156
1301
  };
1157
1302
  export type SystemDisconnectResponse =
1158
1303
  | {
@@ -1176,7 +1321,13 @@ export type SystemDisconnectResponse =
1176
1321
  messageId: string;
1177
1322
  commandId: "system/disconnect/response";
1178
1323
  status: "failed";
1179
- reason: "invalid_command";
1324
+ reason: "invalid_request";
1325
+ }
1326
+ | {
1327
+ messageId: string;
1328
+ commandId: "system/disconnect/response";
1329
+ status: "failed";
1330
+ reason: "command_unimplemented";
1180
1331
  };
1181
1332
  export type SystemServerStatsResponse =
1182
1333
  | {
@@ -1203,7 +1354,13 @@ export type SystemServerStatsResponse =
1203
1354
  messageId: string;
1204
1355
  commandId: "system/serverStats/response";
1205
1356
  status: "failed";
1206
- reason: "invalid_command";
1357
+ reason: "invalid_request";
1358
+ }
1359
+ | {
1360
+ messageId: string;
1361
+ commandId: "system/serverStats/response";
1362
+ status: "failed";
1363
+ reason: "command_unimplemented";
1207
1364
  };
1208
1365
  export type UserSubscribeResponse =
1209
1366
  | {
@@ -1266,7 +1423,13 @@ export type UserSubscribeResponse =
1266
1423
  messageId: string;
1267
1424
  commandId: "user/subscribe/response";
1268
1425
  status: "failed";
1269
- reason: "invalid_command";
1426
+ reason: "invalid_request";
1427
+ }
1428
+ | {
1429
+ messageId: string;
1430
+ commandId: "user/subscribe/response";
1431
+ status: "failed";
1432
+ reason: "command_unimplemented";
1270
1433
  };
1271
1434
  export type UserUnsubscribeResponse =
1272
1435
  | {
@@ -1296,7 +1459,13 @@ export type UserUnsubscribeResponse =
1296
1459
  messageId: string;
1297
1460
  commandId: "user/unsubscribe/response";
1298
1461
  status: "failed";
1299
- reason: "invalid_command";
1462
+ reason: "invalid_request";
1463
+ }
1464
+ | {
1465
+ messageId: string;
1466
+ commandId: "user/unsubscribe/response";
1467
+ status: "failed";
1468
+ reason: "command_unimplemented";
1300
1469
  };
1301
1470
  export type UserUpdatedResponse =
1302
1471
  | {
@@ -1363,7 +1532,13 @@ export type UserUpdatedResponse =
1363
1532
  messageId: string;
1364
1533
  commandId: "user/updated/response";
1365
1534
  status: "failed";
1366
- reason: "invalid_command";
1535
+ reason: "invalid_request";
1536
+ }
1537
+ | {
1538
+ messageId: string;
1539
+ commandId: "user/updated/response";
1540
+ status: "failed";
1541
+ reason: "command_unimplemented";
1367
1542
  };
1368
1543
 
1369
1544
  export interface Tachyon {
@@ -1954,6 +2129,14 @@ export type TachyonCustomBattle = {
1954
2129
  };
1955
2130
  };
1956
2131
 
2132
+ export interface TachyonMatchmakingPlaylist {
2133
+ id: string;
2134
+ name: string;
2135
+ numOfTeams: number;
2136
+ teamSize: number;
2137
+ ranked: boolean;
2138
+ }
2139
+
1957
2140
  export interface TachyonPrivateUser {
1958
2141
  userId: string;
1959
2142
  username: string;