tachyon-protocol 0.3.0 → 0.3.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.
- package/README.md +33 -111
- package/dist/{bot → autohost}/slave/request.json +5 -4
- package/dist/{bot/unslave → autohost/slave}/response.json +8 -7
- package/dist/{bot → autohost}/unslave/request.json +5 -4
- package/dist/autohost/unslave/response.json +107 -0
- package/dist/game/launch/response.json +1 -1
- package/dist/index.d.ts +1054 -179
- package/dist/index.js +147 -25
- package/dist/lobby/close/request.json +1 -1
- package/dist/lobby/close/response.json +1 -1
- package/dist/lobby/create/request.json +1 -1
- package/dist/lobby/create/response.json +1 -1
- package/dist/lobby/join/request.json +1 -1
- package/dist/lobby/join/response.json +1 -1
- package/dist/lobby/joined/response.json +327 -110
- package/dist/lobby/leave/request.json +1 -1
- package/dist/lobby/leave/response.json +1 -1
- package/dist/lobby/left/response.json +1 -1
- package/dist/lobby/list/request.json +1 -1
- package/dist/lobby/list/response.json +475 -119
- package/dist/lobby/receiveMessage/response.json +1 -1
- package/dist/lobby/sendMessage/request.json +1 -1
- package/dist/lobby/sendMessage/response.json +1 -1
- package/dist/lobby/subscribe/request.json +33 -0
- package/dist/{bot/slave → lobby/subscribe}/response.json +6 -7
- package/dist/lobby/unsubscribe/request.json +30 -0
- package/dist/lobby/unsubscribe/response.json +131 -0
- package/dist/lobby/updated/response.json +459 -143
- package/dist/matchmaking/cancel/request.json +1 -1
- package/dist/matchmaking/cancel/response.json +1 -1
- package/dist/matchmaking/found/response.json +1 -1
- package/dist/matchmaking/list/request.json +1 -1
- package/dist/matchmaking/list/response.json +13 -7
- package/dist/matchmaking/lost/response.json +1 -1
- package/dist/matchmaking/queue/request.json +1 -1
- package/dist/matchmaking/queue/response.json +1 -1
- package/dist/matchmaking/queueUpdate/response.json +1 -1
- package/dist/matchmaking/ready/request.json +1 -1
- package/dist/matchmaking/ready/response.json +1 -1
- package/dist/matchmaking/readyUpdate/response.json +1 -1
- package/dist/system/connected/response.json +183 -4
- package/dist/system/disconnect/request.json +12 -1
- package/dist/system/disconnect/response.json +105 -0
- package/dist/system/serverStats/request.json +18 -0
- package/dist/system/serverStats/response.json +117 -0
- package/dist/user/subscribe/request.json +33 -0
- package/dist/user/subscribe/response.json +290 -0
- package/dist/user/unsubscribe/request.json +33 -0
- package/dist/user/unsubscribe/response.json +131 -0
- package/dist/user/updated/response.json +304 -0
- package/package.json +18 -6
- package/dist/meta.json +0 -96
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "user/updated/response",
|
|
3
|
+
"roles": [],
|
|
4
|
+
"anyOf": [
|
|
5
|
+
{
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"messageId": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"commandId": {
|
|
12
|
+
"const": "user/updated/response",
|
|
13
|
+
"type": "string"
|
|
14
|
+
},
|
|
15
|
+
"status": {
|
|
16
|
+
"const": "success",
|
|
17
|
+
"type": "string"
|
|
18
|
+
},
|
|
19
|
+
"data": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"properties": {
|
|
22
|
+
"users": {
|
|
23
|
+
"type": "array",
|
|
24
|
+
"items": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"properties": {
|
|
27
|
+
"userId": {
|
|
28
|
+
"type": "integer"
|
|
29
|
+
},
|
|
30
|
+
"username": {
|
|
31
|
+
"type": "string"
|
|
32
|
+
},
|
|
33
|
+
"displayName": {
|
|
34
|
+
"type": "string"
|
|
35
|
+
},
|
|
36
|
+
"avatarUrl": {
|
|
37
|
+
"format": "uri",
|
|
38
|
+
"type": "string"
|
|
39
|
+
},
|
|
40
|
+
"clanId": {
|
|
41
|
+
"anyOf": [
|
|
42
|
+
{
|
|
43
|
+
"type": "integer"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "null"
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"partyId": {
|
|
51
|
+
"anyOf": [
|
|
52
|
+
{
|
|
53
|
+
"type": "integer"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"type": "null"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
"roles": {
|
|
61
|
+
"type": "array",
|
|
62
|
+
"items": {
|
|
63
|
+
"type": "string"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"countryCode": {
|
|
67
|
+
"type": "string"
|
|
68
|
+
},
|
|
69
|
+
"battleStatus": {
|
|
70
|
+
"anyOf": [
|
|
71
|
+
{
|
|
72
|
+
"allOf": [
|
|
73
|
+
{
|
|
74
|
+
"type": "object",
|
|
75
|
+
"properties": {
|
|
76
|
+
"battleId": {
|
|
77
|
+
"type": "integer"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"required": [
|
|
81
|
+
"battleId"
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"anyOf": [
|
|
86
|
+
{
|
|
87
|
+
"type": "object",
|
|
88
|
+
"allOf": [
|
|
89
|
+
{
|
|
90
|
+
"type": "object",
|
|
91
|
+
"properties": {
|
|
92
|
+
"playerId": {
|
|
93
|
+
"type": "integer"
|
|
94
|
+
},
|
|
95
|
+
"teamId": {
|
|
96
|
+
"type": "integer"
|
|
97
|
+
},
|
|
98
|
+
"color": {
|
|
99
|
+
"type": "string"
|
|
100
|
+
},
|
|
101
|
+
"bonus": {
|
|
102
|
+
"type": "number"
|
|
103
|
+
},
|
|
104
|
+
"inGame": {
|
|
105
|
+
"type": "boolean"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"required": [
|
|
109
|
+
"playerId",
|
|
110
|
+
"teamId",
|
|
111
|
+
"color",
|
|
112
|
+
"bonus",
|
|
113
|
+
"inGame"
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"type": "object",
|
|
118
|
+
"properties": {
|
|
119
|
+
"isSpectator": {
|
|
120
|
+
"const": false,
|
|
121
|
+
"type": "boolean"
|
|
122
|
+
},
|
|
123
|
+
"isBot": {
|
|
124
|
+
"const": false,
|
|
125
|
+
"type": "boolean"
|
|
126
|
+
},
|
|
127
|
+
"ready": {
|
|
128
|
+
"type": "boolean"
|
|
129
|
+
},
|
|
130
|
+
"sync": {
|
|
131
|
+
"type": "object",
|
|
132
|
+
"properties": {
|
|
133
|
+
"engine": {
|
|
134
|
+
"type": "number"
|
|
135
|
+
},
|
|
136
|
+
"game": {
|
|
137
|
+
"type": "number"
|
|
138
|
+
},
|
|
139
|
+
"map": {
|
|
140
|
+
"type": "number"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"required": [
|
|
144
|
+
"engine",
|
|
145
|
+
"game",
|
|
146
|
+
"map"
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"required": [
|
|
151
|
+
"isSpectator",
|
|
152
|
+
"isBot",
|
|
153
|
+
"ready",
|
|
154
|
+
"sync"
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"type": "object",
|
|
161
|
+
"properties": {
|
|
162
|
+
"isSpectator": {
|
|
163
|
+
"const": true,
|
|
164
|
+
"type": "boolean"
|
|
165
|
+
},
|
|
166
|
+
"isBot": {
|
|
167
|
+
"const": false,
|
|
168
|
+
"type": "boolean"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"required": [
|
|
172
|
+
"isSpectator",
|
|
173
|
+
"isBot"
|
|
174
|
+
]
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"type": "null"
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
"friendIds": {
|
|
186
|
+
"type": "array",
|
|
187
|
+
"items": {
|
|
188
|
+
"type": "integer"
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"outgoingFriendRequestIds": {
|
|
192
|
+
"type": "array",
|
|
193
|
+
"items": {
|
|
194
|
+
"type": "integer"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"incomingFriendRequestIds": {
|
|
198
|
+
"type": "array",
|
|
199
|
+
"items": {
|
|
200
|
+
"type": "integer"
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"ignoreIds": {
|
|
204
|
+
"type": "array",
|
|
205
|
+
"items": {
|
|
206
|
+
"type": "integer"
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"required": [
|
|
214
|
+
"users"
|
|
215
|
+
]
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
"required": [
|
|
219
|
+
"messageId",
|
|
220
|
+
"commandId",
|
|
221
|
+
"status",
|
|
222
|
+
"data"
|
|
223
|
+
]
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"type": "object",
|
|
227
|
+
"properties": {
|
|
228
|
+
"messageId": {
|
|
229
|
+
"type": "string"
|
|
230
|
+
},
|
|
231
|
+
"commandId": {
|
|
232
|
+
"const": "user/updated/response",
|
|
233
|
+
"type": "string"
|
|
234
|
+
},
|
|
235
|
+
"status": {
|
|
236
|
+
"const": "failed",
|
|
237
|
+
"type": "string"
|
|
238
|
+
},
|
|
239
|
+
"reason": {
|
|
240
|
+
"const": "internal_error",
|
|
241
|
+
"type": "string"
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"required": [
|
|
245
|
+
"messageId",
|
|
246
|
+
"commandId",
|
|
247
|
+
"status",
|
|
248
|
+
"reason"
|
|
249
|
+
]
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"type": "object",
|
|
253
|
+
"properties": {
|
|
254
|
+
"messageId": {
|
|
255
|
+
"type": "string"
|
|
256
|
+
},
|
|
257
|
+
"commandId": {
|
|
258
|
+
"const": "user/updated/response",
|
|
259
|
+
"type": "string"
|
|
260
|
+
},
|
|
261
|
+
"status": {
|
|
262
|
+
"const": "failed",
|
|
263
|
+
"type": "string"
|
|
264
|
+
},
|
|
265
|
+
"reason": {
|
|
266
|
+
"const": "unauthorized",
|
|
267
|
+
"type": "string"
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
"required": [
|
|
271
|
+
"messageId",
|
|
272
|
+
"commandId",
|
|
273
|
+
"status",
|
|
274
|
+
"reason"
|
|
275
|
+
]
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"type": "object",
|
|
279
|
+
"properties": {
|
|
280
|
+
"messageId": {
|
|
281
|
+
"type": "string"
|
|
282
|
+
},
|
|
283
|
+
"commandId": {
|
|
284
|
+
"const": "user/updated/response",
|
|
285
|
+
"type": "string"
|
|
286
|
+
},
|
|
287
|
+
"status": {
|
|
288
|
+
"const": "failed",
|
|
289
|
+
"type": "string"
|
|
290
|
+
},
|
|
291
|
+
"reason": {
|
|
292
|
+
"const": "invalid_command",
|
|
293
|
+
"type": "string"
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
"required": [
|
|
297
|
+
"messageId",
|
|
298
|
+
"commandId",
|
|
299
|
+
"status",
|
|
300
|
+
"reason"
|
|
301
|
+
]
|
|
302
|
+
}
|
|
303
|
+
]
|
|
304
|
+
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tachyon-protocol",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"dev": "nodemon --watch src/** --ext ts --exec npm run build",
|
|
6
|
+
"dev": "nodemon --watch src/** --ext ts --ignore src/meta.ts --exec npm run build",
|
|
7
7
|
"build": "ts-node src/index.ts",
|
|
8
8
|
"tidy": "npm run lint && npm run format",
|
|
9
9
|
"lint": "eslint . --ext .ts --fix",
|
|
@@ -28,18 +28,23 @@
|
|
|
28
28
|
"url": "https://github.com/beyond-all-reason/tachyon/issues"
|
|
29
29
|
},
|
|
30
30
|
"homepage": "https://github.com/beyond-all-reason/tachyon#readme",
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"jaz-ts-utils": "^7.10.0",
|
|
33
|
+
"type-fest": "^4.9.0"
|
|
34
|
+
},
|
|
31
35
|
"devDependencies": {
|
|
32
|
-
"@sinclair/typebox": "^0.
|
|
36
|
+
"@sinclair/typebox": "^0.32.9",
|
|
33
37
|
"@swc/core": "^1.3.65",
|
|
34
38
|
"@swc/helpers": "^0.5.1",
|
|
35
39
|
"@swc/wasm": "^1.3.65",
|
|
36
40
|
"@types/jest": "^29.5.0",
|
|
37
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
38
|
-
"@typescript-eslint/parser": "^
|
|
41
|
+
"@typescript-eslint/eslint-plugin": "^6.18.1",
|
|
42
|
+
"@typescript-eslint/parser": "^6.0.0",
|
|
39
43
|
"ajv": "^8.12.0",
|
|
40
44
|
"ajv-formats": "^2.1.1",
|
|
41
45
|
"eslint": "^8.43.0",
|
|
42
|
-
"
|
|
46
|
+
"eslint-plugin-simple-import-sort": "^10.0.0",
|
|
47
|
+
"eslint-plugin-unused-imports": "^3.0.0",
|
|
43
48
|
"jest": "^29.5.0",
|
|
44
49
|
"json-schema-faker": "^0.5.3",
|
|
45
50
|
"json-schema-to-typescript": "^13.0.2",
|
|
@@ -50,5 +55,12 @@
|
|
|
50
55
|
"tsconfig-paths": "^4.2.0",
|
|
51
56
|
"tsup": "^7.2.0",
|
|
52
57
|
"typescript": "^5.1.6"
|
|
58
|
+
},
|
|
59
|
+
"overrides": {
|
|
60
|
+
"@sinclair/typebox": "$@sinclair/typebox",
|
|
61
|
+
"@typescript-eslint/eslint-plugin": "$@typescript-eslint/eslint-plugin",
|
|
62
|
+
"@typescript-eslint/parser": "$@typescript-eslint/parser",
|
|
63
|
+
"eslint-plugin-unused-imports": "$eslint-plugin-unused-imports",
|
|
64
|
+
"eslint-plugin-simple-import-sort": "$eslint-plugin-simple-import-sort"
|
|
53
65
|
}
|
|
54
66
|
}
|
package/dist/meta.json
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "0.3.0",
|
|
3
|
-
"ids": {
|
|
4
|
-
"bot": {
|
|
5
|
-
"slave": [
|
|
6
|
-
"request",
|
|
7
|
-
"response"
|
|
8
|
-
],
|
|
9
|
-
"unslave": [
|
|
10
|
-
"request",
|
|
11
|
-
"response"
|
|
12
|
-
]
|
|
13
|
-
},
|
|
14
|
-
"game": {
|
|
15
|
-
"launch": [
|
|
16
|
-
"response"
|
|
17
|
-
]
|
|
18
|
-
},
|
|
19
|
-
"lobby": {
|
|
20
|
-
"close": [
|
|
21
|
-
"request",
|
|
22
|
-
"response"
|
|
23
|
-
],
|
|
24
|
-
"create": [
|
|
25
|
-
"request",
|
|
26
|
-
"response"
|
|
27
|
-
],
|
|
28
|
-
"join": [
|
|
29
|
-
"request",
|
|
30
|
-
"response"
|
|
31
|
-
],
|
|
32
|
-
"joined": [
|
|
33
|
-
"response"
|
|
34
|
-
],
|
|
35
|
-
"leave": [
|
|
36
|
-
"request",
|
|
37
|
-
"response"
|
|
38
|
-
],
|
|
39
|
-
"left": [
|
|
40
|
-
"response"
|
|
41
|
-
],
|
|
42
|
-
"list": [
|
|
43
|
-
"request",
|
|
44
|
-
"response"
|
|
45
|
-
],
|
|
46
|
-
"receiveMessage": [
|
|
47
|
-
"response"
|
|
48
|
-
],
|
|
49
|
-
"sendMessage": [
|
|
50
|
-
"request",
|
|
51
|
-
"response"
|
|
52
|
-
],
|
|
53
|
-
"updated": [
|
|
54
|
-
"response"
|
|
55
|
-
]
|
|
56
|
-
},
|
|
57
|
-
"matchmaking": {
|
|
58
|
-
"cancel": [
|
|
59
|
-
"request",
|
|
60
|
-
"response"
|
|
61
|
-
],
|
|
62
|
-
"found": [
|
|
63
|
-
"response"
|
|
64
|
-
],
|
|
65
|
-
"list": [
|
|
66
|
-
"request",
|
|
67
|
-
"response"
|
|
68
|
-
],
|
|
69
|
-
"lost": [
|
|
70
|
-
"response"
|
|
71
|
-
],
|
|
72
|
-
"queue": [
|
|
73
|
-
"request",
|
|
74
|
-
"response"
|
|
75
|
-
],
|
|
76
|
-
"queueUpdate": [
|
|
77
|
-
"response"
|
|
78
|
-
],
|
|
79
|
-
"ready": [
|
|
80
|
-
"request",
|
|
81
|
-
"response"
|
|
82
|
-
],
|
|
83
|
-
"readyUpdate": [
|
|
84
|
-
"response"
|
|
85
|
-
]
|
|
86
|
-
},
|
|
87
|
-
"system": {
|
|
88
|
-
"connected": [
|
|
89
|
-
"response"
|
|
90
|
-
],
|
|
91
|
-
"disconnect": [
|
|
92
|
-
"request"
|
|
93
|
-
]
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|