@ttt-productions/q-core 0.1.4 → 0.1.5

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.
Files changed (55) hide show
  1. package/dist/constants/business.d.ts +40 -9
  2. package/dist/constants/business.d.ts.map +1 -1
  3. package/dist/constants/business.js +41 -20
  4. package/dist/constants/business.js.map +1 -1
  5. package/dist/doc-schemas/admin-notifications.d.ts +1 -1
  6. package/dist/doc-schemas/award-group-grant.d.ts +53 -0
  7. package/dist/doc-schemas/award-group-grant.d.ts.map +1 -0
  8. package/dist/doc-schemas/award-group-grant.js +63 -0
  9. package/dist/doc-schemas/award-group-grant.js.map +1 -0
  10. package/dist/doc-schemas/index.d.ts +1 -0
  11. package/dist/doc-schemas/index.d.ts.map +1 -1
  12. package/dist/doc-schemas/index.js +1 -0
  13. package/dist/doc-schemas/index.js.map +1 -1
  14. package/dist/doc-schemas/migration-console.d.ts +3 -3
  15. package/dist/doc-schemas/registry.d.ts +50 -12
  16. package/dist/doc-schemas/registry.d.ts.map +1 -1
  17. package/dist/doc-schemas/registry.js +5 -0
  18. package/dist/doc-schemas/registry.js.map +1 -1
  19. package/dist/doc-schemas/stats-operation.d.ts +18 -18
  20. package/dist/ids/award-grant-ids.d.ts +9 -0
  21. package/dist/ids/award-grant-ids.d.ts.map +1 -0
  22. package/dist/ids/award-grant-ids.js +17 -0
  23. package/dist/ids/award-grant-ids.js.map +1 -0
  24. package/dist/ids/index.d.ts +1 -0
  25. package/dist/ids/index.d.ts.map +1 -1
  26. package/dist/ids/index.js +1 -0
  27. package/dist/ids/index.js.map +1 -1
  28. package/dist/paths/collection-groups.d.ts +1 -0
  29. package/dist/paths/collection-groups.d.ts.map +1 -1
  30. package/dist/paths/collection-groups.js +3 -1
  31. package/dist/paths/collection-groups.js.map +1 -1
  32. package/dist/paths/collection-refs.d.ts +1 -0
  33. package/dist/paths/collection-refs.d.ts.map +1 -1
  34. package/dist/paths/collection-refs.js +1 -0
  35. package/dist/paths/collection-refs.js.map +1 -1
  36. package/dist/paths/collections.d.ts +5 -0
  37. package/dist/paths/collections.d.ts.map +1 -1
  38. package/dist/paths/collections.js +8 -0
  39. package/dist/paths/collections.js.map +1 -1
  40. package/dist/paths/path-builders.d.ts +3 -0
  41. package/dist/paths/path-builders.d.ts.map +1 -1
  42. package/dist/paths/path-builders.js +13 -1
  43. package/dist/paths/path-builders.js.map +1 -1
  44. package/dist/schemas/admin-notifications.d.ts +1 -1
  45. package/dist/schemas/awards.d.ts +94 -2
  46. package/dist/schemas/awards.d.ts.map +1 -1
  47. package/dist/schemas/awards.js +49 -9
  48. package/dist/schemas/awards.js.map +1 -1
  49. package/dist/schemas/leagues.d.ts +2 -2
  50. package/dist/schemas/migration-console.d.ts +7 -7
  51. package/dist/types/unions.d.ts +8 -0
  52. package/dist/types/unions.d.ts.map +1 -1
  53. package/dist/types/unions.js +12 -2
  54. package/dist/types/unions.js.map +1 -1
  55. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"path-builders.js","sourceRoot":"","sources":["../../src/paths/path-builders.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,EAAE;AACF,0DAA0D;AAC1D,8DAA8D;AAC9D,EAAE;AACF,iGAAiG;AACjG,mGAAmG;AACnG,8EAA8E;AAE9E,OAAO,EACL,WAAW,EACX,yBAAyB,EACzB,YAAY,EACZ,2BAA2B,EAC3B,8BAA8B,GAC/B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAE7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,SAAS;IACT,WAAW,EAAE,CAAC,MAAc,EAAoB,EAAE,CAAC,CAAC,WAAW,CAAC,aA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U,EAAE,YAAY,CAAC,YAAY,CAAC;IAC9F,SAAS,EAAE,GAAqB,EAAE,CAAC,CAAC,WAAW,CAAC,UAAU,EAAE,YAAY,CAAC,UAAU,CAAC;IACpF,WAAW,EAAE,GAAqB,EAAE,CAAC,CAAC,WAAW,CAAC,UAAU,EAAE,YAAY,CAAC,YAAY,CAAC;IACxF,SAAS,EAAE,GAAqB,EAAE,CAAC,CAAC,WAAW,CAAC,WAAW,EAAE,YAAY,CAAC,UAAU,CAAC;IACrF,gBAAgB,EAAE,GAAqB,EAAE,CAAC,CAAC,WAAW,CAAC,WAAW,EAAE,YAAY,CAAC,iBAAiB,CAAC;CAC3F,CAAC","sourcesContent":["// Document path builders — segment tuples, the one path family.\n//\n// Frontend: doc(db, ...PATH_BUILDERS.userProfile(userId))\n// Backend: db.doc(toPath(PATH_BUILDERS.userProfile(userId)))\n//\n// A singular name builds a document path; its plural builds the parent collection path where the\n// parent is a subcollection (top-level collections are in COLLECTION_REFS). A compound document ID\n// is assembled here through its one builder in ../ids — never at a call site.\n\nimport {\n COLLECTIONS,\n SPORT_GAME_SUBCOLLECTIONS,\n SPECIAL_DOCS,\n USER_PROFILE_SUBCOLLECTIONS,\n WAIVER_TEMPLATE_SUBCOLLECTIONS,\n} from './collections.js';\nimport type { SweepStateName } from '../constants/scheduled-jobs.js';\nimport {\n buildGameRosterPlayerId,\n buildLeagueFreeAgentId,\n buildTeamMembershipId,\n buildSignedWaiverId,\n} from '../ids/compound-ids.js';\nimport { buildWaiverTemplateVersionId } from '../ids/waiver-template-ids.js';\nimport type { SportKey } from '../types/sports.js';\nimport { toReservedDisplayNameKey } from '../utils/display-name.js';\n\nexport const PATH_BUILDERS = {\n // People\n userProfile: (userId: string): [string, string] => [COLLECTIONS.USER_PROFILES, userId],\n userPrivateData: (userId: string): [string, string, string, string] => [\n COLLECTIONS.USER_PROFILES,\n userId,\n USER_PROFILE_SUBCOLLECTIONS.PRIVATE_DATA,\n userId,\n ],\n historicalStat: (userId: string, sportKey: SportKey): [string, string, string, string] => [\n COLLECTIONS.USER_PROFILES,\n userId,\n USER_PROFILE_SUBCOLLECTIONS.HISTORICAL_STATS,\n sportKey,\n ],\n historicalStats: (userId: string): [string, string, string] => [\n COLLECTIONS.USER_PROFILES,\n userId,\n USER_PROFILE_SUBCOLLECTIONS.HISTORICAL_STATS,\n ],\n publicUser: (userId: string): [string, string] => [COLLECTIONS.PUBLIC_USERS, userId],\n statusReconcileQueueEntry: (userId: string): [string, string] => [COLLECTIONS.STATUS_RECONCILE_QUEUE, userId],\n registrationStart: (userId: string): [string, string] => [COLLECTIONS.REGISTRATION_STARTS, userId],\n sweepState: (name: SweepStateName): [string, string] => [COLLECTIONS.SWEEP_STATE, name],\n reservedDisplayName: (displayName: string): [string, string] => [\n COLLECTIONS.RESERVED_DISPLAY_NAMES,\n toReservedDisplayNameKey(displayName),\n ],\n\n // Leagues, teams, membership\n sportLeague: (leagueId: string): [string, string] => [COLLECTIONS.SPORT_LEAGUES, leagueId],\n leagueTeam: (teamId: string): [string, string] => [COLLECTIONS.LEAGUE_TEAMS, teamId],\n leagueTeamContact: (teamId: string): [string, string] => [COLLECTIONS.LEAGUE_TEAM_CONTACTS, teamId],\n teamMembership: (leagueId: string, teamId: string, userId: string): [string, string] => [\n COLLECTIONS.TEAM_MEMBERSHIPS,\n buildTeamMembershipId(leagueId, teamId, userId),\n ],\n membershipRosterSync: (leagueId: string, teamId: string, userId: string): [string, string] => [\n COLLECTIONS.MEMBERSHIP_ROSTER_SYNCS,\n buildTeamMembershipId(leagueId, teamId, userId),\n ],\n teamInvitation: (inviteId: string): [string, string] => [COLLECTIONS.TEAM_INVITATIONS, inviteId],\n teamJoinRequest: (requestId: string): [string, string] => [COLLECTIONS.TEAM_JOIN_REQUESTS, requestId],\n leagueFreeAgent: (leagueId: string, userId: string): [string, string] => [\n COLLECTIONS.LEAGUE_FREE_AGENTS,\n buildLeagueFreeAgentId(leagueId, userId),\n ],\n\n // Games\n sportGame: (gameId: string): [string, string] => [COLLECTIONS.SPORT_GAMES, gameId],\n gameRosterPlayer: (gameId: string, teamId: string, userId: string): [string, string, string, string] => [\n COLLECTIONS.SPORT_GAMES,\n gameId,\n SPORT_GAME_SUBCOLLECTIONS.GAME_ROSTER_PLAYERS,\n buildGameRosterPlayerId(teamId, userId),\n ],\n gameRosterPlayers: (gameId: string): [string, string, string] => [\n COLLECTIONS.SPORT_GAMES,\n gameId,\n SPORT_GAME_SUBCOLLECTIONS.GAME_ROSTER_PLAYERS,\n ],\n gameStatEvent: (gameId: string, eventId: string): [string, string, string, string] => [\n COLLECTIONS.SPORT_GAMES,\n gameId,\n SPORT_GAME_SUBCOLLECTIONS.GAME_STAT_EVENTS,\n eventId,\n ],\n gameStatEvents: (gameId: string): [string, string, string] => [\n COLLECTIONS.SPORT_GAMES,\n gameId,\n SPORT_GAME_SUBCOLLECTIONS.GAME_STAT_EVENTS,\n ],\n gameStatHistoryPage: (gameId: string, pageId: string): [string, string, string, string] => [\n COLLECTIONS.SPORT_GAMES,\n gameId,\n SPORT_GAME_SUBCOLLECTIONS.GAME_STAT_HISTORY,\n pageId,\n ],\n gameStatHistory: (gameId: string): [string, string, string] => [\n COLLECTIONS.SPORT_GAMES,\n gameId,\n SPORT_GAME_SUBCOLLECTIONS.GAME_STAT_HISTORY,\n ],\n gameLocation: (gameLocationId: string): [string, string] => [COLLECTIONS.GAME_LOCATIONS, gameLocationId],\n\n // Waivers and hardware\n waiverTemplate: (waiverTemplateId: string): [string, string] => [\n COLLECTIONS.WAIVER_TEMPLATES,\n waiverTemplateId,\n ],\n waiverTemplateVersion: (waiverTemplateId: string, version: number): [string, string, string, string] => [\n COLLECTIONS.WAIVER_TEMPLATES,\n waiverTemplateId,\n WAIVER_TEMPLATE_SUBCOLLECTIONS.WAIVER_TEMPLATE_VERSIONS,\n buildWaiverTemplateVersionId(version),\n ],\n waiverTemplateVersions: (waiverTemplateId: string): [string, string, string] => [\n COLLECTIONS.WAIVER_TEMPLATES,\n waiverTemplateId,\n WAIVER_TEMPLATE_SUBCOLLECTIONS.WAIVER_TEMPLATE_VERSIONS,\n ],\n signedWaiver: (leagueId: string, userId: string): [string, string] => [\n COLLECTIONS.SIGNED_WAIVERS,\n buildSignedWaiverId(leagueId, userId),\n ],\n hardwareLoanContract: (contractId: string): [string, string] => [\n COLLECTIONS.HARDWARE_LOAN_CONTRACTS,\n contractId,\n ],\n\n // Awards and derived stats\n awardDefinition: (awardId: string): [string, string] => [COLLECTIONS.AWARD_DEFINITIONS, awardId],\n sportHallOfFame: (sportKey: SportKey): [string, string] => [COLLECTIONS.SPORT_HALL_OF_FAME, sportKey],\n statsValidationReport: (reportId: string): [string, string] => [\n COLLECTIONS.STATS_VALIDATION_REPORTS,\n reportId,\n ],\n statsOperation: (operationId: string): [string, string] => [COLLECTIONS.STATS_OPERATIONS, operationId],\n migrationActionRun: (actionId: string): [string, string] => [COLLECTIONS.MIGRATION_ACTION_RUNS, actionId],\n\n galleryPicture: (pictureId: string): [string, string] => [COLLECTIONS.GALLERY_PICTURES, pictureId],\n pendingMedia: (pendingMediaId: string): [string, string] => [COLLECTIONS.PENDING_MEDIA, pendingMediaId],\n // A picture's retirement is keyed by the picture id; a whole gallery's by `buildGalleryRetirementId`.\n pictureRetirement: (retirementId: string): [string, string] => [\n COLLECTIONS.PICTURE_RETIREMENTS,\n retirementId,\n ],\n\n auditEvent: (auditEventId: string): [string, string] => [COLLECTIONS.AUDIT_EVENTS, auditEventId],\n\n // Admin notifications. A card's id is notification-core's; the others come from ../ids.\n activeAdminNotification: (notificationId: string): [string, string] => [\n COLLECTIONS.ACTIVE_ADMIN_NOTIFICATIONS,\n notificationId,\n ],\n adminNotificationHistoryEntry: (historyId: string): [string, string] => [\n COLLECTIONS.ADMIN_NOTIFICATION_HISTORY,\n historyId,\n ],\n notificationDelivery: (deliveryId: string): [string, string] => [COLLECTIONS.NOTIFICATION_DELIVERIES, deliveryId],\n notificationArchiveAllJob: (jobId: string): [string, string] => [COLLECTIONS.NOTIFICATION_ARCHIVE_ALL_JOBS, jobId],\n\n // Fixed-ID system documents\n landingPageConfig: (): [string, string] => [COLLECTIONS.APP_CONFIG, SPECIAL_DOCS.LANDING_PAGE],\n appConfig: (): [string, string] => [COLLECTIONS.APP_CONFIG, SPECIAL_DOCS.APP_CONFIG],\n statsBeacon: (): [string, string] => [COLLECTIONS.APP_CONFIG, SPECIAL_DOCS.STATS_BEACON],\n adminList: (): [string, string] => [COLLECTIONS.SYSTEM_DATA, SPECIAL_DOCS.ADMIN_LIST],\n migrationConsole: (): [string, string] => [COLLECTIONS.SERVER_DATA, SPECIAL_DOCS.MIGRATION_CONSOLE],\n} as const;\n"]}
