@ttt-productions/ttt-core 0.79.94 → 0.79.96

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.
@@ -951,5 +951,8 @@ export declare const GetDeadLettersInputSchema: z.ZodOptional<z.ZodNullable<z.Zo
951
951
  limit: z.ZodOptional<z.ZodNumber>;
952
952
  }, z.core.$strict>>>;
953
953
  export type GetDeadLettersInput = z.infer<typeof GetDeadLettersInputSchema>;
954
+ /** The `getOpsStatus` input: the snapshot takes no parameters, and anything sent is refused. */
955
+ export declare const GetOpsStatusInputSchema: z.ZodObject<{}, z.core.$strict>;
956
+ export type GetOpsStatusInput = z.infer<typeof GetOpsStatusInputSchema>;
954
957
  export {};
955
958
  //# sourceMappingURL=admin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../src/schemas/admin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkGxB,eAAO,MAAM,oCAAoC,iCAAwB,CAAC;AAC1E,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC;AAElG,eAAO,MAAM,8BAA8B;;kBAEhC,CAAC;AACZ,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAItF,eAAO,MAAM,wBAAwB;;;kBAG1B,CAAC;AACZ,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E;0CAC0C;AAC1C,eAAO,MAAM,2BAA2B;;;EAAiC,CAAC;AAC1E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,8BAA8B;;;;;;;;kBAKhC,CAAC;AACZ,MAAM,MAAM,wBAAwB,GAAG,CAAC,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ResultSchema = z.object({
295
295
  * Why the resolved surface and not the `workProjectType` it was resolved from: the surface is
296
296
  * what a consumer needs — `MODERATION_CLEARABLE_TEXT_FIELDS[clearableSurface]` is the exact
297
297
  * clearable field set, one canonical index with no re-derivation. Shipping the work-project type
298
- * instead would make every consumer redo the routing AND the detail-vs-sub-item branch, which is
299
- * precisely the hand-rolled duplication that map was created to end.
298
+ * instead would make every consumer redo the routing AND the detail-vs-sub-item branch — the
299
+ * hand-rolled duplication that map exists to prevent.
300
300
  *
301
- * What it fixes: the in-flow clear's field picker offered the hall-family UNION
302
- * (title/description/content) because the projection never said which surface the sub-item was —
303
- * so an operator could tick `description` on a Tale chapter (title/content) or `content` on a
304
- * Tune track (title/description), pass the wire refinement, and have the clear runner silently
305
- * drop it. The picker now offers only this surface's fields, and the resolve path re-checks
306
- * caller-supplied fields against the same set.
301
+ * Without it, the in-flow clear's field picker could only offer the hall-family UNION
302
+ * (title/description/content), so an operator could tick `description` on a Tale chapter
303
+ * (title/content) or `content` on a Tune track (title/description), pass the wire refinement,
304
+ * and have the clear runner silently drop it. The picker offers only this surface's fields, and
305
+ * the resolve path re-checks caller-supplied fields against the same set.
307
306
  *
308
307
  * `.nullish()`: absent on payloads produced before this field existed, and null when the
309
308
  * reported item is not a clearable text surface at all (a square post, a chat message, a
@@ -703,4 +702,6 @@ export const GetDeadLettersInputSchema = z
703
702
  })
704
703
  .strict()
705
704
  .nullish();
