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": "matchmaking/cancel/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": "matchmaking/cancel/response",
3
- "requiresLogin": false,
3
+ "roles": [],
4
4
  "anyOf": [
5
5
  {
6
6
  "type": "object",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$id": "matchmaking/found/response",
3
- "requiresLogin": false,
3
+ "roles": [],
4
4
  "anyOf": [
5
5
  {
6
6
  "type": "object",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$id": "matchmaking/list/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": "matchmaking/list/response",
3
- "requiresLogin": false,
3
+ "roles": [],
4
4
  "anyOf": [
5
5
  {
6
6
  "type": "object",
@@ -19,23 +19,25 @@
19
19
  "data": {
20
20
  "examples": [
21
21
  {
22
- "queues": [
22
+ "playlists": [
23
23
  {
24
24
  "id": "1v1",
25
25
  "name": "Duel",
26
- "ranked": true
26
+ "ranked": true,
27
+ "teamSize": 1
27
28
  },
28
29
  {
29
30
  "id": "2v2",
30
31
  "name": "2v2",
31
- "ranked": true
32
+ "ranked": true,
33
+ "teamSize": 2
32
34
  }
33
35
  ]
34
36
  }
35
37
  ],
36
38
  "type": "object",
37
39
  "properties": {
38
- "queues": {
40
+ "playlists": {
39
41
  "type": "array",
40
42
  "items": {
41
43
  "type": "object",
@@ -48,18 +50,22 @@
48
50
  },
49
51
  "ranked": {
50
52
  "type": "boolean"
53
+ },
54
+ "teamSize": {
55
+ "type": "integer"
51
56
  }
52
57
  },
53
58
  "required": [
54
59
  "id",
55
60
  "name",
56
- "ranked"
61
+ "ranked",
62
+ "teamSize"
57
63
  ]
58
64
  }
59
65
  }
60
66
  },
61
67
  "required": [
62
- "queues"
68
+ "playlists"
63
69
  ]
64
70
  }
65
71
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$id": "matchmaking/lost/response",
3
- "requiresLogin": false,
3
+ "roles": [],
4
4
  "anyOf": [
5
5
  {
6
6
  "type": "object",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$id": "matchmaking/queue/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": "matchmaking/queue/response",
3
- "requiresLogin": false,
3
+ "roles": [],
4
4
  "anyOf": [
5
5
  {
6
6
  "type": "object",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$id": "matchmaking/queueUpdate/response",
3
- "requiresLogin": false,
3
+ "roles": [],
4
4
  "anyOf": [
5
5
  {
6
6
  "type": "object",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$id": "matchmaking/ready/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": "matchmaking/ready/response",
3
- "requiresLogin": false,
3
+ "roles": [],
4
4
  "anyOf": [
5
5
  {
6
6
  "type": "object",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$id": "matchmaking/readyUpdate/response",
3
- "requiresLogin": false,
3
+ "roles": [],
4
4
  "anyOf": [
5
5
  {
6
6
  "type": "object",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$id": "system/connected/response",
3
- "requiresLogin": false,
3
+ "roles": [],
4
4
  "anyOf": [
5
5
  {
6
6
  "type": "object",
@@ -19,23 +19,223 @@
19
19
  "data": {
20
20
  "type": "object",
21
21
  "properties": {
22
- "accountId": {
23
- "type": "integer"
22
+ "userId": {
23
+ "type": "string"
24
+ },
25
+ "username": {
26
+ "type": "string"
24
27
  },
25
28
  "displayName": {
26
29
  "type": "string"
27
30
  },
28
31
  "avatarUrl": {
32
+ "format": "uri",
29
33
  "type": "string"
30
34
  },
35
+ "clanId": {
36
+ "anyOf": [
37
+ {
38
+ "type": "integer"
39
+ },
40
+ {
41
+ "type": "null"
42
+ }
43
+ ]
44
+ },
45
+ "partyId": {
46
+ "anyOf": [
47
+ {
48
+ "type": "integer"
49
+ },
50
+ {
51
+ "type": "null"
52
+ }
53
+ ]
54
+ },
55
+ "roles": {
56
+ "type": "array",
57
+ "items": {
58
+ "type": "string"
59
+ }
60
+ },
31
61
  "countryCode": {
32
62
  "type": "string"
63
+ },
64
+ "status": {
65
+ "anyOf": [
66
+ {
67
+ "const": "offline",
68
+ "type": "string"
69
+ },
70
+ {
71
+ "const": "menu",
72
+ "type": "string"
73
+ },
74
+ {
75
+ "const": "playing",
76
+ "type": "string"
77
+ },
78
+ {
79
+ "const": "lobby",
80
+ "type": "string"
81
+ }
82
+ ]
83
+ },
84
+ "battleStatus": {
85
+ "anyOf": [
86
+ {
87
+ "allOf": [
88
+ {
89
+ "type": "object",
90
+ "properties": {
91
+ "battleId": {
92
+ "type": "integer"
93
+ }
94
+ },
95
+ "required": [
96
+ "battleId"
97
+ ]
98
+ },
99
+ {
100
+ "anyOf": [
101
+ {
102
+ "type": "object",
103
+ "allOf": [
104
+ {
105
+ "type": "object",
106
+ "properties": {
107
+ "playerId": {
108
+ "type": "integer"
109
+ },
110
+ "teamId": {
111
+ "type": "integer"
112
+ },
113
+ "color": {
114
+ "type": "string"
115
+ },
116
+ "bonus": {
117
+ "type": "number"
118
+ },
119
+ "inGame": {
120
+ "type": "boolean"
121
+ }
122
+ },
123
+ "required": [
124
+ "playerId",
125
+ "teamId",
126
+ "color",
127
+ "bonus",
128
+ "inGame"
129
+ ]
130
+ },
131
+ {
132
+ "type": "object",
133
+ "properties": {
134
+ "isSpectator": {
135
+ "const": false,
136
+ "type": "boolean"
137
+ },
138
+ "isBot": {
139
+ "const": false,
140
+ "type": "boolean"
141
+ },
142
+ "ready": {
143
+ "type": "boolean"
144
+ },
145
+ "sync": {
146
+ "type": "object",
147
+ "properties": {
148
+ "engine": {
149
+ "type": "number"
150
+ },
151
+ "game": {
152
+ "type": "number"
153
+ },
154
+ "map": {
155
+ "type": "number"
156
+ }
157
+ },
158
+ "required": [
159
+ "engine",
160
+ "game",
161
+ "map"
162
+ ]
163
+ }
164
+ },
165
+ "required": [
166
+ "isSpectator",
167
+ "isBot",
168
+ "ready",
169
+ "sync"
170
+ ]
171
+ }
172
+ ]
173
+ },
174
+ {
175
+ "type": "object",
176
+ "properties": {
177
+ "isSpectator": {
178
+ "const": true,
179
+ "type": "boolean"
180
+ },
181
+ "isBot": {
182
+ "const": false,
183
+ "type": "boolean"
184
+ }
185
+ },
186
+ "required": [
187
+ "isSpectator",
188
+ "isBot"
189
+ ]
190
+ }
191
+ ]
192
+ }
193
+ ]
194
+ },
195
+ {
196
+ "type": "null"
197
+ }
198
+ ]
199
+ },
200
+ "friendIds": {
201
+ "type": "array",
202
+ "items": {
203
+ "type": "integer"
204
+ }
205
+ },
206
+ "outgoingFriendRequestIds": {
207
+ "type": "array",
208
+ "items": {
209
+ "type": "integer"
210
+ }
211
+ },
212
+ "incomingFriendRequestIds": {
213
+ "type": "array",
214
+ "items": {
215
+ "type": "integer"
216
+ }
217
+ },
218
+ "ignoreIds": {
219
+ "type": "array",
220
+ "items": {
221
+ "type": "integer"
222
+ }
33
223
  }
34
224
  },
35
225
  "required": [
36
- "accountId",
226
+ "userId",
227
+ "username",
37
228
  "displayName",
38
- "avatarUrl"
229
+ "avatarUrl",
230
+ "clanId",
231
+ "partyId",
232
+ "roles",
233
+ "status",
234
+ "battleStatus",
235
+ "friendIds",
236
+ "outgoingFriendRequestIds",
237
+ "incomingFriendRequestIds",
238
+ "ignoreIds"
39
239
  ]
40
240
  }
41
241
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$id": "system/disconnect/request",
3
- "requiresLogin": false,
3
+ "roles": [],
4
4
  "type": "object",
5
5
  "properties": {
6
6
  "messageId": {
@@ -9,6 +9,17 @@
9
9
  "commandId": {
10
10
  "const": "system/disconnect/request",
11
11
  "type": "string"
12
+ },
13
+ "data": {
14
+ "type": "object",
15
+ "properties": {
16
+ "reason": {
17
+ "type": "string"
18
+ }
19
+ },
20
+ "required": [
21
+ "reason"
22
+ ]
12
23
  }
13
24
  },
14
25
  "required": [
@@ -0,0 +1,105 @@
1
+ {
2
+ "$id": "system/disconnect/response",
3
+ "roles": [],
4
+ "anyOf": [
5
+ {
6
+ "type": "object",
7
+ "properties": {
8
+ "messageId": {
9
+ "type": "string"
10
+ },
11
+ "commandId": {
12
+ "const": "system/disconnect/response",
13
+ "type": "string"
14
+ },
15
+ "status": {
16
+ "const": "success",
17
+ "type": "string"
18
+ }
19
+ },
20
+ "required": [
21
+ "messageId",
22
+ "commandId",
23
+ "status"
24
+ ]
25
+ },
26
+ {
27
+ "type": "object",
28
+ "properties": {
29
+ "messageId": {
30
+ "type": "string"
31
+ },
32
+ "commandId": {
33
+ "const": "system/disconnect/response",
34
+ "type": "string"
35
+ },
36
+ "status": {
37
+ "const": "failed",
38
+ "type": "string"
39
+ },
40
+ "reason": {
41
+ "const": "internal_error",
42
+ "type": "string"
43
+ }
44
+ },
45
+ "required": [
46
+ "messageId",
47
+ "commandId",
48
+ "status",
49
+ "reason"
50
+ ]
51
+ },
52
+ {
53
+ "type": "object",
54
+ "properties": {
55
+ "messageId": {
56
+ "type": "string"
57
+ },
58
+ "commandId": {
59
+ "const": "system/disconnect/response",
60
+ "type": "string"
61
+ },
62
+ "status": {
63
+ "const": "failed",
64
+ "type": "string"
65
+ },
66
+ "reason": {
67
+ "const": "unauthorized",
68
+ "type": "string"
69
+ }
70
+ },
71
+ "required": [
72
+ "messageId",
73
+ "commandId",
74
+ "status",
75
+ "reason"
76
+ ]
77
+ },
78
+ {
79
+ "type": "object",
80
+ "properties": {
81
+ "messageId": {
82
+ "type": "string"
83
+ },
84
+ "commandId": {
85
+ "const": "system/disconnect/response",
86
+ "type": "string"
87
+ },
88
+ "status": {
89
+ "const": "failed",
90
+ "type": "string"
91
+ },
92
+ "reason": {
93
+ "const": "invalid_command",
94
+ "type": "string"
95
+ }
96
+ },
97
+ "required": [
98
+ "messageId",
99
+ "commandId",
100
+ "status",
101
+ "reason"
102
+ ]
103
+ }
104
+ ]
105
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$id": "system/serverStats/request",
3
+ "roles": [],
4
+ "type": "object",
5
+ "properties": {
6
+ "messageId": {
7
+ "type": "string"
8
+ },
9
+ "commandId": {
10
+ "const": "system/serverStats/request",
11
+ "type": "string"
12
+ }
13
+ },
14
+ "required": [
15
+ "messageId",
16
+ "commandId"
17
+ ]
18
+ }
@@ -0,0 +1,117 @@
1
+ {
2
+ "$id": "system/serverStats/response",
3
+ "roles": [],
4
+ "anyOf": [
5
+ {
6
+ "type": "object",
7
+ "properties": {
8
+ "messageId": {
9
+ "type": "string"
10
+ },
11
+ "commandId": {
12
+ "const": "system/serverStats/response",
13
+ "type": "string"
14
+ },
15
+ "status": {
16
+ "const": "success",
17
+ "type": "string"
18
+ },
19
+ "data": {
20
+ "type": "object",
21
+ "properties": {
22
+ "userCount": {
23
+ "type": "integer"
24
+ }
25
+ },
26
+ "required": [
27
+ "userCount"
28
+ ]
29
+ }
30
+ },
31
+ "required": [
32
+ "messageId",
33
+ "commandId",
34
+ "status",
35
+ "data"
36
+ ]
37
+ },
38
+ {
39
+ "type": "object",
40
+ "properties": {
41
+ "messageId": {
42
+ "type": "string"
43
+ },
44
+ "commandId": {
45
+ "const": "system/serverStats/response",
46
+ "type": "string"
47
+ },
48
+ "status": {
49
+ "const": "failed",
50
+ "type": "string"
51
+ },
52
+ "reason": {
53
+ "const": "internal_error",
54
+ "type": "string"
55
+ }
56
+ },
57
+ "required": [
58
+ "messageId",
59
+ "commandId",
60
+ "status",
61
+ "reason"
62
+ ]
63
+ },
64
+ {
65
+ "type": "object",
66
+ "properties": {
67
+ "messageId": {
68
+ "type": "string"
69
+ },
70
+ "commandId": {
71
+ "const": "system/serverStats/response",
72
+ "type": "string"
73
+ },
74
+ "status": {
75
+ "const": "failed",
76
+ "type": "string"
77
+ },
78
+ "reason": {
79
+ "const": "unauthorized",
80
+ "type": "string"
81
+ }
82
+ },
83
+ "required": [
84
+ "messageId",
85
+ "commandId",
86
+ "status",
87
+ "reason"
88
+ ]
89
+ },
90
+ {
91
+ "type": "object",
92
+ "properties": {
93
+ "messageId": {
94
+ "type": "string"
95
+ },
96
+ "commandId": {
97
+ "const": "system/serverStats/response",
98
+ "type": "string"
99
+ },
100
+ "status": {
101
+ "const": "failed",
102
+ "type": "string"
103
+ },
104
+ "reason": {
105
+ "const": "invalid_command",
106
+ "type": "string"
107
+ }
108
+ },
109
+ "required": [
110
+ "messageId",
111
+ "commandId",
112
+ "status",
113
+ "reason"
114
+ ]
115
+ }
116
+ ]
117
+ }