@ttt-productions/q-core 0.1.39 → 0.1.40

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 (83) 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/text-fields.d.ts +147 -0
  6. package/dist/constants/text-fields.d.ts.map +1 -0
  7. package/dist/{input-formats/input-formats.js → constants/text-fields.js} +50 -26
  8. package/dist/constants/text-fields.js.map +1 -0
  9. package/dist/doc-schemas/atoms.d.ts +0 -12
  10. package/dist/doc-schemas/atoms.d.ts.map +1 -1
  11. package/dist/doc-schemas/atoms.js +3 -28
  12. package/dist/doc-schemas/atoms.js.map +1 -1
  13. package/dist/doc-schemas/catalogs.d.ts.map +1 -1
  14. package/dist/doc-schemas/catalogs.js +4 -3
  15. package/dist/doc-schemas/catalogs.js.map +1 -1
  16. package/dist/doc-schemas/game-location.d.ts.map +1 -1
  17. package/dist/doc-schemas/game-location.js +7 -6
  18. package/dist/doc-schemas/game-location.js.map +1 -1
  19. package/dist/doc-schemas/league-team.d.ts.map +1 -1
  20. package/dist/doc-schemas/league-team.js +5 -4
  21. package/dist/doc-schemas/league-team.js.map +1 -1
  22. package/dist/doc-schemas/migration-console.d.ts.map +1 -1
  23. package/dist/doc-schemas/migration-console.js +4 -3
  24. package/dist/doc-schemas/migration-console.js.map +1 -1
  25. package/dist/doc-schemas/sport-game.d.ts.map +1 -1
  26. package/dist/doc-schemas/sport-game.js +5 -4
  27. package/dist/doc-schemas/sport-game.js.map +1 -1
  28. package/dist/doc-schemas/sport-league.d.ts.map +1 -1
  29. package/dist/doc-schemas/sport-league.js +5 -4
  30. package/dist/doc-schemas/sport-league.js.map +1 -1
  31. package/dist/doc-schemas/system.js +7 -6
  32. package/dist/doc-schemas/system.js.map +1 -1
  33. package/dist/doc-schemas/team-membership.js +5 -4
  34. package/dist/doc-schemas/team-membership.js.map +1 -1
  35. package/dist/doc-schemas/user-profile.d.ts.map +1 -1
  36. package/dist/doc-schemas/user-profile.js +5 -4
  37. package/dist/doc-schemas/user-profile.js.map +1 -1
  38. package/dist/doc-schemas/waiver-template.d.ts.map +1 -1
  39. package/dist/doc-schemas/waiver-template.js +5 -4
  40. package/dist/doc-schemas/waiver-template.js.map +1 -1
  41. package/dist/index.d.ts +0 -1
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +0 -1
  44. package/dist/index.js.map +1 -1
  45. package/dist/schemas/app-config.d.ts.map +1 -1
  46. package/dist/schemas/app-config.js +8 -7
  47. package/dist/schemas/app-config.js.map +1 -1
  48. package/dist/schemas/atoms.d.ts.map +1 -1
  49. package/dist/schemas/atoms.js +8 -7
  50. package/dist/schemas/atoms.js.map +1 -1
  51. package/dist/schemas/index.d.ts +1 -0
  52. package/dist/schemas/index.d.ts.map +1 -1
  53. package/dist/schemas/index.js +1 -0
  54. package/dist/schemas/index.js.map +1 -1
  55. package/dist/schemas/leagues.d.ts.map +1 -1
  56. package/dist/schemas/leagues.js +5 -4
  57. package/dist/schemas/leagues.js.map +1 -1
  58. package/dist/schemas/schedules.d.ts.map +1 -1
  59. package/dist/schemas/schedules.js +3 -3
  60. package/dist/schemas/schedules.js.map +1 -1
  61. package/dist/schemas/scoring.d.ts +6 -6
  62. package/dist/schemas/scoring.d.ts.map +1 -1
  63. package/dist/schemas/scoring.js +4 -3
  64. package/dist/schemas/scoring.js.map +1 -1
  65. package/dist/schemas/text-field.d.ts +4 -0
  66. package/dist/schemas/text-field.d.ts.map +1 -0
  67. package/dist/schemas/text-field.js +12 -0
  68. package/dist/schemas/text-field.js.map +1 -0
  69. package/dist/schemas/waiver-templates.d.ts.map +1 -1
  70. package/dist/schemas/waiver-templates.js +4 -4
  71. package/dist/schemas/waiver-templates.js.map +1 -1
  72. package/dist/utils/index.d.ts +1 -0
  73. package/dist/utils/index.d.ts.map +1 -1
  74. package/dist/utils/index.js +1 -0
  75. package/dist/utils/index.js.map +1 -1
  76. package/dist/utils/text-field.d.ts +15 -0
  77. package/dist/utils/text-field.d.ts.map +1 -0
  78. package/dist/utils/text-field.js +32 -0
  79. package/dist/utils/text-field.js.map +1 -0
  80. package/package.json +1 -1
  81. package/dist/input-formats/input-formats.d.ts +0 -123
  82. package/dist/input-formats/input-formats.d.ts.map +0 -1
  83. package/dist/input-formats/input-formats.js.map +0 -1
@@ -1 +1 @@
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,EACL,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,WAAW,EACX,aAAa,EACb,cAAc,EACd,cAAc,EACd,cAAc,EACd,eAAe,EACf,YAAY,GACb,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,eAAe,CAAC,sBAAsB,CAAC;IAC7C,IAAI,EAAE,cAAc;IACpB,QAAQ,EAAE,cAAc;IACxB,QAAQ,EAAE,cAAc,CAAC,QAAQ,EAAE;IACnC,eAAe,EAAE,YAAY;IAC7B,WAAW,EAAE,qBAAqB,CAAC,QAAQ,EAAE;IAC7C,iBAAiB,EAAE,CAAC,CAAC,MAAM,CAAC,YAAY,EAAE,uBAAuB,CAAC,CAAC,QAAQ,EAAE;IAC7E,QAAQ,EAAE,oBAAoB,CAAC,QAAQ,EAAE;IACzC,2FAA2F;IAC3F,0BAA0B;IAC1B,kBAAkB,EAAE,WAAW,CAAC,QAAQ,EAAE;IAC1C,+FAA+F;IAC/F,2CAA2C;IAC3C,YAAY,EAAE,WAAW,CAAC,QAAQ,EAAE;IACpC,2FAA2F;IAC3F,0BAA0B;IAC1B,gBAAgB,EAAE,WAAW,CAAC,QAAQ,EAAE;IACxC,SAAS,EAAE,aAAa;IACxB,SAAS,EAAE,aAAa;CACzB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,QAAQ,EAAE,cAAc;IACxB,YAAY,EAAE,eAAe,CAAC,0BAA0B,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,EAAE,MAAM,6BAA6B,CAAC;AACnF,OAAO,EACL,WAAW,EACX,aAAa,EACb,cAAc,EACd,cAAc,EACd,cAAc,EACd,YAAY,GACb,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,eAAe,CAAC,eAAe,CAAC;IACtC,IAAI,EAAE,cAAc;IACpB,QAAQ,EAAE,cAAc;IACxB,QAAQ,EAAE,cAAc,CAAC,QAAQ,EAAE;IACnC,eAAe,EAAE,YAAY;IAC7B,WAAW,EAAE,qBAAqB,CAAC,QAAQ,EAAE;IAC7C,iBAAiB,EAAE,CAAC,CAAC,MAAM,CAAC,YAAY,EAAE,uBAAuB,CAAC,CAAC,QAAQ,EAAE;IAC7E,QAAQ,EAAE,oBAAoB,CAAC,QAAQ,EAAE;IACzC,2FAA2F;IAC3F,0BAA0B;IAC1B,kBAAkB,EAAE,WAAW,CAAC,QAAQ,EAAE;IAC1C,+FAA+F;IAC/F,2CAA2C;IAC3C,YAAY,EAAE,WAAW,CAAC,QAAQ,EAAE;IACpC,2FAA2F;IAC3F,0BAA0B;IAC1B,gBAAgB,EAAE,WAAW,CAAC,QAAQ,EAAE;IACxC,SAAS,EAAE,aAAa;IACxB,SAAS,EAAE,aAAa;CACzB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,QAAQ,EAAE,cAAc;IACxB,YAAY,EAAE,eAAe,CAAC,mBAAmB,CAAC;IAClD,SAAS,EAAE,aAAa;CACzB,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { CONTACT_PHONE_INPUT, TEAM_NAME_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;AACxE,eAAO,MAAM,+BAA+B;;;EAA2C,CAAC;AACxF,eAAO,MAAM,0BAA0B,aAA0B,CAAC;AAClE,eAAO,MAAM,uBAAuB,wDAAmD,CAAC;AAIxF,eAAO,MAAM,sBAAsB;;;;;kBAKjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,wBAAwB;;;;;;;kBAOnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAkBnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,yBAAyB;;;;;kBAKpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAKnC,C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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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H,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_FORMAT } 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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,CAAC,CAAC,YAAY,CAAC;IACrD,QAAQ,EAAE,uBAAuB;IACjC,GAAG,EAAE,wBAAwB,CAAC,QAAQ,EAAE;IACxC,OAAO,EAAE,wBAAwB,CAAC,QAAQ,EAAE;IAC5C,QAAQ,EAAE,yBAAyB,CAAC,QAAQ,EAAE;CAC/C,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,YAAY,CAAC;IACvD,QAAQ,EAAE,uBAAuB;IACjC,WAAW,EAAE,0BAA0B;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"]}
@@ -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,CAAC;AAChF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,QAAQ,CAAC,CAAC;AAElF,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,wBAAwB,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;AAE/E,eAAO,MAAM,cAAc;;iBAEzB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AA8CtD,eAAO,MAAM,oBAAoB;;;;;;;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;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, statsOperationIdSchema, 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,7 +31,7 @@ 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
37
  statsOperationId: statsOperationIdSchema.optional(),
