rategame-shared 1.1.534 → 1.1.536

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.
@@ -96,6 +96,7 @@ export declare const pollPredictionRoundSchema: z.ZodObject<{
96
96
  tieEndRank?: number | undefined;
97
97
  }>, "many">>;
98
98
  chalkScore: z.ZodOptional<z.ZodNumber>;
99
+ participantCount: z.ZodOptional<z.ZodNumber>;
99
100
  createdAt: z.ZodNumber;
100
101
  updatedAt: z.ZodNumber;
101
102
  scoredAt: z.ZodOptional<z.ZodNumber>;
@@ -133,6 +134,7 @@ export declare const pollPredictionRoundSchema: z.ZodObject<{
133
134
  tieEndRank?: number | undefined;
134
135
  }[] | undefined;
135
136
  chalkScore?: number | undefined;
137
+ participantCount?: number | undefined;
136
138
  scoredAt?: number | undefined;
137
139
  }, {
138
140
  id: string;
@@ -168,6 +170,7 @@ export declare const pollPredictionRoundSchema: z.ZodObject<{
168
170
  tieEndRank?: number | undefined;
169
171
  }[] | undefined;
170
172
  chalkScore?: number | undefined;
173
+ participantCount?: number | undefined;
171
174
  scoredAt?: number | undefined;
172
175
  }>;
173
176
  export declare const pollPredictionBallotTeamResultSchema: z.ZodObject<{
@@ -2319,9 +2322,9 @@ export declare const pollPredictionBallotSchema: z.ZodObject<{
2319
2322
  }[];
2320
2323
  } | undefined;
2321
2324
  chalkScore?: number | undefined;
2325
+ participantCount?: number | undefined;
2322
2326
  scoredAt?: number | undefined;
2323
2327
  chalkDelta?: number | undefined;
2324
- participantCount?: number | undefined;
2325
2328
  }, {
2326
2329
  id: string;
2327
2330
  user: {
@@ -2397,9 +2400,9 @@ export declare const pollPredictionBallotSchema: z.ZodObject<{
2397
2400
  }[];
2398
2401
  } | undefined;
2399
2402
  chalkScore?: number | undefined;
2403
+ participantCount?: number | undefined;
2400
2404
  scoredAt?: number | undefined;
2401
2405
  chalkDelta?: number | undefined;
2402
- participantCount?: number | undefined;
2403
2406
  }>;
2404
2407
  export declare const pollPredictionSubmitBallotDtoSchema: z.ZodObject<{
2405
2408
  teamIds: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
@@ -2479,6 +2482,7 @@ export declare const pollPredictionHomeResponseSchema: z.ZodObject<{
2479
2482
  tieEndRank?: number | undefined;
2480
2483
  }>, "many">>;
2481
2484
  chalkScore: z.ZodOptional<z.ZodNumber>;
2485
+ participantCount: z.ZodOptional<z.ZodNumber>;
2482
2486
  createdAt: z.ZodNumber;
2483
2487
  updatedAt: z.ZodNumber;
2484
2488
  scoredAt: z.ZodOptional<z.ZodNumber>;
@@ -2516,6 +2520,7 @@ export declare const pollPredictionHomeResponseSchema: z.ZodObject<{
2516
2520
  tieEndRank?: number | undefined;
2517
2521
  }[] | undefined;
2518
2522
  chalkScore?: number | undefined;
2523
+ participantCount?: number | undefined;
2519
2524
  scoredAt?: number | undefined;
2520
2525
  }, {
2521
2526
  id: string;
@@ -2551,6 +2556,7 @@ export declare const pollPredictionHomeResponseSchema: z.ZodObject<{
2551
2556
  tieEndRank?: number | undefined;
2552
2557
  }[] | undefined;
2553
2558
  chalkScore?: number | undefined;
2559
+ participantCount?: number | undefined;
2554
2560
  scoredAt?: number | undefined;
2555
2561
  }>;
2556
2562
  ballot: z.ZodNullable<z.ZodObject<{
@@ -4509,9 +4515,9 @@ export declare const pollPredictionHomeResponseSchema: z.ZodObject<{
4509
4515
  }[];
4510
4516
  } | undefined;
4511
4517
  chalkScore?: number | undefined;
4518
+ participantCount?: number | undefined;
4512
4519
  scoredAt?: number | undefined;
4513
4520
  chalkDelta?: number | undefined;
4514
- participantCount?: number | undefined;
4515
4521
  }, {
4516
4522
  id: string;
4517
4523
  user: {
@@ -4587,10 +4593,14 @@ export declare const pollPredictionHomeResponseSchema: z.ZodObject<{
4587
4593
  }[];
4588
4594
  } | undefined;
4589
4595
  chalkScore?: number | undefined;
4596
+ participantCount?: number | undefined;
4590
4597
  scoredAt?: number | undefined;
4591
4598
  chalkDelta?: number | undefined;
4592
- participantCount?: number | undefined;
4593
4599
  }>>;
