@thegeem/protocol 0.1.6 → 0.1.7

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
@@ -105,8 +105,12 @@ var ClientMsg = import_zod.z.discriminatedUnion("t", [
105
105
  // trivia is 4-option (0–3)
106
106
  import_zod.z.object({ t: import_zod.z.literal("useHelp"), helpType: HelpType }),
107
107
  // sabotage a rival (active team only): spend a sabotage help to debuff targetTeam's next question
108
- import_zod.z.object({ t: import_zod.z.literal("sabotage"), helpType: HelpType, targetTeam: import_zod.z.number().int().min(0).max(LIMITS.MAX_PLAYERS - 1) })
108
+ import_zod.z.object({ t: import_zod.z.literal("sabotage"), helpType: HelpType, targetTeam: import_zod.z.number().int().min(0).max(LIMITS.MAX_PLAYERS - 1) }),
109
109
  // 0-based team index
110
+ // moderation
111
+ // Report another player in the room (App Store 1.2 UGC — display names). Available in lobby or
112
+ // game. The server records reporter/reported/room context; `reason` is an optional free-text note.
113
+ import_zod.z.object({ t: import_zod.z.literal("report"), playerId: PlayerId, reason: import_zod.z.string().max(500).optional() })
110
114
  ]);
111
115
  // Annotate the CommonJS export names for ESM import in node:
112
116
  0 && (module.exports = {
package/dist/index.d.cts CHANGED
@@ -325,6 +325,18 @@ declare const ClientMsg: z.ZodDiscriminatedUnion<"t", [z.ZodObject<{
325
325
  t: "sabotage";
326
326
  helpType: "removeTwoAnswers" | "changeQuestion" | "extraTime" | "doublePoints" | "stealPoints" | "restPlayer" | "tripLevel";
327
327
  targetTeam: number;
328
+ }>, z.ZodObject<{
329
+ t: z.ZodLiteral<"report">;
330
+ playerId: z.ZodString;
331
+ reason: z.ZodOptional<z.ZodString>;
332
+ }, "strip", z.ZodTypeAny, {
333
+ t: "report";
334
+ playerId: string;
335
+ reason?: string | undefined;
336
+ }, {
337
+ t: "report";
338
+ playerId: string;
339
+ reason?: string | undefined;
328
340
  }>]>;
329
341
  type ClientMsg = z.infer<typeof ClientMsg>;
330
342
  /** A player's privacy-safe avatar (emoji + circle color) for in-room display. */
@@ -510,6 +522,8 @@ type ServerMsg = {
510
522
  } | {
511
523
  t: 'fx';
512
524
  effects: Effect[];
525
+ } | {
526
+ t: 'reported';
513
527
  } | {
514
528
  t: 'error';
515
529
  code: string;
package/dist/index.d.ts CHANGED
@@ -325,6 +325,18 @@ declare const ClientMsg: z.ZodDiscriminatedUnion<"t", [z.ZodObject<{
325
325
  t: "sabotage";
326
326
  helpType: "removeTwoAnswers" | "changeQuestion" | "extraTime" | "doublePoints" | "stealPoints" | "restPlayer" | "tripLevel";
327
327
  targetTeam: number;
328
+ }>, z.ZodObject<{
329
+ t: z.ZodLiteral<"report">;
330
+ playerId: z.ZodString;
331
+ reason: z.ZodOptional<z.ZodString>;
332
+ }, "strip", z.ZodTypeAny, {
333
+ t: "report";
334
+ playerId: string;
335
+ reason?: string | undefined;
336
+ }, {
337
+ t: "report";
338
+ playerId: string;
339
+ reason?: string | undefined;
328
340
  }>]>;
329
341
  type ClientMsg = z.infer<typeof ClientMsg>;
330
342
  /** A player's privacy-safe avatar (emoji + circle color) for in-room display. */
@@ -510,6 +522,8 @@ type ServerMsg = {
510
522
  } | {
511
523
  t: 'fx';
512
524
  effects: Effect[];
525
+ } | {
526
+ t: 'reported';
513
527
  } | {
514
528
  t: 'error';
515
529
  code: string;
package/dist/index.js CHANGED
@@ -77,8 +77,12 @@ var ClientMsg = z.discriminatedUnion("t", [
77
77
  // trivia is 4-option (0–3)
78
78
  z.object({ t: z.literal("useHelp"), helpType: HelpType }),
79
79
  // sabotage a rival (active team only): spend a sabotage help to debuff targetTeam's next question
80
- z.object({ t: z.literal("sabotage"), helpType: HelpType, targetTeam: z.number().int().min(0).max(LIMITS.MAX_PLAYERS - 1) })
80
+ z.object({ t: z.literal("sabotage"), helpType: HelpType, targetTeam: z.number().int().min(0).max(LIMITS.MAX_PLAYERS - 1) }),
81
81
  // 0-based team index
82
+ // moderation
83
+ // Report another player in the room (App Store 1.2 UGC — display names). Available in lobby or
84
+ // game. The server records reporter/reported/room context; `reason` is an optional free-text note.
85
+ z.object({ t: z.literal("report"), playerId: PlayerId, reason: z.string().max(500).optional() })
82
86
  ]);
83
87
  export {
84
88
  ClientMsg,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thegeem/protocol",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
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",