@ttt-productions/q-core 0.1.39 → 0.1.41

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 (133) hide show
  1. package/dist/constants/index.d.ts +1 -0
  2. package/dist/constants/index.d.ts.map +1 -1
  3. package/dist/constants/index.js +1 -0
  4. package/dist/constants/index.js.map +1 -1
  5. package/dist/constants/sports.d.ts +0 -6
  6. package/dist/constants/sports.d.ts.map +1 -1
  7. package/dist/constants/sports.js +0 -6
  8. package/dist/constants/sports.js.map +1 -1
  9. package/dist/constants/text-fields.d.ts +147 -0
  10. package/dist/constants/text-fields.d.ts.map +1 -0
  11. package/dist/{input-formats/input-formats.js → constants/text-fields.js} +50 -26
  12. package/dist/constants/text-fields.js.map +1 -0
  13. package/dist/doc-schemas/atoms.d.ts +0 -13
  14. package/dist/doc-schemas/atoms.d.ts.map +1 -1
  15. package/dist/doc-schemas/atoms.js +3 -28
  16. package/dist/doc-schemas/atoms.js.map +1 -1
  17. package/dist/doc-schemas/audit-event.d.ts +0 -2
  18. package/dist/doc-schemas/audit-event.d.ts.map +1 -1
  19. package/dist/doc-schemas/catalogs.d.ts.map +1 -1
  20. package/dist/doc-schemas/catalogs.js +4 -3
  21. package/dist/doc-schemas/catalogs.js.map +1 -1
  22. package/dist/doc-schemas/game-location.d.ts.map +1 -1
  23. package/dist/doc-schemas/game-location.js +7 -6
  24. package/dist/doc-schemas/game-location.js.map +1 -1
  25. package/dist/doc-schemas/league-team.d.ts.map +1 -1
  26. package/dist/doc-schemas/league-team.js +5 -4
  27. package/dist/doc-schemas/league-team.js.map +1 -1
  28. package/dist/doc-schemas/migration-console.d.ts.map +1 -1
  29. package/dist/doc-schemas/migration-console.js +4 -3
  30. package/dist/doc-schemas/migration-console.js.map +1 -1
  31. package/dist/doc-schemas/registry.d.ts +0 -75
  32. package/dist/doc-schemas/registry.d.ts.map +1 -1
  33. package/dist/doc-schemas/sport-game.d.ts +0 -6
  34. package/dist/doc-schemas/sport-game.d.ts.map +1 -1
  35. package/dist/doc-schemas/sport-game.js +5 -5
  36. package/dist/doc-schemas/sport-game.js.map +1 -1
  37. package/dist/doc-schemas/sport-league.d.ts.map +1 -1
  38. package/dist/doc-schemas/sport-league.js +5 -4
  39. package/dist/doc-schemas/sport-league.js.map +1 -1
  40. package/dist/doc-schemas/stats-operation.d.ts +0 -141
  41. package/dist/doc-schemas/stats-operation.d.ts.map +1 -1
  42. package/dist/doc-schemas/stats-operation.js +2 -41
  43. package/dist/doc-schemas/stats-operation.js.map +1 -1
  44. package/dist/doc-schemas/system.d.ts +0 -3
  45. package/dist/doc-schemas/system.d.ts.map +1 -1
  46. package/dist/doc-schemas/system.js +7 -6
  47. package/dist/doc-schemas/system.js.map +1 -1
  48. package/dist/doc-schemas/team-membership.js +5 -4
  49. package/dist/doc-schemas/team-membership.js.map +1 -1
  50. package/dist/doc-schemas/user-profile.d.ts.map +1 -1
  51. package/dist/doc-schemas/user-profile.js +5 -4
  52. package/dist/doc-schemas/user-profile.js.map +1 -1
  53. package/dist/doc-schemas/waiver-template.d.ts.map +1 -1
  54. package/dist/doc-schemas/waiver-template.js +5 -4
  55. package/dist/doc-schemas/waiver-template.js.map +1 -1
  56. package/dist/ids/index.d.ts +0 -1
  57. package/dist/ids/index.d.ts.map +1 -1
  58. package/dist/ids/index.js +0 -1
  59. package/dist/ids/index.js.map +1 -1
  60. package/dist/index.d.ts +0 -1
  61. package/dist/index.d.ts.map +1 -1
  62. package/dist/index.js +0 -1
  63. package/dist/index.js.map +1 -1
  64. package/dist/schemas/app-config.d.ts.map +1 -1
  65. package/dist/schemas/app-config.js +8 -7
  66. package/dist/schemas/app-config.js.map +1 -1
  67. package/dist/schemas/atoms.d.ts.map +1 -1
  68. package/dist/schemas/atoms.js +8 -7
  69. package/dist/schemas/atoms.js.map +1 -1
  70. package/dist/schemas/index.d.ts +1 -0
  71. package/dist/schemas/index.d.ts.map +1 -1
  72. package/dist/schemas/index.js +1 -0
  73. package/dist/schemas/index.js.map +1 -1
  74. package/dist/schemas/leagues.d.ts.map +1 -1
  75. package/dist/schemas/leagues.js +5 -4
  76. package/dist/schemas/leagues.js.map +1 -1
  77. package/dist/schemas/schedules.d.ts +0 -4
  78. package/dist/schemas/schedules.d.ts.map +1 -1
  79. package/dist/schemas/schedules.js +5 -9
  80. package/dist/schemas/schedules.js.map +1 -1
  81. package/dist/schemas/scoring.d.ts +6 -6
  82. package/dist/schemas/scoring.d.ts.map +1 -1
  83. package/dist/schemas/scoring.js +4 -3
  84. package/dist/schemas/scoring.js.map +1 -1
  85. package/dist/schemas/stats.d.ts +0 -1
  86. package/dist/schemas/stats.d.ts.map +1 -1
  87. package/dist/schemas/teams.d.ts +4 -16
  88. package/dist/schemas/teams.d.ts.map +1 -1
  89. package/dist/schemas/teams.js +4 -16
  90. package/dist/schemas/teams.js.map +1 -1
  91. package/dist/schemas/text-field.d.ts +4 -0
  92. package/dist/schemas/text-field.d.ts.map +1 -0
  93. package/dist/schemas/text-field.js +12 -0
  94. package/dist/schemas/text-field.js.map +1 -0
  95. package/dist/schemas/waiver-templates.d.ts.map +1 -1
  96. package/dist/schemas/waiver-templates.js +4 -4
  97. package/dist/schemas/waiver-templates.js.map +1 -1
  98. package/dist/sports/contribution.d.ts +3 -10
  99. package/dist/sports/contribution.d.ts.map +1 -1
  100. package/dist/sports/contribution.js +10 -9
  101. package/dist/sports/contribution.js.map +1 -1
  102. package/dist/types/audit.d.ts +1 -1
  103. package/dist/types/audit.d.ts.map +1 -1
  104. package/dist/types/audit.js +0 -1
  105. package/dist/types/audit.js.map +1 -1
  106. package/dist/types/schedules.d.ts +1 -1
  107. package/dist/types/schedules.d.ts.map +1 -1
  108. package/dist/types/schedules.js +1 -2
  109. package/dist/types/schedules.js.map +1 -1
  110. package/dist/types/stats.d.ts +3 -7
  111. package/dist/types/stats.d.ts.map +1 -1
  112. package/dist/types/stats.js +1 -16
  113. package/dist/types/stats.js.map +1 -1
  114. package/dist/types/unions.d.ts +2 -2
  115. package/dist/types/unions.d.ts.map +1 -1
  116. package/dist/types/unions.js +0 -1
  117. package/dist/types/unions.js.map +1 -1
  118. package/dist/utils/index.d.ts +1 -0
  119. package/dist/utils/index.d.ts.map +1 -1
  120. package/dist/utils/index.js +1 -0
  121. package/dist/utils/index.js.map +1 -1
  122. package/dist/utils/text-field.d.ts +15 -0
  123. package/dist/utils/text-field.d.ts.map +1 -0
  124. package/dist/utils/text-field.js +32 -0
  125. package/dist/utils/text-field.js.map +1 -0
  126. package/package.json +1 -1
  127. package/dist/ids/stats-operation-ids.d.ts +0 -3
  128. package/dist/ids/stats-operation-ids.d.ts.map +0 -1
  129. package/dist/ids/stats-operation-ids.js +0 -10
  130. package/dist/ids/stats-operation-ids.js.map +0 -1
  131. package/dist/input-formats/input-formats.d.ts +0 -123
  132. package/dist/input-formats/input-formats.d.ts.map +0 -1
  133. package/dist/input-formats/input-formats.js.map +0 -1
@@ -1,9 +1,10 @@
1
1
  import { z } from 'zod';
2
- import { AWARD_NAME_INPUT_FORMAT } from '../input-formats/input-formats.js';
3
- import { countSchema, documentIdSegmentSchema, epochMsSchema, textFieldSchema } from './atoms.js';
2
+ import { AWARD_NAME_INPUT } from '../constants/text-fields.js';
3
+ import { countSchema, documentIdSegmentSchema, epochMsSchema } from './atoms.js';
4
+ import { textFieldSchema } from '../schemas/text-field.js';
4
5
  import { pictureIdSchema } from './gallery.js';
5
6
  export const awardIdSchema = documentIdSegmentSchema;
