@ttt-productions/q-core 0.1.31 → 0.1.33
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/constants/business.d.ts +1 -0
- package/dist/constants/business.d.ts.map +1 -1
- package/dist/constants/business.js +1 -0
- package/dist/constants/business.js.map +1 -1
- package/dist/schemas/teams.d.ts +1 -1
- package/dist/schemas/teams.d.ts.map +1 -1
- package/dist/schemas/teams.js +3 -1
- package/dist/schemas/teams.js.map +1 -1
- package/package.json +1 -1
|
@@ -50,6 +50,7 @@ export declare const TEAM_FULL_MESSAGE: string;
|
|
|
50
50
|
export declare const MAX_ROSTER_SEED_MEMBERSHIPS_PER_TEAM = 30;
|
|
51
51
|
export declare const MAX_DEPARTED_ROSTER_ENTRIES_PER_TEAM = 10;
|
|
52
52
|
export declare const MAX_ROSTER_ENTRIES_PER_TEAM: number;
|
|
53
|
+
export declare const gameRosterBound: (teamIds: readonly string[]) => number;
|
|
53
54
|
export declare const scheduledGameLabel: (weekTitle: string, dayKey: string) => string;
|
|
54
55
|
export declare const gameSideFullMessage: (gameLabel: string) => string;
|
|
55
56
|
export declare const gameSideDepartedFullMessage: (gameLabel: string) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business.d.ts","sourceRoot":"","sources":["../../src/constants/business.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,oBAAoB,IAAI,CAAC;AACtC,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC,eAAO,MAAM,oCAAoC,KAAK,CAAC;AACvD,eAAO,MAAM,oCAAoC,MAAM,CAAC;AACxD,eAAO,MAAM,kCAAkC,MAAM,CAAC;AAEtD,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,eAAO,MAAM,uBAAuB,MAA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AAO,MAAM,yBAAyB,QAIrC,CAAC;AACF,eAAO,MAAM,yBAAyB,QAIrC,CAAC;AAEF,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAC1C,eAAO,MAAM,0BAA0B,QAItC,CAAC;AAEF,eAAO,MAAM,kBAAkB,KAAuB,CAAC;AAEvD,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAC7C,eAAO,MAAM,0BAA0B,QAItC,CAAC;AAEF,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,2BAA2B,QAIvC,CAAC;AAEF,eAAO,MAAM,4BAA4B,KAAK,CAAC;AAC/C,eAAO,MAAM,6BAA6B,QAIzC,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkCiD,CAAC;AAC9E,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -47,6 +47,7 @@ export const TEAM_FULL_MESSAGE = countCapReachedMessage('This team', MAX_ACTIVE_
|
|
|
47
47
|
export const MAX_ROSTER_SEED_MEMBERSHIPS_PER_TEAM = MAX_ACTIVE_TEAM_MEMBERS;
|
|
48
48
|
export const MAX_DEPARTED_ROSTER_ENTRIES_PER_TEAM = 10;
|
|
49
49
|
export const MAX_ROSTER_ENTRIES_PER_TEAM = MAX_ACTIVE_TEAM_MEMBERS + MAX_DEPARTED_ROSTER_ENTRIES_PER_TEAM;
|
|
50
|
+
export const gameRosterBound = (teamIds) => MAX_ROSTER_ENTRIES_PER_TEAM * teamIds.length;
|
|
50
51
|
export const scheduledGameLabel = (weekTitle, dayKey) => `The ${weekTitle} game on ${dayKey}`;
|
|
51
52
|
export const gameSideFullMessage = (gameLabel) => countCapReachedMessage(gameLabel, MAX_ROSTER_ENTRIES_PER_TEAM, "people on this team's side");
|
|
52
53
|
export const gameSideDepartedFullMessage = (gameLabel) => `${gameLabel} already keeps the ${MAX_DEPARTED_ROSTER_ENTRIES_PER_TEAM} players a side may hold after they leave the team with stats in it. Finalize that game, or take this player's stats off it, first.`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business.js","sourceRoot":"","sources":["../../src/constants/business.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AACzC,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAC1C,qEAAqE;AACrE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AACrC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC;AACtC,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEvC,MAAM,CAAC,MAAM,oCAAoC,GAAG,EAAE,CAAC;AACvD,MAAM,CAAC,MAAM,oCAAoC,GAAG,GAAG,CAAC;AACxD,MAAM,CAAC,MAAM,kCAAkC,GAAG,GAAG,CAAC;AAEtD,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AACzC,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAC3C,MAAM,CAAC,MAAM,6BAA6B,GAAG,EAAE,CAAC;AAChD,MAAM,CAAC,MAAM,6BAA6B,GAAG,IAAI,CAAC;AAClD,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE;IAC5B,EAAE,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,cAAc,EAAE;CACpC,CAAC;AAEX,MAAM,CAAC,MAAM,yBAAyB,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAG9E,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC;AACvC,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AAExC,MAAM,CAAC,MA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,EAAE,kBAAkB;KAC1B;IACD;QACE,GAAG,EAAE,wBAAwB;QAC7B,KAAK,EAAE,+DAA+D;QACtE,KAAK,EAAE,4BAA4B;KACpC;CAC0E,CAAC","sourcesContent":["export const MIN_DISPLAY_NAME_LENGTH = 3;\nexport const MAX_DISPLAY_NAME_LENGTH = 50;\n// The shortest password an account takes: Firebase Auth's own floor.\nexport const PASSWORD_MIN_LENGTH = 6;\nexport const MIN_TEAM_NAME_LENGTH = 3;\nexport const MAX_TEAM_NAME_LENGTH = 50;\n\nexport const MIN_TEAM_JOIN_REQUEST_MESSAGE_LENGTH = 10;\nexport const MAX_TEAM_JOIN_REQUEST_MESSAGE_LENGTH = 500;\nexport const MAX_TEAM_INVITATION_MESSAGE_LENGTH = 500;\n\nexport const MIN_LEAGUE_TITLE_LENGTH = 3;\nexport const MAX_LEAGUE_TITLE_LENGTH = 100;\nexport const MIN_LEAGUE_DESCRIPTION_LENGTH = 10;\nexport const MAX_LEAGUE_DESCRIPTION_LENGTH = 5000;\nexport const HARDWARE_CATALOG = [\n { id: 'ipad', name: 'iPad' },\n { id: 'ipad-charger', name: 'iPad Charger' },\n] as const;\nexport type HardwareCatalogItemId = (typeof HARDWARE_CATALOG)[number]['id'];\nexport const HARDWARE_CATALOG_ITEM_IDS = HARDWARE_CATALOG.map((item) => item.id) as [\n HardwareCatalogItemId,\n ...HardwareCatalogItemId[],\n];\n\nexport const MIN_AWARD_NAME_LENGTH = 3;\nexport const MAX_AWARD_NAME_LENGTH = 60;\n\nexport const MAX_AWARD_GRANT_TARGETS = 20;\nexport const AWARD_GROUP_GRANT_PAGE_SIZE = 100;\n\nexport const MIN_REPAIR_REASON_LENGTH = 3;\nexport const MAX_REPAIR_REASON_LENGTH = 500;\n\nexport const MAX_ADMIN_LIST_CHANGES = 20;\n\nexport const TEAM_CREATION_CUTOFF_DAYS = 14;\n\nexport const MAX_CONTACT_PHONE_LENGTH = 30;\n\nexport const MAX_ROSTER_SYNC_FAILURE_MESSAGE_LENGTH = 500;\n\nexport const MAX_MAINTENANCE_MESSAGE_LENGTH = 2000;\nexport const MAX_ANNOUNCEMENT_MESSAGE_LENGTH = 300;\nexport const MAX_APP_VERSION_LENGTH = 64;\n\nexport const MAX_LANDING_HERO_TITLE_LENGTH = 200;\nexport const MAX_LANDING_ABOUT_TEXT_LENGTH = 5000;\n\nexport const MAX_WAIVER_TEMPLATE_TITLE_LENGTH = 120;\nexport const MAX_WAIVER_TEMPLATE_TEXT_LENGTH = 20000;\n\nexport const MAX_GAME_LOCATION_NAME_LENGTH = 100;\nexport const MAX_GAME_LOCATION_STREET_ADDRESS_LENGTH = 200;\nexport const MAX_GAME_LOCATION_SUB_LOCATIONS = 50;\nexport const MAX_GAME_LOCATION_SUB_LOCATION_LENGTH = 60;\nexport const MAX_GAME_LOCATION_MEMO_LENGTH = 500;\n\nexport const MAX_SCHEDULE_WEEK_TITLE_LENGTH = 100;\n\nexport const LEAGUE_TIME_ZONE = 'America/New_York';\n\nexport const MAX_GAME_MEMO_LENGTH = 30;\n\nexport const countCapReachedMessage = (subject: string, limit: number, noun: string): string =>\n `${subject} already has the maximum of ${limit} ${noun}.`;\n\nexport const MAX_ACTIVE_TEAM_MEMBERS = 30;\nexport const TEAM_FULL_MESSAGE = countCapReachedMessage(\n 'This team',\n MAX_ACTIVE_TEAM_MEMBERS,\n 'players',\n);\nexport const MAX_ROSTER_SEED_MEMBERSHIPS_PER_TEAM = MAX_ACTIVE_TEAM_MEMBERS;\nexport const MAX_DEPARTED_ROSTER_ENTRIES_PER_TEAM = 10;\nexport const MAX_ROSTER_ENTRIES_PER_TEAM =\n MAX_ACTIVE_TEAM_MEMBERS + MAX_DEPARTED_ROSTER_ENTRIES_PER_TEAM;\nexport const scheduledGameLabel = (weekTitle: string, dayKey: string): string =>\n `The ${weekTitle} game on ${dayKey}`;\nexport const gameSideFullMessage = (gameLabel: string): string =>\n countCapReachedMessage(gameLabel, MAX_ROSTER_ENTRIES_PER_TEAM, \"people on this team's side\");\nexport const gameSideDepartedFullMessage = (gameLabel: string): string =>\n `${gameLabel} already keeps the ${MAX_DEPARTED_ROSTER_ENTRIES_PER_TEAM} players a side may hold after they leave the team with stats in it. Finalize that game, or take this player's stats off it, first.`;\n\nexport const MAX_TEAMS_PER_LEAGUE = 40;\nexport const MAX_GAMES_PER_LEAGUE = 250;\nexport const LEAGUE_TEAMS_FULL_MESSAGE = countCapReachedMessage(\n 'This league',\n MAX_TEAMS_PER_LEAGUE,\n 'teams',\n);\nexport const LEAGUE_GAMES_FULL_MESSAGE = countCapReachedMessage(\n 'This league',\n MAX_GAMES_PER_LEAGUE,\n 'games',\n);\n\nexport const MAX_SCHEDULE_WEEK_GAMES = 20;\nexport const SCHEDULE_WEEK_FULL_MESSAGE = countCapReachedMessage(\n 'This week',\n MAX_SCHEDULE_WEEK_GAMES,\n 'games',\n);\n\nexport const MAX_PLAYOFF_CUTOFF = MAX_TEAMS_PER_LEAGUE;\n\nexport const MAX_STAT_EVENTS_PER_GAME = 1000;\nexport const GAME_STAT_LOG_FULL_MESSAGE = countCapReachedMessage(\n 'This game',\n MAX_STAT_EVENTS_PER_GAME,\n 'recorded stats',\n);\n\nexport const MAX_GAME_LOCATIONS = 30;\nexport const GAME_LOCATIONS_FULL_MESSAGE = countCapReachedMessage(\n 'Q-Sports',\n MAX_GAME_LOCATIONS,\n 'locations',\n);\n\nexport const MAX_OFFERED_WAIVER_TEMPLATES = 30;\nexport const WAIVER_TEMPLATES_FULL_MESSAGE = countCapReachedMessage(\n 'Q-Sports',\n MAX_OFFERED_WAIVER_TEMPLATES,\n 'waiver templates offered to leagues',\n);\n\nexport const CAPACITY_LIMITS = [\n {\n key: 'teamPlayers',\n label: 'Players on a team, ghost players included',\n limit: MAX_ACTIVE_TEAM_MEMBERS,\n },\n {\n key: 'gameSidePeople',\n label: `People on one side of one game: ${MAX_ACTIVE_TEAM_MEMBERS} players plus ${MAX_DEPARTED_ROSTER_ENTRIES_PER_TEAM} who left the team after recording stats in it`,\n limit: MAX_ROSTER_ENTRIES_PER_TEAM,\n },\n { key: 'leagueTeams', label: 'Teams in a league', limit: MAX_TEAMS_PER_LEAGUE },\n {\n key: 'leagueGames',\n label: \"Games in a league, so also a team's games\",\n limit: MAX_GAMES_PER_LEAGUE,\n },\n { key: 'weekGames', label: 'Games in one week of the schedule', limit: MAX_SCHEDULE_WEEK_GAMES },\n { key: 'gameStats', label: 'Stats recorded in one game', limit: MAX_STAT_EVENTS_PER_GAME },\n {\n key: 'playoffCutoff',\n label: \"Teams reaching the playoffs, at most the league's team limit\",\n limit: MAX_PLAYOFF_CUTOFF,\n },\n {\n key: 'gameLocations',\n label: \"Game locations, each venue's courts or sheets counted as part of it\",\n limit: MAX_GAME_LOCATIONS,\n },\n {\n key: 'offeredWaiverTemplates',\n label: 'Waiver templates offered to leagues, retired ones not counted',\n limit: MAX_OFFERED_WAIVER_TEMPLATES,\n },\n] as const satisfies readonly { key: string; label: string; limit: number }[];\nexport type CapacityLimitKey = (typeof CAPACITY_LIMITS)[number]['key'];\n"]}
|
|
1
|
+
{"version":3,"file":"business.js","sourceRoot":"","sources":["../../src/constants/business.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AACzC,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAC1C,qEAAqE;AACrE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AACrC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC;AACtC,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEvC,MAAM,CAAC,MAAM,oCAAoC,GAAG,EAAE,CAAC;AACvD,MAAM,CAAC,MAAM,oCAAoC,GAAG,GAAG,CAAC;AACxD,MAAM,CAAC,MAAM,kCAAkC,GAAG,GAAG,CAAC;AAEtD,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AACzC,MAAM,CAAC,MAAM,uBAAuB,GAAG,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;KAC/B;IACD;QACE,GAAG,EAAE,gBAAgB;QACrB,KAAK,EAAE,mCAAmC,uBAAuB,iBAAiB,oCAAoC,gDAAgD;QACtK,KAAK,EAAE,2BAA2B;KACnC;IACD,EAAE,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAE,oBAAoB,EAAE;IAC/E;QACE,GAAG,EAAE,aAAa;QAClB,KAAK,EAAE,2CAA2C;QAClD,KAAK,EAAE,oBAAoB;KAC5B;IACD,EAAE,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,mCAAmC,EAAE,KAAK,EAAE,uBAAuB,EAAE;IAChG,EAAE,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,4BAA4B,EAAE,KAAK,EAAE,wBAAwB,EAAE;IAC1F;QACE,GAAG,EAAE,eAAe;QACpB,KAAK,EAAE,8DAA8D;QACrE,KAAK,EAAE,kBAAkB;KAC1B;IACD;QACE,GAAG,EAAE,eAAe;QACpB,KAAK,EAAE,qEAAqE;QAC5E,KAAK,EAAE,kBAAkB;KAC1B;IACD;QACE,GAAG,EAAE,wBAAwB;QAC7B,KAAK,EAAE,+DAA+D;QACtE,KAAK,EAAE,4BAA4B;KACpC;CAC0E,CAAC","sourcesContent":["export const MIN_DISPLAY_NAME_LENGTH = 3;\nexport const MAX_DISPLAY_NAME_LENGTH = 50;\n// The shortest password an account takes: Firebase Auth's own floor.\nexport const PASSWORD_MIN_LENGTH = 6;\nexport const MIN_TEAM_NAME_LENGTH = 3;\nexport const MAX_TEAM_NAME_LENGTH = 50;\n\nexport const MIN_TEAM_JOIN_REQUEST_MESSAGE_LENGTH = 10;\nexport const MAX_TEAM_JOIN_REQUEST_MESSAGE_LENGTH = 500;\nexport const MAX_TEAM_INVITATION_MESSAGE_LENGTH = 500;\n\nexport const MIN_LEAGUE_TITLE_LENGTH = 3;\nexport const MAX_LEAGUE_TITLE_LENGTH = 100;\nexport const MIN_LEAGUE_DESCRIPTION_LENGTH = 10;\nexport const MAX_LEAGUE_DESCRIPTION_LENGTH = 5000;\nexport const HARDWARE_CATALOG = [\n { id: 'ipad', name: 'iPad' },\n { id: 'ipad-charger', name: 'iPad Charger' },\n] as const;\nexport type HardwareCatalogItemId = (typeof HARDWARE_CATALOG)[number]['id'];\nexport const HARDWARE_CATALOG_ITEM_IDS = HARDWARE_CATALOG.map((item) => item.id) as [\n HardwareCatalogItemId,\n ...HardwareCatalogItemId[],\n];\n\nexport const MIN_AWARD_NAME_LENGTH = 3;\nexport const MAX_AWARD_NAME_LENGTH = 60;\n\nexport const MAX_AWARD_GRANT_TARGETS = 20;\nexport const AWARD_GROUP_GRANT_PAGE_SIZE = 100;\n\nexport const MIN_REPAIR_REASON_LENGTH = 3;\nexport const MAX_REPAIR_REASON_LENGTH = 500;\n\nexport const MAX_ADMIN_LIST_CHANGES = 20;\n\nexport const TEAM_CREATION_CUTOFF_DAYS = 14;\n\nexport const MAX_CONTACT_PHONE_LENGTH = 30;\n\nexport const MAX_ROSTER_SYNC_FAILURE_MESSAGE_LENGTH = 500;\n\nexport const MAX_MAINTENANCE_MESSAGE_LENGTH = 2000;\nexport const MAX_ANNOUNCEMENT_MESSAGE_LENGTH = 300;\nexport const MAX_APP_VERSION_LENGTH = 64;\n\nexport const MAX_LANDING_HERO_TITLE_LENGTH = 200;\nexport const MAX_LANDING_ABOUT_TEXT_LENGTH = 5000;\n\nexport const MAX_WAIVER_TEMPLATE_TITLE_LENGTH = 120;\nexport const MAX_WAIVER_TEMPLATE_TEXT_LENGTH = 20000;\n\nexport const MAX_GAME_LOCATION_NAME_LENGTH = 100;\nexport const MAX_GAME_LOCATION_STREET_ADDRESS_LENGTH = 200;\nexport const MAX_GAME_LOCATION_SUB_LOCATIONS = 50;\nexport const MAX_GAME_LOCATION_SUB_LOCATION_LENGTH = 60;\nexport const MAX_GAME_LOCATION_MEMO_LENGTH = 500;\n\nexport const MAX_SCHEDULE_WEEK_TITLE_LENGTH = 100;\n\nexport const LEAGUE_TIME_ZONE = 'America/New_York';\n\nexport const MAX_GAME_MEMO_LENGTH = 30;\n\nexport const countCapReachedMessage = (subject: string, limit: number, noun: string): string =>\n `${subject} already has the maximum of ${limit} ${noun}.`;\n\nexport const MAX_ACTIVE_TEAM_MEMBERS = 30;\nexport const TEAM_FULL_MESSAGE = countCapReachedMessage(\n 'This team',\n MAX_ACTIVE_TEAM_MEMBERS,\n 'players',\n);\nexport const MAX_ROSTER_SEED_MEMBERSHIPS_PER_TEAM = MAX_ACTIVE_TEAM_MEMBERS;\nexport const MAX_DEPARTED_ROSTER_ENTRIES_PER_TEAM = 10;\nexport const MAX_ROSTER_ENTRIES_PER_TEAM =\n MAX_ACTIVE_TEAM_MEMBERS + MAX_DEPARTED_ROSTER_ENTRIES_PER_TEAM;\nexport const gameRosterBound = (teamIds: readonly string[]): number =>\n MAX_ROSTER_ENTRIES_PER_TEAM * teamIds.length;\nexport const scheduledGameLabel = (weekTitle: string, dayKey: string): string =>\n `The ${weekTitle} game on ${dayKey}`;\nexport const gameSideFullMessage = (gameLabel: string): string =>\n countCapReachedMessage(gameLabel, MAX_ROSTER_ENTRIES_PER_TEAM, \"people on this team's side\");\nexport const gameSideDepartedFullMessage = (gameLabel: string): string =>\n `${gameLabel} already keeps the ${MAX_DEPARTED_ROSTER_ENTRIES_PER_TEAM} players a side may hold after they leave the team with stats in it. Finalize that game, or take this player's stats off it, first.`;\n\nexport const MAX_TEAMS_PER_LEAGUE = 40;\nexport const MAX_GAMES_PER_LEAGUE = 250;\nexport const LEAGUE_TEAMS_FULL_MESSAGE = countCapReachedMessage(\n 'This league',\n MAX_TEAMS_PER_LEAGUE,\n 'teams',\n);\nexport const LEAGUE_GAMES_FULL_MESSAGE = countCapReachedMessage(\n 'This league',\n MAX_GAMES_PER_LEAGUE,\n 'games',\n);\n\nexport const MAX_SCHEDULE_WEEK_GAMES = 20;\nexport const SCHEDULE_WEEK_FULL_MESSAGE = countCapReachedMessage(\n 'This week',\n MAX_SCHEDULE_WEEK_GAMES,\n 'games',\n);\n\nexport const MAX_PLAYOFF_CUTOFF = MAX_TEAMS_PER_LEAGUE;\n\nexport const MAX_STAT_EVENTS_PER_GAME = 1000;\nexport const GAME_STAT_LOG_FULL_MESSAGE = countCapReachedMessage(\n 'This game',\n MAX_STAT_EVENTS_PER_GAME,\n 'recorded stats',\n);\n\nexport const MAX_GAME_LOCATIONS = 30;\nexport const GAME_LOCATIONS_FULL_MESSAGE = countCapReachedMessage(\n 'Q-Sports',\n MAX_GAME_LOCATIONS,\n 'locations',\n);\n\nexport const MAX_OFFERED_WAIVER_TEMPLATES = 30;\nexport const WAIVER_TEMPLATES_FULL_MESSAGE = countCapReachedMessage(\n 'Q-Sports',\n MAX_OFFERED_WAIVER_TEMPLATES,\n 'waiver templates offered to leagues',\n);\n\nexport const CAPACITY_LIMITS = [\n {\n key: 'teamPlayers',\n label: 'Players on a team, ghost players included',\n limit: MAX_ACTIVE_TEAM_MEMBERS,\n },\n {\n key: 'gameSidePeople',\n label: `People on one side of one game: ${MAX_ACTIVE_TEAM_MEMBERS} players plus ${MAX_DEPARTED_ROSTER_ENTRIES_PER_TEAM} who left the team after recording stats in it`,\n limit: MAX_ROSTER_ENTRIES_PER_TEAM,\n },\n { key: 'leagueTeams', label: 'Teams in a league', limit: MAX_TEAMS_PER_LEAGUE },\n {\n key: 'leagueGames',\n label: \"Games in a league, so also a team's games\",\n limit: MAX_GAMES_PER_LEAGUE,\n },\n { key: 'weekGames', label: 'Games in one week of the schedule', limit: MAX_SCHEDULE_WEEK_GAMES },\n { key: 'gameStats', label: 'Stats recorded in one game', limit: MAX_STAT_EVENTS_PER_GAME },\n {\n key: 'playoffCutoff',\n label: \"Teams reaching the playoffs, at most the league's team limit\",\n limit: MAX_PLAYOFF_CUTOFF,\n },\n {\n key: 'gameLocations',\n label: \"Game locations, each venue's courts or sheets counted as part of it\",\n limit: MAX_GAME_LOCATIONS,\n },\n {\n key: 'offeredWaiverTemplates',\n label: 'Waiver templates offered to leagues, retired ones not counted',\n limit: MAX_OFFERED_WAIVER_TEMPLATES,\n },\n] as const satisfies readonly { key: string; label: string; limit: number }[];\nexport type CapacityLimitKey = (typeof CAPACITY_LIMITS)[number]['key'];\n"]}
|
package/dist/schemas/teams.d.ts
CHANGED
|
@@ -317,7 +317,7 @@ export type AdminRetryLeagueTeamRosterSyncInput = z.infer<typeof AdminRetryLeagu
|
|
|
317
317
|
export declare const AdminRetryLeagueTeamRosterSyncResultSchema: z.ZodObject<{
|
|
318
318
|
teamId: z.ZodString;
|
|
319
319
|
retried: z.ZodNumber;
|
|
320
|
-
reconciled: z.ZodNumber
|
|
320
|
+
reconciled: z.ZodNullable<z.ZodNumber>;
|
|
321
321
|
damagedTeamMembershipIds: z.ZodArray<z.ZodString>;
|
|
322
322
|
}, z.core.$strict>;
|
|
323
323
|
export type AdminRetryLeagueTeamRosterSyncResult = z.infer<typeof AdminRetryLeagueTeamRosterSyncResultSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"teams.d.ts","sourceRoot":"","sources":["../../src/schemas/teams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA+BxB,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAwC,CAAC;AACjF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAElC,CAAC;AACZ,MAAM,MAAM,0BAA0B,GAAG,CAAC,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MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACrD,OAAO,uCAAuC,CAC/C,CAAC;AAEF,eAAO,MAAM,wCAAwC;;;;kBAAoC,CAAC;AAC1F,MAAM,MAAM,kCAAkC,GAAG,2BAA2B,CAAC;AAE7E,eAAO,MAAM,gCAAgC;;kBAA8C,CAAC;AAC5F,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F,eAAO,MAAM,iCAAiC;;;;kBAMnC,CAAC;AACZ,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F,eAAO,MAAM,+BAA+B,4BAA6B,CAAC;AAC1E,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,+BAA+B,CAAC,CAAC,MAAM,CAAC,CAAC;AACvF,eAAO,MAAM,oCAAoC;;;;;kBAEtC,CAAC;AACZ,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC"}
|
package/dist/schemas/teams.js
CHANGED
|
@@ -66,7 +66,9 @@ export const AdminRetryLeagueTeamRosterSyncResultSchema = z
|
|
|
66
66
|
.object({
|
|
67
67
|
teamId: teamIdSchema,
|
|
68
68
|
retried: countSchema,
|
|
69
|
-
|
|
69
|
+
// null when the immediate attempt after the commit did not run; the scheduler still finishes
|
|
70
|
+
// every obligation the retry re-armed.
|
|
71
|
+
reconciled: countSchema.nullable(),
|
|
70
72
|
damagedTeamMembershipIds: z.array(z.string().min(1)),
|
|
71
73
|
})
|
|
72
74
|
.strict();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"teams.js","sourceRoot":"","sources":["../../src/schemas/teams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,8BAA8B,EAC9B,8BAA8B,GAC/B,MAAM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C,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AAG5F,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC;KAC/C,MAAM,CAAC;IACN,MAAM,EAAE,YAAY;IACpB,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;IACrB,kBAAkB,EAAE,WAAW;CAChC,CAAC;KACD,MAAM,EAAE,CAAC;AAGZ,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,eAAe,CAAU,CAAC;AAE1E,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC;KAClD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,+BAA+B,CAAC,EAAE,gBAAgB,EAAE,WAAW,EAAE,CAAC;KAC1F,MAAM,EAAE,CAAC","sourcesContent":["import { z } from 'zod';\nimport {\n leagueJoinWarningActedOnSchema,\n leagueJoinWarningFindingSchema,\n} from '../utils/league-join-warning.js';\nimport {\n countSchema,\n documentIdSegmentSchema,\n gameIdSchema,\n leagueIdSchema,\n membershipRosterSyncStatusSchema,\n teamIconSchema,\n teamIdSchema,\n teamRoleSchema,\n teamTypeSchema,\n userIdSchema,\n} from '../doc-schemas/atoms.js';\nimport { buildGhostUserIdForRequest, isGhostUserId } from '../ids/minted-ids.js';\nimport { isDocumentIdSegment } from '../paths/utils.js';\nimport { GHOST_LINK_MEMBERSHIP_OUTCOME_KEYS, GHOST_REMOVAL_REFUSAL_KEYS } from '../types/stats.js';\nimport { MEMBER_ASSIGNABLE_TEAM_ROLES } from '../types/unions.js';\nimport { contactPhoneSchema, displayNameSchema, teamNameSchema } from './atoms.js';\n\nconst teamCreationFields = {\n leagueId: leagueIdSchema,\n name: teamNameSchema,\n icon: teamIconSchema,\n teamType: teamTypeSchema.optional(),\n contactPhone: contactPhoneSchema,\n};\n\nexport const CreateLeagueTeamInputSchema = z.object(teamCreationFields).strict();\nexport type CreateLeagueTeamInput = z.infer<typeof CreateLeagueTeamInputSchema>;\n\nexport const AdminCreateLeagueTeamInputSchema = z\n .object({ ...teamCreationFields, captainDisplayName: displayNameSchema })\n .strict();\nexport type AdminCreateLeagueTeamInput = z.infer<typeof AdminCreateLeagueTeamInputSchema>;\n\nexport const CreateLeagueTeamResultSchema = z\n .object({ leagueId: leagueIdSchema, teamId: teamIdSchema, captainUserId: userIdSchema })\n .strict();\nexport type CreateLeagueTeamResult = z.infer<typeof CreateLeagueTeamResultSchema>;\n\nexport const ghostCreateRequestIdSchema = documentIdSegmentSchema.refine(\n (requestId) => isDocumentIdSegment(buildGhostUserIdForRequest(requestId)),\n 'Not a ghost add request id.',\n);\n\nexport const CreateTeamGhostPlayerInputSchema = z\n .object({\n teamId: teamIdSchema,\n displayName: displayNameSchema,\n requestId: ghostCreateRequestIdSchema,\n })\n .strict();\nexport type CreateTeamGhostPlayerInput = z.infer<typeof CreateTeamGhostPlayerInputSchema>;\n\nexport const CreateGameGhostPlayerInputSchema = z\n .object({\n gameId: gameIdSchema,\n teamId: teamIdSchema,\n displayName: displayNameSchema,\n requestId: ghostCreateRequestIdSchema,\n })\n .strict();\nexport type CreateGameGhostPlayerInput = z.infer<typeof CreateGameGhostPlayerInputSchema>;\n\nexport const CreateGhostPlayerResultSchema = z\n .object({\n leagueId: leagueIdSchema,\n teamId: teamIdSchema,\n ghostUserId: userIdSchema,\n rosterSyncStatus: membershipRosterSyncStatusSchema,\n })\n .strict();\nexport type CreateGhostPlayerResult = z.infer<typeof CreateGhostPlayerResultSchema>;\n\nexport const GetLeagueJoinWarningInputSchema = z\n .object({\n leagueId: leagueIdSchema,\n userId: userIdSchema,\n targetTeamId: teamIdSchema.optional(),\n actedOn: leagueJoinWarningActedOnSchema.optional(),\n })\n .strict();\nexport type GetLeagueJoinWarningInput = z.infer<typeof GetLeagueJoinWarningInputSchema>;\n\nexport const GetLeagueJoinWarningResultSchema = z\n .object({\n leagueId: leagueIdSchema,\n userId: userIdSchema,\n findings: z.array(leagueJoinWarningFindingSchema),\n })\n .strict();\nexport type GetLeagueJoinWarningResult = z.infer<typeof GetLeagueJoinWarningResultSchema>;\n\nexport const AdminRetryLeagueTeamRosterSyncInputSchema = z\n .object({ teamId: teamIdSchema })\n .strict();\nexport type AdminRetryLeagueTeamRosterSyncInput = z.infer<\n typeof AdminRetryLeagueTeamRosterSyncInputSchema\n>;\n\nexport const AdminRetryLeagueTeamRosterSyncResultSchema = z\n .object({\n teamId: teamIdSchema,\n retried: countSchema,\n reconciled: countSchema,\n damagedTeamMembershipIds: z.array(z.string().min(1)),\n })\n .strict();\nexport type AdminRetryLeagueTeamRosterSyncResult = z.infer<\n typeof AdminRetryLeagueTeamRosterSyncResultSchema\n>;\n\nexport const LinkGhostPlayerInputSchema = z\n .object({\n teamId: teamIdSchema,\n ghostUserId: userIdSchema,\n userId: userIdSchema,\n })\n .strict();\nexport type LinkGhostPlayerInput = z.infer<typeof LinkGhostPlayerInputSchema>;\n\nexport const LinkGhostPlayerResultSchema = z\n .object({\n leagueId: leagueIdSchema,\n teamId: teamIdSchema,\n ghostUserId: userIdSchema,\n userId: userIdSchema,\n complete: z.boolean(),\n gamesMoved: countSchema,\n membershipOutcome: z.enum(GHOST_LINK_MEMBERSHIP_OUTCOME_KEYS).optional(),\n publicUserDeleted: z.boolean(),\n })\n .strict();\nexport type LinkGhostPlayerResult = z.infer<typeof LinkGhostPlayerResultSchema>;\n\nexport const AdminLinkClosedLeagueGhostPlayerInputSchema = LinkGhostPlayerInputSchema;\nexport type AdminLinkClosedLeagueGhostPlayerInput = LinkGhostPlayerInput;\nexport const AdminLinkClosedLeagueGhostPlayerResultSchema = LinkGhostPlayerResultSchema;\nexport type AdminLinkClosedLeagueGhostPlayerResult = LinkGhostPlayerResult;\n\nexport const ghostUserIdSchema = userIdSchema.refine(isGhostUserId, 'Not a ghost player.');\n\nexport const UpdateTeamMembershipRoleInputSchema = z\n .object({\n teamId: teamIdSchema,\n userId: userIdSchema,\n role: z.enum(MEMBER_ASSIGNABLE_TEAM_ROLES),\n })\n .strict();\nexport type UpdateTeamMembershipRoleInput = z.infer<typeof UpdateTeamMembershipRoleInputSchema>;\n\nexport const UpdateTeamMembershipRoleResultSchema = z\n .object({\n leagueId: leagueIdSchema,\n teamId: teamIdSchema,\n userId: userIdSchema,\n role: teamRoleSchema,\n changed: z.boolean(),\n })\n .strict();\nexport type UpdateTeamMembershipRoleResult = z.infer<typeof UpdateTeamMembershipRoleResultSchema>;\n\nexport const DeleteTeamMembershipInputSchema = z\n .object({\n teamId: teamIdSchema,\n userId: userIdSchema.refine(\n (userId) => !isGhostUserId(userId),\n 'A ghost player is removed as a ghost player.',\n ),\n })\n .strict();\nexport type DeleteTeamMembershipInput = z.infer<typeof DeleteTeamMembershipInputSchema>;\n\nexport const DeleteTeamMembershipResultSchema = z\n .object({\n leagueId: leagueIdSchema,\n teamId: teamIdSchema,\n userId: userIdSchema,\n deleted: z.boolean(),\n rosterSyncStatus: membershipRosterSyncStatusSchema,\n })\n .strict();\nexport type DeleteTeamMembershipResult = z.infer<typeof DeleteTeamMembershipResultSchema>;\n\nexport const DeleteTeamGhostPlayerInputSchema = z\n .object({ teamId: teamIdSchema, ghostUserId: ghostUserIdSchema })\n .strict();\nexport type DeleteTeamGhostPlayerInput = z.infer<typeof DeleteTeamGhostPlayerInputSchema>;\n\nexport const DeleteTeamGhostPlayerResultSchema = z\n .object({\n leagueId: leagueIdSchema,\n teamId: teamIdSchema,\n ghostUserId: userIdSchema,\n complete: z.boolean(),\n finishedGameEntriesRemoved: countSchema,\n publicUserDeleted: z.boolean(),\n })\n .strict();\nexport type DeleteTeamGhostPlayerResult = z.infer<typeof DeleteTeamGhostPlayerResultSchema>;\n\nexport const GhostRemovalRefusalDetailsSchema = z\n .object({\n reason: z.enum(GHOST_REMOVAL_REFUSAL_KEYS),\n finishedGameEntriesRemoved: countSchema.optional(),\n })\n .strict();\nexport type GhostRemovalRefusalDetails = z.infer<typeof GhostRemovalRefusalDetailsSchema>;\n\nexport const AdminUpdateLeagueTeamCaptainInputSchema = z\n .object({ teamId: teamIdSchema, captainUserId: userIdSchema })\n .strict();\nexport type AdminUpdateLeagueTeamCaptainInput = z.infer<\n typeof AdminUpdateLeagueTeamCaptainInputSchema\n>;\n\nexport const AdminUpdateLeagueTeamCaptainResultSchema = z\n .object({\n leagueId: leagueIdSchema,\n teamId: teamIdSchema,\n captainUserId: userIdSchema,\n demotedUserIds: z.array(userIdSchema),\n changed: z.boolean(),\n })\n .strict();\nexport type AdminUpdateLeagueTeamCaptainResult = z.infer<\n typeof AdminUpdateLeagueTeamCaptainResultSchema\n>;\n\nexport const AdminUpdateLeagueTeamNameInputSchema = z\n .object({ teamId: teamIdSchema, name: teamNameSchema })\n .strict();\nexport type AdminUpdateLeagueTeamNameInput = z.infer<typeof AdminUpdateLeagueTeamNameInputSchema>;\n\nexport const AdminUpdateLeagueTeamTypeInputSchema = z\n .object({ teamId: teamIdSchema, teamType: teamTypeSchema })\n .strict();\nexport type AdminUpdateLeagueTeamTypeInput = z.infer<typeof AdminUpdateLeagueTeamTypeInputSchema>;\n\nexport const AdminUpdateLeagueTeamResultSchema = z\n .object({ leagueId: leagueIdSchema, teamId: teamIdSchema, changed: z.boolean() })\n .strict();\nexport type AdminUpdateLeagueTeamResult = z.infer<typeof AdminUpdateLeagueTeamResultSchema>;\n\nexport const AdminUpdateLeagueTeamContactInputSchema = z\n .object({ teamId: teamIdSchema, contactPhone: contactPhoneSchema })\n .strict();\nexport type AdminUpdateLeagueTeamContactInput = z.infer<\n typeof AdminUpdateLeagueTeamContactInputSchema\n>;\n\nexport const AdminUpdateLeagueTeamContactResultSchema = AdminUpdateLeagueTeamResultSchema;\nexport type AdminUpdateLeagueTeamContactResult = AdminUpdateLeagueTeamResult;\n\nexport const AdminDeleteLeagueTeamInputSchema = z.object({ teamId: teamIdSchema }).strict();\nexport type AdminDeleteLeagueTeamInput = z.infer<typeof AdminDeleteLeagueTeamInputSchema>;\n\nexport const AdminDeleteLeagueTeamResultSchema = z\n .object({\n teamId: teamIdSchema,\n complete: z.boolean(),\n remainingGameCount: countSchema,\n })\n .strict();\nexport type AdminDeleteLeagueTeamResult = z.infer<typeof AdminDeleteLeagueTeamResultSchema>;\n\nexport const LEAGUE_TEAM_DELETE_REFUSAL_KEYS = ['teamHasPlayed'] as const;\nexport type LeagueTeamDeleteRefusal = (typeof LEAGUE_TEAM_DELETE_REFUSAL_KEYS)[number];\nexport const LeagueTeamDeleteRefusalDetailsSchema = z\n .object({ reason: z.enum(LEAGUE_TEAM_DELETE_REFUSAL_KEYS), deletedGameCount: countSchema })\n .strict();\nexport type LeagueTeamDeleteRefusalDetails = z.infer<typeof LeagueTeamDeleteRefusalDetailsSchema>;\n"]}
|
|
1
|
+
{"version":3,"file":"teams.js","sourceRoot":"","sources":["../../src/schemas/teams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,8BAA8B,EAC9B,8BAA8B,GAC/B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,WAAW,EACX,uBAAuB,EACvB,YAAY,EACZ,cAAc,EACd,gCAAgC,EAChC,cAAc,EACd,YAAY,EACZ,cAAc,EACd,cAAc,EACd,YAAY,GACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,0BAA0B,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,kCAAkC,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AACnG,OAAO,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEnF,MAAM,kBAAkB,GAAG;IACzB,QAAQ,EAAE,cAAc;IACxB,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE,cAAc;IACpB,Q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z } from 'zod';\nimport {\n leagueJoinWarningActedOnSchema,\n leagueJoinWarningFindingSchema,\n} from '../utils/league-join-warning.js';\nimport {\n countSchema,\n documentIdSegmentSchema,\n gameIdSchema,\n leagueIdSchema,\n membershipRosterSyncStatusSchema,\n teamIconSchema,\n teamIdSchema,\n teamRoleSchema,\n teamTypeSchema,\n userIdSchema,\n} from '../doc-schemas/atoms.js';\nimport { buildGhostUserIdForRequest, isGhostUserId } from '../ids/minted-ids.js';\nimport { isDocumentIdSegment } from '../paths/utils.js';\nimport { GHOST_LINK_MEMBERSHIP_OUTCOME_KEYS, GHOST_REMOVAL_REFUSAL_KEYS } from '../types/stats.js';\nimport { MEMBER_ASSIGNABLE_TEAM_ROLES } from '../types/unions.js';\nimport { contactPhoneSchema, displayNameSchema, teamNameSchema } from './atoms.js';\n\nconst teamCreationFields = {\n leagueId: leagueIdSchema,\n name: teamNameSchema,\n icon: teamIconSchema,\n teamType: teamTypeSchema.optional(),\n contactPhone: contactPhoneSchema,\n};\n\nexport const CreateLeagueTeamInputSchema = z.object(teamCreationFields).strict();\nexport type CreateLeagueTeamInput = z.infer<typeof CreateLeagueTeamInputSchema>;\n\nexport const AdminCreateLeagueTeamInputSchema = z\n .object({ ...teamCreationFields, captainDisplayName: displayNameSchema })\n .strict();\nexport type AdminCreateLeagueTeamInput = z.infer<typeof AdminCreateLeagueTeamInputSchema>;\n\nexport const CreateLeagueTeamResultSchema = z\n .object({ leagueId: leagueIdSchema, teamId: teamIdSchema, captainUserId: userIdSchema })\n .strict();\nexport type CreateLeagueTeamResult = z.infer<typeof CreateLeagueTeamResultSchema>;\n\nexport const ghostCreateRequestIdSchema = documentIdSegmentSchema.refine(\n (requestId) => isDocumentIdSegment(buildGhostUserIdForRequest(requestId)),\n 'Not a ghost add request id.',\n);\n\nexport const CreateTeamGhostPlayerInputSchema = z\n .object({\n teamId: teamIdSchema,\n displayName: displayNameSchema,\n requestId: ghostCreateRequestIdSchema,\n })\n .strict();\nexport type CreateTeamGhostPlayerInput = z.infer<typeof CreateTeamGhostPlayerInputSchema>;\n\nexport const CreateGameGhostPlayerInputSchema = z\n .object({\n gameId: gameIdSchema,\n teamId: teamIdSchema,\n displayName: displayNameSchema,\n requestId: ghostCreateRequestIdSchema,\n })\n .strict();\nexport type CreateGameGhostPlayerInput = z.infer<typeof CreateGameGhostPlayerInputSchema>;\n\nexport const CreateGhostPlayerResultSchema = z\n .object({\n leagueId: leagueIdSchema,\n teamId: teamIdSchema,\n ghostUserId: userIdSchema,\n rosterSyncStatus: membershipRosterSyncStatusSchema,\n })\n .strict();\nexport type CreateGhostPlayerResult = z.infer<typeof CreateGhostPlayerResultSchema>;\n\nexport const GetLeagueJoinWarningInputSchema = z\n .object({\n leagueId: leagueIdSchema,\n userId: userIdSchema,\n targetTeamId: teamIdSchema.optional(),\n actedOn: leagueJoinWarningActedOnSchema.optional(),\n })\n .strict();\nexport type GetLeagueJoinWarningInput = z.infer<typeof GetLeagueJoinWarningInputSchema>;\n\nexport const GetLeagueJoinWarningResultSchema = z\n .object({\n leagueId: leagueIdSchema,\n userId: userIdSchema,\n findings: z.array(leagueJoinWarningFindingSchema),\n })\n .strict();\nexport type GetLeagueJoinWarningResult = z.infer<typeof GetLeagueJoinWarningResultSchema>;\n\nexport const AdminRetryLeagueTeamRosterSyncInputSchema = z\n .object({ teamId: teamIdSchema })\n .strict();\nexport type AdminRetryLeagueTeamRosterSyncInput = z.infer<\n typeof AdminRetryLeagueTeamRosterSyncInputSchema\n>;\n\nexport const AdminRetryLeagueTeamRosterSyncResultSchema = z\n .object({\n teamId: teamIdSchema,\n retried: countSchema,\n // null when the immediate attempt after the commit did not run; the scheduler still finishes\n // every obligation the retry re-armed.\n reconciled: countSchema.nullable(),\n damagedTeamMembershipIds: z.array(z.string().min(1)),\n })\n .strict();\nexport type AdminRetryLeagueTeamRosterSyncResult = z.infer<\n typeof AdminRetryLeagueTeamRosterSyncResultSchema\n>;\n\nexport const LinkGhostPlayerInputSchema = z\n .object({\n teamId: teamIdSchema,\n ghostUserId: userIdSchema,\n userId: userIdSchema,\n })\n .strict();\nexport type LinkGhostPlayerInput = z.infer<typeof LinkGhostPlayerInputSchema>;\n\nexport const LinkGhostPlayerResultSchema = z\n .object({\n leagueId: leagueIdSchema,\n teamId: teamIdSchema,\n ghostUserId: userIdSchema,\n userId: userIdSchema,\n complete: z.boolean(),\n gamesMoved: countSchema,\n membershipOutcome: z.enum(GHOST_LINK_MEMBERSHIP_OUTCOME_KEYS).optional(),\n publicUserDeleted: z.boolean(),\n })\n .strict();\nexport type LinkGhostPlayerResult = z.infer<typeof LinkGhostPlayerResultSchema>;\n\nexport const AdminLinkClosedLeagueGhostPlayerInputSchema = LinkGhostPlayerInputSchema;\nexport type AdminLinkClosedLeagueGhostPlayerInput = LinkGhostPlayerInput;\nexport const AdminLinkClosedLeagueGhostPlayerResultSchema = LinkGhostPlayerResultSchema;\nexport type AdminLinkClosedLeagueGhostPlayerResult = LinkGhostPlayerResult;\n\nexport const ghostUserIdSchema = userIdSchema.refine(isGhostUserId, 'Not a ghost player.');\n\nexport const UpdateTeamMembershipRoleInputSchema = z\n .object({\n teamId: teamIdSchema,\n userId: userIdSchema,\n role: z.enum(MEMBER_ASSIGNABLE_TEAM_ROLES),\n })\n .strict();\nexport type UpdateTeamMembershipRoleInput = z.infer<typeof UpdateTeamMembershipRoleInputSchema>;\n\nexport const UpdateTeamMembershipRoleResultSchema = z\n .object({\n leagueId: leagueIdSchema,\n teamId: teamIdSchema,\n userId: userIdSchema,\n role: teamRoleSchema,\n changed: z.boolean(),\n })\n .strict();\nexport type UpdateTeamMembershipRoleResult = z.infer<typeof UpdateTeamMembershipRoleResultSchema>;\n\nexport const DeleteTeamMembershipInputSchema = z\n .object({\n teamId: teamIdSchema,\n userId: userIdSchema.refine(\n (userId) => !isGhostUserId(userId),\n 'A ghost player is removed as a ghost player.',\n ),\n })\n .strict();\nexport type DeleteTeamMembershipInput = z.infer<typeof DeleteTeamMembershipInputSchema>;\n\nexport const DeleteTeamMembershipResultSchema = z\n .object({\n leagueId: leagueIdSchema,\n teamId: teamIdSchema,\n userId: userIdSchema,\n deleted: z.boolean(),\n rosterSyncStatus: membershipRosterSyncStatusSchema,\n })\n .strict();\nexport type DeleteTeamMembershipResult = z.infer<typeof DeleteTeamMembershipResultSchema>;\n\nexport const DeleteTeamGhostPlayerInputSchema = z\n .object({ teamId: teamIdSchema, ghostUserId: ghostUserIdSchema })\n .strict();\nexport type DeleteTeamGhostPlayerInput = z.infer<typeof DeleteTeamGhostPlayerInputSchema>;\n\nexport const DeleteTeamGhostPlayerResultSchema = z\n .object({\n leagueId: leagueIdSchema,\n teamId: teamIdSchema,\n ghostUserId: userIdSchema,\n complete: z.boolean(),\n finishedGameEntriesRemoved: countSchema,\n publicUserDeleted: z.boolean(),\n })\n .strict();\nexport type DeleteTeamGhostPlayerResult = z.infer<typeof DeleteTeamGhostPlayerResultSchema>;\n\nexport const GhostRemovalRefusalDetailsSchema = z\n .object({\n reason: z.enum(GHOST_REMOVAL_REFUSAL_KEYS),\n finishedGameEntriesRemoved: countSchema.optional(),\n })\n .strict();\nexport type GhostRemovalRefusalDetails = z.infer<typeof GhostRemovalRefusalDetailsSchema>;\n\nexport const AdminUpdateLeagueTeamCaptainInputSchema = z\n .object({ teamId: teamIdSchema, captainUserId: userIdSchema })\n .strict();\nexport type AdminUpdateLeagueTeamCaptainInput = z.infer<\n typeof AdminUpdateLeagueTeamCaptainInputSchema\n>;\n\nexport const AdminUpdateLeagueTeamCaptainResultSchema = z\n .object({\n leagueId: leagueIdSchema,\n teamId: teamIdSchema,\n captainUserId: userIdSchema,\n demotedUserIds: z.array(userIdSchema),\n changed: z.boolean(),\n })\n .strict();\nexport type AdminUpdateLeagueTeamCaptainResult = z.infer<\n typeof AdminUpdateLeagueTeamCaptainResultSchema\n>;\n\nexport const AdminUpdateLeagueTeamNameInputSchema = z\n .object({ teamId: teamIdSchema, name: teamNameSchema })\n .strict();\nexport type AdminUpdateLeagueTeamNameInput = z.infer<typeof AdminUpdateLeagueTeamNameInputSchema>;\n\nexport const AdminUpdateLeagueTeamTypeInputSchema = z\n .object({ teamId: teamIdSchema, teamType: teamTypeSchema })\n .strict();\nexport type AdminUpdateLeagueTeamTypeInput = z.infer<typeof AdminUpdateLeagueTeamTypeInputSchema>;\n\nexport const AdminUpdateLeagueTeamResultSchema = z\n .object({ leagueId: leagueIdSchema, teamId: teamIdSchema, changed: z.boolean() })\n .strict();\nexport type AdminUpdateLeagueTeamResult = z.infer<typeof AdminUpdateLeagueTeamResultSchema>;\n\nexport const AdminUpdateLeagueTeamContactInputSchema = z\n .object({ teamId: teamIdSchema, contactPhone: contactPhoneSchema })\n .strict();\nexport type AdminUpdateLeagueTeamContactInput = z.infer<\n typeof AdminUpdateLeagueTeamContactInputSchema\n>;\n\nexport const AdminUpdateLeagueTeamContactResultSchema = AdminUpdateLeagueTeamResultSchema;\nexport type AdminUpdateLeagueTeamContactResult = AdminUpdateLeagueTeamResult;\n\nexport const AdminDeleteLeagueTeamInputSchema = z.object({ teamId: teamIdSchema }).strict();\nexport type AdminDeleteLeagueTeamInput = z.infer<typeof AdminDeleteLeagueTeamInputSchema>;\n\nexport const AdminDeleteLeagueTeamResultSchema = z\n .object({\n teamId: teamIdSchema,\n complete: z.boolean(),\n remainingGameCount: countSchema,\n })\n .strict();\nexport type AdminDeleteLeagueTeamResult = z.infer<typeof AdminDeleteLeagueTeamResultSchema>;\n\nexport const LEAGUE_TEAM_DELETE_REFUSAL_KEYS = ['teamHasPlayed'] as const;\nexport type LeagueTeamDeleteRefusal = (typeof LEAGUE_TEAM_DELETE_REFUSAL_KEYS)[number];\nexport const LeagueTeamDeleteRefusalDetailsSchema = z\n .object({ reason: z.enum(LEAGUE_TEAM_DELETE_REFUSAL_KEYS), deletedGameCount: countSchema })\n .strict();\nexport type LeagueTeamDeleteRefusalDetails = z.infer<typeof LeagueTeamDeleteRefusalDetailsSchema>;\n"]}
|