@thegeem/protocol 0.1.13 → 0.1.15

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/dist/index.cjs CHANGED
@@ -83,8 +83,9 @@ var ClientMsg = import_zod.z.discriminatedUnion("t", [
83
83
  // Host's IN-PROGRESS category selection in the lobby — a live preview for waiting
84
84
  // players. Distinct from startGame.categoryIds, which COMMITS the board. Empty = cleared.
85
85
  import_zod.z.object({ t: import_zod.z.literal("setCategories"), categoryIds: import_zod.z.array(import_zod.z.string().max(60)).max(12) }),
86
- // Host defines the lobby teams players can join (1–12). Resets picks that fall out of range.
87
- import_zod.z.object({ t: import_zod.z.literal("setTeams"), teams: import_zod.z.array(DisplayName).min(1).max(LIMITS.MAX_PLAYERS) }),
86
+ // Host defines the lobby teams players can join (0–12; empty = disband back to the
87
+ // one-team-per-player default). Resets picks that fall out of range.
88
+ import_zod.z.object({ t: import_zod.z.literal("setTeams"), teams: import_zod.z.array(DisplayName).max(LIMITS.MAX_PLAYERS) }),
88
89
  // A player joins team slot `teamIndex` (0-based, into the host's `setTeams` list).
89
90
  import_zod.z.object({ t: import_zod.z.literal("pickTeam"), teamIndex: import_zod.z.number().int().min(0).max(LIMITS.MAX_PLAYERS - 1) }),
90
91
  // Host's IN-PROGRESS mode selection in the lobby — a live preview so waiting players see which mode
@@ -133,7 +134,11 @@ var ClientMsg = import_zod.z.discriminatedUnion("t", [
133
134
  // moderation
134
135
  // Report another player in the room (App Store 1.2 UGC — display names). Available in lobby or
135
136
  // game. The server records reporter/reported/room context; `reason` is an optional free-text note.
136
- import_zod.z.object({ t: import_zod.z.literal("report"), playerId: PlayerId, reason: import_zod.z.string().max(500).optional() })
137
+ import_zod.z.object({ t: import_zod.z.literal("report"), playerId: PlayerId, reason: import_zod.z.string().max(500).optional() }),
138
+ // Report the CURRENT question as bad (wrong answer / typo / offensive). The relay resolves WHICH
139
+ // question from its authoritative room state — the client never sees the question id (anti-cheat),
140
+ // so it only sends an optional `reason`. Only meaningful while a question is on screen.
141
+ import_zod.z.object({ t: import_zod.z.literal("reportQuestion"), reason: import_zod.z.string().max(500).optional() })
137
142
  ]);
138
143
  // Annotate the CommonJS export names for ESM import in node:
139
144
  0 && (module.exports = {
package/dist/index.d.cts CHANGED
@@ -387,6 +387,15 @@ declare const ClientMsg: z.ZodDiscriminatedUnion<"t", [z.ZodObject<{
387
387
  t: "report";
388
388
  playerId: string;
389
389
  reason?: string | undefined;
390
+ }>, z.ZodObject<{
391
+ t: z.ZodLiteral<"reportQuestion">;
392
+ reason: z.ZodOptional<z.ZodString>;
393
+ }, "strip", z.ZodTypeAny, {
394
+ t: "reportQuestion";
395
+ reason?: string | undefined;
396
+ }, {
397
+ t: "reportQuestion";
398
+ reason?: string | undefined;
390
399
  }>]>;
391
400
  type ClientMsg = z.infer<typeof ClientMsg>;
392
401
  /** A player's privacy-safe avatar (emoji + circle color) for in-room display. */
package/dist/index.d.ts CHANGED
@@ -387,6 +387,15 @@ declare const ClientMsg: z.ZodDiscriminatedUnion<"t", [z.ZodObject<{
387
387
  t: "report";
388
388
  playerId: string;
389
389
  reason?: string | undefined;
390
+ }>, z.ZodObject<{
391
+ t: z.ZodLiteral<"reportQuestion">;
392
+ reason: z.ZodOptional<z.ZodString>;
393
+ }, "strip", z.ZodTypeAny, {
394
+ t: "reportQuestion";
395
+ reason?: string | undefined;
396
+ }, {
397
+ t: "reportQuestion";
398
+ reason?: string | undefined;
390
399
  }>]>;
391
400
  type ClientMsg = z.infer<typeof ClientMsg>;
392
401
  /** A player's privacy-safe avatar (emoji + circle color) for in-room display. */
package/dist/index.js CHANGED
@@ -52,8 +52,9 @@ var ClientMsg = z.discriminatedUnion("t", [
52
52
  // Host's IN-PROGRESS category selection in the lobby — a live preview for waiting
53
53
  // players. Distinct from startGame.categoryIds, which COMMITS the board. Empty = cleared.
54
54
  z.object({ t: z.literal("setCategories"), categoryIds: z.array(z.string().max(60)).max(12) }),
55
- // Host defines the lobby teams players can join (1–12). Resets picks that fall out of range.
56
- z.object({ t: z.literal("setTeams"), teams: z.array(DisplayName).min(1).max(LIMITS.MAX_PLAYERS) }),
55
+ // Host defines the lobby teams players can join (0–12; empty = disband back to the
56
+ // one-team-per-player default). Resets picks that fall out of range.
57
+ z.object({ t: z.literal("setTeams"), teams: z.array(DisplayName).max(LIMITS.MAX_PLAYERS) }),
57
58
  // A player joins team slot `teamIndex` (0-based, into the host's `setTeams` list).
58
59
  z.object({ t: z.literal("pickTeam"), teamIndex: z.number().int().min(0).max(LIMITS.MAX_PLAYERS - 1) }),
59
60
  // Host's IN-PROGRESS mode selection in the lobby — a live preview so waiting players see which mode
@@ -102,7 +103,11 @@ var ClientMsg = z.discriminatedUnion("t", [
102
103
  // moderation
103
104
  // Report another player in the room (App Store 1.2 UGC — display names). Available in lobby or
104
105
  // game. The server records reporter/reported/room context; `reason` is an optional free-text note.
105
- z.object({ t: z.literal("report"), playerId: PlayerId, reason: z.string().max(500).optional() })
106
+ z.object({ t: z.literal("report"), playerId: PlayerId, reason: z.string().max(500).optional() }),
107
+ // Report the CURRENT question as bad (wrong answer / typo / offensive). The relay resolves WHICH
108
+ // question from its authoritative room state — the client never sees the question id (anti-cheat),
109
+ // so it only sends an optional `reason`. Only meaningful while a question is on screen.
110
+ z.object({ t: z.literal("reportQuestion"), reason: z.string().max(500).optional() })
106
111
  ]);
107
112
  export {
108
113
  ClientMsg,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thegeem/protocol",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "description": "Geem's wire protocol — shared zod schemas + TypeScript types for talking to the Geem game server over Socket.IO. The source of truth all clients implement against.",
5
5
  "license": "UNLICENSED",
6
6
  "homepage": "https://geem.tv",