4600
+ weeklyBallotCount: z.ZodOptional<z.ZodNumber>;
4601
+ seasonParticipantCount: z.ZodOptional<z.ZodNumber>;
4602
+ seasonRank: z.ZodOptional<z.ZodNumber>;
4603
+ reminderSet: z.ZodBoolean;
4594
4604
  }, "strip", z.ZodTypeAny, {
4595
4605
  round: {
4596
4606
  id: string;
@@ -4626,6 +4636,7 @@ export declare const pollPredictionHomeResponseSchema: z.ZodObject<{
4626
4636
  tieEndRank?: number | undefined;
4627
4637
  }[] | undefined;
4628
4638
  chalkScore?: number | undefined;
4639
+ participantCount?: number | undefined;
4629
4640
  scoredAt?: number | undefined;
4630
4641
  };
4631
4642
  ballot: {
@@ -4703,10 +4714,14 @@ export declare const pollPredictionHomeResponseSchema: z.ZodObject<{
4703
4714
  }[];
4704
4715
  } | undefined;
4705
4716
  chalkScore?: number | undefined;
4717
+ participantCount?: number | undefined;
4706
4718
  scoredAt?: number | undefined;
4707
4719
  chalkDelta?: number | undefined;
4708
- participantCount?: number | undefined;
4709
4720
  } | null;
4721
+ reminderSet: boolean;
4722
+ weeklyBallotCount?: number | undefined;
4723
+ seasonParticipantCount?: number | undefined;
4724
+ seasonRank?: number | undefined;
4710
4725
  }, {
4711
4726
  round: {
4712
4727
  id: string;
@@ -4742,6 +4757,7 @@ export declare const pollPredictionHomeResponseSchema: z.ZodObject<{
4742
4757
  tieEndRank?: number | undefined;
4743
4758
  }[] | undefined;
4744
4759
  chalkScore?: number | undefined;
4760
+ participantCount?: number | undefined;
4745
4761
  scoredAt?: number | undefined;
4746
4762
  };
4747
4763
  ballot: {
@@ -4819,10 +4835,14 @@ export declare const pollPredictionHomeResponseSchema: z.ZodObject<{
4819
4835
  }[];
4820
4836
  } | undefined;
4821
4837
  chalkScore?: number | undefined;
4838
+ participantCount?: number | undefined;
4822
4839
  scoredAt?: number | undefined;
4823
4840
  chalkDelta?: number | undefined;
4824
- participantCount?: number | undefined;
4825
4841
  } | null;
4842
+ reminderSet: boolean;
4843
+ weeklyBallotCount?: number | undefined;
4844
+ seasonParticipantCount?: number | undefined;
4845
+ seasonRank?: number | undefined;
4826
4846
  }>;
4827
4847
  export declare const pollPredictionLeaderboardEntrySchema: z.ZodObject<Pick<{
4828
4848
  id: z.ZodString;
@@ -12606,9 +12626,9 @@ export declare const pollPredictionUserBallotsResponseSchema: z.ZodObject<{
12606
12626
  }[];
12607
12627
  } | undefined;
12608
12628
  chalkScore?: number | undefined;
12629
+ participantCount?: number | undefined;
12609
12630
  scoredAt?: number | undefined;
12610
12631
  chalkDelta?: number | undefined;
12611
- participantCount?: number | undefined;
12612
12632
  }, {
12613
12633
  id: string;
12614
12634
  user: {
@@ -12684,9 +12704,9 @@ export declare const pollPredictionUserBallotsResponseSchema: z.ZodObject<{
12684
12704
  }[];
12685
12705
  } | undefined;
12686
12706
  chalkScore?: number | undefined;
12707
+ participantCount?: number | undefined;
12687
12708
  scoredAt?: number | undefined;
12688
12709
  chalkDelta?: number | undefined;
12689
- participantCount?: number | undefined;
12690
12710
  }>, "many">;
12691
12711
  }, "strip", z.ZodTypeAny, {
12692
12712
  summary: {
@@ -12776,9 +12796,9 @@ export declare const pollPredictionUserBallotsResponseSchema: z.ZodObject<{
12776
12796
  }[];
12777
12797
  } | undefined;
12778
12798
  chalkScore?: number | undefined;
12799
+ participantCount?: number | undefined;
12779
12800
  scoredAt?: number | undefined;
12780
12801
  chalkDelta?: number | undefined;
12781
- participantCount?: number | undefined;
12782
12802
  }[];