6
- export const awardNameSchema = textFieldSchema(AWARD_NAME_INPUT_FORMAT);
7
+ export const awardNameSchema = textFieldSchema(AWARD_NAME_INPUT);
7
8
  export const AwardDefinitionSchema = z.strictObject({
8
9
  name: awardNameSchema,
9
10
  badgePictureId: pictureIdSchema.optional(),
@@ -1 +1 @@
1
- {"version":3,"file":"catalogs.js","sourceRoot":"","sources":["../../src/doc-schemas/catalogs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClG,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,CAAC,MAAM,aAAa,GAAG,uBAAuB,CAAC;AAErD,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC,uBAAuB,CAAC,CAAC;AAExE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,YAAY,CAAC;IAClD,IAAI,EAAE,eAAe;IACrB,cAAc,EAAE,eAAe,CAAC,QAAQ,EAAE;IAC1C,WAAW,EAAE,WAAW;IACxB,SAAS,EAAE,aAAa;IACxB,SAAS,EAAE,aAAa;CACzB,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { AWARD_NAME_INPUT_FORMAT } from '../input-formats/input-formats.js';\nimport { countSchema, documentIdSegmentSchema, epochMsSchema, textFieldSchema } from './atoms.js';\nimport { pictureIdSchema } from './gallery.js';\n\nexport const awardIdSchema = documentIdSegmentSchema;\n\nexport const awardNameSchema = textFieldSchema(AWARD_NAME_INPUT_FORMAT);\n\nexport const AwardDefinitionSchema = z.strictObject({\n name: awardNameSchema,\n badgePictureId: pictureIdSchema.optional(),\n holderCount: countSchema,\n createdAt: epochMsSchema,\n updatedAt: epochMsSchema,\n});\nexport type AwardDefinition = z.infer<typeof AwardDefinitionSchema>;\n"]}
1
+ {"version":3,"file":"catalogs.js","sourceRoot":"","sources":["../../src/doc-schemas/catalogs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,CAAC,MAAM,aAAa,GAAG,uBAAuB,CAAC;AAErD,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC,gBAAgB,CAAC,CAAC;AAEjE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,YAAY,CAAC;IAClD,IAAI,EAAE,eAAe;IACrB,cAAc,EAAE,eAAe,CAAC,QAAQ,EAAE;IAC1C,WAAW,EAAE,WAAW;IACxB,SAAS,EAAE,aAAa;IACxB,SAAS,EAAE,aAAa;CACzB,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { AWARD_NAME_INPUT } from '../constants/text-fields.js';\nimport { countSchema, documentIdSegmentSchema, epochMsSchema } from './atoms.js';\nimport { textFieldSchema } from '../schemas/text-field.js';\nimport { pictureIdSchema } from './gallery.js';\n\nexport const awardIdSchema = documentIdSegmentSchema;\n\nexport const awardNameSchema = textFieldSchema(AWARD_NAME_INPUT);\n\nexport const AwardDefinitionSchema = z.strictObject({\n name: awardNameSchema,\n badgePictureId: pictureIdSchema.optional(),\n holderCount: countSchema,\n createdAt: epochMsSchema,\n updatedAt: epochMsSchema,\n});\nexport type AwardDefinition = z.infer<typeof AwardDefinitionSchema>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"game-location.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/game-location.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,eAAO,MAAM,oBAAoB,aAA0B,CAAC;AAE5D,eAAO,MAAM,sBAAsB,wDAAmD,CAAC;AACvF,eAAO,MAAM,+BAA+B,wDAE3C,CAAC;AACF,eAAO,MAAM,6BAA6B,wDAEzC,CAAC;AACF,eAAO,MAAM,8BAA8B,oEAKvC,CAAC;AACL,eAAO,MAAM,sBAAsB,wDAAmD,CAAC;AAEvF,eAAO,MAAM,kBAAkB;;;;;;;;iBAS7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAI9D,eAAO,MAAM,0BAA0B;;kBAErC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
1
+ {"version":3,"file":"game-location.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/game-location.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,oBAAoB,aAA0B,CAAC;AAE5D,eAAO,MAAM,sBAAsB,wDAA4C,CAAC;AAChF,eAAO,MAAM,+BAA+B,wDAAsD,CAAC;AACnG,eAAO,MAAM,6BAA6B,wDAAoD,CAAC;AAC/F,eAAO,MAAM,8BAA8B,oEAKvC,CAAC;AACL,eAAO,MAAM,sBAAsB,wDAA4C,CAAC;AAEhF,eAAO,MAAM,kBAAkB;;;;;;;;iBAS7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAI9D,eAAO,MAAM,0BAA0B;;kBAErC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
@@ -1,19 +1,20 @@
1
1
  import { z } from 'zod';
2
2
  import { MAX_GAME_LOCATION_SUB_LOCATIONS } from '../constants/business.js';
3
- import { GAME_LOCATION_MEMO_INPUT_FORMAT, GAME_LOCATION_NAME_INPUT_FORMAT, GAME_LOCATION_STREET_ADDRESS_INPUT_FORMAT, GAME_LOCATION_SUB_LOCATION_INPUT_FORMAT, } from '../input-formats/input-formats.js';
4
- import { countSchema, documentIdSegmentSchema, epochMsSchema, textFieldSchema } from './atoms.js';
3
+ import { GAME_LOCATION_MEMO_INPUT, GAME_LOCATION_NAME_INPUT, GAME_LOCATION_STREET_ADDRESS_INPUT, GAME_LOCATION_SUB_LOCATION_INPUT, } from '../constants/text-fields.js';
4
+ import { countSchema, documentIdSegmentSchema, epochMsSchema } from './atoms.js';
5
+ import { textFieldSchema } from '../schemas/text-field.js';
5
6
  import { pictureIdSchema } from './gallery.js';
6
7
  export const gameLocationIdSchema = documentIdSegmentSchema;
7
- export const gameLocationNameSchema = textFieldSchema(GAME_LOCATION_NAME_INPUT_FORMAT);
8
- export const gameLocationStreetAddressSchema = textFieldSchema(GAME_LOCATION_STREET_ADDRESS_INPUT_FORMAT);
9
- export const gameLocationSubLocationSchema = textFieldSchema(GAME_LOCATION_SUB_LOCATION_INPUT_FORMAT);
8
+ export const gameLocationNameSchema = textFieldSchema(GAME_LOCATION_NAME_INPUT);
9
+ export const gameLocationStreetAddressSchema = textFieldSchema(GAME_LOCATION_STREET_ADDRESS_INPUT);
10
+ export const gameLocationSubLocationSchema = textFieldSchema(GAME_LOCATION_SUB_LOCATION_INPUT);
10
11
  export const gameLocationSubLocationsSchema = z
11
12
  .array(gameLocationSubLocationSchema)
12
13
  .max(MAX_GAME_LOCATION_SUB_LOCATIONS)
13
14
  .refine((subLocations) => new Set(subLocations).size === subLocations.length, {
14
15
  message: 'Each sub-location may appear only once.',
15
16
  });
16
- export const gameLocationMemoSchema = textFieldSchema(GAME_LOCATION_MEMO_INPUT_FORMAT);
17
+ export const gameLocationMemoSchema = textFieldSchema(GAME_LOCATION_MEMO_INPUT);
17
18
  export const GameLocationSchema = z.object({
18
19
  name: gameLocationNameSchema,
19
20
  streetAddress: gameLocationStreetAddressSchema,
@@ -1 +1 @@
1
- {"version":3,"file":"game-location.js","sourceRoot":"","sources":["../../src/doc-schemas/game-location.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EACL,+BAA+B,EAC/B,+BAA+B,EAC/B,yCAA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M,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,YAAY,CAAC;IACvD,gBAAgB,EAAE,WAAW;CAC9B,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { MAX_GAME_LOCATION_SUB_LOCATIONS } from '../constants/business.js';\nimport {\n GAME_LOCATION_MEMO_INPUT_FORMAT,\n GAME_LOCATION_NAME_INPUT_FORMAT,\n GAME_LOCATION_STREET_ADDRESS_INPUT_FORMAT,\n GAME_LOCATION_SUB_LOCATION_INPUT_FORMAT,\n} from '../input-formats/input-formats.js';\nimport { countSchema, documentIdSegmentSchema, epochMsSchema, textFieldSchema } from './atoms.js';\nimport { pictureIdSchema } from './gallery.js';\n\nexport const gameLocationIdSchema = documentIdSegmentSchema;\n\nexport const gameLocationNameSchema = textFieldSchema(GAME_LOCATION_NAME_INPUT_FORMAT);\nexport const gameLocationStreetAddressSchema = textFieldSchema(\n GAME_LOCATION_STREET_ADDRESS_INPUT_FORMAT,\n);\nexport const gameLocationSubLocationSchema = textFieldSchema(\n GAME_LOCATION_SUB_LOCATION_INPUT_FORMAT,\n);\nexport const gameLocationSubLocationsSchema = z\n .array(gameLocationSubLocationSchema)\n .max(MAX_GAME_LOCATION_SUB_LOCATIONS)\n .refine((subLocations) => new Set(subLocations).size === subLocations.length, {\n message: 'Each sub-location may appear only once.',\n });\nexport const gameLocationMemoSchema = textFieldSchema(GAME_LOCATION_MEMO_INPUT_FORMAT);\n\nexport const GameLocationSchema = z.object({\n name: gameLocationNameSchema,\n streetAddress: gameLocationStreetAddressSchema,\n subLocations: gameLocationSubLocationsSchema,\n // An empty memo is stored as no memo.\n memo: gameLocationMemoSchema.pipe(z.string().min(1)).optional(),\n pictureId: pictureIdSchema.optional(),\n createdAt: epochMsSchema,\n updatedAt: epochMsSchema,\n});\nexport type GameLocation = z.infer<typeof GameLocationSchema>;\n\n// `_serverData/gameLocationRegistry` — the write fence of the venue cap (RULE-STD-BACKEND-116):\n// only its changing matters.\nexport const GameLocationRegistrySchema = z.strictObject({\n locationRevision: countSchema,\n});\nexport type GameLocationRegistry = z.infer<typeof GameLocationRegistrySchema>;\n"]}
1
+ {"version":3,"file":"game-location.js","sourceRoot":"","sources":["../../src/doc-schemas/game-location.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACxB,kCAAkC,EAClC,gCAAgC,GACjC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,CAAC,MAAM,oBAAoB,GAAG,uBAAuB,CAAC;AAE5D,MAAM,CAAC,MAAM,sBAAsB,GAAG,eAAe,CAAC,wBAAwB,CAAC,CAAC;AAChF,MAAM,CAAC,MAAM,+BAA+B,GAAG,eAAe,CAAC,kCAAkC,CAAC,CAAC;AACnG,MAAM,CAAC,MAAM,6BAA6B,GAAG,eAAe,CAAC,gCAAgC,CAAC,CAAC;AAC/F,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC;KAC5C,KAAK,CAAC,6BAA6B,CAAC;KACpC,GAAG,CAAC,+BAA+B,CAAC;KACpC,MAAM,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,YAAY,CAAC,CAAC,IAAI,KAAK,YAAY,CAAC,MAAM,EAAE;IAC5E,OAAO,EAAE,yCAAyC;CACnD,CAAC,CAAC;AACL,MAAM,CAAC,MAAM,sBAAsB,GAAG,eAAe,CAAC,wBAAwB,CAAC,CAAC;AAEhF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,sBAAsB;IAC5B,aAAa,EAAE,+BAA+B;IAC9C,YAAY,EAAE,8BAA8B;IAC5C,sCAAsC;IACtC,IAAI,EAAE,sBAAsB,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC/D,SAAS,EAAE,eAAe,CAAC,QAAQ,EAAE;IACrC,SAAS,EAAE,aAAa;IACxB,SAAS,EAAE,aAAa;CACzB,CAAC,CAAC;AAGH,gGAAgG;AAChG,6BAA6B;AAC7B,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,YAAY,CAAC;IACvD,gBAAgB,EAAE,WAAW;CAC9B,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { MAX_GAME_LOCATION_SUB_LOCATIONS } from '../constants/business.js';\nimport {\n GAME_LOCATION_MEMO_INPUT,\n GAME_LOCATION_NAME_INPUT,\n GAME_LOCATION_STREET_ADDRESS_INPUT,\n GAME_LOCATION_SUB_LOCATION_INPUT,\n} from '../constants/text-fields.js';\nimport { countSchema, documentIdSegmentSchema, epochMsSchema } from './atoms.js';\nimport { textFieldSchema } from '../schemas/text-field.js';\nimport { pictureIdSchema } from './gallery.js';\n\nexport const gameLocationIdSchema = documentIdSegmentSchema;\n\nexport const gameLocationNameSchema = textFieldSchema(GAME_LOCATION_NAME_INPUT);\nexport const gameLocationStreetAddressSchema = textFieldSchema(GAME_LOCATION_STREET_ADDRESS_INPUT);\nexport const gameLocationSubLocationSchema = textFieldSchema(GAME_LOCATION_SUB_LOCATION_INPUT);\nexport const gameLocationSubLocationsSchema = z\n .array(gameLocationSubLocationSchema)\n .max(MAX_GAME_LOCATION_SUB_LOCATIONS)\n .refine((subLocations) => new Set(subLocations).size === subLocations.length, {\n message: 'Each sub-location may appear only once.',\n });\nexport const gameLocationMemoSchema = textFieldSchema(GAME_LOCATION_MEMO_INPUT);\n\nexport const GameLocationSchema = z.object({\n name: gameLocationNameSchema,\n streetAddress: gameLocationStreetAddressSchema,\n subLocations: gameLocationSubLocationsSchema,\n // An empty memo is stored as no memo.\n memo: gameLocationMemoSchema.pipe(z.string().min(1)).optional(),\n pictureId: pictureIdSchema.optional(),\n createdAt: epochMsSchema,\n updatedAt: epochMsSchema,\n});\nexport type GameLocation = z.infer<typeof GameLocationSchema>;\n\n// `_serverData/gameLocationRegistry` — the write fence of the venue cap (RULE-STD-BACKEND-116):\n// only its changing matters.\nexport const GameLocationRegistrySchema = z.strictObject({\n locationRevision: countSchema,\n});\nexport type GameLocationRegistry = z.infer<typeof GameLocationRegistrySchema>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"league-team.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/league-team.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoB3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,uBAAuB;;;;iBAIlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
1
+ {"version":3,"file":"league-team.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/league-team.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoB3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,uBAAuB;;;;iBAIlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -1,10 +1,11 @@
1
1
  import { z } from 'zod';
2
- import { CONTACT_PHONE_INPUT_FORMAT, TEAM_NAME_INPUT_FORMAT, } from '../input-formats/input-formats.js';
3
- import { countSchema, epochMsSchema, leagueIdSchema, teamIconSchema, teamTypeSchema, textFieldSchema, userIdSchema, } from './atoms.js';
2
+ import { CONTACT_PHONE_INPUT, TEAM_NAME_INPUT } from '../constants/text-fields.js';
3
+ import { countSchema, epochMsSchema, leagueIdSchema, teamIconSchema, teamTypeSchema, userIdSchema, } from './atoms.js';
4
+ import { textFieldSchema } from '../schemas/text-field.js';
4
5
  import { PlayerSeasonStatsSchema, TeamSeasonStatsSchema } from './aggregate-stats.js';
5
6
  import { GallerySummarySchema } from './gallery.js';
6
7
  export const LeagueTeamSchema = z.object({
7
- name: textFieldSchema(TEAM_NAME_INPUT_FORMAT),
8
+ name: textFieldSchema(TEAM_NAME_INPUT),
8
9
  icon: teamIconSchema,
9
10
  leagueId: leagueIdSchema,
10
11
  teamType: teamTypeSchema.optional(),
@@ -26,7 +27,7 @@ export const LeagueTeamSchema = z.object({
26
27
  });
27
28
  export const LeagueTeamContactSchema = z.object({
28
29
  leagueId: leagueIdSchema,
29
- contactPhone: textFieldSchema(CONTACT_PHONE_INPUT_FORMAT),
30
+ contactPhone: textFieldSchema(CONTACT_PHONE_INPUT),
30
31
  updatedAt: epochMsSchema,
31
32
  });
32
33
  //# sourceMappingURL=league-team.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"league-team.js","s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,CAAC;IACzD,SAAS,EAAE,aAAa;CACzB,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport {\n CONTACT_PHONE_INPUT_FORMAT,\n TEAM_NAME_INPUT_FORMAT,\n} from '../input-formats/input-formats.js';\nimport {\n countSchema,\n epochMsSchema,\n leagueIdSchema,\n teamIconSchema,\n teamTypeSchema,\n textFieldSchema,\n userIdSchema,\n} from './atoms.js';\nimport { PlayerSeasonStatsSchema, TeamSeasonStatsSchema } from './aggregate-stats.js';\nimport { GallerySummarySchema } from './gallery.js';\n\nexport const LeagueTeamSchema = z.object({\n name: textFieldSchema(TEAM_NAME_INPUT_FORMAT),\n icon: teamIconSchema,\n leagueId: leagueIdSchema,\n teamType: teamTypeSchema.optional(),\n createdByUserId: userIdSchema,\n seasonStats: TeamSeasonStatsSchema.optional(),\n playerSeasonStats: z.record(userIdSchema, PlayerSeasonStatsSchema).optional(),\n pictures: GallerySummarySchema.optional(),\n // Only its changing matters: the write fence between membership changes and roster seeding\n // (RULE-STD-BACKEND-116).\n membershipRevision: countSchema.optional(),\n // Only its changing matters: the write fence between competing invitations, join requests, and\n // membership doors (RULE-STD-BACKEND-116).\n joinRevision: countSchema.optional(),\n // Only its changing matters: the write fence between game creation and the team's deletion\n // (RULE-STD-BACKEND-116).\n scheduleRevision: countSchema.optional(),\n createdAt: epochMsSchema,\n updatedAt: epochMsSchema,\n});\nexport type LeagueTeam = z.infer<typeof LeagueTeamSchema>;\n\nexport const LeagueTeamContactSchema = z.object({\n leagueId: leagueIdSchema,\n contactPhone: textFieldSchema(CONTACT_PHONE_INPUT_FORMAT),\n updatedAt: epochMsSchema,\n});\nexport type LeagueTeamContact = z.infer<typeof LeagueTeamContactSchema>;\n"]}
1
+ {"version":3,"file":"league-team.js","sourceRoot":"","sources":["../../src/doc-schemas/league-team.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,eAAe,EA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_INPUT } from '../constants/text-fields.js';\nimport {\n countSchema,\n epochMsSchema,\n leagueIdSchema,\n teamIconSchema,\n teamTypeSchema,\n userIdSchema,\n} from './atoms.js';\nimport { textFieldSchema } from '../schemas/text-field.js';\nimport { PlayerSeasonStatsSchema, TeamSeasonStatsSchema } from './aggregate-stats.js';\nimport { GallerySummarySchema } from './gallery.js';\n\nexport const LeagueTeamSchema = z.object({\n name: textFieldSchema(TEAM_NAME_INPUT),\n icon: teamIconSchema,\n leagueId: leagueIdSchema,\n teamType: teamTypeSchema.optional(),\n createdByUserId: userIdSchema,\n seasonStats: TeamSeasonStatsSchema.optional(),\n playerSeasonStats: z.record(userIdSchema, PlayerSeasonStatsSchema).optional(),\n pictures: GallerySummarySchema.optional(),\n // Only its changing matters: the write fence between membership changes and roster seeding\n // (RULE-STD-BACKEND-116).\n membershipRevision: countSchema.optional(),\n // Only its changing matters: the write fence between competing invitations, join requests, and\n // membership doors (RULE-STD-BACKEND-116).\n joinRevision: countSchema.optional(),\n // Only its changing matters: the write fence between game creation and the team's deletion\n // (RULE-STD-BACKEND-116).\n scheduleRevision: countSchema.optional(),\n createdAt: epochMsSchema,\n updatedAt: epochMsSchema,\n});\nexport type LeagueTeam = z.infer<typeof LeagueTeamSchema>;\n\nexport const LeagueTeamContactSchema = z.object({\n leagueId: leagueIdSchema,\n contactPhone: textFieldSchema(CONTACT_PHONE_INPUT),\n updatedAt: epochMsSchema,\n});\nexport type LeagueTeamContact = z.infer<typeof LeagueTeamContactSchema>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"migration-console.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/migration-console.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmBxB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAmC,CAAC;AAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAKnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAMrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAMjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -1,12 +1,13 @@
1
1
  import { z } from 'zod';
2
- import { MIGRATION_EVIDENCE_INPUT_FORMAT } from '../input-formats/input-formats.js';
2
+ import { MIGRATION_EVIDENCE_INPUT } from '../constants/text-fields.js';
3
3
  import { MIGRATION_ACTION_ID_KEYS } from '../migration-console/action-ids.js';
4
4
  import { MAX_MIGRATION_FINDING_TEXT_LENGTH, MAX_MIGRATION_RUN_FINDINGS, MIGRATION_DESTINATION_STATE_KEYS, MIGRATION_RUN_STATUS_KEYS, } from '../migration-console/run-state.js';
5
- import { countSchema, documentIdSegmentSchema, epochMsSchema, repairReasonSchema, statsOperationIdSchema, textFieldSchema, userIdSchema, } from './atoms.js';
5
+ import { countSchema, documentIdSegmentSchema, epochMsSchema, repairReasonSchema, statsOperationIdSchema, userIdSchema, } from './atoms.js';
6
+ import { textFieldSchema } from '../schemas/text-field.js';
6
7
  export const migrationActionIdSchema = z.enum(MIGRATION_ACTION_ID_KEYS);
7
8
  export const migrationDestinationStateSchema = z.enum(MIGRATION_DESTINATION_STATE_KEYS);
8
9
  export const migrationOperationIdSchema = documentIdSegmentSchema;
9
- export const migrationEvidenceSchema = textFieldSchema(MIGRATION_EVIDENCE_INPUT_FORMAT);
10
+ export const migrationEvidenceSchema = textFieldSchema(MIGRATION_EVIDENCE_INPUT);
10
11
  const findingText = z.string().max(MAX_MIGRATION_FINDING_TEXT_LENGTH);
11
12
  export const MigrationFindingSchema = z.strictObject({
12
13
  category: z.string().min(1).max(64),
@@ -1 +1 @@
1
- {"version":3,"file":"migration-console.js","sourceRoot":"","sources":["../../src/doc-schemas/migration-console.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EACL,iCAAiC,EACjC,0BAA0B,EAC1B,gCAAgC,EAChC,yBAAyB,GAC1B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,WAAW,EACX,uBAAuB,EACvB,aAAa,EACb,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,YAAY,GACb,MAAM,YAAY,CAAC;AAEpB,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;AACxE,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;AACxF,MAAM,CAAC,MAAM,0BAA0B,GAAG,uBAAuB,CAAC;AAClE,MAAM,CAAC,MAAM,uBAAuB,GAAG,eAAe,CAAC,+BAA+B,CAAC,CAAC;AAExF,MAAM,WAAW,G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MAT } from '../input-formats/input-formats.js';\nimport { MIGRATION_ACTION_ID_KEYS } from '../migration-console/action-ids.js';\nimport {\n MAX_MIGRATION_FINDING_TEXT_LENGTH,\n MAX_MIGRATION_RUN_FINDINGS,\n MIGRATION_DESTINATION_STATE_KEYS,\n MIGRATION_RUN_STATUS_KEYS,\n} from '../migration-console/run-state.js';\nimport {\n countSchema,\n documentIdSegmentSchema,\n epochMsSchema,\n repairReasonSchema,\n statsOperationIdSchema,\n textFieldSchema,\n userIdSchema,\n} from './atoms.js';\n\nexport const migrationActionIdSchema = z.enum(MIGRATION_ACTION_ID_KEYS);\nexport const migrationDestinationStateSchema = z.enum(MIGRATION_DESTINATION_STATE_KEYS);\nexport const migrationOperationIdSchema = documentIdSegmentSchema;\nexport const migrationEvidenceSchema = textFieldSchema(MIGRATION_EVIDENCE_INPUT_FORMAT);\n\nconst findingText = z.string().max(MAX_MIGRATION_FINDING_TEXT_LENGTH);\n\nexport const MigrationFindingSchema = z.strictObject({\n category: z.string().min(1).max(64),\n id: findingText,\n field: findingText,\n reason: findingText,\n});\nexport type MigrationFinding = z.infer<typeof MigrationFindingSchema>;\n\nexport const MigrationRunCountsSchema = z.strictObject({\n read: countSchema,\n written: countSchema,\n skipped: countSchema,\n checked: countSchema,\n missing: countSchema,\n mismatched: countSchema,\n});\nexport type MigrationRunCounts = z.infer<typeof MigrationRunCountsSchema>;\n\nexport const MigrationRunRecordSchema = z.strictObject({\n operationId: migrationOperationIdSchema,\n dryRun: z.boolean(),\n reason: repairReasonSchema,\n startedByUserId: userIdSchema,\n startedAt: epochMsSchema,\n updatedAt: epochMsSchema,\n completedAt: epochMsSchema.optional(),\n status: z.enum(MIGRATION_RUN_STATUS_KEYS),\n pages: countSchema,\n nextResumeAfter: z.string().min(1).nullable(),\n counts: MigrationRunCountsSchema,\n details: z.record(z.string().min(1), countSchema),\n findings: z.array(MigrationFindingSchema).max(MAX_MIGRATION_RUN_FINDINGS),\n findingsNotKept: countSchema,\n expectEmptySource: z.boolean(),\n acknowledgeUnexaminedSources: z.boolean().optional(),\n stoppedReason: findingText.optional(),\n});\nexport type MigrationRunRecord = z.infer<typeof MigrationRunRecordSchema>;\n\nexport const MigrationStepRecordSchema = z.strictObject({\n recordedAt: epochMsSchema,\n recordedByUserId: userIdSchema,\n operationIds: z.array(statsOperationIdSchema).optional(),\n evidence: migrationEvidenceSchema,\n});\nexport type MigrationStepRecord = z.infer<typeof MigrationStepRecordSchema>;\n\nexport const MigrationActionRunSchema = z.strictObject({\n actionId: migrationActionIdSchema,\n run: MigrationRunRecordSchema.optional(),\n preview: MigrationRunRecordSchema.optional(),\n recorded: MigrationStepRecordSchema.optional(),\n});\nexport type MigrationActionRun = z.infer<typeof MigrationActionRunSchema>;\n\nexport const MigrationConsoleLockSchema = z.strictObject({\n actionId: migrationActionIdSchema,\n operationId: migrationOperationIdSchema,\n heldByUserId: userIdSchema,\n expiresAt: epochMsSchema,\n pageClaimedAt: epochMsSchema.optional(),\n});\nexport type MigrationConsoleLock = z.infer<typeof MigrationConsoleLockSchema>;\n\nexport const MigrationConsoleSchema = z.strictObject({\n destinationState: migrationDestinationStateSchema,\n cutoverRecordedAt: epochMsSchema.optional(),\n cutoverRecordedByUserId: userIdSchema.optional(),\n lock: MigrationConsoleLockSchema.nullable(),\n updatedAt: epochMsSchema,\n});\nexport type MigrationConsole = z.infer<typeof MigrationConsoleSchema>;\n"]}
1
+ {"version":3,"file":"migration-console.js","sourceRoot":"","sources":["../../src/doc-schemas/migration-console.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EACL,iCAAiC,EACjC,0BAA0B,EAC1B,gCAAgC,EAChC,yBAAyB,GAC1B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,WAAW,EACX,uB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A0B;IACvC,YAAY,EAAE,YAAY;IAC1B,SAAS,EAAE,aAAa;IACxB,aAAa,EAAE,aAAa,CAAC,QAAQ,EAAE;CACxC,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,YAAY,CAAC;IACnD,gBAAgB,EAAE,+BAA+B;IACjD,iBAAiB,EAAE,aAAa,CAAC,QAAQ,EAAE;IAC3C,uBAAuB,EAAE,YAAY,CAAC,QAAQ,EAAE;IAChD,IAAI,EAAE,0BAA0B,CAAC,QAAQ,EAAE;IAC3C,SAAS,EAAE,aAAa;CACzB,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { MIGRATION_EVIDENCE_INPUT } from '../constants/text-fields.js';\nimport { MIGRATION_ACTION_ID_KEYS } from '../migration-console/action-ids.js';\nimport {\n MAX_MIGRATION_FINDING_TEXT_LENGTH,\n MAX_MIGRATION_RUN_FINDINGS,\n MIGRATION_DESTINATION_STATE_KEYS,\n MIGRATION_RUN_STATUS_KEYS,\n} from '../migration-console/run-state.js';\nimport {\n countSchema,\n documentIdSegmentSchema,\n epochMsSchema,\n repairReasonSchema,\n statsOperationIdSchema,\n userIdSchema,\n} from './atoms.js';\nimport { textFieldSchema } from '../schemas/text-field.js';\n\nexport const migrationActionIdSchema = z.enum(MIGRATION_ACTION_ID_KEYS);\nexport const migrationDestinationStateSchema = z.enum(MIGRATION_DESTINATION_STATE_KEYS);\nexport const migrationOperationIdSchema = documentIdSegmentSchema;\nexport const migrationEvidenceSchema = textFieldSchema(MIGRATION_EVIDENCE_INPUT);\n\nconst findingText = z.string().max(MAX_MIGRATION_FINDING_TEXT_LENGTH);\n\nexport const MigrationFindingSchema = z.strictObject({\n category: z.string().min(1).max(64),\n id: findingText,\n field: findingText,\n reason: findingText,\n});\nexport type MigrationFinding = z.infer<typeof MigrationFindingSchema>;\n\nexport const MigrationRunCountsSchema = z.strictObject({\n read: countSchema,\n written: countSchema,\n skipped: countSchema,\n checked: countSchema,\n missing: countSchema,\n mismatched: countSchema,\n});\nexport type MigrationRunCounts = z.infer<typeof MigrationRunCountsSchema>;\n\nexport const MigrationRunRecordSchema = z.strictObject({\n operationId: migrationOperationIdSchema,\n dryRun: z.boolean(),\n reason: repairReasonSchema,\n startedByUserId: userIdSchema,\n startedAt: epochMsSchema,\n updatedAt: epochMsSchema,\n completedAt: epochMsSchema.optional(),\n status: z.enum(MIGRATION_RUN_STATUS_KEYS),\n pages: countSchema,\n nextResumeAfter: z.string().min(1).nullable(),\n counts: MigrationRunCountsSchema,\n details: z.record(z.string().min(1), countSchema),\n findings: z.array(MigrationFindingSchema).max(MAX_MIGRATION_RUN_FINDINGS),\n findingsNotKept: countSchema,\n expectEmptySource: z.boolean(),\n acknowledgeUnexaminedSources: z.boolean().optional(),\n stoppedReason: findingText.optional(),\n});\nexport type MigrationRunRecord = z.infer<typeof MigrationRunRecordSchema>;\n\nexport const MigrationStepRecordSchema = z.strictObject({\n recordedAt: epochMsSchema,\n recordedByUserId: userIdSchema,\n operationIds: z.array(statsOperationIdSchema).optional(),\n evidence: migrationEvidenceSchema,\n});\nexport type MigrationStepRecord = z.infer<typeof MigrationStepRecordSchema>;\n\nexport const MigrationActionRunSchema = z.strictObject({\n actionId: migrationActionIdSchema,\n run: MigrationRunRecordSchema.optional(),\n preview: MigrationRunRecordSchema.optional(),\n recorded: MigrationStepRecordSchema.optional(),\n});\nexport type MigrationActionRun = z.infer<typeof MigrationActionRunSchema>;\n\nexport const MigrationConsoleLockSchema = z.strictObject({\n actionId: migrationActionIdSchema,\n operationId: migrationOperationIdSchema,\n heldByUserId: userIdSchema,\n expiresAt: epochMsSchema,\n pageClaimedAt: epochMsSchema.optional(),\n});\nexport type MigrationConsoleLock = z.infer<typeof MigrationConsoleLockSchema>;\n\nexport const MigrationConsoleSchema = z.strictObject({\n destinationState: migrationDestinationStateSchema,\n cutoverRecordedAt: epochMsSchema.optional(),\n cutoverRecordedByUserId: userIdSchema.optional(),\n lock: MigrationConsoleLockSchema.nullable(),\n updatedAt: epochMsSchema,\n});\nexport type MigrationConsole = z.infer<typeof MigrationConsoleSchema>;\n"]}
@@ -410,7 +410,6 @@ export declare const COLLECTION_SCHEMAS: {
410
410
  memos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
411
411
  absentRosterPlayerIds: z.ZodArray<z.ZodString>;
412
412
  nonScoringRosterPlayerIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
413
- statsOperationId: z.ZodOptional<z.ZodString>;
414
413
  finalizedAt: z.ZodOptional<z.ZodNumber>;
415
414
  reopenedAt: z.ZodOptional<z.ZodNumber>;
416
415
  createdAt: z.ZodNumber;
@@ -450,7 +449,6 @@ export declare const COLLECTION_SCHEMAS: {
450
449
  memos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
451
450
  absentRosterPlayerIds: z.ZodArray<z.ZodString>;
452
451
  nonScoringRosterPlayerIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
453
- statsOperationId: z.ZodOptional<z.ZodString>;
454
452
  finalizedAt: z.ZodOptional<z.ZodNumber>;
455
453
  reopenedAt: z.ZodOptional<z.ZodNumber>;
456
454
  createdAt: z.ZodNumber;
@@ -489,7 +487,6 @@ export declare const COLLECTION_SCHEMAS: {
489
487
  memos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
490
488
  absentRosterPlayerIds: z.ZodArray<z.ZodString>;
491
489
  nonScoringRosterPlayerIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
492
- statsOperationId: z.ZodOptional<z.ZodString>;
493
490
  finalizedAt: z.ZodOptional<z.ZodNumber>;
494
491
  reopenedAt: z.ZodOptional<z.ZodNumber>;
495
492
  createdAt: z.ZodNumber;
@@ -1320,7 +1317,6 @@ export declare const COLLECTION_SCHEMAS: {
1320
1317
  finalRecordMissing: "finalRecordMissing";
1321
1318
  finalRecordMismatch: "finalRecordMismatch";
1322
1319
  participationSnapshotMismatch: "participationSnapshotMismatch";
1323
- gameHeld: "gameHeld";
1324
1320
  aggregateMismatch: "aggregateMismatch";
1325
1321
  aggregateEntryStale: "aggregateEntryStale";
1326
1322
  aggregateEntryMissing: "aggregateEntryMissing";
@@ -1345,7 +1341,6 @@ export declare const COLLECTION_SCHEMAS: {
1345
1341
  finalRecordMissing: "finalRecordMissing";
1346
1342
  finalRecordMismatch: "finalRecordMismatch";
1347
1343
  participationSnapshotMismatch: "participationSnapshotMismatch";
1348
- gameHeld: "gameHeld";
1349
1344
  aggregateMismatch: "aggregateMismatch";
1350
1345
  aggregateEntryStale: "aggregateEntryStale";
1351
1346
  aggregateEntryMissing: "aggregateEntryMissing";
@@ -1518,75 +1513,6 @@ export declare const COLLECTION_SCHEMAS: {
1518
1513
  changed: z.ZodNumber;
1519
1514
  skipped: z.ZodNumber;
1520
1515
  }, z.core.$strict>;
1521
- }, z.core.$strict>, z.ZodObject<{
1522
- kind: z.ZodLiteral<"ghostPlayerStats">;
1523
- scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
1524
- action: z.ZodLiteral<"link">;
1525
- teamId: z.ZodString;
1526
- ghostUserId: z.ZodString;
1527
- userId: z.ZodString;
1528
- }, z.core.$strict>, z.ZodObject<{
1529
- action: z.ZodLiteral<"removal">;
1530
- teamId: z.ZodString;
1531
- ghostUserId: z.ZodString;
1532
- }, z.core.$strict>], "action">;
1533
- reason: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
1534
- removedFinishedGameEntries: z.ZodOptional<z.ZodArray<z.ZodObject<{
1535
- gameId: z.ZodString;
1536
- wasAbsent: z.ZodBoolean;
1537
- wasNonScoring: z.ZodBoolean;
1538
- }, z.core.$strict>>>;
1539
- removedOpenGameIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1540
- linkedGames: z.ZodOptional<z.ZodArray<z.ZodObject<{
1541
- gameId: z.ZodString;
1542
- completed: z.ZodBoolean;
1543
- merged: z.ZodBoolean;
1544
- }, z.core.$strict>>>;
1545
- destinationChanges: z.ZodOptional<z.ZodArray<z.ZodObject<{
1546
- ref: z.ZodString;
1547
- field: z.ZodString;
1548
- before: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1549
- after: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1550
- }, z.core.$strict>>>;
1551
- membershipOutcome: z.ZodOptional<z.ZodEnum<{
1552
- handedOver: "handedOver";
1553
- created: "created";
1554
- merged: "merged";
1555
- kept: "kept";
1556
- }>>;
1557
- startedByUserId: z.ZodString;
1558
- startedAt: z.ZodNumber;
1559
- updatedAt: z.ZodNumber;
1560
- status: z.ZodEnum<{
1561
- running: "running";
1562
- complete: "complete";
1563
- stopped: "stopped";
1564
- }>;
1565
- resumeAfter: z.ZodOptional<z.ZodString>;
1566
- counts: z.ZodObject<{
1567
- read: z.ZodNumber;
1568
- changed: z.ZodNumber;
1569
- skipped: z.ZodNumber;
1570
- }, z.core.$strict>;
1571
- }, z.core.$strict>, z.ZodObject<{
1572
- kind: z.ZodLiteral<"gameDeletion">;
1573
- scope: z.ZodObject<{
1574
- gameId: z.ZodString;
1575
- }, z.core.$strict>;
1576
- startedByUserId: z.ZodString;
1577
- startedAt: z.ZodNumber;
1578
- updatedAt: z.ZodNumber;
1579
- status: z.ZodEnum<{
1580
- running: "running";
1581
- complete: "complete";
1582
- stopped: "stopped";
1583
- }>;
1584
- resumeAfter: z.ZodOptional<z.ZodString>;
1585
- counts: z.ZodObject<{
1586
- read: z.ZodNumber;
1587
- changed: z.ZodNumber;
1588
- skipped: z.ZodNumber;
1589
- }, z.core.$strict>;
1590
1516
  }, z.core.$strict>], "kind">;
1591
1517
  readonly 'galleryPictures/{pictureId}': z.ZodObject<{
1592
1518
  ownerKind: z.ZodEnum<{
@@ -2614,7 +2540,6 @@ export declare const COLLECTION_SCHEMAS: {
2614
2540
  "teamMembership.removed": "teamMembership.removed";
2615
2541
  "ghostPlayer.removed": "ghostPlayer.removed";
2616
2542
  "ghostPlayer.closedLeagueLinked": "ghostPlayer.closedLeagueLinked";
2617
- "ghostPlayer.removalStopped": "ghostPlayer.removalStopped";
2618
2543
  "teamInvitation.created": "teamInvitation.created";
2619
2544
  "teamInvitation.accepted": "teamInvitation.accepted";
2620
2545
  "teamInvitation.rejected": "teamInvitation.rejected";
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkD7B,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0DkB,CAAC;AAElD,MAAM,MAAM,wBAAwB,GAAG,MAAM,OAAO,kBAAkB,CAAC;AAEvE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;CAciC,CAAC;AAEvE,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAAO,CAAC"}
@@ -76,7 +76,6 @@ export declare const BasketballGameSchema: z.ZodObject<{
76
76
  memos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
77
77
  absentRosterPlayerIds: z.ZodArray<z.ZodString>;
78
78
  nonScoringRosterPlayerIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
79
- statsOperationId: z.ZodOptional<z.ZodString>;
80
79
  finalizedAt: z.ZodOptional<z.ZodNumber>;
81
80
  reopenedAt: z.ZodOptional<z.ZodNumber>;
82
81
  createdAt: z.ZodNumber;
@@ -118,7 +117,6 @@ export declare const CurlingGameSchema: z.ZodObject<{
118
117
  memos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
119
118
  absentRosterPlayerIds: z.ZodArray<z.ZodString>;
120
119
  nonScoringRosterPlayerIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
121
- statsOperationId: z.ZodOptional<z.ZodString>;
122
120
  finalizedAt: z.ZodOptional<z.ZodNumber>;
123
121
  reopenedAt: z.ZodOptional<z.ZodNumber>;
124
122
  createdAt: z.ZodNumber;
@@ -159,7 +157,6 @@ export declare const FootballGameSchema: z.ZodObject<{
159
157
  memos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
160
158
  absentRosterPlayerIds: z.ZodArray<z.ZodString>;
161
159
  nonScoringRosterPlayerIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
162
- statsOperationId: z.ZodOptional<z.ZodString>;
163
160
  finalizedAt: z.ZodOptional<z.ZodNumber>;
164
161
  reopenedAt: z.ZodOptional<z.ZodNumber>;
165
162
  createdAt: z.ZodNumber;
@@ -207,7 +204,6 @@ export declare const SportGameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
207
204
  memos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
208
205
  absentRosterPlayerIds: z.ZodArray<z.ZodString>;
209
206
  nonScoringRosterPlayerIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
210
- statsOperationId: z.ZodOptional<z.ZodString>;
211
207
  finalizedAt: z.ZodOptional<z.ZodNumber>;
212
208
  reopenedAt: z.ZodOptional<z.ZodNumber>;
213
209
  createdAt: z.ZodNumber;
@@ -247,7 +243,6 @@ export declare const SportGameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
247
243
  memos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
248
244
  absentRosterPlayerIds: z.ZodArray<z.ZodString>;
249
245
  nonScoringRosterPlayerIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
250
- statsOperationId: z.ZodOptional<z.ZodString>;
251
246
  finalizedAt: z.ZodOptional<z.ZodNumber>;
252
247
  reopenedAt: z.ZodOptional<z.ZodNumber>;
253
248
  createdAt: z.ZodNumber;
@@ -286,7 +281,6 @@ export declare const SportGameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
286
281
  memos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
287
282
  absentRosterPlayerIds: z.ZodArray<z.ZodString>;
288
283
  nonScoringRosterPlayerIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
289
- statsOperationId: z.ZodOptional<z.ZodString>;
290
284
  finalizedAt: z.ZodOptional<z.ZodNumber>;
291
285
  reopenedAt: z.ZodOptional<z.ZodNumber>;
292
286
  createdAt: z.ZodNumber;
@@ -1 +1 @@
1
- {"version":3,"file":"sport-game.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/sport-game.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAmBrD,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;CAaa,CAAC;AAEnD,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,UAAU,CAAC,CAAC;AACtF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,OAAO,CAAC,C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AAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAI1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,sBAAsB;;;;;iBAKjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -1,9 +1,10 @@
1
1
  import { z } from 'zod';
2
2
  import { parseGameRosterPlayerId } from '../ids/compound-ids.js';
3
- import { GAME_MEMO_INPUT_FORMAT, SCHEDULE_WEEK_TITLE_INPUT_FORMAT, } from '../input-formats/input-formats.js';
3
+ import { GAME_MEMO_INPUT, SCHEDULE_WEEK_TITLE_INPUT } from '../constants/text-fields.js';
4
4
  import { SPORT_LINE_SCHEMAS } from './aggregate-stats.js';
5
5
  import { gameStatsSchema } from './game-stats.js';
6
- import { calendarDateSchema, countSchema, epochMsSchema, gameRosterPlayerIdSchema, gameStatusSchema, leagueIdSchema, scheduleWeekIdSchema, statsOperationIdSchema, teamIdSchema, textFieldSchema, userIdSchema, } from './atoms.js';
6
+ import { calendarDateSchema, countSchema, epochMsSchema, gameRosterPlayerIdSchema, gameStatusSchema, leagueIdSchema, scheduleWeekIdSchema, teamIdSchema, userIdSchema, } from './atoms.js';
7
+ import { textFieldSchema } from '../schemas/text-field.js';
7
8
  import { gameLocationIdSchema, gameLocationSubLocationSchema } from './game-location.js';
8
9
  // Spelled per sport so each payload keeps its exact type.
9
10
  export const SPORT_GAME_STATS_SCHEMAS = {
@@ -17,7 +18,7 @@ export const GameTeamSchema = z.object({
17
18
  const sportGameBase = {
18
19
  leagueId: leagueIdSchema,
19
20
  weekId: scheduleWeekIdSchema,
20
- weekTitle: textFieldSchema(SCHEDULE_WEEK_TITLE_INPUT_FORMAT),
21
+ weekTitle: textFieldSchema(SCHEDULE_WEEK_TITLE_INPUT),
21
22
  weekLocation: z.string(),
22
23
  weekStartDate: epochMsSchema,
23
24
  startTime: epochMsSchema,
@@ -30,10 +31,9 @@ const sportGameBase = {
30
31
  teamIds: z.array(teamIdSchema).min(1).max(2),
31
32
  score: z.record(teamIdSchema, countSchema),
32
33
  statEventSequence: countSchema,
33
- memos: z.record(z.string(), textFieldSchema(GAME_MEMO_INPUT_FORMAT)).optional(),
34
+ memos: z.record(z.string(), textFieldSchema(GAME_MEMO_INPUT)).optional(),
34
35
  absentRosterPlayerIds: z.array(gameRosterPlayerIdSchema),
35
36
  nonScoringRosterPlayerIds: z.array(gameRosterPlayerIdSchema).optional(),
36
- statsOperationId: statsOperationIdSchema.optional(),
37
37
  finalizedAt: epochMsSchema.optional(),
38
38
  reopenedAt: epochMsSchema.optional(),
39
39
  createdAt: epochMsSchema,
@@ -1 +1 @@
1
- {"version":3,"file":"sport-game.js","sourceRoot":"","sources":["../../src/doc-schemas/sport-game.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EACL,sBAAsB,EACtB,gCAAgC,GACjC,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,wBAAwB,EACxB,gBAAgB,EAChB,cAAc,EACd,oBAAoB,EACpB,sBAAsB,EACtB,YAAY,EACZ,eAAe,EACf,YAAY,GACb,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,o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B,GAAG,CAAC;KAClC,MAAM,CAAC;IACN,GAAG,aAAa;IAChB,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,YAAiC,CAAC;IACxD,KAAK,EAAE,wBAAwB,CAAC,UAAU;IAC1C,cAAc,EAAE,YAAY,CAAC,QAAQ,EAAE;CACxC,CAAC;KACD,MAAM,CAAC,kBAAkB,EAAE,eAAe,CAAC,CAAC;AAG/C,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC;KAC/B,MAAM,CAAC;IACN,GAAG,aAAa;IAChB,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,SAA8B,CAAC;IACrD,KAAK,EAAE,wBAAwB,CAAC,OAAO;CACxC,CAAC;KACD,MAAM,CAAC,kBAAkB,EAAE,eAAe,CAAC,CAAC;AAG/C,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC;KAChC,MAAM,CAAC;IACN,GAAG,aAAa;IAChB,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,UAA+B,CAAC;IACtD,KAAK,EAAE,wBAAwB,CAAC,QAAQ;CACzC,CAAC;KACD,MAAM,CAAC,kBAAkB,EAAE,eAAe,CAAC,CAAC;AAG/C,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,kBAAkB,CAAC,YAAY,EAAE;IAChE,oBAAoB;IACpB,iBAAiB;IACjB,kBAAkB;CACnB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,YAAY;IACpB,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,QAAQ,EAAE,aAAa;CACxB,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { parseGameRosterPlayerId } from '../ids/compound-ids.js';\nimport {\n GAME_MEMO_INPUT_FORMAT,\n SCHEDULE_WEEK_TITLE_INPUT_FORMAT,\n} from '../input-formats/input-formats.js';\nimport type { LeagueType } from '../types/sports.js';\nimport { SPORT_LINE_SCHEMAS } from './aggregate-stats.js';\nimport { gameStatsSchema } from './game-stats.js';\nimport {\n calendarDateSchema,\n countSchema,\n epochMsSchema,\n gameRosterPlayerIdSchema,\n gameStatusSchema,\n leagueIdSchema,\n scheduleWeekIdSchema,\n statsOperationIdSchema,\n teamIdSchema,\n textFieldSchema,\n userIdSchema,\n} from './atoms.js';\nimport { gameLocationIdSchema, gameLocationSubLocationSchema } from './game-location.js';\n\n// Spelled per sport so each payload keeps its exact type.\nexport const SPORT_GAME_STATS_SCHEMAS = {\n Basketball: gameStatsSchema(\n SPORT_LINE_SCHEMAS.Basketball.gameTeam,\n SPORT_LINE_SCHEMAS.Basketball.gamePlayer,\n ),\n Curling: gameStatsSchema(\n SPORT_LINE_SCHEMAS.Curling.gameTeam,\n SPORT_LINE_SCHEMAS.Curling.gamePlayer,\n ),\n Football: gameStatsSchema(\n SPORT_LINE_SCHEMAS.Football.gameTeam,\n SPORT_LINE_SCHEMAS.Football.gamePlayer,\n ),\n} as const satisfies Record<LeagueType, z.ZodType>;\n\nexport type BasketballGameStats = z.infer<typeof SPORT_GAME_STATS_SCHEMAS.Basketball>;\nexport type CurlingGameStats = z.infer<typeof SPORT_GAME_STATS_SCHEMAS.Curling>;\nexport type FootballGameStats = z.infer<typeof SPORT_GAME_STATS_SCHEMAS.Football>;\n\nexport type GameStats = z.infer<(typeof SPORT_GAME_STATS_SCHEMAS)[LeagueType]>;\n\nexport const GameTeamSchema = z.object({\n teamId: teamIdSchema,\n});\nexport type GameTeam = z.infer<typeof GameTeamSchema>;\n\nconst sportGameBase = {\n leagueId: leagueIdSchema,\n weekId: scheduleWeekIdSchema,\n weekTitle: textFieldSchema(SCHEDULE_WEEK_TITLE_INPUT_FORMAT),\n weekLocation: z.string(),\n weekStartDate: epochMsSchema,\n startTime: epochMsSchema,\n dayKey: calendarDateSchema,\n locationLabel: z.string(),\n gameLocationId: gameLocationIdSchema.optional(),\n subLocation: gameLocationSubLocationSchema.optional(),\n status: gameStatusSchema,\n teams: z.tuple([GameTeamSchema, GameTeamSchema]),\n teamIds: z.array(teamIdSchema).min(1).max(2),\n score: z.record(teamIdSchema, countSchema),\n statEventSequence: countSchema,\n memos: z.record(z.string(), textFieldSchema(GAME_MEMO_INPUT_FORMAT)).optional(),\n absentRosterPlayerIds: z.array(gameRosterPlayerIdSchema),\n nonScoringRosterPlayerIds: z.array(gameRosterPlayerIdSchema).optional(),\n statsOperationId: statsOperationIdSchema.optional(),\n finalizedAt: epochMsSchema.optional(),\n reopenedAt: epochMsSchema.optional(),\n createdAt: epochMsSchema,\n updatedAt: epochMsSchema,\n};\n\nfunction rollupMatchesTeams(game: {\n teamIds: string[];\n score: Record<string, number>;\n stats: { teamStats: Record<string, unknown>; playerStats: Record<string, unknown> };\n}): boolean {\n const teams = new Set(game.teamIds);\n const namesEveryTeam = (keys: string[]) =>\n keys.length === teams.size && keys.every((key) => teams.has(key));\n return (\n namesEveryTeam(Object.keys(game.stats.teamStats)) &&\n namesEveryTeam(Object.keys(game.score)) &&\n Object.keys(game.stats.playerStats).every((key) =>\n teams.has(parseGameRosterPlayerId(key)?.teamId ?? ''),\n )\n );\n}\nconst ROLLUP_MISMATCH = \"The stats rollup and score mirror hold exactly the game's teams.\";\n\nexport const BasketballGameSchema = z\n .object({\n ...sportGameBase,\n leagueType: z.literal('Basketball' satisfies LeagueType),\n stats: SPORT_GAME_STATS_SCHEMAS.Basketball,\n jumpBallTeamId: teamIdSchema.optional(),\n })\n .refine(rollupMatchesTeams, ROLLUP_MISMATCH);\nexport type BasketballGame = z.infer<typeof BasketballGameSchema>;\n\nexport const CurlingGameSchema = z\n .object({\n ...sportGameBase,\n leagueType: z.literal('Curling' satisfies LeagueType),\n stats: SPORT_GAME_STATS_SCHEMAS.Curling,\n })\n .refine(rollupMatchesTeams, ROLLUP_MISMATCH);\nexport type CurlingGame = z.infer<typeof CurlingGameSchema>;\n\nexport const FootballGameSchema = z\n .object({\n ...sportGameBase,\n leagueType: z.literal('Football' satisfies LeagueType),\n stats: SPORT_GAME_STATS_SCHEMAS.Football,\n })\n .refine(rollupMatchesTeams, ROLLUP_MISMATCH);\nexport type FootballGame = z.infer<typeof FootballGameSchema>;\n\nexport const SportGameSchema = z.discriminatedUnion('leagueType', [\n BasketballGameSchema,\n CurlingGameSchema,\n FootballGameSchema,\n]);\nexport type SportGame = z.infer<typeof SportGameSchema>;\n\nexport const GameRosterPlayerSchema = z.object({\n userId: userIdSchema,\n teamId: teamIdSchema,\n isGhost: z.boolean(),\n syncedAt: epochMsSchema,\n});\nexport type GameRosterPlayer = z.infer<typeof GameRosterPlayerSchema>;\n"]}
1
+ {"version":3,"file":"sport-game.js","sourceRoot":"","sources":["../../src/doc-schemas/sport-game.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAEzF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,wBAAwB,EACxB,gBAAgB,EAChB,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,YAAY,GACb,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAEzF,0DAA0D;AAC1D,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,UAAU,EAAE,eAAe,CACzB,kBAAkB,CAAC,UAAU,CAAC,QAAQ,EACtC,kBAAkB,CAAC,UAAU,CAAC,UAAU,CACzC;IACD,OAAO,EAAE,eAAe,CACtB,kBAAkB,CAAC,OAAO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;IACN,GAAG,aAAa;IAChB,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,SAA8B,CAAC;IACrD,KAAK,EAAE,wBAAwB,CAAC,OAAO;CACxC,CAAC;KACD,MAAM,CAAC,kBAAkB,EAAE,eAAe,CAAC,CAAC;AAG/C,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC;KAChC,MAAM,CAAC;IACN,GAAG,aAAa;IAChB,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,UAA+B,CAAC;IACtD,KAAK,EAAE,wBAAwB,CAAC,QAAQ;CACzC,CAAC;KACD,MAAM,CAAC,kBAAkB,EAAE,eAAe,CAAC,CAAC;AAG/C,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,kBAAkB,CAAC,YAAY,EAAE;IAChE,oBAAoB;IACpB,iBAAiB;IACjB,kBAAkB;CACnB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,YAAY;IACpB,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,QAAQ,EAAE,aAAa;CACxB,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { parseGameRosterPlayerId } from '../ids/compound-ids.js';\nimport { GAME_MEMO_INPUT, SCHEDULE_WEEK_TITLE_INPUT } from '../constants/text-fields.js';\nimport type { LeagueType } from '../types/sports.js';\nimport { SPORT_LINE_SCHEMAS } from './aggregate-stats.js';\nimport { gameStatsSchema } from './game-stats.js';\nimport {\n calendarDateSchema,\n countSchema,\n epochMsSchema,\n gameRosterPlayerIdSchema,\n gameStatusSchema,\n leagueIdSchema,\n scheduleWeekIdSchema,\n teamIdSchema,\n userIdSchema,\n} from './atoms.js';\nimport { textFieldSchema } from '../schemas/text-field.js';\nimport { gameLocationIdSchema, gameLocationSubLocationSchema } from './game-location.js';\n\n// Spelled per sport so each payload keeps its exact type.\nexport const SPORT_GAME_STATS_SCHEMAS = {\n Basketball: gameStatsSchema(\n SPORT_LINE_SCHEMAS.Basketball.gameTeam,\n SPORT_LINE_SCHEMAS.Basketball.gamePlayer,\n ),\n Curling: gameStatsSchema(\n SPORT_LINE_SCHEMAS.Curling.gameTeam,\n SPORT_LINE_SCHEMAS.Curling.gamePlayer,\n ),\n Football: gameStatsSchema(\n SPORT_LINE_SCHEMAS.Football.gameTeam,\n SPORT_LINE_SCHEMAS.Football.gamePlayer,\n ),\n} as const satisfies Record<LeagueType, z.ZodType>;\n\nexport type BasketballGameStats = z.infer<typeof SPORT_GAME_STATS_SCHEMAS.Basketball>;\nexport type CurlingGameStats = z.infer<typeof SPORT_GAME_STATS_SCHEMAS.Curling>;\nexport type FootballGameStats = z.infer<typeof SPORT_GAME_STATS_SCHEMAS.Football>;\n\nexport type GameStats = z.infer<(typeof SPORT_GAME_STATS_SCHEMAS)[LeagueType]>;\n\nexport const GameTeamSchema = z.object({\n teamId: teamIdSchema,\n});\nexport type GameTeam = z.infer<typeof GameTeamSchema>;\n\nconst sportGameBase = {\n leagueId: leagueIdSchema,\n weekId: scheduleWeekIdSchema,\n weekTitle: textFieldSchema(SCHEDULE_WEEK_TITLE_INPUT),\n weekLocation: z.string(),\n weekStartDate: epochMsSchema,\n startTime: epochMsSchema,\n dayKey: calendarDateSchema,\n locationLabel: z.string(),\n gameLocationId: gameLocationIdSchema.optional(),\n subLocation: gameLocationSubLocationSchema.optional(),\n status: gameStatusSchema,\n teams: z.tuple([GameTeamSchema, GameTeamSchema]),\n teamIds: z.array(teamIdSchema).min(1).max(2),\n score: z.record(teamIdSchema, countSchema),\n statEventSequence: countSchema,\n memos: z.record(z.string(), textFieldSchema(GAME_MEMO_INPUT)).optional(),\n absentRosterPlayerIds: z.array(gameRosterPlayerIdSchema),\n nonScoringRosterPlayerIds: z.array(gameRosterPlayerIdSchema).optional(),\n finalizedAt: epochMsSchema.optional(),\n reopenedAt: epochMsSchema.optional(),\n createdAt: epochMsSchema,\n updatedAt: epochMsSchema,\n};\n\nfunction rollupMatchesTeams(game: {\n teamIds: string[];\n score: Record<string, number>;\n stats: { teamStats: Record<string, unknown>; playerStats: Record<string, unknown> };\n}): boolean {\n const teams = new Set(game.teamIds);\n const namesEveryTeam = (keys: string[]) =>\n keys.length === teams.size && keys.every((key) => teams.has(key));\n return (\n namesEveryTeam(Object.keys(game.stats.teamStats)) &&\n namesEveryTeam(Object.keys(game.score)) &&\n Object.keys(game.stats.playerStats).every((key) =>\n teams.has(parseGameRosterPlayerId(key)?.teamId ?? ''),\n )\n );\n}\nconst ROLLUP_MISMATCH = \"The stats rollup and score mirror hold exactly the game's teams.\";\n\nexport const BasketballGameSchema = z\n .object({\n ...sportGameBase,\n leagueType: z.literal('Basketball' satisfies LeagueType),\n stats: SPORT_GAME_STATS_SCHEMAS.Basketball,\n jumpBallTeamId: teamIdSchema.optional(),\n })\n .refine(rollupMatchesTeams, ROLLUP_MISMATCH);\nexport type BasketballGame = z.infer<typeof BasketballGameSchema>;\n\nexport const CurlingGameSchema = z\n .object({\n ...sportGameBase,\n leagueType: z.literal('Curling' satisfies LeagueType),\n stats: SPORT_GAME_STATS_SCHEMAS.Curling,\n })\n .refine(rollupMatchesTeams, ROLLUP_MISMATCH);\nexport type CurlingGame = z.infer<typeof CurlingGameSchema>;\n\nexport const FootballGameSchema = z\n .object({\n ...sportGameBase,\n leagueType: z.literal('Football' satisfies LeagueType),\n stats: SPORT_GAME_STATS_SCHEMAS.Football,\n })\n .refine(rollupMatchesTeams, ROLLUP_MISMATCH);\nexport type FootballGame = z.infer<typeof FootballGameSchema>;\n\nexport const SportGameSchema = z.discriminatedUnion('leagueType', [\n BasketballGameSchema,\n CurlingGameSchema,\n FootballGameSchema,\n]);\nexport type SportGame = z.infer<typeof SportGameSchema>;\n\nexport const GameRosterPlayerSchema = z.object({\n userId: userIdSchema,\n teamId: teamIdSchema,\n isGhost: z.boolean(),\n syncedAt: epochMsSchema,\n});\nexport type GameRosterPlayer = z.infer<typeof GameRosterPlayerSchema>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"sport-league.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/sport-league.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkBxB,eAAO,MAAM,iCAAiC,4CAA4C,CAAC;AAC3F,eAAO,MAAM,mCAAmC,2FAC0C,CAAC;AAE3F,wBAAgB,8BAA8B,CAAC,MAAM,EAAE;IACrD,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACvC,GAAG,OAAO,CAEV;AAED,wBAAgB,oBAAoB,CAClC,CAAC,SAAS;IACR,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACvC,EACD,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI,CAehD;AAED,eAAO,MAAM,mBAAmB,aAAsC,CAAC;AAEvE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwBM,CAAC;AACrC,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
1
+ {"version":3,"file":"sport-league.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/sport-league.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAexB,eAAO,MAAM,iCAAiC,4CAA4C,CAAC;AAC3F,eAAO,MAAM,mCAAmC,2FAC0C,CAAC;AAE3F,wBAAgB,8BAA8B,CAAC,MAAM,EAAE;IACrD,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACvC,GAAG,OAAO,CAEV;AAED,wBAAgB,oBAAoB,CAClC,CAAC,SAAS;IACR,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACvC,EACD,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI,CAehD;AAED,eAAO,MAAM,mBAAmB,aAAsC,CAAC;AAEvE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwBM,CAAC;AACrC,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -1,7 +1,8 @@
1
1
  import { z } from 'zod';
2
2
  import { MAX_PLAYOFF_CUTOFF } from '../constants/business.js';
3
- import { LEAGUE_DESCRIPTION_INPUT_FORMAT, LEAGUE_TITLE_INPUT_FORMAT, } from '../input-formats/input-formats.js';
4
- import { calendarDateSchema, countSchema, epochMsSchema, leagueModeSchema, leagueStatusSchema, leagueTypeSchema, textFieldSchema, } from './atoms.js';
3
+ import { LEAGUE_DESCRIPTION_INPUT, LEAGUE_TITLE_INPUT } from '../constants/text-fields.js';
4
+ import { calendarDateSchema, countSchema, epochMsSchema, leagueModeSchema, leagueStatusSchema, leagueTypeSchema, } from './atoms.js';
5
+ import { textFieldSchema } from '../schemas/text-field.js';
5
6
  import { GallerySummarySchema } from './gallery.js';
6
7
  import { waiverTemplateIdSchema } from './waiver-template.js';
7
8
  export const LEAGUE_DATES_OUT_OF_ORDER_MESSAGE = 'The league cannot end before it starts.';
@@ -28,8 +29,8 @@ export function refineLeagueSettings(league, ctx) {
28
29
  export const playoffCutoffSchema = countSchema.max(MAX_PLAYOFF_CUTOFF);
29
30
  export const SportLeagueSchema = z
30
31
  .object({
31
- leagueTitle: textFieldSchema(LEAGUE_TITLE_INPUT_FORMAT),
32
- description: textFieldSchema(LEAGUE_DESCRIPTION_INPUT_FORMAT),
32
+ leagueTitle: textFieldSchema(LEAGUE_TITLE_INPUT),
33
+ description: textFieldSchema(LEAGUE_DESCRIPTION_INPUT),
33
34
  leagueType: leagueTypeSchema,
34
35
  leagueMode: leagueModeSchema,
35
36
  leagueStartDate: calendarDateSchema,
@@ -1 +1 @@
1
- {"version":3,"file":"sport-league.js","sourceRoot":"","sources":["../../src/doc-schemas/sport-league.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EACL,+BAA+B,EAC/B,yBAAyB,GAC1B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,MAAM,CAAC,MAAM,iCAAiC,GAAG,yCAAyC,CAAC;AAC3F,MAAM,CAAC,MAAM,mCAAmC,GAC9C,wFAAwF,CAAC;AAE3F,MAAM,UAAU,8BAA8B,CAAC,MAG9C;IACC,OAAO,MAAM,CAAC,cAAc,KAAK,CAAC,MAAM,CAAC,gBAAgB,KAAK,SAAS,CAAC,CAAC;AAC3E,CAAC;AAED,MAAM,UAAU,oBAAoB,CAOlC,MAAS,EAAE,GAA6B;IACxC,IAAI,MAAM,CAAC,aAAa,GAAG,MAAM,CAAC,eAAe,EAAE,CAAC;QAClD,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,eAAe,CAAC;YACvB,OAAO,EAAE,iCAA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../input-formats/input-formats.js';\nimport {\n calendarDateSchema,\n countSchema,\n epochMsSchema,\n leagueModeSchema,\n leagueStatusSchema,\n leagueTypeSchema,\n textFieldSchema,\n} from './atoms.js';\nimport { GallerySummarySchema } from './gallery.js';\nimport { waiverTemplateIdSchema } from './waiver-template.js';\n\nexport const LEAGUE_DATES_OUT_OF_ORDER_MESSAGE = 'The league cannot end before it starts.';\nexport const WAIVER_REQUIREMENT_MISMATCH_MESSAGE =\n 'Choose a waiver template when the league requires a waiver, and none when it does not.';\n\nexport function hasConsistentWaiverRequirement(league: {\n requiresWaiver: boolean;\n waiverTemplateId?: string | undefined;\n}): boolean {\n return league.requiresWaiver === (league.waiverTemplateId !== undefined);\n}\n\nexport function refineLeagueSettings<\n T extends {\n leagueStartDate: string;\n leagueEndDate: string;\n requiresWaiver: boolean;\n waiverTemplateId?: string | undefined;\n },\n>(league: T, ctx: z.core.$RefinementCtx<T>): void {\n if (league.leagueEndDate < league.leagueStartDate) {\n ctx.addIssue({\n code: 'custom',\n path: ['leagueEndDate'],\n message: LEAGUE_DATES_OUT_OF_ORDER_MESSAGE,\n });\n }\n if (!hasConsistentWaiverRequirement(league)) {\n ctx.addIssue({\n code: 'custom',\n path: ['waiverTemplateId'],\n message: WAIVER_REQUIREMENT_MISMATCH_MESSAGE,\n });\n }\n}\n\nexport const playoffCutoffSchema = countSchema.max(MAX_PLAYOFF_CUTOFF);\n\nexport const SportLeagueSchema = z\n .object({\n leagueTitle: textFieldSchema(LEAGUE_TITLE_INPUT_FORMAT),\n description: textFieldSchema(LEAGUE_DESCRIPTION_INPUT_FORMAT),\n leagueType: leagueTypeSchema,\n leagueMode: leagueModeSchema,\n leagueStartDate: calendarDateSchema,\n leagueEndDate: calendarDateSchema,\n status: leagueStatusSchema,\n playoffCutoff: playoffCutoffSchema,\n playoffCutoffComp: playoffCutoffSchema,\n playoffCutoffRec: playoffCutoffSchema,\n requiresWaiver: z.boolean(),\n waiverTemplateId: waiverTemplateIdSchema.optional(),\n pictures: GallerySummarySchema.optional(),\n // Only its changing matters: the write fence of the MAX_TEAMS_PER_LEAGUE cap\n // (RULE-STD-BACKEND-116).\n teamRevision: countSchema.optional(),\n // Only its changing matters: the write fence of the MAX_GAMES_PER_LEAGUE cap\n // (RULE-STD-BACKEND-116).\n gameRevision: countSchema.optional(),\n createdAt: epochMsSchema,\n updatedAt: epochMsSchema,\n })\n .superRefine(refineLeagueSettings);\nexport type SportLeague = z.infer<typeof SportLeagueSchema>;\n"]}
1
+ {"version":3,"file":"sport-league.js","sourceRoot":"","sources":["../../src/doc-schemas/sport-league.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAC3F,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,MAAM,CAAC,MAAM,iCAAiC,GAAG,yCAAyC,CAAC;AAC3F,MAAM,CAAC,MAAM,mCAAmC,GAC9C,wFAAwF,CAAC;AAE3F,MAAM,UAAU,8BAA8B,CAAC,MAG9C;IACC,OAAO,MAAM,CAAC,cAAc,KAAK,CAAC,MAAM,CAAC,gBAAgB,KAAK,SAAS,CAAC,CAAC;AAC3E,CAAC;AAED,MAAM,UAAU,oBAAoB,CAOlC,MAAS,EAAE,GAA6B;IACxC,IAAI,MAAM,CAAC,aAAa,GAAG,MAAM,CAAC,eAAe,EAAE,CAAC;QAClD,GAAG,CAAC,QAAQ,CAAC;YACX,IAA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{ LEAGUE_DESCRIPTION_INPUT, LEAGUE_TITLE_INPUT } from '../constants/text-fields.js';\nimport {\n calendarDateSchema,\n countSchema,\n epochMsSchema,\n leagueModeSchema,\n leagueStatusSchema,\n leagueTypeSchema,\n} from './atoms.js';\nimport { textFieldSchema } from '../schemas/text-field.js';\nimport { GallerySummarySchema } from './gallery.js';\nimport { waiverTemplateIdSchema } from './waiver-template.js';\n\nexport const LEAGUE_DATES_OUT_OF_ORDER_MESSAGE = 'The league cannot end before it starts.';\nexport const WAIVER_REQUIREMENT_MISMATCH_MESSAGE =\n 'Choose a waiver template when the league requires a waiver, and none when it does not.';\n\nexport function hasConsistentWaiverRequirement(league: {\n requiresWaiver: boolean;\n waiverTemplateId?: string | undefined;\n}): boolean {\n return league.requiresWaiver === (league.waiverTemplateId !== undefined);\n}\n\nexport function refineLeagueSettings<\n T extends {\n leagueStartDate: string;\n leagueEndDate: string;\n requiresWaiver: boolean;\n waiverTemplateId?: string | undefined;\n },\n>(league: T, ctx: z.core.$RefinementCtx<T>): void {\n if (league.leagueEndDate < league.leagueStartDate) {\n ctx.addIssue({\n code: 'custom',\n path: ['leagueEndDate'],\n message: LEAGUE_DATES_OUT_OF_ORDER_MESSAGE,\n });\n }\n if (!hasConsistentWaiverRequirement(league)) {\n ctx.addIssue({\n code: 'custom',\n path: ['waiverTemplateId'],\n message: WAIVER_REQUIREMENT_MISMATCH_MESSAGE,\n });\n }\n}\n\nexport const playoffCutoffSchema = countSchema.max(MAX_PLAYOFF_CUTOFF);\n\nexport const SportLeagueSchema = z\n .object({\n leagueTitle: textFieldSchema(LEAGUE_TITLE_INPUT),\n description: textFieldSchema(LEAGUE_DESCRIPTION_INPUT),\n leagueType: leagueTypeSchema,\n leagueMode: leagueModeSchema,\n leagueStartDate: calendarDateSchema,\n leagueEndDate: calendarDateSchema,\n status: leagueStatusSchema,\n playoffCutoff: playoffCutoffSchema,\n playoffCutoffComp: playoffCutoffSchema,\n playoffCutoffRec: playoffCutoffSchema,\n requiresWaiver: z.boolean(),\n waiverTemplateId: waiverTemplateIdSchema.optional(),\n pictures: GallerySummarySchema.optional(),\n // Only its changing matters: the write fence of the MAX_TEAMS_PER_LEAGUE cap\n // (RULE-STD-BACKEND-116).\n teamRevision: countSchema.optional(),\n // Only its changing matters: the write fence of the MAX_GAMES_PER_LEAGUE cap\n // (RULE-STD-BACKEND-116).\n gameRevision: countSchema.optional(),\n createdAt: epochMsSchema,\n updatedAt: epochMsSchema,\n })\n .superRefine(refineLeagueSettings);\nexport type SportLeague = z.infer<typeof SportLeagueSchema>;\n"]}