@ttt-productions/ttt-core 0.79.44 → 0.79.46

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 (33) hide show
  1. package/dist/constants/business-content.d.ts +7 -6
  2. package/dist/constants/business-content.d.ts.map +1 -1
  3. package/dist/constants/business-content.js +14 -12
  4. package/dist/constants/business-content.js.map +1 -1
  5. package/dist/constants/hall-content-routing.d.ts +32 -0
  6. package/dist/constants/hall-content-routing.d.ts.map +1 -0
  7. package/dist/constants/hall-content-routing.js +37 -0
  8. package/dist/constants/hall-content-routing.js.map +1 -0
  9. package/dist/doc-schemas/content.d.ts +4 -4
  10. package/dist/doc-schemas/content.d.ts.map +1 -1
  11. package/dist/doc-schemas/content.js +3 -6
  12. package/dist/doc-schemas/content.js.map +1 -1
  13. package/dist/doc-schemas/registry.d.ts +2 -2
  14. package/dist/doc-schemas/work-project.d.ts +12 -0
  15. package/dist/doc-schemas/work-project.d.ts.map +1 -1
  16. package/dist/doc-schemas/work-project.js +10 -2
  17. package/dist/doc-schemas/work-project.js.map +1 -1
  18. package/dist/media/domain-events-work.d.ts.map +1 -1
  19. package/dist/media/domain-events-work.js +3 -2
  20. package/dist/media/domain-events-work.js.map +1 -1
  21. package/dist/media/hall-library-target-fields.d.ts +2 -2
  22. package/dist/media/hall-library-target-fields.d.ts.map +1 -1
  23. package/dist/media/hall-library-target-fields.js +6 -5
  24. package/dist/media/hall-library-target-fields.js.map +1 -1
  25. package/dist/media/target-info.d.ts.map +1 -1
  26. package/dist/media/target-info.js +2 -1
  27. package/dist/media/target-info.js.map +1 -1
  28. package/dist/schemas/admin.d.ts +2 -2
  29. package/dist/schemas/atoms.d.ts +2 -2
  30. package/dist/types/work-project.d.ts +1 -1
  31. package/dist/types/work-project.d.ts.map +1 -1
  32. package/dist/types/work-project.js.map +1 -1
  33. package/package.json +1 -1
@@ -1,4 +1,5 @@
1
1
  import type { WorkProjectType } from '../types/content.js';
2
+ export { HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE, HALL_CONTENT_DETAIL_SURFACES, HALL_CONTENT_SUB_ITEM_SURFACES, type HallContentDetailSurface, type HallContentSubItemSurface, } from './hall-content-routing.js';
2
3
  /** The maximum character length for a SquareStreetz post created on behalf of a workProject. */
3
4
  export declare const MAX_SQUARE_STREETZ_DESCRIPTION_LENGTH = 150;
4
5
  /** Maximum number of open commissions a workProject can have. Mode-varied. */
@@ -115,17 +116,17 @@ export interface HallContentSurfaceRouting {
115
116
  subItemFields: readonly ClearableTextFieldName[];
116
117
  }
117
118
  /**
118
- * CANONICAL WorkProjectType → hall text-surface routing. The ONE owner of "a Tale's sub-item is
119
- * a chapter, a Tune's is a tuneTrack, a Television's is a televisionEpisode" and of which fields
120
- * each of those surfaces exposes. Cross-boundary: the backend text-clear and change-request
119
+ * WorkProjectType → hall text-surface routing. Surface identities project from the lower-level
120
+ * `HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE` owner; this map adds the clearable field tuples each
121
+ * surface exposes. Cross-boundary: the backend text-clear and change-request
121
122
  * runners resolve `surface` from (workProjectType, is-sub-item?) through this map, and the admin
122
123
  * field pickers project their checkbox options from the same entry — three sites that each
123
124
  * hand-rolled the routing before (a ternary that fell through to the tuneTrack tuple for
124
125
  * Television, silently correct only because the two tuples happen to match today).
125
126
  *
126
- * Every field tuple is PROJECTED from MODERATION_CLEARABLE_TEXT_FIELDS above — no field literal
127
- * is restated here — and the `satisfies Record<WorkProjectType, …>` makes adding a work-project
128
- * type a compile error until its surfaces are routed.
127
+ * Every identity and field tuple is PROJECTED from its canonical owner — no surface or field
128
+ * literal is restated here — and the `satisfies Record<WorkProjectType, …>` makes adding a
129
+ * work-project type a compile error until its surfaces are routed.
129
130
  */