1
+ {"version":3,"file":"path-builders.js","sourceRoot":"","sources":["../../src/paths/path-builders.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,EAAE;AACF,0DAA0D;AAC1D,8DAA8D;AAC9D,EAAE;AACF,iGAAiG;AACjG,mGAAmG;AACnG,8EAA8E;AAE9E,OAAO,EACL,gCAAgC,EAChC,WAAW,EACX,yBAAyB,EACzB,YAAY,EACZ,2BAA2B,EAC3B,8BAA8B,GAC/B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAE7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,SAAS;IACT,WAAW,EAAE,CAAC,MAAc,EAAoB,EAAE,CAAC,CAAC,WAAW,CAAC,aAAa,EAAE,MAAM,CAAC;IACtF,eAAe,EAAE,CAAC,MAAc,EAAoC,EAAE,CAAC;QACrE,WAAW,CAAC,aAAa;QACzB,MAAM;QACN,2BAA2B,CAAC,YAAY;QACxC,MAAM;KACP;IACD,cAAc,EAAE,CAAC,MAAc,EAAE,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AU,CAAC;IACjH,yBAAyB,EAAE,CAAC,KAAa,EAAoB,EAAE,CAAC,CAAC,WAAW,CAAC,6BAA6B,EAAE,KAAK,CAAC;IAElH,4BAA4B;IAC5B,iBAAiB,EAAE,GAAqB,EAAE,CAAC,CAAC,WAAW,CAAC,UAAU,EAAE,YAAY,CAAC,YAAY,CAAC;IAC9F,SAAS,EAAE,GAAqB,EAAE,CAAC,CAAC,WAAW,CAAC,UAAU,EAAE,YAAY,CAAC,UAAU,CAAC;IACpF,WAAW,EAAE,GAAqB,EAAE,CAAC,CAAC,WAAW,CAAC,UAAU,EAAE,YAAY,CAAC,YAAY,CAAC;IACxF,SAAS,EAAE,GAAqB,EAAE,CAAC,CAAC,WAAW,CAAC,WAAW,EAAE,YAAY,CAAC,UAAU,CAAC;IACrF,gBAAgB,EAAE,GAAqB,EAAE,CAAC,CAAC,WAAW,CAAC,WAAW,EAAE,YAAY,CAAC,iBAAiB,CAAC;CAC3F,CAAC","sourcesContent":["// Document path builders — segment tuples, the one path family.\n//\n// Frontend: doc(db, ...PATH_BUILDERS.userProfile(userId))\n// Backend: db.doc(toPath(PATH_BUILDERS.userProfile(userId)))\n//\n// A singular name builds a document path; its plural builds the parent collection path where the\n// parent is a subcollection (top-level collections are in COLLECTION_REFS). A compound document ID\n// is assembled here through its one builder in ../ids — never at a call site.\n\nimport {\n AWARD_GROUP_GRANT_SUBCOLLECTIONS,\n COLLECTIONS,\n SPORT_GAME_SUBCOLLECTIONS,\n SPECIAL_DOCS,\n USER_PROFILE_SUBCOLLECTIONS,\n WAIVER_TEMPLATE_SUBCOLLECTIONS,\n} from './collections.js';\nimport type { SweepStateName } from '../constants/scheduled-jobs.js';\nimport {\n buildGameRosterPlayerId,\n buildLeagueFreeAgentId,\n buildTeamMembershipId,\n buildSignedWaiverId,\n} from '../ids/compound-ids.js';\nimport { buildWaiverTemplateVersionId } from '../ids/waiver-template-ids.js';\nimport type { SportKey } from '../types/sports.js';\nimport { toReservedDisplayNameKey } from '../utils/display-name.js';\n\nexport const PATH_BUILDERS = {\n // People\n userProfile: (userId: string): [string, string] => [COLLECTIONS.USER_PROFILES, userId],\n userPrivateData: (userId: string): [string, string, string, string] => [\n COLLECTIONS.USER_PROFILES,\n userId,\n USER_PROFILE_SUBCOLLECTIONS.PRIVATE_DATA,\n userId,\n ],\n historicalStat: (userId: string, sportKey: SportKey): [string, string, string, string] => [\n COLLECTIONS.USER_PROFILES,\n userId,\n USER_PROFILE_SUBCOLLECTIONS.HISTORICAL_STATS,\n sportKey,\n ],\n historicalStats: (userId: string): [string, string, string] => [\n COLLECTIONS.USER_PROFILES,\n userId,\n USER_PROFILE_SUBCOLLECTIONS.HISTORICAL_STATS,\n ],\n publicUser: (userId: string): [string, string] => [COLLECTIONS.PUBLIC_USERS, userId],\n statusReconcileQueueEntry: (userId: string): [string, string] => [COLLECTIONS.STATUS_RECONCILE_QUEUE, userId],\n registrationStart: (userId: string): [string, string] => [COLLECTIONS.REGISTRATION_STARTS, userId],\n sweepState: (name: SweepStateName): [string, string] => [COLLECTIONS.SWEEP_STATE, name],\n reservedDisplayName: (displayName: string): [string, string] => [\n COLLECTIONS.RESERVED_DISPLAY_NAMES,\n toReservedDisplayNameKey(displayName),\n ],\n\n // Leagues, teams, membership\n sportLeague: (leagueId: string): [string, string] => [COLLECTIONS.SPORT_LEAGUES, leagueId],\n leagueTeam: (teamId: string): [string, string] => [COLLECTIONS.LEAGUE_TEAMS, teamId],\n leagueTeamContact: (teamId: string): [string, string] => [COLLECTIONS.LEAGUE_TEAM_CONTACTS, teamId],\n teamMembership: (leagueId: string, teamId: string, userId: string): [string, string] => [\n COLLECTIONS.TEAM_MEMBERSHIPS,\n buildTeamMembershipId(leagueId, teamId, userId),\n ],\n membershipRosterSync: (leagueId: string, teamId: string, userId: string): [string, string] => [\n COLLECTIONS.MEMBERSHIP_ROSTER_SYNCS,\n buildTeamMembershipId(leagueId, teamId, userId),\n ],\n teamInvitation: (inviteId: string): [string, string] => [COLLECTIONS.TEAM_INVITATIONS, inviteId],\n teamJoinRequest: (requestId: string): [string, string] => [COLLECTIONS.TEAM_JOIN_REQUESTS, requestId],\n leagueFreeAgent: (leagueId: string, userId: string): [string, string] => [\n COLLECTIONS.LEAGUE_FREE_AGENTS,\n buildLeagueFreeAgentId(leagueId, userId),\n ],\n\n // Games\n sportGame: (gameId: string): [string, string] => [COLLECTIONS.SPORT_GAMES, gameId],\n gameRosterPlayer: (gameId: string, teamId: string, userId: string): [string, string, string, string] => [\n COLLECTIONS.SPORT_GAMES,\n gameId,\n SPORT_GAME_SUBCOLLECTIONS.GAME_ROSTER_PLAYERS,\n buildGameRosterPlayerId(teamId, userId),\n ],\n gameRosterPlayers: (gameId: string): [string, string, string] => [\n COLLECTIONS.SPORT_GAMES,\n gameId,\n SPORT_GAME_SUBCOLLECTIONS.GAME_ROSTER_PLAYERS,\n ],\n gameStatEvent: (gameId: string, eventId: string): [string, string, string, string] => [\n COLLECTIONS.SPORT_GAMES,\n gameId,\n SPORT_GAME_SUBCOLLECTIONS.GAME_STAT_EVENTS,\n eventId,\n ],\n gameStatEvents: (gameId: string): [string, string, string] => [\n COLLECTIONS.SPORT_GAMES,\n gameId,\n SPORT_GAME_SUBCOLLECTIONS.GAME_STAT_EVENTS,\n ],\n gameStatHistoryPage: (gameId: string, pageId: string): [string, string, string, string] => [\n COLLECTIONS.SPORT_GAMES,\n gameId,\n SPORT_GAME_SUBCOLLECTIONS.GAME_STAT_HISTORY,\n pageId,\n ],\n gameStatHistory: (gameId: string): [string, string, string] => [\n COLLECTIONS.SPORT_GAMES,\n gameId,\n SPORT_GAME_SUBCOLLECTIONS.GAME_STAT_HISTORY,\n ],\n gameLocation: (gameLocationId: string): [string, string] => [COLLECTIONS.GAME_LOCATIONS, gameLocationId],\n\n // Waivers and hardware\n waiverTemplate: (waiverTemplateId: string): [string, string] => [\n COLLECTIONS.WAIVER_TEMPLATES,\n waiverTemplateId,\n ],\n waiverTemplateVersion: (waiverTemplateId: string, version: number): [string, string, string, string] => [\n COLLECTIONS.WAIVER_TEMPLATES,\n waiverTemplateId,\n WAIVER_TEMPLATE_SUBCOLLECTIONS.WAIVER_TEMPLATE_VERSIONS,\n buildWaiverTemplateVersionId(version),\n ],\n waiverTemplateVersions: (waiverTemplateId: string): [string, string, string] => [\n COLLECTIONS.WAIVER_TEMPLATES,\n waiverTemplateId,\n WAIVER_TEMPLATE_SUBCOLLECTIONS.WAIVER_TEMPLATE_VERSIONS,\n ],\n signedWaiver: (leagueId: string, userId: string): [string, string] => [\n COLLECTIONS.SIGNED_WAIVERS,\n buildSignedWaiverId(leagueId, userId),\n ],\n hardwareLoanContract: (contractId: string): [string, string] => [\n COLLECTIONS.HARDWARE_LOAN_CONTRACTS,\n contractId,\n ],\n\n // Awards and derived stats\n awardDefinition: (awardId: string): [string, string] => [COLLECTIONS.AWARD_DEFINITIONS, awardId],\n awardGroupGrant: (grantId: string): [string, string] => [COLLECTIONS.AWARD_GROUP_GRANTS, grantId],\n awardGroupGrantPerson: (grantId: string, userId: string): [string, string, string, string] => [\n COLLECTIONS.AWARD_GROUP_GRANTS,\n grantId,\n AWARD_GROUP_GRANT_SUBCOLLECTIONS.AWARD_GROUP_GRANT_PEOPLE,\n userId,\n ],\n awardGroupGrantPeople: (grantId: string): [string, string, string] => [\n COLLECTIONS.AWARD_GROUP_GRANTS,\n grantId,\n AWARD_GROUP_GRANT_SUBCOLLECTIONS.AWARD_GROUP_GRANT_PEOPLE,\n ],\n sportHallOfFame: (sportKey: SportKey): [string, string] => [COLLECTIONS.SPORT_HALL_OF_FAME, sportKey],\n statsValidationReport: (reportId: string): [string, string] => [\n COLLECTIONS.STATS_VALIDATION_REPORTS,\n reportId,\n ],\n statsOperation: (operationId: string): [string, string] => [COLLECTIONS.STATS_OPERATIONS, operationId],\n migrationActionRun: (actionId: string): [string, string] => [COLLECTIONS.MIGRATION_ACTION_RUNS, actionId],\n\n galleryPicture: (pictureId: string): [string, string] => [COLLECTIONS.GALLERY_PICTURES, pictureId],\n pendingMedia: (pendingMediaId: string): [string, string] => [COLLECTIONS.PENDING_MEDIA, pendingMediaId],\n // A picture's retirement is keyed by the picture id; a whole gallery's by `buildGalleryRetirementId`.\n pictureRetirement: (retirementId: string): [string, string] => [\n COLLECTIONS.PICTURE_RETIREMENTS,\n retirementId,\n ],\n\n auditEvent: (auditEventId: string): [string, string] => [COLLECTIONS.AUDIT_EVENTS, auditEventId],\n\n // Admin notifications. A card's id is notification-core's; the others come from ../ids.\n activeAdminNotification: (notificationId: string): [string, string] => [\n COLLECTIONS.ACTIVE_ADMIN_NOTIFICATIONS,\n notificationId,\n ],\n adminNotificationHistoryEntry: (historyId: string): [string, string] => [\n COLLECTIONS.ADMIN_NOTIFICATION_HISTORY,\n historyId,\n ],\n notificationDelivery: (deliveryId: string): [string, string] => [COLLECTIONS.NOTIFICATION_DELIVERIES, deliveryId],\n notificationArchiveAllJob: (jobId: string): [string, string] => [COLLECTIONS.NOTIFICATION_ARCHIVE_ALL_JOBS, jobId],\n\n // Fixed-ID system documents\n landingPageConfig: (): [string, string] => [COLLECTIONS.APP_CONFIG, SPECIAL_DOCS.LANDING_PAGE],\n appConfig: (): [string, string] => [COLLECTIONS.APP_CONFIG, SPECIAL_DOCS.APP_CONFIG],\n statsBeacon: (): [string, string] => [COLLECTIONS.APP_CONFIG, SPECIAL_DOCS.STATS_BEACON],\n adminList: (): [string, string] => [COLLECTIONS.SYSTEM_DATA, SPECIAL_DOCS.ADMIN_LIST],\n migrationConsole: (): [string, string] => [COLLECTIONS.SERVER_DATA, SPECIAL_DOCS.MIGRATION_CONSOLE],\n} as const;\n"]}
@@ -27,8 +27,8 @@ export declare const AdminGetNotificationArchiveAllStatusInputSchema: z.ZodObjec
27
27
  export type AdminGetNotificationArchiveAllStatusInput = z.infer<typeof AdminGetNotificationArchiveAllStatusInputSchema>;
28
28
  export declare const AdminGetNotificationArchiveAllStatusResultSchema: z.ZodObject<{
29
29
  state: z.ZodEnum<{
30
- failed: "failed";
31
30
  complete: "complete";
31
+ failed: "failed";
32
32
  "in-progress": "in-progress";
33
33
  incomplete: "incomplete";
34
34
  }>;
@@ -2,8 +2,6 @@ import { z } from 'zod';
2
2
  export declare const AdminUpdateAwardGrantsInputSchema: z.ZodObject<{
3
3
  awardId: z.ZodString;
4
4
  grantUserIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
5
- grantTeamIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
6
- grantLeagueIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
7
5
  revokeUserIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
8
6
  }, z.core.$strict>;
9
7
  export type AdminUpdateAwardGrantsInput = z.infer<typeof AdminUpdateAwardGrantsInputSchema>;
@@ -30,6 +28,100 @@ export declare const AdminUpdateAwardGrantsResultSchema: z.ZodObject<{
30
28
  }, z.core.$strict>>;
31
29
  }, z.core.$strict>;
32
30
  export type AdminUpdateAwardGrantsResult = z.infer<typeof AdminUpdateAwardGrantsResultSchema>;
31
+ export declare const AwardGroupSchema: z.ZodObject<{
32
+ groupType: z.ZodEnum<{
33
+ team: "team";
34
+ league: "league";
35
+ }>;
36
+ groupId: z.ZodString;
37
+ }, z.core.$strict>;
38
+ export type AwardGroup = z.infer<typeof AwardGroupSchema>;
39
+ export declare const AdminUpdateAwardGroupGrantInputSchema: z.ZodObject<{
40
+ awardId: z.ZodString;
41
+ action: z.ZodEnum<{
42
+ grant: "grant";
43
+ revoke: "revoke";
44
+ }>;
45
+ group: z.ZodObject<{
46
+ groupType: z.ZodEnum<{
47
+ team: "team";
48
+ league: "league";
49
+ }>;
50
+ groupId: z.ZodString;
51
+ }, z.core.$strict>;
52
+ }, z.core.$strict>;
53
+ export type AdminUpdateAwardGroupGrantInput = z.infer<typeof AdminUpdateAwardGroupGrantInputSchema>;
54
+ export declare const AwardGroupGrantProgressSchema: z.ZodObject<{
55
+ grantId: z.ZodString;
56
+ action: z.ZodEnum<{
57
+ grant: "grant";
58
+ revoke: "revoke";
59
+ }>;
60
+ decision: z.ZodNumber;
61
+ status: z.ZodEnum<{
62
+ pending: "pending";
63
+ complete: "complete";
64
+ }>;
65
+ peopleReached: z.ZodNumber;
66
+ attemptCount: z.ZodNumber;
67
+ lastError: z.ZodNullable<z.ZodString>;
68
+ createdAt: z.ZodNumber;
69
+ completedAt: z.ZodNullable<z.ZodNumber>;
70
+ }, z.core.$strict>;
71
+ export type AwardGroupGrantProgress = z.infer<typeof AwardGroupGrantProgressSchema>;
72
+ export declare const AdminUpdateAwardGroupGrantResultSchema: z.ZodObject<{
73
+ awardId: z.ZodString;
74
+ opened: z.ZodBoolean;
75
+ grant: z.ZodNullable<z.ZodObject<{
76
+ grantId: z.ZodString;
77
+ action: z.ZodEnum<{
78
+ grant: "grant";
79
+ revoke: "revoke";
80
+ }>;
81
+ decision: z.ZodNumber;
82
+ status: z.ZodEnum<{
83
+ pending: "pending";
84
+ complete: "complete";
85
+ }>;
86
+ peopleReached: z.ZodNumber;
87
+ attemptCount: z.ZodNumber;
88
+ lastError: z.ZodNullable<z.ZodString>;
89
+ createdAt: z.ZodNumber;
90
+ completedAt: z.ZodNullable<z.ZodNumber>;
91
+ }, z.core.$strict>>;
92
+ }, z.core.$strict>;
93
+ export type AdminUpdateAwardGroupGrantResult = z.infer<typeof AdminUpdateAwardGroupGrantResultSchema>;
94
+ export declare const AdminGetAwardGroupGrantStatusInputSchema: z.ZodObject<{
95
+ awardId: z.ZodString;
96
+ group: z.ZodObject<{
97
+ groupType: z.ZodEnum<{
98
+ team: "team";
99
+ league: "league";
100
+ }>;
101
+ groupId: z.ZodString;
102
+ }, z.core.$strict>;
103
+ }, z.core.$strict>;
104
+ export type AdminGetAwardGroupGrantStatusInput = z.infer<typeof AdminGetAwardGroupGrantStatusInputSchema>;
105
+ export declare const AdminGetAwardGroupGrantStatusResultSchema: z.ZodObject<{
106
+ grant: z.ZodNullable<z.ZodObject<{
107
+ grantId: z.ZodString;
108
+ action: z.ZodEnum<{
109
+ grant: "grant";
110
+ revoke: "revoke";
111
+ }>;
112
+ decision: z.ZodNumber;
113
+ status: z.ZodEnum<{
114
+ pending: "pending";
115
+ complete: "complete";
116
+ }>;
117
+ peopleReached: z.ZodNumber;
118
+ attemptCount: z.ZodNumber;
119
+ lastError: z.ZodNullable<z.ZodString>;
120
+ createdAt: z.ZodNumber;
121
+ completedAt: z.ZodNullable<z.ZodNumber>;
122
+ }, z.core.$strict>>;
123
+ }, z.core.$strict>;
124
+ export type AdminGetAwardGroupGrantStatusResult = z.infer<typeof AdminGetAwardGroupGrantStatusResultSchema>;
33
125
  export declare const AdminDeleteAwardDefinitionInputSchema: z.ZodObject<{
34
126
  awardId: z.ZodString;
35
127
  }, z.core.$strict>;
@@ -1 +1 @@
1
- {"version":3,"file":"awards.d.ts","sourceRoot":"","sources":["../../src/schemas/awards.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,eAAO,MAAM,iCAAiC;;;;;;kBAmB3C,CAAC;AACJ,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F,eAAO,MAAM,oBAAoB;;;;;;kBAEtB,CAAC;AACZ,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAKlE,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;kBASpC,CAAC;AACZ,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAG9F,eAAO,MAAM,qCAAqC;;kBAAgD,CAAC;AACnG,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC;AAGpG,eAAO,MAAM,sCAAsC;;;kBAExC,CAAC;AACZ,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAC;A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;;;;;;;;;;;;;;;kBAExC,CAAC;AACZ,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAC;AAGtG,eAAO,MAAM,wCAAwC;;;;;;;;;kBAE1C,CAAC;AACZ,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wCAAwC,CAAC,CAAC;AAC1G,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;;;;;;kBAE3C,CAAC;AACZ,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yCAAyC,CAAC,CAAC;AAG5G,eAAO,MAAM,qCAAqC;;kBAAgD,CAAC;AACnG,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC;AAGpG,eAAO,MAAM,sCAAsC;;;kBAExC,CAAC;AACZ,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAC;AAOtG,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;8BAI1C,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF,eAAO,MAAM,gCAAgC;;;;;kBAOlC,CAAC;AACZ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC"}
@@ -1,27 +1,27 @@
1
1
  // Callable contracts for the award catalog, award grants, and the badges an account features.
2
2
  //
3
3
  // An award is created by its first badge's publication (the `award-badge` upload, ./uploads.ts), so
4
- // no callable here creates one. Grants and revokes share one input — four named lists, never an
5
- // action discriminator (BACKEND-002) — like the role roster's.
4
+ // no callable here creates one. Grants and revokes to named accounts share one input — two named
5
+ // lists, never an action discriminator (BACKEND-002) — like the role roster's. A team's or a whole
6
+ // league's grant is its own decision, carried out a page of people at a time.
6
7
  import { z } from 'zod';
7
8
  import { MAX_AWARD_GRANT_TARGETS } from '../constants/business.js';
9
+ import { awardGroupGrantActionSchema, awardGroupGrantDecisionSchema, awardGroupGrantStatusSchema, awardGroupTypeSchema, } from '../doc-schemas/award-group-grant.js';
10
+ import { countSchema, documentIdSegmentSchema, epochMsSchema } from '../doc-schemas/atoms.js';
8
11
  import { awardIdSchema } from '../doc-schemas/catalogs.js';
9
12
  import { AWARD_GRANT_SKIP_REASON_KEYS, FEATURED_AWARD_SLOT_KEYS } from '../types/unions.js';
10
- import { leagueIdSchema, teamIdSchema, userIdSchema } from './atoms.js';
13
+ import { userIdSchema } from './atoms.js';
11
14
  const targetList = (atom) => z.array(atom).max(MAX_AWARD_GRANT_TARGETS).optional();
12
- // An admin grants an award to accounts — named directly, or as every active real member of a team
13
- // or of a league — and revokes it from accounts. Recipients are resolved on the server, deduplicated,
14
- // and bounded by MAX_AWARD_GRANT_RECIPIENTS; ghosts hold no account and are skipped.
15
+ // An admin grants an award to named accounts and revokes it from named accounts, in one commit.
16
+ // Recipients are deduplicated on the server; a ghost holds no account and is skipped.
15
17
  export const AdminUpdateAwardGrantsInputSchema = z
16
18
  .object({
17
19
  awardId: awardIdSchema,
18
20
  grantUserIds: targetList(userIdSchema),
19
- grantTeamIds: targetList(teamIdSchema),
20
- grantLeagueIds: targetList(leagueIdSchema),
21
21
  revokeUserIds: targetList(userIdSchema),
22
22
  })
23
23
  .strict()
24
- .refine((input) => [input.grantUserIds, input.grantTeamIds, input.grantLeagueIds, input.revokeUserIds].some((list) => list !== undefined && list.length > 0), { message: 'Name someone to grant the award to or revoke it from.' })
24
+ .refine((input) => [input.grantUserIds, input.revokeUserIds].some((list) => list !== undefined && list.length > 0), { message: 'Name someone to grant the award to or revoke it from.' })
25
25
  .refine((input) => !(input.grantUserIds ?? []).some((userId) => (input.revokeUserIds ?? []).includes(userId)), { message: 'An account cannot be granted and revoked the award in one change.', path: ['revokeUserIds'] });
26
26
  export const AwardGrantSkipSchema = z
27
27
  .object({ userId: userIdSchema, reason: z.enum(AWARD_GRANT_SKIP_REASON_KEYS) })
@@ -39,6 +39,46 @@ export const AdminUpdateAwardGrantsResultSchema = z
39
39
  skipped: z.array(AwardGrantSkipSchema),
40
40
  })
