@diffenderfer-games/hub-contract 2.0.0-next.0 → 2.0.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/LICENSE +21 -21
- package/README.md +26 -26
- package/dist/index.d.ts +2683 -39
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +862 -18
- package/dist/index.js.map +1 -1
- package/package.json +53 -53
- package/src/api/analytics.ts +81 -81
- package/src/api/auth.ts +77 -77
- package/src/api/catalog-activity.ts +66 -0
- package/src/api/catalog.ts +177 -171
- package/src/api/daily.ts +122 -122
- package/src/api/economy/bundle.ts +69 -69
- package/src/api/index.ts +92 -85
- package/src/api/leaderboards.ts +151 -151
- package/src/api/messages.ts +142 -142
- package/src/api/mp/chat.ts +36 -36
- package/src/api/mp/invite-links.ts +42 -0
- package/src/api/mp/parties.ts +5 -0
- package/src/api/mp/races.ts +211 -211
- package/src/api/mp/rooms.ts +122 -90
- package/src/api/mp/snapshot.ts +17 -17
- package/src/api/mp.ts +135 -110
- package/src/api/notify.ts +114 -111
- package/src/api/offline.ts +45 -0
- package/src/api/progress/game-data.ts +189 -189
- package/src/api/progress.ts +59 -59
- package/src/api/race.ts +47 -47
- package/src/api/reports.ts +208 -208
- package/src/api/social/config.ts +47 -47
- package/src/api/social/endpoints.ts +179 -179
- package/src/api/social/people.ts +118 -118
- package/src/api/social/presence.ts +95 -95
- package/src/api/social.ts +9 -9
- package/src/api/tournaments/endpoints.ts +102 -0
- package/src/api/tournaments/play-online.ts +71 -0
- package/src/api/tournaments/shapes.ts +202 -0
- package/src/api/tournaments.ts +7 -0
- package/src/api/version.ts +40 -40
- package/src/coerce.ts +50 -50
- package/src/common.ts +42 -42
- package/src/entities.ts +62 -62
- package/src/errors/codes/core.ts +10 -10
- package/src/errors/codes/multiplayer.ts +56 -43
- package/src/errors/codes/play.ts +5 -5
- package/src/errors/codes/social.ts +31 -31
- package/src/errors/index.ts +88 -88
- package/src/index.ts +16 -16
- package/src/limits.ts +125 -100
- package/src/logic/daily.ts +54 -54
- package/src/logic/index.ts +8 -8
- package/src/logic/presence.ts +62 -62
- package/src/logic/time.ts +81 -81
- package/src/manifest/changes.ts +55 -55
- package/src/manifest/controls.ts +42 -42
- package/src/manifest/fields.ts +89 -89
- package/src/manifest/game.ts +139 -132
- package/src/manifest/index.ts +13 -12
- package/src/manifest/inject.ts +31 -31
- package/src/manifest/labels.ts +99 -0
- package/src/manifest/leaderboards.ts +29 -29
- package/src/manifest/multiplayer.ts +79 -71
- package/src/manifest/race.ts +93 -93
- package/src/middleware.ts +47 -47
- package/src/realtime/define.ts +52 -52
- package/src/realtime/envelope.ts +67 -67
- package/src/realtime/events/multiplayer.ts +9 -8
- package/src/realtime/events/parties.ts +31 -31
- package/src/realtime/events/races.ts +27 -27
- package/src/realtime/events/rooms.ts +52 -48
- package/src/realtime/events/social.ts +81 -81
- package/src/realtime/events/tournaments.ts +12 -0
- package/src/realtime/index.ts +24 -24
- package/src/realtime/ops/empty.ts +8 -8
- package/src/realtime/ops/hello.ts +40 -40
- package/src/realtime/ops/multiplayer.ts +8 -8
- package/src/realtime/ops/parties.ts +13 -13
- package/src/realtime/ops/races.ts +99 -99
- package/src/realtime/ops/rooms.ts +22 -8
- package/src/realtime/ops/social.ts +58 -58
package/dist/index.d.ts
CHANGED
|
@@ -87,7 +87,6 @@ export type PlayerLite = z.infer<typeof PlayerLite>;
|
|
|
87
87
|
//#endregion
|
|
88
88
|
//#region src/errors/index.d.ts
|
|
89
89
|
declare const errorCode: z.ZodEnum<{
|
|
90
|
-
ended: "ended";
|
|
91
90
|
bad_request: "bad_request";
|
|
92
91
|
signed_out: "signed_out";
|
|
93
92
|
suspended: "suspended";
|
|
@@ -124,6 +123,9 @@ declare const errorCode: z.ZodEnum<{
|
|
|
124
123
|
bad_info: "bad_info";
|
|
125
124
|
launch_invalid: "launch_invalid";
|
|
126
125
|
not_joinable: "not_joinable";
|
|
126
|
+
link_invalid: "link_invalid";
|
|
127
|
+
link_room_gone: "link_room_gone";
|
|
128
|
+
too_many_links: "too_many_links";
|
|
127
129
|
bad_quick: "bad_quick";
|
|
128
130
|
room_not_found: "room_not_found";
|
|
129
131
|
not_in_room: "not_in_room";
|
|
@@ -133,6 +135,7 @@ declare const errorCode: z.ZodEnum<{
|
|
|
133
135
|
in_progress: "in_progress";
|
|
134
136
|
room_full: "room_full";
|
|
135
137
|
not_ready: "not_ready";
|
|
138
|
+
ended: "ended";
|
|
136
139
|
bad_patch: "bad_patch";
|
|
137
140
|
race_room: "race_room";
|
|
138
141
|
not_race: "not_race";
|
|
@@ -142,6 +145,14 @@ declare const errorCode: z.ZodEnum<{
|
|
|
142
145
|
too_fast: "too_fast";
|
|
143
146
|
bad_stats: "bad_stats";
|
|
144
147
|
bad_param: "bad_param";
|
|
148
|
+
tournament_not_found: "tournament_not_found";
|
|
149
|
+
tournament_closed: "tournament_closed";
|
|
150
|
+
tournament_full: "tournament_full";
|
|
151
|
+
tournament_over: "tournament_over";
|
|
152
|
+
not_creator: "not_creator";
|
|
153
|
+
not_entered: "not_entered";
|
|
154
|
+
cannot_join: "cannot_join";
|
|
155
|
+
match_not_ready: "match_not_ready";
|
|
145
156
|
}>;
|
|
146
157
|
/** The type of the {@link ErrorCode} schema. */
|
|
147
158
|
export interface ErrorCodeSchema extends Readonly<typeof errorCode> {}
|
|
@@ -155,7 +166,6 @@ declare const rejectReason: z.ZodEnum<{
|
|
|
155
166
|
not_friends: "not_friends";
|
|
156
167
|
dms_closed: "dms_closed";
|
|
157
168
|
link: "link";
|
|
158
|
-
empty: "empty";
|
|
159
169
|
personal_info: "personal_info";
|
|
160
170
|
contact: "contact";
|
|
161
171
|
language: "language";
|
|
@@ -168,6 +178,7 @@ declare const rejectReason: z.ZodEnum<{
|
|
|
168
178
|
spam: "spam";
|
|
169
179
|
shouting: "shouting";
|
|
170
180
|
too_long: "too_long";
|
|
181
|
+
empty: "empty";
|
|
171
182
|
chars: "chars";
|
|
172
183
|
reserved: "reserved";
|
|
173
184
|
muted: "muted";
|
|
@@ -188,7 +199,6 @@ export type RejectReason = z.infer<RejectReasonSchema>;
|
|
|
188
199
|
declare const errorBody: z.ZodObject<{
|
|
189
200
|
error: z.ZodString;
|
|
190
201
|
code: z.ZodOptional<z.ZodEnum<{
|
|
191
|
-
ended: "ended";
|
|
192
202
|
bad_request: "bad_request";
|
|
193
203
|
signed_out: "signed_out";
|
|
194
204
|
suspended: "suspended";
|
|
@@ -225,6 +235,9 @@ declare const errorBody: z.ZodObject<{
|
|
|
225
235
|
bad_info: "bad_info";
|
|
226
236
|
launch_invalid: "launch_invalid";
|
|
227
237
|
not_joinable: "not_joinable";
|
|
238
|
+
link_invalid: "link_invalid";
|
|
239
|
+
link_room_gone: "link_room_gone";
|
|
240
|
+
too_many_links: "too_many_links";
|
|
228
241
|
bad_quick: "bad_quick";
|
|
229
242
|
room_not_found: "room_not_found";
|
|
230
243
|
not_in_room: "not_in_room";
|
|
@@ -234,6 +247,7 @@ declare const errorBody: z.ZodObject<{
|
|
|
234
247
|
in_progress: "in_progress";
|
|
235
248
|
room_full: "room_full";
|
|
236
249
|
not_ready: "not_ready";
|
|
250
|
+
ended: "ended";
|
|
237
251
|
bad_patch: "bad_patch";
|
|
238
252
|
race_room: "race_room";
|
|
239
253
|
not_race: "not_race";
|
|
@@ -243,6 +257,14 @@ declare const errorBody: z.ZodObject<{
|
|
|
243
257
|
too_fast: "too_fast";
|
|
244
258
|
bad_stats: "bad_stats";
|
|
245
259
|
bad_param: "bad_param";
|
|
260
|
+
tournament_not_found: "tournament_not_found";
|
|
261
|
+
tournament_closed: "tournament_closed";
|
|
262
|
+
tournament_full: "tournament_full";
|
|
263
|
+
tournament_over: "tournament_over";
|
|
264
|
+
not_creator: "not_creator";
|
|
265
|
+
not_entered: "not_entered";
|
|
266
|
+
cannot_join: "cannot_join";
|
|
267
|
+
match_not_ready: "match_not_ready";
|
|
246
268
|
}>>;
|
|
247
269
|
reason: z.ZodOptional<z.ZodEnum<{
|
|
248
270
|
suspended: "suspended";
|
|
@@ -250,7 +272,6 @@ declare const errorBody: z.ZodObject<{
|
|
|
250
272
|
not_friends: "not_friends";
|
|
251
273
|
dms_closed: "dms_closed";
|
|
252
274
|
link: "link";
|
|
253
|
-
empty: "empty";
|
|
254
275
|
personal_info: "personal_info";
|
|
255
276
|
contact: "contact";
|
|
256
277
|
language: "language";
|
|
@@ -263,6 +284,7 @@ declare const errorBody: z.ZodObject<{
|
|
|
263
284
|
spam: "spam";
|
|
264
285
|
shouting: "shouting";
|
|
265
286
|
too_long: "too_long";
|
|
287
|
+
empty: "empty";
|
|
266
288
|
chars: "chars";
|
|
267
289
|
reserved: "reserved";
|
|
268
290
|
muted: "muted";
|
|
@@ -673,6 +695,88 @@ export declare const authEndpoints: {
|
|
|
673
695
|
}, {}, import("@ayepi/core").EmptyObject>;
|
|
674
696
|
};
|
|
675
697
|
//#endregion
|
|
698
|
+
//#region src/api/catalog-activity.d.ts
|
|
699
|
+
/**
|
|
700
|
+
* How many people have a game open right now: claimed accounts and guests.
|
|
701
|
+
* Counts only, so no player is ever identified.
|
|
702
|
+
*/
|
|
703
|
+
export declare const GamePlayerCount: z.ZodObject<{
|
|
704
|
+
accounts: z.ZodNumber;
|
|
705
|
+
guests: z.ZodNumber;
|
|
706
|
+
}, z.core.$strip>;
|
|
707
|
+
/** How many people have a game open right now. */
|
|
708
|
+
export type GamePlayerCount = z.infer<typeof GamePlayerCount>;
|
|
709
|
+
/** Head counts per game slug; games nobody has open are absent. */
|
|
710
|
+
export declare const GamePlayerCounts: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
711
|
+
accounts: z.ZodNumber;
|
|
712
|
+
guests: z.ZodNumber;
|
|
713
|
+
}, z.core.$strip>>;
|
|
714
|
+
/** Head counts per game slug. */
|
|
715
|
+
export type GamePlayerCounts = z.infer<typeof GamePlayerCounts>;
|
|
716
|
+
/** The caller's activity in one game, within the analytics retention window. */
|
|
717
|
+
export declare const MyGameActivity: z.ZodObject<{
|
|
718
|
+
plays: z.ZodNumber;
|
|
719
|
+
minutesPlayed: z.ZodNumber;
|
|
720
|
+
firstPlayedAt: z.ZodNullable<z.ZodNumber>;
|
|
721
|
+
lastPlayedAt: z.ZodNullable<z.ZodNumber>;
|
|
722
|
+
windowDays: z.ZodNumber;
|
|
723
|
+
}, z.core.$strip>;
|
|
724
|
+
/** The caller's activity in one game. */
|
|
725
|
+
export type MyGameActivity = z.infer<typeof MyGameActivity>;
|
|
726
|
+
/** The activity endpoints (part of the catalog area). */
|
|
727
|
+
export declare const catalogActivityEndpoints: {
|
|
728
|
+
getMyGameActivity: import("@ayepi/core").Endpoint<{
|
|
729
|
+
readonly method: "GET";
|
|
730
|
+
readonly path: "/me/activity";
|
|
731
|
+
readonly response: z.ZodObject<{
|
|
732
|
+
plays: z.ZodNumber;
|
|
733
|
+
minutesPlayed: z.ZodNumber;
|
|
734
|
+
firstPlayedAt: z.ZodNullable<z.ZodNumber>;
|
|
735
|
+
lastPlayedAt: z.ZodNullable<z.ZodNumber>;
|
|
736
|
+
windowDays: z.ZodNumber;
|
|
737
|
+
}, z.core.$strip>;
|
|
738
|
+
readonly errors: {
|
|
739
|
+
readonly 401: ErrorBodySchema;
|
|
740
|
+
readonly 404: ErrorBodySchema;
|
|
741
|
+
};
|
|
742
|
+
readonly doc: {
|
|
743
|
+
readonly summary: "The caller's plays and time played in this game";
|
|
744
|
+
readonly tags: readonly ["catalog"];
|
|
745
|
+
};
|
|
746
|
+
}, {
|
|
747
|
+
user: {
|
|
748
|
+
id: number;
|
|
749
|
+
username: string;
|
|
750
|
+
guest: boolean;
|
|
751
|
+
role: "" | "admin";
|
|
752
|
+
avatar: string;
|
|
753
|
+
chatLock: boolean;
|
|
754
|
+
mutedUntil: number;
|
|
755
|
+
suspendedUntil: number;
|
|
756
|
+
};
|
|
757
|
+
clientId: string;
|
|
758
|
+
}, {
|
|
759
|
+
slug: z.ZodString;
|
|
760
|
+
}, {}>;
|
|
761
|
+
getGamePlayerCounts: import("@ayepi/core").Endpoint<{
|
|
762
|
+
readonly method: "GET";
|
|
763
|
+
readonly path: "/catalog/players";
|
|
764
|
+
readonly response: z.ZodObject<{
|
|
765
|
+
games: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
766
|
+
accounts: z.ZodNumber;
|
|
767
|
+
guests: z.ZodNumber;
|
|
768
|
+
}, z.core.$strip>>;
|
|
769
|
+
}, z.core.$strip>;
|
|
770
|
+
readonly doc: {
|
|
771
|
+
readonly summary: "How many accounts and guests have each game open right now (counts only)";
|
|
772
|
+
readonly tags: readonly ["catalog"];
|
|
773
|
+
};
|
|
774
|
+
}, {
|
|
775
|
+
user: SessionUser | null;
|
|
776
|
+
clientId: string;
|
|
777
|
+
}, {}, import("@ayepi/core").EmptyObject>;
|
|
778
|
+
};
|
|
779
|
+
//#endregion
|
|
676
780
|
//#region src/api/catalog.d.ts
|
|
677
781
|
/** A `[min, max]` player count, each 1 to 8. */
|
|
678
782
|
export declare const PlayerRange: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
@@ -772,6 +876,7 @@ export declare const GameInfo: z.ZodObject<{
|
|
|
772
876
|
}>;
|
|
773
877
|
}, z.core.$strip>>;
|
|
774
878
|
}, z.core.$strip>>;
|
|
879
|
+
tournaments: z.ZodOptional<z.ZodLiteral<true>>;
|
|
775
880
|
}, z.core.$strip>;
|
|
776
881
|
/** A listed game. */
|
|
777
882
|
export type GameInfo = z.infer<typeof GameInfo>;
|
|
@@ -904,6 +1009,7 @@ export declare const catalogEndpoints: {
|
|
|
904
1009
|
}>;
|
|
905
1010
|
}, z.core.$strip>>;
|
|
906
1011
|
}, z.core.$strip>>;
|
|
1012
|
+
tournaments: z.ZodOptional<z.ZodLiteral<true>>;
|
|
907
1013
|
}, z.core.$strip>>;
|
|
908
1014
|
}, z.core.$strip>;
|
|
909
1015
|
readonly doc: {
|
|
@@ -941,6 +1047,56 @@ export declare const catalogEndpoints: {
|
|
|
941
1047
|
user: SessionUser | null;
|
|
942
1048
|
clientId: string;
|
|
943
1049
|
}, {}, import("@ayepi/core").EmptyObject>;
|
|
1050
|
+
getMyGameActivity: import("@ayepi/core").Endpoint<{
|
|
1051
|
+
readonly method: "GET";
|
|
1052
|
+
readonly path: "/me/activity";
|
|
1053
|
+
readonly response: z.ZodObject<{
|
|
1054
|
+
plays: z.ZodNumber;
|
|
1055
|
+
minutesPlayed: z.ZodNumber;
|
|
1056
|
+
firstPlayedAt: z.ZodNullable<z.ZodNumber>;
|
|
1057
|
+
lastPlayedAt: z.ZodNullable<z.ZodNumber>;
|
|
1058
|
+
windowDays: z.ZodNumber;
|
|
1059
|
+
}, z.core.$strip>;
|
|
1060
|
+
readonly errors: {
|
|
1061
|
+
readonly 401: ErrorBodySchema;
|
|
1062
|
+
readonly 404: ErrorBodySchema;
|
|
1063
|
+
};
|
|
1064
|
+
readonly doc: {
|
|
1065
|
+
readonly summary: "The caller's plays and time played in this game";
|
|
1066
|
+
readonly tags: readonly ["catalog"];
|
|
1067
|
+
};
|
|
1068
|
+
}, {
|
|
1069
|
+
user: {
|
|
1070
|
+
id: number;
|
|
1071
|
+
username: string;
|
|
1072
|
+
guest: boolean;
|
|
1073
|
+
role: "" | "admin";
|
|
1074
|
+
avatar: string;
|
|
1075
|
+
chatLock: boolean;
|
|
1076
|
+
mutedUntil: number;
|
|
1077
|
+
suspendedUntil: number;
|
|
1078
|
+
};
|
|
1079
|
+
clientId: string;
|
|
1080
|
+
}, {
|
|
1081
|
+
slug: z.ZodString;
|
|
1082
|
+
}, {}>;
|
|
1083
|
+
getGamePlayerCounts: import("@ayepi/core").Endpoint<{
|
|
1084
|
+
readonly method: "GET";
|
|
1085
|
+
readonly path: "/catalog/players";
|
|
1086
|
+
readonly response: z.ZodObject<{
|
|
1087
|
+
games: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1088
|
+
accounts: z.ZodNumber;
|
|
1089
|
+
guests: z.ZodNumber;
|
|
1090
|
+
}, z.core.$strip>>;
|
|
1091
|
+
}, z.core.$strip>;
|
|
1092
|
+
readonly doc: {
|
|
1093
|
+
readonly summary: "How many accounts and guests have each game open right now (counts only)";
|
|
1094
|
+
readonly tags: readonly ["catalog"];
|
|
1095
|
+
};
|
|
1096
|
+
}, {
|
|
1097
|
+
user: SessionUser | null;
|
|
1098
|
+
clientId: string;
|
|
1099
|
+
}, {}, import("@ayepi/core").EmptyObject>;
|
|
944
1100
|
};
|
|
945
1101
|
//#endregion
|
|
946
1102
|
//#region src/api/daily.d.ts
|
|
@@ -2373,6 +2529,34 @@ export declare const ChatLineEvent: z.ZodObject<{
|
|
|
2373
2529
|
/** The error codes a chat send can fail with (besides its surface's own). */
|
|
2374
2530
|
export declare const CHAT_ERRORS: readonly ["rate_limited", "content_rejected", "bad_quick"];
|
|
2375
2531
|
//#endregion
|
|
2532
|
+
//#region src/api/mp/invite-links.d.ts
|
|
2533
|
+
/** An invite link's token (base64url). */
|
|
2534
|
+
export declare const InviteLinkToken: z.ZodString;
|
|
2535
|
+
/** A live invite link. */
|
|
2536
|
+
export declare const InviteLink: z.ZodObject<{
|
|
2537
|
+
token: z.ZodString;
|
|
2538
|
+
url: z.ZodString;
|
|
2539
|
+
game: z.ZodString;
|
|
2540
|
+
mode: z.ZodOptional<z.ZodString>;
|
|
2541
|
+
room: z.ZodString;
|
|
2542
|
+
createdBy: z.ZodNumber;
|
|
2543
|
+
expiresAt: z.ZodNumber;
|
|
2544
|
+
}, z.core.$strip>;
|
|
2545
|
+
/** An invite link. */
|
|
2546
|
+
export type InviteLink = z.infer<typeof InviteLink>;
|
|
2547
|
+
/** `:token` of an invite link. */
|
|
2548
|
+
export declare const InviteLinkParams: z.ZodObject<{
|
|
2549
|
+
token: z.ZodString;
|
|
2550
|
+
}, z.core.$strip>;
|
|
2551
|
+
/** `POST /mp/links` body: a link to the room I'm in, in this game. */
|
|
2552
|
+
export declare const InviteLinkCreate: z.ZodObject<{
|
|
2553
|
+
game: z.ZodString;
|
|
2554
|
+
}, z.core.$strip>;
|
|
2555
|
+
/** `GET /mp/links` query: my links in a game (and the links to rooms I host). */
|
|
2556
|
+
export declare const InviteLinkQuery: z.ZodObject<{
|
|
2557
|
+
game: z.ZodString;
|
|
2558
|
+
}, z.core.$strip>;
|
|
2559
|
+
//#endregion
|
|
2376
2560
|
//#region src/api/mp/parties.d.ts
|
|
2377
2561
|
/** A game mode key, as the game's `multiplayer.modes[].key` declares it: `[A-Za-z0-9_-]{1,32}`. */
|
|
2378
2562
|
export declare const GameMode: z.ZodString;
|
|
@@ -2491,6 +2675,21 @@ export declare const Launch: z.ZodObject<{
|
|
|
2491
2675
|
avatar: z.ZodString;
|
|
2492
2676
|
guest: z.ZodBoolean;
|
|
2493
2677
|
}, z.core.$strip>>>;
|
|
2678
|
+
via: z.ZodOptional<z.ZodEnum<{
|
|
2679
|
+
link: "link";
|
|
2680
|
+
rejoin: "rejoin";
|
|
2681
|
+
}>>;
|
|
2682
|
+
tournament: z.ZodOptional<z.ZodObject<{
|
|
2683
|
+
id: z.ZodNumber;
|
|
2684
|
+
title: z.ZodString;
|
|
2685
|
+
match: z.ZodString;
|
|
2686
|
+
opponent: z.ZodNullable<z.ZodObject<{
|
|
2687
|
+
id: z.ZodNumber;
|
|
2688
|
+
username: z.ZodString;
|
|
2689
|
+
avatar: z.ZodString;
|
|
2690
|
+
guest: z.ZodBoolean;
|
|
2691
|
+
}, z.core.$strip>>;
|
|
2692
|
+
}, z.core.$strip>>;
|
|
2494
2693
|
}, z.core.$strip>;
|
|
2495
2694
|
/** A launch. */
|
|
2496
2695
|
export type Launch = z.infer<typeof Launch>;
|
|
@@ -2799,9 +2998,9 @@ export type RaceRecord = z.infer<typeof RaceRecord>;
|
|
|
2799
2998
|
export declare const RoomCode: z.ZodString;
|
|
2800
2999
|
/** A room's lifecycle: new players join only in the lobby. */
|
|
2801
3000
|
export declare const RoomPhase: z.ZodEnum<{
|
|
3001
|
+
ended: "ended";
|
|
2802
3002
|
lobby: "lobby";
|
|
2803
3003
|
playing: "playing";
|
|
2804
|
-
ended: "ended";
|
|
2805
3004
|
}>;
|
|
2806
3005
|
/**
|
|
2807
3006
|
* Who hears a send. `host` (default): guests' unaddressed sends reach the
|
|
@@ -2812,6 +3011,17 @@ export declare const RoomModel: z.ZodEnum<{
|
|
|
2812
3011
|
host: "host";
|
|
2813
3012
|
relay: "relay";
|
|
2814
3013
|
}>;
|
|
3014
|
+
/**
|
|
3015
|
+
* When the host role moves on mid-game. `grace` (default): only once the
|
|
3016
|
+
* host's seat is freed (they left, or their reconnect grace ran out), so a
|
|
3017
|
+
* host whose browser holds hidden state can come back and carry on. `drop`:
|
|
3018
|
+
* as soon as the host drops, for games whose whole truth is in the shared
|
|
3019
|
+
* state, so the match never waits.
|
|
3020
|
+
*/
|
|
3021
|
+
export declare const HostMigration: z.ZodEnum<{
|
|
3022
|
+
grace: "grace";
|
|
3023
|
+
drop: "drop";
|
|
3024
|
+
}>;
|
|
2815
3025
|
/** A seat in a room, keyed by user (any tab of that user reclaims it). */
|
|
2816
3026
|
export declare const RoomSeat: z.ZodObject<{
|
|
2817
3027
|
userId: z.ZodNumber;
|
|
@@ -2819,6 +3029,7 @@ export declare const RoomSeat: z.ZodObject<{
|
|
|
2819
3029
|
avatar: z.ZodString;
|
|
2820
3030
|
ready: z.ZodBoolean;
|
|
2821
3031
|
connected: z.ZodBoolean;
|
|
3032
|
+
graceEndsAt: z.ZodOptional<z.ZodNumber>;
|
|
2822
3033
|
data: z.ZodOptional<z.ZodJSONSchema>;
|
|
2823
3034
|
}, z.core.$strip>;
|
|
2824
3035
|
/** The public description of a room (`room` event, room and race acks, the `hello` snapshot). */
|
|
@@ -2830,9 +3041,9 @@ export declare const RoomInfo: z.ZodObject<{
|
|
|
2830
3041
|
hostId: z.ZodNumber;
|
|
2831
3042
|
public: z.ZodBoolean;
|
|
2832
3043
|
phase: z.ZodEnum<{
|
|
3044
|
+
ended: "ended";
|
|
2833
3045
|
lobby: "lobby";
|
|
2834
3046
|
playing: "playing";
|
|
2835
|
-
ended: "ended";
|
|
2836
3047
|
}>;
|
|
2837
3048
|
maxPlayers: z.ZodNumber;
|
|
2838
3049
|
model: z.ZodEnum<{
|
|
@@ -2845,6 +3056,7 @@ export declare const RoomInfo: z.ZodObject<{
|
|
|
2845
3056
|
avatar: z.ZodString;
|
|
2846
3057
|
ready: z.ZodBoolean;
|
|
2847
3058
|
connected: z.ZodBoolean;
|
|
3059
|
+
graceEndsAt: z.ZodOptional<z.ZodNumber>;
|
|
2848
3060
|
data: z.ZodOptional<z.ZodJSONSchema>;
|
|
2849
3061
|
}, z.core.$strip>>;
|
|
2850
3062
|
spectators: z.ZodNumber;
|
|
@@ -2939,18 +3151,46 @@ export declare const RoomTarget: z.ZodObject<{
|
|
|
2939
3151
|
/** Why a room went away for this tab (`room.closed`). */
|
|
2940
3152
|
export declare const RoomClosedReason: z.ZodEnum<{
|
|
2941
3153
|
ended: "ended";
|
|
2942
|
-
removed: "removed";
|
|
2943
3154
|
empty: "empty";
|
|
3155
|
+
removed: "removed";
|
|
2944
3156
|
host_left: "host_left";
|
|
2945
3157
|
moved: "moved";
|
|
2946
3158
|
other_tab: "other_tab";
|
|
2947
3159
|
}>;
|
|
2948
|
-
/** Why a seat was freed (`room.abandoned`). */
|
|
3160
|
+
/** Why a seat was freed (`room.abandoned`, `room.seat` `gone`). */
|
|
2949
3161
|
export declare const SeatGoneReason: z.ZodEnum<{
|
|
2950
3162
|
left: "left";
|
|
2951
3163
|
abandoned: "abandoned";
|
|
2952
3164
|
kicked: "kicked";
|
|
2953
3165
|
}>;
|
|
3166
|
+
/**
|
|
3167
|
+
* What happened to a seat (`room.seat`): `away` (the player dropped; the seat
|
|
3168
|
+
* is held until `graceEndsAt`, so the game can hand it to its computer
|
|
3169
|
+
* player), `back` (they reclaimed it: give control back), `gone` (freed for
|
|
3170
|
+
* good: left, kicked, or the grace ran out).
|
|
3171
|
+
*/
|
|
3172
|
+
export declare const SeatStatus: z.ZodEnum<{
|
|
3173
|
+
away: "away";
|
|
3174
|
+
back: "back";
|
|
3175
|
+
gone: "gone";
|
|
3176
|
+
}>;
|
|
3177
|
+
/** A seat change (`room.seat`). */
|
|
3178
|
+
export declare const SeatChange: z.ZodObject<{
|
|
3179
|
+
userId: z.ZodNumber;
|
|
3180
|
+
status: z.ZodEnum<{
|
|
3181
|
+
away: "away";
|
|
3182
|
+
back: "back";
|
|
3183
|
+
gone: "gone";
|
|
3184
|
+
}>;
|
|
3185
|
+
graceEndsAt: z.ZodOptional<z.ZodNumber>;
|
|
3186
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
3187
|
+
left: "left";
|
|
3188
|
+
abandoned: "abandoned";
|
|
3189
|
+
kicked: "kicked";
|
|
3190
|
+
}>>;
|
|
3191
|
+
}, z.core.$strip>;
|
|
3192
|
+
/** A seat change. */
|
|
3193
|
+
export type SeatChange = z.infer<typeof SeatChange>;
|
|
2954
3194
|
//#endregion
|
|
2955
3195
|
//#region src/api/mp/snapshot.d.ts
|
|
2956
3196
|
/**
|
|
@@ -3000,9 +3240,9 @@ export declare const MultiplayerSnapshot: z.ZodObject<{
|
|
|
3000
3240
|
hostId: z.ZodNumber;
|
|
3001
3241
|
public: z.ZodBoolean;
|
|
3002
3242
|
phase: z.ZodEnum<{
|
|
3243
|
+
ended: "ended";
|
|
3003
3244
|
lobby: "lobby";
|
|
3004
3245
|
playing: "playing";
|
|
3005
|
-
ended: "ended";
|
|
3006
3246
|
}>;
|
|
3007
3247
|
maxPlayers: z.ZodNumber;
|
|
3008
3248
|
model: z.ZodEnum<{
|
|
@@ -3015,6 +3255,7 @@ export declare const MultiplayerSnapshot: z.ZodObject<{
|
|
|
3015
3255
|
avatar: z.ZodString;
|
|
3016
3256
|
ready: z.ZodBoolean;
|
|
3017
3257
|
connected: z.ZodBoolean;
|
|
3258
|
+
graceEndsAt: z.ZodOptional<z.ZodNumber>;
|
|
3018
3259
|
data: z.ZodOptional<z.ZodJSONSchema>;
|
|
3019
3260
|
}, z.core.$strip>>;
|
|
3020
3261
|
spectators: z.ZodNumber;
|
|
@@ -3169,6 +3410,21 @@ export declare const mpEndpoints: {
|
|
|
3169
3410
|
avatar: z.ZodString;
|
|
3170
3411
|
guest: z.ZodBoolean;
|
|
3171
3412
|
}, z.core.$strip>>>;
|
|
3413
|
+
via: z.ZodOptional<z.ZodEnum<{
|
|
3414
|
+
link: "link";
|
|
3415
|
+
rejoin: "rejoin";
|
|
3416
|
+
}>>;
|
|
3417
|
+
tournament: z.ZodOptional<z.ZodObject<{
|
|
3418
|
+
id: z.ZodNumber;
|
|
3419
|
+
title: z.ZodString;
|
|
3420
|
+
match: z.ZodString;
|
|
3421
|
+
opponent: z.ZodNullable<z.ZodObject<{
|
|
3422
|
+
id: z.ZodNumber;
|
|
3423
|
+
username: z.ZodString;
|
|
3424
|
+
avatar: z.ZodString;
|
|
3425
|
+
guest: z.ZodBoolean;
|
|
3426
|
+
}, z.core.$strip>>;
|
|
3427
|
+
}, z.core.$strip>>;
|
|
3172
3428
|
}, z.core.$strip>;
|
|
3173
3429
|
}, z.core.$strip>;
|
|
3174
3430
|
readonly errors: {
|
|
@@ -3184,6 +3440,31 @@ export declare const mpEndpoints: {
|
|
|
3184
3440
|
user: SessionUser;
|
|
3185
3441
|
clientId: string;
|
|
3186
3442
|
}, {}, import("@ayepi/core").EmptyObject>;
|
|
3443
|
+
openInviteLink: import("@ayepi/core").Endpoint<{
|
|
3444
|
+
readonly method: "POST";
|
|
3445
|
+
readonly path: "/mp/links/:token/open";
|
|
3446
|
+
readonly params: z.ZodObject<{
|
|
3447
|
+
token: z.ZodString;
|
|
3448
|
+
}, z.core.$strip>;
|
|
3449
|
+
readonly response: z.ZodObject<{
|
|
3450
|
+
launchToken: z.ZodString;
|
|
3451
|
+
url: z.ZodString;
|
|
3452
|
+
}, z.core.$strip>;
|
|
3453
|
+
readonly errors: {
|
|
3454
|
+
readonly 401: ErrorBodySchema;
|
|
3455
|
+
readonly 403: ErrorBodySchema;
|
|
3456
|
+
readonly 404: ErrorBodySchema;
|
|
3457
|
+
readonly 409: ErrorBodySchema;
|
|
3458
|
+
readonly 429: ErrorBodySchema;
|
|
3459
|
+
};
|
|
3460
|
+
readonly doc: {
|
|
3461
|
+
readonly summary: "Open an invite link: a join launch when a seat is free, else a watch launch";
|
|
3462
|
+
readonly tags: readonly ["mp"];
|
|
3463
|
+
};
|
|
3464
|
+
}, {
|
|
3465
|
+
user: SessionUser;
|
|
3466
|
+
clientId: string;
|
|
3467
|
+
}, {}, import("@ayepi/core").EmptyObject>;
|
|
3187
3468
|
setPartyJoinInfo: import("@ayepi/core").Endpoint<{
|
|
3188
3469
|
readonly method: "POST";
|
|
3189
3470
|
readonly path: "/mp/parties/:id/join-info";
|
|
@@ -3378,6 +3659,88 @@ export declare const mpEndpoints: {
|
|
|
3378
3659
|
user: SessionUser;
|
|
3379
3660
|
clientId: string;
|
|
3380
3661
|
}, {}, import("@ayepi/core").EmptyObject>;
|
|
3662
|
+
createInviteLink: import("@ayepi/core").Endpoint<{
|
|
3663
|
+
readonly method: "POST";
|
|
3664
|
+
readonly path: "/mp/links";
|
|
3665
|
+
readonly body: z.ZodObject<{
|
|
3666
|
+
game: z.ZodString;
|
|
3667
|
+
}, z.core.$strip>;
|
|
3668
|
+
readonly response: z.ZodObject<{
|
|
3669
|
+
token: z.ZodString;
|
|
3670
|
+
url: z.ZodString;
|
|
3671
|
+
game: z.ZodString;
|
|
3672
|
+
mode: z.ZodOptional<z.ZodString>;
|
|
3673
|
+
room: z.ZodString;
|
|
3674
|
+
createdBy: z.ZodNumber;
|
|
3675
|
+
expiresAt: z.ZodNumber;
|
|
3676
|
+
}, z.core.$strip>;
|
|
3677
|
+
readonly errors: {
|
|
3678
|
+
readonly 400: ErrorBodySchema;
|
|
3679
|
+
readonly 401: ErrorBodySchema;
|
|
3680
|
+
readonly 403: ErrorBodySchema;
|
|
3681
|
+
readonly 404: ErrorBodySchema;
|
|
3682
|
+
readonly 409: ErrorBodySchema;
|
|
3683
|
+
readonly 429: ErrorBodySchema;
|
|
3684
|
+
};
|
|
3685
|
+
readonly doc: {
|
|
3686
|
+
readonly summary: "An invite link to the room I'm in (reused while it lives): anyone who opens it joins, or watches when it's full";
|
|
3687
|
+
readonly tags: readonly ["mp"];
|
|
3688
|
+
};
|
|
3689
|
+
}, {
|
|
3690
|
+
user: SessionUser;
|
|
3691
|
+
clientId: string;
|
|
3692
|
+
}, {}, import("@ayepi/core").EmptyObject>;
|
|
3693
|
+
listInviteLinks: import("@ayepi/core").Endpoint<{
|
|
3694
|
+
readonly method: "GET";
|
|
3695
|
+
readonly path: "/mp/links";
|
|
3696
|
+
readonly query: z.ZodObject<{
|
|
3697
|
+
game: z.ZodString;
|
|
3698
|
+
}, z.core.$strip>;
|
|
3699
|
+
readonly response: z.ZodObject<{
|
|
3700
|
+
links: z.ZodArray<z.ZodObject<{
|
|
3701
|
+
token: z.ZodString;
|
|
3702
|
+
url: z.ZodString;
|
|
3703
|
+
game: z.ZodString;
|
|
3704
|
+
mode: z.ZodOptional<z.ZodString>;
|
|
3705
|
+
room: z.ZodString;
|
|
3706
|
+
createdBy: z.ZodNumber;
|
|
3707
|
+
expiresAt: z.ZodNumber;
|
|
3708
|
+
}, z.core.$strip>>;
|
|
3709
|
+
}, z.core.$strip>;
|
|
3710
|
+
readonly errors: {
|
|
3711
|
+
readonly 401: ErrorBodySchema;
|
|
3712
|
+
readonly 403: ErrorBodySchema;
|
|
3713
|
+
};
|
|
3714
|
+
readonly doc: {
|
|
3715
|
+
readonly summary: "My live invite links in a game, plus the links to rooms I host";
|
|
3716
|
+
readonly tags: readonly ["mp"];
|
|
3717
|
+
};
|
|
3718
|
+
}, {
|
|
3719
|
+
user: SessionUser;
|
|
3720
|
+
clientId: string;
|
|
3721
|
+
}, {}, import("@ayepi/core").EmptyObject>;
|
|
3722
|
+
revokeInviteLink: import("@ayepi/core").Endpoint<{
|
|
3723
|
+
readonly method: "DELETE";
|
|
3724
|
+
readonly path: "/mp/links/:token";
|
|
3725
|
+
readonly params: z.ZodObject<{
|
|
3726
|
+
token: z.ZodString;
|
|
3727
|
+
}, z.core.$strip>;
|
|
3728
|
+
readonly response: z.ZodObject<{
|
|
3729
|
+
ok: z.ZodLiteral<true>;
|
|
3730
|
+
}, z.core.$strip>;
|
|
3731
|
+
readonly errors: {
|
|
3732
|
+
readonly 401: ErrorBodySchema;
|
|
3733
|
+
readonly 403: ErrorBodySchema;
|
|
3734
|
+
readonly 404: ErrorBodySchema;
|
|
3735
|
+
};
|
|
3736
|
+
readonly doc: {
|
|
3737
|
+
readonly summary: "Revoke an invite link (its creator, or the host of the room it opens)";
|
|
3738
|
+
readonly tags: readonly ["mp"];
|
|
3739
|
+
};
|
|
3740
|
+
}, {
|
|
3741
|
+
user: SessionUser;
|
|
3742
|
+
clientId: string;
|
|
3743
|
+
}, {}, import("@ayepi/core").EmptyObject>;
|
|
3381
3744
|
cancelGameInvite: import("@ayepi/core").Endpoint<{
|
|
3382
3745
|
readonly method: "DELETE";
|
|
3383
3746
|
readonly path: "/mp/invites/:id";
|
|
@@ -4870,9 +5233,9 @@ export declare const FriendChange: z.ZodEnum<{
|
|
|
4870
5233
|
export type FriendChange = z.infer<typeof FriendChange>;
|
|
4871
5234
|
/** My relation to another player, as their card shows it. */
|
|
4872
5235
|
export declare const Relation: z.ZodEnum<{
|
|
5236
|
+
blocked: "blocked";
|
|
4873
5237
|
incoming: "incoming";
|
|
4874
5238
|
outgoing: "outgoing";
|
|
4875
|
-
blocked: "blocked";
|
|
4876
5239
|
self: "self";
|
|
4877
5240
|
friend: "friend";
|
|
4878
5241
|
none: "none";
|
|
@@ -4889,9 +5252,9 @@ export declare const PlayerCard: z.ZodObject<{
|
|
|
4889
5252
|
avatar: z.ZodString;
|
|
4890
5253
|
guest: z.ZodBoolean;
|
|
4891
5254
|
relation: z.ZodEnum<{
|
|
5255
|
+
blocked: "blocked";
|
|
4892
5256
|
incoming: "incoming";
|
|
4893
5257
|
outgoing: "outgoing";
|
|
4894
|
-
blocked: "blocked";
|
|
4895
5258
|
self: "self";
|
|
4896
5259
|
friend: "friend";
|
|
4897
5260
|
none: "none";
|
|
@@ -5350,9 +5713,9 @@ export declare const socialEndpoints: {
|
|
|
5350
5713
|
avatar: z.ZodString;
|
|
5351
5714
|
guest: z.ZodBoolean;
|
|
5352
5715
|
relation: z.ZodEnum<{
|
|
5716
|
+
blocked: "blocked";
|
|
5353
5717
|
incoming: "incoming";
|
|
5354
5718
|
outgoing: "outgoing";
|
|
5355
|
-
blocked: "blocked";
|
|
5356
5719
|
self: "self";
|
|
5357
5720
|
friend: "friend";
|
|
5358
5721
|
none: "none";
|
|
@@ -5407,9 +5770,9 @@ export declare const socialEndpoints: {
|
|
|
5407
5770
|
avatar: z.ZodString;
|
|
5408
5771
|
guest: z.ZodBoolean;
|
|
5409
5772
|
relation: z.ZodEnum<{
|
|
5773
|
+
blocked: "blocked";
|
|
5410
5774
|
incoming: "incoming";
|
|
5411
5775
|
outgoing: "outgoing";
|
|
5412
|
-
blocked: "blocked";
|
|
5413
5776
|
self: "self";
|
|
5414
5777
|
friend: "friend";
|
|
5415
5778
|
none: "none";
|
|
@@ -5550,22 +5913,1960 @@ export declare const socialEndpoints: {
|
|
|
5550
5913
|
}, {}, import("@ayepi/core").EmptyObject>;
|
|
5551
5914
|
};
|
|
5552
5915
|
//#endregion
|
|
5553
|
-
//#region src/api/
|
|
5554
|
-
/**
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
-
|
|
5562
|
-
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
}
|
|
5566
|
-
/**
|
|
5567
|
-
export
|
|
5568
|
-
|
|
5916
|
+
//#region src/api/tournaments/shapes.d.ts
|
|
5917
|
+
/** A tournament's id. */
|
|
5918
|
+
export declare const TournamentId: z.ZodNumber;
|
|
5919
|
+
/** `open`: listed, anyone can sign up or follow. `closed`: only invited players see it. */
|
|
5920
|
+
export declare const TournamentVisibility: z.ZodEnum<{
|
|
5921
|
+
open: "open";
|
|
5922
|
+
closed: "closed";
|
|
5923
|
+
}>;
|
|
5924
|
+
/** How the bracket is seeded: by each player's wins in the tournament's games, or at random. */
|
|
5925
|
+
export declare const TournamentSeeding: z.ZodEnum<{
|
|
5926
|
+
rank: "rank";
|
|
5927
|
+
random: "random";
|
|
5928
|
+
}>;
|
|
5929
|
+
/** Which game each match is: the one game, one random pick from the set for the whole tournament, or a random pick per match. */
|
|
5930
|
+
export declare const TournamentGamePick: z.ZodEnum<{
|
|
5931
|
+
fixed: "fixed";
|
|
5932
|
+
"random-once": "random-once";
|
|
5933
|
+
"random-each": "random-each";
|
|
5934
|
+
}>;
|
|
5935
|
+
/** When a tournament starts: at a set time (with whoever signed up), or as soon as `minPlayers` sign up. */
|
|
5936
|
+
export declare const TournamentStart: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5937
|
+
kind: z.ZodLiteral<"scheduled">;
|
|
5938
|
+
at: z.ZodNumber;
|
|
5939
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5940
|
+
kind: z.ZodLiteral<"filled">;
|
|
5941
|
+
}, z.core.$strip>], "kind">;
|
|
5942
|
+
/** When a tournament starts. */
|
|
5943
|
+
export type TournamentStart = z.infer<typeof TournamentStart>;
|
|
5944
|
+
/** `signup` → `running` → `done`; or `cancelled` (by its creator, or too few players at the start). */
|
|
5945
|
+
export declare const TournamentPhase: z.ZodEnum<{
|
|
5946
|
+
done: "done";
|
|
5947
|
+
cancelled: "cancelled";
|
|
5948
|
+
signup: "signup";
|
|
5949
|
+
running: "running";
|
|
5950
|
+
}>;
|
|
5951
|
+
/** A tournament's phase. */
|
|
5952
|
+
export type TournamentPhase = z.infer<typeof TournamentPhase>;
|
|
5953
|
+
/** Where a match sits: the winners bracket, a redemption bracket (players with losses), or the final ladder. */
|
|
5954
|
+
export declare const TournamentStage: z.ZodEnum<{
|
|
5955
|
+
winners: "winners";
|
|
5956
|
+
redemption: "redemption";
|
|
5957
|
+
final: "final";
|
|
5958
|
+
}>;
|
|
5959
|
+
/** How a match was decided. */
|
|
5960
|
+
export declare const TournamentDecision: z.ZodEnum<{
|
|
5961
|
+
forfeit: "forfeit";
|
|
5962
|
+
timeout: "timeout";
|
|
5963
|
+
withdrawn: "withdrawn";
|
|
5964
|
+
played: "played";
|
|
5965
|
+
bye: "bye";
|
|
5966
|
+
}>;
|
|
5967
|
+
/** How a match was decided. */
|
|
5968
|
+
export type TournamentDecision = z.infer<typeof TournamentDecision>;
|
|
5969
|
+
/** `POST /tournaments`. Everything but `games` has a default: the quick "public 1v1, single elimination". */
|
|
5970
|
+
export declare const TournamentCreate: z.ZodObject<{
|
|
5971
|
+
title: z.ZodOptional<z.ZodString>;
|
|
5972
|
+
games: z.ZodArray<z.ZodString>;
|
|
5973
|
+
pick: z.ZodDefault<z.ZodEnum<{
|
|
5974
|
+
fixed: "fixed";
|
|
5975
|
+
"random-once": "random-once";
|
|
5976
|
+
"random-each": "random-each";
|
|
5977
|
+
}>>;
|
|
5978
|
+
lives: z.ZodDefault<z.ZodNumber>;
|
|
5979
|
+
seeding: z.ZodDefault<z.ZodEnum<{
|
|
5980
|
+
rank: "rank";
|
|
5981
|
+
random: "random";
|
|
5982
|
+
}>>;
|
|
5983
|
+
visibility: z.ZodDefault<z.ZodEnum<{
|
|
5984
|
+
open: "open";
|
|
5985
|
+
closed: "closed";
|
|
5986
|
+
}>>;
|
|
5987
|
+
start: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5988
|
+
kind: z.ZodLiteral<"scheduled">;
|
|
5989
|
+
at: z.ZodNumber;
|
|
5990
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5991
|
+
kind: z.ZodLiteral<"filled">;
|
|
5992
|
+
}, z.core.$strip>], "kind">>;
|
|
5993
|
+
minPlayers: z.ZodDefault<z.ZodNumber>;
|
|
5994
|
+
maxPlayers: z.ZodDefault<z.ZodNumber>;
|
|
5995
|
+
readyMinutes: z.ZodDefault<z.ZodNumber>;
|
|
5996
|
+
invite: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
5997
|
+
}, z.core.$strip>;
|
|
5998
|
+
/** What creating a tournament takes. */
|
|
5999
|
+
export type TournamentCreate = z.output<typeof TournamentCreate>;
|
|
6000
|
+
/** One entrant, as the bracket shows them. */
|
|
6001
|
+
export declare const TournamentPlayer: z.ZodObject<{
|
|
6002
|
+
user: z.ZodObject<{
|
|
6003
|
+
id: z.ZodNumber;
|
|
6004
|
+
username: z.ZodString;
|
|
6005
|
+
avatar: z.ZodString;
|
|
6006
|
+
guest: z.ZodBoolean;
|
|
6007
|
+
}, z.core.$strip>;
|
|
6008
|
+
seed: z.ZodNullable<z.ZodNumber>;
|
|
6009
|
+
wins: z.ZodNumber;
|
|
6010
|
+
losses: z.ZodNumber;
|
|
6011
|
+
out: z.ZodBoolean;
|
|
6012
|
+
}, z.core.$strip>;
|
|
6013
|
+
/** One entrant. */
|
|
6014
|
+
export type TournamentPlayer = z.infer<typeof TournamentPlayer>;
|
|
6015
|
+
/** One match in the bracket. Sides are user ids (see the detail's `players`). */
|
|
6016
|
+
export declare const TournamentMatch: z.ZodObject<{
|
|
6017
|
+
id: z.ZodString;
|
|
6018
|
+
stage: z.ZodEnum<{
|
|
6019
|
+
winners: "winners";
|
|
6020
|
+
redemption: "redemption";
|
|
6021
|
+
final: "final";
|
|
6022
|
+
}>;
|
|
6023
|
+
level: z.ZodNumber;
|
|
6024
|
+
round: z.ZodNumber;
|
|
6025
|
+
slot: z.ZodNumber;
|
|
6026
|
+
a: z.ZodNullable<z.ZodNumber>;
|
|
6027
|
+
b: z.ZodNullable<z.ZodNumber>;
|
|
6028
|
+
status: z.ZodEnum<{
|
|
6029
|
+
ready: "ready";
|
|
6030
|
+
waiting: "waiting";
|
|
6031
|
+
done: "done";
|
|
6032
|
+
}>;
|
|
6033
|
+
winnerId: z.ZodNullable<z.ZodNumber>;
|
|
6034
|
+
decision: z.ZodNullable<z.ZodEnum<{
|
|
6035
|
+
forfeit: "forfeit";
|
|
6036
|
+
timeout: "timeout";
|
|
6037
|
+
withdrawn: "withdrawn";
|
|
6038
|
+
played: "played";
|
|
6039
|
+
bye: "bye";
|
|
6040
|
+
}>>;
|
|
6041
|
+
game: z.ZodNullable<z.ZodString>;
|
|
6042
|
+
deadlineAt: z.ZodNullable<z.ZodNumber>;
|
|
6043
|
+
started: z.ZodBoolean;
|
|
6044
|
+
}, z.core.$strip>;
|
|
6045
|
+
/** One match. */
|
|
6046
|
+
export type TournamentMatch = z.infer<typeof TournamentMatch>;
|
|
6047
|
+
/** A ready match of mine: who against, in which game, and until when. */
|
|
6048
|
+
export declare const MyTournamentMatch: z.ZodObject<{
|
|
6049
|
+
id: z.ZodString;
|
|
6050
|
+
opponent: z.ZodNullable<z.ZodObject<{
|
|
6051
|
+
id: z.ZodNumber;
|
|
6052
|
+
username: z.ZodString;
|
|
6053
|
+
avatar: z.ZodString;
|
|
6054
|
+
guest: z.ZodBoolean;
|
|
6055
|
+
}, z.core.$strip>>;
|
|
6056
|
+
game: z.ZodString;
|
|
6057
|
+
gameTitle: z.ZodString;
|
|
6058
|
+
deadlineAt: z.ZodNumber;
|
|
6059
|
+
started: z.ZodBoolean;
|
|
6060
|
+
}, z.core.$strip>;
|
|
6061
|
+
/** A ready match of mine. */
|
|
6062
|
+
export type MyTournamentMatch = z.infer<typeof MyTournamentMatch>;
|
|
6063
|
+
/** The viewer's own relation to a tournament. */
|
|
6064
|
+
export declare const TournamentMe: z.ZodObject<{
|
|
6065
|
+
joined: z.ZodBoolean;
|
|
6066
|
+
invited: z.ZodBoolean;
|
|
6067
|
+
following: z.ZodBoolean;
|
|
6068
|
+
leadMinutes: z.ZodNullable<z.ZodNumber>;
|
|
6069
|
+
isCreator: z.ZodBoolean;
|
|
6070
|
+
stillIn: z.ZodBoolean;
|
|
6071
|
+
nextMatch: z.ZodNullable<z.ZodObject<{
|
|
6072
|
+
id: z.ZodString;
|
|
6073
|
+
opponent: z.ZodNullable<z.ZodObject<{
|
|
6074
|
+
id: z.ZodNumber;
|
|
6075
|
+
username: z.ZodString;
|
|
6076
|
+
avatar: z.ZodString;
|
|
6077
|
+
guest: z.ZodBoolean;
|
|
6078
|
+
}, z.core.$strip>>;
|
|
6079
|
+
game: z.ZodString;
|
|
6080
|
+
gameTitle: z.ZodString;
|
|
6081
|
+
deadlineAt: z.ZodNumber;
|
|
6082
|
+
started: z.ZodBoolean;
|
|
6083
|
+
}, z.core.$strip>>;
|
|
6084
|
+
}, z.core.$strip>;
|
|
6085
|
+
/** A tournament in lists. */
|
|
6086
|
+
export declare const TournamentSummary: z.ZodObject<{
|
|
6087
|
+
id: z.ZodNumber;
|
|
6088
|
+
title: z.ZodString;
|
|
6089
|
+
creator: z.ZodNullable<z.ZodObject<{
|
|
6090
|
+
id: z.ZodNumber;
|
|
6091
|
+
username: z.ZodString;
|
|
6092
|
+
avatar: z.ZodString;
|
|
6093
|
+
guest: z.ZodBoolean;
|
|
6094
|
+
}, z.core.$strip>>;
|
|
6095
|
+
visibility: z.ZodEnum<{
|
|
6096
|
+
open: "open";
|
|
6097
|
+
closed: "closed";
|
|
6098
|
+
}>;
|
|
6099
|
+
phase: z.ZodEnum<{
|
|
6100
|
+
done: "done";
|
|
6101
|
+
cancelled: "cancelled";
|
|
6102
|
+
signup: "signup";
|
|
6103
|
+
running: "running";
|
|
6104
|
+
}>;
|
|
6105
|
+
games: z.ZodArray<z.ZodString>;
|
|
6106
|
+
pick: z.ZodEnum<{
|
|
6107
|
+
fixed: "fixed";
|
|
6108
|
+
"random-once": "random-once";
|
|
6109
|
+
"random-each": "random-each";
|
|
6110
|
+
}>;
|
|
6111
|
+
game: z.ZodNullable<z.ZodString>;
|
|
6112
|
+
gameTitles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
6113
|
+
lives: z.ZodNumber;
|
|
6114
|
+
seeding: z.ZodEnum<{
|
|
6115
|
+
rank: "rank";
|
|
6116
|
+
random: "random";
|
|
6117
|
+
}>;
|
|
6118
|
+
start: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6119
|
+
kind: z.ZodLiteral<"scheduled">;
|
|
6120
|
+
at: z.ZodNumber;
|
|
6121
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6122
|
+
kind: z.ZodLiteral<"filled">;
|
|
6123
|
+
}, z.core.$strip>], "kind">;
|
|
6124
|
+
minPlayers: z.ZodNumber;
|
|
6125
|
+
maxPlayers: z.ZodNumber;
|
|
6126
|
+
readyMinutes: z.ZodNumber;
|
|
6127
|
+
entrants: z.ZodNumber;
|
|
6128
|
+
createdAt: z.ZodNumber;
|
|
6129
|
+
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
6130
|
+
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
6131
|
+
champion: z.ZodNullable<z.ZodObject<{
|
|
6132
|
+
id: z.ZodNumber;
|
|
6133
|
+
username: z.ZodString;
|
|
6134
|
+
avatar: z.ZodString;
|
|
6135
|
+
guest: z.ZodBoolean;
|
|
6136
|
+
}, z.core.$strip>>;
|
|
6137
|
+
me: z.ZodObject<{
|
|
6138
|
+
joined: z.ZodBoolean;
|
|
6139
|
+
invited: z.ZodBoolean;
|
|
6140
|
+
following: z.ZodBoolean;
|
|
6141
|
+
leadMinutes: z.ZodNullable<z.ZodNumber>;
|
|
6142
|
+
isCreator: z.ZodBoolean;
|
|
6143
|
+
stillIn: z.ZodBoolean;
|
|
6144
|
+
nextMatch: z.ZodNullable<z.ZodObject<{
|
|
6145
|
+
id: z.ZodString;
|
|
6146
|
+
opponent: z.ZodNullable<z.ZodObject<{
|
|
6147
|
+
id: z.ZodNumber;
|
|
6148
|
+
username: z.ZodString;
|
|
6149
|
+
avatar: z.ZodString;
|
|
6150
|
+
guest: z.ZodBoolean;
|
|
6151
|
+
}, z.core.$strip>>;
|
|
6152
|
+
game: z.ZodString;
|
|
6153
|
+
gameTitle: z.ZodString;
|
|
6154
|
+
deadlineAt: z.ZodNumber;
|
|
6155
|
+
started: z.ZodBoolean;
|
|
6156
|
+
}, z.core.$strip>>;
|
|
6157
|
+
}, z.core.$strip>;
|
|
6158
|
+
}, z.core.$strip>;
|
|
6159
|
+
/** A tournament in lists. */
|
|
6160
|
+
export type TournamentSummary = z.infer<typeof TournamentSummary>;
|
|
6161
|
+
/** A tournament with its players and bracket. */
|
|
6162
|
+
export declare const TournamentDetail: z.ZodObject<{
|
|
6163
|
+
id: z.ZodNumber;
|
|
6164
|
+
title: z.ZodString;
|
|
6165
|
+
creator: z.ZodNullable<z.ZodObject<{
|
|
6166
|
+
id: z.ZodNumber;
|
|
6167
|
+
username: z.ZodString;
|
|
6168
|
+
avatar: z.ZodString;
|
|
6169
|
+
guest: z.ZodBoolean;
|
|
6170
|
+
}, z.core.$strip>>;
|
|
6171
|
+
visibility: z.ZodEnum<{
|
|
6172
|
+
open: "open";
|
|
6173
|
+
closed: "closed";
|
|
6174
|
+
}>;
|
|
6175
|
+
phase: z.ZodEnum<{
|
|
6176
|
+
done: "done";
|
|
6177
|
+
cancelled: "cancelled";
|
|
6178
|
+
signup: "signup";
|
|
6179
|
+
running: "running";
|
|
6180
|
+
}>;
|
|
6181
|
+
games: z.ZodArray<z.ZodString>;
|
|
6182
|
+
pick: z.ZodEnum<{
|
|
6183
|
+
fixed: "fixed";
|
|
6184
|
+
"random-once": "random-once";
|
|
6185
|
+
"random-each": "random-each";
|
|
6186
|
+
}>;
|
|
6187
|
+
game: z.ZodNullable<z.ZodString>;
|
|
6188
|
+
gameTitles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
6189
|
+
lives: z.ZodNumber;
|
|
6190
|
+
seeding: z.ZodEnum<{
|
|
6191
|
+
rank: "rank";
|
|
6192
|
+
random: "random";
|
|
6193
|
+
}>;
|
|
6194
|
+
start: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6195
|
+
kind: z.ZodLiteral<"scheduled">;
|
|
6196
|
+
at: z.ZodNumber;
|
|
6197
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6198
|
+
kind: z.ZodLiteral<"filled">;
|
|
6199
|
+
}, z.core.$strip>], "kind">;
|
|
6200
|
+
minPlayers: z.ZodNumber;
|
|
6201
|
+
maxPlayers: z.ZodNumber;
|
|
6202
|
+
readyMinutes: z.ZodNumber;
|
|
6203
|
+
entrants: z.ZodNumber;
|
|
6204
|
+
createdAt: z.ZodNumber;
|
|
6205
|
+
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
6206
|
+
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
6207
|
+
champion: z.ZodNullable<z.ZodObject<{
|
|
6208
|
+
id: z.ZodNumber;
|
|
6209
|
+
username: z.ZodString;
|
|
6210
|
+
avatar: z.ZodString;
|
|
6211
|
+
guest: z.ZodBoolean;
|
|
6212
|
+
}, z.core.$strip>>;
|
|
6213
|
+
me: z.ZodObject<{
|
|
6214
|
+
joined: z.ZodBoolean;
|
|
6215
|
+
invited: z.ZodBoolean;
|
|
6216
|
+
following: z.ZodBoolean;
|
|
6217
|
+
leadMinutes: z.ZodNullable<z.ZodNumber>;
|
|
6218
|
+
isCreator: z.ZodBoolean;
|
|
6219
|
+
stillIn: z.ZodBoolean;
|
|
6220
|
+
nextMatch: z.ZodNullable<z.ZodObject<{
|
|
6221
|
+
id: z.ZodString;
|
|
6222
|
+
opponent: z.ZodNullable<z.ZodObject<{
|
|
6223
|
+
id: z.ZodNumber;
|
|
6224
|
+
username: z.ZodString;
|
|
6225
|
+
avatar: z.ZodString;
|
|
6226
|
+
guest: z.ZodBoolean;
|
|
6227
|
+
}, z.core.$strip>>;
|
|
6228
|
+
game: z.ZodString;
|
|
6229
|
+
gameTitle: z.ZodString;
|
|
6230
|
+
deadlineAt: z.ZodNumber;
|
|
6231
|
+
started: z.ZodBoolean;
|
|
6232
|
+
}, z.core.$strip>>;
|
|
6233
|
+
}, z.core.$strip>;
|
|
6234
|
+
players: z.ZodArray<z.ZodObject<{
|
|
6235
|
+
user: z.ZodObject<{
|
|
6236
|
+
id: z.ZodNumber;
|
|
6237
|
+
username: z.ZodString;
|
|
6238
|
+
avatar: z.ZodString;
|
|
6239
|
+
guest: z.ZodBoolean;
|
|
6240
|
+
}, z.core.$strip>;
|
|
6241
|
+
seed: z.ZodNullable<z.ZodNumber>;
|
|
6242
|
+
wins: z.ZodNumber;
|
|
6243
|
+
losses: z.ZodNumber;
|
|
6244
|
+
out: z.ZodBoolean;
|
|
6245
|
+
}, z.core.$strip>>;
|
|
6246
|
+
matches: z.ZodArray<z.ZodObject<{
|
|
6247
|
+
id: z.ZodString;
|
|
6248
|
+
stage: z.ZodEnum<{
|
|
6249
|
+
winners: "winners";
|
|
6250
|
+
redemption: "redemption";
|
|
6251
|
+
final: "final";
|
|
6252
|
+
}>;
|
|
6253
|
+
level: z.ZodNumber;
|
|
6254
|
+
round: z.ZodNumber;
|
|
6255
|
+
slot: z.ZodNumber;
|
|
6256
|
+
a: z.ZodNullable<z.ZodNumber>;
|
|
6257
|
+
b: z.ZodNullable<z.ZodNumber>;
|
|
6258
|
+
status: z.ZodEnum<{
|
|
6259
|
+
ready: "ready";
|
|
6260
|
+
waiting: "waiting";
|
|
6261
|
+
done: "done";
|
|
6262
|
+
}>;
|
|
6263
|
+
winnerId: z.ZodNullable<z.ZodNumber>;
|
|
6264
|
+
decision: z.ZodNullable<z.ZodEnum<{
|
|
6265
|
+
forfeit: "forfeit";
|
|
6266
|
+
timeout: "timeout";
|
|
6267
|
+
withdrawn: "withdrawn";
|
|
6268
|
+
played: "played";
|
|
6269
|
+
bye: "bye";
|
|
6270
|
+
}>>;
|
|
6271
|
+
game: z.ZodNullable<z.ZodString>;
|
|
6272
|
+
deadlineAt: z.ZodNullable<z.ZodNumber>;
|
|
6273
|
+
started: z.ZodBoolean;
|
|
6274
|
+
}, z.core.$strip>>;
|
|
6275
|
+
inviteUrl: z.ZodNullable<z.ZodString>;
|
|
6276
|
+
}, z.core.$strip>;
|
|
6277
|
+
/** A tournament with its bracket. */
|
|
6278
|
+
export type TournamentDetail = z.infer<typeof TournamentDetail>;
|
|
6279
|
+
/** What a launch into a tournament match carries (`launch.tournament`). */
|
|
6280
|
+
export declare const TournamentLaunch: z.ZodObject<{
|
|
6281
|
+
id: z.ZodNumber;
|
|
6282
|
+
title: z.ZodString;
|
|
6283
|
+
match: z.ZodString;
|
|
6284
|
+
opponent: z.ZodNullable<z.ZodObject<{
|
|
6285
|
+
id: z.ZodNumber;
|
|
6286
|
+
username: z.ZodString;
|
|
6287
|
+
avatar: z.ZodString;
|
|
6288
|
+
guest: z.ZodBoolean;
|
|
6289
|
+
}, z.core.$strip>>;
|
|
6290
|
+
}, z.core.$strip>;
|
|
6291
|
+
/** What a launch into a tournament match carries. */
|
|
6292
|
+
export type TournamentLaunch = z.infer<typeof TournamentLaunch>;
|
|
6293
|
+
//#endregion
|
|
6294
|
+
//#region src/api/tournaments/endpoints.d.ts
|
|
6295
|
+
/** `GET /tournaments` filters. */
|
|
6296
|
+
export declare const TournamentListQuery: z.ZodObject<{
|
|
6297
|
+
game: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>>;
|
|
6298
|
+
}, z.core.$strip>;
|
|
6299
|
+
/** The tournament endpoints. */
|
|
6300
|
+
export declare const tournamentEndpoints: {
|
|
6301
|
+
joinTournament: import("@ayepi/core").Endpoint<{
|
|
6302
|
+
readonly method: "POST";
|
|
6303
|
+
readonly path: "/tournaments/:id/join";
|
|
6304
|
+
readonly params: z.ZodObject<{
|
|
6305
|
+
id: z.ZodCoercedNumber<unknown>;
|
|
6306
|
+
}, z.core.$strip>;
|
|
6307
|
+
readonly body: z.ZodObject<{
|
|
6308
|
+
key: z.ZodOptional<z.ZodString>;
|
|
6309
|
+
}, z.core.$strip>;
|
|
6310
|
+
readonly response: z.ZodObject<{
|
|
6311
|
+
id: z.ZodNumber;
|
|
6312
|
+
title: z.ZodString;
|
|
6313
|
+
creator: z.ZodNullable<z.ZodObject<{
|
|
6314
|
+
id: z.ZodNumber;
|
|
6315
|
+
username: z.ZodString;
|
|
6316
|
+
avatar: z.ZodString;
|
|
6317
|
+
guest: z.ZodBoolean;
|
|
6318
|
+
}, z.core.$strip>>;
|
|
6319
|
+
visibility: z.ZodEnum<{
|
|
6320
|
+
open: "open";
|
|
6321
|
+
closed: "closed";
|
|
6322
|
+
}>;
|
|
6323
|
+
phase: z.ZodEnum<{
|
|
6324
|
+
done: "done";
|
|
6325
|
+
cancelled: "cancelled";
|
|
6326
|
+
signup: "signup";
|
|
6327
|
+
running: "running";
|
|
6328
|
+
}>;
|
|
6329
|
+
games: z.ZodArray<z.ZodString>;
|
|
6330
|
+
pick: z.ZodEnum<{
|
|
6331
|
+
fixed: "fixed";
|
|
6332
|
+
"random-once": "random-once";
|
|
6333
|
+
"random-each": "random-each";
|
|
6334
|
+
}>;
|
|
6335
|
+
game: z.ZodNullable<z.ZodString>;
|
|
6336
|
+
gameTitles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
6337
|
+
lives: z.ZodNumber;
|
|
6338
|
+
seeding: z.ZodEnum<{
|
|
6339
|
+
rank: "rank";
|
|
6340
|
+
random: "random";
|
|
6341
|
+
}>;
|
|
6342
|
+
start: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6343
|
+
kind: z.ZodLiteral<"scheduled">;
|
|
6344
|
+
at: z.ZodNumber;
|
|
6345
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6346
|
+
kind: z.ZodLiteral<"filled">;
|
|
6347
|
+
}, z.core.$strip>], "kind">;
|
|
6348
|
+
minPlayers: z.ZodNumber;
|
|
6349
|
+
maxPlayers: z.ZodNumber;
|
|
6350
|
+
readyMinutes: z.ZodNumber;
|
|
6351
|
+
entrants: z.ZodNumber;
|
|
6352
|
+
createdAt: z.ZodNumber;
|
|
6353
|
+
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
6354
|
+
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
6355
|
+
champion: z.ZodNullable<z.ZodObject<{
|
|
6356
|
+
id: z.ZodNumber;
|
|
6357
|
+
username: z.ZodString;
|
|
6358
|
+
avatar: z.ZodString;
|
|
6359
|
+
guest: z.ZodBoolean;
|
|
6360
|
+
}, z.core.$strip>>;
|
|
6361
|
+
me: z.ZodObject<{
|
|
6362
|
+
joined: z.ZodBoolean;
|
|
6363
|
+
invited: z.ZodBoolean;
|
|
6364
|
+
following: z.ZodBoolean;
|
|
6365
|
+
leadMinutes: z.ZodNullable<z.ZodNumber>;
|
|
6366
|
+
isCreator: z.ZodBoolean;
|
|
6367
|
+
stillIn: z.ZodBoolean;
|
|
6368
|
+
nextMatch: z.ZodNullable<z.ZodObject<{
|
|
6369
|
+
id: z.ZodString;
|
|
6370
|
+
opponent: z.ZodNullable<z.ZodObject<{
|
|
6371
|
+
id: z.ZodNumber;
|
|
6372
|
+
username: z.ZodString;
|
|
6373
|
+
avatar: z.ZodString;
|
|
6374
|
+
guest: z.ZodBoolean;
|
|
6375
|
+
}, z.core.$strip>>;
|
|
6376
|
+
game: z.ZodString;
|
|
6377
|
+
gameTitle: z.ZodString;
|
|
6378
|
+
deadlineAt: z.ZodNumber;
|
|
6379
|
+
started: z.ZodBoolean;
|
|
6380
|
+
}, z.core.$strip>>;
|
|
6381
|
+
}, z.core.$strip>;
|
|
6382
|
+
players: z.ZodArray<z.ZodObject<{
|
|
6383
|
+
user: z.ZodObject<{
|
|
6384
|
+
id: z.ZodNumber;
|
|
6385
|
+
username: z.ZodString;
|
|
6386
|
+
avatar: z.ZodString;
|
|
6387
|
+
guest: z.ZodBoolean;
|
|
6388
|
+
}, z.core.$strip>;
|
|
6389
|
+
seed: z.ZodNullable<z.ZodNumber>;
|
|
6390
|
+
wins: z.ZodNumber;
|
|
6391
|
+
losses: z.ZodNumber;
|
|
6392
|
+
out: z.ZodBoolean;
|
|
6393
|
+
}, z.core.$strip>>;
|
|
6394
|
+
matches: z.ZodArray<z.ZodObject<{
|
|
6395
|
+
id: z.ZodString;
|
|
6396
|
+
stage: z.ZodEnum<{
|
|
6397
|
+
winners: "winners";
|
|
6398
|
+
redemption: "redemption";
|
|
6399
|
+
final: "final";
|
|
6400
|
+
}>;
|
|
6401
|
+
level: z.ZodNumber;
|
|
6402
|
+
round: z.ZodNumber;
|
|
6403
|
+
slot: z.ZodNumber;
|
|
6404
|
+
a: z.ZodNullable<z.ZodNumber>;
|
|
6405
|
+
b: z.ZodNullable<z.ZodNumber>;
|
|
6406
|
+
status: z.ZodEnum<{
|
|
6407
|
+
ready: "ready";
|
|
6408
|
+
waiting: "waiting";
|
|
6409
|
+
done: "done";
|
|
6410
|
+
}>;
|
|
6411
|
+
winnerId: z.ZodNullable<z.ZodNumber>;
|
|
6412
|
+
decision: z.ZodNullable<z.ZodEnum<{
|
|
6413
|
+
forfeit: "forfeit";
|
|
6414
|
+
timeout: "timeout";
|
|
6415
|
+
withdrawn: "withdrawn";
|
|
6416
|
+
played: "played";
|
|
6417
|
+
bye: "bye";
|
|
6418
|
+
}>>;
|
|
6419
|
+
game: z.ZodNullable<z.ZodString>;
|
|
6420
|
+
deadlineAt: z.ZodNullable<z.ZodNumber>;
|
|
6421
|
+
started: z.ZodBoolean;
|
|
6422
|
+
}, z.core.$strip>>;
|
|
6423
|
+
inviteUrl: z.ZodNullable<z.ZodString>;
|
|
6424
|
+
}, z.core.$strip>;
|
|
6425
|
+
readonly errors: {
|
|
6426
|
+
readonly 401: ErrorBodySchema;
|
|
6427
|
+
readonly 403: ErrorBodySchema;
|
|
6428
|
+
readonly 404: ErrorBodySchema;
|
|
6429
|
+
readonly 409: ErrorBodySchema;
|
|
6430
|
+
readonly 429: ErrorBodySchema;
|
|
6431
|
+
};
|
|
6432
|
+
readonly doc: {
|
|
6433
|
+
readonly summary: "Sign up (open tournaments, or closed ones I was invited to or have the link for)";
|
|
6434
|
+
readonly tags: readonly ["tournaments"];
|
|
6435
|
+
};
|
|
6436
|
+
}, {
|
|
6437
|
+
user: SessionUser;
|
|
6438
|
+
clientId: string;
|
|
6439
|
+
}, {}, import("@ayepi/core").EmptyObject>;
|
|
6440
|
+
leaveTournament: import("@ayepi/core").Endpoint<{
|
|
6441
|
+
readonly method: "POST";
|
|
6442
|
+
readonly path: "/tournaments/:id/leave";
|
|
6443
|
+
readonly params: z.ZodObject<{
|
|
6444
|
+
id: z.ZodCoercedNumber<unknown>;
|
|
6445
|
+
}, z.core.$strip>;
|
|
6446
|
+
readonly response: z.ZodObject<{
|
|
6447
|
+
id: z.ZodNumber;
|
|
6448
|
+
title: z.ZodString;
|
|
6449
|
+
creator: z.ZodNullable<z.ZodObject<{
|
|
6450
|
+
id: z.ZodNumber;
|
|
6451
|
+
username: z.ZodString;
|
|
6452
|
+
avatar: z.ZodString;
|
|
6453
|
+
guest: z.ZodBoolean;
|
|
6454
|
+
}, z.core.$strip>>;
|
|
6455
|
+
visibility: z.ZodEnum<{
|
|
6456
|
+
open: "open";
|
|
6457
|
+
closed: "closed";
|
|
6458
|
+
}>;
|
|
6459
|
+
phase: z.ZodEnum<{
|
|
6460
|
+
done: "done";
|
|
6461
|
+
cancelled: "cancelled";
|
|
6462
|
+
signup: "signup";
|
|
6463
|
+
running: "running";
|
|
6464
|
+
}>;
|
|
6465
|
+
games: z.ZodArray<z.ZodString>;
|
|
6466
|
+
pick: z.ZodEnum<{
|
|
6467
|
+
fixed: "fixed";
|
|
6468
|
+
"random-once": "random-once";
|
|
6469
|
+
"random-each": "random-each";
|
|
6470
|
+
}>;
|
|
6471
|
+
game: z.ZodNullable<z.ZodString>;
|
|
6472
|
+
gameTitles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
6473
|
+
lives: z.ZodNumber;
|
|
6474
|
+
seeding: z.ZodEnum<{
|
|
6475
|
+
rank: "rank";
|
|
6476
|
+
random: "random";
|
|
6477
|
+
}>;
|
|
6478
|
+
start: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6479
|
+
kind: z.ZodLiteral<"scheduled">;
|
|
6480
|
+
at: z.ZodNumber;
|
|
6481
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6482
|
+
kind: z.ZodLiteral<"filled">;
|
|
6483
|
+
}, z.core.$strip>], "kind">;
|
|
6484
|
+
minPlayers: z.ZodNumber;
|
|
6485
|
+
maxPlayers: z.ZodNumber;
|
|
6486
|
+
readyMinutes: z.ZodNumber;
|
|
6487
|
+
entrants: z.ZodNumber;
|
|
6488
|
+
createdAt: z.ZodNumber;
|
|
6489
|
+
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
6490
|
+
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
6491
|
+
champion: z.ZodNullable<z.ZodObject<{
|
|
6492
|
+
id: z.ZodNumber;
|
|
6493
|
+
username: z.ZodString;
|
|
6494
|
+
avatar: z.ZodString;
|
|
6495
|
+
guest: z.ZodBoolean;
|
|
6496
|
+
}, z.core.$strip>>;
|
|
6497
|
+
me: z.ZodObject<{
|
|
6498
|
+
joined: z.ZodBoolean;
|
|
6499
|
+
invited: z.ZodBoolean;
|
|
6500
|
+
following: z.ZodBoolean;
|
|
6501
|
+
leadMinutes: z.ZodNullable<z.ZodNumber>;
|
|
6502
|
+
isCreator: z.ZodBoolean;
|
|
6503
|
+
stillIn: z.ZodBoolean;
|
|
6504
|
+
nextMatch: z.ZodNullable<z.ZodObject<{
|
|
6505
|
+
id: z.ZodString;
|
|
6506
|
+
opponent: z.ZodNullable<z.ZodObject<{
|
|
6507
|
+
id: z.ZodNumber;
|
|
6508
|
+
username: z.ZodString;
|
|
6509
|
+
avatar: z.ZodString;
|
|
6510
|
+
guest: z.ZodBoolean;
|
|
6511
|
+
}, z.core.$strip>>;
|
|
6512
|
+
game: z.ZodString;
|
|
6513
|
+
gameTitle: z.ZodString;
|
|
6514
|
+
deadlineAt: z.ZodNumber;
|
|
6515
|
+
started: z.ZodBoolean;
|
|
6516
|
+
}, z.core.$strip>>;
|
|
6517
|
+
}, z.core.$strip>;
|
|
6518
|
+
players: z.ZodArray<z.ZodObject<{
|
|
6519
|
+
user: z.ZodObject<{
|
|
6520
|
+
id: z.ZodNumber;
|
|
6521
|
+
username: z.ZodString;
|
|
6522
|
+
avatar: z.ZodString;
|
|
6523
|
+
guest: z.ZodBoolean;
|
|
6524
|
+
}, z.core.$strip>;
|
|
6525
|
+
seed: z.ZodNullable<z.ZodNumber>;
|
|
6526
|
+
wins: z.ZodNumber;
|
|
6527
|
+
losses: z.ZodNumber;
|
|
6528
|
+
out: z.ZodBoolean;
|
|
6529
|
+
}, z.core.$strip>>;
|
|
6530
|
+
matches: z.ZodArray<z.ZodObject<{
|
|
6531
|
+
id: z.ZodString;
|
|
6532
|
+
stage: z.ZodEnum<{
|
|
6533
|
+
winners: "winners";
|
|
6534
|
+
redemption: "redemption";
|
|
6535
|
+
final: "final";
|
|
6536
|
+
}>;
|
|
6537
|
+
level: z.ZodNumber;
|
|
6538
|
+
round: z.ZodNumber;
|
|
6539
|
+
slot: z.ZodNumber;
|
|
6540
|
+
a: z.ZodNullable<z.ZodNumber>;
|
|
6541
|
+
b: z.ZodNullable<z.ZodNumber>;
|
|
6542
|
+
status: z.ZodEnum<{
|
|
6543
|
+
ready: "ready";
|
|
6544
|
+
waiting: "waiting";
|
|
6545
|
+
done: "done";
|
|
6546
|
+
}>;
|
|
6547
|
+
winnerId: z.ZodNullable<z.ZodNumber>;
|
|
6548
|
+
decision: z.ZodNullable<z.ZodEnum<{
|
|
6549
|
+
forfeit: "forfeit";
|
|
6550
|
+
timeout: "timeout";
|
|
6551
|
+
withdrawn: "withdrawn";
|
|
6552
|
+
played: "played";
|
|
6553
|
+
bye: "bye";
|
|
6554
|
+
}>>;
|
|
6555
|
+
game: z.ZodNullable<z.ZodString>;
|
|
6556
|
+
deadlineAt: z.ZodNullable<z.ZodNumber>;
|
|
6557
|
+
started: z.ZodBoolean;
|
|
6558
|
+
}, z.core.$strip>>;
|
|
6559
|
+
inviteUrl: z.ZodNullable<z.ZodString>;
|
|
6560
|
+
}, z.core.$strip>;
|
|
6561
|
+
readonly errors: {
|
|
6562
|
+
readonly 401: ErrorBodySchema;
|
|
6563
|
+
readonly 403: ErrorBodySchema;
|
|
6564
|
+
readonly 404: ErrorBodySchema;
|
|
6565
|
+
readonly 409: ErrorBodySchema;
|
|
6566
|
+
};
|
|
6567
|
+
readonly doc: {
|
|
6568
|
+
readonly summary: "Drop out: before the start my place is freed; after it I forfeit what is left";
|
|
6569
|
+
readonly tags: readonly ["tournaments"];
|
|
6570
|
+
};
|
|
6571
|
+
}, {
|
|
6572
|
+
user: SessionUser;
|
|
6573
|
+
clientId: string;
|
|
6574
|
+
}, {}, import("@ayepi/core").EmptyObject>;
|
|
6575
|
+
launchTournamentMatch: import("@ayepi/core").Endpoint<{
|
|
6576
|
+
readonly method: "POST";
|
|
6577
|
+
readonly path: "/tournaments/:id/matches/:match/launch";
|
|
6578
|
+
readonly params: z.ZodObject<{
|
|
6579
|
+
id: z.ZodCoercedNumber<unknown>;
|
|
6580
|
+
match: z.ZodString;
|
|
6581
|
+
}, z.core.$strip>;
|
|
6582
|
+
readonly response: z.ZodObject<{
|
|
6583
|
+
launchToken: z.ZodString;
|
|
6584
|
+
url: z.ZodString;
|
|
6585
|
+
}, z.core.$strip>;
|
|
6586
|
+
readonly errors: {
|
|
6587
|
+
readonly 401: ErrorBodySchema;
|
|
6588
|
+
readonly 403: ErrorBodySchema;
|
|
6589
|
+
readonly 404: ErrorBodySchema;
|
|
6590
|
+
readonly 409: ErrorBodySchema;
|
|
6591
|
+
};
|
|
6592
|
+
readonly doc: {
|
|
6593
|
+
readonly summary: "A launch into my ready match: host for the better seed, guest for the other";
|
|
6594
|
+
readonly tags: readonly ["tournaments"];
|
|
6595
|
+
};
|
|
6596
|
+
}, {
|
|
6597
|
+
user: SessionUser;
|
|
6598
|
+
clientId: string;
|
|
6599
|
+
}, {}, import("@ayepi/core").EmptyObject>;
|
|
6600
|
+
createTournament: import("@ayepi/core").Endpoint<{
|
|
6601
|
+
readonly method: "POST";
|
|
6602
|
+
readonly path: "/tournaments";
|
|
6603
|
+
readonly body: z.ZodObject<{
|
|
6604
|
+
title: z.ZodOptional<z.ZodString>;
|
|
6605
|
+
games: z.ZodArray<z.ZodString>;
|
|
6606
|
+
pick: z.ZodDefault<z.ZodEnum<{
|
|
6607
|
+
fixed: "fixed";
|
|
6608
|
+
"random-once": "random-once";
|
|
6609
|
+
"random-each": "random-each";
|
|
6610
|
+
}>>;
|
|
6611
|
+
lives: z.ZodDefault<z.ZodNumber>;
|
|
6612
|
+
seeding: z.ZodDefault<z.ZodEnum<{
|
|
6613
|
+
rank: "rank";
|
|
6614
|
+
random: "random";
|
|
6615
|
+
}>>;
|
|
6616
|
+
visibility: z.ZodDefault<z.ZodEnum<{
|
|
6617
|
+
open: "open";
|
|
6618
|
+
closed: "closed";
|
|
6619
|
+
}>>;
|
|
6620
|
+
start: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6621
|
+
kind: z.ZodLiteral<"scheduled">;
|
|
6622
|
+
at: z.ZodNumber;
|
|
6623
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6624
|
+
kind: z.ZodLiteral<"filled">;
|
|
6625
|
+
}, z.core.$strip>], "kind">>;
|
|
6626
|
+
minPlayers: z.ZodDefault<z.ZodNumber>;
|
|
6627
|
+
maxPlayers: z.ZodDefault<z.ZodNumber>;
|
|
6628
|
+
readyMinutes: z.ZodDefault<z.ZodNumber>;
|
|
6629
|
+
invite: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
6630
|
+
}, z.core.$strip>;
|
|
6631
|
+
readonly response: z.ZodObject<{
|
|
6632
|
+
id: z.ZodNumber;
|
|
6633
|
+
title: z.ZodString;
|
|
6634
|
+
creator: z.ZodNullable<z.ZodObject<{
|
|
6635
|
+
id: z.ZodNumber;
|
|
6636
|
+
username: z.ZodString;
|
|
6637
|
+
avatar: z.ZodString;
|
|
6638
|
+
guest: z.ZodBoolean;
|
|
6639
|
+
}, z.core.$strip>>;
|
|
6640
|
+
visibility: z.ZodEnum<{
|
|
6641
|
+
open: "open";
|
|
6642
|
+
closed: "closed";
|
|
6643
|
+
}>;
|
|
6644
|
+
phase: z.ZodEnum<{
|
|
6645
|
+
done: "done";
|
|
6646
|
+
cancelled: "cancelled";
|
|
6647
|
+
signup: "signup";
|
|
6648
|
+
running: "running";
|
|
6649
|
+
}>;
|
|
6650
|
+
games: z.ZodArray<z.ZodString>;
|
|
6651
|
+
pick: z.ZodEnum<{
|
|
6652
|
+
fixed: "fixed";
|
|
6653
|
+
"random-once": "random-once";
|
|
6654
|
+
"random-each": "random-each";
|
|
6655
|
+
}>;
|
|
6656
|
+
game: z.ZodNullable<z.ZodString>;
|
|
6657
|
+
gameTitles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
6658
|
+
lives: z.ZodNumber;
|
|
6659
|
+
seeding: z.ZodEnum<{
|
|
6660
|
+
rank: "rank";
|
|
6661
|
+
random: "random";
|
|
6662
|
+
}>;
|
|
6663
|
+
start: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6664
|
+
kind: z.ZodLiteral<"scheduled">;
|
|
6665
|
+
at: z.ZodNumber;
|
|
6666
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6667
|
+
kind: z.ZodLiteral<"filled">;
|
|
6668
|
+
}, z.core.$strip>], "kind">;
|
|
6669
|
+
minPlayers: z.ZodNumber;
|
|
6670
|
+
maxPlayers: z.ZodNumber;
|
|
6671
|
+
readyMinutes: z.ZodNumber;
|
|
6672
|
+
entrants: z.ZodNumber;
|
|
6673
|
+
createdAt: z.ZodNumber;
|
|
6674
|
+
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
6675
|
+
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
6676
|
+
champion: z.ZodNullable<z.ZodObject<{
|
|
6677
|
+
id: z.ZodNumber;
|
|
6678
|
+
username: z.ZodString;
|
|
6679
|
+
avatar: z.ZodString;
|
|
6680
|
+
guest: z.ZodBoolean;
|
|
6681
|
+
}, z.core.$strip>>;
|
|
6682
|
+
me: z.ZodObject<{
|
|
6683
|
+
joined: z.ZodBoolean;
|
|
6684
|
+
invited: z.ZodBoolean;
|
|
6685
|
+
following: z.ZodBoolean;
|
|
6686
|
+
leadMinutes: z.ZodNullable<z.ZodNumber>;
|
|
6687
|
+
isCreator: z.ZodBoolean;
|
|
6688
|
+
stillIn: z.ZodBoolean;
|
|
6689
|
+
nextMatch: z.ZodNullable<z.ZodObject<{
|
|
6690
|
+
id: z.ZodString;
|
|
6691
|
+
opponent: z.ZodNullable<z.ZodObject<{
|
|
6692
|
+
id: z.ZodNumber;
|
|
6693
|
+
username: z.ZodString;
|
|
6694
|
+
avatar: z.ZodString;
|
|
6695
|
+
guest: z.ZodBoolean;
|
|
6696
|
+
}, z.core.$strip>>;
|
|
6697
|
+
game: z.ZodString;
|
|
6698
|
+
gameTitle: z.ZodString;
|
|
6699
|
+
deadlineAt: z.ZodNumber;
|
|
6700
|
+
started: z.ZodBoolean;
|
|
6701
|
+
}, z.core.$strip>>;
|
|
6702
|
+
}, z.core.$strip>;
|
|
6703
|
+
players: z.ZodArray<z.ZodObject<{
|
|
6704
|
+
user: z.ZodObject<{
|
|
6705
|
+
id: z.ZodNumber;
|
|
6706
|
+
username: z.ZodString;
|
|
6707
|
+
avatar: z.ZodString;
|
|
6708
|
+
guest: z.ZodBoolean;
|
|
6709
|
+
}, z.core.$strip>;
|
|
6710
|
+
seed: z.ZodNullable<z.ZodNumber>;
|
|
6711
|
+
wins: z.ZodNumber;
|
|
6712
|
+
losses: z.ZodNumber;
|
|
6713
|
+
out: z.ZodBoolean;
|
|
6714
|
+
}, z.core.$strip>>;
|
|
6715
|
+
matches: z.ZodArray<z.ZodObject<{
|
|
6716
|
+
id: z.ZodString;
|
|
6717
|
+
stage: z.ZodEnum<{
|
|
6718
|
+
winners: "winners";
|
|
6719
|
+
redemption: "redemption";
|
|
6720
|
+
final: "final";
|
|
6721
|
+
}>;
|
|
6722
|
+
level: z.ZodNumber;
|
|
6723
|
+
round: z.ZodNumber;
|
|
6724
|
+
slot: z.ZodNumber;
|
|
6725
|
+
a: z.ZodNullable<z.ZodNumber>;
|
|
6726
|
+
b: z.ZodNullable<z.ZodNumber>;
|
|
6727
|
+
status: z.ZodEnum<{
|
|
6728
|
+
ready: "ready";
|
|
6729
|
+
waiting: "waiting";
|
|
6730
|
+
done: "done";
|
|
6731
|
+
}>;
|
|
6732
|
+
winnerId: z.ZodNullable<z.ZodNumber>;
|
|
6733
|
+
decision: z.ZodNullable<z.ZodEnum<{
|
|
6734
|
+
forfeit: "forfeit";
|
|
6735
|
+
timeout: "timeout";
|
|
6736
|
+
withdrawn: "withdrawn";
|
|
6737
|
+
played: "played";
|
|
6738
|
+
bye: "bye";
|
|
6739
|
+
}>>;
|
|
6740
|
+
game: z.ZodNullable<z.ZodString>;
|
|
6741
|
+
deadlineAt: z.ZodNullable<z.ZodNumber>;
|
|
6742
|
+
started: z.ZodBoolean;
|
|
6743
|
+
}, z.core.$strip>>;
|
|
6744
|
+
inviteUrl: z.ZodNullable<z.ZodString>;
|
|
6745
|
+
}, z.core.$strip>;
|
|
6746
|
+
readonly errors: {
|
|
6747
|
+
readonly 400: ErrorBodySchema;
|
|
6748
|
+
readonly 401: ErrorBodySchema;
|
|
6749
|
+
readonly 403: ErrorBodySchema;
|
|
6750
|
+
readonly 404: ErrorBodySchema;
|
|
6751
|
+
readonly 422: ErrorBodySchema;
|
|
6752
|
+
readonly 429: ErrorBodySchema;
|
|
6753
|
+
};
|
|
6754
|
+
readonly doc: {
|
|
6755
|
+
readonly summary: "Create a tournament (I am signed up to it); the title goes through the content filter";
|
|
6756
|
+
readonly tags: readonly ["tournaments"];
|
|
6757
|
+
};
|
|
6758
|
+
}, {
|
|
6759
|
+
user: SessionUser;
|
|
6760
|
+
clientId: string;
|
|
6761
|
+
}, {}, import("@ayepi/core").EmptyObject>;
|
|
6762
|
+
inviteToTournament: import("@ayepi/core").Endpoint<{
|
|
6763
|
+
readonly method: "POST";
|
|
6764
|
+
readonly path: "/tournaments/:id/invites";
|
|
6765
|
+
readonly params: z.ZodObject<{
|
|
6766
|
+
id: z.ZodCoercedNumber<unknown>;
|
|
6767
|
+
}, z.core.$strip>;
|
|
6768
|
+
readonly body: z.ZodObject<{
|
|
6769
|
+
userIds: z.ZodArray<z.ZodNumber>;
|
|
6770
|
+
}, z.core.$strip>;
|
|
6771
|
+
readonly response: z.ZodObject<{
|
|
6772
|
+
invited: z.ZodNumber;
|
|
6773
|
+
}, z.core.$strip>;
|
|
6774
|
+
readonly errors: {
|
|
6775
|
+
readonly 401: ErrorBodySchema;
|
|
6776
|
+
readonly 403: ErrorBodySchema;
|
|
6777
|
+
readonly 404: ErrorBodySchema;
|
|
6778
|
+
readonly 409: ErrorBodySchema;
|
|
6779
|
+
readonly 429: ErrorBodySchema;
|
|
6780
|
+
};
|
|
6781
|
+
readonly doc: {
|
|
6782
|
+
readonly summary: "Creator: invite friends (others are skipped without saying why)";
|
|
6783
|
+
readonly tags: readonly ["tournaments"];
|
|
6784
|
+
};
|
|
6785
|
+
}, {
|
|
6786
|
+
user: SessionUser;
|
|
6787
|
+
clientId: string;
|
|
6788
|
+
}, {}, import("@ayepi/core").EmptyObject>;
|
|
6789
|
+
followTournament: import("@ayepi/core").Endpoint<{
|
|
6790
|
+
readonly method: "PUT";
|
|
6791
|
+
readonly path: "/tournaments/:id/follow";
|
|
6792
|
+
readonly params: z.ZodObject<{
|
|
6793
|
+
id: z.ZodCoercedNumber<unknown>;
|
|
6794
|
+
}, z.core.$strip>;
|
|
6795
|
+
readonly body: z.ZodObject<{
|
|
6796
|
+
leadMinutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
6797
|
+
}, z.core.$strip>;
|
|
6798
|
+
readonly response: z.ZodObject<{
|
|
6799
|
+
id: z.ZodNumber;
|
|
6800
|
+
title: z.ZodString;
|
|
6801
|
+
creator: z.ZodNullable<z.ZodObject<{
|
|
6802
|
+
id: z.ZodNumber;
|
|
6803
|
+
username: z.ZodString;
|
|
6804
|
+
avatar: z.ZodString;
|
|
6805
|
+
guest: z.ZodBoolean;
|
|
6806
|
+
}, z.core.$strip>>;
|
|
6807
|
+
visibility: z.ZodEnum<{
|
|
6808
|
+
open: "open";
|
|
6809
|
+
closed: "closed";
|
|
6810
|
+
}>;
|
|
6811
|
+
phase: z.ZodEnum<{
|
|
6812
|
+
done: "done";
|
|
6813
|
+
cancelled: "cancelled";
|
|
6814
|
+
signup: "signup";
|
|
6815
|
+
running: "running";
|
|
6816
|
+
}>;
|
|
6817
|
+
games: z.ZodArray<z.ZodString>;
|
|
6818
|
+
pick: z.ZodEnum<{
|
|
6819
|
+
fixed: "fixed";
|
|
6820
|
+
"random-once": "random-once";
|
|
6821
|
+
"random-each": "random-each";
|
|
6822
|
+
}>;
|
|
6823
|
+
game: z.ZodNullable<z.ZodString>;
|
|
6824
|
+
gameTitles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
6825
|
+
lives: z.ZodNumber;
|
|
6826
|
+
seeding: z.ZodEnum<{
|
|
6827
|
+
rank: "rank";
|
|
6828
|
+
random: "random";
|
|
6829
|
+
}>;
|
|
6830
|
+
start: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6831
|
+
kind: z.ZodLiteral<"scheduled">;
|
|
6832
|
+
at: z.ZodNumber;
|
|
6833
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6834
|
+
kind: z.ZodLiteral<"filled">;
|
|
6835
|
+
}, z.core.$strip>], "kind">;
|
|
6836
|
+
minPlayers: z.ZodNumber;
|
|
6837
|
+
maxPlayers: z.ZodNumber;
|
|
6838
|
+
readyMinutes: z.ZodNumber;
|
|
6839
|
+
entrants: z.ZodNumber;
|
|
6840
|
+
createdAt: z.ZodNumber;
|
|
6841
|
+
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
6842
|
+
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
6843
|
+
champion: z.ZodNullable<z.ZodObject<{
|
|
6844
|
+
id: z.ZodNumber;
|
|
6845
|
+
username: z.ZodString;
|
|
6846
|
+
avatar: z.ZodString;
|
|
6847
|
+
guest: z.ZodBoolean;
|
|
6848
|
+
}, z.core.$strip>>;
|
|
6849
|
+
me: z.ZodObject<{
|
|
6850
|
+
joined: z.ZodBoolean;
|
|
6851
|
+
invited: z.ZodBoolean;
|
|
6852
|
+
following: z.ZodBoolean;
|
|
6853
|
+
leadMinutes: z.ZodNullable<z.ZodNumber>;
|
|
6854
|
+
isCreator: z.ZodBoolean;
|
|
6855
|
+
stillIn: z.ZodBoolean;
|
|
6856
|
+
nextMatch: z.ZodNullable<z.ZodObject<{
|
|
6857
|
+
id: z.ZodString;
|
|
6858
|
+
opponent: z.ZodNullable<z.ZodObject<{
|
|
6859
|
+
id: z.ZodNumber;
|
|
6860
|
+
username: z.ZodString;
|
|
6861
|
+
avatar: z.ZodString;
|
|
6862
|
+
guest: z.ZodBoolean;
|
|
6863
|
+
}, z.core.$strip>>;
|
|
6864
|
+
game: z.ZodString;
|
|
6865
|
+
gameTitle: z.ZodString;
|
|
6866
|
+
deadlineAt: z.ZodNumber;
|
|
6867
|
+
started: z.ZodBoolean;
|
|
6868
|
+
}, z.core.$strip>>;
|
|
6869
|
+
}, z.core.$strip>;
|
|
6870
|
+
}, z.core.$strip>;
|
|
6871
|
+
readonly errors: {
|
|
6872
|
+
readonly 401: ErrorBodySchema;
|
|
6873
|
+
readonly 403: ErrorBodySchema;
|
|
6874
|
+
readonly 404: ErrorBodySchema;
|
|
6875
|
+
};
|
|
6876
|
+
readonly doc: {
|
|
6877
|
+
readonly summary: "Follow a tournament (hear when it opens, starts and ends); leadMinutes: remind me that long before a scheduled start (absent: no reminder)";
|
|
6878
|
+
readonly tags: readonly ["tournaments"];
|
|
6879
|
+
};
|
|
6880
|
+
}, {
|
|
6881
|
+
user: SessionUser;
|
|
6882
|
+
clientId: string;
|
|
6883
|
+
}, {}, import("@ayepi/core").EmptyObject>;
|
|
6884
|
+
unfollowTournament: import("@ayepi/core").Endpoint<{
|
|
6885
|
+
readonly method: "DELETE";
|
|
6886
|
+
readonly path: "/tournaments/:id/follow";
|
|
6887
|
+
readonly params: z.ZodObject<{
|
|
6888
|
+
id: z.ZodCoercedNumber<unknown>;
|
|
6889
|
+
}, z.core.$strip>;
|
|
6890
|
+
readonly response: z.ZodObject<{
|
|
6891
|
+
ok: z.ZodLiteral<true>;
|
|
6892
|
+
}, z.core.$strip>;
|
|
6893
|
+
readonly errors: {
|
|
6894
|
+
readonly 401: ErrorBodySchema;
|
|
6895
|
+
readonly 403: ErrorBodySchema;
|
|
6896
|
+
readonly 404: ErrorBodySchema;
|
|
6897
|
+
};
|
|
6898
|
+
readonly doc: {
|
|
6899
|
+
readonly summary: "Stop following a tournament";
|
|
6900
|
+
readonly tags: readonly ["tournaments"];
|
|
6901
|
+
};
|
|
6902
|
+
}, {
|
|
6903
|
+
user: SessionUser;
|
|
6904
|
+
clientId: string;
|
|
6905
|
+
}, {}, import("@ayepi/core").EmptyObject>;
|
|
6906
|
+
startTournament: import("@ayepi/core").Endpoint<{
|
|
6907
|
+
readonly method: "POST";
|
|
6908
|
+
readonly path: "/tournaments/:id/start";
|
|
6909
|
+
readonly params: z.ZodObject<{
|
|
6910
|
+
id: z.ZodCoercedNumber<unknown>;
|
|
6911
|
+
}, z.core.$strip>;
|
|
6912
|
+
readonly response: z.ZodObject<{
|
|
6913
|
+
id: z.ZodNumber;
|
|
6914
|
+
title: z.ZodString;
|
|
6915
|
+
creator: z.ZodNullable<z.ZodObject<{
|
|
6916
|
+
id: z.ZodNumber;
|
|
6917
|
+
username: z.ZodString;
|
|
6918
|
+
avatar: z.ZodString;
|
|
6919
|
+
guest: z.ZodBoolean;
|
|
6920
|
+
}, z.core.$strip>>;
|
|
6921
|
+
visibility: z.ZodEnum<{
|
|
6922
|
+
open: "open";
|
|
6923
|
+
closed: "closed";
|
|
6924
|
+
}>;
|
|
6925
|
+
phase: z.ZodEnum<{
|
|
6926
|
+
done: "done";
|
|
6927
|
+
cancelled: "cancelled";
|
|
6928
|
+
signup: "signup";
|
|
6929
|
+
running: "running";
|
|
6930
|
+
}>;
|
|
6931
|
+
games: z.ZodArray<z.ZodString>;
|
|
6932
|
+
pick: z.ZodEnum<{
|
|
6933
|
+
fixed: "fixed";
|
|
6934
|
+
"random-once": "random-once";
|
|
6935
|
+
"random-each": "random-each";
|
|
6936
|
+
}>;
|
|
6937
|
+
game: z.ZodNullable<z.ZodString>;
|
|
6938
|
+
gameTitles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
6939
|
+
lives: z.ZodNumber;
|
|
6940
|
+
seeding: z.ZodEnum<{
|
|
6941
|
+
rank: "rank";
|
|
6942
|
+
random: "random";
|
|
6943
|
+
}>;
|
|
6944
|
+
start: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6945
|
+
kind: z.ZodLiteral<"scheduled">;
|
|
6946
|
+
at: z.ZodNumber;
|
|
6947
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6948
|
+
kind: z.ZodLiteral<"filled">;
|
|
6949
|
+
}, z.core.$strip>], "kind">;
|
|
6950
|
+
minPlayers: z.ZodNumber;
|
|
6951
|
+
maxPlayers: z.ZodNumber;
|
|
6952
|
+
readyMinutes: z.ZodNumber;
|
|
6953
|
+
entrants: z.ZodNumber;
|
|
6954
|
+
createdAt: z.ZodNumber;
|
|
6955
|
+
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
6956
|
+
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
6957
|
+
champion: z.ZodNullable<z.ZodObject<{
|
|
6958
|
+
id: z.ZodNumber;
|
|
6959
|
+
username: z.ZodString;
|
|
6960
|
+
avatar: z.ZodString;
|
|
6961
|
+
guest: z.ZodBoolean;
|
|
6962
|
+
}, z.core.$strip>>;
|
|
6963
|
+
me: z.ZodObject<{
|
|
6964
|
+
joined: z.ZodBoolean;
|
|
6965
|
+
invited: z.ZodBoolean;
|
|
6966
|
+
following: z.ZodBoolean;
|
|
6967
|
+
leadMinutes: z.ZodNullable<z.ZodNumber>;
|
|
6968
|
+
isCreator: z.ZodBoolean;
|
|
6969
|
+
stillIn: z.ZodBoolean;
|
|
6970
|
+
nextMatch: z.ZodNullable<z.ZodObject<{
|
|
6971
|
+
id: z.ZodString;
|
|
6972
|
+
opponent: z.ZodNullable<z.ZodObject<{
|
|
6973
|
+
id: z.ZodNumber;
|
|
6974
|
+
username: z.ZodString;
|
|
6975
|
+
avatar: z.ZodString;
|
|
6976
|
+
guest: z.ZodBoolean;
|
|
6977
|
+
}, z.core.$strip>>;
|
|
6978
|
+
game: z.ZodString;
|
|
6979
|
+
gameTitle: z.ZodString;
|
|
6980
|
+
deadlineAt: z.ZodNumber;
|
|
6981
|
+
started: z.ZodBoolean;
|
|
6982
|
+
}, z.core.$strip>>;
|
|
6983
|
+
}, z.core.$strip>;
|
|
6984
|
+
players: z.ZodArray<z.ZodObject<{
|
|
6985
|
+
user: z.ZodObject<{
|
|
6986
|
+
id: z.ZodNumber;
|
|
6987
|
+
username: z.ZodString;
|
|
6988
|
+
avatar: z.ZodString;
|
|
6989
|
+
guest: z.ZodBoolean;
|
|
6990
|
+
}, z.core.$strip>;
|
|
6991
|
+
seed: z.ZodNullable<z.ZodNumber>;
|
|
6992
|
+
wins: z.ZodNumber;
|
|
6993
|
+
losses: z.ZodNumber;
|
|
6994
|
+
out: z.ZodBoolean;
|
|
6995
|
+
}, z.core.$strip>>;
|
|
6996
|
+
matches: z.ZodArray<z.ZodObject<{
|
|
6997
|
+
id: z.ZodString;
|
|
6998
|
+
stage: z.ZodEnum<{
|
|
6999
|
+
winners: "winners";
|
|
7000
|
+
redemption: "redemption";
|
|
7001
|
+
final: "final";
|
|
7002
|
+
}>;
|
|
7003
|
+
level: z.ZodNumber;
|
|
7004
|
+
round: z.ZodNumber;
|
|
7005
|
+
slot: z.ZodNumber;
|
|
7006
|
+
a: z.ZodNullable<z.ZodNumber>;
|
|
7007
|
+
b: z.ZodNullable<z.ZodNumber>;
|
|
7008
|
+
status: z.ZodEnum<{
|
|
7009
|
+
ready: "ready";
|
|
7010
|
+
waiting: "waiting";
|
|
7011
|
+
done: "done";
|
|
7012
|
+
}>;
|
|
7013
|
+
winnerId: z.ZodNullable<z.ZodNumber>;
|
|
7014
|
+
decision: z.ZodNullable<z.ZodEnum<{
|
|
7015
|
+
forfeit: "forfeit";
|
|
7016
|
+
timeout: "timeout";
|
|
7017
|
+
withdrawn: "withdrawn";
|
|
7018
|
+
played: "played";
|
|
7019
|
+
bye: "bye";
|
|
7020
|
+
}>>;
|
|
7021
|
+
game: z.ZodNullable<z.ZodString>;
|
|
7022
|
+
deadlineAt: z.ZodNullable<z.ZodNumber>;
|
|
7023
|
+
started: z.ZodBoolean;
|
|
7024
|
+
}, z.core.$strip>>;
|
|
7025
|
+
inviteUrl: z.ZodNullable<z.ZodString>;
|
|
7026
|
+
}, z.core.$strip>;
|
|
7027
|
+
readonly errors: {
|
|
7028
|
+
readonly 401: ErrorBodySchema;
|
|
7029
|
+
readonly 403: ErrorBodySchema;
|
|
7030
|
+
readonly 404: ErrorBodySchema;
|
|
7031
|
+
readonly 409: ErrorBodySchema;
|
|
7032
|
+
};
|
|
7033
|
+
readonly doc: {
|
|
7034
|
+
readonly summary: "Creator: start now with whoever signed up (at least two)";
|
|
7035
|
+
readonly tags: readonly ["tournaments"];
|
|
7036
|
+
};
|
|
7037
|
+
}, {
|
|
7038
|
+
user: SessionUser;
|
|
7039
|
+
clientId: string;
|
|
7040
|
+
}, {}, import("@ayepi/core").EmptyObject>;
|
|
7041
|
+
cancelTournament: import("@ayepi/core").Endpoint<{
|
|
7042
|
+
readonly method: "DELETE";
|
|
7043
|
+
readonly path: "/tournaments/:id";
|
|
7044
|
+
readonly params: z.ZodObject<{
|
|
7045
|
+
id: z.ZodCoercedNumber<unknown>;
|
|
7046
|
+
}, z.core.$strip>;
|
|
7047
|
+
readonly response: z.ZodObject<{
|
|
7048
|
+
ok: z.ZodLiteral<true>;
|
|
7049
|
+
}, z.core.$strip>;
|
|
7050
|
+
readonly errors: {
|
|
7051
|
+
readonly 401: ErrorBodySchema;
|
|
7052
|
+
readonly 403: ErrorBodySchema;
|
|
7053
|
+
readonly 404: ErrorBodySchema;
|
|
7054
|
+
readonly 409: ErrorBodySchema;
|
|
7055
|
+
};
|
|
7056
|
+
readonly doc: {
|
|
7057
|
+
readonly summary: "Creator (or an admin): cancel a tournament that has not finished";
|
|
7058
|
+
readonly tags: readonly ["tournaments"];
|
|
7059
|
+
};
|
|
7060
|
+
}, {
|
|
7061
|
+
user: SessionUser;
|
|
7062
|
+
clientId: string;
|
|
7063
|
+
}, {}, import("@ayepi/core").EmptyObject>;
|
|
7064
|
+
listTournaments: import("@ayepi/core").Endpoint<{
|
|
7065
|
+
readonly method: "GET";
|
|
7066
|
+
readonly path: "/tournaments";
|
|
7067
|
+
readonly query: z.ZodObject<{
|
|
7068
|
+
game: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>>;
|
|
7069
|
+
}, z.core.$strip>;
|
|
7070
|
+
readonly response: z.ZodObject<{
|
|
7071
|
+
tournaments: z.ZodArray<z.ZodObject<{
|
|
7072
|
+
id: z.ZodNumber;
|
|
7073
|
+
title: z.ZodString;
|
|
7074
|
+
creator: z.ZodNullable<z.ZodObject<{
|
|
7075
|
+
id: z.ZodNumber;
|
|
7076
|
+
username: z.ZodString;
|
|
7077
|
+
avatar: z.ZodString;
|
|
7078
|
+
guest: z.ZodBoolean;
|
|
7079
|
+
}, z.core.$strip>>;
|
|
7080
|
+
visibility: z.ZodEnum<{
|
|
7081
|
+
open: "open";
|
|
7082
|
+
closed: "closed";
|
|
7083
|
+
}>;
|
|
7084
|
+
phase: z.ZodEnum<{
|
|
7085
|
+
done: "done";
|
|
7086
|
+
cancelled: "cancelled";
|
|
7087
|
+
signup: "signup";
|
|
7088
|
+
running: "running";
|
|
7089
|
+
}>;
|
|
7090
|
+
games: z.ZodArray<z.ZodString>;
|
|
7091
|
+
pick: z.ZodEnum<{
|
|
7092
|
+
fixed: "fixed";
|
|
7093
|
+
"random-once": "random-once";
|
|
7094
|
+
"random-each": "random-each";
|
|
7095
|
+
}>;
|
|
7096
|
+
game: z.ZodNullable<z.ZodString>;
|
|
7097
|
+
gameTitles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
7098
|
+
lives: z.ZodNumber;
|
|
7099
|
+
seeding: z.ZodEnum<{
|
|
7100
|
+
rank: "rank";
|
|
7101
|
+
random: "random";
|
|
7102
|
+
}>;
|
|
7103
|
+
start: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7104
|
+
kind: z.ZodLiteral<"scheduled">;
|
|
7105
|
+
at: z.ZodNumber;
|
|
7106
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7107
|
+
kind: z.ZodLiteral<"filled">;
|
|
7108
|
+
}, z.core.$strip>], "kind">;
|
|
7109
|
+
minPlayers: z.ZodNumber;
|
|
7110
|
+
maxPlayers: z.ZodNumber;
|
|
7111
|
+
readyMinutes: z.ZodNumber;
|
|
7112
|
+
entrants: z.ZodNumber;
|
|
7113
|
+
createdAt: z.ZodNumber;
|
|
7114
|
+
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
7115
|
+
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
7116
|
+
champion: z.ZodNullable<z.ZodObject<{
|
|
7117
|
+
id: z.ZodNumber;
|
|
7118
|
+
username: z.ZodString;
|
|
7119
|
+
avatar: z.ZodString;
|
|
7120
|
+
guest: z.ZodBoolean;
|
|
7121
|
+
}, z.core.$strip>>;
|
|
7122
|
+
me: z.ZodObject<{
|
|
7123
|
+
joined: z.ZodBoolean;
|
|
7124
|
+
invited: z.ZodBoolean;
|
|
7125
|
+
following: z.ZodBoolean;
|
|
7126
|
+
leadMinutes: z.ZodNullable<z.ZodNumber>;
|
|
7127
|
+
isCreator: z.ZodBoolean;
|
|
7128
|
+
stillIn: z.ZodBoolean;
|
|
7129
|
+
nextMatch: z.ZodNullable<z.ZodObject<{
|
|
7130
|
+
id: z.ZodString;
|
|
7131
|
+
opponent: z.ZodNullable<z.ZodObject<{
|
|
7132
|
+
id: z.ZodNumber;
|
|
7133
|
+
username: z.ZodString;
|
|
7134
|
+
avatar: z.ZodString;
|
|
7135
|
+
guest: z.ZodBoolean;
|
|
7136
|
+
}, z.core.$strip>>;
|
|
7137
|
+
game: z.ZodString;
|
|
7138
|
+
gameTitle: z.ZodString;
|
|
7139
|
+
deadlineAt: z.ZodNumber;
|
|
7140
|
+
started: z.ZodBoolean;
|
|
7141
|
+
}, z.core.$strip>>;
|
|
7142
|
+
}, z.core.$strip>;
|
|
7143
|
+
}, z.core.$strip>>;
|
|
7144
|
+
}, z.core.$strip>;
|
|
7145
|
+
readonly doc: {
|
|
7146
|
+
readonly summary: "Open tournaments plus the ones I am in, invited to or follow, soonest first";
|
|
7147
|
+
readonly tags: readonly ["tournaments"];
|
|
7148
|
+
};
|
|
7149
|
+
}, {
|
|
7150
|
+
user: SessionUser | null;
|
|
7151
|
+
clientId: string;
|
|
7152
|
+
}, {}, import("@ayepi/core").EmptyObject>;
|
|
7153
|
+
getTournament: import("@ayepi/core").Endpoint<{
|
|
7154
|
+
readonly method: "GET";
|
|
7155
|
+
readonly path: "/tournaments/:id";
|
|
7156
|
+
readonly params: z.ZodObject<{
|
|
7157
|
+
id: z.ZodCoercedNumber<unknown>;
|
|
7158
|
+
}, z.core.$strip>;
|
|
7159
|
+
readonly query: z.ZodObject<{
|
|
7160
|
+
key: z.ZodOptional<z.ZodString>;
|
|
7161
|
+
}, z.core.$strip>;
|
|
7162
|
+
readonly response: z.ZodObject<{
|
|
7163
|
+
id: z.ZodNumber;
|
|
7164
|
+
title: z.ZodString;
|
|
7165
|
+
creator: z.ZodNullable<z.ZodObject<{
|
|
7166
|
+
id: z.ZodNumber;
|
|
7167
|
+
username: z.ZodString;
|
|
7168
|
+
avatar: z.ZodString;
|
|
7169
|
+
guest: z.ZodBoolean;
|
|
7170
|
+
}, z.core.$strip>>;
|
|
7171
|
+
visibility: z.ZodEnum<{
|
|
7172
|
+
open: "open";
|
|
7173
|
+
closed: "closed";
|
|
7174
|
+
}>;
|
|
7175
|
+
phase: z.ZodEnum<{
|
|
7176
|
+
done: "done";
|
|
7177
|
+
cancelled: "cancelled";
|
|
7178
|
+
signup: "signup";
|
|
7179
|
+
running: "running";
|
|
7180
|
+
}>;
|
|
7181
|
+
games: z.ZodArray<z.ZodString>;
|
|
7182
|
+
pick: z.ZodEnum<{
|
|
7183
|
+
fixed: "fixed";
|
|
7184
|
+
"random-once": "random-once";
|
|
7185
|
+
"random-each": "random-each";
|
|
7186
|
+
}>;
|
|
7187
|
+
game: z.ZodNullable<z.ZodString>;
|
|
7188
|
+
gameTitles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
7189
|
+
lives: z.ZodNumber;
|
|
7190
|
+
seeding: z.ZodEnum<{
|
|
7191
|
+
rank: "rank";
|
|
7192
|
+
random: "random";
|
|
7193
|
+
}>;
|
|
7194
|
+
start: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7195
|
+
kind: z.ZodLiteral<"scheduled">;
|
|
7196
|
+
at: z.ZodNumber;
|
|
7197
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7198
|
+
kind: z.ZodLiteral<"filled">;
|
|
7199
|
+
}, z.core.$strip>], "kind">;
|
|
7200
|
+
minPlayers: z.ZodNumber;
|
|
7201
|
+
maxPlayers: z.ZodNumber;
|
|
7202
|
+
readyMinutes: z.ZodNumber;
|
|
7203
|
+
entrants: z.ZodNumber;
|
|
7204
|
+
createdAt: z.ZodNumber;
|
|
7205
|
+
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
7206
|
+
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
7207
|
+
champion: z.ZodNullable<z.ZodObject<{
|
|
7208
|
+
id: z.ZodNumber;
|
|
7209
|
+
username: z.ZodString;
|
|
7210
|
+
avatar: z.ZodString;
|
|
7211
|
+
guest: z.ZodBoolean;
|
|
7212
|
+
}, z.core.$strip>>;
|
|
7213
|
+
me: z.ZodObject<{
|
|
7214
|
+
joined: z.ZodBoolean;
|
|
7215
|
+
invited: z.ZodBoolean;
|
|
7216
|
+
following: z.ZodBoolean;
|
|
7217
|
+
leadMinutes: z.ZodNullable<z.ZodNumber>;
|
|
7218
|
+
isCreator: z.ZodBoolean;
|
|
7219
|
+
stillIn: z.ZodBoolean;
|
|
7220
|
+
nextMatch: z.ZodNullable<z.ZodObject<{
|
|
7221
|
+
id: z.ZodString;
|
|
7222
|
+
opponent: z.ZodNullable<z.ZodObject<{
|
|
7223
|
+
id: z.ZodNumber;
|
|
7224
|
+
username: z.ZodString;
|
|
7225
|
+
avatar: z.ZodString;
|
|
7226
|
+
guest: z.ZodBoolean;
|
|
7227
|
+
}, z.core.$strip>>;
|
|
7228
|
+
game: z.ZodString;
|
|
7229
|
+
gameTitle: z.ZodString;
|
|
7230
|
+
deadlineAt: z.ZodNumber;
|
|
7231
|
+
started: z.ZodBoolean;
|
|
7232
|
+
}, z.core.$strip>>;
|
|
7233
|
+
}, z.core.$strip>;
|
|
7234
|
+
players: z.ZodArray<z.ZodObject<{
|
|
7235
|
+
user: z.ZodObject<{
|
|
7236
|
+
id: z.ZodNumber;
|
|
7237
|
+
username: z.ZodString;
|
|
7238
|
+
avatar: z.ZodString;
|
|
7239
|
+
guest: z.ZodBoolean;
|
|
7240
|
+
}, z.core.$strip>;
|
|
7241
|
+
seed: z.ZodNullable<z.ZodNumber>;
|
|
7242
|
+
wins: z.ZodNumber;
|
|
7243
|
+
losses: z.ZodNumber;
|
|
7244
|
+
out: z.ZodBoolean;
|
|
7245
|
+
}, z.core.$strip>>;
|
|
7246
|
+
matches: z.ZodArray<z.ZodObject<{
|
|
7247
|
+
id: z.ZodString;
|
|
7248
|
+
stage: z.ZodEnum<{
|
|
7249
|
+
winners: "winners";
|
|
7250
|
+
redemption: "redemption";
|
|
7251
|
+
final: "final";
|
|
7252
|
+
}>;
|
|
7253
|
+
level: z.ZodNumber;
|
|
7254
|
+
round: z.ZodNumber;
|
|
7255
|
+
slot: z.ZodNumber;
|
|
7256
|
+
a: z.ZodNullable<z.ZodNumber>;
|
|
7257
|
+
b: z.ZodNullable<z.ZodNumber>;
|
|
7258
|
+
status: z.ZodEnum<{
|
|
7259
|
+
ready: "ready";
|
|
7260
|
+
waiting: "waiting";
|
|
7261
|
+
done: "done";
|
|
7262
|
+
}>;
|
|
7263
|
+
winnerId: z.ZodNullable<z.ZodNumber>;
|
|
7264
|
+
decision: z.ZodNullable<z.ZodEnum<{
|
|
7265
|
+
forfeit: "forfeit";
|
|
7266
|
+
timeout: "timeout";
|
|
7267
|
+
withdrawn: "withdrawn";
|
|
7268
|
+
played: "played";
|
|
7269
|
+
bye: "bye";
|
|
7270
|
+
}>>;
|
|
7271
|
+
game: z.ZodNullable<z.ZodString>;
|
|
7272
|
+
deadlineAt: z.ZodNullable<z.ZodNumber>;
|
|
7273
|
+
started: z.ZodBoolean;
|
|
7274
|
+
}, z.core.$strip>>;
|
|
7275
|
+
inviteUrl: z.ZodNullable<z.ZodString>;
|
|
7276
|
+
}, z.core.$strip>;
|
|
7277
|
+
readonly errors: {
|
|
7278
|
+
readonly 404: ErrorBodySchema;
|
|
7279
|
+
};
|
|
7280
|
+
readonly doc: {
|
|
7281
|
+
readonly summary: "A tournament with its players and bracket (404 for a closed one not shared with me)";
|
|
7282
|
+
readonly tags: readonly ["tournaments"];
|
|
7283
|
+
};
|
|
7284
|
+
}, {
|
|
7285
|
+
user: SessionUser | null;
|
|
7286
|
+
clientId: string;
|
|
7287
|
+
}, {}, import("@ayepi/core").EmptyObject>;
|
|
7288
|
+
};
|
|
7289
|
+
//#endregion
|
|
7290
|
+
//#region src/api/tournaments/play-online.d.ts
|
|
7291
|
+
/** A public lobby or race waiting for players right now. */
|
|
7292
|
+
export declare const OpenLobbyEntry: z.ZodObject<{
|
|
7293
|
+
host: z.ZodObject<{
|
|
7294
|
+
id: z.ZodNumber;
|
|
7295
|
+
username: z.ZodString;
|
|
7296
|
+
avatar: z.ZodString;
|
|
7297
|
+
guest: z.ZodBoolean;
|
|
7298
|
+
}, z.core.$strip>;
|
|
7299
|
+
game: z.ZodString;
|
|
7300
|
+
gameTitle: z.ZodString;
|
|
7301
|
+
mode: z.ZodOptional<z.ZodString>;
|
|
7302
|
+
openSeats: z.ZodNumber;
|
|
7303
|
+
since: z.ZodNumber;
|
|
7304
|
+
}, z.core.$strip>;
|
|
7305
|
+
/** A public lobby or race waiting for players. */
|
|
7306
|
+
export type OpenLobbyEntry = z.infer<typeof OpenLobbyEntry>;
|
|
7307
|
+
/** The counts on the home card. */
|
|
7308
|
+
export declare const PlayOnlineCounts: z.ZodObject<{
|
|
7309
|
+
now: z.ZodNumber;
|
|
7310
|
+
invites: z.ZodNumber;
|
|
7311
|
+
mine: z.ZodNumber;
|
|
7312
|
+
upcoming: z.ZodNumber;
|
|
7313
|
+
}, z.core.$strip>;
|
|
7314
|
+
/** The counts on the home card. */
|
|
7315
|
+
export type PlayOnlineCounts = z.infer<typeof PlayOnlineCounts>;
|
|
7316
|
+
/** Everything playable online for the viewer. */
|
|
7317
|
+
export declare const PlayOnline: z.ZodObject<{
|
|
7318
|
+
counts: z.ZodObject<{
|
|
7319
|
+
now: z.ZodNumber;
|
|
7320
|
+
invites: z.ZodNumber;
|
|
7321
|
+
mine: z.ZodNumber;
|
|
7322
|
+
upcoming: z.ZodNumber;
|
|
7323
|
+
}, z.core.$strip>;
|
|
7324
|
+
lobbies: z.ZodArray<z.ZodObject<{
|
|
7325
|
+
host: z.ZodObject<{
|
|
7326
|
+
id: z.ZodNumber;
|
|
7327
|
+
username: z.ZodString;
|
|
7328
|
+
avatar: z.ZodString;
|
|
7329
|
+
guest: z.ZodBoolean;
|
|
7330
|
+
}, z.core.$strip>;
|
|
7331
|
+
game: z.ZodString;
|
|
7332
|
+
gameTitle: z.ZodString;
|
|
7333
|
+
mode: z.ZodOptional<z.ZodString>;
|
|
7334
|
+
openSeats: z.ZodNumber;
|
|
7335
|
+
since: z.ZodNumber;
|
|
7336
|
+
}, z.core.$strip>>;
|
|
7337
|
+
gameInvites: z.ZodArray<z.ZodObject<{
|
|
7338
|
+
id: z.ZodString;
|
|
7339
|
+
from: z.ZodObject<{
|
|
7340
|
+
id: z.ZodNumber;
|
|
7341
|
+
username: z.ZodString;
|
|
7342
|
+
avatar: z.ZodString;
|
|
7343
|
+
guest: z.ZodBoolean;
|
|
7344
|
+
}, z.core.$strip>;
|
|
7345
|
+
to: z.ZodObject<{
|
|
7346
|
+
id: z.ZodNumber;
|
|
7347
|
+
username: z.ZodString;
|
|
7348
|
+
avatar: z.ZodString;
|
|
7349
|
+
guest: z.ZodBoolean;
|
|
7350
|
+
}, z.core.$strip>;
|
|
7351
|
+
game: z.ZodString;
|
|
7352
|
+
gameTitle: z.ZodString;
|
|
7353
|
+
mode: z.ZodOptional<z.ZodString>;
|
|
7354
|
+
partyId: z.ZodString;
|
|
7355
|
+
expiresAt: z.ZodNumber;
|
|
7356
|
+
}, z.core.$strip>>;
|
|
7357
|
+
tournamentInvites: z.ZodArray<z.ZodObject<{
|
|
7358
|
+
id: z.ZodNumber;
|
|
7359
|
+
title: z.ZodString;
|
|
7360
|
+
creator: z.ZodNullable<z.ZodObject<{
|
|
7361
|
+
id: z.ZodNumber;
|
|
7362
|
+
username: z.ZodString;
|
|
7363
|
+
avatar: z.ZodString;
|
|
7364
|
+
guest: z.ZodBoolean;
|
|
7365
|
+
}, z.core.$strip>>;
|
|
7366
|
+
visibility: z.ZodEnum<{
|
|
7367
|
+
open: "open";
|
|
7368
|
+
closed: "closed";
|
|
7369
|
+
}>;
|
|
7370
|
+
phase: z.ZodEnum<{
|
|
7371
|
+
done: "done";
|
|
7372
|
+
cancelled: "cancelled";
|
|
7373
|
+
signup: "signup";
|
|
7374
|
+
running: "running";
|
|
7375
|
+
}>;
|
|
7376
|
+
games: z.ZodArray<z.ZodString>;
|
|
7377
|
+
pick: z.ZodEnum<{
|
|
7378
|
+
fixed: "fixed";
|
|
7379
|
+
"random-once": "random-once";
|
|
7380
|
+
"random-each": "random-each";
|
|
7381
|
+
}>;
|
|
7382
|
+
game: z.ZodNullable<z.ZodString>;
|
|
7383
|
+
gameTitles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
7384
|
+
lives: z.ZodNumber;
|
|
7385
|
+
seeding: z.ZodEnum<{
|
|
7386
|
+
rank: "rank";
|
|
7387
|
+
random: "random";
|
|
7388
|
+
}>;
|
|
7389
|
+
start: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7390
|
+
kind: z.ZodLiteral<"scheduled">;
|
|
7391
|
+
at: z.ZodNumber;
|
|
7392
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7393
|
+
kind: z.ZodLiteral<"filled">;
|
|
7394
|
+
}, z.core.$strip>], "kind">;
|
|
7395
|
+
minPlayers: z.ZodNumber;
|
|
7396
|
+
maxPlayers: z.ZodNumber;
|
|
7397
|
+
readyMinutes: z.ZodNumber;
|
|
7398
|
+
entrants: z.ZodNumber;
|
|
7399
|
+
createdAt: z.ZodNumber;
|
|
7400
|
+
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
7401
|
+
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
7402
|
+
champion: z.ZodNullable<z.ZodObject<{
|
|
7403
|
+
id: z.ZodNumber;
|
|
7404
|
+
username: z.ZodString;
|
|
7405
|
+
avatar: z.ZodString;
|
|
7406
|
+
guest: z.ZodBoolean;
|
|
7407
|
+
}, z.core.$strip>>;
|
|
7408
|
+
me: z.ZodObject<{
|
|
7409
|
+
joined: z.ZodBoolean;
|
|
7410
|
+
invited: z.ZodBoolean;
|
|
7411
|
+
following: z.ZodBoolean;
|
|
7412
|
+
leadMinutes: z.ZodNullable<z.ZodNumber>;
|
|
7413
|
+
isCreator: z.ZodBoolean;
|
|
7414
|
+
stillIn: z.ZodBoolean;
|
|
7415
|
+
nextMatch: z.ZodNullable<z.ZodObject<{
|
|
7416
|
+
id: z.ZodString;
|
|
7417
|
+
opponent: z.ZodNullable<z.ZodObject<{
|
|
7418
|
+
id: z.ZodNumber;
|
|
7419
|
+
username: z.ZodString;
|
|
7420
|
+
avatar: z.ZodString;
|
|
7421
|
+
guest: z.ZodBoolean;
|
|
7422
|
+
}, z.core.$strip>>;
|
|
7423
|
+
game: z.ZodString;
|
|
7424
|
+
gameTitle: z.ZodString;
|
|
7425
|
+
deadlineAt: z.ZodNumber;
|
|
7426
|
+
started: z.ZodBoolean;
|
|
7427
|
+
}, z.core.$strip>>;
|
|
7428
|
+
}, z.core.$strip>;
|
|
7429
|
+
}, z.core.$strip>>;
|
|
7430
|
+
mine: z.ZodArray<z.ZodObject<{
|
|
7431
|
+
id: z.ZodNumber;
|
|
7432
|
+
title: z.ZodString;
|
|
7433
|
+
creator: z.ZodNullable<z.ZodObject<{
|
|
7434
|
+
id: z.ZodNumber;
|
|
7435
|
+
username: z.ZodString;
|
|
7436
|
+
avatar: z.ZodString;
|
|
7437
|
+
guest: z.ZodBoolean;
|
|
7438
|
+
}, z.core.$strip>>;
|
|
7439
|
+
visibility: z.ZodEnum<{
|
|
7440
|
+
open: "open";
|
|
7441
|
+
closed: "closed";
|
|
7442
|
+
}>;
|
|
7443
|
+
phase: z.ZodEnum<{
|
|
7444
|
+
done: "done";
|
|
7445
|
+
cancelled: "cancelled";
|
|
7446
|
+
signup: "signup";
|
|
7447
|
+
running: "running";
|
|
7448
|
+
}>;
|
|
7449
|
+
games: z.ZodArray<z.ZodString>;
|
|
7450
|
+
pick: z.ZodEnum<{
|
|
7451
|
+
fixed: "fixed";
|
|
7452
|
+
"random-once": "random-once";
|
|
7453
|
+
"random-each": "random-each";
|
|
7454
|
+
}>;
|
|
7455
|
+
game: z.ZodNullable<z.ZodString>;
|
|
7456
|
+
gameTitles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
7457
|
+
lives: z.ZodNumber;
|
|
7458
|
+
seeding: z.ZodEnum<{
|
|
7459
|
+
rank: "rank";
|
|
7460
|
+
random: "random";
|
|
7461
|
+
}>;
|
|
7462
|
+
start: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7463
|
+
kind: z.ZodLiteral<"scheduled">;
|
|
7464
|
+
at: z.ZodNumber;
|
|
7465
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7466
|
+
kind: z.ZodLiteral<"filled">;
|
|
7467
|
+
}, z.core.$strip>], "kind">;
|
|
7468
|
+
minPlayers: z.ZodNumber;
|
|
7469
|
+
maxPlayers: z.ZodNumber;
|
|
7470
|
+
readyMinutes: z.ZodNumber;
|
|
7471
|
+
entrants: z.ZodNumber;
|
|
7472
|
+
createdAt: z.ZodNumber;
|
|
7473
|
+
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
7474
|
+
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
7475
|
+
champion: z.ZodNullable<z.ZodObject<{
|
|
7476
|
+
id: z.ZodNumber;
|
|
7477
|
+
username: z.ZodString;
|
|
7478
|
+
avatar: z.ZodString;
|
|
7479
|
+
guest: z.ZodBoolean;
|
|
7480
|
+
}, z.core.$strip>>;
|
|
7481
|
+
me: z.ZodObject<{
|
|
7482
|
+
joined: z.ZodBoolean;
|
|
7483
|
+
invited: z.ZodBoolean;
|
|
7484
|
+
following: z.ZodBoolean;
|
|
7485
|
+
leadMinutes: z.ZodNullable<z.ZodNumber>;
|
|
7486
|
+
isCreator: z.ZodBoolean;
|
|
7487
|
+
stillIn: z.ZodBoolean;
|
|
7488
|
+
nextMatch: z.ZodNullable<z.ZodObject<{
|
|
7489
|
+
id: z.ZodString;
|
|
7490
|
+
opponent: z.ZodNullable<z.ZodObject<{
|
|
7491
|
+
id: z.ZodNumber;
|
|
7492
|
+
username: z.ZodString;
|
|
7493
|
+
avatar: z.ZodString;
|
|
7494
|
+
guest: z.ZodBoolean;
|
|
7495
|
+
}, z.core.$strip>>;
|
|
7496
|
+
game: z.ZodString;
|
|
7497
|
+
gameTitle: z.ZodString;
|
|
7498
|
+
deadlineAt: z.ZodNumber;
|
|
7499
|
+
started: z.ZodBoolean;
|
|
7500
|
+
}, z.core.$strip>>;
|
|
7501
|
+
}, z.core.$strip>;
|
|
7502
|
+
}, z.core.$strip>>;
|
|
7503
|
+
upcoming: z.ZodArray<z.ZodObject<{
|
|
7504
|
+
id: z.ZodNumber;
|
|
7505
|
+
title: z.ZodString;
|
|
7506
|
+
creator: z.ZodNullable<z.ZodObject<{
|
|
7507
|
+
id: z.ZodNumber;
|
|
7508
|
+
username: z.ZodString;
|
|
7509
|
+
avatar: z.ZodString;
|
|
7510
|
+
guest: z.ZodBoolean;
|
|
7511
|
+
}, z.core.$strip>>;
|
|
7512
|
+
visibility: z.ZodEnum<{
|
|
7513
|
+
open: "open";
|
|
7514
|
+
closed: "closed";
|
|
7515
|
+
}>;
|
|
7516
|
+
phase: z.ZodEnum<{
|
|
7517
|
+
done: "done";
|
|
7518
|
+
cancelled: "cancelled";
|
|
7519
|
+
signup: "signup";
|
|
7520
|
+
running: "running";
|
|
7521
|
+
}>;
|
|
7522
|
+
games: z.ZodArray<z.ZodString>;
|
|
7523
|
+
pick: z.ZodEnum<{
|
|
7524
|
+
fixed: "fixed";
|
|
7525
|
+
"random-once": "random-once";
|
|
7526
|
+
"random-each": "random-each";
|
|
7527
|
+
}>;
|
|
7528
|
+
game: z.ZodNullable<z.ZodString>;
|
|
7529
|
+
gameTitles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
7530
|
+
lives: z.ZodNumber;
|
|
7531
|
+
seeding: z.ZodEnum<{
|
|
7532
|
+
rank: "rank";
|
|
7533
|
+
random: "random";
|
|
7534
|
+
}>;
|
|
7535
|
+
start: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7536
|
+
kind: z.ZodLiteral<"scheduled">;
|
|
7537
|
+
at: z.ZodNumber;
|
|
7538
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7539
|
+
kind: z.ZodLiteral<"filled">;
|
|
7540
|
+
}, z.core.$strip>], "kind">;
|
|
7541
|
+
minPlayers: z.ZodNumber;
|
|
7542
|
+
maxPlayers: z.ZodNumber;
|
|
7543
|
+
readyMinutes: z.ZodNumber;
|
|
7544
|
+
entrants: z.ZodNumber;
|
|
7545
|
+
createdAt: z.ZodNumber;
|
|
7546
|
+
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
7547
|
+
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
7548
|
+
champion: z.ZodNullable<z.ZodObject<{
|
|
7549
|
+
id: z.ZodNumber;
|
|
7550
|
+
username: z.ZodString;
|
|
7551
|
+
avatar: z.ZodString;
|
|
7552
|
+
guest: z.ZodBoolean;
|
|
7553
|
+
}, z.core.$strip>>;
|
|
7554
|
+
me: z.ZodObject<{
|
|
7555
|
+
joined: z.ZodBoolean;
|
|
7556
|
+
invited: z.ZodBoolean;
|
|
7557
|
+
following: z.ZodBoolean;
|
|
7558
|
+
leadMinutes: z.ZodNullable<z.ZodNumber>;
|
|
7559
|
+
isCreator: z.ZodBoolean;
|
|
7560
|
+
stillIn: z.ZodBoolean;
|
|
7561
|
+
nextMatch: z.ZodNullable<z.ZodObject<{
|
|
7562
|
+
id: z.ZodString;
|
|
7563
|
+
opponent: z.ZodNullable<z.ZodObject<{
|
|
7564
|
+
id: z.ZodNumber;
|
|
7565
|
+
username: z.ZodString;
|
|
7566
|
+
avatar: z.ZodString;
|
|
7567
|
+
guest: z.ZodBoolean;
|
|
7568
|
+
}, z.core.$strip>>;
|
|
7569
|
+
game: z.ZodString;
|
|
7570
|
+
gameTitle: z.ZodString;
|
|
7571
|
+
deadlineAt: z.ZodNumber;
|
|
7572
|
+
started: z.ZodBoolean;
|
|
7573
|
+
}, z.core.$strip>>;
|
|
7574
|
+
}, z.core.$strip>;
|
|
7575
|
+
}, z.core.$strip>>;
|
|
7576
|
+
}, z.core.$strip>;
|
|
7577
|
+
/** Everything playable online for the viewer. */
|
|
7578
|
+
export type PlayOnline = z.infer<typeof PlayOnline>;
|
|
7579
|
+
/** The play-online endpoint. Signed-out visitors get the open tournaments only. */
|
|
7580
|
+
export declare const playOnlineEndpoints: {
|
|
7581
|
+
getPlayOnline: import("@ayepi/core").Endpoint<{
|
|
7582
|
+
readonly method: "GET";
|
|
7583
|
+
readonly path: "/play-online";
|
|
7584
|
+
readonly response: z.ZodObject<{
|
|
7585
|
+
counts: z.ZodObject<{
|
|
7586
|
+
now: z.ZodNumber;
|
|
7587
|
+
invites: z.ZodNumber;
|
|
7588
|
+
mine: z.ZodNumber;
|
|
7589
|
+
upcoming: z.ZodNumber;
|
|
7590
|
+
}, z.core.$strip>;
|
|
7591
|
+
lobbies: z.ZodArray<z.ZodObject<{
|
|
7592
|
+
host: z.ZodObject<{
|
|
7593
|
+
id: z.ZodNumber;
|
|
7594
|
+
username: z.ZodString;
|
|
7595
|
+
avatar: z.ZodString;
|
|
7596
|
+
guest: z.ZodBoolean;
|
|
7597
|
+
}, z.core.$strip>;
|
|
7598
|
+
game: z.ZodString;
|
|
7599
|
+
gameTitle: z.ZodString;
|
|
7600
|
+
mode: z.ZodOptional<z.ZodString>;
|
|
7601
|
+
openSeats: z.ZodNumber;
|
|
7602
|
+
since: z.ZodNumber;
|
|
7603
|
+
}, z.core.$strip>>;
|
|
7604
|
+
gameInvites: z.ZodArray<z.ZodObject<{
|
|
7605
|
+
id: z.ZodString;
|
|
7606
|
+
from: z.ZodObject<{
|
|
7607
|
+
id: z.ZodNumber;
|
|
7608
|
+
username: z.ZodString;
|
|
7609
|
+
avatar: z.ZodString;
|
|
7610
|
+
guest: z.ZodBoolean;
|
|
7611
|
+
}, z.core.$strip>;
|
|
7612
|
+
to: z.ZodObject<{
|
|
7613
|
+
id: z.ZodNumber;
|
|
7614
|
+
username: z.ZodString;
|
|
7615
|
+
avatar: z.ZodString;
|
|
7616
|
+
guest: z.ZodBoolean;
|
|
7617
|
+
}, z.core.$strip>;
|
|
7618
|
+
game: z.ZodString;
|
|
7619
|
+
gameTitle: z.ZodString;
|
|
7620
|
+
mode: z.ZodOptional<z.ZodString>;
|
|
7621
|
+
partyId: z.ZodString;
|
|
7622
|
+
expiresAt: z.ZodNumber;
|
|
7623
|
+
}, z.core.$strip>>;
|
|
7624
|
+
tournamentInvites: z.ZodArray<z.ZodObject<{
|
|
7625
|
+
id: z.ZodNumber;
|
|
7626
|
+
title: z.ZodString;
|
|
7627
|
+
creator: z.ZodNullable<z.ZodObject<{
|
|
7628
|
+
id: z.ZodNumber;
|
|
7629
|
+
username: z.ZodString;
|
|
7630
|
+
avatar: z.ZodString;
|
|
7631
|
+
guest: z.ZodBoolean;
|
|
7632
|
+
}, z.core.$strip>>;
|
|
7633
|
+
visibility: z.ZodEnum<{
|
|
7634
|
+
open: "open";
|
|
7635
|
+
closed: "closed";
|
|
7636
|
+
}>;
|
|
7637
|
+
phase: z.ZodEnum<{
|
|
7638
|
+
done: "done";
|
|
7639
|
+
cancelled: "cancelled";
|
|
7640
|
+
signup: "signup";
|
|
7641
|
+
running: "running";
|
|
7642
|
+
}>;
|
|
7643
|
+
games: z.ZodArray<z.ZodString>;
|
|
7644
|
+
pick: z.ZodEnum<{
|
|
7645
|
+
fixed: "fixed";
|
|
7646
|
+
"random-once": "random-once";
|
|
7647
|
+
"random-each": "random-each";
|
|
7648
|
+
}>;
|
|
7649
|
+
game: z.ZodNullable<z.ZodString>;
|
|
7650
|
+
gameTitles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
7651
|
+
lives: z.ZodNumber;
|
|
7652
|
+
seeding: z.ZodEnum<{
|
|
7653
|
+
rank: "rank";
|
|
7654
|
+
random: "random";
|
|
7655
|
+
}>;
|
|
7656
|
+
start: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7657
|
+
kind: z.ZodLiteral<"scheduled">;
|
|
7658
|
+
at: z.ZodNumber;
|
|
7659
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7660
|
+
kind: z.ZodLiteral<"filled">;
|
|
7661
|
+
}, z.core.$strip>], "kind">;
|
|
7662
|
+
minPlayers: z.ZodNumber;
|
|
7663
|
+
maxPlayers: z.ZodNumber;
|
|
7664
|
+
readyMinutes: z.ZodNumber;
|
|
7665
|
+
entrants: z.ZodNumber;
|
|
7666
|
+
createdAt: z.ZodNumber;
|
|
7667
|
+
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
7668
|
+
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
7669
|
+
champion: z.ZodNullable<z.ZodObject<{
|
|
7670
|
+
id: z.ZodNumber;
|
|
7671
|
+
username: z.ZodString;
|
|
7672
|
+
avatar: z.ZodString;
|
|
7673
|
+
guest: z.ZodBoolean;
|
|
7674
|
+
}, z.core.$strip>>;
|
|
7675
|
+
me: z.ZodObject<{
|
|
7676
|
+
joined: z.ZodBoolean;
|
|
7677
|
+
invited: z.ZodBoolean;
|
|
7678
|
+
following: z.ZodBoolean;
|
|
7679
|
+
leadMinutes: z.ZodNullable<z.ZodNumber>;
|
|
7680
|
+
isCreator: z.ZodBoolean;
|
|
7681
|
+
stillIn: z.ZodBoolean;
|
|
7682
|
+
nextMatch: z.ZodNullable<z.ZodObject<{
|
|
7683
|
+
id: z.ZodString;
|
|
7684
|
+
opponent: z.ZodNullable<z.ZodObject<{
|
|
7685
|
+
id: z.ZodNumber;
|
|
7686
|
+
username: z.ZodString;
|
|
7687
|
+
avatar: z.ZodString;
|
|
7688
|
+
guest: z.ZodBoolean;
|
|
7689
|
+
}, z.core.$strip>>;
|
|
7690
|
+
game: z.ZodString;
|
|
7691
|
+
gameTitle: z.ZodString;
|
|
7692
|
+
deadlineAt: z.ZodNumber;
|
|
7693
|
+
started: z.ZodBoolean;
|
|
7694
|
+
}, z.core.$strip>>;
|
|
7695
|
+
}, z.core.$strip>;
|
|
7696
|
+
}, z.core.$strip>>;
|
|
7697
|
+
mine: z.ZodArray<z.ZodObject<{
|
|
7698
|
+
id: z.ZodNumber;
|
|
7699
|
+
title: z.ZodString;
|
|
7700
|
+
creator: z.ZodNullable<z.ZodObject<{
|
|
7701
|
+
id: z.ZodNumber;
|
|
7702
|
+
username: z.ZodString;
|
|
7703
|
+
avatar: z.ZodString;
|
|
7704
|
+
guest: z.ZodBoolean;
|
|
7705
|
+
}, z.core.$strip>>;
|
|
7706
|
+
visibility: z.ZodEnum<{
|
|
7707
|
+
open: "open";
|
|
7708
|
+
closed: "closed";
|
|
7709
|
+
}>;
|
|
7710
|
+
phase: z.ZodEnum<{
|
|
7711
|
+
done: "done";
|
|
7712
|
+
cancelled: "cancelled";
|
|
7713
|
+
signup: "signup";
|
|
7714
|
+
running: "running";
|
|
7715
|
+
}>;
|
|
7716
|
+
games: z.ZodArray<z.ZodString>;
|
|
7717
|
+
pick: z.ZodEnum<{
|
|
7718
|
+
fixed: "fixed";
|
|
7719
|
+
"random-once": "random-once";
|
|
7720
|
+
"random-each": "random-each";
|
|
7721
|
+
}>;
|
|
7722
|
+
game: z.ZodNullable<z.ZodString>;
|
|
7723
|
+
gameTitles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
7724
|
+
lives: z.ZodNumber;
|
|
7725
|
+
seeding: z.ZodEnum<{
|
|
7726
|
+
rank: "rank";
|
|
7727
|
+
random: "random";
|
|
7728
|
+
}>;
|
|
7729
|
+
start: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7730
|
+
kind: z.ZodLiteral<"scheduled">;
|
|
7731
|
+
at: z.ZodNumber;
|
|
7732
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7733
|
+
kind: z.ZodLiteral<"filled">;
|
|
7734
|
+
}, z.core.$strip>], "kind">;
|
|
7735
|
+
minPlayers: z.ZodNumber;
|
|
7736
|
+
maxPlayers: z.ZodNumber;
|
|
7737
|
+
readyMinutes: z.ZodNumber;
|
|
7738
|
+
entrants: z.ZodNumber;
|
|
7739
|
+
createdAt: z.ZodNumber;
|
|
7740
|
+
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
7741
|
+
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
7742
|
+
champion: z.ZodNullable<z.ZodObject<{
|
|
7743
|
+
id: z.ZodNumber;
|
|
7744
|
+
username: z.ZodString;
|
|
7745
|
+
avatar: z.ZodString;
|
|
7746
|
+
guest: z.ZodBoolean;
|
|
7747
|
+
}, z.core.$strip>>;
|
|
7748
|
+
me: z.ZodObject<{
|
|
7749
|
+
joined: z.ZodBoolean;
|
|
7750
|
+
invited: z.ZodBoolean;
|
|
7751
|
+
following: z.ZodBoolean;
|
|
7752
|
+
leadMinutes: z.ZodNullable<z.ZodNumber>;
|
|
7753
|
+
isCreator: z.ZodBoolean;
|
|
7754
|
+
stillIn: z.ZodBoolean;
|
|
7755
|
+
nextMatch: z.ZodNullable<z.ZodObject<{
|
|
7756
|
+
id: z.ZodString;
|
|
7757
|
+
opponent: z.ZodNullable<z.ZodObject<{
|
|
7758
|
+
id: z.ZodNumber;
|
|
7759
|
+
username: z.ZodString;
|
|
7760
|
+
avatar: z.ZodString;
|
|
7761
|
+
guest: z.ZodBoolean;
|
|
7762
|
+
}, z.core.$strip>>;
|
|
7763
|
+
game: z.ZodString;
|
|
7764
|
+
gameTitle: z.ZodString;
|
|
7765
|
+
deadlineAt: z.ZodNumber;
|
|
7766
|
+
started: z.ZodBoolean;
|
|
7767
|
+
}, z.core.$strip>>;
|
|
7768
|
+
}, z.core.$strip>;
|
|
7769
|
+
}, z.core.$strip>>;
|
|
7770
|
+
upcoming: z.ZodArray<z.ZodObject<{
|
|
7771
|
+
id: z.ZodNumber;
|
|
7772
|
+
title: z.ZodString;
|
|
7773
|
+
creator: z.ZodNullable<z.ZodObject<{
|
|
7774
|
+
id: z.ZodNumber;
|
|
7775
|
+
username: z.ZodString;
|
|
7776
|
+
avatar: z.ZodString;
|
|
7777
|
+
guest: z.ZodBoolean;
|
|
7778
|
+
}, z.core.$strip>>;
|
|
7779
|
+
visibility: z.ZodEnum<{
|
|
7780
|
+
open: "open";
|
|
7781
|
+
closed: "closed";
|
|
7782
|
+
}>;
|
|
7783
|
+
phase: z.ZodEnum<{
|
|
7784
|
+
done: "done";
|
|
7785
|
+
cancelled: "cancelled";
|
|
7786
|
+
signup: "signup";
|
|
7787
|
+
running: "running";
|
|
7788
|
+
}>;
|
|
7789
|
+
games: z.ZodArray<z.ZodString>;
|
|
7790
|
+
pick: z.ZodEnum<{
|
|
7791
|
+
fixed: "fixed";
|
|
7792
|
+
"random-once": "random-once";
|
|
7793
|
+
"random-each": "random-each";
|
|
7794
|
+
}>;
|
|
7795
|
+
game: z.ZodNullable<z.ZodString>;
|
|
7796
|
+
gameTitles: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
7797
|
+
lives: z.ZodNumber;
|
|
7798
|
+
seeding: z.ZodEnum<{
|
|
7799
|
+
rank: "rank";
|
|
7800
|
+
random: "random";
|
|
7801
|
+
}>;
|
|
7802
|
+
start: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7803
|
+
kind: z.ZodLiteral<"scheduled">;
|
|
7804
|
+
at: z.ZodNumber;
|
|
7805
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7806
|
+
kind: z.ZodLiteral<"filled">;
|
|
7807
|
+
}, z.core.$strip>], "kind">;
|
|
7808
|
+
minPlayers: z.ZodNumber;
|
|
7809
|
+
maxPlayers: z.ZodNumber;
|
|
7810
|
+
readyMinutes: z.ZodNumber;
|
|
7811
|
+
entrants: z.ZodNumber;
|
|
7812
|
+
createdAt: z.ZodNumber;
|
|
7813
|
+
startedAt: z.ZodNullable<z.ZodNumber>;
|
|
7814
|
+
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
7815
|
+
champion: z.ZodNullable<z.ZodObject<{
|
|
7816
|
+
id: z.ZodNumber;
|
|
7817
|
+
username: z.ZodString;
|
|
7818
|
+
avatar: z.ZodString;
|
|
7819
|
+
guest: z.ZodBoolean;
|
|
7820
|
+
}, z.core.$strip>>;
|
|
7821
|
+
me: z.ZodObject<{
|
|
7822
|
+
joined: z.ZodBoolean;
|
|
7823
|
+
invited: z.ZodBoolean;
|
|
7824
|
+
following: z.ZodBoolean;
|
|
7825
|
+
leadMinutes: z.ZodNullable<z.ZodNumber>;
|
|
7826
|
+
isCreator: z.ZodBoolean;
|
|
7827
|
+
stillIn: z.ZodBoolean;
|
|
7828
|
+
nextMatch: z.ZodNullable<z.ZodObject<{
|
|
7829
|
+
id: z.ZodString;
|
|
7830
|
+
opponent: z.ZodNullable<z.ZodObject<{
|
|
7831
|
+
id: z.ZodNumber;
|
|
7832
|
+
username: z.ZodString;
|
|
7833
|
+
avatar: z.ZodString;
|
|
7834
|
+
guest: z.ZodBoolean;
|
|
7835
|
+
}, z.core.$strip>>;
|
|
7836
|
+
game: z.ZodString;
|
|
7837
|
+
gameTitle: z.ZodString;
|
|
7838
|
+
deadlineAt: z.ZodNumber;
|
|
7839
|
+
started: z.ZodBoolean;
|
|
7840
|
+
}, z.core.$strip>>;
|
|
7841
|
+
}, z.core.$strip>;
|
|
7842
|
+
}, z.core.$strip>>;
|
|
7843
|
+
}, z.core.$strip>;
|
|
7844
|
+
readonly doc: {
|
|
7845
|
+
readonly summary: "Lobbies to join now, invites, my tournaments and upcoming open ones (the home page card and modal)";
|
|
7846
|
+
readonly tags: readonly ["tournaments"];
|
|
7847
|
+
};
|
|
7848
|
+
}, {
|
|
7849
|
+
user: SessionUser | null;
|
|
7850
|
+
clientId: string;
|
|
7851
|
+
}, {}, import("@ayepi/core").EmptyObject>;
|
|
7852
|
+
};
|
|
7853
|
+
//#endregion
|
|
7854
|
+
//#region src/api/version.d.ts
|
|
7855
|
+
/**
|
|
7856
|
+
* A semver range in the npm form: comparators (`>=2.0.0-0`, `<3.0.0`)
|
|
7857
|
+
* separated by spaces are all required; `||` separates alternatives.
|
|
7858
|
+
*/
|
|
7859
|
+
export declare const VersionRange: z.ZodString;
|
|
7860
|
+
/** What `GET /version` answers. */
|
|
7861
|
+
export declare const HubVersion: z.ZodObject<{
|
|
7862
|
+
server: z.ZodString;
|
|
7863
|
+
contract: z.ZodString;
|
|
7864
|
+
supported: z.ZodString;
|
|
7865
|
+
deprecated: z.ZodString;
|
|
7866
|
+
}, z.core.$strip>;
|
|
7867
|
+
/** The hub's version and the client versions it supports. */
|
|
7868
|
+
export type HubVersion = z.infer<typeof HubVersion>;
|
|
7869
|
+
/** The version endpoints. */
|
|
5569
7870
|
export declare const versionEndpoints: {
|
|
5570
7871
|
getHubVersion: import("@ayepi/core").Endpoint<{
|
|
5571
7872
|
readonly method: "GET";
|
|
@@ -5586,12 +7887,38 @@ export declare const versionEndpoints: {
|
|
|
5586
7887
|
}, {}, import("@ayepi/core").EmptyObject>;
|
|
5587
7888
|
};
|
|
5588
7889
|
//#endregion
|
|
7890
|
+
//#region src/api/offline.d.ts
|
|
7891
|
+
/** The request header that carries a replayable call's operation key. */
|
|
7892
|
+
export declare const OFFLINE_OP_HEADER = "x-hub-op";
|
|
7893
|
+
/** An operation key: letters, digits and `_ . : -`, 1 to 100 characters. */
|
|
7894
|
+
export declare const OfflineOpKey: z.ZodString;
|
|
7895
|
+
/** How long the hub remembers an operation key's reply: 7 days. */
|
|
7896
|
+
export declare const OFFLINE_DEDUPE_TTL_MS: number;
|
|
7897
|
+
/** How an endpoint behaves offline: `replay` means it may be queued and sent later, deduplicated by its operation key. */
|
|
7898
|
+
export type OfflineMode = 'replay';
|
|
7899
|
+
/** The public endpoints that support offline replay, by name. */
|
|
7900
|
+
export declare const OFFLINE_REPLAY_ENDPOINTS: {
|
|
7901
|
+
readonly writeSave: "replay";
|
|
7902
|
+
readonly deleteSave: "replay";
|
|
7903
|
+
readonly updateGameStat: "replay";
|
|
7904
|
+
readonly setGameProfile: "replay";
|
|
7905
|
+
readonly submitScore: "replay";
|
|
7906
|
+
readonly completeDailyChallenge: "replay";
|
|
7907
|
+
readonly grantInventoryItems: "replay";
|
|
7908
|
+
readonly exchangeInventoryItems: "replay";
|
|
7909
|
+
readonly setGameFavorite: "replay";
|
|
7910
|
+
};
|
|
7911
|
+
/** The name of an endpoint that supports offline replay. */
|
|
7912
|
+
export type OfflineReplayEndpoint = keyof typeof OFFLINE_REPLAY_ENDPOINTS;
|
|
7913
|
+
/** Whether endpoint `name` supports offline replay. */
|
|
7914
|
+
export declare function isOfflineReplayEndpoint(name: string): name is OfflineReplayEndpoint;
|
|
7915
|
+
//#endregion
|
|
5589
7916
|
//#region src/api/index.d.ts
|
|
5590
7917
|
/**
|
|
5591
7918
|
* Every public endpoint, by name. Typed as an intersection of the areas so the
|
|
5592
7919
|
* published .d.ts refers to each area instead of repeating every endpoint.
|
|
5593
7920
|
*/
|
|
5594
|
-
export type PublicEndpoints = typeof authEndpoints & typeof catalogEndpoints & typeof progressEndpoints & typeof leaderboardsEndpoints & typeof dailyEndpoints & typeof economyEndpoints & typeof analyticsEndpoints & typeof socialEndpoints & typeof messagesEndpoints & typeof notifyEndpoints & typeof reportsEndpoints & typeof mpEndpoints & typeof raceEndpoints & typeof versionEndpoints;
|
|
7921
|
+
export type PublicEndpoints = typeof authEndpoints & typeof catalogEndpoints & typeof progressEndpoints & typeof leaderboardsEndpoints & typeof dailyEndpoints & typeof economyEndpoints & typeof analyticsEndpoints & typeof socialEndpoints & typeof messagesEndpoints & typeof notifyEndpoints & typeof reportsEndpoints & typeof mpEndpoints & typeof raceEndpoints & typeof tournamentEndpoints & typeof playOnlineEndpoints & typeof versionEndpoints;
|
|
5595
7922
|
/** Every public endpoint, by name. */
|
|
5596
7923
|
export declare const publicEndpoints: PublicEndpoints;
|
|
5597
7924
|
/**
|
|
@@ -5647,6 +7974,81 @@ export type EventData<E extends EventDef> = z.output<E['d']>;
|
|
|
5647
7974
|
//#region src/realtime/events/multiplayer.d.ts
|
|
5648
7975
|
/** The multiplayer events, by event name. */
|
|
5649
7976
|
declare const multiplayerEvents: {
|
|
7977
|
+
tournament: EventDef<import("zod").ZodObject<{
|
|
7978
|
+
tournament: import("zod").ZodObject<{
|
|
7979
|
+
id: import("zod").ZodNumber;
|
|
7980
|
+
title: import("zod").ZodString;
|
|
7981
|
+
creator: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
7982
|
+
id: import("zod").ZodNumber;
|
|
7983
|
+
username: import("zod").ZodString;
|
|
7984
|
+
avatar: import("zod").ZodString;
|
|
7985
|
+
guest: import("zod").ZodBoolean;
|
|
7986
|
+
}, import("zod/v4/core").$strip>>;
|
|
7987
|
+
visibility: import("zod").ZodEnum<{
|
|
7988
|
+
open: "open";
|
|
7989
|
+
closed: "closed";
|
|
7990
|
+
}>;
|
|
7991
|
+
phase: import("zod").ZodEnum<{
|
|
7992
|
+
done: "done";
|
|
7993
|
+
cancelled: "cancelled";
|
|
7994
|
+
signup: "signup";
|
|
7995
|
+
running: "running";
|
|
7996
|
+
}>;
|
|
7997
|
+
games: import("zod").ZodArray<import("zod").ZodString>;
|
|
7998
|
+
pick: import("zod").ZodEnum<{
|
|
7999
|
+
fixed: "fixed";
|
|
8000
|
+
"random-once": "random-once";
|
|
8001
|
+
"random-each": "random-each";
|
|
8002
|
+
}>;
|
|
8003
|
+
game: import("zod").ZodNullable<import("zod").ZodString>;
|
|
8004
|
+
gameTitles: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>;
|
|
8005
|
+
lives: import("zod").ZodNumber;
|
|
8006
|
+
seeding: import("zod").ZodEnum<{
|
|
8007
|
+
rank: "rank";
|
|
8008
|
+
random: "random";
|
|
8009
|
+
}>;
|
|
8010
|
+
start: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
8011
|
+
kind: import("zod").ZodLiteral<"scheduled">;
|
|
8012
|
+
at: import("zod").ZodNumber;
|
|
8013
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
8014
|
+
kind: import("zod").ZodLiteral<"filled">;
|
|
8015
|
+
}, import("zod/v4/core").$strip>], "kind">;
|
|
8016
|
+
minPlayers: import("zod").ZodNumber;
|
|
8017
|
+
maxPlayers: import("zod").ZodNumber;
|
|
8018
|
+
readyMinutes: import("zod").ZodNumber;
|
|
8019
|
+
entrants: import("zod").ZodNumber;
|
|
8020
|
+
createdAt: import("zod").ZodNumber;
|
|
8021
|
+
startedAt: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
8022
|
+
endedAt: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
8023
|
+
champion: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
8024
|
+
id: import("zod").ZodNumber;
|
|
8025
|
+
username: import("zod").ZodString;
|
|
8026
|
+
avatar: import("zod").ZodString;
|
|
8027
|
+
guest: import("zod").ZodBoolean;
|
|
8028
|
+
}, import("zod/v4/core").$strip>>;
|
|
8029
|
+
me: import("zod").ZodObject<{
|
|
8030
|
+
joined: import("zod").ZodBoolean;
|
|
8031
|
+
invited: import("zod").ZodBoolean;
|
|
8032
|
+
following: import("zod").ZodBoolean;
|
|
8033
|
+
leadMinutes: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
8034
|
+
isCreator: import("zod").ZodBoolean;
|
|
8035
|
+
stillIn: import("zod").ZodBoolean;
|
|
8036
|
+
nextMatch: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
8037
|
+
id: import("zod").ZodString;
|
|
8038
|
+
opponent: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
8039
|
+
id: import("zod").ZodNumber;
|
|
8040
|
+
username: import("zod").ZodString;
|
|
8041
|
+
avatar: import("zod").ZodString;
|
|
8042
|
+
guest: import("zod").ZodBoolean;
|
|
8043
|
+
}, import("zod/v4/core").$strip>>;
|
|
8044
|
+
game: import("zod").ZodString;
|
|
8045
|
+
gameTitle: import("zod").ZodString;
|
|
8046
|
+
deadlineAt: import("zod").ZodNumber;
|
|
8047
|
+
started: import("zod").ZodBoolean;
|
|
8048
|
+
}, import("zod/v4/core").$strip>>;
|
|
8049
|
+
}, import("zod/v4/core").$strip>;
|
|
8050
|
+
}, import("zod/v4/core").$strip>;
|
|
8051
|
+
}, import("zod/v4/core").$strip>>;
|
|
5650
8052
|
'race.start': EventDef<import("zod").ZodObject<{
|
|
5651
8053
|
roomId: import("zod").ZodString;
|
|
5652
8054
|
round: import("zod").ZodNumber;
|
|
@@ -5709,9 +8111,9 @@ declare const multiplayerEvents: {
|
|
|
5709
8111
|
hostId: import("zod").ZodNumber;
|
|
5710
8112
|
public: import("zod").ZodBoolean;
|
|
5711
8113
|
phase: import("zod").ZodEnum<{
|
|
8114
|
+
ended: "ended";
|
|
5712
8115
|
lobby: "lobby";
|
|
5713
8116
|
playing: "playing";
|
|
5714
|
-
ended: "ended";
|
|
5715
8117
|
}>;
|
|
5716
8118
|
maxPlayers: import("zod").ZodNumber;
|
|
5717
8119
|
model: import("zod").ZodEnum<{
|
|
@@ -5724,6 +8126,7 @@ declare const multiplayerEvents: {
|
|
|
5724
8126
|
avatar: import("zod").ZodString;
|
|
5725
8127
|
ready: import("zod").ZodBoolean;
|
|
5726
8128
|
connected: import("zod").ZodBoolean;
|
|
8129
|
+
graceEndsAt: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
5727
8130
|
data: import("zod").ZodOptional<import("zod").ZodJSONSchema>;
|
|
5728
8131
|
}, import("zod/v4/core").$strip>>;
|
|
5729
8132
|
spectators: import("zod").ZodNumber;
|
|
@@ -5823,8 +8226,8 @@ declare const multiplayerEvents: {
|
|
|
5823
8226
|
'room.closed': EventDef<import("zod").ZodObject<{
|
|
5824
8227
|
reason: import("zod").ZodEnum<{
|
|
5825
8228
|
ended: "ended";
|
|
5826
|
-
removed: "removed";
|
|
5827
8229
|
empty: "empty";
|
|
8230
|
+
removed: "removed";
|
|
5828
8231
|
host_left: "host_left";
|
|
5829
8232
|
moved: "moved";
|
|
5830
8233
|
other_tab: "other_tab";
|
|
@@ -5838,6 +8241,20 @@ declare const multiplayerEvents: {
|
|
|
5838
8241
|
kicked: "kicked";
|
|
5839
8242
|
}>;
|
|
5840
8243
|
}, import("zod/v4/core").$strip>>;
|
|
8244
|
+
'room.seat': EventDef<import("zod").ZodObject<{
|
|
8245
|
+
userId: import("zod").ZodNumber;
|
|
8246
|
+
status: import("zod").ZodEnum<{
|
|
8247
|
+
away: "away";
|
|
8248
|
+
back: "back";
|
|
8249
|
+
gone: "gone";
|
|
8250
|
+
}>;
|
|
8251
|
+
graceEndsAt: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
8252
|
+
reason: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
8253
|
+
left: "left";
|
|
8254
|
+
abandoned: "abandoned";
|
|
8255
|
+
kicked: "kicked";
|
|
8256
|
+
}>>;
|
|
8257
|
+
}, import("zod/v4/core").$strip>>;
|
|
5841
8258
|
invite: EventDef<import("zod").ZodObject<{
|
|
5842
8259
|
id: import("zod").ZodString;
|
|
5843
8260
|
from: import("zod").ZodObject<{
|
|
@@ -5995,6 +8412,7 @@ declare const socialEvents: {
|
|
|
5995
8412
|
invite: "invite";
|
|
5996
8413
|
suggestion: "suggestion";
|
|
5997
8414
|
renamed: "renamed";
|
|
8415
|
+
tournament: "tournament";
|
|
5998
8416
|
}>;
|
|
5999
8417
|
title: z.ZodString;
|
|
6000
8418
|
body: z.ZodOptional<z.ZodString>;
|
|
@@ -6060,9 +8478,9 @@ declare const helloOps: {
|
|
|
6060
8478
|
hostId: z.ZodNumber;
|
|
6061
8479
|
public: z.ZodBoolean;
|
|
6062
8480
|
phase: z.ZodEnum<{
|
|
8481
|
+
ended: "ended";
|
|
6063
8482
|
lobby: "lobby";
|
|
6064
8483
|
playing: "playing";
|
|
6065
|
-
ended: "ended";
|
|
6066
8484
|
}>;
|
|
6067
8485
|
maxPlayers: z.ZodNumber;
|
|
6068
8486
|
model: z.ZodEnum<{
|
|
@@ -6075,6 +8493,7 @@ declare const helloOps: {
|
|
|
6075
8493
|
avatar: z.ZodString;
|
|
6076
8494
|
ready: z.ZodBoolean;
|
|
6077
8495
|
connected: z.ZodBoolean;
|
|
8496
|
+
graceEndsAt: z.ZodOptional<z.ZodNumber>;
|
|
6078
8497
|
data: z.ZodOptional<z.ZodJSONSchema>;
|
|
6079
8498
|
}, z.core.$strip>>;
|
|
6080
8499
|
spectators: z.ZodNumber;
|
|
@@ -6263,9 +8682,9 @@ declare const multiplayerOps: {
|
|
|
6263
8682
|
hostId: import("zod").ZodNumber;
|
|
6264
8683
|
public: import("zod").ZodBoolean;
|
|
6265
8684
|
phase: import("zod").ZodEnum<{
|
|
8685
|
+
ended: "ended";
|
|
6266
8686
|
lobby: "lobby";
|
|
6267
8687
|
playing: "playing";
|
|
6268
|
-
ended: "ended";
|
|
6269
8688
|
}>;
|
|
6270
8689
|
maxPlayers: import("zod").ZodNumber;
|
|
6271
8690
|
model: import("zod").ZodEnum<{
|
|
@@ -6278,6 +8697,7 @@ declare const multiplayerOps: {
|
|
|
6278
8697
|
avatar: import("zod").ZodString;
|
|
6279
8698
|
ready: import("zod").ZodBoolean;
|
|
6280
8699
|
connected: import("zod").ZodBoolean;
|
|
8700
|
+
graceEndsAt: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
6281
8701
|
data: import("zod").ZodOptional<import("zod").ZodJSONSchema>;
|
|
6282
8702
|
}, import("zod/v4/core").$strip>>;
|
|
6283
8703
|
spectators: import("zod").ZodNumber;
|
|
@@ -6366,9 +8786,9 @@ declare const multiplayerOps: {
|
|
|
6366
8786
|
hostId: import("zod").ZodNumber;
|
|
6367
8787
|
public: import("zod").ZodBoolean;
|
|
6368
8788
|
phase: import("zod").ZodEnum<{
|
|
8789
|
+
ended: "ended";
|
|
6369
8790
|
lobby: "lobby";
|
|
6370
8791
|
playing: "playing";
|
|
6371
|
-
ended: "ended";
|
|
6372
8792
|
}>;
|
|
6373
8793
|
maxPlayers: import("zod").ZodNumber;
|
|
6374
8794
|
model: import("zod").ZodEnum<{
|
|
@@ -6381,6 +8801,7 @@ declare const multiplayerOps: {
|
|
|
6381
8801
|
avatar: import("zod").ZodString;
|
|
6382
8802
|
ready: import("zod").ZodBoolean;
|
|
6383
8803
|
connected: import("zod").ZodBoolean;
|
|
8804
|
+
graceEndsAt: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
6384
8805
|
data: import("zod").ZodOptional<import("zod").ZodJSONSchema>;
|
|
6385
8806
|
}, import("zod/v4/core").$strip>>;
|
|
6386
8807
|
spectators: import("zod").ZodNumber;
|
|
@@ -6467,9 +8888,9 @@ declare const multiplayerOps: {
|
|
|
6467
8888
|
hostId: import("zod").ZodNumber;
|
|
6468
8889
|
public: import("zod").ZodBoolean;
|
|
6469
8890
|
phase: import("zod").ZodEnum<{
|
|
8891
|
+
ended: "ended";
|
|
6470
8892
|
lobby: "lobby";
|
|
6471
8893
|
playing: "playing";
|
|
6472
|
-
ended: "ended";
|
|
6473
8894
|
}>;
|
|
6474
8895
|
maxPlayers: import("zod").ZodNumber;
|
|
6475
8896
|
model: import("zod").ZodEnum<{
|
|
@@ -6482,6 +8903,7 @@ declare const multiplayerOps: {
|
|
|
6482
8903
|
avatar: import("zod").ZodString;
|
|
6483
8904
|
ready: import("zod").ZodBoolean;
|
|
6484
8905
|
connected: import("zod").ZodBoolean;
|
|
8906
|
+
graceEndsAt: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
6485
8907
|
data: import("zod").ZodOptional<import("zod").ZodJSONSchema>;
|
|
6486
8908
|
}, import("zod/v4/core").$strip>>;
|
|
6487
8909
|
spectators: import("zod").ZodNumber;
|
|
@@ -6620,6 +9042,10 @@ declare const multiplayerOps: {
|
|
|
6620
9042
|
host: "host";
|
|
6621
9043
|
relay: "relay";
|
|
6622
9044
|
}>>;
|
|
9045
|
+
hostMigration: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
9046
|
+
grace: "grace";
|
|
9047
|
+
drop: "drop";
|
|
9048
|
+
}>>;
|
|
6623
9049
|
partyId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
6624
9050
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
6625
9051
|
room: import("zod").ZodObject<{
|
|
@@ -6630,9 +9056,9 @@ declare const multiplayerOps: {
|
|
|
6630
9056
|
hostId: import("zod").ZodNumber;
|
|
6631
9057
|
public: import("zod").ZodBoolean;
|
|
6632
9058
|
phase: import("zod").ZodEnum<{
|
|
9059
|
+
ended: "ended";
|
|
6633
9060
|
lobby: "lobby";
|
|
6634
9061
|
playing: "playing";
|
|
6635
|
-
ended: "ended";
|
|
6636
9062
|
}>;
|
|
6637
9063
|
maxPlayers: import("zod").ZodNumber;
|
|
6638
9064
|
model: import("zod").ZodEnum<{
|
|
@@ -6645,6 +9071,7 @@ declare const multiplayerOps: {
|
|
|
6645
9071
|
avatar: import("zod").ZodString;
|
|
6646
9072
|
ready: import("zod").ZodBoolean;
|
|
6647
9073
|
connected: import("zod").ZodBoolean;
|
|
9074
|
+
graceEndsAt: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
6648
9075
|
data: import("zod").ZodOptional<import("zod").ZodJSONSchema>;
|
|
6649
9076
|
}, import("zod/v4/core").$strip>>;
|
|
6650
9077
|
spectators: import("zod").ZodNumber;
|
|
@@ -6734,9 +9161,9 @@ declare const multiplayerOps: {
|
|
|
6734
9161
|
hostId: import("zod").ZodNumber;
|
|
6735
9162
|
public: import("zod").ZodBoolean;
|
|
6736
9163
|
phase: import("zod").ZodEnum<{
|
|
9164
|
+
ended: "ended";
|
|
6737
9165
|
lobby: "lobby";
|
|
6738
9166
|
playing: "playing";
|
|
6739
|
-
ended: "ended";
|
|
6740
9167
|
}>;
|
|
6741
9168
|
maxPlayers: import("zod").ZodNumber;
|
|
6742
9169
|
model: import("zod").ZodEnum<{
|
|
@@ -6749,6 +9176,7 @@ declare const multiplayerOps: {
|
|
|
6749
9176
|
avatar: import("zod").ZodString;
|
|
6750
9177
|
ready: import("zod").ZodBoolean;
|
|
6751
9178
|
connected: import("zod").ZodBoolean;
|
|
9179
|
+
graceEndsAt: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
6752
9180
|
data: import("zod").ZodOptional<import("zod").ZodJSONSchema>;
|
|
6753
9181
|
}, import("zod/v4/core").$strip>>;
|
|
6754
9182
|
spectators: import("zod").ZodNumber;
|
|
@@ -6831,6 +9259,117 @@ declare const multiplayerOps: {
|
|
|
6831
9259
|
to: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
6832
9260
|
}, import("zod/v4/core").$strip>>;
|
|
6833
9261
|
}, import("zod/v4/core").$strip>>;
|
|
9262
|
+
'room.reclaim': OpDef<import("zod").ZodObject<{
|
|
9263
|
+
game: import("zod").ZodString;
|
|
9264
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
9265
|
+
held: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
9266
|
+
room: import("zod").ZodObject<{
|
|
9267
|
+
id: import("zod").ZodString;
|
|
9268
|
+
code: import("zod").ZodString;
|
|
9269
|
+
game: import("zod").ZodString;
|
|
9270
|
+
mode: import("zod").ZodOptional<import("zod").ZodString>;
|
|
9271
|
+
hostId: import("zod").ZodNumber;
|
|
9272
|
+
public: import("zod").ZodBoolean;
|
|
9273
|
+
phase: import("zod").ZodEnum<{
|
|
9274
|
+
ended: "ended";
|
|
9275
|
+
lobby: "lobby";
|
|
9276
|
+
playing: "playing";
|
|
9277
|
+
}>;
|
|
9278
|
+
maxPlayers: import("zod").ZodNumber;
|
|
9279
|
+
model: import("zod").ZodEnum<{
|
|
9280
|
+
host: "host";
|
|
9281
|
+
relay: "relay";
|
|
9282
|
+
}>;
|
|
9283
|
+
seats: import("zod").ZodArray<import("zod").ZodObject<{
|
|
9284
|
+
userId: import("zod").ZodNumber;
|
|
9285
|
+
name: import("zod").ZodString;
|
|
9286
|
+
avatar: import("zod").ZodString;
|
|
9287
|
+
ready: import("zod").ZodBoolean;
|
|
9288
|
+
connected: import("zod").ZodBoolean;
|
|
9289
|
+
graceEndsAt: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
9290
|
+
data: import("zod").ZodOptional<import("zod").ZodJSONSchema>;
|
|
9291
|
+
}, import("zod/v4/core").$strip>>;
|
|
9292
|
+
spectators: import("zod").ZodNumber;
|
|
9293
|
+
chatMode: import("zod").ZodEnum<{
|
|
9294
|
+
on: "on";
|
|
9295
|
+
quick: "quick";
|
|
9296
|
+
off: "off";
|
|
9297
|
+
}>;
|
|
9298
|
+
race: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
9299
|
+
phase: import("zod").ZodEnum<{
|
|
9300
|
+
waiting: "waiting";
|
|
9301
|
+
countdown: "countdown";
|
|
9302
|
+
racing: "racing";
|
|
9303
|
+
done: "done";
|
|
9304
|
+
}>;
|
|
9305
|
+
round: import("zod").ZodNumber;
|
|
9306
|
+
params: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnion<readonly [import("zod").ZodNumber, import("zod").ZodBoolean, import("zod").ZodString]>>;
|
|
9307
|
+
minPlayers: import("zod").ZodNumber;
|
|
9308
|
+
players: import("zod").ZodArray<import("zod").ZodObject<{
|
|
9309
|
+
userId: import("zod").ZodNumber;
|
|
9310
|
+
name: import("zod").ZodString;
|
|
9311
|
+
avatar: import("zod").ZodString;
|
|
9312
|
+
stats: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnion<readonly [import("zod").ZodPipe<import("zod").ZodNumber, import("zod").ZodTransform<number, number>>, import("zod").ZodBoolean, import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string, string>>]>>;
|
|
9313
|
+
progress: import("zod").ZodOptional<import("zod").ZodPipe<import("zod").ZodNumber, import("zod").ZodTransform<number, number>>>;
|
|
9314
|
+
state: import("zod").ZodEnum<{
|
|
9315
|
+
racing: "racing";
|
|
9316
|
+
finished: "finished";
|
|
9317
|
+
lost: "lost";
|
|
9318
|
+
forfeit: "forfeit";
|
|
9319
|
+
disconnected: "disconnected";
|
|
9320
|
+
}>;
|
|
9321
|
+
ms: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
9322
|
+
}, import("zod/v4/core").$strip>>;
|
|
9323
|
+
rematch: import("zod").ZodArray<import("zod").ZodNumber>;
|
|
9324
|
+
seed: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
9325
|
+
startAt: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
9326
|
+
result: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
9327
|
+
game: import("zod").ZodString;
|
|
9328
|
+
params: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnion<readonly [import("zod").ZodNumber, import("zod").ZodBoolean, import("zod").ZodString]>>;
|
|
9329
|
+
outcome: import("zod").ZodEnum<{
|
|
9330
|
+
finished: "finished";
|
|
9331
|
+
lost: "lost";
|
|
9332
|
+
forfeit: "forfeit";
|
|
9333
|
+
disconnected: "disconnected";
|
|
9334
|
+
timeout: "timeout";
|
|
9335
|
+
}>;
|
|
9336
|
+
startedAt: import("zod").ZodNumber;
|
|
9337
|
+
endedAt: import("zod").ZodNumber;
|
|
9338
|
+
durationMs: import("zod").ZodNumber;
|
|
9339
|
+
id: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
9340
|
+
room: import("zod").ZodString;
|
|
9341
|
+
round: import("zod").ZodNumber;
|
|
9342
|
+
seed: import("zod").ZodNumber;
|
|
9343
|
+
winnerId: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
9344
|
+
players: import("zod").ZodArray<import("zod").ZodObject<{
|
|
9345
|
+
userId: import("zod").ZodNumber;
|
|
9346
|
+
name: import("zod").ZodString;
|
|
9347
|
+
avatar: import("zod").ZodString;
|
|
9348
|
+
stats: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnion<readonly [import("zod").ZodPipe<import("zod").ZodNumber, import("zod").ZodTransform<number, number>>, import("zod").ZodBoolean, import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string, string>>]>>;
|
|
9349
|
+
progress: import("zod").ZodOptional<import("zod").ZodPipe<import("zod").ZodNumber, import("zod").ZodTransform<number, number>>>;
|
|
9350
|
+
place: import("zod").ZodNumber;
|
|
9351
|
+
result: import("zod").ZodEnum<{
|
|
9352
|
+
lost: "lost";
|
|
9353
|
+
forfeit: "forfeit";
|
|
9354
|
+
disconnected: "disconnected";
|
|
9355
|
+
timeout: "timeout";
|
|
9356
|
+
won: "won";
|
|
9357
|
+
beaten: "beaten";
|
|
9358
|
+
}>;
|
|
9359
|
+
ms: import("zod").ZodNumber;
|
|
9360
|
+
}, import("zod/v4/core").$strip>>;
|
|
9361
|
+
}, import("zod/v4/core").$strip>>;
|
|
9362
|
+
}, import("zod/v4/core").$strip>>;
|
|
9363
|
+
}, import("zod/v4/core").$strip>;
|
|
9364
|
+
state: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodJSONSchema>;
|
|
9365
|
+
history: import("zod").ZodArray<import("zod").ZodObject<{
|
|
9366
|
+
from: import("zod").ZodNumber;
|
|
9367
|
+
data: import("zod").ZodJSONSchema;
|
|
9368
|
+
seq: import("zod").ZodNumber;
|
|
9369
|
+
to: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
9370
|
+
}, import("zod/v4/core").$strip>>;
|
|
9371
|
+
}, import("zod/v4/core").$strip>>;
|
|
9372
|
+
}, import("zod/v4/core").$strip>>;
|
|
6834
9373
|
'room.leave': OpDef<import("zod").ZodObject<{}, import("zod/v4/core").$strip>, import("zod").ZodObject<{}, import("zod/v4/core").$strip>>;
|
|
6835
9374
|
'room.ready': OpDef<import("zod").ZodObject<{
|
|
6836
9375
|
ready: import("zod").ZodBoolean;
|
|
@@ -6877,9 +9416,9 @@ declare const multiplayerOps: {
|
|
|
6877
9416
|
hostId: import("zod").ZodNumber;
|
|
6878
9417
|
public: import("zod").ZodBoolean;
|
|
6879
9418
|
phase: import("zod").ZodEnum<{
|
|
9419
|
+
ended: "ended";
|
|
6880
9420
|
lobby: "lobby";
|
|
6881
9421
|
playing: "playing";
|
|
6882
|
-
ended: "ended";
|
|
6883
9422
|
}>;
|
|
6884
9423
|
maxPlayers: import("zod").ZodNumber;
|
|
6885
9424
|
model: import("zod").ZodEnum<{
|
|
@@ -6892,6 +9431,7 @@ declare const multiplayerOps: {
|
|
|
6892
9431
|
avatar: import("zod").ZodString;
|
|
6893
9432
|
ready: import("zod").ZodBoolean;
|
|
6894
9433
|
connected: import("zod").ZodBoolean;
|
|
9434
|
+
graceEndsAt: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
6895
9435
|
data: import("zod").ZodOptional<import("zod").ZodJSONSchema>;
|
|
6896
9436
|
}, import("zod/v4/core").$strip>>;
|
|
6897
9437
|
spectators: import("zod").ZodNumber;
|
|
@@ -7216,6 +9756,7 @@ export declare const StaticGame: z.ZodObject<{
|
|
|
7216
9756
|
x: z.ZodOptional<z.ZodNumber>;
|
|
7217
9757
|
y: z.ZodOptional<z.ZodNumber>;
|
|
7218
9758
|
}, z.core.$strict>]>>;
|
|
9759
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7219
9760
|
dailyChallenges: z.ZodOptional<z.ZodBoolean>;
|
|
7220
9761
|
leaderboards: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
7221
9762
|
key: z.ZodString;
|
|
@@ -7304,6 +9845,7 @@ export declare const StaticGame: z.ZodObject<{
|
|
|
7304
9845
|
join: z.ZodDefault<z.ZodBoolean>;
|
|
7305
9846
|
spectate: z.ZodDefault<z.ZodBoolean>;
|
|
7306
9847
|
quickMatch: z.ZodDefault<z.ZodBoolean>;
|
|
9848
|
+
tournaments: z.ZodDefault<z.ZodBoolean>;
|
|
7307
9849
|
modes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
7308
9850
|
key: z.ZodString;
|
|
7309
9851
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -7319,6 +9861,7 @@ export declare const StaticGame: z.ZodObject<{
|
|
|
7319
9861
|
join?: boolean | undefined;
|
|
7320
9862
|
spectate?: boolean | undefined;
|
|
7321
9863
|
quickMatch?: boolean | undefined;
|
|
9864
|
+
tournaments?: boolean | undefined;
|
|
7322
9865
|
modes?: {
|
|
7323
9866
|
key: string;
|
|
7324
9867
|
title?: string | undefined;
|
|
@@ -7348,6 +9891,7 @@ export declare const ProcessGame: z.ZodObject<{
|
|
|
7348
9891
|
x: z.ZodOptional<z.ZodNumber>;
|
|
7349
9892
|
y: z.ZodOptional<z.ZodNumber>;
|
|
7350
9893
|
}, z.core.$strict>]>>;
|
|
9894
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7351
9895
|
dailyChallenges: z.ZodOptional<z.ZodBoolean>;
|
|
7352
9896
|
leaderboards: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
7353
9897
|
key: z.ZodString;
|
|
@@ -7437,6 +9981,7 @@ export declare const ProcessGame: z.ZodObject<{
|
|
|
7437
9981
|
join: z.ZodDefault<z.ZodBoolean>;
|
|
7438
9982
|
spectate: z.ZodDefault<z.ZodBoolean>;
|
|
7439
9983
|
quickMatch: z.ZodDefault<z.ZodBoolean>;
|
|
9984
|
+
tournaments: z.ZodDefault<z.ZodBoolean>;
|
|
7440
9985
|
modes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
7441
9986
|
key: z.ZodString;
|
|
7442
9987
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -7452,6 +9997,7 @@ export declare const ProcessGame: z.ZodObject<{
|
|
|
7452
9997
|
join?: boolean | undefined;
|
|
7453
9998
|
spectate?: boolean | undefined;
|
|
7454
9999
|
quickMatch?: boolean | undefined;
|
|
10000
|
+
tournaments?: boolean | undefined;
|
|
7455
10001
|
modes?: {
|
|
7456
10002
|
key: string;
|
|
7457
10003
|
title?: string | undefined;
|
|
@@ -7481,6 +10027,7 @@ export declare const GameManifest: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7481
10027
|
x: z.ZodOptional<z.ZodNumber>;
|
|
7482
10028
|
y: z.ZodOptional<z.ZodNumber>;
|
|
7483
10029
|
}, z.core.$strict>]>>;
|
|
10030
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7484
10031
|
dailyChallenges: z.ZodOptional<z.ZodBoolean>;
|
|
7485
10032
|
leaderboards: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
7486
10033
|
key: z.ZodString;
|
|
@@ -7569,6 +10116,7 @@ export declare const GameManifest: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7569
10116
|
join: z.ZodDefault<z.ZodBoolean>;
|
|
7570
10117
|
spectate: z.ZodDefault<z.ZodBoolean>;
|
|
7571
10118
|
quickMatch: z.ZodDefault<z.ZodBoolean>;
|
|
10119
|
+
tournaments: z.ZodDefault<z.ZodBoolean>;
|
|
7572
10120
|
modes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
7573
10121
|
key: z.ZodString;
|
|
7574
10122
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -7584,6 +10132,7 @@ export declare const GameManifest: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7584
10132
|
join?: boolean | undefined;
|
|
7585
10133
|
spectate?: boolean | undefined;
|
|
7586
10134
|
quickMatch?: boolean | undefined;
|
|
10135
|
+
tournaments?: boolean | undefined;
|
|
7587
10136
|
modes?: {
|
|
7588
10137
|
key: string;
|
|
7589
10138
|
title?: string | undefined;
|
|
@@ -7611,6 +10160,7 @@ export declare const GameManifest: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7611
10160
|
x: z.ZodOptional<z.ZodNumber>;
|
|
7612
10161
|
y: z.ZodOptional<z.ZodNumber>;
|
|
7613
10162
|
}, z.core.$strict>]>>;
|
|
10163
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7614
10164
|
dailyChallenges: z.ZodOptional<z.ZodBoolean>;
|
|
7615
10165
|
leaderboards: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
7616
10166
|
key: z.ZodString;
|
|
@@ -7700,6 +10250,7 @@ export declare const GameManifest: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7700
10250
|
join: z.ZodDefault<z.ZodBoolean>;
|
|
7701
10251
|
spectate: z.ZodDefault<z.ZodBoolean>;
|
|
7702
10252
|
quickMatch: z.ZodDefault<z.ZodBoolean>;
|
|
10253
|
+
tournaments: z.ZodDefault<z.ZodBoolean>;
|
|
7703
10254
|
modes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
7704
10255
|
key: z.ZodString;
|
|
7705
10256
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -7715,6 +10266,7 @@ export declare const GameManifest: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
7715
10266
|
join?: boolean | undefined;
|
|
7716
10267
|
spectate?: boolean | undefined;
|
|
7717
10268
|
quickMatch?: boolean | undefined;
|
|
10269
|
+
tournaments?: boolean | undefined;
|
|
7718
10270
|
modes?: {
|
|
7719
10271
|
key: string;
|
|
7720
10272
|
title?: string | undefined;
|
|
@@ -7754,6 +10306,7 @@ export declare const GamePackageJson: z.ZodObject<{
|
|
|
7754
10306
|
x: z.ZodOptional<z.ZodNumber>;
|
|
7755
10307
|
y: z.ZodOptional<z.ZodNumber>;
|
|
7756
10308
|
}, z.core.$strict>]>>;
|
|
10309
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7757
10310
|
dailyChallenges: z.ZodOptional<z.ZodBoolean>;
|
|
7758
10311
|
leaderboards: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
7759
10312
|
key: z.ZodString;
|
|
@@ -7842,6 +10395,7 @@ export declare const GamePackageJson: z.ZodObject<{
|
|
|
7842
10395
|
join: z.ZodDefault<z.ZodBoolean>;
|
|
7843
10396
|
spectate: z.ZodDefault<z.ZodBoolean>;
|
|
7844
10397
|
quickMatch: z.ZodDefault<z.ZodBoolean>;
|
|
10398
|
+
tournaments: z.ZodDefault<z.ZodBoolean>;
|
|
7845
10399
|
modes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
7846
10400
|
key: z.ZodString;
|
|
7847
10401
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -7857,6 +10411,7 @@ export declare const GamePackageJson: z.ZodObject<{
|
|
|
7857
10411
|
join?: boolean | undefined;
|
|
7858
10412
|
spectate?: boolean | undefined;
|
|
7859
10413
|
quickMatch?: boolean | undefined;
|
|
10414
|
+
tournaments?: boolean | undefined;
|
|
7860
10415
|
modes?: {
|
|
7861
10416
|
key: string;
|
|
7862
10417
|
title?: string | undefined;
|
|
@@ -7884,6 +10439,7 @@ export declare const GamePackageJson: z.ZodObject<{
|
|
|
7884
10439
|
x: z.ZodOptional<z.ZodNumber>;
|
|
7885
10440
|
y: z.ZodOptional<z.ZodNumber>;
|
|
7886
10441
|
}, z.core.$strict>]>>;
|
|
10442
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7887
10443
|
dailyChallenges: z.ZodOptional<z.ZodBoolean>;
|
|
7888
10444
|
leaderboards: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
7889
10445
|
key: z.ZodString;
|
|
@@ -7973,6 +10529,7 @@ export declare const GamePackageJson: z.ZodObject<{
|
|
|
7973
10529
|
join: z.ZodDefault<z.ZodBoolean>;
|
|
7974
10530
|
spectate: z.ZodDefault<z.ZodBoolean>;
|
|
7975
10531
|
quickMatch: z.ZodDefault<z.ZodBoolean>;
|
|
10532
|
+
tournaments: z.ZodDefault<z.ZodBoolean>;
|
|
7976
10533
|
modes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
7977
10534
|
key: z.ZodString;
|
|
7978
10535
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -7988,6 +10545,7 @@ export declare const GamePackageJson: z.ZodObject<{
|
|
|
7988
10545
|
join?: boolean | undefined;
|
|
7989
10546
|
spectate?: boolean | undefined;
|
|
7990
10547
|
quickMatch?: boolean | undefined;
|
|
10548
|
+
tournaments?: boolean | undefined;
|
|
7991
10549
|
modes?: {
|
|
7992
10550
|
key: string;
|
|
7993
10551
|
title?: string | undefined;
|
|
@@ -8043,6 +10601,66 @@ export declare const HubInject: z.ZodObject<{
|
|
|
8043
10601
|
/** The injected `window.__HUB__` config. */
|
|
8044
10602
|
export type HubInject = z.infer<typeof HubInject>;
|
|
8045
10603
|
//#endregion
|
|
10604
|
+
//#region src/manifest/labels.d.ts
|
|
10605
|
+
/** The vocabulary, by group. */
|
|
10606
|
+
export declare const GAME_LABEL_GROUPS: {
|
|
10607
|
+
/** What kind of game. */
|
|
10608
|
+
readonly genre: readonly ["cards", "board", "puzzle", "arcade", "platformer", "real-time-strategy", "physics", "typing", "word", "sports", "racing"];
|
|
10609
|
+
/** How it looks. */
|
|
10610
|
+
readonly form: readonly ["2d", "3d"];
|
|
10611
|
+
/** Where it plays: `phone` (touch controls), `controller` (gamepad support), `desktop` (keyboard or mouse only). */
|
|
10612
|
+
readonly platform: readonly ["phone", "controller", "desktop"];
|
|
10613
|
+
/** How many play. */
|
|
10614
|
+
readonly play: readonly ["multiplayer", "single-player"];
|
|
10615
|
+
};
|
|
10616
|
+
/** A label group's key. */
|
|
10617
|
+
export type GameLabelGroup = keyof typeof GAME_LABEL_GROUPS;
|
|
10618
|
+
/** The groups in display order. */
|
|
10619
|
+
export declare const GAME_LABEL_GROUP_ORDER: readonly GameLabelGroup[];
|
|
10620
|
+
/** Every label, in display order (group by group). */
|
|
10621
|
+
export declare const GAME_LABELS: readonly ["cards", "board", "puzzle", "arcade", "platformer", "real-time-strategy", "physics", "typing", "word", "sports", "racing", "2d", "3d", "phone", "controller", "desktop", "multiplayer", "single-player"];
|
|
10622
|
+
/** One known label. */
|
|
10623
|
+
export declare const GameLabel: z.ZodEnum<{
|
|
10624
|
+
racing: "racing";
|
|
10625
|
+
typing: "typing";
|
|
10626
|
+
multiplayer: "multiplayer";
|
|
10627
|
+
board: "board";
|
|
10628
|
+
cards: "cards";
|
|
10629
|
+
puzzle: "puzzle";
|
|
10630
|
+
arcade: "arcade";
|
|
10631
|
+
platformer: "platformer";
|
|
10632
|
+
"real-time-strategy": "real-time-strategy";
|
|
10633
|
+
physics: "physics";
|
|
10634
|
+
word: "word";
|
|
10635
|
+
sports: "sports";
|
|
10636
|
+
"2d": "2d";
|
|
10637
|
+
"3d": "3d";
|
|
10638
|
+
phone: "phone";
|
|
10639
|
+
controller: "controller";
|
|
10640
|
+
desktop: "desktop";
|
|
10641
|
+
"single-player": "single-player";
|
|
10642
|
+
}>;
|
|
10643
|
+
/** One known label. */
|
|
10644
|
+
export type GameLabel = z.infer<typeof GameLabel>;
|
|
10645
|
+
/** Each label's display name. */
|
|
10646
|
+
export declare const GAME_LABEL_TITLES: Readonly<Record<GameLabel, string>>;
|
|
10647
|
+
/** Each group's display name. */
|
|
10648
|
+
export declare const GAME_LABEL_GROUP_TITLES: Readonly<Record<GameLabelGroup, string>>;
|
|
10649
|
+
/** Whether `text` is a known label. */
|
|
10650
|
+
export declare function isGameLabel(text: string): text is GameLabel;
|
|
10651
|
+
/** The group a label belongs to. */
|
|
10652
|
+
export declare function groupOfLabel(label: GameLabel): GameLabelGroup;
|
|
10653
|
+
/**
|
|
10654
|
+
* `game.labels` as written: short strings. Unknown ones parse (they are a
|
|
10655
|
+
* warning, see {@link splitGameLabels}).
|
|
10656
|
+
*/
|
|
10657
|
+
export declare const GameLabels: z.ZodArray<z.ZodString>;
|
|
10658
|
+
/** Known labels (trimmed, lower-cased, de-duplicated, in vocabulary order) and the unknown ones as written. */
|
|
10659
|
+
export declare function splitGameLabels(written: readonly string[]): {
|
|
10660
|
+
readonly labels: GameLabel[];
|
|
10661
|
+
readonly unknown: string[];
|
|
10662
|
+
};
|
|
10663
|
+
//#endregion
|
|
8046
10664
|
//#region src/manifest/leaderboards.d.ts
|
|
8047
10665
|
/** One declared leaderboard. */
|
|
8048
10666
|
export declare const LeaderboardDecl: z.ZodObject<{
|
|
@@ -8107,6 +10725,7 @@ export declare const GameMultiplayer: z.ZodObject<{
|
|
|
8107
10725
|
join: z.ZodDefault<z.ZodBoolean>;
|
|
8108
10726
|
spectate: z.ZodDefault<z.ZodBoolean>;
|
|
8109
10727
|
quickMatch: z.ZodDefault<z.ZodBoolean>;
|
|
10728
|
+
tournaments: z.ZodDefault<z.ZodBoolean>;
|
|
8110
10729
|
modes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
8111
10730
|
key: z.ZodString;
|
|
8112
10731
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -8129,6 +10748,7 @@ export declare const StaticGameMultiplayer: z.ZodObject<{
|
|
|
8129
10748
|
join: z.ZodDefault<z.ZodBoolean>;
|
|
8130
10749
|
spectate: z.ZodDefault<z.ZodBoolean>;
|
|
8131
10750
|
quickMatch: z.ZodDefault<z.ZodBoolean>;
|
|
10751
|
+
tournaments: z.ZodDefault<z.ZodBoolean>;
|
|
8132
10752
|
modes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
8133
10753
|
key: z.ZodString;
|
|
8134
10754
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -8335,6 +10955,30 @@ export declare const MANIFEST_LIMITS: {
|
|
|
8335
10955
|
/** Largest `game.race.minMs`, in ms (10 minutes). */
|
|
8336
10956
|
readonly raceMinMsMax: 600000;
|
|
8337
10957
|
};
|
|
10958
|
+
/** What a tournament may be (batch-2026-10 R15). The server enforces each one. */
|
|
10959
|
+
export declare const TOURNAMENT_LIMITS: {
|
|
10960
|
+
/** Longest title, in characters. */
|
|
10961
|
+
readonly titleMax: 48;
|
|
10962
|
+
/** Fewest players. */
|
|
10963
|
+
readonly playersMin: 2;
|
|
10964
|
+
/** Most players. */
|
|
10965
|
+
readonly playersMax: 64;
|
|
10966
|
+
/** Most games in the set a tournament picks from. */
|
|
10967
|
+
readonly gamesMax: 8;
|
|
10968
|
+
/** Lives per player: 1 single, 2 double, 3 triple elimination. */
|
|
10969
|
+
readonly livesMax: 3;
|
|
10970
|
+
/** The default and the longest window to join a ready match before forfeiting, in minutes. */
|
|
10971
|
+
readonly readyMinutesDefault: 10;
|
|
10972
|
+
readonly readyMinutesMax: 60;
|
|
10973
|
+
/** The longest "remind me before it starts", in minutes (one day). */
|
|
10974
|
+
readonly leadMinutesMax: 1440;
|
|
10975
|
+
/** The default reminder for players who signed up for a scheduled tournament, in minutes. */
|
|
10976
|
+
readonly leadMinutesDefault: 10;
|
|
10977
|
+
/** The furthest ahead a tournament may be scheduled, in days. */
|
|
10978
|
+
readonly scheduleDaysMax: 30;
|
|
10979
|
+
/** Most friends invited in one call. */
|
|
10980
|
+
readonly invitesMax: 50;
|
|
10981
|
+
};
|
|
8338
10982
|
//#endregion
|
|
8339
10983
|
//#region src/logic/daily.d.ts
|
|
8340
10984
|
/**
|