130
131
  export declare const HALL_CONTENT_SURFACES_BY_WORK_TYPE: {
131
132
  readonly Tales: {
@@ -1 +1 @@
1
- {"version":3,"file":"business-content.d.ts","sourceRoot":"","sources":["../../src/constants/business-content.ts"],"names":[],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SAAU,CAAC;AAEzD;;;;;GAKG;AACH,eAAO,MAAM,kCAAkC,sGACiD,CAAC;AAIjG,+CAA+C;AAC/C,eAAO,MAAM,eAAe,MAAM,CAAC;AAEnC,yEAAyE;AACzE,eAAO,MAAM,YAAY,IAAI,CAAC;AAE9B,8EAA8E;AAC9E,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAI7C,iDAAiD;AACjD,eAAO,MAAM,+BAA+B,MAAM,CAAC;AAEnD,kDAAkD;AAClD,eAAO,MAAM,iCAAiC,MAAM,CAAC"}
@@ -3,6 +3,8 @@
3
3
  import { MAX_WORK_PROJECT_TITLE_LENGTH, MAX_WORK_PROJECT_DESCRIPTION_LENGTH, MAX_CHAPTER_CONTENT_LENGTH, MAX_WORK_REALM_TITLE_LENGTH, MAX_WORK_REALM_DESCRIPTION_LENGTH, } from "./business-work-project.js";
4
4
  import { ACTIVE_LIMITS } from './app-mode.js';
5
5
  import { HALL_LIBRARY_TARGET_FIELDS } from '../media/hall-library-target-fields.js';
6
+ import { HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE } from './hall-content-routing.js';
7
+ export { HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE, HALL_CONTENT_DETAIL_SURFACES, HALL_CONTENT_SUB_ITEM_SURFACES, } from './hall-content-routing.js';
6
8
  /** The maximum character length for a SquareStreetz post created on behalf of a workProject. */
7
9
  export const MAX_SQUARE_STREETZ_DESCRIPTION_LENGTH = 150;
8
10
  // --- Commission Board & Proposals ---
@@ -98,35 +100,35 @@ export const HALL_CONTENT_TEXT_FIELD_MAX = {
98
100
  workingDescription: MAX_WORK_REALM_DESCRIPTION_LENGTH,
99
101
  };
100
102
  /**
101
- * CANONICAL WorkProjectType → hall text-surface routing. The ONE owner of "a Tale's sub-item is
102
- * a chapter, a Tune's is a tuneTrack, a Television's is a televisionEpisode" and of which fields
103
- * each of those surfaces exposes. Cross-boundary: the backend text-clear and change-request
103
+ * WorkProjectType → hall text-surface routing. Surface identities project from the lower-level
104
+ * `HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE` owner; this map adds the clearable field tuples each
105
+ * surface exposes. Cross-boundary: the backend text-clear and change-request
104
106
  * runners resolve `surface` from (workProjectType, is-sub-item?) through this map, and the admin
105
107
  * field pickers project their checkbox options from the same entry — three sites that each
106
108
  * hand-rolled the routing before (a ternary that fell through to the tuneTrack tuple for
107
109
  * Television, silently correct only because the two tuples happen to match today).
108
110
  *
109
- * Every field tuple is PROJECTED from MODERATION_CLEARABLE_TEXT_FIELDS above — no field literal
110
- * is restated here — and the `satisfies Record<WorkProjectType, …>` makes adding a work-project
111
- * type a compile error until its surfaces are routed.
111
+ * Every identity and field tuple is PROJECTED from its canonical owner — no surface or field
112
+ * literal is restated here — and the `satisfies Record<WorkProjectType, …>` makes adding a
113
+ * work-project type a compile error until its surfaces are routed.
112
114
  */
113
115
  export const HALL_CONTENT_SURFACES_BY_WORK_TYPE = {
114
116
  Tales: {
115
- detailSurface: 'tale',
117
+ detailSurface: HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE.Tales.detailSurface,
116
118
  detailFields: MODERATION_CLEARABLE_TEXT_FIELDS.tale,
117
- subItemSurface: 'chapter',
119
+ subItemSurface: HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE.Tales.subItemSurface,
118
120
  subItemFields: MODERATION_CLEARABLE_TEXT_FIELDS.chapter,
119
121
  },
120
122
  Tunes: {
121
- detailSurface: 'tune',
123
+ detailSurface: HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE.Tunes.detailSurface,
122
124
  detailFields: MODERATION_CLEARABLE_TEXT_FIELDS.tune,
123
- subItemSurface: 'tuneTrack',
125
+ subItemSurface: HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE.Tunes.subItemSurface,
124
126
  subItemFields: MODERATION_CLEARABLE_TEXT_FIELDS.tuneTrack,
125
127
  },
126
128
  Television: {
127
- detailSurface: 'television',
129
+ detailSurface: HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE.Television.detailSurface,
128
130
  detailFields: MODERATION_CLEARABLE_TEXT_FIELDS.television,
129
- subItemSurface: 'televisionEpisode',
131
+ subItemSurface: HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE.Television.subItemSurface,
130
132
  subItemFields: MODERATION_CLEARABLE_TEXT_FIELDS.televisionEpisode,
131
133
  },
132
134
  };
@@ -1 +1 @@
1
- {"version":3,"file":"business-content.js","sourceRoot":"","sources":["../../src/constants/business-content.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,uBAAuB;AACvB,OAAO,EACL,6BAA6B,EAC7B,mCAAmC,EACnC,0BAA0B,EAC1B,2BAA2B,EAC3B,iCAAiC,GAClC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AAGpF,gGAAgG;AAChG,MAAM,CAAC,MAAM,qCAAqC,GAAG,GAAG,CAAC;AAEzD,uCAAuC;AAEvC,8EAA8E;AAC9E,MAAM,CAAC,MAAM,uBAAuB,GAAG,aAAa,CAAC,WAAW,CAAC,qBAAqB,CAAC;AAEvF,iEAAiE;AACjE,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC;AAE7C,6CAA6C;AAC7C,MAAM,CAAC,MAAM,2BAA2B,GAAG,6BAA6B,CAAC;AAEzE,kEAAkE;AAClE,MAAM,CAAC,MAAM,iCAAiC,GAAG,GAAG,CAAC;AAErD,qEAAqE;AAErE;;;;GAIG;AACH,MAAM,CAAC,MAAM,4BAA4B,GACvC,4DAA4D,CAAC;AAE/D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,wBAAwB,CAAC;AAC1E,MAAM,CAAC,MAAM,iCAAiC,GAAG,0CAA0C,CAAC;AAE5F;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,yCAAyC;IACzC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,OAAO,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAC7C,8FAA8F,CAAC;AAEjG,sCAAsC;AAEtC,+CAA+C;AAC/C,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAC;AAEnC,yEAAyE;AACzE,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC;AAE9B,8EAA8E;AAC9E,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAE7C,6BAA6B;AAE7B,iDAAiD;AACjD,MAAM,CAAC,MAAM,+BAA+B,GAAG,GAAG,CAAC;AAEnD,kDAAkD;AAClD,MAAM,CAAC,MAAM,iCAAiC,GAAG,GAAG,CAAC","sourcesContent":["// Content-surface business-rule constants — commissions, auditions, the social\n// feed, and messaging.\nimport {\n MAX_WORK_PROJECT_TITLE_LENGTH,\n MAX_WORK_PROJECT_DESCRIPTION_LENGTH,\n MAX_CHAPTER_CONTENT_LENGTH,\n MAX_WORK_REALM_TITLE_LENGTH,\n MAX_WORK_REALM_DESCRIPTION_LENGTH,\n} from \"./business-work-project.js\";\nimport { ACTIVE_LIMITS } from './app-mode.js';\nimport { HALL_LIBRARY_TARGET_FIELDS } from '../media/hall-library-target-fields.js';\nimport type { WorkProjectType } from '../types/content.js';\n\n/** The maximum character length for a SquareStreetz post created on behalf of a workProject. */\nexport const MAX_SQUARE_STREETZ_DESCRIPTION_LENGTH = 150;\n\n// --- Commission Board & Proposals ---\n\n/** Maximum number of open commissions a workProject can have. Mode-varied. */\nexport const MAX_COMMISSION_LISTINGS = ACTIVE_LIMITS.workProject.maxCommissionListings;\n\n/** Maximum number of proposal artisans saved to a commission. */\nexport const MAX_SAVED_PROPOSAL_ARTISANS = 5;\n\n/** Maximum length for a commission title. */\nexport const MAX_COMMISSION_TITLE_LENGTH = MAX_WORK_PROJECT_TITLE_LENGTH;\n\n/** Maximum length for a commission description / cover letter. */\nexport const MAX_COMMISSION_DESCRIPTION_LENGTH = 400;\n\n// --- Moderation text-clear + published hall-content text fields ---\n\n/**\n * Neutral placeholder written into a single cleared text field by the moderation\n * text-clear remedy. Canonical wording — the backend `runModerationClearText`\n * core writes exactly this string; a wording change is a single edit here.\n */\nexport const MODERATION_CLEAR_PLACEHOLDER =\n 'Removed by moderation — awaiting an update by the steward.';\n\n/**\n * Default REASON strings recorded on a moderation action when the admin supplies no\n * user-facing reason. Distinct from MODERATION_CLEAR_PLACEHOLDER (which is written INTO\n * cleared content fields) — these are the recorded justification text. Canonical wording;\n * consumers (resolveAdminTask's forceRetitle / chat-delete actions) never inline them.\n */\nexport const MODERATION_DEFAULT_REMOVAL_REASON = 'Removed by moderation.';\nexport const MODERATION_DEFAULT_RETITLE_REASON = 'Title/description removed by moderation.';\n\n/**\n * CANONICAL clearable text-field map for the per-field moderation TEXT-CLEAR remedy.\n * Cross-boundary single owner: the admin field-picker offers this set per surface and\n * the backend clear runner validates + normalizes caller-supplied fields against it.\n * Keys are surfaces; values are the exact document field names (NOT display labels)\n * recorded verbatim in `moderationClearedFields`. Covers every clearable surface —\n * workProject/workRealm shell metadata, hall parent details (tale/tune/television),\n * and hall sub-items (chapter/track/episode).\n */\nexport const MODERATION_CLEARABLE_TEXT_FIELDS = {\n // workProject + workRealm shell metadata\n workProject: ['workingTitle', 'workingDescription'],\n workRealm: ['workingTitle', 'workingDescription'],\n // hall content parent details\n tale: ['title', 'description'],\n tune: ['title', 'description'],\n television: ['title', 'description'],\n // hall content sub-items\n chapter: ['title', 'content'],\n tuneTrack: ['title', 'description'],\n televisionEpisode: ['title', 'description'],\n} as const satisfies Record<string, readonly string[]>;\n\n/** A surface whose text fields the moderation clear remedy can neutralize. */\nexport type ModerationClearableSurface = keyof typeof MODERATION_CLEARABLE_TEXT_FIELDS;\n\n/**\n * Every DISTINCT clearable/changeable text-field NAME, DERIVED from the canonical\n * MODERATION_CLEARABLE_TEXT_FIELDS map (the union of every surface's tuple). Label maps and\n * per-field cap maps key on this instead of `string`, so adding a field to a surface is a\n * compile error until its label and cap exist.\n */\nexport type ClearableTextFieldName =\n (typeof MODERATION_CLEARABLE_TEXT_FIELDS)[ModerationClearableSurface][number];\n\n/**\n * The bounded computed-field portion of a moderation text-clear write. Writers\n * may only set one of the canonical clearable field names, never an arbitrary\n * document key. Sentinel-bearing moderation metadata stays runtime-specific.\n */\nexport type ModerationClearTextFieldPatch = {\n [Field in ClearableTextFieldName]?: string;\n};\n\n/**\n * The DISTINCT clearable text-field NAMES across the whole hall content family (tale/tune/\n * television detail → title/description; chapter → title/content; track/episode →\n * title/description). DERIVED from the canonical MODERATION_CLEARABLE_TEXT_FIELDS map — the\n * union of every hall surface's fields — so the `clearHallContentText` callable's field-enum\n * (`HallClearFieldSchema`) never restates the `title`/`description`/`content` literals. Index\n * access on the map's readonly tuples preserves the literal types, so this stays a typed\n * `readonly ['title','description','content']` a `z.enum(...)` can consume directly.\n */\nexport const HALL_CLEARABLE_TEXT_FIELD_NAMES = [\n MODERATION_CLEARABLE_TEXT_FIELDS.tale[0], // title\n MODERATION_CLEARABLE_TEXT_FIELDS.tale[1], // description\n MODERATION_CLEARABLE_TEXT_FIELDS.chapter[1], // content\n] as const;\n\n/**\n * The raw doc field names each published hall-content surface exposes as changeable TEXT.\n * Cross-boundary: the member \"Update details\" field picker offers this set per surface and\n * the change-request submit runner validates against it. Detail surfaces (tale/tune/\n * television) live on the hall parent doc; sub-item surfaces on the published chapter/\n * track/episode doc. This is the HALL-SURFACE SUBSET of the canonical\n * MODERATION_CLEARABLE_TEXT_FIELDS above (it excludes the `workProject` shell) — every\n * tuple is projected from that one owner, so the two can never drift.\n */\nexport const HALL_CONTENT_TEXT_FIELDS = {\n tale: MODERATION_CLEARABLE_TEXT_FIELDS.tale,\n tune: MODERATION_CLEARABLE_TEXT_FIELDS.tune,\n television: MODERATION_CLEARABLE_TEXT_FIELDS.television,\n chapter: MODERATION_CLEARABLE_TEXT_FIELDS.chapter,\n tuneTrack: MODERATION_CLEARABLE_TEXT_FIELDS.tuneTrack,\n televisionEpisode: MODERATION_CLEARABLE_TEXT_FIELDS.televisionEpisode,\n // Realm grain (R1, 2026-07-12): targets the `workRealms/{id}` doc directly.\n workRealm: MODERATION_CLEARABLE_TEXT_FIELDS.workRealm,\n} as const satisfies Record<string, readonly string[]>;\n\n/** Per-field max lengths for proposed hall-content text. DERIVED from the owning\n * constants — never independent numbers — so the change-request pipeline can never\n * drift from the authoring limits again (the pre-2026-07-13 copy carried its own\n * 200/5000/100000 set while authoring enforced 150/300/2500). Keyed on the derived\n * ClearableTextFieldName union, so a new clearable field fails the build here until\n * it has a cap. */\nexport const HALL_CONTENT_TEXT_FIELD_MAX = {\n title: MAX_WORK_PROJECT_TITLE_LENGTH,\n description: MAX_WORK_PROJECT_DESCRIPTION_LENGTH,\n content: MAX_CHAPTER_CONTENT_LENGTH,\n workingTitle: MAX_WORK_REALM_TITLE_LENGTH,\n workingDescription: MAX_WORK_REALM_DESCRIPTION_LENGTH,\n} as const satisfies Record<ClearableTextFieldName, number>;\n\n/** One work-project type's two hall text surfaces — the published DETAIL on the hall parent\n * and its chapter/track/episode SUB-ITEM — each with the clearable/changeable field tuple\n * that surface exposes. */\nexport interface HallContentSurfaceRouting {\n /** Surface identity of the hall parent DETAIL (tale / tune / television). */\n detailSurface: ModerationClearableSurface;\n /** The DETAIL surface's clearable text fields. */\n detailFields: readonly ClearableTextFieldName[];\n /** Surface identity of the SUB-ITEM (chapter / tuneTrack / televisionEpisode). */\n subItemSurface: ModerationClearableSurface;\n /** The SUB-ITEM surface's clearable text fields — a Tale chapter carries title/content, a\n * Tune track and a Television episode title/description. */\n subItemFields: readonly ClearableTextFieldName[];\n}\n\n/**\n * CANONICAL WorkProjectType → hall text-surface routing. The ONE owner of \"a Tale's sub-item is\n * a chapter, a Tune's is a tuneTrack, a Television's is a televisionEpisode\" and of which fields\n * each of those surfaces exposes. Cross-boundary: the backend text-clear and change-request\n * runners resolve `surface` from (workProjectType, is-sub-item?) through this map, and the admin\n * field pickers project their checkbox options from the same entry — three sites that each\n * hand-rolled the routing before (a ternary that fell through to the tuneTrack tuple for\n * Television, silently correct only because the two tuples happen to match today).\n *\n * Every field tuple is PROJECTED from MODERATION_CLEARABLE_TEXT_FIELDS above — no field literal\n * is restated here — and the `satisfies Record<WorkProjectType, …>` makes adding a work-project\n * type a compile error until its surfaces are routed.\n */\nexport const HALL_CONTENT_SURFACES_BY_WORK_TYPE = {\n Tales: {\n detailSurface: 'tale',\n detailFields: MODERATION_CLEARABLE_TEXT_FIELDS.tale,\n subItemSurface: 'chapter',\n subItemFields: MODERATION_CLEARABLE_TEXT_FIELDS.chapter,\n },\n Tunes: {\n detailSurface: 'tune',\n detailFields: MODERATION_CLEARABLE_TEXT_FIELDS.tune,\n subItemSurface: 'tuneTrack',\n subItemFields: MODERATION_CLEARABLE_TEXT_FIELDS.tuneTrack,\n },\n Television: {\n detailSurface: 'television',\n detailFields: MODERATION_CLEARABLE_TEXT_FIELDS.television,\n subItemSurface: 'televisionEpisode',\n subItemFields: MODERATION_CLEARABLE_TEXT_FIELDS.televisionEpisode,\n },\n} as const satisfies Record<WorkProjectType, HallContentSurfaceRouting>;\n\n/**\n * Work-shell text field → the field it appears as on the PUBLISHED hall parent\n * (`PublishedHallItem`): a Work's `workingTitle` is the hall item's `title`, its\n * `workingDescription` the hall item's `description`. The moderation placeholder writers\n * dual-write the shell and its published projection through a COMPUTED key, so the mapping\n * has to be a closed const map whose values are declared `PublishedHallItem` keys rather than\n * an inline ternary over two string literals. Both sides are projected from the canonical\n * clearable-field map, so neither name is restated here.\n */\nexport const WORK_SHELL_TEXT_FIELD_TO_HALL_ITEM_FIELD = {\n [MODERATION_CLEARABLE_TEXT_FIELDS.workProject[0]]: MODERATION_CLEARABLE_TEXT_FIELDS.tale[0], // workingTitle → title\n [MODERATION_CLEARABLE_TEXT_FIELDS.workProject[1]]: MODERATION_CLEARABLE_TEXT_FIELDS.tale[1], // workingDescription → description\n} as const satisfies Record<\n (typeof MODERATION_CLEARABLE_TEXT_FIELDS)['workProject'][number],\n (typeof MODERATION_CLEARABLE_TEXT_FIELDS)['tale'][number]\n>;\n\n// --- Hall sub-item publish requirements ---\n\n/**\n * CANONICAL per-work-type rule for what a Tale chapter / Tune track / Television episode must\n * carry before it may be submitted, approved, or published. ONE owner for the member-side\n * eligibility filter, the submit core, the approve core, and the publish core — each of which\n * otherwise restates the same three-way branch (ENG-002 / ENG-005).\n *\n * Every type requires a non-empty `title` and `photoAssetId`; a Tale chapter additionally\n * requires its `content`, a Tune track its audio, a Television episode its video. The media\n * field names are PROJECTED from the canonical upload target-field map and the text field names\n * from the clearable-field map, so no field literal is restated. These are exactly the fields\n * the published sub-item schemas (`PublishedChapter` / `PublishedTuneTrack` /\n * `PublishedTelevisionEpisode`) declare as REQUIRED.\n */\nexport const HALL_SUB_ITEM_REQUIRED_FIELDS_BY_WORK_TYPE = {\n Tales: [\n MODERATION_CLEARABLE_TEXT_FIELDS.chapter[0], // title\n HALL_LIBRARY_TARGET_FIELDS['chapter-photo'], // photoAssetId\n MODERATION_CLEARABLE_TEXT_FIELDS.chapter[1], // content\n ],\n Tunes: [\n MODERATION_CLEARABLE_TEXT_FIELDS.tuneTrack[0], // title\n HALL_LIBRARY_TARGET_FIELDS['tune-track-photo'], // photoAssetId\n HALL_LIBRARY_TARGET_FIELDS['tune-track-audio'], // audioAssetId\n ],\n Television: [\n MODERATION_CLEARABLE_TEXT_FIELDS.televisionEpisode[0], // title\n HALL_LIBRARY_TARGET_FIELDS['television-episode-photo'], // photoAssetId\n HALL_LIBRARY_TARGET_FIELDS['television-episode-video'], // videoAssetId\n ],\n} as const satisfies Record<WorkProjectType, readonly string[]>;\n\n/** A field name some work type requires on a publishable hall sub-item. */\nexport type HallSubItemRequiredField =\n (typeof HALL_SUB_ITEM_REQUIRED_FIELDS_BY_WORK_TYPE)[WorkProjectType][number];\n\n/**\n * User-facing wording for each required sub-item field, used when a surface has to say what is\n * still missing. Keyed on the derived union, so a new requirement fails the build until it has\n * wording.\n */\nexport const HALL_SUB_ITEM_REQUIREMENT_LABELS = {\n title: 'a title',\n content: 'chapter text',\n photoAssetId: 'a picture',\n audioAssetId: 'an audio file',\n videoAssetId: 'a video file',\n} as const satisfies Record<HallSubItemRequiredField, string>;\n\n/** Admin decision reason on a published change request (required on a deny; shown to\n * the member). One owner for the review callable schema AND the admin work-view input. */\nexport const MAX_HALL_CHANGE_REQUEST_REASON_LENGTH = 2000;\n\n// --- Real-people / parody disclaimer (R3, 2026-07-12) ---\n\n/**\n * The ONE standard platform disclaimer rendered on every published work whose\n * author attested it depicts real people (parody / satire / commentary). Two\n * layers, always shown together (DJ, 2026-07-12): the themed playbill HEADER\n * on top, the plain legal MESSAGE underneath. There is no free-text disclaimer\n * anywhere — these constants are the only wording, so a wording change is a\n * single edit here (display surfaces and any backend consumer read these; the\n * text is never persisted on docs). The MESSAGE deliberately never ADMITS the\n * work depicts real people — it hedges (\"even those based on real people\",\n * the standard film-boilerplate move) so the disclaimer never hands over the\n * depiction element of a claim. Legal wording pending counsel confirmation\n * (tracked in docs/ttt-prod-legal/).\n */\nexport const REAL_PEOPLE_DISCLAIMER_HEADER =\n 'A Notice from the Management: the faces may be familiar, but the players are pure ' +\n 'invention — parody and satire, in the grand old tradition of the stage.';\n\nexport const REAL_PEOPLE_DISCLAIMER_MESSAGE =\n 'All characters, statements, and events in this work, even those based on real people, ' +\n 'are entirely fictional and are presented as parody, satire, or commentary. Any voices, ' +\n 'likenesses, or portrayals of real people are impersonated or fictionalized, and nothing ' +\n 'in this work should be understood as a statement of fact about, or as speech by, any ' +\n 'real person. This work is not created by, affiliated with, sponsored by, or endorsed by ' +\n 'any real person portrayed or referenced in it.';\n\n// --- Hall library per-user viewing-state doc (hall-viewing-experience Area 2, ruled 2026-07-04) ---\n\n/**\n * Caps for the per-user Hall viewing-state doc (`HallLibraryPreferencesSchema`,\n * `userProfiles/{uid}/privateData/hallLibraryPreferences`). Every list on that doc is\n * capped for launch — no unbounded per-user lists. `hiddenWorkIds`/`inkedWorkIds` are\n * oldest-pruned (or the write is rejected with a friendly message once full);\n * `inProgress` is LRU-pruned by `updatedAt`; `recentlyViewed` is capped, newest-kept.\n * Enforcement lives in the backend core (`runX`) that owns this doc — this is the\n * shared source of truth for the cap values themselves.\n */\nexport const HALL_LIBRARY_PREFS_CAPS = {\n hiddenWorkIds: 200,\n inkedWorkIds: 200,\n inProgress: 50,\n recentlyViewed: 20,\n} as const satisfies Record<string, number>;\n\n// --- Auditions ---\n\n/** Maximum length for an audition title. */\nexport const MAX_AUDITION_TITLE_LENGTH = 150;\n\n/** Curated-audition option-video batch bounds (the fixed 2..8 option count carried\n * from the Create click through targetInfo/upload-variables to the create core's\n * re-check). ONE declaration — every `.min()/.max()` derives from these. */\nexport const MIN_CURATED_AUDITION_OPTIONS = 2;\nexport const MAX_CURATED_AUDITION_OPTIONS = 8;\n\n/** Maximum length for an audition description. */\nexport const MAX_AUDITION_DESCRIPTION_LENGTH = 1000;\n\n/**\n * Maximum sponsored-audition payout amount in whole USD accepted at the upload\n * trust boundary. Mirrors MAX_PLEDGE_PAYMENT_AMOUNT_CENTS ($500,000) expressed\n * in dollars — a finite ceiling that rejects absurd/garbage amounts before any\n * downstream processing.\n */\nexport const MAX_SPONSORED_AUDITION_AMOUNT_USD = 500_000;\n\n/**\n * The one user-facing rejection sentence when a Work's own active guildmate tries to enter\n * that Work's open audition (entries exist to recruit OUTSIDERS; a member can't be\n * recruited). Shared by both backend enforcement points (upload-accept and publish) — it is\n * the `failed-precondition` answer text the entry UI renders verbatim.\n */\nexport const GUILDMATE_AUDITION_ENTRY_REJECTION =\n 'You are already a guildmate of this Work — its audition is for recruiting new collaborators.';\n\n// --- SquareStreetz (Social Feed) ---\n\n/** Maximum length for a SquareStreetz post. */\nexport const MAX_POST_LENGTH = 500;\n\n/** Maximum number of mentions allowed in a single SquareStreetz post. */\nexport const MAX_MENTIONS = 3;\n\n/** Maximum characters of a mention's display name shown before truncation. */\nexport const MAX_MENTION_DISPLAY_LENGTH = 30;\n\n// --- Messages & Invites ---\n\n/** Maximum length for a guild-invite message. */\nexport const MAX_GUILD_INVITE_MESSAGE_LENGTH = 500;\n\n/** Maximum length for a pledgePayment message. */\nexport const MAX_PLEDGE_PAYMENT_MESSAGE_LENGTH = 500;\n"]}
1
+ {"version":3,"file":"business-content.js","sourceRoot":"","sources":["../../src/constants/business-content.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,uBAAuB;AACvB,OAAO,EACL,6BAA6B,EAC7B,mCAAmC,EACnC,0BAA0B,EAC1B,2BAA2B,EAC3B,iCAAiC,GAClC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AAEpF,OAAO,EAAE,uCAAuC,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,EACL,uCAAuC,EACvC,4BAA4B,EAC5B,8BAA8B,GAG/B,MAAM,2BAA2B,CAAC;AAEnC,gGAAgG;AAChG,MAAM,CAAC,MAAM,qCAAqC,GAAG,GAAG,CAAC;AAEzD,uCAAuC;AAEvC,8EAA8E;AAC9E,MAAM,CAAC,MAAM,uBAAuB,GAAG,aAAa,CAAC,WAAW,CAAC,qBAAqB,CAAC;AAEvF,iEAAiE;AACjE,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC;AAE7C,6CAA6C;AAC7C,MAAM,CAAC,MAAM,2BAA2B,GAAG,6BAA6B,CAAC;AAEzE,kEAAkE;AAClE,MAAM,CAAC,MAAM,iCAAiC,GAAG,GAAG,CAAC;AAErD,qEAAqE;AAErE;;;;GAIG;AACH,MAAM,CAAC,MAAM,4BAA4B,GACvC,4DAA4D,CAAC;AAE/D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,wBAAwB,CAAC;AAC1E,MAAM,CAAC,MAAM,iCAAiC,GAAG,0CAA0C,CAAC;AAE5F;;;;;;;;GAQ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5E,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC;AAC9C,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC;AAE9C,kDAAkD;AAClD,MAAM,CAAC,MAAM,+BAA+B,GAAG,IAAI,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,OAAO,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAC7C,8FAA8F,CAAC;AAEjG,sCAAsC;AAEtC,+CAA+C;AAC/C,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAC;AAEnC,yEAAyE;AACzE,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC;AAE9B,8EAA8E;AAC9E,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAE7C,6BAA6B;AAE7B,iDAAiD;AACjD,MAAM,CAAC,MAAM,+BAA+B,GAAG,GAAG,CAAC;AAEnD,kDAAkD;AAClD,MAAM,CAAC,MAAM,iCAAiC,GAAG,GAAG,CAAC","sourcesContent":["// Content-surface business-rule constants — commissions, auditions, the social\n// feed, and messaging.\nimport {\n MAX_WORK_PROJECT_TITLE_LENGTH,\n MAX_WORK_PROJECT_DESCRIPTION_LENGTH,\n MAX_CHAPTER_CONTENT_LENGTH,\n MAX_WORK_REALM_TITLE_LENGTH,\n MAX_WORK_REALM_DESCRIPTION_LENGTH,\n} from \"./business-work-project.js\";\nimport { ACTIVE_LIMITS } from './app-mode.js';\nimport { HALL_LIBRARY_TARGET_FIELDS } from '../media/hall-library-target-fields.js';\nimport type { WorkProjectType } from '../types/content.js';\nimport { HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE } from './hall-content-routing.js';\nexport {\n HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE,\n HALL_CONTENT_DETAIL_SURFACES,\n HALL_CONTENT_SUB_ITEM_SURFACES,\n type HallContentDetailSurface,\n type HallContentSubItemSurface,\n} from './hall-content-routing.js';\n\n/** The maximum character length for a SquareStreetz post created on behalf of a workProject. */\nexport const MAX_SQUARE_STREETZ_DESCRIPTION_LENGTH = 150;\n\n// --- Commission Board & Proposals ---\n\n/** Maximum number of open commissions a workProject can have. Mode-varied. */\nexport const MAX_COMMISSION_LISTINGS = ACTIVE_LIMITS.workProject.maxCommissionListings;\n\n/** Maximum number of proposal artisans saved to a commission. */\nexport const MAX_SAVED_PROPOSAL_ARTISANS = 5;\n\n/** Maximum length for a commission title. */\nexport const MAX_COMMISSION_TITLE_LENGTH = MAX_WORK_PROJECT_TITLE_LENGTH;\n\n/** Maximum length for a commission description / cover letter. */\nexport const MAX_COMMISSION_DESCRIPTION_LENGTH = 400;\n\n// --- Moderation text-clear + published hall-content text fields ---\n\n/**\n * Neutral placeholder written into a single cleared text field by the moderation\n * text-clear remedy. Canonical wording — the backend `runModerationClearText`\n * core writes exactly this string; a wording change is a single edit here.\n */\nexport const MODERATION_CLEAR_PLACEHOLDER =\n 'Removed by moderation — awaiting an update by the steward.';\n\n/**\n * Default REASON strings recorded on a moderation action when the admin supplies no\n * user-facing reason. Distinct from MODERATION_CLEAR_PLACEHOLDER (which is written INTO\n * cleared content fields) — these are the recorded justification text. Canonical wording;\n * consumers (resolveAdminTask's forceRetitle / chat-delete actions) never inline them.\n */\nexport const MODERATION_DEFAULT_REMOVAL_REASON = 'Removed by moderation.';\nexport const MODERATION_DEFAULT_RETITLE_REASON = 'Title/description removed by moderation.';\n\n/**\n * CANONICAL clearable text-field map for the per-field moderation TEXT-CLEAR remedy.\n * Cross-boundary single owner: the admin field-picker offers this set per surface and\n * the backend clear runner validates + normalizes caller-supplied fields against it.\n * Keys are surfaces; values are the exact document field names (NOT display labels)\n * recorded verbatim in `moderationClearedFields`. Covers every clearable surface —\n * workProject/workRealm shell metadata, hall parent details (tale/tune/television),\n * and hall sub-items (chapter/track/episode).\n */\nexport const MODERATION_CLEARABLE_TEXT_FIELDS = {\n // workProject + workRealm shell metadata\n workProject: ['workingTitle', 'workingDescription'],\n workRealm: ['workingTitle', 'workingDescription'],\n // hall content parent details\n tale: ['title', 'description'],\n tune: ['title', 'description'],\n television: ['title', 'description'],\n // hall content sub-items\n chapter: ['title', 'content'],\n tuneTrack: ['title', 'description'],\n televisionEpisode: ['title', 'description'],\n} as const satisfies Record<string, readonly string[]>;\n\n/** A surface whose text fields the moderation clear remedy can neutralize. */\nexport type ModerationClearableSurface = keyof typeof MODERATION_CLEARABLE_TEXT_FIELDS;\n\n/**\n * Every DISTINCT clearable/changeable text-field NAME, DERIVED from the canonical\n * MODERATION_CLEARABLE_TEXT_FIELDS map (the union of every surface's tuple). Label maps and\n * per-field cap maps key on this instead of `string`, so adding a field to a surface is a\n * compile error until its label and cap exist.\n */\nexport type ClearableTextFieldName =\n (typeof MODERATION_CLEARABLE_TEXT_FIELDS)[ModerationClearableSurface][number];\n\n/**\n * The bounded computed-field portion of a moderation text-clear write. Writers\n * may only set one of the canonical clearable field names, never an arbitrary\n * document key. Sentinel-bearing moderation metadata stays runtime-specific.\n */\nexport type ModerationClearTextFieldPatch = {\n [Field in ClearableTextFieldName]?: string;\n};\n\n/**\n * The DISTINCT clearable text-field NAMES across the whole hall content family (tale/tune/\n * television detail → title/description; chapter → title/content; track/episode →\n * title/description). DERIVED from the canonical MODERATION_CLEARABLE_TEXT_FIELDS map — the\n * union of every hall surface's fields — so the `clearHallContentText` callable's field-enum\n * (`HallClearFieldSchema`) never restates the `title`/`description`/`content` literals. Index\n * access on the map's readonly tuples preserves the literal types, so this stays a typed\n * `readonly ['title','description','content']` a `z.enum(...)` can consume directly.\n */\nexport const HALL_CLEARABLE_TEXT_FIELD_NAMES = [\n MODERATION_CLEARABLE_TEXT_FIELDS.tale[0], // title\n MODERATION_CLEARABLE_TEXT_FIELDS.tale[1], // description\n MODERATION_CLEARABLE_TEXT_FIELDS.chapter[1], // content\n] as const;\n\n/**\n * The raw doc field names each published hall-content surface exposes as changeable TEXT.\n * Cross-boundary: the member \"Update details\" field picker offers this set per surface and\n * the change-request submit runner validates against it. Detail surfaces (tale/tune/\n * television) live on the hall parent doc; sub-item surfaces on the published chapter/\n * track/episode doc. This is the HALL-SURFACE SUBSET of the canonical\n * MODERATION_CLEARABLE_TEXT_FIELDS above (it excludes the `workProject` shell) — every\n * tuple is projected from that one owner, so the two can never drift.\n */\nexport const HALL_CONTENT_TEXT_FIELDS = {\n tale: MODERATION_CLEARABLE_TEXT_FIELDS.tale,\n tune: MODERATION_CLEARABLE_TEXT_FIELDS.tune,\n television: MODERATION_CLEARABLE_TEXT_FIELDS.television,\n chapter: MODERATION_CLEARABLE_TEXT_FIELDS.chapter,\n tuneTrack: MODERATION_CLEARABLE_TEXT_FIELDS.tuneTrack,\n televisionEpisode: MODERATION_CLEARABLE_TEXT_FIELDS.televisionEpisode,\n // Realm grain (R1, 2026-07-12): targets the `workRealms/{id}` doc directly.\n workRealm: MODERATION_CLEARABLE_TEXT_FIELDS.workRealm,\n} as const satisfies Record<string, readonly string[]>;\n\n/** Per-field max lengths for proposed hall-content text. DERIVED from the owning\n * constants — never independent numbers — so the change-request pipeline can never\n * drift from the authoring limits again (the pre-2026-07-13 copy carried its own\n * 200/5000/100000 set while authoring enforced 150/300/2500). Keyed on the derived\n * ClearableTextFieldName union, so a new clearable field fails the build here until\n * it has a cap. */\nexport const HALL_CONTENT_TEXT_FIELD_MAX = {\n title: MAX_WORK_PROJECT_TITLE_LENGTH,\n description: MAX_WORK_PROJECT_DESCRIPTION_LENGTH,\n content: MAX_CHAPTER_CONTENT_LENGTH,\n workingTitle: MAX_WORK_REALM_TITLE_LENGTH,\n workingDescription: MAX_WORK_REALM_DESCRIPTION_LENGTH,\n} as const satisfies Record<ClearableTextFieldName, number>;\n\n/** One work-project type's two hall text surfaces — the published DETAIL on the hall parent\n * and its chapter/track/episode SUB-ITEM — each with the clearable/changeable field tuple\n * that surface exposes. */\nexport interface HallContentSurfaceRouting {\n /** Surface identity of the hall parent DETAIL (tale / tune / television). */\n detailSurface: ModerationClearableSurface;\n /** The DETAIL surface's clearable text fields. */\n detailFields: readonly ClearableTextFieldName[];\n /** Surface identity of the SUB-ITEM (chapter / tuneTrack / televisionEpisode). */\n subItemSurface: ModerationClearableSurface;\n /** The SUB-ITEM surface's clearable text fields — a Tale chapter carries title/content, a\n * Tune track and a Television episode title/description. */\n subItemFields: readonly ClearableTextFieldName[];\n}\n\n/**\n * WorkProjectType → hall text-surface routing. Surface identities project from the lower-level\n * `HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE` owner; this map adds the clearable field tuples each\n * surface exposes. Cross-boundary: the backend text-clear and change-request\n * runners resolve `surface` from (workProjectType, is-sub-item?) through this map, and the admin\n * field pickers project their checkbox options from the same entry — three sites that each\n * hand-rolled the routing before (a ternary that fell through to the tuneTrack tuple for\n * Television, silently correct only because the two tuples happen to match today).\n *\n * Every identity and field tuple is PROJECTED from its canonical owner — no surface or field\n * literal is restated here — and the `satisfies Record<WorkProjectType, …>` makes adding a\n * work-project type a compile error until its surfaces are routed.\n */\nexport const HALL_CONTENT_SURFACES_BY_WORK_TYPE = {\n Tales: {\n detailSurface: HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE.Tales.detailSurface,\n detailFields: MODERATION_CLEARABLE_TEXT_FIELDS.tale,\n subItemSurface: HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE.Tales.subItemSurface,\n subItemFields: MODERATION_CLEARABLE_TEXT_FIELDS.chapter,\n },\n Tunes: {\n detailSurface: HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE.Tunes.detailSurface,\n detailFields: MODERATION_CLEARABLE_TEXT_FIELDS.tune,\n subItemSurface: HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE.Tunes.subItemSurface,\n subItemFields: MODERATION_CLEARABLE_TEXT_FIELDS.tuneTrack,\n },\n Television: {\n detailSurface: HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE.Television.detailSurface,\n detailFields: MODERATION_CLEARABLE_TEXT_FIELDS.television,\n subItemSurface: HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE.Television.subItemSurface,\n subItemFields: MODERATION_CLEARABLE_TEXT_FIELDS.televisionEpisode,\n },\n} as const satisfies Record<WorkProjectType, HallContentSurfaceRouting>;\n\n/**\n * Work-shell text field → the field it appears as on the PUBLISHED hall parent\n * (`PublishedHallItem`): a Work's `workingTitle` is the hall item's `title`, its\n * `workingDescription` the hall item's `description`. The moderation placeholder writers\n * dual-write the shell and its published projection through a COMPUTED key, so the mapping\n * has to be a closed const map whose values are declared `PublishedHallItem` keys rather than\n * an inline ternary over two string literals. Both sides are projected from the canonical\n * clearable-field map, so neither name is restated here.\n */\nexport const WORK_SHELL_TEXT_FIELD_TO_HALL_ITEM_FIELD = {\n [MODERATION_CLEARABLE_TEXT_FIELDS.workProject[0]]: MODERATION_CLEARABLE_TEXT_FIELDS.tale[0], // workingTitle → title\n [MODERATION_CLEARABLE_TEXT_FIELDS.workProject[1]]: MODERATION_CLEARABLE_TEXT_FIELDS.tale[1], // workingDescription → description\n} as const satisfies Record<\n (typeof MODERATION_CLEARABLE_TEXT_FIELDS)['workProject'][number],\n (typeof MODERATION_CLEARABLE_TEXT_FIELDS)['tale'][number]\n>;\n\n// --- Hall sub-item publish requirements ---\n\n/**\n * CANONICAL per-work-type rule for what a Tale chapter / Tune track / Television episode must\n * carry before it may be submitted, approved, or published. ONE owner for the member-side\n * eligibility filter, the submit core, the approve core, and the publish core — each of which\n * otherwise restates the same three-way branch (ENG-002 / ENG-005).\n *\n * Every type requires a non-empty `title` and `photoAssetId`; a Tale chapter additionally\n * requires its `content`, a Tune track its audio, a Television episode its video. The media\n * field names are PROJECTED from the canonical upload target-field map and the text field names\n * from the clearable-field map, so no field literal is restated. These are exactly the fields\n * the published sub-item schemas (`PublishedChapter` / `PublishedTuneTrack` /\n * `PublishedTelevisionEpisode`) declare as REQUIRED.\n */\nexport const HALL_SUB_ITEM_REQUIRED_FIELDS_BY_WORK_TYPE = {\n Tales: [\n MODERATION_CLEARABLE_TEXT_FIELDS.chapter[0], // title\n HALL_LIBRARY_TARGET_FIELDS['chapter-photo'], // photoAssetId\n MODERATION_CLEARABLE_TEXT_FIELDS.chapter[1], // content\n ],\n Tunes: [\n MODERATION_CLEARABLE_TEXT_FIELDS.tuneTrack[0], // title\n HALL_LIBRARY_TARGET_FIELDS['tune-track-photo'], // photoAssetId\n HALL_LIBRARY_TARGET_FIELDS['tune-track-audio'], // audioAssetId\n ],\n Television: [\n MODERATION_CLEARABLE_TEXT_FIELDS.televisionEpisode[0], // title\n HALL_LIBRARY_TARGET_FIELDS['television-episode-photo'], // photoAssetId\n HALL_LIBRARY_TARGET_FIELDS['television-episode-video'], // videoAssetId\n ],\n} as const satisfies Record<WorkProjectType, readonly string[]>;\n\n/** A field name some work type requires on a publishable hall sub-item. */\nexport type HallSubItemRequiredField =\n (typeof HALL_SUB_ITEM_REQUIRED_FIELDS_BY_WORK_TYPE)[WorkProjectType][number];\n\n/**\n * User-facing wording for each required sub-item field, used when a surface has to say what is\n * still missing. Keyed on the derived union, so a new requirement fails the build until it has\n * wording.\n */\nexport const HALL_SUB_ITEM_REQUIREMENT_LABELS = {\n title: 'a title',\n content: 'chapter text',\n photoAssetId: 'a picture',\n audioAssetId: 'an audio file',\n videoAssetId: 'a video file',\n} as const satisfies Record<HallSubItemRequiredField, string>;\n\n/** Admin decision reason on a published change request (required on a deny; shown to\n * the member). One owner for the review callable schema AND the admin work-view input. */\nexport const MAX_HALL_CHANGE_REQUEST_REASON_LENGTH = 2000;\n\n// --- Real-people / parody disclaimer (R3, 2026-07-12) ---\n\n/**\n * The ONE standard platform disclaimer rendered on every published work whose\n * author attested it depicts real people (parody / satire / commentary). Two\n * layers, always shown together (DJ, 2026-07-12): the themed playbill HEADER\n * on top, the plain legal MESSAGE underneath. There is no free-text disclaimer\n * anywhere — these constants are the only wording, so a wording change is a\n * single edit here (display surfaces and any backend consumer read these; the\n * text is never persisted on docs). The MESSAGE deliberately never ADMITS the\n * work depicts real people — it hedges (\"even those based on real people\",\n * the standard film-boilerplate move) so the disclaimer never hands over the\n * depiction element of a claim. Legal wording pending counsel confirmation\n * (tracked in docs/ttt-prod-legal/).\n */\nexport const REAL_PEOPLE_DISCLAIMER_HEADER =\n 'A Notice from the Management: the faces may be familiar, but the players are pure ' +\n 'invention — parody and satire, in the grand old tradition of the stage.';\n\nexport const REAL_PEOPLE_DISCLAIMER_MESSAGE =\n 'All characters, statements, and events in this work, even those based on real people, ' +\n 'are entirely fictional and are presented as parody, satire, or commentary. Any voices, ' +\n 'likenesses, or portrayals of real people are impersonated or fictionalized, and nothing ' +\n 'in this work should be understood as a statement of fact about, or as speech by, any ' +\n 'real person. This work is not created by, affiliated with, sponsored by, or endorsed by ' +\n 'any real person portrayed or referenced in it.';\n\n// --- Hall library per-user viewing-state doc (hall-viewing-experience Area 2, ruled 2026-07-04) ---\n\n/**\n * Caps for the per-user Hall viewing-state doc (`HallLibraryPreferencesSchema`,\n * `userProfiles/{uid}/privateData/hallLibraryPreferences`). Every list on that doc is\n * capped for launch — no unbounded per-user lists. `hiddenWorkIds`/`inkedWorkIds` are\n * oldest-pruned (or the write is rejected with a friendly message once full);\n * `inProgress` is LRU-pruned by `updatedAt`; `recentlyViewed` is capped, newest-kept.\n * Enforcement lives in the backend core (`runX`) that owns this doc — this is the\n * shared source of truth for the cap values themselves.\n */\nexport const HALL_LIBRARY_PREFS_CAPS = {\n hiddenWorkIds: 200,\n inkedWorkIds: 200,\n inProgress: 50,\n recentlyViewed: 20,\n} as const satisfies Record<string, number>;\n\n// --- Auditions ---\n\n/** Maximum length for an audition title. */\nexport const MAX_AUDITION_TITLE_LENGTH = 150;\n\n/** Curated-audition option-video batch bounds (the fixed 2..8 option count carried\n * from the Create click through targetInfo/upload-variables to the create core's\n * re-check). ONE declaration — every `.min()/.max()` derives from these. */\nexport const MIN_CURATED_AUDITION_OPTIONS = 2;\nexport const MAX_CURATED_AUDITION_OPTIONS = 8;\n\n/** Maximum length for an audition description. */\nexport const MAX_AUDITION_DESCRIPTION_LENGTH = 1000;\n\n/**\n * Maximum sponsored-audition payout amount in whole USD accepted at the upload\n * trust boundary. Mirrors MAX_PLEDGE_PAYMENT_AMOUNT_CENTS ($500,000) expressed\n * in dollars — a finite ceiling that rejects absurd/garbage amounts before any\n * downstream processing.\n */\nexport const MAX_SPONSORED_AUDITION_AMOUNT_USD = 500_000;\n\n/**\n * The one user-facing rejection sentence when a Work's own active guildmate tries to enter\n * that Work's open audition (entries exist to recruit OUTSIDERS; a member can't be\n * recruited). Shared by both backend enforcement points (upload-accept and publish) — it is\n * the `failed-precondition` answer text the entry UI renders verbatim.\n */\nexport const GUILDMATE_AUDITION_ENTRY_REJECTION =\n 'You are already a guildmate of this Work — its audition is for recruiting new collaborators.';\n\n// --- SquareStreetz (Social Feed) ---\n\n/** Maximum length for a SquareStreetz post. */\nexport const MAX_POST_LENGTH = 500;\n\n/** Maximum number of mentions allowed in a single SquareStreetz post. */\nexport const MAX_MENTIONS = 3;\n\n/** Maximum characters of a mention's display name shown before truncation. */\nexport const MAX_MENTION_DISPLAY_LENGTH = 30;\n\n// --- Messages & Invites ---\n\n/** Maximum length for a guild-invite message. */\nexport const MAX_GUILD_INVITE_MESSAGE_LENGTH = 500;\n\n/** Maximum length for a pledgePayment message. */\nexport const MAX_PLEDGE_PAYMENT_MESSAGE_LENGTH = 500;\n"]}
@@ -0,0 +1,32 @@
1
+ import type { WorkProjectType } from '../types/content.js';
2
+ /**
3
+ * Canonical identities for the Hall detail and sub-item surfaces owned by each Work type.
4
+ * Higher-level routing maps project fields and upload origins from this table so the surface
5
+ * literals are declared once without creating a constants <-> media dependency cycle.
6
+ */
7
+ export declare const HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE: {
8
+ readonly Tales: {
9
+ readonly detailSurface: "tale";
10
+ readonly subItemSurface: "chapter";
11
+ };
12
+ readonly Tunes: {
13
+ readonly detailSurface: "tune";
14
+ readonly subItemSurface: "tuneTrack";
15
+ };
16
+ readonly Television: {
17
+ readonly detailSurface: "television";
18
+ readonly subItemSurface: "televisionEpisode";
19
+ };
20
+ };
21
+ export type HallContentDetailSurface = (typeof HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE)[WorkProjectType]['detailSurface'];
22
+ export type HallContentSubItemSurface = (typeof HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE)[WorkProjectType]['subItemSurface'];
23
+ /**
24
+ * The detail-surface identities as a typed, non-empty tuple PROJECTED from the map above, so a
25
+ * `z.enum(...)` or option list consumes the canonical names instead of restating them. A package
26
+ * test proves the tuple still equals the map's projection, so a new work type cannot leave an
27
+ * enum-shaped consumer behind.
28
+ */
29
+ export declare const HALL_CONTENT_DETAIL_SURFACES: readonly ["tale", "tune", "television"];
30
+ /** The sub-item-surface identities as a typed, non-empty tuple, projected the same way. */
31
+ export declare const HALL_CONTENT_SUB_ITEM_SURFACES: readonly ["chapter", "tuneTrack", "televisionEpisode"];
32
+ //# sourceMappingURL=hall-content-routing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hall-content-routing.d.ts","sourceRoot":"","sources":["../../src/constants/hall-content-routing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D;;;;GAIG;AACH,eAAO,MAAM,uCAAuC;;;;;;;;;;;;;CAgBnD,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAClC,CAAC,OAAO,uCAAuC,CAAC,CAAC,eAAe,CAAC,CAAC,eAAe,CAAC,CAAC;AAErF,MAAM,MAAM,yBAAyB,GACnC,CAAC,OAAO,uCAAuC,CAAC,CAAC,eAAe,CAAC,CAAC,gBAAgB,CAAC,CAAC;AAEtF;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,yCAI8C,CAAC;AAExF,2FAA2F;AAC3F,eAAO,MAAM,8BAA8B,wDAI8C,CAAC"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Canonical identities for the Hall detail and sub-item surfaces owned by each Work type.
3
+ * Higher-level routing maps project fields and upload origins from this table so the surface
4
+ * literals are declared once without creating a constants <-> media dependency cycle.
5
+ */
6
+ export const HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE = {
7
+ Tales: {
8
+ detailSurface: 'tale',
9
+ subItemSurface: 'chapter',
10
+ },
11
+ Tunes: {
12
+ detailSurface: 'tune',
13
+ subItemSurface: 'tuneTrack',
14
+ },
15
+ Television: {
16
+ detailSurface: 'television',
17
+ subItemSurface: 'televisionEpisode',
18
+ },
19
+ };
20
+ /**
21
+ * The detail-surface identities as a typed, non-empty tuple PROJECTED from the map above, so a
22
+ * `z.enum(...)` or option list consumes the canonical names instead of restating them. A package
23
+ * test proves the tuple still equals the map's projection, so a new work type cannot leave an
24
+ * enum-shaped consumer behind.
25
+ */
26
+ export const HALL_CONTENT_DETAIL_SURFACES = [
27
+ HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE.Tales.detailSurface,
28
+ HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE.Tunes.detailSurface,
29
+ HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE.Television.detailSurface,
30
+ ];
31
+ /** The sub-item-surface identities as a typed, non-empty tuple, projected the same way. */
32
+ export const HALL_CONTENT_SUB_ITEM_SURFACES = [
33
+ HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE.Tales.subItemSurface,
34
+ HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE.Tunes.subItemSurface,
35
+ HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE.Television.subItemSurface,
36
+ ];
37
+ //# sourceMappingURL=hall-content-routing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hall-content-routing.js","sourceRoot":"","sources":["../../src/constants/hall-content-routing.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAAG;IACrD,KAAK,EAAE;QACL,aAAa,EAAE,MAAM;QACrB,cAAc,EAAE,SAAS;KAC1B;IACD,KAAK,EAAE;QACL,aAAa,EAAE,MAAM;QACrB,cAAc,EAAE,WAAW;KAC5B;IACD,UAAU,EAAE;QACV,aAAa,EAAE,YAAY;QAC3B,cAAc,EAAE,mBAAmB;KACpC;CAIF,CAAC;AAQF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,uCAAuC,CAAC,KAAK,CAAC,aAAa;IAC3D,uCAAuC,CAAC,KAAK,CAAC,aAAa;IAC3D,uCAAuC,CAAC,UAAU,CAAC,aAAa;CACqB,CAAC;AAExF,2FAA2F;AAC3F,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,uCAAuC,CAAC,KAAK,CAAC,cAAc;IAC5D,uCAAuC,CAAC,KAAK,CAAC,cAAc;IAC5D,uCAAuC,CAAC,UAAU,CAAC,cAAc;CACsB,CAAC","sourcesContent":["import type { WorkProjectType } from '../types/content.js';\n\n/**\n * Canonical identities for the Hall detail and sub-item surfaces owned by each Work type.\n * Higher-level routing maps project fields and upload origins from this table so the surface\n * literals are declared once without creating a constants <-> media dependency cycle.\n */\nexport const HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE = {\n Tales: {\n detailSurface: 'tale',\n subItemSurface: 'chapter',\n },\n Tunes: {\n detailSurface: 'tune',\n subItemSurface: 'tuneTrack',\n },\n Television: {\n detailSurface: 'television',\n subItemSurface: 'televisionEpisode',\n },\n} as const satisfies Record<\n WorkProjectType,\n { readonly detailSurface: string; readonly subItemSurface: string }\n>;\n\nexport type HallContentDetailSurface =\n (typeof HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE)[WorkProjectType]['detailSurface'];\n\nexport type HallContentSubItemSurface =\n (typeof HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE)[WorkProjectType]['subItemSurface'];\n\n/**\n * The detail-surface identities as a typed, non-empty tuple PROJECTED from the map above, so a\n * `z.enum(...)` or option list consumes the canonical names instead of restating them. A package\n * test proves the tuple still equals the map's projection, so a new work type cannot leave an\n * enum-shaped consumer behind.\n */\nexport const HALL_CONTENT_DETAIL_SURFACES = [\n HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE.Tales.detailSurface,\n HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE.Tunes.detailSurface,\n HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE.Television.detailSurface,\n] as const satisfies readonly [HallContentDetailSurface, ...HallContentDetailSurface[]];\n\n/** The sub-item-surface identities as a typed, non-empty tuple, projected the same way. */\nexport const HALL_CONTENT_SUB_ITEM_SURFACES = [\n HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE.Tales.subItemSurface,\n HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE.Tunes.subItemSurface,\n HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE.Television.subItemSurface,\n] as const satisfies readonly [HallContentSubItemSurface, ...HallContentSubItemSurface[]];\n"]}
@@ -163,10 +163,10 @@ export type ThresholdItem = z.infer<typeof ThresholdItemSchema>;
163
163
  export declare const HallContentTextSurfaceSchema: z.ZodEnum<{
164
164
  workRealm: "workRealm";
165
165
  tale: "tale";
166
- tune: "tune";
167
- television: "television";
168
166
  chapter: "chapter";
167
+ tune: "tune";
169
168
  tuneTrack: "tuneTrack";
169
+ television: "television";
170
170
  televisionEpisode: "televisionEpisode";
171
171
  }>;
172
172
  export type HallContentTextSurface = z.infer<typeof HallContentTextSurfaceSchema>;
@@ -201,10 +201,10 @@ export declare const HallContentChangeRequestSchema: z.ZodObject<{
201
201
  surface: z.ZodEnum<{
202
202
  workRealm: "workRealm";
203
203
  tale: "tale";
204
- tune: "tune";
205
- television: "television";
206
204
  chapter: "chapter";
205
+ tune: "tune";
207
206
  tuneTrack: "tuneTrack";
207
+ television: "television";
208
208
  televisionEpisode: "televisionEpisode";
209
209
  }>;
210
210
  workRealmId: z.ZodNullable<z.ZodString>;
@@ -1 +1 @@
1
- {"version":3,"file":"content.d.ts","sourceRo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9F,eAAO,MAAM,wBAAwB;;;;;;iBAOnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,+GAA+G;AAC/G,eAAO,MAAM,uBAAuB;;;;;;;;;;iBAIlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB;;;;iBAInC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
@@ -7,6 +7,7 @@ import { z } from 'zod';
7
7
  import { HALL_WING_TYPE_KEYS, WORK_PROJECT_TYPE_KEYS } from '../types/content.js';
8
8
  import { ModerationEdgeSyncOpSchema, ModerationEdgeSyncStateSchema } from './moderation.js';
9
9
  import { MAX_THRESHOLD_PUBLISH_PARKED_REASON_LENGTH } from '../constants/business-admin.js';
10
+ import { HALL_CONTENT_DETAIL_SURFACES, HALL_CONTENT_SUB_ITEM_SURFACES, } from '../constants/hall-content-routing.js';
10
11
  const contentStatusSchema = z.enum(['unpublished', 'pending_approval', 'published']);
11
12
  // Per-field moderation text-clear remedy (shared shape across the content family — Tale/Tune/
12
13
  // Television details, their chapter/track/episode sub-items, and the published Hall projections of
@@ -154,12 +155,8 @@ export const ThresholdItemSchema = z.object({
154
155
  * surface targets the single `workRealms/{id}` doc (the realm grain of the one
155
156
  * text-change pipeline — R1, 2026-07-12). */
156
157
  export const HallContentTextSurfaceSchema = z.enum([
157
- 'tale',
158
- 'tune',
159
- 'television',
160
- 'chapter',
161
- 'tuneTrack',
162
- 'televisionEpisode',
158
+ ...HALL_CONTENT_DETAIL_SURFACES,
159
+ ...HALL_CONTENT_SUB_ITEM_SURFACES,
163
160
  'workRealm',
164
161
  ]);
165
162
  /** The ONE canonical hall sub-item kind (a Tale chapter / Tune track /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wB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5C,mDAAmD;IACnD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC;AAGH,+GAA+G;AAC/G,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,wBAAwB,CAAC;CAC5C,CAAC,CAAC;AAGH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;CAC1C,CAAC,CAAC","sourcesContent":["// Content Firestore document SCHEMAS — Tales/Tunes/Television sub-documents, the\n// Threshold + Hall library item shapes, Hall library user preferences, and the\n// `_config` singleton docs (futurePlans, rulesAndAgreements). Types are inferred via\n// z.infer. The enum-key consts (HALL_WING_TYPE_KEYS / WORK_PROJECT_TYPE_KEYS) and the\n// UI-only filter/view types remain in ../types/content.ts.\n\nimport { z } from 'zod';\nimport { HALL_WING_TYPE_KEYS, WORK_PROJECT_TYPE_KEYS } from '../types/content.js';\nimport { ModerationEdgeSyncOpSchema, ModerationEdgeSyncStateSchema } from './moderation.js';\nimport { MAX_THRESHOLD_PUBLISH_PARKED_REASON_LENGTH } from '../constants/business-admin.js';\n\nconst contentStatusSchema = z.enum(['unpublished', 'pending_approval', 'published']);\n\n// Per-field moderation text-clear remedy (shared shape across the content family — Tale/Tune/\n// Television details, their chapter/track/episode sub-items, and the published Hall projections of\n// both). `moderationClearedFields` lists which text fields (e.g. 'title', 'description', 'content')\n// an admin cleared to a neutral placeholder and which now await steward re-entry; empty/absent when\n// nothing was cleared. `moderationClearedReason` is the operator's reason, surfaced on the member's\n// edit surface. Extends the workProject/workRealm placeholder remedy per-field. Backend-only-writable.\nconst moderationClearedFieldsShape = {\n moderationClearedFields: z.array(z.string()).optional(),\n moderationClearedReason: z.string().optional(),\n};\n\nexport const ItemsKeySchema = z.enum(['tuneTracks', 'chapters', 'televisionEpisodes']);\nexport type ItemsKey = z.infer<typeof ItemsKeySchema>;\n\n// --- WorkProject content sub-docs ---\n\nexport const FullTaleSchema = z.object({\n uid: z.string(),\n title: z.string(),\n description: z.string(),\n createdOn: z.number(),\n coverSquareAssetId: z.string().optional(),\n coverPosterAssetId: z.string().optional(),\n coverCinematicAssetId: z.string().optional(),\n workGenres: z.array(z.string()).optional(),\n ...moderationClearedFieldsShape,\n moderatedAt: z.number().optional(),\n});\nexport type FullTale = z.infer<typeof FullTaleSchema>;\n\nexport const FullChapterSchema = z.object({\n uid: z.string(),\n title: z.string(),\n content: z.string(),\n description: z.string(),\n order: z.number(),\n photoAssetId: z.string().optional(),\n status: contentStatusSchema,\n createdOn: z.number(),\n ...moderationClearedFieldsShape,\n moderatedAt: z.number().optional(),\n});\nexport type FullChapter = z.infer<typeof FullChapterSchema>;\n\nexport const FullTuneSchema = z.object({\n uid: z.string(),\n title: z.string(),\n description: z.string(),\n coverSquareAssetId: z.string().optional(),\n coverPosterAssetId: z.string().optional(),\n coverCinematicAssetId: z.string().optional(),\n workGenres: z.array(z.string()),\n createdOn: z.number(),\n ...moderationClearedFieldsShape,\n moderatedAt: z.number().optional(),\n});\nexport type FullTune = z.infer<typeof FullTuneSchema>;\n\nexport const FullTuneTrackSchema = z.object({\n uid: z.string(),\n title: z.string(),\n description: z.string().optional(),\n audioAssetId: z.string().optional(),\n mediaType: z.string().optional(),\n order: z.number(),\n photoAssetId: z.string().optional(),\n status: contentStatusSchema,\n createdOn: z.number(),\n ...moderationClearedFieldsShape,\n moderatedAt: z.number().optional(),\n});\nexport type FullTuneTrack = z.infer<typeof FullTuneTrackSchema>;\n\nexport const FullTelevisionSchema = z.object({\n uid: z.string(),\n title: z.string(),\n description: z.string(),\n createdOn: z.number(),\n coverSquareAssetId: z.string().optional(),\n coverPosterAssetId: z.string().optional(),\n coverCinematicAssetId: z.string().optional(),\n workGenres: z.array(z.string()),\n ...moderationClearedFieldsShape,\n moderatedAt: z.number().optional(),\n});\nexport type FullTelevision = z.infer<typeof FullTelevisionSchema>;\n\nexport const FullTelevisionEpisodeSchema = z.object({\n uid: z.string(),\n title: z.string(),\n description: z.string().optional(),\n videoAssetId: z.string(),\n mediaType: z.string().optional(),\n order: z.number(),\n photoAssetId: z.string().optional(),\n status: contentStatusSchema,\n createdOn: z.number(),\n ...moderationClearedFieldsShape,\n moderatedAt: z.number().optional(),\n});\nexport type FullTelevisionEpisode = z.infer<typeof FullTelevisionEpisodeSchema>;\n\n// --- Threshold + Hall library items ---\n\n/** `allWorkProjects/{workProjectId}/hallSubmissionReservation/reservation` — the Work's ONE\n * hall-entry reservation, created (never updated) inside the first threshold submit's\n * transaction; every later submit converges on its `hallItemId`. Backend-only. */\nexport const HallSubmissionReservationSchema = z.object({\n hallItemId: z.string().min(1),\n createdAt: z.number(),\n}).strict();\nexport type HallSubmissionReservation = z.infer<typeof HallSubmissionReservationSchema>;\n\nexport const ThresholdItemSchema = z.object({\n thresholdItemId: z.string(),\n hallItemId: z.string(),\n workProjectId: z.string(),\n workProjectType: z.enum(WORK_PROJECT_TYPE_KEYS),\n itemId: z.string(),\n itemsKey: ItemsKeySchema,\n order: z.number(),\n hallWingType: z.enum(HALL_WING_TYPE_KEYS),\n submittedAt: z.number(),\n reviewStatus: z.enum(['pending', 'needs_revision', 'approved']),\n adminNotes: z.string().optional(),\n reviewedAt: z.number().optional(),\n reviewedBy: z.string().optional(),\n // Parody / real-people AUTHOR ATTESTATION (R3, 2026-07-12). The submitting artisan\n // attests at threshold SUBMIT time that this work depicts real people (parody /\n // satire / commentary); stored with the submission and displayed READ-ONLY to the\n // reviewer. Admins never set or edit it — a reviewer who believes the flag is\n // needed and missing sends the item back needs-revision. The disclaimer shown on\n // published items is the ONE standard platform message\n // (REAL_PEOPLE_DISCLAIMER_MESSAGE) — there is no free-text disclaimer anywhere.\n hasRealPeople: z.boolean(),\n // Submission attestations — REQUIRED. The submit core refuses a submission unless the artisan\n // ticks all four, then stores each as the literal `true` with the moment they were given. A\n // threshold item without them is not a valid submission.\n attestConsistentFormat: z.literal(true),\n attestNoCredits: z.literal(true),\n attestNoBegging: z.literal(true),\n attestHumanMadeOriginal: z.literal(true),\n attestedAt: z.number(),\n // Reviewer confirmations — stamped `true` together by the APPROVAL write and never otherwise,\n // so their presence means the item was approved with all four checks confirmed.\n confirmedNoBegging: z.literal(true).optional(),\n confirmedNoCredits: z.literal(true).optional(),\n confirmedConsistentFormat: z.literal(true).optional(),\n confirmedRealPeopleAttestation: z.literal(true).optional(),\n // Terminal publish PARK. An approved item whose publish stops without publishing (source media\n // ineligible, a blocking safety hold, a moderation hide landing after approval, an invalid work\n // type) leaves the threshold doc + admin task in place for operator intervention. The reason was\n // only ever visible in Sentry and the `system.manualIntervention` audit event; stamping it here\n // is what lets the admin review work view say WHY the item is sitting there. Optional because\n // only a park stamps it, and `reviewStatus` keeps its meaning — a park is not a new status.\n publishParkedReason: z.string().max(MAX_THRESHOLD_PUBLISH_PARKED_REASON_LENGTH).optional(),\n publishParkedAt: z.number().optional(),\n});\nexport type ThresholdItem = z.infer<typeof ThresholdItemSchema>;\n\n// --- Published change requests (launch: text-only) ---\n\n/** The published hall-content surfaces whose TEXT fields a change request (and the\n * moderation text-clear remedy) can target. Detail surfaces live on the hall parent;\n * sub-item surfaces on the published chapter/track/episode doc; the `workRealm`\n * surface targets the single `workRealms/{id}` doc (the realm grain of the one\n * text-change pipeline — R1, 2026-07-12). */\nexport const HallContentTextSurfaceSchema = z.enum([\n 'tale',\n 'tune',\n 'television',\n 'chapter',\n 'tuneTrack',\n 'televisionEpisode',\n 'workRealm',\n]);\nexport type HallContentTextSurface = z.infer<typeof HallContentTextSurfaceSchema>;\n\n/** The ONE canonical hall sub-item kind (a Tale chapter / Tune track / Television\n * episode) as carried on notification metadata and Streetz post payloads. Distinct\n * from `HallContentTextSurfaceSchema` (which keys text-change surfaces and uses the\n * compound `tuneTrack`/`televisionEpisode` identifiers). Never re-declare inline. */\nexport const HallSubItemTypeSchema = z.enum(['chapter', 'track', 'episode']);\nexport type HallSubItemType = z.infer<typeof HallSubItemTypeSchema>;\n\n/** The ONE canonical published-hall-item lifecycle status. */\nexport const PublishedHallItemStatusSchema = z.enum(['published', 'paused', 'banned']);\nexport type PublishedHallItemStatus = z.infer<typeof PublishedHallItemStatusSchema>;\n\n// A member's proposal to change TEXT fields on a PUBLISHED hall item (Ruling 2 of the\n// admin-work-correspondence order). The live published item is NEVER unlocked and never\n// edited by the member — this doc carries the PROPOSED values only; OLD values render\n// live from the published docs. Approve = server writes the values onto the published\n// item + its live in-Work source doc; deny = nothing changes, `resolutionReason` shown\n// to the member. Writes are callable-only; reads are the owning work's active guildmates\n// + admins. `requestKind` future-proofs a media variant (new kind, no schema break).\nexport const HallContentChangeRequestSchema = z.object({\n changeRequestId: z.string(),\n requestKind: z.literal('text'),\n // One-open-per-target enforcement/query key. Hall grains:\n // `${hallItemId}_${subItemId ?? 'detail'}`; realm grain: `realm_${workRealmId}`.\n targetKey: z.string(),\n // null ⇒ the workRealm grain (no hall item involved).\n hallItemId: z.string().nullable(),\n // Always set. On the workRealm grain this is the realm's foundingWorkProjectId\n // (server-derived) so the owner list read, rules, and admin-task fields keep\n // one uniform key across all grains.\n workProjectId: z.string(),\n // null ⇒ the workRealm grain (a realm has no work-project type).\n workProjectType: z.enum(WORK_PROJECT_TYPE_KEYS).nullable(),\n surface: HallContentTextSurfaceSchema,\n // Set ⇒ the workRealm grain; null on the hall grains.\n workRealmId: z.string().nullable(),\n // null ⇒ the hall parent DETAIL (or the workRealm grain); set ⇒ a\n // chapter/track/episode sub-item.\n subItemId: z.string().nullable(),\n proposerUid: z.string(),\n // Raw doc field name → proposed new text. The top-level `surface` is the single\n // authoritative discriminator; allowlist + per-field caps are enforced at the backend\n // boundary by `validateHallContentTextFields` against HALL_CONTENT_TEXT_FIELDS /\n // HALL_CONTENT_TEXT_FIELD_MAX.\n proposedFields: z.record(z.string(), z.string()),\n status: z.enum(['requested', 'approved', 'denied']),\n createdAt: z.number(),\n lastUpdatedAt: z.number(),\n resolvedAt: z.number().optional(),\n resolvedBy: z.string().optional(),\n // Admin's reason, surfaced to the member (required on a deny).\n resolutionReason: z.string().optional(),\n});\nexport type HallContentChangeRequest = z.infer<typeof HallContentChangeRequestSchema>;\n\nexport const PublishedHallItemSchema = z.object({\n hallItemId: z.string(),\n workProjectId: z.string(),\n workProjectType: z.enum(WORK_PROJECT_TYPE_KEYS),\n status: PublishedHallItemStatusSchema,\n createdOn: z.number(),\n publishedAt: z.number().optional(),\n hallWingType: z.enum(HALL_WING_TYPE_KEYS),\n title: z.string().optional(),\n description: z.string().optional(),\n // REQUIRED on the published hall parent: all three covers are a publish-readiness rule, so a\n // published entry always carries every one. The working/draft section docs (FullTale / FullTune /\n // FullTelevision) keep them optional — that is where covers are uploaded one at a time.\n coverSquareAssetId: z.string().min(1),\n coverPosterAssetId: z.string().min(1),\n coverCinematicAssetId: z.string().min(1),\n workGenres: z.array(z.string()).optional(),\n followerCount: z.number().optional(),\n hidden: z.boolean(),\n // Whether the current hide was applied DIRECTly to this item or propagated by a moderation\n // CASCADE from a parent (realm/work). Absent when not hidden. Backend-only-writable.\n hiddenBy: z.enum(['direct', 'cascade']).optional(),\n // Moderation text-clear remedy (extends the workProject/workRealm placeholder family, per-field):\n // which text fields an admin cleared to a neutral placeholder and now await steward re-entry\n // (e.g. ['title', 'description']). Empty/absent when nothing was cleared. `moderationClearedReason`\n // is the operator's reason (shown on the steward's edit surface). Backend-only-writable.\n moderationClearedFields: z.array(z.string()).optional(),\n moderationClearedReason: z.string().optional(),\n moderatedAt: z.number().optional(),\n // Parody / real-people flag (carried from the approved ThresholdItem's AUTHOR\n // attestation — R3, 2026-07-12). When true, display surfaces render the ONE\n // standard platform message (REAL_PEOPLE_DISCLAIMER_MESSAGE) prominently on the\n // published Work — never a stored free-text disclaimer. Backend-written at publish.\n hasRealPeople: z.boolean().optional(),\n});\nexport type PublishedHallItem = z.infer<typeof PublishedHallItemSchema>;\n\nexport const PublishedTuneTrackSchema = z.object({\n uid: z.string(),\n title: z.string(),\n order: z.number(),\n description: z.string().optional(),\n // REQUIRED on a published sub-item (HALL_SUB_ITEM_REQUIRED_FIELDS_BY_WORK_TYPE.Tunes): a track\n // reaches the Hall only with its audio and its picture. The working `FullTuneTrack` keeps both\n // optional — that shape has to be able to represent incomplete content.\n audioAssetId: z.string().min(1),\n photoAssetId: z.string().min(1),\n hidden: z.boolean(),\n // Direct hide vs cascade-from-parent (see PublishedHallItemSchema). Absent when not hidden.\n hiddenBy: z.enum(['direct', 'cascade']).optional(),\n // Per-field moderation text-clear remedy (see PublishedHallItemSchema): which text fields were\n // cleared to a neutral placeholder and await steward re-entry, plus the operator's reason.\n moderationClearedFields: z.array(z.string()).optional(),\n moderationClearedReason: z.string().optional(),\n moderatedAt: z.number().optional(),\n edgeSyncState: ModerationEdgeSyncStateSchema.nullable().optional(),\n edgeSyncProcessingAt: z.number().optional(),\n edgeSyncOp: ModerationEdgeSyncOpSchema.optional(),\n edgeSyncAssetIds: z.array(z.string().min(1)).optional(),\n edgeSyncError: z.string().optional(),\n edgeSyncFailedAt: z.number().optional(),\n});\nexport type PublishedTuneTrack = z.infer<typeof PublishedTuneTrackSchema>;\n\nexport const PublishedChapterSchema = z.object({\n uid: z.string(),\n title: z.string(),\n order: z.number(),\n description: z.string().optional(),\n content: z.string(),\n // REQUIRED on a published sub-item (HALL_SUB_ITEM_REQUIRED_FIELDS_BY_WORK_TYPE.Tales); the\n // working `FullChapter` keeps it optional.\n photoAssetId: z.string().min(1),\n hidden: z.boolean(),\n // Direct hide vs cascade-from-parent (see PublishedHallItemSchema). Absent when not hidden.\n hiddenBy: z.enum(['direct', 'cascade']).optional(),\n // Per-field moderation text-clear remedy (see PublishedHallItemSchema): which text fields were\n // cleared to a neutral placeholder and await steward re-entry, plus the operator's reason.\n moderationClearedFields: z.array(z.string()).optional(),\n moderationClearedReason: z.string().optional(),\n moderatedAt: z.number().optional(),\n edgeSyncState: ModerationEdgeSyncStateSchema.nullable().optional(),\n edgeSyncProcessingAt: z.number().optional(),\n edgeSyncOp: ModerationEdgeSyncOpSchema.optional(),\n edgeSyncAssetIds: z.array(z.string().min(1)).optional(),\n edgeSyncError: z.string().optional(),\n edgeSyncFailedAt: z.number().optional(),\n});\nexport type PublishedChapter = z.infer<typeof PublishedChapterSchema>;\n\nexport const PublishedTelevisionEpisodeSchema = z.object({\n uid: z.string(),\n title: z.string(),\n order: z.number(),\n description: z.string().optional(),\n // REQUIRED on a published sub-item (HALL_SUB_ITEM_REQUIRED_FIELDS_BY_WORK_TYPE.Television): an\n // episode reaches the Hall only with its video and its picture. The working\n // `FullTelevisionEpisode` keeps the picture optional.\n videoAssetId: z.string().min(1),\n photoAssetId: z.string().min(1),\n hidden: z.boolean(),\n // Direct hide vs cascade-from-parent (see PublishedHallItemSchema). Absent when not hidden.\n hiddenBy: z.enum(['direct', 'cascade']).optional(),\n // Per-field moderation text-clear remedy (see PublishedHallItemSchema): which text fields were\n // cleared to a neutral placeholder and await steward re-entry, plus the operator's reason.\n moderationClearedFields: z.array(z.string()).optional(),\n moderationClearedReason: z.string().optional(),\n moderatedAt: z.number().optional(),\n edgeSyncState: ModerationEdgeSyncStateSchema.nullable().optional(),\n edgeSyncProcessingAt: z.number().optional(),\n edgeSyncOp: ModerationEdgeSyncOpSchema.optional(),\n edgeSyncAssetIds: z.array(z.string().min(1)).optional(),\n edgeSyncError: z.string().optional(),\n edgeSyncFailedAt: z.number().optional(),\n});\nexport type PublishedTelevisionEpisode = z.infer<typeof PublishedTelevisionEpisodeSchema>;\n\n// --- Hall library user preferences (per-user Hall viewing-state doc) ---\n\n// One per-user home, server-synced from day 1 (hall-viewing-experience Area 2, ruled\n// 2026-07-04): `userProfiles/{uid}/privateData/hallLibraryPreferences` (see\n// PATH_BUILDERS.hallLibraryPreferences). Writes are CALLABLE-ONLY — one core owns this\n// doc; heartbeat throttling for playback progress is client-side before the callable\n// fires. Every list on this doc is capped for launch (see HALL_LIBRARY_PREFS_CAPS) —\n// no unbounded per-user lists.\nexport const HallLibraryInProgressEntrySchema = z.object({\n itemId: z.string(),\n positionSeconds: z.number(),\n durationSeconds: z.number().optional(),\n updatedAt: z.number(),\n});\nexport type HallLibraryInProgressEntry = z.infer<typeof HallLibraryInProgressEntrySchema>;\n\nexport const HallLibraryRecentlyViewedEntrySchema = z.object({\n hallItemId: z.string(),\n itemId: z.string().optional(),\n viewedAt: z.number(),\n});\nexport type HallLibraryRecentlyViewedEntry = z.infer<typeof HallLibraryRecentlyViewedEntrySchema>;\n\nexport const HallLibrarySettingsSchema = z.object({\n tunesAutoplay: z.boolean(),\n});\nexport type HallLibrarySettings = z.infer<typeof HallLibrarySettingsSchema>;\n\nexport const HallLibraryPreferencesSchema = z.object({\n userId: z.string(),\n // Hall items the user personally hid (view filter only — see Area 6 ruling 5). Capped\n // ~200: oldest-pruned, or the hide is rejected with a friendly message once full.\n hiddenWorkIds: z.array(z.string()),\n // The \"Inked\" save-for-later watchlist (My Playbill Area 7). Capped ~200.\n inkedWorkIds: z.array(z.string()),\n // Resume position per hallItemId, LRU-capped ~50 (see HALL_LIBRARY_PREFS_CAPS.inProgress).\n // Cap enforcement is the backend core's job on write; this schema only models the shape.\n inProgress: z.record(z.string(), HallLibraryInProgressEntrySchema),\n // Server-side Keep-going/History rail source, capped ~20.\n recentlyViewed: z.array(HallLibraryRecentlyViewedEntrySchema),\n settings: HallLibrarySettingsSchema,\n lastUpdated: z.number(),\n});\nexport type HallLibraryPreferences = z.infer<typeof HallLibraryPreferencesSchema>;\n\n// --- _config singleton docs ---\n\nexport const FuturePlanItemSchema = z.object({\n id: z.string(),\n title: z.string(),\n description: z.string(),\n order: z.number(),\n videoUrl: z.string().optional(),\n mediaType: z.enum(['video', 'image', 'audio', 'other']).optional(),\n});\nexport type FuturePlanItem = z.infer<typeof FuturePlanItemSchema>;\n\nexport const FuturePlansDocumentSchema = z.object({\n lastUpdated: z.number(),\n plans: z.array(FuturePlanItemSchema),\n // Content version — bumped by the update callable on EVERY save (content-pages\n // migration, DJ ruling 2026-07-06). Optional because pre-migration docs lack\n // it; readers treat absence as version 1.\n version: z.number().optional(),\n});\nexport type FuturePlansDocument = z.infer<typeof FuturePlansDocumentSchema>;\n\nexport const RuleGroupSchema = z.enum(['generic', 'workProjectType', 'hallWingType', 'workRealm', 'merchandising']);\nexport type RuleGroup = z.infer<typeof RuleGroupSchema>;\n\nexport const RuleSubgroupSchema = z.enum(['Tales', 'Tunes', 'Television', 'entertainment', 'educational', 'newsPolitical']);\nexport type RuleSubgroup = z.infer<typeof RuleSubgroupSchema>;\n\nexport const RuleSchema = z.object({\n id: z.string(),\n title: z.string(),\n description: z.string(),\n videoUrl: z.string().optional(),\n group: RuleGroupSchema.optional(),\n subgroup: RuleSubgroupSchema.optional(),\n order: z.number(),\n});\nexport type Rule = z.infer<typeof RuleSchema>;\n\nexport const AgreementCategorySchema = z.object({\n points: z.array(z.string()),\n videoUrl: z.string().optional(),\n});\nexport type AgreementCategory = z.infer<typeof AgreementCategorySchema>;\n\nexport const RulesAndAgreementsSchema = z.object({\n rules: z.array(RuleSchema),\n agreements: z.object({\n tales: AgreementCategorySchema.optional(),\n tunes: AgreementCategorySchema.optional(),\n television: AgreementCategorySchema.optional(),\n }),\n // Content version — bumped by the update callable on EVERY save (content-pages\n // migration, DJ ruling 2026-07-06). Optional because pre-migration docs lack\n // it; readers treat absence as version 1.\n version: z.number().optional(),\n});\nexport type RulesAndAgreements = z.infer<typeof RulesAndAgreementsSchema>;\n\n// --- Editable content-page docs (content-pages Firestore migration, DJ ruling 2026-07-06) ---\n//\n// /terms, /privacy, and the /take-it-down page copy render EXCLUSIVELY from\n// these `_config` singletons — no hardcoded fallbacks anywhere (banned design).\n// Seed callables create them (strict seed-if-empty: doc exists ⇒ no-op); admin\n// editors are the only writers after that, and every save bumps `version`.\n// Acceptance records (e.g. privateData.agreements.termsVersion) read `version`\n// from the DOC server-side at acceptance time — never from a constant.\n// There is NO draft flag on any content doc (DJ ruling 2026-07-06).\n\n/** One section of a long-form content page. `level` 1 = section (h2), 2 = subsection (h3). */\nexport const ContentPageSectionSchema = z.object({\n id: z.string(),\n heading: z.string(),\n level: z.union([z.literal(1), z.literal(2)]),\n /** Plain text; blank-line-separated paragraphs. */\n body: z.string(),\n order: z.number(),\n});\nexport type ContentPageSection = z.infer<typeof ContentPageSectionSchema>;\n\n/** Long-form legal page doc — the shape of BOTH `_appConfig/termsOfService` and `_appConfig/privacyPolicy`. */\nexport const LegalPageDocumentSchema = z.object({\n version: z.number(),\n lastUpdated: z.number(),\n sections: z.array(ContentPageSectionSchema),\n});\nexport type LegalPageDocument = z.infer<typeof LegalPageDocumentSchema>;\n\n/**\n * `_appConfig/takeItDownPageCopy` — the /take-it-down page's user-facing language as\n * a keyed strings map (the page is a functional form, so its copy is discrete\n * labeled strings, not long-form sections). Keys are stable identifiers defined\n * by the page (e.g. `pageTitle`, `introBody`); the admin editor renders one\n * labeled text field per key.\n */\nexport const TakeItDownPageCopySchema = z.object({\n version: z.number(),\n lastUpdated: z.number(),\n strings: z.record(z.string(), z.string()),\n});\nexport type TakeItDownPageCopy = z.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vE,oEAAoE;AAEpE,8FAA8F;AAC9F,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5C,mDAAmD;IACnD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC;AAGH,+GAA+G;AAC/G,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,wBAAwB,CAAC;CAC5C,CAAC,CAAC;AAGH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;CAC1C,CAAC,CAAC","sourcesContent":["// Content Firestore document SCHEMAS — Tales/Tunes/Television sub-documents, the\n// Threshold + Hall library item shapes, Hall library user preferences, and the\n// `_config` singleton docs (futurePlans, rulesAndAgreements). Types are inferred via\n// z.infer. The enum-key consts (HALL_WING_TYPE_KEYS / WORK_PROJECT_TYPE_KEYS) and the\n// UI-only filter/view types remain in ../types/content.ts.\n\nimport { z } from 'zod';\nimport { HALL_WING_TYPE_KEYS, WORK_PROJECT_TYPE_KEYS } from '../types/content.js';\nimport { ModerationEdgeSyncOpSchema, ModerationEdgeSyncStateSchema } from './moderation.js';\nimport { MAX_THRESHOLD_PUBLISH_PARKED_REASON_LENGTH } from '../constants/business-admin.js';\nimport {\n HALL_CONTENT_DETAIL_SURFACES,\n HALL_CONTENT_SUB_ITEM_SURFACES,\n} from '../constants/hall-content-routing.js';\n\nconst contentStatusSchema = z.enum(['unpublished', 'pending_approval', 'published']);\n\n// Per-field moderation text-clear remedy (shared shape across the content family — Tale/Tune/\n// Television details, their chapter/track/episode sub-items, and the published Hall projections of\n// both). `moderationClearedFields` lists which text fields (e.g. 'title', 'description', 'content')\n// an admin cleared to a neutral placeholder and which now await steward re-entry; empty/absent when\n// nothing was cleared. `moderationClearedReason` is the operator's reason, surfaced on the member's\n// edit surface. Extends the workProject/workRealm placeholder remedy per-field. Backend-only-writable.\nconst moderationClearedFieldsShape = {\n moderationClearedFields: z.array(z.string()).optional(),\n moderationClearedReason: z.string().optional(),\n};\n\nexport const ItemsKeySchema = z.enum(['tuneTracks', 'chapters', 'televisionEpisodes']);\nexport type ItemsKey = z.infer<typeof ItemsKeySchema>;\n\n// --- WorkProject content sub-docs ---\n\nexport const FullTaleSchema = z.object({\n uid: z.string(),\n title: z.string(),\n description: z.string(),\n createdOn: z.number(),\n coverSquareAssetId: z.string().optional(),\n coverPosterAssetId: z.string().optional(),\n coverCinematicAssetId: z.string().optional(),\n workGenres: z.array(z.string()).optional(),\n ...moderationClearedFieldsShape,\n moderatedAt: z.number().optional(),\n});\nexport type FullTale = z.infer<typeof FullTaleSchema>;\n\nexport const FullChapterSchema = z.object({\n uid: z.string(),\n title: z.string(),\n content: z.string(),\n description: z.string(),\n order: z.number(),\n photoAssetId: z.string().optional(),\n status: contentStatusSchema,\n createdOn: z.number(),\n ...moderationClearedFieldsShape,\n moderatedAt: z.number().optional(),\n});\nexport type FullChapter = z.infer<typeof FullChapterSchema>;\n\nexport const FullTuneSchema = z.object({\n uid: z.string(),\n title: z.string(),\n description: z.string(),\n coverSquareAssetId: z.string().optional(),\n coverPosterAssetId: z.string().optional(),\n coverCinematicAssetId: z.string().optional(),\n workGenres: z.array(z.string()),\n createdOn: z.number(),\n ...moderationClearedFieldsShape,\n moderatedAt: z.number().optional(),\n});\nexport type FullTune = z.infer<typeof FullTuneSchema>;\n\nexport const FullTuneTrackSchema = z.object({\n uid: z.string(),\n title: z.string(),\n description: z.string().optional(),\n audioAssetId: z.string().optional(),\n mediaType: z.string().optional(),\n order: z.number(),\n photoAssetId: z.string().optional(),\n status: contentStatusSchema,\n createdOn: z.number(),\n ...moderationClearedFieldsShape,\n moderatedAt: z.number().optional(),\n});\nexport type FullTuneTrack = z.infer<typeof FullTuneTrackSchema>;\n\nexport const FullTelevisionSchema = z.object({\n uid: z.string(),\n title: z.string(),\n description: z.string(),\n createdOn: z.number(),\n coverSquareAssetId: z.string().optional(),\n coverPosterAssetId: z.string().optional(),\n coverCinematicAssetId: z.string().optional(),\n workGenres: z.array(z.string()),\n ...moderationClearedFieldsShape,\n moderatedAt: z.number().optional(),\n});\nexport type FullTelevision = z.infer<typeof FullTelevisionSchema>;\n\nexport const FullTelevisionEpisodeSchema = z.object({\n uid: z.string(),\n title: z.string(),\n description: z.string().optional(),\n videoAssetId: z.string(),\n mediaType: z.string().optional(),\n order: z.number(),\n photoAssetId: z.string().optional(),\n status: contentStatusSchema,\n createdOn: z.number(),\n ...moderationClearedFieldsShape,\n moderatedAt: z.number().optional(),\n});\nexport type FullTelevisionEpisode = z.infer<typeof FullTelevisionEpisodeSchema>;\n\n// --- Threshold + Hall library items ---\n\n/** `allWorkProjects/{workProjectId}/hallSubmissionReservation/reservation` — the Work's ONE\n * hall-entry reservation, created (never updated) inside the first threshold submit's\n * transaction; every later submit converges on its `hallItemId`. Backend-only. */\nexport const HallSubmissionReservationSchema = z.object({\n hallItemId: z.string().min(1),\n createdAt: z.number(),\n}).strict();\nexport type HallSubmissionReservation = z.infer<typeof HallSubmissionReservationSchema>;\n\nexport const ThresholdItemSchema = z.object({\n thresholdItemId: z.string(),\n hallItemId: z.string(),\n workProjectId: z.string(),\n workProjectType: z.enum(WORK_PROJECT_TYPE_KEYS),\n itemId: z.string(),\n itemsKey: ItemsKeySchema,\n order: z.number(),\n hallWingType: z.enum(HALL_WING_TYPE_KEYS),\n submittedAt: z.number(),\n reviewStatus: z.enum(['pending', 'needs_revision', 'approved']),\n adminNotes: z.string().optional(),\n reviewedAt: z.number().optional(),\n reviewedBy: z.string().optional(),\n // Parody / real-people AUTHOR ATTESTATION (R3, 2026-07-12). The submitting artisan\n // attests at threshold SUBMIT time that this work depicts real people (parody /\n // satire / commentary); stored with the submission and displayed READ-ONLY to the\n // reviewer. Admins never set or edit it — a reviewer who believes the flag is\n // needed and missing sends the item back needs-revision. The disclaimer shown on\n // published items is the ONE standard platform message\n // (REAL_PEOPLE_DISCLAIMER_MESSAGE) — there is no free-text disclaimer anywhere.\n hasRealPeople: z.boolean(),\n // Submission attestations — REQUIRED. The submit core refuses a submission unless the artisan\n // ticks all four, then stores each as the literal `true` with the moment they were given. A\n // threshold item without them is not a valid submission.\n attestConsistentFormat: z.literal(true),\n attestNoCredits: z.literal(true),\n attestNoBegging: z.literal(true),\n attestHumanMadeOriginal: z.literal(true),\n attestedAt: z.number(),\n // Reviewer confirmations — stamped `true` together by the APPROVAL write and never otherwise,\n // so their presence means the item was approved with all four checks confirmed.\n confirmedNoBegging: z.literal(true).optional(),\n confirmedNoCredits: z.literal(true).optional(),\n confirmedConsistentFormat: z.literal(true).optional(),\n confirmedRealPeopleAttestation: z.literal(true).optional(),\n // Terminal publish PARK. An approved item whose publish stops without publishing (source media\n // ineligible, a blocking safety hold, a moderation hide landing after approval, an invalid work\n // type) leaves the threshold doc + admin task in place for operator intervention. The reason was\n // only ever visible in Sentry and the `system.manualIntervention` audit event; stamping it here\n // is what lets the admin review work view say WHY the item is sitting there. Optional because\n // only a park stamps it, and `reviewStatus` keeps its meaning — a park is not a new status.\n publishParkedReason: z.string().max(MAX_THRESHOLD_PUBLISH_PARKED_REASON_LENGTH).optional(),\n publishParkedAt: z.number().optional(),\n});\nexport type ThresholdItem = z.infer<typeof ThresholdItemSchema>;\n\n// --- Published change requests (launch: text-only) ---\n\n/** The published hall-content surfaces whose TEXT fields a change request (and the\n * moderation text-clear remedy) can target. Detail surfaces live on the hall parent;\n * sub-item surfaces on the published chapter/track/episode doc; the `workRealm`\n * surface targets the single `workRealms/{id}` doc (the realm grain of the one\n * text-change pipeline — R1, 2026-07-12). */\nexport const HallContentTextSurfaceSchema = z.enum([\n ...HALL_CONTENT_DETAIL_SURFACES,\n ...HALL_CONTENT_SUB_ITEM_SURFACES,\n 'workRealm',\n]);\nexport type HallContentTextSurface = z.infer<typeof HallContentTextSurfaceSchema>;\n\n/** The ONE canonical hall sub-item kind (a Tale chapter / Tune track / Television\n * episode) as carried on notification metadata and Streetz post payloads. Distinct\n * from `HallContentTextSurfaceSchema` (which keys text-change surfaces and uses the\n * compound `tuneTrack`/`televisionEpisode` identifiers). Never re-declare inline. */\nexport const HallSubItemTypeSchema = z.enum(['chapter', 'track', 'episode']);\nexport type HallSubItemType = z.infer<typeof HallSubItemTypeSchema>;\n\n/** The ONE canonical published-hall-item lifecycle status. */\nexport const PublishedHallItemStatusSchema = z.enum(['published', 'paused', 'banned']);\nexport type PublishedHallItemStatus = z.infer<typeof PublishedHallItemStatusSchema>;\n\n// A member's proposal to change TEXT fields on a PUBLISHED hall item (Ruling 2 of the\n// admin-work-correspondence order). The live published item is NEVER unlocked and never\n// edited by the member — this doc carries the PROPOSED values only; OLD values render\n// live from the published docs. Approve = server writes the values onto the published\n// item + its live in-Work source doc; deny = nothing changes, `resolutionReason` shown\n// to the member. Writes are callable-only; reads are the owning work's active guildmates\n// + admins. `requestKind` future-proofs a media variant (new kind, no schema break).\nexport const HallContentChangeRequestSchema = z.object({\n changeRequestId: z.string(),\n requestKind: z.literal('text'),\n // One-open-per-target enforcement/query key. Hall grains:\n // `${hallItemId}_${subItemId ?? 'detail'}`; realm grain: `realm_${workRealmId}`.\n targetKey: z.string(),\n // null ⇒ the workRealm grain (no hall item involved).\n hallItemId: z.string().nullable(),\n // Always set. On the workRealm grain this is the realm's foundingWorkProjectId\n // (server-derived) so the owner list read, rules, and admin-task fields keep\n // one uniform key across all grains.\n workProjectId: z.string(),\n // null ⇒ the workRealm grain (a realm has no work-project type).\n workProjectType: z.enum(WORK_PROJECT_TYPE_KEYS).nullable(),\n surface: HallContentTextSurfaceSchema,\n // Set ⇒ the workRealm grain; null on the hall grains.\n workRealmId: z.string().nullable(),\n // null ⇒ the hall parent DETAIL (or the workRealm grain); set ⇒ a\n // chapter/track/episode sub-item.\n subItemId: z.string().nullable(),\n proposerUid: z.string(),\n // Raw doc field name → proposed new text. The top-level `surface` is the single\n // authoritative discriminator; allowlist + per-field caps are enforced at the backend\n // boundary by `validateHallContentTextFields` against HALL_CONTENT_TEXT_FIELDS /\n // HALL_CONTENT_TEXT_FIELD_MAX.\n proposedFields: z.record(z.string(), z.string()),\n status: z.enum(['requested', 'approved', 'denied']),\n createdAt: z.number(),\n lastUpdatedAt: z.number(),\n resolvedAt: z.number().optional(),\n resolvedBy: z.string().optional(),\n // Admin's reason, surfaced to the member (required on a deny).\n resolutionReason: z.string().optional(),\n});\nexport type HallContentChangeRequest = z.infer<typeof HallContentChangeRequestSchema>;\n\nexport const PublishedHallItemSchema = z.object({\n hallItemId: z.string(),\n workProjectId: z.string(),\n workProjectType: z.enum(WORK_PROJECT_TYPE_KEYS),\n status: PublishedHallItemStatusSchema,\n createdOn: z.number(),\n publishedAt: z.number().optional(),\n hallWingType: z.enum(HALL_WING_TYPE_KEYS),\n title: z.string().optional(),\n description: z.string().optional(),\n // REQUIRED on the published hall parent: all three covers are a publish-readiness rule, so a\n // published entry always carries every one. The working/draft section docs (FullTale / FullTune /\n // FullTelevision) keep them optional — that is where covers are uploaded one at a time.\n coverSquareAssetId: z.string().min(1),\n coverPosterAssetId: z.string().min(1),\n coverCinematicAssetId: z.string().min(1),\n workGenres: z.array(z.string()).optional(),\n followerCount: z.number().optional(),\n hidden: z.boolean(),\n // Whether the current hide was applied DIRECTly to this item or propagated by a moderation\n // CASCADE from a parent (realm/work). Absent when not hidden. Backend-only-writable.\n hiddenBy: z.enum(['direct', 'cascade']).optional(),\n // Moderation text-clear remedy (extends the workProject/workRealm placeholder family, per-field):\n // which text fields an admin cleared to a neutral placeholder and now await steward re-entry\n // (e.g. ['title', 'description']). Empty/absent when nothing was cleared. `moderationClearedReason`\n // is the operator's reason (shown on the steward's edit surface). Backend-only-writable.\n moderationClearedFields: z.array(z.string()).optional(),\n moderationClearedReason: z.string().optional(),\n moderatedAt: z.number().optional(),\n // Parody / real-people flag (carried from the approved ThresholdItem's AUTHOR\n // attestation — R3, 2026-07-12). When true, display surfaces render the ONE\n // standard platform message (REAL_PEOPLE_DISCLAIMER_MESSAGE) prominently on the\n // published Work — never a stored free-text disclaimer. Backend-written at publish.\n hasRealPeople: z.boolean().optional(),\n});\nexport type PublishedHallItem = z.infer<typeof PublishedHallItemSchema>;\n\nexport const PublishedTuneTrackSchema = z.object({\n uid: z.string(),\n title: z.string(),\n order: z.number(),\n description: z.string().optional(),\n // REQUIRED on a published sub-item (HALL_SUB_ITEM_REQUIRED_FIELDS_BY_WORK_TYPE.Tunes): a track\n // reaches the Hall only with its audio and its picture. The working `FullTuneTrack` keeps both\n // optional — that shape has to be able to represent incomplete content.\n audioAssetId: z.string().min(1),\n photoAssetId: z.string().min(1),\n hidden: z.boolean(),\n // Direct hide vs cascade-from-parent (see PublishedHallItemSchema). Absent when not hidden.\n hiddenBy: z.enum(['direct', 'cascade']).optional(),\n // Per-field moderation text-clear remedy (see PublishedHallItemSchema): which text fields were\n // cleared to a neutral placeholder and await steward re-entry, plus the operator's reason.\n moderationClearedFields: z.array(z.string()).optional(),\n moderationClearedReason: z.string().optional(),\n moderatedAt: z.number().optional(),\n edgeSyncState: ModerationEdgeSyncStateSchema.nullable().optional(),\n edgeSyncProcessingAt: z.number().optional(),\n edgeSyncOp: ModerationEdgeSyncOpSchema.optional(),\n edgeSyncAssetIds: z.array(z.string().min(1)).optional(),\n edgeSyncError: z.string().optional(),\n edgeSyncFailedAt: z.number().optional(),\n});\nexport type PublishedTuneTrack = z.infer<typeof PublishedTuneTrackSchema>;\n\nexport const PublishedChapterSchema = z.object({\n uid: z.string(),\n title: z.string(),\n order: z.number(),\n description: z.string().optional(),\n content: z.string(),\n // REQUIRED on a published sub-item (HALL_SUB_ITEM_REQUIRED_FIELDS_BY_WORK_TYPE.Tales); the\n // working `FullChapter` keeps it optional.\n photoAssetId: z.string().min(1),\n hidden: z.boolean(),\n // Direct hide vs cascade-from-parent (see PublishedHallItemSchema). Absent when not hidden.\n hiddenBy: z.enum(['direct', 'cascade']).optional(),\n // Per-field moderation text-clear remedy (see PublishedHallItemSchema): which text fields were\n // cleared to a neutral placeholder and await steward re-entry, plus the operator's reason.\n moderationClearedFields: z.array(z.string()).optional(),\n moderationClearedReason: z.string().optional(),\n moderatedAt: z.number().optional(),\n edgeSyncState: ModerationEdgeSyncStateSchema.nullable().optional(),\n edgeSyncProcessingAt: z.number().optional(),\n edgeSyncOp: ModerationEdgeSyncOpSchema.optional(),\n edgeSyncAssetIds: z.array(z.string().min(1)).optional(),\n edgeSyncError: z.string().optional(),\n edgeSyncFailedAt: z.number().optional(),\n});\nexport type PublishedChapter = z.infer<typeof PublishedChapterSchema>;\n\nexport const PublishedTelevisionEpisodeSchema = z.object({\n uid: z.string(),\n title: z.string(),\n order: z.number(),\n description: z.string().optional(),\n // REQUIRED on a published sub-item (HALL_SUB_ITEM_REQUIRED_FIELDS_BY_WORK_TYPE.Television): an\n // episode reaches the Hall only with its video and its picture. The working\n // `FullTelevisionEpisode` keeps the picture optional.\n videoAssetId: z.string().min(1),\n photoAssetId: z.string().min(1),\n hidden: z.boolean(),\n // Direct hide vs cascade-from-parent (see PublishedHallItemSchema). Absent when not hidden.\n hiddenBy: z.enum(['direct', 'cascade']).optional(),\n // Per-field moderation text-clear remedy (see PublishedHallItemSchema): which text fields were\n // cleared to a neutral placeholder and await steward re-entry, plus the operator's reason.\n moderationClearedFields: z.array(z.string()).optional(),\n moderationClearedReason: z.string().optional(),\n moderatedAt: z.number().optional(),\n edgeSyncState: ModerationEdgeSyncStateSchema.nullable().optional(),\n edgeSyncProcessingAt: z.number().optional(),\n edgeSyncOp: ModerationEdgeSyncOpSchema.optional(),\n edgeSyncAssetIds: z.array(z.string().min(1)).optional(),\n edgeSyncError: z.string().optional(),\n edgeSyncFailedAt: z.number().optional(),\n});\nexport type PublishedTelevisionEpisode = z.infer<typeof PublishedTelevisionEpisodeSchema>;\n\n// --- Hall library user preferences (per-user Hall viewing-state doc) ---\n\n// One per-user home, server-synced from day 1 (hall-viewing-experience Area 2, ruled\n// 2026-07-04): `userProfiles/{uid}/privateData/hallLibraryPreferences` (see\n// PATH_BUILDERS.hallLibraryPreferences). Writes are CALLABLE-ONLY — one core owns this\n// doc; heartbeat throttling for playback progress is client-side before the callable\n// fires. Every list on this doc is capped for launch (see HALL_LIBRARY_PREFS_CAPS) —\n// no unbounded per-user lists.\nexport const HallLibraryInProgressEntrySchema = z.object({\n itemId: z.string(),\n positionSeconds: z.number(),\n durationSeconds: z.number().optional(),\n updatedAt: z.number(),\n});\nexport type HallLibraryInProgressEntry = z.infer<typeof HallLibraryInProgressEntrySchema>;\n\nexport const HallLibraryRecentlyViewedEntrySchema = z.object({\n hallItemId: z.string(),\n itemId: z.string().optional(),\n viewedAt: z.number(),\n});\nexport type HallLibraryRecentlyViewedEntry = z.infer<typeof HallLibraryRecentlyViewedEntrySchema>;\n\nexport const HallLibrarySettingsSchema = z.object({\n tunesAutoplay: z.boolean(),\n});\nexport type HallLibrarySettings = z.infer<typeof HallLibrarySettingsSchema>;\n\nexport const HallLibraryPreferencesSchema = z.object({\n userId: z.string(),\n // Hall items the user personally hid (view filter only — see Area 6 ruling 5). Capped\n // ~200: oldest-pruned, or the hide is rejected with a friendly message once full.\n hiddenWorkIds: z.array(z.string()),\n // The \"Inked\" save-for-later watchlist (My Playbill Area 7). Capped ~200.\n inkedWorkIds: z.array(z.string()),\n // Resume position per hallItemId, LRU-capped ~50 (see HALL_LIBRARY_PREFS_CAPS.inProgress).\n // Cap enforcement is the backend core's job on write; this schema only models the shape.\n inProgress: z.record(z.string(), HallLibraryInProgressEntrySchema),\n // Server-side Keep-going/History rail source, capped ~20.\n recentlyViewed: z.array(HallLibraryRecentlyViewedEntrySchema),\n settings: HallLibrarySettingsSchema,\n lastUpdated: z.number(),\n});\nexport type HallLibraryPreferences = z.infer<typeof HallLibraryPreferencesSchema>;\n\n// --- _config singleton docs ---\n\nexport const FuturePlanItemSchema = z.object({\n id: z.string(),\n title: z.string(),\n description: z.string(),\n order: z.number(),\n videoUrl: z.string().optional(),\n mediaType: z.enum(['video', 'image', 'audio', 'other']).optional(),\n});\nexport type FuturePlanItem = z.infer<typeof FuturePlanItemSchema>;\n\nexport const FuturePlansDocumentSchema = z.object({\n lastUpdated: z.number(),\n plans: z.array(FuturePlanItemSchema),\n // Content version — bumped by the update callable on EVERY save (content-pages\n // migration, DJ ruling 2026-07-06). Optional because pre-migration docs lack\n // it; readers treat absence as version 1.\n version: z.number().optional(),\n});\nexport type FuturePlansDocument = z.infer<typeof FuturePlansDocumentSchema>;\n\nexport const RuleGroupSchema = z.enum(['generic', 'workProjectType', 'hallWingType', 'workRealm', 'merchandising']);\nexport type RuleGroup = z.infer<typeof RuleGroupSchema>;\n\nexport const RuleSubgroupSchema = z.enum(['Tales', 'Tunes', 'Television', 'entertainment', 'educational', 'newsPolitical']);\nexport type RuleSubgroup = z.infer<typeof RuleSubgroupSchema>;\n\nexport const RuleSchema = z.object({\n id: z.string(),\n title: z.string(),\n description: z.string(),\n videoUrl: z.string().optional(),\n group: RuleGroupSchema.optional(),\n subgroup: RuleSubgroupSchema.optional(),\n order: z.number(),\n});\nexport type Rule = z.infer<typeof RuleSchema>;\n\nexport const AgreementCategorySchema = z.object({\n points: z.array(z.string()),\n videoUrl: z.string().optional(),\n});\nexport type AgreementCategory = z.infer<typeof AgreementCategorySchema>;\n\nexport const RulesAndAgreementsSchema = z.object({\n rules: z.array(RuleSchema),\n agreements: z.object({\n tales: AgreementCategorySchema.optional(),\n tunes: AgreementCategorySchema.optional(),\n television: AgreementCategorySchema.optional(),\n }),\n // Content version — bumped by the update callable on EVERY save (content-pages\n // migration, DJ ruling 2026-07-06). Optional because pre-migration docs lack\n // it; readers treat absence as version 1.\n version: z.number().optional(),\n});\nexport type RulesAndAgreements = z.infer<typeof RulesAndAgreementsSchema>;\n\n// --- Editable content-page docs (content-pages Firestore migration, DJ ruling 2026-07-06) ---\n//\n// /terms, /privacy, and the /take-it-down page copy render EXCLUSIVELY from\n// these `_config` singletons — no hardcoded fallbacks anywhere (banned design).\n// Seed callables create them (strict seed-if-empty: doc exists ⇒ no-op); admin\n// editors are the only writers after that, and every save bumps `version`.\n// Acceptance records (e.g. privateData.agreements.termsVersion) read `version`\n// from the DOC server-side at acceptance time — never from a constant.\n// There is NO draft flag on any content doc (DJ ruling 2026-07-06).\n\n/** One section of a long-form content page. `level` 1 = section (h2), 2 = subsection (h3). */\nexport const ContentPageSectionSchema = z.object({\n id: z.string(),\n heading: z.string(),\n level: z.union([z.literal(1), z.literal(2)]),\n /** Plain text; blank-line-separated paragraphs. */\n body: z.string(),\n order: z.number(),\n});\nexport type ContentPageSection = z.infer<typeof ContentPageSectionSchema>;\n\n/** Long-form legal page doc — the shape of BOTH `_appConfig/termsOfService` and `_appConfig/privacyPolicy`. */\nexport const LegalPageDocumentSchema = z.object({\n version: z.number(),\n lastUpdated: z.number(),\n sections: z.array(ContentPageSectionSchema),\n});\nexport type LegalPageDocument = z.infer<typeof LegalPageDocumentSchema>;\n\n/**\n * `_appConfig/takeItDownPageCopy` — the /take-it-down page's user-facing language as\n * a keyed strings map (the page is a functional form, so its copy is discrete\n * labeled strings, not long-form sections). Keys are stable identifiers defined\n * by the page (e.g. `pageTitle`, `introBody`); the admin editor renders one\n * labeled text field per key.\n */\nexport const TakeItDownPageCopySchema = z.object({\n version: z.number(),\n lastUpdated: z.number(),\n strings: z.record(z.string(), z.string()),\n});\nexport type TakeItDownPageCopy = z.infer<typeof TakeItDownPageCopySchema>;\n"]}
@@ -1153,10 +1153,10 @@ export declare const COLLECTION_SCHEMAS: {
1153
1153
  surface: z.ZodEnum<{
1154
1154
  workRealm: "workRealm";
1155
1155
  tale: "tale";
1156
- tune: "tune";
1157
- television: "television";
1158
1156
  chapter: "chapter";
1157
+ tune: "tune";
1159
1158
  tuneTrack: "tuneTrack";
1159
+ television: "television";
1160
1160
  televisionEpisode: "televisionEpisode";
1161
1161
  }>;
1162
1162
  workRealmId: z.ZodNullable<z.ZodString>;