@orakl/protocol 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/LICENSE +662 -0
  2. package/dist/badges.d.ts +19 -0
  3. package/dist/badges.js +1 -0
  4. package/dist/emotes.d.ts +5 -0
  5. package/dist/emotes.js +62 -0
  6. package/dist/error-codes.d.ts +1 -0
  7. package/dist/error-codes.js +1 -0
  8. package/dist/game-answer-record.d.ts +31 -0
  9. package/dist/game-answer-record.js +1 -0
  10. package/dist/game.d.ts +83 -0
  11. package/dist/game.js +1 -0
  12. package/dist/game.settings.d.ts +91 -0
  13. package/dist/game.settings.js +61 -0
  14. package/dist/index.d.ts +23 -0
  15. package/dist/index.js +13 -0
  16. package/dist/pages/app.schema.d.ts +544 -0
  17. package/dist/pages/app.schema.js +336 -0
  18. package/dist/pages/auth.schema.d.ts +25 -0
  19. package/dist/pages/auth.schema.js +23 -0
  20. package/dist/pages/common.schema.d.ts +27 -0
  21. package/dist/pages/common.schema.js +28 -0
  22. package/dist/pages/history.schema.d.ts +273 -0
  23. package/dist/pages/history.schema.js +210 -0
  24. package/dist/pages/quiz.schema.d.ts +150 -0
  25. package/dist/pages/quiz.schema.js +132 -0
  26. package/dist/player-safe-question.d.ts +13 -0
  27. package/dist/player-safe-question.js +1 -0
  28. package/dist/question.d.ts +6 -0
  29. package/dist/question.js +12 -0
  30. package/dist/question.schema.d.ts +494 -0
  31. package/dist/question.schema.js +132 -0
  32. package/dist/scoring.schema.d.ts +7 -0
  33. package/dist/scoring.schema.js +8 -0
  34. package/dist/solo-ws.d.ts +202 -0
  35. package/dist/solo-ws.js +4 -0
  36. package/dist/streak-flourish.d.ts +6 -0
  37. package/dist/streak-flourish.js +1 -0
  38. package/dist/wire/leaderboard.d.ts +6 -0
  39. package/dist/wire/leaderboard.js +1 -0
  40. package/dist/wire/question-bank.d.ts +23 -0
  41. package/dist/wire/question-bank.js +1 -0
  42. package/dist/wire/question-flags.d.ts +40 -0
  43. package/dist/wire/question-flags.js +1 -0
  44. package/dist/ws-game.schema.d.ts +75 -0
  45. package/dist/ws-game.schema.js +131 -0
  46. package/dist/ws-solo.schema.d.ts +31 -0
  47. package/dist/ws-solo.schema.js +57 -0
  48. package/dist/ws.d.ts +281 -0
  49. package/dist/ws.js +1 -0
  50. package/package.json +39 -0
