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.
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 +1054 -179
  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 +327 -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 +475 -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 +459 -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 +183 -4
  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 +290 -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 +304 -0
  51. package/package.json +18 -6
  52. package/dist/meta.json +0 -96
@@ -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,202 @@
19
19
  "data": {
20
20
  "type": "object",
21
21
  "properties": {
22
- "accountId": {
22
+ "userId": {
23
23
  "type": "integer"
24
24
  },
25
+ "username": {
26
+ "type": "string"
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
+ "battleStatus": {
65
+ "anyOf": [
66
+ {
67
+ "allOf": [
68
+ {
69
+ "type": "object",
70
+ "properties": {
71
+ "battleId": {
72
+ "type": "integer"
73
+ }
74
+ },
75
+ "required": [
76
+ "battleId"
77
+ ]
78
+ },
79
+ {
80
+ "anyOf": [
81
+ {
82
+ "type": "object",
83
+ "allOf": [
84
+ {
85
+ "type": "object",
86
+ "properties": {
87
+ "playerId": {
88
+ "type": "integer"
89
+ },
90
+ "teamId": {
91
+ "type": "integer"
92
+ },
93
+ "color": {
94
+ "type": "string"
95
+ },
96
+ "bonus": {
97
+ "type": "number"
98
+ },
99
+ "inGame": {
100
+ "type": "boolean"
101
+ }
102
+ },
103
+ "required": [
104
+ "playerId",
105
+ "teamId",
106
+ "color",
107
+ "bonus",
108
+ "inGame"
109
+ ]
110
+ },
111
+ {
112
+ "type": "object",
113
+ "properties": {
114
+ "isSpectator": {
115
+ "const": false,
116
+ "type": "boolean"
117
+ },
118
+ "isBot": {
119
+ "const": false,
120
+ "type": "boolean"
121
+ },
122
+ "ready": {
123
+ "type": "boolean"
124
+ },
125
+ "sync": {
126
+ "type": "object",
127
+ "properties": {
128
+ "engine": {
129
+ "type": "number"
130
+ },
131
+ "game": {
132
+ "type": "number"
133
+ },
134
+ "map": {
135
+ "type": "number"
136
+ }
137
+ },
138
+ "required": [
139
+ "engine",
140
+ "game",
141
+ "map"
142
+ ]
143
+ }
144
+ },
145
+ "required": [
146
+ "isSpectator",
147
+ "isBot",
148
+ "ready",
149
+ "sync"
150
+ ]
151
+ }
152
+ ]
153
+ },
154
+ {
155
+ "type": "object",
156
+ "properties": {
157
+ "isSpectator": {
158
+ "const": true,
159
+ "type": "boolean"
160
+ },
161
+ "isBot": {
162
+ "const": false,
163
+ "type": "boolean"
164
+ }
165
+ },
166
+ "required": [
167
+ "isSpectator",
168
+ "isBot"
169
+ ]
170
+ }
171
+ ]
172
+ }
173
+ ]
174
+ },
175
+ {
176
+ "type": "null"
177
+ }
178
+ ]
179
+ },
180
+ "friendIds": {
181
+ "type": "array",
182
+ "items": {
183
+ "type": "integer"
184
+ }
185
+ },
186
+ "outgoingFriendRequestIds": {
187
+ "type": "array",
188
+ "items": {
189
+ "type": "integer"
190
+ }
191
+ },
192
+ "incomingFriendRequestIds": {
193
+ "type": "array",
194
+ "items": {
195
+ "type": "integer"
196
+ }
197
+ },
198
+ "ignoreIds": {
199
+ "type": "array",
200
+ "items": {
201
+ "type": "integer"
202
+ }
33
203
  }
34
204
  },
35
205
  "required": [
36
- "accountId",
206
+ "userId",
207
+ "username",
37
208
  "displayName",
38
- "avatarUrl"
209
+ "avatarUrl",
210
+ "clanId",
211
+ "partyId",
212
+ "roles",
213
+ "battleStatus",
214
+ "friendIds",
215
+ "outgoingFriendRequestIds",
216
+ "incomingFriendRequestIds",
217
+ "ignoreIds"
39
218
  ]
40
219
  }
41
220
  },
@@ -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
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "$id": "user/subscribe/request",
3
+ "roles": [],
4
+ "type": "object",
5
+ "properties": {
6
+ "messageId": {
7
+ "type": "string"
8
+ },
9
+ "commandId": {
10
+ "const": "user/subscribe/request",
11
+ "type": "string"
12
+ },
13
+ "data": {
14
+ "type": "object",
15
+ "properties": {
16
+ "userIds": {
17
+ "type": "array",
18
+ "items": {
19
+ "type": "integer"
20
+ }
21
+ }
22
+ },
23
+ "required": [
24
+ "userIds"
25
+ ]
26
+ }
27
+ },
28
+ "required": [
29
+ "messageId",
30
+ "commandId",
31
+ "data"
32
+ ]
33
+ }