12783
12803
  }, {
12784
12804
  summary: {
@@ -12868,8 +12888,8 @@ export declare const pollPredictionUserBallotsResponseSchema: z.ZodObject<{
12868
12888
  }[];
12869
12889
  } | undefined;
12870
12890
  chalkScore?: number | undefined;
12891
+ participantCount?: number | undefined;
12871
12892
  scoredAt?: number | undefined;
12872
12893
  chalkDelta?: number | undefined;
12873
- participantCount?: number | undefined;
12874
12894
  }[];
12875
12895
  }>;
@@ -45,8 +45,10 @@ exports.pollPredictionRoundSchema = zod_1.z.object({
45
45
  })),
46
46
  // Complete official AP poll captured during refresh and used to grade this round.
47
47
  actualTeams: zod_1.z.array(exports.pollPredictionTeamSchema).optional(),
48
- // Final score of the unchanged previous poll's first 25 teams, including bonuses.
48
+ // Rank delta of the unchanged previous poll's first 25 teams, before bonuses; the points baseline.
49
49
  chalkScore: zod_1.z.number().optional(),
50
+ // Ranked users for this week, including prior participants with zero-point skipped weeks.
51
+ participantCount: zod_1.z.number().int().min(0).optional(),
50
52
  createdAt: zod_1.z.number(),
51
53
  updatedAt: zod_1.z.number(),
52
54
  // Unix milliseconds when results were scored and materialized.