@@ -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,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,CAAC,QAAQ,EACnC,kBAAkB,CAAC,OAAO,CAAC,UAAU,CACtC;IACD,QAAQ,EAAE,eAAe,CACvB,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,EACpC,kBAAkB,CAAC,QAAQ,CAAC,UAAU,CACv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xC,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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,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 statsOperationIdSchema,\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 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 +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,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,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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,CAAC,CAAC;AAEvE,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC;KAC/B,MAAM,CAAC;IACN,WAAW,EAAE,eAAe,CAAC,yBAAyB,CAAC;IACvD,WAAW,EAAE,eAAe,CAAC,+BAA+B,CAAC;IAC7D,UAAU,EAAE,gBAAgB;IAC5B,UAAU,EAAE,gBAAgB;IAC5B,eAAe,EAAE,kBAAkB;IACnC,aAAa,EAAE,kBAAkB;IACjC,MAAM,EAAE,kBAAkB;IAC1B,aAAa,EAAE,mBAAmB;IAClC,iBAAiB,EAAE,mBAAmB;IACtC,gBAAgB,EAAE,mBAAmB;IACrC,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE;IAC3B,gBAAgB,EAAE,sBAAsB,CAAC,QAAQ,EAAE;IACnD,QAAQ,EAAE,oBAAoB,CAAC,QAAQ,EAAE;IACzC,6EAA6E;IAC7E,0BAA0B;IAC1B,YAAY,EAAE,WAAW,CAAC,QAAQ,EAAE;IACpC,6EAA6E;IAC7E,0BAA0B;IAC1B,YAAY,EAAE,WAAW,CAAC,QAAQ,EAAE;IACpC,SAAS,EAAE,aAAa;IACxB,SAAS,EAAE,aAAa;CACzB,CAAC;KACD,WAAW,CAAC,oBAAoB,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { MAX_PLAYOFF_CUTOFF } from '../constants/business.js';\nimport {\n LEAGUE_DESCRIPTION_INPUT_FORMAT,\n LEAGUE_TITLE_INPUT_FORMAT,\n} from '../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,"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AAC;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG,WAAW,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;AAEvE,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC;KAC/B,MAAM,CAAC;IACN,WAAW,EAAE,eAAe,CAAC,kBAAkB,CAAC;IAChD,WAAW,EAAE,eAAe,CAAC,wBAAwB,CAAC;IACtD,UAAU,EAAE,gBAAgB;IAC5B,UAAU,EAAE,gBAAgB;IAC5B,eAAe,EAAE,kBAAkB;IACnC,aAAa,EAAE,kBAAkB;IACjC,MAAM,EAAE,kBAAkB;IAC1B,aAAa,EAAE,mBAAmB;IAClC,iBAAiB,EAAE,mBAAmB;IACtC,gBAAgB,EAAE,mBAAmB;IACrC,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE;IAC3B,gBAAgB,EAAE,sBAAsB,CAAC,QAAQ,EAAE;IACnD,QAAQ,EAAE,oBAAoB,CAAC,QAAQ,EAAE;IACzC,6EAA6E;IAC7E,0BAA0B;IAC1B,YAAY,EAAE,WAAW,CAAC,QAAQ,EAAE;IACpC,6EAA6E;IAC7E,0BAA0B;IAC1B,YAAY,EAAE,WAAW,CAAC,QAAQ,EAAE;IACpC,SAAS,EAAE,aAAa;IACxB,SAAS,EAAE,aAAa;CACzB,CAAC;KACD,WAAW,CAAC,oBAAoB,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { MAX_PLAYOFF_CUTOFF } from '../constants/business.js';\nimport { 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"]}
@@ -1,20 +1,21 @@
1
1
  import { z } from 'zod';
2
2
  import { MAX_APP_VERSION_LENGTH } from '../constants/business.js';
3
- import { ANNOUNCEMENT_MESSAGE_INPUT_FORMAT, LANDING_ABOUT_TEXT_INPUT_FORMAT, LANDING_HERO_TITLE_INPUT_FORMAT, MAINTENANCE_MESSAGE_INPUT_FORMAT, } from '../input-formats/input-formats.js';
3
+ import { ANNOUNCEMENT_MESSAGE_INPUT, LANDING_ABOUT_TEXT_INPUT, LANDING_HERO_TITLE_INPUT, MAINTENANCE_MESSAGE_INPUT, } from '../constants/text-fields.js';
4
4
  import { MAX_STATS_VALIDATION_DISCREPANCIES } from '../constants/sports.js';
5
5
  import { GallerySummarySchema } from './gallery.js';
6
- import { countSchema, documentIdSegmentSchema, epochMsSchema, gameIdSchema, leagueIdSchema, statsBeaconActionSchema, statsDiscrepancyKindSchema, statsOperationIdSchema, teamIdSchema, textFieldSchema, userIdSchema, } from './atoms.js';
6
+ import { countSchema, documentIdSegmentSchema, epochMsSchema, gameIdSchema, leagueIdSchema, statsBeaconActionSchema, statsDiscrepancyKindSchema, statsOperationIdSchema, teamIdSchema, userIdSchema, } from './atoms.js';
7
+ import { textFieldSchema } from '../schemas/text-field.js';
7
8
  export const AppConfigSchema = z.object({
8
9
  // `''` is valid here — no version published yet; only the update input requires a value.
9
10
  appVersion: z.string().max(MAX_APP_VERSION_LENGTH),
10
11
  maintenanceMode: z.boolean(),
11
- maintenanceMessage: textFieldSchema(MAINTENANCE_MESSAGE_INPUT_FORMAT).optional(),
12
+ maintenanceMessage: textFieldSchema(MAINTENANCE_MESSAGE_INPUT).optional(),
12
13
  registrationEnabled: z.boolean(),
13
- announcementMessage: textFieldSchema(ANNOUNCEMENT_MESSAGE_INPUT_FORMAT).optional(),
14
+ announcementMessage: textFieldSchema(ANNOUNCEMENT_MESSAGE_INPUT).optional(),
14
15
  });
15
16
  export const LandingPageConfigSchema = z.object({
16
- heroTitle: textFieldSchema(LANDING_HERO_TITLE_INPUT_FORMAT),
17
- aboutCompany: textFieldSchema(LANDING_ABOUT_TEXT_INPUT_FORMAT),
17
+ heroTitle: textFieldSchema(LANDING_HERO_TITLE_INPUT),
18
+ aboutCompany: textFieldSchema(LANDING_ABOUT_TEXT_INPUT),
18
19
  pictures: GallerySummarySchema.optional(),
19
20
  updatedAt: epochMsSchema,
20
21
  });