@@ -0,0 +1,544 @@
1
+ import { Schema } from "effect";
2
+ /** Body of `GET /api/pages/home`. */
3
+ export declare const HomePageSchema: Schema.Struct<{
4
+ isLoggedIn: typeof Schema.Boolean;
5
+ isCurator: typeof Schema.Boolean;
6
+ host: Schema.NullOr<Schema.Struct<{
7
+ badge: Schema.NullOr<typeof Schema.String>;
8
+ open: typeof Schema.Boolean;
9
+ }>>;
10
+ }>;
11
+ /** Body of `POST /api/pages/billing/return`: the route to land the member on. */
12
+ export declare const BillingReturnPageSchema: Schema.Struct<{
13
+ route: typeof Schema.String;
14
+ }>;
15
+ /** Body of `GET /api/pages/profile`. */
16
+ export declare const ProfilePageSchema: Schema.Struct<{
17
+ user: Schema.Struct<{
18
+ nickname: Schema.NullOr<typeof Schema.String>;
19
+ role: Schema.Literal<["anonymous", "display", "member", "curator", "admin"]>;
20
+ powers: Schema.mutable<Schema.Array$<Schema.Schema<"can-access-mimic" | "can-send-feedback" | "can-import-quizzes" | "can-manage-features" | "can-add-questions" | "can-manage-categories" | "can-moderate-questions" | "can-publish-questions" | "is-power-user" | "can-manage-avatars" | "can-apply-for-curation" | "can-1v1", "can-access-mimic" | "can-send-feedback" | "can-import-quizzes" | "can-manage-features" | "can-add-questions" | "can-manage-categories" | "can-moderate-questions" | "can-publish-questions" | "is-power-user" | "can-manage-avatars" | "can-apply-for-curation" | "can-1v1", never>>>;
21
+ avatar: typeof Schema.String;
22
+ emailVerified: typeof Schema.Boolean;
23
+ }>;
24
+ theme: Schema.Struct<{
25
+ mode: Schema.Union<[Schema.Literal<["dark", "light", "system", "dynamic"]>, Schema.Literal<["night", "dawn", "morning", "noon", "evening", "sunset", "dusk"]>]>;
26
+ }>;
27
+ font: Schema.Literal<["default", "dyslexic"]>;
28
+ pendingRequest: Schema.NullOr<Schema.Struct<{
29
+ id: typeof Schema.String;
30
+ user_id: typeof Schema.String;
31
+ status: typeof Schema.String;
32
+ created_at: typeof Schema.String;
33
+ }>>;
34
+ subscription: Schema.NullOr<Schema.Struct<{
35
+ user_id: typeof Schema.String;
36
+ provider: typeof Schema.String;
37
+ provider_customer_id: typeof Schema.String;
38
+ provider_subscription_id: Schema.NullOr<typeof Schema.String>;
39
+ status: typeof Schema.String;
40
+ past_due_at: Schema.NullOr<typeof Schema.String>;
41
+ current_period_end: Schema.NullOr<typeof Schema.String>;
42
+ updated_at: typeof Schema.String;
43
+ }>>;
44
+ graceOver: typeof Schema.Boolean;
45
+ allowance: Schema.NullOr<Schema.Struct<{
46
+ used: typeof Schema.Number;
47
+ limit: typeof Schema.Number;
48
+ left: typeof Schema.Number;
49
+ entitled: typeof Schema.Boolean;
50
+ unverified: typeof Schema.Boolean;
51
+ }>>;
52
+ breakdown: Schema.Struct<{
53
+ exact: Schema.NullOr<Schema.Struct<{
54
+ vat: typeof Schema.Number;
55
+ fee: typeof Schema.Number;
56
+ net: typeof Schema.Number;
57
+ total: typeof Schema.Number;
58
+ }>>;
59
+ estimate: Schema.Struct<{
60
+ monthly: Schema.Struct<{
61
+ vat: typeof Schema.Number;
62
+ fee: typeof Schema.Number;
63
+ net: typeof Schema.Number;
64
+ }>;
65
+ lifetime: Schema.Struct<{
66
+ vat: typeof Schema.Number;
67
+ fee: typeof Schema.Number;
68
+ net: typeof Schema.Number;
69
+ }>;
70
+ }>;
71
+ }>;
72
+ welcome: Schema.NullOr<Schema.Literal<["monthly", "lifetime"]>>;
73
+ claimed: typeof Schema.Boolean;
74
+ verified: typeof Schema.Boolean;
75
+ tab: Schema.Literal<["account", "appearance", "privacy", "tools"]>;
76
+ tools: typeof Schema.Boolean;
77
+ }>;
78
+ /** Body of `GET /api/pages/profile/sessions`. */
79
+ export declare const ProfileSessionsPageSchema: Schema.Struct<{
80
+ sessions: Schema.mutable<Schema.Array$<Schema.Schema<{
81
+ readonly location: string | null;
82
+ readonly label: string;
83
+ readonly createdAt: number;
84
+ readonly sid: string;
85
+ readonly fingerprint: string;
86
+ readonly lastSeen: number;
87
+ readonly current: boolean;
88
+ }, {
89
+ readonly location: string | null;
90
+ readonly label: string;
91
+ readonly createdAt: number;
92
+ readonly sid: string;
93
+ readonly fingerprint: string;
94
+ readonly lastSeen: number;
95
+ readonly current: boolean;
96
+ }, never>>>;
97
+ locationOptIn: Schema.Struct<{
98
+ enabled: typeof Schema.Boolean;
99
+ since: Schema.NullOr<typeof Schema.Number>;
100
+ }>;
101
+ }>;
102
+ /** Body of `GET /api/pages/manage/avatars`. */
103
+ export declare const ManageAvatarsPageSchema: Schema.Struct<{
104
+ sortedGroups: Schema.mutable<Schema.Array$<Schema.Schema<[string, {
105
+ readonly src: string;
106
+ readonly id: string;
107
+ readonly title: string;
108
+ readonly description?: string | undefined;
109
+ readonly category?: string | undefined;
110
+ }[]], [string, {
111
+ readonly src: string;
112
+ readonly id: string;
113
+ readonly title: string;
114
+ readonly description?: string | undefined;
115
+ readonly category?: string | undefined;
116
+ }[]], never>>>;
117
+ categories: Schema.mutable<Schema.Array$<Schema.Schema<string, string, never>>>;
118
+ }>;
119
+ declare const CategorySchema: Schema.Struct<{
120
+ id: typeof Schema.String;
121
+ name: typeof Schema.String;
122
+ description: Schema.NullOr<typeof Schema.String>;
123
+ icon: Schema.NullOr<typeof Schema.String>;
124
+ color: Schema.NullOr<typeof Schema.String>;
125
+ question_count: typeof Schema.Number;
126
+ }>;
127
+ export type Category = typeof CategorySchema.Type;
128
+ /** Body of `GET /api/pages/manage/categories`. */
129
+ export declare const ManageCategoriesPageSchema: Schema.Struct<{
130
+ initial: Schema.mutable<Schema.Array$<Schema.Schema<{
131
+ readonly name: string;
132
+ readonly id: string;
133
+ readonly color: string | null;
134
+ readonly description: string | null;
135
+ readonly icon: string | null;
136
+ readonly question_count: number;
137
+ }, {
138
+ readonly name: string;
139
+ readonly id: string;
140
+ readonly color: string | null;
141
+ readonly description: string | null;
142
+ readonly icon: string | null;
143
+ readonly question_count: number;
144
+ }, never>>>;
145
+ }>;
146
+ declare const AdminFlagRowSchema: Schema.Struct<{
147
+ questionId: typeof Schema.String;
148
+ excerpt: typeof Schema.String;
149
+ categoryId: typeof Schema.String;
150
+ flagCount: typeof Schema.Number;
151
+ status: Schema.Literal<["open", "resolved"]>;
152
+ }>;
153
+ /** One flagged-question row on the operator dashboard. */
154
+ export type AdminFlagRow = typeof AdminFlagRowSchema.Type;
155
+ /** Body of `GET /api/pages/manage/flagged-questions`. */
156
+ export declare const ManageFlaggedQuestionsPageSchema: Schema.Struct<{
157
+ initial: Schema.mutable<Schema.Array$<Schema.Schema<{
158
+ readonly status: "open" | "resolved";
159
+ readonly categoryId: string;
160
+ readonly questionId: string;
161
+ readonly excerpt: string;
162
+ readonly flagCount: number;
163
+ }, {
164
+ readonly status: "open" | "resolved";
165
+ readonly categoryId: string;
166
+ readonly questionId: string;
167
+ readonly excerpt: string;
168
+ readonly flagCount: number;
169
+ }, never>>>;
170
+ initialHasMore: typeof Schema.Boolean;
171
+ statusFilter: Schema.Literal<["open", "resolved", "all"]>;
172
+ page: typeof Schema.Number;
173
+ }>;
174
+ declare const AuthoredQuestionRowSchema: Schema.Struct<{
175
+ id: typeof Schema.String;
176
+ category: typeof Schema.String;
177
+ label: typeof Schema.String;
178
+ created_at: typeof Schema.String;
179
+ updated_at: Schema.NullOr<typeof Schema.String>;
180
+ created_by: Schema.NullOr<typeof Schema.String>;
181
+ author_nickname: Schema.NullOr<typeof Schema.String>;
182
+ author_email: Schema.NullOr<typeof Schema.String>;
183
+ published_at: Schema.NullOr<typeof Schema.String>;
184
+ published_by: Schema.NullOr<typeof Schema.String>;
185
+ unpublished_at: Schema.NullOr<typeof Schema.String>;
186
+ unpublished_by: Schema.NullOr<typeof Schema.String>;
187
+ unpublish_reason: Schema.NullOr<typeof Schema.String>;
188
+ changed_since_publish: typeof Schema.Number;
189
+ }>;
190
+ /** One curator-authored question, with the author's identity. */
191
+ export type AuthoredQuestionRow = typeof AuthoredQuestionRowSchema.Type;
192
+ /** Body of `GET /api/pages/manage/questions`. */
193
+ export declare const ManageQuestionsPageSchema: Schema.Struct<{
194
+ initial: Schema.Struct<{
195
+ rows: Schema.mutable<Schema.Array$<Schema.Schema<{
196
+ readonly id: string;
197
+ readonly label: string;
198
+ readonly category: string;
199
+ readonly created_at: string;
200
+ readonly updated_at: string | null;
201
+ readonly created_by: string | null;
202
+ readonly author_nickname: string | null;
203
+ readonly author_email: string | null;
204
+ readonly published_at: string | null;
205
+ readonly published_by: string | null;
206
+ readonly unpublished_at: string | null;
207
+ readonly unpublished_by: string | null;
208
+ readonly unpublish_reason: string | null;
209
+ readonly changed_since_publish: number;
210
+ }, {
211
+ readonly id: string;
212
+ readonly label: string;
213
+ readonly category: string;
214
+ readonly created_at: string;
215
+ readonly updated_at: string | null;
216
+ readonly created_by: string | null;
217
+ readonly author_nickname: string | null;
218
+ readonly author_email: string | null;
219
+ readonly published_at: string | null;
220
+ readonly published_by: string | null;
221
+ readonly unpublished_at: string | null;
222
+ readonly unpublished_by: string | null;
223
+ readonly unpublish_reason: string | null;
224
+ readonly changed_since_publish: number;
225
+ }, never>>>;
226
+ total: typeof Schema.Number;
227
+ }>;
228
+ page: typeof Schema.Number;
229
+ filters: Schema.Struct<{
230
+ authorId: Schema.optional<typeof Schema.String>;
231
+ category: Schema.optional<typeof Schema.String>;
232
+ published: Schema.optional<Schema.Literal<["all", "shared", "private"]>>;
233
+ q: Schema.optional<typeof Schema.String>;
234
+ changed: Schema.optional<typeof Schema.Boolean>;
235
+ }>;
236
+ authors: Schema.mutable<Schema.Array$<Schema.Schema<{
237
+ readonly count: number;
238
+ readonly id: string;
239
+ readonly email: string | null;
240
+ readonly nickname: string | null;
241
+ }, {
242
+ readonly count: number;
243
+ readonly id: string;
244
+ readonly email: string | null;
245
+ readonly nickname: string | null;
246
+ }, never>>>;
247
+ categories: Schema.mutable<Schema.Array$<Schema.Schema<{
248
+ readonly name: string;
249
+ readonly id: string;
250
+ }, {
251
+ readonly name: string;
252
+ readonly id: string;
253
+ }, never>>>;
254
+ }>;
255
+ /** How `listAuthored` narrows the row set: an exact author id, an exact
256
+ * category name, shared or private, a literal search, edited-since-publish. */
257
+ export type AuthoredQuestionFilters = (typeof ManageQuestionsPageSchema.Type)["filters"];
258
+ /** Body of `GET /api/pages/manage/import`. */
259
+ export declare const ManageImportPageSchema: Schema.Struct<{
260
+ ok: Schema.Literal<[true]>;
261
+ }>;
262
+ declare const QuizPresetSchema: Schema.Struct<{
263
+ id: typeof Schema.String;
264
+ curator_id: typeof Schema.String;
265
+ name: typeof Schema.String;
266
+ description: Schema.NullOr<typeof Schema.String>;
267
+ category_ids: typeof Schema.String;
268
+ timer_duration: typeof Schema.Number;
269
+ questions_per_round: typeof Schema.Number;
270
+ difficulty: typeof Schema.String;
271
+ advance_mode: typeof Schema.String;
272
+ scoring_mode: Schema.NullOr<typeof Schema.String>;
273
+ access_mode: typeof Schema.String;
274
+ max_players: Schema.NullOr<typeof Schema.Number>;
275
+ created_at: typeof Schema.String;
276
+ }>;
277
+ export type QuizPreset = typeof QuizPresetSchema.Type;
278
+ /** Body of `GET /api/pages/curator/create`. */
279
+ export declare const CuratorCreatePageSchema: Schema.Struct<{
280
+ categories: Schema.mutable<Schema.Array$<Schema.Schema<{
281
+ readonly name: string;
282
+ readonly count: number;
283
+ readonly id: string;
284
+ readonly color: string;
285
+ readonly icon: string;
286
+ }, {
287
+ readonly name: string;
288
+ readonly count: number;
289
+ readonly id: string;
290
+ readonly color: string;
291
+ readonly icon: string;
292
+ }, never>>>;
293
+ categoryColors: Schema.Record$<typeof Schema.String, typeof Schema.String>;
294
+ presets: Schema.mutable<Schema.Array$<Schema.Schema<{
295
+ readonly name: string;
296
+ readonly id: string;
297
+ readonly description: string | null;
298
+ readonly difficulty: string;
299
+ readonly created_at: string;
300
+ readonly curator_id: string;
301
+ readonly category_ids: string;
302
+ readonly timer_duration: number;
303
+ readonly questions_per_round: number;
304
+ readonly advance_mode: string;
305
+ readonly scoring_mode: string | null;
306
+ readonly access_mode: string;
307
+ readonly max_players: number | null;
308
+ }, {
309
+ readonly name: string;
310
+ readonly id: string;
311
+ readonly description: string | null;
312
+ readonly difficulty: string;
313
+ readonly created_at: string;
314
+ readonly curator_id: string;
315
+ readonly category_ids: string;
316
+ readonly timer_duration: number;
317
+ readonly questions_per_round: number;
318
+ readonly advance_mode: string;
319
+ readonly scoring_mode: string | null;
320
+ readonly access_mode: string;
321
+ readonly max_players: number | null;
322
+ }, never>>>;
323
+ presetLimit: typeof Schema.Number;
324
+ subscription: Schema.NullOr<Schema.Struct<{
325
+ user_id: typeof Schema.String;
326
+ provider: typeof Schema.String;
327
+ provider_customer_id: typeof Schema.String;
328
+ provider_subscription_id: Schema.NullOr<typeof Schema.String>;
329
+ status: typeof Schema.String;
330
+ past_due_at: Schema.NullOr<typeof Schema.String>;
331
+ current_period_end: Schema.NullOr<typeof Schema.String>;
332
+ updated_at: typeof Schema.String;
333
+ }>>;
334
+ allowance: Schema.Struct<{
335
+ used: typeof Schema.Number;
336
+ limit: typeof Schema.Number;
337
+ left: typeof Schema.Number;
338
+ entitled: typeof Schema.Boolean;
339
+ unverified: typeof Schema.Boolean;
340
+ }>;
341
+ }>;
342
+ /** Body of `GET /api/pages/curator/history`. */
343
+ export declare const CuratorHistoryPageSchema: Schema.Struct<{
344
+ entries: Schema.mutable<Schema.Array$<Schema.Schema<{
345
+ readonly id: string;
346
+ readonly quiz_name: string;
347
+ readonly started_at: string;
348
+ readonly player_count: number;
349
+ readonly total_questions: number;
350
+ readonly winners: string[];
351
+ readonly top_score: number | null;
352
+ }, {
353
+ readonly id: string;
354
+ readonly quiz_name: string;
355
+ readonly started_at: string;
356
+ readonly player_count: number;
357
+ readonly total_questions: number;
358
+ readonly winners: string[];
359
+ readonly top_score: number | null;
360
+ }, never>>>;
361
+ nextCursor: Schema.NullOr<typeof Schema.String>;
362
+ }>;
363
+ declare const AnswerSpreadEntrySchema: Schema.Struct<{
364
+ answerId: typeof Schema.String;
365
+ text: typeof Schema.String;
366
+ count: typeof Schema.Number;
367
+ correct: typeof Schema.Boolean;
368
+ }>;
369
+ /** How many players picked one answer option. */
370
+ export type AnswerSpreadEntry = typeof AnswerSpreadEntrySchema.Type;
371
+ /** Body of `GET /api/pages/curator/history/:id`. */
372
+ export declare const CuratorHistoryEntryPageSchema: Schema.Struct<{
373
+ entry: Schema.Struct<{
374
+ session: Schema.Struct<{
375
+ id: typeof Schema.String;
376
+ quiz_name: typeof Schema.String;
377
+ started_at: typeof Schema.String;
378
+ ended_at: Schema.NullOr<typeof Schema.String>;
379
+ categoryIds: Schema.mutable<Schema.Array$<Schema.Schema<string, string, never>>>;
380
+ timer_duration: typeof Schema.Number;
381
+ total_questions: typeof Schema.Number;
382
+ player_count: typeof Schema.Number;
383
+ curator_id: Schema.NullOr<typeof Schema.String>;
384
+ difficulty: Schema.NullOr<typeof Schema.String>;
385
+ advance_mode: Schema.NullOr<typeof Schema.String>;
386
+ access_mode: Schema.NullOr<typeof Schema.String>;
387
+ max_players: Schema.NullOr<typeof Schema.Number>;
388
+ questions_per_round: Schema.NullOr<typeof Schema.Number>;
389
+ preset_id: Schema.NullOr<typeof Schema.String>;
390
+ stopped_at: Schema.NullOr<typeof Schema.String>;
391
+ planned_questions: Schema.NullOr<typeof Schema.Number>;
392
+ }>;
393
+ results: Schema.mutable<Schema.Array$<Schema.Schema<{
394
+ readonly id: string;
395
+ readonly role: "player" | "observer" | null;
396
+ readonly user_id: string | null;
397
+ readonly player_nickname: string;
398
+ readonly final_score: number;
399
+ readonly rank: number;
400
+ readonly player_id: string | null;
401
+ readonly avatar_id: string | null;
402
+ readonly avatarSrc: string;
403
+ }, {
404
+ readonly id: string;
405
+ readonly role: "player" | "observer" | null;
406
+ readonly user_id: string | null;
407
+ readonly player_nickname: string;
408
+ readonly final_score: number;
409
+ readonly rank: number;
410
+ readonly player_id: string | null;
411
+ readonly avatar_id: string | null;
412
+ readonly avatarSrc: string;
413
+ }, never>>>;
414
+ questions: Schema.NullOr<Schema.mutable<Schema.Array$<Schema.Schema<{
415
+ readonly source?: {
416
+ readonly url: string;
417
+ readonly label?: string | undefined;
418
+ } | undefined;
419
+ readonly postAnswerNote?: string | undefined;
420
+ readonly questionIndex: number;
421
+ readonly questionText?: string | undefined;
422
+ readonly mediaUrl?: string | undefined;
423
+ readonly mediaType?: "audio" | "video" | "image" | undefined;
424
+ readonly correct: number;
425
+ readonly answered: number;
426
+ readonly spread: {
427
+ readonly count: number;
428
+ readonly text: string;
429
+ readonly answerId: string;
430
+ readonly correct: boolean;
431
+ }[] | null;
432
+ readonly noAnswer: number;
433
+ }, {
434
+ readonly questionIndex: number;
435
+ readonly correct: number;
436
+ readonly answered: number;
437
+ readonly spread: {
438
+ readonly count: number;
439
+ readonly text: string;
440
+ readonly answerId: string;
441
+ readonly correct: boolean;
442
+ }[] | null;
443
+ readonly noAnswer: number;
444
+ readonly source?: {
445
+ readonly url: string;
446
+ readonly label?: string | undefined;
447
+ } | undefined;
448
+ readonly postAnswerNote?: string | undefined;
449
+ readonly questionText?: string | undefined;
450
+ readonly mediaUrl?: string | undefined;
451
+ readonly mediaType?: "audio" | "video" | "image" | undefined;
452
+ }, never>>>>;
453
+ }>;
454
+ presetLimit: typeof Schema.Number;
455
+ presetCount: typeof Schema.Number;
456
+ }>;
457
+ /** Body of `GET /api/pages/curator/questions`. */
458
+ export declare const CuratorQuestionsPageSchema: Schema.Struct<{
459
+ categories: Schema.mutable<Schema.Array$<Schema.Schema<{
460
+ readonly name: string;
461
+ readonly count: number;
462
+ readonly id: string;
463
+ readonly icon?: string | undefined;
464
+ }, {
465
+ readonly name: string;
466
+ readonly count: number;
467
+ readonly id: string;
468
+ readonly icon?: string | undefined;
469
+ }, never>>>;
470
+ ownQuestions: Schema.mutable<Schema.Array$<Schema.Schema<{
471
+ readonly id: string;
472
+ readonly label: string;
473
+ readonly category: string;
474
+ readonly created_at: string;
475
+ }, {
476
+ readonly id: string;
477
+ readonly label: string;
478
+ readonly category: string;
479
+ readonly created_at: string;
480
+ }, never>>>;
481
+ questionsCursor: Schema.NullOr<typeof Schema.String>;
482
+ }>;
483
+ /** Body of `GET /api/pages/solo/layout`. */
484
+ export declare const SoloLayoutPageSchema: Schema.Struct<{
485
+ isLoggedIn: typeof Schema.Boolean;
486
+ isGuest: typeof Schema.Boolean;
487
+ userId: typeof Schema.String;
488
+ nickname: typeof Schema.String;
489
+ profileAvatarSrc: typeof Schema.String;
490
+ categoryDataJson: typeof Schema.String;
491
+ }>;
492
+ declare const LeaderboardEntrySchema: Schema.Struct<{
493
+ rank: typeof Schema.Number;
494
+ user_id: typeof Schema.String;
495
+ nickname: typeof Schema.String;
496
+ total_score: typeof Schema.Number;
497
+ correct_count: typeof Schema.Number;
498
+ total_answered: typeof Schema.Number;
499
+ time_to_answer_avg_ms: typeof Schema.Number;
500
+ max_streak: typeof Schema.Number;
501
+ completed_at: typeof Schema.Number;
502
+ }>;
503
+ export type LeaderboardEntry = typeof LeaderboardEntrySchema.Type;
504
+ /** Body of `GET /api/pages/solo/leaderboard`. */
505
+ export declare const SoloLeaderboardPageSchema: Schema.Struct<{
506
+ entries: Schema.mutable<Schema.Array$<Schema.Schema<{
507
+ readonly user_id: string;
508
+ readonly nickname: string;
509
+ readonly rank: number;
510
+ readonly total_score: number;
511
+ readonly correct_count: number;
512
+ readonly total_answered: number;
513
+ readonly time_to_answer_avg_ms: number;
514
+ readonly max_streak: number;
515
+ readonly completed_at: number;
516
+ }, {
517
+ readonly user_id: string;
518
+ readonly nickname: string;
519
+ readonly rank: number;
520
+ readonly total_score: number;
521
+ readonly correct_count: number;
522
+ readonly total_answered: number;
523
+ readonly time_to_answer_avg_ms: number;
524
+ readonly max_streak: number;
525
+ readonly completed_at: number;
526
+ }, never>>>;
527
+ board: Schema.Literal<["score", "streak", "accuracy", "speed", "survival"]>;
528
+ scope: Schema.Literal<["all-time", "daily", "weekly", "monthly"]>;
529
+ categoryId: Schema.NullOr<typeof Schema.String>;
530
+ difficulty: Schema.NullOr<Schema.Literal<["easy", "medium", "hard"]>>;
531
+ categories: Schema.mutable<Schema.Array$<Schema.Schema<{
532
+ readonly name: string;
533
+ readonly id: string;
534
+ }, {
535
+ readonly name: string;
536
+ readonly id: string;
537
+ }, never>>>;
538
+ userRank: Schema.NullOr<typeof Schema.Number>;
539
+ eligibleCount: typeof Schema.Number;
540
+ percentile: Schema.NullOr<typeof Schema.Number>;
541
+ around: typeof Schema.Boolean;
542
+ viewerId: Schema.NullOr<typeof Schema.String>;
543
+ }>;
544
+ export {};