tachyon-protocol 0.3.1 → 0.3.3

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 (52) hide show
  1. package/README.md +33 -111
  2. package/dist/{bot → autohost}/slave/request.json +5 -4
  3. package/dist/{bot/unslave → autohost/slave}/response.json +8 -7
  4. package/dist/{bot → autohost}/unslave/request.json +5 -4
  5. package/dist/autohost/unslave/response.json +107 -0
  6. package/dist/game/launch/response.json +1 -1
  7. package/dist/index.d.ts +1067 -180
  8. package/dist/index.js +147 -25
  9. package/dist/lobby/close/request.json +1 -1
  10. package/dist/lobby/close/response.json +1 -1
  11. package/dist/lobby/create/request.json +1 -1
  12. package/dist/lobby/create/response.json +1 -1
  13. package/dist/lobby/join/request.json +1 -1
  14. package/dist/lobby/join/response.json +1 -1
  15. package/dist/lobby/joined/response.json +348 -110
  16. package/dist/lobby/leave/request.json +1 -1
  17. package/dist/lobby/leave/response.json +1 -1
  18. package/dist/lobby/left/response.json +1 -1
  19. package/dist/lobby/list/request.json +1 -1
  20. package/dist/lobby/list/response.json +496 -119
  21. package/dist/lobby/receiveMessage/response.json +1 -1
  22. package/dist/lobby/sendMessage/request.json +1 -1
  23. package/dist/lobby/sendMessage/response.json +1 -1
  24. package/dist/lobby/subscribe/request.json +33 -0
  25. package/dist/{bot/slave → lobby/subscribe}/response.json +6 -7
  26. package/dist/lobby/unsubscribe/request.json +30 -0
  27. package/dist/lobby/unsubscribe/response.json +131 -0
  28. package/dist/lobby/updated/response.json +480 -143
  29. package/dist/matchmaking/cancel/request.json +1 -1
  30. package/dist/matchmaking/cancel/response.json +1 -1
  31. package/dist/matchmaking/found/response.json +1 -1
  32. package/dist/matchmaking/list/request.json +1 -1
  33. package/dist/matchmaking/list/response.json +13 -7
  34. package/dist/matchmaking/lost/response.json +1 -1
  35. package/dist/matchmaking/queue/request.json +1 -1
  36. package/dist/matchmaking/queue/response.json +1 -1
  37. package/dist/matchmaking/queueUpdate/response.json +1 -1
  38. package/dist/matchmaking/ready/request.json +1 -1
  39. package/dist/matchmaking/ready/response.json +1 -1
  40. package/dist/matchmaking/readyUpdate/response.json +1 -1
  41. package/dist/system/connected/response.json +205 -5
  42. package/dist/system/disconnect/request.json +12 -1
  43. package/dist/system/disconnect/response.json +105 -0
  44. package/dist/system/serverStats/request.json +18 -0
  45. package/dist/system/serverStats/response.json +117 -0
  46. package/dist/user/subscribe/request.json +33 -0
  47. package/dist/user/subscribe/response.json +311 -0
  48. package/dist/user/unsubscribe/request.json +33 -0
  49. package/dist/user/unsubscribe/response.json +131 -0
  50. package/dist/user/updated/response.json +324 -0
  51. package/package.json +18 -6
  52. package/dist/meta.json +0 -96
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$id": "lobby/joined/response",
3
- "requiresLogin": false,
3
+ "roles": [],
4
4
  "anyOf": [
5
5
  {
6
6
  "type": "object",
@@ -19,23 +19,12 @@
19
19
  "data": {
20
20
  "examples": [
21
21
  {
22
- "id": 27,
23
- "name": "8v8 | All Welcome",
24
- "founderId": 822,
25
- "locked": false,
26
- "passworded": false,
27
- "playerIds": [
28
- 567,
29
- 232,
30
- 88,
31
- 119
32
- ],
33
- "spectatorIds": [
34
- 88
35
- ],
22
+ "battleId": 27,
23
+ "hostId": 822,
36
24
  "engine": "105.1.1-1821-gaca6f20 BAR105",
37
25
  "game": "Beyond All Reason test-23561-0abff7c",
38
26
  "map": "Red Comet Remake 1.8",
27
+ "startPosType": 2,
39
28
  "startAreas": {
40
29
  "0": {
41
30
  "x": 0,
@@ -50,43 +39,25 @@
50
39
  "height": 0.3
51
40
  }
52
41
  },
53
- "limits": {
54
- "minTeamsize": 3,
55
- "maxTeamsize": 3,
56
- "minRating": null,
57
- "maxRating": 25
58
- }
42
+ "startTime": 1705432698,
43
+ "ip": "121.32.201.76",
44
+ "port": 41403,
45
+ "scriptPassword": "10sdfi90sid0sjkdf",
46
+ "modOptions": {
47
+ "emprework": 0
48
+ },
49
+ "bots": [],
50
+ "users": []
59
51
  }
60
52
  ],
61
53
  "type": "object",
62
54
  "properties": {
63
- "id": {
55
+ "battleId": {
64
56
  "type": "integer"
65
57
  },
66
- "name": {
67
- "type": "string"
68
- },
69
- "founderId": {
58
+ "hostId": {
70
59
  "type": "integer"
71
60
  },
72
- "locked": {
73
- "type": "boolean"
74
- },
75
- "passworded": {
76
- "type": "boolean"
77
- },
78
- "playerIds": {
79
- "type": "array",
80
- "items": {
81
- "type": "integer"
82
- }
83
- },
84
- "spectatorIds": {
85
- "type": "array",
86
- "items": {
87
- "type": "integer"
88
- }
89
- },
90
61
  "engine": {
91
62
  "type": "string"
92
63
  },
@@ -96,21 +67,26 @@
96
67
  "map": {
97
68
  "type": "string"
98
69
  },
99
- "startAreas": {
100
- "default": {
101
- "0": {
102
- "x": 0,
103
- "y": 0,
104
- "width": 1,
105
- "height": 0.3
70
+ "startPosType": {
71
+ "anyOf": [
72
+ {
73
+ "description": "Fixed",
74
+ "const": 0,
75
+ "type": "number"
106
76
  },
107
- "1": {
108
- "x": 0,
109
- "y": 0.7,
110
- "width": 1,
111
- "height": 0.3
77
+ {
78
+ "description": "Random",
79
+ "const": 1,
80
+ "type": "number"
81
+ },
82
+ {
83
+ "description": "Boxes",
84
+ "const": 2,
85
+ "type": "number"
112
86
  }
113
- },
87
+ ]
88
+ },
89
+ "startAreas": {
114
90
  "type": "object",
115
91
  "patternProperties": {
116
92
  "^(0|[1-9][0-9]*)$": {
@@ -146,71 +122,333 @@
146
122
  }
147
123
  }
148
124
  },
149
- "limits": {
150
- "type": "object",
151
- "properties": {
152
- "minTeamsize": {
153
- "anyOf": [
154
- {
155
- "type": "integer"
156
- },
157
- {
158
- "type": "null"
159
- }
160
- ]
125
+ "startTime": {
126
+ "anyOf": [
127
+ {
128
+ "description": "Unix time",
129
+ "examples": [
130
+ 1705432698,
131
+ null
132
+ ],
133
+ "type": "integer"
161
134
  },
162
- "maxTeamsize": {
163
- "anyOf": [
164
- {
165
- "type": "integer"
166
- },
167
- {
168
- "type": "null"
169
- }
170
- ]
135
+ {
136
+ "type": "null"
137
+ }
138
+ ]
139
+ },
140
+ "ip": {
141
+ "anyOf": [
142
+ {
143
+ "type": "string"
171
144
  },
172
- "minRating": {
173
- "anyOf": [
174
- {
175
- "type": "integer"
176
- },
177
- {
178
- "type": "null"
179
- }
180
- ]
145
+ {
146
+ "type": "null"
147
+ }
148
+ ]
149
+ },
150
+ "port": {
151
+ "anyOf": [
152
+ {
153
+ "type": "integer"
181
154
  },
182
- "maxRating": {
183
- "anyOf": [
184
- {
185
- "type": "integer"
186
- },
187
- {
188
- "type": "null"
189
- }
190
- ]
155
+ {
156
+ "type": "null"
191
157
  }
192
- },
193
- "required": [
194
- "minTeamsize",
195
- "maxTeamsize",
196
- "minRating",
197
- "maxRating"
198
158
  ]
159
+ },
160
+ "scriptPassword": {
161
+ "anyOf": [
162
+ {
163
+ "type": "string"
164
+ },
165
+ {
166
+ "type": "null"
167
+ }
168
+ ]
169
+ },
170
+ "modOptions": {
171
+ "type": "object",
172
+ "patternProperties": {
173
+ "^(.*)$": {}
174
+ }
175
+ },
176
+ "bots": {
177
+ "type": "array",
178
+ "items": {
179
+ "type": "object",
180
+ "properties": {
181
+ "playerId": {
182
+ "type": "integer"
183
+ },
184
+ "teamId": {
185
+ "type": "integer"
186
+ },
187
+ "color": {
188
+ "type": "string"
189
+ },
190
+ "bonus": {
191
+ "type": "number"
192
+ },
193
+ "inGame": {
194
+ "type": "boolean"
195
+ },
196
+ "isSpectator": {
197
+ "const": false,
198
+ "type": "boolean"
199
+ },
200
+ "isBot": {
201
+ "const": true,
202
+ "type": "boolean"
203
+ },
204
+ "ownerId": {
205
+ "type": "integer"
206
+ },
207
+ "aiShortName": {
208
+ "type": "string"
209
+ },
210
+ "name": {
211
+ "type": "string"
212
+ },
213
+ "aiOptions": {
214
+ "type": "object",
215
+ "patternProperties": {
216
+ "^(.*)$": {}
217
+ }
218
+ },
219
+ "faction": {
220
+ "type": "string"
221
+ }
222
+ },
223
+ "required": [
224
+ "playerId",
225
+ "teamId",
226
+ "color",
227
+ "bonus",
228
+ "inGame",
229
+ "isSpectator",
230
+ "isBot",
231
+ "ownerId",
232
+ "aiShortName",
233
+ "name",
234
+ "aiOptions",
235
+ "faction"
236
+ ]
237
+ }
238
+ },
239
+ "users": {
240
+ "type": "array",
241
+ "items": {
242
+ "type": "object",
243
+ "properties": {
244
+ "userId": {
245
+ "type": "string"
246
+ },
247
+ "username": {
248
+ "type": "string"
249
+ },
250
+ "displayName": {
251
+ "type": "string"
252
+ },
253
+ "avatarUrl": {
254
+ "format": "uri",
255
+ "type": "string"
256
+ },
257
+ "clanId": {
258
+ "anyOf": [
259
+ {
260
+ "type": "integer"
261
+ },
262
+ {
263
+ "type": "null"
264
+ }
265
+ ]
266
+ },
267
+ "partyId": {
268
+ "anyOf": [
269
+ {
270
+ "type": "integer"
271
+ },
272
+ {
273
+ "type": "null"
274
+ }
275
+ ]
276
+ },
277
+ "roles": {
278
+ "type": "array",
279
+ "items": {
280
+ "type": "string"
281
+ }
282
+ },
283
+ "countryCode": {
284
+ "type": "string"
285
+ },
286
+ "status": {
287
+ "anyOf": [
288
+ {
289
+ "const": "offline",
290
+ "type": "string"
291
+ },
292
+ {
293
+ "const": "menu",
294
+ "type": "string"
295
+ },
296
+ {
297
+ "const": "playing",
298
+ "type": "string"
299
+ },
300
+ {
301
+ "const": "lobby",
302
+ "type": "string"
303
+ }
304
+ ]
305
+ },
306
+ "battleStatus": {
307
+ "anyOf": [
308
+ {
309
+ "allOf": [
310
+ {
311
+ "type": "object",
312
+ "properties": {
313
+ "battleId": {
314
+ "type": "integer"
315
+ }
316
+ },
317
+ "required": [
318
+ "battleId"
319
+ ]
320
+ },
321
+ {
322
+ "anyOf": [
323
+ {
324
+ "type": "object",
325
+ "allOf": [
326
+ {
327
+ "type": "object",
328
+ "properties": {
329
+ "playerId": {
330
+ "type": "integer"
331
+ },
332
+ "teamId": {
333
+ "type": "integer"
334
+ },
335
+ "color": {
336
+ "type": "string"
337
+ },
338
+ "bonus": {
339
+ "type": "number"
340
+ },
341
+ "inGame": {
342
+ "type": "boolean"
343
+ }
344
+ },
345
+ "required": [
346
+ "playerId",
347
+ "teamId",
348
+ "color",
349
+ "bonus",
350
+ "inGame"
351
+ ]
352
+ },
353
+ {
354
+ "type": "object",
355
+ "properties": {
356
+ "isSpectator": {
357
+ "const": false,
358
+ "type": "boolean"
359
+ },
360
+ "isBot": {
361
+ "const": false,
362
+ "type": "boolean"
363
+ },
364
+ "ready": {
365
+ "type": "boolean"
366
+ },
367
+ "sync": {
368
+ "type": "object",
369
+ "properties": {
370
+ "engine": {
371
+ "type": "number"
372
+ },
373
+ "game": {
374
+ "type": "number"
375
+ },
376
+ "map": {
377
+ "type": "number"
378
+ }
379
+ },
380
+ "required": [
381
+ "engine",
382
+ "game",
383
+ "map"
384
+ ]
385
+ }
386
+ },
387
+ "required": [
388
+ "isSpectator",
389
+ "isBot",
390
+ "ready",
391
+ "sync"
392
+ ]
393
+ }
394
+ ]
395
+ },
396
+ {
397
+ "type": "object",
398
+ "properties": {
399
+ "isSpectator": {
400
+ "const": true,
401
+ "type": "boolean"
402
+ },
403
+ "isBot": {
404
+ "const": false,
405
+ "type": "boolean"
406
+ }
407
+ },
408
+ "required": [
409
+ "isSpectator",
410
+ "isBot"
411
+ ]
412
+ }
413
+ ]
414
+ }
415
+ ]
416
+ },
417
+ {
418
+ "type": "null"
419
+ }
420
+ ]
421
+ }
422
+ },
423
+ "required": [
424
+ "userId",
425
+ "username",
426
+ "displayName",
427
+ "avatarUrl",
428
+ "clanId",
429
+ "partyId",
430
+ "roles",
431
+ "status",
432
+ "battleStatus"
433
+ ]
434
+ }
199
435
  }
200
436
  },
201
437
  "required": [
202
- "id",
203
- "name",
204
- "founderId",
205
- "locked",
206
- "passworded",
207
- "playerIds",
208
- "spectatorIds",
438
+ "battleId",
439
+ "hostId",
209
440
  "engine",
210
441
  "game",
211
442
  "map",
443
+ "startPosType",
212
444
  "startAreas",
213
- "limits"
445
+ "startTime",
446
+ "ip",
447
+ "port",
448
+ "scriptPassword",
449
+ "modOptions",
450
+ "bots",
451
+ "users"
214
452
  ]
215
453
  }
216
454
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$id": "lobby/leave/request",
3
- "requiresLogin": false,
3
+ "roles": [],
4
4
  "type": "object",
5
5
  "properties": {
6
6
  "messageId": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$id": "lobby/leave/response",
3
- "requiresLogin": false,
3
+ "roles": [],
4
4
  "anyOf": [
5
5
  {
6
6
  "type": "object",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$id": "lobby/left/response",
3
- "requiresLogin": false,
3
+ "roles": [],
4
4
  "anyOf": [
5
5
  {
6
6
  "type": "object",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$id": "lobby/list/request",
3
- "requiresLogin": false,
3
+ "roles": [],
4
4
  "type": "object",
5
5
  "properties": {
6
6
  "messageId": {