@@ -1 +1 @@
1
- {"version":3,"file":"system.js","sourceRoot":"","sources":["../../src/doc-schemas/system.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EACL,iCAAiC,EACjC,+BAA+B,EAC/B,+BAA+B,EAC/B,gCAAgC,GACjC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,kCAAkC,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EACL,WAAW,EACX,uBAAuB,EACvB,aAAa,EACb,YAAY,EACZ,cAAc,EACd,uBAAuB,EACvB,0BAA0B,EAC1B,sBAAsB,EACtB,YAAY,EACZ,eAAe,EACf,YAAY,GACb,MAAM,YAAY,CAAC;AAEpB,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,yFAAyF;IACzF,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,sBAAsB,CAAC;IAClD,eAAe,EAAE,CAAC,CAAC,OAAO,EAAE;IAC5B,kBAAkB,EAAE,eAAe,CAAC,gCAAgC,CAAC,CAAC,QAAQ,EAAE;IAChF,mBAAmB,EAAE,CAAC,CAAC,OAAO,EAAE;IAChC,mBAAmB,EAAE,eAAe,CAAC,iCAAiC,CAAC,CAAC,QAAQ,EAAE;CACnF,CAAC,CAAC;AAGH,MAAM,CAAC,MA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,sBAAsB,CAAC,CAAC,GAAG,CAAC,kCAAkC,CAAC;IACtF,iBAAiB,EAAE,CAAC,CAAC,aAAa,CAAC,0BAA0B,EAAE,WAAW,CAAC;IAC3E,OAAO,EAAE,4BAA4B;CACtC,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { MAX_APP_VERSION_LENGTH } from '../constants/business.js';\nimport {\n ANNOUNCEMENT_MESSAGE_INPUT_FORMAT,\n LANDING_ABOUT_TEXT_INPUT_FORMAT,\n LANDING_HERO_TITLE_INPUT_FORMAT,\n MAINTENANCE_MESSAGE_INPUT_FORMAT,\n} from '../input-formats/input-formats.js';\nimport { MAX_STATS_VALIDATION_DISCREPANCIES } from '../constants/sports.js';\nimport { GallerySummarySchema } from './gallery.js';\nimport {\n countSchema,\n documentIdSegmentSchema,\n epochMsSchema,\n gameIdSchema,\n leagueIdSchema,\n statsBeaconActionSchema,\n statsDiscrepancyKindSchema,\n statsOperationIdSchema,\n teamIdSchema,\n textFieldSchema,\n userIdSchema,\n} from './atoms.js';\n\nexport const AppConfigSchema = z.object({\n // `''` is valid here — no version published yet; only the update input requires a value.\n appVersion: z.string().max(MAX_APP_VERSION_LENGTH),\n maintenanceMode: z.boolean(),\n maintenanceMessage: textFieldSchema(MAINTENANCE_MESSAGE_INPUT_FORMAT).optional(),\n registrationEnabled: z.boolean(),\n announcementMessage: textFieldSchema(ANNOUNCEMENT_MESSAGE_INPUT_FORMAT).optional(),\n});\nexport type AppConfig = z.infer<typeof AppConfigSchema>;\n\nexport const LandingPageConfigSchema = z.object({\n heroTitle: textFieldSchema(LANDING_HERO_TITLE_INPUT_FORMAT),\n aboutCompany: textFieldSchema(LANDING_ABOUT_TEXT_INPUT_FORMAT),\n pictures: GallerySummarySchema.optional(),\n updatedAt: epochMsSchema,\n});\nexport type LandingPageConfig = z.infer<typeof LandingPageConfigSchema>;\n\nexport const StatsBeaconSchema = z.object({\n updatedAt: epochMsSchema,\n // A fresh document id minted by every write, so two commits in the same millisecond still move\n // the beacon.\n changeId: documentIdSegmentSchema.optional(),\n action: statsBeaconActionSchema,\n leagueId: leagueIdSchema.optional(),\n gameId: gameIdSchema.optional(),\n teamIds: z.array(teamIdSchema).optional(),\n});\nexport type StatsBeacon = z.infer<typeof StatsBeaconSchema>;\n\nexport const AdminListSchema = z.object({\n admins: z.array(userIdSchema),\n referees: z.array(userIdSchema),\n});\nexport type AdminList = z.infer<typeof AdminListSchema>;\n\nexport const STATS_DISCREPANCY_VALUE_SCHEMA = z.union([\n z.number(),\n z.string(),\n z.array(z.number().nullable()),\n z.record(z.string(), z.number()),\n z.null(),\n]);\n\nexport const StatsDiscrepancySchema = z.strictObject({\n kind: statsDiscrepancyKindSchema,\n gameId: gameIdSchema.optional(),\n path: z.string().min(1),\n key: z.string().min(1).optional(),\n field: z.string().min(1).optional(),\n expected: STATS_DISCREPANCY_VALUE_SCHEMA.optional(),\n actual: STATS_DISCREPANCY_VALUE_SCHEMA.optional(),\n});\nexport type StatsDiscrepancy = z.infer<typeof StatsDiscrepancySchema>;\n\nexport const StatsValidationScopeSchema = z\n .strictObject({ gameId: gameIdSchema.optional(), leagueId: leagueIdSchema.optional() })\n .refine(\n (scope) => scope.gameId === undefined || scope.leagueId === undefined,\n 'One game or one league, not both.',\n );\nexport type StatsValidationScope = z.infer<typeof StatsValidationScopeSchema>;\n\nexport const StatsValidationSummarySchema = z.strictObject({\n totalGamesChecked: countSchema,\n totalUsersChecked: countSchema,\n totalTeamsChecked: countSchema,\n totalLeaguesChecked: countSchema,\n discrepanciesFound: countSchema,\n});\nexport type StatsValidationSummary = z.infer<typeof StatsValidationSummarySchema>;\n\nexport const StatsValidationReportSchema = z.strictObject({\n reportId: z.string().min(1),\n operationId: statsOperationIdSchema,\n ranAt: epochMsSchema,\n ranByUserId: userIdSchema,\n scope: StatsValidationScopeSchema,\n complete: z.boolean(),\n discrepancies: z.array(StatsDiscrepancySchema).max(MAX_STATS_VALIDATION_DISCREPANCIES),\n discrepancyCounts: z.partialRecord(statsDiscrepancyKindSchema, countSchema),\n summary: StatsValidationSummarySchema,\n});\nexport type StatsValidationReport = z.infer<typeof StatsValidationReportSchema>;\n"]}
1
+ {"version":3,"file":"system.js","sourceRoot":"","sources":["../../src/doc-schemas/system.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,kCAAkC,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EACL,WAAW,EACX,uBAAuB,EACvB,aAAa,EACb,YAAY,EACZ,cAAc,EACd,uBAAuB,EACvB,0BAA0B,EAC1B,sBAAsB,EACtB,YAAY,EACZ,YAAY,GACb,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,yFAAyF;IACzF,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,sBAAsB,CAAC;IAClD,eAAe,EAAE,CAAC,CAAC,OAAO,EAAE;IAC5B,kBAAkB,EAAE,eAAe,CAAC,yBAAyB,CAAC,CAAC,QAAQ,EAAE;IACzE,mBAAmB,EAAE,CAAC,CAAC,OAAO,EAAE;IAChC,mBAAmB,EAAE,eAAe,CAAC,0BAA0B,CAAC,CAAC,QAAQ,EAAE;CAC5E,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,SAAS,EAAE,eAAe,CAAC,wBAAwB,CAAC;IACpD,YAAY,EAAE,eAAe,CAAC,wBAAwB,CAAC;I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E,4BAA4B;CACtC,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { MAX_APP_VERSION_LENGTH } from '../constants/business.js';\nimport {\n ANNOUNCEMENT_MESSAGE_INPUT,\n LANDING_ABOUT_TEXT_INPUT,\n LANDING_HERO_TITLE_INPUT,\n MAINTENANCE_MESSAGE_INPUT,\n} from '../constants/text-fields.js';\nimport { MAX_STATS_VALIDATION_DISCREPANCIES } from '../constants/sports.js';\nimport { GallerySummarySchema } from './gallery.js';\nimport {\n countSchema,\n documentIdSegmentSchema,\n epochMsSchema,\n gameIdSchema,\n leagueIdSchema,\n statsBeaconActionSchema,\n statsDiscrepancyKindSchema,\n statsOperationIdSchema,\n teamIdSchema,\n userIdSchema,\n} from './atoms.js';\nimport { textFieldSchema } from '../schemas/text-field.js';\n\nexport const AppConfigSchema = z.object({\n // `''` is valid here — no version published yet; only the update input requires a value.\n appVersion: z.string().max(MAX_APP_VERSION_LENGTH),\n maintenanceMode: z.boolean(),\n maintenanceMessage: textFieldSchema(MAINTENANCE_MESSAGE_INPUT).optional(),\n registrationEnabled: z.boolean(),\n announcementMessage: textFieldSchema(ANNOUNCEMENT_MESSAGE_INPUT).optional(),\n});\nexport type AppConfig = z.infer<typeof AppConfigSchema>;\n\nexport const LandingPageConfigSchema = z.object({\n heroTitle: textFieldSchema(LANDING_HERO_TITLE_INPUT),\n aboutCompany: textFieldSchema(LANDING_ABOUT_TEXT_INPUT),\n pictures: GallerySummarySchema.optional(),\n updatedAt: epochMsSchema,\n});\nexport type LandingPageConfig = z.infer<typeof LandingPageConfigSchema>;\n\nexport const StatsBeaconSchema = z.object({\n updatedAt: epochMsSchema,\n // A fresh document id minted by every write, so two commits in the same millisecond still move\n // the beacon.\n changeId: documentIdSegmentSchema.optional(),\n action: statsBeaconActionSchema,\n leagueId: leagueIdSchema.optional(),\n gameId: gameIdSchema.optional(),\n teamIds: z.array(teamIdSchema).optional(),\n});\nexport type StatsBeacon = z.infer<typeof StatsBeaconSchema>;\n\nexport const AdminListSchema = z.object({\n admins: z.array(userIdSchema),\n referees: z.array(userIdSchema),\n});\nexport type AdminList = z.infer<typeof AdminListSchema>;\n\nexport const STATS_DISCREPANCY_VALUE_SCHEMA = z.union([\n z.number(),\n z.string(),\n z.array(z.number().nullable()),\n z.record(z.string(), z.number()),\n z.null(),\n]);\n\nexport const StatsDiscrepancySchema = z.strictObject({\n kind: statsDiscrepancyKindSchema,\n gameId: gameIdSchema.optional(),\n path: z.string().min(1),\n key: z.string().min(1).optional(),\n field: z.string().min(1).optional(),\n expected: STATS_DISCREPANCY_VALUE_SCHEMA.optional(),\n actual: STATS_DISCREPANCY_VALUE_SCHEMA.optional(),\n});\nexport type StatsDiscrepancy = z.infer<typeof StatsDiscrepancySchema>;\n\nexport const StatsValidationScopeSchema = z\n .strictObject({ gameId: gameIdSchema.optional(), leagueId: leagueIdSchema.optional() })\n .refine(\n (scope) => scope.gameId === undefined || scope.leagueId === undefined,\n 'One game or one league, not both.',\n );\nexport type StatsValidationScope = z.infer<typeof StatsValidationScopeSchema>;\n\nexport const StatsValidationSummarySchema = z.strictObject({\n totalGamesChecked: countSchema,\n totalUsersChecked: countSchema,\n totalTeamsChecked: countSchema,\n totalLeaguesChecked: countSchema,\n discrepanciesFound: countSchema,\n});\nexport type StatsValidationSummary = z.infer<typeof StatsValidationSummarySchema>;\n\nexport const StatsValidationReportSchema = z.strictObject({\n reportId: z.string().min(1),\n operationId: statsOperationIdSchema,\n ranAt: epochMsSchema,\n ranByUserId: userIdSchema,\n scope: StatsValidationScopeSchema,\n complete: z.boolean(),\n discrepancies: z.array(StatsDiscrepancySchema).max(MAX_STATS_VALIDATION_DISCREPANCIES),\n discrepancyCounts: z.partialRecord(statsDiscrepancyKindSchema, countSchema),\n summary: StatsValidationSummarySchema,\n});\nexport type StatsValidationReport = z.infer<typeof StatsValidationReportSchema>;\n"]}
@@ -1,6 +1,7 @@
1
1
  import { z } from 'zod';