41
41
  .strict();
42
+ // The group a group grant reaches: every active member of one team, or of one whole league.
43
+ // `groupId` is that team's or league's id.
44
+ export const AwardGroupSchema = z
45
+ .object({ groupType: awardGroupTypeSchema, groupId: documentIdSegmentSchema })
46
+ .strict();
47
+ // An admin grants an award to a group, or takes back what the group's grants gave. The decision opens
48
+ // at once and its people are reached a page at a time after the answer; a request the group's latest
49
+ // decision already settles (granting what is granted, taking back what is not) opens nothing.
50
+ export const AdminUpdateAwardGroupGrantInputSchema = z
51
+ .object({ awardId: awardIdSchema, action: awardGroupGrantActionSchema, group: AwardGroupSchema })
52
+ .strict();
53
+ // Where one decision on an award for a group stands. `peopleReached` is how many people it has dealt
54
+ // with so far: a grant's recorded people, or the people a revoke has taken the award back from or left
55
+ // holding it. A pending decision that failed carries its failure and how many times it has tried; the
56
+ // scheduled resume tries it again.
57
+ export const AwardGroupGrantProgressSchema = z
58
+ .object({
59
+ grantId: z.string().min(1),
60
+ action: awardGroupGrantActionSchema,
61
+ decision: awardGroupGrantDecisionSchema,
62
+ status: awardGroupGrantStatusSchema,
63
+ peopleReached: countSchema,
64
+ attemptCount: countSchema,
65
+ lastError: z.string().nullable(),
66
+ createdAt: epochMsSchema,
67
+ completedAt: epochMsSchema.nullable(),
68
+ })
69
+ .strict();
70
+ // `opened` is false when the group's latest decision already settled the request; `grant` is then that
71
+ // decision, or null when the group has none.
72
+ export const AdminUpdateAwardGroupGrantResultSchema = z
73
+ .object({ awardId: awardIdSchema, opened: z.boolean(), grant: AwardGroupGrantProgressSchema.nullable() })
74
+ .strict();
75
+ // An admin reads the latest decision on an award for a group, so the progress survives a closed page.
76
+ export const AdminGetAwardGroupGrantStatusInputSchema = z
77
+ .object({ awardId: awardIdSchema, group: AwardGroupSchema })
78
+ .strict();
79
+ export const AdminGetAwardGroupGrantStatusResultSchema = z
80
+ .object({ grant: AwardGroupGrantProgressSchema.nullable() })
81
+ .strict();
42
82
  // An admin deletes an award nobody holds. Its badge's files are retired with it.
