tachyon-protocol 1.6.4 → 1.7.0
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 +65 -9
- package/dist/index.d.mts +812 -1037
- package/dist/index.d.ts +812 -1037
- package/dist/index.js +160 -116
- package/dist/index.mjs +160 -116
- package/dist/validators.d.mts +19 -13
- package/dist/validators.d.ts +19 -13
- package/dist/validators.js +1 -1
- package/dist/validators.mjs +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,548 +1,469 @@
|
|
|
1
|
-
import { EmptyObject, KeysOfUnion } from 'type-fest';
|
|
2
|
-
|
|
3
1
|
declare const tachyonMeta: {
|
|
4
|
-
readonly version: "1.
|
|
5
|
-
readonly
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
readonly
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
readonly
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
readonly left: readonly ["response"];
|
|
20
|
-
readonly list: readonly ["request", "response"];
|
|
21
|
-
readonly receiveMessage: readonly ["response"];
|
|
22
|
-
readonly sendMessage: readonly ["request", "response"];
|
|
23
|
-
readonly subscribe: readonly ["request", "response"];
|
|
24
|
-
readonly unsubscribe: readonly ["request", "response"];
|
|
25
|
-
readonly updated: readonly ["response"];
|
|
26
|
-
};
|
|
27
|
-
readonly matchmaking: {
|
|
28
|
-
readonly cancel: readonly ["request", "response"];
|
|
29
|
-
readonly found: readonly ["response"];
|
|
30
|
-
readonly list: readonly ["request", "response"];
|
|
31
|
-
readonly lost: readonly ["response"];
|
|
32
|
-
readonly queue: readonly ["request", "response"];
|
|
33
|
-
readonly queueUpdate: readonly ["response"];
|
|
34
|
-
readonly ready: readonly ["request", "response"];
|
|
35
|
-
readonly readyUpdate: readonly ["response"];
|
|
36
|
-
};
|
|
37
|
-
readonly system: {
|
|
38
|
-
readonly connected: readonly ["response"];
|
|
39
|
-
readonly disconnect: readonly ["request", "response"];
|
|
40
|
-
readonly serverStats: readonly ["request", "response"];
|
|
2
|
+
readonly version: "1.7.0";
|
|
3
|
+
readonly schema: {
|
|
4
|
+
readonly server: {
|
|
5
|
+
readonly request: {
|
|
6
|
+
readonly send: readonly ["autohost/launch"];
|
|
7
|
+
readonly receive: readonly ["autohost/slave", "autohost/unslave", "lobby/close", "lobby/create", "lobby/join", "lobby/leave", "lobby/list", "lobby/sendMessage", "lobby/subscribe", "lobby/unsubscribe", "matchmaking/cancel", "matchmaking/declined", "matchmaking/list", "matchmaking/queue", "matchmaking/ready", "system/disconnect", "system/serverStats", "user/subscribe", "user/unsubscribe"];
|
|
8
|
+
};
|
|
9
|
+
readonly response: {
|
|
10
|
+
readonly send: readonly ["autohost/slave", "autohost/unslave", "lobby/close", "lobby/create", "lobby/join", "lobby/leave", "lobby/list", "lobby/sendMessage", "lobby/subscribe", "lobby/unsubscribe", "matchmaking/cancel", "matchmaking/declined", "matchmaking/list", "matchmaking/queue", "matchmaking/ready", "system/disconnect", "system/serverStats", "user/subscribe", "user/unsubscribe"];
|
|
11
|
+
readonly receive: readonly ["autohost/launch"];
|
|
12
|
+
};
|
|
13
|
+
readonly event: {
|
|
14
|
+
readonly send: readonly ["autohost/connected", "game/launch", "lobby/joined", "lobby/left", "lobby/receiveMessage", "lobby/updated", "matchmaking/found", "matchmaking/foundUpdate", "matchmaking/lost", "matchmaking/queueUpdate", "matchmaking/readyUpdate", "system/connected", "user/updated"];
|
|
15
|
+
readonly receive: readonly [];
|
|
16
|
+
};
|
|
41
17
|
};
|
|
42
18
|
readonly user: {
|
|
43
|
-
readonly
|
|
44
|
-
|
|
45
|
-
|
|
19
|
+
readonly request: {
|
|
20
|
+
readonly send: readonly ["lobby/close", "lobby/create", "lobby/join", "lobby/leave", "lobby/list", "lobby/sendMessage", "lobby/subscribe", "lobby/unsubscribe", "matchmaking/cancel", "matchmaking/declined", "matchmaking/list", "matchmaking/queue", "matchmaking/ready", "system/disconnect", "system/serverStats", "user/subscribe", "user/unsubscribe"];
|
|
21
|
+
readonly receive: readonly [];
|
|
22
|
+
};
|
|
23
|
+
readonly response: {
|
|
24
|
+
readonly send: readonly [];
|
|
25
|
+
readonly receive: readonly ["lobby/close", "lobby/create", "lobby/join", "lobby/leave", "lobby/list", "lobby/sendMessage", "lobby/subscribe", "lobby/unsubscribe", "matchmaking/cancel", "matchmaking/declined", "matchmaking/list", "matchmaking/queue", "matchmaking/ready", "system/disconnect", "system/serverStats", "user/subscribe", "user/unsubscribe"];
|
|
26
|
+
};
|
|
27
|
+
readonly event: {
|
|
28
|
+
readonly send: readonly [];
|
|
29
|
+
readonly receive: readonly ["game/launch", "lobby/joined", "lobby/left", "lobby/receiveMessage", "lobby/updated", "matchmaking/found", "matchmaking/foundUpdate", "matchmaking/lost", "matchmaking/queueUpdate", "matchmaking/readyUpdate", "system/connected", "user/updated"];
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
readonly autohost: {
|
|
33
|
+
readonly request: {
|
|
34
|
+
readonly send: readonly ["autohost/slave", "autohost/unslave"];
|
|
35
|
+
readonly receive: readonly ["autohost/launch"];
|
|
36
|
+
};
|
|
37
|
+
readonly response: {
|
|
38
|
+
readonly send: readonly ["autohost/launch"];
|
|
39
|
+
readonly receive: readonly ["autohost/slave", "autohost/unslave"];
|
|
40
|
+
};
|
|
41
|
+
readonly event: {
|
|
42
|
+
readonly send: readonly [];
|
|
43
|
+
readonly receive: readonly ["autohost/connected"];
|
|
44
|
+
};
|
|
46
45
|
};
|
|
47
46
|
};
|
|
48
47
|
};
|
|
48
|
+
type TachyonMeta = typeof tachyonMeta.schema;
|
|
49
|
+
type TachyonActor = keyof TachyonMeta;
|
|
50
|
+
type TachyonCommandType = TachyonCommand["type"];
|
|
51
|
+
type TachyonRequest = Extract<TachyonCommand, {
|
|
52
|
+
type: "request";
|
|
53
|
+
}>;
|
|
54
|
+
type TachyonResponse = Extract<TachyonCommand, {
|
|
55
|
+
type: "response";
|
|
56
|
+
}>;
|
|
57
|
+
type TachyonEvent = Extract<TachyonCommand, {
|
|
58
|
+
type: "event";
|
|
59
|
+
}>;
|
|
60
|
+
type GetCommandIds<Sender extends TachyonActor = TachyonActor, Receiver extends TachyonActor = TachyonActor, Type extends TachyonCommandType = TachyonCommandType> = ExcludeEmptyArray<TachyonMeta[Sender][Type]["send"]>[number] & ExcludeEmptyArray<TachyonMeta[Receiver][Type]["receive"]>[number];
|
|
61
|
+
type GetCommands<Sender extends TachyonActor = TachyonActor, Receiver extends TachyonActor = TachyonActor, Type extends TachyonCommandType = TachyonCommandType, CommandId extends GetCommandIds<Sender, Receiver, Type> = GetCommandIds<Sender, Receiver, Type>> = Extract<TachyonCommand, {
|
|
62
|
+
type: Type;
|
|
63
|
+
commandId: CommandId;
|
|
64
|
+
}>;
|
|
65
|
+
type GetCommandData<C extends TachyonCommand> = C extends {
|
|
66
|
+
data: infer D;
|
|
67
|
+
} ? D : never;
|
|
68
|
+
type ExcludeEmptyArray<T> = T extends readonly unknown[] ? T["length"] extends 0 ? never : T : T extends unknown[] ? T["length"] extends 0 ? never : T : never;
|
|
49
69
|
|
|
50
|
-
|
|
51
|
-
type EndpointId<S extends ServiceId> = keyof Tachyon[S];
|
|
52
|
-
type Command<S extends ServiceId, E extends EndpointId<S>> = Tachyon[S][E];
|
|
53
|
-
type RequestCommand<S extends ServiceId, E extends EndpointId<S>> = Command<S, E> extends {
|
|
54
|
-
request: infer Request;
|
|
55
|
-
} ? Request : never;
|
|
56
|
-
type ResponseCommand<S extends ServiceId, E extends EndpointId<S>> = Command<S, E> extends {
|
|
57
|
-
response: infer Response;
|
|
58
|
-
} ? Response : never;
|
|
59
|
-
type RequestEndpointId<S extends ServiceId> = {
|
|
60
|
-
[E in EndpointId<S>]: "request" extends keyof Command<S, E> ? E : never;
|
|
61
|
-
}[EndpointId<S>];
|
|
62
|
-
type ResponseEndpointId<S extends ServiceId> = {
|
|
63
|
-
[E in EndpointId<S>]: "response" extends keyof Command<S, E> ? E : never;
|
|
64
|
-
}[EndpointId<S>];
|
|
65
|
-
type ResponseOnlyEndpointId<S extends ServiceId> = {
|
|
66
|
-
[E in EndpointId<S>]: Command<S, E> extends RequestCommand<S, E> ? never : E;
|
|
67
|
-
}[EndpointId<S>];
|
|
68
|
-
type RequestData<S extends ServiceId, E extends EndpointId<S>> = RequestCommand<S, E> extends {
|
|
69
|
-
data: infer Data;
|
|
70
|
-
} ? Data : never;
|
|
71
|
-
type DistributiveOmit<T, K extends keyof T> = T extends T ? Omit<T, K> : never;
|
|
72
|
-
type ResponseData<S extends ServiceId, E extends EndpointId<S>> = ResponseCommand<S, E> extends {
|
|
73
|
-
commandId: string;
|
|
74
|
-
messageId: string;
|
|
75
|
-
} ? DistributiveOmit<ResponseCommand<S, E>, "commandId" | "messageId"> : never;
|
|
76
|
-
type SuccessResponseData<S extends ServiceId, E extends EndpointId<S>> = ResponseCommand<S, E> & {
|
|
77
|
-
status: "success";
|
|
78
|
-
} extends {
|
|
79
|
-
data: infer Data;
|
|
80
|
-
} ? Data : never;
|
|
81
|
-
type EmptyRequestId<S extends ServiceId> = {
|
|
82
|
-
[K in EndpointId<S>]: RequestData<S, K> extends EmptyObject ? K : never;
|
|
83
|
-
}[EndpointId<S>];
|
|
84
|
-
type DataRequestId<S extends ServiceId> = {
|
|
85
|
-
[K in EndpointId<S>]: RequestData<S, K> extends EmptyObject ? never : K;
|
|
86
|
-
}[EndpointId<S>];
|
|
87
|
-
type RequestType = {
|
|
88
|
-
[S in keyof Tachyon]: {
|
|
89
|
-
[E in keyof Tachyon[S]]: Tachyon[S][E] extends {
|
|
90
|
-
request: unknown;
|
|
91
|
-
} ? Tachyon[S][E]["request"] : never;
|
|
92
|
-
}[KeysOfUnion<Tachyon[S]>];
|
|
93
|
-
}[KeysOfUnion<Tachyon>];
|
|
94
|
-
type ResponseType = {
|
|
95
|
-
[S in keyof Tachyon]: {
|
|
96
|
-
[E in keyof Tachyon[S]]: Tachyon[S][E] extends {
|
|
97
|
-
response: unknown;
|
|
98
|
-
} ? Tachyon[S][E]["response"] : never;
|
|
99
|
-
}[KeysOfUnion<Tachyon[S]>];
|
|
100
|
-
}[KeysOfUnion<Tachyon>];
|
|
101
|
-
type RequestCommandId = Pick<RequestType, "commandId">;
|
|
102
|
-
type ResponseCommandId = Pick<ResponseType, "commandId">;
|
|
103
|
-
type GenericRequestCommand = {
|
|
104
|
-
commandId: string;
|
|
105
|
-
messageId: string;
|
|
106
|
-
data?: Record<string, unknown>;
|
|
107
|
-
};
|
|
108
|
-
type GenericResponseCommand = {
|
|
109
|
-
commandId: string;
|
|
110
|
-
messageId: string;
|
|
111
|
-
} & ({
|
|
112
|
-
status: "success";
|
|
113
|
-
data?: Record<string, unknown>;
|
|
114
|
-
} | {
|
|
115
|
-
status: "failed";
|
|
116
|
-
reason: string;
|
|
117
|
-
});
|
|
70
|
+
export { GetCommandData, GetCommandIds, GetCommands, TachyonActor, TachyonCommandType, TachyonEvent, TachyonMeta, TachyonRequest, TachyonResponse, tachyonMeta };
|
|
118
71
|
|
|
119
|
-
export
|
|
120
|
-
|
|
121
|
-
|
|
72
|
+
export type TachyonCommand =
|
|
73
|
+
| AutohostConnectedEvent
|
|
74
|
+
| AutohostLaunchRequest
|
|
75
|
+
| AutohostLaunchResponse
|
|
76
|
+
| AutohostSlaveRequest
|
|
77
|
+
| AutohostSlaveResponse
|
|
78
|
+
| AutohostUnslaveRequest
|
|
79
|
+
| AutohostUnslaveResponse
|
|
80
|
+
| GameLaunchEvent
|
|
81
|
+
| LobbyCloseRequest
|
|
82
|
+
| LobbyCloseResponse
|
|
83
|
+
| LobbyCreateRequest
|
|
84
|
+
| LobbyCreateResponse
|
|
85
|
+
| LobbyJoinRequest
|
|
86
|
+
| LobbyJoinResponse
|
|
87
|
+
| LobbyJoinedEvent
|
|
88
|
+
| LobbyLeaveRequest
|
|
89
|
+
| LobbyLeaveResponse
|
|
90
|
+
| LobbyLeftEvent
|
|
91
|
+
| LobbyListRequest
|
|
92
|
+
| LobbyListResponse
|
|
93
|
+
| LobbyReceiveMessageEvent
|
|
94
|
+
| LobbySendMessageRequest
|
|
95
|
+
| LobbySendMessageResponse
|
|
96
|
+
| LobbySubscribeRequest
|
|
97
|
+
| LobbySubscribeResponse
|
|
98
|
+
| LobbyUnsubscribeRequest
|
|
99
|
+
| LobbyUnsubscribeResponse
|
|
100
|
+
| LobbyUpdatedEvent
|
|
101
|
+
| MatchmakingCancelRequest
|
|
102
|
+
| MatchmakingCancelResponse
|
|
103
|
+
| MatchmakingDeclinedRequest
|
|
104
|
+
| MatchmakingDeclinedResponse
|
|
105
|
+
| MatchmakingFoundEvent
|
|
106
|
+
| MatchmakingFoundUpdateEvent
|
|
107
|
+
| MatchmakingListRequest
|
|
108
|
+
| MatchmakingListResponse
|
|
109
|
+
| MatchmakingLostEvent
|
|
110
|
+
| MatchmakingQueueRequest
|
|
111
|
+
| MatchmakingQueueResponse
|
|
112
|
+
| MatchmakingQueueUpdateEvent
|
|
113
|
+
| MatchmakingReadyRequest
|
|
114
|
+
| MatchmakingReadyResponse
|
|
115
|
+
| MatchmakingReadyUpdateEvent
|
|
116
|
+
| SystemConnectedEvent
|
|
117
|
+
| SystemDisconnectRequest
|
|
118
|
+
| SystemDisconnectResponse
|
|
119
|
+
| SystemServerStatsRequest
|
|
120
|
+
| SystemServerStatsResponse
|
|
121
|
+
| UserSubscribeRequest
|
|
122
|
+
| UserSubscribeResponse
|
|
123
|
+
| UserUnsubscribeRequest
|
|
124
|
+
| UserUnsubscribeResponse
|
|
125
|
+
| UserUpdatedEvent;
|
|
126
|
+
export type AutohostLaunchResponse =
|
|
127
|
+
| {
|
|
128
|
+
type: "response";
|
|
129
|
+
messageId: string;
|
|
130
|
+
commandId: "autohost/launch";
|
|
131
|
+
status: "success";
|
|
132
|
+
}
|
|
122
133
|
| {
|
|
134
|
+
type: "response";
|
|
123
135
|
messageId: string;
|
|
124
|
-
commandId: "autohost/
|
|
125
|
-
status: "
|
|
136
|
+
commandId: "autohost/launch";
|
|
137
|
+
status: "failed";
|
|
138
|
+
reason: "invalid_script";
|
|
139
|
+
}
|
|
140
|
+
| {
|
|
141
|
+
type: "response";
|
|
142
|
+
messageId: string;
|
|
143
|
+
commandId: "autohost/launch";
|
|
144
|
+
status: "failed";
|
|
145
|
+
reason: "server_already_running";
|
|
146
|
+
}
|
|
147
|
+
| {
|
|
148
|
+
type: "response";
|
|
149
|
+
messageId: string;
|
|
150
|
+
commandId: "autohost/launch";
|
|
151
|
+
status: "failed";
|
|
152
|
+
reason: "server_failed_to_start";
|
|
126
153
|
}
|
|
127
154
|
| {
|
|
155
|
+
type: "response";
|
|
128
156
|
messageId: string;
|
|
129
|
-
commandId: "autohost/
|
|
157
|
+
commandId: "autohost/launch";
|
|
130
158
|
status: "failed";
|
|
131
159
|
reason: "internal_error";
|
|
132
160
|
}
|
|
133
161
|
| {
|
|
162
|
+
type: "response";
|
|
134
163
|
messageId: string;
|
|
135
|
-
commandId: "autohost/
|
|
164
|
+
commandId: "autohost/launch";
|
|
136
165
|
status: "failed";
|
|
137
166
|
reason: "unauthorized";
|
|
138
167
|
}
|
|
139
168
|
| {
|
|
169
|
+
type: "response";
|
|
140
170
|
messageId: string;
|
|
141
|
-
commandId: "autohost/
|
|
171
|
+
commandId: "autohost/launch";
|
|
142
172
|
status: "failed";
|
|
143
173
|
reason: "invalid_request";
|
|
144
174
|
}
|
|
145
175
|
| {
|
|
176
|
+
type: "response";
|
|
146
177
|
messageId: string;
|
|
147
|
-
commandId: "autohost/
|
|
178
|
+
commandId: "autohost/launch";
|
|
148
179
|
status: "failed";
|
|
149
180
|
reason: "command_unimplemented";
|
|
150
181
|
};
|
|
151
|
-
export type
|
|
182
|
+
export type AutohostSlaveResponse =
|
|
152
183
|
| {
|
|
184
|
+
type: "response";
|
|
153
185
|
messageId: string;
|
|
154
|
-
commandId: "autohost/
|
|
186
|
+
commandId: "autohost/slave";
|
|
155
187
|
status: "success";
|
|
156
188
|
}
|
|
157
189
|
| {
|
|
190
|
+
type: "response";
|
|
158
191
|
messageId: string;
|
|
159
|
-
commandId: "autohost/
|
|
192
|
+
commandId: "autohost/slave";
|
|
160
193
|
status: "failed";
|
|
161
194
|
reason: "internal_error";
|
|
162
195
|
}
|
|
163
196
|
| {
|
|
197
|
+
type: "response";
|
|
164
198
|
messageId: string;
|
|
165
|
-
commandId: "autohost/
|
|
199
|
+
commandId: "autohost/slave";
|
|
166
200
|
status: "failed";
|
|
167
201
|
reason: "unauthorized";
|
|
168
202
|
}
|
|
169
203
|
| {
|
|
204
|
+
type: "response";
|
|
170
205
|
messageId: string;
|
|
171
|
-
commandId: "autohost/
|
|
206
|
+
commandId: "autohost/slave";
|
|
172
207
|
status: "failed";
|
|
173
208
|
reason: "invalid_request";
|
|
174
209
|
}
|
|
175
210
|
| {
|
|
211
|
+
type: "response";
|
|
176
212
|
messageId: string;
|
|
177
|
-
commandId: "autohost/
|
|
213
|
+
commandId: "autohost/slave";
|
|
178
214
|
status: "failed";
|
|
179
215
|
reason: "command_unimplemented";
|
|
180
216
|
};
|
|
181
|
-
export type
|
|
217
|
+
export type AutohostUnslaveResponse =
|
|
182
218
|
| {
|
|
219
|
+
type: "response";
|
|
183
220
|
messageId: string;
|
|
184
|
-
commandId: "
|
|
221
|
+
commandId: "autohost/unslave";
|
|
185
222
|
status: "success";
|
|
186
|
-
data: {
|
|
187
|
-
script: string;
|
|
188
|
-
};
|
|
189
223
|
}
|
|
190
224
|
| {
|
|
225
|
+
type: "response";
|
|
191
226
|
messageId: string;
|
|
192
|
-
commandId: "
|
|
227
|
+
commandId: "autohost/unslave";
|
|
193
228
|
status: "failed";
|
|
194
229
|
reason: "internal_error";
|
|
195
230
|
}
|
|
196
231
|
| {
|
|
232
|
+
type: "response";
|
|
197
233
|
messageId: string;
|
|
198
|
-
commandId: "
|
|
234
|
+
commandId: "autohost/unslave";
|
|
199
235
|
status: "failed";
|
|
200
236
|
reason: "unauthorized";
|
|
201
237
|
}
|
|
202
238
|
| {
|
|
239
|
+
type: "response";
|
|
203
240
|
messageId: string;
|
|
204
|
-
commandId: "
|
|
241
|
+
commandId: "autohost/unslave";
|
|
205
242
|
status: "failed";
|
|
206
243
|
reason: "invalid_request";
|
|
207
244
|
}
|
|
208
245
|
| {
|
|
246
|
+
type: "response";
|
|
209
247
|
messageId: string;
|
|
210
|
-
commandId: "
|
|
248
|
+
commandId: "autohost/unslave";
|
|
211
249
|
status: "failed";
|
|
212
250
|
reason: "command_unimplemented";
|
|
213
251
|
};
|
|
214
252
|
export type LobbyCloseResponse =
|
|
215
253
|
| {
|
|
254
|
+
type: "response";
|
|
216
255
|
messageId: string;
|
|
217
|
-
commandId: "lobby/close
|
|
256
|
+
commandId: "lobby/close";
|
|
218
257
|
status: "success";
|
|
219
258
|
}
|
|
220
259
|
| {
|
|
260
|
+
type: "response";
|
|
221
261
|
messageId: string;
|
|
222
|
-
commandId: "lobby/close
|
|
262
|
+
commandId: "lobby/close";
|
|
223
263
|
status: "failed";
|
|
224
264
|
reason: "internal_error";
|
|
225
265
|
}
|
|
226
266
|
| {
|
|
267
|
+
type: "response";
|
|
227
268
|
messageId: string;
|
|
228
|
-
commandId: "lobby/close
|
|
269
|
+
commandId: "lobby/close";
|
|
229
270
|
status: "failed";
|
|
230
271
|
reason: "unauthorized";
|
|
231
272
|
}
|
|
232
273
|
| {
|
|
274
|
+
type: "response";
|
|
233
275
|
messageId: string;
|
|
234
|
-
commandId: "lobby/close
|
|
276
|
+
commandId: "lobby/close";
|
|
235
277
|
status: "failed";
|
|
236
278
|
reason: "invalid_request";
|
|
237
279
|
}
|
|
238
280
|
| {
|
|
281
|
+
type: "response";
|
|
239
282
|
messageId: string;
|
|
240
|
-
commandId: "lobby/close
|
|
283
|
+
commandId: "lobby/close";
|
|
241
284
|
status: "failed";
|
|
242
285
|
reason: "command_unimplemented";
|
|
243
286
|
};
|
|
244
287
|
export type LobbyCreateResponse =
|
|
245
288
|
| {
|
|
289
|
+
type: "response";
|
|
246
290
|
messageId: string;
|
|
247
|
-
commandId: "lobby/create
|
|
291
|
+
commandId: "lobby/create";
|
|
248
292
|
status: "success";
|
|
249
293
|
}
|
|
250
294
|
| {
|
|
295
|
+
type: "response";
|
|
251
296
|
messageId: string;
|
|
252
|
-
commandId: "lobby/create
|
|
297
|
+
commandId: "lobby/create";
|
|
253
298
|
status: "failed";
|
|
254
299
|
reason: "no_hosts_available";
|
|
255
300
|
}
|
|
256
301
|
| {
|
|
302
|
+
type: "response";
|
|
257
303
|
messageId: string;
|
|
258
|
-
commandId: "lobby/create
|
|
304
|
+
commandId: "lobby/create";
|
|
259
305
|
status: "failed";
|
|
260
306
|
reason: "invalid_region";
|
|
261
307
|
}
|
|
262
308
|
| {
|
|
309
|
+
type: "response";
|
|
263
310
|
messageId: string;
|
|
264
|
-
commandId: "lobby/create
|
|
311
|
+
commandId: "lobby/create";
|
|
265
312
|
status: "failed";
|
|
266
313
|
reason: "internal_error";
|
|
267
314
|
}
|
|
268
315
|
| {
|
|
316
|
+
type: "response";
|
|
269
317
|
messageId: string;
|
|
270
|
-
commandId: "lobby/create
|
|
318
|
+
commandId: "lobby/create";
|
|
271
319
|
status: "failed";
|
|
272
320
|
reason: "unauthorized";
|
|
273
321
|
}
|
|
274
322
|
| {
|
|
323
|
+
type: "response";
|
|
275
324
|
messageId: string;
|
|
276
|
-
commandId: "lobby/create
|
|
325
|
+
commandId: "lobby/create";
|
|
277
326
|
status: "failed";
|
|
278
327
|
reason: "invalid_request";
|
|
279
328
|
}
|
|
280
329
|
| {
|
|
330
|
+
type: "response";
|
|
281
331
|
messageId: string;
|
|
282
|
-
commandId: "lobby/create
|
|
332
|
+
commandId: "lobby/create";
|
|
283
333
|
status: "failed";
|
|
284
334
|
reason: "command_unimplemented";
|
|
285
335
|
};
|
|
286
336
|
export type LobbyJoinResponse =
|
|
287
337
|
| {
|
|
338
|
+
type: "response";
|
|
288
339
|
messageId: string;
|
|
289
|
-
commandId: "lobby/join
|
|
340
|
+
commandId: "lobby/join";
|
|
290
341
|
status: "success";
|
|
291
342
|
}
|
|
292
343
|
| {
|
|
344
|
+
type: "response";
|
|
293
345
|
messageId: string;
|
|
294
|
-
commandId: "lobby/join
|
|
346
|
+
commandId: "lobby/join";
|
|
295
347
|
status: "failed";
|
|
296
348
|
reason: "locked";
|
|
297
349
|
}
|
|
298
350
|
| {
|
|
351
|
+
type: "response";
|
|
299
352
|
messageId: string;
|
|
300
|
-
commandId: "lobby/join
|
|
353
|
+
commandId: "lobby/join";
|
|
301
354
|
status: "failed";
|
|
302
355
|
reason: "requires_password";
|
|
303
356
|
}
|
|
304
357
|
| {
|
|
358
|
+
type: "response";
|
|
305
359
|
messageId: string;
|
|
306
|
-
commandId: "lobby/join
|
|
360
|
+
commandId: "lobby/join";
|
|
307
361
|
status: "failed";
|
|
308
362
|
reason: "invalid_password";
|
|
309
363
|
}
|
|
310
364
|
| {
|
|
365
|
+
type: "response";
|
|
311
366
|
messageId: string;
|
|
312
|
-
commandId: "lobby/join
|
|
367
|
+
commandId: "lobby/join";
|
|
313
368
|
status: "failed";
|
|
314
369
|
reason: "max_participants_reached";
|
|
315
370
|
}
|
|
316
371
|
| {
|
|
372
|
+
type: "response";
|
|
317
373
|
messageId: string;
|
|
318
|
-
commandId: "lobby/join
|
|
374
|
+
commandId: "lobby/join";
|
|
319
375
|
status: "failed";
|
|
320
376
|
reason: "rank_too_low";
|
|
321
377
|
}
|
|
322
378
|
| {
|
|
379
|
+
type: "response";
|
|
323
380
|
messageId: string;
|
|
324
|
-
commandId: "lobby/join
|
|
381
|
+
commandId: "lobby/join";
|
|
325
382
|
status: "failed";
|
|
326
383
|
reason: "rank_too_high";
|
|
327
384
|
}
|
|
328
385
|
| {
|
|
386
|
+
type: "response";
|
|
329
387
|
messageId: string;
|
|
330
|
-
commandId: "lobby/join
|
|
388
|
+
commandId: "lobby/join";
|
|
331
389
|
status: "failed";
|
|
332
390
|
reason: "banned";
|
|
333
391
|
}
|
|
334
392
|
| {
|
|
393
|
+
type: "response";
|
|
335
394
|
messageId: string;
|
|
336
|
-
commandId: "lobby/join
|
|
337
|
-
status: "failed";
|
|
338
|
-
reason: "internal_error";
|
|
339
|
-
}
|
|
340
|
-
| {
|
|
341
|
-
messageId: string;
|
|
342
|
-
commandId: "lobby/join/response";
|
|
343
|
-
status: "failed";
|
|
344
|
-
reason: "unauthorized";
|
|
345
|
-
}
|
|
346
|
-
| {
|
|
347
|
-
messageId: string;
|
|
348
|
-
commandId: "lobby/join/response";
|
|
349
|
-
status: "failed";
|
|
350
|
-
reason: "invalid_request";
|
|
351
|
-
}
|
|
352
|
-
| {
|
|
353
|
-
messageId: string;
|
|
354
|
-
commandId: "lobby/join/response";
|
|
355
|
-
status: "failed";
|
|
356
|
-
reason: "command_unimplemented";
|
|
357
|
-
};
|
|
358
|
-
export type LobbyJoinedResponse =
|
|
359
|
-
| {
|
|
360
|
-
messageId: string;
|
|
361
|
-
commandId: "lobby/joined/response";
|
|
362
|
-
status: "success";
|
|
363
|
-
data: {
|
|
364
|
-
battleId: string;
|
|
365
|
-
hostId: string;
|
|
366
|
-
engine: string;
|
|
367
|
-
game: string;
|
|
368
|
-
map: string;
|
|
369
|
-
startPosType: 0 | 1 | 2;
|
|
370
|
-
startAreas: {
|
|
371
|
-
/**
|
|
372
|
-
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
373
|
-
* via the `patternProperty` "^(0|[1-9][0-9]*)$".
|
|
374
|
-
*/
|
|
375
|
-
[k: string]: {
|
|
376
|
-
x: number;
|
|
377
|
-
y: number;
|
|
378
|
-
width: number;
|
|
379
|
-
height: number;
|
|
380
|
-
};
|
|
381
|
-
};
|
|
382
|
-
startTime: number | null;
|
|
383
|
-
ip: string | null;
|
|
384
|
-
port: number | null;
|
|
385
|
-
scriptPassword: string | null;
|
|
386
|
-
modOptions: {
|
|
387
|
-
/**
|
|
388
|
-
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
389
|
-
* via the `patternProperty` "^(.*)$".
|
|
390
|
-
*/
|
|
391
|
-
[k: string]: unknown;
|
|
392
|
-
};
|
|
393
|
-
bots: {
|
|
394
|
-
playerId: number;
|
|
395
|
-
teamId: number;
|
|
396
|
-
color: string;
|
|
397
|
-
bonus: number;
|
|
398
|
-
inGame: boolean;
|
|
399
|
-
isSpectator: false;
|
|
400
|
-
isBot: true;
|
|
401
|
-
ownerId: string;
|
|
402
|
-
aiShortName: string;
|
|
403
|
-
name: string;
|
|
404
|
-
aiOptions: {
|
|
405
|
-
/**
|
|
406
|
-
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
407
|
-
* via the `patternProperty` "^(.*)$".
|
|
408
|
-
*/
|
|
409
|
-
[k: string]: unknown;
|
|
410
|
-
};
|
|
411
|
-
faction: string;
|
|
412
|
-
}[];
|
|
413
|
-
users: {
|
|
414
|
-
userId: string;
|
|
415
|
-
username: string;
|
|
416
|
-
displayName: string;
|
|
417
|
-
avatarUrl: string | null;
|
|
418
|
-
clanId: string | null;
|
|
419
|
-
partyId: string | null;
|
|
420
|
-
roles: string[];
|
|
421
|
-
countryCode?: string;
|
|
422
|
-
status: "offline" | "menu" | "playing" | "lobby";
|
|
423
|
-
battleStatus:
|
|
424
|
-
| ({
|
|
425
|
-
battleId: string;
|
|
426
|
-
} & (
|
|
427
|
-
| ({
|
|
428
|
-
playerId: number;
|
|
429
|
-
teamId: number;
|
|
430
|
-
color: string;
|
|
431
|
-
bonus: number;
|
|
432
|
-
inGame: boolean;
|
|
433
|
-
} & {
|
|
434
|
-
isSpectator: false;
|
|
435
|
-
isBot: false;
|
|
436
|
-
ready: boolean;
|
|
437
|
-
sync: {
|
|
438
|
-
engine: number;
|
|
439
|
-
game: number;
|
|
440
|
-
map: number;
|
|
441
|
-
};
|
|
442
|
-
})
|
|
443
|
-
| {
|
|
444
|
-
isSpectator: true;
|
|
445
|
-
isBot: false;
|
|
446
|
-
}
|
|
447
|
-
))
|
|
448
|
-
| null;
|
|
449
|
-
}[];
|
|
450
|
-
};
|
|
451
|
-
}
|
|
452
|
-
| {
|
|
453
|
-
messageId: string;
|
|
454
|
-
commandId: "lobby/joined/response";
|
|
395
|
+
commandId: "lobby/join";
|
|
455
396
|
status: "failed";
|
|
456
397
|
reason: "internal_error";
|
|
457
398
|
}
|
|
458
399
|
| {
|
|
400
|
+
type: "response";
|
|
459
401
|
messageId: string;
|
|
460
|
-
commandId: "lobby/
|
|
402
|
+
commandId: "lobby/join";
|
|
461
403
|
status: "failed";
|
|
462
404
|
reason: "unauthorized";
|
|
463
405
|
}
|
|
464
406
|
| {
|
|
407
|
+
type: "response";
|
|
465
408
|
messageId: string;
|
|
466
|
-
commandId: "lobby/
|
|
409
|
+
commandId: "lobby/join";
|
|
467
410
|
status: "failed";
|
|
468
411
|
reason: "invalid_request";
|
|
469
412
|
}
|
|
470
413
|
| {
|
|
414
|
+
type: "response";
|
|
471
415
|
messageId: string;
|
|
472
|
-
commandId: "lobby/
|
|
416
|
+
commandId: "lobby/join";
|
|
473
417
|
status: "failed";
|
|
474
418
|
reason: "command_unimplemented";
|
|
475
419
|
};
|
|
476
420
|
export type LobbyLeaveResponse =
|
|
477
421
|
| {
|
|
422
|
+
type: "response";
|
|
478
423
|
messageId: string;
|
|
479
|
-
commandId: "lobby/leave
|
|
424
|
+
commandId: "lobby/leave";
|
|
480
425
|
status: "success";
|
|
481
426
|
}
|
|
482
427
|
| {
|
|
428
|
+
type: "response";
|
|
483
429
|
messageId: string;
|
|
484
|
-
commandId: "lobby/leave
|
|
430
|
+
commandId: "lobby/leave";
|
|
485
431
|
status: "failed";
|
|
486
432
|
reason: "no_lobby";
|
|
487
433
|
}
|
|
488
434
|
| {
|
|
435
|
+
type: "response";
|
|
489
436
|
messageId: string;
|
|
490
|
-
commandId: "lobby/leave
|
|
491
|
-
status: "failed";
|
|
492
|
-
reason: "internal_error";
|
|
493
|
-
}
|
|
494
|
-
| {
|
|
495
|
-
messageId: string;
|
|
496
|
-
commandId: "lobby/leave/response";
|
|
497
|
-
status: "failed";
|
|
498
|
-
reason: "unauthorized";
|
|
499
|
-
}
|
|
500
|
-
| {
|
|
501
|
-
messageId: string;
|
|
502
|
-
commandId: "lobby/leave/response";
|
|
503
|
-
status: "failed";
|
|
504
|
-
reason: "invalid_request";
|
|
505
|
-
}
|
|
506
|
-
| {
|
|
507
|
-
messageId: string;
|
|
508
|
-
commandId: "lobby/leave/response";
|
|
509
|
-
status: "failed";
|
|
510
|
-
reason: "command_unimplemented";
|
|
511
|
-
};
|
|
512
|
-
export type LobbyLeftResponse =
|
|
513
|
-
| {
|
|
514
|
-
messageId: string;
|
|
515
|
-
commandId: "lobby/left/response";
|
|
516
|
-
status: "success";
|
|
517
|
-
}
|
|
518
|
-
| {
|
|
519
|
-
messageId: string;
|
|
520
|
-
commandId: "lobby/left/response";
|
|
437
|
+
commandId: "lobby/leave";
|
|
521
438
|
status: "failed";
|
|
522
439
|
reason: "internal_error";
|
|
523
440
|
}
|
|
524
441
|
| {
|
|
442
|
+
type: "response";
|
|
525
443
|
messageId: string;
|
|
526
|
-
commandId: "lobby/
|
|
444
|
+
commandId: "lobby/leave";
|
|
527
445
|
status: "failed";
|
|
528
446
|
reason: "unauthorized";
|
|
529
447
|
}
|
|
530
448
|
| {
|
|
449
|
+
type: "response";
|
|
531
450
|
messageId: string;
|
|
532
|
-
commandId: "lobby/
|
|
451
|
+
commandId: "lobby/leave";
|
|
533
452
|
status: "failed";
|
|
534
453
|
reason: "invalid_request";
|
|
535
454
|
}
|
|
536
455
|
| {
|
|
456
|
+
type: "response";
|
|
537
457
|
messageId: string;
|
|
538
|
-
commandId: "lobby/
|
|
458
|
+
commandId: "lobby/leave";
|
|
539
459
|
status: "failed";
|
|
540
460
|
reason: "command_unimplemented";
|
|
541
461
|
};
|
|
542
462
|
export type LobbyListResponse =
|
|
543
463
|
| {
|
|
464
|
+
type: "response";
|
|
544
465
|
messageId: string;
|
|
545
|
-
commandId: "lobby/list
|
|
466
|
+
commandId: "lobby/list";
|
|
546
467
|
status: "success";
|
|
547
468
|
data: {
|
|
548
469
|
battles: ({
|
|
@@ -602,7 +523,7 @@ export type LobbyListResponse =
|
|
|
602
523
|
avatarUrl: string | null;
|
|
603
524
|
clanId: string | null;
|
|
604
525
|
partyId: string | null;
|
|
605
|
-
|
|
526
|
+
scopes: string[];
|
|
606
527
|
countryCode?: string;
|
|
607
528
|
status: "offline" | "menu" | "playing" | "lobby";
|
|
608
529
|
battleStatus:
|
|
@@ -648,724 +569,456 @@ export type LobbyListResponse =
|
|
|
648
569
|
};
|
|
649
570
|
}
|
|
650
571
|
| {
|
|
572
|
+
type: "response";
|
|
651
573
|
messageId: string;
|
|
652
|
-
commandId: "lobby/list
|
|
653
|
-
status: "failed";
|
|
654
|
-
reason: "internal_error";
|
|
655
|
-
}
|
|
656
|
-
| {
|
|
657
|
-
messageId: string;
|
|
658
|
-
commandId: "lobby/list/response";
|
|
659
|
-
status: "failed";
|
|
660
|
-
reason: "unauthorized";
|
|
661
|
-
}
|
|
662
|
-
| {
|
|
663
|
-
messageId: string;
|
|
664
|
-
commandId: "lobby/list/response";
|
|
665
|
-
status: "failed";
|
|
666
|
-
reason: "invalid_request";
|
|
667
|
-
}
|
|
668
|
-
| {
|
|
669
|
-
messageId: string;
|
|
670
|
-
commandId: "lobby/list/response";
|
|
671
|
-
status: "failed";
|
|
672
|
-
reason: "command_unimplemented";
|
|
673
|
-
};
|
|
674
|
-
export type LobbyReceiveMessageResponse =
|
|
675
|
-
| {
|
|
676
|
-
messageId: string;
|
|
677
|
-
commandId: "lobby/receiveMessage/response";
|
|
678
|
-
status: "success";
|
|
679
|
-
data: {
|
|
680
|
-
userId: string;
|
|
681
|
-
message: string;
|
|
682
|
-
};
|
|
683
|
-
}
|
|
684
|
-
| {
|
|
685
|
-
messageId: string;
|
|
686
|
-
commandId: "lobby/receiveMessage/response";
|
|
574
|
+
commandId: "lobby/list";
|
|
687
575
|
status: "failed";
|
|
688
576
|
reason: "internal_error";
|
|
689
577
|
}
|
|
690
578
|
| {
|
|
579
|
+
type: "response";
|
|
691
580
|
messageId: string;
|
|
692
|
-
commandId: "lobby/
|
|
581
|
+
commandId: "lobby/list";
|
|
693
582
|
status: "failed";
|
|
694
583
|
reason: "unauthorized";
|
|
695
584
|
}
|
|
696
585
|
| {
|
|
586
|
+
type: "response";
|
|
697
587
|
messageId: string;
|
|
698
|
-
commandId: "lobby/
|
|
588
|
+
commandId: "lobby/list";
|
|
699
589
|
status: "failed";
|
|
700
590
|
reason: "invalid_request";
|
|
701
591
|
}
|
|
702
592
|
| {
|
|
593
|
+
type: "response";
|
|
703
594
|
messageId: string;
|
|
704
|
-
commandId: "lobby/
|
|
595
|
+
commandId: "lobby/list";
|
|
705
596
|
status: "failed";
|
|
706
597
|
reason: "command_unimplemented";
|
|
707
598
|
};
|
|
708
599
|
export type LobbySendMessageResponse =
|
|
709
600
|
| {
|
|
601
|
+
type: "response";
|
|
710
602
|
messageId: string;
|
|
711
|
-
commandId: "lobby/sendMessage
|
|
603
|
+
commandId: "lobby/sendMessage";
|
|
712
604
|
status: "success";
|
|
713
605
|
}
|
|
714
606
|
| {
|
|
607
|
+
type: "response";
|
|
715
608
|
messageId: string;
|
|
716
|
-
commandId: "lobby/sendMessage
|
|
609
|
+
commandId: "lobby/sendMessage";
|
|
717
610
|
status: "failed";
|
|
718
611
|
reason: "not_in_lobby";
|
|
719
612
|
}
|
|
720
613
|
| {
|
|
614
|
+
type: "response";
|
|
721
615
|
messageId: string;
|
|
722
|
-
commandId: "lobby/sendMessage
|
|
616
|
+
commandId: "lobby/sendMessage";
|
|
723
617
|
status: "failed";
|
|
724
618
|
reason: "muted";
|
|
725
619
|
}
|
|
726
620
|
| {
|
|
621
|
+
type: "response";
|
|
727
622
|
messageId: string;
|
|
728
|
-
commandId: "lobby/sendMessage
|
|
623
|
+
commandId: "lobby/sendMessage";
|
|
729
624
|
status: "failed";
|
|
730
625
|
reason: "internal_error";
|
|
731
626
|
}
|
|
732
627
|
| {
|
|
628
|
+
type: "response";
|
|
733
629
|
messageId: string;
|
|
734
|
-
commandId: "lobby/sendMessage
|
|
630
|
+
commandId: "lobby/sendMessage";
|
|
735
631
|
status: "failed";
|
|
736
632
|
reason: "unauthorized";
|
|
737
633
|
}
|
|
738
634
|
| {
|
|
635
|
+
type: "response";
|
|
739
636
|
messageId: string;
|
|
740
|
-
commandId: "lobby/sendMessage
|
|
637
|
+
commandId: "lobby/sendMessage";
|
|
741
638
|
status: "failed";
|
|
742
639
|
reason: "invalid_request";
|
|
743
640
|
}
|
|
744
641
|
| {
|
|
642
|
+
type: "response";
|
|
745
643
|
messageId: string;
|
|
746
|
-
commandId: "lobby/sendMessage
|
|
644
|
+
commandId: "lobby/sendMessage";
|
|
747
645
|
status: "failed";
|
|
748
646
|
reason: "command_unimplemented";
|
|
749
647
|
};
|
|
750
648
|
export type LobbySubscribeResponse =
|
|
751
649
|
| {
|
|
650
|
+
type: "response";
|
|
752
651
|
messageId: string;
|
|
753
|
-
commandId: "lobby/subscribe
|
|
652
|
+
commandId: "lobby/subscribe";
|
|
754
653
|
status: "success";
|
|
755
654
|
}
|
|
756
655
|
| {
|
|
656
|
+
type: "response";
|
|
757
657
|
messageId: string;
|
|
758
|
-
commandId: "lobby/subscribe
|
|
658
|
+
commandId: "lobby/subscribe";
|
|
759
659
|
status: "failed";
|
|
760
660
|
reason: "internal_error";
|
|
761
661
|
}
|
|
762
662
|
| {
|
|
663
|
+
type: "response";
|
|
763
664
|
messageId: string;
|
|
764
|
-
commandId: "lobby/subscribe
|
|
665
|
+
commandId: "lobby/subscribe";
|
|
765
666
|
status: "failed";
|
|
766
667
|
reason: "unauthorized";
|
|
767
668
|
}
|
|
768
669
|
| {
|
|
670
|
+
type: "response";
|
|
769
671
|
messageId: string;
|
|
770
|
-
commandId: "lobby/subscribe
|
|
672
|
+
commandId: "lobby/subscribe";
|
|
771
673
|
status: "failed";
|
|
772
674
|
reason: "invalid_request";
|
|
773
675
|
}
|
|
774
676
|
| {
|
|
677
|
+
type: "response";
|
|
775
678
|
messageId: string;
|
|
776
|
-
commandId: "lobby/subscribe
|
|
679
|
+
commandId: "lobby/subscribe";
|
|
777
680
|
status: "failed";
|
|
778
681
|
reason: "command_unimplemented";
|
|
779
682
|
};
|
|
780
683
|
export type LobbyUnsubscribeResponse =
|
|
781
684
|
| {
|
|
685
|
+
type: "response";
|
|
782
686
|
messageId: string;
|
|
783
|
-
commandId: "lobby/unsubscribe
|
|
687
|
+
commandId: "lobby/unsubscribe";
|
|
784
688
|
status: "success";
|
|
785
689
|
}
|
|
786
690
|
| {
|
|
691
|
+
type: "response";
|
|
787
692
|
messageId: string;
|
|
788
|
-
commandId: "lobby/unsubscribe
|
|
693
|
+
commandId: "lobby/unsubscribe";
|
|
789
694
|
status: "failed";
|
|
790
695
|
reason: "cannot_unsub_own_battle";
|
|
791
696
|
}
|
|
792
697
|
| {
|
|
698
|
+
type: "response";
|
|
793
699
|
messageId: string;
|
|
794
|
-
commandId: "lobby/unsubscribe
|
|
700
|
+
commandId: "lobby/unsubscribe";
|
|
795
701
|
status: "failed";
|
|
796
702
|
reason: "internal_error";
|
|
797
703
|
}
|
|
798
704
|
| {
|
|
705
|
+
type: "response";
|
|
799
706
|
messageId: string;
|
|
800
|
-
commandId: "lobby/unsubscribe
|
|
707
|
+
commandId: "lobby/unsubscribe";
|
|
801
708
|
status: "failed";
|
|
802
709
|
reason: "unauthorized";
|
|
803
710
|
}
|
|
804
711
|
| {
|
|
712
|
+
type: "response";
|
|
805
713
|
messageId: string;
|
|
806
|
-
commandId: "lobby/unsubscribe
|
|
714
|
+
commandId: "lobby/unsubscribe";
|
|
807
715
|
status: "failed";
|
|
808
716
|
reason: "invalid_request";
|
|
809
717
|
}
|
|
810
718
|
| {
|
|
719
|
+
type: "response";
|
|
811
720
|
messageId: string;
|
|
812
|
-
commandId: "lobby/unsubscribe
|
|
721
|
+
commandId: "lobby/unsubscribe";
|
|
813
722
|
status: "failed";
|
|
814
723
|
reason: "command_unimplemented";
|
|
815
724
|
};
|
|
816
|
-
export type
|
|
725
|
+
export type MatchmakingCancelResponse =
|
|
817
726
|
| {
|
|
727
|
+
type: "response";
|
|
818
728
|
messageId: string;
|
|
819
|
-
commandId: "
|
|
729
|
+
commandId: "matchmaking/cancel";
|
|
820
730
|
status: "success";
|
|
821
|
-
data: {
|
|
822
|
-
battles: ({
|
|
823
|
-
battleId?: string;
|
|
824
|
-
hostId?: string;
|
|
825
|
-
engine?: string;
|
|
826
|
-
game?: string;
|
|
827
|
-
map?: string;
|
|
828
|
-
startPosType?: 0 | 1 | 2;
|
|
829
|
-
startAreas?: {
|
|
830
|
-
/**
|
|
831
|
-
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
832
|
-
* via the `patternProperty` "^(0|[1-9][0-9]*)$".
|
|
833
|
-
*/
|
|
834
|
-
[k: string]: {
|
|
835
|
-
x: number;
|
|
836
|
-
y: number;
|
|
837
|
-
width: number;
|
|
838
|
-
height: number;
|
|
839
|
-
};
|
|
840
|
-
};
|
|
841
|
-
startTime?: number | null;
|
|
842
|
-
ip?: string | null;
|
|
843
|
-
port?: number | null;
|
|
844
|
-
scriptPassword?: string | null;
|
|
845
|
-
modOptions?: {
|
|
846
|
-
/**
|
|
847
|
-
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
848
|
-
* via the `patternProperty` "^(.*)$".
|
|
849
|
-
*/
|
|
850
|
-
[k: string]: unknown;
|
|
851
|
-
};
|
|
852
|
-
bots?: {
|
|
853
|
-
playerId: number;
|
|
854
|
-
teamId: number;
|
|
855
|
-
color: string;
|
|
856
|
-
bonus: number;
|
|
857
|
-
inGame: boolean;
|
|
858
|
-
isSpectator: false;
|
|
859
|
-
isBot: true;
|
|
860
|
-
ownerId: string;
|
|
861
|
-
aiShortName: string;
|
|
862
|
-
name: string;
|
|
863
|
-
aiOptions: {
|
|
864
|
-
/**
|
|
865
|
-
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
866
|
-
* via the `patternProperty` "^(.*)$".
|
|
867
|
-
*/
|
|
868
|
-
[k: string]: unknown;
|
|
869
|
-
};
|
|
870
|
-
faction: string;
|
|
871
|
-
}[];
|
|
872
|
-
users?: {
|
|
873
|
-
userId: string;
|
|
874
|
-
username: string;
|
|
875
|
-
displayName: string;
|
|
876
|
-
avatarUrl: string | null;
|
|
877
|
-
clanId: string | null;
|
|
878
|
-
partyId: string | null;
|
|
879
|
-
roles: string[];
|
|
880
|
-
countryCode?: string;
|
|
881
|
-
status: "offline" | "menu" | "playing" | "lobby";
|
|
882
|
-
battleStatus:
|
|
883
|
-
| ({
|
|
884
|
-
battleId: string;
|
|
885
|
-
} & (
|
|
886
|
-
| ({
|
|
887
|
-
playerId: number;
|
|
888
|
-
teamId: number;
|
|
889
|
-
color: string;
|
|
890
|
-
bonus: number;
|
|
891
|
-
inGame: boolean;
|
|
892
|
-
} & {
|
|
893
|
-
isSpectator: false;
|
|
894
|
-
isBot: false;
|
|
895
|
-
ready: boolean;
|
|
896
|
-
sync: {
|
|
897
|
-
engine: number;
|
|
898
|
-
game: number;
|
|
899
|
-
map: number;
|
|
900
|
-
};
|
|
901
|
-
})
|
|
902
|
-
| {
|
|
903
|
-
isSpectator: true;
|
|
904
|
-
isBot: false;
|
|
905
|
-
}
|
|
906
|
-
))
|
|
907
|
-
| null;
|
|
908
|
-
}[];
|
|
909
|
-
} & {
|
|
910
|
-
title?: string;
|
|
911
|
-
locked?: boolean;
|
|
912
|
-
passworded?: boolean;
|
|
913
|
-
bossIds?: string[];
|
|
914
|
-
joinQueueIds?: string[];
|
|
915
|
-
limits?: {
|
|
916
|
-
minTeamsize: number | null;
|
|
917
|
-
maxTeamsize: number | null;
|
|
918
|
-
minRating: number | null;
|
|
919
|
-
maxRating: number | null;
|
|
920
|
-
};
|
|
921
|
-
})[];
|
|
922
|
-
};
|
|
923
731
|
}
|
|
924
732
|
| {
|
|
733
|
+
type: "response";
|
|
734
|
+
messageId: string;
|
|
735
|
+
commandId: "matchmaking/cancel";
|
|
736
|
+
status: "failed";
|
|
737
|
+
reason: "not_queued";
|
|
738
|
+
}
|
|
739
|
+
| {
|
|
740
|
+
type: "response";
|
|
925
741
|
messageId: string;
|
|
926
|
-
commandId: "
|
|
742
|
+
commandId: "matchmaking/cancel";
|
|
927
743
|
status: "failed";
|
|
928
744
|
reason: "internal_error";
|
|
929
745
|
}
|
|
930
746
|
| {
|
|
747
|
+
type: "response";
|
|
931
748
|
messageId: string;
|
|
932
|
-
commandId: "
|
|
749
|
+
commandId: "matchmaking/cancel";
|
|
933
750
|
status: "failed";
|
|
934
751
|
reason: "unauthorized";
|
|
935
752
|
}
|
|
936
753
|
| {
|
|
754
|
+
type: "response";
|
|
937
755
|
messageId: string;
|
|
938
|
-
commandId: "
|
|
756
|
+
commandId: "matchmaking/cancel";
|
|
939
757
|
status: "failed";
|
|
940
758
|
reason: "invalid_request";
|
|
941
759
|
}
|
|
942
760
|
| {
|
|
761
|
+
type: "response";
|
|
943
762
|
messageId: string;
|
|
944
|
-
commandId: "
|
|
763
|
+
commandId: "matchmaking/cancel";
|
|
945
764
|
status: "failed";
|
|
946
765
|
reason: "command_unimplemented";
|
|
947
766
|
};
|
|
948
|
-
export type
|
|
767
|
+
export type MatchmakingDeclinedResponse =
|
|
949
768
|
| {
|
|
769
|
+
type: "response";
|
|
950
770
|
messageId: string;
|
|
951
|
-
commandId: "matchmaking/
|
|
771
|
+
commandId: "matchmaking/declined";
|
|
952
772
|
status: "success";
|
|
953
773
|
}
|
|
954
774
|
| {
|
|
775
|
+
type: "response";
|
|
955
776
|
messageId: string;
|
|
956
|
-
commandId: "matchmaking/
|
|
957
|
-
status: "failed";
|
|
958
|
-
reason: "not_queued";
|
|
959
|
-
}
|
|
960
|
-
| {
|
|
961
|
-
messageId: string;
|
|
962
|
-
commandId: "matchmaking/cancel/response";
|
|
777
|
+
commandId: "matchmaking/declined";
|
|
963
778
|
status: "failed";
|
|
964
779
|
reason: "internal_error";
|
|
965
780
|
}
|
|
966
781
|
| {
|
|
782
|
+
type: "response";
|
|
967
783
|
messageId: string;
|
|
968
|
-
commandId: "matchmaking/
|
|
784
|
+
commandId: "matchmaking/declined";
|
|
969
785
|
status: "failed";
|
|
970
786
|
reason: "unauthorized";
|
|
971
787
|
}
|
|
972
788
|
| {
|
|
789
|
+
type: "response";
|
|
973
790
|
messageId: string;
|
|
974
|
-
commandId: "matchmaking/
|
|
791
|
+
commandId: "matchmaking/declined";
|
|
975
792
|
status: "failed";
|
|
976
793
|
reason: "invalid_request";
|
|
977
794
|
}
|
|
978
795
|
| {
|
|
796
|
+
type: "response";
|
|
979
797
|
messageId: string;
|
|
980
|
-
commandId: "matchmaking/
|
|
798
|
+
commandId: "matchmaking/declined";
|
|
981
799
|
status: "failed";
|
|
982
800
|
reason: "command_unimplemented";
|
|
983
801
|
};
|
|
984
|
-
export type
|
|
802
|
+
export type MatchmakingListResponse =
|
|
985
803
|
| {
|
|
804
|
+
type: "response";
|
|
986
805
|
messageId: string;
|
|
987
|
-
commandId: "matchmaking/
|
|
806
|
+
commandId: "matchmaking/list";
|
|
988
807
|
status: "success";
|
|
989
808
|
data: {
|
|
990
|
-
|
|
809
|
+
playlists: {
|
|
810
|
+
id: string;
|
|
811
|
+
name: string;
|
|
812
|
+
numOfTeams: number;
|
|
813
|
+
teamSize: number;
|
|
814
|
+
ranked: boolean;
|
|
815
|
+
}[];
|
|
991
816
|
};
|
|
992
817
|
}
|
|
993
818
|
| {
|
|
819
|
+
type: "response";
|
|
994
820
|
messageId: string;
|
|
995
|
-
commandId: "matchmaking/
|
|
821
|
+
commandId: "matchmaking/list";
|
|
996
822
|
status: "failed";
|
|
997
823
|
reason: "internal_error";
|
|
998
824
|
}
|
|
999
825
|
| {
|
|
826
|
+
type: "response";
|
|
1000
827
|
messageId: string;
|
|
1001
|
-
commandId: "matchmaking/
|
|
828
|
+
commandId: "matchmaking/list";
|
|
1002
829
|
status: "failed";
|
|
1003
830
|
reason: "unauthorized";
|
|
1004
831
|
}
|
|
1005
832
|
| {
|
|
833
|
+
type: "response";
|
|
1006
834
|
messageId: string;
|
|
1007
|
-
commandId: "matchmaking/
|
|
835
|
+
commandId: "matchmaking/list";
|
|
1008
836
|
status: "failed";
|
|
1009
837
|
reason: "invalid_request";
|
|
1010
838
|
}
|
|
1011
839
|
| {
|
|
840
|
+
type: "response";
|
|
1012
841
|
messageId: string;
|
|
1013
|
-
commandId: "matchmaking/
|
|
842
|
+
commandId: "matchmaking/list";
|
|
1014
843
|
status: "failed";
|
|
1015
844
|
reason: "command_unimplemented";
|
|
1016
845
|
};
|
|
1017
|
-
export type
|
|
846
|
+
export type MatchmakingQueueResponse =
|
|
1018
847
|
| {
|
|
848
|
+
type: "response";
|
|
1019
849
|
messageId: string;
|
|
1020
|
-
commandId: "matchmaking/
|
|
850
|
+
commandId: "matchmaking/queue";
|
|
1021
851
|
status: "success";
|
|
1022
|
-
data: {
|
|
1023
|
-
playlists: {
|
|
1024
|
-
id: string;
|
|
1025
|
-
name: string;
|
|
1026
|
-
numOfTeams: number;
|
|
1027
|
-
teamSize: number;
|
|
1028
|
-
ranked: boolean;
|
|
1029
|
-
}[];
|
|
1030
|
-
};
|
|
1031
852
|
}
|
|
1032
853
|
| {
|
|
854
|
+
type: "response";
|
|
1033
855
|
messageId: string;
|
|
1034
|
-
commandId: "matchmaking/
|
|
1035
|
-
status: "failed";
|
|
1036
|
-
reason: "internal_error";
|
|
1037
|
-
}
|
|
1038
|
-
| {
|
|
1039
|
-
messageId: string;
|
|
1040
|
-
commandId: "matchmaking/list/response";
|
|
1041
|
-
status: "failed";
|
|
1042
|
-
reason: "unauthorized";
|
|
1043
|
-
}
|
|
1044
|
-
| {
|
|
1045
|
-
messageId: string;
|
|
1046
|
-
commandId: "matchmaking/list/response";
|
|
1047
|
-
status: "failed";
|
|
1048
|
-
reason: "invalid_request";
|
|
1049
|
-
}
|
|
1050
|
-
| {
|
|
1051
|
-
messageId: string;
|
|
1052
|
-
commandId: "matchmaking/list/response";
|
|
1053
|
-
status: "failed";
|
|
1054
|
-
reason: "command_unimplemented";
|
|
1055
|
-
};
|
|
1056
|
-
export type MatchmakingLostResponse =
|
|
1057
|
-
| {
|
|
1058
|
-
messageId: string;
|
|
1059
|
-
commandId: "matchmaking/lost/response";
|
|
1060
|
-
status: "success";
|
|
1061
|
-
}
|
|
1062
|
-
| {
|
|
1063
|
-
messageId: string;
|
|
1064
|
-
commandId: "matchmaking/lost/response";
|
|
1065
|
-
status: "failed";
|
|
1066
|
-
reason: "internal_error";
|
|
1067
|
-
}
|
|
1068
|
-
| {
|
|
1069
|
-
messageId: string;
|
|
1070
|
-
commandId: "matchmaking/lost/response";
|
|
1071
|
-
status: "failed";
|
|
1072
|
-
reason: "unauthorized";
|
|
1073
|
-
}
|
|
1074
|
-
| {
|
|
1075
|
-
messageId: string;
|
|
1076
|
-
commandId: "matchmaking/lost/response";
|
|
1077
|
-
status: "failed";
|
|
1078
|
-
reason: "invalid_request";
|
|
1079
|
-
}
|
|
1080
|
-
| {
|
|
1081
|
-
messageId: string;
|
|
1082
|
-
commandId: "matchmaking/lost/response";
|
|
1083
|
-
status: "failed";
|
|
1084
|
-
reason: "command_unimplemented";
|
|
1085
|
-
};
|
|
1086
|
-
export type MatchmakingQueueResponse =
|
|
1087
|
-
| {
|
|
1088
|
-
messageId: string;
|
|
1089
|
-
commandId: "matchmaking/queue/response";
|
|
1090
|
-
status: "success";
|
|
1091
|
-
}
|
|
1092
|
-
| {
|
|
1093
|
-
messageId: string;
|
|
1094
|
-
commandId: "matchmaking/queue/response";
|
|
856
|
+
commandId: "matchmaking/queue";
|
|
1095
857
|
status: "failed";
|
|
1096
858
|
reason: "invalid_queue_specified";
|
|
1097
859
|
}
|
|
1098
860
|
| {
|
|
861
|
+
type: "response";
|
|
1099
862
|
messageId: string;
|
|
1100
|
-
commandId: "matchmaking/queue
|
|
1101
|
-
status: "failed";
|
|
1102
|
-
reason: "already_ingame";
|
|
1103
|
-
}
|
|
1104
|
-
| {
|
|
1105
|
-
messageId: string;
|
|
1106
|
-
commandId: "matchmaking/queue/response";
|
|
1107
|
-
status: "failed";
|
|
1108
|
-
reason: "internal_error";
|
|
1109
|
-
}
|
|
1110
|
-
| {
|
|
1111
|
-
messageId: string;
|
|
1112
|
-
commandId: "matchmaking/queue/response";
|
|
1113
|
-
status: "failed";
|
|
1114
|
-
reason: "unauthorized";
|
|
1115
|
-
}
|
|
1116
|
-
| {
|
|
1117
|
-
messageId: string;
|
|
1118
|
-
commandId: "matchmaking/queue/response";
|
|
863
|
+
commandId: "matchmaking/queue";
|
|
1119
864
|
status: "failed";
|
|
1120
|
-
reason: "
|
|
865
|
+
reason: "already_queued";
|
|
1121
866
|
}
|
|
1122
867
|
| {
|
|
868
|
+
type: "response";
|
|
1123
869
|
messageId: string;
|
|
1124
|
-
commandId: "matchmaking/queue
|
|
870
|
+
commandId: "matchmaking/queue";
|
|
1125
871
|
status: "failed";
|
|
1126
|
-
reason: "
|
|
1127
|
-
};
|
|
1128
|
-
export type MatchmakingQueueUpdateResponse =
|
|
1129
|
-
| {
|
|
1130
|
-
messageId: string;
|
|
1131
|
-
commandId: "matchmaking/queueUpdate/response";
|
|
1132
|
-
status: "success";
|
|
1133
|
-
data: {
|
|
1134
|
-
playersQueued: string;
|
|
1135
|
-
};
|
|
872
|
+
reason: "already_ingame";
|
|
1136
873
|
}
|
|
1137
874
|
| {
|
|
875
|
+
type: "response";
|
|
1138
876
|
messageId: string;
|
|
1139
|
-
commandId: "matchmaking/
|
|
877
|
+
commandId: "matchmaking/queue";
|
|
1140
878
|
status: "failed";
|
|
1141
879
|
reason: "internal_error";
|
|
1142
880
|
}
|
|
1143
881
|
| {
|
|
882
|
+
type: "response";
|
|
1144
883
|
messageId: string;
|
|
1145
|
-
commandId: "matchmaking/
|
|
884
|
+
commandId: "matchmaking/queue";
|
|
1146
885
|
status: "failed";
|
|
1147
886
|
reason: "unauthorized";
|
|
1148
887
|
}
|
|
1149
888
|
| {
|
|
889
|
+
type: "response";
|
|
1150
890
|
messageId: string;
|
|
1151
|
-
commandId: "matchmaking/
|
|
891
|
+
commandId: "matchmaking/queue";
|
|
1152
892
|
status: "failed";
|
|
1153
893
|
reason: "invalid_request";
|
|
1154
894
|
}
|
|
1155
895
|
| {
|
|
896
|
+
type: "response";
|
|
1156
897
|
messageId: string;
|
|
1157
|
-
commandId: "matchmaking/
|
|
898
|
+
commandId: "matchmaking/queue";
|
|
1158
899
|
status: "failed";
|
|
1159
900
|
reason: "command_unimplemented";
|
|
1160
901
|
};
|
|
1161
902
|
export type MatchmakingReadyResponse =
|
|
1162
903
|
| {
|
|
904
|
+
type: "response";
|
|
1163
905
|
messageId: string;
|
|
1164
|
-
commandId: "matchmaking/ready
|
|
906
|
+
commandId: "matchmaking/ready";
|
|
1165
907
|
status: "success";
|
|
1166
908
|
}
|
|
1167
909
|
| {
|
|
910
|
+
type: "response";
|
|
1168
911
|
messageId: string;
|
|
1169
|
-
commandId: "matchmaking/ready
|
|
912
|
+
commandId: "matchmaking/ready";
|
|
1170
913
|
status: "failed";
|
|
1171
914
|
reason: "no_match";
|
|
1172
915
|
}
|
|
1173
916
|
| {
|
|
917
|
+
type: "response";
|
|
1174
918
|
messageId: string;
|
|
1175
|
-
commandId: "matchmaking/ready
|
|
1176
|
-
status: "failed";
|
|
1177
|
-
reason: "internal_error";
|
|
1178
|
-
}
|
|
1179
|
-
| {
|
|
1180
|
-
messageId: string;
|
|
1181
|
-
commandId: "matchmaking/ready/response";
|
|
1182
|
-
status: "failed";
|
|
1183
|
-
reason: "unauthorized";
|
|
1184
|
-
}
|
|
1185
|
-
| {
|
|
1186
|
-
messageId: string;
|
|
1187
|
-
commandId: "matchmaking/ready/response";
|
|
1188
|
-
status: "failed";
|
|
1189
|
-
reason: "invalid_request";
|
|
1190
|
-
}
|
|
1191
|
-
| {
|
|
1192
|
-
messageId: string;
|
|
1193
|
-
commandId: "matchmaking/ready/response";
|
|
1194
|
-
status: "failed";
|
|
1195
|
-
reason: "command_unimplemented";
|
|
1196
|
-
};
|
|
1197
|
-
export type MatchmakingReadyUpdateResponse =
|
|
1198
|
-
| {
|
|
1199
|
-
messageId: string;
|
|
1200
|
-
commandId: "matchmaking/readyUpdate/response";
|
|
1201
|
-
status: "success";
|
|
1202
|
-
data: {
|
|
1203
|
-
readyMax: number;
|
|
1204
|
-
readyCurrent: number;
|
|
1205
|
-
};
|
|
1206
|
-
}
|
|
1207
|
-
| {
|
|
1208
|
-
messageId: string;
|
|
1209
|
-
commandId: "matchmaking/readyUpdate/response";
|
|
919
|
+
commandId: "matchmaking/ready";
|
|
1210
920
|
status: "failed";
|
|
1211
921
|
reason: "internal_error";
|
|
1212
922
|
}
|
|
1213
923
|
| {
|
|
924
|
+
type: "response";
|
|
1214
925
|
messageId: string;
|
|
1215
|
-
commandId: "matchmaking/
|
|
926
|
+
commandId: "matchmaking/ready";
|
|
1216
927
|
status: "failed";
|
|
1217
928
|
reason: "unauthorized";
|
|
1218
929
|
}
|
|
1219
930
|
| {
|
|
931
|
+
type: "response";
|
|
1220
932
|
messageId: string;
|
|
1221
|
-
commandId: "matchmaking/
|
|
933
|
+
commandId: "matchmaking/ready";
|
|
1222
934
|
status: "failed";
|
|
1223
935
|
reason: "invalid_request";
|
|
1224
936
|
}
|
|
1225
937
|
| {
|
|
938
|
+
type: "response";
|
|
1226
939
|
messageId: string;
|
|
1227
|
-
commandId: "matchmaking/
|
|
1228
|
-
status: "failed";
|
|
1229
|
-
reason: "command_unimplemented";
|
|
1230
|
-
};
|
|
1231
|
-
export type SystemConnectedResponse =
|
|
1232
|
-
| {
|
|
1233
|
-
messageId: string;
|
|
1234
|
-
commandId: "system/connected/response";
|
|
1235
|
-
status: "success";
|
|
1236
|
-
data: {
|
|
1237
|
-
userId: string;
|
|
1238
|
-
username: string;
|
|
1239
|
-
displayName: string;
|
|
1240
|
-
avatarUrl: string | null;
|
|
1241
|
-
clanId: string | null;
|
|
1242
|
-
partyId: string | null;
|
|
1243
|
-
roles: string[];
|
|
1244
|
-
countryCode?: string;
|
|
1245
|
-
status: "offline" | "menu" | "playing" | "lobby";
|
|
1246
|
-
battleStatus:
|
|
1247
|
-
| ({
|
|
1248
|
-
battleId: string;
|
|
1249
|
-
} & (
|
|
1250
|
-
| ({
|
|
1251
|
-
playerId: number;
|
|
1252
|
-
teamId: number;
|
|
1253
|
-
color: string;
|
|
1254
|
-
bonus: number;
|
|
1255
|
-
inGame: boolean;
|
|
1256
|
-
} & {
|
|
1257
|
-
isSpectator: false;
|
|
1258
|
-
isBot: false;
|
|
1259
|
-
ready: boolean;
|
|
1260
|
-
sync: {
|
|
1261
|
-
engine: number;
|
|
1262
|
-
game: number;
|
|
1263
|
-
map: number;
|
|
1264
|
-
};
|
|
1265
|
-
})
|
|
1266
|
-
| {
|
|
1267
|
-
isSpectator: true;
|
|
1268
|
-
isBot: false;
|
|
1269
|
-
}
|
|
1270
|
-
))
|
|
1271
|
-
| null;
|
|
1272
|
-
friendIds: string[];
|
|
1273
|
-
outgoingFriendRequestIds: string[];
|
|
1274
|
-
incomingFriendRequestIds: string[];
|
|
1275
|
-
ignoreIds: string[];
|
|
1276
|
-
};
|
|
1277
|
-
}
|
|
1278
|
-
| {
|
|
1279
|
-
messageId: string;
|
|
1280
|
-
commandId: "system/connected/response";
|
|
1281
|
-
status: "failed";
|
|
1282
|
-
reason: "internal_error";
|
|
1283
|
-
}
|
|
1284
|
-
| {
|
|
1285
|
-
messageId: string;
|
|
1286
|
-
commandId: "system/connected/response";
|
|
1287
|
-
status: "failed";
|
|
1288
|
-
reason: "unauthorized";
|
|
1289
|
-
}
|
|
1290
|
-
| {
|
|
1291
|
-
messageId: string;
|
|
1292
|
-
commandId: "system/connected/response";
|
|
1293
|
-
status: "failed";
|
|
1294
|
-
reason: "invalid_request";
|
|
1295
|
-
}
|
|
1296
|
-
| {
|
|
1297
|
-
messageId: string;
|
|
1298
|
-
commandId: "system/connected/response";
|
|
940
|
+
commandId: "matchmaking/ready";
|
|
1299
941
|
status: "failed";
|
|
1300
942
|
reason: "command_unimplemented";
|
|
1301
943
|
};
|
|
1302
944
|
export type SystemDisconnectResponse =
|
|
1303
945
|
| {
|
|
946
|
+
type: "response";
|
|
1304
947
|
messageId: string;
|
|
1305
|
-
commandId: "system/disconnect
|
|
948
|
+
commandId: "system/disconnect";
|
|
1306
949
|
status: "success";
|
|
1307
950
|
}
|
|
1308
951
|
| {
|
|
952
|
+
type: "response";
|
|
1309
953
|
messageId: string;
|
|
1310
|
-
commandId: "system/disconnect
|
|
954
|
+
commandId: "system/disconnect";
|
|
1311
955
|
status: "failed";
|
|
1312
956
|
reason: "internal_error";
|
|
1313
957
|
}
|
|
1314
958
|
| {
|
|
959
|
+
type: "response";
|
|
1315
960
|
messageId: string;
|
|
1316
|
-
commandId: "system/disconnect
|
|
961
|
+
commandId: "system/disconnect";
|
|
1317
962
|
status: "failed";
|
|
1318
963
|
reason: "unauthorized";
|
|
1319
964
|
}
|
|
1320
965
|
| {
|
|
966
|
+
type: "response";
|
|
1321
967
|
messageId: string;
|
|
1322
|
-
commandId: "system/disconnect
|
|
968
|
+
commandId: "system/disconnect";
|
|
1323
969
|
status: "failed";
|
|
1324
970
|
reason: "invalid_request";
|
|
1325
971
|
}
|
|
1326
972
|
| {
|
|
973
|
+
type: "response";
|
|
1327
974
|
messageId: string;
|
|
1328
|
-
commandId: "system/disconnect
|
|
975
|
+
commandId: "system/disconnect";
|
|
1329
976
|
status: "failed";
|
|
1330
977
|
reason: "command_unimplemented";
|
|
1331
978
|
};
|
|
1332
979
|
export type SystemServerStatsResponse =
|
|
1333
980
|
| {
|
|
981
|
+
type: "response";
|
|
1334
982
|
messageId: string;
|
|
1335
|
-
commandId: "system/serverStats
|
|
983
|
+
commandId: "system/serverStats";
|
|
1336
984
|
status: "success";
|
|
1337
985
|
data: {
|
|
1338
986
|
userCount: number;
|
|
1339
987
|
};
|
|
1340
988
|
}
|
|
1341
989
|
| {
|
|
990
|
+
type: "response";
|
|
1342
991
|
messageId: string;
|
|
1343
|
-
commandId: "system/serverStats
|
|
992
|
+
commandId: "system/serverStats";
|
|
1344
993
|
status: "failed";
|
|
1345
994
|
reason: "internal_error";
|
|
1346
995
|
}
|
|
1347
996
|
| {
|
|
997
|
+
type: "response";
|
|
1348
998
|
messageId: string;
|
|
1349
|
-
commandId: "system/serverStats
|
|
999
|
+
commandId: "system/serverStats";
|
|
1350
1000
|
status: "failed";
|
|
1351
1001
|
reason: "unauthorized";
|
|
1352
1002
|
}
|
|
1353
1003
|
| {
|
|
1004
|
+
type: "response";
|
|
1354
1005
|
messageId: string;
|
|
1355
|
-
commandId: "system/serverStats
|
|
1006
|
+
commandId: "system/serverStats";
|
|
1356
1007
|
status: "failed";
|
|
1357
1008
|
reason: "invalid_request";
|
|
1358
1009
|
}
|
|
1359
1010
|
| {
|
|
1011
|
+
type: "response";
|
|
1360
1012
|
messageId: string;
|
|
1361
|
-
commandId: "system/serverStats
|
|
1013
|
+
commandId: "system/serverStats";
|
|
1362
1014
|
status: "failed";
|
|
1363
1015
|
reason: "command_unimplemented";
|
|
1364
1016
|
};
|
|
1365
1017
|
export type UserSubscribeResponse =
|
|
1366
1018
|
| {
|
|
1019
|
+
type: "response";
|
|
1367
1020
|
messageId: string;
|
|
1368
|
-
commandId: "user/subscribe
|
|
1021
|
+
commandId: "user/subscribe";
|
|
1369
1022
|
status: "success";
|
|
1370
1023
|
data: {
|
|
1371
1024
|
users: {
|
|
@@ -1375,7 +1028,7 @@ export type UserSubscribeResponse =
|
|
|
1375
1028
|
avatarUrl: string | null;
|
|
1376
1029
|
clanId: string | null;
|
|
1377
1030
|
partyId: string | null;
|
|
1378
|
-
|
|
1031
|
+
scopes: string[];
|
|
1379
1032
|
countryCode?: string;
|
|
1380
1033
|
status: "offline" | "menu" | "playing" | "lobby";
|
|
1381
1034
|
battleStatus:
|
|
@@ -1408,364 +1061,120 @@ export type UserSubscribeResponse =
|
|
|
1408
1061
|
};
|
|
1409
1062
|
}
|
|
1410
1063
|
| {
|
|
1064
|
+
type: "response";
|
|
1411
1065
|
messageId: string;
|
|
1412
|
-
commandId: "user/subscribe
|
|
1066
|
+
commandId: "user/subscribe";
|
|
1413
1067
|
status: "failed";
|
|
1414
1068
|
reason: "internal_error";
|
|
1415
1069
|
}
|
|
1416
1070
|
| {
|
|
1071
|
+
type: "response";
|
|
1417
1072
|
messageId: string;
|
|
1418
|
-
commandId: "user/subscribe
|
|
1073
|
+
commandId: "user/subscribe";
|
|
1419
1074
|
status: "failed";
|
|
1420
1075
|
reason: "unauthorized";
|
|
1421
1076
|
}
|
|
1422
1077
|
| {
|
|
1078
|
+
type: "response";
|
|
1423
1079
|
messageId: string;
|
|
1424
|
-
commandId: "user/subscribe
|
|
1080
|
+
commandId: "user/subscribe";
|
|
1425
1081
|
status: "failed";
|
|
1426
1082
|
reason: "invalid_request";
|
|
1427
1083
|
}
|
|
1428
1084
|
| {
|
|
1085
|
+
type: "response";
|
|
1429
1086
|
messageId: string;
|
|
1430
|
-
commandId: "user/subscribe
|
|
1087
|
+
commandId: "user/subscribe";
|
|
1431
1088
|
status: "failed";
|
|
1432
1089
|
reason: "command_unimplemented";
|
|
1433
1090
|
};
|
|
1434
1091
|
export type UserUnsubscribeResponse =
|
|
1435
1092
|
| {
|
|
1093
|
+
type: "response";
|
|
1436
1094
|
messageId: string;
|
|
1437
|
-
commandId: "user/unsubscribe
|
|
1095
|
+
commandId: "user/unsubscribe";
|
|
1438
1096
|
status: "success";
|
|
1439
1097
|
}
|
|
1440
1098
|
| {
|
|
1099
|
+
type: "response";
|
|
1441
1100
|
messageId: string;
|
|
1442
|
-
commandId: "user/unsubscribe
|
|
1101
|
+
commandId: "user/unsubscribe";
|
|
1443
1102
|
status: "failed";
|
|
1444
1103
|
reason: "cannot_unsub_own_user";
|
|
1445
1104
|
}
|
|
1446
1105
|
| {
|
|
1106
|
+
type: "response";
|
|
1447
1107
|
messageId: string;
|
|
1448
|
-
commandId: "user/unsubscribe
|
|
1108
|
+
commandId: "user/unsubscribe";
|
|
1449
1109
|
status: "failed";
|
|
1450
1110
|
reason: "internal_error";
|
|
1451
1111
|
}
|
|
1452
1112
|
| {
|
|
1113
|
+
type: "response";
|
|
1453
1114
|
messageId: string;
|
|
1454
|
-
commandId: "user/unsubscribe
|
|
1115
|
+
commandId: "user/unsubscribe";
|
|
1455
1116
|
status: "failed";
|
|
1456
1117
|
reason: "unauthorized";
|
|
1457
1118
|
}
|
|
1458
1119
|
| {
|
|
1120
|
+
type: "response";
|
|
1459
1121
|
messageId: string;
|
|
1460
|
-
commandId: "user/unsubscribe
|
|
1122
|
+
commandId: "user/unsubscribe";
|
|
1461
1123
|
status: "failed";
|
|
1462
1124
|
reason: "invalid_request";
|
|
1463
1125
|
}
|
|
1464
1126
|
| {
|
|
1127
|
+
type: "response";
|
|
1465
1128
|
messageId: string;
|
|
1466
|
-
commandId: "user/unsubscribe
|
|
1467
|
-
status: "failed";
|
|
1468
|
-
reason: "command_unimplemented";
|
|
1469
|
-
};
|
|
1470
|
-
export type UserUpdatedResponse =
|
|
1471
|
-
| {
|
|
1472
|
-
messageId: string;
|
|
1473
|
-
commandId: "user/updated/response";
|
|
1474
|
-
status: "success";
|
|
1475
|
-
data: {
|
|
1476
|
-
users: {
|
|
1477
|
-
userId?: string;
|
|
1478
|
-
username?: string;
|
|
1479
|
-
displayName?: string;
|
|
1480
|
-
avatarUrl?: string | null;
|
|
1481
|
-
clanId?: string | null;
|
|
1482
|
-
partyId?: string | null;
|
|
1483
|
-
roles?: string[];
|
|
1484
|
-
countryCode?: string;
|
|
1485
|
-
status?: "offline" | "menu" | "playing" | "lobby";
|
|
1486
|
-
battleStatus?:
|
|
1487
|
-
| ({
|
|
1488
|
-
battleId: string;
|
|
1489
|
-
} & (
|
|
1490
|
-
| ({
|
|
1491
|
-
playerId: number;
|
|
1492
|
-
teamId: number;
|
|
1493
|
-
color: string;
|
|
1494
|
-
bonus: number;
|
|
1495
|
-
inGame: boolean;
|
|
1496
|
-
} & {
|
|
1497
|
-
isSpectator: false;
|
|
1498
|
-
isBot: false;
|
|
1499
|
-
ready: boolean;
|
|
1500
|
-
sync: {
|
|
1501
|
-
engine: number;
|
|
1502
|
-
game: number;
|
|
1503
|
-
map: number;
|
|
1504
|
-
};
|
|
1505
|
-
})
|
|
1506
|
-
| {
|
|
1507
|
-
isSpectator: true;
|
|
1508
|
-
isBot: false;
|
|
1509
|
-
}
|
|
1510
|
-
))
|
|
1511
|
-
| null;
|
|
1512
|
-
friendIds?: string[];
|
|
1513
|
-
outgoingFriendRequestIds?: string[];
|
|
1514
|
-
incomingFriendRequestIds?: string[];
|
|
1515
|
-
ignoreIds?: string[];
|
|
1516
|
-
}[];
|
|
1517
|
-
};
|
|
1518
|
-
}
|
|
1519
|
-
| {
|
|
1520
|
-
messageId: string;
|
|
1521
|
-
commandId: "user/updated/response";
|
|
1522
|
-
status: "failed";
|
|
1523
|
-
reason: "internal_error";
|
|
1524
|
-
}
|
|
1525
|
-
| {
|
|
1526
|
-
messageId: string;
|
|
1527
|
-
commandId: "user/updated/response";
|
|
1528
|
-
status: "failed";
|
|
1529
|
-
reason: "unauthorized";
|
|
1530
|
-
}
|
|
1531
|
-
| {
|
|
1532
|
-
messageId: string;
|
|
1533
|
-
commandId: "user/updated/response";
|
|
1534
|
-
status: "failed";
|
|
1535
|
-
reason: "invalid_request";
|
|
1536
|
-
}
|
|
1537
|
-
| {
|
|
1538
|
-
messageId: string;
|
|
1539
|
-
commandId: "user/updated/response";
|
|
1129
|
+
commandId: "user/unsubscribe";
|
|
1540
1130
|
status: "failed";
|
|
1541
1131
|
reason: "command_unimplemented";
|
|
1542
1132
|
};
|
|
1543
1133
|
|
|
1544
|
-
export interface
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
unslave: {
|
|
1557
|
-
request: AutohostUnslaveRequest;
|
|
1558
|
-
response: AutohostUnslaveResponse;
|
|
1559
|
-
};
|
|
1560
|
-
};
|
|
1561
|
-
game: {
|
|
1562
|
-
/**
|
|
1563
|
-
* When a client receives this response it should launch the game (spring.exe) with the start script.
|
|
1564
|
-
*/
|
|
1565
|
-
launch: {
|
|
1566
|
-
response: GameLaunchResponse;
|
|
1567
|
-
};
|
|
1568
|
-
};
|
|
1569
|
-
lobby: {
|
|
1570
|
-
/**
|
|
1571
|
-
* Close an existing lobby.
|
|
1572
|
-
*/
|
|
1573
|
-
close: {
|
|
1574
|
-
request: LobbyCloseRequest;
|
|
1575
|
-
response: LobbyCloseResponse;
|
|
1576
|
-
};
|
|
1577
|
-
/**
|
|
1578
|
-
* Create a new lobby - intended for player clients to summon a dedicated host.
|
|
1579
|
-
*/
|
|
1580
|
-
create: {
|
|
1581
|
-
request: LobbyCreateRequest;
|
|
1582
|
-
response: LobbyCreateResponse;
|
|
1583
|
-
};
|
|
1584
|
-
/**
|
|
1585
|
-
* Join a custom lobby. Server will send a [joined](#joined) response containing the joined lobby's data.
|
|
1586
|
-
* These commands are split because the server may want to force the client to join a battle without them explicitly requesting it.
|
|
1587
|
-
*/
|
|
1588
|
-
join: {
|
|
1589
|
-
request: LobbyJoinRequest;
|
|
1590
|
-
response: LobbyJoinResponse;
|
|
1591
|
-
};
|
|
1592
|
-
/**
|
|
1593
|
-
* Sent when the client successfully joins a lobby. Can also be sent at any time by the server to forcibly make the client join a lobby.
|
|
1594
|
-
*/
|
|
1595
|
-
joined: {
|
|
1596
|
-
response: LobbyJoinedResponse;
|
|
1597
|
-
};
|
|
1598
|
-
/**
|
|
1599
|
-
* Leave the current lobby.
|
|
1600
|
-
*/
|
|
1601
|
-
leave: {
|
|
1602
|
-
request: LobbyLeaveRequest;
|
|
1603
|
-
response: LobbyLeaveResponse;
|
|
1604
|
-
};
|
|
1605
|
-
/**
|
|
1606
|
-
* Sent when the server removes the client from a lobby.
|
|
1607
|
-
*/
|
|
1608
|
-
left: {
|
|
1609
|
-
response: LobbyLeftResponse;
|
|
1610
|
-
};
|
|
1611
|
-
/**
|
|
1612
|
-
* Returns all custom lobbies.
|
|
1613
|
-
*/
|
|
1614
|
-
list: {
|
|
1615
|
-
request: LobbyListRequest;
|
|
1616
|
-
response: LobbyListResponse;
|
|
1617
|
-
};
|
|
1618
|
-
/**
|
|
1619
|
-
* Receive a lobby message. See [sendMessage](#sendmessage) for outgoing messages.
|
|
1620
|
-
*/
|
|
1621
|
-
receiveMessage: {
|
|
1622
|
-
response: LobbyReceiveMessageResponse;
|
|
1623
|
-
};
|
|
1624
|
-
/**
|
|
1625
|
-
* Send a lobby message. See [receiveMessage](#receivemessage) for incoming messages.
|
|
1626
|
-
*/
|
|
1627
|
-
sendMessage: {
|
|
1628
|
-
request: LobbySendMessageRequest;
|
|
1629
|
-
response: LobbySendMessageResponse;
|
|
1630
|
-
};
|
|
1631
|
-
/**
|
|
1632
|
-
* Subscribe to custom battle updates. By default, updates for the user's own battle will always be subscribed to. If successful, the Tachyon server should respond with full data about the subscribed battles, and then continue to send partial (stateful) updates via the [updated](#updated) response.
|
|
1633
|
-
*/
|
|
1634
|
-
subscribe: {
|
|
1635
|
-
request: LobbySubscribeRequest;
|
|
1636
|
-
response: LobbySubscribeResponse;
|
|
1637
|
-
};
|
|
1638
|
-
/**
|
|
1639
|
-
* Unsubscribe from custom battle updates. If battleIds is passed only updates to those battles will be stopped, otherwise this will stop updates for all battles.
|
|
1640
|
-
*/
|
|
1641
|
-
unsubscribe: {
|
|
1642
|
-
request: LobbyUnsubscribeRequest;
|
|
1643
|
-
response: LobbyUnsubscribeResponse;
|
|
1644
|
-
};
|
|
1645
|
-
/**
|
|
1646
|
-
* Server sends an array of partial battle objects whenever a subscribed battle changes in some way.
|
|
1647
|
-
*/
|
|
1648
|
-
updated: {
|
|
1649
|
-
response: LobbyUpdatedResponse;
|
|
1650
|
-
};
|
|
1651
|
-
};
|
|
1652
|
-
matchmaking: {
|
|
1653
|
-
/**
|
|
1654
|
-
* Cancel queueing for matchmaking. Can also be sent during the ready phase to effectively decline the match.
|
|
1655
|
-
*/
|
|
1656
|
-
cancel: {
|
|
1657
|
-
request: MatchmakingCancelRequest;
|
|
1658
|
-
response: MatchmakingCancelResponse;
|
|
1659
|
-
};
|
|
1660
|
-
/**
|
|
1661
|
-
* Server should send this when there are enough queued players to form a valid game that meets their criteria. Clients should respond with [ready](#ready).
|
|
1662
|
-
*/
|
|
1663
|
-
found: {
|
|
1664
|
-
response: MatchmakingFoundResponse;
|
|
1665
|
-
};
|
|
1666
|
-
/**
|
|
1667
|
-
* Returns all available matchmaking playlists.
|
|
1668
|
-
*/
|
|
1669
|
-
list: {
|
|
1670
|
-
request: MatchmakingListRequest;
|
|
1671
|
-
response: MatchmakingListResponse;
|
|
1672
|
-
};
|
|
1673
|
-
/**
|
|
1674
|
-
* Sent when a found match gets disbanded because a client failed to ready up.
|
|
1675
|
-
*/
|
|
1676
|
-
lost: {
|
|
1677
|
-
response: MatchmakingLostResponse;
|
|
1678
|
-
};
|
|
1679
|
-
/**
|
|
1680
|
-
* Queue up for matchmaking. Should cancel the previous queue if already in one.
|
|
1681
|
-
*/
|
|
1682
|
-
queue: {
|
|
1683
|
-
request: MatchmakingQueueRequest;
|
|
1684
|
-
response: MatchmakingQueueResponse;
|
|
1685
|
-
};
|
|
1686
|
-
/**
|
|
1687
|
-
* Contains some info about the state of the current queue.
|
|
1688
|
-
*/
|
|
1689
|
-
queueUpdate: {
|
|
1690
|
-
response: MatchmakingQueueUpdateResponse;
|
|
1691
|
-
};
|
|
1692
|
-
/**
|
|
1693
|
-
* Clients should send this when they are ready to proceed with the found match. If not sent within 10s of the [found](#found) response then queue should be cancelled.
|
|
1694
|
-
*/
|
|
1695
|
-
ready: {
|
|
1696
|
-
request: MatchmakingReadyRequest;
|
|
1697
|
-
response: MatchmakingReadyResponse;
|
|
1698
|
-
};
|
|
1699
|
-
/**
|
|
1700
|
-
* Sent when a client in a found match readies up.
|
|
1701
|
-
*/
|
|
1702
|
-
readyUpdate: {
|
|
1703
|
-
response: MatchmakingReadyUpdateResponse;
|
|
1704
|
-
};
|
|
1705
|
-
};
|
|
1706
|
-
system: {
|
|
1707
|
-
/**
|
|
1708
|
-
* Sent immediately by the server on connection.
|
|
1709
|
-
*/
|
|
1710
|
-
connected: {
|
|
1711
|
-
response: SystemConnectedResponse;
|
|
1712
|
-
};
|
|
1713
|
-
/**
|
|
1714
|
-
* Ask the server to terminate the connection.
|
|
1715
|
-
*/
|
|
1716
|
-
disconnect: {
|
|
1717
|
-
request: SystemDisconnectRequest;
|
|
1718
|
-
response: SystemDisconnectResponse;
|
|
1719
|
-
};
|
|
1720
|
-
/**
|
|
1721
|
-
* Get server stats such as user count.
|
|
1722
|
-
*/
|
|
1723
|
-
serverStats: {
|
|
1724
|
-
request: SystemServerStatsRequest;
|
|
1725
|
-
response: SystemServerStatsResponse;
|
|
1726
|
-
};
|
|
1727
|
-
};
|
|
1728
|
-
user: {
|
|
1729
|
-
/**
|
|
1730
|
-
* Subscribe to user updates. By default, updates for the client's own user will always be subscribed to. If successful, the Tachyon server should respond with full data about the subscribed users, and then continue to send partial (stateful) updates via the [updated](#updated) response.
|
|
1731
|
-
*/
|
|
1732
|
-
subscribe: {
|
|
1733
|
-
request: UserSubscribeRequest;
|
|
1734
|
-
response: UserSubscribeResponse;
|
|
1735
|
-
};
|
|
1736
|
-
/**
|
|
1737
|
-
* Unsubscribe from user updates.
|
|
1738
|
-
*/
|
|
1739
|
-
unsubscribe: {
|
|
1740
|
-
request: UserUnsubscribeRequest;
|
|
1741
|
-
response: UserUnsubscribeResponse;
|
|
1742
|
-
};
|
|
1743
|
-
/**
|
|
1744
|
-
* Sent by the server to inform the client when subscribed users get updated in some way. The root object of each array element in `users` are partial, meaning only the elements present have changed, and anything missing is assumed to be unchanged.
|
|
1745
|
-
*/
|
|
1746
|
-
updated: {
|
|
1747
|
-
response: UserUpdatedResponse;
|
|
1748
|
-
};
|
|
1134
|
+
export interface AutohostConnectedEvent {
|
|
1135
|
+
type: "event";
|
|
1136
|
+
messageId: string;
|
|
1137
|
+
commandId: "autohost/connected";
|
|
1138
|
+
data: {};
|
|
1139
|
+
}
|
|
1140
|
+
export interface AutohostLaunchRequest {
|
|
1141
|
+
type: "request";
|
|
1142
|
+
messageId: string;
|
|
1143
|
+
commandId: "autohost/launch";
|
|
1144
|
+
data: {
|
|
1145
|
+
script: string;
|
|
1749
1146
|
};
|
|
1750
1147
|
}
|
|
1751
1148
|
export interface AutohostSlaveRequest {
|
|
1149
|
+
type: "request";
|
|
1752
1150
|
messageId: string;
|
|
1753
|
-
commandId: "autohost/slave
|
|
1151
|
+
commandId: "autohost/slave";
|
|
1754
1152
|
data: {
|
|
1755
1153
|
maxBattles: number;
|
|
1756
1154
|
};
|
|
1757
1155
|
}
|
|
1758
1156
|
export interface AutohostUnslaveRequest {
|
|
1157
|
+
type: "request";
|
|
1759
1158
|
messageId: string;
|
|
1760
|
-
commandId: "autohost/unslave
|
|
1159
|
+
commandId: "autohost/unslave";
|
|
1160
|
+
}
|
|
1161
|
+
export interface GameLaunchEvent {
|
|
1162
|
+
type: "event";
|
|
1163
|
+
messageId: string;
|
|
1164
|
+
commandId: "game/launch";
|
|
1165
|
+
data: {
|
|
1166
|
+
script: string;
|
|
1167
|
+
};
|
|
1761
1168
|
}
|
|
1762
1169
|
export interface LobbyCloseRequest {
|
|
1170
|
+
type: "request";
|
|
1763
1171
|
messageId: string;
|
|
1764
|
-
commandId: "lobby/close
|
|
1172
|
+
commandId: "lobby/close";
|
|
1765
1173
|
}
|
|
1766
1174
|
export interface LobbyCreateRequest {
|
|
1175
|
+
type: "request";
|
|
1767
1176
|
messageId: string;
|
|
1768
|
-
commandId: "lobby/create
|
|
1177
|
+
commandId: "lobby/create";
|
|
1769
1178
|
data: {
|
|
1770
1179
|
title: string;
|
|
1771
1180
|
private: boolean;
|
|
@@ -1774,53 +1183,303 @@ export interface LobbyCreateRequest {
|
|
|
1774
1183
|
};
|
|
1775
1184
|
}
|
|
1776
1185
|
export interface LobbyJoinRequest {
|
|
1186
|
+
type: "request";
|
|
1777
1187
|
messageId: string;
|
|
1778
|
-
commandId: "lobby/join
|
|
1188
|
+
commandId: "lobby/join";
|
|
1779
1189
|
data: {
|
|
1780
1190
|
lobbyId: string;
|
|
1781
1191
|
password?: string;
|
|
1782
1192
|
};
|
|
1783
1193
|
}
|
|
1194
|
+
export interface LobbyJoinedEvent {
|
|
1195
|
+
type: "event";
|
|
1196
|
+
messageId: string;
|
|
1197
|
+
commandId: "lobby/joined";
|
|
1198
|
+
data: {
|
|
1199
|
+
battleId: string;
|
|
1200
|
+
hostId: string;
|
|
1201
|
+
engine: string;
|
|
1202
|
+
game: string;
|
|
1203
|
+
map: string;
|
|
1204
|
+
startPosType: 0 | 1 | 2;
|
|
1205
|
+
startAreas: {
|
|
1206
|
+
/**
|
|
1207
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
1208
|
+
* via the `patternProperty` "^(0|[1-9][0-9]*)$".
|
|
1209
|
+
*/
|
|
1210
|
+
[k: string]: {
|
|
1211
|
+
x: number;
|
|
1212
|
+
y: number;
|
|
1213
|
+
width: number;
|
|
1214
|
+
height: number;
|
|
1215
|
+
};
|
|
1216
|
+
};
|
|
1217
|
+
startTime: number | null;
|
|
1218
|
+
ip: string | null;
|
|
1219
|
+
port: number | null;
|
|
1220
|
+
scriptPassword: string | null;
|
|
1221
|
+
modOptions: {
|
|
1222
|
+
/**
|
|
1223
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
1224
|
+
* via the `patternProperty` "^(.*)$".
|
|
1225
|
+
*/
|
|
1226
|
+
[k: string]: unknown;
|
|
1227
|
+
};
|
|
1228
|
+
bots: {
|
|
1229
|
+
playerId: number;
|
|
1230
|
+
teamId: number;
|
|
1231
|
+
color: string;
|
|
1232
|
+
bonus: number;
|
|
1233
|
+
inGame: boolean;
|
|
1234
|
+
isSpectator: false;
|
|
1235
|
+
isBot: true;
|
|
1236
|
+
ownerId: string;
|
|
1237
|
+
aiShortName: string;
|
|
1238
|
+
name: string;
|
|
1239
|
+
aiOptions: {
|
|
1240
|
+
/**
|
|
1241
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
1242
|
+
* via the `patternProperty` "^(.*)$".
|
|
1243
|
+
*/
|
|
1244
|
+
[k: string]: unknown;
|
|
1245
|
+
};
|
|
1246
|
+
faction: string;
|
|
1247
|
+
}[];
|
|
1248
|
+
users: {
|
|
1249
|
+
userId: string;
|
|
1250
|
+
username: string;
|
|
1251
|
+
displayName: string;
|
|
1252
|
+
avatarUrl: string | null;
|
|
1253
|
+
clanId: string | null;
|
|
1254
|
+
partyId: string | null;
|
|
1255
|
+
scopes: string[];
|
|
1256
|
+
countryCode?: string;
|
|
1257
|
+
status: "offline" | "menu" | "playing" | "lobby";
|
|
1258
|
+
battleStatus:
|
|
1259
|
+
| ({
|
|
1260
|
+
battleId: string;
|
|
1261
|
+
} & (
|
|
1262
|
+
| ({
|
|
1263
|
+
playerId: number;
|
|
1264
|
+
teamId: number;
|
|
1265
|
+
color: string;
|
|
1266
|
+
bonus: number;
|
|
1267
|
+
inGame: boolean;
|
|
1268
|
+
} & {
|
|
1269
|
+
isSpectator: false;
|
|
1270
|
+
isBot: false;
|
|
1271
|
+
ready: boolean;
|
|
1272
|
+
sync: {
|
|
1273
|
+
engine: number;
|
|
1274
|
+
game: number;
|
|
1275
|
+
map: number;
|
|
1276
|
+
};
|
|
1277
|
+
})
|
|
1278
|
+
| {
|
|
1279
|
+
isSpectator: true;
|
|
1280
|
+
isBot: false;
|
|
1281
|
+
}
|
|
1282
|
+
))
|
|
1283
|
+
| null;
|
|
1284
|
+
}[];
|
|
1285
|
+
};
|
|
1286
|
+
}
|
|
1784
1287
|
export interface LobbyLeaveRequest {
|
|
1288
|
+
type: "request";
|
|
1785
1289
|
messageId: string;
|
|
1786
|
-
commandId: "lobby/leave
|
|
1290
|
+
commandId: "lobby/leave";
|
|
1291
|
+
}
|
|
1292
|
+
export interface LobbyLeftEvent {
|
|
1293
|
+
type: "event";
|
|
1294
|
+
messageId: string;
|
|
1295
|
+
commandId: "lobby/left";
|
|
1787
1296
|
}
|
|
1788
1297
|
export interface LobbyListRequest {
|
|
1298
|
+
type: "request";
|
|
1299
|
+
messageId: string;
|
|
1300
|
+
commandId: "lobby/list";
|
|
1301
|
+
}
|
|
1302
|
+
export interface LobbyReceiveMessageEvent {
|
|
1303
|
+
type: "event";
|
|
1789
1304
|
messageId: string;
|
|
1790
|
-
commandId: "lobby/
|
|
1305
|
+
commandId: "lobby/receiveMessage";
|
|
1306
|
+
data: {
|
|
1307
|
+
userId: string;
|
|
1308
|
+
message: string;
|
|
1309
|
+
};
|
|
1791
1310
|
}
|
|
1792
1311
|
export interface LobbySendMessageRequest {
|
|
1312
|
+
type: "request";
|
|
1793
1313
|
messageId: string;
|
|
1794
|
-
commandId: "lobby/sendMessage
|
|
1314
|
+
commandId: "lobby/sendMessage";
|
|
1795
1315
|
data: {
|
|
1796
1316
|
message: string;
|
|
1797
1317
|
};
|
|
1798
1318
|
}
|
|
1799
1319
|
export interface LobbySubscribeRequest {
|
|
1320
|
+
type: "request";
|
|
1800
1321
|
messageId: string;
|
|
1801
|
-
commandId: "lobby/subscribe
|
|
1322
|
+
commandId: "lobby/subscribe";
|
|
1802
1323
|
data: {
|
|
1803
1324
|
battleIds: string[];
|
|
1804
1325
|
};
|
|
1805
1326
|
}
|
|
1806
1327
|
export interface LobbyUnsubscribeRequest {
|
|
1328
|
+
type: "request";
|
|
1807
1329
|
messageId: string;
|
|
1808
|
-
commandId: "lobby/unsubscribe
|
|
1330
|
+
commandId: "lobby/unsubscribe";
|
|
1809
1331
|
data: {
|
|
1810
1332
|
battleIds?: string[];
|
|
1811
1333
|
};
|
|
1812
1334
|
}
|
|
1335
|
+
export interface LobbyUpdatedEvent {
|
|
1336
|
+
type: "event";
|
|
1337
|
+
messageId: string;
|
|
1338
|
+
commandId: "lobby/updated";
|
|
1339
|
+
data: {
|
|
1340
|
+
battles: ({
|
|
1341
|
+
battleId?: string;
|
|
1342
|
+
hostId?: string;
|
|
1343
|
+
engine?: string;
|
|
1344
|
+
game?: string;
|
|
1345
|
+
map?: string;
|
|
1346
|
+
startPosType?: 0 | 1 | 2;
|
|
1347
|
+
startAreas?: {
|
|
1348
|
+
/**
|
|
1349
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
1350
|
+
* via the `patternProperty` "^(0|[1-9][0-9]*)$".
|
|
1351
|
+
*/
|
|
1352
|
+
[k: string]: {
|
|
1353
|
+
x: number;
|
|
1354
|
+
y: number;
|
|
1355
|
+
width: number;
|
|
1356
|
+
height: number;
|
|
1357
|
+
};
|
|
1358
|
+
};
|
|
1359
|
+
startTime?: number | null;
|
|
1360
|
+
ip?: string | null;
|
|
1361
|
+
port?: number | null;
|
|
1362
|
+
scriptPassword?: string | null;
|
|
1363
|
+
modOptions?: {
|
|
1364
|
+
/**
|
|
1365
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
1366
|
+
* via the `patternProperty` "^(.*)$".
|
|
1367
|
+
*/
|
|
1368
|
+
[k: string]: unknown;
|
|
1369
|
+
};
|
|
1370
|
+
bots?: {
|
|
1371
|
+
playerId: number;
|
|
1372
|
+
teamId: number;
|
|
1373
|
+
color: string;
|
|
1374
|
+
bonus: number;
|
|
1375
|
+
inGame: boolean;
|
|
1376
|
+
isSpectator: false;
|
|
1377
|
+
isBot: true;
|
|
1378
|
+
ownerId: string;
|
|
1379
|
+
aiShortName: string;
|
|
1380
|
+
name: string;
|
|
1381
|
+
aiOptions: {
|
|
1382
|
+
/**
|
|
1383
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
1384
|
+
* via the `patternProperty` "^(.*)$".
|
|
1385
|
+
*/
|
|
1386
|
+
[k: string]: unknown;
|
|
1387
|
+
};
|
|
1388
|
+
faction: string;
|
|
1389
|
+
}[];
|
|
1390
|
+
users?: {
|
|
1391
|
+
userId: string;
|
|
1392
|
+
username: string;
|
|
1393
|
+
displayName: string;
|
|
1394
|
+
avatarUrl: string | null;
|
|
1395
|
+
clanId: string | null;
|
|
1396
|
+
partyId: string | null;
|
|
1397
|
+
scopes: string[];
|
|
1398
|
+
countryCode?: string;
|
|
1399
|
+
status: "offline" | "menu" | "playing" | "lobby";
|
|
1400
|
+
battleStatus:
|
|
1401
|
+
| ({
|
|
1402
|
+
battleId: string;
|
|
1403
|
+
} & (
|
|
1404
|
+
| ({
|
|
1405
|
+
playerId: number;
|
|
1406
|
+
teamId: number;
|
|
1407
|
+
color: string;
|
|
1408
|
+
bonus: number;
|
|
1409
|
+
inGame: boolean;
|
|
1410
|
+
} & {
|
|
1411
|
+
isSpectator: false;
|
|
1412
|
+
isBot: false;
|
|
1413
|
+
ready: boolean;
|
|
1414
|
+
sync: {
|
|
1415
|
+
engine: number;
|
|
1416
|
+
game: number;
|
|
1417
|
+
map: number;
|
|
1418
|
+
};
|
|
1419
|
+
})
|
|
1420
|
+
| {
|
|
1421
|
+
isSpectator: true;
|
|
1422
|
+
isBot: false;
|
|
1423
|
+
}
|
|
1424
|
+
))
|
|
1425
|
+
| null;
|
|
1426
|
+
}[];
|
|
1427
|
+
} & {
|
|
1428
|
+
title?: string;
|
|
1429
|
+
locked?: boolean;
|
|
1430
|
+
passworded?: boolean;
|
|
1431
|
+
bossIds?: string[];
|
|
1432
|
+
joinQueueIds?: string[];
|
|
1433
|
+
limits?: {
|
|
1434
|
+
minTeamsize: number | null;
|
|
1435
|
+
maxTeamsize: number | null;
|
|
1436
|
+
minRating: number | null;
|
|
1437
|
+
maxRating: number | null;
|
|
1438
|
+
};
|
|
1439
|
+
})[];
|
|
1440
|
+
};
|
|
1441
|
+
}
|
|
1813
1442
|
export interface MatchmakingCancelRequest {
|
|
1443
|
+
type: "request";
|
|
1444
|
+
messageId: string;
|
|
1445
|
+
commandId: "matchmaking/cancel";
|
|
1446
|
+
}
|
|
1447
|
+
export interface MatchmakingDeclinedRequest {
|
|
1448
|
+
type: "request";
|
|
1449
|
+
messageId: string;
|
|
1450
|
+
commandId: "matchmaking/declined";
|
|
1451
|
+
}
|
|
1452
|
+
export interface MatchmakingFoundEvent {
|
|
1453
|
+
type: "event";
|
|
1454
|
+
messageId: string;
|
|
1455
|
+
commandId: "matchmaking/found";
|
|
1456
|
+
data: {
|
|
1457
|
+
queueId: string;
|
|
1458
|
+
timeoutMs: number;
|
|
1459
|
+
};
|
|
1460
|
+
}
|
|
1461
|
+
export interface MatchmakingFoundUpdateEvent {
|
|
1462
|
+
type: "event";
|
|
1814
1463
|
messageId: string;
|
|
1815
|
-
commandId: "matchmaking/
|
|
1464
|
+
commandId: "matchmaking/foundUpdate";
|
|
1465
|
+
data: {
|
|
1466
|
+
readyCount: number;
|
|
1467
|
+
};
|
|
1816
1468
|
}
|
|
1817
1469
|
export interface MatchmakingListRequest {
|
|
1470
|
+
type: "request";
|
|
1471
|
+
messageId: string;
|
|
1472
|
+
commandId: "matchmaking/list";
|
|
1473
|
+
}
|
|
1474
|
+
export interface MatchmakingLostEvent {
|
|
1475
|
+
type: "event";
|
|
1818
1476
|
messageId: string;
|
|
1819
|
-
commandId: "matchmaking/
|
|
1477
|
+
commandId: "matchmaking/lost";
|
|
1820
1478
|
}
|
|
1821
1479
|
export interface MatchmakingQueueRequest {
|
|
1480
|
+
type: "request";
|
|
1822
1481
|
messageId: string;
|
|
1823
|
-
commandId: "matchmaking/queue
|
|
1482
|
+
commandId: "matchmaking/queue";
|
|
1824
1483
|
data: {
|
|
1825
1484
|
/**
|
|
1826
1485
|
* @minItems 1
|
|
@@ -1828,35 +1487,151 @@ export interface MatchmakingQueueRequest {
|
|
|
1828
1487
|
queues: [string, ...string[]];
|
|
1829
1488
|
};
|
|
1830
1489
|
}
|
|
1490
|
+
export interface MatchmakingQueueUpdateEvent {
|
|
1491
|
+
type: "event";
|
|
1492
|
+
messageId: string;
|
|
1493
|
+
commandId: "matchmaking/queueUpdate";
|
|
1494
|
+
data: {
|
|
1495
|
+
playersQueued: string;
|
|
1496
|
+
};
|
|
1497
|
+
}
|
|
1831
1498
|
export interface MatchmakingReadyRequest {
|
|
1499
|
+
type: "request";
|
|
1500
|
+
messageId: string;
|
|
1501
|
+
commandId: "matchmaking/ready";
|
|
1502
|
+
}
|
|
1503
|
+
export interface MatchmakingReadyUpdateEvent {
|
|
1504
|
+
type: "event";
|
|
1505
|
+
messageId: string;
|
|
1506
|
+
commandId: "matchmaking/readyUpdate";
|
|
1507
|
+
data: {
|
|
1508
|
+
readyMax: number;
|
|
1509
|
+
readyCurrent: number;
|
|
1510
|
+
};
|
|
1511
|
+
}
|
|
1512
|
+
export interface SystemConnectedEvent {
|
|
1513
|
+
type: "event";
|
|
1832
1514
|
messageId: string;
|
|
1833
|
-
commandId: "
|
|
1515
|
+
commandId: "system/connected";
|
|
1516
|
+
data: {
|
|
1517
|
+
userId: string;
|
|
1518
|
+
username: string;
|
|
1519
|
+
displayName: string;
|
|
1520
|
+
avatarUrl: string | null;
|
|
1521
|
+
clanId: string | null;
|
|
1522
|
+
partyId: string | null;
|
|
1523
|
+
scopes: string[];
|
|
1524
|
+
countryCode?: string;
|
|
1525
|
+
status: "offline" | "menu" | "playing" | "lobby";
|
|
1526
|
+
battleStatus:
|
|
1527
|
+
| ({
|
|
1528
|
+
battleId: string;
|
|
1529
|
+
} & (
|
|
1530
|
+
| ({
|
|
1531
|
+
playerId: number;
|
|
1532
|
+
teamId: number;
|
|
1533
|
+
color: string;
|
|
1534
|
+
bonus: number;
|
|
1535
|
+
inGame: boolean;
|
|
1536
|
+
} & {
|
|
1537
|
+
isSpectator: false;
|
|
1538
|
+
isBot: false;
|
|
1539
|
+
ready: boolean;
|
|
1540
|
+
sync: {
|
|
1541
|
+
engine: number;
|
|
1542
|
+
game: number;
|
|
1543
|
+
map: number;
|
|
1544
|
+
};
|
|
1545
|
+
})
|
|
1546
|
+
| {
|
|
1547
|
+
isSpectator: true;
|
|
1548
|
+
isBot: false;
|
|
1549
|
+
}
|
|
1550
|
+
))
|
|
1551
|
+
| null;
|
|
1552
|
+
friendIds: string[];
|
|
1553
|
+
outgoingFriendRequestIds: string[];
|
|
1554
|
+
incomingFriendRequestIds: string[];
|
|
1555
|
+
ignoreIds: string[];
|
|
1556
|
+
};
|
|
1834
1557
|
}
|
|
1835
1558
|
export interface SystemDisconnectRequest {
|
|
1559
|
+
type: "request";
|
|
1836
1560
|
messageId: string;
|
|
1837
|
-
commandId: "system/disconnect
|
|
1561
|
+
commandId: "system/disconnect";
|
|
1838
1562
|
data?: {
|
|
1839
1563
|
reason: string;
|
|
1840
1564
|
};
|
|
1841
1565
|
}
|
|
1842
1566
|
export interface SystemServerStatsRequest {
|
|
1567
|
+
type: "request";
|
|
1843
1568
|
messageId: string;
|
|
1844
|
-
commandId: "system/serverStats
|
|
1569
|
+
commandId: "system/serverStats";
|
|
1845
1570
|
}
|
|
1846
1571
|
export interface UserSubscribeRequest {
|
|
1572
|
+
type: "request";
|
|
1847
1573
|
messageId: string;
|
|
1848
|
-
commandId: "user/subscribe
|
|
1574
|
+
commandId: "user/subscribe";
|
|
1849
1575
|
data: {
|
|
1850
1576
|
userIds: string[];
|
|
1851
1577
|
};
|
|
1852
1578
|
}
|
|
1853
1579
|
export interface UserUnsubscribeRequest {
|
|
1580
|
+
type: "request";
|
|
1854
1581
|
messageId: string;
|
|
1855
|
-
commandId: "user/unsubscribe
|
|
1582
|
+
commandId: "user/unsubscribe";
|
|
1856
1583
|
data: {
|
|
1857
1584
|
userIds: string[];
|
|
1858
1585
|
};
|
|
1859
1586
|
}
|
|
1587
|
+
export interface UserUpdatedEvent {
|
|
1588
|
+
type: "event";
|
|
1589
|
+
messageId: string;
|
|
1590
|
+
commandId: "user/updated";
|
|
1591
|
+
data: {
|
|
1592
|
+
users: {
|
|
1593
|
+
userId?: string;
|
|
1594
|
+
username?: string;
|
|
1595
|
+
displayName?: string;
|
|
1596
|
+
avatarUrl?: string | null;
|
|
1597
|
+
clanId?: string | null;
|
|
1598
|
+
partyId?: string | null;
|
|
1599
|
+
scopes?: string[];
|
|
1600
|
+
countryCode?: string;
|
|
1601
|
+
status?: "offline" | "menu" | "playing" | "lobby";
|
|
1602
|
+
battleStatus?:
|
|
1603
|
+
| ({
|
|
1604
|
+
battleId: string;
|
|
1605
|
+
} & (
|
|
1606
|
+
| ({
|
|
1607
|
+
playerId: number;
|
|
1608
|
+
teamId: number;
|
|
1609
|
+
color: string;
|
|
1610
|
+
bonus: number;
|
|
1611
|
+
inGame: boolean;
|
|
1612
|
+
} & {
|
|
1613
|
+
isSpectator: false;
|
|
1614
|
+
isBot: false;
|
|
1615
|
+
ready: boolean;
|
|
1616
|
+
sync: {
|
|
1617
|
+
engine: number;
|
|
1618
|
+
game: number;
|
|
1619
|
+
map: number;
|
|
1620
|
+
};
|
|
1621
|
+
})
|
|
1622
|
+
| {
|
|
1623
|
+
isSpectator: true;
|
|
1624
|
+
isBot: false;
|
|
1625
|
+
}
|
|
1626
|
+
))
|
|
1627
|
+
| null;
|
|
1628
|
+
friendIds?: string[];
|
|
1629
|
+
outgoingFriendRequestIds?: string[];
|
|
1630
|
+
incomingFriendRequestIds?: string[];
|
|
1631
|
+
ignoreIds?: string[];
|
|
1632
|
+
}[];
|
|
1633
|
+
};
|
|
1634
|
+
}
|
|
1860
1635
|
export interface TachyonAutohostStatus {
|
|
1861
1636
|
gameStartTime: number | null;
|
|
1862
1637
|
}
|
|
@@ -1918,7 +1693,7 @@ export interface TachyonBattle {
|
|
|
1918
1693
|
avatarUrl: string | null;
|
|
1919
1694
|
clanId: string | null;
|
|
1920
1695
|
partyId: string | null;
|
|
1921
|
-
|
|
1696
|
+
scopes: string[];
|
|
1922
1697
|
countryCode?: string;
|
|
1923
1698
|
status: "offline" | "menu" | "playing" | "lobby";
|
|
1924
1699
|
battleStatus:
|
|
@@ -2085,7 +1860,7 @@ export type TachyonCustomBattle = {
|
|
|
2085
1860
|
avatarUrl: string | null;
|
|
2086
1861
|
clanId: string | null;
|
|
2087
1862
|
partyId: string | null;
|
|
2088
|
-
|
|
1863
|
+
scopes: string[];
|
|
2089
1864
|
countryCode?: string;
|
|
2090
1865
|
status: "offline" | "menu" | "playing" | "lobby";
|
|
2091
1866
|
battleStatus:
|
|
@@ -2144,7 +1919,7 @@ export interface TachyonPrivateUser {
|
|
|
2144
1919
|
avatarUrl: string | null;
|
|
2145
1920
|
clanId: string | null;
|
|
2146
1921
|
partyId: string | null;
|
|
2147
|
-
|
|
1922
|
+
scopes: string[];
|
|
2148
1923
|
countryCode?: string;
|
|
2149
1924
|
status: "offline" | "menu" | "playing" | "lobby";
|
|
2150
1925
|
battleStatus:
|
|
@@ -2195,7 +1970,7 @@ export interface TachyonUser {
|
|
|
2195
1970
|
avatarUrl: string | null;
|
|
2196
1971
|
clanId: string | null;
|
|
2197
1972
|
partyId: string | null;
|
|
2198
|
-
|
|
1973
|
+
scopes: string[];
|
|
2199
1974
|
countryCode?: string;
|
|
2200
1975
|
status: "offline" | "menu" | "playing" | "lobby";
|
|
2201
1976
|
battleStatus:
|