@ttt-productions/ttt-core 0.79.7 → 0.79.9

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.
@@ -1,5 +1,6 @@
1
1
  import type { UserAccountStatus } from '../doc-schemas/user.js';
2
2
  import type { FeedbackType } from './business-admin.js';
3
+ import type { ClearableTextFieldName } from './business-content.js';
3
4
  import type { ReportDisposition } from '../doc-schemas/safety/foundation.js';
4
5
  import type { BroadcastAudienceSelector } from '../schemas/notification.js';
5
6
  import type { DeadLetterCollection } from '../schemas/admin.js';
@@ -13,6 +14,25 @@ export declare const BROADCAST_AUDIENCE_KIND_LABELS: Record<BroadcastAudienceSel
13
14
  * UI copy uses the SHORT settled terms (Trade → "Trades", Craft → "Craft Tags", Genre →
14
15
  * "<Kind> Genres"), never the compound code identifiers (ARCH-107). */
15
16
  export declare const FEEDBACK_TYPE_LABELS: Record<FeedbackType, string>;
17
+ /**
18
+ * Human labels for the raw clearable/changeable TEXT-FIELD names the moderation text-clear
19
+ * remedy and the published "Update details" change-request flow work in. The backend stores and
20
+ * validates the raw doc field names (`workingTitle`, `description`, `content`); these are the
21
+ * only display strings for them — rendered by the member-facing "text removed by moderation"
22
+ * banners, every admin clear-text field picker, the change-request dialog, and the admin
23
+ * change-request work view. Keyed by the derived ClearableTextFieldName union, so a new
24
+ * clearable field fails the build here until it has a label (ARCH-102).
25
+ *
26
+ * The `working*` pair belongs to the Work shell and the Realm doc; the labels stay the plain
27
+ * short terms (ARCH-107 — the code identifier carries `working`, the UI never shows it).
28
+ */
29
+ export declare const CLEARABLE_TEXT_FIELD_LABELS: Record<ClearableTextFieldName, string>;
30
+ /**
31
+ * The display label for one raw clearable text-field name, falling back to the raw name.
32
+ * Tolerates a plain `string` because the callers read field names off stored documents
33
+ * (`moderationClearedFields`) and off callable payloads, not off the typed union.
34
+ */
35
+ export declare function clearableTextFieldLabel(field: string): string;
16
36
  /** Human labels for the dead-letter replay ledgers (Ops Repairs dead-letter table). */
17
37
  export declare const DEAD_LETTER_COLLECTION_LABELS: Record<DeadLetterCollection, string>;
18
38
  /** Operator-settable report dispositions with their console copy. 'undetermined' is the
@@ -1 +1 @@
1
- {"version":3,"file":"admin-labels.d.ts","sourceRoot":"","sources":["../../src/constants/admin-labels.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAC5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,sEAAsE;AACtE,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAIxE,CAAC;AAEF,kEAAkE;AAClE,eAAO,MAAM,8BAA8B,EAAE,MAAM,CAAC,yBAAyB,CAAC,MAAM,CAAC,EAAE,MAAM,CAM5F,CAAC;AAEF;;;;uEAIuE;AACvE,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAM7D,CAAC;AAEF,uFAAuF;AACvF,eAAO,MAAM,6BAA6B,EAAE,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAc9E,CAAC;AAEF;4EAC4E;AAC5E,eAAO,MAAM,0BAA0B,EAAE,SAAS;IAChD,KAAK,EAAE,OAAO,CAAC,iBAAiB,EAAE,cAAc,CAAC,CAAC;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB,EAiBA,CAAC;AAEF,gGAAgG;AAChG,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;0BAI0B;AA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MAAM,CAc9E,CAAC;AAEF;4EAC4E;AAC5E,eAAO,MAAM,0BAA0B,EAAE,SAAS;IAChD,KAAK,EAAE,OAAO,CAAC,iBAAiB,EAAE,cAAc,CAAC,CAAC;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB,EAiBA,CAAC;AAEF,gGAAgG;AAChG,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;0BAI0B;AAC1B,eAAO,MAAM,0BAA0B,EAAE,SAAS,sBAAsB,EAW9D,CAAC;AAEX,2FAA2F;AAC3F,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAElF;AASD,eAAO,MAAM,kCAAkC,oBAAoB,CAAC;AACpE,eAAO,MAAM,+BAA+B,oBAAoB,CAAC"}
@@ -35,6 +35,33 @@ export const FEEDBACK_TYPE_LABELS = {
35
35
  tunesWorkGenreSuggestions: 'Tunes Genres',
36
36
  televisionWorkGenreSuggestions: 'Television Genres',
37
37
  };
38
+ /**
39
+ * Human labels for the raw clearable/changeable TEXT-FIELD names the moderation text-clear
40
+ * remedy and the published "Update details" change-request flow work in. The backend stores and
41
+ * validates the raw doc field names (`workingTitle`, `description`, `content`); these are the
42
+ * only display strings for them — rendered by the member-facing "text removed by moderation"
43
+ * banners, every admin clear-text field picker, the change-request dialog, and the admin
44
+ * change-request work view. Keyed by the derived ClearableTextFieldName union, so a new
45
+ * clearable field fails the build here until it has a label (ARCH-102).
46
+ *
47
+ * The `working*` pair belongs to the Work shell and the Realm doc; the labels stay the plain
48
+ * short terms (ARCH-107 — the code identifier carries `working`, the UI never shows it).
49
+ */
50
+ export const CLEARABLE_TEXT_FIELD_LABELS = {
51
+ workingTitle: 'Title',
52
+ workingDescription: 'Description',
53
+ title: 'Title',
54
+ description: 'Description',
55
+ content: 'Content',
56
+ };
57
+ /**
58
+ * The display label for one raw clearable text-field name, falling back to the raw name.
59
+ * Tolerates a plain `string` because the callers read field names off stored documents
60
+ * (`moderationClearedFields`) and off callable payloads, not off the typed union.
61
+ */
62
+ export function clearableTextFieldLabel(field) {
63
+ return CLEARABLE_TEXT_FIELD_LABELS[field] ?? field;
64
+ }
38
65
  /** Human labels for the dead-letter replay ledgers (Ops Repairs dead-letter table). */