43
83
  export const AdminDeleteAwardDefinitionInputSchema = z.object({ awardId: awardIdSchema }).strict();
44
84
  // `deleted` is false when the award was already gone: nothing was written.
@@ -1 +1 @@
1
- {"version":3,"file":"awards.js","sourceRoot":"","sources":["../../src/schemas/awards.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,EAAE;AACF,oGAAoG;AACpG,gGAAgG;AAChG,+DAA+D;AAE/D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC5F,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAExE,MAAM,UAAU,GAAG,CAAyB,IAAO,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC,QAAQ,EAAE,CAAC;AAE9G,kGAAkG;AAClG,sGAAsG;AACtG,qFAAqF;AACrF,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC;KAC/C,MAAM,CAAC;IACN,OAAO,EAAE,aAAa;IACtB,YAAY,EAAE,UAAU,CAAC,YAAY,CAAC;IACtC,YAAY,EAAE,UAAU,CAAC,YAAY,CAAC;IACtC,cAAc,EAAE,UAAU,CAAC,cAAc,CAAC;IAC1C,aAAa,EAAE,UAAU,CAAC,YAAY,CAAC;CACxC,CAAC;KACD,MAAM,EAAE;KACR,MAAM,CACL,CAAC,KAAK,EAAE,EAAE,CACR,CAAC,KAAK,CAAC,YAAY,EAA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AAC,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AAGnG,2EAA2E;AAC3E,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC;KACpD,MAAM,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;KACxD,MAAM,EAAE,CAAC;AAGZ,iGAAiG;AACjG,kGAAkG;AAClG,kGAAkG;AAClG,4FAA4F;AAC5F,MAAM,uBAAuB,GAAG,CAAC,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;AACjE,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,kBAAkB,CAAC,QAAQ,EAAE;IAC5E,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,uBAAuB,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACtG,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,uBAAuB,EAAE,CAAC,CAAC,MAAM,EAAE;IAChF,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE;CACjD,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC;KAC9C,MAAM,CAAC;IACN,MAAM,EAAE,YAAY;IACpB,cAAc,EAAE,aAAa,CAAC,QAAQ,EAAE;IACxC,gBAAgB,EAAE,aAAa,CAAC,QAAQ,EAAE;IAC1C,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;CACrB,CAAC;KACD,MAAM,EAAE,CAAC","sourcesContent":["// Callable contracts for the award catalog, award grants, and the badges an account features.\n//\n// An award is created by its first badge's publication (the `award-badge` upload, ./uploads.ts), so\n// no callable here creates one. Grants and revokes share one input — four named lists, never an\n// action discriminator (BACKEND-002) — like the role roster's.\n\nimport { z } from 'zod';\nimport { MAX_AWARD_GRANT_TARGETS } from '../constants/business.js';\nimport { awardIdSchema } from '../doc-schemas/catalogs.js';\nimport { AWARD_GRANT_SKIP_REASON_KEYS, FEATURED_AWARD_SLOT_KEYS } from '../types/unions.js';\nimport { leagueIdSchema, teamIdSchema, userIdSchema } from './atoms.js';\n\nconst targetList = <T extends z.ZodTypeAny>(atom: T) => z.array(atom).max(MAX_AWARD_GRANT_TARGETS).optional();\n\n// An admin grants an award to accounts — named directly, or as every active real member of a team\n// or of a league — and revokes it from accounts. Recipients are resolved on the server, deduplicated,\n// and bounded by MAX_AWARD_GRANT_RECIPIENTS; ghosts hold no account and are skipped.\nexport const AdminUpdateAwardGrantsInputSchema = z\n .object({\n awardId: awardIdSchema,\n grantUserIds: targetList(userIdSchema),\n grantTeamIds: targetList(teamIdSchema),\n grantLeagueIds: targetList(leagueIdSchema),\n revokeUserIds: targetList(userIdSchema),\n })\n .strict()\n .refine(\n (input) =>\n [input.grantUserIds, input.grantTeamIds, input.grantLeagueIds, input.revokeUserIds].some(\n (list) => list !== undefined && list.length > 0,\n ),\n { message: 'Name someone to grant the award to or revoke it from.' },\n )\n .refine(\n (input) => !(input.grantUserIds ?? []).some((userId) => (input.revokeUserIds ?? []).includes(userId)),\n { message: 'An account cannot be granted and revoked the award in one change.', path: ['revokeUserIds'] },\n );\nexport type AdminUpdateAwardGrantsInput = z.infer<typeof AdminUpdateAwardGrantsInputSchema>;\n\nexport const AwardGrantSkipSchema = z\n .object({ userId: userIdSchema, reason: z.enum(AWARD_GRANT_SKIP_REASON_KEYS) })\n .strict();\nexport type AwardGrantSkip = z.infer<typeof AwardGrantSkipSchema>;\n\n// What the change did for each account it reached: granted now, already held, revoked now, not held\n// to begin with, or skipped with its reason. A retried call reports the accounts its first call\n// changed as already held or not held, and writes nothing again.\nexport const AdminUpdateAwardGrantsResultSchema = z\n .object({\n awardId: awardIdSchema,\n granted: z.array(userIdSchema),\n alreadyHeld: z.array(userIdSchema),\n revoked: z.array(userIdSchema),\n notHeld: z.array(userIdSchema),\n skipped: z.array(AwardGrantSkipSchema),\n })\n .strict();\nexport type AdminUpdateAwardGrantsResult = z.infer<typeof AdminUpdateAwardGrantsResultSchema>;\n\n// An admin deletes an award nobody holds. Its badge's files are retired with it.\nexport const AdminDeleteAwardDefinitionInputSchema = z.object({ awardId: awardIdSchema }).strict();\nexport type AdminDeleteAwardDefinitionInput = z.infer<typeof AdminDeleteAwardDefinitionInputSchema>;\n\n// `deleted` is false when the award was already gone: nothing was written.\nexport const AdminDeleteAwardDefinitionResultSchema = z\n .object({ awardId: awardIdSchema, deleted: z.boolean() })\n .strict();\nexport type AdminDeleteAwardDefinitionResult = z.infer<typeof AdminDeleteAwardDefinitionResultSchema>;\n\n// The signed-in account chooses which of its own awards to show beside its name: a primary and a\n// secondary badge, each an award it holds, or none. The input is the one change the person made —\n// set a slot, clear a slot, or swap the two — and the core applies it to the pair as stored, so a\n// change to one slot never writes back a stale value of the other. No user id is ever sent.\nconst featuredAwardSlotSchema = z.enum(FEATURED_AWARD_SLOT_KEYS);\nexport const UpdateFeaturedAwardsInputSchema = z.discriminatedUnion('action', [\n z.object({ action: z.literal('set'), slot: featuredAwardSlotSchema, awardId: awardIdSchema }).strict(),\n z.object({ action: z.literal('clear'), slot: featuredAwardSlotSchema }).strict(),\n z.object({ action: z.literal('swap') }).strict(),\n]);\nexport type UpdateFeaturedAwardsInput = z.infer<typeof UpdateFeaturedAwardsInputSchema>;\n\nexport const UpdateFeaturedAwardsResultSchema = z\n .object({\n userId: userIdSchema,\n primaryAwardId: awardIdSchema.nullable(),\n secondaryAwardId: awardIdSchema.nullable(),\n changed: z.boolean(),\n })\n .strict();\nexport type UpdateFeaturedAwardsResult = z.infer<typeof UpdateFeaturedAwardsResultSchema>;\n"]}
1
+ {"version":3,"file":"awards.js","sourceRoot":"","sources":["../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AAC,MAAM,EAAE,CAAC;AAGnG,2EAA2E;AAC3E,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC;KACpD,MAAM,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;KACxD,MAAM,EAAE,CAAC;AAGZ,iGAAiG;AACjG,kGAAkG;AAClG,kGAAkG;AAClG,4FAA4F;AAC5F,MAAM,uBAAuB,GAAG,CAAC,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;AACjE,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,kBAAkB,CAAC,QAAQ,EAAE;IAC5E,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,uBAAuB,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACtG,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,uBAAuB,EAAE,CAAC,CAAC,MAAM,EAAE;IAChF,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE;CACjD,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC;KAC9C,MAAM,CAAC;IACN,MAAM,EAAE,YAAY;IACpB,cAAc,EAAE,aAAa,CAAC,QAAQ,EAAE;IACxC,gBAAgB,EAAE,aAAa,CAAC,QAAQ,EAAE;IAC1C,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;CACrB,CAAC;KACD,MAAM,EAAE,CAAC","sourcesContent":["// Callable contracts for the award catalog, award grants, and the badges an account features.\n//\n// An award is created by its first badge's publication (the `award-badge` upload, ./uploads.ts), so\n// no callable here creates one. Grants and revokes to named accounts share one input — two named\n// lists, never an action discriminator (BACKEND-002) — like the role roster's. A team's or a whole\n// league's grant is its own decision, carried out a page of people at a time.\n\nimport { z } from 'zod';\nimport { MAX_AWARD_GRANT_TARGETS } from '../constants/business.js';\nimport {\n awardGroupGrantActionSchema,\n awardGroupGrantDecisionSchema,\n awardGroupGrantStatusSchema,\n awardGroupTypeSchema,\n} from '../doc-schemas/award-group-grant.js';\nimport { countSchema, documentIdSegmentSchema, epochMsSchema } from '../doc-schemas/atoms.js';\nimport { awardIdSchema } from '../doc-schemas/catalogs.js';\nimport { AWARD_GRANT_SKIP_REASON_KEYS, FEATURED_AWARD_SLOT_KEYS } from '../types/unions.js';\nimport { userIdSchema } from './atoms.js';\n\nconst targetList = <T extends z.ZodTypeAny>(atom: T) => z.array(atom).max(MAX_AWARD_GRANT_TARGETS).optional();\n\n// An admin grants an award to named accounts and revokes it from named accounts, in one commit.\n// Recipients are deduplicated on the server; a ghost holds no account and is skipped.\nexport const AdminUpdateAwardGrantsInputSchema = z\n .object({\n awardId: awardIdSchema,\n grantUserIds: targetList(userIdSchema),\n revokeUserIds: targetList(userIdSchema),\n })\n .strict()\n .refine(\n (input) => [input.grantUserIds, input.revokeUserIds].some((list) => list !== undefined && list.length > 0),\n { message: 'Name someone to grant the award to or revoke it from.' },\n )\n .refine(\n (input) => !(input.grantUserIds ?? []).some((userId) => (input.revokeUserIds ?? []).includes(userId)),\n { message: 'An account cannot be granted and revoked the award in one change.', path: ['revokeUserIds'] },\n );\nexport type AdminUpdateAwardGrantsInput = z.infer<typeof AdminUpdateAwardGrantsInputSchema>;\n\nexport const AwardGrantSkipSchema = z\n .object({ userId: userIdSchema, reason: z.enum(AWARD_GRANT_SKIP_REASON_KEYS) })\n .strict();\nexport type AwardGrantSkip = z.infer<typeof AwardGrantSkipSchema>;\n\n// What the change did for each account it reached: granted now, already held, revoked now, not held\n// to begin with, or skipped with its reason. A retried call reports the accounts its first call\n// changed as already held or not held, and writes nothing again.\nexport const AdminUpdateAwardGrantsResultSchema = z\n .object({\n awardId: awardIdSchema,\n granted: z.array(userIdSchema),\n alreadyHeld: z.array(userIdSchema),\n revoked: z.array(userIdSchema),\n notHeld: z.array(userIdSchema),\n skipped: z.array(AwardGrantSkipSchema),\n })\n .strict();\nexport type AdminUpdateAwardGrantsResult = z.infer<typeof AdminUpdateAwardGrantsResultSchema>;\n\n// The group a group grant reaches: every active member of one team, or of one whole league.\n// `groupId` is that team's or league's id.\nexport const AwardGroupSchema = z\n .object({ groupType: awardGroupTypeSchema, groupId: documentIdSegmentSchema })\n .strict();\nexport type AwardGroup = z.infer<typeof AwardGroupSchema>;\n\n// An admin grants an award to a group, or takes back what the group's grants gave. The decision opens\n// at once and its people are reached a page at a time after the answer; a request the group's latest\n// decision already settles (granting what is granted, taking back what is not) opens nothing.\nexport const AdminUpdateAwardGroupGrantInputSchema = z\n .object({ awardId: awardIdSchema, action: awardGroupGrantActionSchema, group: AwardGroupSchema })\n .strict();\nexport type AdminUpdateAwardGroupGrantInput = z.infer<typeof AdminUpdateAwardGroupGrantInputSchema>;\n\n// Where one decision on an award for a group stands. `peopleReached` is how many people it has dealt\n// with so far: a grant's recorded people, or the people a revoke has taken the award back from or left\n// holding it. A pending decision that failed carries its failure and how many times it has tried; the\n// scheduled resume tries it again.\nexport const AwardGroupGrantProgressSchema = z\n .object({\n grantId: z.string().min(1),\n action: awardGroupGrantActionSchema,\n decision: awardGroupGrantDecisionSchema,\n status: awardGroupGrantStatusSchema,\n peopleReached: countSchema,\n attemptCount: countSchema,\n lastError: z.string().nullable(),\n createdAt: epochMsSchema,\n completedAt: epochMsSchema.nullable(),\n })\n .strict();\nexport type AwardGroupGrantProgress = z.infer<typeof AwardGroupGrantProgressSchema>;\n\n// `opened` is false when the group's latest decision already settled the request; `grant` is then that\n// decision, or null when the group has none.\nexport const AdminUpdateAwardGroupGrantResultSchema = z\n .object({ awardId: awardIdSchema, opened: z.boolean(), grant: AwardGroupGrantProgressSchema.nullable() })\n .strict();\nexport type AdminUpdateAwardGroupGrantResult = z.infer<typeof AdminUpdateAwardGroupGrantResultSchema>;\n\n// An admin reads the latest decision on an award for a group, so the progress survives a closed page.\nexport const AdminGetAwardGroupGrantStatusInputSchema = z\n .object({ awardId: awardIdSchema, group: AwardGroupSchema })\n .strict();\nexport type AdminGetAwardGroupGrantStatusInput = z.infer<typeof AdminGetAwardGroupGrantStatusInputSchema>;\nexport const AdminGetAwardGroupGrantStatusResultSchema = z\n .object({ grant: AwardGroupGrantProgressSchema.nullable() })\n .strict();\nexport type AdminGetAwardGroupGrantStatusResult = z.infer<typeof AdminGetAwardGroupGrantStatusResultSchema>;\n\n// An admin deletes an award nobody holds. Its badge's files are retired with it.\nexport const AdminDeleteAwardDefinitionInputSchema = z.object({ awardId: awardIdSchema }).strict();\nexport type AdminDeleteAwardDefinitionInput = z.infer<typeof AdminDeleteAwardDefinitionInputSchema>;\n\n// `deleted` is false when the award was already gone: nothing was written.\nexport const AdminDeleteAwardDefinitionResultSchema = z\n .object({ awardId: awardIdSchema, deleted: z.boolean() })\n .strict();\nexport type AdminDeleteAwardDefinitionResult = z.infer<typeof AdminDeleteAwardDefinitionResultSchema>;\n\n// The signed-in account chooses which of its own awards to show beside its name: a primary and a\n// secondary badge, each an award it holds, or none. The input is the one change the person made —\n// set a slot, clear a slot, or swap the two — and the core applies it to the pair as stored, so a\n// change to one slot never writes back a stale value of the other. No user id is ever sent.\nconst featuredAwardSlotSchema = z.enum(FEATURED_AWARD_SLOT_KEYS);\nexport const UpdateFeaturedAwardsInputSchema = z.discriminatedUnion('action', [\n z.object({ action: z.literal('set'), slot: featuredAwardSlotSchema, awardId: awardIdSchema }).strict(),\n z.object({ action: z.literal('clear'), slot: featuredAwardSlotSchema }).strict(),\n z.object({ action: z.literal('swap') }).strict(),\n]);\nexport type UpdateFeaturedAwardsInput = z.infer<typeof UpdateFeaturedAwardsInputSchema>;\n\nexport const UpdateFeaturedAwardsResultSchema = z\n .object({\n userId: userIdSchema,\n primaryAwardId: awardIdSchema.nullable(),\n secondaryAwardId: awardIdSchema.nullable(),\n changed: z.boolean(),\n })\n .strict();\nexport type UpdateFeaturedAwardsResult = z.infer<typeof UpdateFeaturedAwardsResultSchema>;\n"]}
@@ -5,11 +5,11 @@ export declare const playoffCutoffSchema: z.ZodNumber;
5
5
  export declare const LEAGUE_SETTINGS_FIELD_KEYS: readonly ["leagueTitle", "description", "leagueStartDate", "leagueEndDate", "playoffCutoff", "playoffCutoffComp", "playoffCutoffRec", "requiresWaiver", "waiverTemplateId"];
6
6
  export type LeagueSettingsField = (typeof LEAGUE_SETTINGS_FIELD_KEYS)[number];
7
7
  export declare const leagueSettingsFieldSchema: z.ZodEnum<{
8
+ playoffCutoff: "playoffCutoff";
8
9
  description: "description";
9
10
  leagueEndDate: "leagueEndDate";
10
11
  waiverTemplateId: "waiverTemplateId";
11
12
  leagueStartDate: "leagueStartDate";
12
- playoffCutoff: "playoffCutoff";
13
13
  playoffCutoffComp: "playoffCutoffComp";
14
14
  playoffCutoffRec: "playoffCutoffRec";
15
15
  leagueTitle: "leagueTitle";
@@ -59,11 +59,11 @@ export type AdminUpdateSportLeagueInput = z.infer<typeof AdminUpdateSportLeagueI
59
59
  export declare const AdminUpdateSportLeagueResultSchema: z.ZodObject<{
60
60
  leagueId: z.ZodString;
61
61
  changedFields: z.ZodArray<z.ZodEnum<{
62
+ playoffCutoff: "playoffCutoff";
62
63
  description: "description";
63
64
  leagueEndDate: "leagueEndDate";
64
65
  waiverTemplateId: "waiverTemplateId";
65
66
  leagueStartDate: "leagueStartDate";
66
- playoffCutoff: "playoffCutoff";
67
67
  playoffCutoffComp: "playoffCutoffComp";
68
68
  playoffCutoffRec: "playoffCutoffRec";
69
69
  leagueTitle: "leagueTitle";
@@ -123,8 +123,8 @@ export declare const MigrationActionPageResultSchema: z.ZodObject<{
123
123
  updatedAt: z.ZodNumber;
124
124
  completedAt: z.ZodOptional<z.ZodNumber>;
125
125
  status: z.ZodEnum<{
126
- running: "running";
127
126
  complete: "complete";
127
+ running: "running";
128
128
  stopped: "stopped";
129
129
  }>;
130
130
  pages: z.ZodNumber;
@@ -426,8 +426,8 @@ export declare const MigrationStepStateSchema: z.ZodObject<{
426
426
  updatedAt: z.ZodNumber;
427
427
  completedAt: z.ZodOptional<z.ZodNumber>;
428
428
  status: z.ZodEnum<{
429
- running: "running";
430
429
  complete: "complete";
430
+ running: "running";
431
431
  stopped: "stopped";
432
432
  }>;
433
433
  pages: z.ZodNumber;
@@ -461,8 +461,8 @@ export declare const MigrationStepStateSchema: z.ZodObject<{
461
461
  updatedAt: z.ZodNumber;
462
462
  completedAt: z.ZodOptional<z.ZodNumber>;
463
463
  status: z.ZodEnum<{
464
- running: "running";
465
464
  complete: "complete";
465
+ running: "running";
466
466
  stopped: "stopped";
467
467
  }>;
468
468
  pages: z.ZodNumber;
@@ -870,8 +870,8 @@ export declare const GetMigrationConsoleResultSchema: z.ZodObject<{
870
870
  updatedAt: z.ZodNumber;
871
871
  completedAt: z.ZodOptional<z.ZodNumber>;
872
872
  status: z.ZodEnum<{
873
- running: "running";
874
873
  complete: "complete";
874
+ running: "running";
875
875
  stopped: "stopped";
876
876
  }>;
877
877
  pages: z.ZodNumber;
@@ -905,8 +905,8 @@ export declare const GetMigrationConsoleResultSchema: z.ZodObject<{
905
905
  updatedAt: z.ZodNumber;
906
906
  completedAt: z.ZodOptional<z.ZodNumber>;
907
907
  status: z.ZodEnum<{
908
- running: "running";
909
908
  complete: "complete";
909
+ running: "running";
910
910
  stopped: "stopped";
911
911
  }>;
912
912
  pages: z.ZodNumber;
@@ -1318,8 +1318,8 @@ export declare const RecordMigrationStepResultSchema: z.ZodObject<{
1318
1318
  updatedAt: z.ZodNumber;
1319
1319
  completedAt: z.ZodOptional<z.ZodNumber>;
1320
1320
  status: z.ZodEnum<{
1321
- running: "running";
1322
1321
  complete: "complete";
1322
+ running: "running";
1323
1323
  stopped: "stopped";
1324
1324
  }>;
1325
1325
  pages: z.ZodNumber;
@@ -1353,8 +1353,8 @@ export declare const RecordMigrationStepResultSchema: z.ZodObject<{
1353
1353
  updatedAt: z.ZodNumber;
1354
1354
  completedAt: z.ZodOptional<z.ZodNumber>;
1355
1355
  status: z.ZodEnum<{
1356
- running: "running";
1357
1356
  complete: "complete";
1357
+ running: "running";
1358
1358
  stopped: "stopped";
1359
1359
  }>;
1360
1360
  pages: z.ZodNumber;
@@ -62,6 +62,14 @@ export declare const AWARD_GRANT_SKIP_REASON_KEYS: readonly ["noProfile", "ghost
62
62
  export type AwardGrantSkipReason = (typeof AWARD_GRANT_SKIP_REASON_KEYS)[number];
63
63
  export declare const FEATURED_AWARD_SLOT_KEYS: readonly ["primary", "secondary"];
64
64
  export type FeaturedAwardSlot = (typeof FEATURED_AWARD_SLOT_KEYS)[number];
65
+ export declare const AWARD_GROUP_TYPE_KEYS: readonly ["team", "league"];
66
+ export type AwardGroupType = (typeof AWARD_GROUP_TYPE_KEYS)[number];
67
+ export declare const AWARD_GROUP_GRANT_ACTION_KEYS: readonly ["grant", "revoke"];
68
+ export type AwardGroupGrantAction = (typeof AWARD_GROUP_GRANT_ACTION_KEYS)[number];
69
+ export declare const AWARD_GROUP_GRANT_STATUS_KEYS: readonly ["pending", "complete"];
70
+ export type AwardGroupGrantStatus = (typeof AWARD_GROUP_GRANT_STATUS_KEYS)[number];
71
+ export declare const AWARD_GROUP_REVOKE_SKIP_KEYS: readonly ["heldBefore", "heldByAnotherGrant"];
72
+ export type AwardGroupRevokeSkip = (typeof AWARD_GROUP_REVOKE_SKIP_KEYS)[number];
65
73
  export declare const PENDING_HARDWARE_LOAN_CONTRACT_STATUS: "pending";
66
74
  export declare const LOANED_HARDWARE_LOAN_CONTRACT_STATUS: "loaned";
67
75
  export declare const RETURNED_HARDWARE_LOAN_CONTRACT_STATUS: "returned";
@@ -1 +1 @@
1
- {"version":3,"file":"unions.d.ts","sourceRoot":"","sources":["../../src/types/unions.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,+BAAgC,CAAC;AAC9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ClG,eAAO,MAAM,6BAA6B,cAA6D,CAAC;AACxG,eAAO,MAAM,yBAAyB,UAAyD,CAAC;AAIhG,eAAO,MAAM,6BAA6B,uDAAwD,CAAC;AACnG,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,6BAA6B,CAAC,CAAC,MAAM,CAAC,CAAC;AAKpF,eAAO,MAAM,2BAA2B,4BAA6B,CAAC;AACtE,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC;AAGhF,eAAO,MAAM,cAAc,gnCA0HjB,CAAC;AACX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAIvD,eAAO,MAAM,oBAAoB,6BAA8B,CAAC;AAChE,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAItE,eAAO,MAAM,+BAA+B,yQAelC,CAAC;AACX,eAAO,MAAM,oCAAoC,8GAKvC,CAAC;AACX,eAAO,MAAM,2BAA2B,4WAG9B,CAAC;AACX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -107,11 +107,21 @@ export const APPROVED_TEAM_JOIN_REQUEST_STATUS = 'approved';
107
107
  export const REJECTED_TEAM_JOIN_REQUEST_STATUS = 'rejected';
108
108
  export const CANCELLED_TEAM_JOIN_REQUEST_STATUS = 'cancelled';
109
109
  export const HARDWARE_LOAN_CONTRACT_STATUS_KEYS = ['pending', 'loaned', 'returned'];
110
- // Why an award grant passed over an account its teams or leagues named: it has no profile, or it is
111
- // a ghost, which holds no account.
110
+ // Why an award grant passed over an account it named: it has no profile, or it is a ghost, which
111
+ // holds no account.
112
112
  export const AWARD_GRANT_SKIP_REASON_KEYS = ['noProfile', 'ghost'];
113
113
  // The two badges an account shows beside its name.
114
114
  export const FEATURED_AWARD_SLOT_KEYS = ['primary', 'secondary'];
115
+ // The groups an award is granted to all at once: every active member of a team, or of a league.
116
+ export const AWARD_GROUP_TYPE_KEYS = ['team', 'league'];
117
+ // A decision on one award for one group: grant it to the group's people, or take back what the
118
+ // group's grants gave.
119
+ export const AWARD_GROUP_GRANT_ACTION_KEYS = ['grant', 'revoke'];
120
+ // A decision is `pending` until every page of it is done, then `complete`.
121
+ export const AWARD_GROUP_GRANT_STATUS_KEYS = ['pending', 'complete'];
122
+ // Why taking a group's award back left one person holding it: they held it before the grant reached
123
+ // them, or another group's grant still holds it for them.
124
+ export const AWARD_GROUP_REVOKE_SKIP_KEYS = ['heldBefore', 'heldByAnotherGrant'];
115
125
  export const PENDING_HARDWARE_LOAN_CONTRACT_STATUS = 'pending';
116
126
  export const LOANED_HARDWARE_LOAN_CONTRACT_STATUS = 'loaned';
117
127
  export const RETURNED_HARDWARE_LOAN_CONTRACT_STATUS = 'returned';