@ttt-productions/ttt-core 0.79.45 → 0.79.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants/business-content.d.ts +1 -1
- package/dist/constants/business-content.d.ts.map +1 -1
- package/dist/constants/business-content.js +1 -1
- package/dist/constants/business-content.js.map +1 -1
- package/dist/constants/hall-content-routing.d.ts +9 -0
- package/dist/constants/hall-content-routing.d.ts.map +1 -1
- package/dist/constants/hall-content-routing.js +17 -0
- package/dist/constants/hall-content-routing.js.map +1 -1
- package/dist/doc-schemas/content.d.ts +4 -4
- package/dist/doc-schemas/content.d.ts.map +1 -1
- package/dist/doc-schemas/content.js +3 -6
- package/dist/doc-schemas/content.js.map +1 -1
- package/dist/doc-schemas/registry.d.ts +2 -2
- package/dist/doc-schemas/work-project.d.ts +12 -0
- package/dist/doc-schemas/work-project.d.ts.map +1 -1
- package/dist/doc-schemas/work-project.js +10 -2
- package/dist/doc-schemas/work-project.js.map +1 -1
- package/dist/media/domain-events-work.d.ts.map +1 -1
- package/dist/media/domain-events-work.js +3 -2
- package/dist/media/domain-events-work.js.map +1 -1
- package/dist/media/target-info.d.ts.map +1 -1
- package/dist/media/target-info.js +2 -1
- package/dist/media/target-info.js.map +1 -1
- package/dist/schemas/admin.d.ts +2 -2
- package/dist/schemas/atoms.d.ts +2 -2
- package/dist/types/work-project.d.ts +1 -1
- package/dist/types/work-project.d.ts.map +1 -1
- package/dist/types/work-project.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { WorkProjectType } from '../types/content.js';
|
|
2
|
-
export { HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE, type HallContentDetailSurface, type HallContentSubItemSurface, } from './hall-content-routing.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';
|
|
3
3
|
/** The maximum character length for a SquareStreetz post created on behalf of a workProject. */
|
|
4
4
|
export declare const MAX_SQUARE_STREETZ_DESCRIPTION_LENGTH = 150;
|
|
5
5
|
/** Maximum number of open commissions a workProject can have. Mode-varied. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business-content.d.ts","sourceRoot":"","sources":["../../src/constants/business-content.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,EACL,uCAAuC,EACvC,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,GAC/B,MAAM,2BAA2B,CAAC;AAEnC,gGAAgG;AAChG,eAAO,MAAM,qCAAqC,MAAM,CAAC;AAIzD,8EAA8E;AAC9E,eAAO,MAAM,uBAAuB,QAAkD,CAAC;AAEvF,iEAAiE;AACjE,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAE7C,6CAA6C;AAC7C,eAAO,MAAM,2BAA2B,MAAgC,CAAC;AAEzE,kEAAkE;AAClE,eAAO,MAAM,iCAAiC,MAAM,CAAC;AAIrD;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,oEACqB,CAAC;AAE/D;;;;;GAKG;AACH,eAAO,MAAM,iCAAiC,2BAA2B,CAAC;AAC1E,eAAO,MAAM,iCAAiC,6CAA6C,CAAC;AAE5F;;;;;;;;GAQG;AACH,eAAO,MAAM,gCAAgC;;;;;;;;;CAYS,CAAC;AAEvD,8EAA8E;AAC9E,MAAM,MAAM,0BAA0B,GAAG,MAAM,OAAO,gCAAgC,CAAC;AAEvF;;;;;GAKG;AACH,MAAM,MAAM,sBAAsB,GAChC,CAAC,OAAO,gCAAgC,CAAC,CAAC,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhF;;;;GAIG;AACH,MAAM,MAAM,6BAA6B,GAAG;KACzC,KAAK,IAAI,sBAAsB,CAAC,CAAC,EAAE,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H,eAAO,MAAM,6BAA6B,QAEiC,CAAC;AAE5E,eAAO,MAAM,8BAA8B,QAMO,CAAC;AAInD;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB;;;;;CAKO,CAAC;AAI5C,4CAA4C;AAC5C,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAE7C;;4EAE4E;AAC5E,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAC9C,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAE9C,kDAAkD;AAClD,eAAO,MAAM,+BAA+B,OAAO,CAAC;AAEpD;;;;;GAKG;AACH,eAAO,MAAM,iCAAiC,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"}
|
|
@@ -4,7 +4,7 @@ import { MAX_WORK_PROJECT_TITLE_LENGTH, MAX_WORK_PROJECT_DESCRIPTION_LENGTH, MAX
|
|
|
4
4
|
import { ACTIVE_LIMITS } from './app-mode.js';
|
|
5
5
|
import { HALL_LIBRARY_TARGET_FIELDS } from '../media/hall-library-target-fields.js';
|
|
6
6
|
import { HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE } from './hall-content-routing.js';
|
|
7
|
-
export { 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';
|
|
8
8
|
/** The maximum character length for a SquareStreetz post created on behalf of a workProject. */
|
|
9
9
|
export const MAX_SQUARE_STREETZ_DESCRIPTION_LENGTH = 150;
|
|
10
10
|
// --- Commission Board & Proposals ---
|
|
@@ -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;AAEpF,OAAO,EAAE,uCAAuC,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,EACL,uCAAuC,GAGxC,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;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,yCAAyC;IACzC,WAAW,EAAE,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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 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"]}
|
|
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,qCAA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// 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"]}
|
|
@@ -20,4 +20,13 @@ export declare const HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE: {
|
|
|
20
20
|
};
|
|
21
21
|
export type HallContentDetailSurface = (typeof HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE)[WorkProjectType]['detailSurface'];
|
|
22
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"];
|
|
23
32
|
//# sourceMappingURL=hall-content-routing.d.ts.map
|
|
@@ -1 +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"}
|
|
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"}
|
|
@@ -17,4 +17,21 @@ export const HALL_CONTENT_SURFACE_NAMES_BY_WORK_TYPE = {
|
|
|
17
17
|
subItemSurface: 'televisionEpisode',
|
|
18
18
|
},
|
|
19
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
|
+
];
|
|
20
37
|
//# sourceMappingURL=hall-content-routing.js.map
|
|
@@ -1 +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","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"]}
|
|
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","sourceRoot":"","sources":["../../src/doc-schemas/content.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/content.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAsBxB,eAAO,MAAM,cAAc;;;;EAA2D,CAAC;AACvF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAItD,eAAO,MAAM,cAAc;;;;;;;;;;;;iBAWzB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;iBAW5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,cAAc;;;;;;;;;;;;iBAWzB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,C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ACH,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
|
-
|
|
158
|
-
|
|
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 / Television
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.js","sourceRo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E,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.infer<typeof TakeItDownPageCopySchema>;\n"]}
|
|
1
|
+
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AM,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>;
|
|
@@ -4,6 +4,18 @@ export declare const GuildmateStatusSchema: z.ZodEnum<{
|
|
|
4
4
|
departed: "departed";
|
|
5
5
|
}>;
|
|
6
6
|
export type GuildmateStatus = z.infer<typeof GuildmateStatusSchema>;
|
|
7
|
+
/**
|
|
8
|
+
* The ONE canonical standing of a Work INSIDE its Realm — whether the Work counts as part of
|
|
9
|
+
* the Realm's canon. Carried on the Work shell and its public projection, and used as a query
|
|
10
|
+
* filter by the Realm page. Distinct from `RealmFileCanonStatus` (media-assets.ts), which is the
|
|
11
|
+
* approval gate of a FILE shared into a Realm and carries two further unshared/awaiting states.
|
|
12
|
+
* Consumers derive from this instead of re-quoting the members.
|
|
13
|
+
*/
|
|
14
|
+
export declare const RealmCanonStatusSchema: z.ZodEnum<{
|
|
15
|
+
nonCanon: "nonCanon";
|
|
16
|
+
canon: "canon";
|
|
17
|
+
}>;
|
|
18
|
+
export type RealmCanonStatus = z.infer<typeof RealmCanonStatusSchema>;
|
|
7
19
|
/**
|
|
8
20
|
* The realm founding-Work stake holder — a non-person ledger entry keyed by the founding
|
|
9
21
|
* workProjectId, never a user uid. It must never reach the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AAC;AACF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA8BhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAGpE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgBlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAWxE,4EAA4E;AAC5E,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;iBAoB/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,mGAAmG;AACnG,eAAO,MAAM,cAAc;;;;;;;;;;;;iBAUzB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAGtD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoC1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AA0BxD,8FAA8F;AAC9F,eAAO,MAAM,qBAAqB;;;;;;;;;;iBAWhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -13,6 +13,14 @@ import { isGuildStandingId } from '../permissions/index.js';
|
|
|
13
13
|
const guildStandingIdSchema = z.custom(isGuildStandingId);
|
|
14
14
|
const userRefSchema = z.object({ uid: z.string() });
|
|
15
15
|
export const GuildmateStatusSchema = z.enum(['active', 'departed']);
|
|
16
|
+
/**
|
|
17
|
+
* The ONE canonical standing of a Work INSIDE its Realm — whether the Work counts as part of
|
|
18
|
+
* the Realm's canon. Carried on the Work shell and its public projection, and used as a query
|
|
19
|
+
* filter by the Realm page. Distinct from `RealmFileCanonStatus` (media-assets.ts), which is the
|
|
20
|
+
* approval gate of a FILE shared into a Realm and carries two further unshared/awaiting states.
|
|
21
|
+
* Consumers derive from this instead of re-quoting the members.
|
|
22
|
+
*/
|
|
23
|
+
export const RealmCanonStatusSchema = z.enum(['canon', 'nonCanon']);
|
|
16
24
|
/**
|
|
17
25
|
* The realm founding-Work stake holder — a non-person ledger entry keyed by the founding
|
|
18
26
|
* workProjectId, never a user uid. It must never reach the public collaborator roster.
|
|
@@ -80,7 +88,7 @@ export const FullWorkProjectSchema = z.object({
|
|
|
80
88
|
guildmateUserIds: z.record(z.string(), z.boolean()).optional(),
|
|
81
89
|
invitedUserIds: z.record(z.string(), z.boolean()).optional(),
|
|
82
90
|
workRealmId: z.string(),
|
|
83
|
-
realmCanonStatus:
|
|
91
|
+
realmCanonStatus: RealmCanonStatusSchema,
|
|
84
92
|
pendingStakeShares: PendingStakeSharesSchema.optional(),
|
|
85
93
|
// Moderation "require retitle" remedy (work/realm report path). When an admin
|
|
86
94
|
// upholds a report on an abusive public title/description, they may replace the
|
|
@@ -105,7 +113,7 @@ export const PublicWorkProjectSchema = z.object({
|
|
|
105
113
|
publicWorkStatus: z.enum(['draft', 'released']),
|
|
106
114
|
publicWorkHidden: z.boolean(),
|
|
107
115
|
workRealmId: z.string(),
|
|
108
|
-
realmCanonStatus:
|
|
116
|
+
realmCanonStatus: RealmCanonStatusSchema,
|
|
109
117
|
type: z.enum(WORK_PROJECT_TYPE_KEYS),
|
|
110
118
|
hallWingType: z.enum(HALL_WING_TYPE_KEYS),
|
|
111
119
|
workingTitle: z.string(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"work-project.js","sourceRoot":"","sources":["../../src/doc-schemas/work-project.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,m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AE;IAC7B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB;;gEAE4D;IAC5D,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;IAC1B,SAAS,EAAE,aAAa;IACxB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC","sourcesContent":["// WorkProject / Realm / Guild Firestore document SCHEMAS — single source of truth.\n// Covers allWorkProjects/{workProjectId}, its guildmateUsers/publicGuildmateUsers/\n// workAssets subcollections, publicWorkProjects/{workProjectId}, workRealms/{workRealmId},\n// and the guildInviteConversations invite shell. Types are inferred via z.infer so a\n// document's shape and its TypeScript type cannot drift apart.\n//\n// Terminology: the current-owner field is `workStewardUid` (locked rename from the old\n// `ownerUid`; see ttt-prod docs/design/terminology-naming-convention.md — Steward row). The original\n// creator is `foundingArtisanUid` (locked rename from the old `createdByUid`; Founding Artisan).\n\nimport { z } from 'zod';\nimport { HALL_WING_TYPE_KEYS, WORK_PROJECT_TYPE_KEYS } from '../types/content.js';\nimport { isGuildStandingId, type GuildStandingId } from '../permissions/index.js';\n\nconst guildStandingIdSchema = z.custom<GuildStandingId>(isGuildStandingId);\nconst userRefSchema = z.object({ uid: z.string() });\n\nexport const GuildmateStatusSchema = z.enum(['active', 'departed']);\nexport type GuildmateStatus = z.infer<typeof GuildmateStatusSchema>;\n\n/**\n * The realm founding-Work stake holder — a non-person ledger entry keyed by the founding\n * workProjectId, never a user uid. It must never reach the public collaborator roster.\n * Consumers branch on this rather than re-quoting the member.\n */\nexport const FOUNDING_WORK_HOLDER_TYPE = 'foundingWork' as const;\n\nexport const GuildmateUserSchema = z.object({\n uid: z.string(),\n guildStandings: z.array(guildStandingIdSchema),\n tradeProfessions: z.array(z.string()),\n stakeShareCount: z.number(),\n joinedAt: z.number(),\n status: GuildmateStatusSchema,\n /**\n * Holder kind for this stake entry. Absent/`'user'` = a real guildmate person.\n * `'foundingWork'` = the realm founding-Work holder (keyed by the founding\n * workProjectId, NOT a user uid).\n */\n holderType: z.enum(['user', FOUNDING_WORK_HOLDER_TYPE]).optional(),\n /**\n * Per-(user, workProject) monotonic INPUT-trigger version for the chat\n * channel-auth projection (chat-edge-rebuild Contract B / P3). Absent ⇒ 0.\n * Bumped atomically in the authoritative mutation on member create/reactivate,\n * departure/removal, standing change, AND trade-profession change; the\n * `workChannelsForUser` fanout keys on the POST-increment value. It NEVER\n * increments or replaces the per-pair OUTPUT `channelAuthVersion`.\n */\n guildAuthInputVersion: z.number().optional(),\n /**\n * N3 data-deletion / account-end forfeiture tombstone. Set together with\n * `status: 'departed'` when a member leaves involuntarily-of-record: their\n * stake shares STAY in the immutable 1000-split (never removed) but are\n * forfeited — the future payout engine routes a tombstone's slice to the\n * community fund and excludes it from active distribution. `departedReason`\n * distinguishes the cause; `'bannedForCause'` is reserved for the future\n * ban-forfeiture path (included now so it needs no second package publish).\n *\n * `'selfLeave'` is DIFFERENT share semantics: a PRE-PUBLISH voluntary guild\n * exit (leaveWorkProject). There the 1000-split is still fluid, so the\n * member's `stakeShareCount` is ZEROED and returned to the pool for the\n * steward to re-allocate — NOT retained as a community-fund tombstone. A\n * self-leave is impossible once `status: 'published'` (the stake-share freeze\n * blocks it), so the tombstone and the pool-return dispositions never overlap\n * in a single Work's lifecycle.\n */\n departedReason: z.enum(['voluntaryDeletion', 'bannedForCause', 'selfLeave']).optional(),\n departedAt: z.number().optional(),\n});\nexport type GuildmateUser = z.infer<typeof GuildmateUserSchema>;\n\nexport const PublicGuildmateUserSchema = z.object({\n uid: z.string(),\n tradeProfessions: z.array(z.string()),\n joinedAt: z.number(),\n status: GuildmateStatusSchema,\n});\nexport type PublicGuildmateUser = z.infer<typeof PublicGuildmateUserSchema>;\n\nexport const PendingStakeSharesSchema = z.record(\n z.string(),\n z.object({ amount: z.number(), createdAt: z.number() }),\n);\nexport type PendingStakeShares = z.infer<typeof PendingStakeSharesSchema>;\n\nexport const FullWorkProjectSchema = z.object({\n workProjectId: z.string(),\n createdOn: z.number(),\n type: z.string(),\n workingDescription: z.string(),\n workingTitle: z.string(),\n hallWingType: z.enum(HALL_WING_TYPE_KEYS),\n createdBy: userRefSchema,\n status: z.enum(['open', 'pendingVerification', 'published', 'rejected']),\n guildmateUserIds: z.record(z.string(), z.boolean()).optional(),\n invitedUserIds: z.record(z.string(), z.boolean()).optional(),\n workRealmId: z.string(),\n realmCanonStatus: z.enum(['canon', 'nonCanon']),\n pendingStakeShares: PendingStakeSharesSchema.optional(),\n // Moderation \"require retitle\" remedy (work/realm report path). When an admin\n // upholds a report on an abusive public title/description, they may replace the\n // text with a generic placeholder and set this flag; the steward is prompted to\n // re-enter compliant text the next time they open the work (unpublished = direct\n // self-edit clears it; published = via the post-launch change-request flow).\n // Distinct from the `publicWorkHidden` hide (DMCA/copyright) — this keeps the\n // work visible under the placeholder. Backend-only-writable.\n moderationRetitleRequired: z.boolean().optional(),\n moderationRetitleReason: z.string().optional(),\n // Per-field extension of the retitle remedy (uniform with the Tale/Tune/Television content family):\n // which text fields ('title', 'description', …) an admin cleared to a placeholder — \"all or any\",\n // instead of the always-both retitle — and the operator's reason surfaced on the steward's edit\n // surface. Empty/absent when nothing was cleared. Backend-only-writable.\n moderationClearedFields: z.array(z.string()).optional(),\n moderationClearedReason: z.string().optional(),\n moderatedAt: z.number().optional(),\n});\nexport type FullWorkProject = z.infer<typeof FullWorkProjectSchema>;\n\n// Top-level safe signed-in-user Work shell / search projection. Server/callable-written only.\nexport const PublicWorkProjectSchema = z.object({\n workProjectId: z.string(),\n publicWorkStatus: z.enum(['draft', 'released']),\n publicWorkHidden: z.boolean(),\n workRealmId: z.string(),\n realmCanonStatus: z.enum(['canon', 'nonCanon']),\n type: z.enum(WORK_PROJECT_TYPE_KEYS),\n hallWingType: z.enum(HALL_WING_TYPE_KEYS),\n workingTitle: z.string(),\n workingTitle_lowercase: z.string(),\n workingDescription: z.string(),\n coverAssetId: z.string().optional(),\n workStewardUid: z.string(),\n foundingArtisanUid: z.string(),\n createdOn: z.number(),\n updatedOn: z.number(),\n});\nexport type PublicWorkProject = z.infer<typeof PublicWorkProjectSchema>;\n\n// ===========================================================================\n// Work-project FILE FOLDER system (S7) — supersedes the flat workAssets model.\n// A default folder (every active guildmate views/uploads) + custom folders whose\n// audience is controlled by TRADE PROFESSIONS, while file-system ADMINISTRATION is\n// controlled by guild standings (StewardOwner / WorkProjectManager / WorkAssetAdmin).\n// See ttt-prod docs/design/work-project-file-folders.md. Realm sharing of a file is the\n// `realmFileCanonStatus` seam on the file's mediaAssets doc (media-assets.ts).\n// ===========================================================================\n\n/** `allWorkProjects/{workProjectId}/workFileFolders/{workFileFolderId}`. */\nexport const WorkFileFolderSchema = z.object({\n workFileFolderId: z.string(),\n workProjectId: z.string(),\n name: z.string(),\n // The auto-created \"All Guildmates\" folder (view/upload open to every active\n // guildmate; delete/manage needs file-admin). Exactly one per work project.\n isDefault: z.boolean(),\n // Custom-folder access — trade-profession ids (TRADE_PROFESSION_OPTIONS). Empty\n // on the default folder; file admins always see/manage every folder regardless.\n canViewTradeProfessions: z.array(z.string()),\n canUploadTradeProfessions: z.array(z.string()),\n canDeleteTradeProfessions: z.array(z.string()),\n fileCount: z.number(),\n /** Sum of this folder's files' `sizeBytes`. Maintained alongside `fileCount`\n * (increment on upload, decrement on delete); the project-wide storage usage +\n * `MAX_WORK_FILE_STORAGE_BYTES` cap are computed by summing this across folders. */\n storageBytes: z.number(),\n createdBy: userRefSchema,\n createdAt: z.number(),\n updatedAt: z.number(),\n});\nexport type WorkFileFolder = z.infer<typeof WorkFileFolderSchema>;\n\n/** `allWorkProjects/{workProjectId}/workFileFolders/{workFileFolderId}/workFiles/{workFileId}`. */\nexport const WorkFileSchema = z.object({\n workFileId: z.string(),\n workProjectId: z.string(),\n workFileFolderId: z.string(),\n name: z.string(),\n mediaAssetId: z.string(),\n contentType: z.string(),\n sizeBytes: z.number(),\n uploadedBy: userRefSchema,\n createdAt: z.number(),\n});\nexport type WorkFile = z.infer<typeof WorkFileSchema>;\n\n// Realm source of truth and Realm search/tag surface. Server/callable-written only.\nexport const WorkRealmSchema = z.object({\n workRealmId: z.string(),\n realmType: z.enum(['public', 'standalone']),\n realmStatus: z.enum(['draft', 'released']),\n realmHidden: z.boolean(),\n workingTitle: z.string(),\n workingTitle_lowercase: z.string(),\n workingDescription: z.string(),\n // Square realm cover art (the 'realm-cover' upload origin; processor-written).\n // Optional while the realm is a DRAFT; releasing the realm REQUIRES it — the\n // realm release callable enforces presence (never required at founding, so a\n // work creation is never blocked on realm art).\n realmCoverAssetId: z.string().optional(),\n workStewardUid: z.string(),\n foundingArtisanUid: z.string(),\n foundingWorkProjectId: z.string(),\n createdOn: z.number(),\n updatedOn: z.number(),\n // MONOTONIC publish lock (R1 ruling, 2026-07-12): set true by the hall publish\n // core the first time any work in this realm publishes, and never unset — even\n // if that work later unpublishes (the realm name already went public). While\n // absent/false, realm info is direct-edit; once true, realm text changes route\n // exclusively through the change-request pipeline (surface 'workRealm').\n // Backend-only-writable.\n hasEverPublishedWork: z.boolean().optional(),\n // Moderation \"require retitle\" remedy (see FullWorkProject above) — admin\n // replaces an abusive realm title/description with a placeholder + sets this so\n // the steward must re-enter compliant text. Distinct from `realmHidden` (the\n // DMCA/copyright takedown). Backend-only-writable.\n moderationRetitleRequired: z.boolean().optional(),\n moderationRetitleReason: z.string().optional(),\n // Per-field extension of the retitle remedy (see FullWorkProject) — which realm text fields an\n // admin cleared to a placeholder (\"all or any\"), plus the operator's reason. Backend-only-writable.\n moderationClearedFields: z.array(z.string()).optional(),\n moderationClearedReason: z.string().optional(),\n moderatedAt: z.number().optional(),\n});\nexport type WorkRealm = z.infer<typeof WorkRealmSchema>;\n\n// ===========================================================================\n// Realm FILE FOLDERS — the steward's organization of the realm's shared-file pool.\n// `workRealms/{workRealmId}/realmFileFolders/{realmFileFolderId}`.\n//\n// A shared file is NOT a document under the Realm: it stays a `workFile` under its owning\n// Work, and \"shared\" is the `realmFileCanonStatus` + `realmId` + `realmFileFolderId` seam on\n// the file's ONE `mediaAssets` doc (media-assets.ts). These folder docs are pure containers.\n//\n// Deliberately ABSENT, and each absence is load-bearing:\n// - no `isDefault` — there is no default realm folder. Approval IS folder assignment, so\n// every approved file is in a steward-chosen folder by construction.\n// - no access lists — Realm-level visibility is the whole access model at launch (contrast\n// the Work-side folder, whose trade-profession lists gate a private workspace). Folder\n// management becomes standing-gated when Realm standings exist; that is a capability-check\n// swap, not a field on this doc.\n// - no stored counts — file counts are derived from the gallery projection, so a count can\n// never disagree with the files actually served.\n//\n// Client reads are DENIED: `mediaAssets` is client-unreadable and the artisan/admin/hidden-\n// Realm access decision lives in ONE backend projection owner, so folders are returned\n// through that same projection rather than opened to direct client reads.\n// See ttt-prod docs/design/work-project-file-folders.md (Realm promotion).\n// ===========================================================================\n\n/** `workRealms/{workRealmId}/realmFileFolders/{realmFileFolderId}`. Callable-written only. */\nexport const RealmFileFolderSchema = z.object({\n realmFileFolderId: z.string(),\n workRealmId: z.string(),\n name: z.string(),\n /** SERVER-DERIVED normalized name, following the Realm `*_lowercase` convention\n * (`WorkRealmSchema.workingTitle_lowercase`). Backs case-insensitive uniqueness within\n * the bounded folder collection; never client-supplied. */\n name_lowercase: z.string(),\n createdBy: userRefSchema,\n createdAt: z.number(),\n updatedAt: z.number(),\n});\nexport type RealmFileFolder = z.infer<typeof RealmFileFolderSchema>;\n"]}
|
|
1
|
+
{"version":3,"file":"work-project.js","sourceRoot":"","sources":["../../src/doc-schemas/work-project.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,mFAAmF;AACnF,2FAA2F;AAC3F,qFAAqF;AACrF,+DAA+D;AAC/D,EAAE;AACF,uFAAuF;AACvF,qGAAqG;AACrG,iGAAiG;AAEjG,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB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AC,MAAM,EAAE;IACrB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC","sourcesContent":["// WorkProject / Realm / Guild Firestore document SCHEMAS — single source of truth.\n// Covers allWorkProjects/{workProjectId}, its guildmateUsers/publicGuildmateUsers/\n// workAssets subcollections, publicWorkProjects/{workProjectId}, workRealms/{workRealmId},\n// and the guildInviteConversations invite shell. Types are inferred via z.infer so a\n// document's shape and its TypeScript type cannot drift apart.\n//\n// Terminology: the current-owner field is `workStewardUid` (locked rename from the old\n// `ownerUid`; see ttt-prod docs/design/terminology-naming-convention.md — Steward row). The original\n// creator is `foundingArtisanUid` (locked rename from the old `createdByUid`; Founding Artisan).\n\nimport { z } from 'zod';\nimport { HALL_WING_TYPE_KEYS, WORK_PROJECT_TYPE_KEYS } from '../types/content.js';\nimport { isGuildStandingId, type GuildStandingId } from '../permissions/index.js';\n\nconst guildStandingIdSchema = z.custom<GuildStandingId>(isGuildStandingId);\nconst userRefSchema = z.object({ uid: z.string() });\n\nexport const GuildmateStatusSchema = z.enum(['active', 'departed']);\nexport type GuildmateStatus = z.infer<typeof GuildmateStatusSchema>;\n\n/**\n * The ONE canonical standing of a Work INSIDE its Realm — whether the Work counts as part of\n * the Realm's canon. Carried on the Work shell and its public projection, and used as a query\n * filter by the Realm page. Distinct from `RealmFileCanonStatus` (media-assets.ts), which is the\n * approval gate of a FILE shared into a Realm and carries two further unshared/awaiting states.\n * Consumers derive from this instead of re-quoting the members.\n */\nexport const RealmCanonStatusSchema = z.enum(['canon', 'nonCanon']);\nexport type RealmCanonStatus = z.infer<typeof RealmCanonStatusSchema>;\n\n/**\n * The realm founding-Work stake holder — a non-person ledger entry keyed by the founding\n * workProjectId, never a user uid. It must never reach the public collaborator roster.\n * Consumers branch on this rather than re-quoting the member.\n */\nexport const FOUNDING_WORK_HOLDER_TYPE = 'foundingWork' as const;\n\nexport const GuildmateUserSchema = z.object({\n uid: z.string(),\n guildStandings: z.array(guildStandingIdSchema),\n tradeProfessions: z.array(z.string()),\n stakeShareCount: z.number(),\n joinedAt: z.number(),\n status: GuildmateStatusSchema,\n /**\n * Holder kind for this stake entry. Absent/`'user'` = a real guildmate person.\n * `'foundingWork'` = the realm founding-Work holder (keyed by the founding\n * workProjectId, NOT a user uid).\n */\n holderType: z.enum(['user', FOUNDING_WORK_HOLDER_TYPE]).optional(),\n /**\n * Per-(user, workProject) monotonic INPUT-trigger version for the chat\n * channel-auth projection (chat-edge-rebuild Contract B / P3). Absent ⇒ 0.\n * Bumped atomically in the authoritative mutation on member create/reactivate,\n * departure/removal, standing change, AND trade-profession change; the\n * `workChannelsForUser` fanout keys on the POST-increment value. It NEVER\n * increments or replaces the per-pair OUTPUT `channelAuthVersion`.\n */\n guildAuthInputVersion: z.number().optional(),\n /**\n * N3 data-deletion / account-end forfeiture tombstone. Set together with\n * `status: 'departed'` when a member leaves involuntarily-of-record: their\n * stake shares STAY in the immutable 1000-split (never removed) but are\n * forfeited — the future payout engine routes a tombstone's slice to the\n * community fund and excludes it from active distribution. `departedReason`\n * distinguishes the cause; `'bannedForCause'` is reserved for the future\n * ban-forfeiture path (included now so it needs no second package publish).\n *\n * `'selfLeave'` is DIFFERENT share semantics: a PRE-PUBLISH voluntary guild\n * exit (leaveWorkProject). There the 1000-split is still fluid, so the\n * member's `stakeShareCount` is ZEROED and returned to the pool for the\n * steward to re-allocate — NOT retained as a community-fund tombstone. A\n * self-leave is impossible once `status: 'published'` (the stake-share freeze\n * blocks it), so the tombstone and the pool-return dispositions never overlap\n * in a single Work's lifecycle.\n */\n departedReason: z.enum(['voluntaryDeletion', 'bannedForCause', 'selfLeave']).optional(),\n departedAt: z.number().optional(),\n});\nexport type GuildmateUser = z.infer<typeof GuildmateUserSchema>;\n\nexport const PublicGuildmateUserSchema = z.object({\n uid: z.string(),\n tradeProfessions: z.array(z.string()),\n joinedAt: z.number(),\n status: GuildmateStatusSchema,\n});\nexport type PublicGuildmateUser = z.infer<typeof PublicGuildmateUserSchema>;\n\nexport const PendingStakeSharesSchema = z.record(\n z.string(),\n z.object({ amount: z.number(), createdAt: z.number() }),\n);\nexport type PendingStakeShares = z.infer<typeof PendingStakeSharesSchema>;\n\nexport const FullWorkProjectSchema = z.object({\n workProjectId: z.string(),\n createdOn: z.number(),\n type: z.string(),\n workingDescription: z.string(),\n workingTitle: z.string(),\n hallWingType: z.enum(HALL_WING_TYPE_KEYS),\n createdBy: userRefSchema,\n status: z.enum(['open', 'pendingVerification', 'published', 'rejected']),\n guildmateUserIds: z.record(z.string(), z.boolean()).optional(),\n invitedUserIds: z.record(z.string(), z.boolean()).optional(),\n workRealmId: z.string(),\n realmCanonStatus: RealmCanonStatusSchema,\n pendingStakeShares: PendingStakeSharesSchema.optional(),\n // Moderation \"require retitle\" remedy (work/realm report path). When an admin\n // upholds a report on an abusive public title/description, they may replace the\n // text with a generic placeholder and set this flag; the steward is prompted to\n // re-enter compliant text the next time they open the work (unpublished = direct\n // self-edit clears it; published = via the post-launch change-request flow).\n // Distinct from the `publicWorkHidden` hide (DMCA/copyright) — this keeps the\n // work visible under the placeholder. Backend-only-writable.\n moderationRetitleRequired: z.boolean().optional(),\n moderationRetitleReason: z.string().optional(),\n // Per-field extension of the retitle remedy (uniform with the Tale/Tune/Television content family):\n // which text fields ('title', 'description', …) an admin cleared to a placeholder — \"all or any\",\n // instead of the always-both retitle — and the operator's reason surfaced on the steward's edit\n // surface. Empty/absent when nothing was cleared. Backend-only-writable.\n moderationClearedFields: z.array(z.string()).optional(),\n moderationClearedReason: z.string().optional(),\n moderatedAt: z.number().optional(),\n});\nexport type FullWorkProject = z.infer<typeof FullWorkProjectSchema>;\n\n// Top-level safe signed-in-user Work shell / search projection. Server/callable-written only.\nexport const PublicWorkProjectSchema = z.object({\n workProjectId: z.string(),\n publicWorkStatus: z.enum(['draft', 'released']),\n publicWorkHidden: z.boolean(),\n workRealmId: z.string(),\n realmCanonStatus: RealmCanonStatusSchema,\n type: z.enum(WORK_PROJECT_TYPE_KEYS),\n hallWingType: z.enum(HALL_WING_TYPE_KEYS),\n workingTitle: z.string(),\n workingTitle_lowercase: z.string(),\n workingDescription: z.string(),\n coverAssetId: z.string().optional(),\n workStewardUid: z.string(),\n foundingArtisanUid: z.string(),\n createdOn: z.number(),\n updatedOn: z.number(),\n});\nexport type PublicWorkProject = z.infer<typeof PublicWorkProjectSchema>;\n\n// ===========================================================================\n// Work-project FILE FOLDER system (S7) — supersedes the flat workAssets model.\n// A default folder (every active guildmate views/uploads) + custom folders whose\n// audience is controlled by TRADE PROFESSIONS, while file-system ADMINISTRATION is\n// controlled by guild standings (StewardOwner / WorkProjectManager / WorkAssetAdmin).\n// See ttt-prod docs/design/work-project-file-folders.md. Realm sharing of a file is the\n// `realmFileCanonStatus` seam on the file's mediaAssets doc (media-assets.ts).\n// ===========================================================================\n\n/** `allWorkProjects/{workProjectId}/workFileFolders/{workFileFolderId}`. */\nexport const WorkFileFolderSchema = z.object({\n workFileFolderId: z.string(),\n workProjectId: z.string(),\n name: z.string(),\n // The auto-created \"All Guildmates\" folder (view/upload open to every active\n // guildmate; delete/manage needs file-admin). Exactly one per work project.\n isDefault: z.boolean(),\n // Custom-folder access — trade-profession ids (TRADE_PROFESSION_OPTIONS). Empty\n // on the default folder; file admins always see/manage every folder regardless.\n canViewTradeProfessions: z.array(z.string()),\n canUploadTradeProfessions: z.array(z.string()),\n canDeleteTradeProfessions: z.array(z.string()),\n fileCount: z.number(),\n /** Sum of this folder's files' `sizeBytes`. Maintained alongside `fileCount`\n * (increment on upload, decrement on delete); the project-wide storage usage +\n * `MAX_WORK_FILE_STORAGE_BYTES` cap are computed by summing this across folders. */\n storageBytes: z.number(),\n createdBy: userRefSchema,\n createdAt: z.number(),\n updatedAt: z.number(),\n});\nexport type WorkFileFolder = z.infer<typeof WorkFileFolderSchema>;\n\n/** `allWorkProjects/{workProjectId}/workFileFolders/{workFileFolderId}/workFiles/{workFileId}`. */\nexport const WorkFileSchema = z.object({\n workFileId: z.string(),\n workProjectId: z.string(),\n workFileFolderId: z.string(),\n name: z.string(),\n mediaAssetId: z.string(),\n contentType: z.string(),\n sizeBytes: z.number(),\n uploadedBy: userRefSchema,\n createdAt: z.number(),\n});\nexport type WorkFile = z.infer<typeof WorkFileSchema>;\n\n// Realm source of truth and Realm search/tag surface. Server/callable-written only.\nexport const WorkRealmSchema = z.object({\n workRealmId: z.string(),\n realmType: z.enum(['public', 'standalone']),\n realmStatus: z.enum(['draft', 'released']),\n realmHidden: z.boolean(),\n workingTitle: z.string(),\n workingTitle_lowercase: z.string(),\n workingDescription: z.string(),\n // Square realm cover art (the 'realm-cover' upload origin; processor-written).\n // Optional while the realm is a DRAFT; releasing the realm REQUIRES it — the\n // realm release callable enforces presence (never required at founding, so a\n // work creation is never blocked on realm art).\n realmCoverAssetId: z.string().optional(),\n workStewardUid: z.string(),\n foundingArtisanUid: z.string(),\n foundingWorkProjectId: z.string(),\n createdOn: z.number(),\n updatedOn: z.number(),\n // MONOTONIC publish lock (R1 ruling, 2026-07-12): set true by the hall publish\n // core the first time any work in this realm publishes, and never unset — even\n // if that work later unpublishes (the realm name already went public). While\n // absent/false, realm info is direct-edit; once true, realm text changes route\n // exclusively through the change-request pipeline (surface 'workRealm').\n // Backend-only-writable.\n hasEverPublishedWork: z.boolean().optional(),\n // Moderation \"require retitle\" remedy (see FullWorkProject above) — admin\n // replaces an abusive realm title/description with a placeholder + sets this so\n // the steward must re-enter compliant text. Distinct from `realmHidden` (the\n // DMCA/copyright takedown). Backend-only-writable.\n moderationRetitleRequired: z.boolean().optional(),\n moderationRetitleReason: z.string().optional(),\n // Per-field extension of the retitle remedy (see FullWorkProject) — which realm text fields an\n // admin cleared to a placeholder (\"all or any\"), plus the operator's reason. Backend-only-writable.\n moderationClearedFields: z.array(z.string()).optional(),\n moderationClearedReason: z.string().optional(),\n moderatedAt: z.number().optional(),\n});\nexport type WorkRealm = z.infer<typeof WorkRealmSchema>;\n\n// ===========================================================================\n// Realm FILE FOLDERS — the steward's organization of the realm's shared-file pool.\n// `workRealms/{workRealmId}/realmFileFolders/{realmFileFolderId}`.\n//\n// A shared file is NOT a document under the Realm: it stays a `workFile` under its owning\n// Work, and \"shared\" is the `realmFileCanonStatus` + `realmId` + `realmFileFolderId` seam on\n// the file's ONE `mediaAssets` doc (media-assets.ts). These folder docs are pure containers.\n//\n// Deliberately ABSENT, and each absence is load-bearing:\n// - no `isDefault` — there is no default realm folder. Approval IS folder assignment, so\n// every approved file is in a steward-chosen folder by construction.\n// - no access lists — Realm-level visibility is the whole access model at launch (contrast\n// the Work-side folder, whose trade-profession lists gate a private workspace). Folder\n// management becomes standing-gated when Realm standings exist; that is a capability-check\n// swap, not a field on this doc.\n// - no stored counts — file counts are derived from the gallery projection, so a count can\n// never disagree with the files actually served.\n//\n// Client reads are DENIED: `mediaAssets` is client-unreadable and the artisan/admin/hidden-\n// Realm access decision lives in ONE backend projection owner, so folders are returned\n// through that same projection rather than opened to direct client reads.\n// See ttt-prod docs/design/work-project-file-folders.md (Realm promotion).\n// ===========================================================================\n\n/** `workRealms/{workRealmId}/realmFileFolders/{realmFileFolderId}`. Callable-written only. */\nexport const RealmFileFolderSchema = z.object({\n realmFileFolderId: z.string(),\n workRealmId: z.string(),\n name: z.string(),\n /** SERVER-DERIVED normalized name, following the Realm `*_lowercase` convention\n * (`WorkRealmSchema.workingTitle_lowercase`). Backs case-insensitive uniqueness within\n * the bounded folder collection; never client-supplied. */\n name_lowercase: z.string(),\n createdBy: userRefSchema,\n createdAt: z.number(),\n updatedAt: z.number(),\n});\nexport type RealmFileFolder = z.infer<typeof RealmFileFolderSchema>;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domain-events-work.d.ts","sourceRoot":"","sources":["../../src/media/domain-events-work.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"domain-events-work.d.ts","sourceRoot":"","sources":["../../src/media/domain-events-work.ts"],"names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, HALL_CONTENT_SUB_ITEM_SURFACES, } from '../constants/hall-content-routing.js';
|
|
2
3
|
// DomainEvent schemas for the work-project domain — work projects, guild
|
|
3
4
|
// invites, auditions, commissions, hall library, and threshold-library
|
|
4
5
|
// submission. Assembled into the discriminated union in ./domain-events.ts.
|
|
@@ -207,7 +208,7 @@ export const HallLibraryCoverUpdatedEventSchema = z
|
|
|
207
208
|
ids: z
|
|
208
209
|
.object({
|
|
209
210
|
workProjectId: z.string().min(1),
|
|
210
|
-
itemType: z.enum(
|
|
211
|
+
itemType: z.enum(HALL_CONTENT_DETAIL_SURFACES),
|
|
211
212
|
itemId: z.string().min(1),
|
|
212
213
|
})
|
|
213
214
|
.strict(),
|
|
@@ -243,7 +244,7 @@ export const HallLibrarySubItemUpdatedEventSchema = z
|
|
|
243
244
|
ids: z
|
|
244
245
|
.object({
|
|
245
246
|
workProjectId: z.string().min(1),
|
|
246
|
-
itemType: z.enum(
|
|
247
|
+
itemType: z.enum(HALL_CONTENT_SUB_ITEM_SURFACES),
|
|
247
248
|
parentId: z.string().min(1),
|
|
248
249
|
itemId: z.string().min(1),
|
|
249
250
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domain-events-work.js","sourceRoot":"","sources":["../../src/media/domain-events-work.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,yEAAyE;AACzE,uEAAuE;AACvE,4EAA4E;AAE5E,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC;KAC3C,MAAM,CAAC;IACN,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,qBAAqB,CAAC;IACtC,GAAG,EAAE,CAAC;SACH,MAAM,CAAC;QACN,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QACzB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;KACjC,CAAC;SACD,MAAM,EA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;SACD,MAAM,EAAE;CACZ,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC;KAClD,MAAM,CAAC;IACN,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,4BAA4B,CAAC;IAC7C,GAAG,EAAE,CAAC;SACH,MAAM,CAAC;QACN,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;KACjC,CAAC;SACD,MAAM,EAAE;CACZ,CAAC;KACD,MAAM,EAAE,CAAC","sourcesContent":["import { z } from \"zod\";\n\n// DomainEvent schemas for the work-project domain — work projects, guild\n// invites, auditions, commissions, hall library, and threshold-library\n// submission. Assembled into the discriminated union in ./domain-events.ts.\n\nexport const WorkProjectCreatedEventSchema = z\n .object({\n type: z.literal('workProject.created'),\n ids: z\n .object({\n userId: z.string().min(1),\n workProjectId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\nexport const WorkProjectUpdatedEventSchema = z\n .object({\n type: z.literal('workProject.updated'),\n ids: z.object({ workProjectId: z.string().min(1) }).strict(),\n })\n .strict();\n\nexport const WorkProjectPublishedEventSchema = z\n .object({\n type: z.literal('workProject.published'),\n ids: z\n .object({\n workProjectId: z.string().min(1),\n userId: z.string().min(1),\n workRealmId: z.string().min(1).optional(),\n })\n .strict(),\n })\n .strict();\n\nexport const WorkProjectStakeSharesUpdatedEventSchema = z\n .object({\n type: z.literal('workProject.stakeSharesUpdated'),\n ids: z\n .object({\n workProjectId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\nexport const GuildInviteSentEventSchema = z\n .object({\n type: z.literal('workProject.guildInviteSent'),\n ids: z\n .object({\n workProjectId: z.string().min(1),\n guildInviteId: z.string().min(1),\n inviterId: z.string().min(1),\n inviteeId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\nexport const GuildInviteAcceptedEventSchema = z\n .object({\n type: z.literal('workProject.guildInviteAccepted'),\n ids: z\n .object({\n workProjectId: z.string().min(1),\n guildInviteId: z.string().min(1),\n userId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\nexport const GuildInviteDeclinedEventSchema = z\n .object({\n type: z.literal('workProject.guildInviteDeclined'),\n ids: z\n .object({\n workProjectId: z.string().min(1),\n guildInviteId: z.string().min(1),\n userId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\nexport const GuildInviteCancelledEventSchema = z\n .object({\n type: z.literal('workProject.guildInviteCancelled'),\n ids: z\n .object({\n workProjectId: z.string().min(1),\n guildInviteId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\nexport const AuditionPromptCreatedEventSchema = z\n .object({\n type: z.literal('audition.promptCreated'),\n ids: z\n .object({\n userId: z.string().min(1),\n auditionId: z.string().min(1),\n workProjectId: z.string().min(1).optional(),\n })\n .strict(),\n })\n .strict();\n\nexport const AuditionEntrySubmittedEventSchema = z\n .object({\n type: z.literal('audition.entryCreated'),\n ids: z\n .object({\n userId: z.string().min(1),\n auditionId: z.string().min(1),\n auditionEntryId: z.string().min(1),\n workProjectId: z.string().min(1).optional(),\n })\n .strict(),\n })\n .strict();\n\nexport const AuditionEntryVoteRecordedEventSchema = z\n .object({\n type: z.literal('audition.entryVoted'),\n ids: z\n .object({\n userId: z.string().min(1),\n auditionId: z.string().min(1),\n auditionEntryId: z.string().min(1),\n workProjectId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\nexport const AuditionClosedEventSchema = z\n .object({\n type: z.literal('audition.closed'),\n ids: z\n .object({\n auditionId: z.string().min(1),\n workProjectId: z.string().min(1).optional(),\n })\n .strict(),\n })\n .strict();\n\nexport const CommissionCreatedEventSchema = z\n .object({\n type: z.literal('commission.created'),\n ids: z\n .object({\n userId: z.string().min(1),\n commissionListingId: z.string().min(1),\n workProjectId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\nexport const CommissionProposalSubmittedEventSchema = z\n .object({\n type: z.literal('commission.commissionProposalSubmitted'),\n ids: z\n .object({\n userId: z.string().min(1),\n commissionListingId: z.string().min(1),\n workProjectId: z.string().min(1),\n commissionProposalId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\n// Commission closed — the closeCommission callable's terminal transition. A\n// commission listing is never deleted; closing is the only way it leaves the\n// board, so the event name says closed.\nexport const CommissionClosedEventSchema = z\n .object({\n type: z.literal('commission.closed'),\n ids: z\n .object({\n commissionListingId: z.string().min(1),\n workProjectId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\nexport const CommissionProposalSavedEventSchema = z\n .object({\n type: z.literal('commission.commissionProposalSaved'),\n ids: z\n .object({\n commissionListingId: z.string().min(1),\n commissionProposalId: z.string().min(1),\n userId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\nexport const CommissionProposalRemovedEventSchema = z\n .object({\n type: z.literal('commission.commissionProposalRemoved'),\n ids: z\n .object({\n commissionListingId: z.string().min(1),\n commissionProposalId: z.string().min(1),\n userId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\nexport const HallLibraryCoverUpdatedEventSchema = z\n .object({\n type: z.literal('hallLibrary.coverUpdated'),\n ids: z\n .object({\n workProjectId: z.string().min(1),\n itemType: z.enum(['tale', 'tune', 'television']),\n itemId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\n// Realm cover published — the 'realm-cover' upload origin's publication adapter\n// wrote `realmCoverAssetId` onto workRealms/{workRealmId}.\nexport const WorkRealmCoverUpdatedEventSchema = z\n .object({\n type: z.literal('workRealm.coverUpdated'),\n ids: z\n .object({\n workRealmId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\n// Realm details edited — the realm doc's own text/detail fields, as opposed to\n// workRealm.coverUpdated's `realmCoverAssetId`.\nexport const WorkRealmDetailsUpdatedEventSchema = z\n .object({\n type: z.literal('workRealm.detailsUpdated'),\n ids: z\n .object({\n workRealmId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\nexport const HallLibrarySubItemUpdatedEventSchema = z\n .object({\n type: z.literal('hallLibrary.subItemUpdated'),\n ids: z\n .object({\n workProjectId: z.string().min(1),\n itemType: z.enum(['chapter', 'tuneTrack', 'televisionEpisode']),\n parentId: z.string().min(1),\n itemId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\nexport const ThresholdLibrarySubmittedEventSchema = z\n .object({\n type: z.literal('thresholdLibrary.submitted'),\n ids: z\n .object({\n workProjectId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n"]}
|
|
1
|
+
{"version":3,"file":"domain-events-work.js","sourceRoot":"","sources":["../../src/media/domain-events-work.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,4BAA4B,EAC5B,8BAA8B,GAC/B,MAAM,sCAAsC,CAAC;AAE9C,yEAAyE;AACzE,uEAAuE;AACvE,4EAA4E;AAE5E,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC;KAC3C,MAAM,CAAC;IACN,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,qBAAqB,CAAC;IACtC,GAAG,EAAE,CAAC;SACH,MAAM,CAAC;QACN,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QACzB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;KACjC,CAAC;SACD,MAAM,EAAE;CACZ,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC;KAC3C,MAAM,CAAC;IACN,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,qBAAqB,CAAC;IACtC,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE;CAC7D,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC;KAC7C,MA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\n// DomainEvent schemas for the work-project domain — work projects, guild\n// invites, auditions, commissions, hall library, and threshold-library\n// submission. Assembled into the discriminated union in ./domain-events.ts.\n\nexport const WorkProjectCreatedEventSchema = z\n .object({\n type: z.literal('workProject.created'),\n ids: z\n .object({\n userId: z.string().min(1),\n workProjectId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\nexport const WorkProjectUpdatedEventSchema = z\n .object({\n type: z.literal('workProject.updated'),\n ids: z.object({ workProjectId: z.string().min(1) }).strict(),\n })\n .strict();\n\nexport const WorkProjectPublishedEventSchema = z\n .object({\n type: z.literal('workProject.published'),\n ids: z\n .object({\n workProjectId: z.string().min(1),\n userId: z.string().min(1),\n workRealmId: z.string().min(1).optional(),\n })\n .strict(),\n })\n .strict();\n\nexport const WorkProjectStakeSharesUpdatedEventSchema = z\n .object({\n type: z.literal('workProject.stakeSharesUpdated'),\n ids: z\n .object({\n workProjectId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\nexport const GuildInviteSentEventSchema = z\n .object({\n type: z.literal('workProject.guildInviteSent'),\n ids: z\n .object({\n workProjectId: z.string().min(1),\n guildInviteId: z.string().min(1),\n inviterId: z.string().min(1),\n inviteeId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\nexport const GuildInviteAcceptedEventSchema = z\n .object({\n type: z.literal('workProject.guildInviteAccepted'),\n ids: z\n .object({\n workProjectId: z.string().min(1),\n guildInviteId: z.string().min(1),\n userId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\nexport const GuildInviteDeclinedEventSchema = z\n .object({\n type: z.literal('workProject.guildInviteDeclined'),\n ids: z\n .object({\n workProjectId: z.string().min(1),\n guildInviteId: z.string().min(1),\n userId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\nexport const GuildInviteCancelledEventSchema = z\n .object({\n type: z.literal('workProject.guildInviteCancelled'),\n ids: z\n .object({\n workProjectId: z.string().min(1),\n guildInviteId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\nexport const AuditionPromptCreatedEventSchema = z\n .object({\n type: z.literal('audition.promptCreated'),\n ids: z\n .object({\n userId: z.string().min(1),\n auditionId: z.string().min(1),\n workProjectId: z.string().min(1).optional(),\n })\n .strict(),\n })\n .strict();\n\nexport const AuditionEntrySubmittedEventSchema = z\n .object({\n type: z.literal('audition.entryCreated'),\n ids: z\n .object({\n userId: z.string().min(1),\n auditionId: z.string().min(1),\n auditionEntryId: z.string().min(1),\n workProjectId: z.string().min(1).optional(),\n })\n .strict(),\n })\n .strict();\n\nexport const AuditionEntryVoteRecordedEventSchema = z\n .object({\n type: z.literal('audition.entryVoted'),\n ids: z\n .object({\n userId: z.string().min(1),\n auditionId: z.string().min(1),\n auditionEntryId: z.string().min(1),\n workProjectId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\nexport const AuditionClosedEventSchema = z\n .object({\n type: z.literal('audition.closed'),\n ids: z\n .object({\n auditionId: z.string().min(1),\n workProjectId: z.string().min(1).optional(),\n })\n .strict(),\n })\n .strict();\n\nexport const CommissionCreatedEventSchema = z\n .object({\n type: z.literal('commission.created'),\n ids: z\n .object({\n userId: z.string().min(1),\n commissionListingId: z.string().min(1),\n workProjectId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\nexport const CommissionProposalSubmittedEventSchema = z\n .object({\n type: z.literal('commission.commissionProposalSubmitted'),\n ids: z\n .object({\n userId: z.string().min(1),\n commissionListingId: z.string().min(1),\n workProjectId: z.string().min(1),\n commissionProposalId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\n// Commission closed — the closeCommission callable's terminal transition. A\n// commission listing is never deleted; closing is the only way it leaves the\n// board, so the event name says closed.\nexport const CommissionClosedEventSchema = z\n .object({\n type: z.literal('commission.closed'),\n ids: z\n .object({\n commissionListingId: z.string().min(1),\n workProjectId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\nexport const CommissionProposalSavedEventSchema = z\n .object({\n type: z.literal('commission.commissionProposalSaved'),\n ids: z\n .object({\n commissionListingId: z.string().min(1),\n commissionProposalId: z.string().min(1),\n userId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\nexport const CommissionProposalRemovedEventSchema = z\n .object({\n type: z.literal('commission.commissionProposalRemoved'),\n ids: z\n .object({\n commissionListingId: z.string().min(1),\n commissionProposalId: z.string().min(1),\n userId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\nexport const HallLibraryCoverUpdatedEventSchema = z\n .object({\n type: z.literal('hallLibrary.coverUpdated'),\n ids: z\n .object({\n workProjectId: z.string().min(1),\n itemType: z.enum(HALL_CONTENT_DETAIL_SURFACES),\n itemId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\n// Realm cover published — the 'realm-cover' upload origin's publication adapter\n// wrote `realmCoverAssetId` onto workRealms/{workRealmId}.\nexport const WorkRealmCoverUpdatedEventSchema = z\n .object({\n type: z.literal('workRealm.coverUpdated'),\n ids: z\n .object({\n workRealmId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\n// Realm details edited — the realm doc's own text/detail fields, as opposed to\n// workRealm.coverUpdated's `realmCoverAssetId`.\nexport const WorkRealmDetailsUpdatedEventSchema = z\n .object({\n type: z.literal('workRealm.detailsUpdated'),\n ids: z\n .object({\n workRealmId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\nexport const HallLibrarySubItemUpdatedEventSchema = z\n .object({\n type: z.literal('hallLibrary.subItemUpdated'),\n ids: z\n .object({\n workProjectId: z.string().min(1),\n itemType: z.enum(HALL_CONTENT_SUB_ITEM_SURFACES),\n parentId: z.string().min(1),\n itemId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n\nexport const ThresholdLibrarySubmittedEventSchema = z\n .object({\n type: z.literal('thresholdLibrary.submitted'),\n ids: z\n .object({\n workProjectId: z.string().min(1),\n })\n .strict(),\n })\n .strict();\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"target-info.d.ts","sourceRoot":"","sources":["../../src/media/target-info.ts"],"names":[],"mappings":"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,GACvE,CAAC,SAAS,6BAA6B,GAAG,mCAAmC,GAC7E,CAAC,SAAS,aAAa,GAAG,oBAAoB,GAC9C,CAAC,SAAS,eAAe,GAAG,sBAAsB,GAClD,CAAC,SAAS,kBAAkB,GAAG,wBAAwB,GACvD,CAAC,SAAS,kBAAkB,GAAG,wBAAwB,GACvD,CAAC,SAAS,0BAA0B,GAAG,gCAAgC,GACvE,CAAC,SAAS,0BAA0B,GAAG,gCAAgC,GACvE,CAAC,SAAS,mBAAmB,GAAG,0BAA0B,GAC1D,CAAC,SAAS,YAAY,GAAG,mBAAmB,GAC5C,CAAC,SAAS,eAAe,GAAG,sBAAsB,GAClD,KAAK,CAAC;AAMV,wBAAgB,eAAe,CAAC,CAAC,SAAS,UAAU,EAClD,UAAU,EAAE,CAAC,EACb,GAAG,EAAE,OAAO,GACX,aAAa,CAAC,CAAC,CAAC,CAwBlB"}
|
|
@@ -5,6 +5,7 @@ import { TRADE_PROFESSION_OPTIONS, TRADE_PROFESSION_VALUES, CRAFT_SKILL_TAG_VALU
|
|
|
5
5
|
import { MediaTypeSchema } from "../doc-schemas/social.js";
|
|
6
6
|
import { CraftSkillKindSchema, CraftSkillAttestationSchema, CraftSkillSourceReferenceSchema, CRAFT_SKILL_KIND_REQUIRING_SOURCE, } from "../doc-schemas/user.js";
|
|
7
7
|
import { CRAFT_SKILL_STATEMENT_VERSION } from "../constants/craft-skill-statements.js";
|
|
8
|
+
import { HALL_CONTENT_DETAIL_SURFACES } from "../constants/hall-content-routing.js";
|
|
8
9
|
import { MAX_MENTIONS, MAX_POST_LENGTH, MAX_CRAFT_SKILL_TAGS, MAX_COMMISSION_TITLE_LENGTH, MAX_COMMISSION_DESCRIPTION_LENGTH, MAX_AUDITION_TITLE_LENGTH, MAX_AUDITION_DESCRIPTION_LENGTH, MAX_WORK_PROJECT_STAKE_SHARES, MAX_SPONSORED_AUDITION_AMOUNT_USD, MIN_CURATED_AUDITION_OPTIONS, MAX_CURATED_AUDITION_OPTIONS, } from "../constants/business.js";
|
|
9
10
|
export const ProfilePictureTargetInfoSchema = z.object({}).strict();
|
|
10
11
|
/**
|
|
@@ -192,7 +193,7 @@ export const AuditionEntryTargetInfoSchema = z
|
|
|
192
193
|
const HallLibraryCoverTargetInfoSchema = z
|
|
193
194
|
.object({
|
|
194
195
|
workProjectId: z.string().min(1),
|
|
195
|
-
itemType: z.enum(
|
|
196
|
+
itemType: z.enum(HALL_CONTENT_DETAIL_SURFACES),
|
|
196
197
|
itemId: z.string().min(1),
|
|
197
198
|
})
|
|
198
199
|
.strict();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"target-info.js","sourceRoot":"","sources":["../../src/media/target-info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,kCAAkC,EAAE,MAAM,YAAY,CAAC;AAC/E,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EACL,oBAAoB,EACpB,2BAA2B,EAC3B,+BAA+B,EAC/B,iCAAiC,GAIlC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AACvF,OAAO,EACL,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,2BAA2B,EAC3B,iCAAiC,EACjC,yBAAyB,EACzB,+BAA+B,EAC/B,6BAA6B,EAC7B,iCAAiC,EACjC,4BAA4B,EAC5B,4BAA4B,GAC7B,MAAM,0BAA0B,CAAC;AAElC,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AAEpE;;;;;;;;;;;;;;GAcG;AACH,MAAM,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,GAAG,CAAqB,CAAC;QAC9F,KAAK,kBAAkB,CAAC,CAAC,OAAO,8BAA8B,CAAC,KAAK,CAAC,GAAG,CAAqB,CAAC;QAC9F,KAAK,0BAA0B,CAAC,CAAC,OAAO,sCAAsC,CAAC,KAAK,CAAC,GAAG,CAAqB,CAAC;QAC9G,KAAK,0BAA0B,CAAC,CAAC,OAAO,sCAAsC,CAAC,KAAK,CAAC,GAAG,CAAqB,CAAC;QAC9G,KAAK,mBAAmB,CAAC,CAAC,OAAO,gCAAgC,CAAC,KAAK,CAAC,GAAG,CAAqB,CAAC;QACjG,KAAK,YAAY,CAAC,CAAC,OAAO,yBAAyB,CAAC,KAAK,CAAC,GAAG,CAAqB,CAAC;QACnF,KAAK,eAAe,CAAC,CAAC,OAAO,4BAA4B,CAAC,KAAK,CAAC,GAAG,CAAqB,CAAC;QACzF,OAAO,CAAC,CAAC,OAAO,WAAW,CAAC,UAAU,CAAC,CAAC;IAC1C,CAAC;AACH,CAAC","sourcesContent":["import { z } from \"zod\";\nimport type { FileOrigin } from \"./file-origin.js\";\nimport { ConversationFileRefSchema } from \"./conversation-file-ref.js\";\nimport { MentionSchema, rejectDuplicateMentionPlaceholders } from \"./atoms.js\";\nimport {\n TRADE_PROFESSION_OPTIONS,\n TRADE_PROFESSION_VALUES,\n CRAFT_SKILL_TAG_VALUES,\n} from \"../constants/options.js\";\nimport { MediaTypeSchema } from \"../doc-schemas/social.js\";\nimport {\n CraftSkillKindSchema,\n CraftSkillAttestationSchema,\n CraftSkillSourceReferenceSchema,\n CRAFT_SKILL_KIND_REQUIRING_SOURCE,\n type CraftSkillKind,\n type CraftSkillAttestation,\n type CraftSkillSourceReference,\n} from \"../doc-schemas/user.js\";\nimport { CRAFT_SKILL_STATEMENT_VERSION } from \"../constants/craft-skill-statements.js\";\nimport {\n MAX_MENTIONS,\n MAX_POST_LENGTH,\n MAX_CRAFT_SKILL_TAGS,\n MAX_COMMISSION_TITLE_LENGTH,\n MAX_COMMISSION_DESCRIPTION_LENGTH,\n MAX_AUDITION_TITLE_LENGTH,\n MAX_AUDITION_DESCRIPTION_LENGTH,\n MAX_WORK_PROJECT_STAKE_SHARES,\n MAX_SPONSORED_AUDITION_AMOUNT_USD,\n MIN_CURATED_AUDITION_OPTIONS,\n MAX_CURATED_AUDITION_OPTIONS,\n} from \"../constants/business.js\";\n\nexport const ProfilePictureTargetInfoSchema = z.object({}).strict();\n\n/**\n * The three-kind craft-skill upload attestation — `kind` + the agreed `attestation` + the\n * TTT-mimic-only `source` + the creation `tags`. It crosses the backend↔frontend boundary\n * (the client collects it in the add-a-craft dialog; `startUpload` and `processCraftSkill`\n * re-validate it), so it is declared ONCE here (ARCH-101/ARCH-102) — never app-locally on\n * either side.\n *\n * `source` is REQUIRED for the TTT-mimic kind (CRAFT_SKILL_KIND_REQUIRING_SOURCE) and FORBIDDEN\n * otherwise, and `attestation.statementKind` must match `kind` — enforced by the shared\n * refinement below, so a client-sent payload is fully re-validated server-side.\n * `attestation.agreedAt` is shape-validated here; the SERVER re-stamps it at `startUpload`\n * (MEDIA-004 — never trust a client timestamp on a rights-consent record).\n *\n * See ttt-prod docs/design/profile-and-craft-skills.md § \"The three-kind system\".\n */\nconst craftSkillUploadAttestationShape = {\n kind: CraftSkillKindSchema,\n attestation: CraftSkillAttestationSchema,\n source: CraftSkillSourceReferenceSchema.optional(),\n // At least 1 tag is required at creation (three-kind flow) and the floor of 1 can never drop\n // (updateCraftSkillTags refuses the last remove). Deduped, allowlisted, capped at the max.\n tags: z\n .array(z.enum(CRAFT_SKILL_TAG_VALUES))\n .min(1, \"Select at least one tag for your craft.\")\n .max(MAX_CRAFT_SKILL_TAGS)\n .refine((t) => new Set(t).size === t.length, \"Duplicate tags are not allowed.\"),\n};\n\nfunction refineCraftSkillUploadAttestation(\n val: {\n kind: CraftSkillKind;\n attestation: CraftSkillAttestation;\n source?: CraftSkillSourceReference;\n },\n ctx: z.RefinementCtx,\n): void {\n if (val.attestation.statementKind !== val.kind) {\n ctx.addIssue({\n code: \"custom\",\n message: \"attestation.statementKind must match kind\",\n path: [\"attestation\", \"statementKind\"],\n });\n }\n if (val.attestation.statementVersion !== CRAFT_SKILL_STATEMENT_VERSION) {\n ctx.addIssue({\n code: \"custom\",\n message: `attestation.statementVersion must be ${CRAFT_SKILL_STATEMENT_VERSION}`,\n path: [\"attestation\", \"statementVersion\"],\n });\n }\n const needsSource = val.kind === CRAFT_SKILL_KIND_REQUIRING_SOURCE;\n if (needsSource && !val.source) {\n ctx.addIssue({\n code: \"custom\",\n message: \"A source link (user or work project) is required for a TTT mimic\",\n path: [\"source\"],\n });\n }\n if (!needsSource && val.source) {\n ctx.addIssue({\n code: \"custom\",\n message: \"A source link is only allowed for a TTT mimic\",\n path: [\"source\"],\n });\n }\n}\n\n/** The attestation triple + tags on their own — for a caller that already holds the base\n * targetInfo fields separately, or that re-validates the consent record in isolation. */\nexport const CraftSkillUploadAttestationSchema = z\n .object(craftSkillUploadAttestationShape)\n .strict()\n .superRefine(refineCraftSkillUploadAttestation);\nexport type CraftSkillUploadAttestation = z.infer<typeof CraftSkillUploadAttestationSchema>;\n\n// craft-skill-media: the WHOLE craft-skill upload targetInfo — the base media fields plus the\n// three-kind attestation above. One declaration, so `parseTargetInfo('craft-skill-media', …)`\n// validates the complete payload the client actually sends; there is no split-and-revalidate\n// dance and no app-local copy of the attestation shape on either layer.\nexport const CraftSkillMediaTargetInfoSchema = z\n .object({\n // No craftSkillId: the backend mints the craft-skill doc id from the pendingMedia id;\n // a client-supplied id was dead input the processor ignored, so it is not accepted.\n // The canonical display/transport media-type family — never re-declared (ARCH-102).\n skillType: MediaTypeSchema,\n originalFileName: z.string().min(1),\n ...craftSkillUploadAttestationShape,\n })\n .strict()\n .superRefine(refineCraftSkillUploadAttestation);\n\n// squareStreetz: mentions array of structured Mention objects. Capped at\n// MAX_MENTIONS with unique placeholders (duplicate placeholders collide at render\n// time — both tokens resolve to the later entity).\nexport const SquareStreetzTargetInfoSchema = z\n .object({\n mentions: z\n .array(MentionSchema)\n .max(MAX_MENTIONS)\n .superRefine(rejectDuplicateMentionPlaceholders),\n })\n .strict();\n\n// Per-origin text (caption) rule for the squareStreetz media-upload path. The caption\n// travels as StartUploadRequest.textContent (top-level, generic + optional) — not inside\n// targetInfo — so `startUpload` validates it with THIS schema when\n// fileOrigin === 'squareStreetz', mirroring the text-post callable's\n// CreateSquareStreetzTextPostInputSchema.textContent (min 1, max MAX_POST_LENGTH). This\n// closes the media-path gap where a caption was accepted unbounded / empty.\nexport const SquareStreetzCaptionSchema = z.string().min(1).max(MAX_POST_LENGTH);\n\n// commission-posting: full commission creation payload.\nexport const CommissionPostingTargetInfoSchema = z\n .object({\n // No commissionListingId: the backend mints the listing id server-side at publish;\n // it is not accepted from the client.\n title: z.string().min(1).max(MAX_COMMISSION_TITLE_LENGTH),\n description: z.string().max(MAX_COMMISSION_DESCRIPTION_LENGTH),\n requiredTradeProfessions: z.array(z.enum(TRADE_PROFESSION_VALUES)).max(TRADE_PROFESSION_OPTIONS.length),\n // min(1): the create core rejects 0 shares (invalid-argument) at PUBLISH — after\n // upload/transcode/moderation — so fail fast at the trust boundary instead of burning\n // the activation-job retry budget on a deterministic dead-letter.\n stakeSharesOffered: z.number().int().min(1).max(MAX_WORK_PROJECT_STAKE_SHARES),\n workProjectId: z.string().min(1),\n })\n .strict();\n\nexport const CommissionProposalTargetInfoSchema = z\n .object({\n commissionListingId: z.string().min(1),\n replyText: z.string().max(MAX_COMMISSION_DESCRIPTION_LENGTH),\n })\n .strict();\n\n// audition-prompt: workProject-owned audition creation payload (workAudition only).\nexport const AuditionPromptTargetInfoSchema = z\n .object({\n // SANCTIONED client-minted upload-batch correlation ID. A curated audition uploads\n // MULTIPLE files that must all share ONE audition id before any Audition doc exists,\n // so the client mints it and stamps every file in the batch with it. The backend must\n // treat it with create-no-overwrite semantics (first write wins; a colliding id from a\n // different actor/batch is rejected, never overwritten). This is NOT a reference to an\n // existing audition (contrast audition-entry's auditionId).\n auditionId: z.string().min(1),\n type: z.literal('workAudition'),\n title: z.string().min(1).max(MAX_AUDITION_TITLE_LENGTH),\n description: z.string().max(MAX_AUDITION_DESCRIPTION_LENGTH),\n openTill: z.number().int().positive(),\n workProjectId: z.string().min(1),\n // min(1): the create core rejects <1 shares at PUBLISH (see CommissionPosting above).\n // Optional — defaults to a floor of 1 at invite time when absent.\n stakeSharesOffered: z.number().int().min(1).max(MAX_WORK_PROJECT_STAKE_SHARES).optional(),\n // Curated vs open audition. Absent ⇒ 'open' (community replies + votes). 'curated' ⇒ the\n // creating work posts the option entries itself and users may ONLY vote (the create/reply\n // callable derives each option entry's isCreatorOption server-side and rejects community replies).\n mode: z.enum(['open', 'curated']).optional(),\n // Curated ONLY: the fixed number of creator option videos (2..8) in the atomic batch, carried from\n // the Create click through targetInfo so the create core sets it on the Audition doc and the reveal\n // coordinator knows when ALL options have landed. Required by the create core when mode==='curated'.\n expectedOptionCount: z.number().int().min(MIN_CURATED_AUDITION_OPTIONS).max(MAX_CURATED_AUDITION_OPTIONS).optional(),\n })\n .strict();\n\n// admin-audition-prompt: admin-operated featured/sponsored audition creation payload.\nexport const AdminAuditionPromptTargetInfoSchema = z\n .object({\n // SANCTIONED client-minted upload-batch correlation ID (see AuditionPromptTargetInfoSchema.\n // auditionId): a curated audition's multiple option videos share this one id before any\n // Audition doc exists; the backend uses create-no-overwrite semantics. NOT a reference to\n // an existing audition.\n auditionId: z.string().min(1),\n type: z.enum(['platformAudition', 'sponsoredAudition']),\n title: z.string().min(1).max(MAX_AUDITION_TITLE_LENGTH),\n description: z.string().max(MAX_AUDITION_DESCRIPTION_LENGTH),\n openTill: z.number().int().positive(),\n sponsoredAuditionAmountUSD: z.number().nonnegative().finite().max(MAX_SPONSORED_AUDITION_AMOUNT_USD).optional(),\n // Curated vs open (see AuditionPromptTargetInfoSchema.mode). Absent ⇒ 'open'.\n mode: z.enum(['open', 'curated']).optional(),\n // Curated ONLY: fixed number of option videos (2..8) in the atomic batch (see\n // AuditionPromptTargetInfoSchema.expectedOptionCount). Required by the create core when curated.\n expectedOptionCount: z.number().int().min(MIN_CURATED_AUDITION_OPTIONS).max(MAX_CURATED_AUDITION_OPTIONS).optional(),\n })\n .strict();\n\nexport const AuditionEntryTargetInfoSchema = z\n .object({\n auditionId: z.string().min(1),\n })\n .strict();\n\n// ───────────────────────────────────────────────────────────────────\n// HALL LIBRARY COVER target info (square / poster / cinematic).\n// All three origins share one shape. The processor uses fileOrigin to\n// pick which field on the target doc gets written (see\n// HALL_LIBRARY_TARGET_FIELDS in `hall-library-target-fields.ts`).\n//\n// itemType discriminates which parent collection — `workProjectTales` vs\n// `workProjectTunes` vs `workProjectTelevision`. fileOrigin alone does NOT\n// disambiguate this because all three cover origins target whichever\n// hallLibrary item the user is editing.\n// ───────────────────────────────────────────────────────────────────\nconst HallLibraryCoverTargetInfoSchema = z\n .object({\n workProjectId: z.string().min(1),\n itemType: z.enum(['tale', 'tune', 'television']),\n itemId: z.string().min(1),\n })\n .strict();\n\nexport const HallLibraryCoverSquareTargetInfoSchema = HallLibraryCoverTargetInfoSchema;\nexport const HallLibraryCoverPosterTargetInfoSchema = HallLibraryCoverTargetInfoSchema;\nexport const HallLibraryCoverCinematicTargetInfoSchema = HallLibraryCoverTargetInfoSchema;\n\n// realm-cover: the Realm's square cover art. The processor writes\n// `realmCoverAssetId` on workRealms/{workRealmId}. Steward-only (the upload\n// callable authorizes against the realm's workStewardUid).\nexport const RealmCoverTargetInfoSchema = z\n .object({\n workRealmId: z.string().min(1),\n })\n .strict();\n\n// ───────────────────────────────────────────────────────────────────\n// SUB-ITEM target info — one shape per item type, NOT per media kind.\n// chapter-photo uses ChapterPhotoTargetInfoSchema.\n// tune-track-photo + tune-track-audio share TuneTrackMediaTargetInfoSchema.\n// television-episode-photo + television-episode-video share TelevisionEpisodeMediaTargetInfoSchema.\n// The processor derives the doc path from these IDs via\n// PATH_BUILDERS.taleChapter / .tuneTrack / .televisionEpisode, and derives the\n// field name from fileOrigin via HALL_LIBRARY_TARGET_FIELDS.\n// ───────────────────────────────────────────────────────────────────\nexport const ChapterPhotoTargetInfoSchema = z\n .object({\n workProjectId: z.string().min(1),\n taleId: z.string().min(1),\n chapterId: z.string().min(1),\n })\n .strict();\n\nconst TuneTrackMediaTargetInfoSchema = z\n .object({\n workProjectId: z.string().min(1),\n tuneId: z.string().min(1),\n trackId: z.string().min(1),\n })\n .strict();\n\nexport const TuneTrackPhotoTargetInfoSchema = TuneTrackMediaTargetInfoSchema;\nexport const TuneTrackAudioTargetInfoSchema = TuneTrackMediaTargetInfoSchema;\n\nconst TelevisionEpisodeMediaTargetInfoSchema = z\n .object({\n workProjectId: z.string().min(1),\n televisionId: z.string().min(1),\n episodeId: z.string().min(1),\n })\n .strict();\n\nexport const TelevisionEpisodePhotoTargetInfoSchema = TelevisionEpisodeMediaTargetInfoSchema;\nexport const TelevisionEpisodeVideoTargetInfoSchema = TelevisionEpisodeMediaTargetInfoSchema;\n\n// conversation-file: STRICT — carries the ConversationFileRef and NOTHING else.\n// No message text, no replyTo, no message id, no isUserReply: a Conversation File\n// is never embedded in, sequenced with, or mutated through a chat message. Extra\n// or mixed scope identifiers (e.g. a guildInviteId alongside an adminDispatchId,\n// or a guildChatChannelId) fail the parse.\nexport const ConversationFileTargetInfoSchema = ConversationFileRefSchema;\n\nexport const WorkAssetTargetInfoSchema = z\n .object({\n workProjectId: z.string().min(1),\n // The folder the file is uploaded INTO (S7 folder system). Custom folders gate\n // upload by trade profession; the default folder accepts any active guildmate.\n folderId: z.string().min(1),\n })\n .strict();\n\n// ---- type aliases ----\n\nexport type ProfilePictureTargetInfo = z.infer<typeof ProfilePictureTargetInfoSchema>;\nexport type CraftSkillMediaTargetInfo = z.infer<typeof CraftSkillMediaTargetInfoSchema>;\nexport type SquareStreetzTargetInfo = z.infer<typeof SquareStreetzTargetInfoSchema>;\nexport type CommissionPostingTargetInfo = z.infer<typeof CommissionPostingTargetInfoSchema>;\nexport type CommissionProposalTargetInfo = z.infer<typeof CommissionProposalTargetInfoSchema>;\nexport type AuditionPromptTargetInfo = z.infer<typeof AuditionPromptTargetInfoSchema>;\nexport type AdminAuditionPromptTargetInfo = z.infer<typeof AdminAuditionPromptTargetInfoSchema>;\nexport type AuditionEntryTargetInfo = z.infer<typeof AuditionEntryTargetInfoSchema>;\nexport type HallLibraryCoverSquareTargetInfo = z.infer<typeof HallLibraryCoverSquareTargetInfoSchema>;\nexport type HallLibraryCoverPosterTargetInfo = z.infer<typeof HallLibraryCoverPosterTargetInfoSchema>;\nexport type HallLibraryCoverCinematicTargetInfo = z.infer<typeof HallLibraryCoverCinematicTargetInfoSchema>;\nexport type RealmCoverTargetInfo = z.infer<typeof RealmCoverTargetInfoSchema>;\nexport type ChapterPhotoTargetInfo = z.infer<typeof ChapterPhotoTargetInfoSchema>;\nexport type TuneTrackPhotoTargetInfo = z.infer<typeof TuneTrackPhotoTargetInfoSchema>;\nexport type TuneTrackAudioTargetInfo = z.infer<typeof TuneTrackAudioTargetInfoSchema>;\nexport type TelevisionEpisodePhotoTargetInfo = z.infer<typeof TelevisionEpisodePhotoTargetInfoSchema>;\nexport type TelevisionEpisodeVideoTargetInfo = z.infer<typeof TelevisionEpisodeVideoTargetInfoSchema>;\nexport type ConversationFileTargetInfo = z.infer<typeof ConversationFileTargetInfoSchema>;\nexport type WorkAssetTargetInfo = z.infer<typeof WorkAssetTargetInfoSchema>;\n\n// ncii-evidence: ties the uploaded evidence to a take-it-down request by its\n// public reference. The processor attaches the evidence record to that request.\nexport const NciiEvidenceTargetInfoSchema = z\n .object({\n requestReference: z.string().min(1),\n })\n .strict();\nexport type NciiEvidenceTargetInfo = z.infer<typeof NciiEvidenceTargetInfoSchema>;\n\n// Mapped type: given a FileOrigin literal, returns its targetInfo shape.\nexport type TargetInfoFor<O extends FileOrigin> =\n O extends 'profile-picture' ? ProfilePictureTargetInfo\n : O extends 'craft-skill-media' ? CraftSkillMediaTargetInfo\n : O extends 'squareStreetz' ? SquareStreetzTargetInfo\n : O extends 'commission-posting' ? CommissionPostingTargetInfo\n : O extends 'commission-proposal' ? CommissionProposalTargetInfo\n : O extends 'audition-prompt' ? AuditionPromptTargetInfo\n : O extends 'admin-audition-prompt' ? AdminAuditionPromptTargetInfo\n : O extends 'audition-entry' ? AuditionEntryTargetInfo\n : O extends 'hallLibrary-cover-square' ? HallLibraryCoverSquareTargetInfo\n : O extends 'hallLibrary-cover-poster' ? HallLibraryCoverPosterTargetInfo\n : O extends 'hallLibrary-cover-cinematic' ? HallLibraryCoverCinematicTargetInfo\n : O extends 'realm-cover' ? RealmCoverTargetInfo\n : O extends 'chapter-photo' ? ChapterPhotoTargetInfo\n : O extends 'tune-track-photo' ? TuneTrackPhotoTargetInfo\n : O extends 'tune-track-audio' ? TuneTrackAudioTargetInfo\n : O extends 'television-episode-photo' ? TelevisionEpisodePhotoTargetInfo\n : O extends 'television-episode-video' ? TelevisionEpisodeVideoTargetInfo\n : O extends 'conversation-file' ? ConversationFileTargetInfo\n : O extends 'work-asset' ? WorkAssetTargetInfo\n : O extends 'ncii-evidence' ? NciiEvidenceTargetInfo\n : never;\n\nfunction assertNever(x: never): never {\n throw new Error(`Unexpected fileOrigin: ${String(x)}`);\n}\n\nexport function parseTargetInfo<O extends FileOrigin>(\n fileOrigin: O,\n raw: unknown\n): TargetInfoFor<O> {\n switch (fileOrigin) {\n case 'profile-picture': return ProfilePictureTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'craft-skill-media': return CraftSkillMediaTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'squareStreetz': return SquareStreetzTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'commission-posting': return CommissionPostingTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'commission-proposal': return CommissionProposalTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'audition-prompt': return AuditionPromptTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'admin-audition-prompt': return AdminAuditionPromptTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'audition-entry': return AuditionEntryTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'hallLibrary-cover-square': return HallLibraryCoverSquareTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'hallLibrary-cover-poster': return HallLibraryCoverPosterTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'hallLibrary-cover-cinematic': return HallLibraryCoverCinematicTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'realm-cover': return RealmCoverTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'chapter-photo': return ChapterPhotoTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'tune-track-photo': return TuneTrackPhotoTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'tune-track-audio': return TuneTrackAudioTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'television-episode-photo': return TelevisionEpisodePhotoTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'television-episode-video': return TelevisionEpisodeVideoTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'conversation-file': return ConversationFileTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'work-asset': return WorkAssetTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'ncii-evidence': return NciiEvidenceTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n default: return assertNever(fileOrigin);\n }\n}\n\n\n\n\n"]}
|
|
1
|
+
{"version":3,"file":"target-info.js","sourceRoot":"","sources":["../../src/media/target-info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,kCAAkC,EAAE,MAAM,YAAY,CAAC;AAC/E,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE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ation-file-ref.js\";\nimport { MentionSchema, rejectDuplicateMentionPlaceholders } from \"./atoms.js\";\nimport {\n TRADE_PROFESSION_OPTIONS,\n TRADE_PROFESSION_VALUES,\n CRAFT_SKILL_TAG_VALUES,\n} from \"../constants/options.js\";\nimport { MediaTypeSchema } from \"../doc-schemas/social.js\";\nimport {\n CraftSkillKindSchema,\n CraftSkillAttestationSchema,\n CraftSkillSourceReferenceSchema,\n CRAFT_SKILL_KIND_REQUIRING_SOURCE,\n type CraftSkillKind,\n type CraftSkillAttestation,\n type CraftSkillSourceReference,\n} from \"../doc-schemas/user.js\";\nimport { CRAFT_SKILL_STATEMENT_VERSION } from \"../constants/craft-skill-statements.js\";\nimport { HALL_CONTENT_DETAIL_SURFACES } from \"../constants/hall-content-routing.js\";\nimport {\n MAX_MENTIONS,\n MAX_POST_LENGTH,\n MAX_CRAFT_SKILL_TAGS,\n MAX_COMMISSION_TITLE_LENGTH,\n MAX_COMMISSION_DESCRIPTION_LENGTH,\n MAX_AUDITION_TITLE_LENGTH,\n MAX_AUDITION_DESCRIPTION_LENGTH,\n MAX_WORK_PROJECT_STAKE_SHARES,\n MAX_SPONSORED_AUDITION_AMOUNT_USD,\n MIN_CURATED_AUDITION_OPTIONS,\n MAX_CURATED_AUDITION_OPTIONS,\n} from \"../constants/business.js\";\n\nexport const ProfilePictureTargetInfoSchema = z.object({}).strict();\n\n/**\n * The three-kind craft-skill upload attestation — `kind` + the agreed `attestation` + the\n * TTT-mimic-only `source` + the creation `tags`. It crosses the backend↔frontend boundary\n * (the client collects it in the add-a-craft dialog; `startUpload` and `processCraftSkill`\n * re-validate it), so it is declared ONCE here (ARCH-101/ARCH-102) — never app-locally on\n * either side.\n *\n * `source` is REQUIRED for the TTT-mimic kind (CRAFT_SKILL_KIND_REQUIRING_SOURCE) and FORBIDDEN\n * otherwise, and `attestation.statementKind` must match `kind` — enforced by the shared\n * refinement below, so a client-sent payload is fully re-validated server-side.\n * `attestation.agreedAt` is shape-validated here; the SERVER re-stamps it at `startUpload`\n * (MEDIA-004 — never trust a client timestamp on a rights-consent record).\n *\n * See ttt-prod docs/design/profile-and-craft-skills.md § \"The three-kind system\".\n */\nconst craftSkillUploadAttestationShape = {\n kind: CraftSkillKindSchema,\n attestation: CraftSkillAttestationSchema,\n source: CraftSkillSourceReferenceSchema.optional(),\n // At least 1 tag is required at creation (three-kind flow) and the floor of 1 can never drop\n // (updateCraftSkillTags refuses the last remove). Deduped, allowlisted, capped at the max.\n tags: z\n .array(z.enum(CRAFT_SKILL_TAG_VALUES))\n .min(1, \"Select at least one tag for your craft.\")\n .max(MAX_CRAFT_SKILL_TAGS)\n .refine((t) => new Set(t).size === t.length, \"Duplicate tags are not allowed.\"),\n};\n\nfunction refineCraftSkillUploadAttestation(\n val: {\n kind: CraftSkillKind;\n attestation: CraftSkillAttestation;\n source?: CraftSkillSourceReference;\n },\n ctx: z.RefinementCtx,\n): void {\n if (val.attestation.statementKind !== val.kind) {\n ctx.addIssue({\n code: \"custom\",\n message: \"attestation.statementKind must match kind\",\n path: [\"attestation\", \"statementKind\"],\n });\n }\n if (val.attestation.statementVersion !== CRAFT_SKILL_STATEMENT_VERSION) {\n ctx.addIssue({\n code: \"custom\",\n message: `attestation.statementVersion must be ${CRAFT_SKILL_STATEMENT_VERSION}`,\n path: [\"attestation\", \"statementVersion\"],\n });\n }\n const needsSource = val.kind === CRAFT_SKILL_KIND_REQUIRING_SOURCE;\n if (needsSource && !val.source) {\n ctx.addIssue({\n code: \"custom\",\n message: \"A source link (user or work project) is required for a TTT mimic\",\n path: [\"source\"],\n });\n }\n if (!needsSource && val.source) {\n ctx.addIssue({\n code: \"custom\",\n message: \"A source link is only allowed for a TTT mimic\",\n path: [\"source\"],\n });\n }\n}\n\n/** The attestation triple + tags on their own — for a caller that already holds the base\n * targetInfo fields separately, or that re-validates the consent record in isolation. */\nexport const CraftSkillUploadAttestationSchema = z\n .object(craftSkillUploadAttestationShape)\n .strict()\n .superRefine(refineCraftSkillUploadAttestation);\nexport type CraftSkillUploadAttestation = z.infer<typeof CraftSkillUploadAttestationSchema>;\n\n// craft-skill-media: the WHOLE craft-skill upload targetInfo — the base media fields plus the\n// three-kind attestation above. One declaration, so `parseTargetInfo('craft-skill-media', …)`\n// validates the complete payload the client actually sends; there is no split-and-revalidate\n// dance and no app-local copy of the attestation shape on either layer.\nexport const CraftSkillMediaTargetInfoSchema = z\n .object({\n // No craftSkillId: the backend mints the craft-skill doc id from the pendingMedia id;\n // a client-supplied id was dead input the processor ignored, so it is not accepted.\n // The canonical display/transport media-type family — never re-declared (ARCH-102).\n skillType: MediaTypeSchema,\n originalFileName: z.string().min(1),\n ...craftSkillUploadAttestationShape,\n })\n .strict()\n .superRefine(refineCraftSkillUploadAttestation);\n\n// squareStreetz: mentions array of structured Mention objects. Capped at\n// MAX_MENTIONS with unique placeholders (duplicate placeholders collide at render\n// time — both tokens resolve to the later entity).\nexport const SquareStreetzTargetInfoSchema = z\n .object({\n mentions: z\n .array(MentionSchema)\n .max(MAX_MENTIONS)\n .superRefine(rejectDuplicateMentionPlaceholders),\n })\n .strict();\n\n// Per-origin text (caption) rule for the squareStreetz media-upload path. The caption\n// travels as StartUploadRequest.textContent (top-level, generic + optional) — not inside\n// targetInfo — so `startUpload` validates it with THIS schema when\n// fileOrigin === 'squareStreetz', mirroring the text-post callable's\n// CreateSquareStreetzTextPostInputSchema.textContent (min 1, max MAX_POST_LENGTH). This\n// closes the media-path gap where a caption was accepted unbounded / empty.\nexport const SquareStreetzCaptionSchema = z.string().min(1).max(MAX_POST_LENGTH);\n\n// commission-posting: full commission creation payload.\nexport const CommissionPostingTargetInfoSchema = z\n .object({\n // No commissionListingId: the backend mints the listing id server-side at publish;\n // it is not accepted from the client.\n title: z.string().min(1).max(MAX_COMMISSION_TITLE_LENGTH),\n description: z.string().max(MAX_COMMISSION_DESCRIPTION_LENGTH),\n requiredTradeProfessions: z.array(z.enum(TRADE_PROFESSION_VALUES)).max(TRADE_PROFESSION_OPTIONS.length),\n // min(1): the create core rejects 0 shares (invalid-argument) at PUBLISH — after\n // upload/transcode/moderation — so fail fast at the trust boundary instead of burning\n // the activation-job retry budget on a deterministic dead-letter.\n stakeSharesOffered: z.number().int().min(1).max(MAX_WORK_PROJECT_STAKE_SHARES),\n workProjectId: z.string().min(1),\n })\n .strict();\n\nexport const CommissionProposalTargetInfoSchema = z\n .object({\n commissionListingId: z.string().min(1),\n replyText: z.string().max(MAX_COMMISSION_DESCRIPTION_LENGTH),\n })\n .strict();\n\n// audition-prompt: workProject-owned audition creation payload (workAudition only).\nexport const AuditionPromptTargetInfoSchema = z\n .object({\n // SANCTIONED client-minted upload-batch correlation ID. A curated audition uploads\n // MULTIPLE files that must all share ONE audition id before any Audition doc exists,\n // so the client mints it and stamps every file in the batch with it. The backend must\n // treat it with create-no-overwrite semantics (first write wins; a colliding id from a\n // different actor/batch is rejected, never overwritten). This is NOT a reference to an\n // existing audition (contrast audition-entry's auditionId).\n auditionId: z.string().min(1),\n type: z.literal('workAudition'),\n title: z.string().min(1).max(MAX_AUDITION_TITLE_LENGTH),\n description: z.string().max(MAX_AUDITION_DESCRIPTION_LENGTH),\n openTill: z.number().int().positive(),\n workProjectId: z.string().min(1),\n // min(1): the create core rejects <1 shares at PUBLISH (see CommissionPosting above).\n // Optional — defaults to a floor of 1 at invite time when absent.\n stakeSharesOffered: z.number().int().min(1).max(MAX_WORK_PROJECT_STAKE_SHARES).optional(),\n // Curated vs open audition. Absent ⇒ 'open' (community replies + votes). 'curated' ⇒ the\n // creating work posts the option entries itself and users may ONLY vote (the create/reply\n // callable derives each option entry's isCreatorOption server-side and rejects community replies).\n mode: z.enum(['open', 'curated']).optional(),\n // Curated ONLY: the fixed number of creator option videos (2..8) in the atomic batch, carried from\n // the Create click through targetInfo so the create core sets it on the Audition doc and the reveal\n // coordinator knows when ALL options have landed. Required by the create core when mode==='curated'.\n expectedOptionCount: z.number().int().min(MIN_CURATED_AUDITION_OPTIONS).max(MAX_CURATED_AUDITION_OPTIONS).optional(),\n })\n .strict();\n\n// admin-audition-prompt: admin-operated featured/sponsored audition creation payload.\nexport const AdminAuditionPromptTargetInfoSchema = z\n .object({\n // SANCTIONED client-minted upload-batch correlation ID (see AuditionPromptTargetInfoSchema.\n // auditionId): a curated audition's multiple option videos share this one id before any\n // Audition doc exists; the backend uses create-no-overwrite semantics. NOT a reference to\n // an existing audition.\n auditionId: z.string().min(1),\n type: z.enum(['platformAudition', 'sponsoredAudition']),\n title: z.string().min(1).max(MAX_AUDITION_TITLE_LENGTH),\n description: z.string().max(MAX_AUDITION_DESCRIPTION_LENGTH),\n openTill: z.number().int().positive(),\n sponsoredAuditionAmountUSD: z.number().nonnegative().finite().max(MAX_SPONSORED_AUDITION_AMOUNT_USD).optional(),\n // Curated vs open (see AuditionPromptTargetInfoSchema.mode). Absent ⇒ 'open'.\n mode: z.enum(['open', 'curated']).optional(),\n // Curated ONLY: fixed number of option videos (2..8) in the atomic batch (see\n // AuditionPromptTargetInfoSchema.expectedOptionCount). Required by the create core when curated.\n expectedOptionCount: z.number().int().min(MIN_CURATED_AUDITION_OPTIONS).max(MAX_CURATED_AUDITION_OPTIONS).optional(),\n })\n .strict();\n\nexport const AuditionEntryTargetInfoSchema = z\n .object({\n auditionId: z.string().min(1),\n })\n .strict();\n\n// ───────────────────────────────────────────────────────────────────\n// HALL LIBRARY COVER target info (square / poster / cinematic).\n// All three origins share one shape. The processor uses fileOrigin to\n// pick which field on the target doc gets written (see\n// HALL_LIBRARY_TARGET_FIELDS in `hall-library-target-fields.ts`).\n//\n// itemType discriminates which parent collection — `workProjectTales` vs\n// `workProjectTunes` vs `workProjectTelevision`. fileOrigin alone does NOT\n// disambiguate this because all three cover origins target whichever\n// hallLibrary item the user is editing.\n// ───────────────────────────────────────────────────────────────────\nconst HallLibraryCoverTargetInfoSchema = z\n .object({\n workProjectId: z.string().min(1),\n itemType: z.enum(HALL_CONTENT_DETAIL_SURFACES),\n itemId: z.string().min(1),\n })\n .strict();\n\nexport const HallLibraryCoverSquareTargetInfoSchema = HallLibraryCoverTargetInfoSchema;\nexport const HallLibraryCoverPosterTargetInfoSchema = HallLibraryCoverTargetInfoSchema;\nexport const HallLibraryCoverCinematicTargetInfoSchema = HallLibraryCoverTargetInfoSchema;\n\n// realm-cover: the Realm's square cover art. The processor writes\n// `realmCoverAssetId` on workRealms/{workRealmId}. Steward-only (the upload\n// callable authorizes against the realm's workStewardUid).\nexport const RealmCoverTargetInfoSchema = z\n .object({\n workRealmId: z.string().min(1),\n })\n .strict();\n\n// ───────────────────────────────────────────────────────────────────\n// SUB-ITEM target info — one shape per item type, NOT per media kind.\n// chapter-photo uses ChapterPhotoTargetInfoSchema.\n// tune-track-photo + tune-track-audio share TuneTrackMediaTargetInfoSchema.\n// television-episode-photo + television-episode-video share TelevisionEpisodeMediaTargetInfoSchema.\n// The processor derives the doc path from these IDs via\n// PATH_BUILDERS.taleChapter / .tuneTrack / .televisionEpisode, and derives the\n// field name from fileOrigin via HALL_LIBRARY_TARGET_FIELDS.\n// ───────────────────────────────────────────────────────────────────\nexport const ChapterPhotoTargetInfoSchema = z\n .object({\n workProjectId: z.string().min(1),\n taleId: z.string().min(1),\n chapterId: z.string().min(1),\n })\n .strict();\n\nconst TuneTrackMediaTargetInfoSchema = z\n .object({\n workProjectId: z.string().min(1),\n tuneId: z.string().min(1),\n trackId: z.string().min(1),\n })\n .strict();\n\nexport const TuneTrackPhotoTargetInfoSchema = TuneTrackMediaTargetInfoSchema;\nexport const TuneTrackAudioTargetInfoSchema = TuneTrackMediaTargetInfoSchema;\n\nconst TelevisionEpisodeMediaTargetInfoSchema = z\n .object({\n workProjectId: z.string().min(1),\n televisionId: z.string().min(1),\n episodeId: z.string().min(1),\n })\n .strict();\n\nexport const TelevisionEpisodePhotoTargetInfoSchema = TelevisionEpisodeMediaTargetInfoSchema;\nexport const TelevisionEpisodeVideoTargetInfoSchema = TelevisionEpisodeMediaTargetInfoSchema;\n\n// conversation-file: STRICT — carries the ConversationFileRef and NOTHING else.\n// No message text, no replyTo, no message id, no isUserReply: a Conversation File\n// is never embedded in, sequenced with, or mutated through a chat message. Extra\n// or mixed scope identifiers (e.g. a guildInviteId alongside an adminDispatchId,\n// or a guildChatChannelId) fail the parse.\nexport const ConversationFileTargetInfoSchema = ConversationFileRefSchema;\n\nexport const WorkAssetTargetInfoSchema = z\n .object({\n workProjectId: z.string().min(1),\n // The folder the file is uploaded INTO (S7 folder system). Custom folders gate\n // upload by trade profession; the default folder accepts any active guildmate.\n folderId: z.string().min(1),\n })\n .strict();\n\n// ---- type aliases ----\n\nexport type ProfilePictureTargetInfo = z.infer<typeof ProfilePictureTargetInfoSchema>;\nexport type CraftSkillMediaTargetInfo = z.infer<typeof CraftSkillMediaTargetInfoSchema>;\nexport type SquareStreetzTargetInfo = z.infer<typeof SquareStreetzTargetInfoSchema>;\nexport type CommissionPostingTargetInfo = z.infer<typeof CommissionPostingTargetInfoSchema>;\nexport type CommissionProposalTargetInfo = z.infer<typeof CommissionProposalTargetInfoSchema>;\nexport type AuditionPromptTargetInfo = z.infer<typeof AuditionPromptTargetInfoSchema>;\nexport type AdminAuditionPromptTargetInfo = z.infer<typeof AdminAuditionPromptTargetInfoSchema>;\nexport type AuditionEntryTargetInfo = z.infer<typeof AuditionEntryTargetInfoSchema>;\nexport type HallLibraryCoverSquareTargetInfo = z.infer<typeof HallLibraryCoverSquareTargetInfoSchema>;\nexport type HallLibraryCoverPosterTargetInfo = z.infer<typeof HallLibraryCoverPosterTargetInfoSchema>;\nexport type HallLibraryCoverCinematicTargetInfo = z.infer<typeof HallLibraryCoverCinematicTargetInfoSchema>;\nexport type RealmCoverTargetInfo = z.infer<typeof RealmCoverTargetInfoSchema>;\nexport type ChapterPhotoTargetInfo = z.infer<typeof ChapterPhotoTargetInfoSchema>;\nexport type TuneTrackPhotoTargetInfo = z.infer<typeof TuneTrackPhotoTargetInfoSchema>;\nexport type TuneTrackAudioTargetInfo = z.infer<typeof TuneTrackAudioTargetInfoSchema>;\nexport type TelevisionEpisodePhotoTargetInfo = z.infer<typeof TelevisionEpisodePhotoTargetInfoSchema>;\nexport type TelevisionEpisodeVideoTargetInfo = z.infer<typeof TelevisionEpisodeVideoTargetInfoSchema>;\nexport type ConversationFileTargetInfo = z.infer<typeof ConversationFileTargetInfoSchema>;\nexport type WorkAssetTargetInfo = z.infer<typeof WorkAssetTargetInfoSchema>;\n\n// ncii-evidence: ties the uploaded evidence to a take-it-down request by its\n// public reference. The processor attaches the evidence record to that request.\nexport const NciiEvidenceTargetInfoSchema = z\n .object({\n requestReference: z.string().min(1),\n })\n .strict();\nexport type NciiEvidenceTargetInfo = z.infer<typeof NciiEvidenceTargetInfoSchema>;\n\n// Mapped type: given a FileOrigin literal, returns its targetInfo shape.\nexport type TargetInfoFor<O extends FileOrigin> =\n O extends 'profile-picture' ? ProfilePictureTargetInfo\n : O extends 'craft-skill-media' ? CraftSkillMediaTargetInfo\n : O extends 'squareStreetz' ? SquareStreetzTargetInfo\n : O extends 'commission-posting' ? CommissionPostingTargetInfo\n : O extends 'commission-proposal' ? CommissionProposalTargetInfo\n : O extends 'audition-prompt' ? AuditionPromptTargetInfo\n : O extends 'admin-audition-prompt' ? AdminAuditionPromptTargetInfo\n : O extends 'audition-entry' ? AuditionEntryTargetInfo\n : O extends 'hallLibrary-cover-square' ? HallLibraryCoverSquareTargetInfo\n : O extends 'hallLibrary-cover-poster' ? HallLibraryCoverPosterTargetInfo\n : O extends 'hallLibrary-cover-cinematic' ? HallLibraryCoverCinematicTargetInfo\n : O extends 'realm-cover' ? RealmCoverTargetInfo\n : O extends 'chapter-photo' ? ChapterPhotoTargetInfo\n : O extends 'tune-track-photo' ? TuneTrackPhotoTargetInfo\n : O extends 'tune-track-audio' ? TuneTrackAudioTargetInfo\n : O extends 'television-episode-photo' ? TelevisionEpisodePhotoTargetInfo\n : O extends 'television-episode-video' ? TelevisionEpisodeVideoTargetInfo\n : O extends 'conversation-file' ? ConversationFileTargetInfo\n : O extends 'work-asset' ? WorkAssetTargetInfo\n : O extends 'ncii-evidence' ? NciiEvidenceTargetInfo\n : never;\n\nfunction assertNever(x: never): never {\n throw new Error(`Unexpected fileOrigin: ${String(x)}`);\n}\n\nexport function parseTargetInfo<O extends FileOrigin>(\n fileOrigin: O,\n raw: unknown\n): TargetInfoFor<O> {\n switch (fileOrigin) {\n case 'profile-picture': return ProfilePictureTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'craft-skill-media': return CraftSkillMediaTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'squareStreetz': return SquareStreetzTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'commission-posting': return CommissionPostingTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'commission-proposal': return CommissionProposalTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'audition-prompt': return AuditionPromptTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'admin-audition-prompt': return AdminAuditionPromptTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'audition-entry': return AuditionEntryTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'hallLibrary-cover-square': return HallLibraryCoverSquareTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'hallLibrary-cover-poster': return HallLibraryCoverPosterTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'hallLibrary-cover-cinematic': return HallLibraryCoverCinematicTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'realm-cover': return RealmCoverTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'chapter-photo': return ChapterPhotoTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'tune-track-photo': return TuneTrackPhotoTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'tune-track-audio': return TuneTrackAudioTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'television-episode-photo': return TelevisionEpisodePhotoTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'television-episode-video': return TelevisionEpisodeVideoTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'conversation-file': return ConversationFileTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'work-asset': return WorkAssetTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n case 'ncii-evidence': return NciiEvidenceTargetInfoSchema.parse(raw) as TargetInfoFor<O>;\n default: return assertNever(fileOrigin);\n }\n}\n\n\n\n\n"]}
|
package/dist/schemas/admin.d.ts
CHANGED
|
@@ -221,10 +221,10 @@ export declare const GetReportedContentDetailResultSchema: z.ZodObject<{
|
|
|
221
221
|
workProject: "workProject";
|
|
222
222
|
workRealm: "workRealm";
|
|
223
223
|
tale: "tale";
|
|
224
|
-
tune: "tune";
|
|
225
|
-
television: "television";
|
|
226
224
|
chapter: "chapter";
|
|
225
|
+
tune: "tune";
|
|
227
226
|
tuneTrack: "tuneTrack";
|
|
227
|
+
television: "television";
|
|
228
228
|
televisionEpisode: "televisionEpisode";
|
|
229
229
|
}>>>;
|
|
230
230
|
reportTimeSnapshot: z.ZodNullable<z.ZodObject<{
|
package/dist/schemas/atoms.d.ts
CHANGED
|
@@ -62,10 +62,10 @@ export declare const moderationClearableSurfaceSchema: z.ZodEnum<{
|
|
|
62
62
|
workProject: "workProject";
|
|
63
63
|
workRealm: "workRealm";
|
|
64
64
|
tale: "tale";
|
|
65
|
-
tune: "tune";
|
|
66
|
-
television: "television";
|
|
67
65
|
chapter: "chapter";
|
|
66
|
+
tune: "tune";
|
|
68
67
|
tuneTrack: "tuneTrack";
|
|
68
|
+
television: "television";
|
|
69
69
|
televisionEpisode: "televisionEpisode";
|
|
70
70
|
}>;
|
|
71
71
|
export declare const guildInviteConversationStatusSchema: z.ZodEnum<{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GuildmateUser, PublicGuildmateUser } from '../doc-schemas/work-project.js';
|
|
2
|
-
export type { GuildmateStatus, GuildmateUser, PublicGuildmateUser, WorkFileFolder, WorkFile, PendingStakeShares, FullWorkProject, PublicWorkProject, WorkRealm, } from '../doc-schemas/work-project.js';
|
|
2
|
+
export type { GuildmateStatus, RealmCanonStatus, GuildmateUser, PublicGuildmateUser, WorkFileFolder, WorkFile, PendingStakeShares, FullWorkProject, PublicWorkProject, WorkRealm, } from '../doc-schemas/work-project.js';
|
|
3
3
|
/**
|
|
4
4
|
* Single source of truth for which GuildmateUser fields the public mirror copies,
|
|
5
5
|
* so the mirror trigger can't drift from the PublicGuildmateUser shape.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"work-project.d.ts","sourceRoot":"","sources":["../../src/types/work-project.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAEzF,YAAY,EACV,eAAe,EACf,aAAa,EACb,mBAAmB,EACnB,cAAc,EACd,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,SAAS,GACV,MAAM,gCAAgC,CAAC;AAExC;;;GAGG;AACH,eAAO,MAAM,4BAA4B,EAAE,SAAS,CAAC,MAAM,aAAa,CAAC,EAKxE,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,+BAA+B,CAC7C,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,IAAI,GACxD,mBAAmB,GAAG,IAAI,CAY5B;AAED,0FAA0F;AAC1F,wBAAgB,+BAA+B,CAC7C,CAAC,EAAE,mBAAmB,GAAG,IAAI,EAC7B,CAAC,EAAE,mBAAmB,GAAG,IAAI,GAC5B,OAAO,CAST;AAKD,YAAY,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC"}
|
|
1
|
+
{"version":3,"file":"work-project.d.ts","sourceRoot":"","sources":["../../src/types/work-project.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAEzF,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,cAAc,EACd,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,SAAS,GACV,MAAM,gCAAgC,CAAC;AAExC;;;GAGG;AACH,eAAO,MAAM,4BAA4B,EAAE,SAAS,CAAC,MAAM,aAAa,CAAC,EAKxE,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,+BAA+B,CAC7C,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,IAAI,GACxD,mBAAmB,GAAG,IAAI,CAY5B;AAED,0FAA0F;AAC1F,wBAAgB,+BAA+B,CAC7C,CAAC,EAAE,mBAAmB,GAAG,IAAI,EAC7B,CAAC,EAAE,mBAAmB,GAAG,IAAI,GAC5B,OAAO,CAST;AAKD,YAAY,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"work-project.js","sourceRoot":"","sources":["../../src/types/work-project.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"work-project.js","sourceRoot":"","sources":["../../src/types/work-project.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAgB3E;;;GAGG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAqC;IAC5E,KAAK;IACL,kBAAkB;IAClB,UAAU;IACV,QAAQ;CACT,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,+BAA+B,CAC7C,GAAW,EACX,aAAyD;IAEzD,IAAI,CAAC,aAAa;QAAE,OAAO,IAAI,CAAC;IAChC,IAAI,aAAa,CAAC,UAAU,KAAK,yBAAyB;QAAE,OAAO,IAAI,CAAC;IAExE,OAAO;QACL,GAAG;QACH,gBAAgB,EAAE,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAC;YAC7D,CAAC,CAAE,aAAa,CAAC,gBAA6B;YAC9C,CAAC,CAAC,EAAE;QACN,QAAQ,EAAE,OAAO,aAAa,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QACjF,MAAM,EAAE,aAAa,CAAC,MAAuC;KAC9D,CAAC;AACJ,CAAC;AAED,0FAA0F;AAC1F,MAAM,UAAU,+BAA+B,CAC7C,CAA6B,EAC7B,CAA6B;IAE7B,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IAC7C,OAAO,CACL,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG;QACf,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QACrB,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ;QACzB,CAAC,CAAC,gBAAgB,CAAC,MAAM,KAAK,CAAC,CAAC,gBAAgB,CAAC,MAAM;QACvD,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE,KAAK,EAAE,EAAE,CAAC,UAAU,KAAK,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAC1F,CAAC;AACJ,CAAC","sourcesContent":["// WorkProject-related Firestore document types\nimport { FOUNDING_WORK_HOLDER_TYPE } from '../doc-schemas/work-project.js';\nimport type { GuildmateUser, PublicGuildmateUser } from '../doc-schemas/work-project.js';\n\nexport type {\n GuildmateStatus,\n RealmCanonStatus,\n GuildmateUser,\n PublicGuildmateUser,\n WorkFileFolder,\n WorkFile,\n PendingStakeShares,\n FullWorkProject,\n PublicWorkProject,\n WorkRealm,\n} from '../doc-schemas/work-project.js';\n\n/**\n * Single source of truth for which GuildmateUser fields the public mirror copies,\n * so the mirror trigger can't drift from the PublicGuildmateUser shape.\n */\nexport const GUILDMATE_USER_PUBLIC_FIELDS: readonly (keyof GuildmateUser)[] = [\n 'uid',\n 'tradeProfessions',\n 'joinedAt',\n 'status',\n];\n\n/**\n * Build the public collaborator projection from a raw guildmate document. THE single\n * owner of this projection — the mirror trigger and the post-deploy backfill both call\n * it, so the privacy boundary cannot drift between them.\n *\n * Returns null (meaning \"no public doc\") for missing data (guildmate doc deleted) and\n * for the founding-Work holder. A `departed` guildmate IS projected, keeping historical\n * collaborator credit; only a hard-deleted guildmate doc removes the projection.\n *\n * Projects exactly `GUILDMATE_USER_PUBLIC_FIELDS`. `tradeProfessions` is a\n * company-controlled enum and safe to expose; guild standings and stake counts are NOT\n * projected. The return type is `PublicGuildmateUser`, so a field added to\n * `PublicGuildmateUserSchema` breaks this function at compile time rather than silently\n * shipping an unprojected field.\n */\nexport function buildPublicGuildmateUserPayload(\n uid: string,\n guildmateData: Record<string, unknown> | undefined | null,\n): PublicGuildmateUser | null {\n if (!guildmateData) return null;\n if (guildmateData.holderType === FOUNDING_WORK_HOLDER_TYPE) return null;\n\n return {\n uid,\n tradeProfessions: Array.isArray(guildmateData.tradeProfessions)\n ? (guildmateData.tradeProfessions as string[])\n : [],\n joinedAt: typeof guildmateData.joinedAt === 'number' ? guildmateData.joinedAt : 0,\n status: guildmateData.status as PublicGuildmateUser['status'],\n };\n}\n\n/** Change detection for the public roster mirror — skips a write when nothing changed. */\nexport function publicGuildmateUserPayloadEqual(\n a: PublicGuildmateUser | null,\n b: PublicGuildmateUser | null,\n): boolean {\n if (a === null || b === null) return a === b;\n return (\n a.uid === b.uid &&\n a.status === b.status &&\n a.joinedAt === b.joinedAt &&\n a.tradeProfessions.length === b.tradeProfessions.length &&\n a.tradeProfessions.every((profession, index) => profession === b.tradeProfessions[index])\n );\n}\n\n// StakeShareOperation types are defined by the Zod schema.\n// See packages/ttt-core/src/schemas/stake-share-operation.ts for the source of truth.\n// The old `workProjectData?: FullWorkProject` field was dead and has been removed.\nexport type { StakeShareOperation, StakeShareOperationType } from '../schemas/stake-share-operation.js';\n"]}
|