705
+ /** The `getOpsStatus` input: the snapshot takes no parameters, and anything sent is refused. */
706
+ export const GetOpsStatusInputSchema = z.object({}).strict();
706
707
  //# sourceMappingURL=admin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"admin.js","sourceRoot":"","sources":["../../src/schemas/admin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,mBAAmB,EAC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,CAAC,QAAQ,EAAE;KAC/B,CAAC,CAAC,MAAM,EAAE;IACX,CAAC,CAAC,MAAM,CAAC;QACP,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,qBAAqB,CAAC;QAC5C,GAAG,qCAAqC,CAAC,KAAK;QAC9C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,0BAA0B,CAAC;QACzD,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;KAC/B,CAAC,CAAC,MAAM,EAAE;CACZ,CAAC,CAAC;AAGL,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC;KACvC,MAAM,CAAC;IACN,gFAAgF;IAChF,UAAU,EAAE,8BAA8B,CAAC,QAAQ,EAAE;IACrD,0EAA0E;IAC1E,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;CACnD,CAAC;KACD,MAAM,EAAE;KACR,OAAO,EAAE,CAAC","sourcesContent":["import { z } from 'zod';\nimport { GuildChatConversationSchema } from './chat.js';\nimport {\n violationIdSchema,\n taskIdSchema,\n workProjectIdSchema,\n hallItemIdSchema,\n workProjectTypeSchema,\n moderationClearableSurfaceSchema,\n reportTargetItemIdSchema,\n reportTargetParentRefSchema,\n documentIdSegmentSchema,\n reportGroupIdSchema,\n hallSubItemIdSchema,\n workRealmIdSchema,\n userIdSchema,\n safetyCaseIdSchema,\n} from './atoms.js';\nimport {\n ReportDispositionSchema,\n ReportDispositionReasonCodeSchema,\n refineReportDispositionReasonCode,\n refineReportDispositionEvidenceRefs,\n type ReportableItemType,\n} from '../doc-schemas/safety/foundation.js';\nimport {\n ChildSafetyAccountRoleSchema,\n ChildSafetyAccountSubjectDispositionSchema,\n SafetyCaseLaneSchema,\n} from '../doc-schemas/safety/case.js';\nimport {\n ContentMediaKindSchema,\n MediaServingStatusSchema,\n} from '../doc-schemas/media-assets.js';\nimport { MAX_MANIFEST_NCMEC_RECEIPTS } from '../doc-schemas/safety/evidence.js';\nimport { RuleGroupSchema } from '../doc-schemas/content.js';\nimport { HALL_WING_TYPE_KEYS, WORK_PROJECT_TYPE_KEYS } from '../types/content.js';\nimport { AppModeSchema } from '../doc-schemas/system.js';\nimport {\n SystemUidListSlotIdSchema,\n SystemUidSlotIdSchema,\n SystemVideoSlotIdSchema,\n} from '../system-slots/system-slots.js';\nimport {\n MODERATION_CLEARABLE_TEXT_FIELDS,\n HALL_CLEARABLE_TEXT_FIELD_NAMES,\n} from '../constants/business-content.js';\nimport {\n MAX_WORK_PROJECT_TITLE_LENGTH,\n MAX_INTERNAL_REASON_LENGTH,\n MAX_USER_FACING_REASON_LENGTH,\n MAX_SAFETY_RESOLUTION_SUMMARY_LENGTH,\n MAX_CONTENT_PAGE_SECTIONS,\n MAX_DMCA_CONTACT_BLOCKS,\n MAX_DMCA_CONTACT_ROWS,\n MAX_SYSTEM_UID_LIST,\n MAX_FUTURE_PLAN_GROUPS,\n MAX_FUTURE_PLANS,\n MAX_PLATFORM_RULES,\n MAX_AGREEMENT_POINTS,\n} from '../constants/business.js';\nimport {\n ACCOUNT_ACTION_REASON_INPUT,\n ACCOUNT_REINSTATE_REASON_INPUT,\n ADMIN_DISPATCH_MESSAGE_INPUT,\n ADMIN_DISPATCH_SUBJECT_INPUT,\n AGREEMENT_POINT_INPUT,\n ANNOUNCEMENT_MESSAGE_INPUT,\n APP_MODE_FLIP_EVIDENCE_INPUT,\n APP_VERSION_INPUT,\n APPEAL_REVIEW_NOTES_INPUT,\n CLEAR_TEXT_REASON_INPUT,\n CLOSE_OUT_ADMIN_NOTE_INPUT,\n CONTENT_PAGE_BODY_INPUT,\n CONTENT_PAGE_HEADING_INPUT,\n DMCA_CONTACT_LABEL_INPUT,\n DMCA_CONTACT_VALUE_INPUT,\n FUTURE_PLAN_DESCRIPTION_INPUT,\n FUTURE_PLAN_GROUP_NAME_INPUT,\n FUTURE_PLAN_TITLE_INPUT,\n HIDE_REASON_INPUT,\n MAINTENANCE_MESSAGE_INPUT,\n MODERATION_ACTION_REASON_INPUT,\n PLATFORM_RULE_DESCRIPTION_INPUT,\n PLATFORM_RULE_TITLE_INPUT,\n PUBLIC_DOCUMENT_INTENTION_INPUT,\n PUBLIC_DOCUMENT_INTRO_INPUT,\n RETITLE_REASON_INPUT,\n SAFETY_INTERNAL_REASON_INPUT,\n TAKE_IT_DOWN_COPY_INPUT,\n USER_FACING_REASON_DETAIL_INPUT,\n} from '../constants/text-fields.js';\nimport { textFieldSchema } from './text-field.js';\nimport {\n SAFETY_ACTIONS_CONFIRMATION,\n SAFETY_CASE_REOPEN_CONFIRMATION,\n} from '../constants/safety-confirmation-phrases.js';\n\nexport const CheckoutNextImportantTaskInputSchema = z.object({}).strict();\nexport type CheckoutNextImportantTaskInput = z.infer<typeof CheckoutNextImportantTaskInputSchema>;\n\nexport const GetContentViolationInputSchema = z.object({\n violationId: violationIdSchema,\n}).strict();\nexport type GetContentViolationInput = z.infer<typeof GetContentViolationInputSchema>;\n\n// No task type: the server derives it from the task doc, since a client-sent one could be forged.\n// Callers pass only the task id + the extension window.\nexport const MarkWorkLaterInputSchema = z.object({\n taskId: taskIdSchema,\n extendHours: z.union([z.literal(24), z.literal(48)]),\n}).strict();\nexport type MarkWorkLaterInput = z.infer<typeof MarkWorkLaterInputSchema>;\n\n/** The two appeal-review decisions (ONE canonical declaration — shared by the review\n * input and its authoritative result). */\nexport const ContentAppealDecisionSchema = z.enum(['approved', 'denied']);\nexport type ContentAppealDecision = z.infer<typeof ContentAppealDecisionSchema>;\n\nexport const ReviewContentAppealInputSchema = z.object({\n violationId: violationIdSchema,\n taskId: taskIdSchema,\n decision: ContentAppealDecisionSchema,\n adminNotes: textFieldSchema(APPEAL_REVIEW_NOTES_INPUT),\n}).strict();\nexport type ReviewContentAppealInput = z.infer<typeof ReviewContentAppealInputSchema>;\n\n// Authoritative result of reviewContentAppeal. Non-strict (server → client posture).\nexport const ReviewContentAppealResultSchema = z.object({\n success: z.literal(true),\n violationId: violationIdSchema,\n /** Echo of the requested decision (always known — it is the input). */\n decision: ContentAppealDecisionSchema,\n /** The appealing user's uid ('' on the orphaned-task cleanup path, where the\n * underlying violation was already gone and only the stale task was cleared). */\n userId: z.string(),\n /** Operation-receipt audit id — the `admin.contentAppealReviewed` event written in the same\n * transaction. Optional/additive so an older backend that omits it still type-checks. */\n auditEventId: z.string().min(1).optional(),\n});\nexport type ReviewContentAppealResult = z.infer<typeof ReviewContentAppealResultSchema>;\n\n// --- Public-document content inputs ---\n// The Admin editors' strict CONTENT schemas, one per public document. A working copy is saved\n// through `SavePublicDocumentDraftInputSchema` (./public-documents.ts), which pairs each\n// document id with its content schema here; the content is FULL (a version is the whole\n// document, never a partial merge). The client never sends a version — the release publish\n// assigns it.\n\nconst publicDocumentItemIdSchema = z.string().min(1).max(128);\nconst publicDocumentIntroSchema = textFieldSchema(PUBLIC_DOCUMENT_INTRO_INPUT).optional();\nconst publicDocumentIntentionSchema = textFieldSchema(PUBLIC_DOCUMENT_INTENTION_INPUT).optional();\nconst appliesToTypeInputFields = {\n workProjectType: z.enum(WORK_PROJECT_TYPE_KEYS).optional(),\n hallWingType: z.enum(HALL_WING_TYPE_KEYS).optional(),\n};\n\nexport const FuturePlanGroupInputSchema = z.object({\n id: publicDocumentItemIdSchema,\n name: textFieldSchema(FUTURE_PLAN_GROUP_NAME_INPUT),\n order: z.number().int().min(0),\n intention: publicDocumentIntentionSchema,\n}).strict();\n\nexport const FuturePlanItemInputSchema = z.object({\n id: publicDocumentItemIdSchema,\n title: textFieldSchema(FUTURE_PLAN_TITLE_INPUT),\n description: textFieldSchema(FUTURE_PLAN_DESCRIPTION_INPUT),\n groupId: publicDocumentItemIdSchema,\n order: z.number().int().min(0),\n}).strict();\n\nexport const FuturePlansContentInputSchema = z.object({\n intro: publicDocumentIntroSchema,\n groups: z.array(FuturePlanGroupInputSchema).max(MAX_FUTURE_PLAN_GROUPS),\n plans: z.array(FuturePlanItemInputSchema).max(MAX_FUTURE_PLANS),\n}).strict().superRefine((content, ctx) => {\n // A plan whose group is missing would never render, so every plan names a group the document holds.\n const groupIds = new Set(content.groups.map((group) => group.id));\n if (groupIds.size !== content.groups.length) {\n ctx.addIssue({ code: 'custom', path: ['groups'], message: 'Each group needs its own id.' });\n }\n content.plans.forEach((plan, index) => {\n if (!groupIds.has(plan.groupId)) {\n ctx.addIssue({ code: 'custom', path: ['plans', index, 'groupId'], message: 'Every plan belongs to one of the groups.' });\n }\n });\n});\nexport type FuturePlansContentInput = z.infer<typeof FuturePlansContentInputSchema>;\n\nexport const PlatformRuleInputSchema = z.object({\n id: publicDocumentItemIdSchema,\n title: textFieldSchema(PLATFORM_RULE_TITLE_INPUT),\n description: textFieldSchema(PLATFORM_RULE_DESCRIPTION_INPUT),\n group: RuleGroupSchema,\n ...appliesToTypeInputFields,\n order: z.number().int().min(0),\n}).strict();\n\nexport const AgreementPointInputSchema = z.object({\n id: publicDocumentItemIdSchema,\n text: textFieldSchema(AGREEMENT_POINT_INPUT),\n ...appliesToTypeInputFields,\n}).strict();\n\nexport const ArtisanAgreementsInputSchema = z.object({\n intention: publicDocumentIntentionSchema,\n points: z.array(AgreementPointInputSchema).max(MAX_AGREEMENT_POINTS),\n}).strict();\n\nexport const RulesAndAgreementsContentInputSchema = z.object({\n intro: publicDocumentIntroSchema,\n groupIntentions: z.partialRecord(RuleGroupSchema, textFieldSchema(PUBLIC_DOCUMENT_INTENTION_INPUT)).optional(),\n rules: z.array(PlatformRuleInputSchema).max(MAX_PLATFORM_RULES),\n agreements: ArtisanAgreementsInputSchema,\n}).strict();\nexport type RulesAndAgreementsContentInput = z.infer<typeof RulesAndAgreementsContentInputSchema>;\n\nexport const ContentPageSectionInputSchema = z.object({\n id: z.string().min(1).max(128),\n heading: textFieldSchema(CONTENT_PAGE_HEADING_INPUT),\n level: z.union([z.literal(1), z.literal(2)]),\n // Empty body is LEGAL: a bare divider heading (e.g. terms \"Part 1 — Our\n // Intention\") is real content. The input schema must accept everything the\n // stored ContentPageSectionSchema accepts, or a faithfully-seeded doc becomes\n // unsaveable in the admin editor.\n body: textFieldSchema(CONTENT_PAGE_BODY_INPUT),\n order: z.number().int().min(0),\n}).strict();\n\n/** The Terms of Service and Privacy Policy content (the one long-form legal page shape). */\nexport const LegalPageContentInputSchema = z.object({\n sections: z.array(ContentPageSectionInputSchema).min(1).max(MAX_CONTENT_PAGE_SECTIONS),\n}).strict();\nexport type LegalPageContentInput = z.infer<typeof LegalPageContentInputSchema>;\n\nexport const TakeItDownPageCopyContentInputSchema = z.object({\n strings: z.record(z.string().min(1).max(128), textFieldSchema(TAKE_IT_DOWN_COPY_INPUT)),\n}).strict().refine(\n (data) => {\n const count = Object.keys(data.strings).length;\n return count >= 1 && count <= 200;\n },\n { message: 'strings must contain between 1 and 200 entries.' },\n);\nexport type TakeItDownPageCopyContentInput = z.infer<typeof TakeItDownPageCopyContentInputSchema>;\n\nconst DmcaContactRowInputSchema = z.object({\n id: z.string().min(1).max(128),\n label: textFieldSchema(DMCA_CONTACT_LABEL_INPUT),\n value: textFieldSchema(DMCA_CONTACT_VALUE_INPUT),\n order: z.number().int().min(0),\n}).strict();\n\nconst DmcaContactBlockInputSchema = z.object({\n id: z.string().min(1).max(128),\n heading: textFieldSchema(CONTENT_PAGE_HEADING_INPUT),\n order: z.number().int().min(0),\n rows: z.array(DmcaContactRowInputSchema).min(1).max(MAX_DMCA_CONTACT_ROWS),\n}).strict();\n\n/**\n * The DMCA policy content: the intro line, the labeled contact blocks (at least one — the page\n * exists to name the designated agent), and the long-form process sections.\n */\nexport const DmcaPolicyContentInputSchema = z.object({\n intro: textFieldSchema(CONTENT_PAGE_BODY_INPUT),\n contactBlocks: z.array(DmcaContactBlockInputSchema).min(1).max(MAX_DMCA_CONTACT_BLOCKS),\n sections: z.array(ContentPageSectionInputSchema).max(MAX_CONTENT_PAGE_SECTIONS),\n}).strict();\nexport type DmcaPolicyContentInput = z.infer<typeof DmcaPolicyContentInputSchema>;\n\nconst AppConfigDocIdSchema = z.literal('app');\n\nexport const UpdateAppConfigInputSchema = z.object({\n docId: AppConfigDocIdSchema,\n data: z.object({\n appVersion: textFieldSchema(APP_VERSION_INPUT).optional(),\n maintenanceMode: z.boolean().optional(),\n maintenanceMessage: textFieldSchema(MAINTENANCE_MESSAGE_INPUT).optional(),\n registrationEnabled: z.boolean().optional(),\n // Announcement banner copy; '' clears the banner (empty = nothing renders).\n announcementMessage: textFieldSchema(ANNOUNCEMENT_MESSAGE_INPUT).optional(),\n // Runtime abuse throttle: 0 < m <= 1 (tighten-only; 1 = no throttle).\n rateLimitMultiplier: z.number().gt(0).max(1).optional(),\n }).strict().refine(\n (d) => Object.keys(d).length > 0,\n { message: 'data must have at least one field' },\n ),\n}).strict();\nexport type UpdateAppConfigInput = z.infer<typeof UpdateAppConfigInputSchema>;\n\n// recordAppModeFlip records the deployed app mode; it never sets it, so the only input is the\n// admin's optional milestone evidence.\nexport const RecordAppModeFlipInputSchema = z.object({\n milestoneEvidence: textFieldSchema(APP_MODE_FLIP_EVIDENCE_INPUT).optional(),\n}).strict();\nexport type RecordAppModeFlipInput = z.infer<typeof RecordAppModeFlipInputSchema>;\n\n// What recordAppModeFlip answers: whether this call recorded a change (false when the marker\n// already matched the deployed mode) and the mode before and after. Server → client: non-strict.\nexport const RecordAppModeFlipResultSchema = z.object({\n success: z.literal(true),\n recorded: z.boolean(),\n mode: AppModeSchema,\n previousMode: AppModeSchema.nullable(),\n});\nexport type RecordAppModeFlipResult = z.infer<typeof RecordAppModeFlipResultSchema>;\n\n// --- System slots ---\n\n// clearSystemVideoSlot empties one video slot; the server refuses while the slot's upload is still\n// pending or processing.\nexport const ClearSystemVideoSlotInputSchema = z.object({\n slotId: SystemVideoSlotIdSchema,\n}).strict();\nexport type ClearSystemVideoSlotInput = z.infer<typeof ClearSystemVideoSlotInputSchema>;\n\n// updateSystemUidSlot sets one account slot: a `uid` slot takes one account id (null clears it), a\n// `uidList` slot an ordered list (empty clears it). The value's shape must match the slot's kind.\nexport const UpdateSystemUidSlotInputSchema = z.union([\n z.object({\n slotId: SystemUidSlotIdSchema,\n value: userIdSchema.nullable(),\n }).strict(),\n z.object({\n slotId: SystemUidListSlotIdSchema,\n value: z.array(userIdSchema).max(MAX_SYSTEM_UID_LIST),\n }).strict(),\n]);\nexport type UpdateSystemUidSlotInput = z.infer<typeof UpdateSystemUidSlotInputSchema>;\n\n// --- Admin list mutations ---\n\nconst uidSchema = z.string().min(1).max(128);\n\n/**\n * Wire input for the `updateAdminList` callable in ttt-prod.\n * Used to grant or revoke admin / jrAdmin status on `_systemData/adminList`.\n *\n * All four fields are optional arrays of UIDs. At least one must be non-empty.\n * The callable's core function rejects conflicting input (e.g. same UID in\n * both addAdmins and removeAdmins) with HttpsError invalid-argument.\n */\nexport const UpdateAdminListInputSchema = z.object({\n addAdmins: z.array(uidSchema).optional(),\n removeAdmins: z.array(uidSchema).optional(),\n addJrAdmins: z.array(uidSchema).optional(),\n removeJrAdmins: z.array(uidSchema).optional(),\n})\n .strict()\n .refine(\n (data) =>\n (data.addAdmins?.length ?? 0) +\n (data.removeAdmins?.length ?? 0) +\n (data.addJrAdmins?.length ?? 0) +\n (data.removeJrAdmins?.length ?? 0) >\n 0,\n { message: 'At least one of addAdmins/removeAdmins/addJrAdmins/removeJrAdmins must be non-empty.' },\n );\n\nexport type UpdateAdminListInput = z.infer<typeof UpdateAdminListInputSchema>;\n\n// Authoritative result of updateAdminList — the grant/revoke delta counts computed inside\n// the roster transaction (uids already in their target state are no-ops and not counted).\n// Non-strict (server → client result posture).\nexport const UpdateAdminListResultSchema = z.object({\n success: z.literal(true),\n adminsGranted: z.number().int().nonnegative(),\n adminsRevoked: z.number().int().nonnegative(),\n jrAdminsGranted: z.number().int().nonnegative(),\n jrAdminsRevoked: z.number().int().nonnegative(),\n /** Operation-receipt audit id — the `admin.systemRoleGranted` / `admin.systemRoleRevoked`\n * event(s) key off the same roster transaction. Optional/additive. (No single domain id: a\n * roster edit spans multiple uids, so only the audit id is a meaningful receipt handle.) */\n auditEventId: z.string().min(1).optional(),\n});\nexport type UpdateAdminListResult = z.infer<typeof UpdateAdminListResultSchema>;\n\n// --- Admin moderation: hide / restore / retitle content + Work/Realm objects ---\n\nexport const CheckTrademarkInputSchema = z.object({\n // Primary: the work project's title (franchise-level check).\n workTitle: z.string().min(1).max(MAX_WORK_PROJECT_TITLE_LENGTH),\n // Optional: the sub-item title (chapter, track, episode). Checked secondarily.\n // `.nullish()` (not `.optional()`): the Firebase callable client serializes an\n // undefined argument as JSON null, and the work-view caller passes\n // `subItemTitle: subItem?.title` which is undefined when the sub-item hasn't\n // loaded — that arrives here as null. A bare `.optional()` would 400 on it.\n subItemTitle: z.string().max(MAX_WORK_PROJECT_TITLE_LENGTH).nullish(),\n}).strict();\nexport type CheckTrademarkInput = z.infer<typeof CheckTrademarkInputSchema>;\n\nexport const GetReportedContentDetailInputSchema = z.object({\n reportGroupId: reportGroupIdSchema,\n}).strict();\nexport type GetReportedContentDetailInput = z.infer<typeof GetReportedContentDetailInputSchema>;\n\n// --- getReportedContentDetail result (cross-boundary: produced by the callable in functions/,\n// consumed by the admin report work-view) ---\n\n/** One display-text field of the reported doc, labeled for the review panel. The server returns\n * EVERY configured non-empty text field for the item type (title, description, body, …) in\n * display order — never just the first non-empty one. */\nexport const ReportedTextFieldSchema = z.object({\n /** Raw doc field name (e.g. 'description', 'workingTitle'). */\n field: z.string().min(1),\n /** Human label the panel renders (e.g. 'Description', 'Title'). */\n label: z.string().min(1),\n /** Current live value, trimmed; empty fields are omitted from the array. */\n value: z.string().min(1),\n});\nexport type ReportedTextField = z.infer<typeof ReportedTextFieldSchema>;\n\n/** One media asset referenced by the reported content: id + kind + current serving state\n * (for click-to-reveal) + the server-derived variant key the reveal must request. */\nexport const ReportedMediaAssetSchema = z.object({\n mediaAssetId: z.string().min(1),\n mediaKind: ContentMediaKindSchema.nullable(),\n servingStatus: MediaServingStatusSchema.nullable(),\n /** The variant key the reveal must request for its single display render (image origins split\n * between 'full' and 'main'; video/audio are always 'main'). Null when the asset doc is\n * missing/variant-less. */\n displayVariantKey: z.string().nullable(),\n /** Human label of WHAT this asset is on the reported item (e.g. 'Square cover',\n * 'Track photo — <title>'). Null when the server cannot derive one. */\n label: z.string().nullable(),\n});\nexport type ReportedMediaAsset = z.infer<typeof ReportedMediaAssetSchema>;\n\nexport const GetReportedContentDetailResultSchema = z.object({\n itemType: z.string().min(1),\n reportedItemId: reportTargetItemIdSchema,\n /** First non-empty display-text field; textFields is the complete labeled set. */\n textSnapshot: z.string().nullable(),\n textFields: z.array(ReportedTextFieldSchema),\n mediaAssets: z.array(ReportedMediaAssetSchema),\n /** Whether the reported doc is currently hidden (best-effort, doc-flag based). */\n isHidden: z.boolean().nullable(),\n /** The content owner / uploader uid, when derivable. */\n ownerUid: z.string().nullable(),\n /**\n * The canonical moderation-clearable SURFACE this reported doc actually IS, resolved\n * SERVER-side: `chapter` / `tuneTrack` / `televisionEpisode` for a hall sub-item (through\n * `HALL_CONTENT_SURFACES_BY_WORK_TYPE`, from the parent hall doc the callable already reads),\n * `workProject` / `workRealm` for the shells.\n *\n * Why the resolved surface and not the `workProjectType` it was resolved from: the surface is\n * what a consumer needs — `MODERATION_CLEARABLE_TEXT_FIELDS[clearableSurface]` is the exact\n * clearable field set, one canonical index with no re-derivation. Shipping the work-project type\n * instead would make every consumer redo the routing AND the detail-vs-sub-item branch, which is\n * precisely the hand-rolled duplication that map was created to end.\n *\n * What it fixes: the in-flow clear's field picker offered the hall-family UNION\n * (title/description/content) because the projection never said which surface the sub-item was —\n * so an operator could tick `description` on a Tale chapter (title/content) or `content` on a\n * Tune track (title/description), pass the wire refinement, and have the clear runner silently\n * drop it. The picker now offers only this surface's fields, and the resolve path re-checks\n * caller-supplied fields against the same set.\n *\n * `.nullish()`: absent on payloads produced before this field existed, and null when the\n * reported item is not a clearable text surface at all (a square post, a chat message, a\n * profile picture).\n */\n clearableSurface: moderationClearableSurfaceSchema.nullish(),\n /** The FROZEN report-time snapshot (captured at intake), so the operator sees what was\n * reported even if the author edited the live doc to evade. Null for older reports. */\n reportTimeSnapshot: z.object({\n capturedText: z.string().nullable(),\n capturedMediaAssetIds: z.array(z.string()),\n revision: z.number().nullable(),\n capturedAt: z.number().nullable(),\n }).nullable(),\n});\nexport type GetReportedContentDetailResult = z.infer<typeof GetReportedContentDetailResultSchema>;\n\nexport const HideHallSubItemInputSchema = z.object({\n hallItemId: hallItemIdSchema,\n workProjectType: workProjectTypeSchema,\n subItemId: hallSubItemIdSchema,\n reason: textFieldSchema(HIDE_REASON_INPUT),\n}).strict();\nexport type HideHallSubItemInput = z.infer<typeof HideHallSubItemInputSchema>;\n\nexport const RestoreHallSubItemInputSchema = z.object({\n hallItemId: hallItemIdSchema,\n workProjectType: workProjectTypeSchema,\n subItemId: hallSubItemIdSchema,\n}).strict();\nexport type RestoreHallSubItemInput = z.infer<typeof RestoreHallSubItemInputSchema>;\n\nexport const HideWorkProjectInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n reason: textFieldSchema(HIDE_REASON_INPUT),\n}).strict();\nexport type HideWorkProjectInput = z.infer<typeof HideWorkProjectInputSchema>;\n\nexport const HideWorkRealmInputSchema = z.object({\n workRealmId: workRealmIdSchema,\n reason: textFieldSchema(HIDE_REASON_INPUT),\n}).strict();\nexport type HideWorkRealmInput = z.infer<typeof HideWorkRealmInputSchema>;\n\n// `cascadeId` is OPTIONAL: the app backends derive all active cascades for the target when it is\n// omitted, and restore just that one cascade when it is supplied.\nexport const RestoreWorkProjectInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n cascadeId: documentIdSegmentSchema.optional(),\n}).strict();\nexport type RestoreWorkProjectInput = z.infer<typeof RestoreWorkProjectInputSchema>;\n\nexport const RestoreWorkRealmInputSchema = z.object({\n workRealmId: workRealmIdSchema,\n cascadeId: documentIdSegmentSchema.optional(),\n}).strict();\nexport type RestoreWorkRealmInput = z.infer<typeof RestoreWorkRealmInputSchema>;\n\nexport const RequireWorkProjectRetitleInputSchema = z.object({\n reason: textFieldSchema(RETITLE_REASON_INPUT),\n workProjectId: workProjectIdSchema,\n}).strict();\nexport type RequireWorkProjectRetitleInput = z.infer<typeof RequireWorkProjectRetitleInputSchema>;\n\nexport const RequireWorkRealmRetitleInputSchema = z.object({\n reason: textFieldSchema(RETITLE_REASON_INPUT),\n workRealmId: workRealmIdSchema,\n}).strict();\nexport type RequireWorkRealmRetitleInput = z.infer<typeof RequireWorkRealmRetitleInputSchema>;\n\n// --- Page-level \"Clear text (moderation)\" callables (per-field extension of the retitle family) ---\n\n// The clearable SHELL fields (raw doc field names) for the workProject + workRealm contexts.\n// Derived from the canonical clearable-field map — the two shell surfaces share the same fields.\nconst ModerationShellClearFieldSchema = z.enum(MODERATION_CLEARABLE_TEXT_FIELDS.workProject);\nexport type ModerationShellClearField = z.infer<typeof ModerationShellClearFieldSchema>;\n\nexport const ClearWorkProjectTextInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n fields: z.array(ModerationShellClearFieldSchema).min(1),\n reason: textFieldSchema(CLEAR_TEXT_REASON_INPUT),\n}).strict();\nexport type ClearWorkProjectTextInput = z.infer<typeof ClearWorkProjectTextInputSchema>;\n\nexport const ClearWorkRealmTextInputSchema = z.object({\n workRealmId: workRealmIdSchema,\n fields: z.array(ModerationShellClearFieldSchema).min(1),\n reason: textFieldSchema(CLEAR_TEXT_REASON_INPUT),\n}).strict();\nexport type ClearWorkRealmTextInput = z.infer<typeof ClearWorkRealmTextInputSchema>;\n\n// The clearable TEXT fields across the whole hall content family — derived from the canonical\n// map (union of every hall surface's fields), never restated literals.\nconst HallClearFieldSchema = z.enum(HALL_CLEARABLE_TEXT_FIELD_NAMES);\nexport type HallClearField = z.infer<typeof HallClearFieldSchema>;\n\nexport const ClearHallContentTextInputSchema = z.object({\n hallItemId: hallItemIdSchema,\n workProjectType: workProjectTypeSchema,\n subItemId: hallSubItemIdSchema.optional(),\n fields: z.array(HallClearFieldSchema).min(1),\n reason: textFieldSchema(CLEAR_TEXT_REASON_INPUT),\n}).strict();\nexport type ClearHallContentTextInput = z.infer<typeof ClearHallContentTextInputSchema>;\n\n// --- getLatestHideCascade — resolve the latest hide-cascade id for a Work/Realm ---\n\nexport const GetLatestHideCascadeInputSchema = z.object({\n entityId: documentIdSegmentSchema,\n targetType: z.enum(['work-project', 'work-realm']),\n}).strict();\nexport type GetLatestHideCascadeInput = z.infer<typeof GetLatestHideCascadeInputSchema>;\n\n// --- moderateReportedContent — hide / restore / soft perma-remove an individual reported item ---\n\n// The single-item content-action target set (SUBSET of ReportableItemType — excludes the\n// close-out-only hall-library-sub-item).\nconst MODERATE_REPORTED_CONTENT_TARGET_TYPES = [\n 'square-streetz-post',\n 'audition',\n 'audition-entry',\n 'commission-listing',\n 'commission-proposal',\n 'work-asset',\n 'profile-picture',\n 'hall-library-item',\n 'craft-skill',\n // Conversation File — the hide/restore/remove action targets the file owner record +\n // its mediaAsset (the `work-asset` shape), never a chat message.\n 'conversation-file',\n] as const satisfies readonly ReportableItemType[];\n\nexport const ModerateReportedContentInputSchema = z.object({\n reportGroupId: reportGroupIdSchema,\n targetType: z.enum(MODERATE_REPORTED_CONTENT_TARGET_TYPES),\n reportedItemId: reportTargetItemIdSchema,\n parentItemId: reportTargetParentRefSchema.optional(),\n action: z.enum(['hide', 'restore', 'remove']),\n // [EUAS-023] A destructive action (hide/remove) MUST carry a reason; restore is a reversal.\n reason: textFieldSchema(MODERATION_ACTION_REASON_INPUT).optional(),\n})\n .strict()\n .superRefine((val, ctx) => {\n if ((val.action === 'hide' || val.action === 'remove') && !val.reason) {\n ctx.addIssue({\n code: 'custom',\n message: 'A reason is required to hide or remove content.',\n path: ['reason'],\n });\n }\n });\nexport type ModerateReportedContentInput = z.infer<typeof ModerateReportedContentInputSchema>;\n\n// --- resolveAdminTask — the ONE guided close-out for EVERY admin case type ---\n\n// [EUAS-005] The content-action target set ALSO accepts hall-library-sub-item (hide/restore only),\n// which routes to the dedicated `runSetHallSubItemHidden` core (not `runModerateReportedContent`).\nconst CONTENT_ACTION_TARGET_TYPES = [\n 'square-streetz-post',\n 'audition',\n 'audition-entry',\n 'commission-listing',\n 'commission-proposal',\n 'work-asset',\n 'profile-picture',\n 'hall-library-item',\n 'craft-skill',\n 'hall-library-sub-item',\n // Conversation File — same content action as `work-asset`, routed at the file record.\n 'conversation-file',\n] as const satisfies readonly ReportableItemType[];\n\nconst ContentActionSchema = z\n .object({\n button: z.enum(['hideContent', 'restoreContent', 'permaRemoveContent']),\n targetType: z.enum(CONTENT_ACTION_TARGET_TYPES),\n reportedItemId: reportTargetItemIdSchema,\n parentItemId: reportTargetParentRefSchema.optional(),\n })\n .strict();\n\nconst WarnUserSchema = z\n .object({\n button: z.literal('warnUser'),\n userId: userIdSchema,\n // A warning IS an admin dispatch (resolveAdminTask → runCreateAdminDispatchToUser),\n // so it shares the dispatch subject/body caps.\n subject: textFieldSchema(ADMIN_DISPATCH_SUBJECT_INPUT),\n message: textFieldSchema(ADMIN_DISPATCH_MESSAGE_INPUT),\n })\n .strict();\n\nconst SuspendOrBanSchema = z\n .object({\n button: z.enum(['suspendUser', 'banUser']),\n userId: userIdSchema,\n reason: textFieldSchema(ACCOUNT_ACTION_REASON_INPUT),\n })\n .strict();\n\nconst ReinstateUserSchema = z\n .object({ button: z.literal('reinstateUser'), userId: userIdSchema, reason: textFieldSchema(ACCOUNT_REINSTATE_REASON_INPUT).optional() })\n .strict();\n\nconst ForceUsernameResetSchema = z\n .object({ button: z.literal('forceUsernameReset'), userId: userIdSchema, reason: textFieldSchema(ACCOUNT_ACTION_REASON_INPUT).optional() })\n .strict();\n\n/** Whole-object Work/Realm remedies — `reportedItemId` is the workProjectId / workRealmId. */\nconst WorkObjectActionSchema = z\n .object({\n button: z.enum(['hideWorkObject', 'restoreWorkObject', 'forceRetitle']),\n targetType: z.enum(['work-project', 'work-realm']),\n reportedItemId: reportTargetItemIdSchema,\n })\n .strict();\n\n// --- The in-flow clear-content disposition (staged counterpart of the page-level clear-text\n// callables) ---\n\n/** The three targets the in-flow text clear can neutralize — the Work/Realm shells plus a single\n * published hall sub-item. Compile-linked subset of the canonical reportable-item enum. */\nconst CLEAR_CONTENT_TEXT_TARGET_TYPES = [\n 'work-project',\n 'work-realm',\n 'hall-library-sub-item',\n] as const satisfies readonly ReportableItemType[];\nexport type ClearContentTextTargetType = (typeof CLEAR_CONTENT_TEXT_TARGET_TYPES)[number];\n\n/** Every field name the staged clear can carry across those three targets — the union of the two\n * canonical clearable owners (`MODERATION_CLEARABLE_TEXT_FIELDS` for the shells,\n * `HALL_CLEARABLE_TEXT_FIELD_NAMES` for the hall family), i.e. the same two sources\n * `ClearWorkProjectTextInputSchema` / `ClearHallContentTextInputSchema` derive from. No field\n * literal is restated here. */\nconst CLEAR_CONTENT_TEXT_FIELDS = [\n ...MODERATION_CLEARABLE_TEXT_FIELDS.workProject,\n ...HALL_CLEARABLE_TEXT_FIELD_NAMES,\n] as const;\nconst ClearContentTextFieldSchema = z.enum(CLEAR_CONTENT_TEXT_FIELDS);\nexport type ClearContentTextField = z.infer<typeof ClearContentTextFieldSchema>;\n\n/** Which fields each target legally accepts — projected from those same owners, so a\n * target/field mismatch is refused at the wire instead of reaching a clear runner that would\n * drop it. Enforced by the cross-field refinement on `StagedActionSchema` below. */\nconst CLEAR_CONTENT_TEXT_FIELDS_BY_TARGET = {\n 'work-project': MODERATION_CLEARABLE_TEXT_FIELDS.workProject,\n 'work-realm': MODERATION_CLEARABLE_TEXT_FIELDS.workRealm,\n 'hall-library-sub-item': HALL_CLEARABLE_TEXT_FIELD_NAMES,\n} as const satisfies Record<ClearContentTextTargetType, readonly ClearContentTextField[]>;\n\n/** Per-field text clear — the guided close-out's staged counterpart of the page-level\n * `clearWorkProjectText` / `clearWorkRealmText` / `clearHallContentText` callables (the\n * per-field extension of `forceRetitle`). `reportedItemId` is the workProjectId / workRealmId /\n * sub-item id; `parentItemId` is the parent hall item id, required only for the sub-item target.\n * `workProjectType` is deliberately NOT on the wire — the server re-reads it from the doc (the\n * hall hide-branch precedent). */\nconst ClearContentTextActionSchema = z\n .object({\n button: z.literal('clearContentText'),\n targetType: z.enum(CLEAR_CONTENT_TEXT_TARGET_TYPES),\n reportedItemId: reportTargetItemIdSchema,\n parentItemId: reportTargetParentRefSchema.optional(),\n fields: z.array(ClearContentTextFieldSchema).min(1),\n })\n .strict();\n\n/** Chat message tombstone — channel + seq from the report, revision from the live thread-read. */\nconst TombstoneChatSchema = z\n .object({\n button: z.literal('tombstoneChat'),\n channel: GuildChatConversationSchema,\n messageSeq: z.number().int().nonnegative(),\n expectedMessageRevision: z.number().int().nonnegative(),\n })\n .strict();\n\nexport const StagedActionSchema = z\n .discriminatedUnion('button', [\n ContentActionSchema,\n WarnUserSchema,\n SuspendOrBanSchema,\n ReinstateUserSchema,\n ForceUsernameResetSchema,\n WorkObjectActionSchema,\n ClearContentTextActionSchema,\n TombstoneChatSchema,\n ])\n // The clearContentText arm's two cross-field rules, applied at the union (the\n // SafetyStagedActionSchema pattern below) because no other arm carries these fields:\n // every chosen field must belong to the chosen target's canonical clearable set, and the\n // hall sub-item target must name its parent hall item.\n .superRefine((value, ctx) => {\n if (value.button !== 'clearContentText') return;\n const clearable: readonly string[] = CLEAR_CONTENT_TEXT_FIELDS_BY_TARGET[value.targetType];\n value.fields.forEach((field, index) => {\n if (!clearable.includes(field)) {\n ctx.addIssue({\n code: 'custom',\n message: `Field '${field}' is not clearable on a '${value.targetType}' target.`,\n path: ['fields', index],\n });\n }\n });\n if (value.targetType === 'hall-library-sub-item' && !value.parentItemId) {\n ctx.addIssue({\n code: 'custom',\n message: 'parentItemId (the parent hall item id) is required for a hall sub-item target.',\n path: ['parentItemId'],\n });\n }\n });\nexport type StagedAction = z.infer<typeof StagedActionSchema>;\n\nexport const NormalReportInputSchema = z\n .object({\n caseType: z.literal('normalReport').default('normalReport'),\n taskId: taskIdSchema,\n outcome: z.enum(['founded', 'unfounded']),\n resolutionSummary: z.string().trim().min(1).max(MAX_SAFETY_RESOLUTION_SUMMARY_LENGTH),\n actions: z.array(StagedActionSchema).max(16).default([]),\n userFacingReasonCode: z.string().trim().min(1).max(128).optional(),\n userFacingReasonDetail: textFieldSchema(USER_FACING_REASON_DETAIL_INPUT).optional(),\n adminNote: textFieldSchema(CLOSE_OUT_ADMIN_NOTE_INPUT).optional(),\n })\n .strict();\nexport type ResolveAdminTaskInput = z.infer<typeof NormalReportInputSchema>;\n\nconst SafetyDispositionActionSchema = z\n .object({\n button: z.literal('setReportDisposition'),\n // Derived from the ONE canonical disposition enum — 'undetermined' is the initial\n // state, never an operator-settable target, so it is excluded (not re-declared).\n disposition: ReportDispositionSchema.exclude(['undetermined']),\n dispositionReasonCode: ReportDispositionReasonCodeSchema,\n // Derived from the ONE receipts-cap constant (doc-schemas/safety/evidence.ts) — the same\n // bound the callable + the embedded SetReportDispositionInputV1Schema use. No field-level min:\n // the reportRequired⇒non-empty rule lives in the shared cross-field refinement below, so every\n // other disposition may legally stage this action with no evidence revealed.\n evidenceRefs: z.array(z.string().min(1)).max(MAX_MANIFEST_NCMEC_RECEIPTS),\n expectedRevision: z.number().int().nonnegative(),\n })\n .strict();\n\nconst QuarantineActionSchema = z.object({ button: z.literal('quarantinePreserveFile') }).strict();\n\n// [C-01/EUAS-002] No client-supplied requestId — the linked statutory request id(s) are derived\n// SERVER-SIDE from the case's `requestLinks` inside `enqueueNciiRemovalForCase`.\nconst HashRemoveActionSchema = z.object({ button: z.literal('hashRemoveFile') }).strict();\n\nconst SafetyAccountActionSchema = z\n .object({\n button: z.enum(['suspendUser', 'banUser', 'reinstateUser']),\n targetUid: userIdSchema,\n reasonInternal: textFieldSchema(SAFETY_INTERNAL_REASON_INPUT),\n reasonUserFacing: z.string().trim().min(1).max(MAX_USER_FACING_REASON_LENGTH),\n role: ChildSafetyAccountRoleSchema,\n subjectDisposition: ChildSafetyAccountSubjectDispositionSchema,\n })\n .strict();\n\nexport const SafetyStagedActionSchema = z\n .discriminatedUnion('button', [\n SafetyDispositionActionSchema,\n QuarantineActionSchema,\n HashRemoveActionSchema,\n SafetyAccountActionSchema,\n ])\n // The setReportDisposition arm reuses the ONE canonical cross-field rules (foundation.ts) via the\n // shared refinements — never re-declaring them here: the disposition↔reason pairing AND the\n // reportRequired⇒evidence-present rule. Other arms carry no such fields.\n .superRefine((value, ctx) => {\n if (value.button === 'setReportDisposition') {\n refineReportDispositionReasonCode(value, ctx);\n refineReportDispositionEvidenceRefs(value, ctx);\n }\n });\nexport type SafetyStagedAction = z.infer<typeof SafetyStagedActionSchema>;\n\nexport const SafetyCaseInputSchema = z\n .object({\n caseType: SafetyCaseLaneSchema,\n caseId: safetyCaseIdSchema,\n outcome: z.enum(['founded', 'unfounded']),\n resolutionSummary: z.string().trim().min(1).max(MAX_SAFETY_RESOLUTION_SUMMARY_LENGTH),\n actions: z.array(SafetyStagedActionSchema).max(16).default([]),\n adminNote: textFieldSchema(CLOSE_OUT_ADMIN_NOTE_INPUT).optional(),\n // [EUAS-017] Optimistic-concurrency token (`childSafetyCaseList.revision` / `nciiCases.revision`).\n // The close is rejected if the case changed since the operator loaded it — concurrent stale closes\n // can't silently overwrite. Optional for backward compatibility; the console always supplies it.\n expectedRevision: z.number().int().nonnegative().optional(),\n // Interim reauth: a single explicit typed confirmation for the privileged safety actions,\n // standing in for the passkey two-step until [H-17]. The callable is full-admin gated.\n confirmation: z.literal(SAFETY_ACTIONS_CONFIRMATION),\n })\n .strict();\nexport type SafetyCaseInput = z.infer<typeof SafetyCaseInputSchema>;\n\nexport const ReopenSafetyCaseInputSchema = z\n .object({\n caseType: SafetyCaseLaneSchema,\n caseId: safetyCaseIdSchema,\n reasonInternal: textFieldSchema(SAFETY_INTERNAL_REASON_INPUT),\n expectedRevision: z.number().int().nonnegative().optional(),\n confirmation: z.literal(SAFETY_CASE_REOPEN_CONFIRMATION),\n })\n .strict();\nexport type ReopenSafetyCaseInput = z.infer<typeof ReopenSafetyCaseInputSchema>;\n\n// ---------------------------------------------------------------------------\n// Dead-letter operations — adminReplayDeadLetter + getDeadLetters (Ops Repairs).\n// ---------------------------------------------------------------------------\n\n/** Every ledger the dead-letter replay callable supports. */\nexport const DeadLetterCollectionSchema = z.enum([\n 'chatSyncEvents',\n 'chatAdminActionCommands',\n 'notificationDeliveries',\n 'chatMessageOutbox',\n 'squareAnnouncementJobs',\n 'chatSyncFanoutJobs',\n 'mediaAssets',\n 'quarantineSagaJobs',\n 'nciiRemovalJobs',\n 'safetyEvidenceJobs',\n 'accountActionCommands',\n 'activeReportGroups',\n 'hallSubItemEdgeSync',\n 'chatParkedDeliveries',\n]);\nexport type DeadLetterCollection = z.infer<typeof DeadLetterCollectionSchema>;\n\n/** Every replay lane whose target is a flat top-level document. */\nexport const FlatDeadLetterCollectionSchema = DeadLetterCollectionSchema.exclude(['hallSubItemEdgeSync']);\nexport type FlatDeadLetterCollection = z.infer<typeof FlatDeadLetterCollectionSchema>;\n\n/**\n * Canonical identity for a published Hall sub-item edge-sync replay target. The work type derives\n * the only valid nested collection through PATH_BUILDERS.hallItemSubItem; callers never submit a\n * Firestore path or collection segment.\n */\nexport const HallSubItemEdgeSyncReplayTargetSchema = z.object({\n hallItemId: hallItemIdSchema,\n workProjectType: workProjectTypeSchema,\n subItemId: hallSubItemIdSchema,\n}).strict();\nexport type HallSubItemEdgeSyncReplayTarget = z.infer<typeof HallSubItemEdgeSyncReplayTargetSchema>;\n\nexport const AdminReplayDeadLetterInputSchema = z\n .discriminatedUnion('collection', [\n z.object({\n collection: FlatDeadLetterCollectionSchema,\n docId: documentIdSegmentSchema.max(200),\n reason: z.string().min(1).max(MAX_INTERNAL_REASON_LENGTH),\n dryRun: z.boolean().optional(),\n }).strict(),\n z.object({\n collection: z.literal('hallSubItemEdgeSync'),\n ...HallSubItemEdgeSyncReplayTargetSchema.shape,\n reason: z.string().min(1).max(MAX_INTERNAL_REASON_LENGTH),\n dryRun: z.boolean().optional(),\n }).strict(),\n ]);\nexport type AdminReplayDeadLetterInput = z.infer<typeof AdminReplayDeadLetterInputSchema>;\n\nexport const GetDeadLettersInputSchema = z\n .object({\n /** Restrict to one listable flat ledger; absent = all listable flat ledgers. */\n collection: FlatDeadLetterCollectionSchema.optional(),\n /** Per-ledger row cap (the callable's own ceiling applies regardless). */\n limit: z.number().int().min(1).max(200).optional(),\n })\n .strict()\n .nullish();\nexport type GetDeadLettersInput = z.infer<typeof GetDeadLettersInputSchema>;\n\n\n"]}