@@ -69,19 +71,19 @@ exports.pollPredictionBallotTeamResultSchema = zod_1.z.object({
69
71
  exports.pollPredictionBallotScoreSchema = zod_1.z.object({
70
72
  // Sum of rank distances over every team on either list, before bonuses.
71
73
  totalDelta: zod_1.z.number().int().min(0),
72
- // Number of zero-delta picks; each earns -1 and this is the first score tiebreaker.
74
+ // Number of zero-delta picks; each earns +1 and this is the first points tiebreaker.
73
75
  bullseyes: zod_1.z.number().int().min(0),
74
- // Previous-poll teams omitted by both the user and the new AP poll; each earns -3.
76
+ // Previous-poll teams omitted by both the user and the new AP poll; each earns +3.
75
77
  calledDrops: zod_1.z.number().int().min(0),
76
- // New AP entrants absent from the previous poll that the user included; each earns -3.
78
+ // New AP entrants absent from the previous poll that the user included; each earns +3.
77
79
  calledClimbs: zod_1.z.number().int().min(0),
78
- // First five picks all occupy accepted AP slots; earns -5.
80
+ // First five picks all occupy accepted AP slots; earns +5.
79
81
  perfectTopFive: zod_1.z.boolean(),
80
- // User picked the new AP #1 at #1 and it differs from the previous #1; earns -3.
82
+ // User picked the new AP #1 at #1 and it differs from the previous #1; earns +3.
81
83
  calledNewNumberOne: zod_1.z.boolean(),
82
- // Sum of all bonus deductions, including bullseyes; zero or negative.
83
- bonus: zod_1.z.number().int().max(0),
84
- // Final score: totalDelta + bonus. Lower wins and a perfect ballot can be negative.
84
+ // Sum of positive bonus points, including bullseyes.
85
+ bonus: zod_1.z.number().int().min(0),
86
+ // Weekly points: chalk's rank delta - totalDelta + bonus. Higher wins; negative points are allowed.
85
87
  total: zod_1.z.number().int(),
86
88
  // Sum of deltas for teams in either top 10; smaller wins the second score tiebreaker.
87
89
  topTenMiss: zod_1.z.number().int().min(0),
@@ -95,7 +97,7 @@ exports.pollPredictionBallotScoreSchema = zod_1.z.object({
95
97
  label: zod_1.z.string(),
96
98
  // Number of awards in this category; boolean awards are represented as 0 or 1.
97
99
  count: zod_1.z.number().int(),
98
- // Total score deduction for this category, not its per-award value.
100
+ // Total bonus points for this category, not its per-award value.
99
101
  points: zod_1.z.number().int(),
100
102
  })),
101
103
  });
@@ -113,11 +115,11 @@ exports.pollPredictionBallotSchema = zod_1.z.object({
113
115
  addedTeams: zod_1.z.array(exports.pollPredictionTeamSchema),
114
116
  // Previous AP teams not picked, materialized for the "Out" summary; not additional picks.
115
117
  removedTeams: zod_1.z.array(exports.pollPredictionTeamSchema),
116
- // This round's chalk score copied onto the ballot for standalone results/feed cards.
118
+ // This round's chalk rank delta, before bonuses, copied for standalone results/feed cards.
117
119
  chalkScore: zod_1.z.number().optional(),
118
- // chalkScore - score.total: positive means the user beat chalk.
120
+ // chalkScore - score.totalDelta: rank improvement over chalk, before adding bonuses.
119
121
  chalkDelta: zod_1.z.number().optional(),
120
- // Weekly leaderboard size, including prior participants assigned chalk for a skipped week.
122
+ // Weekly leaderboard size, including prior participants with zero-point skipped weeks.
121
123
  participantCount: zod_1.z.number().int().optional(),
122
124
  // Materialized grading details, available after the rankings refresh scores the ballot.
123
125
  score: exports.pollPredictionBallotScoreSchema.optional(),
@@ -142,6 +144,14 @@ exports.pollPredictionHomeResponseSchema = zod_1.z.object({
142
144
  round: exports.pollPredictionRoundSchema,
143
145
  // Current user's actual saved ballot, or null if they have not submitted this week.
144
146
  ballot: exports.pollPredictionBallotSchema.nullable(),
147
+ // Count of this week's submitted ballots; excludes skipped-week leaderboard entries.
148
+ weeklyBallotCount: zod_1.z.number().int().min(0).optional(),
149
+ // Unique users who have submitted at least one ballot in this season.
150
+ seasonParticipantCount: zod_1.z.number().int().min(0).optional(),
151
+ // Current user's materialized season position; absent until they are ranked.
152
+ seasonRank: zod_1.z.number().int().min(1).optional(),
153
+ // One-shot reminder subscribed for this league's next round opening.
154
+ reminderSet: zod_1.z.boolean(),
145
155
  });
146
156
  exports.pollPredictionLeaderboardEntrySchema = exports.pollPredictionBallotSchema
147
157
  .pick({
@@ -156,7 +166,7 @@ exports.pollPredictionLeaderboardEntrySchema = exports.pollPredictionBallotSchem
156
166
  tiebreakAt: true,
157
167
  })
158
168
  .extend({
159
- // Weekly entry origin; chalk is a skipped-week score, not a synthetic ballot. Omitted on aggregates.
169
+ // Weekly entry origin; chalk marks a skipped week with zero points and no bonuses, not a ballot. Omitted on aggregates.
160
170
  source: zod_1.z.enum(["submitted", "chalk"]).optional(),
161
171
  // Lightweight score totals for leaderboard rows; detailed results stay on actual ballots.
162
172
  score: exports.pollPredictionBallotScoreSchema
@@ -168,26 +178,26 @@ exports.pollPredictionLeaderboardEntrySchema = exports.pollPredictionBallotSchem
168
178
  .optional(),
169
179
  });
170
180
  exports.pollPredictionUserSummarySchema = zod_1.z.object({
171
- // User's leaderboard position in the requested season/all-time scope.
181
+ // User's leaderboard position in the requested season.
172
182
  rank: zod_1.z.number().int(),
173
- // Sum of final weekly scores in this scope, including skipped-week chalk scores.
183
+ // Sum of weekly points this season; skipped weeks contribute zero.
174
184
  total: zod_1.z.number().int(),
175
185
  // Sum of bullseyes across the graded weeks in this scope.
176
186
  bullseyes: zod_1.z.number().int(),
177
- // Graded weeks, including skipped weeks assigned chalk; not the number of ballot documents.
187
+ // Graded weeks since first participation, including skipped weeks with zero points; not the ballot count.
178
188
  weekCount: zod_1.z.number().int(),
179
189
  });
180
190
  exports.pollPredictionLeaderboardResponseSchema = zod_1.z.object({
181
191
  // Materialized leaderboard rows in final ranking order.
182
192
  entries: zod_1.z.array(exports.pollPredictionLeaderboardEntrySchema),
183
- // Chalk comparison for the requested leaderboard scope.
193
+ // Chalk rank delta before bonuses for the requested week, not points for a submitted chalk ballot.
184
194
  chalkScore: zod_1.z.number().optional(),
185
195
  // Scored week numbers available in the leaderboard's week selector.
186
196
  availableWeeks: zod_1.z.array(zod_1.z.number().int()).optional(),
187
197
  });
188
198
  exports.pollPredictionUserBallotsResponseSchema = zod_1.z.object({
189
199
  user: user_1.reducedUserSchema.omit({ email: true }),
190
- // Materialized season/all-time totals, including skipped-week chalk scores.
200
+ // Materialized season totals; skipped weeks contribute zero points.
191
201
  summary: exports.pollPredictionUserSummarySchema,
192
202
  // Actual submitted ballots only; skipped weeks appear in totals but not in this feed.
193
203
  ballots: zod_1.z.array(exports.pollPredictionBallotSchema),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rategame-shared",
3
- "version": "1.1.534",
3
+ "version": "1.1.536",
4
4
  "description": "This package contains shared resources for the Rate Game project.",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",