39
66
  export const DEAD_LETTER_COLLECTION_LABELS = {
40
67
  chatSyncEvents: 'Chat sync event',
@@ -1 +1 @@
1
- {"version":3,"file":"admin-labels.js","sourceRoot":"","sources":["../../src/constants/admin-labels.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,8EAA8E;AAC9E,iFAAiF;AACjF,2EAA2E;AAC3E,6EAA6E;AAC7E,6DAA6D;AAC7D,EAAE;AACF,mFAAmF;AACnF,mFAAmF;AACnF,kDAAkD;AAClD,+EAA+E;AAQ/E,sEAAsE;AACtE,MAAM,CAAC,MAAM,0BAA0B,GAAsC;IAC3E,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;CACjB,CAAC;AAEF,kEAAkE;AAClE,MAAM,CAAC,MAAM,8BAA8B,GAAsD;IAC/F,cAAc,EAAE,kBAAkB;IAClC,WAAW,EAAE,sBAAsB;IACnC,YAAY,EAAE,6BAA6B;IAC3C,WAAW,EAAE,wBAAwB;IACrC,YAAY,EAAE,mBAAmB;CAClC,CAAC;AAEF;;;;uEAIuE;AACvE,MAAM,CAAC,MAAM,oBAAoB,GAAiC;IAChE,0BAA0B,EAAE,QAAQ;IACpC,wBAAwB,EAAE,YAAY;IACtC,yBAAyB,EAAE,cAAc;IACzC,yBAAyB,EAAE,cAAc;IACzC,8BAA8B,EAAE,mBAAmB;CACpD,CAAC;AAEF,uFAAuF;AACvF,MAAM,CAAC,MAAM,6BAA6B,GAAyC;IACjF,cAAc,EAAE,iBAAiB;IACjC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AAE,eAAe,EAAE,WAAW,EAAE,oDAAoD,EAAE;IACpH,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,uBAAuB,EAAE,WAAW,EAAE,wDAAwD,EAAE;IACrH,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,gCAAgC,EAAE,WAAW,EAAE,kEAAkE,EAAE;IACnJ,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,+DAA+D,EAAE;IAC3H,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,uEAAuE,EAAE;CACzH,CAAC;AAEX,2FAA2F;AAC3F,MAAM,UAAU,qBAAqB,CAAC,IAAwB;IAC5D,OAAO,0BAA0B,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,EAAE,KAAK,CAAC;AACxE,CAAC;AAED,qCAAqC;AACrC,2EAA2E;AAC3E,0FAA0F;AAC1F,0FAA0F;AAC1F,2FAA2F;AAC3F,0BAA0B;AAE1B,MAAM,CAAC,MAAM,kCAAkC,GAAG,iBAAiB,CAAC;AACpE,MAAM,CAAC,MAAM,+BAA+B,GAAG,iBAAiB,CAAC","sourcesContent":["// ============================================================================\n// ADMIN-SURFACE DISPLAY LABELS — the ONE home for business display copy keyed\n// by canonical ttt-core enums (ARCH-102, extended 2026-07-13). Consolidated from\n// the former component-local maps in ttt-prod (admin-user-management-view,\n// admin-announcements-view, guided-resolution-flow). Any client (web, phone,\n// TV, admin app) renders the same labels by importing these.\n//\n// A few entries here are copy for ADMIN-MANAGED content that a PUBLIC surface also\n// renders (the rules-page group titles at the bottom of this file). The organizing\n// principle is one declaration, not one consumer.\n// ============================================================================\n\nimport type { UserAccountStatus } from '../doc-schemas/user.js';\nimport type { FeedbackType } from './business-admin.js';\nimport type { ReportDisposition } from '../doc-schemas/safety/foundation.js';\nimport type { BroadcastAudienceSelector } from '../schemas/notification.js';\nimport type { DeadLetterCollection } from '../schemas/admin.js';\n\n/** Moderation status labels (user-management view, status badges). */\nexport const USER_ACCOUNT_STATUS_LABELS: Record<UserAccountStatus, string> = {\n active: 'Active',\n suspended: 'Suspended',\n banned: 'Banned',\n};\n\n/** Broadcast audience selector labels (announcement composer). */\nexport const BROADCAST_AUDIENCE_KIND_LABELS: Record<BroadcastAudienceSelector['kind'], string> = {\n allActiveUsers: 'All active users',\n allArtisans: 'All artisan creators',\n explicitUids: 'Specific users (paste uids)',\n workMembers: \"A Work's guild members\",\n realmMembers: \"A Realm's members\",\n};\n\n/** Human labels for the canonical feedback types — the admin feedback-suggestions views and\n * the user-facing feedback-submission surface render these instead of restating copy. Keyed\n * by FeedbackType, so a new FEEDBACK_TYPES member fails the build until its label exists.\n * UI copy uses the SHORT settled terms (Trade → \"Trades\", Craft → \"Craft Tags\", Genre →\n * \"<Kind> Genres\"), never the compound code identifiers (ARCH-107). */\nexport const FEEDBACK_TYPE_LABELS: Record<FeedbackType, string> = {\n tradeProfessionSuggestions: 'Trades',\n craftSkillTagSuggestions: 'Craft Tags',\n talesWorkGenreSuggestions: 'Tales Genres',\n tunesWorkGenreSuggestions: 'Tunes Genres',\n televisionWorkGenreSuggestions: 'Television Genres',\n};\n\n/** Human labels for the dead-letter replay ledgers (Ops Repairs dead-letter table). */\nexport const DEAD_LETTER_COLLECTION_LABELS: Record<DeadLetterCollection, string> = {\n chatSyncEvents: 'Chat sync event',\n chatAdminActionCommands: 'Chat moderation command',\n notificationDeliveries: 'Notification delivery',\n chatMessageOutbox: 'Chat message publish',\n squareAnnouncementJobs: 'Square announcement',\n chatSyncFanoutJobs: 'Chat access fanout',\n mediaAssets: 'Media authority sync',\n quarantineSagaJobs: 'Quarantine saga',\n nciiRemovalJobs: 'NCII removal',\n safetyEvidenceJobs: 'Safety evidence job',\n accountActionCommands: 'Account safety action',\n activeReportGroups: 'Report edge sync',\n hallSubItemEdgeSync: 'Hall sub-item edge sync',\n};\n\n/** Operator-settable report dispositions with their console copy. 'undetermined' is the\n * initial state, never a settable target, so it carries no option entry. */\nexport const REPORT_DISPOSITION_OPTIONS: readonly {\n value: Exclude<ReportDisposition, 'undetermined'>;\n label: string;\n description: string;\n}[] = [\n {\n value: 'reportRequired',\n label: 'Report required (NCMEC)',\n description:\n 'Apparent CSAM — a report is legally required. Establishes actual knowledge + arms the clock.',\n },\n {\n value: 'notRequired',\n label: 'No report required',\n description: 'No reporting obligation ever arose. Disallowed once there is a validated match.',\n },\n {\n value: 'correctedNoApparentViolation',\n label: 'False positive — correct it',\n description: 'There was a triggering signal but on review it is a false positive.',\n },\n];\n\n/** One user-facing reason option (shown to the affected user for any user-affecting action). */\nexport interface UserFacingReasonOption {\n code: string;\n label: string;\n description: string;\n}\n\n/** User-facing reason picklist for the guided case-resolution flow — the affected user sees the\n * label for any user-affecting action. Canonical home (ARCH-102): the codes ARE this list's own\n * enumeration, so every client (web, phone, TV, admin app) renders the same options + labels by\n * importing from here. Final user-/legal-facing wording is subject to lawyer review; these are\n * functional defaults. */\nexport const USER_FACING_REASON_OPTIONS: readonly UserFacingReasonOption[] = [\n { code: 'harassment', label: 'Harassment or bullying', description: 'Targeted abuse, threats, or sustained harassment of a person.' },\n { code: 'hate', label: 'Hate speech', description: 'Attacks on people based on a protected characteristic.' },\n { code: 'adult-content', label: 'Explicit / adult content', description: 'Sexual or graphic content not allowed on the platform.' },\n { code: 'violence', label: 'Violence or threats', description: 'Threats of violence, or content glorifying or inciting it.' },\n { code: 'spam', label: 'Spam or scam', description: 'Unsolicited bulk content, deceptive links, or fraud.' },\n { code: 'impersonation', label: 'Impersonation', description: 'Pretending to be another person, brand, or entity.' },\n { code: 'ip', label: 'Intellectual property', description: 'Use of someone else’s work without the right to do so.' },\n { code: 'nonconsensual', label: 'Nonconsensual intimate imagery', description: 'Intimate or sexual imagery shared without the subject’s consent.' },\n { code: 'safety', label: 'Safety violation', description: 'A serious safety violation handled under our safety policies.' },\n { code: 'other', label: 'Other (explain)', description: 'A policy violation not covered above — describe it in the detail box.' },\n] as const;\n\n/** The user-facing label for a reason code (undefined when the code is unknown/absent). */\nexport function userFacingReasonLabel(code: string | undefined): string | undefined {\n return USER_FACING_REASON_OPTIONS.find((o) => o.code === code)?.label;\n}\n\n// --- Rules-surface group titles ---\n// The two rule-GROUP headings for the platform rules content (`Rule.group`\n// 'workProjectType' / 'hallWingType' — see schemas/admin.ts). BOTH the admin rules editor\n// and the public rules page render these, so they are declared once here instead of being\n// restated as literals on each surface (ENG-002). Copy uses the short settled terms Work /\n// Hall / Wing (ARCH-107).\n\nexport const WORK_PROJECT_TYPE_RULE_GROUP_TITLE = 'Work Type Rules';\nexport const HALL_WING_TYPE_RULE_GROUP_TITLE = 'Hall Wing Rules';\n"]}
1
+ {"version":3,"file":"admin-labels.js","sourceRoot":"","sources":["../../src/constants/admin-labels.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,8EAA8E;AAC9E,iFAAiF;AACjF,2EAA2E;AAC3E,6EAA6E;AAC7E,6DAA6D;AAC7D,EAAE;AACF,mFAAmF;AACnF,mFAAmF;AACnF,kDAAkD;AAClD,+EAA+E;AAS/E,sEAAsE;AACtE,MAAM,CAAC,MAAM,0BAA0B,GAAsC;IAC3E,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;CACjB,CAAC;AAEF,kEAAkE;AAClE,MAAM,CAAC,MAAM,8BAA8B,GAAsD;IAC/F,cAAc,EAAE,kBAAkB;IAClC,WAAW,EAAE,sBAAsB;IACnC,YAAY,EAAE,6BAA6B;IAC3C,WAAW,EAAE,wBAAwB;IACrC,YAAY,EAAE,mBAAmB;CAClC,CAAC;AAEF;;;;uEAIuE;AACvE,MAAM,CAAC,MAAM,oBAAoB,GAAiC;IAChE,0BAA0B,EAAE,QAAQ;IACpC,wBAAwB,EAAE,YAAY;IACtC,yBAAyB,EAAE,cAAc;IACzC,yBAAyB,E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BAA+B,GAAG,iBAAiB,CAAC","sourcesContent":["// ============================================================================\n// ADMIN-SURFACE DISPLAY LABELS — the ONE home for business display copy keyed\n// by canonical ttt-core enums (ARCH-102, extended 2026-07-13). Consolidated from\n// the former component-local maps in ttt-prod (admin-user-management-view,\n// admin-announcements-view, guided-resolution-flow). Any client (web, phone,\n// TV, admin app) renders the same labels by importing these.\n//\n// A few entries here are copy for ADMIN-MANAGED content that a PUBLIC surface also\n// renders (the rules-page group titles at the bottom of this file). The organizing\n// principle is one declaration, not one consumer.\n// ============================================================================\n\nimport type { UserAccountStatus } from '../doc-schemas/user.js';\nimport type { FeedbackType } from './business-admin.js';\nimport type { ClearableTextFieldName } from './business-content.js';\nimport type { ReportDisposition } from '../doc-schemas/safety/foundation.js';\nimport type { BroadcastAudienceSelector } from '../schemas/notification.js';\nimport type { DeadLetterCollection } from '../schemas/admin.js';\n\n/** Moderation status labels (user-management view, status badges). */\nexport const USER_ACCOUNT_STATUS_LABELS: Record<UserAccountStatus, string> = {\n active: 'Active',\n suspended: 'Suspended',\n banned: 'Banned',\n};\n\n/** Broadcast audience selector labels (announcement composer). */\nexport const BROADCAST_AUDIENCE_KIND_LABELS: Record<BroadcastAudienceSelector['kind'], string> = {\n allActiveUsers: 'All active users',\n allArtisans: 'All artisan creators',\n explicitUids: 'Specific users (paste uids)',\n workMembers: \"A Work's guild members\",\n realmMembers: \"A Realm's members\",\n};\n\n/** Human labels for the canonical feedback types — the admin feedback-suggestions views and\n * the user-facing feedback-submission surface render these instead of restating copy. Keyed\n * by FeedbackType, so a new FEEDBACK_TYPES member fails the build until its label exists.\n * UI copy uses the SHORT settled terms (Trade → \"Trades\", Craft → \"Craft Tags\", Genre →\n * \"<Kind> Genres\"), never the compound code identifiers (ARCH-107). */\nexport const FEEDBACK_TYPE_LABELS: Record<FeedbackType, string> = {\n tradeProfessionSuggestions: 'Trades',\n craftSkillTagSuggestions: 'Craft Tags',\n talesWorkGenreSuggestions: 'Tales Genres',\n tunesWorkGenreSuggestions: 'Tunes Genres',\n televisionWorkGenreSuggestions: 'Television Genres',\n};\n\n/**\n * Human labels for the raw clearable/changeable TEXT-FIELD names the moderation text-clear\n * remedy and the published \"Update details\" change-request flow work in. The backend stores and\n * validates the raw doc field names (`workingTitle`, `description`, `content`); these are the\n * only display strings for them — rendered by the member-facing \"text removed by moderation\"\n * banners, every admin clear-text field picker, the change-request dialog, and the admin\n * change-request work view. Keyed by the derived ClearableTextFieldName union, so a new\n * clearable field fails the build here until it has a label (ARCH-102).\n *\n * The `working*` pair belongs to the Work shell and the Realm doc; the labels stay the plain\n * short terms (ARCH-107 — the code identifier carries `working`, the UI never shows it).\n */\nexport const CLEARABLE_TEXT_FIELD_LABELS: Record<ClearableTextFieldName, string> = {\n workingTitle: 'Title',\n workingDescription: 'Description',\n title: 'Title',\n description: 'Description',\n content: 'Content',\n};\n\n/**\n * The display label for one raw clearable text-field name, falling back to the raw name.\n * Tolerates a plain `string` because the callers read field names off stored documents\n * (`moderationClearedFields`) and off callable payloads, not off the typed union.\n */\nexport function clearableTextFieldLabel(field: string): string {\n return (CLEARABLE_TEXT_FIELD_LABELS as Record<string, string>)[field] ?? field;\n}\n\n/** Human labels for the dead-letter replay ledgers (Ops Repairs dead-letter table). */\nexport const DEAD_LETTER_COLLECTION_LABELS: Record<DeadLetterCollection, string> = {\n chatSyncEvents: 'Chat sync event',\n chatAdminActionCommands: 'Chat moderation command',\n notificationDeliveries: 'Notification delivery',\n chatMessageOutbox: 'Chat message publish',\n squareAnnouncementJobs: 'Square announcement',\n chatSyncFanoutJobs: 'Chat access fanout',\n mediaAssets: 'Media authority sync',\n quarantineSagaJobs: 'Quarantine saga',\n nciiRemovalJobs: 'NCII removal',\n safetyEvidenceJobs: 'Safety evidence job',\n accountActionCommands: 'Account safety action',\n activeReportGroups: 'Report edge sync',\n hallSubItemEdgeSync: 'Hall sub-item edge sync',\n};\n\n/** Operator-settable report dispositions with their console copy. 'undetermined' is the\n * initial state, never a settable target, so it carries no option entry. */\nexport const REPORT_DISPOSITION_OPTIONS: readonly {\n value: Exclude<ReportDisposition, 'undetermined'>;\n label: string;\n description: string;\n}[] = [\n {\n value: 'reportRequired',\n label: 'Report required (NCMEC)',\n description:\n 'Apparent CSAM — a report is legally required. Establishes actual knowledge + arms the clock.',\n },\n {\n value: 'notRequired',\n label: 'No report required',\n description: 'No reporting obligation ever arose. Disallowed once there is a validated match.',\n },\n {\n value: 'correctedNoApparentViolation',\n label: 'False positive — correct it',\n description: 'There was a triggering signal but on review it is a false positive.',\n },\n];\n\n/** One user-facing reason option (shown to the affected user for any user-affecting action). */\nexport interface UserFacingReasonOption {\n code: string;\n label: string;\n description: string;\n}\n\n/** User-facing reason picklist for the guided case-resolution flow — the affected user sees the\n * label for any user-affecting action. Canonical home (ARCH-102): the codes ARE this list's own\n * enumeration, so every client (web, phone, TV, admin app) renders the same options + labels by\n * importing from here. Final user-/legal-facing wording is subject to lawyer review; these are\n * functional defaults. */\nexport const USER_FACING_REASON_OPTIONS: readonly UserFacingReasonOption[] = [\n { code: 'harassment', label: 'Harassment or bullying', description: 'Targeted abuse, threats, or sustained harassment of a person.' },\n { code: 'hate', label: 'Hate speech', description: 'Attacks on people based on a protected characteristic.' },\n { code: 'adult-content', label: 'Explicit / adult content', description: 'Sexual or graphic content not allowed on the platform.' },\n { code: 'violence', label: 'Violence or threats', description: 'Threats of violence, or content glorifying or inciting it.' },\n { code: 'spam', label: 'Spam or scam', description: 'Unsolicited bulk content, deceptive links, or fraud.' },\n { code: 'impersonation', label: 'Impersonation', description: 'Pretending to be another person, brand, or entity.' },\n { code: 'ip', label: 'Intellectual property', description: 'Use of someone else’s work without the right to do so.' },\n { code: 'nonconsensual', label: 'Nonconsensual intimate imagery', description: 'Intimate or sexual imagery shared without the subject’s consent.' },\n { code: 'safety', label: 'Safety violation', description: 'A serious safety violation handled under our safety policies.' },\n { code: 'other', label: 'Other (explain)', description: 'A policy violation not covered above — describe it in the detail box.' },\n] as const;\n\n/** The user-facing label for a reason code (undefined when the code is unknown/absent). */\nexport function userFacingReasonLabel(code: string | undefined): string | undefined {\n return USER_FACING_REASON_OPTIONS.find((o) => o.code === code)?.label;\n}\n\n// --- Rules-surface group titles ---\n// The two rule-GROUP headings for the platform rules content (`Rule.group`\n// 'workProjectType' / 'hallWingType' — see schemas/admin.ts). BOTH the admin rules editor\n// and the public rules page render these, so they are declared once here instead of being\n// restated as literals on each surface (ENG-002). Copy uses the short settled terms Work /\n// Hall / Wing (ARCH-107).\n\nexport const WORK_PROJECT_TYPE_RULE_GROUP_TITLE = 'Work Type Rules';\nexport const HALL_WING_TYPE_RULE_GROUP_TITLE = 'Hall Wing Rules';\n"]}
@@ -43,6 +43,13 @@ export declare const MODERATION_CLEARABLE_TEXT_FIELDS: {
43
43
  };
44
44
  /** A surface whose text fields the moderation clear remedy can neutralize. */
45
45
  export type ModerationClearableSurface = keyof typeof MODERATION_CLEARABLE_TEXT_FIELDS;
46
+ /**
47
+ * Every DISTINCT clearable/changeable text-field NAME, DERIVED from the canonical
48
+ * MODERATION_CLEARABLE_TEXT_FIELDS map (the union of every surface's tuple). Label maps and
49
+ * per-field cap maps key on this instead of `string`, so adding a field to a surface is a
50
+ * compile error until its label and cap exist.
51
+ */
52
+ export type ClearableTextFieldName = (typeof MODERATION_CLEARABLE_TEXT_FIELDS)[ModerationClearableSurface][number];
46
53
  /**
47
54
  * The DISTINCT clearable text-field NAMES across the whole hall content family (tale/tune/
48
55
  * television detail → title/description; chapter → title/content; track/episode →
@@ -74,7 +81,9 @@ export declare const HALL_CONTENT_TEXT_FIELDS: {
74
81
  /** Per-field max lengths for proposed hall-content text. DERIVED from the owning
75
82
  * constants — never independent numbers — so the change-request pipeline can never
76
83
  * drift from the authoring limits again (the pre-2026-07-13 copy carried its own
77
- * 200/5000/100000 set while authoring enforced 150/300/2500). */
84
+ * 200/5000/100000 set while authoring enforced 150/300/2500). Keyed on the derived
85
+ * ClearableTextFieldName union, so a new clearable field fails the build here until
86
+ * it has a cap. */
78
87
  export declare const HALL_CONTENT_TEXT_FIELD_MAX: {
79
88
  readonly title: 150;
80
89
  readonly description: 1000;
@@ -82,6 +91,53 @@ export declare const HALL_CONTENT_TEXT_FIELD_MAX: {
82
91
  readonly workingTitle: 150;
83
92
  readonly workingDescription: 1000;
84
93
  };
94
+ /** One work-project type's two hall text surfaces — the published DETAIL on the hall parent
95
+ * and its chapter/track/episode SUB-ITEM — each with the clearable/changeable field tuple
96
+ * that surface exposes. */
97
+ export interface HallContentSurfaceRouting {
98
+ /** Surface identity of the hall parent DETAIL (tale / tune / television). */
99
+ detailSurface: ModerationClearableSurface;
100
+ /** The DETAIL surface's clearable text fields. */
101
+ detailFields: readonly ClearableTextFieldName[];
102
+ /** Surface identity of the SUB-ITEM (chapter / tuneTrack / televisionEpisode). */
103
+ subItemSurface: ModerationClearableSurface;
104
+ /** The SUB-ITEM surface's clearable text fields — a Tale chapter carries title/content, a
105
+ * Tune track and a Television episode title/description. */
106
+ subItemFields: readonly ClearableTextFieldName[];
107
+ }
108
+ /**
109
+ * CANONICAL WorkProjectType → hall text-surface routing. The ONE owner of "a Tale's sub-item is
110
+ * a chapter, a Tune's is a tuneTrack, a Television's is a televisionEpisode" and of which fields
111
+ * each of those surfaces exposes. Cross-boundary: the backend text-clear and change-request
112
+ * runners resolve `surface` from (workProjectType, is-sub-item?) through this map, and the admin
113
+ * field pickers project their checkbox options from the same entry — three sites that each
114
+ * hand-rolled the routing before (a ternary that fell through to the tuneTrack tuple for
115
+ * Television, silently correct only because the two tuples happen to match today).
116
+ *
117
+ * Every field tuple is PROJECTED from MODERATION_CLEARABLE_TEXT_FIELDS above — no field literal
118
+ * is restated here — and the `satisfies Record<WorkProjectType, …>` makes adding a work-project
119
+ * type a compile error until its surfaces are routed.
120
+ */
121
+ export declare const HALL_CONTENT_SURFACES_BY_WORK_TYPE: {
122
+ readonly Tales: {
123
+ readonly detailSurface: "tale";
124
+ readonly detailFields: readonly ["title", "description"];
125
+ readonly subItemSurface: "chapter";
126
+ readonly subItemFields: readonly ["title", "content"];
127
+ };
128
+ readonly Tunes: {
129
+ readonly detailSurface: "tune";
130
+ readonly detailFields: readonly ["title", "description"];
131
+ readonly subItemSurface: "tuneTrack";
132
+ readonly subItemFields: readonly ["title", "description"];
133
+ };
134
+ readonly Television: {
135
+ readonly detailSurface: "television";
136
+ readonly detailFields: readonly ["title", "description"];
137
+ readonly subItemSurface: "televisionEpisode";
138
+ readonly subItemFields: readonly ["title", "description"];
139
+ };
140
+ };
85
141
  /** Admin decision reason on a published change request (required on a deny; shown to
86
142
  * the member). One owner for the review callable schema AND the admin work-view input. */
87
143
  export declare const MAX_HALL_CHANGE_REQUEST_REASON_LENGTH = 2000;
@@ -1 +1 @@
1
- {"version":3,"file":"business-content.d.ts","sourceRoot":"","sources":["../../src/constants/business-content.ts"],"names":[],"mappings":"AAWA,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;;;;;;;;GAQG;AACH,eAAO,MAAM,+BAA+B,8CAIlC,CAAC;AAEX;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;CASiB,CAAC;A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AAC9C,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAE9C,kDAAkD;AAClD,eAAO,MAAM,+BAA+B,OAAO,CAAC;AAEpD;;;;;GAKG;AACH,eAAO,MAAM,iCAAiC,SAAU,CAAC;AAIzD,+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"}
@@ -86,7 +86,9 @@ export const HALL_CONTENT_TEXT_FIELDS = {
86
86
  /** Per-field max lengths for proposed hall-content text. DERIVED from the owning
87
87
  * constants — never independent numbers — so the change-request pipeline can never
88
88
  * drift from the authoring limits again (the pre-2026-07-13 copy carried its own
89
- * 200/5000/100000 set while authoring enforced 150/300/2500). */
89
+ * 200/5000/100000 set while authoring enforced 150/300/2500). Keyed on the derived
90
+ * ClearableTextFieldName union, so a new clearable field fails the build here until
91
+ * it has a cap. */
90
92
  export const HALL_CONTENT_TEXT_FIELD_MAX = {
91
93
  title: MAX_WORK_PROJECT_TITLE_LENGTH,
92
94
  description: MAX_WORK_PROJECT_DESCRIPTION_LENGTH,
@@ -94,6 +96,39 @@ export const HALL_CONTENT_TEXT_FIELD_MAX = {
94
96
  workingTitle: MAX_WORK_REALM_TITLE_LENGTH,
95
97
  workingDescription: MAX_WORK_REALM_DESCRIPTION_LENGTH,
96
98
  };
99
+ /**
100
+ * CANONICAL WorkProjectType → hall text-surface routing. The ONE owner of "a Tale's sub-item is
101
+ * a chapter, a Tune's is a tuneTrack, a Television's is a televisionEpisode" and of which fields
102
+ * each of those surfaces exposes. Cross-boundary: the backend text-clear and change-request
103
+ * runners resolve `surface` from (workProjectType, is-sub-item?) through this map, and the admin
104
+ * field pickers project their checkbox options from the same entry — three sites that each
105
+ * hand-rolled the routing before (a ternary that fell through to the tuneTrack tuple for
106
+ * Television, silently correct only because the two tuples happen to match today).
107
+ *
108
+ * Every field tuple is PROJECTED from MODERATION_CLEARABLE_TEXT_FIELDS above — no field literal
109
+ * is restated here — and the `satisfies Record<WorkProjectType, …>` makes adding a work-project
110
+ * type a compile error until its surfaces are routed.
111
+ */
112
+ export const HALL_CONTENT_SURFACES_BY_WORK_TYPE = {
113
+ Tales: {
114
+ detailSurface: 'tale',
115
+ detailFields: MODERATION_CLEARABLE_TEXT_FIELDS.tale,
116
+ subItemSurface: 'chapter',
117
+ subItemFields: MODERATION_CLEARABLE_TEXT_FIELDS.chapter,
118
+ },
119
+ Tunes: {
120
+ detailSurface: 'tune',
121
+ detailFields: MODERATION_CLEARABLE_TEXT_FIELDS.tune,
122
+ subItemSurface: 'tuneTrack',
123
+ subItemFields: MODERATION_CLEARABLE_TEXT_FIELDS.tuneTrack,
124
+ },
125
+ Television: {
126
+ detailSurface: 'television',
127
+ detailFields: MODERATION_CLEARABLE_TEXT_FIELDS.television,
128
+ subItemSurface: 'televisionEpisode',
129
+ subItemFields: MODERATION_CLEARABLE_TEXT_FIELDS.televisionEpisode,
130
+ },
131
+ };
97
132
  /** Admin decision reason on a published change request (required on a deny; shown to
98
133
  * the member). One owner for the review callable schema AND the admin work-view input. */
99
134
  export const MAX_HALL_CHANGE_REQUEST_REASON_LENGTH = 2000;
@@ -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;AAE9C,gGAAgG;AAChG,MAAM,CAAC,MAAM,qCAAqC,GAAG,GAAG,CAAC;AAEzD,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C;AAC9C,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC;AAE9C,kDAAkD;AAClD,MAAM,CAAC,MAAM,+BAA+B,GAAG,IAAI,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,OAAO,CAAC;AAEzD,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';\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 * 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). */\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<string, number>;\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// --- 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":"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7C,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 type { WorkProjectType } from '../types/content.js';\n\n/** The maximum character length for a SquareStreetz post created on behalf of a workProject. */\nexport const MAX_SQUARE_STREETZ_DESCRIPTION_LENGTH = 150;\n\n// --- Commission Board & Proposals ---\n\n/** Maximum number of open commissions a workProject can have. Mode-varied. */\nexport const MAX_COMMISSION_LISTINGS = ACTIVE_LIMITS.workProject.maxCommissionListings;\n\n/** Maximum number of proposal artisans saved to a commission. */\nexport const MAX_SAVED_PROPOSAL_ARTISANS = 5;\n\n/** Maximum length for a commission title. */\nexport const MAX_COMMISSION_TITLE_LENGTH = MAX_WORK_PROJECT_TITLE_LENGTH;\n\n/** Maximum length for a commission description / cover letter. */\nexport const MAX_COMMISSION_DESCRIPTION_LENGTH = 400;\n\n// --- Moderation text-clear + published hall-content text fields ---\n\n/**\n * Neutral placeholder written into a single cleared text field by the moderation\n * text-clear remedy. Canonical wording — the backend `runModerationClearText`\n * core writes exactly this string; a wording change is a single edit here.\n */\nexport const MODERATION_CLEAR_PLACEHOLDER =\n 'Removed by moderation — awaiting an update by the steward.';\n\n/**\n * Default REASON strings recorded on a moderation action when the admin supplies no\n * user-facing reason. Distinct from MODERATION_CLEAR_PLACEHOLDER (which is written INTO\n * cleared content fields) — these are the recorded justification text. Canonical wording;\n * consumers (resolveAdminTask's forceRetitle / chat-delete actions) never inline them.\n */\nexport const MODERATION_DEFAULT_REMOVAL_REASON = 'Removed by moderation.';\nexport const MODERATION_DEFAULT_RETITLE_REASON = 'Title/description removed by moderation.';\n\n/**\n * CANONICAL clearable text-field map for the per-field moderation TEXT-CLEAR remedy.\n * Cross-boundary single owner: the admin field-picker offers this set per surface and\n * the backend clear runner validates + normalizes caller-supplied fields against it.\n * Keys are surfaces; values are the exact document field names (NOT display labels)\n * recorded verbatim in `moderationClearedFields`. Covers every clearable surface —\n * workProject/workRealm shell metadata, hall parent details (tale/tune/television),\n * and hall sub-items (chapter/track/episode).\n */\nexport const MODERATION_CLEARABLE_TEXT_FIELDS = {\n // workProject + workRealm shell metadata\n workProject: ['workingTitle', 'workingDescription'],\n workRealm: ['workingTitle', 'workingDescription'],\n // hall content parent details\n tale: ['title', 'description'],\n tune: ['title', 'description'],\n television: ['title', 'description'],\n // hall content sub-items\n chapter: ['title', 'content'],\n tuneTrack: ['title', 'description'],\n televisionEpisode: ['title', 'description'],\n} as const satisfies Record<string, readonly string[]>;\n\n/** A surface whose text fields the moderation clear remedy can neutralize. */\nexport type ModerationClearableSurface = keyof typeof MODERATION_CLEARABLE_TEXT_FIELDS;\n\n/**\n * Every DISTINCT clearable/changeable text-field NAME, DERIVED from the canonical\n * MODERATION_CLEARABLE_TEXT_FIELDS map (the union of every surface's tuple). Label maps and\n * per-field cap maps key on this instead of `string`, so adding a field to a surface is a\n * compile error until its label and cap exist.\n */\nexport type ClearableTextFieldName =\n (typeof MODERATION_CLEARABLE_TEXT_FIELDS)[ModerationClearableSurface][number];\n\n/**\n * The DISTINCT clearable text-field NAMES across the whole hall content family (tale/tune/\n * television detail → title/description; chapter → title/content; track/episode →\n * title/description). DERIVED from the canonical MODERATION_CLEARABLE_TEXT_FIELDS map — the\n * union of every hall surface's fields — so the `clearHallContentText` callable's field-enum\n * (`HallClearFieldSchema`) never restates the `title`/`description`/`content` literals. Index\n * access on the map's readonly tuples preserves the literal types, so this stays a typed\n * `readonly ['title','description','content']` a `z.enum(...)` can consume directly.\n */\nexport const HALL_CLEARABLE_TEXT_FIELD_NAMES = [\n MODERATION_CLEARABLE_TEXT_FIELDS.tale[0], // title\n MODERATION_CLEARABLE_TEXT_FIELDS.tale[1], // description\n MODERATION_CLEARABLE_TEXT_FIELDS.chapter[1], // content\n] as const;\n\n/**\n * The raw doc field names each published hall-content surface exposes as changeable TEXT.\n * Cross-boundary: the member \"Update details\" field picker offers this set per surface and\n * the change-request submit runner validates against it. Detail surfaces (tale/tune/\n * television) live on the hall parent doc; sub-item surfaces on the published chapter/\n * track/episode doc. This is the HALL-SURFACE SUBSET of the canonical\n * MODERATION_CLEARABLE_TEXT_FIELDS above (it excludes the `workProject` shell) — every\n * tuple is projected from that one owner, so the two can never drift.\n */\nexport const HALL_CONTENT_TEXT_FIELDS = {\n tale: MODERATION_CLEARABLE_TEXT_FIELDS.tale,\n tune: MODERATION_CLEARABLE_TEXT_FIELDS.tune,\n television: MODERATION_CLEARABLE_TEXT_FIELDS.television,\n chapter: MODERATION_CLEARABLE_TEXT_FIELDS.chapter,\n tuneTrack: MODERATION_CLEARABLE_TEXT_FIELDS.tuneTrack,\n televisionEpisode: MODERATION_CLEARABLE_TEXT_FIELDS.televisionEpisode,\n // Realm grain (R1, 2026-07-12): targets the `workRealms/{id}` doc directly.\n workRealm: MODERATION_CLEARABLE_TEXT_FIELDS.workRealm,\n} as const satisfies Record<string, readonly string[]>;\n\n/** Per-field max lengths for proposed hall-content text. DERIVED from the owning\n * constants — never independent numbers — so the change-request pipeline can never\n * drift from the authoring limits again (the pre-2026-07-13 copy carried its own\n * 200/5000/100000 set while authoring enforced 150/300/2500). Keyed on the derived\n * ClearableTextFieldName union, so a new clearable field fails the build here until\n * it has a cap. */\nexport const HALL_CONTENT_TEXT_FIELD_MAX = {\n title: MAX_WORK_PROJECT_TITLE_LENGTH,\n description: MAX_WORK_PROJECT_DESCRIPTION_LENGTH,\n content: MAX_CHAPTER_CONTENT_LENGTH,\n workingTitle: MAX_WORK_REALM_TITLE_LENGTH,\n workingDescription: MAX_WORK_REALM_DESCRIPTION_LENGTH,\n} as const satisfies Record<ClearableTextFieldName, number>;\n\n/** One work-project type's two hall text surfaces — the published DETAIL on the hall parent\n * and its chapter/track/episode SUB-ITEM — each with the clearable/changeable field tuple\n * that surface exposes. */\nexport interface HallContentSurfaceRouting {\n /** Surface identity of the hall parent DETAIL (tale / tune / television). */\n detailSurface: ModerationClearableSurface;\n /** The DETAIL surface's clearable text fields. */\n detailFields: readonly ClearableTextFieldName[];\n /** Surface identity of the SUB-ITEM (chapter / tuneTrack / televisionEpisode). */\n subItemSurface: ModerationClearableSurface;\n /** The SUB-ITEM surface's clearable text fields — a Tale chapter carries title/content, a\n * Tune track and a Television episode title/description. */\n subItemFields: readonly ClearableTextFieldName[];\n}\n\n/**\n * CANONICAL WorkProjectType → hall text-surface routing. The ONE owner of \"a Tale's sub-item is\n * a chapter, a Tune's is a tuneTrack, a Television's is a televisionEpisode\" and of which fields\n * each of those surfaces exposes. Cross-boundary: the backend text-clear and change-request\n * runners resolve `surface` from (workProjectType, is-sub-item?) through this map, and the admin\n * field pickers project their checkbox options from the same entry — three sites that each\n * hand-rolled the routing before (a ternary that fell through to the tuneTrack tuple for\n * Television, silently correct only because the two tuples happen to match today).\n *\n * Every field tuple is PROJECTED from MODERATION_CLEARABLE_TEXT_FIELDS above — no field literal\n * is restated here — and the `satisfies Record<WorkProjectType, …>` makes adding a work-project\n * type a compile error until its surfaces are routed.\n */\nexport const HALL_CONTENT_SURFACES_BY_WORK_TYPE = {\n Tales: {\n detailSurface: 'tale',\n detailFields: MODERATION_CLEARABLE_TEXT_FIELDS.tale,\n subItemSurface: 'chapter',\n subItemFields: MODERATION_CLEARABLE_TEXT_FIELDS.chapter,\n },\n Tunes: {\n detailSurface: 'tune',\n detailFields: MODERATION_CLEARABLE_TEXT_FIELDS.tune,\n subItemSurface: 'tuneTrack',\n subItemFields: MODERATION_CLEARABLE_TEXT_FIELDS.tuneTrack,\n },\n Television: {\n detailSurface: 'television',\n detailFields: MODERATION_CLEARABLE_TEXT_FIELDS.television,\n subItemSurface: 'televisionEpisode',\n subItemFields: MODERATION_CLEARABLE_TEXT_FIELDS.televisionEpisode,\n },\n} as const satisfies Record<WorkProjectType, HallContentSurfaceRouting>;\n\n/** 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// --- 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"]}
@@ -61,7 +61,9 @@ export declare const AUDITION_TYPE_FILTER_ALL = "All";
61
61
  /** Audition-board type-filter state: one canonical audition type, or the ALL sentinel.
62
62
  * Filter state derives this instead of being typed `string`. */
63
63
  export type AuditionTypeFilter = AuditionType | typeof AUDITION_TYPE_FILTER_ALL;
64
- /** Sort options shown on the audition feeds, keyed by feed type. */
64
+ /** Sort options shown on the audition feeds, keyed by feed type. `default` serves the board's
65
+ * ALL filter; `platformAudition` is the base pair on purpose — the by-type lookup must be total
66
+ * over AuditionType (see the `AUDITION_SORT_OPTIONS[filter]` call sites). */
65
67
  export declare const AUDITION_SORT_OPTIONS: {
66
68
  readonly default: {
67
69
  readonly newest: {
@@ -88,16 +90,6 @@ export declare const AUDITION_SORT_OPTIONS: {
88
90
  };
89
91
  };
90
92
  readonly sponsoredAudition: {
91
- readonly newest: {
92
- readonly label: "Newest First";
93
- readonly field: "createdOn";
94
- readonly direction: "desc";
95
- };
96
- readonly endingSoon: {
97
- readonly label: "Ending Soon";
98
- readonly field: "openTill";
99
- readonly direction: "asc";
100
- };
101
93
  readonly highestPrice: {
102
94
  readonly label: "Highest Price";
103
95
  readonly field: "sponsoredAuditionAmountUSD";
@@ -108,8 +100,6 @@ export declare const AUDITION_SORT_OPTIONS: {
108
100
  readonly field: "sponsoredAuditionAmountUSD";
109
101
  readonly direction: "asc";
110
102
  };
111
- };
112
- readonly workAudition: {
113
103
  readonly newest: {
114
104
  readonly label: "Newest First";
115
105
  readonly field: "createdOn";
@@ -120,6 +110,8 @@ export declare const AUDITION_SORT_OPTIONS: {
120
110
  readonly field: "openTill";
121
111
  readonly direction: "asc";
122
112
  };
113
+ };
114
+ readonly workAudition: {
123
115
  readonly highestStakeShares: {
124
116
  readonly label: "Highest Stakes";
125
117
  readonly field: "stakeSharesOffered";
@@ -130,6 +122,16 @@ export declare const AUDITION_SORT_OPTIONS: {
130
122
  readonly field: "stakeSharesOffered";
131
123
  readonly direction: "asc";
132
124
  };
125
+ readonly newest: {
126
+ readonly label: "Newest First";
127
+ readonly field: "createdOn";
128
+ readonly direction: "desc";
129
+ };
130
+ readonly endingSoon: {
131
+ readonly label: "Ending Soon";
132
+ readonly field: "openTill";
133
+ readonly direction: "asc";
134
+ };
133
135
  };
134
136
  };
135
137
  /** Every sort key any audition feed offers, DERIVED from AUDITION_SORT_OPTIONS above — a new
@@ -1 +1 @@
1
- {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/constants/options.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAQ5D;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,4TAyB3B,CAAC;AAEX;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,2bA8B1B,CAAC;AAEX,4FAA4F;AAC5F,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvE,8CAA8C;AAC9C,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E;gFACgF;AAChF,eAAO,MAAM,uBAAuB,EAA0C,CAC5E,iBAAiB,EACjB,GAAG,iBAAiB,EAAE,CACvB,CAAC;AAEF;oFACoF;AACpF,eAAO,MAAM,sBAAsB,EAAyC,CAC1E,eAAe,EACf,GAAG,eAAe,EAAE,CACrB,CAAC;AAEF,sFAAsF;AACtF,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAyB3F,CAAC;AAIF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B;;;;CAiD/B,CAAC;AAIX,mEAAmE;AACnE,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,YAAY,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA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BAAkB,GAAG,YAAY,GAAG,OAAO,wBAAwB,CAAC;AAchF;;6EAE6E;AAC7E,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAaxB,CAAC;AAEX;wFACwF;AACxF,MAAM,MAAM,eAAe,GAAG;KAC3B,CAAC,IAAI,MAAM,OAAO,qBAAqB,GAAG,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAC,CAAC,CAAC;CACnF,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC;AAEtC,oFAAoF;AACpF,eAAO,MAAM,qBAAqB,EAAE,eAA0B,CAAC;AAE/D,kDAAkD;AAClD,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAC5C,MAAM,EACN;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,KAAK,GAAG,MAAM,CAAA;CAAE,CAK5D,CAAC"}
@@ -216,25 +216,28 @@ export const AUDITION_TYPES = {
216
216
  * previously hand-rolled app-locally). It doubles as the chip's own display label. */
217
217
  export const AUDITION_TYPE_FILTER_ALL = 'All';
218
218
  // --- Sort Options ---
219
- /** Sort options shown on the audition feeds, keyed by feed type. */
219
+ /**
220
+ * The two sort options EVERY audition feed offers — declared ONCE and spread into each feed's
221
+ * option set below (ENG-002). They used to be restated verbatim in all four feed entries, so
222
+ * a label or field change had to be made four times to avoid drift.
223
+ */
224
+ const AUDITION_SORT_OPTIONS_BASE = {
225
+ newest: { label: 'Newest First', field: 'createdOn', direction: 'desc' },
226
+ endingSoon: { label: 'Ending Soon', field: 'openTill', direction: 'asc' },
227
+ };
228
+ /** Sort options shown on the audition feeds, keyed by feed type. `default` serves the board's
229
+ * ALL filter; `platformAudition` is the base pair on purpose — the by-type lookup must be total
230
+ * over AuditionType (see the `AUDITION_SORT_OPTIONS[filter]` call sites). */
220
231
  export const AUDITION_SORT_OPTIONS = {
221
- default: {
222
- newest: { label: 'Newest First', field: 'createdOn', direction: 'desc' },
223
- endingSoon: { label: 'Ending Soon', field: 'openTill', direction: 'asc' },
224
- },
225
- platformAudition: {
226
- newest: { label: 'Newest First', field: 'createdOn', direction: 'desc' },
227
- endingSoon: { label: 'Ending Soon', field: 'openTill', direction: 'asc' },
228
- },
232
+ default: { ...AUDITION_SORT_OPTIONS_BASE },
233
+ platformAudition: { ...AUDITION_SORT_OPTIONS_BASE },
229
234
  sponsoredAudition: {
230
- newest: { label: 'Newest First', field: 'createdOn', direction: 'desc' },
231
- endingSoon: { label: 'Ending Soon', field: 'openTill', direction: 'asc' },
235
+ ...AUDITION_SORT_OPTIONS_BASE,
232
236
  highestPrice: { label: 'Highest Price', field: 'sponsoredAuditionAmountUSD', direction: 'desc' },
233
237
  lowestPrice: { label: 'Lowest Price', field: 'sponsoredAuditionAmountUSD', direction: 'asc' },
234
238
  },
235
239
  workAudition: {
236
- newest: { label: 'Newest First', field: 'createdOn', direction: 'desc' },
237
- endingSoon: { label: 'Ending Soon', field: 'openTill', direction: 'asc' },
240
+ ...AUDITION_SORT_OPTIONS_BASE,
238
241
  highestStakeShares: { label: 'Highest Stakes', field: 'stakeSharesOffered', direction: 'desc' },
239
242
  lowestStakeShares: { label: 'Lowest Stakes', field: 'stakeSharesOffered', direction: 'asc' },
240
243
  },
@@ -1 +1 @@
1
- {"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/constants/options.ts"],"names":[],"mappings":"AAAA,qEAAqE;AAKrE,sCAAsC;AACtC,yFAAyF;AACzF,+FAA+F;AAE/F,gCAAgC;AAEhC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,cAAc;IACd,OAAO;IACP,aAAa;IACb,QAAQ;IACR,UAAU;IACV,wBAAwB;IACxB,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,UAAU;IACV,kBAAkB;IAClB,iBAAiB;IACjB,cAAc;IACd,UAAU;IACV,Q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AK,EAAE;QACzE,YAAY,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,4BAA4B,EAAE,SAAS,EAAE,MAAM,EAAE;QAChG,WAAW,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,4BAA4B,EAAE,SAAS,EAAE,KAAK,EAAE;KAC9F;IACD,YAAY,EAAE;QACZ,MAAM,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE;QACxE,UAAU,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE;QACzE,kBAAkB,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,EAAE;QAC/F,iBAAiB,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,KAAK,EAAE;KAC7F;CACO,CAAC;AAQX,oFAAoF;AACpF,MAAM,CAAC,MAAM,qBAAqB,GAAoB,QAAQ,CAAC;AAE/D,kDAAkD;AAClD,MAAM,CAAC,MAAM,yBAAyB,GAGlC;IACF,MAAM,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE;IACxE,MAAM,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE;IACvE,aAAa,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,EAAE;CACrF,CAAC","sourcesContent":["// UI option lists shared between frontend and backend admin tooling.\n\nimport type { HallWingType, WorkProjectType } from '../types/content.js';\nimport type { AuditionType } from '../types/commissions.js';\n\n// --- WorkProject Guild Standings ---\n// WorkProject guild-standing IDs, labels, and assignment policy live in ../permissions/.\n// Keep guild-standing picker UIs backed by GUILD_STANDINGS instead of a duplicated option map.\n\n// --- Trade & Craft Options ---\n\n/**\n * Trade professions (20) — role-shaped labels used for guild roles, commission\n * requests, and file-folder permission keys. Display strings are stored/validated\n * directly (they double as the enum values in the callable input schemas that derive\n * from this constant). Kept in curated order; not alphabetized.\n */\nexport const TRADE_PROFESSION_OPTIONS = [\n // Performance\n 'Actor',\n 'Voice Actor',\n 'Singer',\n 'Musician',\n 'Dancer & Choreographer',\n // Story\n 'Writer',\n 'Editor',\n 'Director',\n 'Producer',\n // Camera & visual\n 'Cinematographer',\n 'Photographer',\n 'Animator',\n 'Artist',\n 'Graphic Designer',\n 'VFX Artist',\n 'Costume & Makeup Artist',\n 'Set & Prop Designer',\n // Audio\n 'Composer',\n 'Music Producer',\n 'Sound Designer',\n] as const;\n\n/**\n * Craft-skill discipline tags (23). Tags are Firestore doc IDs in the\n * `craftSkillsByTag/{tag}` index, so the STORED value is a machine-safe kebab-case ID\n * (`CRAFT_SKILL_TAG_OPTIONS`) — this is what the wire schema validates and what path\n * builders write. Human-readable labels (with spaces / ampersands) are mapped over the\n * IDs via `CRAFT_SKILL_TAG_LABELS`; render pickers/badges through that map. Kept in\n * curated discipline order (Performance → Writing → Visual → Film → Audio); not sorted.\n */\nexport const CRAFT_SKILL_TAG_OPTIONS = [\n // Performance\n 'acting',\n 'voice-over',\n 'singing',\n 'rapping',\n 'instrumental-performance',\n 'dance-choreography',\n 'stand-up-sketch-comedy',\n // Writing\n 'writing-storytelling',\n 'songwriting',\n 'poetry-spoken-word',\n // Visual arts\n 'drawing-illustration',\n 'painting',\n 'animation',\n 'graphic-design',\n 'photography',\n // Film & video\n 'cinematography-camera',\n 'video-editing',\n 'visual-effects',\n 'directing',\n 'costume-makeup',\n 'set-prop-design',\n // Audio\n 'music-production',\n 'composing-scoring',\n 'sound-design',\n] as const;\n\n/** The canonical tag-ID type — every tags field/param derives from this, never `string`. */\nexport type CraftSkillTagId = (typeof CRAFT_SKILL_TAG_OPTIONS)[number];\n\n/** The canonical trade-profession ID type. */\nexport type TradeProfessionId = (typeof TRADE_PROFESSION_OPTIONS)[number];\n\n/** TRADE_PROFESSION_OPTIONS as a non-empty tuple for `z.enum(...)` consumers — the ONE\n * cast, here beside the declaration (never re-cast locally in schema files). */\nexport const TRADE_PROFESSION_VALUES = TRADE_PROFESSION_OPTIONS as unknown as [\n TradeProfessionId,\n ...TradeProfessionId[],\n];\n\n/** The same allowlist as a non-empty tuple for `z.enum(...)` consumers — the ONE cast,\n * here beside the declaration (schema files import this, never re-cast locally). */\nexport const CRAFT_SKILL_TAG_VALUES = CRAFT_SKILL_TAG_OPTIONS as unknown as [\n CraftSkillTagId,\n ...CraftSkillTagId[],\n];\n\n/** Human display labels for each craft-skill tag ID. Keyed by the machine-safe ID. */\nexport const CRAFT_SKILL_TAG_LABELS: Record<(typeof CRAFT_SKILL_TAG_OPTIONS)[number], string> = {\n 'acting': 'Acting',\n 'voice-over': 'Voice Over',\n 'singing': 'Singing',\n 'rapping': 'Rapping',\n 'instrumental-performance': 'Instrumental Performance',\n 'dance-choreography': 'Dance & Choreography',\n 'stand-up-sketch-comedy': 'Stand-Up & Sketch Comedy',\n 'writing-storytelling': 'Writing & Storytelling',\n 'songwriting': 'Songwriting',\n 'poetry-spoken-word': 'Poetry & Spoken Word',\n 'drawing-illustration': 'Drawing & Illustration',\n 'painting': 'Painting',\n 'animation': 'Animation',\n 'graphic-design': 'Graphic Design',\n 'photography': 'Photography',\n 'cinematography-camera': 'Cinematography & Camera',\n 'video-editing': 'Video Editing',\n 'visual-effects': 'Visual Effects',\n 'directing': 'Directing',\n 'costume-makeup': 'Costume & Makeup',\n 'set-prop-design': 'Set & Prop Design',\n 'music-production': 'Music Production',\n 'composing-scoring': 'Composing & Scoring',\n 'sound-design': 'Sound Design',\n};\n\n// --- WorkProject-Specific Genres ---\n\n/**\n * Genres shown for each workProject type. Curated final lists (kept in the doc's order,\n * not alphabetized). \"Spooky\" (not \"Horror\") is deliberate for V1: the name carries the\n * all-ages ceiling; \"Horror\" is the natural mature sibling if mature content ever ships.\n */\nexport const WORK_PROJECT_SPECIFIC_GENRES = {\n Tales: [\n 'Adventure',\n 'Comedy',\n 'Drama',\n 'Fantasy',\n 'Fairy Tale & Fable',\n 'Historical',\n 'Mystery',\n 'Romance',\n 'Sci-Fi',\n 'Slice of Life',\n 'Spooky',\n 'Thriller',\n ],\n Tunes: [\n 'Audiobook & Spoken Word',\n 'Blues',\n 'Classical',\n 'Country',\n 'Electronic',\n 'Folk',\n 'Hip Hop & Rap',\n 'Jazz',\n 'Metal',\n 'Podcast',\n 'Pop',\n 'R&B & Soul',\n 'Reggae',\n 'Rock',\n 'Soundtrack & Score',\n ],\n Television: [\n 'Action',\n 'Animation',\n 'Comedy',\n 'Documentary',\n 'Drama',\n 'Fantasy',\n 'Kids & Family',\n 'Music Video',\n 'Mystery',\n 'Reality',\n 'Sci-Fi',\n 'Sketch & Variety',\n 'Spooky',\n 'Talk Show',\n 'Thriller',\n ],\n} as const;\n\n// --- HallLibrary / WorkProject Type Display Maps ---\n\n/** HallLibrary type display info. Used in dropdowns and badges. */\nexport const HALL_WING_TYPES: Record<HallWingType, { label: string; description: string }> = {\n entertainment: {\n label: 'Entertainment',\n description: 'Fun and engaging content',\n },\n educational: {\n label: 'Educational',\n description: 'Learning materials and resources',\n },\n newsPolitical: {\n label: 'News/Political',\n description: 'Current events and political content',\n },\n};\n\n/** WorkProject type display info. Used in dropdowns and headers. */\nexport const WORK_PROJECT_TYPES: Record<WorkProjectType, { label: string; description: string }> = {\n Tales: {\n label: 'Tales',\n description: 'Stories and narratives',\n },\n Tunes: {\n label: 'Tunes',\n description: 'Music and audio content',\n },\n Television: {\n label: 'Television',\n description: 'Video and TV content',\n },\n};\n\n// --- Audition Type Display + Board Filter ---\n\n/** Audition type display info. Used on the audition board's type chips/filters and on\n * audition headers. Record-keyed by the canonical AuditionType union, so adding an\n * audition type fails the build here until its label + description exist. */\nexport const AUDITION_TYPES: Record<AuditionType, { label: string; description: string }> = {\n platformAudition: {\n label: 'Platform',\n description: 'Run by TTT admins to gather community feedback.',\n },\n sponsoredAudition: {\n label: 'Sponsored',\n description: 'Backed by funding — votes decide where the money goes.',\n },\n workAudition: {\n label: 'Work',\n description: \"Created by a Work's Guildmates seeking feedback.\",\n },\n};\n\n/** The audition board's \"every type\" filter sentinel — the ONE declaration (it was\n * previously hand-rolled app-locally). It doubles as the chip's own display label. */\nexport const AUDITION_TYPE_FILTER_ALL = 'All';\n\n/** Audition-board type-filter state: one canonical audition type, or the ALL sentinel.\n * Filter state derives this instead of being typed `string`. */\nexport type AuditionTypeFilter = AuditionType | typeof AUDITION_TYPE_FILTER_ALL;\n\n// --- Sort Options ---\n\n/** Sort options shown on the audition feeds, keyed by feed type. */\nexport const AUDITION_SORT_OPTIONS = {\n default: {\n newest: { label: 'Newest First', field: 'createdOn', direction: 'desc' },\n endingSoon: { label: 'Ending Soon', field: 'openTill', direction: 'asc' },\n },\n platformAudition: {\n newest: { label: 'Newest First', field: 'createdOn', direction: 'desc' },\n endingSoon: { label: 'Ending Soon', field: 'openTill', direction: 'asc' },\n },\n sponsoredAudition: {\n newest: { label: 'Newest First', field: 'createdOn', direction: 'desc' },\n endingSoon: { label: 'Ending Soon', field: 'openTill', direction: 'asc' },\n highestPrice: { label: 'Highest Price', field: 'sponsoredAuditionAmountUSD', direction: 'desc' },\n lowestPrice: { label: 'Lowest Price', field: 'sponsoredAuditionAmountUSD', direction: 'asc' },\n },\n workAudition: {\n newest: { label: 'Newest First', field: 'createdOn', direction: 'desc' },\n endingSoon: { label: 'Ending Soon', field: 'openTill', direction: 'asc' },\n highestStakeShares: { label: 'Highest Stakes', field: 'stakeSharesOffered', direction: 'desc' },\n lowestStakeShares: { label: 'Lowest Stakes', field: 'stakeSharesOffered', direction: 'asc' },\n },\n} as const;\n\n/** Every sort key any audition feed offers, DERIVED from AUDITION_SORT_OPTIONS above — a new\n * sort option widens the union automatically, so sort state is never typed `string`. */\nexport type AuditionSortKey = {\n [F in keyof typeof AUDITION_SORT_OPTIONS]: keyof (typeof AUDITION_SORT_OPTIONS)[F];\n}[keyof typeof AUDITION_SORT_OPTIONS];\n\n/** The audition board's initial sort selection. Every feed type offers this key. */\nexport const DEFAULT_AUDITION_SORT: AuditionSortKey = 'newest';\n\n/** Sort options shown on the hallLibrary feed. */\nexport const HALL_LIBRARY_SORT_OPTIONS: Record<\n string,\n { label: string; field: string; direction: 'asc' | 'desc' }\n> = {\n newest: { label: 'Newest First', field: 'createdOn', direction: 'desc' },\n oldest: { label: 'Oldest First', field: 'createdOn', direction: 'asc' },\n most_followed: { label: 'Most Followed', field: 'followerCount', direction: 'desc' },\n};\n\n\n\n"]}
1
+ {"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/constants/options.ts"],"names":[],"mappings":"AAAA,qEAAqE;AAKrE,sCAAsC;AACtC,yFAAyF;AACzF,+FAA+F;AAE/F,gCAAgC;AAEhC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,cAAc;IACd,OAAO;IACP,aAAa;IACb,QAAQ;IACR,UAAU;IACV,wBAAwB;IACxB,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,UAAU;IACV,kBAAkB;IAClB,iBAAiB;IACjB,cAAc;IACd,UAAU;IACV,QAAQ;IACR,kBAAkB;IAClB,YAAY;IACZ,yBAAyB;IACzB,qBAAqB;IACrB,QAAQ;IACR,UAAU;IACV,gBAAgB;IAChB,gBAAgB;CACR,CAAC;AAEX;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,cAAc;IACd,QAAQ;IACR,YAAY;IACZ,SAAS;IACT,SAAS;IACT,0BAA0B;IAC1B,oBAAoB;IACpB,wBAAwB;IACxB,UAAU;IACV,sBAAsB;IACtB,aAAa;IACb,oBAAoB;IACpB,cAAc;IACd,sBAAsB;IACtB,UAAU;IACV,WAAW;IACX,gBAAgB;IACh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AW,EAAE,SAAS,EAAE,MAAM,EAAE;IACxE,MAAM,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE;IACvE,aAAa,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,EAAE;CACrF,CAAC","sourcesContent":["// UI option lists shared between frontend and backend admin tooling.\n\nimport type { HallWingType, WorkProjectType } from '../types/content.js';\nimport type { AuditionType } from '../types/commissions.js';\n\n// --- WorkProject Guild Standings ---\n// WorkProject guild-standing IDs, labels, and assignment policy live in ../permissions/.\n// Keep guild-standing picker UIs backed by GUILD_STANDINGS instead of a duplicated option map.\n\n// --- Trade & Craft Options ---\n\n/**\n * Trade professions (20) — role-shaped labels used for guild roles, commission\n * requests, and file-folder permission keys. Display strings are stored/validated\n * directly (they double as the enum values in the callable input schemas that derive\n * from this constant). Kept in curated order; not alphabetized.\n */\nexport const TRADE_PROFESSION_OPTIONS = [\n // Performance\n 'Actor',\n 'Voice Actor',\n 'Singer',\n 'Musician',\n 'Dancer & Choreographer',\n // Story\n 'Writer',\n 'Editor',\n 'Director',\n 'Producer',\n // Camera & visual\n 'Cinematographer',\n 'Photographer',\n 'Animator',\n 'Artist',\n 'Graphic Designer',\n 'VFX Artist',\n 'Costume & Makeup Artist',\n 'Set & Prop Designer',\n // Audio\n 'Composer',\n 'Music Producer',\n 'Sound Designer',\n] as const;\n\n/**\n * Craft-skill discipline tags (23). Tags are Firestore doc IDs in the\n * `craftSkillsByTag/{tag}` index, so the STORED value is a machine-safe kebab-case ID\n * (`CRAFT_SKILL_TAG_OPTIONS`) — this is what the wire schema validates and what path\n * builders write. Human-readable labels (with spaces / ampersands) are mapped over the\n * IDs via `CRAFT_SKILL_TAG_LABELS`; render pickers/badges through that map. Kept in\n * curated discipline order (Performance → Writing → Visual → Film → Audio); not sorted.\n */\nexport const CRAFT_SKILL_TAG_OPTIONS = [\n // Performance\n 'acting',\n 'voice-over',\n 'singing',\n 'rapping',\n 'instrumental-performance',\n 'dance-choreography',\n 'stand-up-sketch-comedy',\n // Writing\n 'writing-storytelling',\n 'songwriting',\n 'poetry-spoken-word',\n // Visual arts\n 'drawing-illustration',\n 'painting',\n 'animation',\n 'graphic-design',\n 'photography',\n // Film & video\n 'cinematography-camera',\n 'video-editing',\n 'visual-effects',\n 'directing',\n 'costume-makeup',\n 'set-prop-design',\n // Audio\n 'music-production',\n 'composing-scoring',\n 'sound-design',\n] as const;\n\n/** The canonical tag-ID type — every tags field/param derives from this, never `string`. */\nexport type CraftSkillTagId = (typeof CRAFT_SKILL_TAG_OPTIONS)[number];\n\n/** The canonical trade-profession ID type. */\nexport type TradeProfessionId = (typeof TRADE_PROFESSION_OPTIONS)[number];\n\n/** TRADE_PROFESSION_OPTIONS as a non-empty tuple for `z.enum(...)` consumers — the ONE\n * cast, here beside the declaration (never re-cast locally in schema files). */\nexport const TRADE_PROFESSION_VALUES = TRADE_PROFESSION_OPTIONS as unknown as [\n TradeProfessionId,\n ...TradeProfessionId[],\n];\n\n/** The same allowlist as a non-empty tuple for `z.enum(...)` consumers — the ONE cast,\n * here beside the declaration (schema files import this, never re-cast locally). */\nexport const CRAFT_SKILL_TAG_VALUES = CRAFT_SKILL_TAG_OPTIONS as unknown as [\n CraftSkillTagId,\n ...CraftSkillTagId[],\n];\n\n/** Human display labels for each craft-skill tag ID. Keyed by the machine-safe ID. */\nexport const CRAFT_SKILL_TAG_LABELS: Record<(typeof CRAFT_SKILL_TAG_OPTIONS)[number], string> = {\n 'acting': 'Acting',\n 'voice-over': 'Voice Over',\n 'singing': 'Singing',\n 'rapping': 'Rapping',\n 'instrumental-performance': 'Instrumental Performance',\n 'dance-choreography': 'Dance & Choreography',\n 'stand-up-sketch-comedy': 'Stand-Up & Sketch Comedy',\n 'writing-storytelling': 'Writing & Storytelling',\n 'songwriting': 'Songwriting',\n 'poetry-spoken-word': 'Poetry & Spoken Word',\n 'drawing-illustration': 'Drawing & Illustration',\n 'painting': 'Painting',\n 'animation': 'Animation',\n 'graphic-design': 'Graphic Design',\n 'photography': 'Photography',\n 'cinematography-camera': 'Cinematography & Camera',\n 'video-editing': 'Video Editing',\n 'visual-effects': 'Visual Effects',\n 'directing': 'Directing',\n 'costume-makeup': 'Costume & Makeup',\n 'set-prop-design': 'Set & Prop Design',\n 'music-production': 'Music Production',\n 'composing-scoring': 'Composing & Scoring',\n 'sound-design': 'Sound Design',\n};\n\n// --- WorkProject-Specific Genres ---\n\n/**\n * Genres shown for each workProject type. Curated final lists (kept in the doc's order,\n * not alphabetized). \"Spooky\" (not \"Horror\") is deliberate for V1: the name carries the\n * all-ages ceiling; \"Horror\" is the natural mature sibling if mature content ever ships.\n */\nexport const WORK_PROJECT_SPECIFIC_GENRES = {\n Tales: [\n 'Adventure',\n 'Comedy',\n 'Drama',\n 'Fantasy',\n 'Fairy Tale & Fable',\n 'Historical',\n 'Mystery',\n 'Romance',\n 'Sci-Fi',\n 'Slice of Life',\n 'Spooky',\n 'Thriller',\n ],\n Tunes: [\n 'Audiobook & Spoken Word',\n 'Blues',\n 'Classical',\n 'Country',\n 'Electronic',\n 'Folk',\n 'Hip Hop & Rap',\n 'Jazz',\n 'Metal',\n 'Podcast',\n 'Pop',\n 'R&B & Soul',\n 'Reggae',\n 'Rock',\n 'Soundtrack & Score',\n ],\n Television: [\n 'Action',\n 'Animation',\n 'Comedy',\n 'Documentary',\n 'Drama',\n 'Fantasy',\n 'Kids & Family',\n 'Music Video',\n 'Mystery',\n 'Reality',\n 'Sci-Fi',\n 'Sketch & Variety',\n 'Spooky',\n 'Talk Show',\n 'Thriller',\n ],\n} as const;\n\n// --- HallLibrary / WorkProject Type Display Maps ---\n\n/** HallLibrary type display info. Used in dropdowns and badges. */\nexport const HALL_WING_TYPES: Record<HallWingType, { label: string; description: string }> = {\n entertainment: {\n label: 'Entertainment',\n description: 'Fun and engaging content',\n },\n educational: {\n label: 'Educational',\n description: 'Learning materials and resources',\n },\n newsPolitical: {\n label: 'News/Political',\n description: 'Current events and political content',\n },\n};\n\n/** WorkProject type display info. Used in dropdowns and headers. */\nexport const WORK_PROJECT_TYPES: Record<WorkProjectType, { label: string; description: string }> = {\n Tales: {\n label: 'Tales',\n description: 'Stories and narratives',\n },\n Tunes: {\n label: 'Tunes',\n description: 'Music and audio content',\n },\n Television: {\n label: 'Television',\n description: 'Video and TV content',\n },\n};\n\n// --- Audition Type Display + Board Filter ---\n\n/** Audition type display info. Used on the audition board's type chips/filters and on\n * audition headers. Record-keyed by the canonical AuditionType union, so adding an\n * audition type fails the build here until its label + description exist. */\nexport const AUDITION_TYPES: Record<AuditionType, { label: string; description: string }> = {\n platformAudition: {\n label: 'Platform',\n description: 'Run by TTT admins to gather community feedback.',\n },\n sponsoredAudition: {\n label: 'Sponsored',\n description: 'Backed by funding — votes decide where the money goes.',\n },\n workAudition: {\n label: 'Work',\n description: \"Created by a Work's Guildmates seeking feedback.\",\n },\n};\n\n/** The audition board's \"every type\" filter sentinel — the ONE declaration (it was\n * previously hand-rolled app-locally). It doubles as the chip's own display label. */\nexport const AUDITION_TYPE_FILTER_ALL = 'All';\n\n/** Audition-board type-filter state: one canonical audition type, or the ALL sentinel.\n * Filter state derives this instead of being typed `string`. */\nexport type AuditionTypeFilter = AuditionType | typeof AUDITION_TYPE_FILTER_ALL;\n\n// --- Sort Options ---\n\n/**\n * The two sort options EVERY audition feed offers — declared ONCE and spread into each feed's\n * option set below (ENG-002). They used to be restated verbatim in all four feed entries, so\n * a label or field change had to be made four times to avoid drift.\n */\nconst AUDITION_SORT_OPTIONS_BASE = {\n newest: { label: 'Newest First', field: 'createdOn', direction: 'desc' },\n endingSoon: { label: 'Ending Soon', field: 'openTill', direction: 'asc' },\n} as const;\n\n/** Sort options shown on the audition feeds, keyed by feed type. `default` serves the board's\n * ALL filter; `platformAudition` is the base pair on purpose — the by-type lookup must be total\n * over AuditionType (see the `AUDITION_SORT_OPTIONS[filter]` call sites). */\nexport const AUDITION_SORT_OPTIONS = {\n default: { ...AUDITION_SORT_OPTIONS_BASE },\n platformAudition: { ...AUDITION_SORT_OPTIONS_BASE },\n sponsoredAudition: {\n ...AUDITION_SORT_OPTIONS_BASE,\n highestPrice: { label: 'Highest Price', field: 'sponsoredAuditionAmountUSD', direction: 'desc' },\n lowestPrice: { label: 'Lowest Price', field: 'sponsoredAuditionAmountUSD', direction: 'asc' },\n },\n workAudition: {\n ...AUDITION_SORT_OPTIONS_BASE,\n highestStakeShares: { label: 'Highest Stakes', field: 'stakeSharesOffered', direction: 'desc' },\n lowestStakeShares: { label: 'Lowest Stakes', field: 'stakeSharesOffered', direction: 'asc' },\n },\n} as const;\n\n/** Every sort key any audition feed offers, DERIVED from AUDITION_SORT_OPTIONS above — a new\n * sort option widens the union automatically, so sort state is never typed `string`. */\nexport type AuditionSortKey = {\n [F in keyof typeof AUDITION_SORT_OPTIONS]: keyof (typeof AUDITION_SORT_OPTIONS)[F];\n}[keyof typeof AUDITION_SORT_OPTIONS];\n\n/** The audition board's initial sort selection. Every feed type offers this key. */\nexport const DEFAULT_AUDITION_SORT: AuditionSortKey = 'newest';\n\n/** Sort options shown on the hallLibrary feed. */\nexport const HALL_LIBRARY_SORT_OPTIONS: Record<\n string,\n { label: string; field: string; direction: 'asc' | 'desc' }\n> = {\n newest: { label: 'Newest First', field: 'createdOn', direction: 'desc' },\n oldest: { label: 'Oldest First', field: 'createdOn', direction: 'asc' },\n most_followed: { label: 'Most Followed', field: 'followerCount', direction: 'desc' },\n};\n\n\n\n"]}
@@ -346,6 +346,18 @@ export declare const ModerateReportedContentInputSchema: z.ZodObject<{
346
346
  reason: z.ZodOptional<z.ZodString>;
347
347
  }, z.core.$strict>;
348
348
  export type ModerateReportedContentInput = z.infer<typeof ModerateReportedContentInputSchema>;
349
+ /** The three targets the in-flow text clear can neutralize — the Work/Realm shells plus a single
350
+ * published hall sub-item. Compile-linked subset of the canonical reportable-item enum. */
351
+ declare const CLEAR_CONTENT_TEXT_TARGET_TYPES: readonly ["work-project", "work-realm", "hall-library-sub-item"];
352
+ export type ClearContentTextTargetType = (typeof CLEAR_CONTENT_TEXT_TARGET_TYPES)[number];
353
+ declare const ClearContentTextFieldSchema: z.ZodEnum<{
354
+ title: "title";
355
+ description: "description";
356
+ content: "content";
357
+ workingTitle: "workingTitle";
358
+ workingDescription: "workingDescription";
359
+ }>;
360
+ export type ClearContentTextField = z.infer<typeof ClearContentTextFieldSchema>;
349
361
  export declare const StagedActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
350
362
  button: z.ZodEnum<{
351
363
  hideContent: "hideContent";
@@ -398,6 +410,22 @@ export declare const StagedActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
398
410
  "work-realm": "work-realm";
399
411
  }>;
400
412
  reportedItemId: z.ZodString;
413
+ }, z.core.$strict>, z.ZodObject<{
414
+ button: z.ZodLiteral<"clearContentText">;
415
+ targetType: z.ZodEnum<{
416
+ "hall-library-sub-item": "hall-library-sub-item";
417
+ "work-project": "work-project";
418
+ "work-realm": "work-realm";
419
+ }>;
420
+ reportedItemId: z.ZodString;
421
+ parentItemId: z.ZodOptional<z.ZodString>;
422
+ fields: z.ZodArray<z.ZodEnum<{
423
+ title: "title";
424
+ description: "description";
425
+ content: "content";
426
+ workingTitle: "workingTitle";
427
+ workingDescription: "workingDescription";
428
+ }>>;
401
429
  }, z.core.$strict>, z.ZodObject<{
402
430
  button: z.ZodLiteral<"tombstoneChat">;
403
431
  channel: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -472,6 +500,22 @@ export declare const NormalReportInputSchema: z.ZodObject<{
472
500
  "work-realm": "work-realm";
473
501
  }>;
474
502
  reportedItemId: z.ZodString;
503
+ }, z.core.$strict>, z.ZodObject<{
504
+ button: z.ZodLiteral<"clearContentText">;
505
+ targetType: z.ZodEnum<{
506
+ "hall-library-sub-item": "hall-library-sub-item";
507
+ "work-project": "work-project";
508
+ "work-realm": "work-realm";
509
+ }>;
510
+ reportedItemId: z.ZodString;
511
+ parentItemId: z.ZodOptional<z.ZodString>;
512
+ fields: z.ZodArray<z.ZodEnum<{
513
+ title: "title";
514
+ description: "description";
515
+ content: "content";
516
+ workingTitle: "workingTitle";
517
+ workingDescription: "workingDescription";
518
+ }>>;
475
519
  }, z.core.$strict>, z.ZodObject<{
476
520
  button: z.ZodLiteral<"tombstoneChat">;
477
521
  channel: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../src/schemas/admin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAsDxB,eAAO,MAAM,oCAAoC,iCAAwB,CAAC;AAC1E,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC;AAElG,eAAO,MAAM,8BAA8B;;kBAEhC,CAAC;AACZ,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAItF,eAAO,MAAM,wBAAwB;;;kBAG1B,CAAC;AACZ,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E;0CAC0C;AAC1C,eAAO,MAAM,2BAA2B;;;EAAiC,CAAC;AAC1E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,8BAA8B;;;;;;;;kBAKhC,CAAC;AACZ,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAGtF,eAAO,MAAM,+BAA+B;;;;;;;;;iBAW1C,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAaxF,eAAO,MAAM,4BAA4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OAAO,gCAAgC,CAAC,CAAC;AAE1F,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;oBAQ1B,CAAC;AACb,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
@@ -367,6 +367,48 @@ const WorkObjectActionSchema = z
367
367
  reportedItemId: z.string().min(1),
368
368
  })
369
369
  .strict();
370
+ // --- The in-flow clear-content disposition (staged counterpart of the page-level clear-text
371
+ // callables) ---
372
+ /** The three targets the in-flow text clear can neutralize — the Work/Realm shells plus a single
373
+ * published hall sub-item. Compile-linked subset of the canonical reportable-item enum. */
374
+ const CLEAR_CONTENT_TEXT_TARGET_TYPES = [
375
+ 'work-project',
376
+ 'work-realm',
377
+ 'hall-library-sub-item',
378
+ ];
379
+ /** Every field name the staged clear can carry across those three targets — the union of the two
380
+ * canonical clearable owners (`MODERATION_CLEARABLE_TEXT_FIELDS` for the shells,
381
+ * `HALL_CLEARABLE_TEXT_FIELD_NAMES` for the hall family), i.e. the same two sources
382
+ * `ClearWorkProjectTextInputSchema` / `ClearHallContentTextInputSchema` derive from. No field
383
+ * literal is restated here. */
384
+ const CLEAR_CONTENT_TEXT_FIELDS = [
385
+ ...MODERATION_CLEARABLE_TEXT_FIELDS.workProject,
386
+ ...HALL_CLEARABLE_TEXT_FIELD_NAMES,
387
+ ];
388
+ const ClearContentTextFieldSchema = z.enum(CLEAR_CONTENT_TEXT_FIELDS);
389
+ /** Which fields each target legally accepts — projected from those same owners, so a
390
+ * target/field mismatch is refused at the wire instead of reaching a clear runner that would
391
+ * drop it. Enforced by the cross-field refinement on `StagedActionSchema` below. */
392
+ const CLEAR_CONTENT_TEXT_FIELDS_BY_TARGET = {
393
+ 'work-project': MODERATION_CLEARABLE_TEXT_FIELDS.workProject,
394
+ 'work-realm': MODERATION_CLEARABLE_TEXT_FIELDS.workRealm,
395
+ 'hall-library-sub-item': HALL_CLEARABLE_TEXT_FIELD_NAMES,
396
+ };
397
+ /** Per-field text clear — the guided close-out's staged counterpart of the page-level
398
+ * `clearWorkProjectText` / `clearWorkRealmText` / `clearHallContentText` callables (the
399
+ * per-field extension of `forceRetitle`). `reportedItemId` is the workProjectId / workRealmId /
400
+ * sub-item id; `parentItemId` is the parent hall item id, required only for the sub-item target.
401
+ * `workProjectType` is deliberately NOT on the wire — the server re-reads it from the doc (the
402
+ * hall hide-branch precedent). */
403
+ const ClearContentTextActionSchema = z
404
+ .object({
405
+ button: z.literal('clearContentText'),
406
+ targetType: z.enum(CLEAR_CONTENT_TEXT_TARGET_TYPES),
407
+ reportedItemId: z.string().min(1),
408
+ parentItemId: z.string().min(1).optional(),
409
+ fields: z.array(ClearContentTextFieldSchema).min(1),
410
+ })
411
+ .strict();
370
412
  /** Chat message tombstone — channel + seq from the report, revision from the live thread-read. */
371
413
  const TombstoneChatSchema = z
372
414
  .object({
@@ -379,15 +421,42 @@ const TombstoneChatSchema = z
379
421
  expectedMessageRevision: z.number().int().nonnegative(),
380
422
  })
381
423
  .strict();
382
- export const StagedActionSchema = z.discriminatedUnion('button', [
424
+ export const StagedActionSchema = z
425
+ .discriminatedUnion('button', [
383
426
  ContentActionSchema,
384
427
  WarnUserSchema,
385
428
  SuspendOrBanSchema,
386
429
  ReinstateUserSchema,
387
430
  ForceUsernameResetSchema,
388
431
  WorkObjectActionSchema,
432
+ ClearContentTextActionSchema,
389
433
  TombstoneChatSchema,
390
- ]);
434
+ ])
435
+ // The clearContentText arm's two cross-field rules, applied at the union (the
436
+ // SafetyStagedActionSchema pattern below) because no other arm carries these fields:
437
+ // every chosen field must belong to the chosen target's canonical clearable set, and the
438
+ // hall sub-item target must name its parent hall item.
439
+ .superRefine((value, ctx) => {
440
+ if (value.button !== 'clearContentText')
441
+ return;
442
+ const clearable = CLEAR_CONTENT_TEXT_FIELDS_BY_TARGET[value.targetType];
443
+ value.fields.forEach((field, index) => {
444
+ if (!clearable.includes(field)) {
445
+ ctx.addIssue({
446
+ code: 'custom',
447
+ message: `Field '${field}' is not clearable on a '${value.targetType}' target.`,
448
+ path: ['fields', index],
449
+ });
450
+ }
451
+ });
452
+ if (value.targetType === 'hall-library-sub-item' && !value.parentItemId) {
453
+ ctx.addIssue({
454
+ code: 'custom',
455
+ message: 'parentItemId (the parent hall item id) is required for a hall sub-item target.',
456
+ path: ['parentItemId'],
457
+ });
458
+ }
459
+ });
391
460
  export const NormalReportInputSchema = z
392
461
  .object({
393
462
  caseType: z.literal('normalReport').default('normalReport'),
@@ -1 +1 @@
1
- {"version":3,"file":"admin.js","sourceRoot":"","sources":["../../src/schemas/admin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,uBAAuB,EACvB,iCAAiC,EACjC,iCAAiC,EACjC,mCAAmC,GAEpC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,4BAA4B,EAC5B,0CAA0C,GAC3C,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EACL,gCAAgC,EAChC,+BAA+B,GAChC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,6BAA6B,EAC7B,iCAAiC,EACjC,sCAAsC,EACtC,0BAA0B,EAC1B,6BAA6B,EAC7B,oCAAoC,EACpC,4BAA4B,EAC5B,4BAA4B,EAC5B,kCAAkC,EAClC,8BAA8B,EAC9B,oCAAoC,EACpC,0BAA0B,EAC1B,+BAA+B,EAC/B,4BAA4B,EAC5B,4BAA4B,EAC5B,8BAA8B,EAC9B,8BAA8B,EAC9B,iCAAiC,EACjC,oCAAoC,GACrC,MAAM,0BAA0B,CAAC;AAClC,OAAO,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AGH,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC;KAC9C,MAAM,CAAC;IACN,UAAU,EAAE,0BAA0B;IACtC,0EAA0E;IAC1E,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACjC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,0BAA0B,CAAC;IACzD,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC;KACD,MAAM,EAAE,CAAC;AAGZ,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC;KACvC,MAAM,CAAC;IACN,8DAA8D;IAC9D,UAAU,EAAE,0BAA0B,CAAC,QAAQ,EAAE;IACjD,0EAA0E;IAC1E,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;CACnD,CAAC;KACD,MAAM,EAAE;KACR,OAAO,EAAE,CAAC","sourcesContent":["import { z } from 'zod';\nimport {\n violationIdSchema,\n taskIdSchema,\n workProjectIdSchema,\n hallItemIdSchema,\n workProjectTypeSchema,\n} from './atoms.js';\nimport {\n ReportDispositionSchema,\n ReportDispositionReasonCodeSchema,\n refineReportDispositionReasonCode,\n refineReportDispositionEvidenceRefs,\n type ReportableItemType,\n} from '../doc-schemas/safety/foundation.js';\nimport {\n ChildSafetyAccountRoleSchema,\n ChildSafetyAccountSubjectDispositionSchema,\n} from '../doc-schemas/safety/case.js';\nimport {\n ContentMediaKindSchema,\n MediaServingStatusSchema,\n} from '../doc-schemas/media-assets.js';\nimport { MAX_MANIFEST_NCMEC_RECEIPTS } from '../doc-schemas/safety/evidence.js';\nimport {\n MODERATION_CLEARABLE_TEXT_FIELDS,\n HALL_CLEARABLE_TEXT_FIELD_NAMES,\n} from '../constants/business-content.js';\nimport {\n MAX_WORK_PROJECT_TITLE_LENGTH,\n MAX_ADMIN_DISPATCH_SUBJECT_LENGTH,\n MAX_ADMIN_DISPATCH_INITIAL_TEXT_LENGTH,\n MAX_INTERNAL_REASON_LENGTH,\n MAX_USER_FACING_REASON_LENGTH,\n MAX_SAFETY_RESOLUTION_SUMMARY_LENGTH,\n MAX_SAFETY_ADMIN_NOTE_LENGTH,\n MAX_FUTURE_PLAN_TITLE_LENGTH,\n MAX_FUTURE_PLAN_DESCRIPTION_LENGTH,\n MAX_PLATFORM_RULE_TITLE_LENGTH,\n MAX_PLATFORM_RULE_DESCRIPTION_LENGTH,\n MAX_AGREEMENT_POINT_LENGTH,\n MAX_CONTENT_PAGE_HEADING_LENGTH,\n MAX_CONTENT_PAGE_BODY_LENGTH,\n MAX_TAKE_IT_DOWN_COPY_LENGTH,\n MAX_MAINTENANCE_MESSAGE_LENGTH,\n MAX_APPEAL_REVIEW_NOTES_LENGTH,\n MAX_REQUIRE_RETITLE_REASON_LENGTH,\n MAX_USER_FACING_REASON_DETAIL_LENGTH,\n} from '../constants/business.js';\nimport {\n SAFETY_ACTIONS_CONFIRMATION,\n SAFETY_CASE_REOPEN_CONFIRMATION,\n} from '../constants/safety-confirmation-phrases.js';\n\nexport const CheckoutNextImportantTaskInputSchema = z.object({}).strict();\nexport type CheckoutNextImportantTaskInput = z.infer<typeof CheckoutNextImportantTaskInputSchema>;\n\nexport const GetContentViolationInputSchema = z.object({\n violationId: violationIdSchema,\n}).strict();\nexport type GetContentViolationInput = z.infer<typeof GetContentViolationInputSchema>;\n\n// `taskType` was removed — the server derives it from the task doc; the client copy was\n// ignored (and forgeable). Callers pass only the task id + the extension window.\nexport const MarkWorkLaterInputSchema = z.object({\n taskId: taskIdSchema,\n extendHours: z.union([z.literal(24), z.literal(48)]),\n}).strict();\nexport type MarkWorkLaterInput = z.infer<typeof MarkWorkLaterInputSchema>;\n\n/** The two appeal-review decisions (ONE canonical declaration — shared by the review\n * input and its authoritative result). */\nexport const ContentAppealDecisionSchema = z.enum(['approved', 'denied']);\nexport type ContentAppealDecision = z.infer<typeof ContentAppealDecisionSchema>;\n\nexport const ReviewContentAppealInputSchema = z.object({\n violationId: violationIdSchema,\n taskId: taskIdSchema,\n decision: ContentAppealDecisionSchema,\n adminNotes: z.string().max(MAX_APPEAL_REVIEW_NOTES_LENGTH),\n}).strict();\nexport type ReviewContentAppealInput = z.infer<typeof ReviewContentAppealInputSchema>;\n\n// Authoritative result of reviewContentAppeal. Non-strict (server → client posture).\nexport const ReviewContentAppealResultSchema = z.object({\n success: z.literal(true),\n violationId: violationIdSchema,\n /** Echo of the requested decision (always known — it is the input). */\n decision: ContentAppealDecisionSchema,\n /** The appealing user's uid ('' on the orphaned-task cleanup path, where the\n * underlying violation was already gone and only the stale task was cleared). */\n userId: z.string(),\n /** Operation-receipt audit id — the `admin.contentAppealReviewed` event written in the same\n * transaction. Optional/additive so an older backend that omits it still type-checks. */\n auditEventId: z.string().min(1).optional(),\n});\nexport type ReviewContentAppealResult = z.infer<typeof ReviewContentAppealResultSchema>;\n\n// --- System-doc admin updates ---\n\nconst FuturePlanItemSchema = z.object({\n id: z.string().min(1).max(128),\n title: z.string().min(1).max(MAX_FUTURE_PLAN_TITLE_LENGTH),\n description: z.string().min(1).max(MAX_FUTURE_PLAN_DESCRIPTION_LENGTH),\n order: z.number().int().min(0),\n videoUrl: z.string().url().max(2048).optional(),\n mediaType: z.enum(['video', 'image', 'audio', 'other']).optional(),\n}).strict();\n\nexport const UpdateFuturePlansInputSchema = z.object({\n plans: z.array(FuturePlanItemSchema).max(200),\n}).strict();\nexport type UpdateFuturePlansInput = z.infer<typeof UpdateFuturePlansInputSchema>;\n\nconst RuleSchema = z.object({\n id: z.string().min(1).max(128),\n title: z.string().min(1).max(MAX_PLATFORM_RULE_TITLE_LENGTH),\n description: z.string().min(1).max(MAX_PLATFORM_RULE_DESCRIPTION_LENGTH),\n videoUrl: z.string().url().max(2048).optional(),\n group: z.enum(['generic', 'workProjectType', 'hallWingType', 'workRealm', 'merchandising']).optional(),\n subgroup: z.enum(['Tales', 'Tunes', 'Television', 'entertainment', 'educational', 'newsPolitical']).optional(),\n order: z.number().int().min(0),\n}).strict();\n\nconst AgreementCategorySchema = z.object({\n points: z.array(z.string().min(1).max(MAX_AGREEMENT_POINT_LENGTH)).max(200),\n videoUrl: z.string().url().max(2048).optional(),\n}).strict();\n\nconst AgreementsSchema = z.object({\n tales: AgreementCategorySchema.optional(),\n tunes: AgreementCategorySchema.optional(),\n television: AgreementCategorySchema.optional(),\n}).strict();\n\n// Partial update — admin UI may send only `rules` or only `agreements`.\n// Server merges. At least one field must be present.\nexport const UpdateRulesAndAgreementsInputSchema = z.object({\n rules: z.array(RuleSchema).max(500).optional(),\n agreements: AgreementsSchema.optional(),\n}).strict().refine(\n (data) => data.rules !== undefined || data.agreements !== undefined,\n { message: 'At least one of `rules` or `agreements` must be provided.' },\n);\nexport type UpdateRulesAndAgreementsInput = z.infer<typeof UpdateRulesAndAgreementsInputSchema>;\n\n// --- Content-pages migration (DJ ruling 2026-07-06): per-page update callables ---\n// One callable per page (never a `kind` discriminator): updateTermsPage /\n// updatePrivacyPage / updateTakeItDownPageCopy. The client NEVER sends `version`\n// — the server bumps it atomically on every save.\n\nconst ContentPageSectionInputSchema = z.object({\n id: z.string().min(1).max(128),\n heading: z.string().min(1).max(MAX_CONTENT_PAGE_HEADING_LENGTH),\n level: z.union([z.literal(1), z.literal(2)]),\n // Empty body is LEGAL: a bare divider heading (e.g. terms \"Part 1 — Our\n // Intention\") is real content. The input schema must accept everything the\n // stored ContentPageSectionSchema accepts, or a faithfully-seeded doc becomes\n // unsaveable in the admin editor (found by adversarial review 2026-07-06).\n body: z.string().max(MAX_CONTENT_PAGE_BODY_LENGTH),\n order: z.number().int().min(0),\n}).strict();\n\nexport const UpdateTermsPageInputSchema = z.object({\n sections: z.array(ContentPageSectionInputSchema).min(1).max(300),\n}).strict();\nexport type UpdateTermsPageInput = z.infer<typeof UpdateTermsPageInputSchema>;\n\nexport const UpdatePrivacyPageInputSchema = z.object({\n sections: z.array(ContentPageSectionInputSchema).min(1).max(300),\n}).strict();\nexport type UpdatePrivacyPageInput = z.infer<typeof UpdatePrivacyPageInputSchema>;\n\nexport const UpdateTakeItDownPageCopyInputSchema = z.object({\n strings: z.record(z.string().min(1).max(128), z.string().min(1).max(MAX_TAKE_IT_DOWN_COPY_LENGTH)),\n}).strict().refine(\n (data) => {\n const count = Object.keys(data.strings).length;\n return count >= 1 && count <= 200;\n },\n { message: 'strings must contain between 1 and 200 entries.' },\n);\nexport type UpdateTakeItDownPageCopyInput = z.infer<typeof UpdateTakeItDownPageCopyInputSchema>;\n\nconst AppConfigDocIdSchema = z.literal('app');\n\nexport const UpdateAppConfigInputSchema = z.object({\n docId: AppConfigDocIdSchema,\n data: z.object({\n appVersion: z.string().min(1).max(64).optional(),\n maintenanceMode: z.boolean().optional(),\n maintenanceMessage: z.string().max(MAX_MAINTENANCE_MESSAGE_LENGTH).optional(),\n registrationEnabled: z.boolean().optional(),\n // Runtime abuse throttle: 0 < m <= 1 (tighten-only; 1 = no throttle).\n rateLimitMultiplier: z.number().gt(0).max(1).optional(),\n }).strict().refine(\n (d) => Object.keys(d).length > 0,\n { message: 'data must have at least one field' },\n ),\n}).strict();\nexport type UpdateAppConfigInput = z.infer<typeof UpdateAppConfigInputSchema>;\n\n// --- Admin list mutations ---\n\nconst uidSchema = z.string().min(1).max(128);\n\n/**\n * Wire input for the `updateAdminList` callable in ttt-prod.\n * Used to grant or revoke admin / jrAdmin status on `_systemData/adminList`.\n *\n * All four fields are optional arrays of UIDs. At least one must be non-empty.\n * The callable's core function rejects conflicting input (e.g. same UID in\n * both addAdmins and removeAdmins) with HttpsError invalid-argument.\n */\nexport const UpdateAdminListInputSchema = z.object({\n addAdmins: z.array(uidSchema).optional(),\n removeAdmins: z.array(uidSchema).optional(),\n addJrAdmins: z.array(uidSchema).optional(),\n removeJrAdmins: z.array(uidSchema).optional(),\n})\n .strict()\n .refine(\n (data) =>\n (data.addAdmins?.length ?? 0) +\n (data.removeAdmins?.length ?? 0) +\n (data.addJrAdmins?.length ?? 0) +\n (data.removeJrAdmins?.length ?? 0) >\n 0,\n { message: 'At least one of addAdmins/removeAdmins/addJrAdmins/removeJrAdmins must be non-empty.' },\n );\n\nexport type UpdateAdminListInput = z.infer<typeof UpdateAdminListInputSchema>;\n\n// Authoritative result of updateAdminList — the grant/revoke delta counts computed inside\n// the roster transaction (uids already in their target state are no-ops and not counted).\n// Non-strict (server → client result posture).\nexport const UpdateAdminListResultSchema = z.object({\n success: z.literal(true),\n adminsGranted: z.number().int().nonnegative(),\n adminsRevoked: z.number().int().nonnegative(),\n jrAdminsGranted: z.number().int().nonnegative(),\n jrAdminsRevoked: z.number().int().nonnegative(),\n /** Operation-receipt audit id — the `admin.systemRoleGranted` / `admin.systemRoleRevoked`\n * event(s) key off the same roster transaction. Optional/additive. (No single domain id: a\n * roster edit spans multiple uids, so only the audit id is a meaningful receipt handle.) */\n auditEventId: z.string().min(1).optional(),\n});\nexport type UpdateAdminListResult = z.infer<typeof UpdateAdminListResultSchema>;\n\n// --- Admin moderation: hide / restore / retitle content + Work/Realm objects ---\n\nexport const CheckTrademarkInputSchema = z.object({\n // Primary: the work project's title (franchise-level check).\n workTitle: z.string().min(1).max(MAX_WORK_PROJECT_TITLE_LENGTH),\n // Optional: the sub-item title (chapter, track, episode). Checked secondarily.\n // `.nullish()` (not `.optional()`): the Firebase callable client serializes an\n // undefined argument as JSON null, and the work-view caller passes\n // `subItemTitle: subItem?.title` which is undefined when the sub-item hasn't\n // loaded — that arrives here as null. A bare `.optional()` would 400 on it.\n subItemTitle: z.string().max(MAX_WORK_PROJECT_TITLE_LENGTH).nullish(),\n}).strict();\nexport type CheckTrademarkInput = z.infer<typeof CheckTrademarkInputSchema>;\n\nexport const GetReportedContentDetailInputSchema = z.object({\n reportGroupId: z.string().min(1),\n}).strict();\nexport type GetReportedContentDetailInput = z.infer<typeof GetReportedContentDetailInputSchema>;\n\n// --- getReportedContentDetail result (cross-boundary: produced by the callable in functions/,\n// consumed by the admin report work-view) ---\n\n/** One display-text field of the reported doc, labeled for the review panel. The server returns\n * EVERY configured non-empty text field for the item type (title, description, body, …) in\n * display order — never just the first non-empty one. */\nexport const ReportedTextFieldSchema = z.object({\n /** Raw doc field name (e.g. 'description', 'workingTitle'). */\n field: z.string().min(1),\n /** Human label the panel renders (e.g. 'Description', 'Title'). */\n label: z.string().min(1),\n /** Current live value, trimmed; empty fields are omitted from the array. */\n value: z.string().min(1),\n});\nexport type ReportedTextField = z.infer<typeof ReportedTextFieldSchema>;\n\n/** One media asset referenced by the reported content: id + kind + current serving state\n * (for click-to-reveal) + the server-derived variant key the reveal must request. */\nexport const ReportedMediaAssetSchema = z.object({\n mediaAssetId: z.string().min(1),\n mediaKind: ContentMediaKindSchema.nullable(),\n servingStatus: MediaServingStatusSchema.nullable(),\n /** The variant key the reveal must request for its single display render (image origins split\n * between 'full' and 'main'; video/audio are always 'main'). Null when the asset doc is\n * missing/variant-less. */\n displayVariantKey: z.string().nullable(),\n /** Human label of WHAT this asset is on the reported item (e.g. 'Square cover',\n * 'Track photo — <title>'). Null when the server cannot derive one. */\n label: z.string().nullable(),\n});\nexport type ReportedMediaAsset = z.infer<typeof ReportedMediaAssetSchema>;\n\nexport const GetReportedContentDetailResultSchema = z.object({\n itemType: z.string().min(1),\n reportedItemId: z.string().min(1),\n /** First non-empty display-text field (legacy single-field snapshot; textFields is the\n * complete labeled set). */\n textSnapshot: z.string().nullable(),\n textFields: z.array(ReportedTextFieldSchema),\n mediaAssets: z.array(ReportedMediaAssetSchema),\n /** Whether the reported doc is currently hidden (best-effort, doc-flag based). */\n isHidden: z.boolean().nullable(),\n /** The content owner / uploader uid, when derivable. */\n ownerUid: z.string().nullable(),\n /** The FROZEN report-time snapshot (captured at intake), so the operator sees what was\n * reported even if the author edited the live doc to evade. Null for older reports. */\n reportTimeSnapshot: z.object({\n capturedText: z.string().nullable(),\n capturedMediaAssetIds: z.array(z.string()),\n revision: z.number().nullable(),\n capturedAt: z.number().nullable(),\n }).nullable(),\n});\nexport type GetReportedContentDetailResult = z.infer<typeof GetReportedContentDetailResultSchema>;\n\nexport const HideHallSubItemInputSchema = z.object({\n hallItemId: hallItemIdSchema,\n workProjectType: workProjectTypeSchema,\n subItemId: z.string().min(1),\n reason: z.string().min(1),\n}).strict();\nexport type HideHallSubItemInput = z.infer<typeof HideHallSubItemInputSchema>;\n\nexport const RestoreHallSubItemInputSchema = z.object({\n hallItemId: hallItemIdSchema,\n workProjectType: workProjectTypeSchema,\n subItemId: z.string().min(1),\n}).strict();\nexport type RestoreHallSubItemInput = z.infer<typeof RestoreHallSubItemInputSchema>;\n\nexport const HideWorkProjectInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n reason: z.string().min(1),\n}).strict();\nexport type HideWorkProjectInput = z.infer<typeof HideWorkProjectInputSchema>;\n\nexport const HideWorkRealmInputSchema = z.object({\n workRealmId: z.string().min(1),\n reason: z.string().min(1),\n}).strict();\nexport type HideWorkRealmInput = z.infer<typeof HideWorkRealmInputSchema>;\n\n// `cascadeId` is OPTIONAL: the app backends derive all active cascades for the target when it is\n// omitted, and restore just that one cascade when it is supplied.\nexport const RestoreWorkProjectInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n cascadeId: z.string().min(1).optional(),\n}).strict();\nexport type RestoreWorkProjectInput = z.infer<typeof RestoreWorkProjectInputSchema>;\n\nexport const RestoreWorkRealmInputSchema = z.object({\n workRealmId: z.string().min(1),\n cascadeId: z.string().min(1).optional(),\n}).strict();\nexport type RestoreWorkRealmInput = z.infer<typeof RestoreWorkRealmInputSchema>;\n\n// The `requireWorkProjectRetitle` / `requireWorkRealmRetitle` callables share this base\n// `{ reason }` shape and each `.extend(...)` it with its own id field at parse time.\nexport const RequireRetitleInputSchema = z.object({\n reason: z.string().min(1).max(MAX_REQUIRE_RETITLE_REASON_LENGTH),\n}).strict();\nexport type RequireRetitleInput = z.infer<typeof RequireRetitleInputSchema>;\n\n// --- Page-level \"Clear text (moderation)\" callables (per-field extension of the retitle family) ---\n\n// The clearable SHELL fields (raw doc field names) for the workProject + workRealm contexts.\n// Derived from the canonical clearable-field map — the two shell surfaces share the same fields.\nconst ModerationShellClearFieldSchema = z.enum(MODERATION_CLEARABLE_TEXT_FIELDS.workProject);\nexport type ModerationShellClearField = z.infer<typeof ModerationShellClearFieldSchema>;\n\nexport const ClearWorkProjectTextInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n fields: z.array(ModerationShellClearFieldSchema).min(1),\n reason: z.string().trim().min(1).max(MAX_REQUIRE_RETITLE_REASON_LENGTH),\n}).strict();\nexport type ClearWorkProjectTextInput = z.infer<typeof ClearWorkProjectTextInputSchema>;\n\nexport const ClearWorkRealmTextInputSchema = z.object({\n workRealmId: z.string().min(1),\n fields: z.array(ModerationShellClearFieldSchema).min(1),\n reason: z.string().trim().min(1).max(MAX_REQUIRE_RETITLE_REASON_LENGTH),\n}).strict();\nexport type ClearWorkRealmTextInput = z.infer<typeof ClearWorkRealmTextInputSchema>;\n\n// The clearable TEXT fields across the whole hall content family — derived from the canonical\n// map (union of every hall surface's fields), never restated literals.\nconst HallClearFieldSchema = z.enum(HALL_CLEARABLE_TEXT_FIELD_NAMES);\nexport type HallClearField = z.infer<typeof HallClearFieldSchema>;\n\nexport const ClearHallContentTextInputSchema = z.object({\n hallItemId: hallItemIdSchema,\n workProjectType: workProjectTypeSchema,\n subItemId: z.string().min(1).optional(),\n fields: z.array(HallClearFieldSchema).min(1),\n reason: z.string().trim().min(1).max(MAX_REQUIRE_RETITLE_REASON_LENGTH),\n}).strict();\nexport type ClearHallContentTextInput = z.infer<typeof ClearHallContentTextInputSchema>;\n\n// --- getLatestHideCascade — resolve the latest hide-cascade id for a Work/Realm ---\n\nexport const GetLatestHideCascadeInputSchema = z.object({\n entityId: z.string().min(1),\n targetType: z.enum(['work-project', 'work-realm']),\n}).strict();\nexport type GetLatestHideCascadeInput = z.infer<typeof GetLatestHideCascadeInputSchema>;\n\n// --- moderateReportedContent — hide / restore / soft perma-remove an individual reported item ---\n\n// The single-item content-action target set (SUBSET of ReportableItemType — excludes the\n// close-out-only hall-library-sub-item).\nconst MODERATE_REPORTED_CONTENT_TARGET_TYPES = [\n 'square-streetz-post',\n 'audition',\n 'audition-entry',\n 'commission-listing',\n 'commission-proposal',\n 'work-asset',\n 'profile-picture',\n 'hall-library-item',\n 'craft-skill',\n // Conversation File — the hide/restore/remove action targets the file owner record +\n // its mediaAsset (the `work-asset` shape), never a chat message.\n 'conversation-file',\n] as const satisfies readonly ReportableItemType[];\n\nexport const ModerateReportedContentInputSchema = z.object({\n reportGroupId: z.string().min(1),\n targetType: z.enum(MODERATE_REPORTED_CONTENT_TARGET_TYPES),\n reportedItemId: z.string().min(1),\n parentItemId: z.string().min(1).optional(),\n action: z.enum(['hide', 'restore', 'remove']),\n // [EUAS-023] A destructive action (hide/remove) MUST carry a reason; restore is a reversal.\n reason: z.string().trim().min(1).max(MAX_INTERNAL_REASON_LENGTH).optional(),\n})\n .strict()\n .superRefine((val, ctx) => {\n if ((val.action === 'hide' || val.action === 'remove') && !val.reason) {\n ctx.addIssue({\n code: 'custom',\n message: 'A reason is required to hide or remove content.',\n path: ['reason'],\n });\n }\n });\nexport type ModerateReportedContentInput = z.infer<typeof ModerateReportedContentInputSchema>;\n\n// --- resolveAdminTask — the ONE guided close-out for EVERY admin case type ---\n\n// [EUAS-005] The content-action target set ALSO accepts hall-library-sub-item (hide/restore only),\n// which routes to the dedicated `runSetHallSubItemHidden` core (not `runModerateReportedContent`).\nconst CONTENT_ACTION_TARGET_TYPES = [\n 'square-streetz-post',\n 'audition',\n 'audition-entry',\n 'commission-listing',\n 'commission-proposal',\n 'work-asset',\n 'profile-picture',\n 'hall-library-item',\n 'craft-skill',\n 'hall-library-sub-item',\n // Conversation File — same content action as `work-asset`, routed at the file record.\n 'conversation-file',\n] as const satisfies readonly ReportableItemType[];\n\nconst ContentActionSchema = z\n .object({\n button: z.enum(['hideContent', 'restoreContent', 'permaRemoveContent']),\n targetType: z.enum(CONTENT_ACTION_TARGET_TYPES),\n reportedItemId: z.string().min(1),\n parentItemId: z.string().min(1).optional(),\n })\n .strict();\n\nconst WarnUserSchema = z\n .object({\n button: z.literal('warnUser'),\n userId: z.string().min(1),\n // A warning IS an admin dispatch (resolveAdminTask → runCreateAdminDispatchToUser),\n // so it shares the dispatch subject/body caps.\n subject: z.string().trim().min(1).max(MAX_ADMIN_DISPATCH_SUBJECT_LENGTH),\n message: z.string().trim().min(1).max(MAX_ADMIN_DISPATCH_INITIAL_TEXT_LENGTH),\n })\n .strict();\n\nconst SuspendOrBanSchema = z\n .object({\n button: z.enum(['suspendUser', 'banUser']),\n userId: z.string().min(1),\n reason: z.string().trim().min(1).max(MAX_INTERNAL_REASON_LENGTH),\n })\n .strict();\n\nconst ReinstateUserSchema = z\n .object({ button: z.literal('reinstateUser'), userId: z.string().min(1), reason: z.string().trim().max(MAX_INTERNAL_REASON_LENGTH).optional() })\n .strict();\n\nconst ForceUsernameResetSchema = z\n .object({ button: z.literal('forceUsernameReset'), userId: z.string().min(1), reason: z.string().trim().min(1).max(MAX_INTERNAL_REASON_LENGTH).optional() })\n .strict();\n\n/** Whole-object Work/Realm remedies — `reportedItemId` is the workProjectId / workRealmId. */\nconst WorkObjectActionSchema = z\n .object({\n button: z.enum(['hideWorkObject', 'restoreWorkObject', 'forceRetitle']),\n targetType: z.enum(['work-project', 'work-realm']),\n reportedItemId: z.string().min(1),\n })\n .strict();\n\n/** Chat message tombstone — channel + seq from the report, revision from the live thread-read. */\nconst TombstoneChatSchema = z\n .object({\n button: z.literal('tombstoneChat'),\n channel: z.discriminatedUnion('kind', [\n z.object({ kind: z.literal('channel'), workProjectId: z.string().min(1), guildChatChannelId: z.string().min(1) }).strict(),\n z.object({ kind: z.literal('invite'), guildInviteId: z.string().min(1) }).strict(),\n ]),\n messageSeq: z.number().int().nonnegative(),\n expectedMessageRevision: z.number().int().nonnegative(),\n })\n .strict();\n\nexport const StagedActionSchema = z.discriminatedUnion('button', [\n ContentActionSchema,\n WarnUserSchema,\n SuspendOrBanSchema,\n ReinstateUserSchema,\n ForceUsernameResetSchema,\n WorkObjectActionSchema,\n TombstoneChatSchema,\n]);\nexport type StagedAction = z.infer<typeof StagedActionSchema>;\n\nexport const NormalReportInputSchema = z\n .object({\n caseType: z.literal('normalReport').default('normalReport'),\n taskId: z.string().min(1),\n outcome: z.enum(['founded', 'unfounded']),\n resolutionSummary: z.string().trim().min(1).max(MAX_SAFETY_RESOLUTION_SUMMARY_LENGTH),\n actions: z.array(StagedActionSchema).max(16).default([]),\n userFacingReasonCode: z.string().trim().min(1).max(128).optional(),\n userFacingReasonDetail: z.string().trim().max(MAX_USER_FACING_REASON_DETAIL_LENGTH).optional(),\n adminNote: z.string().trim().max(MAX_SAFETY_ADMIN_NOTE_LENGTH).optional(),\n })\n .strict();\nexport type ResolveAdminTaskInput = z.infer<typeof NormalReportInputSchema>;\n\nconst SafetyDispositionActionSchema = z\n .object({\n button: z.literal('setReportDisposition'),\n // Derived from the ONE canonical disposition enum — 'undetermined' is the initial\n // state, never an operator-settable target, so it is excluded (not re-declared).\n disposition: ReportDispositionSchema.exclude(['undetermined']),\n dispositionReasonCode: ReportDispositionReasonCodeSchema,\n // Derived from the ONE receipts-cap constant (doc-schemas/safety/evidence.ts) — the same\n // bound the callable + the embedded SetReportDispositionInputV1Schema use. No field-level min:\n // the reportRequired⇒non-empty rule lives in the shared cross-field refinement below, so every\n // other disposition may legally stage this action with no evidence revealed.\n evidenceRefs: z.array(z.string().min(1)).max(MAX_MANIFEST_NCMEC_RECEIPTS),\n expectedRevision: z.number().int().nonnegative(),\n })\n .strict();\n\nconst QuarantineActionSchema = z.object({ button: z.literal('quarantinePreserveFile') }).strict();\n\n// [C-01/EUAS-002] No client-supplied requestId — the linked statutory request id(s) are derived\n// SERVER-SIDE from the case's `requestLinks` inside `enqueueNciiRemovalForCase`.\nconst HashRemoveActionSchema = z.object({ button: z.literal('hashRemoveFile') }).strict();\n\nconst SafetyAccountActionSchema = z\n .object({\n button: z.enum(['suspendUser', 'banUser', 'reinstateUser']),\n targetUid: z.string().min(1),\n reasonInternal: z.string().trim().min(4).max(MAX_INTERNAL_REASON_LENGTH),\n reasonUserFacing: z.string().trim().min(1).max(MAX_USER_FACING_REASON_LENGTH),\n role: ChildSafetyAccountRoleSchema,\n subjectDisposition: ChildSafetyAccountSubjectDispositionSchema,\n })\n .strict();\n\nexport const SafetyStagedActionSchema = z\n .discriminatedUnion('button', [\n SafetyDispositionActionSchema,\n QuarantineActionSchema,\n HashRemoveActionSchema,\n SafetyAccountActionSchema,\n ])\n // The setReportDisposition arm reuses the ONE canonical cross-field rules (foundation.ts) via the\n // shared refinements — never re-declaring them here: the disposition↔reason pairing AND the\n // reportRequired⇒evidence-present rule. Other arms carry no such fields.\n .superRefine((value, ctx) => {\n if (value.button === 'setReportDisposition') {\n refineReportDispositionReasonCode(value, ctx);\n refineReportDispositionEvidenceRefs(value, ctx);\n }\n });\nexport type SafetyStagedAction = z.infer<typeof SafetyStagedActionSchema>;\n\nexport const SafetyCaseInputSchema = z\n .object({\n caseType: z.enum(['csam', 'ncii']),\n caseId: z.string().min(1),\n outcome: z.enum(['founded', 'unfounded']),\n resolutionSummary: z.string().trim().min(1).max(MAX_SAFETY_RESOLUTION_SUMMARY_LENGTH),\n actions: z.array(SafetyStagedActionSchema).max(16).default([]),\n adminNote: z.string().trim().max(MAX_SAFETY_ADMIN_NOTE_LENGTH).optional(),\n // [EUAS-017] Optimistic-concurrency token (`childSafetyCaseList.revision` / `nciiCases.revision`).\n // The close is rejected if the case changed since the operator loaded it — concurrent stale closes\n // can't silently overwrite. Optional for backward compatibility; the console always supplies it.\n expectedRevision: z.number().int().nonnegative().optional(),\n // Interim reauth: a single explicit typed confirmation for the privileged safety actions,\n // standing in for the passkey two-step until [H-17]. The callable is full-admin gated.\n confirmation: z.literal(SAFETY_ACTIONS_CONFIRMATION),\n })\n .strict();\nexport type SafetyCaseInput = z.infer<typeof SafetyCaseInputSchema>;\n\nexport const ReopenSafetyCaseInputSchema = z\n .object({\n caseType: z.enum(['csam', 'ncii']),\n caseId: z.string().min(1),\n reasonInternal: z.string().trim().min(4).max(MAX_INTERNAL_REASON_LENGTH),\n expectedRevision: z.number().int().nonnegative().optional(),\n confirmation: z.literal(SAFETY_CASE_REOPEN_CONFIRMATION),\n })\n .strict();\nexport type ReopenSafetyCaseInput = z.infer<typeof ReopenSafetyCaseInputSchema>;\n\n// ---------------------------------------------------------------------------\n// Dead-letter operations — adminReplayDeadLetter + getDeadLetters (Ops Repairs).\n// ---------------------------------------------------------------------------\n\n/** Every ledger the dead-letter replay callable supports. `hallSubItemEdgeSync`\n * rows live at a 4-segment nested path, so their docId IS the full document path\n * (the callable splits it); every other lane is the flat [collection, docId] tuple. */\nexport const DeadLetterCollectionSchema = z.enum([\n 'chatSyncEvents',\n 'chatAdminActionCommands',\n 'notificationDeliveries',\n 'chatMessageOutbox',\n 'squareAnnouncementJobs',\n 'chatSyncFanoutJobs',\n 'mediaAssets',\n 'quarantineSagaJobs',\n 'nciiRemovalJobs',\n 'safetyEvidenceJobs',\n 'accountActionCommands',\n 'activeReportGroups',\n 'hallSubItemEdgeSync',\n]);\nexport type DeadLetterCollection = z.infer<typeof DeadLetterCollectionSchema>;\n\nexport const AdminReplayDeadLetterInputSchema = z\n .object({\n collection: DeadLetterCollectionSchema,\n // Structural id bound (hallSubItemEdgeSync docIds are full nested paths).\n docId: z.string().min(1).max(200),\n reason: z.string().min(1).max(MAX_INTERNAL_REASON_LENGTH),\n dryRun: z.boolean().optional(),\n })\n .strict();\nexport type AdminReplayDeadLetterInput = z.infer<typeof AdminReplayDeadLetterInputSchema>;\n\nexport const GetDeadLettersInputSchema = z\n .object({\n /** Restrict to one ledger; absent = all supported ledgers. */\n collection: DeadLetterCollectionSchema.optional(),\n /** Per-ledger row cap (the callable's own ceiling applies regardless). */\n limit: z.number().int().min(1).max(200).optional(),\n })\n .strict()\n .nullish();\nexport type GetDeadLettersInput = z.infer<typeof GetDeadLettersInputSchema>;\n\n\n"]}
1
+ {"version":3,"file":"admin.js","sourceRoot":"","sources":["../../src/schemas/admin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,uBAAuB,EACvB,iCAAiC,EACjC,iCAAiC,EACjC,mCAAmC,GAEpC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,4BAA4B,EAC5B,0CAA0C,GAC3C,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EACL,gCAAgC,EAChC,+BAA+B,GAChC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,6BAA6B,EAC7B,iCAAiC,EACjC,sCAAsC,EACtC,0BAA0B,EAC1B,6BAA6B,EAC7B,oCAAoC,EACpC,4BAA4B,EAC5B,4BAA4B,EAC5B,kCAAkC,EAClC,8BAA8B,EAC9B,oCAAoC,EACpC,0BAA0B,EAC1B,+BAA+B,EAC/B,4BAA4B,EAC5B,4BAA4B,EAC5B,8BAA8B,EAC9B,8BAA8B,EAC9B,iCAAiC,EACjC,oCAAoC,GACrC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,2BAA2B,EAC3B,+BAA+B,GAChC,MAAM,6CAA6C,CAAC;AAErD,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AAG1E,MAAM,CAAC,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ProjectTypeSchema,\n} from './atoms.js';\nimport {\n ReportDispositionSchema,\n ReportDispositionReasonCodeSchema,\n refineReportDispositionReasonCode,\n refineReportDispositionEvidenceRefs,\n type ReportableItemType,\n} from '../doc-schemas/safety/foundation.js';\nimport {\n ChildSafetyAccountRoleSchema,\n ChildSafetyAccountSubjectDispositionSchema,\n} from '../doc-schemas/safety/case.js';\nimport {\n ContentMediaKindSchema,\n MediaServingStatusSchema,\n} from '../doc-schemas/media-assets.js';\nimport { MAX_MANIFEST_NCMEC_RECEIPTS } from '../doc-schemas/safety/evidence.js';\nimport {\n MODERATION_CLEARABLE_TEXT_FIELDS,\n HALL_CLEARABLE_TEXT_FIELD_NAMES,\n} from '../constants/business-content.js';\nimport {\n MAX_WORK_PROJECT_TITLE_LENGTH,\n MAX_ADMIN_DISPATCH_SUBJECT_LENGTH,\n MAX_ADMIN_DISPATCH_INITIAL_TEXT_LENGTH,\n MAX_INTERNAL_REASON_LENGTH,\n MAX_USER_FACING_REASON_LENGTH,\n MAX_SAFETY_RESOLUTION_SUMMARY_LENGTH,\n MAX_SAFETY_ADMIN_NOTE_LENGTH,\n MAX_FUTURE_PLAN_TITLE_LENGTH,\n MAX_FUTURE_PLAN_DESCRIPTION_LENGTH,\n MAX_PLATFORM_RULE_TITLE_LENGTH,\n MAX_PLATFORM_RULE_DESCRIPTION_LENGTH,\n MAX_AGREEMENT_POINT_LENGTH,\n MAX_CONTENT_PAGE_HEADING_LENGTH,\n MAX_CONTENT_PAGE_BODY_LENGTH,\n MAX_TAKE_IT_DOWN_COPY_LENGTH,\n MAX_MAINTENANCE_MESSAGE_LENGTH,\n MAX_APPEAL_REVIEW_NOTES_LENGTH,\n MAX_REQUIRE_RETITLE_REASON_LENGTH,\n MAX_USER_FACING_REASON_DETAIL_LENGTH,\n} from '../constants/business.js';\nimport {\n SAFETY_ACTIONS_CONFIRMATION,\n SAFETY_CASE_REOPEN_CONFIRMATION,\n} from '../constants/safety-confirmation-phrases.js';\n\nexport const CheckoutNextImportantTaskInputSchema = z.object({}).strict();\nexport type CheckoutNextImportantTaskInput = z.infer<typeof CheckoutNextImportantTaskInputSchema>;\n\nexport const GetContentViolationInputSchema = z.object({\n violationId: violationIdSchema,\n}).strict();\nexport type GetContentViolationInput = z.infer<typeof GetContentViolationInputSchema>;\n\n// `taskType` was removed — the server derives it from the task doc; the client copy was\n// ignored (and forgeable). Callers pass only the task id + the extension window.\nexport const MarkWorkLaterInputSchema = z.object({\n taskId: taskIdSchema,\n extendHours: z.union([z.literal(24), z.literal(48)]),\n}).strict();\nexport type MarkWorkLaterInput = z.infer<typeof MarkWorkLaterInputSchema>;\n\n/** The two appeal-review decisions (ONE canonical declaration — shared by the review\n * input and its authoritative result). */\nexport const ContentAppealDecisionSchema = z.enum(['approved', 'denied']);\nexport type ContentAppealDecision = z.infer<typeof ContentAppealDecisionSchema>;\n\nexport const ReviewContentAppealInputSchema = z.object({\n violationId: violationIdSchema,\n taskId: taskIdSchema,\n decision: ContentAppealDecisionSchema,\n adminNotes: z.string().max(MAX_APPEAL_REVIEW_NOTES_LENGTH),\n}).strict();\nexport type ReviewContentAppealInput = z.infer<typeof ReviewContentAppealInputSchema>;\n\n// Authoritative result of reviewContentAppeal. Non-strict (server → client posture).\nexport const ReviewContentAppealResultSchema = z.object({\n success: z.literal(true),\n violationId: violationIdSchema,\n /** Echo of the requested decision (always known — it is the input). */\n decision: ContentAppealDecisionSchema,\n /** The appealing user's uid ('' on the orphaned-task cleanup path, where the\n * underlying violation was already gone and only the stale task was cleared). */\n userId: z.string(),\n /** Operation-receipt audit id — the `admin.contentAppealReviewed` event written in the same\n * transaction. Optional/additive so an older backend that omits it still type-checks. */\n auditEventId: z.string().min(1).optional(),\n});\nexport type ReviewContentAppealResult = z.infer<typeof ReviewContentAppealResultSchema>;\n\n// --- System-doc admin updates ---\n\nconst FuturePlanItemSchema = z.object({\n id: z.string().min(1).max(128),\n title: z.string().min(1).max(MAX_FUTURE_PLAN_TITLE_LENGTH),\n description: z.string().min(1).max(MAX_FUTURE_PLAN_DESCRIPTION_LENGTH),\n order: z.number().int().min(0),\n videoUrl: z.string().url().max(2048).optional(),\n mediaType: z.enum(['video', 'image', 'audio', 'other']).optional(),\n}).strict();\n\nexport const UpdateFuturePlansInputSchema = z.object({\n plans: z.array(FuturePlanItemSchema).max(200),\n}).strict();\nexport type UpdateFuturePlansInput = z.infer<typeof UpdateFuturePlansInputSchema>;\n\nconst RuleSchema = z.object({\n id: z.string().min(1).max(128),\n title: z.string().min(1).max(MAX_PLATFORM_RULE_TITLE_LENGTH),\n description: z.string().min(1).max(MAX_PLATFORM_RULE_DESCRIPTION_LENGTH),\n videoUrl: z.string().url().max(2048).optional(),\n group: z.enum(['generic', 'workProjectType', 'hallWingType', 'workRealm', 'merchandising']).optional(),\n subgroup: z.enum(['Tales', 'Tunes', 'Television', 'entertainment', 'educational', 'newsPolitical']).optional(),\n order: z.number().int().min(0),\n}).strict();\n\nconst AgreementCategorySchema = z.object({\n points: z.array(z.string().min(1).max(MAX_AGREEMENT_POINT_LENGTH)).max(200),\n videoUrl: z.string().url().max(2048).optional(),\n}).strict();\n\nconst AgreementsSchema = z.object({\n tales: AgreementCategorySchema.optional(),\n tunes: AgreementCategorySchema.optional(),\n television: AgreementCategorySchema.optional(),\n}).strict();\n\n// Partial update — admin UI may send only `rules` or only `agreements`.\n// Server merges. At least one field must be present.\nexport const UpdateRulesAndAgreementsInputSchema = z.object({\n rules: z.array(RuleSchema).max(500).optional(),\n agreements: AgreementsSchema.optional(),\n}).strict().refine(\n (data) => data.rules !== undefined || data.agreements !== undefined,\n { message: 'At least one of `rules` or `agreements` must be provided.' },\n);\nexport type UpdateRulesAndAgreementsInput = z.infer<typeof UpdateRulesAndAgreementsInputSchema>;\n\n// --- Content-pages migration (DJ ruling 2026-07-06): per-page update callables ---\n// One callable per page (never a `kind` discriminator): updateTermsPage /\n// updatePrivacyPage / updateTakeItDownPageCopy. The client NEVER sends `version`\n// — the server bumps it atomically on every save.\n\nconst ContentPageSectionInputSchema = z.object({\n id: z.string().min(1).max(128),\n heading: z.string().min(1).max(MAX_CONTENT_PAGE_HEADING_LENGTH),\n level: z.union([z.literal(1), z.literal(2)]),\n // Empty body is LEGAL: a bare divider heading (e.g. terms \"Part 1 — Our\n // Intention\") is real content. The input schema must accept everything the\n // stored ContentPageSectionSchema accepts, or a faithfully-seeded doc becomes\n // unsaveable in the admin editor (found by adversarial review 2026-07-06).\n body: z.string().max(MAX_CONTENT_PAGE_BODY_LENGTH),\n order: z.number().int().min(0),\n}).strict();\n\nexport const UpdateTermsPageInputSchema = z.object({\n sections: z.array(ContentPageSectionInputSchema).min(1).max(300),\n}).strict();\nexport type UpdateTermsPageInput = z.infer<typeof UpdateTermsPageInputSchema>;\n\nexport const UpdatePrivacyPageInputSchema = z.object({\n sections: z.array(ContentPageSectionInputSchema).min(1).max(300),\n}).strict();\nexport type UpdatePrivacyPageInput = z.infer<typeof UpdatePrivacyPageInputSchema>;\n\nexport const UpdateTakeItDownPageCopyInputSchema = z.object({\n strings: z.record(z.string().min(1).max(128), z.string().min(1).max(MAX_TAKE_IT_DOWN_COPY_LENGTH)),\n}).strict().refine(\n (data) => {\n const count = Object.keys(data.strings).length;\n return count >= 1 && count <= 200;\n },\n { message: 'strings must contain between 1 and 200 entries.' },\n);\nexport type UpdateTakeItDownPageCopyInput = z.infer<typeof UpdateTakeItDownPageCopyInputSchema>;\n\nconst AppConfigDocIdSchema = z.literal('app');\n\nexport const UpdateAppConfigInputSchema = z.object({\n docId: AppConfigDocIdSchema,\n data: z.object({\n appVersion: z.string().min(1).max(64).optional(),\n maintenanceMode: z.boolean().optional(),\n maintenanceMessage: z.string().max(MAX_MAINTENANCE_MESSAGE_LENGTH).optional(),\n registrationEnabled: z.boolean().optional(),\n // Runtime abuse throttle: 0 < m <= 1 (tighten-only; 1 = no throttle).\n rateLimitMultiplier: z.number().gt(0).max(1).optional(),\n }).strict().refine(\n (d) => Object.keys(d).length > 0,\n { message: 'data must have at least one field' },\n ),\n}).strict();\nexport type UpdateAppConfigInput = z.infer<typeof UpdateAppConfigInputSchema>;\n\n// --- Admin list mutations ---\n\nconst uidSchema = z.string().min(1).max(128);\n\n/**\n * Wire input for the `updateAdminList` callable in ttt-prod.\n * Used to grant or revoke admin / jrAdmin status on `_systemData/adminList`.\n *\n * All four fields are optional arrays of UIDs. At least one must be non-empty.\n * The callable's core function rejects conflicting input (e.g. same UID in\n * both addAdmins and removeAdmins) with HttpsError invalid-argument.\n */\nexport const UpdateAdminListInputSchema = z.object({\n addAdmins: z.array(uidSchema).optional(),\n removeAdmins: z.array(uidSchema).optional(),\n addJrAdmins: z.array(uidSchema).optional(),\n removeJrAdmins: z.array(uidSchema).optional(),\n})\n .strict()\n .refine(\n (data) =>\n (data.addAdmins?.length ?? 0) +\n (data.removeAdmins?.length ?? 0) +\n (data.addJrAdmins?.length ?? 0) +\n (data.removeJrAdmins?.length ?? 0) >\n 0,\n { message: 'At least one of addAdmins/removeAdmins/addJrAdmins/removeJrAdmins must be non-empty.' },\n );\n\nexport type UpdateAdminListInput = z.infer<typeof UpdateAdminListInputSchema>;\n\n// Authoritative result of updateAdminList — the grant/revoke delta counts computed inside\n// the roster transaction (uids already in their target state are no-ops and not counted).\n// Non-strict (server → client result posture).\nexport const UpdateAdminListResultSchema = z.object({\n success: z.literal(true),\n adminsGranted: z.number().int().nonnegative(),\n adminsRevoked: z.number().int().nonnegative(),\n jrAdminsGranted: z.number().int().nonnegative(),\n jrAdminsRevoked: z.number().int().nonnegative(),\n /** Operation-receipt audit id — the `admin.systemRoleGranted` / `admin.systemRoleRevoked`\n * event(s) key off the same roster transaction. Optional/additive. (No single domain id: a\n * roster edit spans multiple uids, so only the audit id is a meaningful receipt handle.) */\n auditEventId: z.string().min(1).optional(),\n});\nexport type UpdateAdminListResult = z.infer<typeof UpdateAdminListResultSchema>;\n\n// --- Admin moderation: hide / restore / retitle content + Work/Realm objects ---\n\nexport const CheckTrademarkInputSchema = z.object({\n // Primary: the work project's title (franchise-level check).\n workTitle: z.string().min(1).max(MAX_WORK_PROJECT_TITLE_LENGTH),\n // Optional: the sub-item title (chapter, track, episode). Checked secondarily.\n // `.nullish()` (not `.optional()`): the Firebase callable client serializes an\n // undefined argument as JSON null, and the work-view caller passes\n // `subItemTitle: subItem?.title` which is undefined when the sub-item hasn't\n // loaded — that arrives here as null. A bare `.optional()` would 400 on it.\n subItemTitle: z.string().max(MAX_WORK_PROJECT_TITLE_LENGTH).nullish(),\n}).strict();\nexport type CheckTrademarkInput = z.infer<typeof CheckTrademarkInputSchema>;\n\nexport const GetReportedContentDetailInputSchema = z.object({\n reportGroupId: z.string().min(1),\n}).strict();\nexport type GetReportedContentDetailInput = z.infer<typeof GetReportedContentDetailInputSchema>;\n\n// --- getReportedContentDetail result (cross-boundary: produced by the callable in functions/,\n// consumed by the admin report work-view) ---\n\n/** One display-text field of the reported doc, labeled for the review panel. The server returns\n * EVERY configured non-empty text field for the item type (title, description, body, …) in\n * display order — never just the first non-empty one. */\nexport const ReportedTextFieldSchema = z.object({\n /** Raw doc field name (e.g. 'description', 'workingTitle'). */\n field: z.string().min(1),\n /** Human label the panel renders (e.g. 'Description', 'Title'). */\n label: z.string().min(1),\n /** Current live value, trimmed; empty fields are omitted from the array. */\n value: z.string().min(1),\n});\nexport type ReportedTextField = z.infer<typeof ReportedTextFieldSchema>;\n\n/** One media asset referenced by the reported content: id + kind + current serving state\n * (for click-to-reveal) + the server-derived variant key the reveal must request. */\nexport const ReportedMediaAssetSchema = z.object({\n mediaAssetId: z.string().min(1),\n mediaKind: ContentMediaKindSchema.nullable(),\n servingStatus: MediaServingStatusSchema.nullable(),\n /** The variant key the reveal must request for its single display render (image origins split\n * between 'full' and 'main'; video/audio are always 'main'). Null when the asset doc is\n * missing/variant-less. */\n displayVariantKey: z.string().nullable(),\n /** Human label of WHAT this asset is on the reported item (e.g. 'Square cover',\n * 'Track photo — <title>'). Null when the server cannot derive one. */\n label: z.string().nullable(),\n});\nexport type ReportedMediaAsset = z.infer<typeof ReportedMediaAssetSchema>;\n\nexport const GetReportedContentDetailResultSchema = z.object({\n itemType: z.string().min(1),\n reportedItemId: z.string().min(1),\n /** First non-empty display-text field (legacy single-field snapshot; textFields is the\n * complete labeled set). */\n textSnapshot: z.string().nullable(),\n textFields: z.array(ReportedTextFieldSchema),\n mediaAssets: z.array(ReportedMediaAssetSchema),\n /** Whether the reported doc is currently hidden (best-effort, doc-flag based). */\n isHidden: z.boolean().nullable(),\n /** The content owner / uploader uid, when derivable. */\n ownerUid: z.string().nullable(),\n /** The FROZEN report-time snapshot (captured at intake), so the operator sees what was\n * reported even if the author edited the live doc to evade. Null for older reports. */\n reportTimeSnapshot: z.object({\n capturedText: z.string().nullable(),\n capturedMediaAssetIds: z.array(z.string()),\n revision: z.number().nullable(),\n capturedAt: z.number().nullable(),\n }).nullable(),\n});\nexport type GetReportedContentDetailResult = z.infer<typeof GetReportedContentDetailResultSchema>;\n\nexport const HideHallSubItemInputSchema = z.object({\n hallItemId: hallItemIdSchema,\n workProjectType: workProjectTypeSchema,\n subItemId: z.string().min(1),\n reason: z.string().min(1),\n}).strict();\nexport type HideHallSubItemInput = z.infer<typeof HideHallSubItemInputSchema>;\n\nexport const RestoreHallSubItemInputSchema = z.object({\n hallItemId: hallItemIdSchema,\n workProjectType: workProjectTypeSchema,\n subItemId: z.string().min(1),\n}).strict();\nexport type RestoreHallSubItemInput = z.infer<typeof RestoreHallSubItemInputSchema>;\n\nexport const HideWorkProjectInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n reason: z.string().min(1),\n}).strict();\nexport type HideWorkProjectInput = z.infer<typeof HideWorkProjectInputSchema>;\n\nexport const HideWorkRealmInputSchema = z.object({\n workRealmId: z.string().min(1),\n reason: z.string().min(1),\n}).strict();\nexport type HideWorkRealmInput = z.infer<typeof HideWorkRealmInputSchema>;\n\n// `cascadeId` is OPTIONAL: the app backends derive all active cascades for the target when it is\n// omitted, and restore just that one cascade when it is supplied.\nexport const RestoreWorkProjectInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n cascadeId: z.string().min(1).optional(),\n}).strict();\nexport type RestoreWorkProjectInput = z.infer<typeof RestoreWorkProjectInputSchema>;\n\nexport const RestoreWorkRealmInputSchema = z.object({\n workRealmId: z.string().min(1),\n cascadeId: z.string().min(1).optional(),\n}).strict();\nexport type RestoreWorkRealmInput = z.infer<typeof RestoreWorkRealmInputSchema>;\n\n// The `requireWorkProjectRetitle` / `requireWorkRealmRetitle` callables share this base\n// `{ reason }` shape and each `.extend(...)` it with its own id field at parse time.\nexport const RequireRetitleInputSchema = z.object({\n reason: z.string().min(1).max(MAX_REQUIRE_RETITLE_REASON_LENGTH),\n}).strict();\nexport type RequireRetitleInput = z.infer<typeof RequireRetitleInputSchema>;\n\n// --- Page-level \"Clear text (moderation)\" callables (per-field extension of the retitle family) ---\n\n// The clearable SHELL fields (raw doc field names) for the workProject + workRealm contexts.\n// Derived from the canonical clearable-field map — the two shell surfaces share the same fields.\nconst ModerationShellClearFieldSchema = z.enum(MODERATION_CLEARABLE_TEXT_FIELDS.workProject);\nexport type ModerationShellClearField = z.infer<typeof ModerationShellClearFieldSchema>;\n\nexport const ClearWorkProjectTextInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n fields: z.array(ModerationShellClearFieldSchema).min(1),\n reason: z.string().trim().min(1).max(MAX_REQUIRE_RETITLE_REASON_LENGTH),\n}).strict();\nexport type ClearWorkProjectTextInput = z.infer<typeof ClearWorkProjectTextInputSchema>;\n\nexport const ClearWorkRealmTextInputSchema = z.object({\n workRealmId: z.string().min(1),\n fields: z.array(ModerationShellClearFieldSchema).min(1),\n reason: z.string().trim().min(1).max(MAX_REQUIRE_RETITLE_REASON_LENGTH),\n}).strict();\nexport type ClearWorkRealmTextInput = z.infer<typeof ClearWorkRealmTextInputSchema>;\n\n// The clearable TEXT fields across the whole hall content family — derived from the canonical\n// map (union of every hall surface's fields), never restated literals.\nconst HallClearFieldSchema = z.enum(HALL_CLEARABLE_TEXT_FIELD_NAMES);\nexport type HallClearField = z.infer<typeof HallClearFieldSchema>;\n\nexport const ClearHallContentTextInputSchema = z.object({\n hallItemId: hallItemIdSchema,\n workProjectType: workProjectTypeSchema,\n subItemId: z.string().min(1).optional(),\n fields: z.array(HallClearFieldSchema).min(1),\n reason: z.string().trim().min(1).max(MAX_REQUIRE_RETITLE_REASON_LENGTH),\n}).strict();\nexport type ClearHallContentTextInput = z.infer<typeof ClearHallContentTextInputSchema>;\n\n// --- getLatestHideCascade — resolve the latest hide-cascade id for a Work/Realm ---\n\nexport const GetLatestHideCascadeInputSchema = z.object({\n entityId: z.string().min(1),\n targetType: z.enum(['work-project', 'work-realm']),\n}).strict();\nexport type GetLatestHideCascadeInput = z.infer<typeof GetLatestHideCascadeInputSchema>;\n\n// --- moderateReportedContent — hide / restore / soft perma-remove an individual reported item ---\n\n// The single-item content-action target set (SUBSET of ReportableItemType — excludes the\n// close-out-only hall-library-sub-item).\nconst MODERATE_REPORTED_CONTENT_TARGET_TYPES = [\n 'square-streetz-post',\n 'audition',\n 'audition-entry',\n 'commission-listing',\n 'commission-proposal',\n 'work-asset',\n 'profile-picture',\n 'hall-library-item',\n 'craft-skill',\n // Conversation File — the hide/restore/remove action targets the file owner record +\n // its mediaAsset (the `work-asset` shape), never a chat message.\n 'conversation-file',\n] as const satisfies readonly ReportableItemType[];\n\nexport const ModerateReportedContentInputSchema = z.object({\n reportGroupId: z.string().min(1),\n targetType: z.enum(MODERATE_REPORTED_CONTENT_TARGET_TYPES),\n reportedItemId: z.string().min(1),\n parentItemId: z.string().min(1).optional(),\n action: z.enum(['hide', 'restore', 'remove']),\n // [EUAS-023] A destructive action (hide/remove) MUST carry a reason; restore is a reversal.\n reason: z.string().trim().min(1).max(MAX_INTERNAL_REASON_LENGTH).optional(),\n})\n .strict()\n .superRefine((val, ctx) => {\n if ((val.action === 'hide' || val.action === 'remove') && !val.reason) {\n ctx.addIssue({\n code: 'custom',\n message: 'A reason is required to hide or remove content.',\n path: ['reason'],\n });\n }\n });\nexport type ModerateReportedContentInput = z.infer<typeof ModerateReportedContentInputSchema>;\n\n// --- resolveAdminTask — the ONE guided close-out for EVERY admin case type ---\n\n// [EUAS-005] The content-action target set ALSO accepts hall-library-sub-item (hide/restore only),\n// which routes to the dedicated `runSetHallSubItemHidden` core (not `runModerateReportedContent`).\nconst CONTENT_ACTION_TARGET_TYPES = [\n 'square-streetz-post',\n 'audition',\n 'audition-entry',\n 'commission-listing',\n 'commission-proposal',\n 'work-asset',\n 'profile-picture',\n 'hall-library-item',\n 'craft-skill',\n 'hall-library-sub-item',\n // Conversation File — same content action as `work-asset`, routed at the file record.\n 'conversation-file',\n] as const satisfies readonly ReportableItemType[];\n\nconst ContentActionSchema = z\n .object({\n button: z.enum(['hideContent', 'restoreContent', 'permaRemoveContent']),\n targetType: z.enum(CONTENT_ACTION_TARGET_TYPES),\n reportedItemId: z.string().min(1),\n parentItemId: z.string().min(1).optional(),\n })\n .strict();\n\nconst WarnUserSchema = z\n .object({\n button: z.literal('warnUser'),\n userId: z.string().min(1),\n // A warning IS an admin dispatch (resolveAdminTask → runCreateAdminDispatchToUser),\n // so it shares the dispatch subject/body caps.\n subject: z.string().trim().min(1).max(MAX_ADMIN_DISPATCH_SUBJECT_LENGTH),\n message: z.string().trim().min(1).max(MAX_ADMIN_DISPATCH_INITIAL_TEXT_LENGTH),\n })\n .strict();\n\nconst SuspendOrBanSchema = z\n .object({\n button: z.enum(['suspendUser', 'banUser']),\n userId: z.string().min(1),\n reason: z.string().trim().min(1).max(MAX_INTERNAL_REASON_LENGTH),\n })\n .strict();\n\nconst ReinstateUserSchema = z\n .object({ button: z.literal('reinstateUser'), userId: z.string().min(1), reason: z.string().trim().max(MAX_INTERNAL_REASON_LENGTH).optional() })\n .strict();\n\nconst ForceUsernameResetSchema = z\n .object({ button: z.literal('forceUsernameReset'), userId: z.string().min(1), reason: z.string().trim().min(1).max(MAX_INTERNAL_REASON_LENGTH).optional() })\n .strict();\n\n/** Whole-object Work/Realm remedies — `reportedItemId` is the workProjectId / workRealmId. */\nconst WorkObjectActionSchema = z\n .object({\n button: z.enum(['hideWorkObject', 'restoreWorkObject', 'forceRetitle']),\n targetType: z.enum(['work-project', 'work-realm']),\n reportedItemId: z.string().min(1),\n })\n .strict();\n\n// --- The in-flow clear-content disposition (staged counterpart of the page-level clear-text\n// callables) ---\n\n/** The three targets the in-flow text clear can neutralize — the Work/Realm shells plus a single\n * published hall sub-item. Compile-linked subset of the canonical reportable-item enum. */\nconst CLEAR_CONTENT_TEXT_TARGET_TYPES = [\n 'work-project',\n 'work-realm',\n 'hall-library-sub-item',\n] as const satisfies readonly ReportableItemType[];\nexport type ClearContentTextTargetType = (typeof CLEAR_CONTENT_TEXT_TARGET_TYPES)[number];\n\n/** Every field name the staged clear can carry across those three targets — the union of the two\n * canonical clearable owners (`MODERATION_CLEARABLE_TEXT_FIELDS` for the shells,\n * `HALL_CLEARABLE_TEXT_FIELD_NAMES` for the hall family), i.e. the same two sources\n * `ClearWorkProjectTextInputSchema` / `ClearHallContentTextInputSchema` derive from. No field\n * literal is restated here. */\nconst CLEAR_CONTENT_TEXT_FIELDS = [\n ...MODERATION_CLEARABLE_TEXT_FIELDS.workProject,\n ...HALL_CLEARABLE_TEXT_FIELD_NAMES,\n] as const;\nconst ClearContentTextFieldSchema = z.enum(CLEAR_CONTENT_TEXT_FIELDS);\nexport type ClearContentTextField = z.infer<typeof ClearContentTextFieldSchema>;\n\n/** Which fields each target legally accepts — projected from those same owners, so a\n * target/field mismatch is refused at the wire instead of reaching a clear runner that would\n * drop it. Enforced by the cross-field refinement on `StagedActionSchema` below. */\nconst CLEAR_CONTENT_TEXT_FIELDS_BY_TARGET = {\n 'work-project': MODERATION_CLEARABLE_TEXT_FIELDS.workProject,\n 'work-realm': MODERATION_CLEARABLE_TEXT_FIELDS.workRealm,\n 'hall-library-sub-item': HALL_CLEARABLE_TEXT_FIELD_NAMES,\n} as const satisfies Record<ClearContentTextTargetType, readonly ClearContentTextField[]>;\n\n/** Per-field text clear — the guided close-out's staged counterpart of the page-level\n * `clearWorkProjectText` / `clearWorkRealmText` / `clearHallContentText` callables (the\n * per-field extension of `forceRetitle`). `reportedItemId` is the workProjectId / workRealmId /\n * sub-item id; `parentItemId` is the parent hall item id, required only for the sub-item target.\n * `workProjectType` is deliberately NOT on the wire — the server re-reads it from the doc (the\n * hall hide-branch precedent). */\nconst ClearContentTextActionSchema = z\n .object({\n button: z.literal('clearContentText'),\n targetType: z.enum(CLEAR_CONTENT_TEXT_TARGET_TYPES),\n reportedItemId: z.string().min(1),\n parentItemId: z.string().min(1).optional(),\n fields: z.array(ClearContentTextFieldSchema).min(1),\n })\n .strict();\n\n/** Chat message tombstone — channel + seq from the report, revision from the live thread-read. */\nconst TombstoneChatSchema = z\n .object({\n button: z.literal('tombstoneChat'),\n channel: z.discriminatedUnion('kind', [\n z.object({ kind: z.literal('channel'), workProjectId: z.string().min(1), guildChatChannelId: z.string().min(1) }).strict(),\n z.object({ kind: z.literal('invite'), guildInviteId: z.string().min(1) }).strict(),\n ]),\n messageSeq: z.number().int().nonnegative(),\n expectedMessageRevision: z.number().int().nonnegative(),\n })\n .strict();\n\nexport const StagedActionSchema = z\n .discriminatedUnion('button', [\n ContentActionSchema,\n WarnUserSchema,\n SuspendOrBanSchema,\n ReinstateUserSchema,\n ForceUsernameResetSchema,\n WorkObjectActionSchema,\n ClearContentTextActionSchema,\n TombstoneChatSchema,\n ])\n // The clearContentText arm's two cross-field rules, applied at the union (the\n // SafetyStagedActionSchema pattern below) because no other arm carries these fields:\n // every chosen field must belong to the chosen target's canonical clearable set, and the\n // hall sub-item target must name its parent hall item.\n .superRefine((value, ctx) => {\n if (value.button !== 'clearContentText') return;\n const clearable: readonly string[] = CLEAR_CONTENT_TEXT_FIELDS_BY_TARGET[value.targetType];\n value.fields.forEach((field, index) => {\n if (!clearable.includes(field)) {\n ctx.addIssue({\n code: 'custom',\n message: `Field '${field}' is not clearable on a '${value.targetType}' target.`,\n path: ['fields', index],\n });\n }\n });\n if (value.targetType === 'hall-library-sub-item' && !value.parentItemId) {\n ctx.addIssue({\n code: 'custom',\n message: 'parentItemId (the parent hall item id) is required for a hall sub-item target.',\n path: ['parentItemId'],\n });\n }\n });\nexport type StagedAction = z.infer<typeof StagedActionSchema>;\n\nexport const NormalReportInputSchema = z\n .object({\n caseType: z.literal('normalReport').default('normalReport'),\n taskId: z.string().min(1),\n outcome: z.enum(['founded', 'unfounded']),\n resolutionSummary: z.string().trim().min(1).max(MAX_SAFETY_RESOLUTION_SUMMARY_LENGTH),\n actions: z.array(StagedActionSchema).max(16).default([]),\n userFacingReasonCode: z.string().trim().min(1).max(128).optional(),\n userFacingReasonDetail: z.string().trim().max(MAX_USER_FACING_REASON_DETAIL_LENGTH).optional(),\n adminNote: z.string().trim().max(MAX_SAFETY_ADMIN_NOTE_LENGTH).optional(),\n })\n .strict();\nexport type ResolveAdminTaskInput = z.infer<typeof NormalReportInputSchema>;\n\nconst SafetyDispositionActionSchema = z\n .object({\n button: z.literal('setReportDisposition'),\n // Derived from the ONE canonical disposition enum — 'undetermined' is the initial\n // state, never an operator-settable target, so it is excluded (not re-declared).\n disposition: ReportDispositionSchema.exclude(['undetermined']),\n dispositionReasonCode: ReportDispositionReasonCodeSchema,\n // Derived from the ONE receipts-cap constant (doc-schemas/safety/evidence.ts) — the same\n // bound the callable + the embedded SetReportDispositionInputV1Schema use. No field-level min:\n // the reportRequired⇒non-empty rule lives in the shared cross-field refinement below, so every\n // other disposition may legally stage this action with no evidence revealed.\n evidenceRefs: z.array(z.string().min(1)).max(MAX_MANIFEST_NCMEC_RECEIPTS),\n expectedRevision: z.number().int().nonnegative(),\n })\n .strict();\n\nconst QuarantineActionSchema = z.object({ button: z.literal('quarantinePreserveFile') }).strict();\n\n// [C-01/EUAS-002] No client-supplied requestId — the linked statutory request id(s) are derived\n// SERVER-SIDE from the case's `requestLinks` inside `enqueueNciiRemovalForCase`.\nconst HashRemoveActionSchema = z.object({ button: z.literal('hashRemoveFile') }).strict();\n\nconst SafetyAccountActionSchema = z\n .object({\n button: z.enum(['suspendUser', 'banUser', 'reinstateUser']),\n targetUid: z.string().min(1),\n reasonInternal: z.string().trim().min(4).max(MAX_INTERNAL_REASON_LENGTH),\n reasonUserFacing: z.string().trim().min(1).max(MAX_USER_FACING_REASON_LENGTH),\n role: ChildSafetyAccountRoleSchema,\n subjectDisposition: ChildSafetyAccountSubjectDispositionSchema,\n })\n .strict();\n\nexport const SafetyStagedActionSchema = z\n .discriminatedUnion('button', [\n SafetyDispositionActionSchema,\n QuarantineActionSchema,\n HashRemoveActionSchema,\n SafetyAccountActionSchema,\n ])\n // The setReportDisposition arm reuses the ONE canonical cross-field rules (foundation.ts) via the\n // shared refinements — never re-declaring them here: the disposition↔reason pairing AND the\n // reportRequired⇒evidence-present rule. Other arms carry no such fields.\n .superRefine((value, ctx) => {\n if (value.button === 'setReportDisposition') {\n refineReportDispositionReasonCode(value, ctx);\n refineReportDispositionEvidenceRefs(value, ctx);\n }\n });\nexport type SafetyStagedAction = z.infer<typeof SafetyStagedActionSchema>;\n\nexport const SafetyCaseInputSchema = z\n .object({\n caseType: z.enum(['csam', 'ncii']),\n caseId: z.string().min(1),\n outcome: z.enum(['founded', 'unfounded']),\n resolutionSummary: z.string().trim().min(1).max(MAX_SAFETY_RESOLUTION_SUMMARY_LENGTH),\n actions: z.array(SafetyStagedActionSchema).max(16).default([]),\n adminNote: z.string().trim().max(MAX_SAFETY_ADMIN_NOTE_LENGTH).optional(),\n // [EUAS-017] Optimistic-concurrency token (`childSafetyCaseList.revision` / `nciiCases.revision`).\n // The close is rejected if the case changed since the operator loaded it — concurrent stale closes\n // can't silently overwrite. Optional for backward compatibility; the console always supplies it.\n expectedRevision: z.number().int().nonnegative().optional(),\n // Interim reauth: a single explicit typed confirmation for the privileged safety actions,\n // standing in for the passkey two-step until [H-17]. The callable is full-admin gated.\n confirmation: z.literal(SAFETY_ACTIONS_CONFIRMATION),\n })\n .strict();\nexport type SafetyCaseInput = z.infer<typeof SafetyCaseInputSchema>;\n\nexport const ReopenSafetyCaseInputSchema = z\n .object({\n caseType: z.enum(['csam', 'ncii']),\n caseId: z.string().min(1),\n reasonInternal: z.string().trim().min(4).max(MAX_INTERNAL_REASON_LENGTH),\n expectedRevision: z.number().int().nonnegative().optional(),\n confirmation: z.literal(SAFETY_CASE_REOPEN_CONFIRMATION),\n })\n .strict();\nexport type ReopenSafetyCaseInput = z.infer<typeof ReopenSafetyCaseInputSchema>;\n\n// ---------------------------------------------------------------------------\n// Dead-letter operations — adminReplayDeadLetter + getDeadLetters (Ops Repairs).\n// ---------------------------------------------------------------------------\n\n/** Every ledger the dead-letter replay callable supports. `hallSubItemEdgeSync`\n * rows live at a 4-segment nested path, so their docId IS the full document path\n * (the callable splits it); every other lane is the flat [collection, docId] tuple. */\nexport const DeadLetterCollectionSchema = z.enum([\n 'chatSyncEvents',\n 'chatAdminActionCommands',\n 'notificationDeliveries',\n 'chatMessageOutbox',\n 'squareAnnouncementJobs',\n 'chatSyncFanoutJobs',\n 'mediaAssets',\n 'quarantineSagaJobs',\n 'nciiRemovalJobs',\n 'safetyEvidenceJobs',\n 'accountActionCommands',\n 'activeReportGroups',\n 'hallSubItemEdgeSync',\n]);\nexport type DeadLetterCollection = z.infer<typeof DeadLetterCollectionSchema>;\n\nexport const AdminReplayDeadLetterInputSchema = z\n .object({\n collection: DeadLetterCollectionSchema,\n // Structural id bound (hallSubItemEdgeSync docIds are full nested paths).\n docId: z.string().min(1).max(200),\n reason: z.string().min(1).max(MAX_INTERNAL_REASON_LENGTH),\n dryRun: z.boolean().optional(),\n })\n .strict();\nexport type AdminReplayDeadLetterInput = z.infer<typeof AdminReplayDeadLetterInputSchema>;\n\nexport const GetDeadLettersInputSchema = z\n .object({\n /** Restrict to one ledger; absent = all supported ledgers. */\n collection: DeadLetterCollectionSchema.optional(),\n /** Per-ledger row cap (the callable's own ceiling applies regardless). */\n limit: z.number().int().min(1).max(200).optional(),\n })\n .strict()\n .nullish();\nexport type GetDeadLettersInput = z.infer<typeof GetDeadLettersInputSchema>;\n\n\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttt-productions/ttt-core",
3
- "version": "0.79.7",
3
+ "version": "0.79.9",
4
4
  "description": "Core types, Firestore path constants, and shared constants for TTT Productions",
5
5
  "repository": {
6
6
  "type": "git",