1
+ {"version":3,"file":"admin.js","sourceRoot":"","sources":["../../src/schemas/admin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EACrB,gCAAgC,EAChC,wBAAwB,EACxB,2BAA2B,EAC3B,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,EACZ,kBAAkB,GACnB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,uBAAuB,EACvB,iCAAiC,EACjC,iCAAiC,EACjC,mCAAmC,GAEpC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,4BAA4B,EAC5B,0CAA0C,EAC1C,oBAAoB,GACrB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAC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ACnD,CAAC;KACD,MAAM,EAAE;KACR,OAAO,EAAE,CAAC;AAGb,gGAAgG;AAChG,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC","sourcesContent":["import { z } from 'zod';\nimport { GuildChatConversationSchema } from './chat.js';\nimport {\n violationIdSchema,\n taskIdSchema,\n workProjectIdSchema,\n hallItemIdSchema,\n workProjectTypeSchema,\n moderationClearableSurfaceSchema,\n reportTargetItemIdSchema,\n reportTargetParentRefSchema,\n documentIdSegmentSchema,\n reportGroupIdSchema,\n hallSubItemIdSchema,\n workRealmIdSchema,\n userIdSchema,\n safetyCaseIdSchema,\n} from './atoms.js';\nimport {\n ReportDispositionSchema,\n ReportDispositionReasonCodeSchema,\n refineReportDispositionReasonCode,\n refineReportDispositionEvidenceRefs,\n type ReportableItemType,\n} from '../doc-schemas/safety/foundation.js';\nimport {\n ChildSafetyAccountRoleSchema,\n ChildSafetyAccountSubjectDispositionSchema,\n SafetyCaseLaneSchema,\n} from '../doc-schemas/safety/case.js';\nimport {\n ContentMediaKindSchema,\n MediaServingStatusSchema,\n} from '../doc-schemas/media-assets.js';\nimport { MAX_MANIFEST_NCMEC_RECEIPTS } from '../doc-schemas/safety/evidence.js';\nimport { RuleGroupSchema } from '../doc-schemas/content.js';\nimport { HALL_WING_TYPE_KEYS, WORK_PROJECT_TYPE_KEYS } from '../types/content.js';\nimport { AppModeSchema } from '../doc-schemas/system.js';\nimport {\n SystemUidListSlotIdSchema,\n SystemUidSlotIdSchema,\n SystemVideoSlotIdSchema,\n} from '../system-slots/system-slots.js';\nimport {\n MODERATION_CLEARABLE_TEXT_FIELDS,\n HALL_CLEARABLE_TEXT_FIELD_NAMES,\n} from '../constants/business-content.js';\nimport {\n MAX_WORK_PROJECT_TITLE_LENGTH,\n MAX_INTERNAL_REASON_LENGTH,\n MAX_USER_FACING_REASON_LENGTH,\n MAX_SAFETY_RESOLUTION_SUMMARY_LENGTH,\n MAX_CONTENT_PAGE_SECTIONS,\n MAX_DMCA_CONTACT_BLOCKS,\n MAX_DMCA_CONTACT_ROWS,\n MAX_SYSTEM_UID_LIST,\n MAX_FUTURE_PLAN_GROUPS,\n MAX_FUTURE_PLANS,\n MAX_PLATFORM_RULES,\n MAX_AGREEMENT_POINTS,\n} from '../constants/business.js';\nimport {\n ACCOUNT_ACTION_REASON_INPUT,\n ACCOUNT_REINSTATE_REASON_INPUT,\n ADMIN_DISPATCH_MESSAGE_INPUT,\n ADMIN_DISPATCH_SUBJECT_INPUT,\n AGREEMENT_POINT_INPUT,\n ANNOUNCEMENT_MESSAGE_INPUT,\n APP_MODE_FLIP_EVIDENCE_INPUT,\n APP_VERSION_INPUT,\n APPEAL_REVIEW_NOTES_INPUT,\n CLEAR_TEXT_REASON_INPUT,\n CLOSE_OUT_ADMIN_NOTE_INPUT,\n CONTENT_PAGE_BODY_INPUT,\n CONTENT_PAGE_HEADING_INPUT,\n DMCA_CONTACT_LABEL_INPUT,\n DMCA_CONTACT_VALUE_INPUT,\n FUTURE_PLAN_DESCRIPTION_INPUT,\n FUTURE_PLAN_GROUP_NAME_INPUT,\n FUTURE_PLAN_TITLE_INPUT,\n HIDE_REASON_INPUT,\n MAINTENANCE_MESSAGE_INPUT,\n MODERATION_ACTION_REASON_INPUT,\n PLATFORM_RULE_DESCRIPTION_INPUT,\n PLATFORM_RULE_TITLE_INPUT,\n PUBLIC_DOCUMENT_INTENTION_INPUT,\n PUBLIC_DOCUMENT_INTRO_INPUT,\n RETITLE_REASON_INPUT,\n SAFETY_INTERNAL_REASON_INPUT,\n TAKE_IT_DOWN_COPY_INPUT,\n USER_FACING_REASON_DETAIL_INPUT,\n} from '../constants/text-fields.js';\nimport { textFieldSchema } from './text-field.js';\nimport {\n SAFETY_ACTIONS_CONFIRMATION,\n SAFETY_CASE_REOPEN_CONFIRMATION,\n} from '../constants/safety-confirmation-phrases.js';\n\nexport const CheckoutNextImportantTaskInputSchema = z.object({}).strict();\nexport type CheckoutNextImportantTaskInput = z.infer<typeof CheckoutNextImportantTaskInputSchema>;\n\nexport const GetContentViolationInputSchema = z.object({\n violationId: violationIdSchema,\n}).strict();\nexport type GetContentViolationInput = z.infer<typeof GetContentViolationInputSchema>;\n\n// No task type: the server derives it from the task doc, since a client-sent one could be forged.\n// Callers pass only the task id + the extension window.\nexport const MarkWorkLaterInputSchema = z.object({\n taskId: taskIdSchema,\n extendHours: z.union([z.literal(24), z.literal(48)]),\n}).strict();\nexport type MarkWorkLaterInput = z.infer<typeof MarkWorkLaterInputSchema>;\n\n/** The two appeal-review decisions (ONE canonical declaration — shared by the review\n * input and its authoritative result). */\nexport const ContentAppealDecisionSchema = z.enum(['approved', 'denied']);\nexport type ContentAppealDecision = z.infer<typeof ContentAppealDecisionSchema>;\n\nexport const ReviewContentAppealInputSchema = z.object({\n violationId: violationIdSchema,\n taskId: taskIdSchema,\n decision: ContentAppealDecisionSchema,\n adminNotes: textFieldSchema(APPEAL_REVIEW_NOTES_INPUT),\n}).strict();\nexport type ReviewContentAppealInput = z.infer<typeof ReviewContentAppealInputSchema>;\n\n// Authoritative result of reviewContentAppeal. Non-strict (server → client posture).\nexport const ReviewContentAppealResultSchema = z.object({\n success: z.literal(true),\n violationId: violationIdSchema,\n /** Echo of the requested decision (always known — it is the input). */\n decision: ContentAppealDecisionSchema,\n /** The appealing user's uid ('' on the orphaned-task cleanup path, where the\n * underlying violation was already gone and only the stale task was cleared). */\n userId: z.string(),\n /** Operation-receipt audit id — the `admin.contentAppealReviewed` event written in the same\n * transaction. Optional/additive so an older backend that omits it still type-checks. */\n auditEventId: z.string().min(1).optional(),\n});\nexport type ReviewContentAppealResult = z.infer<typeof ReviewContentAppealResultSchema>;\n\n// --- Public-document content inputs ---\n// The Admin editors' strict CONTENT schemas, one per public document. A working copy is saved\n// through `SavePublicDocumentDraftInputSchema` (./public-documents.ts), which pairs each\n// document id with its content schema here; the content is FULL (a version is the whole\n// document, never a partial merge). The client never sends a version — the release publish\n// assigns it.\n\nconst publicDocumentItemIdSchema = z.string().min(1).max(128);\nconst publicDocumentIntroSchema = textFieldSchema(PUBLIC_DOCUMENT_INTRO_INPUT).optional();\nconst publicDocumentIntentionSchema = textFieldSchema(PUBLIC_DOCUMENT_INTENTION_INPUT).optional();\nconst appliesToTypeInputFields = {\n workProjectType: z.enum(WORK_PROJECT_TYPE_KEYS).optional(),\n hallWingType: z.enum(HALL_WING_TYPE_KEYS).optional(),\n};\n\nexport const FuturePlanGroupInputSchema = z.object({\n id: publicDocumentItemIdSchema,\n name: textFieldSchema(FUTURE_PLAN_GROUP_NAME_INPUT),\n order: z.number().int().min(0),\n intention: publicDocumentIntentionSchema,\n}).strict();\n\nexport const FuturePlanItemInputSchema = z.object({\n id: publicDocumentItemIdSchema,\n title: textFieldSchema(FUTURE_PLAN_TITLE_INPUT),\n description: textFieldSchema(FUTURE_PLAN_DESCRIPTION_INPUT),\n groupId: publicDocumentItemIdSchema,\n order: z.number().int().min(0),\n}).strict();\n\nexport const FuturePlansContentInputSchema = z.object({\n intro: publicDocumentIntroSchema,\n groups: z.array(FuturePlanGroupInputSchema).max(MAX_FUTURE_PLAN_GROUPS),\n plans: z.array(FuturePlanItemInputSchema).max(MAX_FUTURE_PLANS),\n}).strict().superRefine((content, ctx) => {\n // A plan whose group is missing would never render, so every plan names a group the document holds.\n const groupIds = new Set(content.groups.map((group) => group.id));\n if (groupIds.size !== content.groups.length) {\n ctx.addIssue({ code: 'custom', path: ['groups'], message: 'Each group needs its own id.' });\n }\n content.plans.forEach((plan, index) => {\n if (!groupIds.has(plan.groupId)) {\n ctx.addIssue({ code: 'custom', path: ['plans', index, 'groupId'], message: 'Every plan belongs to one of the groups.' });\n }\n });\n});\nexport type FuturePlansContentInput = z.infer<typeof FuturePlansContentInputSchema>;\n\nexport const PlatformRuleInputSchema = z.object({\n id: publicDocumentItemIdSchema,\n title: textFieldSchema(PLATFORM_RULE_TITLE_INPUT),\n description: textFieldSchema(PLATFORM_RULE_DESCRIPTION_INPUT),\n group: RuleGroupSchema,\n ...appliesToTypeInputFields,\n order: z.number().int().min(0),\n}).strict();\n\nexport const AgreementPointInputSchema = z.object({\n id: publicDocumentItemIdSchema,\n text: textFieldSchema(AGREEMENT_POINT_INPUT),\n ...appliesToTypeInputFields,\n}).strict();\n\nexport const ArtisanAgreementsInputSchema = z.object({\n intention: publicDocumentIntentionSchema,\n points: z.array(AgreementPointInputSchema).max(MAX_AGREEMENT_POINTS),\n}).strict();\n\nexport const RulesAndAgreementsContentInputSchema = z.object({\n intro: publicDocumentIntroSchema,\n groupIntentions: z.partialRecord(RuleGroupSchema, textFieldSchema(PUBLIC_DOCUMENT_INTENTION_INPUT)).optional(),\n rules: z.array(PlatformRuleInputSchema).max(MAX_PLATFORM_RULES),\n agreements: ArtisanAgreementsInputSchema,\n}).strict();\nexport type RulesAndAgreementsContentInput = z.infer<typeof RulesAndAgreementsContentInputSchema>;\n\nexport const ContentPageSectionInputSchema = z.object({\n id: z.string().min(1).max(128),\n heading: textFieldSchema(CONTENT_PAGE_HEADING_INPUT),\n level: z.union([z.literal(1), z.literal(2)]),\n // Empty body is LEGAL: a bare divider heading (e.g. terms \"Part 1 — Our\n // Intention\") is real content. The input schema must accept everything the\n // stored ContentPageSectionSchema accepts, or a faithfully-seeded doc becomes\n // unsaveable in the admin editor.\n body: textFieldSchema(CONTENT_PAGE_BODY_INPUT),\n order: z.number().int().min(0),\n}).strict();\n\n/** The Terms of Service and Privacy Policy content (the one long-form legal page shape). */\nexport const LegalPageContentInputSchema = z.object({\n sections: z.array(ContentPageSectionInputSchema).min(1).max(MAX_CONTENT_PAGE_SECTIONS),\n}).strict();\nexport type LegalPageContentInput = z.infer<typeof LegalPageContentInputSchema>;\n\nexport const TakeItDownPageCopyContentInputSchema = z.object({\n strings: z.record(z.string().min(1).max(128), textFieldSchema(TAKE_IT_DOWN_COPY_INPUT)),\n}).strict().refine(\n (data) => {\n const count = Object.keys(data.strings).length;\n return count >= 1 && count <= 200;\n },\n { message: 'strings must contain between 1 and 200 entries.' },\n);\nexport type TakeItDownPageCopyContentInput = z.infer<typeof TakeItDownPageCopyContentInputSchema>;\n\nconst DmcaContactRowInputSchema = z.object({\n id: z.string().min(1).max(128),\n label: textFieldSchema(DMCA_CONTACT_LABEL_INPUT),\n value: textFieldSchema(DMCA_CONTACT_VALUE_INPUT),\n order: z.number().int().min(0),\n}).strict();\n\nconst DmcaContactBlockInputSchema = z.object({\n id: z.string().min(1).max(128),\n heading: textFieldSchema(CONTENT_PAGE_HEADING_INPUT),\n order: z.number().int().min(0),\n rows: z.array(DmcaContactRowInputSchema).min(1).max(MAX_DMCA_CONTACT_ROWS),\n}).strict();\n\n/**\n * The DMCA policy content: the intro line, the labeled contact blocks (at least one — the page\n * exists to name the designated agent), and the long-form process sections.\n */\nexport const DmcaPolicyContentInputSchema = z.object({\n intro: textFieldSchema(CONTENT_PAGE_BODY_INPUT),\n contactBlocks: z.array(DmcaContactBlockInputSchema).min(1).max(MAX_DMCA_CONTACT_BLOCKS),\n sections: z.array(ContentPageSectionInputSchema).max(MAX_CONTENT_PAGE_SECTIONS),\n}).strict();\nexport type DmcaPolicyContentInput = z.infer<typeof DmcaPolicyContentInputSchema>;\n\nconst AppConfigDocIdSchema = z.literal('app');\n\nexport const UpdateAppConfigInputSchema = z.object({\n docId: AppConfigDocIdSchema,\n data: z.object({\n appVersion: textFieldSchema(APP_VERSION_INPUT).optional(),\n maintenanceMode: z.boolean().optional(),\n maintenanceMessage: textFieldSchema(MAINTENANCE_MESSAGE_INPUT).optional(),\n registrationEnabled: z.boolean().optional(),\n // Announcement banner copy; '' clears the banner (empty = nothing renders).\n announcementMessage: textFieldSchema(ANNOUNCEMENT_MESSAGE_INPUT).optional(),\n // Runtime abuse throttle: 0 < m <= 1 (tighten-only; 1 = no throttle).\n rateLimitMultiplier: z.number().gt(0).max(1).optional(),\n }).strict().refine(\n (d) => Object.keys(d).length > 0,\n { message: 'data must have at least one field' },\n ),\n}).strict();\nexport type UpdateAppConfigInput = z.infer<typeof UpdateAppConfigInputSchema>;\n\n// recordAppModeFlip records the deployed app mode; it never sets it, so the only input is the\n// admin's optional milestone evidence.\nexport const RecordAppModeFlipInputSchema = z.object({\n milestoneEvidence: textFieldSchema(APP_MODE_FLIP_EVIDENCE_INPUT).optional(),\n}).strict();\nexport type RecordAppModeFlipInput = z.infer<typeof RecordAppModeFlipInputSchema>;\n\n// What recordAppModeFlip answers: whether this call recorded a change (false when the marker\n// already matched the deployed mode) and the mode before and after. Server → client: non-strict.\nexport const RecordAppModeFlipResultSchema = z.object({\n success: z.literal(true),\n recorded: z.boolean(),\n mode: AppModeSchema,\n previousMode: AppModeSchema.nullable(),\n});\nexport type RecordAppModeFlipResult = z.infer<typeof RecordAppModeFlipResultSchema>;\n\n// --- System slots ---\n\n// clearSystemVideoSlot empties one video slot; the server refuses while the slot's upload is still\n// pending or processing.\nexport const ClearSystemVideoSlotInputSchema = z.object({\n slotId: SystemVideoSlotIdSchema,\n}).strict();\nexport type ClearSystemVideoSlotInput = z.infer<typeof ClearSystemVideoSlotInputSchema>;\n\n// updateSystemUidSlot sets one account slot: a `uid` slot takes one account id (null clears it), a\n// `uidList` slot an ordered list (empty clears it). The value's shape must match the slot's kind.\nexport const UpdateSystemUidSlotInputSchema = z.union([\n z.object({\n slotId: SystemUidSlotIdSchema,\n value: userIdSchema.nullable(),\n }).strict(),\n z.object({\n slotId: SystemUidListSlotIdSchema,\n value: z.array(userIdSchema).max(MAX_SYSTEM_UID_LIST),\n }).strict(),\n]);\nexport type UpdateSystemUidSlotInput = z.infer<typeof UpdateSystemUidSlotInputSchema>;\n\n// --- Admin list mutations ---\n\nconst uidSchema = z.string().min(1).max(128);\n\n/**\n * Wire input for the `updateAdminList` callable in ttt-prod.\n * Used to grant or revoke admin / jrAdmin status on `_systemData/adminList`.\n *\n * All four fields are optional arrays of UIDs. At least one must be non-empty.\n * The callable's core function rejects conflicting input (e.g. same UID in\n * both addAdmins and removeAdmins) with HttpsError invalid-argument.\n */\nexport const UpdateAdminListInputSchema = z.object({\n addAdmins: z.array(uidSchema).optional(),\n removeAdmins: z.array(uidSchema).optional(),\n addJrAdmins: z.array(uidSchema).optional(),\n removeJrAdmins: z.array(uidSchema).optional(),\n})\n .strict()\n .refine(\n (data) =>\n (data.addAdmins?.length ?? 0) +\n (data.removeAdmins?.length ?? 0) +\n (data.addJrAdmins?.length ?? 0) +\n (data.removeJrAdmins?.length ?? 0) >\n 0,\n { message: 'At least one of addAdmins/removeAdmins/addJrAdmins/removeJrAdmins must be non-empty.' },\n );\n\nexport type UpdateAdminListInput = z.infer<typeof UpdateAdminListInputSchema>;\n\n// Authoritative result of updateAdminList — the grant/revoke delta counts computed inside\n// the roster transaction (uids already in their target state are no-ops and not counted).\n// Non-strict (server → client result posture).\nexport const UpdateAdminListResultSchema = z.object({\n success: z.literal(true),\n adminsGranted: z.number().int().nonnegative(),\n adminsRevoked: z.number().int().nonnegative(),\n jrAdminsGranted: z.number().int().nonnegative(),\n jrAdminsRevoked: z.number().int().nonnegative(),\n /** Operation-receipt audit id — the `admin.systemRoleGranted` / `admin.systemRoleRevoked`\n * event(s) key off the same roster transaction. Optional/additive. (No single domain id: a\n * roster edit spans multiple uids, so only the audit id is a meaningful receipt handle.) */\n auditEventId: z.string().min(1).optional(),\n});\nexport type UpdateAdminListResult = z.infer<typeof UpdateAdminListResultSchema>;\n\n// --- Admin moderation: hide / restore / retitle content + Work/Realm objects ---\n\nexport const CheckTrademarkInputSchema = z.object({\n // Primary: the work project's title (franchise-level check).\n workTitle: z.string().min(1).max(MAX_WORK_PROJECT_TITLE_LENGTH),\n // Optional: the sub-item title (chapter, track, episode). Checked secondarily.\n // `.nullish()` (not `.optional()`): the Firebase callable client serializes an\n // undefined argument as JSON null, and the work-view caller passes\n // `subItemTitle: subItem?.title` which is undefined when the sub-item hasn't\n // loaded — that arrives here as null. A bare `.optional()` would 400 on it.\n subItemTitle: z.string().max(MAX_WORK_PROJECT_TITLE_LENGTH).nullish(),\n}).strict();\nexport type CheckTrademarkInput = z.infer<typeof CheckTrademarkInputSchema>;\n\nexport const GetReportedContentDetailInputSchema = z.object({\n reportGroupId: reportGroupIdSchema,\n}).strict();\nexport type GetReportedContentDetailInput = z.infer<typeof GetReportedContentDetailInputSchema>;\n\n// --- getReportedContentDetail result (cross-boundary: produced by the callable in functions/,\n// consumed by the admin report work-view) ---\n\n/** One display-text field of the reported doc, labeled for the review panel. The server returns\n * EVERY configured non-empty text field for the item type (title, description, body, …) in\n * display order — never just the first non-empty one. */\nexport const ReportedTextFieldSchema = z.object({\n /** Raw doc field name (e.g. 'description', 'workingTitle'). */\n field: z.string().min(1),\n /** Human label the panel renders (e.g. 'Description', 'Title'). */\n label: z.string().min(1),\n /** Current live value, trimmed; empty fields are omitted from the array. */\n value: z.string().min(1),\n});\nexport type ReportedTextField = z.infer<typeof ReportedTextFieldSchema>;\n\n/** One media asset referenced by the reported content: id + kind + current serving state\n * (for click-to-reveal) + the server-derived variant key the reveal must request. */\nexport const ReportedMediaAssetSchema = z.object({\n mediaAssetId: z.string().min(1),\n mediaKind: ContentMediaKindSchema.nullable(),\n servingStatus: MediaServingStatusSchema.nullable(),\n /** The variant key the reveal must request for its single display render (image origins split\n * between 'full' and 'main'; video/audio are always 'main'). Null when the asset doc is\n * missing/variant-less. */\n displayVariantKey: z.string().nullable(),\n /** Human label of WHAT this asset is on the reported item (e.g. 'Square cover',\n * 'Track photo — <title>'). Null when the server cannot derive one. */\n label: z.string().nullable(),\n});\nexport type ReportedMediaAsset = z.infer<typeof ReportedMediaAssetSchema>;\n\nexport const GetReportedContentDetailResultSchema = z.object({\n itemType: z.string().min(1),\n reportedItemId: reportTargetItemIdSchema,\n /** First non-empty display-text field; textFields is the complete labeled set. */\n textSnapshot: z.string().nullable(),\n textFields: z.array(ReportedTextFieldSchema),\n mediaAssets: z.array(ReportedMediaAssetSchema),\n /** Whether the reported doc is currently hidden (best-effort, doc-flag based). */\n isHidden: z.boolean().nullable(),\n /** The content owner / uploader uid, when derivable. */\n ownerUid: z.string().nullable(),\n /**\n * The canonical moderation-clearable SURFACE this reported doc actually IS, resolved\n * SERVER-side: `chapter` / `tuneTrack` / `televisionEpisode` for a hall sub-item (through\n * `HALL_CONTENT_SURFACES_BY_WORK_TYPE`, from the parent hall doc the callable already reads),\n * `workProject` / `workRealm` for the shells.\n *\n * Why the resolved surface and not the `workProjectType` it was resolved from: the surface is\n * what a consumer needs — `MODERATION_CLEARABLE_TEXT_FIELDS[clearableSurface]` is the exact\n * clearable field set, one canonical index with no re-derivation. Shipping the work-project type\n * instead would make every consumer redo the routing AND the detail-vs-sub-item branch — the\n * hand-rolled duplication that map exists to prevent.\n *\n * Without it, the in-flow clear's field picker could only offer the hall-family UNION\n * (title/description/content), so an operator could tick `description` on a Tale chapter\n * (title/content) or `content` on a Tune track (title/description), pass the wire refinement,\n * and have the clear runner silently drop it. The picker offers only this surface's fields, and\n * the resolve path re-checks caller-supplied fields against the same set.\n *\n * `.nullish()`: absent on payloads produced before this field existed, and null when the\n * reported item is not a clearable text surface at all (a square post, a chat message, a\n * profile picture).\n */\n clearableSurface: moderationClearableSurfaceSchema.nullish(),\n /** The FROZEN report-time snapshot (captured at intake), so the operator sees what was\n * reported even if the author edited the live doc to evade. Null for older reports. */\n reportTimeSnapshot: z.object({\n capturedText: z.string().nullable(),\n capturedMediaAssetIds: z.array(z.string()),\n revision: z.number().nullable(),\n capturedAt: z.number().nullable(),\n }).nullable(),\n});\nexport type GetReportedContentDetailResult = z.infer<typeof GetReportedContentDetailResultSchema>;\n\nexport const HideHallSubItemInputSchema = z.object({\n hallItemId: hallItemIdSchema,\n workProjectType: workProjectTypeSchema,\n subItemId: hallSubItemIdSchema,\n reason: textFieldSchema(HIDE_REASON_INPUT),\n}).strict();\nexport type HideHallSubItemInput = z.infer<typeof HideHallSubItemInputSchema>;\n\nexport const RestoreHallSubItemInputSchema = z.object({\n hallItemId: hallItemIdSchema,\n workProjectType: workProjectTypeSchema,\n subItemId: hallSubItemIdSchema,\n}).strict();\nexport type RestoreHallSubItemInput = z.infer<typeof RestoreHallSubItemInputSchema>;\n\nexport const HideWorkProjectInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n reason: textFieldSchema(HIDE_REASON_INPUT),\n}).strict();\nexport type HideWorkProjectInput = z.infer<typeof HideWorkProjectInputSchema>;\n\nexport const HideWorkRealmInputSchema = z.object({\n workRealmId: workRealmIdSchema,\n reason: textFieldSchema(HIDE_REASON_INPUT),\n}).strict();\nexport type HideWorkRealmInput = z.infer<typeof HideWorkRealmInputSchema>;\n\n// `cascadeId` is OPTIONAL: the app backends derive all active cascades for the target when it is\n// omitted, and restore just that one cascade when it is supplied.\nexport const RestoreWorkProjectInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n cascadeId: documentIdSegmentSchema.optional(),\n}).strict();\nexport type RestoreWorkProjectInput = z.infer<typeof RestoreWorkProjectInputSchema>;\n\nexport const RestoreWorkRealmInputSchema = z.object({\n workRealmId: workRealmIdSchema,\n cascadeId: documentIdSegmentSchema.optional(),\n}).strict();\nexport type RestoreWorkRealmInput = z.infer<typeof RestoreWorkRealmInputSchema>;\n\nexport const RequireWorkProjectRetitleInputSchema = z.object({\n reason: textFieldSchema(RETITLE_REASON_INPUT),\n workProjectId: workProjectIdSchema,\n}).strict();\nexport type RequireWorkProjectRetitleInput = z.infer<typeof RequireWorkProjectRetitleInputSchema>;\n\nexport const RequireWorkRealmRetitleInputSchema = z.object({\n reason: textFieldSchema(RETITLE_REASON_INPUT),\n workRealmId: workRealmIdSchema,\n}).strict();\nexport type RequireWorkRealmRetitleInput = z.infer<typeof RequireWorkRealmRetitleInputSchema>;\n\n// --- Page-level \"Clear text (moderation)\" callables (per-field extension of the retitle family) ---\n\n// The clearable SHELL fields (raw doc field names) for the workProject + workRealm contexts.\n// Derived from the canonical clearable-field map — the two shell surfaces share the same fields.\nconst ModerationShellClearFieldSchema = z.enum(MODERATION_CLEARABLE_TEXT_FIELDS.workProject);\nexport type ModerationShellClearField = z.infer<typeof ModerationShellClearFieldSchema>;\n\nexport const ClearWorkProjectTextInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n fields: z.array(ModerationShellClearFieldSchema).min(1),\n reason: textFieldSchema(CLEAR_TEXT_REASON_INPUT),\n}).strict();\nexport type ClearWorkProjectTextInput = z.infer<typeof ClearWorkProjectTextInputSchema>;\n\nexport const ClearWorkRealmTextInputSchema = z.object({\n workRealmId: workRealmIdSchema,\n fields: z.array(ModerationShellClearFieldSchema).min(1),\n reason: textFieldSchema(CLEAR_TEXT_REASON_INPUT),\n}).strict();\nexport type ClearWorkRealmTextInput = z.infer<typeof ClearWorkRealmTextInputSchema>;\n\n// The clearable TEXT fields across the whole hall content family — derived from the canonical\n// map (union of every hall surface's fields), never restated literals.\nconst HallClearFieldSchema = z.enum(HALL_CLEARABLE_TEXT_FIELD_NAMES);\nexport type HallClearField = z.infer<typeof HallClearFieldSchema>;\n\nexport const ClearHallContentTextInputSchema = z.object({\n hallItemId: hallItemIdSchema,\n workProjectType: workProjectTypeSchema,\n subItemId: hallSubItemIdSchema.optional(),\n fields: z.array(HallClearFieldSchema).min(1),\n reason: textFieldSchema(CLEAR_TEXT_REASON_INPUT),\n}).strict();\nexport type ClearHallContentTextInput = z.infer<typeof ClearHallContentTextInputSchema>;\n\n// --- getLatestHideCascade — resolve the latest hide-cascade id for a Work/Realm ---\n\nexport const GetLatestHideCascadeInputSchema = z.object({\n entityId: documentIdSegmentSchema,\n targetType: z.enum(['work-project', 'work-realm']),\n}).strict();\nexport type GetLatestHideCascadeInput = z.infer<typeof GetLatestHideCascadeInputSchema>;\n\n// --- moderateReportedContent — hide / restore / soft perma-remove an individual reported item ---\n\n// The single-item content-action target set (SUBSET of ReportableItemType — excludes the\n// close-out-only hall-library-sub-item).\nconst MODERATE_REPORTED_CONTENT_TARGET_TYPES = [\n 'square-streetz-post',\n 'audition',\n 'audition-entry',\n 'commission-listing',\n 'commission-proposal',\n 'work-asset',\n 'profile-picture',\n 'hall-library-item',\n 'craft-skill',\n // Conversation File — the hide/restore/remove action targets the file owner record +\n // its mediaAsset (the `work-asset` shape), never a chat message.\n 'conversation-file',\n] as const satisfies readonly ReportableItemType[];\n\nexport const ModerateReportedContentInputSchema = z.object({\n reportGroupId: reportGroupIdSchema,\n targetType: z.enum(MODERATE_REPORTED_CONTENT_TARGET_TYPES),\n reportedItemId: reportTargetItemIdSchema,\n parentItemId: reportTargetParentRefSchema.optional(),\n action: z.enum(['hide', 'restore', 'remove']),\n // [EUAS-023] A destructive action (hide/remove) MUST carry a reason; restore is a reversal.\n reason: textFieldSchema(MODERATION_ACTION_REASON_INPUT).optional(),\n})\n .strict()\n .superRefine((val, ctx) => {\n if ((val.action === 'hide' || val.action === 'remove') && !val.reason) {\n ctx.addIssue({\n code: 'custom',\n message: 'A reason is required to hide or remove content.',\n path: ['reason'],\n });\n }\n });\nexport type ModerateReportedContentInput = z.infer<typeof ModerateReportedContentInputSchema>;\n\n// --- resolveAdminTask — the ONE guided close-out for EVERY admin case type ---\n\n// [EUAS-005] The content-action target set ALSO accepts hall-library-sub-item (hide/restore only),\n// which routes to the dedicated `runSetHallSubItemHidden` core (not `runModerateReportedContent`).\nconst CONTENT_ACTION_TARGET_TYPES = [\n 'square-streetz-post',\n 'audition',\n 'audition-entry',\n 'commission-listing',\n 'commission-proposal',\n 'work-asset',\n 'profile-picture',\n 'hall-library-item',\n 'craft-skill',\n 'hall-library-sub-item',\n // Conversation File — same content action as `work-asset`, routed at the file record.\n 'conversation-file',\n] as const satisfies readonly ReportableItemType[];\n\nconst ContentActionSchema = z\n .object({\n button: z.enum(['hideContent', 'restoreContent', 'permaRemoveContent']),\n targetType: z.enum(CONTENT_ACTION_TARGET_TYPES),\n reportedItemId: reportTargetItemIdSchema,\n parentItemId: reportTargetParentRefSchema.optional(),\n })\n .strict();\n\nconst WarnUserSchema = z\n .object({\n button: z.literal('warnUser'),\n userId: userIdSchema,\n // A warning IS an admin dispatch (resolveAdminTask → runCreateAdminDispatchToUser),\n // so it shares the dispatch subject/body caps.\n subject: textFieldSchema(ADMIN_DISPATCH_SUBJECT_INPUT),\n message: textFieldSchema(ADMIN_DISPATCH_MESSAGE_INPUT),\n })\n .strict();\n\nconst SuspendOrBanSchema = z\n .object({\n button: z.enum(['suspendUser', 'banUser']),\n userId: userIdSchema,\n reason: textFieldSchema(ACCOUNT_ACTION_REASON_INPUT),\n })\n .strict();\n\nconst ReinstateUserSchema = z\n .object({ button: z.literal('reinstateUser'), userId: userIdSchema, reason: textFieldSchema(ACCOUNT_REINSTATE_REASON_INPUT).optional() })\n .strict();\n\nconst ForceUsernameResetSchema = z\n .object({ button: z.literal('forceUsernameReset'), userId: userIdSchema, reason: textFieldSchema(ACCOUNT_ACTION_REASON_INPUT).optional() })\n .strict();\n\n/** Whole-object Work/Realm remedies — `reportedItemId` is the workProjectId / workRealmId. */\nconst WorkObjectActionSchema = z\n .object({\n button: z.enum(['hideWorkObject', 'restoreWorkObject', 'forceRetitle']),\n targetType: z.enum(['work-project', 'work-realm']),\n reportedItemId: reportTargetItemIdSchema,\n })\n .strict();\n\n// --- The in-flow clear-content disposition (staged counterpart of the page-level clear-text\n// callables) ---\n\n/** The three targets the in-flow text clear can neutralize — the Work/Realm shells plus a single\n * published hall sub-item. Compile-linked subset of the canonical reportable-item enum. */\nconst CLEAR_CONTENT_TEXT_TARGET_TYPES = [\n 'work-project',\n 'work-realm',\n 'hall-library-sub-item',\n] as const satisfies readonly ReportableItemType[];\nexport type ClearContentTextTargetType = (typeof CLEAR_CONTENT_TEXT_TARGET_TYPES)[number];\n\n/** Every field name the staged clear can carry across those three targets — the union of the two\n * canonical clearable owners (`MODERATION_CLEARABLE_TEXT_FIELDS` for the shells,\n * `HALL_CLEARABLE_TEXT_FIELD_NAMES` for the hall family), i.e. the same two sources\n * `ClearWorkProjectTextInputSchema` / `ClearHallContentTextInputSchema` derive from. No field\n * literal is restated here. */\nconst CLEAR_CONTENT_TEXT_FIELDS = [\n ...MODERATION_CLEARABLE_TEXT_FIELDS.workProject,\n ...HALL_CLEARABLE_TEXT_FIELD_NAMES,\n] as const;\nconst ClearContentTextFieldSchema = z.enum(CLEAR_CONTENT_TEXT_FIELDS);\nexport type ClearContentTextField = z.infer<typeof ClearContentTextFieldSchema>;\n\n/** Which fields each target legally accepts — projected from those same owners, so a\n * target/field mismatch is refused at the wire instead of reaching a clear runner that would\n * drop it. Enforced by the cross-field refinement on `StagedActionSchema` below. */\nconst CLEAR_CONTENT_TEXT_FIELDS_BY_TARGET = {\n 'work-project': MODERATION_CLEARABLE_TEXT_FIELDS.workProject,\n 'work-realm': MODERATION_CLEARABLE_TEXT_FIELDS.workRealm,\n 'hall-library-sub-item': HALL_CLEARABLE_TEXT_FIELD_NAMES,\n} as const satisfies Record<ClearContentTextTargetType, readonly ClearContentTextField[]>;\n\n/** Per-field text clear — the guided close-out's staged counterpart of the page-level\n * `clearWorkProjectText` / `clearWorkRealmText` / `clearHallContentText` callables (the\n * per-field extension of `forceRetitle`). `reportedItemId` is the workProjectId / workRealmId /\n * sub-item id; `parentItemId` is the parent hall item id, required only for the sub-item target.\n * `workProjectType` is deliberately NOT on the wire — the server re-reads it from the doc (the\n * hall hide-branch precedent). */\nconst ClearContentTextActionSchema = z\n .object({\n button: z.literal('clearContentText'),\n targetType: z.enum(CLEAR_CONTENT_TEXT_TARGET_TYPES),\n reportedItemId: reportTargetItemIdSchema,\n parentItemId: reportTargetParentRefSchema.optional(),\n fields: z.array(ClearContentTextFieldSchema).min(1),\n })\n .strict();\n\n/** Chat message tombstone — channel + seq from the report, revision from the live thread-read. */\nconst TombstoneChatSchema = z\n .object({\n button: z.literal('tombstoneChat'),\n channel: GuildChatConversationSchema,\n messageSeq: z.number().int().nonnegative(),\n expectedMessageRevision: z.number().int().nonnegative(),\n })\n .strict();\n\nexport const StagedActionSchema = z\n .discriminatedUnion('button', [\n ContentActionSchema,\n WarnUserSchema,\n SuspendOrBanSchema,\n ReinstateUserSchema,\n ForceUsernameResetSchema,\n WorkObjectActionSchema,\n ClearContentTextActionSchema,\n TombstoneChatSchema,\n ])\n // The clearContentText arm's two cross-field rules, applied at the union (the\n // SafetyStagedActionSchema pattern below) because no other arm carries these fields:\n // every chosen field must belong to the chosen target's canonical clearable set, and the\n // hall sub-item target must name its parent hall item.\n .superRefine((value, ctx) => {\n if (value.button !== 'clearContentText') return;\n const clearable: readonly string[] = CLEAR_CONTENT_TEXT_FIELDS_BY_TARGET[value.targetType];\n value.fields.forEach((field, index) => {\n if (!clearable.includes(field)) {\n ctx.addIssue({\n code: 'custom',\n message: `Field '${field}' is not clearable on a '${value.targetType}' target.`,\n path: ['fields', index],\n });\n }\n });\n if (value.targetType === 'hall-library-sub-item' && !value.parentItemId) {\n ctx.addIssue({\n code: 'custom',\n message: 'parentItemId (the parent hall item id) is required for a hall sub-item target.',\n path: ['parentItemId'],\n });\n }\n });\nexport type StagedAction = z.infer<typeof StagedActionSchema>;\n\nexport const NormalReportInputSchema = z\n .object({\n caseType: z.literal('normalReport').default('normalReport'),\n taskId: taskIdSchema,\n outcome: z.enum(['founded', 'unfounded']),\n resolutionSummary: z.string().trim().min(1).max(MAX_SAFETY_RESOLUTION_SUMMARY_LENGTH),\n actions: z.array(StagedActionSchema).max(16).default([]),\n userFacingReasonCode: z.string().trim().min(1).max(128).optional(),\n userFacingReasonDetail: textFieldSchema(USER_FACING_REASON_DETAIL_INPUT).optional(),\n adminNote: textFieldSchema(CLOSE_OUT_ADMIN_NOTE_INPUT).optional(),\n })\n .strict();\nexport type ResolveAdminTaskInput = z.infer<typeof NormalReportInputSchema>;\n\nconst SafetyDispositionActionSchema = z\n .object({\n button: z.literal('setReportDisposition'),\n // Derived from the ONE canonical disposition enum — 'undetermined' is the initial\n // state, never an operator-settable target, so it is excluded (not re-declared).\n disposition: ReportDispositionSchema.exclude(['undetermined']),\n dispositionReasonCode: ReportDispositionReasonCodeSchema,\n // Derived from the ONE receipts-cap constant (doc-schemas/safety/evidence.ts) — the same\n // bound the callable + the embedded SetReportDispositionInputV1Schema use. No field-level min:\n // the reportRequired⇒non-empty rule lives in the shared cross-field refinement below, so every\n // other disposition may legally stage this action with no evidence revealed.\n evidenceRefs: z.array(z.string().min(1)).max(MAX_MANIFEST_NCMEC_RECEIPTS),\n expectedRevision: z.number().int().nonnegative(),\n })\n .strict();\n\nconst QuarantineActionSchema = z.object({ button: z.literal('quarantinePreserveFile') }).strict();\n\n// [C-01/EUAS-002] No client-supplied requestId — the linked statutory request id(s) are derived\n// SERVER-SIDE from the case's `requestLinks` inside `enqueueNciiRemovalForCase`.\nconst HashRemoveActionSchema = z.object({ button: z.literal('hashRemoveFile') }).strict();\n\nconst SafetyAccountActionSchema = z\n .object({\n button: z.enum(['suspendUser', 'banUser', 'reinstateUser']),\n targetUid: userIdSchema,\n reasonInternal: textFieldSchema(SAFETY_INTERNAL_REASON_INPUT),\n reasonUserFacing: z.string().trim().min(1).max(MAX_USER_FACING_REASON_LENGTH),\n role: ChildSafetyAccountRoleSchema,\n subjectDisposition: ChildSafetyAccountSubjectDispositionSchema,\n })\n .strict();\n\nexport const SafetyStagedActionSchema = z\n .discriminatedUnion('button', [\n SafetyDispositionActionSchema,\n QuarantineActionSchema,\n HashRemoveActionSchema,\n SafetyAccountActionSchema,\n ])\n // The setReportDisposition arm reuses the ONE canonical cross-field rules (foundation.ts) via the\n // shared refinements — never re-declaring them here: the disposition↔reason pairing AND the\n // reportRequired⇒evidence-present rule. Other arms carry no such fields.\n .superRefine((value, ctx) => {\n if (value.button === 'setReportDisposition') {\n refineReportDispositionReasonCode(value, ctx);\n refineReportDispositionEvidenceRefs(value, ctx);\n }\n });\nexport type SafetyStagedAction = z.infer<typeof SafetyStagedActionSchema>;\n\nexport const SafetyCaseInputSchema = z\n .object({\n caseType: SafetyCaseLaneSchema,\n caseId: safetyCaseIdSchema,\n outcome: z.enum(['founded', 'unfounded']),\n resolutionSummary: z.string().trim().min(1).max(MAX_SAFETY_RESOLUTION_SUMMARY_LENGTH),\n actions: z.array(SafetyStagedActionSchema).max(16).default([]),\n adminNote: textFieldSchema(CLOSE_OUT_ADMIN_NOTE_INPUT).optional(),\n // [EUAS-017] Optimistic-concurrency token (`childSafetyCaseList.revision` / `nciiCases.revision`).\n // The close is rejected if the case changed since the operator loaded it — concurrent stale closes\n // can't silently overwrite. Optional for backward compatibility; the console always supplies it.\n expectedRevision: z.number().int().nonnegative().optional(),\n // Interim reauth: a single explicit typed confirmation for the privileged safety actions,\n // standing in for the passkey two-step until [H-17]. The callable is full-admin gated.\n confirmation: z.literal(SAFETY_ACTIONS_CONFIRMATION),\n })\n .strict();\nexport type SafetyCaseInput = z.infer<typeof SafetyCaseInputSchema>;\n\nexport const ReopenSafetyCaseInputSchema = z\n .object({\n caseType: SafetyCaseLaneSchema,\n caseId: safetyCaseIdSchema,\n reasonInternal: textFieldSchema(SAFETY_INTERNAL_REASON_INPUT),\n expectedRevision: z.number().int().nonnegative().optional(),\n confirmation: z.literal(SAFETY_CASE_REOPEN_CONFIRMATION),\n })\n .strict();\nexport type ReopenSafetyCaseInput = z.infer<typeof ReopenSafetyCaseInputSchema>;\n\n// ---------------------------------------------------------------------------\n// Dead-letter operations — adminReplayDeadLetter + getDeadLetters (Ops Repairs).\n// ---------------------------------------------------------------------------\n\n/** Every ledger the dead-letter replay callable supports. */\nexport const DeadLetterCollectionSchema = z.enum([\n 'chatSyncEvents',\n 'chatAdminActionCommands',\n 'notificationDeliveries',\n 'chatMessageOutbox',\n 'squareAnnouncementJobs',\n 'chatSyncFanoutJobs',\n 'mediaAssets',\n 'quarantineSagaJobs',\n 'nciiRemovalJobs',\n 'safetyEvidenceJobs',\n 'accountActionCommands',\n 'activeReportGroups',\n 'hallSubItemEdgeSync',\n 'chatParkedDeliveries',\n]);\nexport type DeadLetterCollection = z.infer<typeof DeadLetterCollectionSchema>;\n\n/** Every replay lane whose target is a flat top-level document. */\nexport const FlatDeadLetterCollectionSchema = DeadLetterCollectionSchema.exclude(['hallSubItemEdgeSync']);\nexport type FlatDeadLetterCollection = z.infer<typeof FlatDeadLetterCollectionSchema>;\n\n/**\n * Canonical identity for a published Hall sub-item edge-sync replay target. The work type derives\n * the only valid nested collection through PATH_BUILDERS.hallItemSubItem; callers never submit a\n * Firestore path or collection segment.\n */\nexport const HallSubItemEdgeSyncReplayTargetSchema = z.object({\n hallItemId: hallItemIdSchema,\n workProjectType: workProjectTypeSchema,\n subItemId: hallSubItemIdSchema,\n}).strict();\nexport type HallSubItemEdgeSyncReplayTarget = z.infer<typeof HallSubItemEdgeSyncReplayTargetSchema>;\n\nexport const AdminReplayDeadLetterInputSchema = z\n .discriminatedUnion('collection', [\n z.object({\n collection: FlatDeadLetterCollectionSchema,\n docId: documentIdSegmentSchema.max(200),\n reason: z.string().min(1).max(MAX_INTERNAL_REASON_LENGTH),\n dryRun: z.boolean().optional(),\n }).strict(),\n z.object({\n collection: z.literal('hallSubItemEdgeSync'),\n ...HallSubItemEdgeSyncReplayTargetSchema.shape,\n reason: z.string().min(1).max(MAX_INTERNAL_REASON_LENGTH),\n dryRun: z.boolean().optional(),\n }).strict(),\n ]);\nexport type AdminReplayDeadLetterInput = z.infer<typeof AdminReplayDeadLetterInputSchema>;\n\nexport const GetDeadLettersInputSchema = z\n .object({\n /** Restrict to one listable flat ledger; absent = all listable flat ledgers. */\n collection: FlatDeadLetterCollectionSchema.optional(),\n /** Per-ledger row cap (the callable's own ceiling applies regardless). */\n limit: z.number().int().min(1).max(200).optional(),\n })\n .strict()\n .nullish();\nexport type GetDeadLettersInput = z.infer<typeof GetDeadLettersInputSchema>;\n\n/** The `getOpsStatus` input: the snapshot takes no parameters, and anything sent is refused. */\nexport const GetOpsStatusInputSchema = z.object({}).strict();\nexport type GetOpsStatusInput = z.infer<typeof GetOpsStatusInputSchema>;\n\n\n"]}
@@ -53,7 +53,6 @@ export type GuildChatChannelLifecycleResult = z.infer<typeof GuildChatChannelLif
53
53
  export declare const SendGuildChatMessageInputSchema: z.ZodObject<{
54
54
  threadKind: z.ZodLiteral<"adminSupport">;
55
55
  adminDispatchId: z.ZodString;
56
- isUserReply: z.ZodBoolean;
57
56
  text: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
58
57
  }, z.core.$strict>;
59
58
  export type SendGuildChatMessageInput = z.infer<typeof SendGuildChatMessageInputSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../src/schemas/chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAsCxB,eAAO,MAAM,2BAA2B;;;;;;;4BAGK,CAAC;AAE9C,eAAO,MAAM,kCAAkC;;;kBAGpC,CAAC;AACZ,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAM9F,eAAO,MAAM,oCAAoC;;;kBAGtC,CAAC;AACZ,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC;AAKlG,eAAO,MAAM,iCAAiC;;;kBAGnC,CAAC;AACZ,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F,eAAO,MAAM,iCAAiC;;;;;kBAKnC,CAAC;AACZ,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F;;;;;GAKG;AACH,eAAO,MAAM,qCAAqC,iCAAkC,CAAC;AACrF,eAAO,MAAM,iCAAiC;;;EAAgD,CAAC;AAC/F,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAS5F,eAAO,MAAM,qCAAqC;;;;;;;iBAIhD,CAAC;AACH,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC;AAKpG,eAA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same input shape as archive. The callable marks the
40
40
  // channel `isDeleted`, bumps configVersion, revokes grants, and re-projects members to `removed`;
41
- // storage is retained (never a physical purge). See ttt-prod docs/design/chat-realtime-system.md.
41
+ // storage is retained (never a physical purge).
42
42
  export const DeleteGuildChatChannelInputSchema = z.object({
43
43
  workProjectId: workProjectIdSchema,
44
44
  guildChatChannelId: guildChatChannelIdSchema,
@@ -61,27 +61,25 @@ export const GuildChatChannelEnforcementSchema = z.enum(GUILD_CHAT_CHANNEL_ENFOR
61
61
  // unarchive / update / delete): each answers with the id of the channel it acted on and
62
62
  // whether the chat Worker already enforces the change.
63
63
  // One named shape, not five aliases — the lanes deliberately share a result contract, and a
64
- // future divergence should be a visible schema split, not a silent drift between app-local
65
- // copies (the frontend once typed unarchive's result as `{ channelId }` against a backend
66
- // returning `guildChatChannelId`; both compiled). Non-strict (server → client result posture).
64
+ // divergence must be a visible schema split, never a silent drift between app-local copies.
65
+ // Non-strict (server → client result posture).
67
66
  export const GuildChatChannelLifecycleResultSchema = z.object({
68
67
  success: z.literal(true),
69
68
  guildChatChannelId: guildChatChannelIdSchema,
70
69
  enforcement: GuildChatChannelEnforcementSchema,
71
70
  });
72
- // Guild channels + invite threads moved to the realtime chat (Cloudflare DOs), which
73
- // sends through the DO client — NOT this callable. The Firestore send path is retained
74
- // PERMANENTLY for admin-support threads only (ttt-prod docs/design/chat-realtime-system.md).
71
+ // The Firestore send path serves admin-support threads only; guild channels and invite threads
72
+ // send through the realtime chat (Cloudflare DOs). ONE input for both sides of a support thread:
73
+ // `sendGuildChatMessage` is the thread owner's reply and `adminSendGuildChatMessage` the admin's,
74
+ // so the callable — never a flag in the input — says which side is speaking.
75
75
  export const SendGuildChatMessageInputSchema = z.object({
76
76
  threadKind: z.literal('adminSupport'),
77
77
  adminDispatchId: adminDispatchIdSchema,
78
- isUserReply: z.boolean(),
79
78
  text: textFieldSchema(SUPPORT_THREAD_MESSAGE_INPUT),
80
79
  // No reply pointer: chat has no reply-authoring affordance, so a client could never
81
- // legitimately send one. `.strict()` therefore REJECTS a client-sent `replyTo`
82
- // (DJ ruling 2026-07-29).
80
+ // legitimately send one. `.strict()` therefore REJECTS a client-sent `replyTo`.
83
81
  }).strict();
84
- // Wire result contract for the sendGuildChatMessage callable — what the CLIENT relies on.
82
+ // Wire result contract for both support-thread send callables — what the CLIENT relies on.
85
83
  // The backend core's internal result type extends this with composition-only
86
84
  // inline-materialize fields (backend↔backend contract; see runSendGuildChatMessage) —
87
85
  // those extra fields may appear on the wire and are not part of the client contract,
@@ -131,7 +129,7 @@ export const CreateAdminDispatchToUserInputSchema = z.object({
131
129
  subject: textFieldSchema(ADMIN_DISPATCH_SUBJECT_INPUT),
132
130
  message: textFieldSchema(ADMIN_DISPATCH_MESSAGE_INPUT),
133
131
  }).strict();
134
- // CLIENT-CALLED wire contract for the `mintChatGrant` callable (Contract A; P3).
132
+ // CLIENT-CALLED wire contract for the `mintChatGrant` callable.
135
133
  // Crosses the backend↔frontend boundary — the web client (and any future mobile/TV
136
134
  // client) constructs this payload — so it lives here per the callable-validation
137
135
  // convention, not locally in the functions repo. The REAL Firestore authorization
@@ -148,7 +146,7 @@ export const UpdateGuildChatChannelInputSchema = z.object({
148
146
  description: textFieldSchema(GUILD_CHAT_CHANNEL_DESCRIPTION_INPUT).optional(),
149
147
  requiredGuildStandings: z.array(z.string().min(1).max(64)).max(20).optional(),
150
148
  }).strict();
151
- // --- Admin chat moderation callables (review-only; ttt-prod docs/design/chat-realtime-system.md) ---
149
+ // --- Admin chat moderation callables (review-only) ---
152
150
  // `adminModerateChatMessage` — queue a DO-owned hide/delete command. A chat message carries
153
151
  // no media (files live in the conversation's Conversation Files list), so this is a text-only
154
152
  // hide/delete; `.strict()` rejects any asset-id field.
@@ -1 +1 @@
1
- {"version":3,"file":"chat.js","sourceRoot":"","sources":["../../src/schemas/chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,6BA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CAAC;AAGH;0EAC0E;AAC1E,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { ChatMessageRevisionKindSchema } from '@ttt-productions/chat-schemas';\nimport type { GuildChatConversation } from '../ids/guild-chat-conversation.js';\nimport {\n workProjectIdSchema,\n userIdSchema,\n guildChatChannelIdSchema,\n guildInviteIdSchema,\n adminDispatchIdSchema,\n documentIdSegmentSchema,\n reportGroupIdSchema,\n} from './atoms.js';\nimport { MAX_CHAT_MODERATION_REASON_LENGTH } from '../constants/business.js';\nimport {\n ADMIN_DISPATCH_MESSAGE_INPUT,\n ADMIN_DISPATCH_SUBJECT_INPUT,\n GUILD_CHAT_CHANNEL_DESCRIPTION_INPUT,\n GUILD_CHAT_CHANNEL_NAME_INPUT,\n SUPPORT_THREAD_MESSAGE_INPUT,\n} from '../constants/text-fields.js';\nimport { textFieldSchema } from './text-field.js';\nimport { AdminDispatchContextRefSchema } from '../doc-schemas/messaging.js';\n\n/**\n * The wire shape of a TTT realtime conversation (`GuildChatConversation`): a Work's guild chat\n * channel or a guild invite's conversation, each by its own ids. Every input that names a\n * conversation — the grant request, the admin moderation and context reads, the staged chat\n * tombstone — takes this one schema.\n */\nconst GuildChatChannelConversationSchema = z.object({\n kind: z.literal('channel'),\n workProjectId: workProjectIdSchema,\n guildChatChannelId: guildChatChannelIdSchema,\n}).strict();\nconst GuildInviteConversationRefSchema = z.object({\n kind: z.literal('invite'),\n guildInviteId: guildInviteIdSchema,\n}).strict();\nexport const GuildChatConversationSchema = z.discriminatedUnion('kind', [\n GuildChatChannelConversationSchema,\n GuildInviteConversationRefSchema,\n]) satisfies z.ZodType<GuildChatConversation>;\n\nexport const ArchiveGuildChatChannelInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n guildChatChannelId: guildChatChannelIdSchema,\n}).strict();\nexport type ArchiveGuildChatChannelInput = z.infer<typeof ArchiveGuildChatChannelInputSchema>;\n\n// Restore an archived guild chat channel — same input shape as archive. The callable clears\n// `isArchived` and bumps configVersion; it is the inverse of archive, never a path to a deleted\n// (tombstoned) channel. Declared as its OWN named schema per the delete precedent below: one\n// named schema per callable, so a lane's input can diverge without touching its siblings.\nexport const UnarchiveGuildChatChannelInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n guildChatChannelId: guildChatChannelIdSchema,\n}).strict();\nexport type UnarchiveGuildChatChannelInput = z.infer<typeof UnarchiveGuildChatChannelInputSchema>;\n\n// Tombstone (delete) a guild chat channel — same input shape as archive. The callable marks the\n// channel `isDeleted`, bumps configVersion, revokes grants, and re-projects members to `removed`;\n// storage is retained (never a physical purge). See ttt-prod docs/design/chat-realtime-system.md.\nexport const DeleteGuildChatChannelInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n guildChatChannelId: guildChatChannelIdSchema,\n}).strict();\nexport type DeleteGuildChatChannelInput = z.infer<typeof DeleteGuildChatChannelInputSchema>;\n\nexport const CreateGuildChatChannelInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n channelName: textFieldSchema(GUILD_CHAT_CHANNEL_NAME_INPUT),\n description: textFieldSchema(GUILD_CHAT_CHANNEL_DESCRIPTION_INPUT).optional(),\n requiredGuildStandings: z.array(z.string().min(1).max(64)).max(20),\n}).strict();\nexport type CreateGuildChatChannelInput = z.infer<typeof CreateGuildChatChannelInputSchema>;\n\n/**\n * Whether the chat Worker already enforces a channel change when its callable answers:\n * `applied` — the change reached the channel's room before the answer; `pending` — it is\n * committed and queued, and the room applies it within the sync retry window. Never a failure:\n * the change itself is saved either way.\n */\nexport const GUILD_CHAT_CHANNEL_ENFORCEMENT_STATES = ['applied', 'pending'] as const;\nexport const GuildChatChannelEnforcementSchema = z.enum(GUILD_CHAT_CHANNEL_ENFORCEMENT_STATES);\nexport type GuildChatChannelEnforcement = z.infer<typeof GuildChatChannelEnforcementSchema>;\n\n// ONE wire result contract for ALL FIVE channel-lifecycle callables (create / archive /\n// unarchive / update / delete): each answers with the id of the channel it acted on and\n// whether the chat Worker already enforces the change.\n// One named shape, not five aliases — the lanes deliberately share a result contract, and a\n// future divergence should be a visible schema split, not a silent drift between app-local\n// copies (the frontend once typed unarchive's result as `{ channelId }` against a backend\n// returning `guildChatChannelId`; both compiled). Non-strict (server → client result posture).\nexport const GuildChatChannelLifecycleResultSchema = z.object({\n success: z.literal(true),\n guildChatChannelId: guildChatChannelIdSchema,\n enforcement: GuildChatChannelEnforcementSchema,\n});\nexport type GuildChatChannelLifecycleResult = z.infer<typeof GuildChatChannelLifecycleResultSchema>;\n\n// Guild channels + invite threads moved to the realtime chat (Cloudflare DOs), which\n// sends through the DO client — NOT this callable. The Firestore send path is retained\n// PERMANENTLY for admin-support threads only (ttt-prod docs/design/chat-realtime-system.md).\nexport const SendGuildChatMessageInputSchema = z.object({\n threadKind: z.literal('adminSupport'),\n adminDispatchId: adminDispatchIdSchema,\n isUserReply: z.boolean(),\n text: textFieldSchema(SUPPORT_THREAD_MESSAGE_INPUT),\n // No reply pointer: chat has no reply-authoring affordance, so a client could never\n // legitimately send one. `.strict()` therefore REJECTS a client-sent `replyTo`\n // (DJ ruling 2026-07-29).\n}).strict();\nexport type SendGuildChatMessageInput = z.infer<typeof SendGuildChatMessageInputSchema>;\n\n// Wire result contract for the sendGuildChatMessage callable — what the CLIENT relies on.\n// The backend core's internal result type extends this with composition-only\n// inline-materialize fields (backend↔backend contract; see runSendGuildChatMessage) —\n// those extra fields may appear on the wire and are not part of the client contract,\n// so this schema is deliberately non-strict.\nexport const SendGuildChatMessageResultSchema = z.object({\n success: z.literal(true),\n messageId: z.string().min(1),\n messageDocPath: z.string().min(1),\n});\nexport type SendGuildChatMessageResult = z.infer<typeof SendGuildChatMessageResultSchema>;\n\n// Subject/initial-text share the admin-dispatch caps (the \"contact admin\" composer enforces them).\nexport const StartAdminSupportThreadInputSchema = z.object({\n subject: textFieldSchema(ADMIN_DISPATCH_SUBJECT_INPUT),\n initialMessage: textFieldSchema(ADMIN_DISPATCH_MESSAGE_INPUT),\n}).strict();\nexport type StartAdminSupportThreadInput = z.infer<typeof StartAdminSupportThreadInputSchema>;\n\n// Authoritative result of startAdminSupportThread — both ids are minted inside the\n// creating transaction. Non-strict (server → client result posture).\nexport const StartAdminSupportThreadResultSchema = z.object({\n success: z.literal(true),\n adminDispatchId: z.string().min(1),\n /** Doc id of the initial conversation message. */\n messageId: z.string().min(1),\n});\nexport type StartAdminSupportThreadResult = z.infer<typeof StartAdminSupportThreadResultSchema>;\n\n// Member-initiated workProject → admin correspondence thread (party-generic dispatch,\n// partyKind 'workProject'). Initiating is a Work ACTION (`adminDispatch.start`, BACKEND-006);\n// the callable enforces the one-open-work-initiated-thread spam guard. `contextRef` is\n// server-validated against the workProject before it is stored.\nexport const StartWorkProjectAdminSupportThreadInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n subject: textFieldSchema(ADMIN_DISPATCH_SUBJECT_INPUT),\n initialMessage: textFieldSchema(ADMIN_DISPATCH_MESSAGE_INPUT),\n contextRef: AdminDispatchContextRefSchema.optional(),\n}).strict();\nexport type StartWorkProjectAdminSupportThreadInput = z.infer<typeof StartWorkProjectAdminSupportThreadInputSchema>;\n\n// Admin-initiated dispatch to a workProject party (mirrors the admin→user dispatch:\n// lands unread for the work's active guildmates, creates NO admin task, uncapped).\nexport const CreateAdminDispatchToWorkProjectInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n subject: textFieldSchema(ADMIN_DISPATCH_SUBJECT_INPUT),\n message: textFieldSchema(ADMIN_DISPATCH_MESSAGE_INPUT),\n contextRef: AdminDispatchContextRefSchema.optional(),\n}).strict();\nexport type CreateAdminDispatchToWorkProjectInput = z.infer<typeof CreateAdminDispatchToWorkProjectInputSchema>;\n\n// Admin-initiated dispatch to a USER party (partyKind 'user' — the thread owner is the target\n// `userId`). Sibling of the workProject dispatch above and the same admin-initiated contract:\n// lands unread in the target user's Messages tray, creates NO admin task. No `contextRef` —\n// that field is validated against a workProject, which a user-party thread has none of.\nexport const CreateAdminDispatchToUserInputSchema = z.object({\n userId: userIdSchema,\n subject: textFieldSchema(ADMIN_DISPATCH_SUBJECT_INPUT),\n message: textFieldSchema(ADMIN_DISPATCH_MESSAGE_INPUT),\n}).strict();\nexport type CreateAdminDispatchToUserInput = z.infer<typeof CreateAdminDispatchToUserInputSchema>;\n\n// CLIENT-CALLED wire contract for the `mintChatGrant` callable (Contract A; P3).\n// Crosses the backend↔frontend boundary — the web client (and any future mobile/TV\n// client) constructs this payload — so it lives here per the callable-validation\n// convention, not locally in the functions repo. The REAL Firestore authorization\n// check happens in the callable; this schema pins the scope shape.\nexport const ChatGrantInputSchema = z.discriminatedUnion('kind', [\n GuildChatChannelConversationSchema,\n GuildInviteConversationRefSchema,\n z.object({ kind: z.literal('inbox') }).strict(),\n]);\nexport type ChatGrantInput = z.infer<typeof ChatGrantInputSchema>;\n\nexport const UpdateGuildChatChannelInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n guildChatChannelId: guildChatChannelIdSchema,\n channelName: textFieldSchema(GUILD_CHAT_CHANNEL_NAME_INPUT).optional(),\n description: textFieldSchema(GUILD_CHAT_CHANNEL_DESCRIPTION_INPUT).optional(),\n requiredGuildStandings: z.array(z.string().min(1).max(64)).max(20).optional(),\n}).strict();\nexport type UpdateGuildChatChannelInput = z.infer<typeof UpdateGuildChatChannelInputSchema>;\n\n// --- Admin chat moderation callables (review-only; ttt-prod docs/design/chat-realtime-system.md) ---\n\n// `adminModerateChatMessage` — queue a DO-owned hide/delete command. A chat message carries\n// no media (files live in the conversation's Conversation Files list), so this is a text-only\n// hide/delete; `.strict()` rejects any asset-id field.\nexport const AdminModerateChatMessageInputSchema = z.object({\n requestId: documentIdSegmentSchema.max(200),\n action: z.enum(['hide', 'delete']),\n messageSeq: z.number().int().nonnegative(),\n expectedMessageRevision: z.number().int().nonnegative(),\n caseId: reportGroupIdSchema.max(200),\n reason: z.string().min(1).max(MAX_CHAT_MODERATION_REASON_LENGTH),\n channel: GuildChatConversationSchema,\n}).strict();\nexport type AdminModerateChatMessageInput = z.infer<typeof AdminModerateChatMessageInputSchema>;\n\n// `adminReadChannelContext` — case-bound admin read of a bounded (≤50 before / ≤50 after)\n// message window around a reported message. Requires a case id + reason; both request and\n// outcome are audited.\nexport const AdminReadChannelContextInputSchema = z.object({\n reportedSeq: z.number().int().nonnegative(),\n caseId: reportGroupIdSchema.max(200),\n reason: z.string().min(1).max(MAX_CHAT_MODERATION_REASON_LENGTH),\n before: z.number().int().min(0).max(50).optional(),\n after: z.number().int().min(0).max(50).optional(),\n channel: GuildChatConversationSchema,\n}).strict();\nexport type AdminReadChannelContextInput = z.infer<typeof AdminReadChannelContextInputSchema>;\n\n/** One message of the context window, as the conversation's room holds it now. */\nexport const ChatContextMessageSchema = z.object({\n seq: z.number().int().nonnegative(),\n senderUid: z.string(),\n text: z.string(),\n createdAt: z.number(),\n /** The message's moderation overlay, or null when none applies. */\n moderationKind: ChatMessageRevisionKindSchema.nullable(),\n /** The message's current revision (0 if never moderated): a moderation action names it as\n * `expectedMessageRevision`, so it cannot apply to a message that changed since the read. */\n moderationRevision: z.number().int().nonnegative(),\n /** The accounts a server-written line names; it renders them by their current names. */\n referencedUids: z.array(z.string().min(1)).optional(),\n});\nexport type ChatContextMessage = z.infer<typeof ChatContextMessageSchema>;\n\n/** The `adminReadChannelContext` answer. Non-strict (server → client result posture). */\nexport const AdminReadChannelContextResultSchema = z.object({\n messages: z.array(ChatContextMessageSchema),\n});\nexport type AdminReadChannelContextResult = z.infer<typeof AdminReadChannelContextResultSchema>;\n\n/** The `mintChatGrant` answer: the signed grant and when it expires (epoch ms) — the client\n * refreshes before then. Non-strict (server → client result posture). */\nexport const MintChatGrantResultSchema = z.object({\n grant: z.string().min(1),\n expiresAt: z.number(),\n});\nexport type MintChatGrantResult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AAC,MAAM,mCAAmC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1D,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,wBAAwB,CAAC;CAC5C,CAAC,CAAC;AAGH;0EAC0E;AAC1E,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { ChatMessageRevisionKindSchema } from '@ttt-productions/chat-schemas';\nimport type { GuildChatConversation } from '../ids/guild-chat-conversation.js';\nimport {\n workProjectIdSchema,\n userIdSchema,\n guildChatChannelIdSchema,\n guildInviteIdSchema,\n adminDispatchIdSchema,\n documentIdSegmentSchema,\n reportGroupIdSchema,\n} from './atoms.js';\nimport { MAX_CHAT_MODERATION_REASON_LENGTH } from '../constants/business.js';\nimport {\n ADMIN_DISPATCH_MESSAGE_INPUT,\n ADMIN_DISPATCH_SUBJECT_INPUT,\n GUILD_CHAT_CHANNEL_DESCRIPTION_INPUT,\n GUILD_CHAT_CHANNEL_NAME_INPUT,\n SUPPORT_THREAD_MESSAGE_INPUT,\n} from '../constants/text-fields.js';\nimport { textFieldSchema } from './text-field.js';\nimport { AdminDispatchContextRefSchema } from '../doc-schemas/messaging.js';\n\n/**\n * The wire shape of a TTT realtime conversation (`GuildChatConversation`): a Work's guild chat\n * channel or a guild invite's conversation, each by its own ids. Every input that names a\n * conversation — the grant request, the admin moderation and context reads, the staged chat\n * tombstone — takes this one schema.\n */\nconst GuildChatChannelConversationSchema = z.object({\n kind: z.literal('channel'),\n workProjectId: workProjectIdSchema,\n guildChatChannelId: guildChatChannelIdSchema,\n}).strict();\nconst GuildInviteConversationRefSchema = z.object({\n kind: z.literal('invite'),\n guildInviteId: guildInviteIdSchema,\n}).strict();\nexport const GuildChatConversationSchema = z.discriminatedUnion('kind', [\n GuildChatChannelConversationSchema,\n GuildInviteConversationRefSchema,\n]) satisfies z.ZodType<GuildChatConversation>;\n\nexport const ArchiveGuildChatChannelInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n guildChatChannelId: guildChatChannelIdSchema,\n}).strict();\nexport type ArchiveGuildChatChannelInput = z.infer<typeof ArchiveGuildChatChannelInputSchema>;\n\n// Restore an archived guild chat channel — same input shape as archive. The callable clears\n// `isArchived` and bumps configVersion; it is the inverse of archive, never a path to a deleted\n// (tombstoned) channel. Declared as its OWN named schema per the delete precedent below: one\n// named schema per callable, so a lane's input can diverge without touching its siblings.\nexport const UnarchiveGuildChatChannelInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n guildChatChannelId: guildChatChannelIdSchema,\n}).strict();\nexport type UnarchiveGuildChatChannelInput = z.infer<typeof UnarchiveGuildChatChannelInputSchema>;\n\n// Tombstone (delete) a guild chat channel — same input shape as archive. The callable marks the\n// channel `isDeleted`, bumps configVersion, revokes grants, and re-projects members to `removed`;\n// storage is retained (never a physical purge).\nexport const DeleteGuildChatChannelInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n guildChatChannelId: guildChatChannelIdSchema,\n}).strict();\nexport type DeleteGuildChatChannelInput = z.infer<typeof DeleteGuildChatChannelInputSchema>;\n\nexport const CreateGuildChatChannelInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n channelName: textFieldSchema(GUILD_CHAT_CHANNEL_NAME_INPUT),\n description: textFieldSchema(GUILD_CHAT_CHANNEL_DESCRIPTION_INPUT).optional(),\n requiredGuildStandings: z.array(z.string().min(1).max(64)).max(20),\n}).strict();\nexport type CreateGuildChatChannelInput = z.infer<typeof CreateGuildChatChannelInputSchema>;\n\n/**\n * Whether the chat Worker already enforces a channel change when its callable answers:\n * `applied` — the change reached the channel's room before the answer; `pending` — it is\n * committed and queued, and the room applies it within the sync retry window. Never a failure:\n * the change itself is saved either way.\n */\nexport const GUILD_CHAT_CHANNEL_ENFORCEMENT_STATES = ['applied', 'pending'] as const;\nexport const GuildChatChannelEnforcementSchema = z.enum(GUILD_CHAT_CHANNEL_ENFORCEMENT_STATES);\nexport type GuildChatChannelEnforcement = z.infer<typeof GuildChatChannelEnforcementSchema>;\n\n// ONE wire result contract for ALL FIVE channel-lifecycle callables (create / archive /\n// unarchive / update / delete): each answers with the id of the channel it acted on and\n// whether the chat Worker already enforces the change.\n// One named shape, not five aliases — the lanes deliberately share a result contract, and a\n// divergence must be a visible schema split, never a silent drift between app-local copies.\n// Non-strict (server → client result posture).\nexport const GuildChatChannelLifecycleResultSchema = z.object({\n success: z.literal(true),\n guildChatChannelId: guildChatChannelIdSchema,\n enforcement: GuildChatChannelEnforcementSchema,\n});\nexport type GuildChatChannelLifecycleResult = z.infer<typeof GuildChatChannelLifecycleResultSchema>;\n\n// The Firestore send path serves admin-support threads only; guild channels and invite threads\n// send through the realtime chat (Cloudflare DOs). ONE input for both sides of a support thread:\n// `sendGuildChatMessage` is the thread owner's reply and `adminSendGuildChatMessage` the admin's,\n// so the callable — never a flag in the input — says which side is speaking.\nexport const SendGuildChatMessageInputSchema = z.object({\n threadKind: z.literal('adminSupport'),\n adminDispatchId: adminDispatchIdSchema,\n text: textFieldSchema(SUPPORT_THREAD_MESSAGE_INPUT),\n // No reply pointer: chat has no reply-authoring affordance, so a client could never\n // legitimately send one. `.strict()` therefore REJECTS a client-sent `replyTo`.\n}).strict();\nexport type SendGuildChatMessageInput = z.infer<typeof SendGuildChatMessageInputSchema>;\n\n// Wire result contract for both support-thread send callables — what the CLIENT relies on.\n// The backend core's internal result type extends this with composition-only\n// inline-materialize fields (backend↔backend contract; see runSendGuildChatMessage) —\n// those extra fields may appear on the wire and are not part of the client contract,\n// so this schema is deliberately non-strict.\nexport const SendGuildChatMessageResultSchema = z.object({\n success: z.literal(true),\n messageId: z.string().min(1),\n messageDocPath: z.string().min(1),\n});\nexport type SendGuildChatMessageResult = z.infer<typeof SendGuildChatMessageResultSchema>;\n\n// Subject/initial-text share the admin-dispatch caps (the \"contact admin\" composer enforces them).\nexport const StartAdminSupportThreadInputSchema = z.object({\n subject: textFieldSchema(ADMIN_DISPATCH_SUBJECT_INPUT),\n initialMessage: textFieldSchema(ADMIN_DISPATCH_MESSAGE_INPUT),\n}).strict();\nexport type StartAdminSupportThreadInput = z.infer<typeof StartAdminSupportThreadInputSchema>;\n\n// Authoritative result of startAdminSupportThread — both ids are minted inside the\n// creating transaction. Non-strict (server → client result posture).\nexport const StartAdminSupportThreadResultSchema = z.object({\n success: z.literal(true),\n adminDispatchId: z.string().min(1),\n /** Doc id of the initial conversation message. */\n messageId: z.string().min(1),\n});\nexport type StartAdminSupportThreadResult = z.infer<typeof StartAdminSupportThreadResultSchema>;\n\n// Member-initiated workProject → admin correspondence thread (party-generic dispatch,\n// partyKind 'workProject'). Initiating is a Work ACTION (`adminDispatch.start`, BACKEND-006);\n// the callable enforces the one-open-work-initiated-thread spam guard. `contextRef` is\n// server-validated against the workProject before it is stored.\nexport const StartWorkProjectAdminSupportThreadInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n subject: textFieldSchema(ADMIN_DISPATCH_SUBJECT_INPUT),\n initialMessage: textFieldSchema(ADMIN_DISPATCH_MESSAGE_INPUT),\n contextRef: AdminDispatchContextRefSchema.optional(),\n}).strict();\nexport type StartWorkProjectAdminSupportThreadInput = z.infer<typeof StartWorkProjectAdminSupportThreadInputSchema>;\n\n// Admin-initiated dispatch to a workProject party (mirrors the admin→user dispatch:\n// lands unread for the work's active guildmates, creates NO admin task, uncapped).\nexport const CreateAdminDispatchToWorkProjectInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n subject: textFieldSchema(ADMIN_DISPATCH_SUBJECT_INPUT),\n message: textFieldSchema(ADMIN_DISPATCH_MESSAGE_INPUT),\n contextRef: AdminDispatchContextRefSchema.optional(),\n}).strict();\nexport type CreateAdminDispatchToWorkProjectInput = z.infer<typeof CreateAdminDispatchToWorkProjectInputSchema>;\n\n// Admin-initiated dispatch to a USER party (partyKind 'user' — the thread owner is the target\n// `userId`). Sibling of the workProject dispatch above and the same admin-initiated contract:\n// lands unread in the target user's Messages tray, creates NO admin task. No `contextRef` —\n// that field is validated against a workProject, which a user-party thread has none of.\nexport const CreateAdminDispatchToUserInputSchema = z.object({\n userId: userIdSchema,\n subject: textFieldSchema(ADMIN_DISPATCH_SUBJECT_INPUT),\n message: textFieldSchema(ADMIN_DISPATCH_MESSAGE_INPUT),\n}).strict();\nexport type CreateAdminDispatchToUserInput = z.infer<typeof CreateAdminDispatchToUserInputSchema>;\n\n// CLIENT-CALLED wire contract for the `mintChatGrant` callable.\n// Crosses the backend↔frontend boundary — the web client (and any future mobile/TV\n// client) constructs this payload — so it lives here per the callable-validation\n// convention, not locally in the functions repo. The REAL Firestore authorization\n// check happens in the callable; this schema pins the scope shape.\nexport const ChatGrantInputSchema = z.discriminatedUnion('kind', [\n GuildChatChannelConversationSchema,\n GuildInviteConversationRefSchema,\n z.object({ kind: z.literal('inbox') }).strict(),\n]);\nexport type ChatGrantInput = z.infer<typeof ChatGrantInputSchema>;\n\nexport const UpdateGuildChatChannelInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n guildChatChannelId: guildChatChannelIdSchema,\n channelName: textFieldSchema(GUILD_CHAT_CHANNEL_NAME_INPUT).optional(),\n description: textFieldSchema(GUILD_CHAT_CHANNEL_DESCRIPTION_INPUT).optional(),\n requiredGuildStandings: z.array(z.string().min(1).max(64)).max(20).optional(),\n}).strict();\nexport type UpdateGuildChatChannelInput = z.infer<typeof UpdateGuildChatChannelInputSchema>;\n\n// --- Admin chat moderation callables (review-only) ---\n\n// `adminModerateChatMessage` — queue a DO-owned hide/delete command. A chat message carries\n// no media (files live in the conversation's Conversation Files list), so this is a text-only\n// hide/delete; `.strict()` rejects any asset-id field.\nexport const AdminModerateChatMessageInputSchema = z.object({\n requestId: documentIdSegmentSchema.max(200),\n action: z.enum(['hide', 'delete']),\n messageSeq: z.number().int().nonnegative(),\n expectedMessageRevision: z.number().int().nonnegative(),\n caseId: reportGroupIdSchema.max(200),\n reason: z.string().min(1).max(MAX_CHAT_MODERATION_REASON_LENGTH),\n channel: GuildChatConversationSchema,\n}).strict();\nexport type AdminModerateChatMessageInput = z.infer<typeof AdminModerateChatMessageInputSchema>;\n\n// `adminReadChannelContext` — case-bound admin read of a bounded (≤50 before / ≤50 after)\n// message window around a reported message. Requires a case id + reason; both request and\n// outcome are audited.\nexport const AdminReadChannelContextInputSchema = z.object({\n reportedSeq: z.number().int().nonnegative(),\n caseId: reportGroupIdSchema.max(200),\n reason: z.string().min(1).max(MAX_CHAT_MODERATION_REASON_LENGTH),\n before: z.number().int().min(0).max(50).optional(),\n after: z.number().int().min(0).max(50).optional(),\n channel: GuildChatConversationSchema,\n}).strict();\nexport type AdminReadChannelContextInput = z.infer<typeof AdminReadChannelContextInputSchema>;\n\n/** One message of the context window, as the conversation's room holds it now. */\nexport const ChatContextMessageSchema = z.object({\n seq: z.number().int().nonnegative(),\n senderUid: z.string(),\n text: z.string(),\n createdAt: z.number(),\n /** The message's moderation overlay, or null when none applies. */\n moderationKind: ChatMessageRevisionKindSchema.nullable(),\n /** The message's current revision (0 if never moderated): a moderation action names it as\n * `expectedMessageRevision`, so it cannot apply to a message that changed since the read. */\n moderationRevision: z.number().int().nonnegative(),\n /** The accounts a server-written line names; it renders them by their current names. */\n referencedUids: z.array(z.string().min(1)).optional(),\n});\nexport type ChatContextMessage = z.infer<typeof ChatContextMessageSchema>;\n\n/** The `adminReadChannelContext` answer. Non-strict (server → client result posture). */\nexport const AdminReadChannelContextResultSchema = z.object({\n messages: z.array(ChatContextMessageSchema),\n});\nexport type AdminReadChannelContextResult = z.infer<typeof AdminReadChannelContextResultSchema>;\n\n/** The `mintChatGrant` answer: the signed grant and when it expires (epoch ms) — the client\n * refreshes before then. Non-strict (server → client result posture). */\nexport const MintChatGrantResultSchema = z.object({\n grant: z.string().min(1),\n expiresAt: z.number(),\n});\nexport type MintChatGrantResult = z.infer<typeof MintChatGrantResultSchema>;\n\n\n\n"]}