@ttt-productions/ttt-core 0.79.29 → 0.79.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants/business-admin.d.ts +1 -1
- package/dist/constants/business-admin.js +1 -1
- package/dist/constants/business-admin.js.map +1 -1
- package/dist/doc-schemas/audit.d.ts.map +1 -1
- package/dist/doc-schemas/audit.js +2 -1
- package/dist/doc-schemas/audit.js.map +1 -1
- package/dist/doc-schemas/chat-sync.d.ts.map +1 -1
- package/dist/doc-schemas/chat-sync.js +2 -1
- package/dist/doc-schemas/chat-sync.js.map +1 -1
- package/dist/doc-schemas/content.d.ts +10 -2
- package/dist/doc-schemas/content.d.ts.map +1 -1
- package/dist/doc-schemas/content.js +9 -2
- package/dist/doc-schemas/content.js.map +1 -1
- package/dist/doc-schemas/index.d.ts +1 -0
- package/dist/doc-schemas/index.d.ts.map +1 -1
- package/dist/doc-schemas/index.js +1 -0
- package/dist/doc-schemas/index.js.map +1 -1
- package/dist/doc-schemas/messaging.d.ts +1 -1
- package/dist/doc-schemas/ncii/config.d.ts +4 -4
- package/dist/doc-schemas/ncii/config.d.ts.map +1 -1
- package/dist/doc-schemas/ncii/config.js +8 -8
- package/dist/doc-schemas/ncii/config.js.map +1 -1
- package/dist/doc-schemas/ncii/requests.d.ts +31 -0
- package/dist/doc-schemas/ncii/requests.d.ts.map +1 -1
- package/dist/doc-schemas/ncii/requests.js +15 -0
- package/dist/doc-schemas/ncii/requests.js.map +1 -1
- package/dist/doc-schemas/notification-archive-all-jobs.d.ts +51 -0
- package/dist/doc-schemas/notification-archive-all-jobs.d.ts.map +1 -0
- package/dist/doc-schemas/notification-archive-all-jobs.js +69 -0
- package/dist/doc-schemas/notification-archive-all-jobs.js.map +1 -0
- package/dist/doc-schemas/registry.d.ts +64 -1
- package/dist/doc-schemas/registry.d.ts.map +1 -1
- package/dist/doc-schemas/registry.js +8 -3
- package/dist/doc-schemas/registry.js.map +1 -1
- package/dist/doc-schemas/safety/age.d.ts +1 -1
- package/dist/doc-schemas/safety/age.js +3 -3
- package/dist/doc-schemas/safety/age.js.map +1 -1
- package/dist/doc-schemas/safety/report.d.ts +8 -0
- package/dist/doc-schemas/safety/report.d.ts.map +1 -1
- package/dist/doc-schemas/safety/report.js +7 -0
- package/dist/doc-schemas/safety/report.js.map +1 -1
- package/dist/doc-schemas/system.js +1 -1
- package/dist/doc-schemas/system.js.map +1 -1
- package/dist/media/media-asset-url.d.ts +2 -0
- package/dist/media/media-asset-url.d.ts.map +1 -1
- package/dist/media/media-asset-url.js +5 -1
- package/dist/media/media-asset-url.js.map +1 -1
- package/dist/paths/collections.d.ts +8 -1
- package/dist/paths/collections.d.ts.map +1 -1
- package/dist/paths/collections.js +27 -3
- package/dist/paths/collections.js.map +1 -1
- package/dist/paths/path-builders.d.ts +8 -0
- package/dist/paths/path-builders.d.ts.map +1 -1
- package/dist/paths/path-builders.js +20 -1
- package/dist/paths/path-builders.js.map +1 -1
- package/dist/schemas/atoms.d.ts +6 -0
- package/dist/schemas/atoms.d.ts.map +1 -1
- package/dist/schemas/atoms.js +5 -0
- package/dist/schemas/atoms.js.map +1 -1
- package/dist/schemas/notification.d.ts +4 -4
- package/dist/types/audit.d.ts +2 -1
- package/dist/types/audit.d.ts.map +1 -1
- package/dist/types/audit.js.map +1 -1
- package/dist/types/system.d.ts +1 -1
- package/dist/types/system.js.map +1 -1
- package/package.json +2 -2
|
@@ -82,7 +82,7 @@ export declare const MAX_CONTENT_PAGE_HEADING_LENGTH = 300;
|
|
|
82
82
|
export declare const MAX_CONTENT_PAGE_BODY_LENGTH = 20000;
|
|
83
83
|
export declare const MAX_TAKE_IT_DOWN_COPY_LENGTH = 8000;
|
|
84
84
|
export declare const MAX_MAINTENANCE_MESSAGE_LENGTH = 2000;
|
|
85
|
-
/** Announcement-banner copy on `
|
|
85
|
+
/** Announcement-banner copy on `_appConfig/app.announcementMessage`. Deliberately far
|
|
86
86
|
* shorter than the maintenance message: the announcement renders as a one-line banner
|
|
87
87
|
* on the landing page and login screen, not a full-page takeover. */
|
|
88
88
|
export declare const MAX_ANNOUNCEMENT_MESSAGE_LENGTH = 300;
|
|
@@ -97,7 +97,7 @@ export const MAX_CONTENT_PAGE_HEADING_LENGTH = 300;
|
|
|
97
97
|
export const MAX_CONTENT_PAGE_BODY_LENGTH = 20000;
|
|
98
98
|
export const MAX_TAKE_IT_DOWN_COPY_LENGTH = 8000;
|
|
99
99
|
export const MAX_MAINTENANCE_MESSAGE_LENGTH = 2000;
|
|
100
|
-
/** Announcement-banner copy on `
|
|
100
|
+
/** Announcement-banner copy on `_appConfig/app.announcementMessage`. Deliberately far
|
|
101
101
|
* shorter than the maintenance message: the announcement renders as a one-line banner
|
|
102
102
|
* on the landing page and login screen, not a full-page takeover. */
|
|
103
103
|
export const MAX_ANNOUNCEMENT_MESSAGE_LENGTH = 300;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business-admin.js","sourceRoot":"","sources":["../../src/constants/business-admin.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,8DAA8D;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,qCAAqC;AAErC,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,QAAQ,EAAE,CAAC;IACX,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,CAAC;IACT,GAAG,EAAE,CAAC;CACE,CAAC;AAIX,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,CAAC,EAAE,UAAU;IACb,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,QAAQ;IACX,CAAC,EAAE,KAAK;CACA,CAAC;AAEX;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,GAAG,EAAE,EAAE;IACP,MAAM,EAAE,GAAG;IACX,IAAI,EAAE,GAAG;IACT,QAAQ,EAAE,IAAI;IACd;;uDAEmD;IACnD,aAAa,EAAE,IAAI;CACX,C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EAAE,SAAS;IAClB,WAAW,EAAE,YAAY;IACzB,UAAU,EAAE,WAAW;IACvB,SAAS,EAAE,WAAW;CACd,CAAC","sourcesContent":["// Admin + content-moderation business-rule constants — task priority, dispatches,\n// the moderation/feedback workflow, and admin-task lifecycle.\nimport { ACTIVE_LIMITS } from './app-mode.js';\n\n// --- Admin Task Priority System ---\n\nexport const TASK_PRIORITY = {\n CRITICAL: 4,\n HIGH: 3,\n NORMAL: 2,\n LOW: 1,\n} as const;\n\nexport type TaskPriorityLevel = (typeof TASK_PRIORITY)[keyof typeof TASK_PRIORITY];\n\nexport const TASK_PRIORITY_LABELS = {\n 4: 'CRITICAL',\n 3: 'HIGH',\n 2: 'NORMAL',\n 1: 'LOW',\n} as const;\n\n/**\n * Canonical NUMERIC priority scale for `adminTasks.priority`, shared by BOTH\n * priority systems so `checkoutNextImportantTask` (orderBy priority desc across all\n * task types) compares commensurable values. The userReport report-core score formula\n * already writes on this scale (≈40–2250); the level-based types (thresholdLibraryReview,\n * content-appeal, adminDispatch) map their TASK_PRIORITY level onto these numbers instead\n * of writing the raw 1–4.\n *\n * Resulting order: safety reports (1200–2250) > money anomalies (1100) >\n * CRITICAL (1000) > HIGH (800) > routine reports interleave below > spam-tier (~80).\n */\nexport const TASK_PRIORITY_SCORE = {\n LOW: 50,\n NORMAL: 200,\n HIGH: 800,\n CRITICAL: 1000,\n /** Money-integrity anomaly (stake-share / pledge-ledger corruption signal) — outranks\n * everything except safety-class reports. The three anomaly creators that previously\n * hardcoded `priority: 1` (LOW) all write this. */\n MONEY_ANOMALY: 1100,\n} as const;\n\nexport type TaskPriorityScore = (typeof TASK_PRIORITY_SCORE)[keyof typeof TASK_PRIORITY_SCORE];\n\n/** Maps a level-based TASK_PRIORITY value (1–4) to its canonical numeric score. */\nexport const TASK_PRIORITY_LEVEL_TO_SCORE = {\n [TASK_PRIORITY.LOW]: TASK_PRIORITY_SCORE.LOW,\n [TASK_PRIORITY.NORMAL]: TASK_PRIORITY_SCORE.NORMAL,\n [TASK_PRIORITY.HIGH]: TASK_PRIORITY_SCORE.HIGH,\n [TASK_PRIORITY.CRITICAL]: TASK_PRIORITY_SCORE.CRITICAL,\n} as const;\n\n// --- Admin Dispatches ---\n\n/** Maximum length for an admin-dispatch subject line. */\nexport const MAX_ADMIN_DISPATCH_SUBJECT_LENGTH = 100;\n\n/** Maximum length for the initial body text of an admin dispatch. */\nexport const MAX_ADMIN_DISPATCH_INITIAL_TEXT_LENGTH = 1000;\n\n// --- Content Moderation Workflow ---\n\n/** Maximum length for a content-violation appeal message. */\nexport const MAX_APPEAL_MESSAGE_LENGTH = 1000;\n\n/** Threshold-review reviewer notes (revision notes shown to the author). One owner for\n * the review callable schema AND the admin work-view input. */\nexport const MAX_THRESHOLD_REVIEW_NOTES_LENGTH = 2000;\n\n// --- Moderation / safety operator text caps ---\n// Each is declared ONCE here and derived by every input schema AND persisted doc schema\n// that carries the field — the numbers must never be re-hardcoded at an enforcement point.\n\n/** Operator-facing INTERNAL reason/rationale (LE-loggable; account actions, case reopens). */\nexport const MAX_INTERNAL_REASON_LENGTH = 2000;\n\n/** The generic owner-readable (user-facing) reason — deliberately short, no detail leaks. */\nexport const MAX_USER_FACING_REASON_LENGTH = 280;\n\n/** Structured close-out summary on report/safety-case resolutions. */\nexport const MAX_SAFETY_RESOLUTION_SUMMARY_LENGTH = 2000;\n\n/** Optional operator note attached to a close-out. */\nexport const MAX_SAFETY_ADMIN_NOTE_LENGTH = 4000;\n\n// --- Report intake text caps ---\n\n/** Reporter free-text narrative/comment (segregated private doc; never on the root). */\nexport const MAX_REPORT_NARRATIVE_LENGTH = 4000;\n\n/** The report DIALOG's comment field cap (the client-side compose bound — tighter than\n * the server narrative cap above, which also absorbs upgrade concatenations). */\nexport const MAX_REPORT_COMMENT_LENGTH = 1000;\n\n/** Minimum operator rationale/reason length on safety-console staged actions. */\nexport const MIN_SAFETY_RATIONALE_LENGTH = 10;\n\n/** Operator reason on an admin chat-moderation action (adminModerateChatMessage /\n * adminReadChannelContext). ONE owner for both callables' `reason` bound. */\nexport const MAX_CHAT_MODERATION_REASON_LENGTH = 1000;\n\n/** Broadcast explicitUids selector audience cap (schema + composer both derive). */\nexport const MAX_BROADCAST_EXPLICIT_UIDS = 2000;\n\n// --- Operator step-up sentinel error codes ---\n// The two backend HttpsError messages the operator TOTP step-up throws; the frontend\n// matches them to open the step-up dialog in ENROLL vs VERIFY mode. ONE declaration —\n// both the callable (functions operatorStepUp.ts) and the frontend hook import these.\nexport const STEP_UP_ENROLL_REQUIRED = 'OPERATOR_STEP_UP_ENROLL_REQUIRED';\nexport const STEP_UP_REQUIRED = 'OPERATOR_STEP_UP_REQUIRED';\n\n/** The frozen report-time captured text snapshot (edit-to-evade guard; NO PII). */\nexport const MAX_REPORT_SNAPSHOT_TEXT_LENGTH = 4000;\n\n// --- Admin console config-content text caps ---\n// Every number the system uses lives HERE — even a field only one surface consumes\n// today, because any future client (TV / phone / admin app) reads ttt-core.\n\nexport const MAX_FUTURE_PLAN_TITLE_LENGTH = 200;\nexport const MAX_FUTURE_PLAN_DESCRIPTION_LENGTH = 4000;\nexport const MAX_PLATFORM_RULE_TITLE_LENGTH = 200;\nexport const MAX_PLATFORM_RULE_DESCRIPTION_LENGTH = 4000;\nexport const MAX_AGREEMENT_POINT_LENGTH = 2000;\nexport const MAX_CONTENT_PAGE_HEADING_LENGTH = 300;\nexport const MAX_CONTENT_PAGE_BODY_LENGTH = 20000;\nexport const MAX_TAKE_IT_DOWN_COPY_LENGTH = 8000;\nexport const MAX_MAINTENANCE_MESSAGE_LENGTH = 2000;\n\n/** Announcement-banner copy on `_config/app.announcementMessage`. Deliberately far\n * shorter than the maintenance message: the announcement renders as a one-line banner\n * on the landing page and login screen, not a full-page takeover. */\nexport const MAX_ANNOUNCEMENT_MESSAGE_LENGTH = 300;\n\n/** Admin notes on a content-appeal review (reviewContentAppeal). */\nexport const MAX_APPEAL_REVIEW_NOTES_LENGTH = 2000;\n\n/** Admin reason on a Work/Realm forced-retitle remedy. */\nexport const MAX_REQUIRE_RETITLE_REASON_LENGTH = 500;\n\n/** Optional user-facing DETAIL text on a normal-report resolution. */\nexport const MAX_USER_FACING_REASON_DETAIL_LENGTH = 2000;\n\n/** Admin broadcast / user notification message body. */\nexport const MAX_NOTIFICATION_MESSAGE_LENGTH = 2000;\n\n/** Admin user-search query input. */\nexport const MAX_USER_SEARCH_QUERY_LENGTH = 100;\n\n// --- NCII / child-safety statutory + operator text caps ---\n\n/** Operator reason on the admin \"mark as NCII linked evidence\" intake. */\nexport const MAX_NCII_EVIDENCE_REASON_LENGTH = 1000;\n\n/** Operator written rationale on a TAKE IT DOWN validity decision (immutable row). */\nexport const MAX_NCII_RATIONALE_LENGTH = 4000;\n\n/** Requester's statement of nonconsent (statutory intake — in-app and no-login). */\nexport const MAX_NCII_NONCONSENT_STATEMENT_LENGTH = 4000;\n\n/** Typed-name electronic signature on a statutory request. */\nexport const MAX_NCII_SIGNED_NAME_LENGTH = 256;\n\n/** Requester's optional supporting facts (statutory intake). */\nexport const MAX_NCII_SUPPORTING_FACTS_LENGTH = 8000;\n\n/** Bounded, non-sensitive summary on an NCII request action row. */\nexport const MAX_NCII_ACTION_SUMMARY_LENGTH = 280;\n\n/** Operator description of a registered evidence artifact (e.g. portal screenshot). */\nexport const MAX_SAFETY_ARTIFACT_DESCRIPTION_LENGTH = 500;\n\n/** Operator proof note on a manual NCMEC portal filing. */\nexport const MAX_NCMEC_PORTAL_PROOF_TEXT_LENGTH = 2000;\n\n/** Requester's typed name on the no-login TAKE IT DOWN statutory intake. */\nexport const MAX_NCII_REQUESTER_NAME_LENGTH = 256;\n\n/** Name of the depicted person a representative files on behalf of. */\nexport const MAX_NCII_REPRESENTED_PERSON_NAME_LENGTH = 256;\n\n/** Representative's stated basis of authority (parent/guardian/counsel etc.). */\nexport const MAX_NCII_AUTHORITY_BASIS_LENGTH = 2000;\n\n/** Optional pointer/reference to authority evidence supplied by a representative. */\nexport const MAX_NCII_AUTHORITY_EVIDENCE_REF_LENGTH = 512;\n\n/** Maximum length for a feedback suggestion. */\nexport const MAX_FEEDBACK_SUGGESTION_LENGTH = 100;\n\n/** Maximum number of distinct submitters tracked per feedback suggestion. Mode-varied. */\nexport const MAX_FEEDBACK_SUBMITTERS = ACTIVE_LIMITS.batches.maxFeedbackSubmitters;\n\n/**\n * Canonical list of feedback types accepted by `submitFeedback`. Used both\n * for runtime validation in the schema (`SubmitFeedbackInputSchema`) and\n * for type-safe consumer props on the frontend `<FeedbackSubmission />`\n * component. Adding a new type here is the single source of truth — no\n * mirroring in callers required.\n */\nexport const FEEDBACK_TYPES = [\n 'tradeProfessionSuggestions',\n 'craftSkillTagSuggestions',\n 'talesWorkGenreSuggestions',\n 'tunesWorkGenreSuggestions',\n 'televisionWorkGenreSuggestions',\n] as const;\n\n/** Union of canonical feedback types. */\nexport type FeedbackType = (typeof FEEDBACK_TYPES)[number];\n\n/** Maximum number of items submitted in a single hallLibrary-review submission. Mode-varied. */\nexport const MAX_HALL_LIBRARY_SUBMIT_BATCH = ACTIVE_LIMITS.hall.maxSubmitBatch;\n\n// --- Admin Tasks ---\n\n/** Admin task lifecycle statuses. */\nexport const ADMIN_TASK_STATUS = {\n PENDING: 'pending',\n CHECKED_OUT: 'checkedOut',\n WORK_LATER: 'workLater',\n COMPLETED: 'completed',\n} as const;\n"]}
|
|
1
|
+
{"version":3,"file":"business-admin.js","sourceRoot":"","sources":["../../src/constants/business-admin.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,8DAA8D;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,qCAAqC;AAErC,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,QAAQ,EAAE,CAAC;IACX,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,CAAC;IACT,GAAG,EAAE,CAAC;CACE,CAAC;AAIX,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,CAAC,EAAE,UAAU;IACb,CAAC,EAAE,M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AC5B,4BAA4B;IAC5B,0BAA0B;IAC1B,2BAA2B;IAC3B,2BAA2B;IAC3B,gCAAgC;CACxB,CAAC;AAKX,gGAAgG;AAChG,MAAM,CAAC,MAAM,6BAA6B,GAAG,aAAa,CAAC,IAAI,CAAC,cAAc,CAAC;AAE/E,sBAAsB;AAEtB,qCAAqC;AACrC,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,YAAY;IACzB,UAAU,EAAE,WAAW;IACvB,SAAS,EAAE,WAAW;CACd,CAAC","sourcesContent":["// Admin + content-moderation business-rule constants — task priority, dispatches,\n// the moderation/feedback workflow, and admin-task lifecycle.\nimport { ACTIVE_LIMITS } from './app-mode.js';\n\n// --- Admin Task Priority System ---\n\nexport const TASK_PRIORITY = {\n CRITICAL: 4,\n HIGH: 3,\n NORMAL: 2,\n LOW: 1,\n} as const;\n\nexport type TaskPriorityLevel = (typeof TASK_PRIORITY)[keyof typeof TASK_PRIORITY];\n\nexport const TASK_PRIORITY_LABELS = {\n 4: 'CRITICAL',\n 3: 'HIGH',\n 2: 'NORMAL',\n 1: 'LOW',\n} as const;\n\n/**\n * Canonical NUMERIC priority scale for `adminTasks.priority`, shared by BOTH\n * priority systems so `checkoutNextImportantTask` (orderBy priority desc across all\n * task types) compares commensurable values. The userReport report-core score formula\n * already writes on this scale (≈40–2250); the level-based types (thresholdLibraryReview,\n * content-appeal, adminDispatch) map their TASK_PRIORITY level onto these numbers instead\n * of writing the raw 1–4.\n *\n * Resulting order: safety reports (1200–2250) > money anomalies (1100) >\n * CRITICAL (1000) > HIGH (800) > routine reports interleave below > spam-tier (~80).\n */\nexport const TASK_PRIORITY_SCORE = {\n LOW: 50,\n NORMAL: 200,\n HIGH: 800,\n CRITICAL: 1000,\n /** Money-integrity anomaly (stake-share / pledge-ledger corruption signal) — outranks\n * everything except safety-class reports. The three anomaly creators that previously\n * hardcoded `priority: 1` (LOW) all write this. */\n MONEY_ANOMALY: 1100,\n} as const;\n\nexport type TaskPriorityScore = (typeof TASK_PRIORITY_SCORE)[keyof typeof TASK_PRIORITY_SCORE];\n\n/** Maps a level-based TASK_PRIORITY value (1–4) to its canonical numeric score. */\nexport const TASK_PRIORITY_LEVEL_TO_SCORE = {\n [TASK_PRIORITY.LOW]: TASK_PRIORITY_SCORE.LOW,\n [TASK_PRIORITY.NORMAL]: TASK_PRIORITY_SCORE.NORMAL,\n [TASK_PRIORITY.HIGH]: TASK_PRIORITY_SCORE.HIGH,\n [TASK_PRIORITY.CRITICAL]: TASK_PRIORITY_SCORE.CRITICAL,\n} as const;\n\n// --- Admin Dispatches ---\n\n/** Maximum length for an admin-dispatch subject line. */\nexport const MAX_ADMIN_DISPATCH_SUBJECT_LENGTH = 100;\n\n/** Maximum length for the initial body text of an admin dispatch. */\nexport const MAX_ADMIN_DISPATCH_INITIAL_TEXT_LENGTH = 1000;\n\n// --- Content Moderation Workflow ---\n\n/** Maximum length for a content-violation appeal message. */\nexport const MAX_APPEAL_MESSAGE_LENGTH = 1000;\n\n/** Threshold-review reviewer notes (revision notes shown to the author). One owner for\n * the review callable schema AND the admin work-view input. */\nexport const MAX_THRESHOLD_REVIEW_NOTES_LENGTH = 2000;\n\n// --- Moderation / safety operator text caps ---\n// Each is declared ONCE here and derived by every input schema AND persisted doc schema\n// that carries the field — the numbers must never be re-hardcoded at an enforcement point.\n\n/** Operator-facing INTERNAL reason/rationale (LE-loggable; account actions, case reopens). */\nexport const MAX_INTERNAL_REASON_LENGTH = 2000;\n\n/** The generic owner-readable (user-facing) reason — deliberately short, no detail leaks. */\nexport const MAX_USER_FACING_REASON_LENGTH = 280;\n\n/** Structured close-out summary on report/safety-case resolutions. */\nexport const MAX_SAFETY_RESOLUTION_SUMMARY_LENGTH = 2000;\n\n/** Optional operator note attached to a close-out. */\nexport const MAX_SAFETY_ADMIN_NOTE_LENGTH = 4000;\n\n// --- Report intake text caps ---\n\n/** Reporter free-text narrative/comment (segregated private doc; never on the root). */\nexport const MAX_REPORT_NARRATIVE_LENGTH = 4000;\n\n/** The report DIALOG's comment field cap (the client-side compose bound — tighter than\n * the server narrative cap above, which also absorbs upgrade concatenations). */\nexport const MAX_REPORT_COMMENT_LENGTH = 1000;\n\n/** Minimum operator rationale/reason length on safety-console staged actions. */\nexport const MIN_SAFETY_RATIONALE_LENGTH = 10;\n\n/** Operator reason on an admin chat-moderation action (adminModerateChatMessage /\n * adminReadChannelContext). ONE owner for both callables' `reason` bound. */\nexport const MAX_CHAT_MODERATION_REASON_LENGTH = 1000;\n\n/** Broadcast explicitUids selector audience cap (schema + composer both derive). */\nexport const MAX_BROADCAST_EXPLICIT_UIDS = 2000;\n\n// --- Operator step-up sentinel error codes ---\n// The two backend HttpsError messages the operator TOTP step-up throws; the frontend\n// matches them to open the step-up dialog in ENROLL vs VERIFY mode. ONE declaration —\n// both the callable (functions operatorStepUp.ts) and the frontend hook import these.\nexport const STEP_UP_ENROLL_REQUIRED = 'OPERATOR_STEP_UP_ENROLL_REQUIRED';\nexport const STEP_UP_REQUIRED = 'OPERATOR_STEP_UP_REQUIRED';\n\n/** The frozen report-time captured text snapshot (edit-to-evade guard; NO PII). */\nexport const MAX_REPORT_SNAPSHOT_TEXT_LENGTH = 4000;\n\n// --- Admin console config-content text caps ---\n// Every number the system uses lives HERE — even a field only one surface consumes\n// today, because any future client (TV / phone / admin app) reads ttt-core.\n\nexport const MAX_FUTURE_PLAN_TITLE_LENGTH = 200;\nexport const MAX_FUTURE_PLAN_DESCRIPTION_LENGTH = 4000;\nexport const MAX_PLATFORM_RULE_TITLE_LENGTH = 200;\nexport const MAX_PLATFORM_RULE_DESCRIPTION_LENGTH = 4000;\nexport const MAX_AGREEMENT_POINT_LENGTH = 2000;\nexport const MAX_CONTENT_PAGE_HEADING_LENGTH = 300;\nexport const MAX_CONTENT_PAGE_BODY_LENGTH = 20000;\nexport const MAX_TAKE_IT_DOWN_COPY_LENGTH = 8000;\nexport const MAX_MAINTENANCE_MESSAGE_LENGTH = 2000;\n\n/** Announcement-banner copy on `_appConfig/app.announcementMessage`. Deliberately far\n * shorter than the maintenance message: the announcement renders as a one-line banner\n * on the landing page and login screen, not a full-page takeover. */\nexport const MAX_ANNOUNCEMENT_MESSAGE_LENGTH = 300;\n\n/** Admin notes on a content-appeal review (reviewContentAppeal). */\nexport const MAX_APPEAL_REVIEW_NOTES_LENGTH = 2000;\n\n/** Admin reason on a Work/Realm forced-retitle remedy. */\nexport const MAX_REQUIRE_RETITLE_REASON_LENGTH = 500;\n\n/** Optional user-facing DETAIL text on a normal-report resolution. */\nexport const MAX_USER_FACING_REASON_DETAIL_LENGTH = 2000;\n\n/** Admin broadcast / user notification message body. */\nexport const MAX_NOTIFICATION_MESSAGE_LENGTH = 2000;\n\n/** Admin user-search query input. */\nexport const MAX_USER_SEARCH_QUERY_LENGTH = 100;\n\n// --- NCII / child-safety statutory + operator text caps ---\n\n/** Operator reason on the admin \"mark as NCII linked evidence\" intake. */\nexport const MAX_NCII_EVIDENCE_REASON_LENGTH = 1000;\n\n/** Operator written rationale on a TAKE IT DOWN validity decision (immutable row). */\nexport const MAX_NCII_RATIONALE_LENGTH = 4000;\n\n/** Requester's statement of nonconsent (statutory intake — in-app and no-login). */\nexport const MAX_NCII_NONCONSENT_STATEMENT_LENGTH = 4000;\n\n/** Typed-name electronic signature on a statutory request. */\nexport const MAX_NCII_SIGNED_NAME_LENGTH = 256;\n\n/** Requester's optional supporting facts (statutory intake). */\nexport const MAX_NCII_SUPPORTING_FACTS_LENGTH = 8000;\n\n/** Bounded, non-sensitive summary on an NCII request action row. */\nexport const MAX_NCII_ACTION_SUMMARY_LENGTH = 280;\n\n/** Operator description of a registered evidence artifact (e.g. portal screenshot). */\nexport const MAX_SAFETY_ARTIFACT_DESCRIPTION_LENGTH = 500;\n\n/** Operator proof note on a manual NCMEC portal filing. */\nexport const MAX_NCMEC_PORTAL_PROOF_TEXT_LENGTH = 2000;\n\n/** Requester's typed name on the no-login TAKE IT DOWN statutory intake. */\nexport const MAX_NCII_REQUESTER_NAME_LENGTH = 256;\n\n/** Name of the depicted person a representative files on behalf of. */\nexport const MAX_NCII_REPRESENTED_PERSON_NAME_LENGTH = 256;\n\n/** Representative's stated basis of authority (parent/guardian/counsel etc.). */\nexport const MAX_NCII_AUTHORITY_BASIS_LENGTH = 2000;\n\n/** Optional pointer/reference to authority evidence supplied by a representative. */\nexport const MAX_NCII_AUTHORITY_EVIDENCE_REF_LENGTH = 512;\n\n/** Maximum length for a feedback suggestion. */\nexport const MAX_FEEDBACK_SUGGESTION_LENGTH = 100;\n\n/** Maximum number of distinct submitters tracked per feedback suggestion. Mode-varied. */\nexport const MAX_FEEDBACK_SUBMITTERS = ACTIVE_LIMITS.batches.maxFeedbackSubmitters;\n\n/**\n * Canonical list of feedback types accepted by `submitFeedback`. Used both\n * for runtime validation in the schema (`SubmitFeedbackInputSchema`) and\n * for type-safe consumer props on the frontend `<FeedbackSubmission />`\n * component. Adding a new type here is the single source of truth — no\n * mirroring in callers required.\n */\nexport const FEEDBACK_TYPES = [\n 'tradeProfessionSuggestions',\n 'craftSkillTagSuggestions',\n 'talesWorkGenreSuggestions',\n 'tunesWorkGenreSuggestions',\n 'televisionWorkGenreSuggestions',\n] as const;\n\n/** Union of canonical feedback types. */\nexport type FeedbackType = (typeof FEEDBACK_TYPES)[number];\n\n/** Maximum number of items submitted in a single hallLibrary-review submission. Mode-varied. */\nexport const MAX_HALL_LIBRARY_SUBMIT_BATCH = ACTIVE_LIMITS.hall.maxSubmitBatch;\n\n// --- Admin Tasks ---\n\n/** Admin task lifecycle statuses. */\nexport const ADMIN_TASK_STATUS = {\n PENDING: 'pending',\n CHECKED_OUT: 'checkedOut',\n WORK_LATER: 'workLater',\n COMPLETED: 'completed',\n} as const;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/audit.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/audit.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAsBxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAc9B,CAAC"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
// otherwise) that Zod can't express. `type` is validated as a string here; the exact
|
|
5
5
|
// ~80-value AuditEventType union remains the source of truth in ../types/audit.ts.
|
|
6
6
|
import { z } from 'zod';
|
|
7
|
+
import { systemRoleSchema } from '../schemas/atoms.js';
|
|
7
8
|
const TTTAuditActorSchema = z.discriminatedUnion('actorMode', [
|
|
8
9
|
z.object({
|
|
9
10
|
uid: z.string().nullable(),
|
|
@@ -14,7 +15,7 @@ const TTTAuditActorSchema = z.discriminatedUnion('actorMode', [
|
|
|
14
15
|
uid: z.string().nullable(),
|
|
15
16
|
isAdmin: z.boolean(),
|
|
16
17
|
actorMode: z.enum(['adminReview', 'adminOverride']),
|
|
17
|
-
systemRole:
|
|
18
|
+
systemRole: systemRoleSchema,
|
|
18
19
|
}),
|
|
19
20
|
]);
|
|
20
21
|
const TTTAuditTargetSchema = z.object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../src/doc-schemas/audit.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,yFAAyF;AACzF,oFAAoF;AACpF,qFAAqF;AACrF,mFAAmF;AAEnF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../src/doc-schemas/audit.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,yFAAyF;AACzF,oFAAoF;AACpF,qFAAqF;AACrF,mFAAmF;AAEnF,OAAO,EAAE,CAAC,EAAE,MAAM,KA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AC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;IAC3C,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IACtC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC","sourcesContent":["// Registry schema for auditEvents/{eventId}. Mirrors the structural shape of\n// TTTAuditEvent in ../types/audit.ts — which stays the canonical TYPE because it encodes\n// compiler-enforced actor/role rules (systemRole required on admin modes, forbidden\n// otherwise) that Zod can't express. `type` is validated as a string here; the exact\n// ~80-value AuditEventType union remains the source of truth in ../types/audit.ts.\n\nimport { z } from 'zod';\nimport { systemRoleSchema } from '../schemas/atoms.js';\n\nconst TTTAuditActorSchema = z.discriminatedUnion('actorMode', [\n z.object({\n uid: z.string().nullable(),\n isAdmin: z.boolean(),\n actorMode: z.enum(['user', 'guildmateUser', 'system']),\n }),\n z.object({\n uid: z.string().nullable(),\n isAdmin: z.boolean(),\n actorMode: z.enum(['adminReview', 'adminOverride']),\n systemRole: systemRoleSchema,\n }),\n]);\n\nconst TTTAuditTargetSchema = z.object({\n uid: z.string().nullable(),\n ref: z.string().nullable(),\n});\n\nexport const TTTAuditEventSchema = z.object({\n id: z.string(),\n type: z.string(),\n schemaVersion: z.number(),\n actor: TTTAuditActorSchema.nullable(),\n target: TTTAuditTargetSchema.nullable(),\n timestamp: z.number(),\n ip: z.string().nullable(),\n userAgent: z.string().nullable(),\n region: z.string().nullable(),\n metadata: z.record(z.string(), z.unknown()),\n result: z.enum(['success', 'failure']),\n failureReason: z.string().nullable(),\n correlationId: z.string().nullable(),\n});\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-sync.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/chat-sync.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"chat-sync.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/chat-sync.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;iBAW1C,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAIxF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;iBAUlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,4BAA4B;;;;;;;;iBAKvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAGlF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiB9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAGhE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmBlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAGxE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;iBAclC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAKxE,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqCvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAgBlF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsB5C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAK5F,eAAO,MAAM,2CAA2C;;;;;;;;;;;;;;iBAQtD,CAAC;AACH,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2CAA2C,CAAC,CAAC"}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
// which is a real Firestore `Timestamp` (modeled as `unknown` so the drift-check
|
|
8
8
|
// does not false-flag a Timestamp object against `z.number()`).
|
|
9
9
|
import { z } from 'zod';
|
|
10
|
+
import { systemRoleSchema } from '../schemas/atoms.js';
|
|
10
11
|
/** Native-TTL field — a real Firestore Timestamp (NOT epoch-ms). Absent until the terminal that sets TTL. */
|
|
11
12
|
const expireAtField = z.unknown().optional();
|
|
12
13
|
// ── chatChannelAuthProjections/{authPairKey} ────────────────────────────────
|
|
@@ -105,7 +106,7 @@ export const ChatAdminActionCommandSchema = z.object({
|
|
|
105
106
|
requestId: z.string(),
|
|
106
107
|
actorUid: z.string(),
|
|
107
108
|
actorMode: z.enum(['adminReview', 'adminOverride']),
|
|
108
|
-
systemRole:
|
|
109
|
+
systemRole: systemRoleSchema,
|
|
109
110
|
channelRef: z.record(z.string(), z.unknown()),
|
|
110
111
|
messageSeq: z.number(),
|
|
111
112
|
action: z.enum(['hide', 'delete']),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-sync.js","sourceRoot":"","sources":["../../src/doc-schemas/chat-sync.ts"],"names":[],"mappings":"AAAA,sFAAsF;AACtF,+EAA+E;AAC/E,gFAAgF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AAC,CAAC","sourcesContent":["// Chat realtime SYNC / projection / command Firestore schemas (chat-edge-rebuild P1).\n// The chat sync / projection / command (Firestore-side) field lists are FROZEN\n// here — this file is their single source; the durable design owner is ttt-prod\n// docs/design/chat-realtime-system.md. All of these collections are Admin-SDK-only\n// (`allow read, write: if false`). Per the TTT timestamp convention every time\n// field is epoch-ms `number`; the SINGLE exception is the native-TTL `expireAt`,\n// which is a real Firestore `Timestamp` (modeled as `unknown` so the drift-check\n// does not false-flag a Timestamp object against `z.number()`).\n\nimport { z } from 'zod';\n\n/** Native-TTL field — a real Firestore Timestamp (NOT epoch-ms). Absent until the terminal that sets TTL. */\nconst expireAtField = z.unknown().optional();\n\n// ── chatChannelAuthProjections/{authPairKey} ────────────────────────────────\n// Per-(user, channel) authorization FACT. Absent ⇒ removed/deny (fail-closed).\nexport const ChatChannelAuthProjectionSchema = z.object({\n channelRefScope: z.enum(['channel', 'invite']),\n workProjectId: z.string().nullable(),\n guildChatChannelId: z.string().nullable(),\n guildInviteId: z.string().nullable(),\n uid: z.string(),\n channelKey: z.string(),\n channelAuthState: z.enum(['authorized', 'removed']),\n channelAuthVersion: z.number(),\n inputFingerprint: z.string(),\n updatedAt: z.number(),\n});\nexport type ChatChannelAuthProjection = z.infer<typeof ChatChannelAuthProjectionSchema>;\n\n// ── chatScopeDegraded/{scopeKey} (+ causes/{causeId}) ───────────────────────\n// Exists IFF unresolvedCauseCount > 0. Grant mints fail closed while it exists.\nexport const ChatScopeDegradedSchema = z.object({\n scopeKey: z.string(),\n scopeKind: z.enum(['channel', 'memberInWork']),\n // channel scope carries the channelRef tuple; memberInWork carries {uid, workProjectId}.\n workProjectId: z.string().nullable(),\n guildChatChannelId: z.string().nullable(),\n guildInviteId: z.string().nullable(),\n uid: z.string().nullable(),\n unresolvedCauseCount: z.number(),\n updatedAt: z.number(),\n});\nexport type ChatScopeDegraded = z.infer<typeof ChatScopeDegradedSchema>;\n\nexport const ChatScopeDegradedCauseSchema = z.object({\n causeId: z.string(),\n kind: z.enum(['syncEvent', 'fanoutJob']),\n ref: z.string(),\n deadLetteredAt: z.number(),\n});\nexport type ChatScopeDegradedCause = z.infer<typeof ChatScopeDegradedCauseSchema>;\n\n// ── chatSyncEvents/{eventId} ────────────────────────────────────────────────\nexport const ChatSyncEventSchema = z.object({\n eventId: z.string(),\n targetDo: z.string(),\n kind: z.enum(['channelAuth', 'accountAccess', 'config', 'serverMessage']),\n version: z.number(),\n payload: z.record(z.string(), z.unknown()).nullable(),\n tombstone: z.boolean().optional(),\n payloadHash: z.string(),\n status: z.enum(['pending', 'delivered', 'deadLetter']),\n attemptCount: z.number(),\n nextAttemptAt: z.number(),\n lastError: z.string().nullable(),\n createdAt: z.number(),\n deliveredResult: z.record(z.string(), z.unknown()).nullable(),\n deliveredAt: z.number().nullable(),\n deadLetteredAt: z.number().nullable(),\n expireAt: expireAtField,\n});\nexport type ChatSyncEvent = z.infer<typeof ChatSyncEventSchema>;\n\n// ── chatSyncFanoutJobs/{jobId} ──────────────────────────────────────────────\nexport const ChatSyncFanoutJobSchema = z.object({\n jobId: z.string(),\n selectorKind: z.enum(['channelMembers', 'workChannelsForUser', 'policyEditAffectedUsers']),\n selectorArgs: z.object({\n workProjectId: z.string().optional(),\n channelKey: z.string().optional(),\n uid: z.string().optional(),\n }),\n causeVersion: z.number(),\n cursor: z.object({ pageIndex: z.number(), lastDocId: z.string().nullable() }),\n revision: z.number(),\n status: z.enum(['pending', 'complete', 'deadLetter']),\n attemptCount: z.number(),\n nextAttemptAt: z.number(),\n lastError: z.string().nullable(),\n createdAt: z.number(),\n completedAt: z.number().nullable(),\n deadLetteredAt: z.number().nullable(),\n expireAt: expireAtField,\n});\nexport type ChatSyncFanoutJob = z.infer<typeof ChatSyncFanoutJobSchema>;\n\n// ── chatMessageOutbox/{commandId} ───────────────────────────────────────────\nexport const ChatMessageOutboxSchema = z.object({\n commandId: z.string(),\n kind: z.enum(['userMsg', 'systemMsg']),\n threadRef: z.string(),\n payload: z.record(z.string(), z.unknown()),\n payloadVersion: z.number(),\n status: z.enum(['pending', 'applied', 'deadLetter']),\n attemptCount: z.number(),\n nextAttemptAt: z.number(),\n lastError: z.string().nullable(),\n createdAt: z.number(),\n appliedAt: z.number().nullable(),\n deadLetteredAt: z.number().nullable(),\n expireAt: expireAtField,\n});\nexport type ChatMessageOutbox = z.infer<typeof ChatMessageOutboxSchema>;\n\n// ── chatAdminActionCommands/{requestId} ─────────────────────────────────────\n// `requestId` IS the doc id + DO dedup key. `delivering` is NOT a lease (it sets\n// nextAttemptAt = now + DELIVERY_TIMEOUT). terminalFailureGeneration default 0.\nexport const ChatAdminActionCommandSchema = z.object({\n requestId: z.string(),\n actorUid: z.string(),\n actorMode: z.enum(['adminReview', 'adminOverride']),\n systemRole: z.enum(['admin', 'jrAdmin']),\n channelRef: z.record(z.string(), z.unknown()),\n messageSeq: z.number(),\n action: z.enum(['hide', 'delete']),\n caseId: z.string(),\n reason: z.string(),\n expectedMessageRevision: z.number(),\n payloadHash: z.string(),\n // `safetyRepair` is the NONTERMINAL stall loop: a RESERVED command whose reconcile\n // leg (PROBE → FINALIZE) failed past ADMIN_COMMAND_MAX_ATTEMPTS. Drained like\n // `delivering`; never dead-letters.\n state: z.enum(['queued', 'delivering', 'safetyRepair', 'applied', 'failed', 'deadLetter']),\n attemptCount: z.number(),\n nextAttemptAt: z.number(),\n lastError: z.string().nullable(),\n result: z.record(z.string(), z.unknown()).nullable(),\n doRevisionId: z.string().nullable(),\n terminalFailureGeneration: z.number(),\n createdAt: z.number(),\n appliedAt: z.number().nullable(),\n failedAt: z.number().nullable(),\n deadLetteredAt: z.number().nullable(),\n reconciled: z.boolean(),\n reconciledAt: z.number().nullable(),\n safetyRepair: z.boolean(),\n // Monotonic counter of distinct entries into the safety-repair loop — keys the\n // per-entry idempotent failure audit.\n safetyRepairGeneration: z.number(),\n // Failed reconcile passes on an already-reserved command. Separate from\n // `attemptCount` (delivery attempts, which dead-letter); at the cap it escalates\n // once into `safetyRepair` instead of dead-lettering.\n reconcileAttemptCount: z.number(),\n expireAt: expireAtField,\n});\nexport type ChatAdminActionCommand = z.infer<typeof ChatAdminActionCommandSchema>;\n\n// ── chatHistoryAnonymizationJobs/{jobId} ────────────────────────────────────\n// Account-deletion history anonymization (Contract F; P8). Resumable + crash-safe:\n// the recorded source-manifest identity (key/hash/generation) + the three cursors\n// (scan/rewrite/delete) make every boundary restartable. jobId =\n// hash('chat-anonymize', channelDoId, epoch, anonymizedUid). `expireAt` (native TTL)\n// is set ONLY when the job reaches `done`.\n//\n// C-B1: the replacement generation is DO-OWNED — the Channel DO (single-threaded per\n// channel) allocates a DISTINCT monotonic generation per erasure off the epoch row and\n// rewrites against the CURRENT live manifest, so two erasures on one epoch chain instead\n// of colliding on a shared `anon-1` keyspace. These four fields are therefore RECORDED AT\n// SCAN (null until the DO reports/allocates them), not pinned at enqueue; if a concurrent\n// anonymization supersedes the source between scan and swap, the job resets to `scanning`\n// to re-derive against the new current manifest (keeping its own allocated generation).\nexport const ChatHistoryAnonymizationJobSchema = z.object({\n jobId: z.string(),\n channelDoId: z.string(),\n epoch: z.number(),\n anonymizedUid: z.string(),\n sourceManifestKey: z.string().nullable(),\n sourceManifestHash: z.string().nullable(),\n sourceGeneration: z.number().nullable(),\n replacementGeneration: z.number().nullable(),\n newManifestKey: z.string().nullable(),\n scanCursor: z.number(),\n rewriteCursor: z.number(),\n deleteCursor: z.number(),\n swappedAt: z.number().nullable(),\n state: z.enum(['scanning', 'rewriting', 'swapping', 'deleting', 'done', 'failed']),\n legalHoldPaused: z.boolean(),\n attemptCount: z.number(),\n nextAttemptAt: z.number(),\n lastError: z.string().nullable(),\n createdAt: z.number(),\n updatedAt: z.number(),\n expireAt: expireAtField,\n});\nexport type ChatHistoryAnonymizationJob = z.infer<typeof ChatHistoryAnonymizationJobSchema>;\n\n// ── chatHistoryAnonymizationJobs/{jobId}/affectedChunks/{chunkOrdinal} ───────\n// The non-contiguous affected-chunk set (round-16 finding 7) — a crash after the\n// manifest swap resumes deletion from these rows + `deleteCursor` without re-listing R2.\nexport const ChatHistoryAnonymizationAffectedChunkSchema = z.object({\n chunkOrdinal: z.number(),\n sourceChunkKey: z.string(),\n sourceSha256: z.string(),\n replacementChunkKey: z.string().nullable(),\n replacementSha256: z.string().nullable(),\n rewriteState: z.enum(['pending', 'done']),\n deleteState: z.enum(['pending', 'done']),\n});\nexport type ChatHistoryAnonymizationAffectedChunk = z.infer<typeof ChatHistoryAnonymizationAffectedChunkSchema>;\n"]}
|
|
1
|
+
{"version":3,"file":"chat-sync.js","sourceRoot":"","sources":["../../src/doc-schemas/chat-sync.ts"],"names":[],"mappings":"AAAA,sFAAsF;AACtF,+EAA+E;AAC/E,gFAAgF;AAChF,mFAAmF;AACnF,+EAA+E;AAC/E,iFAAiF;AACjF,iFAAiF;AACjF,gEAAgE;AAEhE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,6GAA6G;AAC7G,MAAM,aAAa,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC;AAE7C,+EAA+E;AAC/E,+EAA+E;AAC/E,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IACtD,eAAe,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC9C,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,gBAAgB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,SAAS,CA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C,GAAG,CAAC,CAAC,MAAM,CAAC;IAClE,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;IAC1B,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1C,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACxC,YAAY,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACzC,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;CACzC,CAAC,CAAC","sourcesContent":["// Chat realtime SYNC / projection / command Firestore schemas (chat-edge-rebuild P1).\n// The chat sync / projection / command (Firestore-side) field lists are FROZEN\n// here — this file is their single source; the durable design owner is ttt-prod\n// docs/design/chat-realtime-system.md. All of these collections are Admin-SDK-only\n// (`allow read, write: if false`). Per the TTT timestamp convention every time\n// field is epoch-ms `number`; the SINGLE exception is the native-TTL `expireAt`,\n// which is a real Firestore `Timestamp` (modeled as `unknown` so the drift-check\n// does not false-flag a Timestamp object against `z.number()`).\n\nimport { z } from 'zod';\nimport { systemRoleSchema } from '../schemas/atoms.js';\n\n/** Native-TTL field — a real Firestore Timestamp (NOT epoch-ms). Absent until the terminal that sets TTL. */\nconst expireAtField = z.unknown().optional();\n\n// ── chatChannelAuthProjections/{authPairKey} ────────────────────────────────\n// Per-(user, channel) authorization FACT. Absent ⇒ removed/deny (fail-closed).\nexport const ChatChannelAuthProjectionSchema = z.object({\n channelRefScope: z.enum(['channel', 'invite']),\n workProjectId: z.string().nullable(),\n guildChatChannelId: z.string().nullable(),\n guildInviteId: z.string().nullable(),\n uid: z.string(),\n channelKey: z.string(),\n channelAuthState: z.enum(['authorized', 'removed']),\n channelAuthVersion: z.number(),\n inputFingerprint: z.string(),\n updatedAt: z.number(),\n});\nexport type ChatChannelAuthProjection = z.infer<typeof ChatChannelAuthProjectionSchema>;\n\n// ── chatScopeDegraded/{scopeKey} (+ causes/{causeId}) ───────────────────────\n// Exists IFF unresolvedCauseCount > 0. Grant mints fail closed while it exists.\nexport const ChatScopeDegradedSchema = z.object({\n scopeKey: z.string(),\n scopeKind: z.enum(['channel', 'memberInWork']),\n // channel scope carries the channelRef tuple; memberInWork carries {uid, workProjectId}.\n workProjectId: z.string().nullable(),\n guildChatChannelId: z.string().nullable(),\n guildInviteId: z.string().nullable(),\n uid: z.string().nullable(),\n unresolvedCauseCount: z.number(),\n updatedAt: z.number(),\n});\nexport type ChatScopeDegraded = z.infer<typeof ChatScopeDegradedSchema>;\n\nexport const ChatScopeDegradedCauseSchema = z.object({\n causeId: z.string(),\n kind: z.enum(['syncEvent', 'fanoutJob']),\n ref: z.string(),\n deadLetteredAt: z.number(),\n});\nexport type ChatScopeDegradedCause = z.infer<typeof ChatScopeDegradedCauseSchema>;\n\n// ── chatSyncEvents/{eventId} ────────────────────────────────────────────────\nexport const ChatSyncEventSchema = z.object({\n eventId: z.string(),\n targetDo: z.string(),\n kind: z.enum(['channelAuth', 'accountAccess', 'config', 'serverMessage']),\n version: z.number(),\n payload: z.record(z.string(), z.unknown()).nullable(),\n tombstone: z.boolean().optional(),\n payloadHash: z.string(),\n status: z.enum(['pending', 'delivered', 'deadLetter']),\n attemptCount: z.number(),\n nextAttemptAt: z.number(),\n lastError: z.string().nullable(),\n createdAt: z.number(),\n deliveredResult: z.record(z.string(), z.unknown()).nullable(),\n deliveredAt: z.number().nullable(),\n deadLetteredAt: z.number().nullable(),\n expireAt: expireAtField,\n});\nexport type ChatSyncEvent = z.infer<typeof ChatSyncEventSchema>;\n\n// ── chatSyncFanoutJobs/{jobId} ──────────────────────────────────────────────\nexport const ChatSyncFanoutJobSchema = z.object({\n jobId: z.string(),\n selectorKind: z.enum(['channelMembers', 'workChannelsForUser', 'policyEditAffectedUsers']),\n selectorArgs: z.object({\n workProjectId: z.string().optional(),\n channelKey: z.string().optional(),\n uid: z.string().optional(),\n }),\n causeVersion: z.number(),\n cursor: z.object({ pageIndex: z.number(), lastDocId: z.string().nullable() }),\n revision: z.number(),\n status: z.enum(['pending', 'complete', 'deadLetter']),\n attemptCount: z.number(),\n nextAttemptAt: z.number(),\n lastError: z.string().nullable(),\n createdAt: z.number(),\n completedAt: z.number().nullable(),\n deadLetteredAt: z.number().nullable(),\n expireAt: expireAtField,\n});\nexport type ChatSyncFanoutJob = z.infer<typeof ChatSyncFanoutJobSchema>;\n\n// ── chatMessageOutbox/{commandId} ───────────────────────────────────────────\nexport const ChatMessageOutboxSchema = z.object({\n commandId: z.string(),\n kind: z.enum(['userMsg', 'systemMsg']),\n threadRef: z.string(),\n payload: z.record(z.string(), z.unknown()),\n payloadVersion: z.number(),\n status: z.enum(['pending', 'applied', 'deadLetter']),\n attemptCount: z.number(),\n nextAttemptAt: z.number(),\n lastError: z.string().nullable(),\n createdAt: z.number(),\n appliedAt: z.number().nullable(),\n deadLetteredAt: z.number().nullable(),\n expireAt: expireAtField,\n});\nexport type ChatMessageOutbox = z.infer<typeof ChatMessageOutboxSchema>;\n\n// ── chatAdminActionCommands/{requestId} ─────────────────────────────────────\n// `requestId` IS the doc id + DO dedup key. `delivering` is NOT a lease (it sets\n// nextAttemptAt = now + DELIVERY_TIMEOUT). terminalFailureGeneration default 0.\nexport const ChatAdminActionCommandSchema = z.object({\n requestId: z.string(),\n actorUid: z.string(),\n actorMode: z.enum(['adminReview', 'adminOverride']),\n systemRole: systemRoleSchema,\n channelRef: z.record(z.string(), z.unknown()),\n messageSeq: z.number(),\n action: z.enum(['hide', 'delete']),\n caseId: z.string(),\n reason: z.string(),\n expectedMessageRevision: z.number(),\n payloadHash: z.string(),\n // `safetyRepair` is the NONTERMINAL stall loop: a RESERVED command whose reconcile\n // leg (PROBE → FINALIZE) failed past ADMIN_COMMAND_MAX_ATTEMPTS. Drained like\n // `delivering`; never dead-letters.\n state: z.enum(['queued', 'delivering', 'safetyRepair', 'applied', 'failed', 'deadLetter']),\n attemptCount: z.number(),\n nextAttemptAt: z.number(),\n lastError: z.string().nullable(),\n result: z.record(z.string(), z.unknown()).nullable(),\n doRevisionId: z.string().nullable(),\n terminalFailureGeneration: z.number(),\n createdAt: z.number(),\n appliedAt: z.number().nullable(),\n failedAt: z.number().nullable(),\n deadLetteredAt: z.number().nullable(),\n reconciled: z.boolean(),\n reconciledAt: z.number().nullable(),\n safetyRepair: z.boolean(),\n // Monotonic counter of distinct entries into the safety-repair loop — keys the\n // per-entry idempotent failure audit.\n safetyRepairGeneration: z.number(),\n // Failed reconcile passes on an already-reserved command. Separate from\n // `attemptCount` (delivery attempts, which dead-letter); at the cap it escalates\n // once into `safetyRepair` instead of dead-lettering.\n reconcileAttemptCount: z.number(),\n expireAt: expireAtField,\n});\nexport type ChatAdminActionCommand = z.infer<typeof ChatAdminActionCommandSchema>;\n\n// ── chatHistoryAnonymizationJobs/{jobId} ────────────────────────────────────\n// Account-deletion history anonymization (Contract F; P8). Resumable + crash-safe:\n// the recorded source-manifest identity (key/hash/generation) + the three cursors\n// (scan/rewrite/delete) make every boundary restartable. jobId =\n// hash('chat-anonymize', channelDoId, epoch, anonymizedUid). `expireAt` (native TTL)\n// is set ONLY when the job reaches `done`.\n//\n// C-B1: the replacement generation is DO-OWNED — the Channel DO (single-threaded per\n// channel) allocates a DISTINCT monotonic generation per erasure off the epoch row and\n// rewrites against the CURRENT live manifest, so two erasures on one epoch chain instead\n// of colliding on a shared `anon-1` keyspace. These four fields are therefore RECORDED AT\n// SCAN (null until the DO reports/allocates them), not pinned at enqueue; if a concurrent\n// anonymization supersedes the source between scan and swap, the job resets to `scanning`\n// to re-derive against the new current manifest (keeping its own allocated generation).\nexport const ChatHistoryAnonymizationJobSchema = z.object({\n jobId: z.string(),\n channelDoId: z.string(),\n epoch: z.number(),\n anonymizedUid: z.string(),\n sourceManifestKey: z.string().nullable(),\n sourceManifestHash: z.string().nullable(),\n sourceGeneration: z.number().nullable(),\n replacementGeneration: z.number().nullable(),\n newManifestKey: z.string().nullable(),\n scanCursor: z.number(),\n rewriteCursor: z.number(),\n deleteCursor: z.number(),\n swappedAt: z.number().nullable(),\n state: z.enum(['scanning', 'rewriting', 'swapping', 'deleting', 'done', 'failed']),\n legalHoldPaused: z.boolean(),\n attemptCount: z.number(),\n nextAttemptAt: z.number(),\n lastError: z.string().nullable(),\n createdAt: z.number(),\n updatedAt: z.number(),\n expireAt: expireAtField,\n});\nexport type ChatHistoryAnonymizationJob = z.infer<typeof ChatHistoryAnonymizationJobSchema>;\n\n// ── chatHistoryAnonymizationJobs/{jobId}/affectedChunks/{chunkOrdinal} ───────\n// The non-contiguous affected-chunk set (round-16 finding 7) — a crash after the\n// manifest swap resumes deletion from these rows + `deleteCursor` without re-listing R2.\nexport const ChatHistoryAnonymizationAffectedChunkSchema = z.object({\n chunkOrdinal: z.number(),\n sourceChunkKey: z.string(),\n sourceSha256: z.string(),\n replacementChunkKey: z.string().nullable(),\n replacementSha256: z.string().nullable(),\n rewriteState: z.enum(['pending', 'done']),\n deleteState: z.enum(['pending', 'done']),\n});\nexport type ChatHistoryAnonymizationAffectedChunk = z.infer<typeof ChatHistoryAnonymizationAffectedChunkSchema>;\n"]}
|
|
@@ -97,6 +97,14 @@ export declare const FullTelevisionEpisodeSchema: z.ZodObject<{
|
|
|
97
97
|
createdOn: z.ZodNumber;
|
|
98
98
|
}, z.core.$strip>;
|
|
99
99
|
export type FullTelevisionEpisode = z.infer<typeof FullTelevisionEpisodeSchema>;
|
|
100
|
+
/** `allWorkProjects/{workProjectId}/hallSubmissionReservation/reservation` — the Work's ONE
|
|
101
|
+
* hall-entry reservation, created (never updated) inside the first threshold submit's
|
|
102
|
+
* transaction; every later submit converges on its `hallItemId`. Backend-only. */
|
|
103
|
+
export declare const HallSubmissionReservationSchema: z.ZodObject<{
|
|
104
|
+
hallItemId: z.ZodString;
|
|
105
|
+
createdAt: z.ZodNumber;
|
|
106
|
+
}, z.core.$strict>;
|
|
107
|
+
export type HallSubmissionReservation = z.infer<typeof HallSubmissionReservationSchema>;
|
|
100
108
|
export declare const ThresholdItemSchema: z.ZodObject<{
|
|
101
109
|
thresholdItemId: z.ZodString;
|
|
102
110
|
hallItemId: z.ZodString;
|
|
@@ -447,7 +455,7 @@ export declare const ContentPageSectionSchema: z.ZodObject<{
|
|
|
447
455
|
order: z.ZodNumber;
|
|
448
456
|
}, z.core.$strip>;
|
|
449
457
|
export type ContentPageSection = z.infer<typeof ContentPageSectionSchema>;
|
|
450
|
-
/** Long-form legal page doc — the shape of BOTH `
|
|
458
|
+
/** Long-form legal page doc — the shape of BOTH `_appConfig/termsOfService` and `_appConfig/privacyPolicy`. */
|
|
451
459
|
export declare const LegalPageDocumentSchema: z.ZodObject<{
|
|
452
460
|
version: z.ZodNumber;
|
|
453
461
|
lastUpdated: z.ZodNumber;
|
|
@@ -461,7 +469,7 @@ export declare const LegalPageDocumentSchema: z.ZodObject<{
|
|
|
461
469
|
}, z.core.$strip>;
|
|
462
470
|
export type LegalPageDocument = z.infer<typeof LegalPageDocumentSchema>;
|
|
463
471
|
/**
|
|
464
|
-
* `
|
|
472
|
+
* `_appConfig/takeItDownPageCopy` — the /take-it-down page's user-facing language as
|
|
465
473
|
* a keyed strings map (the page is a functional form, so its copy is discrete
|
|
466
474
|
* labeled strings, not long-form sections). Keys are stable identifiers defined
|
|
467
475
|
* by the page (e.g. `pageTitle`, `introBody`); the admin editor renders one
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/content.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgBxB,eAAO,MAAM,cAAc;;;;EAA2D,CAAC;AACvF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAItD,eAAO,MAAM,cAAc;;;;;;;;;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;;;;;;;;;;;;;iBAQrB,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAE9C,eAAO,MAAM,uBAAuB;;;iBAGlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAWnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAY1E,8FAA8F;AAC9F,eAAO,MAAM,wBAAwB;;;;;;iBAOnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,+GAA+G;AAC/G,eAAO,MAAM,uBAAuB;;;;;;;;;;iBAIlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB;;;;iBAInC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -87,6 +87,13 @@ export const FullTelevisionEpisodeSchema = z.object({
|
|
|
87
87
|
...moderationClearedFieldsShape,
|
|
88
88
|
});
|
|
89
89
|
// --- Threshold + Hall library items ---
|
|
90
|
+
/** `allWorkProjects/{workProjectId}/hallSubmissionReservation/reservation` — the Work's ONE
|
|
91
|
+
* hall-entry reservation, created (never updated) inside the first threshold submit's
|
|
92
|
+
* transaction; every later submit converges on its `hallItemId`. Backend-only. */
|
|
93
|
+
export const HallSubmissionReservationSchema = z.object({
|
|
94
|
+
hallItemId: z.string().min(1),
|
|
95
|
+
createdAt: z.number(),
|
|
96
|
+
}).strict();
|
|
90
97
|
export const ThresholdItemSchema = z.object({
|
|
91
98
|
thresholdItemId: z.string(),
|
|
92
99
|
hallItemId: z.string(),
|
|
@@ -345,14 +352,14 @@ export const ContentPageSectionSchema = z.object({
|
|
|
345
352
|
body: z.string(),
|
|
346
353
|
order: z.number(),
|
|
347
354
|
});
|
|
348
|
-
/** Long-form legal page doc — the shape of BOTH `
|
|
355
|
+
/** Long-form legal page doc — the shape of BOTH `_appConfig/termsOfService` and `_appConfig/privacyPolicy`. */
|
|
349
356
|
export const LegalPageDocumentSchema = z.object({
|
|
350
357
|
version: z.number(),
|
|
351
358
|
lastUpdated: z.number(),
|
|
352
359
|
sections: z.array(ContentPageSectionSchema),
|
|
353
360
|
});
|
|
354
361
|
/**
|
|
355
|
-
* `
|
|
362
|
+
* `_appConfig/takeItDownPageCopy` — the /take-it-down page's user-facing language as
|
|
356
363
|
* a keyed strings map (the page is a functional form, so its copy is discrete
|
|
357
364
|
* labeled strings, not long-form sections). Keys are stable identifiers defined
|
|
358
365
|
* by the page (e.g. `pageTitle`, `introBody`); the admin editor renders one
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.js","sourceRoot":"","sources":["../../src/doc-schemas/content.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,+EAA+E;AAC/E,qFAAqF;AACrF,sFAAsF;AACtF,2DAA2D;AAE3D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElF,MAAM,mBAAmB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,kBAAkB,EAAE,WAAW,CAAC,CAAC,CAAC;AAErF,8FAA8F;AAC9F,mGAAmG;AACnG,oGAAoG;AACpG,oGAAoG;AACpG,oGAAoG;AACpG,uGAAuG;AACvG,MAAM,4BAA4B,GAAG;IACnC,uBAAuB,EAAE,CAAC,CAAC,KAAK,CAAC,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,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC;AAGH,yGAAyG;AACzG,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,wBAAwB,CAAC;CAC5C,CAAC,CAAC;AAGH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;CAC1C,CAAC,CAAC","sourcesContent":["// Content Firestore document SCHEMAS — Tales/Tunes/Television sub-documents, the\n// Threshold + Hall library item shapes, Hall library user preferences, and the\n// `_config` singleton docs (futurePlans, rulesAndAgreements). Types are inferred via\n// z.infer. The enum-key consts (HALL_WING_TYPE_KEYS / WORK_PROJECT_TYPE_KEYS) and the\n// UI-only filter/view types remain in ../types/content.ts.\n\nimport { z } from 'zod';\nimport { HALL_WING_TYPE_KEYS, WORK_PROJECT_TYPE_KEYS } from '../types/content.js';\n\nconst contentStatusSchema = z.enum(['unpublished', 'pending_approval', 'published']);\n\n// Per-field moderation text-clear remedy (shared shape across the content family — Tale/Tune/\n// Television details, their chapter/track/episode sub-items, and the published Hall projections of\n// both). `moderationClearedFields` lists which text fields (e.g. 'title', 'description', 'content')\n// an admin cleared to a neutral placeholder and which now await steward re-entry; empty/absent when\n// nothing was cleared. `moderationClearedReason` is the operator's reason, surfaced on the member's\n// edit surface. Extends the workProject/workRealm placeholder remedy per-field. Backend-only-writable.\nconst moderationClearedFieldsShape = {\n moderationClearedFields: z.array(z.string()).optional(),\n moderationClearedReason: z.string().optional(),\n};\n\nexport const ItemsKeySchema = z.enum(['tuneTracks', 'chapters', 'televisionEpisodes']);\nexport type ItemsKey = z.infer<typeof ItemsKeySchema>;\n\n// --- WorkProject content sub-docs ---\n\nexport const FullTaleSchema = z.object({\n uid: z.string(),\n title: z.string(),\n description: z.string(),\n createdOn: z.number(),\n coverSquareAssetId: z.string().optional(),\n coverPosterAssetId: z.string().optional(),\n coverCinematicAssetId: z.string().optional(),\n workGenres: z.array(z.string()).optional(),\n ...moderationClearedFieldsShape,\n});\nexport type FullTale = z.infer<typeof FullTaleSchema>;\n\nexport const FullChapterSchema = z.object({\n uid: z.string(),\n title: z.string(),\n content: z.string(),\n description: z.string(),\n order: z.number(),\n photoAssetId: z.string().optional(),\n status: contentStatusSchema,\n createdOn: z.number(),\n ...moderationClearedFieldsShape,\n});\nexport type FullChapter = z.infer<typeof FullChapterSchema>;\n\nexport const FullTuneSchema = z.object({\n uid: z.string(),\n title: z.string(),\n description: z.string(),\n coverSquareAssetId: z.string().optional(),\n coverPosterAssetId: z.string().optional(),\n coverCinematicAssetId: z.string().optional(),\n workGenres: z.array(z.string()),\n createdOn: z.number(),\n ...moderationClearedFieldsShape,\n});\nexport type FullTune = z.infer<typeof FullTuneSchema>;\n\nexport const FullTuneTrackSchema = z.object({\n uid: z.string(),\n title: z.string(),\n description: z.string().optional(),\n audioAssetId: z.string().optional(),\n mediaType: z.string().optional(),\n order: z.number(),\n photoAssetId: z.string().optional(),\n status: contentStatusSchema,\n createdOn: z.number(),\n ...moderationClearedFieldsShape,\n});\nexport type FullTuneTrack = z.infer<typeof FullTuneTrackSchema>;\n\nexport const FullTelevisionSchema = z.object({\n uid: z.string(),\n title: z.string(),\n description: z.string(),\n createdOn: z.number(),\n coverSquareAssetId: z.string().optional(),\n coverPosterAssetId: z.string().optional(),\n coverCinematicAssetId: z.string().optional(),\n workGenres: z.array(z.string()),\n ...moderationClearedFieldsShape,\n});\nexport type FullTelevision = z.infer<typeof FullTelevisionSchema>;\n\nexport const FullTelevisionEpisodeSchema = z.object({\n uid: z.string(),\n title: z.string(),\n description: z.string().optional(),\n videoAssetId: z.string(),\n mediaType: z.string().optional(),\n order: z.number(),\n photoAssetId: z.string().optional(),\n status: contentStatusSchema,\n createdOn: z.number(),\n ...moderationClearedFieldsShape,\n});\nexport type FullTelevisionEpisode = z.infer<typeof FullTelevisionEpisodeSchema>;\n\n// --- Threshold + Hall library items ---\n\nexport const ThresholdItemSchema = z.object({\n thresholdItemId: z.string(),\n hallItemId: z.string(),\n workProjectId: z.string(),\n workProjectType: z.enum(WORK_PROJECT_TYPE_KEYS),\n itemId: z.string(),\n itemsKey: ItemsKeySchema,\n order: z.number(),\n hallWingType: z.enum(HALL_WING_TYPE_KEYS),\n submittedAt: z.number(),\n reviewStatus: z.enum(['pending', 'needs_revision', 'approved']),\n adminNotes: z.string().optional(),\n reviewedAt: z.number().optional(),\n reviewedBy: z.string().optional(),\n // Parody / real-people AUTHOR ATTESTATION (R3, 2026-07-12). The submitting artisan\n // attests at threshold SUBMIT time that this work depicts real people (parody /\n // satire / commentary); stored with the submission and displayed READ-ONLY to the\n // reviewer. Admins never set or edit it — a reviewer who believes the flag is\n // needed and missing sends the item back needs-revision. The disclaimer shown on\n // published items is the ONE standard platform message\n // (REAL_PEOPLE_DISCLAIMER_MESSAGE) — there is no free-text disclaimer anywhere.\n hasRealPeople: z.boolean(),\n});\nexport type ThresholdItem = z.infer<typeof ThresholdItemSchema>;\n\n// --- Published change requests (launch: text-only) ---\n\n/** The published hall-content surfaces whose TEXT fields a change request (and the\n * moderation text-clear remedy) can target. Detail surfaces live on the hall parent;\n * sub-item surfaces on the published chapter/track/episode doc; the `workRealm`\n * surface targets the single `workRealms/{id}` doc (the realm grain of the one\n * text-change pipeline — R1, 2026-07-12). */\nexport const HallContentTextSurfaceSchema = z.enum([\n 'tale',\n 'tune',\n 'television',\n 'chapter',\n 'tuneTrack',\n 'televisionEpisode',\n 'workRealm',\n]);\nexport type HallContentTextSurface = z.infer<typeof HallContentTextSurfaceSchema>;\n\n/** The ONE canonical hall sub-item kind (a Tale chapter / Tune track / Television\n * episode) as carried on notification metadata and Streetz post payloads. Distinct\n * from `HallContentTextSurfaceSchema` (which keys text-change surfaces and uses the\n * compound `tuneTrack`/`televisionEpisode` identifiers). Never re-declare inline. */\nexport const HallSubItemTypeSchema = z.enum(['chapter', 'track', 'episode']);\nexport type HallSubItemType = z.infer<typeof HallSubItemTypeSchema>;\n\n/** The ONE canonical published-hall-item lifecycle status. */\nexport const PublishedHallItemStatusSchema = z.enum(['published', 'paused', 'banned']);\nexport type PublishedHallItemStatus = z.infer<typeof PublishedHallItemStatusSchema>;\n\n// A member's proposal to change TEXT fields on a PUBLISHED hall item (Ruling 2 of the\n// admin-work-correspondence order). The live published item is NEVER unlocked and never\n// edited by the member — this doc carries the PROPOSED values only; OLD values render\n// live from the published docs. Approve = server writes the values onto the published\n// item + its live in-Work source doc; deny = nothing changes, `resolutionReason` shown\n// to the member. Writes are callable-only; reads are the owning work's active guildmates\n// + admins. `requestKind` future-proofs a media variant (new kind, no schema break).\nexport const HallContentChangeRequestSchema = z.object({\n changeRequestId: z.string(),\n requestKind: z.literal('text'),\n // One-open-per-target enforcement/query key. Hall grains:\n // `${hallItemId}_${subItemId ?? 'detail'}`; realm grain: `realm_${workRealmId}`.\n targetKey: z.string(),\n // null ⇒ the workRealm grain (no hall item involved).\n hallItemId: z.string().nullable(),\n // Always set. On the workRealm grain this is the realm's foundingWorkProjectId\n // (server-derived) so the owner list read, rules, and admin-task fields keep\n // one uniform key across all grains.\n workProjectId: z.string(),\n // null ⇒ the workRealm grain (a realm has no work-project type).\n workProjectType: z.enum(WORK_PROJECT_TYPE_KEYS).nullable(),\n surface: HallContentTextSurfaceSchema,\n // Set ⇒ the workRealm grain; null on the hall grains.\n workRealmId: z.string().nullable(),\n // null ⇒ the hall parent DETAIL (or the workRealm grain); set ⇒ a\n // chapter/track/episode sub-item.\n subItemId: z.string().nullable(),\n proposerUid: z.string(),\n // Raw doc field name → proposed new text. Allowlist + per-field caps enforced by the\n // submit runner against HALL_CONTENT_TEXT_FIELDS / HALL_CONTENT_TEXT_FIELD_MAX.\n proposedFields: z.record(z.string(), z.string()),\n status: z.enum(['requested', 'approved', 'denied']),\n createdAt: z.number(),\n lastUpdatedAt: z.number(),\n resolvedAt: z.number().optional(),\n resolvedBy: z.string().optional(),\n // Admin's reason, surfaced to the member (required on a deny).\n resolutionReason: z.string().optional(),\n});\nexport type HallContentChangeRequest = z.infer<typeof HallContentChangeRequestSchema>;\n\nexport const PublishedHallItemSchema = z.object({\n hallItemId: z.string(),\n workProjectId: z.string(),\n workProjectType: z.enum(WORK_PROJECT_TYPE_KEYS),\n status: PublishedHallItemStatusSchema,\n createdOn: z.number(),\n publishedAt: z.number().optional(),\n hallWingType: z.enum(HALL_WING_TYPE_KEYS),\n title: z.string().optional(),\n description: z.string().optional(),\n coverSquareAssetId: z.string().optional(),\n coverPosterAssetId: z.string().optional(),\n coverCinematicAssetId: z.string().optional(),\n workGenres: z.array(z.string()).optional(),\n followerCount: z.number().optional(),\n hidden: z.boolean(),\n // Whether the current hide was applied DIRECTly to this item or propagated by a moderation\n // CASCADE from a parent (realm/work). Absent when not hidden. Backend-only-writable.\n hiddenBy: z.enum(['direct', 'cascade']).optional(),\n // Moderation text-clear remedy (extends the workProject/workRealm placeholder family, per-field):\n // which text fields an admin cleared to a neutral placeholder and now await steward re-entry\n // (e.g. ['title', 'description']). Empty/absent when nothing was cleared. `moderationClearedReason`\n // is the operator's reason (shown on the steward's edit surface). Backend-only-writable.\n moderationClearedFields: z.array(z.string()).optional(),\n moderationClearedReason: z.string().optional(),\n // Parody / real-people flag (carried from the approved ThresholdItem's AUTHOR\n // attestation — R3, 2026-07-12). When true, display surfaces render the ONE\n // standard platform message (REAL_PEOPLE_DISCLAIMER_MESSAGE) prominently on the\n // published Work — never a stored free-text disclaimer. Backend-written at publish.\n hasRealPeople: z.boolean().optional(),\n});\nexport type PublishedHallItem = z.infer<typeof PublishedHallItemSchema>;\n\nexport const PublishedTuneTrackSchema = z.object({\n uid: z.string(),\n title: z.string(),\n order: z.number(),\n description: z.string().optional(),\n audioAssetId: z.string(),\n photoAssetId: z.string().optional(),\n hidden: z.boolean(),\n // Direct hide vs cascade-from-parent (see PublishedHallItemSchema). Absent when not hidden.\n hiddenBy: z.enum(['direct', 'cascade']).optional(),\n // Per-field moderation text-clear remedy (see PublishedHallItemSchema): which text fields were\n // cleared to a neutral placeholder and await steward re-entry, plus the operator's reason.\n moderationClearedFields: z.array(z.string()).optional(),\n moderationClearedReason: z.string().optional(),\n});\nexport type PublishedTuneTrack = z.infer<typeof PublishedTuneTrackSchema>;\n\nexport const PublishedChapterSchema = z.object({\n uid: z.string(),\n title: z.string(),\n order: z.number(),\n description: z.string().optional(),\n content: z.string(),\n photoAssetId: z.string().optional(),\n hidden: z.boolean(),\n // Direct hide vs cascade-from-parent (see PublishedHallItemSchema). Absent when not hidden.\n hiddenBy: z.enum(['direct', 'cascade']).optional(),\n // Per-field moderation text-clear remedy (see PublishedHallItemSchema): which text fields were\n // cleared to a neutral placeholder and await steward re-entry, plus the operator's reason.\n moderationClearedFields: z.array(z.string()).optional(),\n moderationClearedReason: z.string().optional(),\n});\nexport type PublishedChapter = z.infer<typeof PublishedChapterSchema>;\n\nexport const PublishedTelevisionEpisodeSchema = z.object({\n uid: z.string(),\n title: z.string(),\n order: z.number(),\n description: z.string().optional(),\n videoAssetId: z.string(),\n photoAssetId: z.string().optional(),\n hidden: z.boolean(),\n // Direct hide vs cascade-from-parent (see PublishedHallItemSchema). Absent when not hidden.\n hiddenBy: z.enum(['direct', 'cascade']).optional(),\n // Per-field moderation text-clear remedy (see PublishedHallItemSchema): which text fields were\n // cleared to a neutral placeholder and await steward re-entry, plus the operator's reason.\n moderationClearedFields: z.array(z.string()).optional(),\n moderationClearedReason: z.string().optional(),\n});\nexport type PublishedTelevisionEpisode = z.infer<typeof PublishedTelevisionEpisodeSchema>;\n\n// --- Hall library user preferences (per-user Hall viewing-state doc) ---\n\n// One per-user home, server-synced from day 1 (hall-viewing-experience Area 2, ruled\n// 2026-07-04): `userProfiles/{uid}/privateData/hallLibraryPreferences` (see\n// PATH_BUILDERS.hallLibraryPreferences). Writes are CALLABLE-ONLY — one core owns this\n// doc; heartbeat throttling for playback progress is client-side before the callable\n// fires. Every list on this doc is capped for launch (see HALL_LIBRARY_PREFS_CAPS) —\n// no unbounded per-user lists.\nexport const HallLibraryInProgressEntrySchema = z.object({\n itemId: z.string(),\n positionSeconds: z.number(),\n durationSeconds: z.number().optional(),\n updatedAt: z.number(),\n});\nexport type HallLibraryInProgressEntry = z.infer<typeof HallLibraryInProgressEntrySchema>;\n\nexport const HallLibraryRecentlyViewedEntrySchema = z.object({\n hallItemId: z.string(),\n itemId: z.string().optional(),\n viewedAt: z.number(),\n});\nexport type HallLibraryRecentlyViewedEntry = z.infer<typeof HallLibraryRecentlyViewedEntrySchema>;\n\nexport const HallLibrarySettingsSchema = z.object({\n tunesAutoplay: z.boolean(),\n});\nexport type HallLibrarySettings = z.infer<typeof HallLibrarySettingsSchema>;\n\nexport const HallLibraryPreferencesSchema = z.object({\n userId: z.string(),\n // Hall items the user personally hid (view filter only — see Area 6 ruling 5). Capped\n // ~200: oldest-pruned, or the hide is rejected with a friendly message once full.\n hiddenWorkIds: z.array(z.string()),\n // The \"Inked\" save-for-later watchlist (My Playbill Area 7). Capped ~200.\n inkedWorkIds: z.array(z.string()),\n // Resume position per hallItemId, LRU-capped ~50 (see HALL_LIBRARY_PREFS_CAPS.inProgress).\n // Cap enforcement is the backend core's job on write; this schema only models the shape.\n inProgress: z.record(z.string(), HallLibraryInProgressEntrySchema),\n // Server-side Keep-going/History rail source, capped ~20.\n recentlyViewed: z.array(HallLibraryRecentlyViewedEntrySchema),\n settings: HallLibrarySettingsSchema,\n lastUpdated: z.number(),\n});\nexport type HallLibraryPreferences = z.infer<typeof HallLibraryPreferencesSchema>;\n\n// --- _config singleton docs ---\n\nexport const FuturePlanItemSchema = z.object({\n id: z.string(),\n title: z.string(),\n description: z.string(),\n order: z.number(),\n videoUrl: z.string().optional(),\n mediaType: z.enum(['video', 'image', 'audio', 'other']).optional(),\n});\nexport type FuturePlanItem = z.infer<typeof FuturePlanItemSchema>;\n\nexport const FuturePlansDocumentSchema = z.object({\n lastUpdated: z.number(),\n plans: z.array(FuturePlanItemSchema),\n // Content version — bumped by the update callable on EVERY save (content-pages\n // migration, DJ ruling 2026-07-06). Optional because pre-migration docs lack\n // it; readers treat absence as version 1.\n version: z.number().optional(),\n});\nexport type FuturePlansDocument = z.infer<typeof FuturePlansDocumentSchema>;\n\nexport const RuleGroupSchema = z.enum(['generic', 'workProjectType', 'hallWingType', 'workRealm', 'merchandising']);\nexport type RuleGroup = z.infer<typeof RuleGroupSchema>;\n\nexport const RuleSubgroupSchema = z.enum(['Tales', 'Tunes', 'Television', 'entertainment', 'educational', 'newsPolitical']);\nexport type RuleSubgroup = z.infer<typeof RuleSubgroupSchema>;\n\nexport const RuleSchema = z.object({\n id: z.string(),\n title: z.string(),\n description: z.string(),\n videoUrl: z.string().optional(),\n group: RuleGroupSchema.optional(),\n subgroup: RuleSubgroupSchema.optional(),\n order: z.number(),\n});\nexport type Rule = z.infer<typeof RuleSchema>;\n\nexport const AgreementCategorySchema = z.object({\n points: z.array(z.string()),\n videoUrl: z.string().optional(),\n});\nexport type AgreementCategory = z.infer<typeof AgreementCategorySchema>;\n\nexport const RulesAndAgreementsSchema = z.object({\n rules: z.array(RuleSchema),\n agreements: z.object({\n tales: AgreementCategorySchema.optional(),\n tunes: AgreementCategorySchema.optional(),\n television: AgreementCategorySchema.optional(),\n }),\n // Content version — bumped by the update callable on EVERY save (content-pages\n // migration, DJ ruling 2026-07-06). Optional because pre-migration docs lack\n // it; readers treat absence as version 1.\n version: z.number().optional(),\n});\nexport type RulesAndAgreements = z.infer<typeof RulesAndAgreementsSchema>;\n\n// --- Editable content-page docs (content-pages Firestore migration, DJ ruling 2026-07-06) ---\n//\n// /terms, /privacy, and the /take-it-down page copy render EXCLUSIVELY from\n// these `_config` singletons — no hardcoded fallbacks anywhere (banned design).\n// Seed callables create them (strict seed-if-empty: doc exists ⇒ no-op); admin\n// editors are the only writers after that, and every save bumps `version`.\n// Acceptance records (e.g. privateData.agreements.termsVersion) read `version`\n// from the DOC server-side at acceptance time — never from a constant.\n// There is NO draft flag on any content doc (DJ ruling 2026-07-06).\n\n/** One section of a long-form content page. `level` 1 = section (h2), 2 = subsection (h3). */\nexport const ContentPageSectionSchema = z.object({\n id: z.string(),\n heading: z.string(),\n level: z.union([z.literal(1), z.literal(2)]),\n /** Plain text; blank-line-separated paragraphs. */\n body: z.string(),\n order: z.number(),\n});\nexport type ContentPageSection = z.infer<typeof ContentPageSectionSchema>;\n\n/** Long-form legal page doc — the shape of BOTH `_config/termsOfService` and `_config/privacyPolicy`. */\nexport const LegalPageDocumentSchema = z.object({\n version: z.number(),\n lastUpdated: z.number(),\n sections: z.array(ContentPageSectionSchema),\n});\nexport type LegalPageDocument = z.infer<typeof LegalPageDocumentSchema>;\n\n/**\n * `_config/takeItDownPageCopy` — the /take-it-down page's user-facing language as\n * a keyed strings map (the page is a functional form, so its copy is discrete\n * labeled strings, not long-form sections). Keys are stable identifiers defined\n * by the page (e.g. `pageTitle`, `introBody`); the admin editor renders one\n * labeled text field per key.\n */\nexport const TakeItDownPageCopySchema = z.object({\n version: z.number(),\n lastUpdated: z.number(),\n strings: z.record(z.string(), z.string()),\n});\nexport type TakeItDownPageCopy = z.infer<typeof TakeItDownPageCopySchema>;\n"]}
|
|
1
|
+
{"version":3,"file":"content.js","sourceRoot":"","sources":["../../src/doc-schemas/content.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,+EAA+E;AAC/E,qFAAqF;AACrF,sFAAsF;AACtF,2DAA2D;AAE3D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EA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CAAC,QAAQ,EAAE;CAC/B,CAAC,CAAC;AAGH,+FAA+F;AAC/F,EAAE;AACF,4EAA4E;AAC5E,gFAAgF;AAChF,+EAA+E;AAC/E,2EAA2E;AAC3E,+EAA+E;AAC/E,uEAAuE;AACvE,oEAAoE;AAEpE,8FAA8F;AAC9F,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5C,mDAAmD;IACnD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC;AAGH,+GAA+G;AAC/G,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,wBAAwB,CAAC;CAC5C,CAAC,CAAC;AAGH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;CAC1C,CAAC,CAAC","sourcesContent":["// Content Firestore document SCHEMAS — Tales/Tunes/Television sub-documents, the\n// Threshold + Hall library item shapes, Hall library user preferences, and the\n// `_config` singleton docs (futurePlans, rulesAndAgreements). Types are inferred via\n// z.infer. The enum-key consts (HALL_WING_TYPE_KEYS / WORK_PROJECT_TYPE_KEYS) and the\n// UI-only filter/view types remain in ../types/content.ts.\n\nimport { z } from 'zod';\nimport { HALL_WING_TYPE_KEYS, WORK_PROJECT_TYPE_KEYS } from '../types/content.js';\n\nconst contentStatusSchema = z.enum(['unpublished', 'pending_approval', 'published']);\n\n// Per-field moderation text-clear remedy (shared shape across the content family — Tale/Tune/\n// Television details, their chapter/track/episode sub-items, and the published Hall projections of\n// both). `moderationClearedFields` lists which text fields (e.g. 'title', 'description', 'content')\n// an admin cleared to a neutral placeholder and which now await steward re-entry; empty/absent when\n// nothing was cleared. `moderationClearedReason` is the operator's reason, surfaced on the member's\n// edit surface. Extends the workProject/workRealm placeholder remedy per-field. Backend-only-writable.\nconst moderationClearedFieldsShape = {\n moderationClearedFields: z.array(z.string()).optional(),\n moderationClearedReason: z.string().optional(),\n};\n\nexport const ItemsKeySchema = z.enum(['tuneTracks', 'chapters', 'televisionEpisodes']);\nexport type ItemsKey = z.infer<typeof ItemsKeySchema>;\n\n// --- WorkProject content sub-docs ---\n\nexport const FullTaleSchema = z.object({\n uid: z.string(),\n title: z.string(),\n description: z.string(),\n createdOn: z.number(),\n coverSquareAssetId: z.string().optional(),\n coverPosterAssetId: z.string().optional(),\n coverCinematicAssetId: z.string().optional(),\n workGenres: z.array(z.string()).optional(),\n ...moderationClearedFieldsShape,\n});\nexport type FullTale = z.infer<typeof FullTaleSchema>;\n\nexport const FullChapterSchema = z.object({\n uid: z.string(),\n title: z.string(),\n content: z.string(),\n description: z.string(),\n order: z.number(),\n photoAssetId: z.string().optional(),\n status: contentStatusSchema,\n createdOn: z.number(),\n ...moderationClearedFieldsShape,\n});\nexport type FullChapter = z.infer<typeof FullChapterSchema>;\n\nexport const FullTuneSchema = z.object({\n uid: z.string(),\n title: z.string(),\n description: z.string(),\n coverSquareAssetId: z.string().optional(),\n coverPosterAssetId: z.string().optional(),\n coverCinematicAssetId: z.string().optional(),\n workGenres: z.array(z.string()),\n createdOn: z.number(),\n ...moderationClearedFieldsShape,\n});\nexport type FullTune = z.infer<typeof FullTuneSchema>;\n\nexport const FullTuneTrackSchema = z.object({\n uid: z.string(),\n title: z.string(),\n description: z.string().optional(),\n audioAssetId: z.string().optional(),\n mediaType: z.string().optional(),\n order: z.number(),\n photoAssetId: z.string().optional(),\n status: contentStatusSchema,\n createdOn: z.number(),\n ...moderationClearedFieldsShape,\n});\nexport type FullTuneTrack = z.infer<typeof FullTuneTrackSchema>;\n\nexport const FullTelevisionSchema = z.object({\n uid: z.string(),\n title: z.string(),\n description: z.string(),\n createdOn: z.number(),\n coverSquareAssetId: z.string().optional(),\n coverPosterAssetId: z.string().optional(),\n coverCinematicAssetId: z.string().optional(),\n workGenres: z.array(z.string()),\n ...moderationClearedFieldsShape,\n});\nexport type FullTelevision = z.infer<typeof FullTelevisionSchema>;\n\nexport const FullTelevisionEpisodeSchema = z.object({\n uid: z.string(),\n title: z.string(),\n description: z.string().optional(),\n videoAssetId: z.string(),\n mediaType: z.string().optional(),\n order: z.number(),\n photoAssetId: z.string().optional(),\n status: contentStatusSchema,\n createdOn: z.number(),\n ...moderationClearedFieldsShape,\n});\nexport type FullTelevisionEpisode = z.infer<typeof FullTelevisionEpisodeSchema>;\n\n// --- Threshold + Hall library items ---\n\n/** `allWorkProjects/{workProjectId}/hallSubmissionReservation/reservation` — the Work's ONE\n * hall-entry reservation, created (never updated) inside the first threshold submit's\n * transaction; every later submit converges on its `hallItemId`. Backend-only. */\nexport const HallSubmissionReservationSchema = z.object({\n hallItemId: z.string().min(1),\n createdAt: z.number(),\n}).strict();\nexport type HallSubmissionReservation = z.infer<typeof HallSubmissionReservationSchema>;\n\nexport const ThresholdItemSchema = z.object({\n thresholdItemId: z.string(),\n hallItemId: z.string(),\n workProjectId: z.string(),\n workProjectType: z.enum(WORK_PROJECT_TYPE_KEYS),\n itemId: z.string(),\n itemsKey: ItemsKeySchema,\n order: z.number(),\n hallWingType: z.enum(HALL_WING_TYPE_KEYS),\n submittedAt: z.number(),\n reviewStatus: z.enum(['pending', 'needs_revision', 'approved']),\n adminNotes: z.string().optional(),\n reviewedAt: z.number().optional(),\n reviewedBy: z.string().optional(),\n // Parody / real-people AUTHOR ATTESTATION (R3, 2026-07-12). The submitting artisan\n // attests at threshold SUBMIT time that this work depicts real people (parody /\n // satire / commentary); stored with the submission and displayed READ-ONLY to the\n // reviewer. Admins never set or edit it — a reviewer who believes the flag is\n // needed and missing sends the item back needs-revision. The disclaimer shown on\n // published items is the ONE standard platform message\n // (REAL_PEOPLE_DISCLAIMER_MESSAGE) — there is no free-text disclaimer anywhere.\n hasRealPeople: z.boolean(),\n});\nexport type ThresholdItem = z.infer<typeof ThresholdItemSchema>;\n\n// --- Published change requests (launch: text-only) ---\n\n/** The published hall-content surfaces whose TEXT fields a change request (and the\n * moderation text-clear remedy) can target. Detail surfaces live on the hall parent;\n * sub-item surfaces on the published chapter/track/episode doc; the `workRealm`\n * surface targets the single `workRealms/{id}` doc (the realm grain of the one\n * text-change pipeline — R1, 2026-07-12). */\nexport const HallContentTextSurfaceSchema = z.enum([\n 'tale',\n 'tune',\n 'television',\n 'chapter',\n 'tuneTrack',\n 'televisionEpisode',\n 'workRealm',\n]);\nexport type HallContentTextSurface = z.infer<typeof HallContentTextSurfaceSchema>;\n\n/** The ONE canonical hall sub-item kind (a Tale chapter / Tune track / Television\n * episode) as carried on notification metadata and Streetz post payloads. Distinct\n * from `HallContentTextSurfaceSchema` (which keys text-change surfaces and uses the\n * compound `tuneTrack`/`televisionEpisode` identifiers). Never re-declare inline. */\nexport const HallSubItemTypeSchema = z.enum(['chapter', 'track', 'episode']);\nexport type HallSubItemType = z.infer<typeof HallSubItemTypeSchema>;\n\n/** The ONE canonical published-hall-item lifecycle status. */\nexport const PublishedHallItemStatusSchema = z.enum(['published', 'paused', 'banned']);\nexport type PublishedHallItemStatus = z.infer<typeof PublishedHallItemStatusSchema>;\n\n// A member's proposal to change TEXT fields on a PUBLISHED hall item (Ruling 2 of the\n// admin-work-correspondence order). The live published item is NEVER unlocked and never\n// edited by the member — this doc carries the PROPOSED values only; OLD values render\n// live from the published docs. Approve = server writes the values onto the published\n// item + its live in-Work source doc; deny = nothing changes, `resolutionReason` shown\n// to the member. Writes are callable-only; reads are the owning work's active guildmates\n// + admins. `requestKind` future-proofs a media variant (new kind, no schema break).\nexport const HallContentChangeRequestSchema = z.object({\n changeRequestId: z.string(),\n requestKind: z.literal('text'),\n // One-open-per-target enforcement/query key. Hall grains:\n // `${hallItemId}_${subItemId ?? 'detail'}`; realm grain: `realm_${workRealmId}`.\n targetKey: z.string(),\n // null ⇒ the workRealm grain (no hall item involved).\n hallItemId: z.string().nullable(),\n // Always set. On the workRealm grain this is the realm's foundingWorkProjectId\n // (server-derived) so the owner list read, rules, and admin-task fields keep\n // one uniform key across all grains.\n workProjectId: z.string(),\n // null ⇒ the workRealm grain (a realm has no work-project type).\n workProjectType: z.enum(WORK_PROJECT_TYPE_KEYS).nullable(),\n surface: HallContentTextSurfaceSchema,\n // Set ⇒ the workRealm grain; null on the hall grains.\n workRealmId: z.string().nullable(),\n // null ⇒ the hall parent DETAIL (or the workRealm grain); set ⇒ a\n // chapter/track/episode sub-item.\n subItemId: z.string().nullable(),\n proposerUid: z.string(),\n // Raw doc field name → proposed new text. Allowlist + per-field caps enforced by the\n // submit runner against HALL_CONTENT_TEXT_FIELDS / HALL_CONTENT_TEXT_FIELD_MAX.\n proposedFields: z.record(z.string(), z.string()),\n status: z.enum(['requested', 'approved', 'denied']),\n createdAt: z.number(),\n lastUpdatedAt: z.number(),\n resolvedAt: z.number().optional(),\n resolvedBy: z.string().optional(),\n // Admin's reason, surfaced to the member (required on a deny).\n resolutionReason: z.string().optional(),\n});\nexport type HallContentChangeRequest = z.infer<typeof HallContentChangeRequestSchema>;\n\nexport const PublishedHallItemSchema = z.object({\n hallItemId: z.string(),\n workProjectId: z.string(),\n workProjectType: z.enum(WORK_PROJECT_TYPE_KEYS),\n status: PublishedHallItemStatusSchema,\n createdOn: z.number(),\n publishedAt: z.number().optional(),\n hallWingType: z.enum(HALL_WING_TYPE_KEYS),\n title: z.string().optional(),\n description: z.string().optional(),\n coverSquareAssetId: z.string().optional(),\n coverPosterAssetId: z.string().optional(),\n coverCinematicAssetId: z.string().optional(),\n workGenres: z.array(z.string()).optional(),\n followerCount: z.number().optional(),\n hidden: z.boolean(),\n // Whether the current hide was applied DIRECTly to this item or propagated by a moderation\n // CASCADE from a parent (realm/work). Absent when not hidden. Backend-only-writable.\n hiddenBy: z.enum(['direct', 'cascade']).optional(),\n // Moderation text-clear remedy (extends the workProject/workRealm placeholder family, per-field):\n // which text fields an admin cleared to a neutral placeholder and now await steward re-entry\n // (e.g. ['title', 'description']). Empty/absent when nothing was cleared. `moderationClearedReason`\n // is the operator's reason (shown on the steward's edit surface). Backend-only-writable.\n moderationClearedFields: z.array(z.string()).optional(),\n moderationClearedReason: z.string().optional(),\n // Parody / real-people flag (carried from the approved ThresholdItem's AUTHOR\n // attestation — R3, 2026-07-12). When true, display surfaces render the ONE\n // standard platform message (REAL_PEOPLE_DISCLAIMER_MESSAGE) prominently on the\n // published Work — never a stored free-text disclaimer. Backend-written at publish.\n hasRealPeople: z.boolean().optional(),\n});\nexport type PublishedHallItem = z.infer<typeof PublishedHallItemSchema>;\n\nexport const PublishedTuneTrackSchema = z.object({\n uid: z.string(),\n title: z.string(),\n order: z.number(),\n description: z.string().optional(),\n audioAssetId: z.string(),\n photoAssetId: z.string().optional(),\n hidden: z.boolean(),\n // Direct hide vs cascade-from-parent (see PublishedHallItemSchema). Absent when not hidden.\n hiddenBy: z.enum(['direct', 'cascade']).optional(),\n // Per-field moderation text-clear remedy (see PublishedHallItemSchema): which text fields were\n // cleared to a neutral placeholder and await steward re-entry, plus the operator's reason.\n moderationClearedFields: z.array(z.string()).optional(),\n moderationClearedReason: z.string().optional(),\n});\nexport type PublishedTuneTrack = z.infer<typeof PublishedTuneTrackSchema>;\n\nexport const PublishedChapterSchema = z.object({\n uid: z.string(),\n title: z.string(),\n order: z.number(),\n description: z.string().optional(),\n content: z.string(),\n photoAssetId: z.string().optional(),\n hidden: z.boolean(),\n // Direct hide vs cascade-from-parent (see PublishedHallItemSchema). Absent when not hidden.\n hiddenBy: z.enum(['direct', 'cascade']).optional(),\n // Per-field moderation text-clear remedy (see PublishedHallItemSchema): which text fields were\n // cleared to a neutral placeholder and await steward re-entry, plus the operator's reason.\n moderationClearedFields: z.array(z.string()).optional(),\n moderationClearedReason: z.string().optional(),\n});\nexport type PublishedChapter = z.infer<typeof PublishedChapterSchema>;\n\nexport const PublishedTelevisionEpisodeSchema = z.object({\n uid: z.string(),\n title: z.string(),\n order: z.number(),\n description: z.string().optional(),\n videoAssetId: z.string(),\n photoAssetId: z.string().optional(),\n hidden: z.boolean(),\n // Direct hide vs cascade-from-parent (see PublishedHallItemSchema). Absent when not hidden.\n hiddenBy: z.enum(['direct', 'cascade']).optional(),\n // Per-field moderation text-clear remedy (see PublishedHallItemSchema): which text fields were\n // cleared to a neutral placeholder and await steward re-entry, plus the operator's reason.\n moderationClearedFields: z.array(z.string()).optional(),\n moderationClearedReason: z.string().optional(),\n});\nexport type PublishedTelevisionEpisode = z.infer<typeof PublishedTelevisionEpisodeSchema>;\n\n// --- Hall library user preferences (per-user Hall viewing-state doc) ---\n\n// One per-user home, server-synced from day 1 (hall-viewing-experience Area 2, ruled\n// 2026-07-04): `userProfiles/{uid}/privateData/hallLibraryPreferences` (see\n// PATH_BUILDERS.hallLibraryPreferences). Writes are CALLABLE-ONLY — one core owns this\n// doc; heartbeat throttling for playback progress is client-side before the callable\n// fires. Every list on this doc is capped for launch (see HALL_LIBRARY_PREFS_CAPS) —\n// no unbounded per-user lists.\nexport const HallLibraryInProgressEntrySchema = z.object({\n itemId: z.string(),\n positionSeconds: z.number(),\n durationSeconds: z.number().optional(),\n updatedAt: z.number(),\n});\nexport type HallLibraryInProgressEntry = z.infer<typeof HallLibraryInProgressEntrySchema>;\n\nexport const HallLibraryRecentlyViewedEntrySchema = z.object({\n hallItemId: z.string(),\n itemId: z.string().optional(),\n viewedAt: z.number(),\n});\nexport type HallLibraryRecentlyViewedEntry = z.infer<typeof HallLibraryRecentlyViewedEntrySchema>;\n\nexport const HallLibrarySettingsSchema = z.object({\n tunesAutoplay: z.boolean(),\n});\nexport type HallLibrarySettings = z.infer<typeof HallLibrarySettingsSchema>;\n\nexport const HallLibraryPreferencesSchema = z.object({\n userId: z.string(),\n // Hall items the user personally hid (view filter only — see Area 6 ruling 5). Capped\n // ~200: oldest-pruned, or the hide is rejected with a friendly message once full.\n hiddenWorkIds: z.array(z.string()),\n // The \"Inked\" save-for-later watchlist (My Playbill Area 7). Capped ~200.\n inkedWorkIds: z.array(z.string()),\n // Resume position per hallItemId, LRU-capped ~50 (see HALL_LIBRARY_PREFS_CAPS.inProgress).\n // Cap enforcement is the backend core's job on write; this schema only models the shape.\n inProgress: z.record(z.string(), HallLibraryInProgressEntrySchema),\n // Server-side Keep-going/History rail source, capped ~20.\n recentlyViewed: z.array(HallLibraryRecentlyViewedEntrySchema),\n settings: HallLibrarySettingsSchema,\n lastUpdated: z.number(),\n});\nexport type HallLibraryPreferences = z.infer<typeof HallLibraryPreferencesSchema>;\n\n// --- _config singleton docs ---\n\nexport const FuturePlanItemSchema = z.object({\n id: z.string(),\n title: z.string(),\n description: z.string(),\n order: z.number(),\n videoUrl: z.string().optional(),\n mediaType: z.enum(['video', 'image', 'audio', 'other']).optional(),\n});\nexport type FuturePlanItem = z.infer<typeof FuturePlanItemSchema>;\n\nexport const FuturePlansDocumentSchema = z.object({\n lastUpdated: z.number(),\n plans: z.array(FuturePlanItemSchema),\n // Content version — bumped by the update callable on EVERY save (content-pages\n // migration, DJ ruling 2026-07-06). Optional because pre-migration docs lack\n // it; readers treat absence as version 1.\n version: z.number().optional(),\n});\nexport type FuturePlansDocument = z.infer<typeof FuturePlansDocumentSchema>;\n\nexport const RuleGroupSchema = z.enum(['generic', 'workProjectType', 'hallWingType', 'workRealm', 'merchandising']);\nexport type RuleGroup = z.infer<typeof RuleGroupSchema>;\n\nexport const RuleSubgroupSchema = z.enum(['Tales', 'Tunes', 'Television', 'entertainment', 'educational', 'newsPolitical']);\nexport type RuleSubgroup = z.infer<typeof RuleSubgroupSchema>;\n\nexport const RuleSchema = z.object({\n id: z.string(),\n title: z.string(),\n description: z.string(),\n videoUrl: z.string().optional(),\n group: RuleGroupSchema.optional(),\n subgroup: RuleSubgroupSchema.optional(),\n order: z.number(),\n});\nexport type Rule = z.infer<typeof RuleSchema>;\n\nexport const AgreementCategorySchema = z.object({\n points: z.array(z.string()),\n videoUrl: z.string().optional(),\n});\nexport type AgreementCategory = z.infer<typeof AgreementCategorySchema>;\n\nexport const RulesAndAgreementsSchema = z.object({\n rules: z.array(RuleSchema),\n agreements: z.object({\n tales: AgreementCategorySchema.optional(),\n tunes: AgreementCategorySchema.optional(),\n television: AgreementCategorySchema.optional(),\n }),\n // Content version — bumped by the update callable on EVERY save (content-pages\n // migration, DJ ruling 2026-07-06). Optional because pre-migration docs lack\n // it; readers treat absence as version 1.\n version: z.number().optional(),\n});\nexport type RulesAndAgreements = z.infer<typeof RulesAndAgreementsSchema>;\n\n// --- Editable content-page docs (content-pages Firestore migration, DJ ruling 2026-07-06) ---\n//\n// /terms, /privacy, and the /take-it-down page copy render EXCLUSIVELY from\n// these `_config` singletons — no hardcoded fallbacks anywhere (banned design).\n// Seed callables create them (strict seed-if-empty: doc exists ⇒ no-op); admin\n// editors are the only writers after that, and every save bumps `version`.\n// Acceptance records (e.g. privateData.agreements.termsVersion) read `version`\n// from the DOC server-side at acceptance time — never from a constant.\n// There is NO draft flag on any content doc (DJ ruling 2026-07-06).\n\n/** One section of a long-form content page. `level` 1 = section (h2), 2 = subsection (h3). */\nexport const ContentPageSectionSchema = z.object({\n id: z.string(),\n heading: z.string(),\n level: z.union([z.literal(1), z.literal(2)]),\n /** Plain text; blank-line-separated paragraphs. */\n body: z.string(),\n order: z.number(),\n});\nexport type ContentPageSection = z.infer<typeof ContentPageSectionSchema>;\n\n/** Long-form legal page doc — the shape of BOTH `_appConfig/termsOfService` and `_appConfig/privacyPolicy`. */\nexport const LegalPageDocumentSchema = z.object({\n version: z.number(),\n lastUpdated: z.number(),\n sections: z.array(ContentPageSectionSchema),\n});\nexport type LegalPageDocument = z.infer<typeof LegalPageDocumentSchema>;\n\n/**\n * `_appConfig/takeItDownPageCopy` — the /take-it-down page's user-facing language as\n * a keyed strings map (the page is a functional form, so its copy is discrete\n * labeled strings, not long-form sections). Keys are stable identifiers defined\n * by the page (e.g. `pageTitle`, `introBody`); the admin editor renders one\n * labeled text field per key.\n */\nexport const TakeItDownPageCopySchema = z.object({\n version: z.number(),\n lastUpdated: z.number(),\n strings: z.record(z.string(), z.string()),\n});\nexport type TakeItDownPageCopy = z.infer<typeof TakeItDownPageCopySchema>;\n"]}
|
|
@@ -17,6 +17,7 @@ export * from './report-docs.js';
|
|
|
17
17
|
export * from './audit.js';
|
|
18
18
|
export * from './notifications.js';
|
|
19
19
|
export * from './notification-ledger.js';
|
|
20
|
+
export * from './notification-archive-all-jobs.js';
|
|
20
21
|
export * from './chat-sync.js';
|
|
21
22
|
export * from './operational.js';
|
|
22
23
|
export * from './safety/foundation.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/index.ts"],"names":[],"mappings":"AAMA,cAAc,WAAW,CAAC;AAC1B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAg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AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AACnD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AAGjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAGhC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AAGjC,cAAc,oBAAoB,CAAC;AAEnC,cAAc,eAAe,CAAC"}
|
|
@@ -22,6 +22,7 @@ export * from './report-docs.js';
|
|
|
22
22
|
export * from './audit.js';
|
|
23
23
|
export * from './notifications.js';
|
|
24
24
|
export * from './notification-ledger.js';
|
|
25
|
+
export * from './notification-archive-all-jobs.js';
|
|
25
26
|
export * from './chat-sync.js';
|
|
26
27
|
export * from './operational.js';
|
|
27
28
|
// ===== Trust & Safety — shared foundation + cluster schemas (§A1–A11) =====
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/doc-schemas/index.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,sFAAsF;AACtF,sFAAsF;AACtF,wFAAwF;AACxF,mFAAmF;AAEnF,cAAc,WAAW,CAAC;AAC1B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AAEjC,6EAA6E;AAC7E,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAEhC,0DAA0D;AAC1D,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AAEjC,sDAAsD;AACtD,cAAc,oBAAoB,CAAC;AAEnC,cAAc,eAAe,CAAC","sourcesContent":["// Barrel for the Firestore document SCHEMAS (Zod) and the collection registry.\n// Exposed on the `@ttt-productions/ttt-core/doc-schemas` subpath. The schema registry\n// (COLLECTION_SCHEMAS) is consumed by the schema-doc generator (ttt-packages) and the\n// drift-check (ttt-prod). Document TYPES are inferred from these schemas and surface on\n// the main barrel via ../types/*; this subpath is the home of the runtime schemas.\n\nexport * from './user.js';\nexport * from './firestore-primitives.js';\nexport * from './media-assets.js';\nexport * from './media-activation-jobs.js';\nexport * from './publicUser.js';\nexport * from './account-deletion.js';\nexport * from './work-project.js';\nexport * from './content.js';\nexport * from './social.js';\nexport * from './square-announcement-jobs.js';\nexport * from './payments.js';\nexport * from './commissions.js';\nexport * from './messaging.js';\nexport * from './system.js';\nexport * from './moderation.js';\nexport * from './report-docs.js';\nexport * from './audit.js';\nexport * from './notifications.js';\nexport * from './notification-ledger.js';\nexport * from './chat-sync.js';\nexport * from './operational.js';\n\n// ===== Trust & Safety — shared foundation + cluster schemas (§A1–A11) =====\nexport * from './safety/foundation.js';\nexport * from './safety/report.js';\nexport * from './safety/case-alert.js';\nexport * from './safety/case.js';\nexport * from './safety/case-aliases.js';\nexport * from './safety/holds.js';\nexport * from './safety/evidence.js';\nexport * from './safety/provenance.js';\nexport * from './safety/sagas.js';\nexport * from './safety/monitors.js';\nexport * from './safety/age.js';\n\n// ===== Trust & Safety — NCII / TAKE IT DOWN (§A11) =====\nexport * from './ncii/allegations.js';\nexport * from './ncii/requests.js';\nexport * from './ncii/cases.js';\nexport * from './ncii/holds.js';\nexport * from './ncii/removal.js';\nexport * from './ncii/config.js';\n\n// ===== Backend-only cursor / operational state =====\nexport * from './backend-state.js';\n\nexport * from './registry.js';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/doc-schemas/index.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,sFAAsF;AACtF,sFAAsF;AACtF,wFAAwF;AACxF,mFAAmF;AAEnF,cAAc,WAAW,CAAC;AAC1B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AACnD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AAEjC,6EAA6E;AAC7E,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAEhC,0DAA0D;AAC1D,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AAEjC,sDAAsD;AACtD,cAAc,oBAAoB,CAAC;AAEnC,cAAc,eAAe,CAAC","sourcesContent":["// Barrel for the Firestore document SCHEMAS (Zod) and the collection registry.\n// Exposed on the `@ttt-productions/ttt-core/doc-schemas` subpath. The schema registry\n// (COLLECTION_SCHEMAS) is consumed by the schema-doc generator (ttt-packages) and the\n// drift-check (ttt-prod). Document TYPES are inferred from these schemas and surface on\n// the main barrel via ../types/*; this subpath is the home of the runtime schemas.\n\nexport * from './user.js';\nexport * from './firestore-primitives.js';\nexport * from './media-assets.js';\nexport * from './media-activation-jobs.js';\nexport * from './publicUser.js';\nexport * from './account-deletion.js';\nexport * from './work-project.js';\nexport * from './content.js';\nexport * from './social.js';\nexport * from './square-announcement-jobs.js';\nexport * from './payments.js';\nexport * from './commissions.js';\nexport * from './messaging.js';\nexport * from './system.js';\nexport * from './moderation.js';\nexport * from './report-docs.js';\nexport * from './audit.js';\nexport * from './notifications.js';\nexport * from './notification-ledger.js';\nexport * from './notification-archive-all-jobs.js';\nexport * from './chat-sync.js';\nexport * from './operational.js';\n\n// ===== Trust & Safety — shared foundation + cluster schemas (§A1–A11) =====\nexport * from './safety/foundation.js';\nexport * from './safety/report.js';\nexport * from './safety/case-alert.js';\nexport * from './safety/case.js';\nexport * from './safety/case-aliases.js';\nexport * from './safety/holds.js';\nexport * from './safety/evidence.js';\nexport * from './safety/provenance.js';\nexport * from './safety/sagas.js';\nexport * from './safety/monitors.js';\nexport * from './safety/age.js';\n\n// ===== Trust & Safety — NCII / TAKE IT DOWN (§A11) =====\nexport * from './ncii/allegations.js';\nexport * from './ncii/requests.js';\nexport * from './ncii/cases.js';\nexport * from './ncii/holds.js';\nexport * from './ncii/removal.js';\nexport * from './ncii/config.js';\n\n// ===== Backend-only cursor / operational state =====\nexport * from './backend-state.js';\n\nexport * from './registry.js';\n"]}
|
|
@@ -156,8 +156,8 @@ export declare const AdminDispatchSchema: z.ZodObject<{
|
|
|
156
156
|
userId: z.ZodString;
|
|
157
157
|
initiatorUserId: z.ZodString;
|
|
158
158
|
initiatedBy: z.ZodEnum<{
|
|
159
|
-
user: "user";
|
|
160
159
|
admin: "admin";
|
|
160
|
+
user: "user";
|
|
161
161
|
}>;
|
|
162
162
|
subject: z.ZodString;
|
|
163
163
|
status: z.ZodEnum<{
|
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
/** Blocked-hash retention policy — indefinite until an appeal reverses it. */
|
|
3
3
|
export declare const NciiBlockedHashRetentionPolicySchema: z.ZodLiteral<"indefiniteUntilReversed">;
|
|
4
4
|
export type NciiBlockedHashRetentionPolicy = z.infer<typeof NciiBlockedHashRetentionPolicySchema>;
|
|
5
|
-
/** `
|
|
5
|
+
/** `_serverData/nciiPolicy` = `NciiPolicyConfigV1` — the DJ-approved launch defaults.
|
|
6
6
|
* Counsel ratifies (`counselApproved`) at the pre-launch gate; uploads stay
|
|
7
7
|
* blocked until then. Any value missing/placeholder → the launch audit FAILS
|
|
8
8
|
* CLOSED. */
|
|
@@ -36,7 +36,7 @@ export declare const NciiPolicyConfigV1Schema: z.ZodObject<{
|
|
|
36
36
|
counselApproved: z.ZodBoolean;
|
|
37
37
|
}, z.core.$strict>;
|
|
38
38
|
export type NciiPolicyConfigV1 = z.infer<typeof NciiPolicyConfigV1Schema>;
|
|
39
|
-
/** The frozen launch default for `
|
|
39
|
+
/** The frozen launch default for `_serverData/nciiPolicy`. */
|
|
40
40
|
export declare const DEFAULT_NCII_POLICY_CONFIG_V1: NciiPolicyConfigV1;
|
|
41
41
|
/** The phishing-resistant second factor — password-only, SMS, and TOTP are NEVER
|
|
42
42
|
* sufficient for a privileged capability. */
|
|
@@ -53,7 +53,7 @@ export declare const PrivilegedTwoStepReauthCapabilitySchema: z.ZodEnum<{
|
|
|
53
53
|
ncmecManualFallback: "ncmecManualFallback";
|
|
54
54
|
}>;
|
|
55
55
|
export type PrivilegedTwoStepReauthCapability = z.infer<typeof PrivilegedTwoStepReauthCapabilitySchema>;
|
|
56
|
-
/** `
|
|
56
|
+
/** `_serverData/privilegedReviewerSecurity` = `PrivilegedReviewerSecurityProfileV1` —
|
|
57
57
|
* what "fresh reauth" actually means for any privileged-reviewer capability. */
|
|
58
58
|
export declare const PrivilegedReviewerSecurityProfileV1Schema: z.ZodObject<{
|
|
59
59
|
requiredSecondFactor: z.ZodLiteral<"passkeyWebAuthn">;
|
|
@@ -73,6 +73,6 @@ export declare const PrivilegedReviewerSecurityProfileV1Schema: z.ZodObject<{
|
|
|
73
73
|
everyInvocationAudited: z.ZodBoolean;
|
|
74
74
|
}, z.core.$strict>;
|
|
75
75
|
export type PrivilegedReviewerSecurityProfileV1 = z.infer<typeof PrivilegedReviewerSecurityProfileV1Schema>;
|
|
76
|
-
/** The frozen launch default for `
|
|
76
|
+
/** The frozen launch default for `_serverData/privilegedReviewerSecurity`. */
|
|
77
77
|
export declare const DEFAULT_PRIVILEGED_REVIEWER_SECURITY_PROFILE_V1: PrivilegedReviewerSecurityProfileV1;
|
|
78
78
|
//# sourceMappingURL=config.d.ts.map
|