@ttt-productions/ttt-core 0.79.7 → 0.79.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/schemas/admin.d.ts
CHANGED
|
@@ -346,6 +346,18 @@ export declare const ModerateReportedContentInputSchema: z.ZodObject<{
|
|
|
346
346
|
reason: z.ZodOptional<z.ZodString>;
|
|
347
347
|
}, z.core.$strict>;
|
|
348
348
|
export type ModerateReportedContentInput = z.infer<typeof ModerateReportedContentInputSchema>;
|
|
349
|
+
/** The three targets the in-flow text clear can neutralize — the Work/Realm shells plus a single
|
|
350
|
+
* published hall sub-item. Compile-linked subset of the canonical reportable-item enum. */
|
|
351
|
+
declare const CLEAR_CONTENT_TEXT_TARGET_TYPES: readonly ["work-project", "work-realm", "hall-library-sub-item"];
|
|
352
|
+
export type ClearContentTextTargetType = (typeof CLEAR_CONTENT_TEXT_TARGET_TYPES)[number];
|
|
353
|
+
declare const ClearContentTextFieldSchema: z.ZodEnum<{
|
|
354
|
+
title: "title";
|
|
355
|
+
description: "description";
|
|
356
|
+
content: "content";
|
|
357
|
+
workingTitle: "workingTitle";
|
|
358
|
+
workingDescription: "workingDescription";
|
|
359
|
+
}>;
|
|
360
|
+
export type ClearContentTextField = z.infer<typeof ClearContentTextFieldSchema>;
|
|
349
361
|
export declare const StagedActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
350
362
|
button: z.ZodEnum<{
|
|
351
363
|
hideContent: "hideContent";
|
|
@@ -398,6 +410,22 @@ export declare const StagedActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
398
410
|
"work-realm": "work-realm";
|
|
399
411
|
}>;
|
|
400
412
|
reportedItemId: z.ZodString;
|
|
413
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
414
|
+
button: z.ZodLiteral<"clearContentText">;
|
|
415
|
+
targetType: z.ZodEnum<{
|
|
416
|
+
"hall-library-sub-item": "hall-library-sub-item";
|
|
417
|
+
"work-project": "work-project";
|
|
418
|
+
"work-realm": "work-realm";
|
|
419
|
+
}>;
|
|
420
|
+
reportedItemId: z.ZodString;
|
|
421
|
+
parentItemId: z.ZodOptional<z.ZodString>;
|
|
422
|
+
fields: z.ZodArray<z.ZodEnum<{
|
|
423
|
+
title: "title";
|
|
424
|
+
description: "description";
|
|
425
|
+
content: "content";
|
|
426
|
+
workingTitle: "workingTitle";
|
|
427
|
+
workingDescription: "workingDescription";
|
|
428
|
+
}>>;
|
|
401
429
|
}, z.core.$strict>, z.ZodObject<{
|
|
402
430
|
button: z.ZodLiteral<"tombstoneChat">;
|
|
403
431
|
channel: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -472,6 +500,22 @@ export declare const NormalReportInputSchema: z.ZodObject<{
|
|
|
472
500
|
"work-realm": "work-realm";
|
|
473
501
|
}>;
|
|
474
502
|
reportedItemId: z.ZodString;
|
|
503
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
504
|
+
button: z.ZodLiteral<"clearContentText">;
|
|
505
|
+
targetType: z.ZodEnum<{
|
|
506
|
+
"hall-library-sub-item": "hall-library-sub-item";
|
|
507
|
+
"work-project": "work-project";
|
|
508
|
+
"work-realm": "work-realm";
|
|
509
|
+
}>;
|
|
510
|
+
reportedItemId: z.ZodString;
|
|
511
|
+
parentItemId: z.ZodOptional<z.ZodString>;
|
|
512
|
+
fields: z.ZodArray<z.ZodEnum<{
|
|
513
|
+
title: "title";
|
|
514
|
+
description: "description";
|
|
515
|
+
content: "content";
|
|
516
|
+
workingTitle: "workingTitle";
|
|
517
|
+
workingDescription: "workingDescription";
|
|
518
|
+
}>>;
|
|
475
519
|
}, z.core.$strict>, z.ZodObject<{
|
|
476
520
|
button: z.ZodLiteral<"tombstoneChat">;
|
|
477
521
|
channel: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../src/schemas/admin.ts"],"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AAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAejC,CAAC;AACL,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAgBvB,CAAC;AACZ,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,2BAA2B;;;;;;;;;kBAQ7B,CAAC;AACZ,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAMhF;;uFAEuF;AACvF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;EAcrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;kBAQlC,CAAC;AACZ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;oBAQ1B,CAAC;AACb,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
|
package/dist/schemas/admin.js
CHANGED
|
@@ -367,6 +367,48 @@ const WorkObjectActionSchema = z
|
|
|
367
367
|
reportedItemId: z.string().min(1),
|
|
368
368
|
})
|
|
369
369
|
.strict();
|
|
370
|
+
// --- The in-flow clear-content disposition (staged counterpart of the page-level clear-text
|
|
371
|
+
// callables) ---
|
|
372
|
+
/** The three targets the in-flow text clear can neutralize — the Work/Realm shells plus a single
|
|
373
|
+
* published hall sub-item. Compile-linked subset of the canonical reportable-item enum. */
|
|
374
|
+
const CLEAR_CONTENT_TEXT_TARGET_TYPES = [
|
|
375
|
+
'work-project',
|
|
376
|
+
'work-realm',
|
|
377
|
+
'hall-library-sub-item',
|
|
378
|
+
];
|
|
379
|
+
/** Every field name the staged clear can carry across those three targets — the union of the two
|
|
380
|
+
* canonical clearable owners (`MODERATION_CLEARABLE_TEXT_FIELDS` for the shells,
|
|
381
|
+
* `HALL_CLEARABLE_TEXT_FIELD_NAMES` for the hall family), i.e. the same two sources
|
|
382
|
+
* `ClearWorkProjectTextInputSchema` / `ClearHallContentTextInputSchema` derive from. No field
|
|
383
|
+
* literal is restated here. */
|
|
384
|
+
const CLEAR_CONTENT_TEXT_FIELDS = [
|
|
385
|
+
...MODERATION_CLEARABLE_TEXT_FIELDS.workProject,
|
|
386
|
+
...HALL_CLEARABLE_TEXT_FIELD_NAMES,
|
|
387
|
+
];
|
|
388
|
+
const ClearContentTextFieldSchema = z.enum(CLEAR_CONTENT_TEXT_FIELDS);
|
|
389
|
+
/** Which fields each target legally accepts — projected from those same owners, so a
|
|
390
|
+
* target/field mismatch is refused at the wire instead of reaching a clear runner that would
|
|
391
|
+
* drop it. Enforced by the cross-field refinement on `StagedActionSchema` below. */
|
|
392
|
+
const CLEAR_CONTENT_TEXT_FIELDS_BY_TARGET = {
|
|
393
|
+
'work-project': MODERATION_CLEARABLE_TEXT_FIELDS.workProject,
|
|
394
|
+
'work-realm': MODERATION_CLEARABLE_TEXT_FIELDS.workRealm,
|
|
395
|
+
'hall-library-sub-item': HALL_CLEARABLE_TEXT_FIELD_NAMES,
|
|
396
|
+
};
|
|
397
|
+
/** Per-field text clear — the guided close-out's staged counterpart of the page-level
|
|
398
|
+
* `clearWorkProjectText` / `clearWorkRealmText` / `clearHallContentText` callables (the
|
|
399
|
+
* per-field extension of `forceRetitle`). `reportedItemId` is the workProjectId / workRealmId /
|
|
400
|
+
* sub-item id; `parentItemId` is the parent hall item id, required only for the sub-item target.
|
|
401
|
+
* `workProjectType` is deliberately NOT on the wire — the server re-reads it from the doc (the
|
|
402
|
+
* hall hide-branch precedent). */
|
|
403
|
+
const ClearContentTextActionSchema = z
|
|
404
|
+
.object({
|
|
405
|
+
button: z.literal('clearContentText'),
|
|
406
|
+
targetType: z.enum(CLEAR_CONTENT_TEXT_TARGET_TYPES),
|
|
407
|
+
reportedItemId: z.string().min(1),
|
|
408
|
+
parentItemId: z.string().min(1).optional(),
|
|
409
|
+
fields: z.array(ClearContentTextFieldSchema).min(1),
|
|
410
|
+
})
|
|
411
|
+
.strict();
|
|
370
412
|
/** Chat message tombstone — channel + seq from the report, revision from the live thread-read. */
|
|
371
413
|
const TombstoneChatSchema = z
|
|
372
414
|
.object({
|
|
@@ -379,15 +421,42 @@ const TombstoneChatSchema = z
|
|
|
379
421
|
expectedMessageRevision: z.number().int().nonnegative(),
|
|
380
422
|
})
|
|
381
423
|
.strict();
|
|
382
|
-
export const StagedActionSchema = z
|
|
424
|
+
export const StagedActionSchema = z
|
|
425
|
+
.discriminatedUnion('button', [
|
|
383
426
|
ContentActionSchema,
|
|
384
427
|
WarnUserSchema,
|
|
385
428
|
SuspendOrBanSchema,
|
|
386
429
|
ReinstateUserSchema,
|
|
387
430
|
ForceUsernameResetSchema,
|
|
388
431
|
WorkObjectActionSchema,
|
|
432
|
+
ClearContentTextActionSchema,
|
|
389
433
|
TombstoneChatSchema,
|
|
390
|
-
])
|
|
434
|
+
])
|
|
435
|
+
// The clearContentText arm's two cross-field rules, applied at the union (the
|
|
436
|
+
// SafetyStagedActionSchema pattern below) because no other arm carries these fields:
|
|
437
|
+
// every chosen field must belong to the chosen target's canonical clearable set, and the
|
|
438
|
+
// hall sub-item target must name its parent hall item.
|
|
439
|
+
.superRefine((value, ctx) => {
|
|
440
|
+
if (value.button !== 'clearContentText')
|
|
441
|
+
return;
|
|
442
|
+
const clearable = CLEAR_CONTENT_TEXT_FIELDS_BY_TARGET[value.targetType];
|
|
443
|
+
value.fields.forEach((field, index) => {
|
|
444
|
+
if (!clearable.includes(field)) {
|
|
445
|
+
ctx.addIssue({
|
|
446
|
+
code: 'custom',
|
|
447
|
+
message: `Field '${field}' is not clearable on a '${value.targetType}' target.`,
|
|
448
|
+
path: ['fields', index],
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
});
|
|
452
|
+
if (value.targetType === 'hall-library-sub-item' && !value.parentItemId) {
|
|
453
|
+
ctx.addIssue({
|
|
454
|
+
code: 'custom',
|
|
455
|
+
message: 'parentItemId (the parent hall item id) is required for a hall sub-item target.',
|
|
456
|
+
path: ['parentItemId'],
|
|
457
|
+
});
|
|
458
|
+
}
|
|
459
|
+
});
|
|
391
460
|
export const NormalReportInputSchema = z
|
|
392
461
|
.object({
|
|
393
462
|
caseType: z.literal('normalReport').default('normalReport'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin.js","sourceRoot":"","sources":["../../src/schemas/admin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,uBAAuB,EACvB,iCAAiC,EACjC,iCAAiC,EACjC,mCAAmC,GAEpC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,4BAA4B,EAC5B,0CAA0C,GAC3C,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EACL,gCAAgC,EAChC,+BAA+B,GAChC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,6BAA6B,EAC7B,iCAAiC,EACjC,sCAAsC,EACtC,0BAA0B,EAC1B,6BAA6B,EAC7B,oCAAoC,EACpC,4BAA4B,EAC5B,4BAA4B,EAC5B,kCAAkC,EAClC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ChB,yBAAyB;IACzB,wBAAwB;IACxB,mBAAmB;IACnB,wBAAwB;IACxB,oBAAoB;IACpB,aAAa;IACb,oBAAoB;IACpB,iBAAiB;IACjB,oBAAoB;IACpB,uBAAuB;IACvB,oBAAoB;IACpB,qBAAqB;CACtB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC;KAC9C,MAAM,CAAC;IACN,UAAU,EAAE,0BAA0B;IACtC,0EAA0E;IAC1E,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACjC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,0BAA0B,CAAC;IACzD,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC;KACD,MAAM,EAAE,CAAC;AAGZ,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC;KACvC,MAAM,CAAC;IACN,8DAA8D;IAC9D,UAAU,EAAE,0BAA0B,CAAC,QAAQ,EAAE;IACjD,0EAA0E;IAC1E,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;CACnD,CAAC;KACD,MAAM,EAAE;KACR,OAAO,EAAE,CAAC","sourcesContent":["import { z } from 'zod';\nimport {\n violationIdSchema,\n taskIdSchema,\n workProjectIdSchema,\n hallItemIdSchema,\n workProjectTypeSchema,\n} from './atoms.js';\nimport {\n ReportDispositionSchema,\n ReportDispositionReasonCodeSchema,\n refineReportDispositionReasonCode,\n refineReportDispositionEvidenceRefs,\n type ReportableItemType,\n} from '../doc-schemas/safety/foundation.js';\nimport {\n ChildSafetyAccountRoleSchema,\n ChildSafetyAccountSubjectDispositionSchema,\n} from '../doc-schemas/safety/case.js';\nimport {\n ContentMediaKindSchema,\n MediaServingStatusSchema,\n} from '../doc-schemas/media-assets.js';\nimport { MAX_MANIFEST_NCMEC_RECEIPTS } from '../doc-schemas/safety/evidence.js';\nimport {\n MODERATION_CLEARABLE_TEXT_FIELDS,\n HALL_CLEARABLE_TEXT_FIELD_NAMES,\n} from '../constants/business-content.js';\nimport {\n MAX_WORK_PROJECT_TITLE_LENGTH,\n MAX_ADMIN_DISPATCH_SUBJECT_LENGTH,\n MAX_ADMIN_DISPATCH_INITIAL_TEXT_LENGTH,\n MAX_INTERNAL_REASON_LENGTH,\n MAX_USER_FACING_REASON_LENGTH,\n MAX_SAFETY_RESOLUTION_SUMMARY_LENGTH,\n MAX_SAFETY_ADMIN_NOTE_LENGTH,\n MAX_FUTURE_PLAN_TITLE_LENGTH,\n MAX_FUTURE_PLAN_DESCRIPTION_LENGTH,\n MAX_PLATFORM_RULE_TITLE_LENGTH,\n MAX_PLATFORM_RULE_DESCRIPTION_LENGTH,\n MAX_AGREEMENT_POINT_LENGTH,\n MAX_CONTENT_PAGE_HEADING_LENGTH,\n MAX_CONTENT_PAGE_BODY_LENGTH,\n MAX_TAKE_IT_DOWN_COPY_LENGTH,\n MAX_MAINTENANCE_MESSAGE_LENGTH,\n MAX_APPEAL_REVIEW_NOTES_LENGTH,\n MAX_REQUIRE_RETITLE_REASON_LENGTH,\n MAX_USER_FACING_REASON_DETAIL_LENGTH,\n} from '../constants/business.js';\nimport {\n SAFETY_ACTIONS_CONFIRMATION,\n SAFETY_CASE_REOPEN_CONFIRMATION,\n} from '../constants/safety-confirmation-phrases.js';\n\nexport const CheckoutNextImportantTaskInputSchema = z.object({}).strict();\nexport type CheckoutNextImportantTaskInput = z.infer<typeof CheckoutNextImportantTaskInputSchema>;\n\nexport const GetContentViolationInputSchema = z.object({\n violationId: violationIdSchema,\n}).strict();\nexport type GetContentViolationInput = z.infer<typeof GetContentViolationInputSchema>;\n\n// `taskType` was removed — the server derives it from the task doc; the client copy was\n// ignored (and forgeable). Callers pass only the task id + the extension window.\nexport const MarkWorkLaterInputSchema = z.object({\n taskId: taskIdSchema,\n extendHours: z.union([z.literal(24), z.literal(48)]),\n}).strict();\nexport type MarkWorkLaterInput = z.infer<typeof MarkWorkLaterInputSchema>;\n\n/** The two appeal-review decisions (ONE canonical declaration — shared by the review\n * input and its authoritative result). */\nexport const ContentAppealDecisionSchema = z.enum(['approved', 'denied']);\nexport type ContentAppealDecision = z.infer<typeof ContentAppealDecisionSchema>;\n\nexport const ReviewContentAppealInputSchema = z.object({\n violationId: violationIdSchema,\n taskId: taskIdSchema,\n decision: ContentAppealDecisionSchema,\n adminNotes: z.string().max(MAX_APPEAL_REVIEW_NOTES_LENGTH),\n}).strict();\nexport type ReviewContentAppealInput = z.infer<typeof ReviewContentAppealInputSchema>;\n\n// Authoritative result of reviewContentAppeal. Non-strict (server → client posture).\nexport const ReviewContentAppealResultSchema = z.object({\n success: z.literal(true),\n violationId: violationIdSchema,\n /** Echo of the requested decision (always known — it is the input). */\n decision: ContentAppealDecisionSchema,\n /** The appealing user's uid ('' on the orphaned-task cleanup path, where the\n * underlying violation was already gone and only the stale task was cleared). */\n userId: z.string(),\n /** Operation-receipt audit id — the `admin.contentAppealReviewed` event written in the same\n * transaction. Optional/additive so an older backend that omits it still type-checks. */\n auditEventId: z.string().min(1).optional(),\n});\nexport type ReviewContentAppealResult = z.infer<typeof ReviewContentAppealResultSchema>;\n\n// --- System-doc admin updates ---\n\nconst FuturePlanItemSchema = z.object({\n id: z.string().min(1).max(128),\n title: z.string().min(1).max(MAX_FUTURE_PLAN_TITLE_LENGTH),\n description: z.string().min(1).max(MAX_FUTURE_PLAN_DESCRIPTION_LENGTH),\n order: z.number().int().min(0),\n videoUrl: z.string().url().max(2048).optional(),\n mediaType: z.enum(['video', 'image', 'audio', 'other']).optional(),\n}).strict();\n\nexport const UpdateFuturePlansInputSchema = z.object({\n plans: z.array(FuturePlanItemSchema).max(200),\n}).strict();\nexport type UpdateFuturePlansInput = z.infer<typeof UpdateFuturePlansInputSchema>;\n\nconst RuleSchema = z.object({\n id: z.string().min(1).max(128),\n title: z.string().min(1).max(MAX_PLATFORM_RULE_TITLE_LENGTH),\n description: z.string().min(1).max(MAX_PLATFORM_RULE_DESCRIPTION_LENGTH),\n videoUrl: z.string().url().max(2048).optional(),\n group: z.enum(['generic', 'workProjectType', 'hallWingType', 'workRealm', 'merchandising']).optional(),\n subgroup: z.enum(['Tales', 'Tunes', 'Television', 'entertainment', 'educational', 'newsPolitical']).optional(),\n order: z.number().int().min(0),\n}).strict();\n\nconst AgreementCategorySchema = z.object({\n points: z.array(z.string().min(1).max(MAX_AGREEMENT_POINT_LENGTH)).max(200),\n videoUrl: z.string().url().max(2048).optional(),\n}).strict();\n\nconst AgreementsSchema = z.object({\n tales: AgreementCategorySchema.optional(),\n tunes: AgreementCategorySchema.optional(),\n television: AgreementCategorySchema.optional(),\n}).strict();\n\n// Partial update — admin UI may send only `rules` or only `agreements`.\n// Server merges. At least one field must be present.\nexport const UpdateRulesAndAgreementsInputSchema = z.object({\n rules: z.array(RuleSchema).max(500).optional(),\n agreements: AgreementsSchema.optional(),\n}).strict().refine(\n (data) => data.rules !== undefined || data.agreements !== undefined,\n { message: 'At least one of `rules` or `agreements` must be provided.' },\n);\nexport type UpdateRulesAndAgreementsInput = z.infer<typeof UpdateRulesAndAgreementsInputSchema>;\n\n// --- Content-pages migration (DJ ruling 2026-07-06): per-page update callables ---\n// One callable per page (never a `kind` discriminator): updateTermsPage /\n// updatePrivacyPage / updateTakeItDownPageCopy. The client NEVER sends `version`\n// — the server bumps it atomically on every save.\n\nconst ContentPageSectionInputSchema = z.object({\n id: z.string().min(1).max(128),\n heading: z.string().min(1).max(MAX_CONTENT_PAGE_HEADING_LENGTH),\n level: z.union([z.literal(1), z.literal(2)]),\n // Empty body is LEGAL: a bare divider heading (e.g. terms \"Part 1 — Our\n // Intention\") is real content. The input schema must accept everything the\n // stored ContentPageSectionSchema accepts, or a faithfully-seeded doc becomes\n // unsaveable in the admin editor (found by adversarial review 2026-07-06).\n body: z.string().max(MAX_CONTENT_PAGE_BODY_LENGTH),\n order: z.number().int().min(0),\n}).strict();\n\nexport const UpdateTermsPageInputSchema = z.object({\n sections: z.array(ContentPageSectionInputSchema).min(1).max(300),\n}).strict();\nexport type UpdateTermsPageInput = z.infer<typeof UpdateTermsPageInputSchema>;\n\nexport const UpdatePrivacyPageInputSchema = z.object({\n sections: z.array(ContentPageSectionInputSchema).min(1).max(300),\n}).strict();\nexport type UpdatePrivacyPageInput = z.infer<typeof UpdatePrivacyPageInputSchema>;\n\nexport const UpdateTakeItDownPageCopyInputSchema = z.object({\n strings: z.record(z.string().min(1).max(128), z.string().min(1).max(MAX_TAKE_IT_DOWN_COPY_LENGTH)),\n}).strict().refine(\n (data) => {\n const count = Object.keys(data.strings).length;\n return count >= 1 && count <= 200;\n },\n { message: 'strings must contain between 1 and 200 entries.' },\n);\nexport type UpdateTakeItDownPageCopyInput = z.infer<typeof UpdateTakeItDownPageCopyInputSchema>;\n\nconst AppConfigDocIdSchema = z.literal('app');\n\nexport const UpdateAppConfigInputSchema = z.object({\n docId: AppConfigDocIdSchema,\n data: z.object({\n appVersion: z.string().min(1).max(64).optional(),\n maintenanceMode: z.boolean().optional(),\n maintenanceMessage: z.string().max(MAX_MAINTENANCE_MESSAGE_LENGTH).optional(),\n registrationEnabled: z.boolean().optional(),\n // Runtime abuse throttle: 0 < m <= 1 (tighten-only; 1 = no throttle).\n rateLimitMultiplier: z.number().gt(0).max(1).optional(),\n }).strict().refine(\n (d) => Object.keys(d).length > 0,\n { message: 'data must have at least one field' },\n ),\n}).strict();\nexport type UpdateAppConfigInput = z.infer<typeof UpdateAppConfigInputSchema>;\n\n// --- Admin list mutations ---\n\nconst uidSchema = z.string().min(1).max(128);\n\n/**\n * Wire input for the `updateAdminList` callable in ttt-prod.\n * Used to grant or revoke admin / jrAdmin status on `_systemData/adminList`.\n *\n * All four fields are optional arrays of UIDs. At least one must be non-empty.\n * The callable's core function rejects conflicting input (e.g. same UID in\n * both addAdmins and removeAdmins) with HttpsError invalid-argument.\n */\nexport const UpdateAdminListInputSchema = z.object({\n addAdmins: z.array(uidSchema).optional(),\n removeAdmins: z.array(uidSchema).optional(),\n addJrAdmins: z.array(uidSchema).optional(),\n removeJrAdmins: z.array(uidSchema).optional(),\n})\n .strict()\n .refine(\n (data) =>\n (data.addAdmins?.length ?? 0) +\n (data.removeAdmins?.length ?? 0) +\n (data.addJrAdmins?.length ?? 0) +\n (data.removeJrAdmins?.length ?? 0) >\n 0,\n { message: 'At least one of addAdmins/removeAdmins/addJrAdmins/removeJrAdmins must be non-empty.' },\n );\n\nexport type UpdateAdminListInput = z.infer<typeof UpdateAdminListInputSchema>;\n\n// Authoritative result of updateAdminList — the grant/revoke delta counts computed inside\n// the roster transaction (uids already in their target state are no-ops and not counted).\n// Non-strict (server → client result posture).\nexport const UpdateAdminListResultSchema = z.object({\n success: z.literal(true),\n adminsGranted: z.number().int().nonnegative(),\n adminsRevoked: z.number().int().nonnegative(),\n jrAdminsGranted: z.number().int().nonnegative(),\n jrAdminsRevoked: z.number().int().nonnegative(),\n /** Operation-receipt audit id — the `admin.systemRoleGranted` / `admin.systemRoleRevoked`\n * event(s) key off the same roster transaction. Optional/additive. (No single domain id: a\n * roster edit spans multiple uids, so only the audit id is a meaningful receipt handle.) */\n auditEventId: z.string().min(1).optional(),\n});\nexport type UpdateAdminListResult = z.infer<typeof UpdateAdminListResultSchema>;\n\n// --- Admin moderation: hide / restore / retitle content + Work/Realm objects ---\n\nexport const CheckTrademarkInputSchema = z.object({\n // Primary: the work project's title (franchise-level check).\n workTitle: z.string().min(1).max(MAX_WORK_PROJECT_TITLE_LENGTH),\n // Optional: the sub-item title (chapter, track, episode). Checked secondarily.\n // `.nullish()` (not `.optional()`): the Firebase callable client serializes an\n // undefined argument as JSON null, and the work-view caller passes\n // `subItemTitle: subItem?.title` which is undefined when the sub-item hasn't\n // loaded — that arrives here as null. A bare `.optional()` would 400 on it.\n subItemTitle: z.string().max(MAX_WORK_PROJECT_TITLE_LENGTH).nullish(),\n}).strict();\nexport type CheckTrademarkInput = z.infer<typeof CheckTrademarkInputSchema>;\n\nexport const GetReportedContentDetailInputSchema = z.object({\n reportGroupId: z.string().min(1),\n}).strict();\nexport type GetReportedContentDetailInput = z.infer<typeof GetReportedContentDetailInputSchema>;\n\n// --- getReportedContentDetail result (cross-boundary: produced by the callable in functions/,\n// consumed by the admin report work-view) ---\n\n/** One display-text field of the reported doc, labeled for the review panel. The server returns\n * EVERY configured non-empty text field for the item type (title, description, body, …) in\n * display order — never just the first non-empty one. */\nexport const ReportedTextFieldSchema = z.object({\n /** Raw doc field name (e.g. 'description', 'workingTitle'). */\n field: z.string().min(1),\n /** Human label the panel renders (e.g. 'Description', 'Title'). */\n label: z.string().min(1),\n /** Current live value, trimmed; empty fields are omitted from the array. */\n value: z.string().min(1),\n});\nexport type ReportedTextField = z.infer<typeof ReportedTextFieldSchema>;\n\n/** One media asset referenced by the reported content: id + kind + current serving state\n * (for click-to-reveal) + the server-derived variant key the reveal must request. */\nexport const ReportedMediaAssetSchema = z.object({\n mediaAssetId: z.string().min(1),\n mediaKind: ContentMediaKindSchema.nullable(),\n servingStatus: MediaServingStatusSchema.nullable(),\n /** The variant key the reveal must request for its single display render (image origins split\n * between 'full' and 'main'; video/audio are always 'main'). Null when the asset doc is\n * missing/variant-less. */\n displayVariantKey: z.string().nullable(),\n /** Human label of WHAT this asset is on the reported item (e.g. 'Square cover',\n * 'Track photo — <title>'). Null when the server cannot derive one. */\n label: z.string().nullable(),\n});\nexport type ReportedMediaAsset = z.infer<typeof ReportedMediaAssetSchema>;\n\nexport const GetReportedContentDetailResultSchema = z.object({\n itemType: z.string().min(1),\n reportedItemId: z.string().min(1),\n /** First non-empty display-text field (legacy single-field snapshot; textFields is the\n * complete labeled set). */\n textSnapshot: z.string().nullable(),\n textFields: z.array(ReportedTextFieldSchema),\n mediaAssets: z.array(ReportedMediaAssetSchema),\n /** Whether the reported doc is currently hidden (best-effort, doc-flag based). */\n isHidden: z.boolean().nullable(),\n /** The content owner / uploader uid, when derivable. */\n ownerUid: z.string().nullable(),\n /** The FROZEN report-time snapshot (captured at intake), so the operator sees what was\n * reported even if the author edited the live doc to evade. Null for older reports. */\n reportTimeSnapshot: z.object({\n capturedText: z.string().nullable(),\n capturedMediaAssetIds: z.array(z.string()),\n revision: z.number().nullable(),\n capturedAt: z.number().nullable(),\n }).nullable(),\n});\nexport type GetReportedContentDetailResult = z.infer<typeof GetReportedContentDetailResultSchema>;\n\nexport const HideHallSubItemInputSchema = z.object({\n hallItemId: hallItemIdSchema,\n workProjectType: workProjectTypeSchema,\n subItemId: z.string().min(1),\n reason: z.string().min(1),\n}).strict();\nexport type HideHallSubItemInput = z.infer<typeof HideHallSubItemInputSchema>;\n\nexport const RestoreHallSubItemInputSchema = z.object({\n hallItemId: hallItemIdSchema,\n workProjectType: workProjectTypeSchema,\n subItemId: z.string().min(1),\n}).strict();\nexport type RestoreHallSubItemInput = z.infer<typeof RestoreHallSubItemInputSchema>;\n\nexport const HideWorkProjectInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n reason: z.string().min(1),\n}).strict();\nexport type HideWorkProjectInput = z.infer<typeof HideWorkProjectInputSchema>;\n\nexport const HideWorkRealmInputSchema = z.object({\n workRealmId: z.string().min(1),\n reason: z.string().min(1),\n}).strict();\nexport type HideWorkRealmInput = z.infer<typeof HideWorkRealmInputSchema>;\n\n// `cascadeId` is OPTIONAL: the app backends derive all active cascades for the target when it is\n// omitted, and restore just that one cascade when it is supplied.\nexport const RestoreWorkProjectInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n cascadeId: z.string().min(1).optional(),\n}).strict();\nexport type RestoreWorkProjectInput = z.infer<typeof RestoreWorkProjectInputSchema>;\n\nexport const RestoreWorkRealmInputSchema = z.object({\n workRealmId: z.string().min(1),\n cascadeId: z.string().min(1).optional(),\n}).strict();\nexport type RestoreWorkRealmInput = z.infer<typeof RestoreWorkRealmInputSchema>;\n\n// The `requireWorkProjectRetitle` / `requireWorkRealmRetitle` callables share this base\n// `{ reason }` shape and each `.extend(...)` it with its own id field at parse time.\nexport const RequireRetitleInputSchema = z.object({\n reason: z.string().min(1).max(MAX_REQUIRE_RETITLE_REASON_LENGTH),\n}).strict();\nexport type RequireRetitleInput = z.infer<typeof RequireRetitleInputSchema>;\n\n// --- Page-level \"Clear text (moderation)\" callables (per-field extension of the retitle family) ---\n\n// The clearable SHELL fields (raw doc field names) for the workProject + workRealm contexts.\n// Derived from the canonical clearable-field map — the two shell surfaces share the same fields.\nconst ModerationShellClearFieldSchema = z.enum(MODERATION_CLEARABLE_TEXT_FIELDS.workProject);\nexport type ModerationShellClearField = z.infer<typeof ModerationShellClearFieldSchema>;\n\nexport const ClearWorkProjectTextInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n fields: z.array(ModerationShellClearFieldSchema).min(1),\n reason: z.string().trim().min(1).max(MAX_REQUIRE_RETITLE_REASON_LENGTH),\n}).strict();\nexport type ClearWorkProjectTextInput = z.infer<typeof ClearWorkProjectTextInputSchema>;\n\nexport const ClearWorkRealmTextInputSchema = z.object({\n workRealmId: z.string().min(1),\n fields: z.array(ModerationShellClearFieldSchema).min(1),\n reason: z.string().trim().min(1).max(MAX_REQUIRE_RETITLE_REASON_LENGTH),\n}).strict();\nexport type ClearWorkRealmTextInput = z.infer<typeof ClearWorkRealmTextInputSchema>;\n\n// The clearable TEXT fields across the whole hall content family — derived from the canonical\n// map (union of every hall surface's fields), never restated literals.\nconst HallClearFieldSchema = z.enum(HALL_CLEARABLE_TEXT_FIELD_NAMES);\nexport type HallClearField = z.infer<typeof HallClearFieldSchema>;\n\nexport const ClearHallContentTextInputSchema = z.object({\n hallItemId: hallItemIdSchema,\n workProjectType: workProjectTypeSchema,\n subItemId: z.string().min(1).optional(),\n fields: z.array(HallClearFieldSchema).min(1),\n reason: z.string().trim().min(1).max(MAX_REQUIRE_RETITLE_REASON_LENGTH),\n}).strict();\nexport type ClearHallContentTextInput = z.infer<typeof ClearHallContentTextInputSchema>;\n\n// --- getLatestHideCascade — resolve the latest hide-cascade id for a Work/Realm ---\n\nexport const GetLatestHideCascadeInputSchema = z.object({\n entityId: z.string().min(1),\n targetType: z.enum(['work-project', 'work-realm']),\n}).strict();\nexport type GetLatestHideCascadeInput = z.infer<typeof GetLatestHideCascadeInputSchema>;\n\n// --- moderateReportedContent — hide / restore / soft perma-remove an individual reported item ---\n\n// The single-item content-action target set (SUBSET of ReportableItemType — excludes the\n// close-out-only hall-library-sub-item).\nconst MODERATE_REPORTED_CONTENT_TARGET_TYPES = [\n 'square-streetz-post',\n 'audition',\n 'audition-entry',\n 'commission-listing',\n 'commission-proposal',\n 'work-asset',\n 'profile-picture',\n 'hall-library-item',\n 'craft-skill',\n // Conversation File — the hide/restore/remove action targets the file owner record +\n // its mediaAsset (the `work-asset` shape), never a chat message.\n 'conversation-file',\n] as const satisfies readonly ReportableItemType[];\n\nexport const ModerateReportedContentInputSchema = z.object({\n reportGroupId: z.string().min(1),\n targetType: z.enum(MODERATE_REPORTED_CONTENT_TARGET_TYPES),\n reportedItemId: z.string().min(1),\n parentItemId: z.string().min(1).optional(),\n action: z.enum(['hide', 'restore', 'remove']),\n // [EUAS-023] A destructive action (hide/remove) MUST carry a reason; restore is a reversal.\n reason: z.string().trim().min(1).max(MAX_INTERNAL_REASON_LENGTH).optional(),\n})\n .strict()\n .superRefine((val, ctx) => {\n if ((val.action === 'hide' || val.action === 'remove') && !val.reason) {\n ctx.addIssue({\n code: 'custom',\n message: 'A reason is required to hide or remove content.',\n path: ['reason'],\n });\n }\n });\nexport type ModerateReportedContentInput = z.infer<typeof ModerateReportedContentInputSchema>;\n\n// --- resolveAdminTask — the ONE guided close-out for EVERY admin case type ---\n\n// [EUAS-005] The content-action target set ALSO accepts hall-library-sub-item (hide/restore only),\n// which routes to the dedicated `runSetHallSubItemHidden` core (not `runModerateReportedContent`).\nconst CONTENT_ACTION_TARGET_TYPES = [\n 'square-streetz-post',\n 'audition',\n 'audition-entry',\n 'commission-listing',\n 'commission-proposal',\n 'work-asset',\n 'profile-picture',\n 'hall-library-item',\n 'craft-skill',\n 'hall-library-sub-item',\n // Conversation File — same content action as `work-asset`, routed at the file record.\n 'conversation-file',\n] as const satisfies readonly ReportableItemType[];\n\nconst ContentActionSchema = z\n .object({\n button: z.enum(['hideContent', 'restoreContent', 'permaRemoveContent']),\n targetType: z.enum(CONTENT_ACTION_TARGET_TYPES),\n reportedItemId: z.string().min(1),\n parentItemId: z.string().min(1).optional(),\n })\n .strict();\n\nconst WarnUserSchema = z\n .object({\n button: z.literal('warnUser'),\n userId: z.string().min(1),\n // A warning IS an admin dispatch (resolveAdminTask → runCreateAdminDispatchToUser),\n // so it shares the dispatch subject/body caps.\n subject: z.string().trim().min(1).max(MAX_ADMIN_DISPATCH_SUBJECT_LENGTH),\n message: z.string().trim().min(1).max(MAX_ADMIN_DISPATCH_INITIAL_TEXT_LENGTH),\n })\n .strict();\n\nconst SuspendOrBanSchema = z\n .object({\n button: z.enum(['suspendUser', 'banUser']),\n userId: z.string().min(1),\n reason: z.string().trim().min(1).max(MAX_INTERNAL_REASON_LENGTH),\n })\n .strict();\n\nconst ReinstateUserSchema = z\n .object({ button: z.literal('reinstateUser'), userId: z.string().min(1), reason: z.string().trim().max(MAX_INTERNAL_REASON_LENGTH).optional() })\n .strict();\n\nconst ForceUsernameResetSchema = z\n .object({ button: z.literal('forceUsernameReset'), userId: z.string().min(1), reason: z.string().trim().min(1).max(MAX_INTERNAL_REASON_LENGTH).optional() })\n .strict();\n\n/** Whole-object Work/Realm remedies — `reportedItemId` is the workProjectId / workRealmId. */\nconst WorkObjectActionSchema = z\n .object({\n button: z.enum(['hideWorkObject', 'restoreWorkObject', 'forceRetitle']),\n targetType: z.enum(['work-project', 'work-realm']),\n reportedItemId: z.string().min(1),\n })\n .strict();\n\n/** Chat message tombstone — channel + seq from the report, revision from the live thread-read. */\nconst TombstoneChatSchema = z\n .object({\n button: z.literal('tombstoneChat'),\n channel: z.discriminatedUnion('kind', [\n z.object({ kind: z.literal('channel'), workProjectId: z.string().min(1), guildChatChannelId: z.string().min(1) }).strict(),\n z.object({ kind: z.literal('invite'), guildInviteId: z.string().min(1) }).strict(),\n ]),\n messageSeq: z.number().int().nonnegative(),\n expectedMessageRevision: z.number().int().nonnegative(),\n })\n .strict();\n\nexport const StagedActionSchema = z.discriminatedUnion('button', [\n ContentActionSchema,\n WarnUserSchema,\n SuspendOrBanSchema,\n ReinstateUserSchema,\n ForceUsernameResetSchema,\n WorkObjectActionSchema,\n TombstoneChatSchema,\n]);\nexport type StagedAction = z.infer<typeof StagedActionSchema>;\n\nexport const NormalReportInputSchema = z\n .object({\n caseType: z.literal('normalReport').default('normalReport'),\n taskId: z.string().min(1),\n outcome: z.enum(['founded', 'unfounded']),\n resolutionSummary: z.string().trim().min(1).max(MAX_SAFETY_RESOLUTION_SUMMARY_LENGTH),\n actions: z.array(StagedActionSchema).max(16).default([]),\n userFacingReasonCode: z.string().trim().min(1).max(128).optional(),\n userFacingReasonDetail: z.string().trim().max(MAX_USER_FACING_REASON_DETAIL_LENGTH).optional(),\n adminNote: z.string().trim().max(MAX_SAFETY_ADMIN_NOTE_LENGTH).optional(),\n })\n .strict();\nexport type ResolveAdminTaskInput = z.infer<typeof NormalReportInputSchema>;\n\nconst SafetyDispositionActionSchema = z\n .object({\n button: z.literal('setReportDisposition'),\n // Derived from the ONE canonical disposition enum — 'undetermined' is the initial\n // state, never an operator-settable target, so it is excluded (not re-declared).\n disposition: ReportDispositionSchema.exclude(['undetermined']),\n dispositionReasonCode: ReportDispositionReasonCodeSchema,\n // Derived from the ONE receipts-cap constant (doc-schemas/safety/evidence.ts) — the same\n // bound the callable + the embedded SetReportDispositionInputV1Schema use. No field-level min:\n // the reportRequired⇒non-empty rule lives in the shared cross-field refinement below, so every\n // other disposition may legally stage this action with no evidence revealed.\n evidenceRefs: z.array(z.string().min(1)).max(MAX_MANIFEST_NCMEC_RECEIPTS),\n expectedRevision: z.number().int().nonnegative(),\n })\n .strict();\n\nconst QuarantineActionSchema = z.object({ button: z.literal('quarantinePreserveFile') }).strict();\n\n// [C-01/EUAS-002] No client-supplied requestId — the linked statutory request id(s) are derived\n// SERVER-SIDE from the case's `requestLinks` inside `enqueueNciiRemovalForCase`.\nconst HashRemoveActionSchema = z.object({ button: z.literal('hashRemoveFile') }).strict();\n\nconst SafetyAccountActionSchema = z\n .object({\n button: z.enum(['suspendUser', 'banUser', 'reinstateUser']),\n targetUid: z.string().min(1),\n reasonInternal: z.string().trim().min(4).max(MAX_INTERNAL_REASON_LENGTH),\n reasonUserFacing: z.string().trim().min(1).max(MAX_USER_FACING_REASON_LENGTH),\n role: ChildSafetyAccountRoleSchema,\n subjectDisposition: ChildSafetyAccountSubjectDispositionSchema,\n })\n .strict();\n\nexport const SafetyStagedActionSchema = z\n .discriminatedUnion('button', [\n SafetyDispositionActionSchema,\n QuarantineActionSchema,\n HashRemoveActionSchema,\n SafetyAccountActionSchema,\n ])\n // The setReportDisposition arm reuses the ONE canonical cross-field rules (foundation.ts) via the\n // shared refinements — never re-declaring them here: the disposition↔reason pairing AND the\n // reportRequired⇒evidence-present rule. Other arms carry no such fields.\n .superRefine((value, ctx) => {\n if (value.button === 'setReportDisposition') {\n refineReportDispositionReasonCode(value, ctx);\n refineReportDispositionEvidenceRefs(value, ctx);\n }\n });\nexport type SafetyStagedAction = z.infer<typeof SafetyStagedActionSchema>;\n\nexport const SafetyCaseInputSchema = z\n .object({\n caseType: z.enum(['csam', 'ncii']),\n caseId: z.string().min(1),\n outcome: z.enum(['founded', 'unfounded']),\n resolutionSummary: z.string().trim().min(1).max(MAX_SAFETY_RESOLUTION_SUMMARY_LENGTH),\n actions: z.array(SafetyStagedActionSchema).max(16).default([]),\n adminNote: z.string().trim().max(MAX_SAFETY_ADMIN_NOTE_LENGTH).optional(),\n // [EUAS-017] Optimistic-concurrency token (`childSafetyCaseList.revision` / `nciiCases.revision`).\n // The close is rejected if the case changed since the operator loaded it — concurrent stale closes\n // can't silently overwrite. Optional for backward compatibility; the console always supplies it.\n expectedRevision: z.number().int().nonnegative().optional(),\n // Interim reauth: a single explicit typed confirmation for the privileged safety actions,\n // standing in for the passkey two-step until [H-17]. The callable is full-admin gated.\n confirmation: z.literal(SAFETY_ACTIONS_CONFIRMATION),\n })\n .strict();\nexport type SafetyCaseInput = z.infer<typeof SafetyCaseInputSchema>;\n\nexport const ReopenSafetyCaseInputSchema = z\n .object({\n caseType: z.enum(['csam', 'ncii']),\n caseId: z.string().min(1),\n reasonInternal: z.string().trim().min(4).max(MAX_INTERNAL_REASON_LENGTH),\n expectedRevision: z.number().int().nonnegative().optional(),\n confirmation: z.literal(SAFETY_CASE_REOPEN_CONFIRMATION),\n })\n .strict();\nexport type ReopenSafetyCaseInput = z.infer<typeof ReopenSafetyCaseInputSchema>;\n\n// ---------------------------------------------------------------------------\n// Dead-letter operations — adminReplayDeadLetter + getDeadLetters (Ops Repairs).\n// ---------------------------------------------------------------------------\n\n/** Every ledger the dead-letter replay callable supports. `hallSubItemEdgeSync`\n * rows live at a 4-segment nested path, so their docId IS the full document path\n * (the callable splits it); every other lane is the flat [collection, docId] tuple. */\nexport const DeadLetterCollectionSchema = z.enum([\n 'chatSyncEvents',\n 'chatAdminActionCommands',\n 'notificationDeliveries',\n 'chatMessageOutbox',\n 'squareAnnouncementJobs',\n 'chatSyncFanoutJobs',\n 'mediaAssets',\n 'quarantineSagaJobs',\n 'nciiRemovalJobs',\n 'safetyEvidenceJobs',\n 'accountActionCommands',\n 'activeReportGroups',\n 'hallSubItemEdgeSync',\n]);\nexport type DeadLetterCollection = z.infer<typeof DeadLetterCollectionSchema>;\n\nexport const AdminReplayDeadLetterInputSchema = z\n .object({\n collection: DeadLetterCollectionSchema,\n // Structural id bound (hallSubItemEdgeSync docIds are full nested paths).\n docId: z.string().min(1).max(200),\n reason: z.string().min(1).max(MAX_INTERNAL_REASON_LENGTH),\n dryRun: z.boolean().optional(),\n })\n .strict();\nexport type AdminReplayDeadLetterInput = z.infer<typeof AdminReplayDeadLetterInputSchema>;\n\nexport const GetDeadLettersInputSchema = z\n .object({\n /** Restrict to one ledger; absent = all supported ledgers. */\n collection: DeadLetterCollectionSchema.optional(),\n /** Per-ledger row cap (the callable's own ceiling applies regardless). */\n limit: z.number().int().min(1).max(200).optional(),\n })\n .strict()\n .nullish();\nexport type GetDeadLettersInput = z.infer<typeof GetDeadLettersInputSchema>;\n\n\n"]}
|
|
1
|
+
{"version":3,"file":"admin.js","sourceRoot":"","sources":["../../src/schemas/admin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,uBAAuB,EACvB,iCAAiC,EACjC,iCAAiC,EACjC,mCAAmC,GAEpC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,4BAA4B,EAC5B,0CAA0C,GAC3C,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EACL,gCAAgC,EAChC,+BAA+B,GAChC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,6BAA6B,EAC7B,iCAAiC,EACjC,sCAAsC,EACtC,0BAA0B,EAC1B,6BAA6B,EAC7B,oCAAoC,EACpC,4BAA4B,EAC5B,4BAA4B,EAC5B,kCAAkC,EAClC,8BAA8B,EAC9B,oCAAoC,EACpC,0BAA0B,EAC1B,+BAA+B,EAC/B,4BAA4B,EAC5B,4BAA4B,EAC5B,8BAA8B,EAC9B,8BAA8B,EAC9B,iCAAiC,EACjC,oCAAoC,GACrC,MAAM,0BAA0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C,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;CACnD,CAAC;KACD,MAAM,EAAE;KACR,OAAO,EAAE,CAAC","sourcesContent":["import { z } from 'zod';\nimport {\n violationIdSchema,\n taskIdSchema,\n workProjectIdSchema,\n hallItemIdSchema,\n workProjectTypeSchema,\n} from './atoms.js';\nimport {\n ReportDispositionSchema,\n ReportDispositionReasonCodeSchema,\n refineReportDispositionReasonCode,\n refineReportDispositionEvidenceRefs,\n type ReportableItemType,\n} from '../doc-schemas/safety/foundation.js';\nimport {\n ChildSafetyAccountRoleSchema,\n ChildSafetyAccountSubjectDispositionSchema,\n} from '../doc-schemas/safety/case.js';\nimport {\n ContentMediaKindSchema,\n MediaServingStatusSchema,\n} from '../doc-schemas/media-assets.js';\nimport { MAX_MANIFEST_NCMEC_RECEIPTS } from '../doc-schemas/safety/evidence.js';\nimport {\n MODERATION_CLEARABLE_TEXT_FIELDS,\n HALL_CLEARABLE_TEXT_FIELD_NAMES,\n} from '../constants/business-content.js';\nimport {\n MAX_WORK_PROJECT_TITLE_LENGTH,\n MAX_ADMIN_DISPATCH_SUBJECT_LENGTH,\n MAX_ADMIN_DISPATCH_INITIAL_TEXT_LENGTH,\n MAX_INTERNAL_REASON_LENGTH,\n MAX_USER_FACING_REASON_LENGTH,\n MAX_SAFETY_RESOLUTION_SUMMARY_LENGTH,\n MAX_SAFETY_ADMIN_NOTE_LENGTH,\n MAX_FUTURE_PLAN_TITLE_LENGTH,\n MAX_FUTURE_PLAN_DESCRIPTION_LENGTH,\n MAX_PLATFORM_RULE_TITLE_LENGTH,\n MAX_PLATFORM_RULE_DESCRIPTION_LENGTH,\n MAX_AGREEMENT_POINT_LENGTH,\n MAX_CONTENT_PAGE_HEADING_LENGTH,\n MAX_CONTENT_PAGE_BODY_LENGTH,\n MAX_TAKE_IT_DOWN_COPY_LENGTH,\n MAX_MAINTENANCE_MESSAGE_LENGTH,\n MAX_APPEAL_REVIEW_NOTES_LENGTH,\n MAX_REQUIRE_RETITLE_REASON_LENGTH,\n MAX_USER_FACING_REASON_DETAIL_LENGTH,\n} from '../constants/business.js';\nimport {\n SAFETY_ACTIONS_CONFIRMATION,\n SAFETY_CASE_REOPEN_CONFIRMATION,\n} from '../constants/safety-confirmation-phrases.js';\n\nexport const CheckoutNextImportantTaskInputSchema = z.object({}).strict();\nexport type CheckoutNextImportantTaskInput = z.infer<typeof CheckoutNextImportantTaskInputSchema>;\n\nexport const GetContentViolationInputSchema = z.object({\n violationId: violationIdSchema,\n}).strict();\nexport type GetContentViolationInput = z.infer<typeof GetContentViolationInputSchema>;\n\n// `taskType` was removed — the server derives it from the task doc; the client copy was\n// ignored (and forgeable). Callers pass only the task id + the extension window.\nexport const MarkWorkLaterInputSchema = z.object({\n taskId: taskIdSchema,\n extendHours: z.union([z.literal(24), z.literal(48)]),\n}).strict();\nexport type MarkWorkLaterInput = z.infer<typeof MarkWorkLaterInputSchema>;\n\n/** The two appeal-review decisions (ONE canonical declaration — shared by the review\n * input and its authoritative result). */\nexport const ContentAppealDecisionSchema = z.enum(['approved', 'denied']);\nexport type ContentAppealDecision = z.infer<typeof ContentAppealDecisionSchema>;\n\nexport const ReviewContentAppealInputSchema = z.object({\n violationId: violationIdSchema,\n taskId: taskIdSchema,\n decision: ContentAppealDecisionSchema,\n adminNotes: z.string().max(MAX_APPEAL_REVIEW_NOTES_LENGTH),\n}).strict();\nexport type ReviewContentAppealInput = z.infer<typeof ReviewContentAppealInputSchema>;\n\n// Authoritative result of reviewContentAppeal. Non-strict (server → client posture).\nexport const ReviewContentAppealResultSchema = z.object({\n success: z.literal(true),\n violationId: violationIdSchema,\n /** Echo of the requested decision (always known — it is the input). */\n decision: ContentAppealDecisionSchema,\n /** The appealing user's uid ('' on the orphaned-task cleanup path, where the\n * underlying violation was already gone and only the stale task was cleared). */\n userId: z.string(),\n /** Operation-receipt audit id — the `admin.contentAppealReviewed` event written in the same\n * transaction. Optional/additive so an older backend that omits it still type-checks. */\n auditEventId: z.string().min(1).optional(),\n});\nexport type ReviewContentAppealResult = z.infer<typeof ReviewContentAppealResultSchema>;\n\n// --- System-doc admin updates ---\n\nconst FuturePlanItemSchema = z.object({\n id: z.string().min(1).max(128),\n title: z.string().min(1).max(MAX_FUTURE_PLAN_TITLE_LENGTH),\n description: z.string().min(1).max(MAX_FUTURE_PLAN_DESCRIPTION_LENGTH),\n order: z.number().int().min(0),\n videoUrl: z.string().url().max(2048).optional(),\n mediaType: z.enum(['video', 'image', 'audio', 'other']).optional(),\n}).strict();\n\nexport const UpdateFuturePlansInputSchema = z.object({\n plans: z.array(FuturePlanItemSchema).max(200),\n}).strict();\nexport type UpdateFuturePlansInput = z.infer<typeof UpdateFuturePlansInputSchema>;\n\nconst RuleSchema = z.object({\n id: z.string().min(1).max(128),\n title: z.string().min(1).max(MAX_PLATFORM_RULE_TITLE_LENGTH),\n description: z.string().min(1).max(MAX_PLATFORM_RULE_DESCRIPTION_LENGTH),\n videoUrl: z.string().url().max(2048).optional(),\n group: z.enum(['generic', 'workProjectType', 'hallWingType', 'workRealm', 'merchandising']).optional(),\n subgroup: z.enum(['Tales', 'Tunes', 'Television', 'entertainment', 'educational', 'newsPolitical']).optional(),\n order: z.number().int().min(0),\n}).strict();\n\nconst AgreementCategorySchema = z.object({\n points: z.array(z.string().min(1).max(MAX_AGREEMENT_POINT_LENGTH)).max(200),\n videoUrl: z.string().url().max(2048).optional(),\n}).strict();\n\nconst AgreementsSchema = z.object({\n tales: AgreementCategorySchema.optional(),\n tunes: AgreementCategorySchema.optional(),\n television: AgreementCategorySchema.optional(),\n}).strict();\n\n// Partial update — admin UI may send only `rules` or only `agreements`.\n// Server merges. At least one field must be present.\nexport const UpdateRulesAndAgreementsInputSchema = z.object({\n rules: z.array(RuleSchema).max(500).optional(),\n agreements: AgreementsSchema.optional(),\n}).strict().refine(\n (data) => data.rules !== undefined || data.agreements !== undefined,\n { message: 'At least one of `rules` or `agreements` must be provided.' },\n);\nexport type UpdateRulesAndAgreementsInput = z.infer<typeof UpdateRulesAndAgreementsInputSchema>;\n\n// --- Content-pages migration (DJ ruling 2026-07-06): per-page update callables ---\n// One callable per page (never a `kind` discriminator): updateTermsPage /\n// updatePrivacyPage / updateTakeItDownPageCopy. The client NEVER sends `version`\n// — the server bumps it atomically on every save.\n\nconst ContentPageSectionInputSchema = z.object({\n id: z.string().min(1).max(128),\n heading: z.string().min(1).max(MAX_CONTENT_PAGE_HEADING_LENGTH),\n level: z.union([z.literal(1), z.literal(2)]),\n // Empty body is LEGAL: a bare divider heading (e.g. terms \"Part 1 — Our\n // Intention\") is real content. The input schema must accept everything the\n // stored ContentPageSectionSchema accepts, or a faithfully-seeded doc becomes\n // unsaveable in the admin editor (found by adversarial review 2026-07-06).\n body: z.string().max(MAX_CONTENT_PAGE_BODY_LENGTH),\n order: z.number().int().min(0),\n}).strict();\n\nexport const UpdateTermsPageInputSchema = z.object({\n sections: z.array(ContentPageSectionInputSchema).min(1).max(300),\n}).strict();\nexport type UpdateTermsPageInput = z.infer<typeof UpdateTermsPageInputSchema>;\n\nexport const UpdatePrivacyPageInputSchema = z.object({\n sections: z.array(ContentPageSectionInputSchema).min(1).max(300),\n}).strict();\nexport type UpdatePrivacyPageInput = z.infer<typeof UpdatePrivacyPageInputSchema>;\n\nexport const UpdateTakeItDownPageCopyInputSchema = z.object({\n strings: z.record(z.string().min(1).max(128), z.string().min(1).max(MAX_TAKE_IT_DOWN_COPY_LENGTH)),\n}).strict().refine(\n (data) => {\n const count = Object.keys(data.strings).length;\n return count >= 1 && count <= 200;\n },\n { message: 'strings must contain between 1 and 200 entries.' },\n);\nexport type UpdateTakeItDownPageCopyInput = z.infer<typeof UpdateTakeItDownPageCopyInputSchema>;\n\nconst AppConfigDocIdSchema = z.literal('app');\n\nexport const UpdateAppConfigInputSchema = z.object({\n docId: AppConfigDocIdSchema,\n data: z.object({\n appVersion: z.string().min(1).max(64).optional(),\n maintenanceMode: z.boolean().optional(),\n maintenanceMessage: z.string().max(MAX_MAINTENANCE_MESSAGE_LENGTH).optional(),\n registrationEnabled: z.boolean().optional(),\n // Runtime abuse throttle: 0 < m <= 1 (tighten-only; 1 = no throttle).\n rateLimitMultiplier: z.number().gt(0).max(1).optional(),\n }).strict().refine(\n (d) => Object.keys(d).length > 0,\n { message: 'data must have at least one field' },\n ),\n}).strict();\nexport type UpdateAppConfigInput = z.infer<typeof UpdateAppConfigInputSchema>;\n\n// --- Admin list mutations ---\n\nconst uidSchema = z.string().min(1).max(128);\n\n/**\n * Wire input for the `updateAdminList` callable in ttt-prod.\n * Used to grant or revoke admin / jrAdmin status on `_systemData/adminList`.\n *\n * All four fields are optional arrays of UIDs. At least one must be non-empty.\n * The callable's core function rejects conflicting input (e.g. same UID in\n * both addAdmins and removeAdmins) with HttpsError invalid-argument.\n */\nexport const UpdateAdminListInputSchema = z.object({\n addAdmins: z.array(uidSchema).optional(),\n removeAdmins: z.array(uidSchema).optional(),\n addJrAdmins: z.array(uidSchema).optional(),\n removeJrAdmins: z.array(uidSchema).optional(),\n})\n .strict()\n .refine(\n (data) =>\n (data.addAdmins?.length ?? 0) +\n (data.removeAdmins?.length ?? 0) +\n (data.addJrAdmins?.length ?? 0) +\n (data.removeJrAdmins?.length ?? 0) >\n 0,\n { message: 'At least one of addAdmins/removeAdmins/addJrAdmins/removeJrAdmins must be non-empty.' },\n );\n\nexport type UpdateAdminListInput = z.infer<typeof UpdateAdminListInputSchema>;\n\n// Authoritative result of updateAdminList — the grant/revoke delta counts computed inside\n// the roster transaction (uids already in their target state are no-ops and not counted).\n// Non-strict (server → client result posture).\nexport const UpdateAdminListResultSchema = z.object({\n success: z.literal(true),\n adminsGranted: z.number().int().nonnegative(),\n adminsRevoked: z.number().int().nonnegative(),\n jrAdminsGranted: z.number().int().nonnegative(),\n jrAdminsRevoked: z.number().int().nonnegative(),\n /** Operation-receipt audit id — the `admin.systemRoleGranted` / `admin.systemRoleRevoked`\n * event(s) key off the same roster transaction. Optional/additive. (No single domain id: a\n * roster edit spans multiple uids, so only the audit id is a meaningful receipt handle.) */\n auditEventId: z.string().min(1).optional(),\n});\nexport type UpdateAdminListResult = z.infer<typeof UpdateAdminListResultSchema>;\n\n// --- Admin moderation: hide / restore / retitle content + Work/Realm objects ---\n\nexport const CheckTrademarkInputSchema = z.object({\n // Primary: the work project's title (franchise-level check).\n workTitle: z.string().min(1).max(MAX_WORK_PROJECT_TITLE_LENGTH),\n // Optional: the sub-item title (chapter, track, episode). Checked secondarily.\n // `.nullish()` (not `.optional()`): the Firebase callable client serializes an\n // undefined argument as JSON null, and the work-view caller passes\n // `subItemTitle: subItem?.title` which is undefined when the sub-item hasn't\n // loaded — that arrives here as null. A bare `.optional()` would 400 on it.\n subItemTitle: z.string().max(MAX_WORK_PROJECT_TITLE_LENGTH).nullish(),\n}).strict();\nexport type CheckTrademarkInput = z.infer<typeof CheckTrademarkInputSchema>;\n\nexport const GetReportedContentDetailInputSchema = z.object({\n reportGroupId: z.string().min(1),\n}).strict();\nexport type GetReportedContentDetailInput = z.infer<typeof GetReportedContentDetailInputSchema>;\n\n// --- getReportedContentDetail result (cross-boundary: produced by the callable in functions/,\n// consumed by the admin report work-view) ---\n\n/** One display-text field of the reported doc, labeled for the review panel. The server returns\n * EVERY configured non-empty text field for the item type (title, description, body, …) in\n * display order — never just the first non-empty one. */\nexport const ReportedTextFieldSchema = z.object({\n /** Raw doc field name (e.g. 'description', 'workingTitle'). */\n field: z.string().min(1),\n /** Human label the panel renders (e.g. 'Description', 'Title'). */\n label: z.string().min(1),\n /** Current live value, trimmed; empty fields are omitted from the array. */\n value: z.string().min(1),\n});\nexport type ReportedTextField = z.infer<typeof ReportedTextFieldSchema>;\n\n/** One media asset referenced by the reported content: id + kind + current serving state\n * (for click-to-reveal) + the server-derived variant key the reveal must request. */\nexport const ReportedMediaAssetSchema = z.object({\n mediaAssetId: z.string().min(1),\n mediaKind: ContentMediaKindSchema.nullable(),\n servingStatus: MediaServingStatusSchema.nullable(),\n /** The variant key the reveal must request for its single display render (image origins split\n * between 'full' and 'main'; video/audio are always 'main'). Null when the asset doc is\n * missing/variant-less. */\n displayVariantKey: z.string().nullable(),\n /** Human label of WHAT this asset is on the reported item (e.g. 'Square cover',\n * 'Track photo — <title>'). Null when the server cannot derive one. */\n label: z.string().nullable(),\n});\nexport type ReportedMediaAsset = z.infer<typeof ReportedMediaAssetSchema>;\n\nexport const GetReportedContentDetailResultSchema = z.object({\n itemType: z.string().min(1),\n reportedItemId: z.string().min(1),\n /** First non-empty display-text field (legacy single-field snapshot; textFields is the\n * complete labeled set). */\n textSnapshot: z.string().nullable(),\n textFields: z.array(ReportedTextFieldSchema),\n mediaAssets: z.array(ReportedMediaAssetSchema),\n /** Whether the reported doc is currently hidden (best-effort, doc-flag based). */\n isHidden: z.boolean().nullable(),\n /** The content owner / uploader uid, when derivable. */\n ownerUid: z.string().nullable(),\n /** The FROZEN report-time snapshot (captured at intake), so the operator sees what was\n * reported even if the author edited the live doc to evade. Null for older reports. */\n reportTimeSnapshot: z.object({\n capturedText: z.string().nullable(),\n capturedMediaAssetIds: z.array(z.string()),\n revision: z.number().nullable(),\n capturedAt: z.number().nullable(),\n }).nullable(),\n});\nexport type GetReportedContentDetailResult = z.infer<typeof GetReportedContentDetailResultSchema>;\n\nexport const HideHallSubItemInputSchema = z.object({\n hallItemId: hallItemIdSchema,\n workProjectType: workProjectTypeSchema,\n subItemId: z.string().min(1),\n reason: z.string().min(1),\n}).strict();\nexport type HideHallSubItemInput = z.infer<typeof HideHallSubItemInputSchema>;\n\nexport const RestoreHallSubItemInputSchema = z.object({\n hallItemId: hallItemIdSchema,\n workProjectType: workProjectTypeSchema,\n subItemId: z.string().min(1),\n}).strict();\nexport type RestoreHallSubItemInput = z.infer<typeof RestoreHallSubItemInputSchema>;\n\nexport const HideWorkProjectInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n reason: z.string().min(1),\n}).strict();\nexport type HideWorkProjectInput = z.infer<typeof HideWorkProjectInputSchema>;\n\nexport const HideWorkRealmInputSchema = z.object({\n workRealmId: z.string().min(1),\n reason: z.string().min(1),\n}).strict();\nexport type HideWorkRealmInput = z.infer<typeof HideWorkRealmInputSchema>;\n\n// `cascadeId` is OPTIONAL: the app backends derive all active cascades for the target when it is\n// omitted, and restore just that one cascade when it is supplied.\nexport const RestoreWorkProjectInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n cascadeId: z.string().min(1).optional(),\n}).strict();\nexport type RestoreWorkProjectInput = z.infer<typeof RestoreWorkProjectInputSchema>;\n\nexport const RestoreWorkRealmInputSchema = z.object({\n workRealmId: z.string().min(1),\n cascadeId: z.string().min(1).optional(),\n}).strict();\nexport type RestoreWorkRealmInput = z.infer<typeof RestoreWorkRealmInputSchema>;\n\n// The `requireWorkProjectRetitle` / `requireWorkRealmRetitle` callables share this base\n// `{ reason }` shape and each `.extend(...)` it with its own id field at parse time.\nexport const RequireRetitleInputSchema = z.object({\n reason: z.string().min(1).max(MAX_REQUIRE_RETITLE_REASON_LENGTH),\n}).strict();\nexport type RequireRetitleInput = z.infer<typeof RequireRetitleInputSchema>;\n\n// --- Page-level \"Clear text (moderation)\" callables (per-field extension of the retitle family) ---\n\n// The clearable SHELL fields (raw doc field names) for the workProject + workRealm contexts.\n// Derived from the canonical clearable-field map — the two shell surfaces share the same fields.\nconst ModerationShellClearFieldSchema = z.enum(MODERATION_CLEARABLE_TEXT_FIELDS.workProject);\nexport type ModerationShellClearField = z.infer<typeof ModerationShellClearFieldSchema>;\n\nexport const ClearWorkProjectTextInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n fields: z.array(ModerationShellClearFieldSchema).min(1),\n reason: z.string().trim().min(1).max(MAX_REQUIRE_RETITLE_REASON_LENGTH),\n}).strict();\nexport type ClearWorkProjectTextInput = z.infer<typeof ClearWorkProjectTextInputSchema>;\n\nexport const ClearWorkRealmTextInputSchema = z.object({\n workRealmId: z.string().min(1),\n fields: z.array(ModerationShellClearFieldSchema).min(1),\n reason: z.string().trim().min(1).max(MAX_REQUIRE_RETITLE_REASON_LENGTH),\n}).strict();\nexport type ClearWorkRealmTextInput = z.infer<typeof ClearWorkRealmTextInputSchema>;\n\n// The clearable TEXT fields across the whole hall content family — derived from the canonical\n// map (union of every hall surface's fields), never restated literals.\nconst HallClearFieldSchema = z.enum(HALL_CLEARABLE_TEXT_FIELD_NAMES);\nexport type HallClearField = z.infer<typeof HallClearFieldSchema>;\n\nexport const ClearHallContentTextInputSchema = z.object({\n hallItemId: hallItemIdSchema,\n workProjectType: workProjectTypeSchema,\n subItemId: z.string().min(1).optional(),\n fields: z.array(HallClearFieldSchema).min(1),\n reason: z.string().trim().min(1).max(MAX_REQUIRE_RETITLE_REASON_LENGTH),\n}).strict();\nexport type ClearHallContentTextInput = z.infer<typeof ClearHallContentTextInputSchema>;\n\n// --- getLatestHideCascade — resolve the latest hide-cascade id for a Work/Realm ---\n\nexport const GetLatestHideCascadeInputSchema = z.object({\n entityId: z.string().min(1),\n targetType: z.enum(['work-project', 'work-realm']),\n}).strict();\nexport type GetLatestHideCascadeInput = z.infer<typeof GetLatestHideCascadeInputSchema>;\n\n// --- moderateReportedContent — hide / restore / soft perma-remove an individual reported item ---\n\n// The single-item content-action target set (SUBSET of ReportableItemType — excludes the\n// close-out-only hall-library-sub-item).\nconst MODERATE_REPORTED_CONTENT_TARGET_TYPES = [\n 'square-streetz-post',\n 'audition',\n 'audition-entry',\n 'commission-listing',\n 'commission-proposal',\n 'work-asset',\n 'profile-picture',\n 'hall-library-item',\n 'craft-skill',\n // Conversation File — the hide/restore/remove action targets the file owner record +\n // its mediaAsset (the `work-asset` shape), never a chat message.\n 'conversation-file',\n] as const satisfies readonly ReportableItemType[];\n\nexport const ModerateReportedContentInputSchema = z.object({\n reportGroupId: z.string().min(1),\n targetType: z.enum(MODERATE_REPORTED_CONTENT_TARGET_TYPES),\n reportedItemId: z.string().min(1),\n parentItemId: z.string().min(1).optional(),\n action: z.enum(['hide', 'restore', 'remove']),\n // [EUAS-023] A destructive action (hide/remove) MUST carry a reason; restore is a reversal.\n reason: z.string().trim().min(1).max(MAX_INTERNAL_REASON_LENGTH).optional(),\n})\n .strict()\n .superRefine((val, ctx) => {\n if ((val.action === 'hide' || val.action === 'remove') && !val.reason) {\n ctx.addIssue({\n code: 'custom',\n message: 'A reason is required to hide or remove content.',\n path: ['reason'],\n });\n }\n });\nexport type ModerateReportedContentInput = z.infer<typeof ModerateReportedContentInputSchema>;\n\n// --- resolveAdminTask — the ONE guided close-out for EVERY admin case type ---\n\n// [EUAS-005] The content-action target set ALSO accepts hall-library-sub-item (hide/restore only),\n// which routes to the dedicated `runSetHallSubItemHidden` core (not `runModerateReportedContent`).\nconst CONTENT_ACTION_TARGET_TYPES = [\n 'square-streetz-post',\n 'audition',\n 'audition-entry',\n 'commission-listing',\n 'commission-proposal',\n 'work-asset',\n 'profile-picture',\n 'hall-library-item',\n 'craft-skill',\n 'hall-library-sub-item',\n // Conversation File — same content action as `work-asset`, routed at the file record.\n 'conversation-file',\n] as const satisfies readonly ReportableItemType[];\n\nconst ContentActionSchema = z\n .object({\n button: z.enum(['hideContent', 'restoreContent', 'permaRemoveContent']),\n targetType: z.enum(CONTENT_ACTION_TARGET_TYPES),\n reportedItemId: z.string().min(1),\n parentItemId: z.string().min(1).optional(),\n })\n .strict();\n\nconst WarnUserSchema = z\n .object({\n button: z.literal('warnUser'),\n userId: z.string().min(1),\n // A warning IS an admin dispatch (resolveAdminTask → runCreateAdminDispatchToUser),\n // so it shares the dispatch subject/body caps.\n subject: z.string().trim().min(1).max(MAX_ADMIN_DISPATCH_SUBJECT_LENGTH),\n message: z.string().trim().min(1).max(MAX_ADMIN_DISPATCH_INITIAL_TEXT_LENGTH),\n })\n .strict();\n\nconst SuspendOrBanSchema = z\n .object({\n button: z.enum(['suspendUser', 'banUser']),\n userId: z.string().min(1),\n reason: z.string().trim().min(1).max(MAX_INTERNAL_REASON_LENGTH),\n })\n .strict();\n\nconst ReinstateUserSchema = z\n .object({ button: z.literal('reinstateUser'), userId: z.string().min(1), reason: z.string().trim().max(MAX_INTERNAL_REASON_LENGTH).optional() })\n .strict();\n\nconst ForceUsernameResetSchema = z\n .object({ button: z.literal('forceUsernameReset'), userId: z.string().min(1), reason: z.string().trim().min(1).max(MAX_INTERNAL_REASON_LENGTH).optional() })\n .strict();\n\n/** Whole-object Work/Realm remedies — `reportedItemId` is the workProjectId / workRealmId. */\nconst WorkObjectActionSchema = z\n .object({\n button: z.enum(['hideWorkObject', 'restoreWorkObject', 'forceRetitle']),\n targetType: z.enum(['work-project', 'work-realm']),\n reportedItemId: z.string().min(1),\n })\n .strict();\n\n// --- The in-flow clear-content disposition (staged counterpart of the page-level clear-text\n// callables) ---\n\n/** The three targets the in-flow text clear can neutralize — the Work/Realm shells plus a single\n * published hall sub-item. Compile-linked subset of the canonical reportable-item enum. */\nconst CLEAR_CONTENT_TEXT_TARGET_TYPES = [\n 'work-project',\n 'work-realm',\n 'hall-library-sub-item',\n] as const satisfies readonly ReportableItemType[];\nexport type ClearContentTextTargetType = (typeof CLEAR_CONTENT_TEXT_TARGET_TYPES)[number];\n\n/** Every field name the staged clear can carry across those three targets — the union of the two\n * canonical clearable owners (`MODERATION_CLEARABLE_TEXT_FIELDS` for the shells,\n * `HALL_CLEARABLE_TEXT_FIELD_NAMES` for the hall family), i.e. the same two sources\n * `ClearWorkProjectTextInputSchema` / `ClearHallContentTextInputSchema` derive from. No field\n * literal is restated here. */\nconst CLEAR_CONTENT_TEXT_FIELDS = [\n ...MODERATION_CLEARABLE_TEXT_FIELDS.workProject,\n ...HALL_CLEARABLE_TEXT_FIELD_NAMES,\n] as const;\nconst ClearContentTextFieldSchema = z.enum(CLEAR_CONTENT_TEXT_FIELDS);\nexport type ClearContentTextField = z.infer<typeof ClearContentTextFieldSchema>;\n\n/** Which fields each target legally accepts — projected from those same owners, so a\n * target/field mismatch is refused at the wire instead of reaching a clear runner that would\n * drop it. Enforced by the cross-field refinement on `StagedActionSchema` below. */\nconst CLEAR_CONTENT_TEXT_FIELDS_BY_TARGET = {\n 'work-project': MODERATION_CLEARABLE_TEXT_FIELDS.workProject,\n 'work-realm': MODERATION_CLEARABLE_TEXT_FIELDS.workRealm,\n 'hall-library-sub-item': HALL_CLEARABLE_TEXT_FIELD_NAMES,\n} as const satisfies Record<ClearContentTextTargetType, readonly ClearContentTextField[]>;\n\n/** Per-field text clear — the guided close-out's staged counterpart of the page-level\n * `clearWorkProjectText` / `clearWorkRealmText` / `clearHallContentText` callables (the\n * per-field extension of `forceRetitle`). `reportedItemId` is the workProjectId / workRealmId /\n * sub-item id; `parentItemId` is the parent hall item id, required only for the sub-item target.\n * `workProjectType` is deliberately NOT on the wire — the server re-reads it from the doc (the\n * hall hide-branch precedent). */\nconst ClearContentTextActionSchema = z\n .object({\n button: z.literal('clearContentText'),\n targetType: z.enum(CLEAR_CONTENT_TEXT_TARGET_TYPES),\n reportedItemId: z.string().min(1),\n parentItemId: z.string().min(1).optional(),\n fields: z.array(ClearContentTextFieldSchema).min(1),\n })\n .strict();\n\n/** Chat message tombstone — channel + seq from the report, revision from the live thread-read. */\nconst TombstoneChatSchema = z\n .object({\n button: z.literal('tombstoneChat'),\n channel: z.discriminatedUnion('kind', [\n z.object({ kind: z.literal('channel'), workProjectId: z.string().min(1), guildChatChannelId: z.string().min(1) }).strict(),\n z.object({ kind: z.literal('invite'), guildInviteId: z.string().min(1) }).strict(),\n ]),\n messageSeq: z.number().int().nonnegative(),\n expectedMessageRevision: z.number().int().nonnegative(),\n })\n .strict();\n\nexport const StagedActionSchema = z\n .discriminatedUnion('button', [\n ContentActionSchema,\n WarnUserSchema,\n SuspendOrBanSchema,\n ReinstateUserSchema,\n ForceUsernameResetSchema,\n WorkObjectActionSchema,\n ClearContentTextActionSchema,\n TombstoneChatSchema,\n ])\n // The clearContentText arm's two cross-field rules, applied at the union (the\n // SafetyStagedActionSchema pattern below) because no other arm carries these fields:\n // every chosen field must belong to the chosen target's canonical clearable set, and the\n // hall sub-item target must name its parent hall item.\n .superRefine((value, ctx) => {\n if (value.button !== 'clearContentText') return;\n const clearable: readonly string[] = CLEAR_CONTENT_TEXT_FIELDS_BY_TARGET[value.targetType];\n value.fields.forEach((field, index) => {\n if (!clearable.includes(field)) {\n ctx.addIssue({\n code: 'custom',\n message: `Field '${field}' is not clearable on a '${value.targetType}' target.`,\n path: ['fields', index],\n });\n }\n });\n if (value.targetType === 'hall-library-sub-item' && !value.parentItemId) {\n ctx.addIssue({\n code: 'custom',\n message: 'parentItemId (the parent hall item id) is required for a hall sub-item target.',\n path: ['parentItemId'],\n });\n }\n });\nexport type StagedAction = z.infer<typeof StagedActionSchema>;\n\nexport const NormalReportInputSchema = z\n .object({\n caseType: z.literal('normalReport').default('normalReport'),\n taskId: z.string().min(1),\n outcome: z.enum(['founded', 'unfounded']),\n resolutionSummary: z.string().trim().min(1).max(MAX_SAFETY_RESOLUTION_SUMMARY_LENGTH),\n actions: z.array(StagedActionSchema).max(16).default([]),\n userFacingReasonCode: z.string().trim().min(1).max(128).optional(),\n userFacingReasonDetail: z.string().trim().max(MAX_USER_FACING_REASON_DETAIL_LENGTH).optional(),\n adminNote: z.string().trim().max(MAX_SAFETY_ADMIN_NOTE_LENGTH).optional(),\n })\n .strict();\nexport type ResolveAdminTaskInput = z.infer<typeof NormalReportInputSchema>;\n\nconst SafetyDispositionActionSchema = z\n .object({\n button: z.literal('setReportDisposition'),\n // Derived from the ONE canonical disposition enum — 'undetermined' is the initial\n // state, never an operator-settable target, so it is excluded (not re-declared).\n disposition: ReportDispositionSchema.exclude(['undetermined']),\n dispositionReasonCode: ReportDispositionReasonCodeSchema,\n // Derived from the ONE receipts-cap constant (doc-schemas/safety/evidence.ts) — the same\n // bound the callable + the embedded SetReportDispositionInputV1Schema use. No field-level min:\n // the reportRequired⇒non-empty rule lives in the shared cross-field refinement below, so every\n // other disposition may legally stage this action with no evidence revealed.\n evidenceRefs: z.array(z.string().min(1)).max(MAX_MANIFEST_NCMEC_RECEIPTS),\n expectedRevision: z.number().int().nonnegative(),\n })\n .strict();\n\nconst QuarantineActionSchema = z.object({ button: z.literal('quarantinePreserveFile') }).strict();\n\n// [C-01/EUAS-002] No client-supplied requestId — the linked statutory request id(s) are derived\n// SERVER-SIDE from the case's `requestLinks` inside `enqueueNciiRemovalForCase`.\nconst HashRemoveActionSchema = z.object({ button: z.literal('hashRemoveFile') }).strict();\n\nconst SafetyAccountActionSchema = z\n .object({\n button: z.enum(['suspendUser', 'banUser', 'reinstateUser']),\n targetUid: z.string().min(1),\n reasonInternal: z.string().trim().min(4).max(MAX_INTERNAL_REASON_LENGTH),\n reasonUserFacing: z.string().trim().min(1).max(MAX_USER_FACING_REASON_LENGTH),\n role: ChildSafetyAccountRoleSchema,\n subjectDisposition: ChildSafetyAccountSubjectDispositionSchema,\n })\n .strict();\n\nexport const SafetyStagedActionSchema = z\n .discriminatedUnion('button', [\n SafetyDispositionActionSchema,\n QuarantineActionSchema,\n HashRemoveActionSchema,\n SafetyAccountActionSchema,\n ])\n // The setReportDisposition arm reuses the ONE canonical cross-field rules (foundation.ts) via the\n // shared refinements — never re-declaring them here: the disposition↔reason pairing AND the\n // reportRequired⇒evidence-present rule. Other arms carry no such fields.\n .superRefine((value, ctx) => {\n if (value.button === 'setReportDisposition') {\n refineReportDispositionReasonCode(value, ctx);\n refineReportDispositionEvidenceRefs(value, ctx);\n }\n });\nexport type SafetyStagedAction = z.infer<typeof SafetyStagedActionSchema>;\n\nexport const SafetyCaseInputSchema = z\n .object({\n caseType: z.enum(['csam', 'ncii']),\n caseId: z.string().min(1),\n outcome: z.enum(['founded', 'unfounded']),\n resolutionSummary: z.string().trim().min(1).max(MAX_SAFETY_RESOLUTION_SUMMARY_LENGTH),\n actions: z.array(SafetyStagedActionSchema).max(16).default([]),\n adminNote: z.string().trim().max(MAX_SAFETY_ADMIN_NOTE_LENGTH).optional(),\n // [EUAS-017] Optimistic-concurrency token (`childSafetyCaseList.revision` / `nciiCases.revision`).\n // The close is rejected if the case changed since the operator loaded it — concurrent stale closes\n // can't silently overwrite. Optional for backward compatibility; the console always supplies it.\n expectedRevision: z.number().int().nonnegative().optional(),\n // Interim reauth: a single explicit typed confirmation for the privileged safety actions,\n // standing in for the passkey two-step until [H-17]. The callable is full-admin gated.\n confirmation: z.literal(SAFETY_ACTIONS_CONFIRMATION),\n })\n .strict();\nexport type SafetyCaseInput = z.infer<typeof SafetyCaseInputSchema>;\n\nexport const ReopenSafetyCaseInputSchema = z\n .object({\n caseType: z.enum(['csam', 'ncii']),\n caseId: z.string().min(1),\n reasonInternal: z.string().trim().min(4).max(MAX_INTERNAL_REASON_LENGTH),\n expectedRevision: z.number().int().nonnegative().optional(),\n confirmation: z.literal(SAFETY_CASE_REOPEN_CONFIRMATION),\n })\n .strict();\nexport type ReopenSafetyCaseInput = z.infer<typeof ReopenSafetyCaseInputSchema>;\n\n// ---------------------------------------------------------------------------\n// Dead-letter operations — adminReplayDeadLetter + getDeadLetters (Ops Repairs).\n// ---------------------------------------------------------------------------\n\n/** Every ledger the dead-letter replay callable supports. `hallSubItemEdgeSync`\n * rows live at a 4-segment nested path, so their docId IS the full document path\n * (the callable splits it); every other lane is the flat [collection, docId] tuple. */\nexport const DeadLetterCollectionSchema = z.enum([\n 'chatSyncEvents',\n 'chatAdminActionCommands',\n 'notificationDeliveries',\n 'chatMessageOutbox',\n 'squareAnnouncementJobs',\n 'chatSyncFanoutJobs',\n 'mediaAssets',\n 'quarantineSagaJobs',\n 'nciiRemovalJobs',\n 'safetyEvidenceJobs',\n 'accountActionCommands',\n 'activeReportGroups',\n 'hallSubItemEdgeSync',\n]);\nexport type DeadLetterCollection = z.infer<typeof DeadLetterCollectionSchema>;\n\nexport const AdminReplayDeadLetterInputSchema = z\n .object({\n collection: DeadLetterCollectionSchema,\n // Structural id bound (hallSubItemEdgeSync docIds are full nested paths).\n docId: z.string().min(1).max(200),\n reason: z.string().min(1).max(MAX_INTERNAL_REASON_LENGTH),\n dryRun: z.boolean().optional(),\n })\n .strict();\nexport type AdminReplayDeadLetterInput = z.infer<typeof AdminReplayDeadLetterInputSchema>;\n\nexport const GetDeadLettersInputSchema = z\n .object({\n /** Restrict to one ledger; absent = all supported ledgers. */\n collection: DeadLetterCollectionSchema.optional(),\n /** Per-ledger row cap (the callable's own ceiling applies regardless). */\n limit: z.number().int().min(1).max(200).optional(),\n })\n .strict()\n .nullish();\nexport type GetDeadLettersInput = z.infer<typeof GetDeadLettersInputSchema>;\n\n\n"]}
|