@orakl/protocol 0.9.0 → 0.11.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.
@@ -1 +1 @@
1
- export type ErrorCode = "no_active_lobby" | "no_active_game" | "device_blocked" | "nickname_taken" | "device_in_lobby" | "player_not_found" | "player_not_pending" | "intermission_invalid_phase" | "not_in_intermission" | "category_name_exists" | "category_not_found" | "category_has_questions" | "tag_name_exists" | "tag_not_found" | "tag_has_questions" | "tag_in_season" | "category_in_season" | "season_name_exists" | "season_not_found" | "user_not_found" | "curation_request_pending" | "curator_self_join" | "already_flagged" | "question_not_found" | "invalid_answer" | "game_in_progress" | "already_answered" | "observer_forbidden" | "no_questions" | "season_out_of_season" | "no_categories" | "too_few_players" | "hosting_closed" | "not_answered" | "flag_not_toggleable" | "solo_invalid_phase" | "solo_invalid_answer" | "solo_nonce_mismatch" | "solo_answer_expired" | "solo_guest_limit" | "solo_no_questions" | "solo_season_out_of_season" | "solo_resume_denied" | "solo_auth_failed";
1
+ export type ErrorCode = "no_active_lobby" | "no_active_game" | "device_blocked" | "nickname_taken" | "nickname_locked" | "device_in_lobby" | "player_not_found" | "player_not_pending" | "intermission_invalid_phase" | "not_in_intermission" | "category_name_exists" | "category_not_found" | "category_has_questions" | "tag_name_exists" | "tag_not_found" | "tag_has_questions" | "tag_in_season" | "category_in_season" | "season_name_exists" | "season_not_found" | "user_not_found" | "curation_request_pending" | "curator_self_join" | "already_flagged" | "question_not_found" | "invalid_answer" | "game_in_progress" | "already_answered" | "observer_forbidden" | "no_questions" | "season_out_of_season" | "no_categories" | "too_few_players" | "hosting_closed" | "not_answered" | "flag_not_toggleable" | "solo_invalid_phase" | "solo_invalid_answer" | "solo_nonce_mismatch" | "solo_answer_expired" | "solo_guest_limit" | "solo_no_questions" | "solo_season_out_of_season" | "solo_resume_denied" | "solo_auth_failed";
@@ -48,6 +48,34 @@ export declare const AdminUsersPageSchema: Schema.Struct<{
48
48
  nickname: Schema.NullOr<typeof Schema.String>;
49
49
  }>>>;
50
50
  }>;
51
+ /** Body of `GET /api/pages/admin/lobbies`: every live Lobby on the machine. */
52
+ export declare const AdminLobbiesPageSchema: Schema.Struct<{
53
+ lobbies: Schema.mutable<Schema.Array$<Schema.Struct<{
54
+ code: typeof Schema.String;
55
+ phase: Schema.Literal<["lobby", "playing", "round_results", "final_scores", "role_selection", "intermission"]>;
56
+ curator: Schema.Struct<{
57
+ accountId: Schema.NullOr<typeof Schema.String>;
58
+ /** The account's nickname, else the Curator's nickname in the Lobby. */
59
+ nickname: Schema.NullOr<typeof Schema.String>;
60
+ }>;
61
+ playerCount: typeof Schema.Number;
62
+ observerCount: typeof Schema.Number;
63
+ /** Lobby age in whole seconds at read time. */
64
+ ageSeconds: typeof Schema.Number;
65
+ roster: Schema.mutable<Schema.Array$<Schema.Struct<{
66
+ /** The Lobby's player id, the target for Admin actions. */
67
+ playerId: typeof Schema.String;
68
+ nickname: typeof Schema.String;
69
+ /** Avatar id the row chose; "" when none. */
70
+ avatarId: typeof Schema.String;
71
+ role: Schema.Literal<["player", "observer"]>;
72
+ status: Schema.Literal<["pending", "active", "disconnected"]>;
73
+ /** The row is the hosting Curator's own. */
74
+ curator: typeof Schema.Boolean;
75
+ signedIn: typeof Schema.Boolean;
76
+ }>>>;
77
+ }>>>;
78
+ }>;
51
79
  /** Body of `GET /api/admin/feature-flags/dashboard`. */
52
80
  export declare const FeatureFlagsDashboardSchema: Schema.Struct<{
53
81
  flags: Schema.mutable<Schema.Array$<Schema.Struct<{
@@ -51,6 +51,34 @@ export const AdminUsersPageSchema = Schema.Struct({
51
51
  allPowers: Schema.mutable(Schema.Array(UserPowerSchema)),
52
52
  pendingRequests: Schema.mutable(Schema.Array(CurationRequestWithUserSchema)),
53
53
  });
54
+ /** Body of `GET /api/pages/admin/lobbies`: every live Lobby on the machine. */
55
+ export const AdminLobbiesPageSchema = Schema.Struct({
56
+ lobbies: Schema.mutable(Schema.Array(Schema.Struct({
57
+ code: Schema.String,
58
+ phase: Schema.Literal("lobby", "playing", "round_results", "final_scores", "role_selection", "intermission"),
59
+ curator: Schema.Struct({
60
+ accountId: Schema.NullOr(Schema.String),
61
+ /** The account's nickname, else the Curator's nickname in the Lobby. */
62
+ nickname: Schema.NullOr(Schema.String),
63
+ }),
64
+ playerCount: Schema.Number,
65
+ observerCount: Schema.Number,
66
+ /** Lobby age in whole seconds at read time. */
67
+ ageSeconds: Schema.Number,
68
+ roster: Schema.mutable(Schema.Array(Schema.Struct({
69
+ /** The Lobby's player id, the target for Admin actions. */
70
+ playerId: Schema.String,
71
+ nickname: Schema.String,
72
+ /** Avatar id the row chose; "" when none. */
73
+ avatarId: Schema.String,
74
+ role: PlayerRoleSchema,
75
+ status: Schema.Literal("pending", "active", "disconnected"),
76
+ /** The row is the hosting Curator's own. */
77
+ curator: Schema.Boolean,
78
+ signedIn: Schema.Boolean,
79
+ }))),
80
+ }))),
81
+ });
54
82
  /** Body of `GET /api/admin/feature-flags/dashboard`. */
55
83
  export const FeatureFlagsDashboardSchema = Schema.Struct({
56
84
  flags: Schema.mutable(Schema.Array(Schema.Struct({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orakl/protocol",
3
- "version": "0.9.0",
3
+ "version": "0.11.0",
4
4
  "description": "Orakl wire contract: WebSocket frames and API response schemas.",
5
5
  "license": "AGPL-3.0-only",
6
6
  "repository": {