2
- import { TEAM_INVITATION_MESSAGE_INPUT_FORMAT, TEAM_JOIN_REQUEST_MESSAGE_INPUT_FORMAT, } from '../input-formats/input-formats.js';
3
- import { epochMsSchema, teamJoinRequestStatusSchema, leagueIdSchema, teamIdSchema, teamInvitationStatusSchema, teamJoinMethodSchema, teamMembershipStatusSchema, teamRoleSchema, textFieldSchema, userIdSchema, } from './atoms.js';
2
+ import { TEAM_INVITATION_MESSAGE_INPUT, TEAM_JOIN_REQUEST_MESSAGE_INPUT, } from '../constants/text-fields.js';
3
+ import { epochMsSchema, teamJoinRequestStatusSchema, leagueIdSchema, teamIdSchema, teamInvitationStatusSchema, teamJoinMethodSchema, teamMembershipStatusSchema, teamRoleSchema, userIdSchema, } from './atoms.js';
4
+ import { textFieldSchema } from '../schemas/text-field.js';
4
5
  export const TeamMembershipSchema = z.object({
5
6
  leagueId: leagueIdSchema,
6
7
  teamId: teamIdSchema,
@@ -19,7 +20,7 @@ export const TeamInvitationSchema = z.object({
19
20
  teamId: teamIdSchema,
20
21
  invitedUserId: userIdSchema,
21
22
  invitedByUserId: userIdSchema,
22
- message: textFieldSchema(TEAM_INVITATION_MESSAGE_INPUT_FORMAT),
23
+ message: textFieldSchema(TEAM_INVITATION_MESSAGE_INPUT),
23
24
  status: teamInvitationStatusSchema,
24
25
  createdAt: epochMsSchema,
25
26
  respondedAt: epochMsSchema.optional(),
@@ -28,7 +29,7 @@ export const TeamJoinRequestSchema = z.object({
28
29
  leagueId: leagueIdSchema,
29
30
  teamId: teamIdSchema,
30
31
  userId: userIdSchema,
31
- message: textFieldSchema(TEAM_JOIN_REQUEST_MESSAGE_INPUT_FORMAT),
32
+ message: textFieldSchema(TEAM_JOIN_REQUEST_MESSAGE_INPUT),
32
33
  status: teamJoinRequestStatusSchema,
33
34
  createdAt: epochMsSchema,
34
35
  });
@@ -1 +1 @@
1
- {"version":3,"file":"team-membership.js","sourceRoot":"","sources":["../../src/doc-schemas/team-membership.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CA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A2B;IACnC,SAAS,EAAE,aAAa;CACzB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,QAAQ,EAAE,cAAc;IACxB,MAAM,EAAE,YAAY;IACpB,SAAS,EAAE,aAAa;CACzB,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport {\n TEAM_INVITATION_MESSAGE_INPUT_FORMAT,\n TEAM_JOIN_REQUEST_MESSAGE_INPUT_FORMAT,\n} from '../input-formats/input-formats.js';\nimport {\n epochMsSchema,\n teamJoinRequestStatusSchema,\n leagueIdSchema,\n teamIdSchema,\n teamInvitationStatusSchema,\n teamJoinMethodSchema,\n teamMembershipStatusSchema,\n teamRoleSchema,\n textFieldSchema,\n userIdSchema,\n} from './atoms.js';\n\nexport const TeamMembershipSchema = z.object({\n leagueId: leagueIdSchema,\n teamId: teamIdSchema,\n userId: userIdSchema,\n role: teamRoleSchema,\n status: teamMembershipStatusSchema,\n isGhost: z.boolean(),\n joinedVia: teamJoinMethodSchema.optional(),\n teamInvitationId: z.string().optional(),\n linkedFromGhostUserId: z.string().optional(),\n joinedAt: epochMsSchema,\n updatedAt: epochMsSchema,\n});\nexport type TeamMembership = z.infer<typeof TeamMembershipSchema>;\n\nexport const TeamInvitationSchema = z.object({\n leagueId: leagueIdSchema,\n teamId: teamIdSchema,\n invitedUserId: userIdSchema,\n invitedByUserId: userIdSchema,\n message: textFieldSchema(TEAM_INVITATION_MESSAGE_INPUT_FORMAT),\n status: teamInvitationStatusSchema,\n createdAt: epochMsSchema,\n respondedAt: epochMsSchema.optional(),\n});\nexport type TeamInvitation = z.infer<typeof TeamInvitationSchema>;\n\nexport const TeamJoinRequestSchema = z.object({\n leagueId: leagueIdSchema,\n teamId: teamIdSchema,\n userId: userIdSchema,\n message: textFieldSchema(TEAM_JOIN_REQUEST_MESSAGE_INPUT_FORMAT),\n status: teamJoinRequestStatusSchema,\n createdAt: epochMsSchema,\n});\nexport type TeamJoinRequest = z.infer<typeof TeamJoinRequestSchema>;\n\nexport const LeagueFreeAgentSchema = z.object({\n leagueId: leagueIdSchema,\n userId: userIdSchema,\n createdAt: epochMsSchema,\n});\nexport type LeagueFreeAgent = z.infer<typeof LeagueFreeAgentSchema>;\n"]}
1
+ {"version":3,"file":"team-membership.js","sourceRoot":"","sources":["../../src/doc-schemas/team-membership.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,6BAA6B,EAC7B,+BAA+B,GAChC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,aAAa,EACb,2BAA2B,EAC3B,cAAc,EACd,YAAY,EACZ,0BAA0B,EAC1B,oBAAoB,EACpB,0BAA0B,EAC1B,cAAc,EACd,YAAY,GACb,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,QAAQ,EAAE,cAAc;IACxB,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,YAAY;IACpB,IAAI,EAAE,cAAc;IACpB,MAAM,EAAE,0BAA0B;IAClC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,SAAS,EAAE,oBAAoB,CAAC,QAAQ,EAAE;IAC1C,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACvC,qBAAqB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5C,QAAQ,EAAE,aAAa;IACvB,SAAS,EAAE,aAAa;CACzB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,QAAQ,EAAE,cAAc;IACxB,MAAM,EAAE,YAAY;IACpB,aAAa,EAAE,YAAY;IAC3B,eAAe,EAAE,YAAY;IAC7B,OAAO,EAAE,eAAe,CAAC,6BAA6B,CAAC;IACvD,MAAM,EAAE,0BAA0B;IAClC,SAAS,EAAE,aAAa;IACxB,WAAW,EAAE,aAAa,CAAC,QAAQ,EAAE;CACtC,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,QAAQ,EAAE,cAAc;IACxB,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,YAAY;IACpB,OAAO,EAAE,eAAe,CAAC,+BAA+B,CAAC;IACzD,MAAM,EAAE,2BAA2B;IACnC,SAAS,EAAE,aAAa;CACzB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,QAAQ,EAAE,cAAc;IACxB,MAAM,EAAE,YAAY;IACpB,SAAS,EAAE,aAAa;CACzB,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport {\n TEAM_INVITATION_MESSAGE_INPUT,\n TEAM_JOIN_REQUEST_MESSAGE_INPUT,\n} from '../constants/text-fields.js';\nimport {\n epochMsSchema,\n teamJoinRequestStatusSchema,\n leagueIdSchema,\n teamIdSchema,\n teamInvitationStatusSchema,\n teamJoinMethodSchema,\n teamMembershipStatusSchema,\n teamRoleSchema,\n userIdSchema,\n} from './atoms.js';\nimport { textFieldSchema } from '../schemas/text-field.js';\n\nexport const TeamMembershipSchema = z.object({\n leagueId: leagueIdSchema,\n teamId: teamIdSchema,\n userId: userIdSchema,\n role: teamRoleSchema,\n status: teamMembershipStatusSchema,\n isGhost: z.boolean(),\n joinedVia: teamJoinMethodSchema.optional(),\n teamInvitationId: z.string().optional(),\n linkedFromGhostUserId: z.string().optional(),\n joinedAt: epochMsSchema,\n updatedAt: epochMsSchema,\n});\nexport type TeamMembership = z.infer<typeof TeamMembershipSchema>;\n\nexport const TeamInvitationSchema = z.object({\n leagueId: leagueIdSchema,\n teamId: teamIdSchema,\n invitedUserId: userIdSchema,\n invitedByUserId: userIdSchema,\n message: textFieldSchema(TEAM_INVITATION_MESSAGE_INPUT),\n status: teamInvitationStatusSchema,\n createdAt: epochMsSchema,\n respondedAt: epochMsSchema.optional(),\n});\nexport type TeamInvitation = z.infer<typeof TeamInvitationSchema>;\n\nexport const TeamJoinRequestSchema = z.object({\n leagueId: leagueIdSchema,\n teamId: teamIdSchema,\n userId: userIdSchema,\n message: textFieldSchema(TEAM_JOIN_REQUEST_MESSAGE_INPUT),\n status: teamJoinRequestStatusSchema,\n createdAt: epochMsSchema,\n});\nexport type TeamJoinRequest = z.infer<typeof TeamJoinRequestSchema>;\n\nexport const LeagueFreeAgentSchema = z.object({\n leagueId: leagueIdSchema,\n userId: userIdSchema,\n createdAt: epochMsSchema,\n});\nexport type LeagueFreeAgent = z.infer<typeof LeagueFreeAgentSchema>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"user-profile.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/user-profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,eAAO,MAAM,eAAe;;;;EAAsB,CAAC;AAEnD,eAAO,MAAM,kBAAkB;;;iBAG7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAU5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,qBAAqB;;;;;;;;;;;;iBAQhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,qBAAqB;;;;;kBAA6D,CAAC;AAChG,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AASpE,eAAO,MAAM,oBAAoB,EAE5B,SAAS,CAAC,MAAM,eAAe,CAAC,EAAE,CAAC"}
1
+ {"version":3,"file":"user-profile.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/user-profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,eAAe;;;;EAAsB,CAAC;AAEnD,eAAO,MAAM,kBAAkB;;;iBAG7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAU5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,qBAAqB;;;;;;;;;;;;iBAQhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,qBAAqB;;;;;kBAA6D,CAAC;AAChG,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AASpE,eAAO,MAAM,oBAAoB,EAE5B,SAAS,CAAC,MAAM,eAAe,CAAC,EAAE,CAAC"}
@@ -1,9 +1,10 @@
1
1
  import { z } from 'zod';
2
2
  import { THEME_NAMES } from '@ttt-productions/theme-core';
3
3
  import { EMAIL_MAX_LENGTH } from '../constants/business.js';
4
- import { CONTACT_PHONE_INPUT_FORMAT, DISPLAY_NAME_INPUT_FORMAT, } from '../input-formats/input-formats.js';
4
+ import { CONTACT_PHONE_INPUT, DISPLAY_NAME_INPUT } from '../constants/text-fields.js';
5
5
  import { BasketballPlayerTotalsSchema, UserLifetimeStatsSchema } from './aggregate-stats.js';
6
- import { epochMsSchema, textFieldSchema, userStatusSchema } from './atoms.js';
6
+ import { epochMsSchema, userStatusSchema } from './atoms.js';
7
+ import { textFieldSchema } from '../schemas/text-field.js';
7
8
  import { awardIdSchema } from './catalogs.js';
8
9
  export const themeNameSchema = z.enum(THEME_NAMES);
9
10
  export const GrantedAwardSchema = z.object({
@@ -11,7 +12,7 @@ export const GrantedAwardSchema = z.object({
11
12
  grantedAt: epochMsSchema,
12
13
  });
13
14
  export const UserProfileSchema = z.object({
14
- displayName: textFieldSchema(DISPLAY_NAME_INPUT_FORMAT),
15
+ displayName: textFieldSchema(DISPLAY_NAME_INPUT),
15
16
  displayName_lowercase: z.string(),
16
17
  userStatus: userStatusSchema,
17
18
  lifetimeStats: UserLifetimeStatsSchema.optional(),
@@ -25,7 +26,7 @@ export const UserPrivateDataSchema = z.object({
25
26
  email: z.string().max(EMAIL_MAX_LENGTH),
26
27
  registrationStartedAt: epochMsSchema.optional(),
27
28
  orphanDeletionClaimedAt: epochMsSchema.optional(),
28
- defaultContactPhone: textFieldSchema(CONTACT_PHONE_INPUT_FORMAT).optional(),
29
+ defaultContactPhone: textFieldSchema(CONTACT_PHONE_INPUT).optional(),
29
30
  theme: themeNameSchema.optional(),
30
31
  reducedMotion: z.boolean().optional(),
31
32
  updatedAt: epochMsSchema,
@@ -1 +1 @@
1
- {"version":3,"file":"user-profile.js","sourceRoot":"","sources":["../../src/doc-schemas/user-profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EACL,0BAA0B,EAC1B,yBAAyB,GAC1B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,4BAA4B,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9E,O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AE,IAAI,EAAE,CAAC,CAAC;AAGhG,MAAM,qBAAqB,GAAwC;IACjE,WAAW,EAAE,IAAI;IACjB,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;CACd,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,IAAI,CAC7C,qBAAqB,CACgB,CAAC","sourcesContent":["import { z } from 'zod';\nimport { THEME_NAMES } from '@ttt-productions/theme-core';\nimport { EMAIL_MAX_LENGTH } from '../constants/business.js';\nimport {\n CONTACT_PHONE_INPUT_FORMAT,\n DISPLAY_NAME_INPUT_FORMAT,\n} from '../input-formats/input-formats.js';\nimport { BasketballPlayerTotalsSchema, UserLifetimeStatsSchema } from './aggregate-stats.js';\nimport { epochMsSchema, textFieldSchema, userStatusSchema } from './atoms.js';\nimport { awardIdSchema } from './catalogs.js';\n\nexport const themeNameSchema = z.enum(THEME_NAMES);\n\nexport const GrantedAwardSchema = z.object({\n awardId: awardIdSchema,\n grantedAt: epochMsSchema,\n});\nexport type GrantedAward = z.infer<typeof GrantedAwardSchema>;\n\nexport const UserProfileSchema = z.object({\n displayName: textFieldSchema(DISPLAY_NAME_INPUT_FORMAT),\n displayName_lowercase: z.string(),\n userStatus: userStatusSchema,\n lifetimeStats: UserLifetimeStatsSchema.optional(),\n grantedAwards: z.array(GrantedAwardSchema).optional(),\n primaryAwardId: awardIdSchema.optional(),\n secondaryAwardId: awardIdSchema.optional(),\n createdAt: epochMsSchema,\n updatedAt: epochMsSchema,\n});\nexport type UserProfile = z.infer<typeof UserProfileSchema>;\n\nexport const UserPrivateDataSchema = z.object({\n email: z.string().max(EMAIL_MAX_LENGTH),\n registrationStartedAt: epochMsSchema.optional(),\n orphanDeletionClaimedAt: epochMsSchema.optional(),\n defaultContactPhone: textFieldSchema(CONTACT_PHONE_INPUT_FORMAT).optional(),\n theme: themeNameSchema.optional(),\n reducedMotion: z.boolean().optional(),\n updatedAt: epochMsSchema,\n});\nexport type UserPrivateData = z.infer<typeof UserPrivateDataSchema>;\n\nexport const HistoricalStatsSchema = BasketballPlayerTotalsSchema.omit({ fantasyPoints: true });\nexport type HistoricalStats = z.infer<typeof HistoricalStatsSchema>;\n\nconst HISTORICAL_STAT_ENTRY: Record<keyof HistoricalStats, true> = {\n gamesPlayed: true,\n points: true,\n rebounds: true,\n assists: true,\n};\n\nexport const HISTORICAL_STAT_KEYS = Object.keys(\n HISTORICAL_STAT_ENTRY,\n) as readonly (keyof HistoricalStats)[];\n"]}
1
+ {"version":3,"file":"user-profile.js","sourceRoot":"","sources":["../../src/doc-schemas/user-profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACtF,OAAO,EAAE,4BAA4B,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAEnD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,OAAO,EAAE,aAAa;IACtB,SAAS,EAAE,aAAa;CACzB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,WAAW,EAAE,eAAe,CAAC,kBAAkB,CAAC;IAChD,qBAAqB,EAAE,CAAC,CAAC,MAAM,EAAE;IACjC,UAAU,EAAE,gBAAgB;IAC5B,aAAa,EAAE,uBAAuB,CAAC,QAAQ,EAAE;IACjD,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,QAAQ,EAAE;IACrD,cAAc,EAAE,aAAa,CAAC,QAAQ,EAAE;IACxC,gBAAgB,EAAE,aAAa,CAAC,QAAQ,EAAE;IAC1C,SAAS,EAAE,aAAa;IACxB,SAAS,EAAE,aAAa;CACzB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,gBAAgB,CAAC;IACvC,qBAAqB,EAAE,aAAa,CAAC,QAAQ,EAAE;IAC/C,uBAAuB,EAAE,aAAa,CAAC,QAAQ,EAAE;IACjD,mBAAmB,EAAE,eAAe,CAAC,mBAAmB,CAAC,CAAC,QAAQ,EAAE;IACpE,KAAK,EAAE,eAAe,CAAC,QAAQ,EAAE;IACjC,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACrC,SAAS,EAAE,aAAa;CACzB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,qBAAqB,GAAG,4BAA4B,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;AAGhG,MAAM,qBAAqB,GAAwC;IACjE,WAAW,EAAE,IAAI;IACjB,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;CACd,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,IAAI,CAC7C,qBAAqB,CACgB,CAAC","sourcesContent":["import { z } from 'zod';\nimport { THEME_NAMES } from '@ttt-productions/theme-core';\nimport { EMAIL_MAX_LENGTH } from '../constants/business.js';\nimport { CONTACT_PHONE_INPUT, DISPLAY_NAME_INPUT } from '../constants/text-fields.js';\nimport { BasketballPlayerTotalsSchema, UserLifetimeStatsSchema } from './aggregate-stats.js';\nimport { epochMsSchema, userStatusSchema } from './atoms.js';\nimport { textFieldSchema } from '../schemas/text-field.js';\nimport { awardIdSchema } from './catalogs.js';\n\nexport const themeNameSchema = z.enum(THEME_NAMES);\n\nexport const GrantedAwardSchema = z.object({\n awardId: awardIdSchema,\n grantedAt: epochMsSchema,\n});\nexport type GrantedAward = z.infer<typeof GrantedAwardSchema>;\n\nexport const UserProfileSchema = z.object({\n displayName: textFieldSchema(DISPLAY_NAME_INPUT),\n displayName_lowercase: z.string(),\n userStatus: userStatusSchema,\n lifetimeStats: UserLifetimeStatsSchema.optional(),\n grantedAwards: z.array(GrantedAwardSchema).optional(),\n primaryAwardId: awardIdSchema.optional(),\n secondaryAwardId: awardIdSchema.optional(),\n createdAt: epochMsSchema,\n updatedAt: epochMsSchema,\n});\nexport type UserProfile = z.infer<typeof UserProfileSchema>;\n\nexport const UserPrivateDataSchema = z.object({\n email: z.string().max(EMAIL_MAX_LENGTH),\n registrationStartedAt: epochMsSchema.optional(),\n orphanDeletionClaimedAt: epochMsSchema.optional(),\n defaultContactPhone: textFieldSchema(CONTACT_PHONE_INPUT).optional(),\n theme: themeNameSchema.optional(),\n reducedMotion: z.boolean().optional(),\n updatedAt: epochMsSchema,\n});\nexport type UserPrivateData = z.infer<typeof UserPrivateDataSchema>;\n\nexport const HistoricalStatsSchema = BasketballPlayerTotalsSchema.omit({ fantasyPoints: true });\nexport type HistoricalStats = z.infer<typeof HistoricalStatsSchema>;\n\nconst HISTORICAL_STAT_ENTRY: Record<keyof HistoricalStats, true> = {\n gamesPlayed: true,\n points: true,\n rebounds: true,\n assists: true,\n};\n\nexport const HISTORICAL_STAT_KEYS = Object.keys(\n HISTORICAL_STAT_ENTRY,\n) as readonly (keyof HistoricalStats)[];\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"waiver-template.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/waiver-template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgBxB,eAAO,MAAM,sBAAsB,aAA0B,CAAC;AAC9D,eAAO,MAAM,iCAAiC,aAA0B,CAAC;AAEzE,eAAO,MAAM,oBAAoB;;;;;;;;;iBAgB7B,CAAC;AACL,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAIlE,eAAO,MAAM,4BAA4B;;kBAEvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,2BAA2B;;;;;;iBAMtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
1
+ {"version":3,"file":"waiver-template.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/waiver-template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,eAAO,MAAM,sBAAsB,aAA0B,CAAC;AAC9D,eAAO,MAAM,iCAAiC,aAA0B,CAAC;AAEzE,eAAO,MAAM,oBAAoB;;;;;;;;;iBAgB7B,CAAC;AACL,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAIlE,eAAO,MAAM,4BAA4B;;kBAEvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,2BAA2B;;;;;;iBAMtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
@@ -1,8 +1,9 @@
1
1
  import { z } from 'zod';
2
- import { WAIVER_TEMPLATE_TEXT_INPUT_FORMAT, WAIVER_TEMPLATE_TITLE_INPUT_FORMAT, } from '../input-formats/input-formats.js';
3
- import { countSchema, documentIdSegmentSchema, epochMsSchema, textFieldSchema, userIdSchema, } from './atoms.js';
4
- const waiverTitleSchema = textFieldSchema(WAIVER_TEMPLATE_TITLE_INPUT_FORMAT);
5
- const waiverTextSchema = textFieldSchema(WAIVER_TEMPLATE_TEXT_INPUT_FORMAT);
2
+ import { WAIVER_TEMPLATE_TEXT_INPUT, WAIVER_TEMPLATE_TITLE_INPUT, } from '../constants/text-fields.js';
3
+ import { countSchema, documentIdSegmentSchema, epochMsSchema, userIdSchema } from './atoms.js';
4
+ import { textFieldSchema } from '../schemas/text-field.js';
5
+ const waiverTitleSchema = textFieldSchema(WAIVER_TEMPLATE_TITLE_INPUT);
6
+ const waiverTextSchema = textFieldSchema(WAIVER_TEMPLATE_TEXT_INPUT);
6
7
  export const waiverTemplateIdSchema = documentIdSegmentSchema;
7
8
  export const waiverTemplateVersionNumberSchema = z.number().int().min(1);
8
9
  export const WaiverTemplateSchema = z
@@ -1 +1 @@
1
- {"version":3,"file":"waiver-template.js","sourceRoot":"","sources":["../../src/doc-schemas/waiver-template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,iCAAiC,EACjC,kCAAkC,GACnC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,WAAW,EACX,uBAAuB,EACvB,aAAa,EACb,eAAe,EACf,YAAY,GACb,MAAM,YAAY,CAAC;AAEpB,MAAM,iBAAiB,GAAG,eAAe,CAAC,kCAAkC,CAAC,CAAC;AAC9E,MAAM,gBAAgB,GAAG,eAAe,CAAC,iCAAiC,CAAC,CAAC;AAE5E,MAAM,CAAC,MAAM,sBAAsB,GAAG,uBAAuB,CAAC;AAC9D,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAEzE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC;KAClC,MAAM,CAAC;IACN,KAAK,EAAE,iBAAiB;IACxB,UAAU,EAAE,gBAAgB;IAC5B,OAAO,EAAE,iCAAiC;IAC1C,SAAS,EAAE,aAAa;IACxB,SAAS,EAAE,aAAa;IACxB,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,SAAS,EAAE,aAAa,CAAC,QAAQ,EAAE;IACnC,2FAA2F;IAC3F,0EAA0E;IAC1E,YAAY,EAAE,aAAa,CAAC,QAAQ,EAAE;CACvC,CAAC;KACD,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,KAAK,CAAC,QAAQ,CAAC,SAAS,KAAK,SAAS,CAAC,EAAE;IAC7E,OAAO,EAAE,oEAAoE;IAC7E,IAAI,EAAE,CAAC,SAAS,CAAC;CAClB,CAAC,CAAC;AAGL,qFAAqF;AACrF,qDAAqD;AACrD,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,YAAY,CAAC;IACzD,gBAAgB,EAAE,WAAW;CAC9B,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,OAAO,EAAE,iCAAiC;IAC1C,KAAK,EAAE,iBAAiB;IACxB,UAAU,EAAE,gBAAgB;IAC5B,iBAAiB,EAAE,YAAY,CAAC,QAAQ,EAAE;IAC1C,WAAW,EAAE,aAAa;CAC3B,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport {\n WAIVER_TEMPLATE_TEXT_INPUT_FORMAT,\n WAIVER_TEMPLATE_TITLE_INPUT_FORMAT,\n} from '../input-formats/input-formats.js';\nimport {\n countSchema,\n documentIdSegmentSchema,\n epochMsSchema,\n textFieldSchema,\n userIdSchema,\n} from './atoms.js';\n\nconst waiverTitleSchema = textFieldSchema(WAIVER_TEMPLATE_TITLE_INPUT_FORMAT);\nconst waiverTextSchema = textFieldSchema(WAIVER_TEMPLATE_TEXT_INPUT_FORMAT);\n\nexport const waiverTemplateIdSchema = documentIdSegmentSchema;\nexport const waiverTemplateVersionNumberSchema = z.number().int().min(1);\n\nexport const WaiverTemplateSchema = z\n .object({\n title: waiverTitleSchema,\n waiverText: waiverTextSchema,\n version: waiverTemplateVersionNumberSchema,\n createdAt: epochMsSchema,\n updatedAt: epochMsSchema,\n retired: z.boolean(),\n retiredAt: epochMsSchema.optional(),\n // Its own field, so `updatedAt` keeps meaning the template itself changed; the league save\n // writes it so a delete's read of this document conflicts with that save.\n lastChosenAt: epochMsSchema.optional(),\n })\n .refine((template) => template.retired === (template.retiredAt !== undefined), {\n message: 'A template is retired exactly when it records when it was retired.',\n path: ['retired'],\n });\nexport type WaiverTemplate = z.infer<typeof WaiverTemplateSchema>;\n\n// `_serverData/waiverTemplateRegistry` — the write fence of the offered-template cap\n// (RULE-STD-BACKEND-116): only its changing matters.\nexport const WaiverTemplateRegistrySchema = z.strictObject({\n templateRevision: countSchema,\n});\nexport type WaiverTemplateRegistry = z.infer<typeof WaiverTemplateRegistrySchema>;\n\nexport const WaiverTemplateVersionSchema = z.object({\n version: waiverTemplateVersionNumberSchema,\n title: waiverTitleSchema,\n waiverText: waiverTextSchema,\n publishedByUserId: userIdSchema.optional(),\n publishedAt: epochMsSchema,\n});\nexport type WaiverTemplateVersion = z.infer<typeof WaiverTemplateVersionSchema>;\n"]}
1
+ {"version":3,"file":"waiver-template.js","sourceRoot":"","sources":["../../src/doc-schemas/waiver-template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/F,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,MAAM,iBAAiB,GAAG,eAAe,C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ER_TEMPLATE_TEXT_INPUT,\n WAIVER_TEMPLATE_TITLE_INPUT,\n} from '../constants/text-fields.js';\nimport { countSchema, documentIdSegmentSchema, epochMsSchema, userIdSchema } from './atoms.js';\nimport { textFieldSchema } from '../schemas/text-field.js';\n\nconst waiverTitleSchema = textFieldSchema(WAIVER_TEMPLATE_TITLE_INPUT);\nconst waiverTextSchema = textFieldSchema(WAIVER_TEMPLATE_TEXT_INPUT);\n\nexport const waiverTemplateIdSchema = documentIdSegmentSchema;\nexport const waiverTemplateVersionNumberSchema = z.number().int().min(1);\n\nexport const WaiverTemplateSchema = z\n .object({\n title: waiverTitleSchema,\n waiverText: waiverTextSchema,\n version: waiverTemplateVersionNumberSchema,\n createdAt: epochMsSchema,\n updatedAt: epochMsSchema,\n retired: z.boolean(),\n retiredAt: epochMsSchema.optional(),\n // Its own field, so `updatedAt` keeps meaning the template itself changed; the league save\n // writes it so a delete's read of this document conflicts with that save.\n lastChosenAt: epochMsSchema.optional(),\n })\n .refine((template) => template.retired === (template.retiredAt !== undefined), {\n message: 'A template is retired exactly when it records when it was retired.',\n path: ['retired'],\n });\nexport type WaiverTemplate = z.infer<typeof WaiverTemplateSchema>;\n\n// `_serverData/waiverTemplateRegistry` — the write fence of the offered-template cap\n// (RULE-STD-BACKEND-116): only its changing matters.\nexport const WaiverTemplateRegistrySchema = z.strictObject({\n templateRevision: countSchema,\n});\nexport type WaiverTemplateRegistry = z.infer<typeof WaiverTemplateRegistrySchema>;\n\nexport const WaiverTemplateVersionSchema = z.object({\n version: waiverTemplateVersionNumberSchema,\n title: waiverTitleSchema,\n waiverText: waiverTextSchema,\n publishedByUserId: userIdSchema.optional(),\n publishedAt: epochMsSchema,\n});\nexport type WaiverTemplateVersion = z.infer<typeof WaiverTemplateVersionSchema>;\n"]}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- export * from './input-formats/input-formats.js';
2
1
  export * from './migration-console/action-ids.js';
3
2
  export * from './migration-console/console-lock.js';
4
3
  export * from './migration-console/consumed-source.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,wCAAwC,CAAC;AACvD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,wCAAwC,CAAC;AACvD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC"}
package/dist/index.js CHANGED
@@ -1,4 +1,3 @@
1
- export * from './input-formats/input-formats.js';
2
1
  export * from './migration-console/action-ids.js';
3
2
  export * from './migration-console/console-lock.js';
4
3
  export * from './migration-console/consumed-source.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,wCAAwC,CAAC;AACvD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC","sourcesContent":["export * from './input-formats/input-formats.js';\nexport * from './migration-console/action-ids.js';\nexport * from './migration-console/console-lock.js';\nexport * from './migration-console/consumed-source.js';\nexport * from './migration-console/manifest.js';\nexport * from './migration-console/run-state.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,wCAAwC,CAAC;AACvD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC","sourcesContent":["export * from './migration-console/action-ids.js';\nexport * from './migration-console/console-lock.js';\nexport * from './migration-console/consumed-source.js';\nexport * from './migration-console/manifest.js';\nexport * from './migration-console/run-state.js';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"app-config.d.ts","sourceRoot":"","sources":["../../src/schemas/app-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,eAAO,MAAM,0BAA0B;;;;;;kBAWnC,CAAC;AACL,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,2BAA2B;;;;;;;;kBAE7B,CAAC;AACZ,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,iCAAiC;;;kBAQ1C,CAAC;AACL,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F,eAAO,MAAM,kCAAkC;;;;kBAMpC,CAAC;AACZ,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC"}
1
+ {"version":3,"file":"app-config.d.ts","sourceRoot":"","sources":["../../src/schemas/app-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,0BAA0B;;;;;;kBAWnC,CAAC;AACL,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,2BAA2B;;;;;;;;kBAE7B,CAAC;AACZ,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,iCAAiC;;;kBAQ1C,CAAC;AACL,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F,eAAO,MAAM,kCAAkC;;;;kBAMpC,CAAC;AACZ,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC"}
@@ -1,14 +1,15 @@
1
1
  import { z } from 'zod';
2
- import { epochMsSchema, textFieldSchema } from '../doc-schemas/atoms.js';
3
- import { ANNOUNCEMENT_MESSAGE_INPUT_FORMAT, APP_VERSION_INPUT_FORMAT, LANDING_ABOUT_TEXT_INPUT_FORMAT, LANDING_HERO_TITLE_INPUT_FORMAT, MAINTENANCE_MESSAGE_INPUT_FORMAT, } from '../input-formats/input-formats.js';
2
+ import { epochMsSchema } from '../doc-schemas/atoms.js';
3
+ import { textFieldSchema } from './text-field.js';
4
+ import { ANNOUNCEMENT_MESSAGE_INPUT, APP_VERSION_INPUT, LANDING_ABOUT_TEXT_INPUT, LANDING_HERO_TITLE_INPUT, MAINTENANCE_MESSAGE_INPUT, } from '../constants/text-fields.js';
4
5
  import { AppConfigSchema } from '../doc-schemas/system.js';
5
6
  export const UpdateAppConfigInputSchema = z
6
7
  .object({
7
- appVersion: textFieldSchema(APP_VERSION_INPUT_FORMAT).optional(),
8
+ appVersion: textFieldSchema(APP_VERSION_INPUT).optional(),
8
9
  maintenanceMode: z.boolean().optional(),
9
- maintenanceMessage: textFieldSchema(MAINTENANCE_MESSAGE_INPUT_FORMAT).optional(),
10
+ maintenanceMessage: textFieldSchema(MAINTENANCE_MESSAGE_INPUT).optional(),
10
11
  registrationEnabled: z.boolean().optional(),
11
- announcementMessage: textFieldSchema(ANNOUNCEMENT_MESSAGE_INPUT_FORMAT).optional(),
12
+ announcementMessage: textFieldSchema(ANNOUNCEMENT_MESSAGE_INPUT).optional(),
12
13
  })
13
14
  .strict()
14
15
  .refine((input) => Object.values(input).some((value) => value !== undefined), {
@@ -19,8 +20,8 @@ export const UpdateAppConfigResultSchema = z
19
20
  .strict();
20
21
  export const AdminUpdateLandingPageInputSchema = z
21
22
  .object({
22
- heroTitle: textFieldSchema(LANDING_HERO_TITLE_INPUT_FORMAT).optional(),
23
- aboutCompany: textFieldSchema(LANDING_ABOUT_TEXT_INPUT_FORMAT).optional(),
23
+ heroTitle: textFieldSchema(LANDING_HERO_TITLE_INPUT).optional(),
24
+ aboutCompany: textFieldSchema(LANDING_ABOUT_TEXT_INPUT).optional(),
24
25
  })
25
26
  .strict()
26
27
  .refine((input) => Object.values(input).some((value) => value !== undefined), {
@@ -1 +1 @@
1
- {"version":3,"file":"app-config.js","sourceRoot":"","sources":["../../src/schemas/app-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EACL,iCAAiC,EACjC,wBAAwB,EACxB,+BAA+B,EAC/B,+BAA+B,EAC/B,gCAAgC,GACjC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC;KACxC,MAAM,CAAC;IACN,UAAU,EAAE,eAAe,CAAC,wBAAwB,CAAC,CAAC,QAAQ,EAAE;IAChE,eAAe,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACvC,kBAAkB,EAAE,eAAe,CAAC,gCAAgC,CAAC,CAAC,QAAQ,EAAE;IAChF,mBAAmB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC3C,mBAAmB,EAAE,eAAe,CAAC,iCAAiC,CAAC,CAAC,QAAQ,EAAE;CACnF,CAAC;KACD,MAAM,EAAE;KACR,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,EAAE;IAC5E,OAAO,EAAE,8BAA8B;CACxC,CAAC,CAAC;AAGL,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC;KACzC,MAAM,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC;KAC3D,MAAM,EAAE,CAAC;AAGZ,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC;KAC/C,MAAM,CAAC;IACN,SAAS,EAAE,eAAe,CAAC,+BAA+B,CAAC,CAAC,QAAQ,EAAE;IACtE,YAAY,EAAE,eAAe,CAAC,+BAA+B,CAAC,CAAC,QAAQ,EAAE;CAC1E,CAAC;KACD,MAAM,EAAE;KACR,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,EAAE;IAC5E,OAAO,EAAE,4BAA4B;CACtC,CAAC,CAAC;AAGL,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC;KAChD,MAAM,CAAC;IACN,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,SAAS,EAAE,aAAa;CACzB,CAAC;KACD,MAAM,EAAE,CAAC","sourcesContent":["import { z } from 'zod';\nimport { epochMsSchema, textFieldSchema } from '../doc-schemas/atoms.js';\nimport {\n ANNOUNCEMENT_MESSAGE_INPUT_FORMAT,\n APP_VERSION_INPUT_FORMAT,\n LANDING_ABOUT_TEXT_INPUT_FORMAT,\n LANDING_HERO_TITLE_INPUT_FORMAT,\n MAINTENANCE_MESSAGE_INPUT_FORMAT,\n} from '../input-formats/input-formats.js';\nimport { AppConfigSchema } from '../doc-schemas/system.js';\n\nexport const UpdateAppConfigInputSchema = z\n .object({\n appVersion: textFieldSchema(APP_VERSION_INPUT_FORMAT).optional(),\n maintenanceMode: z.boolean().optional(),\n maintenanceMessage: textFieldSchema(MAINTENANCE_MESSAGE_INPUT_FORMAT).optional(),\n registrationEnabled: z.boolean().optional(),\n announcementMessage: textFieldSchema(ANNOUNCEMENT_MESSAGE_INPUT_FORMAT).optional(),\n })\n .strict()\n .refine((input) => Object.values(input).some((value) => value !== undefined), {\n message: 'Change at least one setting.',\n });\nexport type UpdateAppConfigInput = z.infer<typeof UpdateAppConfigInputSchema>;\n\nexport const UpdateAppConfigResultSchema = z\n .object({ updatedFields: z.array(AppConfigSchema.keyof()) })\n .strict();\nexport type UpdateAppConfigResult = z.infer<typeof UpdateAppConfigResultSchema>;\n\nexport const AdminUpdateLandingPageInputSchema = z\n .object({\n heroTitle: textFieldSchema(LANDING_HERO_TITLE_INPUT_FORMAT).optional(),\n aboutCompany: textFieldSchema(LANDING_ABOUT_TEXT_INPUT_FORMAT).optional(),\n })\n .strict()\n .refine((input) => Object.values(input).some((value) => value !== undefined), {\n message: 'Change at least one field.',\n });\nexport type AdminUpdateLandingPageInput = z.infer<typeof AdminUpdateLandingPageInputSchema>;\n\nexport const AdminUpdateLandingPageResultSchema = z\n .object({\n heroTitle: z.string(),\n aboutCompany: z.string(),\n updatedAt: epochMsSchema,\n })\n .strict();\nexport type AdminUpdateLandingPageResult = z.infer<typeof AdminUpdateLandingPageResultSchema>;\n"]}
1
+ {"version":3,"file":"app-config.js","sourceRoot":"","sources":["../../src/schemas/app-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EACL,0BAA0B,EAC1B,iBAAiB,EACjB,wBAAwB,EACxB,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC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AM,CAAC,MAAM,kCAAkC,GAAG,CAAC;KAChD,MAAM,CAAC;IACN,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,SAAS,EAAE,aAAa;CACzB,CAAC;KACD,MAAM,EAAE,CAAC","sourcesContent":["import { z } from 'zod';\nimport { epochMsSchema } from '../doc-schemas/atoms.js';\nimport { textFieldSchema } from './text-field.js';\nimport {\n ANNOUNCEMENT_MESSAGE_INPUT,\n APP_VERSION_INPUT,\n LANDING_ABOUT_TEXT_INPUT,\n LANDING_HERO_TITLE_INPUT,\n MAINTENANCE_MESSAGE_INPUT,\n} from '../constants/text-fields.js';\nimport { AppConfigSchema } from '../doc-schemas/system.js';\n\nexport const UpdateAppConfigInputSchema = z\n .object({\n appVersion: textFieldSchema(APP_VERSION_INPUT).optional(),\n maintenanceMode: z.boolean().optional(),\n maintenanceMessage: textFieldSchema(MAINTENANCE_MESSAGE_INPUT).optional(),\n registrationEnabled: z.boolean().optional(),\n announcementMessage: textFieldSchema(ANNOUNCEMENT_MESSAGE_INPUT).optional(),\n })\n .strict()\n .refine((input) => Object.values(input).some((value) => value !== undefined), {\n message: 'Change at least one setting.',\n });\nexport type UpdateAppConfigInput = z.infer<typeof UpdateAppConfigInputSchema>;\n\nexport const UpdateAppConfigResultSchema = z\n .object({ updatedFields: z.array(AppConfigSchema.keyof()) })\n .strict();\nexport type UpdateAppConfigResult = z.infer<typeof UpdateAppConfigResultSchema>;\n\nexport const AdminUpdateLandingPageInputSchema = z\n .object({\n heroTitle: textFieldSchema(LANDING_HERO_TITLE_INPUT).optional(),\n aboutCompany: textFieldSchema(LANDING_ABOUT_TEXT_INPUT).optional(),\n })\n .strict()\n .refine((input) => Object.values(input).some((value) => value !== undefined), {\n message: 'Change at least one field.',\n });\nexport type AdminUpdateLandingPageInput = z.infer<typeof AdminUpdateLandingPageInputSchema>;\n\nexport const AdminUpdateLandingPageResultSchema = z\n .object({\n heroTitle: z.string(),\n aboutCompany: z.string(),\n updatedAt: epochMsSchema,\n })\n .strict();\nexport type AdminUpdateLandingPageResult = z.infer<typeof AdminUpdateLandingPageResultSchema>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"atoms.d.ts","sourceRoot":"","sources":["../../src/schemas/atoms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,eAAO,MAAM,iBAAiB;;;EAA8B,CAAC;AAC7D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,sBAAsB,aAA0B,CAAC;AAC9D,eAAO,MAAM,uBAAuB,aAA0B,CAAC;AAE/D,eAAO,MAAM,iBAAiB,wDAA6C,CAAC;AAC5E,eAAO,MAAM,cAAc,wDAA0C,CAAC;AACtE,eAAO,MAAM,4BAA4B,wDAA0D,CAAC;AACpG,eAAO,MAAM,2BAA2B,wDAAwD,CAAC;AACjG,eAAO,MAAM,kBAAkB,wDAA8C,CAAC"}
1
+ {"version":3,"file":"atoms.d.ts","sourceRoot":"","sources":["../../src/schemas/atoms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,iBAAiB;;;EAA8B,CAAC;AAC7D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,sBAAsB,aAA0B,CAAC;AAC9D,eAAO,MAAM,uBAAuB,aAA0B,CAAC;AAE/D,eAAO,MAAM,iBAAiB,wDAAsC,CAAC;AACrE,eAAO,MAAM,cAAc,wDAAmC,CAAC;AAC/D,eAAO,MAAM,4BAA4B,wDAAmD,CAAC;AAC7F,eAAO,MAAM,2BAA2B,wDAAiD,CAAC;AAC1F,eAAO,MAAM,kBAAkB,wDAAuC,CAAC"}
@@ -1,12 +1,13 @@
1
1
  import { z } from 'zod';
2
- import { CONTACT_PHONE_INPUT_FORMAT, DISPLAY_NAME_INPUT_FORMAT, TEAM_INVITATION_MESSAGE_INPUT_FORMAT, TEAM_JOIN_REQUEST_MESSAGE_INPUT_FORMAT, TEAM_NAME_INPUT_FORMAT, } from '../input-formats/input-formats.js';
3
- import { documentIdSegmentSchema, textFieldSchema } from '../doc-schemas/atoms.js';
2
+ import { CONTACT_PHONE_INPUT, DISPLAY_NAME_INPUT, TEAM_INVITATION_MESSAGE_INPUT, TEAM_JOIN_REQUEST_MESSAGE_INPUT, TEAM_NAME_INPUT, } from '../constants/text-fields.js';
3
+ import { documentIdSegmentSchema } from '../doc-schemas/atoms.js';
4
+ import { textFieldSchema } from './text-field.js';
4
5
  export const actingEntrySchema = z.enum(['member', 'admin']);
5
6
  export const teamInvitationIdSchema = documentIdSegmentSchema;
6
7
  export const teamJoinRequestIdSchema = documentIdSegmentSchema;
7
- export const displayNameSchema = textFieldSchema(DISPLAY_NAME_INPUT_FORMAT);
8
- export const teamNameSchema = textFieldSchema(TEAM_NAME_INPUT_FORMAT);
9
- export const teamJoinRequestMessageSchema = textFieldSchema(TEAM_JOIN_REQUEST_MESSAGE_INPUT_FORMAT);
10
- export const teamInvitationMessageSchema = textFieldSchema(TEAM_INVITATION_MESSAGE_INPUT_FORMAT);
11
- export const contactPhoneSchema = textFieldSchema(CONTACT_PHONE_INPUT_FORMAT);
8
+ export const displayNameSchema = textFieldSchema(DISPLAY_NAME_INPUT);
9
+ export const teamNameSchema = textFieldSchema(TEAM_NAME_INPUT);
10
+ export const teamJoinRequestMessageSchema = textFieldSchema(TEAM_JOIN_REQUEST_MESSAGE_INPUT);
11
+ export const teamInvitationMessageSchema = textFieldSchema(TEAM_INVITATION_MESSAGE_INPUT);
12
+ export const contactPhoneSchema = textFieldSchema(CONTACT_PHONE_INPUT);
12
13
  //# sourceMappingURL=atoms.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"atoms.js","sourceRoot":"","sources":["../../src/schemas/atoms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,0BAA0B,EAC1B,yBAAyB,EACzB,oCAAoC,EACpC,sCAAsC,EACtC,sBAAsB,GACvB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAEnF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;AAG7D,MAAM,CAAC,MAAM,sBAAsB,GAAG,uBAAuB,CAAC;AAC9D,MAAM,CAAC,MAAM,uBAAuB,GAAG,uBAAuB,CAAC;AAE/D,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC,yBAAyB,CAAC,CAAC;AAC5E,MAAM,CAAC,MAAM,cAAc,GAAG,eAAe,CAAC,sBAAsB,CAAC,CAAC;AACtE,MAAM,CAAC,MAAM,4BAA4B,GAAG,eAAe,CAAC,sCAAsC,CAAC,CAAC;AACpG,MAAM,CAAC,MAAM,2BAA2B,GAAG,eAAe,CAAC,oCAAoC,CAAC,CAAC;AACjG,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC,0BAA0B,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport {\n CONTACT_PHONE_INPUT_FORMAT,\n DISPLAY_NAME_INPUT_FORMAT,\n TEAM_INVITATION_MESSAGE_INPUT_FORMAT,\n TEAM_JOIN_REQUEST_MESSAGE_INPUT_FORMAT,\n TEAM_NAME_INPUT_FORMAT,\n} from '../input-formats/input-formats.js';\n\nimport { documentIdSegmentSchema, textFieldSchema } from '../doc-schemas/atoms.js';\n\nexport const actingEntrySchema = z.enum(['member', 'admin']);\nexport type ActingEntry = z.infer<typeof actingEntrySchema>;\n\nexport const teamInvitationIdSchema = documentIdSegmentSchema;\nexport const teamJoinRequestIdSchema = documentIdSegmentSchema;\n\nexport const displayNameSchema = textFieldSchema(DISPLAY_NAME_INPUT_FORMAT);\nexport const teamNameSchema = textFieldSchema(TEAM_NAME_INPUT_FORMAT);\nexport const teamJoinRequestMessageSchema = textFieldSchema(TEAM_JOIN_REQUEST_MESSAGE_INPUT_FORMAT);\nexport const teamInvitationMessageSchema = textFieldSchema(TEAM_INVITATION_MESSAGE_INPUT_FORMAT);\nexport const contactPhoneSchema = textFieldSchema(CONTACT_PHONE_INPUT_FORMAT);\n"]}
1
+ {"version":3,"file":"atoms.js","sourceRoot":"","sources":["../../src/schemas/atoms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,6BAA6B,EAC7B,+BAA+B,EAC/B,eAAe,GAChB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;AAG7D,MAAM,CAAC,MAAM,sBAAsB,GAAG,uBAAuB,CAAC;AAC9D,MAAM,CAAC,MAAM,uBAAuB,GAAG,uBAAuB,CAAC;AAE/D,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC,kBAAkB,CAAC,CAAC;AACrE,MAAM,CAAC,MAAM,cAAc,GAAG,eAAe,CAAC,eAAe,CAAC,CAAC;AAC/D,MAAM,CAAC,MAAM,4BAA4B,GAAG,eAAe,CAAC,+BAA+B,CAAC,CAAC;AAC7F,MAAM,CAAC,MAAM,2BAA2B,GAAG,eAAe,CAAC,6BAA6B,CAAC,CAAC;AAC1F,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC,mBAAmB,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport {\n CONTACT_PHONE_INPUT,\n DISPLAY_NAME_INPUT,\n TEAM_INVITATION_MESSAGE_INPUT,\n TEAM_JOIN_REQUEST_MESSAGE_INPUT,\n TEAM_NAME_INPUT,\n} from '../constants/text-fields.js';\n\nimport { documentIdSegmentSchema } from '../doc-schemas/atoms.js';\nimport { textFieldSchema } from './text-field.js';\n\nexport const actingEntrySchema = z.enum(['member', 'admin']);\nexport type ActingEntry = z.infer<typeof actingEntrySchema>;\n\nexport const teamInvitationIdSchema = documentIdSegmentSchema;\nexport const teamJoinRequestIdSchema = documentIdSegmentSchema;\n\nexport const displayNameSchema = textFieldSchema(DISPLAY_NAME_INPUT);\nexport const teamNameSchema = textFieldSchema(TEAM_NAME_INPUT);\nexport const teamJoinRequestMessageSchema = textFieldSchema(TEAM_JOIN_REQUEST_MESSAGE_INPUT);\nexport const teamInvitationMessageSchema = textFieldSchema(TEAM_INVITATION_MESSAGE_INPUT);\nexport const contactPhoneSchema = textFieldSchema(CONTACT_PHONE_INPUT);\n"]}