@ttt-productions/ttt-core 0.79.63 → 0.79.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants/moderation.d.ts +5 -0
- package/dist/constants/moderation.d.ts.map +1 -1
- package/dist/constants/moderation.js +5 -0
- package/dist/constants/moderation.js.map +1 -1
- package/dist/schemas/safety.d.ts +15 -13
- package/dist/schemas/safety.d.ts.map +1 -1
- package/dist/schemas/safety.js +14 -11
- package/dist/schemas/safety.js.map +1 -1
- package/dist/schemas/utility.d.ts +9 -0
- package/dist/schemas/utility.d.ts.map +1 -1
- package/dist/schemas/utility.js +13 -4
- package/dist/schemas/utility.js.map +1 -1
- package/dist/schemas/work-project-management.d.ts +13 -6
- package/dist/schemas/work-project-management.d.ts.map +1 -1
- package/dist/schemas/work-project-management.js +12 -6
- package/dist/schemas/work-project-management.js.map +1 -1
- package/package.json +1 -1
|
@@ -13,4 +13,9 @@ export declare const TEXT_MODERATION_MIN_LENGTH = 3;
|
|
|
13
13
|
* firestore.rules and `startUpload` never writes it.
|
|
14
14
|
*/
|
|
15
15
|
export declare const MODERATION_OVERRIDE_ADMIN_APPEAL_APPROVED = "admin-appeal-approved";
|
|
16
|
+
/** The length of one curated word-list term, inclusive. */
|
|
17
|
+
export declare const MIN_CURATED_PROFANITY_TERM_LENGTH = 1;
|
|
18
|
+
export declare const MAX_CURATED_PROFANITY_TERM_LENGTH = 64;
|
|
19
|
+
/** The most terms one curation call may add, and the most it may remove. */
|
|
20
|
+
export declare const MAX_CURATED_PROFANITY_TERMS_PER_REQUEST = 500;
|
|
16
21
|
//# sourceMappingURL=moderation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moderation.d.ts","sourceRoot":"","sources":["../../src/constants/moderation.ts"],"names":[],"mappings":"AAEA,gFAAgF;AAChF,eAAO,MAAM,qBAAqB,aAAqC,CAAC;AAExE,8EAA8E;AAC9E,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAE5C;;;;;;;;;GASG;AACH,eAAO,MAAM,yCAAyC,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"moderation.d.ts","sourceRoot":"","sources":["../../src/constants/moderation.ts"],"names":[],"mappings":"AAEA,gFAAgF;AAChF,eAAO,MAAM,qBAAqB,aAAqC,CAAC;AAExE,8EAA8E;AAC9E,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAE5C;;;;;;;;;GASG;AACH,eAAO,MAAM,yCAAyC,0BAA0B,CAAC;AAEjF,2DAA2D;AAC3D,eAAO,MAAM,iCAAiC,IAAI,CAAC;AACnD,eAAO,MAAM,iCAAiC,KAAK,CAAC;AAEpD,4EAA4E;AAC5E,eAAO,MAAM,uCAAuC,MAAM,CAAC"}
|
|
@@ -14,4 +14,9 @@ export const TEXT_MODERATION_MIN_LENGTH = 3;
|
|
|
14
14
|
* firestore.rules and `startUpload` never writes it.
|
|
15
15
|
*/
|
|
16
16
|
export const MODERATION_OVERRIDE_ADMIN_APPEAL_APPROVED = 'admin-appeal-approved';
|
|
17
|
+
/** The length of one curated word-list term, inclusive. */
|
|
18
|
+
export const MIN_CURATED_PROFANITY_TERM_LENGTH = 1;
|
|
19
|
+
export const MAX_CURATED_PROFANITY_TERM_LENGTH = 64;
|
|
20
|
+
/** The most terms one curation call may add, and the most it may remove. */
|
|
21
|
+
export const MAX_CURATED_PROFANITY_TERMS_PER_REQUEST = 500;
|
|
17
22
|
//# sourceMappingURL=moderation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moderation.js","sourceRoot":"","sources":["../../src/constants/moderation.ts"],"names":[],"mappings":"AAAA,mEAAmE;AAEnE,gFAAgF;AAChF,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC;AAExE,8EAA8E;AAC9E,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC;AAE5C;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,yCAAyC,GAAG,uBAAuB,CAAC","sourcesContent":["// Content moderation constants shared between frontend and backend\n\n/** Cloud Vision SafeSearch likelihood values that trigger content rejection. */\nexport const REJECTION_LIKELIHOODS = new Set(['LIKELY', 'VERY_LIKELY']);\n\n/** Minimum character length for text to be sent to the moderation service. */\nexport const TEXT_MODERATION_MIN_LENGTH = 3;\n\n/**\n * `pendingMedia.moderationOverride` value set ONLY by the appeal-review backend\n * (`reviewContentAppeal`, decision `approved`) when re-queuing rejected media.\n * A human admin approving an appeal is an override of the automated Vision/VI\n * adult-content judgment — the pipeline must NOT re-run that classifier (it\n * would re-reject and silently defeat the approval). Scope of the bypass is the\n * Vision/VI adult-content check ONLY; PhotoDNA/CSAM scanning is orthogonal and\n * is never skipped. The field is server-set: `pendingMedia` is callable-only in\n * firestore.rules and `startUpload` never writes it.\n */\nexport const MODERATION_OVERRIDE_ADMIN_APPEAL_APPROVED = 'admin-appeal-approved';\n"]}
|
|
1
|
+
{"version":3,"file":"moderation.js","sourceRoot":"","sources":["../../src/constants/moderation.ts"],"names":[],"mappings":"AAAA,mEAAmE;AAEnE,gFAAgF;AAChF,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC;AAExE,8EAA8E;AAC9E,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC;AAE5C;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,yCAAyC,GAAG,uBAAuB,CAAC;AAEjF,2DAA2D;AAC3D,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC;AACnD,MAAM,CAAC,MAAM,iCAAiC,GAAG,EAAE,CAAC;AAEpD,4EAA4E;AAC5E,MAAM,CAAC,MAAM,uCAAuC,GAAG,GAAG,CAAC","sourcesContent":["// Content moderation constants shared between frontend and backend\n\n/** Cloud Vision SafeSearch likelihood values that trigger content rejection. */\nexport const REJECTION_LIKELIHOODS = new Set(['LIKELY', 'VERY_LIKELY']);\n\n/** Minimum character length for text to be sent to the moderation service. */\nexport const TEXT_MODERATION_MIN_LENGTH = 3;\n\n/**\n * `pendingMedia.moderationOverride` value set ONLY by the appeal-review backend\n * (`reviewContentAppeal`, decision `approved`) when re-queuing rejected media.\n * A human admin approving an appeal is an override of the automated Vision/VI\n * adult-content judgment — the pipeline must NOT re-run that classifier (it\n * would re-reject and silently defeat the approval). Scope of the bypass is the\n * Vision/VI adult-content check ONLY; PhotoDNA/CSAM scanning is orthogonal and\n * is never skipped. The field is server-set: `pendingMedia` is callable-only in\n * firestore.rules and `startUpload` never writes it.\n */\nexport const MODERATION_OVERRIDE_ADMIN_APPEAL_APPROVED = 'admin-appeal-approved';\n\n/** The length of one curated word-list term, inclusive. */\nexport const MIN_CURATED_PROFANITY_TERM_LENGTH = 1;\nexport const MAX_CURATED_PROFANITY_TERM_LENGTH = 64;\n\n/** The most terms one curation call may add, and the most it may remove. */\nexport const MAX_CURATED_PROFANITY_TERMS_PER_REQUEST = 500;\n"]}
|
package/dist/schemas/safety.d.ts
CHANGED
|
@@ -1929,7 +1929,7 @@ export declare const DecideTakeItDownValidityResultSchema: z.ZodObject<{
|
|
|
1929
1929
|
removalDeadlineAt: z.ZodOptional<z.ZodNumber>;
|
|
1930
1930
|
caseId: z.ZodOptional<z.ZodString>;
|
|
1931
1931
|
alreadyDecided: z.ZodBoolean;
|
|
1932
|
-
console: z.ZodObject<{
|
|
1932
|
+
console: z.ZodOptional<z.ZodObject<{
|
|
1933
1933
|
changes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1934
1934
|
source: z.ZodLiteral<"childSafety">;
|
|
1935
1935
|
caseId: z.ZodString;
|
|
@@ -2384,7 +2384,7 @@ export declare const DecideTakeItDownValidityResultSchema: z.ZodObject<{
|
|
|
2384
2384
|
}, z.core.$strict>>;
|
|
2385
2385
|
}, z.core.$strict>>;
|
|
2386
2386
|
generatedAt: z.ZodNumber;
|
|
2387
|
-
}, z.core.$strict
|
|
2387
|
+
}, z.core.$strict>>;
|
|
2388
2388
|
}, z.core.$strip>;
|
|
2389
2389
|
export type DecideTakeItDownValidityResult = z.infer<typeof DecideTakeItDownValidityResultSchema>;
|
|
2390
2390
|
/** `setNciiMinorAssessment`. */
|
|
@@ -2405,7 +2405,7 @@ export declare const SetNciiMinorAssessmentResultSchema: z.ZodObject<{
|
|
|
2405
2405
|
}>;
|
|
2406
2406
|
childSafetyCaseId: z.ZodOptional<z.ZodString>;
|
|
2407
2407
|
servingDenied: z.ZodBoolean;
|
|
2408
|
-
console: z.ZodObject<{
|
|
2408
|
+
console: z.ZodOptional<z.ZodObject<{
|
|
2409
2409
|
changes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2410
2410
|
source: z.ZodLiteral<"childSafety">;
|
|
2411
2411
|
caseId: z.ZodString;
|
|
@@ -2860,7 +2860,7 @@ export declare const SetNciiMinorAssessmentResultSchema: z.ZodObject<{
|
|
|
2860
2860
|
}, z.core.$strict>>;
|
|
2861
2861
|
}, z.core.$strict>>;
|
|
2862
2862
|
generatedAt: z.ZodNumber;
|
|
2863
|
-
}, z.core.$strict
|
|
2863
|
+
}, z.core.$strict>>;
|
|
2864
2864
|
}, z.core.$strip>;
|
|
2865
2865
|
export type SetNciiMinorAssessmentResult = z.infer<typeof SetNciiMinorAssessmentResultSchema>;
|
|
2866
2866
|
/** `refetchProtectedCaseContext`. */
|
|
@@ -2868,7 +2868,7 @@ export declare const RefetchProtectedCaseContextResultSchema: z.ZodObject<{
|
|
|
2868
2868
|
resolved: z.ZodBoolean;
|
|
2869
2869
|
senderUid: z.ZodOptional<z.ZodString>;
|
|
2870
2870
|
reason: z.ZodOptional<z.ZodString>;
|
|
2871
|
-
console: z.ZodObject<{
|
|
2871
|
+
console: z.ZodOptional<z.ZodObject<{
|
|
2872
2872
|
changes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2873
2873
|
source: z.ZodLiteral<"childSafety">;
|
|
2874
2874
|
caseId: z.ZodString;
|
|
@@ -3323,7 +3323,7 @@ export declare const RefetchProtectedCaseContextResultSchema: z.ZodObject<{
|
|
|
3323
3323
|
}, z.core.$strict>>;
|
|
3324
3324
|
}, z.core.$strict>>;
|
|
3325
3325
|
generatedAt: z.ZodNumber;
|
|
3326
|
-
}, z.core.$strict
|
|
3326
|
+
}, z.core.$strict>>;
|
|
3327
3327
|
}, z.core.$strip>;
|
|
3328
3328
|
export type RefetchProtectedCaseContextResult = z.infer<typeof RefetchProtectedCaseContextResultSchema>;
|
|
3329
3329
|
/** `markNcmecPortalComplete`. */
|
|
@@ -3331,7 +3331,7 @@ export declare const MarkNcmecPortalCompleteResultSchema: z.ZodObject<{
|
|
|
3331
3331
|
success: z.ZodLiteral<true>;
|
|
3332
3332
|
state: z.ZodLiteral<"completed">;
|
|
3333
3333
|
alreadyCompleted: z.ZodBoolean;
|
|
3334
|
-
console: z.ZodObject<{
|
|
3334
|
+
console: z.ZodOptional<z.ZodObject<{
|
|
3335
3335
|
changes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3336
3336
|
source: z.ZodLiteral<"childSafety">;
|
|
3337
3337
|
caseId: z.ZodString;
|
|
@@ -3786,14 +3786,14 @@ export declare const MarkNcmecPortalCompleteResultSchema: z.ZodObject<{
|
|
|
3786
3786
|
}, z.core.$strict>>;
|
|
3787
3787
|
}, z.core.$strict>>;
|
|
3788
3788
|
generatedAt: z.ZodNumber;
|
|
3789
|
-
}, z.core.$strict
|
|
3789
|
+
}, z.core.$strict>>;
|
|
3790
3790
|
}, z.core.$strip>;
|
|
3791
3791
|
export type MarkNcmecPortalCompleteResult = z.infer<typeof MarkNcmecPortalCompleteResultSchema>;
|
|
3792
3792
|
/** `reopenSafetyCase`. */
|
|
3793
3793
|
export declare const ReopenSafetyCaseResultSchema: z.ZodObject<{
|
|
3794
3794
|
success: z.ZodLiteral<true>;
|
|
3795
3795
|
reopened: z.ZodBoolean;
|
|
3796
|
-
console: z.ZodObject<{
|
|
3796
|
+
console: z.ZodOptional<z.ZodObject<{
|
|
3797
3797
|
changes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3798
3798
|
source: z.ZodLiteral<"childSafety">;
|
|
3799
3799
|
caseId: z.ZodString;
|
|
@@ -4248,14 +4248,16 @@ export declare const ReopenSafetyCaseResultSchema: z.ZodObject<{
|
|
|
4248
4248
|
}, z.core.$strict>>;
|
|
4249
4249
|
}, z.core.$strict>>;
|
|
4250
4250
|
generatedAt: z.ZodNumber;
|
|
4251
|
-
}, z.core.$strict
|
|
4251
|
+
}, z.core.$strict>>;
|
|
4252
4252
|
}, z.core.$strip>;
|
|
4253
4253
|
export type ReopenSafetyCaseResult = z.infer<typeof ReopenSafetyCaseResultSchema>;
|
|
4254
|
-
/** The replay lanes behind a `failed` safety case —
|
|
4254
|
+
/** The replay lanes behind a `failed` safety case — the only lanes whose performed replay may answer
|
|
4255
|
+
* the console patch (when the read after the commit succeeded). */
|
|
4255
4256
|
export declare const SAFETY_CASE_REPLAY_LANES: ("quarantineSagaJobs" | "nciiRemovalJobs")[];
|
|
4256
4257
|
/**
|
|
4257
|
-
* The `adminReplayDeadLetter` answer: the replayed target and its outcome. `console`
|
|
4258
|
-
*
|
|
4258
|
+
* The `adminReplayDeadLetter` answer: the replayed target and its outcome. `console` appears only on
|
|
4259
|
+
* a performed (not dry-run) replay of a safety lane, the console's Restart, and only when the read
|
|
4260
|
+
* after the commit succeeded. Declared
|
|
4259
4261
|
* here, beside the console patch, because this module already imports ./admin.js.
|
|
4260
4262
|
*/
|
|
4261
4263
|
export declare const AdminReplayDeadLetterResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"safety.d.ts","sourceRoot":"","sources":["../../src/schemas/safety.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,CAAC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,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAM9F,eAAO,MAAM,6BAA6B;;kBAI/B,CAAC;AACZ,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAMpF,eAAO,MAAM,6BAA6B;;;;kBAY/B,CAAC;AACZ,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAMpF,eAAO,MAAM,sCAAsC;;;;;;kBAKxC,CAAC;AACZ,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAC;AAMtG,eAAO,MAAM,sCAAsC;;;;;;kBAQxC,CAAC;AACZ,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAC;AAOtG,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAgBzB,CAAC;AACZ,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
package/dist/schemas/safety.js
CHANGED
|
@@ -199,8 +199,9 @@ export const SafetyCaseConsolePatchSchema = z
|
|
|
199
199
|
generatedAt: z.number(),
|
|
200
200
|
})
|
|
201
201
|
.strict();
|
|
202
|
-
// The answers of the console's actions
|
|
203
|
-
//
|
|
202
|
+
// The answers of the console's actions. Each carries its console patch when the read after the
|
|
203
|
+
// commit succeeded; a failed read never fails an action that already committed (ENG-009), and the
|
|
204
|
+
// client keeps its loaded pages when `console` is absent. Non-strict (server → client result posture).
|
|
204
205
|
/** `decideTakeItDownValidity`. */
|
|
205
206
|
export const DecideTakeItDownValidityResultSchema = z.object({
|
|
206
207
|
success: z.literal(true),
|
|
@@ -210,7 +211,7 @@ export const DecideTakeItDownValidityResultSchema = z.object({
|
|
|
210
211
|
removalDeadlineAt: z.number().optional(),
|
|
211
212
|
caseId: z.string().min(1).optional(),
|
|
212
213
|
alreadyDecided: z.boolean(),
|
|
213
|
-
console: SafetyCaseConsolePatchSchema,
|
|
214
|
+
console: SafetyCaseConsolePatchSchema.optional(),
|
|
214
215
|
});
|
|
215
216
|
/** `setNciiMinorAssessment`. */
|
|
216
217
|
export const SetNciiMinorAssessmentResultSchema = z.object({
|
|
@@ -222,29 +223,30 @@ export const SetNciiMinorAssessmentResultSchema = z.object({
|
|
|
222
223
|
childSafetyCaseId: z.string().min(1).optional(),
|
|
223
224
|
/** Whether this call denied serving on any asset. */
|
|
224
225
|
servingDenied: z.boolean(),
|
|
225
|
-
console: SafetyCaseConsolePatchSchema,
|
|
226
|
+
console: SafetyCaseConsolePatchSchema.optional(),
|
|
226
227
|
});
|
|
227
228
|
/** `refetchProtectedCaseContext`. */
|
|
228
229
|
export const RefetchProtectedCaseContextResultSchema = z.object({
|
|
229
230
|
resolved: z.boolean(),
|
|
230
231
|
senderUid: z.string().min(1).optional(),
|
|
231
232
|
reason: z.string().min(1).optional(),
|
|
232
|
-
console: SafetyCaseConsolePatchSchema,
|
|
233
|
+
console: SafetyCaseConsolePatchSchema.optional(),
|
|
233
234
|
});
|
|
234
235
|
/** `markNcmecPortalComplete`. */
|
|
235
236
|
export const MarkNcmecPortalCompleteResultSchema = z.object({
|
|
236
237
|
success: z.literal(true),
|
|
237
238
|
state: z.literal('completed'),
|
|
238
239
|
alreadyCompleted: z.boolean(),
|
|
239
|
-
console: SafetyCaseConsolePatchSchema,
|
|
240
|
+
console: SafetyCaseConsolePatchSchema.optional(),
|
|
240
241
|
});
|
|
241
242
|
/** `reopenSafetyCase`. */
|
|
242
243
|
export const ReopenSafetyCaseResultSchema = z.object({
|
|
243
244
|
success: z.literal(true),
|
|
244
245
|
reopened: z.boolean(),
|
|
245
|
-
console: SafetyCaseConsolePatchSchema,
|
|
246
|
+
console: SafetyCaseConsolePatchSchema.optional(),
|
|
246
247
|
});
|
|
247
|
-
/** The replay lanes behind a `failed` safety case —
|
|
248
|
+
/** The replay lanes behind a `failed` safety case — the only lanes whose performed replay may answer
|
|
249
|
+
* the console patch (when the read after the commit succeeded). */
|
|
248
250
|
export const SAFETY_CASE_REPLAY_LANES = SafetyCaseFailedJobRefSchema.shape.collection.options;
|
|
249
251
|
const replayOutcomeShape = {
|
|
250
252
|
replayed: z.literal(true).optional(),
|
|
@@ -255,8 +257,9 @@ const replayOutcomeShape = {
|
|
|
255
257
|
console: SafetyCaseConsolePatchSchema.optional(),
|
|
256
258
|
};
|
|
257
259
|
/**
|
|
258
|
-
* The `adminReplayDeadLetter` answer: the replayed target and its outcome. `console`
|
|
259
|
-
*
|
|
260
|
+
* The `adminReplayDeadLetter` answer: the replayed target and its outcome. `console` appears only on
|
|
261
|
+
* a performed (not dry-run) replay of a safety lane, the console's Restart, and only when the read
|
|
262
|
+
* after the commit succeeded. Declared
|
|
260
263
|
* here, beside the console patch, because this module already imports ./admin.js.
|
|
261
264
|
*/
|
|
262
265
|
export const AdminReplayDeadLetterResultSchema = z
|
|
@@ -267,7 +270,7 @@ export const AdminReplayDeadLetterResultSchema = z
|
|
|
267
270
|
.superRefine((answer, ctx) => {
|
|
268
271
|
const safetyLane = SAFETY_CASE_REPLAY_LANES.includes(answer.collection);
|
|
269
272
|
const performed = answer.replayed === true && answer.dryRun !== true;
|
|
270
|
-
if (
|
|
273
|
+
if (answer.console !== undefined && !(safetyLane && performed)) {
|
|
271
274
|
ctx.addIssue({ code: 'custom', path: ['console'] });
|
|
272
275
|
}
|
|
273
276
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"safety.js","sourceRoot":"","sources":["../../src/schemas/safety.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,EAAE;AACF,mFAAmF;AACnF,yFAAyF;AACzF,4FAA4F;AAC5F,yFAAyF;AACzF,0FAA0F;AAC1F,EAAE;AACF,wFAAwF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AC,GAAG,CAAC,2BAA2B,CAAC,CAAC,QAAQ,EAAE;IAC/D,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC,QAAQ,EAAE;IACjE;;8CAE0C;IAC1C,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACvC,CAAC;KACD,MAAM,EAAE,CAAC","sourcesContent":["// TTT safety-domain callable input schemas.\n//\n// The Trust & Safety operator surface (safety case console, evidence reveal, NCMEC\n// manual-portal completion, per-account safety actions, operator TOTP step-up, retained-\n// evidence inventory, party panel, TAKE IT DOWN request detail, protected-context re-fetch)\n// crosses the backend↔frontend boundary, so its callable input contracts live here — the\n// single source of truth — instead of being redefined locally in `functions/src/safety/`.\n//\n// Every object schema is `.strict()` so an unknown field on a privileged operator/admin\n// action is REJECTED rather than silently accepted (defense-in-depth on the highest-risk\n// callables). `caseId` / `targetUid` / `requestId` / `submissionId` and similar identifiers\n// derive from the id atoms, so each is exactly one document-id segment (ARCH-106).\n\nimport { z } from 'zod';\nimport {\n MAX_REPORT_NARRATIVE_LENGTH,\n MAX_INTERNAL_REASON_LENGTH,\n MAX_USER_FACING_REASON_LENGTH,\n MAX_SAFETY_ARTIFACT_DESCRIPTION_LENGTH,\n MAX_NCMEC_PORTAL_PROOF_TEXT_LENGTH,\n} from '../constants/business.js';\nimport {\n SAFETY_ACCOUNT_ACTION_CONFIRMATION,\n NCMEC_PORTAL_RECEIPT_CONFIRMATION,\n NCMEC_MANUAL_PORTAL_FILED_CONFIRMATION,\n REVEAL_CASE_EVIDENCE_CONFIRMATION,\n NCMEC_PORTAL_CORRECTION_CONFIRMATION,\n} from '../constants/safety-confirmation-phrases.js';\nimport { AccountActionSchema } from '../doc-schemas/safety/sagas.js';\nimport {\n NciiInternalStatusSchema,\n NciiMinorAssessmentSchema,\n ReportableItemTypeSchema,\n ReportDispositionSchema,\n ReportReasonSchema,\n SafetyCaseClosureV1Schema,\n} from '../doc-schemas/safety/foundation.js';\nimport {\n reportTargetItemIdSchema,\n reportTargetParentRefSchema,\n reportTargetUserIdSchema,\n documentIdSegmentSchema,\n safetyCaseIdSchema,\n userIdSchema,\n takeItDownRequestIdSchema,\n} from './atoms.js';\nimport { SafetySlaMonitorV1Schema } from '../doc-schemas/safety/monitors.js';\nimport { NciiCaseLaneSchema, NciiCaseV1Schema } from '../doc-schemas/ncii/cases.js';\nimport {\n NciiRetainedEvidenceInventoryV1Schema,\n TakeItDownRequestRootV1Schema,\n} from '../doc-schemas/ncii/requests.js';\nimport {\n DeadLetterCollectionSchema,\n FlatDeadLetterCollectionSchema,\n HallSubItemEdgeSyncReplayTargetSchema,\n} from './admin.js';\nimport {\n ChildSafetyAccountRoleSchema,\n ChildSafetyAccountSubjectDispositionSchema,\n ChildSafetyCaseListV1Schema,\n ChildSafetyCaseV1Schema,\n ChildSafetyIncidentClassSchema,\n ChildSafetyPreservationStatusSchema,\n ChildSafetyWorkStatusSchema,\n SafetyCaseLaneSchema,\n} from '../doc-schemas/safety/case.js';\n\n// The case-lane enum is declared beside the case shapes (a leaf both schema files import); it is\n// re-exported here with the console and case-lookup inputs that take it.\nexport { SafetyCaseLaneSchema, type SafetyCaseLane } from '../doc-schemas/safety/case.js';\nimport {\n SafetyEvidenceJobPhaseSchema,\n SafetyEvidenceJobStatusSchema,\n} from '../doc-schemas/safety/evidence.js';\n\n// ---------------------------------------------------------------------------\n// commandAccountAction — apply a per-account safety action on a child-safety case.\n// ---------------------------------------------------------------------------\n\n/**\n * The per-account safety action the operator command applies — an ALIAS of the ONE\n * canonical `AccountActionSchema` (../doc-schemas/safety/sagas.ts), re-exported under\n * the callable-input name. Never a re-declared literal (ARCH-102).\n */\nexport const CommandAccountActionSchema = AccountActionSchema;\nexport type CommandAccountActionValue = z.infer<typeof CommandAccountActionSchema>;\n\nexport const CommandAccountActionInputSchema = z\n .object({\n caseId: safetyCaseIdSchema,\n targetUid: userIdSchema,\n action: CommandAccountActionSchema,\n /** Operator-facing internal rationale (LE-loggable). */\n reasonInternal: z.string().min(4, 'An internal reason is required.').max(MAX_INTERNAL_REASON_LENGTH),\n /** The generic owner-readable reason (no detail leaks). */\n reasonUserFacing: z.string().min(1).max(MAX_USER_FACING_REASON_LENGTH),\n /** Per-account case role (A1b) — the canonical case enums, never re-declared. */\n role: ChildSafetyAccountRoleSchema,\n subjectDisposition: ChildSafetyAccountSubjectDispositionSchema,\n confirmation: z.literal(SAFETY_ACCOUNT_ACTION_CONFIRMATION),\n })\n .strict();\nexport type CommandAccountActionInput = z.infer<typeof CommandAccountActionInputSchema>;\n\n// ---------------------------------------------------------------------------\n// getSafetyCaseConsole — paginated read of the active safety-case console.\n// ---------------------------------------------------------------------------\n\n/** Cursor for the next page of a paginated console source — the last row's `(orderField value, docId)`. */\nexport const SafetyCaseConsoleCursorSchema = z\n .object({ v: z.number(), id: documentIdSegmentSchema })\n .strict();\nexport type SafetyCaseConsoleCursor = z.infer<typeof SafetyCaseConsoleCursorSchema>;\n\nconst SAFETY_CONSOLE_MAX_PAGE_SIZE = 200;\n\n\n/** The console's three paged sources — the keys of its per-source pagination. */\nexport const SafetyCaseConsoleSourceSchema = z.enum(['childSafety', 'ncii', 'takeItDown']);\nexport type SafetyCaseConsoleSource = z.infer<typeof SafetyCaseConsoleSourceSchema>;\n\n/**\n * `exhaustedSources` names each source whose last page the console already holds: the read skips\n * that source's page query (still counting its total), so a source that ran out is never restarted\n * at its first page while another source keeps paging.\n */\nexport const GetSafetyCaseConsoleInputSchema = z\n .object({\n pageSize: z.number().int().min(1).max(SAFETY_CONSOLE_MAX_PAGE_SIZE).optional(),\n childSafetyCursor: SafetyCaseConsoleCursorSchema.nullish(),\n nciiCursor: SafetyCaseConsoleCursorSchema.nullish(),\n takeItDownCursor: SafetyCaseConsoleCursorSchema.nullish(),\n exhaustedSources: z\n .array(SafetyCaseConsoleSourceSchema)\n .max(SafetyCaseConsoleSourceSchema.options.length)\n .refine((sources) => new Set(sources).size === sources.length, { message: 'List each source once.' })\n .optional(),\n })\n .strict()\n .nullish();\nexport type GetSafetyCaseConsoleInput = z.infer<typeof GetSafetyCaseConsoleInputSchema>;\n\n/** One evidence job's disposition state, as a case row shows it. */\nexport const SafetyEvidenceJobSummarySchema = z\n .object({\n jobId: z.string().min(1),\n phase: SafetyEvidenceJobPhaseSchema,\n status: SafetyEvidenceJobStatusSchema,\n })\n .strict();\nexport type SafetyEvidenceJobSummary = z.infer<typeof SafetyEvidenceJobSummarySchema>;\n\n/**\n * A dead-lettered enforcement job behind a `failed` safety case — what the console's Restart hands\n * to the dead-letter replay: its replay lane, the job doc id, and the operator-facing label.\n */\nexport const SafetyCaseFailedJobRefSchema = z\n .object({\n collection: DeadLetterCollectionSchema.extract(['quarantineSagaJobs', 'nciiRemovalJobs']),\n docId: z.string().min(1),\n label: z.string().min(1),\n })\n .strict();\nexport type SafetyCaseFailedJobRef = z.infer<typeof SafetyCaseFailedJobRefSchema>;\n\n/** A child-safety case row: its list projection, its armed or overdue monitors, and its evidence jobs. */\nexport const ChildSafetyCaseConsoleRowSchema = z\n .object({\n case: ChildSafetyCaseListV1Schema,\n monitors: z.array(SafetySlaMonitorV1Schema),\n evidenceJobs: z.array(SafetyEvidenceJobSummarySchema),\n failedJobs: z.array(SafetyCaseFailedJobRefSchema).optional(),\n crossoverLegs: ChildSafetyCaseV1Schema.shape.crossoverLegs,\n })\n .strict();\nexport type ChildSafetyCaseConsoleRow = z.infer<typeof ChildSafetyCaseConsoleRowSchema>;\n\n/** An NCII case row: the case and its case- and request-scoped monitors. */\nexport const NciiCaseConsoleRowSchema = z\n .object({\n case: NciiCaseV1Schema,\n monitors: z.array(SafetySlaMonitorV1Schema),\n failedJobs: z.array(SafetyCaseFailedJobRefSchema).optional(),\n })\n .strict();\nexport type NciiCaseConsoleRow = z.infer<typeof NciiCaseConsoleRowSchema>;\n\n/**\n * An unresolved public TAKE IT DOWN request: the request root's non-sensitive fields (the raw\n * locator and the requester's details stay on the restricted subdoc) and its removal-clock monitors.\n */\nexport const TakeItDownRequestConsoleRowSchema = TakeItDownRequestRootV1Schema.pick({\n requestId: true,\n requesterRole: true,\n targetLocatorSummary: true,\n completenessStatus: true,\n validityStatus: true,\n publicStatus: true,\n removalDeadlineAt: true,\n receivedAt: true,\n})\n .extend({ monitors: z.array(SafetySlaMonitorV1Schema) })\n .strict();\nexport type TakeItDownRequestConsoleRow = z.infer<typeof TakeItDownRequestConsoleRowSchema>;\n\n/** One source's page: its active total, whether more pages follow, and the next page's cursor. */\nexport const SafetyCaseConsolePageInfoSchema = z\n .object({\n total: z.number().int().nonnegative(),\n hasMore: z.boolean(),\n nextCursor: SafetyCaseConsoleCursorSchema.nullable(),\n })\n .strict();\nexport type SafetyCaseConsolePageInfo = z.infer<typeof SafetyCaseConsolePageInfoSchema>;\n\n/** One case in the urgent projection: an active case with an armed or overdue monitor. */\nexport const SafetyCaseConsoleUrgentEntrySchema = z\n .object({\n caseId: z.string().min(1),\n lane: SafetyCaseLaneSchema,\n monitors: z.array(SafetySlaMonitorV1Schema),\n })\n .strict();\nexport type SafetyCaseConsoleUrgentEntry = z.infer<typeof SafetyCaseConsoleUrgentEntrySchema>;\n\n/** The `getSafetyCaseConsole` answer: one page per source, the per-source pagination, and the\n * urgent projection — every active case with an armed or overdue monitor, never capped. */\nexport const GetSafetyCaseConsoleResultSchema = z\n .object({\n childSafetyCases: z.array(ChildSafetyCaseConsoleRowSchema),\n nciiCases: z.array(NciiCaseConsoleRowSchema),\n takeItDownRequests: z.array(TakeItDownRequestConsoleRowSchema),\n pagination: z\n .object({\n childSafety: SafetyCaseConsolePageInfoSchema,\n ncii: SafetyCaseConsolePageInfoSchema,\n takeItDown: SafetyCaseConsolePageInfoSchema,\n } satisfies Record<SafetyCaseConsoleSource, z.ZodType>)\n .strict(),\n urgentProjection: z.array(SafetyCaseConsoleUrgentEntrySchema),\n generatedAt: z.number(),\n })\n .strict();\nexport type GetSafetyCaseConsoleResult = z.infer<typeof GetSafetyCaseConsoleResultSchema>;\n\n// ---------------------------------------------------------------------------\n// The console patch — what a console action changed, so the console's loaded pages are patched in\n// place rather than reloaded (FRONTEND-103). Its rows come from Functions-only collections the\n// client cannot read, so the action answers with them, built by the console's own row projection.\n// ---------------------------------------------------------------------------\n\n/**\n * One console row an action changed, keyed by the id its source keys it by. `row` is the row as the\n * console now shows it; `null` means it is no longer in the active console. A row that was not\n * loaded or not active before is placed in its source's order.\n */\nexport const SafetyCaseConsoleRowChangeSchema = z.discriminatedUnion('source', [\n z.object({ source: z.literal('childSafety'), caseId: safetyCaseIdSchema, row: ChildSafetyCaseConsoleRowSchema.nullable() }).strict(),\n z.object({ source: z.literal('ncii'), caseId: safetyCaseIdSchema, row: NciiCaseConsoleRowSchema.nullable() }).strict(),\n z.object({ source: z.literal('takeItDown'), requestId: takeItDownRequestIdSchema, row: TakeItDownRequestConsoleRowSchema.nullable() }).strict(),\n]);\nexport type SafetyCaseConsoleRowChange = z.infer<typeof SafetyCaseConsoleRowChangeSchema>;\n\n/**\n * The console after an action: every row it changed, entered, or removed, each source's active\n * total, and the complete urgent set — the same values a console read would answer — so no count\n * or urgent entry is derived from the pages a client happens to hold (BACKEND-112).\n */\nexport const SafetyCaseConsolePatchSchema = z\n .object({\n changes: z.array(SafetyCaseConsoleRowChangeSchema),\n totals: z\n .object({\n childSafety: z.number().int().nonnegative(),\n ncii: z.number().int().nonnegative(),\n takeItDown: z.number().int().nonnegative(),\n } satisfies Record<SafetyCaseConsoleSource, z.ZodType>)\n .strict(),\n urgentProjection: z.array(SafetyCaseConsoleUrgentEntrySchema),\n generatedAt: z.number(),\n })\n .strict();\nexport type SafetyCaseConsolePatch = z.infer<typeof SafetyCaseConsolePatchSchema>;\n\n// The answers of the console's actions, each carrying its console patch. Non-strict (server →\n// client result posture).\n\n/** `decideTakeItDownValidity`. */\nexport const DecideTakeItDownValidityResultSchema = z.object({\n success: z.literal(true),\n result: z.enum(['valid', 'invalid', 'unableToLocate']),\n /** Present on a `valid` ruling. */\n validRequestReceivedAt: z.number().optional(),\n removalDeadlineAt: z.number().optional(),\n caseId: z.string().min(1).optional(),\n alreadyDecided: z.boolean(),\n console: SafetyCaseConsolePatchSchema,\n});\nexport type DecideTakeItDownValidityResult = z.infer<typeof DecideTakeItDownValidityResultSchema>;\n\n/** `setNciiMinorAssessment`. */\nexport const SetNciiMinorAssessmentResultSchema = z.object({\n ok: z.literal(true),\n caseId: z.string().min(1),\n from: NciiMinorAssessmentSchema,\n to: NciiMinorAssessmentSchema,\n /** Set when the change opened or linked a parallel child-safety review. */\n childSafetyCaseId: z.string().min(1).optional(),\n /** Whether this call denied serving on any asset. */\n servingDenied: z.boolean(),\n console: SafetyCaseConsolePatchSchema,\n});\nexport type SetNciiMinorAssessmentResult = z.infer<typeof SetNciiMinorAssessmentResultSchema>;\n\n/** `refetchProtectedCaseContext`. */\nexport const RefetchProtectedCaseContextResultSchema = z.object({\n resolved: z.boolean(),\n senderUid: z.string().min(1).optional(),\n reason: z.string().min(1).optional(),\n console: SafetyCaseConsolePatchSchema,\n});\nexport type RefetchProtectedCaseContextResult = z.infer<typeof RefetchProtectedCaseContextResultSchema>;\n\n/** `markNcmecPortalComplete`. */\nexport const MarkNcmecPortalCompleteResultSchema = z.object({\n success: z.literal(true),\n state: z.literal('completed'),\n alreadyCompleted: z.boolean(),\n console: SafetyCaseConsolePatchSchema,\n});\nexport type MarkNcmecPortalCompleteResult = z.infer<typeof MarkNcmecPortalCompleteResultSchema>;\n\n/** `reopenSafetyCase`. */\nexport const ReopenSafetyCaseResultSchema = z.object({\n success: z.literal(true),\n reopened: z.boolean(),\n console: SafetyCaseConsolePatchSchema,\n});\nexport type ReopenSafetyCaseResult = z.infer<typeof ReopenSafetyCaseResultSchema>;\n\n/** The replay lanes behind a `failed` safety case — a performed replay of one answers the console patch. */\nexport const SAFETY_CASE_REPLAY_LANES = SafetyCaseFailedJobRefSchema.shape.collection.options;\n\nconst replayOutcomeShape = {\n replayed: z.literal(true).optional(),\n resetTo: z.string().optional(),\n dryRun: z.literal(true).optional(),\n currentStatus: z.unknown().optional(),\n wouldResetTo: z.string().optional(),\n console: SafetyCaseConsolePatchSchema.optional(),\n};\n\n/**\n * The `adminReplayDeadLetter` answer: the replayed target and its outcome. `console` is present\n * exactly on a performed (not dry-run) replay of a safety lane, the console's Restart. Declared\n * here, beside the console patch, because this module already imports ./admin.js.\n */\nexport const AdminReplayDeadLetterResultSchema = z\n .discriminatedUnion('collection', [\n z.object({ collection: FlatDeadLetterCollectionSchema, docId: z.string().min(1), ...replayOutcomeShape }),\n z.object({ collection: z.literal('hallSubItemEdgeSync'), ...HallSubItemEdgeSyncReplayTargetSchema.shape, ...replayOutcomeShape }),\n ])\n .superRefine((answer, ctx) => {\n const safetyLane = (SAFETY_CASE_REPLAY_LANES as readonly string[]).includes(answer.collection);\n const performed = answer.replayed === true && answer.dryRun !== true;\n if ((answer.console !== undefined) !== (safetyLane && performed)) {\n ctx.addIssue({ code: 'custom', path: ['console'] });\n }\n });\nexport type AdminReplayDeadLetterResult = z.infer<typeof AdminReplayDeadLetterResultSchema>;\n\n// ---------------------------------------------------------------------------\n// getSafetyCaseById — full-admin read of a terminal safety case by id.\n// ---------------------------------------------------------------------------\n\nexport const GetSafetyCaseByIdInputSchema = z\n .object({\n caseType: SafetyCaseLaneSchema,\n caseId: safetyCaseIdSchema.max(200),\n })\n .strict();\nexport type GetSafetyCaseByIdInput = z.infer<typeof GetSafetyCaseByIdInputSchema>;\n\n// The lookup is a reopen surface: it carries the case's status, revision, safe metadata, and\n// closure history only — never evidence or reporter identity.\nconst SafetyCaseByIdFields = {\n caseId: safetyCaseIdSchema,\n /** The revision `reopenSafetyCase` must name. */\n revision: z.number().int().nonnegative(),\n meta: z\n .object({\n incidentClass: ChildSafetyIncidentClassSchema.optional(),\n lane: NciiCaseLaneSchema.optional(),\n createdAt: z.number().optional(),\n actualKnowledgeAt: z.number().optional(),\n preserveUntil: z.number().optional(),\n reportDisposition: ReportDispositionSchema.optional(),\n })\n .strict(),\n /** Each close, as the closure record it wrote, keyed by the event that recorded it. */\n closureHistory: z.array(SafetyCaseClosureV1Schema.extend({ eventId: z.string().min(1) }).strict()),\n};\n\n/** The `getSafetyCaseById` answer: a child-safety case with its work status, an NCII case with its internal status. */\nexport const SafetyCaseByIdResultSchema = z.discriminatedUnion('caseType', [\n z\n .object({ ...SafetyCaseByIdFields, caseType: z.literal(SafetyCaseLaneSchema.enum.csam), status: ChildSafetyWorkStatusSchema })\n .strict(),\n z\n .object({ ...SafetyCaseByIdFields, caseType: z.literal(SafetyCaseLaneSchema.enum.ncii), status: NciiInternalStatusSchema })\n .strict(),\n]);\nexport type SafetyCaseByIdResult = z.infer<typeof SafetyCaseByIdResultSchema>;\n\n// ---------------------------------------------------------------------------\n// getSafetyCaseParties — server-resolved party panel for a safety case.\n// ---------------------------------------------------------------------------\n\nexport const GetSafetyCasePartiesInputSchema = z\n .object({\n caseType: SafetyCaseLaneSchema,\n caseId: safetyCaseIdSchema,\n })\n .strict();\nexport type GetSafetyCasePartiesInput = z.infer<typeof GetSafetyCasePartiesInputSchema>;\n\n// ---------------------------------------------------------------------------\n// getTakeItDownRequestDetail — operator detail read for one public TAKE IT DOWN request.\n// ---------------------------------------------------------------------------\n\nexport const GetTakeItDownRequestDetailInputSchema = z\n .object({\n requestId: takeItDownRequestIdSchema,\n })\n .strict();\nexport type GetTakeItDownRequestDetailInput = z.infer<typeof GetTakeItDownRequestDetailInputSchema>;\n\n// ---------------------------------------------------------------------------\n// listRetainedEvidenceInventory — paginated retained-evidence inventory read.\n// ---------------------------------------------------------------------------\n\n/** A retention list's cursor — the last row's `(createdAt, docId)`, newest first. */\nconst createdAtCursorSchema = () => z.object({ createdAt: z.number(), id: documentIdSegmentSchema }).strict();\n\n/** The largest page either retention list serves. */\nconst RETENTION_LIST_MAX_PAGE_SIZE = 200;\n\n/** Cursor for the retained-evidence inventory — the last row's `(createdAt, docId)`. */\nexport const RetainedEvidenceInventoryCursorSchema = createdAtCursorSchema();\nexport type RetainedEvidenceInventoryCursor = z.infer<typeof RetainedEvidenceInventoryCursorSchema>;\n\nexport const ListRetainedEvidenceInventoryInputSchema = z\n .object({\n pageSize: z.number().int().min(1).max(RETENTION_LIST_MAX_PAGE_SIZE).optional(),\n cursor: RetainedEvidenceInventoryCursorSchema.nullish(),\n /** Exact inventoryId lookup — returns just that row (or none), ignoring the cursor. */\n exactId: documentIdSegmentSchema.optional(),\n })\n .strict()\n .nullish();\nexport type ListRetainedEvidenceInventoryInput = z.infer<typeof ListRetainedEvidenceInventoryInputSchema>;\n\nexport const ListRetainedEvidenceInventoryResultSchema = z\n .object({\n rows: z.array(NciiRetainedEvidenceInventoryV1Schema),\n /** Pass as `cursor` for the next page; null when this page reached the end. */\n nextCursor: RetainedEvidenceInventoryCursorSchema.nullable(),\n /** Every inventory row, counted with an aggregate. */\n total: z.number().int().nonnegative(),\n })\n .strict();\nexport type ListRetainedEvidenceInventoryResult = z.infer<typeof ListRetainedEvidenceInventoryResultSchema>;\n\n// ---------------------------------------------------------------------------\n// listRetainedChildSafetyCases — the Retention tab's paged list of closed child-safety cases whose\n// evidence is still preserved.\n// ---------------------------------------------------------------------------\n\n/**\n * A closed child-safety case is retained while its evidence is: every preservation status but\n * `destroyed`. The list reads cases whose `workStatus` is `operationallyResolved` (the one closed\n * work status) and whose `preservationStatus` is one of these, newest `createdAt` first.\n */\nexport const CHILD_SAFETY_RETAINED_PRESERVATION_STATUSES = ChildSafetyPreservationStatusSchema.exclude([\n 'destroyed',\n]).options;\n\n/** Cursor for the retained child-safety case list — the last row's `(createdAt, docId)`. */\nexport const RetainedChildSafetyCaseCursorSchema = createdAtCursorSchema();\nexport type RetainedChildSafetyCaseCursor = z.infer<typeof RetainedChildSafetyCaseCursorSchema>;\n\nexport const ListRetainedChildSafetyCasesInputSchema = z\n .object({\n pageSize: z.number().int().min(1).max(RETENTION_LIST_MAX_PAGE_SIZE).optional(),\n cursor: RetainedChildSafetyCaseCursorSchema.nullish(),\n /** Exact caseId lookup — returns just that case when it is retained (or none), ignoring the cursor. */\n exactId: documentIdSegmentSchema.optional(),\n })\n .strict()\n .nullish();\nexport type ListRetainedChildSafetyCasesInput = z.infer<typeof ListRetainedChildSafetyCasesInputSchema>;\n\n/** One retained case: its list projection and its own evidence jobs (read by case, never a global window). */\nexport const RetainedChildSafetyCaseRowSchema = z\n .object({\n case: ChildSafetyCaseListV1Schema,\n evidenceJobs: z.array(SafetyEvidenceJobSummarySchema),\n })\n .strict();\nexport type RetainedChildSafetyCaseRow = z.infer<typeof RetainedChildSafetyCaseRowSchema>;\n\nexport const ListRetainedChildSafetyCasesResultSchema = z\n .object({\n rows: z.array(RetainedChildSafetyCaseRowSchema),\n /** Pass as `cursor` for the next page; null when this page reached the end. */\n nextCursor: RetainedChildSafetyCaseCursorSchema.nullable(),\n /** Every retained case, counted with an aggregate. */\n total: z.number().int().nonnegative(),\n })\n .strict();\nexport type ListRetainedChildSafetyCasesResult = z.infer<typeof ListRetainedChildSafetyCasesResultSchema>;\n\n// ---------------------------------------------------------------------------\n// ncmecOperatorCommands — NCMEC manual-portal completion path.\n// ---------------------------------------------------------------------------\n\nexport const RecordNcmecPortalReceiptArtifactInputSchema = z\n .object({\n caseId: safetyCaseIdSchema,\n submissionId: documentIdSegmentSchema,\n /** The key of an object already in the restricted evidence vault (verified via statObject). */\n evidenceVaultKey: z.string().min(1, 'An evidence vault object key is required.'),\n /** Optional operator description of what the artifact is (e.g. \"NCMEC portal screenshot\"). */\n description: z.string().min(1).max(MAX_SAFETY_ARTIFACT_DESCRIPTION_LENGTH).optional(),\n /** Explicit typed confirmation (interim control until the passkey profile lands). */\n confirmation: z.literal(NCMEC_PORTAL_RECEIPT_CONFIRMATION),\n })\n .strict();\nexport type RecordNcmecPortalReceiptArtifactInput = z.infer<\n typeof RecordNcmecPortalReceiptArtifactInputSchema\n>;\n\nexport const MarkNcmecPortalCompleteInputSchema = z\n .object({\n caseId: safetyCaseIdSchema,\n submissionId: documentIdSegmentSchema,\n /** [Q13/H-06] The ID of an existing NcmecPortalReceiptArtifactV1 record bound to this (caseId, submissionId). */\n artifactId: documentIdSegmentSchema,\n /** [Q13/H-06] The object generation recorded on the artifact at registration time (immutable-object peg). */\n artifactObjectGeneration: z.string().min(1, 'The artifact object generation is required.'),\n /** [Q13/H-06] The sha256 hex digest recorded on the artifact at registration time (content-integrity check). */\n artifactSha256: z.string().regex(/^[0-9a-f]{64}$/, 'artifactSha256 must be a 64-character hex string.'),\n /** Optional operator free-text note describing the portal confirmation. */\n proofText: z.string().min(1).max(MAX_NCMEC_PORTAL_PROOF_TEXT_LENGTH).optional(),\n /** The NCMEC-assigned report id — REQUIRED (it IS the proof; no \"filed, number pending\" grace). */\n ncmecReportId: z.string().min(1, 'The NCMEC report id is required to mark the report complete.'),\n /** Explicit typed confirmation (interim control until the passkey profile lands). */\n confirmation: z.literal(NCMEC_MANUAL_PORTAL_FILED_CONFIRMATION),\n })\n .strict();\nexport type MarkNcmecPortalCompleteInput = z.infer<typeof MarkNcmecPortalCompleteInputSchema>;\n\n// ---------------------------------------------------------------------------\n// operatorStepUp — app-level TOTP step-up (confirm / verify a 6-digit code).\n// ---------------------------------------------------------------------------\n\nexport const OperatorStepUpCodeInputSchema = z\n .object({\n code: z.string().trim().regex(/^\\d{6}$/u, 'Enter the 6-digit code.'),\n })\n .strict();\nexport type OperatorStepUpCodeInput = z.infer<typeof OperatorStepUpCodeInputSchema>;\n\n// ---------------------------------------------------------------------------\n// revealCaseEvidence — metadata→evidence reveal under reauth.\n// ---------------------------------------------------------------------------\n\nexport const RevealCaseEvidenceInputSchema = z\n .object({\n caseId: safetyCaseIdSchema,\n /** Explicit typed confirmation (interim control until the passkey profile lands). */\n confirmation: z.literal(REVEAL_CASE_EVIDENCE_CONFIRMATION),\n /** The operator's child-safety warning acknowledgement, carried so the backend can persist it\n * in the reveal audit trail. This schema serves ONLY the safety-console reveal-under-reauth\n * flow (its sibling `confirmation` literal gates the same surface), so the acknowledgement is a\n * required `true` — consistent with the existing explicit-confirmation style. Server-side\n * enforcement + audit persistence land app-side. */\n warningAcknowledged: z.literal(true),\n })\n .strict();\nexport type RevealCaseEvidenceInput = z.infer<typeof RevealCaseEvidenceInputSchema>;\n\n// ---------------------------------------------------------------------------\n// refetchProtectedCaseContext — operator manual re-fetch of protected chat context.\n// ---------------------------------------------------------------------------\n\nexport const RefetchProtectedCaseContextInputSchema = z\n .object({\n caseId: safetyCaseIdSchema,\n lane: SafetyCaseLaneSchema,\n })\n .strict();\nexport type RefetchProtectedCaseContextInput = z.infer<typeof RefetchProtectedCaseContextInputSchema>;\n\n// ---------------------------------------------------------------------------\n// recordNcmecPortalCorrection — record an operator's NCMEC manual-portal correction filing.\n// ---------------------------------------------------------------------------\n\nexport const RecordNcmecPortalCorrectionInputSchema = z\n .object({\n caseId: safetyCaseIdSchema,\n ncmecReportId: z.string().min(1),\n correctionFiledAt: z.number(),\n reason: z.string().min(1).max(MAX_INTERNAL_REASON_LENGTH),\n confirmation: z.literal(NCMEC_PORTAL_CORRECTION_CONFIRMATION),\n })\n .strict();\nexport type RecordNcmecPortalCorrectionInput = z.infer<typeof RecordNcmecPortalCorrectionInputSchema>;\n\n// ---------------------------------------------------------------------------\n// submitReport — the one report-intake callable. The target ids are HINTS the server re-derives\n// (never owner or target authority): each is bounded and shaped as the path it could become, and\n// `parentItemId` may be a chat channel or conversation-file reference of two ids joined by \"/\".\n// ---------------------------------------------------------------------------\nexport const SubmitReportInputSchema = z\n .object({\n itemType: ReportableItemTypeSchema,\n reportedItemId: reportTargetItemIdSchema,\n parentItemId: reportTargetParentRefSchema.optional(),\n /** HINT ONLY — ignored as owner authority (the owner is server-derived). */\n reportedUserId: reportTargetUserIdSchema.optional(),\n reason: ReportReasonSchema,\n /** Free-text reporter narrative (segregated; never inlined on the public projection). */\n comment: z.string().max(MAX_REPORT_NARRATIVE_LENGTH).optional(),\n narrative: z.string().max(MAX_REPORT_NARRATIVE_LENGTH).optional(),\n /** The user-confirmed SECOND call that escalates an EXISTING report on this target to a\n * protected reason (Child Safety / NCII). Only meaningful with a protected reason and an\n * existing report; ignored otherwise. */\n confirmUpgrade: z.boolean().optional(),\n })\n .strict();\nexport type SubmitReportInput = z.infer<typeof SubmitReportInputSchema>;\n"]}
|
|
1
|
+
{"version":3,"file":"safety.js","sourceRoot":"","sources":["../../src/schemas/safety.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,EAAE;AACF,mFAAmF;AACnF,yFAAyF;AACzF,4FAA4F;AAC5F,yFAAyF;AACzF,0FAA0F;AAC1F,EAAE;AACF,wFAAwF;AACxF,yFAAyF;AACzF,4FAA4F;AAC5F,mFAAmF;AAEnF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,EAC1B,6BAA6B,EAC7B,sCAAsC,EACtC,kCAAkC,GACnC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,kCAAkC,EAClC,iCAAiC,EACjC,sCAAsC,EACtC,iCAAiC,EACjC,oCAAoC,GACrC,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,EAClB,yBAAyB,GAC1B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,wBAAwB,EACxB,2BAA2B,EAC3B,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,EAClB,YAAY,EACZ,yBAAyB,GAC1B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACpF,OAAO,EACL,qCAAqC,EACrC,6BAA6B,GAC9B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,0BAA0B,EAC1B,8BA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;IACzD,YAAY,EAAE,CAAC,CAAC,OAAO,CAAC,oCAAoC,CAAC;CAC9D,CAAC;KACD,MAAM,EAAE,CAAC;AAGZ,8EAA8E;AAC9E,gGAAgG;AAChG,iGAAiG;AACjG,gGAAgG;AAChG,8EAA8E;AAC9E,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC;KACrC,MAAM,CAAC;IACN,QAAQ,EAAE,wBAAwB;IAClC,cAAc,EAAE,wBAAwB;IACxC,YAAY,EAAE,2BAA2B,CAAC,QAAQ,EAAE;IACpD,4EAA4E;IAC5E,cAAc,EAAE,wBAAwB,CAAC,QAAQ,EAAE;IACnD,MAAM,EAAE,kBAAkB;IAC1B,yFAAyF;IACzF,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC,QAAQ,EAAE;IAC/D,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC,QAAQ,EAAE;IACjE;;8CAE0C;IAC1C,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACvC,CAAC;KACD,MAAM,EAAE,CAAC","sourcesContent":["// TTT safety-domain callable input schemas.\n//\n// The Trust & Safety operator surface (safety case console, evidence reveal, NCMEC\n// manual-portal completion, per-account safety actions, operator TOTP step-up, retained-\n// evidence inventory, party panel, TAKE IT DOWN request detail, protected-context re-fetch)\n// crosses the backend↔frontend boundary, so its callable input contracts live here — the\n// single source of truth — instead of being redefined locally in `functions/src/safety/`.\n//\n// Every object schema is `.strict()` so an unknown field on a privileged operator/admin\n// action is REJECTED rather than silently accepted (defense-in-depth on the highest-risk\n// callables). `caseId` / `targetUid` / `requestId` / `submissionId` and similar identifiers\n// derive from the id atoms, so each is exactly one document-id segment (ARCH-106).\n\nimport { z } from 'zod';\nimport {\n MAX_REPORT_NARRATIVE_LENGTH,\n MAX_INTERNAL_REASON_LENGTH,\n MAX_USER_FACING_REASON_LENGTH,\n MAX_SAFETY_ARTIFACT_DESCRIPTION_LENGTH,\n MAX_NCMEC_PORTAL_PROOF_TEXT_LENGTH,\n} from '../constants/business.js';\nimport {\n SAFETY_ACCOUNT_ACTION_CONFIRMATION,\n NCMEC_PORTAL_RECEIPT_CONFIRMATION,\n NCMEC_MANUAL_PORTAL_FILED_CONFIRMATION,\n REVEAL_CASE_EVIDENCE_CONFIRMATION,\n NCMEC_PORTAL_CORRECTION_CONFIRMATION,\n} from '../constants/safety-confirmation-phrases.js';\nimport { AccountActionSchema } from '../doc-schemas/safety/sagas.js';\nimport {\n NciiInternalStatusSchema,\n NciiMinorAssessmentSchema,\n ReportableItemTypeSchema,\n ReportDispositionSchema,\n ReportReasonSchema,\n SafetyCaseClosureV1Schema,\n} from '../doc-schemas/safety/foundation.js';\nimport {\n reportTargetItemIdSchema,\n reportTargetParentRefSchema,\n reportTargetUserIdSchema,\n documentIdSegmentSchema,\n safetyCaseIdSchema,\n userIdSchema,\n takeItDownRequestIdSchema,\n} from './atoms.js';\nimport { SafetySlaMonitorV1Schema } from '../doc-schemas/safety/monitors.js';\nimport { NciiCaseLaneSchema, NciiCaseV1Schema } from '../doc-schemas/ncii/cases.js';\nimport {\n NciiRetainedEvidenceInventoryV1Schema,\n TakeItDownRequestRootV1Schema,\n} from '../doc-schemas/ncii/requests.js';\nimport {\n DeadLetterCollectionSchema,\n FlatDeadLetterCollectionSchema,\n HallSubItemEdgeSyncReplayTargetSchema,\n} from './admin.js';\nimport {\n ChildSafetyAccountRoleSchema,\n ChildSafetyAccountSubjectDispositionSchema,\n ChildSafetyCaseListV1Schema,\n ChildSafetyCaseV1Schema,\n ChildSafetyIncidentClassSchema,\n ChildSafetyPreservationStatusSchema,\n ChildSafetyWorkStatusSchema,\n SafetyCaseLaneSchema,\n} from '../doc-schemas/safety/case.js';\n\n// The case-lane enum is declared beside the case shapes (a leaf both schema files import); it is\n// re-exported here with the console and case-lookup inputs that take it.\nexport { SafetyCaseLaneSchema, type SafetyCaseLane } from '../doc-schemas/safety/case.js';\nimport {\n SafetyEvidenceJobPhaseSchema,\n SafetyEvidenceJobStatusSchema,\n} from '../doc-schemas/safety/evidence.js';\n\n// ---------------------------------------------------------------------------\n// commandAccountAction — apply a per-account safety action on a child-safety case.\n// ---------------------------------------------------------------------------\n\n/**\n * The per-account safety action the operator command applies — an ALIAS of the ONE\n * canonical `AccountActionSchema` (../doc-schemas/safety/sagas.ts), re-exported under\n * the callable-input name. Never a re-declared literal (ARCH-102).\n */\nexport const CommandAccountActionSchema = AccountActionSchema;\nexport type CommandAccountActionValue = z.infer<typeof CommandAccountActionSchema>;\n\nexport const CommandAccountActionInputSchema = z\n .object({\n caseId: safetyCaseIdSchema,\n targetUid: userIdSchema,\n action: CommandAccountActionSchema,\n /** Operator-facing internal rationale (LE-loggable). */\n reasonInternal: z.string().min(4, 'An internal reason is required.').max(MAX_INTERNAL_REASON_LENGTH),\n /** The generic owner-readable reason (no detail leaks). */\n reasonUserFacing: z.string().min(1).max(MAX_USER_FACING_REASON_LENGTH),\n /** Per-account case role (A1b) — the canonical case enums, never re-declared. */\n role: ChildSafetyAccountRoleSchema,\n subjectDisposition: ChildSafetyAccountSubjectDispositionSchema,\n confirmation: z.literal(SAFETY_ACCOUNT_ACTION_CONFIRMATION),\n })\n .strict();\nexport type CommandAccountActionInput = z.infer<typeof CommandAccountActionInputSchema>;\n\n// ---------------------------------------------------------------------------\n// getSafetyCaseConsole — paginated read of the active safety-case console.\n// ---------------------------------------------------------------------------\n\n/** Cursor for the next page of a paginated console source — the last row's `(orderField value, docId)`. */\nexport const SafetyCaseConsoleCursorSchema = z\n .object({ v: z.number(), id: documentIdSegmentSchema })\n .strict();\nexport type SafetyCaseConsoleCursor = z.infer<typeof SafetyCaseConsoleCursorSchema>;\n\nconst SAFETY_CONSOLE_MAX_PAGE_SIZE = 200;\n\n\n/** The console's three paged sources — the keys of its per-source pagination. */\nexport const SafetyCaseConsoleSourceSchema = z.enum(['childSafety', 'ncii', 'takeItDown']);\nexport type SafetyCaseConsoleSource = z.infer<typeof SafetyCaseConsoleSourceSchema>;\n\n/**\n * `exhaustedSources` names each source whose last page the console already holds: the read skips\n * that source's page query (still counting its total), so a source that ran out is never restarted\n * at its first page while another source keeps paging.\n */\nexport const GetSafetyCaseConsoleInputSchema = z\n .object({\n pageSize: z.number().int().min(1).max(SAFETY_CONSOLE_MAX_PAGE_SIZE).optional(),\n childSafetyCursor: SafetyCaseConsoleCursorSchema.nullish(),\n nciiCursor: SafetyCaseConsoleCursorSchema.nullish(),\n takeItDownCursor: SafetyCaseConsoleCursorSchema.nullish(),\n exhaustedSources: z\n .array(SafetyCaseConsoleSourceSchema)\n .max(SafetyCaseConsoleSourceSchema.options.length)\n .refine((sources) => new Set(sources).size === sources.length, { message: 'List each source once.' })\n .optional(),\n })\n .strict()\n .nullish();\nexport type GetSafetyCaseConsoleInput = z.infer<typeof GetSafetyCaseConsoleInputSchema>;\n\n/** One evidence job's disposition state, as a case row shows it. */\nexport const SafetyEvidenceJobSummarySchema = z\n .object({\n jobId: z.string().min(1),\n phase: SafetyEvidenceJobPhaseSchema,\n status: SafetyEvidenceJobStatusSchema,\n })\n .strict();\nexport type SafetyEvidenceJobSummary = z.infer<typeof SafetyEvidenceJobSummarySchema>;\n\n/**\n * A dead-lettered enforcement job behind a `failed` safety case — what the console's Restart hands\n * to the dead-letter replay: its replay lane, the job doc id, and the operator-facing label.\n */\nexport const SafetyCaseFailedJobRefSchema = z\n .object({\n collection: DeadLetterCollectionSchema.extract(['quarantineSagaJobs', 'nciiRemovalJobs']),\n docId: z.string().min(1),\n label: z.string().min(1),\n })\n .strict();\nexport type SafetyCaseFailedJobRef = z.infer<typeof SafetyCaseFailedJobRefSchema>;\n\n/** A child-safety case row: its list projection, its armed or overdue monitors, and its evidence jobs. */\nexport const ChildSafetyCaseConsoleRowSchema = z\n .object({\n case: ChildSafetyCaseListV1Schema,\n monitors: z.array(SafetySlaMonitorV1Schema),\n evidenceJobs: z.array(SafetyEvidenceJobSummarySchema),\n failedJobs: z.array(SafetyCaseFailedJobRefSchema).optional(),\n crossoverLegs: ChildSafetyCaseV1Schema.shape.crossoverLegs,\n })\n .strict();\nexport type ChildSafetyCaseConsoleRow = z.infer<typeof ChildSafetyCaseConsoleRowSchema>;\n\n/** An NCII case row: the case and its case- and request-scoped monitors. */\nexport const NciiCaseConsoleRowSchema = z\n .object({\n case: NciiCaseV1Schema,\n monitors: z.array(SafetySlaMonitorV1Schema),\n failedJobs: z.array(SafetyCaseFailedJobRefSchema).optional(),\n })\n .strict();\nexport type NciiCaseConsoleRow = z.infer<typeof NciiCaseConsoleRowSchema>;\n\n/**\n * An unresolved public TAKE IT DOWN request: the request root's non-sensitive fields (the raw\n * locator and the requester's details stay on the restricted subdoc) and its removal-clock monitors.\n */\nexport const TakeItDownRequestConsoleRowSchema = TakeItDownRequestRootV1Schema.pick({\n requestId: true,\n requesterRole: true,\n targetLocatorSummary: true,\n completenessStatus: true,\n validityStatus: true,\n publicStatus: true,\n removalDeadlineAt: true,\n receivedAt: true,\n})\n .extend({ monitors: z.array(SafetySlaMonitorV1Schema) })\n .strict();\nexport type TakeItDownRequestConsoleRow = z.infer<typeof TakeItDownRequestConsoleRowSchema>;\n\n/** One source's page: its active total, whether more pages follow, and the next page's cursor. */\nexport const SafetyCaseConsolePageInfoSchema = z\n .object({\n total: z.number().int().nonnegative(),\n hasMore: z.boolean(),\n nextCursor: SafetyCaseConsoleCursorSchema.nullable(),\n })\n .strict();\nexport type SafetyCaseConsolePageInfo = z.infer<typeof SafetyCaseConsolePageInfoSchema>;\n\n/** One case in the urgent projection: an active case with an armed or overdue monitor. */\nexport const SafetyCaseConsoleUrgentEntrySchema = z\n .object({\n caseId: z.string().min(1),\n lane: SafetyCaseLaneSchema,\n monitors: z.array(SafetySlaMonitorV1Schema),\n })\n .strict();\nexport type SafetyCaseConsoleUrgentEntry = z.infer<typeof SafetyCaseConsoleUrgentEntrySchema>;\n\n/** The `getSafetyCaseConsole` answer: one page per source, the per-source pagination, and the\n * urgent projection — every active case with an armed or overdue monitor, never capped. */\nexport const GetSafetyCaseConsoleResultSchema = z\n .object({\n childSafetyCases: z.array(ChildSafetyCaseConsoleRowSchema),\n nciiCases: z.array(NciiCaseConsoleRowSchema),\n takeItDownRequests: z.array(TakeItDownRequestConsoleRowSchema),\n pagination: z\n .object({\n childSafety: SafetyCaseConsolePageInfoSchema,\n ncii: SafetyCaseConsolePageInfoSchema,\n takeItDown: SafetyCaseConsolePageInfoSchema,\n } satisfies Record<SafetyCaseConsoleSource, z.ZodType>)\n .strict(),\n urgentProjection: z.array(SafetyCaseConsoleUrgentEntrySchema),\n generatedAt: z.number(),\n })\n .strict();\nexport type GetSafetyCaseConsoleResult = z.infer<typeof GetSafetyCaseConsoleResultSchema>;\n\n// ---------------------------------------------------------------------------\n// The console patch — what a console action changed, so the console's loaded pages are patched in\n// place rather than reloaded (FRONTEND-103). Its rows come from Functions-only collections the\n// client cannot read, so the action answers with them, built by the console's own row projection.\n// ---------------------------------------------------------------------------\n\n/**\n * One console row an action changed, keyed by the id its source keys it by. `row` is the row as the\n * console now shows it; `null` means it is no longer in the active console. A row that was not\n * loaded or not active before is placed in its source's order.\n */\nexport const SafetyCaseConsoleRowChangeSchema = z.discriminatedUnion('source', [\n z.object({ source: z.literal('childSafety'), caseId: safetyCaseIdSchema, row: ChildSafetyCaseConsoleRowSchema.nullable() }).strict(),\n z.object({ source: z.literal('ncii'), caseId: safetyCaseIdSchema, row: NciiCaseConsoleRowSchema.nullable() }).strict(),\n z.object({ source: z.literal('takeItDown'), requestId: takeItDownRequestIdSchema, row: TakeItDownRequestConsoleRowSchema.nullable() }).strict(),\n]);\nexport type SafetyCaseConsoleRowChange = z.infer<typeof SafetyCaseConsoleRowChangeSchema>;\n\n/**\n * The console after an action: every row it changed, entered, or removed, each source's active\n * total, and the complete urgent set — the same values a console read would answer — so no count\n * or urgent entry is derived from the pages a client happens to hold (BACKEND-112).\n */\nexport const SafetyCaseConsolePatchSchema = z\n .object({\n changes: z.array(SafetyCaseConsoleRowChangeSchema),\n totals: z\n .object({\n childSafety: z.number().int().nonnegative(),\n ncii: z.number().int().nonnegative(),\n takeItDown: z.number().int().nonnegative(),\n } satisfies Record<SafetyCaseConsoleSource, z.ZodType>)\n .strict(),\n urgentProjection: z.array(SafetyCaseConsoleUrgentEntrySchema),\n generatedAt: z.number(),\n })\n .strict();\nexport type SafetyCaseConsolePatch = z.infer<typeof SafetyCaseConsolePatchSchema>;\n\n// The answers of the console's actions. Each carries its console patch when the read after the\n// commit succeeded; a failed read never fails an action that already committed (ENG-009), and the\n// client keeps its loaded pages when `console` is absent. Non-strict (server → client result posture).\n\n/** `decideTakeItDownValidity`. */\nexport const DecideTakeItDownValidityResultSchema = z.object({\n success: z.literal(true),\n result: z.enum(['valid', 'invalid', 'unableToLocate']),\n /** Present on a `valid` ruling. */\n validRequestReceivedAt: z.number().optional(),\n removalDeadlineAt: z.number().optional(),\n caseId: z.string().min(1).optional(),\n alreadyDecided: z.boolean(),\n console: SafetyCaseConsolePatchSchema.optional(),\n});\nexport type DecideTakeItDownValidityResult = z.infer<typeof DecideTakeItDownValidityResultSchema>;\n\n/** `setNciiMinorAssessment`. */\nexport const SetNciiMinorAssessmentResultSchema = z.object({\n ok: z.literal(true),\n caseId: z.string().min(1),\n from: NciiMinorAssessmentSchema,\n to: NciiMinorAssessmentSchema,\n /** Set when the change opened or linked a parallel child-safety review. */\n childSafetyCaseId: z.string().min(1).optional(),\n /** Whether this call denied serving on any asset. */\n servingDenied: z.boolean(),\n console: SafetyCaseConsolePatchSchema.optional(),\n});\nexport type SetNciiMinorAssessmentResult = z.infer<typeof SetNciiMinorAssessmentResultSchema>;\n\n/** `refetchProtectedCaseContext`. */\nexport const RefetchProtectedCaseContextResultSchema = z.object({\n resolved: z.boolean(),\n senderUid: z.string().min(1).optional(),\n reason: z.string().min(1).optional(),\n console: SafetyCaseConsolePatchSchema.optional(),\n});\nexport type RefetchProtectedCaseContextResult = z.infer<typeof RefetchProtectedCaseContextResultSchema>;\n\n/** `markNcmecPortalComplete`. */\nexport const MarkNcmecPortalCompleteResultSchema = z.object({\n success: z.literal(true),\n state: z.literal('completed'),\n alreadyCompleted: z.boolean(),\n console: SafetyCaseConsolePatchSchema.optional(),\n});\nexport type MarkNcmecPortalCompleteResult = z.infer<typeof MarkNcmecPortalCompleteResultSchema>;\n\n/** `reopenSafetyCase`. */\nexport const ReopenSafetyCaseResultSchema = z.object({\n success: z.literal(true),\n reopened: z.boolean(),\n console: SafetyCaseConsolePatchSchema.optional(),\n});\nexport type ReopenSafetyCaseResult = z.infer<typeof ReopenSafetyCaseResultSchema>;\n\n/** The replay lanes behind a `failed` safety case — the only lanes whose performed replay may answer\n * the console patch (when the read after the commit succeeded). */\nexport const SAFETY_CASE_REPLAY_LANES = SafetyCaseFailedJobRefSchema.shape.collection.options;\n\nconst replayOutcomeShape = {\n replayed: z.literal(true).optional(),\n resetTo: z.string().optional(),\n dryRun: z.literal(true).optional(),\n currentStatus: z.unknown().optional(),\n wouldResetTo: z.string().optional(),\n console: SafetyCaseConsolePatchSchema.optional(),\n};\n\n/**\n * The `adminReplayDeadLetter` answer: the replayed target and its outcome. `console` appears only on\n * a performed (not dry-run) replay of a safety lane, the console's Restart, and only when the read\n * after the commit succeeded. Declared\n * here, beside the console patch, because this module already imports ./admin.js.\n */\nexport const AdminReplayDeadLetterResultSchema = z\n .discriminatedUnion('collection', [\n z.object({ collection: FlatDeadLetterCollectionSchema, docId: z.string().min(1), ...replayOutcomeShape }),\n z.object({ collection: z.literal('hallSubItemEdgeSync'), ...HallSubItemEdgeSyncReplayTargetSchema.shape, ...replayOutcomeShape }),\n ])\n .superRefine((answer, ctx) => {\n const safetyLane = (SAFETY_CASE_REPLAY_LANES as readonly string[]).includes(answer.collection);\n const performed = answer.replayed === true && answer.dryRun !== true;\n if (answer.console !== undefined && !(safetyLane && performed)) {\n ctx.addIssue({ code: 'custom', path: ['console'] });\n }\n });\nexport type AdminReplayDeadLetterResult = z.infer<typeof AdminReplayDeadLetterResultSchema>;\n\n// ---------------------------------------------------------------------------\n// getSafetyCaseById — full-admin read of a terminal safety case by id.\n// ---------------------------------------------------------------------------\n\nexport const GetSafetyCaseByIdInputSchema = z\n .object({\n caseType: SafetyCaseLaneSchema,\n caseId: safetyCaseIdSchema.max(200),\n })\n .strict();\nexport type GetSafetyCaseByIdInput = z.infer<typeof GetSafetyCaseByIdInputSchema>;\n\n// The lookup is a reopen surface: it carries the case's status, revision, safe metadata, and\n// closure history only — never evidence or reporter identity.\nconst SafetyCaseByIdFields = {\n caseId: safetyCaseIdSchema,\n /** The revision `reopenSafetyCase` must name. */\n revision: z.number().int().nonnegative(),\n meta: z\n .object({\n incidentClass: ChildSafetyIncidentClassSchema.optional(),\n lane: NciiCaseLaneSchema.optional(),\n createdAt: z.number().optional(),\n actualKnowledgeAt: z.number().optional(),\n preserveUntil: z.number().optional(),\n reportDisposition: ReportDispositionSchema.optional(),\n })\n .strict(),\n /** Each close, as the closure record it wrote, keyed by the event that recorded it. */\n closureHistory: z.array(SafetyCaseClosureV1Schema.extend({ eventId: z.string().min(1) }).strict()),\n};\n\n/** The `getSafetyCaseById` answer: a child-safety case with its work status, an NCII case with its internal status. */\nexport const SafetyCaseByIdResultSchema = z.discriminatedUnion('caseType', [\n z\n .object({ ...SafetyCaseByIdFields, caseType: z.literal(SafetyCaseLaneSchema.enum.csam), status: ChildSafetyWorkStatusSchema })\n .strict(),\n z\n .object({ ...SafetyCaseByIdFields, caseType: z.literal(SafetyCaseLaneSchema.enum.ncii), status: NciiInternalStatusSchema })\n .strict(),\n]);\nexport type SafetyCaseByIdResult = z.infer<typeof SafetyCaseByIdResultSchema>;\n\n// ---------------------------------------------------------------------------\n// getSafetyCaseParties — server-resolved party panel for a safety case.\n// ---------------------------------------------------------------------------\n\nexport const GetSafetyCasePartiesInputSchema = z\n .object({\n caseType: SafetyCaseLaneSchema,\n caseId: safetyCaseIdSchema,\n })\n .strict();\nexport type GetSafetyCasePartiesInput = z.infer<typeof GetSafetyCasePartiesInputSchema>;\n\n// ---------------------------------------------------------------------------\n// getTakeItDownRequestDetail — operator detail read for one public TAKE IT DOWN request.\n// ---------------------------------------------------------------------------\n\nexport const GetTakeItDownRequestDetailInputSchema = z\n .object({\n requestId: takeItDownRequestIdSchema,\n })\n .strict();\nexport type GetTakeItDownRequestDetailInput = z.infer<typeof GetTakeItDownRequestDetailInputSchema>;\n\n// ---------------------------------------------------------------------------\n// listRetainedEvidenceInventory — paginated retained-evidence inventory read.\n// ---------------------------------------------------------------------------\n\n/** A retention list's cursor — the last row's `(createdAt, docId)`, newest first. */\nconst createdAtCursorSchema = () => z.object({ createdAt: z.number(), id: documentIdSegmentSchema }).strict();\n\n/** The largest page either retention list serves. */\nconst RETENTION_LIST_MAX_PAGE_SIZE = 200;\n\n/** Cursor for the retained-evidence inventory — the last row's `(createdAt, docId)`. */\nexport const RetainedEvidenceInventoryCursorSchema = createdAtCursorSchema();\nexport type RetainedEvidenceInventoryCursor = z.infer<typeof RetainedEvidenceInventoryCursorSchema>;\n\nexport const ListRetainedEvidenceInventoryInputSchema = z\n .object({\n pageSize: z.number().int().min(1).max(RETENTION_LIST_MAX_PAGE_SIZE).optional(),\n cursor: RetainedEvidenceInventoryCursorSchema.nullish(),\n /** Exact inventoryId lookup — returns just that row (or none), ignoring the cursor. */\n exactId: documentIdSegmentSchema.optional(),\n })\n .strict()\n .nullish();\nexport type ListRetainedEvidenceInventoryInput = z.infer<typeof ListRetainedEvidenceInventoryInputSchema>;\n\nexport const ListRetainedEvidenceInventoryResultSchema = z\n .object({\n rows: z.array(NciiRetainedEvidenceInventoryV1Schema),\n /** Pass as `cursor` for the next page; null when this page reached the end. */\n nextCursor: RetainedEvidenceInventoryCursorSchema.nullable(),\n /** Every inventory row, counted with an aggregate. */\n total: z.number().int().nonnegative(),\n })\n .strict();\nexport type ListRetainedEvidenceInventoryResult = z.infer<typeof ListRetainedEvidenceInventoryResultSchema>;\n\n// ---------------------------------------------------------------------------\n// listRetainedChildSafetyCases — the Retention tab's paged list of closed child-safety cases whose\n// evidence is still preserved.\n// ---------------------------------------------------------------------------\n\n/**\n * A closed child-safety case is retained while its evidence is: every preservation status but\n * `destroyed`. The list reads cases whose `workStatus` is `operationallyResolved` (the one closed\n * work status) and whose `preservationStatus` is one of these, newest `createdAt` first.\n */\nexport const CHILD_SAFETY_RETAINED_PRESERVATION_STATUSES = ChildSafetyPreservationStatusSchema.exclude([\n 'destroyed',\n]).options;\n\n/** Cursor for the retained child-safety case list — the last row's `(createdAt, docId)`. */\nexport const RetainedChildSafetyCaseCursorSchema = createdAtCursorSchema();\nexport type RetainedChildSafetyCaseCursor = z.infer<typeof RetainedChildSafetyCaseCursorSchema>;\n\nexport const ListRetainedChildSafetyCasesInputSchema = z\n .object({\n pageSize: z.number().int().min(1).max(RETENTION_LIST_MAX_PAGE_SIZE).optional(),\n cursor: RetainedChildSafetyCaseCursorSchema.nullish(),\n /** Exact caseId lookup — returns just that case when it is retained (or none), ignoring the cursor. */\n exactId: documentIdSegmentSchema.optional(),\n })\n .strict()\n .nullish();\nexport type ListRetainedChildSafetyCasesInput = z.infer<typeof ListRetainedChildSafetyCasesInputSchema>;\n\n/** One retained case: its list projection and its own evidence jobs (read by case, never a global window). */\nexport const RetainedChildSafetyCaseRowSchema = z\n .object({\n case: ChildSafetyCaseListV1Schema,\n evidenceJobs: z.array(SafetyEvidenceJobSummarySchema),\n })\n .strict();\nexport type RetainedChildSafetyCaseRow = z.infer<typeof RetainedChildSafetyCaseRowSchema>;\n\nexport const ListRetainedChildSafetyCasesResultSchema = z\n .object({\n rows: z.array(RetainedChildSafetyCaseRowSchema),\n /** Pass as `cursor` for the next page; null when this page reached the end. */\n nextCursor: RetainedChildSafetyCaseCursorSchema.nullable(),\n /** Every retained case, counted with an aggregate. */\n total: z.number().int().nonnegative(),\n })\n .strict();\nexport type ListRetainedChildSafetyCasesResult = z.infer<typeof ListRetainedChildSafetyCasesResultSchema>;\n\n// ---------------------------------------------------------------------------\n// ncmecOperatorCommands — NCMEC manual-portal completion path.\n// ---------------------------------------------------------------------------\n\nexport const RecordNcmecPortalReceiptArtifactInputSchema = z\n .object({\n caseId: safetyCaseIdSchema,\n submissionId: documentIdSegmentSchema,\n /** The key of an object already in the restricted evidence vault (verified via statObject). */\n evidenceVaultKey: z.string().min(1, 'An evidence vault object key is required.'),\n /** Optional operator description of what the artifact is (e.g. \"NCMEC portal screenshot\"). */\n description: z.string().min(1).max(MAX_SAFETY_ARTIFACT_DESCRIPTION_LENGTH).optional(),\n /** Explicit typed confirmation (interim control until the passkey profile lands). */\n confirmation: z.literal(NCMEC_PORTAL_RECEIPT_CONFIRMATION),\n })\n .strict();\nexport type RecordNcmecPortalReceiptArtifactInput = z.infer<\n typeof RecordNcmecPortalReceiptArtifactInputSchema\n>;\n\nexport const MarkNcmecPortalCompleteInputSchema = z\n .object({\n caseId: safetyCaseIdSchema,\n submissionId: documentIdSegmentSchema,\n /** [Q13/H-06] The ID of an existing NcmecPortalReceiptArtifactV1 record bound to this (caseId, submissionId). */\n artifactId: documentIdSegmentSchema,\n /** [Q13/H-06] The object generation recorded on the artifact at registration time (immutable-object peg). */\n artifactObjectGeneration: z.string().min(1, 'The artifact object generation is required.'),\n /** [Q13/H-06] The sha256 hex digest recorded on the artifact at registration time (content-integrity check). */\n artifactSha256: z.string().regex(/^[0-9a-f]{64}$/, 'artifactSha256 must be a 64-character hex string.'),\n /** Optional operator free-text note describing the portal confirmation. */\n proofText: z.string().min(1).max(MAX_NCMEC_PORTAL_PROOF_TEXT_LENGTH).optional(),\n /** The NCMEC-assigned report id — REQUIRED (it IS the proof; no \"filed, number pending\" grace). */\n ncmecReportId: z.string().min(1, 'The NCMEC report id is required to mark the report complete.'),\n /** Explicit typed confirmation (interim control until the passkey profile lands). */\n confirmation: z.literal(NCMEC_MANUAL_PORTAL_FILED_CONFIRMATION),\n })\n .strict();\nexport type MarkNcmecPortalCompleteInput = z.infer<typeof MarkNcmecPortalCompleteInputSchema>;\n\n// ---------------------------------------------------------------------------\n// operatorStepUp — app-level TOTP step-up (confirm / verify a 6-digit code).\n// ---------------------------------------------------------------------------\n\nexport const OperatorStepUpCodeInputSchema = z\n .object({\n code: z.string().trim().regex(/^\\d{6}$/u, 'Enter the 6-digit code.'),\n })\n .strict();\nexport type OperatorStepUpCodeInput = z.infer<typeof OperatorStepUpCodeInputSchema>;\n\n// ---------------------------------------------------------------------------\n// revealCaseEvidence — metadata→evidence reveal under reauth.\n// ---------------------------------------------------------------------------\n\nexport const RevealCaseEvidenceInputSchema = z\n .object({\n caseId: safetyCaseIdSchema,\n /** Explicit typed confirmation (interim control until the passkey profile lands). */\n confirmation: z.literal(REVEAL_CASE_EVIDENCE_CONFIRMATION),\n /** The operator's child-safety warning acknowledgement, carried so the backend can persist it\n * in the reveal audit trail. This schema serves ONLY the safety-console reveal-under-reauth\n * flow (its sibling `confirmation` literal gates the same surface), so the acknowledgement is a\n * required `true` — consistent with the existing explicit-confirmation style. Server-side\n * enforcement + audit persistence land app-side. */\n warningAcknowledged: z.literal(true),\n })\n .strict();\nexport type RevealCaseEvidenceInput = z.infer<typeof RevealCaseEvidenceInputSchema>;\n\n// ---------------------------------------------------------------------------\n// refetchProtectedCaseContext — operator manual re-fetch of protected chat context.\n// ---------------------------------------------------------------------------\n\nexport const RefetchProtectedCaseContextInputSchema = z\n .object({\n caseId: safetyCaseIdSchema,\n lane: SafetyCaseLaneSchema,\n })\n .strict();\nexport type RefetchProtectedCaseContextInput = z.infer<typeof RefetchProtectedCaseContextInputSchema>;\n\n// ---------------------------------------------------------------------------\n// recordNcmecPortalCorrection — record an operator's NCMEC manual-portal correction filing.\n// ---------------------------------------------------------------------------\n\nexport const RecordNcmecPortalCorrectionInputSchema = z\n .object({\n caseId: safetyCaseIdSchema,\n ncmecReportId: z.string().min(1),\n correctionFiledAt: z.number(),\n reason: z.string().min(1).max(MAX_INTERNAL_REASON_LENGTH),\n confirmation: z.literal(NCMEC_PORTAL_CORRECTION_CONFIRMATION),\n })\n .strict();\nexport type RecordNcmecPortalCorrectionInput = z.infer<typeof RecordNcmecPortalCorrectionInputSchema>;\n\n// ---------------------------------------------------------------------------\n// submitReport — the one report-intake callable. The target ids are HINTS the server re-derives\n// (never owner or target authority): each is bounded and shaped as the path it could become, and\n// `parentItemId` may be a chat channel or conversation-file reference of two ids joined by \"/\".\n// ---------------------------------------------------------------------------\nexport const SubmitReportInputSchema = z\n .object({\n itemType: ReportableItemTypeSchema,\n reportedItemId: reportTargetItemIdSchema,\n parentItemId: reportTargetParentRefSchema.optional(),\n /** HINT ONLY — ignored as owner authority (the owner is server-derived). */\n reportedUserId: reportTargetUserIdSchema.optional(),\n reason: ReportReasonSchema,\n /** Free-text reporter narrative (segregated; never inlined on the public projection). */\n comment: z.string().max(MAX_REPORT_NARRATIVE_LENGTH).optional(),\n narrative: z.string().max(MAX_REPORT_NARRATIVE_LENGTH).optional(),\n /** The user-confirmed SECOND call that escalates an EXISTING report on this target to a\n * protected reason (Child Safety / NCII). Only meaningful with a protected reason and an\n * existing report; ignored otherwise. */\n confirmUpgrade: z.boolean().optional(),\n })\n .strict();\nexport type SubmitReportInput = z.infer<typeof SubmitReportInputSchema>;\n"]}
|
|
@@ -42,6 +42,15 @@ export declare const CurateProfanityListInputSchema: z.ZodObject<{
|
|
|
42
42
|
remove: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
43
43
|
}, z.core.$strict>;
|
|
44
44
|
export type CurateProfanityListInput = z.infer<typeof CurateProfanityListInputSchema>;
|
|
45
|
+
/** The `curateProfanityList` answer: the terms it added and removed, and the list's size after it.
|
|
46
|
+
* Non-strict (server → client result posture). */
|
|
47
|
+
export declare const CurateProfanityListResultSchema: z.ZodObject<{
|
|
48
|
+
success: z.ZodLiteral<true>;
|
|
49
|
+
added: z.ZodArray<z.ZodString>;
|
|
50
|
+
removed: z.ZodArray<z.ZodString>;
|
|
51
|
+
wordCount: z.ZodNumber;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
export type CurateProfanityListResult = z.infer<typeof CurateProfanityListResultSchema>;
|
|
45
54
|
export declare const SubmitContentAppealInputSchema: z.ZodObject<{
|
|
46
55
|
violationId: z.ZodString;
|
|
47
56
|
appealMessage: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../../src/schemas/utility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../../src/schemas/utility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,eAAO,MAAM,kCAAkC;;kBAEpC,CAAC;AACZ,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAK9F,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;kCAkBrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAI9E,eAAO,MAAM,4BAA4B,iCAAwB,CAAC;AAClE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,gCAAgC,iCAAwB,CAAC;AACtE,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F,eAAO,MAAM,oCAAoC,iCAAwB,CAAC;AAC1E,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC;AAMlG,eAAO,MAAM,iCAAiC,iCAAwB,CAAC;AACvE,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC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AM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAMtF,eAAO,MAAM,gCAAgC;;;kBAGlC,CAAC;AACZ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAI1F,yFAAyF;AACzF,eAAO,MAAM,iCAAiC;;;;iBAI5C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAI5F,eAAO,MAAM,+BAA+B;;;;;;iBAS1C,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAIxF,eAAO,MAAM,mCAAmC;;;;;iBAQ9C,CAAC;AACH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC"}
|
package/dist/schemas/utility.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { violationIdSchema, auditionIdSchema, auditionEntryIdSchema, commissionListingIdSchema, shortLinkIdSchema, adminDispatchIdSchema, hallItemIdSchema, } from './atoms.js';
|
|
3
3
|
import { MAX_APPEAL_MESSAGE_LENGTH, MAX_FEEDBACK_SUGGESTION_LENGTH, FEEDBACK_TYPES } from '../constants/business.js';
|
|
4
|
+
import { MIN_CURATED_PROFANITY_TERM_LENGTH, MAX_CURATED_PROFANITY_TERM_LENGTH, MAX_CURATED_PROFANITY_TERMS_PER_REQUEST, } from '../constants/moderation.js';
|
|
4
5
|
export const AcceptViolationDecisionInputSchema = z.object({
|
|
5
6
|
violationId: violationIdSchema,
|
|
6
7
|
}).strict();
|
|
@@ -45,19 +46,27 @@ export const SeedDmcaPolicyInputSchema = z.object({}).strict();
|
|
|
45
46
|
* term with a line break is refused here rather than failing every later publish. */
|
|
46
47
|
const curatedProfanityTermSchema = z
|
|
47
48
|
.string()
|
|
48
|
-
.min(
|
|
49
|
-
.max(
|
|
49
|
+
.min(MIN_CURATED_PROFANITY_TERM_LENGTH)
|
|
50
|
+
.max(MAX_CURATED_PROFANITY_TERM_LENGTH)
|
|
50
51
|
.regex(/^[^\r\n\u2028\u2029]*$/);
|
|
51
52
|
/** Admin add/remove words on the self-owned curated profanity list (no external sync). */
|
|
52
53
|
export const CurateProfanityListInputSchema = z
|
|
53
54
|
.object({
|
|
54
|
-
add: z.array(curatedProfanityTermSchema).max(
|
|
55
|
-
remove: z.array(curatedProfanityTermSchema).max(
|
|
55
|
+
add: z.array(curatedProfanityTermSchema).max(MAX_CURATED_PROFANITY_TERMS_PER_REQUEST).optional(),
|
|
56
|
+
remove: z.array(curatedProfanityTermSchema).max(MAX_CURATED_PROFANITY_TERMS_PER_REQUEST).optional(),
|
|
56
57
|
})
|
|
57
58
|
.strict()
|
|
58
59
|
.refine((v) => (v.add?.length ?? 0) + (v.remove?.length ?? 0) > 0, {
|
|
59
60
|
message: 'Provide at least one word to add or remove.',
|
|
60
61
|
});
|
|
62
|
+
/** The `curateProfanityList` answer: the terms it added and removed, and the list's size after it.
|
|
63
|
+
* Non-strict (server → client result posture). */
|
|
64
|
+
export const CurateProfanityListResultSchema = z.object({
|
|
65
|
+
success: z.literal(true),
|
|
66
|
+
added: z.array(z.string()),
|
|
67
|
+
removed: z.array(z.string()),
|
|
68
|
+
wordCount: z.number().int().nonnegative(),
|
|
69
|
+
});
|
|
61
70
|
export const SubmitContentAppealInputSchema = z.object({
|
|
62
71
|
violationId: violationIdSchema,
|
|
63
72
|
appealMessage: z.string().min(1).max(MAX_APPEAL_MESSAGE_LENGTH),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utility.js","sourceRoot":"","sources":["../../src/schemas/utility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,iBAAiB,EACjB,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,CAAC;AAGZ,8EAA8E;AAE9E,yFAAyF;AACzF,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,MAAM,CAAC;IACxD,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IACxB,eAAe,EAAE,qBAAqB;IACtC,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;CAClD,CAAC,CAAC;AAGH,0FAA0F;AAC1F,wFAAwF;AACxF,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IACtD,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IACxB,WAAW,EAAE,iBAAiB;IAC9B,iDAAiD;IACjD,YAAY,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;IAClC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB;iGAC6F;IAC7F,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAC;AAGH,yFAAyF;AACzF,wFAAwF;AACxF,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1D,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IACxB,WAAW,EAAE,iBAAiB;IAC9B,iEAAiE;IACjE,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE;IAC3B;iGAC6F;IAC7F,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport {\n violationIdSchema,\n auditionIdSchema,\n auditionEntryIdSchema,\n commissionListingIdSchema,\n shortLinkIdSchema,\n adminDispatchIdSchema,\n hallItemIdSchema,\n} from './atoms.js';\nimport { MAX_APPEAL_MESSAGE_LENGTH, MAX_FEEDBACK_SUGGESTION_LENGTH, FEEDBACK_TYPES } from '../constants/business.js';\n\nexport const AcceptViolationDecisionInputSchema = z.object({\n violationId: violationIdSchema,\n}).strict();\nexport type AcceptViolationDecisionInput = z.infer<typeof AcceptViolationDecisionInputSchema>;\n\n// One member per `ShortLinkTargetTypeSchema` value (schemas/atoms.ts), each carrying exactly the\n// id(s) its destination URL needs.\n\nexport const CreateShortLinkInputSchema = z.discriminatedUnion('targetType', [\n z.object({\n targetType: z.literal('audition'),\n auditionId: auditionIdSchema,\n }).strict(),\n z.object({\n targetType: z.literal('audition-entry'),\n auditionId: auditionIdSchema,\n auditionEntryId: auditionEntryIdSchema,\n }).strict(),\n z.object({\n targetType: z.literal('commission'),\n commissionListingId: commissionListingIdSchema,\n }).strict(),\n z.object({\n targetType: z.literal('hall-library-item'),\n hallItemId: hallItemIdSchema,\n }).strict(),\n]);\nexport type CreateShortLinkInput = z.infer<typeof CreateShortLinkInputSchema>;\n\n// No-input seed callables (Ready for Launch tab). Each prepopulates one system\n// dataset from a canonical backend constant; the input is intentionally empty.\nexport const SeedProfanityListInputSchema = z.object({}).strict();\nexport type SeedProfanityListInput = z.infer<typeof SeedProfanityListInputSchema>;\n\nexport const SeedReservedUsernamesInputSchema = z.object({}).strict();\nexport type SeedReservedUsernamesInput = z.infer<typeof SeedReservedUsernamesInputSchema>;\n\nexport const SeedBlockedFranchiseNamesInputSchema = z.object({}).strict();\nexport type SeedBlockedFranchiseNamesInput = z.infer<typeof SeedBlockedFranchiseNamesInputSchema>;\n\n// Public-document seed callables (Ready for Launch tab), one per PublicDocumentId. Each\n// publishes its document's launch content as v1 through the public-document release owner,\n// only while that document has never been published (otherwise a no-op). The input is\n// intentionally empty.\nexport const SeedRulesAndAgreementsInputSchema = z.object({}).strict();\nexport type SeedRulesAndAgreementsInput = z.infer<typeof SeedRulesAndAgreementsInputSchema>;\n\nexport const SeedFuturePlansInputSchema = z.object({}).strict();\nexport type SeedFuturePlansInput = z.infer<typeof SeedFuturePlansInputSchema>;\n\nexport const SeedTermsPageInputSchema = z.object({}).strict();\nexport type SeedTermsPageInput = z.infer<typeof SeedTermsPageInputSchema>;\n\nexport const SeedPrivacyPageInputSchema = z.object({}).strict();\nexport type SeedPrivacyPageInput = z.infer<typeof SeedPrivacyPageInputSchema>;\n\nexport const SeedTakeItDownPageCopyInputSchema = z.object({}).strict();\nexport type SeedTakeItDownPageCopyInput = z.infer<typeof SeedTakeItDownPageCopyInputSchema>;\n\nexport const SeedDmcaPolicyInputSchema = z.object({}).strict();\nexport type SeedDmcaPolicyInput = z.infer<typeof SeedDmcaPolicyInputSchema>;\n\n/** One curated word-list term. The published list is hashed with edge-protocol-core's\n * `hashStringSet`, which joins terms with a line break and refuses a term holding one, so a\n * term with a line break is refused here rather than failing every later publish. */\nconst curatedProfanityTermSchema = z\n .string()\n .min(1)\n .max(64)\n .regex(/^[^\\r\\n\\u2028\\u2029]*$/);\n\n/** Admin add/remove words on the self-owned curated profanity list (no external sync). */\nexport const CurateProfanityListInputSchema = z\n .object({\n add: z.array(curatedProfanityTermSchema).max(500).optional(),\n remove: z.array(curatedProfanityTermSchema).max(500).optional(),\n })\n .strict()\n .refine((v) => (v.add?.length ?? 0) + (v.remove?.length ?? 0) > 0, {\n message: 'Provide at least one word to add or remove.',\n });\nexport type CurateProfanityListInput = z.infer<typeof CurateProfanityListInputSchema>;\n\nexport const SubmitContentAppealInputSchema = z.object({\n violationId: violationIdSchema,\n appealMessage: z.string().min(1).max(MAX_APPEAL_MESSAGE_LENGTH),\n}).strict();\nexport type SubmitContentAppealInput = z.infer<typeof SubmitContentAppealInputSchema>;\n\nexport const SubmitFeedbackInputSchema = z.object({\n feedbackType: z.enum(FEEDBACK_TYPES),\n suggestion: z.string().min(1).max(MAX_FEEDBACK_SUGGESTION_LENGTH).regex(/^[a-z]+$/),\n}).strict();\nexport type SubmitFeedbackInput = z.infer<typeof SubmitFeedbackInputSchema>;\n\nexport const TrackShortLinkClickInputSchema = z.object({\n shortId: shortLinkIdSchema.max(64),\n}).strict();\nexport type TrackShortLinkClickInput = z.infer<typeof TrackShortLinkClickInputSchema>;\n\n// The caller marks the thread seen through the newest message it has on screen. The server\n// moves the caller's OWN marker (AdminDispatchReadMarkerSchema) to that time, never past the\n// thread's latest message and never backwards, so a message that arrived after the screen\n// rendered stays unseen.\nexport const MarkAdminDispatchReadInputSchema = z.object({\n adminDispatchId: adminDispatchIdSchema.max(128),\n seenThroughMessageAt: z.number().int().nonnegative(),\n}).strict();\nexport type MarkAdminDispatchReadInput = z.infer<typeof MarkAdminDispatchReadInputSchema>;\n\n// --- Authoritative mutation RESULTS (non-strict server → client posture) ---\n\n/** The caller's committed marker — the client patches its cached thread rows from it. */\nexport const MarkAdminDispatchReadResultSchema = z.object({\n success: z.literal(true),\n adminDispatchId: adminDispatchIdSchema,\n lastSeenMessageAt: z.number().int().nonnegative(),\n});\nexport type MarkAdminDispatchReadResult = z.infer<typeof MarkAdminDispatchReadResultSchema>;\n\n// submitContentAppeal — the transaction sets appealStatus 'pending' + appealedAt = now on\n// the violation; both are known at commit and let the client patch its violations list.\nexport const SubmitContentAppealResultSchema = z.object({\n success: z.literal(true),\n violationId: violationIdSchema,\n /** The violation's appeal state after commit. */\n appealStatus: z.literal('pending'),\n appealedAt: z.number(),\n /** Operation-receipt audit id — the `content.appealSubmitted` event written in the same\n * transaction. Optional/additive; the domain id (`violationId`) is already carried above. */\n auditEventId: z.string().min(1).optional(),\n});\nexport type SubmitContentAppealResult = z.infer<typeof SubmitContentAppealResultSchema>;\n\n// acceptViolationDecision — the violation record (and its pendingMedia/archive docs) are\n// removed at commit; the client drops the row from its violation + pendingMedia caches.\nexport const AcceptViolationDecisionResultSchema = z.object({\n success: z.literal(true),\n violationId: violationIdSchema,\n /** True when the record was already gone (idempotent accept). */\n alreadyRemoved: z.boolean(),\n /** Operation-receipt audit id — the `content.violationAccepted` event written in the same\n * transaction. Optional/additive; the domain id (`violationId`) is already carried above. */\n auditEventId: z.string().min(1).optional(),\n});\nexport type AcceptViolationDecisionResult = z.infer<typeof AcceptViolationDecisionResultSchema>;\n\n"]}
|
|
1
|
+
{"version":3,"file":"utility.js","sourceRoot":"","sources":["../../src/schemas/utility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,yBAAyB,EACzB,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,yBAAyB,EAAE,8BAA8B,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AACrH,OAAO,EACL,iCAAiC,EACjC,iCAAiC,EACjC,uCAAuC,GACxC,MAAM,4BAA4B,CAAC;AAEpC,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC,MAAM,CAAC;IACzD,WAAW,EAAE,iBAAiB;CAC/B,CAAC,CAAC,MAAM,EAAE,CAAC;AAGZ,iGAAiG;AACjG,mCAAmC;AAEnC,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,kBAAkB,CAAC,YAAY,EAAE;IAC3E,CAAC,CAAC,MAAM,CAAC;QACP,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;QACjC,UAAU,EAAE,gBAAgB;KAC7B,CAAC,CAAC,MAAM,EAAE;IACX,CAAC,CAAC,MAAM,CAAC;QACP,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC;QACvC,UAAU,EAAE,gBAAgB;QAC5B,eAAe,EAAE,qBAAqB;KACvC,CAAC,CAAC,MAAM,EAAE;IACX,CAAC,CAAC,MAAM,CAAC;QACP,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC;QACnC,mBAAmB,EAAE,yBAAyB;KAC/C,CAAC,CAAC,MAAM,EAAE;IACX,CAAC,CAAC,MAAM,CAAC;QACP,UAAU,EAAE,C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U,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB;iGAC6F;IAC7F,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAC;AAGH,yFAAyF;AACzF,wFAAwF;AACxF,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1D,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IACxB,WAAW,EAAE,iBAAiB;IAC9B,iEAAiE;IACjE,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE;IAC3B;iGAC6F;IAC7F,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport {\n violationIdSchema,\n auditionIdSchema,\n auditionEntryIdSchema,\n commissionListingIdSchema,\n shortLinkIdSchema,\n adminDispatchIdSchema,\n hallItemIdSchema,\n} from './atoms.js';\nimport { MAX_APPEAL_MESSAGE_LENGTH, MAX_FEEDBACK_SUGGESTION_LENGTH, FEEDBACK_TYPES } from '../constants/business.js';\nimport {\n MIN_CURATED_PROFANITY_TERM_LENGTH,\n MAX_CURATED_PROFANITY_TERM_LENGTH,\n MAX_CURATED_PROFANITY_TERMS_PER_REQUEST,\n} from '../constants/moderation.js';\n\nexport const AcceptViolationDecisionInputSchema = z.object({\n violationId: violationIdSchema,\n}).strict();\nexport type AcceptViolationDecisionInput = z.infer<typeof AcceptViolationDecisionInputSchema>;\n\n// One member per `ShortLinkTargetTypeSchema` value (schemas/atoms.ts), each carrying exactly the\n// id(s) its destination URL needs.\n\nexport const CreateShortLinkInputSchema = z.discriminatedUnion('targetType', [\n z.object({\n targetType: z.literal('audition'),\n auditionId: auditionIdSchema,\n }).strict(),\n z.object({\n targetType: z.literal('audition-entry'),\n auditionId: auditionIdSchema,\n auditionEntryId: auditionEntryIdSchema,\n }).strict(),\n z.object({\n targetType: z.literal('commission'),\n commissionListingId: commissionListingIdSchema,\n }).strict(),\n z.object({\n targetType: z.literal('hall-library-item'),\n hallItemId: hallItemIdSchema,\n }).strict(),\n]);\nexport type CreateShortLinkInput = z.infer<typeof CreateShortLinkInputSchema>;\n\n// No-input seed callables (Ready for Launch tab). Each prepopulates one system\n// dataset from a canonical backend constant; the input is intentionally empty.\nexport const SeedProfanityListInputSchema = z.object({}).strict();\nexport type SeedProfanityListInput = z.infer<typeof SeedProfanityListInputSchema>;\n\nexport const SeedReservedUsernamesInputSchema = z.object({}).strict();\nexport type SeedReservedUsernamesInput = z.infer<typeof SeedReservedUsernamesInputSchema>;\n\nexport const SeedBlockedFranchiseNamesInputSchema = z.object({}).strict();\nexport type SeedBlockedFranchiseNamesInput = z.infer<typeof SeedBlockedFranchiseNamesInputSchema>;\n\n// Public-document seed callables (Ready for Launch tab), one per PublicDocumentId. Each\n// publishes its document's launch content as v1 through the public-document release owner,\n// only while that document has never been published (otherwise a no-op). The input is\n// intentionally empty.\nexport const SeedRulesAndAgreementsInputSchema = z.object({}).strict();\nexport type SeedRulesAndAgreementsInput = z.infer<typeof SeedRulesAndAgreementsInputSchema>;\n\nexport const SeedFuturePlansInputSchema = z.object({}).strict();\nexport type SeedFuturePlansInput = z.infer<typeof SeedFuturePlansInputSchema>;\n\nexport const SeedTermsPageInputSchema = z.object({}).strict();\nexport type SeedTermsPageInput = z.infer<typeof SeedTermsPageInputSchema>;\n\nexport const SeedPrivacyPageInputSchema = z.object({}).strict();\nexport type SeedPrivacyPageInput = z.infer<typeof SeedPrivacyPageInputSchema>;\n\nexport const SeedTakeItDownPageCopyInputSchema = z.object({}).strict();\nexport type SeedTakeItDownPageCopyInput = z.infer<typeof SeedTakeItDownPageCopyInputSchema>;\n\nexport const SeedDmcaPolicyInputSchema = z.object({}).strict();\nexport type SeedDmcaPolicyInput = z.infer<typeof SeedDmcaPolicyInputSchema>;\n\n/** One curated word-list term. The published list is hashed with edge-protocol-core's\n * `hashStringSet`, which joins terms with a line break and refuses a term holding one, so a\n * term with a line break is refused here rather than failing every later publish. */\nconst curatedProfanityTermSchema = z\n .string()\n .min(MIN_CURATED_PROFANITY_TERM_LENGTH)\n .max(MAX_CURATED_PROFANITY_TERM_LENGTH)\n .regex(/^[^\\r\\n\\u2028\\u2029]*$/);\n\n/** Admin add/remove words on the self-owned curated profanity list (no external sync). */\nexport const CurateProfanityListInputSchema = z\n .object({\n add: z.array(curatedProfanityTermSchema).max(MAX_CURATED_PROFANITY_TERMS_PER_REQUEST).optional(),\n remove: z.array(curatedProfanityTermSchema).max(MAX_CURATED_PROFANITY_TERMS_PER_REQUEST).optional(),\n })\n .strict()\n .refine((v) => (v.add?.length ?? 0) + (v.remove?.length ?? 0) > 0, {\n message: 'Provide at least one word to add or remove.',\n });\nexport type CurateProfanityListInput = z.infer<typeof CurateProfanityListInputSchema>;\n\n/** The `curateProfanityList` answer: the terms it added and removed, and the list's size after it.\n * Non-strict (server → client result posture). */\nexport const CurateProfanityListResultSchema = z.object({\n success: z.literal(true),\n added: z.array(z.string()),\n removed: z.array(z.string()),\n wordCount: z.number().int().nonnegative(),\n});\nexport type CurateProfanityListResult = z.infer<typeof CurateProfanityListResultSchema>;\n\nexport const SubmitContentAppealInputSchema = z.object({\n violationId: violationIdSchema,\n appealMessage: z.string().min(1).max(MAX_APPEAL_MESSAGE_LENGTH),\n}).strict();\nexport type SubmitContentAppealInput = z.infer<typeof SubmitContentAppealInputSchema>;\n\nexport const SubmitFeedbackInputSchema = z.object({\n feedbackType: z.enum(FEEDBACK_TYPES),\n suggestion: z.string().min(1).max(MAX_FEEDBACK_SUGGESTION_LENGTH).regex(/^[a-z]+$/),\n}).strict();\nexport type SubmitFeedbackInput = z.infer<typeof SubmitFeedbackInputSchema>;\n\nexport const TrackShortLinkClickInputSchema = z.object({\n shortId: shortLinkIdSchema.max(64),\n}).strict();\nexport type TrackShortLinkClickInput = z.infer<typeof TrackShortLinkClickInputSchema>;\n\n// The caller marks the thread seen through the newest message it has on screen. The server\n// moves the caller's OWN marker (AdminDispatchReadMarkerSchema) to that time, never past the\n// thread's latest message and never backwards, so a message that arrived after the screen\n// rendered stays unseen.\nexport const MarkAdminDispatchReadInputSchema = z.object({\n adminDispatchId: adminDispatchIdSchema.max(128),\n seenThroughMessageAt: z.number().int().nonnegative(),\n}).strict();\nexport type MarkAdminDispatchReadInput = z.infer<typeof MarkAdminDispatchReadInputSchema>;\n\n// --- Authoritative mutation RESULTS (non-strict server → client posture) ---\n\n/** The caller's committed marker — the client patches its cached thread rows from it. */\nexport const MarkAdminDispatchReadResultSchema = z.object({\n success: z.literal(true),\n adminDispatchId: adminDispatchIdSchema,\n lastSeenMessageAt: z.number().int().nonnegative(),\n});\nexport type MarkAdminDispatchReadResult = z.infer<typeof MarkAdminDispatchReadResultSchema>;\n\n// submitContentAppeal — the transaction sets appealStatus 'pending' + appealedAt = now on\n// the violation; both are known at commit and let the client patch its violations list.\nexport const SubmitContentAppealResultSchema = z.object({\n success: z.literal(true),\n violationId: violationIdSchema,\n /** The violation's appeal state after commit. */\n appealStatus: z.literal('pending'),\n appealedAt: z.number(),\n /** Operation-receipt audit id — the `content.appealSubmitted` event written in the same\n * transaction. Optional/additive; the domain id (`violationId`) is already carried above. */\n auditEventId: z.string().min(1).optional(),\n});\nexport type SubmitContentAppealResult = z.infer<typeof SubmitContentAppealResultSchema>;\n\n// acceptViolationDecision — the violation record (and its pendingMedia/archive docs) are\n// removed at commit; the client drops the row from its violation + pendingMedia caches.\nexport const AcceptViolationDecisionResultSchema = z.object({\n success: z.literal(true),\n violationId: violationIdSchema,\n /** True when the record was already gone (idempotent accept). */\n alreadyRemoved: z.boolean(),\n /** Operation-receipt audit id — the `content.violationAccepted` event written in the same\n * transaction. Optional/additive; the domain id (`violationId`) is already carried above. */\n auditEventId: z.string().min(1).optional(),\n});\nexport type AcceptViolationDecisionResult = z.infer<typeof AcceptViolationDecisionResultSchema>;\n\n"]}
|
|
@@ -15,6 +15,7 @@ export declare const RealmSharedFileProjectionSchema: z.ZodObject<{
|
|
|
15
15
|
name: z.ZodString;
|
|
16
16
|
realmFileFolderId: z.ZodString;
|
|
17
17
|
creatorUid: z.ZodString;
|
|
18
|
+
createdAt: z.ZodNumber;
|
|
18
19
|
workProjectId: z.ZodString;
|
|
19
20
|
workFileId: z.ZodString;
|
|
20
21
|
}, z.core.$strict>;
|
|
@@ -53,6 +54,7 @@ export declare const GetRealmSharedFilesResponseSchema: z.ZodObject<{
|
|
|
53
54
|
name: z.ZodString;
|
|
54
55
|
realmFileFolderId: z.ZodString;
|
|
55
56
|
creatorUid: z.ZodString;
|
|
57
|
+
createdAt: z.ZodNumber;
|
|
56
58
|
workProjectId: z.ZodString;
|
|
57
59
|
workFileId: z.ZodString;
|
|
58
60
|
}, z.core.$strict>>;
|
|
@@ -183,6 +185,7 @@ export declare const RealmFileListsChangeSchema: z.ZodObject<{
|
|
|
183
185
|
name: z.ZodString;
|
|
184
186
|
realmFileFolderId: z.ZodString;
|
|
185
187
|
creatorUid: z.ZodString;
|
|
188
|
+
createdAt: z.ZodNumber;
|
|
186
189
|
workProjectId: z.ZodString;
|
|
187
190
|
workFileId: z.ZodString;
|
|
188
191
|
}, z.core.$strict>>;
|
|
@@ -219,10 +222,12 @@ export declare const RealmFileListsChangeSchema: z.ZodObject<{
|
|
|
219
222
|
}, z.core.$strict>;
|
|
220
223
|
export type RealmFileListsChange = z.infer<typeof RealmFileListsChangeSchema>;
|
|
221
224
|
/** The answer of every action that changes a file's Realm standing: request, withdraw, approve,
|
|
222
|
-
* decline, canon toggle, folder move, and the admin un-share.
|
|
225
|
+
* decline, canon toggle, folder move, and the admin un-share. `change` is present when the read
|
|
226
|
+
* after the commit succeeded; a failed read never fails an action that already committed (ENG-009),
|
|
227
|
+
* and the client keeps its loaded pages when it is absent. Non-strict (server → client). */
|
|
223
228
|
export declare const RealmFileTransitionResultSchema: z.ZodObject<{
|
|
224
229
|
success: z.ZodLiteral<true>;
|
|
225
|
-
change: z.ZodObject<{
|
|
230
|
+
change: z.ZodOptional<z.ZodObject<{
|
|
226
231
|
mediaAssetId: z.ZodString;
|
|
227
232
|
workProjectId: z.ZodString;
|
|
228
233
|
workFileId: z.ZodString;
|
|
@@ -240,6 +245,7 @@ export declare const RealmFileTransitionResultSchema: z.ZodObject<{
|
|
|
240
245
|
name: z.ZodString;
|
|
241
246
|
realmFileFolderId: z.ZodString;
|
|
242
247
|
creatorUid: z.ZodString;
|
|
248
|
+
createdAt: z.ZodNumber;
|
|
243
249
|
workProjectId: z.ZodString;
|
|
244
250
|
workFileId: z.ZodString;
|
|
245
251
|
}, z.core.$strict>>;
|
|
@@ -273,17 +279,18 @@ export declare const RealmFileTransitionResultSchema: z.ZodObject<{
|
|
|
273
279
|
name: z.ZodString;
|
|
274
280
|
fileCount: z.ZodNumber;
|
|
275
281
|
}, z.core.$strict>>;
|
|
276
|
-
}, z.core.$strict
|
|
282
|
+
}, z.core.$strict>>;
|
|
277
283
|
}, z.core.$strip>;
|
|
278
284
|
export type RealmFileTransitionResult = z.infer<typeof RealmFileTransitionResultSchema>;
|
|
279
|
-
/** The answer of a Realm folder create or rename: the folder as the gallery shows it
|
|
285
|
+
/** The answer of a Realm folder create or rename: the folder as the gallery shows it, present when
|
|
286
|
+
* the read after the commit succeeded (ENG-009; the client keeps its pages when it is absent). */
|
|
280
287
|
export declare const RealmFileFolderResultSchema: z.ZodObject<{
|
|
281
288
|
success: z.ZodLiteral<true>;
|
|
282
|
-
folder: z.ZodObject<{
|
|
289
|
+
folder: z.ZodOptional<z.ZodObject<{
|
|
283
290
|
realmFileFolderId: z.ZodString;
|
|
284
291
|
name: z.ZodString;
|
|
285
292
|
fileCount: z.ZodNumber;
|
|
286
|
-
}, z.core.$strict
|
|
293
|
+
}, z.core.$strict>>;
|
|
287
294
|
}, z.core.$strip>;
|
|
288
295
|
export type RealmFileFolderResult = z.infer<typeof RealmFileFolderResultSchema>;
|
|
289
296
|
/** The answer of a Realm folder delete: the folder it removed. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"work-project-management.d.ts","sourceRoot":"","sources":["../../src/schemas/work-project-management.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAyDxB;mEACmE;AACnE,eAAO,MAAM,+BAA+B
|
|
1
|
+
{"version":3,"file":"work-project-management.d.ts","sourceRoot":"","sources":["../../src/schemas/work-project-management.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAyDxB;mEACmE;AACnE,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;kBAsBjC,CAAC;AACZ,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF;;qBAEqB;AACrB,eAAO,MAAM,+BAA+B;;;;kBASjC,CAAC;AACZ,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAKxF,eAAO,MAAM,8BAA8B;;;;kBAIhC,CAAC;AACZ,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF;;;oDAGoD;AACpD,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;kBAInC,CAAC;AACZ,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAO5F;;kCAEkC;AAClC,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;kBAgBlC,CAAC;AACZ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F,eAAO,MAAM,qCAAqC;;;;kBAIvC,CAAC;AACZ,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAA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C;AACZ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F,gFAAgF;AAChF,eAAO,MAAM,gCAAgC;;;;kBAIlC,CAAC;AACZ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F;;;4DAG4D;AAC5D,eAAO,MAAM,gCAAgC;;;kBAGlC,CAAC;AACZ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F;;kCAEkC;AAClC,eAAO,MAAM,0CAA0C;;;;;kBAK5C,CAAC;AACZ,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0CAA0C,CAAC,CAAC"}
|
|
@@ -35,6 +35,9 @@ export const RealmSharedFileProjectionSchema = z.object({
|
|
|
35
35
|
* assignment, so an approved file without a folder cannot exist. */
|
|
36
36
|
realmFileFolderId: realmFileFolderIdSchema,
|
|
37
37
|
creatorUid: userIdSchema,
|
|
38
|
+
/** The asset's `createdAt` (epoch ms): the gallery reads newest first by it, then by
|
|
39
|
+
* `mediaAssetId`, so a row entering the gallery is placed in that order. */
|
|
40
|
+
createdAt: z.number(),
|
|
38
41
|
// For the per-file steward canon toggle + download (updateWorkFileRealmCanon takes these).
|
|
39
42
|
workProjectId: workProjectIdSchema,
|
|
40
43
|
workFileId: z.string(),
|
|
@@ -159,8 +162,8 @@ export const GetWorkFileRealmShareStatesResponseSchema = z.object({
|
|
|
159
162
|
// ---- what a Realm-file action changed ------------------------------------------------------
|
|
160
163
|
// The gallery and the steward's queue are endless lists a client patches in place, never reloads
|
|
161
164
|
// (FRONTEND-103); their rows are server projections the client cannot read, so every action that
|
|
162
|
-
// changes a file's standing answers with the file's row in each list after it
|
|
163
|
-
// projection owners the reads use.
|
|
165
|
+
// changes a file's standing answers with the file's row in each list after it whenever its
|
|
166
|
+
// post-commit read succeeds, built by the same projection owners the reads use.
|
|
164
167
|
/**
|
|
165
168
|
* One file's rows after an action: its gallery row, its queue row, and its Work-side share state —
|
|
166
169
|
* each `null` when the file is absent from that list — plus every folder whose server-computed
|
|
@@ -179,15 +182,18 @@ export const RealmFileListsChangeSchema = z.object({
|
|
|
179
182
|
folders: z.array(RealmFileFolderProjectionSchema),
|
|
180
183
|
}).strict();
|
|
181
184
|
/** The answer of every action that changes a file's Realm standing: request, withdraw, approve,
|
|
182
|
-
* decline, canon toggle, folder move, and the admin un-share.
|
|
185
|
+
* decline, canon toggle, folder move, and the admin un-share. `change` is present when the read
|
|
186
|
+
* after the commit succeeded; a failed read never fails an action that already committed (ENG-009),
|
|
187
|
+
* and the client keeps its loaded pages when it is absent. Non-strict (server → client). */
|
|
183
188
|
export const RealmFileTransitionResultSchema = z.object({
|
|
184
189
|
success: z.literal(true),
|
|
185
|
-
change: RealmFileListsChangeSchema,
|
|
190
|
+
change: RealmFileListsChangeSchema.optional(),
|
|
186
191
|
});
|
|
187
|
-
/** The answer of a Realm folder create or rename: the folder as the gallery shows it
|
|
192
|
+
/** The answer of a Realm folder create or rename: the folder as the gallery shows it, present when
|
|
193
|
+
* the read after the commit succeeded (ENG-009; the client keeps its pages when it is absent). */
|
|
188
194
|
export const RealmFileFolderResultSchema = z.object({
|
|
189
195
|
success: z.literal(true),
|
|
190
|
-
folder: RealmFileFolderProjectionSchema,
|
|
196
|
+
folder: RealmFileFolderProjectionSchema.optional(),
|
|
191
197
|
});
|
|
192
198
|
/** The answer of a Realm folder delete: the folder it removed. */
|
|
193
199
|
export const DeleteRealmFileFolderResultSchema = z.object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"work-project-management.js","sourceRoot":"","sources":["../../src/schemas/work-project-management.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,qBAAqB,EAC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userIdSchema,\n addRemoveActionSchema,\n workProjectTypeSchema,\n hallWingTypeSchema,\n commissionListingIdSchema,\n commissionProposalIdSchema,\n auditionIdSchema,\n auditionEntryIdSchema,\n craftSkillIdSchema,\n guildInviteConversationStatusSchema,\n mediaAssetIdSchema,\n workRealmIdSchema,\n realmFileFolderIdSchema,\n realmFileShareRequestIdSchema,\n documentIdSegmentSchema,\n workFileFolderIdSchema,\n workFileIdSchema,\n} from './atoms.js';\nimport { TRADE_PROFESSION_OPTIONS, TRADE_PROFESSION_VALUES } from '../constants/options.js';\nimport { GUILD_STANDING_VALUES } from '../permissions/index.js';\nimport { FullWorkProjectSchema } from '../doc-schemas/work-project.js';\nimport {\n MAX_GUILD_INVITE_MESSAGE_LENGTH,\n MAX_WORK_PROJECT_TITLE_LENGTH,\n MAX_WORK_PROJECT_DESCRIPTION_LENGTH,\n MAX_WORK_REALM_TITLE_LENGTH,\n MAX_WORK_REALM_DESCRIPTION_LENGTH,\n MAX_CRAFT_SKILL_NAME_LENGTH,\n MAX_FILE_FOLDER_NAME_LENGTH,\n} from '../constants/business.js';\nimport {\n REALM_SHARED_FILES_PAGE_LIMIT,\n REALM_FILE_PROMOTION_QUEUE_PAGE_LIMIT,\n} from '../constants/pagination.js';\nimport {\n RealmFileApprovedStatusSchema,\n RealmFilePendingApprovalStatusSchema,\n RealmFileActiveStatusSchema,\n REALM_FILE_PENDING_APPROVAL_STATUS,\n ContentMediaKindSchema,\n} from '../doc-schemas/media-assets.js';\n\n// ===========================================================================\n// S7 realm shared-files gallery (ARTISAN-ONLY, plus a full-admin bypass for the admin-only\n// un-share support action). `mediaAssets` is client-unreadable, so the gallery reads\n// realm-shared work files via THIS server projection callable (never a client query) — and\n// for the same reason the Realm's FOLDER documents are returned through the same projection\n// owner rather than opened to direct client reads: artisan / admin / hidden-Realm access is\n// decided in ONE backend owner.\n//\n// Serving is the `'artisan'` media tier (mutate-in-place scoped→artisan at APPROVAL — see the\n// approval gate below). V1 = view + download, grouped by the steward's folders.\n// ===========================================================================\n\n/** One APPROVED shared file. Accepts only the two approved standings — a pending or\n * unshared row is structurally inexpressible in this response. */\nexport const RealmSharedFileProjectionSchema = z.object({\n mediaAssetId: mediaAssetIdSchema,\n // The canonical stored media kind — RealmSharedFileProjection is a projection OF a\n // MediaAsset, so it shares the ONE ContentMediaKindSchema.\n mediaKind: ContentMediaKindSchema,\n // Never the full status union: 'nonCanon' | 'canon' only.\n realmFileCanonStatus: RealmFileApprovedStatusSchema,\n /** The Work file's own `name`. A file browser that groups unnamed thumbnails by folder is\n * not a file browser — the name is part of the projection, not something the client is\n * expected to resolve. (It is file metadata, NOT display identity: creator names and\n * avatars still resolve at render from `creatorUid`.) */\n name: z.string(),\n /** The steward-assigned folder this file sits in. Always present — approval IS folder\n * assignment, so an approved file without a folder cannot exist. */\n realmFileFolderId: realmFileFolderIdSchema,\n creatorUid: userIdSchema,\n // For the per-file steward canon toggle + download (updateWorkFileRealmCanon takes these).\n workProjectId: workProjectIdSchema,\n workFileId: z.string(),\n}).strict();\nexport type RealmSharedFileProjection = z.infer<typeof RealmSharedFileProjectionSchema>;\n\n/** A Realm shared-file folder as the gallery sees it. The FOLDER DOCUMENT stores no counts;\n * `fileCount` here is SERVER-COMPUTED per response, so it can never drift the way a stored\n * counter would. */\nexport const RealmFileFolderProjectionSchema = z.object({\n realmFileFolderId: realmFileFolderIdSchema,\n name: z.string(),\n /** Number of files currently ASSIGNED to this folder — counting every assigned file\n * regardless of canon state and regardless of serving state (a hidden or quarantined file\n * still occupies its folder, and is still why a delete-folder attempt will refuse).\n * Server-computed so the steward UI stops deriving counts from whichever gallery pages\n * happen to be loaded — a paged client can only ever see part of a folder. */\n fileCount: z.number().int().min(0),\n}).strict();\nexport type RealmFileFolderProjection = z.infer<typeof RealmFileFolderProjectionSchema>;\n\n// Paginated: the pre-approval-gate query was unbounded. `limit` is bounded by the ONE named\n// page constant the server also clamps to, and `cursor` is an OPAQUE server-minted token —\n// the client never constructs or interprets it, so the ordering fields stay a server detail.\nexport const GetRealmSharedFilesInputSchema = z.object({\n realmId: workRealmIdSchema,\n limit: z.number().int().min(1).max(REALM_SHARED_FILES_PAGE_LIMIT).optional(),\n cursor: z.string().min(1).optional(),\n}).strict();\nexport type GetRealmSharedFilesInput = z.infer<typeof GetRealmSharedFilesInputSchema>;\n\n/** `{ files }` is preserved as-is; `folders` and `nextCursor` are ADDITIVE. `folders` is the\n * Realm's complete folder set (bounded by MAX_REALM_FILE_FOLDERS), not a page — the gallery\n * must be able to render an empty folder, and the steward must see one to move files into.\n * `nextCursor` is absent/null on the last page. */\nexport const GetRealmSharedFilesResponseSchema = z.object({\n files: z.array(RealmSharedFileProjectionSchema),\n folders: z.array(RealmFileFolderProjectionSchema),\n nextCursor: z.string().min(1).nullable().optional(),\n}).strict();\nexport type GetRealmSharedFilesResponse = z.infer<typeof GetRealmSharedFilesResponseSchema>;\n\n// ---- realm-file promotion queue (steward / full admin) ---------------------------------\n// A SEPARATE bounded projection rather than an `includePending` flag on the artisan gallery:\n// a caller-controlled flag would put \"may this caller see pending rows\" in the client's\n// hands. Ordinary artisans can never enumerate pending requests.\n\n/** One AWAITING-DECISION request. Accepts only the pending-approval standing (via\n * RealmFilePendingApprovalStatusSchema) — an approved or unshared row is structurally\n * inexpressible in the queue. */\nexport const RealmFilePromotionQueueRowSchema = z.object({\n mediaAssetId: mediaAssetIdSchema,\n mediaKind: ContentMediaKindSchema,\n realmFileCanonStatus: RealmFilePendingApprovalStatusSchema,\n /** The Work file's own name — the steward decides on a named file, not a thumbnail. */\n name: z.string(),\n creatorUid: userIdSchema,\n workProjectId: workProjectIdSchema,\n workFileId: z.string(),\n /** Echoed so the approve/decline call can carry the exact observed request id; a stale tab\n * deciding a superseded request is then a visible conflict, not a silent overwrite. */\n realmFileShareRequestId: realmFileShareRequestIdSchema,\n /** The RECORDED requester — the resolution notification is addressed from this, never\n * guessed from the uploader. */\n realmFileShareRequestedByUid: userIdSchema,\n realmFileShareRequestedAt: z.number(),\n}).strict();\nexport type RealmFilePromotionQueueRow = z.infer<typeof RealmFilePromotionQueueRowSchema>;\n\nexport const GetRealmFilePromotionQueueInputSchema = z.object({\n workRealmId: workRealmIdSchema,\n limit: z.number().int().min(1).max(REALM_FILE_PROMOTION_QUEUE_PAGE_LIMIT).optional(),\n cursor: z.string().min(1).optional(),\n}).strict();\nexport type GetRealmFilePromotionQueueInput = z.infer<typeof GetRealmFilePromotionQueueInputSchema>;\n\n/** `folders` rides along so the approval UI can offer the folder picker (and detect the\n * \"no folders yet\" state) without a second round-trip. */\nexport const GetRealmFilePromotionQueueResponseSchema = z.object({\n requests: z.array(RealmFilePromotionQueueRowSchema),\n folders: z.array(RealmFileFolderProjectionSchema),\n nextCursor: z.string().min(1).nullable().optional(),\n}).strict();\nexport type GetRealmFilePromotionQueueResponse = z.infer<typeof GetRealmFilePromotionQueueResponseSchema>;\n\n// ---- WORK-side share-state projection --------------------------------------------------\n// The mirror image of the two Realm-side projections above, for the WORK's own files surface:\n// a file admin looking at their folder listing needs to know which files are already shared\n// or awaiting a steward decision, so the row can show \"Requested\" / \"Shared\" and offer\n// withdraw where it applies.\n//\n// It is a SERVER projection for the same reason the gallery is: `mediaAssets` is\n// client-unreadable, so share state cannot be read from the file document. File-admin\n// authorization is asserted in the callable; this shape carries no authority hint.\n\n/** One work file's realm-share state.\n *\n * The `requestId` is present EXACTLY while the file is awaiting a decision — it is what the\n * withdraw call must carry, and it is meaningless once the request is resolved. Enforced\n * rather than merely optional, mirroring the asset's own legal-combination invariant, so the\n * UI can never be handed a pending row with nothing to withdraw (or an approved row carrying\n * a stale request id it might send).\n *\n * `workFileId` uses plain `z.string()` like the sibling projection rows in this file\n * (inputs use `.min(1)`; projection rows describe server-produced data). */\nexport const WorkFileRealmShareStateSchema = z.object({\n workFileId: z.string(),\n // Never `none`: an unshared file simply has no row (see the response below).\n realmFileCanonStatus: RealmFileActiveStatusSchema,\n realmFileShareRequestId: realmFileShareRequestIdSchema.optional(),\n}).strict().superRefine((val, ctx) => {\n const isPending = val.realmFileCanonStatus === REALM_FILE_PENDING_APPROVAL_STATUS;\n if (isPending && val.realmFileShareRequestId === undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['realmFileShareRequestId'],\n message: 'a pending row must carry its request id — it is what the withdraw call compares against',\n });\n }\n if (!isPending && val.realmFileShareRequestId !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['realmFileShareRequestId'],\n message: 'a resolved row must not carry a request id — the request is no longer pending',\n });\n }\n});\nexport type WorkFileRealmShareState = z.infer<typeof WorkFileRealmShareStateSchema>;\n\nexport const GetWorkFileRealmShareStatesInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n}).strict();\nexport type GetWorkFileRealmShareStatesInput = z.infer<typeof GetWorkFileRealmShareStatesInputSchema>;\n\n/** Rows exist ONLY for files whose standing is not `none`. An ABSENT row therefore means the\n * file has never been requested or shared — that is the encoding, so the client must treat a\n * missing entry as \"not shared\" rather than \"unknown\". Bounded implicitly by the Work's own\n * file cap (MAX_WORK_FILES), so this response needs no page cursor of its own. */\nexport const GetWorkFileRealmShareStatesResponseSchema = z.object({\n states: z.array(WorkFileRealmShareStateSchema),\n}).strict();\nexport type GetWorkFileRealmShareStatesResponse = z.infer<typeof GetWorkFileRealmShareStatesResponseSchema>;\n\n// ---- what a Realm-file action changed ------------------------------------------------------\n// The gallery and the steward's queue are endless lists a client patches in place, never reloads\n// (FRONTEND-103); their rows are server projections the client cannot read, so every action that\n// changes a file's standing answers with the file's row in each list after it, built by the same\n// projection owners the reads use.\n\n/**\n * One file's rows after an action: its gallery row, its queue row, and its Work-side share state —\n * each `null` when the file is absent from that list — plus every folder whose server-computed\n * `fileCount` the action changed (an approval, a move, or an un-share), as the gallery shows it.\n * Each row is non-null only when the file passes that list's own read filters — `sharedFile` only\n * for an approved file whose serving status is `servable`, so an action on a hidden or quarantined\n * file never puts it back into a gallery the read would not show it in.\n */\nexport const RealmFileListsChangeSchema = z.object({\n mediaAssetId: mediaAssetIdSchema,\n workProjectId: workProjectIdSchema,\n workFileId: z.string(),\n sharedFile: RealmSharedFileProjectionSchema.nullable(),\n promotionRequest: RealmFilePromotionQueueRowSchema.nullable(),\n shareState: WorkFileRealmShareStateSchema.nullable(),\n folders: z.array(RealmFileFolderProjectionSchema),\n}).strict();\nexport type RealmFileListsChange = z.infer<typeof RealmFileListsChangeSchema>;\n\n/** The answer of every action that changes a file's Realm standing: request, withdraw, approve,\n * decline, canon toggle, folder move, and the admin un-share. Non-strict (server → client). */\nexport const RealmFileTransitionResultSchema = z.object({\n success: z.literal(true),\n change: RealmFileListsChangeSchema,\n});\nexport type RealmFileTransitionResult = z.infer<typeof RealmFileTransitionResultSchema>;\n\n/** The answer of a Realm folder create or rename: the folder as the gallery shows it. */\nexport const RealmFileFolderResultSchema = z.object({\n success: z.literal(true),\n folder: RealmFileFolderProjectionSchema,\n});\nexport type RealmFileFolderResult = z.infer<typeof RealmFileFolderResultSchema>;\n\n/** The answer of a Realm folder delete: the folder it removed. */\nexport const DeleteRealmFileFolderResultSchema = z.object({\n success: z.literal(true),\n realmFileFolderId: realmFileFolderIdSchema,\n});\nexport type DeleteRealmFileFolderResult = z.infer<typeof DeleteRealmFileFolderResultSchema>;\n\nconst baseFields = {\n workingTitle: z.string().min(1).max(MAX_WORK_PROJECT_TITLE_LENGTH),\n workingDescription: z.string().min(1).max(MAX_WORK_PROJECT_DESCRIPTION_LENGTH),\n workProjectType: workProjectTypeSchema,\n hallWingType: hallWingTypeSchema,\n};\n\n// A Realm working title is reserved under `reservedRealmNames/{UPPER(title)}` — the\n// UPPERCASED title IS the Firestore doc ID (runCreateWorkRealm.reservedRealmNameRef).\n// Firestore doc IDs cannot contain `/` and cannot be exactly `.` or `..`, so a title\n// that would produce an invalid/ambiguous doc ID must be rejected at the callable\n// boundary (both the create transaction and the soft availability check) rather than\n// hard-failing with an opaque `internal` error deep inside ref construction. Length\n// derives from MAX_WORK_REALM_TITLE_LENGTH; only the doc-ID-breaking characters are\n// forbidden. Keep CheckRealmNameAvailableInputSchema in lockstep so a valid-at-create\n// name is never rejected at form time (and vice-versa).\nexport const realmWorkingTitleSchema = z\n .string()\n .min(1)\n .max(MAX_WORK_REALM_TITLE_LENGTH)\n .refine((v) => !v.includes('/'), { message: 'Realm name cannot contain a slash (/).' })\n .refine((v) => v !== '.' && v !== '..', { message: 'Realm name cannot be \".\" or \"..\".' });\n\nexport const RealmCreationModeSchema = z.enum([\n 'newPublicRealm',\n 'newStandaloneRealm',\n 'existingPublicRealm',\n]);\nexport type RealmCreationMode = z.infer<typeof RealmCreationModeSchema>;\n\nexport const CreateWorkProjectInputSchema = z.discriminatedUnion('realmCreationMode', [\n z.object({\n ...baseFields,\n realmCreationMode: z.literal('newPublicRealm'),\n realmWorkingTitle: realmWorkingTitleSchema,\n realmWorkingDescription: z.string().min(1).max(MAX_WORK_REALM_DESCRIPTION_LENGTH),\n }).strict(),\n // Standalone realms are background plumbing (DJ ruling 2026-07-19): the user enters NO\n // realm information — the backend creates the realm shell with a synthetic unique\n // title/description (the generated workRealmId), so nothing user-authored exists on it\n // and no human realm name is consumed from the reservedRealmNames namespace.\n z.object({\n ...baseFields,\n realmCreationMode: z.literal('newStandaloneRealm'),\n }).strict(),\n z.object({\n ...baseFields,\n realmCreationMode: z.literal('existingPublicRealm'),\n workRealmId: workRealmIdSchema,\n }).strict(),\n]);\nexport type CreateWorkProjectInput = z.infer<typeof CreateWorkProjectInputSchema>;\n\n/** The `createWorkProject` answer: the new Work's id and its stored document, which that id names. */\nexport const CreateWorkProjectResultSchema = z\n .object({\n success: z.literal(true),\n workProjectId: workProjectIdSchema,\n workProjectData: FullWorkProjectSchema,\n })\n .strict()\n .superRefine((result, ctx) => {\n if (result.workProjectData.workProjectId !== result.workProjectId) {\n ctx.addIssue({ code: 'custom', path: ['workProjectData', 'workProjectId'] });\n }\n });\nexport type CreateWorkProjectResult = z.infer<typeof CreateWorkProjectResultSchema>;\n\n// Identified by the workAssets subcollection doc id — never by URL parsing\n// (no delete path may depend on a URL; see media-assets-and-protected-serving.md).\nexport const DeleteWorkAssetInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n workAssetId: documentIdSegmentSchema,\n}).strict();\nexport type DeleteWorkAssetInput = z.infer<typeof DeleteWorkAssetInputSchema>;\n\nexport const InviteSourceSchema = z.discriminatedUnion('type', [\n z.object({\n type: z.literal('standalone'),\n }).strict(),\n z.object({\n type: z.literal('craftSkill'),\n data: z.object({\n craftSkillId: craftSkillIdSchema,\n craftSkillOwnerUserId: userIdSchema,\n craftSkillName: z.string().min(1).max(MAX_CRAFT_SKILL_NAME_LENGTH),\n }).strict(),\n }).strict(),\n z.object({\n type: z.literal('commission'),\n // Titles are NOT snapshotted here (Display Identity Invariant — client display text\n // must be re-sourced at render by id). `postingStakeSharesOffered` is not display text;\n // the server re-sources it from the posting doc in the invite transaction (never trusts\n // the client copy) — kept so the shape stays server-writable.\n data: z.object({\n commissionListingId: commissionListingIdSchema,\n commissionProposalId: commissionProposalIdSchema,\n proposalArtisanUserId: userIdSchema,\n postingStakeSharesOffered: z.number().int().min(1),\n }).strict(),\n }).strict(),\n z.object({\n type: z.literal('audition'),\n data: z.object({\n auditionId: auditionIdSchema,\n auditionEntryId: auditionEntryIdSchema,\n respondentUserId: userIdSchema,\n postingStakeSharesOffered: z.number().int().min(1),\n }).strict(),\n }).strict(),\n]);\nexport type InviteSource = z.infer<typeof InviteSourceSchema>;\nexport type InviteSourceType = InviteSource['type'];\n\nexport const InviteUserToGuildInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n inviteeUid: userIdSchema,\n message: z.string().min(1).max(MAX_GUILD_INVITE_MESSAGE_LENGTH),\n stakeSharesOffered: z.number().int().min(1),\n source: InviteSourceSchema,\n}).strict();\nexport type InviteUserToGuildInput = z.infer<typeof InviteUserToGuildInputSchema>;\n\n// `finalized` is the terminal SUCCESS state (`accepted` is a transient state a trigger\n// consumes within seconds). Managers must be able to list finalized invites to see the\n// guild's actual recruitment history — not only failures and in-flight items. Derives from\n// the ONE canonical status enum (schemas/atoms.ts), never a re-declared literal.\n// The history is paged: the server reads `ITEMS_PER_PAGE_GUILD_INVITES` invites per call (the\n// caller sends no page size), and `cursor` is the opaque token the previous page answered.\n// The result is `ListGuildInvitesResultSchema` (doc-schemas/messaging, beside the invite doc).\nexport const ListGuildInvitesInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n statuses: z.array(guildInviteConversationStatusSchema).min(1),\n cursor: z.string().min(1).optional(),\n}).strict();\nexport type ListGuildInvitesInput = z.infer<typeof ListGuildInvitesInputSchema>;\n\nexport const UpdateGuildmateTradeProfessionsInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n userId: userIdSchema,\n tradeProfession: z.enum(TRADE_PROFESSION_VALUES),\n action: addRemoveActionSchema,\n}).strict();\nexport type UpdateGuildmateTradeProfessionsInput = z.infer<typeof UpdateGuildmateTradeProfessionsInputSchema>;\n\nconst GUILD_STANDING_VALUES_ENUM = GUILD_STANDING_VALUES as [typeof GUILD_STANDING_VALUES[number], ...typeof GUILD_STANDING_VALUES[number][]];\n\nexport const UpdateGuildmateStandingInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n userId: userIdSchema,\n guildStanding: z.enum(GUILD_STANDING_VALUES_ENUM),\n action: addRemoveActionSchema,\n}).strict();\nexport type UpdateGuildmateStandingInput = z.infer<typeof UpdateGuildmateStandingInputSchema>;\n\n// Member self-leave (leaveWorkProject). The leaver is ALWAYS request.auth.uid — never a\n// client-supplied uid (invariant 3) — so the input carries only the workProjectId. The\n// callable composes the internal `depart` stake-share operation for ctx.uid.\nexport const LeaveWorkProjectInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n}).strict();\nexport type LeaveWorkProjectInput = z.infer<typeof LeaveWorkProjectInputSchema>;\n\nexport const UpdatePublicWorkProjectDetailsInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n workingTitle: z.string().min(1).max(MAX_WORK_PROJECT_TITLE_LENGTH),\n workingDescription: z.string().min(1).max(MAX_WORK_PROJECT_DESCRIPTION_LENGTH),\n}).strict();\nexport type UpdatePublicWorkProjectDetailsInput = z.infer<typeof UpdatePublicWorkProjectDetailsInputSchema>;\n\nexport const UpdateWorkRealmDetailsInputSchema = z.object({\n workRealmId: workRealmIdSchema,\n workingTitle: z.string().min(1).max(MAX_WORK_REALM_TITLE_LENGTH),\n workingDescription: z.string().min(1).max(MAX_WORK_REALM_DESCRIPTION_LENGTH),\n}).strict();\nexport type UpdateWorkRealmDetailsInput = z.infer<typeof UpdateWorkRealmDetailsInputSchema>;\n\n// Unauthenticated soft-check for a Realm working title. Must match the authoritative\n// realmWorkingTitle contract in CreateWorkProjectInputSchema (realmWorkingTitleSchema:\n// MAX_WORK_REALM_TITLE_LENGTH, rejecting the doc-ID-breaking `/` and reserved `.`/`..`). Never be\n// stricter than the create transaction or a valid-at-create name would be rejected at\n// form time — reuse the SAME schema so the two can never drift.\nexport const CheckRealmNameAvailableInputSchema = z.object({\n workingTitle: realmWorkingTitleSchema,\n}).strict();\nexport type CheckRealmNameAvailableInput = z.infer<typeof CheckRealmNameAvailableInputSchema>;\n\n// ---- work-project file folders (S7) ---------------------------------------------------\n// The default \"All Guildmates\" folder is immutable; custom-folder access is by trade\n// profession. All four callables require a file-admin standing via assertCanManageFolders.\n\nconst tradeProfessionListSchema = z\n .array(z.enum(TRADE_PROFESSION_VALUES))\n .max(TRADE_PROFESSION_OPTIONS.length);\n\nexport const CreateFileFolderInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n name: z.string().min(1).max(MAX_FILE_FOLDER_NAME_LENGTH),\n canViewTradeProfessions: tradeProfessionListSchema,\n canUploadTradeProfessions: tradeProfessionListSchema,\n canDeleteTradeProfessions: tradeProfessionListSchema,\n}).strict();\nexport type CreateFileFolderInput = z.infer<typeof CreateFileFolderInputSchema>;\n\nexport const RenameFileFolderInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n folderId: workFileFolderIdSchema,\n name: z.string().min(1).max(MAX_FILE_FOLDER_NAME_LENGTH),\n}).strict();\nexport type RenameFileFolderInput = z.infer<typeof RenameFileFolderInputSchema>;\n\nexport const UpdateFolderProfessionsInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n folderId: workFileFolderIdSchema,\n canViewTradeProfessions: tradeProfessionListSchema,\n canUploadTradeProfessions: tradeProfessionListSchema,\n canDeleteTradeProfessions: tradeProfessionListSchema,\n}).strict();\nexport type UpdateFolderProfessionsInput = z.infer<typeof UpdateFolderProfessionsInputSchema>;\n\nexport const DeleteFileFolderInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n folderId: workFileFolderIdSchema,\n}).strict();\nexport type DeleteFileFolderInput = z.infer<typeof DeleteFileFolderInputSchema>;\n\n// ---- realm shared files ---------------------------------------------------------------\n\n// Delete a single work file (by folder + file id). File-admin authz is enforced in the\n// callable/core transaction.\nexport const DeleteWorkFileInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n folderId: workFileFolderIdSchema,\n workFileId: workFileIdSchema,\n}).strict();\nexport type DeleteWorkFileInput = z.infer<typeof DeleteWorkFileInputSchema>;\n\n// Set canon status on a realm shared file. Realm-steward-only authz is enforced inside the\n// core's transaction against workRealms/{workRealmId}.workStewardUid.\nexport const UpdateWorkFileRealmCanonInputSchema = z.object({\n workRealmId: workRealmIdSchema,\n mediaAssetId: mediaAssetIdSchema,\n canon: z.boolean(),\n}).strict();\nexport type UpdateWorkFileRealmCanonInput = z.infer<typeof UpdateWorkFileRealmCanonInputSchema>;\n\n// ---- the promotion approval gate -------------------------------------------------------\n// Promotion is a REQUEST, not an instant share: the Work file admin asks, and the REALM\n// steward approves (choosing the folder) or declines. Nothing is served to the Realm until\n// approval — a requested file stays `scoped` and invisible to the member gallery.\n//\n// Every one of these carries the `requestId` so a decision always names the exact request it\n// observed. Realm-side authority (steward, public + non-hidden Realm) is derived from the\n// Realm document inside each core's transaction; these shapes carry no authority hints.\n\n// REQUEST promotion of a work file into its Realm's shared-file pool. File-admin authz\n// (`workFile.promoteToRealm`) is enforced inside the core's transaction.\n// `requestId` is CLIENT-generated and stable: replaying the same id is an idempotent success\n// (no second audit event, no second notification), while a DIFFERENT id arriving while one\n// request is already pending is a conflict — never a silent overwrite.\nexport const UpdateWorkFileRealmShareInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n workFileId: workFileIdSchema,\n requestId: realmFileShareRequestIdSchema,\n}).strict();\nexport type UpdateWorkFileRealmShareInput = z.infer<typeof UpdateWorkFileRealmShareInputSchema>;\n\n// WITHDRAW a still-pending request (the requesting Work's file admin). Realm-share\n// permanence begins at APPROVAL — before a steward decides, an accidental request must be\n// correctable by the side that made it. Addressed by Work coordinates like the request\n// itself, and compares `requestId` so a withdrawal can never cancel a newer re-request.\nexport const WithdrawRealmFilePromotionRequestInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n workFileId: workFileIdSchema,\n requestId: realmFileShareRequestIdSchema,\n}).strict();\nexport type WithdrawRealmFilePromotionRequestInput = z.infer<typeof WithdrawRealmFilePromotionRequestInputSchema>;\n\n// APPROVE a pending request (Realm steward). Approval assigns the folder — there is no\n// default folder, so `realmFileFolderId` is REQUIRED and the core verifies the folder is\n// under this exact Realm before flipping the file to `nonCanon` + the artisan tier.\nexport const ApproveRealmFilePromotionInputSchema = z.object({\n workRealmId: workRealmIdSchema,\n mediaAssetId: mediaAssetIdSchema,\n realmFileFolderId: realmFileFolderIdSchema,\n requestId: realmFileShareRequestIdSchema,\n}).strict();\nexport type ApproveRealmFilePromotionInput = z.infer<typeof ApproveRealmFilePromotionInputSchema>;\n\n// DECLINE a pending request (Realm steward). Returns the file to `none` and clears the Realm\n// + request fields. No folder is involved — a declined file never entered the pool.\nexport const DeclineRealmFilePromotionInputSchema = z.object({\n workRealmId: workRealmIdSchema,\n mediaAssetId: mediaAssetIdSchema,\n requestId: realmFileShareRequestIdSchema,\n}).strict();\nexport type DeclineRealmFilePromotionInput = z.infer<typeof DeclineRealmFilePromotionInputSchema>;\n\n// ADMIN un-share of an ALREADY-APPROVED realm file (`adminUpdateWorkFileRealmUnshare`).\n// Once a steward approves, sharing is PERMANENT for members — the only way out is an admin\n// acting on a support thread. This is its own input rather than a reuse of the share/request\n// shape: an approved file has NO pending request, so `requestId` is meaningless here and\n// requiring one would make the callable unusable against exactly the state it exists to\n// unwind. It carries the ORIGINAL two-field Work-coordinate shape the share input had before\n// the approval gate; the core resolves the file by collection-group query on\n// (`workProjectId`, `workFileId`). Admin authority is asserted at the callable's admin gate\n// and re-asserted in the core (which rejects any non-`adminOverride` actor) — never inferred\n// from anything in this payload.\nexport const AdminUpdateWorkFileRealmUnshareInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n workFileId: workFileIdSchema,\n}).strict();\nexport type AdminUpdateWorkFileRealmUnshareInput = z.infer<typeof AdminUpdateWorkFileRealmUnshareInputSchema>;\n\n// ---- realm shared-file folders (steward-managed) ---------------------------------------\n// Mirrors the Work-side folder CRUD shapes, minus the trade-profession access lists: Realm\n// folders are organizational only (Realm-level visibility is the whole access model at\n// launch). Names reuse the ONE platform folder-name bound; the server derives\n// `name_lowercase` and enforces case-insensitive uniqueness within the Realm.\n\nexport const CreateRealmFileFolderInputSchema = z.object({\n workRealmId: workRealmIdSchema,\n name: z.string().min(1).max(MAX_FILE_FOLDER_NAME_LENGTH),\n}).strict();\nexport type CreateRealmFileFolderInput = z.infer<typeof CreateRealmFileFolderInputSchema>;\n\n/** Rename. `update*` per BACKEND-305 — it modifies an existing doc in place. */\nexport const UpdateRealmFileFolderInputSchema = z.object({\n workRealmId: workRealmIdSchema,\n realmFileFolderId: realmFileFolderIdSchema,\n name: z.string().min(1).max(MAX_FILE_FOLDER_NAME_LENGTH),\n}).strict();\nexport type UpdateRealmFileFolderInput = z.infer<typeof UpdateRealmFileFolderInputSchema>;\n\n/** Delete requires the folder to be EMPTY (the steward moves files out first) — no surprise\n * data moves and no reassignment-target picker at launch. Emptiness is proven by an\n * in-transaction query for ANY asset carrying this folder id, regardless of serving/hidden/\n * canon state: a hidden file still occupies its folder. */\nexport const DeleteRealmFileFolderInputSchema = z.object({\n workRealmId: workRealmIdSchema,\n realmFileFolderId: realmFileFolderIdSchema,\n}).strict();\nexport type DeleteRealmFileFolderInput = z.infer<typeof DeleteRealmFileFolderInputSchema>;\n\n/** Move an approved shared file between folders. `expectedRealmFileFolderId` is a\n * compare-and-set precondition — a steward acting on a stale view must not silently undo a\n * move made from another tab. */\nexport const UpdateRealmFileFolderAssignmentInputSchema = z.object({\n workRealmId: workRealmIdSchema,\n mediaAssetId: mediaAssetIdSchema,\n expectedRealmFileFolderId: realmFileFolderIdSchema,\n realmFileFolderId: realmFileFolderIdSchema,\n}).strict();\nexport type UpdateRealmFileFolderAssignmentInput = z.infer<typeof UpdateRealmFileFolderAssignmentInputSchema>;\n\n\n"]}
|
|
1
|
+
{"version":3,"file":"work-project-management.js","sourceRoot":"","sources":["../../src/schemas/work-project-management.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,yBAAyB,EACzB,0BAA0B,EAC1B,gBAAgB,EAChB,qBAAqB,EACrB,kBAAkB,EAClB,mCAAmC,EACnC,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACvB,6BAA6B,EAC7B,uBAAuB,EACvB,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAC5F,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EACL,+BAA+B,EAC/B,6BAA6B,EAC7B,mCAAmC,EACnC,2BAA2B,EAC3B,iCAAiC,EACjC,2BAA2B,EAC3B,2BAA2B,GAC5B,MAAM,0BAA0B,CAAC;A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AA2B,CAAC;CACzD,CAAC,CAAC,MAAM,EAAE,CAAC;AAGZ,gFAAgF;AAChF,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC,MAAM,CAAC;IACvD,WAAW,EAAE,iBAAiB;IAC9B,iBAAiB,EAAE,uBAAuB;IAC1C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,2BAA2B,CAAC;CACzD,CAAC,CAAC,MAAM,EAAE,CAAC;AAGZ;;;4DAG4D;AAC5D,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC,MAAM,CAAC;IACvD,WAAW,EAAE,iBAAiB;IAC9B,iBAAiB,EAAE,uBAAuB;CAC3C,CAAC,CAAC,MAAM,EAAE,CAAC;AAGZ;;kCAEkC;AAClC,MAAM,CAAC,MAAM,0CAA0C,GAAG,CAAC,CAAC,MAAM,CAAC;IACjE,WAAW,EAAE,iBAAiB;IAC9B,YAAY,EAAE,kBAAkB;IAChC,yBAAyB,EAAE,uBAAuB;IAClD,iBAAiB,EAAE,uBAAuB;CAC3C,CAAC,CAAC,MAAM,EAAE,CAAC","sourcesContent":["import { z } from 'zod';\nimport {\n workProjectIdSchema,\n userIdSchema,\n addRemoveActionSchema,\n workProjectTypeSchema,\n hallWingTypeSchema,\n commissionListingIdSchema,\n commissionProposalIdSchema,\n auditionIdSchema,\n auditionEntryIdSchema,\n craftSkillIdSchema,\n guildInviteConversationStatusSchema,\n mediaAssetIdSchema,\n workRealmIdSchema,\n realmFileFolderIdSchema,\n realmFileShareRequestIdSchema,\n documentIdSegmentSchema,\n workFileFolderIdSchema,\n workFileIdSchema,\n} from './atoms.js';\nimport { TRADE_PROFESSION_OPTIONS, TRADE_PROFESSION_VALUES } from '../constants/options.js';\nimport { GUILD_STANDING_VALUES } from '../permissions/index.js';\nimport { FullWorkProjectSchema } from '../doc-schemas/work-project.js';\nimport {\n MAX_GUILD_INVITE_MESSAGE_LENGTH,\n MAX_WORK_PROJECT_TITLE_LENGTH,\n MAX_WORK_PROJECT_DESCRIPTION_LENGTH,\n MAX_WORK_REALM_TITLE_LENGTH,\n MAX_WORK_REALM_DESCRIPTION_LENGTH,\n MAX_CRAFT_SKILL_NAME_LENGTH,\n MAX_FILE_FOLDER_NAME_LENGTH,\n} from '../constants/business.js';\nimport {\n REALM_SHARED_FILES_PAGE_LIMIT,\n REALM_FILE_PROMOTION_QUEUE_PAGE_LIMIT,\n} from '../constants/pagination.js';\nimport {\n RealmFileApprovedStatusSchema,\n RealmFilePendingApprovalStatusSchema,\n RealmFileActiveStatusSchema,\n REALM_FILE_PENDING_APPROVAL_STATUS,\n ContentMediaKindSchema,\n} from '../doc-schemas/media-assets.js';\n\n// ===========================================================================\n// S7 realm shared-files gallery (ARTISAN-ONLY, plus a full-admin bypass for the admin-only\n// un-share support action). `mediaAssets` is client-unreadable, so the gallery reads\n// realm-shared work files via THIS server projection callable (never a client query) — and\n// for the same reason the Realm's FOLDER documents are returned through the same projection\n// owner rather than opened to direct client reads: artisan / admin / hidden-Realm access is\n// decided in ONE backend owner.\n//\n// Serving is the `'artisan'` media tier (mutate-in-place scoped→artisan at APPROVAL — see the\n// approval gate below). V1 = view + download, grouped by the steward's folders.\n// ===========================================================================\n\n/** One APPROVED shared file. Accepts only the two approved standings — a pending or\n * unshared row is structurally inexpressible in this response. */\nexport const RealmSharedFileProjectionSchema = z.object({\n mediaAssetId: mediaAssetIdSchema,\n // The canonical stored media kind — RealmSharedFileProjection is a projection OF a\n // MediaAsset, so it shares the ONE ContentMediaKindSchema.\n mediaKind: ContentMediaKindSchema,\n // Never the full status union: 'nonCanon' | 'canon' only.\n realmFileCanonStatus: RealmFileApprovedStatusSchema,\n /** The Work file's own `name`. A file browser that groups unnamed thumbnails by folder is\n * not a file browser — the name is part of the projection, not something the client is\n * expected to resolve. (It is file metadata, NOT display identity: creator names and\n * avatars still resolve at render from `creatorUid`.) */\n name: z.string(),\n /** The steward-assigned folder this file sits in. Always present — approval IS folder\n * assignment, so an approved file without a folder cannot exist. */\n realmFileFolderId: realmFileFolderIdSchema,\n creatorUid: userIdSchema,\n /** The asset's `createdAt` (epoch ms): the gallery reads newest first by it, then by\n * `mediaAssetId`, so a row entering the gallery is placed in that order. */\n createdAt: z.number(),\n // For the per-file steward canon toggle + download (updateWorkFileRealmCanon takes these).\n workProjectId: workProjectIdSchema,\n workFileId: z.string(),\n}).strict();\nexport type RealmSharedFileProjection = z.infer<typeof RealmSharedFileProjectionSchema>;\n\n/** A Realm shared-file folder as the gallery sees it. The FOLDER DOCUMENT stores no counts;\n * `fileCount` here is SERVER-COMPUTED per response, so it can never drift the way a stored\n * counter would. */\nexport const RealmFileFolderProjectionSchema = z.object({\n realmFileFolderId: realmFileFolderIdSchema,\n name: z.string(),\n /** Number of files currently ASSIGNED to this folder — counting every assigned file\n * regardless of canon state and regardless of serving state (a hidden or quarantined file\n * still occupies its folder, and is still why a delete-folder attempt will refuse).\n * Server-computed so the steward UI stops deriving counts from whichever gallery pages\n * happen to be loaded — a paged client can only ever see part of a folder. */\n fileCount: z.number().int().min(0),\n}).strict();\nexport type RealmFileFolderProjection = z.infer<typeof RealmFileFolderProjectionSchema>;\n\n// Paginated: the pre-approval-gate query was unbounded. `limit` is bounded by the ONE named\n// page constant the server also clamps to, and `cursor` is an OPAQUE server-minted token —\n// the client never constructs or interprets it, so the ordering fields stay a server detail.\nexport const GetRealmSharedFilesInputSchema = z.object({\n realmId: workRealmIdSchema,\n limit: z.number().int().min(1).max(REALM_SHARED_FILES_PAGE_LIMIT).optional(),\n cursor: z.string().min(1).optional(),\n}).strict();\nexport type GetRealmSharedFilesInput = z.infer<typeof GetRealmSharedFilesInputSchema>;\n\n/** `{ files }` is preserved as-is; `folders` and `nextCursor` are ADDITIVE. `folders` is the\n * Realm's complete folder set (bounded by MAX_REALM_FILE_FOLDERS), not a page — the gallery\n * must be able to render an empty folder, and the steward must see one to move files into.\n * `nextCursor` is absent/null on the last page. */\nexport const GetRealmSharedFilesResponseSchema = z.object({\n files: z.array(RealmSharedFileProjectionSchema),\n folders: z.array(RealmFileFolderProjectionSchema),\n nextCursor: z.string().min(1).nullable().optional(),\n}).strict();\nexport type GetRealmSharedFilesResponse = z.infer<typeof GetRealmSharedFilesResponseSchema>;\n\n// ---- realm-file promotion queue (steward / full admin) ---------------------------------\n// A SEPARATE bounded projection rather than an `includePending` flag on the artisan gallery:\n// a caller-controlled flag would put \"may this caller see pending rows\" in the client's\n// hands. Ordinary artisans can never enumerate pending requests.\n\n/** One AWAITING-DECISION request. Accepts only the pending-approval standing (via\n * RealmFilePendingApprovalStatusSchema) — an approved or unshared row is structurally\n * inexpressible in the queue. */\nexport const RealmFilePromotionQueueRowSchema = z.object({\n mediaAssetId: mediaAssetIdSchema,\n mediaKind: ContentMediaKindSchema,\n realmFileCanonStatus: RealmFilePendingApprovalStatusSchema,\n /** The Work file's own name — the steward decides on a named file, not a thumbnail. */\n name: z.string(),\n creatorUid: userIdSchema,\n workProjectId: workProjectIdSchema,\n workFileId: z.string(),\n /** Echoed so the approve/decline call can carry the exact observed request id; a stale tab\n * deciding a superseded request is then a visible conflict, not a silent overwrite. */\n realmFileShareRequestId: realmFileShareRequestIdSchema,\n /** The RECORDED requester — the resolution notification is addressed from this, never\n * guessed from the uploader. */\n realmFileShareRequestedByUid: userIdSchema,\n realmFileShareRequestedAt: z.number(),\n}).strict();\nexport type RealmFilePromotionQueueRow = z.infer<typeof RealmFilePromotionQueueRowSchema>;\n\nexport const GetRealmFilePromotionQueueInputSchema = z.object({\n workRealmId: workRealmIdSchema,\n limit: z.number().int().min(1).max(REALM_FILE_PROMOTION_QUEUE_PAGE_LIMIT).optional(),\n cursor: z.string().min(1).optional(),\n}).strict();\nexport type GetRealmFilePromotionQueueInput = z.infer<typeof GetRealmFilePromotionQueueInputSchema>;\n\n/** `folders` rides along so the approval UI can offer the folder picker (and detect the\n * \"no folders yet\" state) without a second round-trip. */\nexport const GetRealmFilePromotionQueueResponseSchema = z.object({\n requests: z.array(RealmFilePromotionQueueRowSchema),\n folders: z.array(RealmFileFolderProjectionSchema),\n nextCursor: z.string().min(1).nullable().optional(),\n}).strict();\nexport type GetRealmFilePromotionQueueResponse = z.infer<typeof GetRealmFilePromotionQueueResponseSchema>;\n\n// ---- WORK-side share-state projection --------------------------------------------------\n// The mirror image of the two Realm-side projections above, for the WORK's own files surface:\n// a file admin looking at their folder listing needs to know which files are already shared\n// or awaiting a steward decision, so the row can show \"Requested\" / \"Shared\" and offer\n// withdraw where it applies.\n//\n// It is a SERVER projection for the same reason the gallery is: `mediaAssets` is\n// client-unreadable, so share state cannot be read from the file document. File-admin\n// authorization is asserted in the callable; this shape carries no authority hint.\n\n/** One work file's realm-share state.\n *\n * The `requestId` is present EXACTLY while the file is awaiting a decision — it is what the\n * withdraw call must carry, and it is meaningless once the request is resolved. Enforced\n * rather than merely optional, mirroring the asset's own legal-combination invariant, so the\n * UI can never be handed a pending row with nothing to withdraw (or an approved row carrying\n * a stale request id it might send).\n *\n * `workFileId` uses plain `z.string()` like the sibling projection rows in this file\n * (inputs use `.min(1)`; projection rows describe server-produced data). */\nexport const WorkFileRealmShareStateSchema = z.object({\n workFileId: z.string(),\n // Never `none`: an unshared file simply has no row (see the response below).\n realmFileCanonStatus: RealmFileActiveStatusSchema,\n realmFileShareRequestId: realmFileShareRequestIdSchema.optional(),\n}).strict().superRefine((val, ctx) => {\n const isPending = val.realmFileCanonStatus === REALM_FILE_PENDING_APPROVAL_STATUS;\n if (isPending && val.realmFileShareRequestId === undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['realmFileShareRequestId'],\n message: 'a pending row must carry its request id — it is what the withdraw call compares against',\n });\n }\n if (!isPending && val.realmFileShareRequestId !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['realmFileShareRequestId'],\n message: 'a resolved row must not carry a request id — the request is no longer pending',\n });\n }\n});\nexport type WorkFileRealmShareState = z.infer<typeof WorkFileRealmShareStateSchema>;\n\nexport const GetWorkFileRealmShareStatesInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n}).strict();\nexport type GetWorkFileRealmShareStatesInput = z.infer<typeof GetWorkFileRealmShareStatesInputSchema>;\n\n/** Rows exist ONLY for files whose standing is not `none`. An ABSENT row therefore means the\n * file has never been requested or shared — that is the encoding, so the client must treat a\n * missing entry as \"not shared\" rather than \"unknown\". Bounded implicitly by the Work's own\n * file cap (MAX_WORK_FILES), so this response needs no page cursor of its own. */\nexport const GetWorkFileRealmShareStatesResponseSchema = z.object({\n states: z.array(WorkFileRealmShareStateSchema),\n}).strict();\nexport type GetWorkFileRealmShareStatesResponse = z.infer<typeof GetWorkFileRealmShareStatesResponseSchema>;\n\n// ---- what a Realm-file action changed ------------------------------------------------------\n// The gallery and the steward's queue are endless lists a client patches in place, never reloads\n// (FRONTEND-103); their rows are server projections the client cannot read, so every action that\n// changes a file's standing answers with the file's row in each list after it whenever its\n// post-commit read succeeds, built by the same projection owners the reads use.\n\n/**\n * One file's rows after an action: its gallery row, its queue row, and its Work-side share state —\n * each `null` when the file is absent from that list — plus every folder whose server-computed\n * `fileCount` the action changed (an approval, a move, or an un-share), as the gallery shows it.\n * Each row is non-null only when the file passes that list's own read filters — `sharedFile` only\n * for an approved file whose serving status is `servable`, so an action on a hidden or quarantined\n * file never puts it back into a gallery the read would not show it in.\n */\nexport const RealmFileListsChangeSchema = z.object({\n mediaAssetId: mediaAssetIdSchema,\n workProjectId: workProjectIdSchema,\n workFileId: z.string(),\n sharedFile: RealmSharedFileProjectionSchema.nullable(),\n promotionRequest: RealmFilePromotionQueueRowSchema.nullable(),\n shareState: WorkFileRealmShareStateSchema.nullable(),\n folders: z.array(RealmFileFolderProjectionSchema),\n}).strict();\nexport type RealmFileListsChange = z.infer<typeof RealmFileListsChangeSchema>;\n\n/** The answer of every action that changes a file's Realm standing: request, withdraw, approve,\n * decline, canon toggle, folder move, and the admin un-share. `change` is present when the read\n * after the commit succeeded; a failed read never fails an action that already committed (ENG-009),\n * and the client keeps its loaded pages when it is absent. Non-strict (server → client). */\nexport const RealmFileTransitionResultSchema = z.object({\n success: z.literal(true),\n change: RealmFileListsChangeSchema.optional(),\n});\nexport type RealmFileTransitionResult = z.infer<typeof RealmFileTransitionResultSchema>;\n\n/** The answer of a Realm folder create or rename: the folder as the gallery shows it, present when\n * the read after the commit succeeded (ENG-009; the client keeps its pages when it is absent). */\nexport const RealmFileFolderResultSchema = z.object({\n success: z.literal(true),\n folder: RealmFileFolderProjectionSchema.optional(),\n});\nexport type RealmFileFolderResult = z.infer<typeof RealmFileFolderResultSchema>;\n\n/** The answer of a Realm folder delete: the folder it removed. */\nexport const DeleteRealmFileFolderResultSchema = z.object({\n success: z.literal(true),\n realmFileFolderId: realmFileFolderIdSchema,\n});\nexport type DeleteRealmFileFolderResult = z.infer<typeof DeleteRealmFileFolderResultSchema>;\n\nconst baseFields = {\n workingTitle: z.string().min(1).max(MAX_WORK_PROJECT_TITLE_LENGTH),\n workingDescription: z.string().min(1).max(MAX_WORK_PROJECT_DESCRIPTION_LENGTH),\n workProjectType: workProjectTypeSchema,\n hallWingType: hallWingTypeSchema,\n};\n\n// A Realm working title is reserved under `reservedRealmNames/{UPPER(title)}` — the\n// UPPERCASED title IS the Firestore doc ID (runCreateWorkRealm.reservedRealmNameRef).\n// Firestore doc IDs cannot contain `/` and cannot be exactly `.` or `..`, so a title\n// that would produce an invalid/ambiguous doc ID must be rejected at the callable\n// boundary (both the create transaction and the soft availability check) rather than\n// hard-failing with an opaque `internal` error deep inside ref construction. Length\n// derives from MAX_WORK_REALM_TITLE_LENGTH; only the doc-ID-breaking characters are\n// forbidden. Keep CheckRealmNameAvailableInputSchema in lockstep so a valid-at-create\n// name is never rejected at form time (and vice-versa).\nexport const realmWorkingTitleSchema = z\n .string()\n .min(1)\n .max(MAX_WORK_REALM_TITLE_LENGTH)\n .refine((v) => !v.includes('/'), { message: 'Realm name cannot contain a slash (/).' })\n .refine((v) => v !== '.' && v !== '..', { message: 'Realm name cannot be \".\" or \"..\".' });\n\nexport const RealmCreationModeSchema = z.enum([\n 'newPublicRealm',\n 'newStandaloneRealm',\n 'existingPublicRealm',\n]);\nexport type RealmCreationMode = z.infer<typeof RealmCreationModeSchema>;\n\nexport const CreateWorkProjectInputSchema = z.discriminatedUnion('realmCreationMode', [\n z.object({\n ...baseFields,\n realmCreationMode: z.literal('newPublicRealm'),\n realmWorkingTitle: realmWorkingTitleSchema,\n realmWorkingDescription: z.string().min(1).max(MAX_WORK_REALM_DESCRIPTION_LENGTH),\n }).strict(),\n // Standalone realms are background plumbing (DJ ruling 2026-07-19): the user enters NO\n // realm information — the backend creates the realm shell with a synthetic unique\n // title/description (the generated workRealmId), so nothing user-authored exists on it\n // and no human realm name is consumed from the reservedRealmNames namespace.\n z.object({\n ...baseFields,\n realmCreationMode: z.literal('newStandaloneRealm'),\n }).strict(),\n z.object({\n ...baseFields,\n realmCreationMode: z.literal('existingPublicRealm'),\n workRealmId: workRealmIdSchema,\n }).strict(),\n]);\nexport type CreateWorkProjectInput = z.infer<typeof CreateWorkProjectInputSchema>;\n\n/** The `createWorkProject` answer: the new Work's id and its stored document, which that id names. */\nexport const CreateWorkProjectResultSchema = z\n .object({\n success: z.literal(true),\n workProjectId: workProjectIdSchema,\n workProjectData: FullWorkProjectSchema,\n })\n .strict()\n .superRefine((result, ctx) => {\n if (result.workProjectData.workProjectId !== result.workProjectId) {\n ctx.addIssue({ code: 'custom', path: ['workProjectData', 'workProjectId'] });\n }\n });\nexport type CreateWorkProjectResult = z.infer<typeof CreateWorkProjectResultSchema>;\n\n// Identified by the workAssets subcollection doc id — never by URL parsing\n// (no delete path may depend on a URL; see media-assets-and-protected-serving.md).\nexport const DeleteWorkAssetInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n workAssetId: documentIdSegmentSchema,\n}).strict();\nexport type DeleteWorkAssetInput = z.infer<typeof DeleteWorkAssetInputSchema>;\n\nexport const InviteSourceSchema = z.discriminatedUnion('type', [\n z.object({\n type: z.literal('standalone'),\n }).strict(),\n z.object({\n type: z.literal('craftSkill'),\n data: z.object({\n craftSkillId: craftSkillIdSchema,\n craftSkillOwnerUserId: userIdSchema,\n craftSkillName: z.string().min(1).max(MAX_CRAFT_SKILL_NAME_LENGTH),\n }).strict(),\n }).strict(),\n z.object({\n type: z.literal('commission'),\n // Titles are NOT snapshotted here (Display Identity Invariant — client display text\n // must be re-sourced at render by id). `postingStakeSharesOffered` is not display text;\n // the server re-sources it from the posting doc in the invite transaction (never trusts\n // the client copy) — kept so the shape stays server-writable.\n data: z.object({\n commissionListingId: commissionListingIdSchema,\n commissionProposalId: commissionProposalIdSchema,\n proposalArtisanUserId: userIdSchema,\n postingStakeSharesOffered: z.number().int().min(1),\n }).strict(),\n }).strict(),\n z.object({\n type: z.literal('audition'),\n data: z.object({\n auditionId: auditionIdSchema,\n auditionEntryId: auditionEntryIdSchema,\n respondentUserId: userIdSchema,\n postingStakeSharesOffered: z.number().int().min(1),\n }).strict(),\n }).strict(),\n]);\nexport type InviteSource = z.infer<typeof InviteSourceSchema>;\nexport type InviteSourceType = InviteSource['type'];\n\nexport const InviteUserToGuildInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n inviteeUid: userIdSchema,\n message: z.string().min(1).max(MAX_GUILD_INVITE_MESSAGE_LENGTH),\n stakeSharesOffered: z.number().int().min(1),\n source: InviteSourceSchema,\n}).strict();\nexport type InviteUserToGuildInput = z.infer<typeof InviteUserToGuildInputSchema>;\n\n// `finalized` is the terminal SUCCESS state (`accepted` is a transient state a trigger\n// consumes within seconds). Managers must be able to list finalized invites to see the\n// guild's actual recruitment history — not only failures and in-flight items. Derives from\n// the ONE canonical status enum (schemas/atoms.ts), never a re-declared literal.\n// The history is paged: the server reads `ITEMS_PER_PAGE_GUILD_INVITES` invites per call (the\n// caller sends no page size), and `cursor` is the opaque token the previous page answered.\n// The result is `ListGuildInvitesResultSchema` (doc-schemas/messaging, beside the invite doc).\nexport const ListGuildInvitesInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n statuses: z.array(guildInviteConversationStatusSchema).min(1),\n cursor: z.string().min(1).optional(),\n}).strict();\nexport type ListGuildInvitesInput = z.infer<typeof ListGuildInvitesInputSchema>;\n\nexport const UpdateGuildmateTradeProfessionsInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n userId: userIdSchema,\n tradeProfession: z.enum(TRADE_PROFESSION_VALUES),\n action: addRemoveActionSchema,\n}).strict();\nexport type UpdateGuildmateTradeProfessionsInput = z.infer<typeof UpdateGuildmateTradeProfessionsInputSchema>;\n\nconst GUILD_STANDING_VALUES_ENUM = GUILD_STANDING_VALUES as [typeof GUILD_STANDING_VALUES[number], ...typeof GUILD_STANDING_VALUES[number][]];\n\nexport const UpdateGuildmateStandingInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n userId: userIdSchema,\n guildStanding: z.enum(GUILD_STANDING_VALUES_ENUM),\n action: addRemoveActionSchema,\n}).strict();\nexport type UpdateGuildmateStandingInput = z.infer<typeof UpdateGuildmateStandingInputSchema>;\n\n// Member self-leave (leaveWorkProject). The leaver is ALWAYS request.auth.uid — never a\n// client-supplied uid (invariant 3) — so the input carries only the workProjectId. The\n// callable composes the internal `depart` stake-share operation for ctx.uid.\nexport const LeaveWorkProjectInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n}).strict();\nexport type LeaveWorkProjectInput = z.infer<typeof LeaveWorkProjectInputSchema>;\n\nexport const UpdatePublicWorkProjectDetailsInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n workingTitle: z.string().min(1).max(MAX_WORK_PROJECT_TITLE_LENGTH),\n workingDescription: z.string().min(1).max(MAX_WORK_PROJECT_DESCRIPTION_LENGTH),\n}).strict();\nexport type UpdatePublicWorkProjectDetailsInput = z.infer<typeof UpdatePublicWorkProjectDetailsInputSchema>;\n\nexport const UpdateWorkRealmDetailsInputSchema = z.object({\n workRealmId: workRealmIdSchema,\n workingTitle: z.string().min(1).max(MAX_WORK_REALM_TITLE_LENGTH),\n workingDescription: z.string().min(1).max(MAX_WORK_REALM_DESCRIPTION_LENGTH),\n}).strict();\nexport type UpdateWorkRealmDetailsInput = z.infer<typeof UpdateWorkRealmDetailsInputSchema>;\n\n// Unauthenticated soft-check for a Realm working title. Must match the authoritative\n// realmWorkingTitle contract in CreateWorkProjectInputSchema (realmWorkingTitleSchema:\n// MAX_WORK_REALM_TITLE_LENGTH, rejecting the doc-ID-breaking `/` and reserved `.`/`..`). Never be\n// stricter than the create transaction or a valid-at-create name would be rejected at\n// form time — reuse the SAME schema so the two can never drift.\nexport const CheckRealmNameAvailableInputSchema = z.object({\n workingTitle: realmWorkingTitleSchema,\n}).strict();\nexport type CheckRealmNameAvailableInput = z.infer<typeof CheckRealmNameAvailableInputSchema>;\n\n// ---- work-project file folders (S7) ---------------------------------------------------\n// The default \"All Guildmates\" folder is immutable; custom-folder access is by trade\n// profession. All four callables require a file-admin standing via assertCanManageFolders.\n\nconst tradeProfessionListSchema = z\n .array(z.enum(TRADE_PROFESSION_VALUES))\n .max(TRADE_PROFESSION_OPTIONS.length);\n\nexport const CreateFileFolderInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n name: z.string().min(1).max(MAX_FILE_FOLDER_NAME_LENGTH),\n canViewTradeProfessions: tradeProfessionListSchema,\n canUploadTradeProfessions: tradeProfessionListSchema,\n canDeleteTradeProfessions: tradeProfessionListSchema,\n}).strict();\nexport type CreateFileFolderInput = z.infer<typeof CreateFileFolderInputSchema>;\n\nexport const RenameFileFolderInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n folderId: workFileFolderIdSchema,\n name: z.string().min(1).max(MAX_FILE_FOLDER_NAME_LENGTH),\n}).strict();\nexport type RenameFileFolderInput = z.infer<typeof RenameFileFolderInputSchema>;\n\nexport const UpdateFolderProfessionsInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n folderId: workFileFolderIdSchema,\n canViewTradeProfessions: tradeProfessionListSchema,\n canUploadTradeProfessions: tradeProfessionListSchema,\n canDeleteTradeProfessions: tradeProfessionListSchema,\n}).strict();\nexport type UpdateFolderProfessionsInput = z.infer<typeof UpdateFolderProfessionsInputSchema>;\n\nexport const DeleteFileFolderInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n folderId: workFileFolderIdSchema,\n}).strict();\nexport type DeleteFileFolderInput = z.infer<typeof DeleteFileFolderInputSchema>;\n\n// ---- realm shared files ---------------------------------------------------------------\n\n// Delete a single work file (by folder + file id). File-admin authz is enforced in the\n// callable/core transaction.\nexport const DeleteWorkFileInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n folderId: workFileFolderIdSchema,\n workFileId: workFileIdSchema,\n}).strict();\nexport type DeleteWorkFileInput = z.infer<typeof DeleteWorkFileInputSchema>;\n\n// Set canon status on a realm shared file. Realm-steward-only authz is enforced inside the\n// core's transaction against workRealms/{workRealmId}.workStewardUid.\nexport const UpdateWorkFileRealmCanonInputSchema = z.object({\n workRealmId: workRealmIdSchema,\n mediaAssetId: mediaAssetIdSchema,\n canon: z.boolean(),\n}).strict();\nexport type UpdateWorkFileRealmCanonInput = z.infer<typeof UpdateWorkFileRealmCanonInputSchema>;\n\n// ---- the promotion approval gate -------------------------------------------------------\n// Promotion is a REQUEST, not an instant share: the Work file admin asks, and the REALM\n// steward approves (choosing the folder) or declines. Nothing is served to the Realm until\n// approval — a requested file stays `scoped` and invisible to the member gallery.\n//\n// Every one of these carries the `requestId` so a decision always names the exact request it\n// observed. Realm-side authority (steward, public + non-hidden Realm) is derived from the\n// Realm document inside each core's transaction; these shapes carry no authority hints.\n\n// REQUEST promotion of a work file into its Realm's shared-file pool. File-admin authz\n// (`workFile.promoteToRealm`) is enforced inside the core's transaction.\n// `requestId` is CLIENT-generated and stable: replaying the same id is an idempotent success\n// (no second audit event, no second notification), while a DIFFERENT id arriving while one\n// request is already pending is a conflict — never a silent overwrite.\nexport const UpdateWorkFileRealmShareInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n workFileId: workFileIdSchema,\n requestId: realmFileShareRequestIdSchema,\n}).strict();\nexport type UpdateWorkFileRealmShareInput = z.infer<typeof UpdateWorkFileRealmShareInputSchema>;\n\n// WITHDRAW a still-pending request (the requesting Work's file admin). Realm-share\n// permanence begins at APPROVAL — before a steward decides, an accidental request must be\n// correctable by the side that made it. Addressed by Work coordinates like the request\n// itself, and compares `requestId` so a withdrawal can never cancel a newer re-request.\nexport const WithdrawRealmFilePromotionRequestInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n workFileId: workFileIdSchema,\n requestId: realmFileShareRequestIdSchema,\n}).strict();\nexport type WithdrawRealmFilePromotionRequestInput = z.infer<typeof WithdrawRealmFilePromotionRequestInputSchema>;\n\n// APPROVE a pending request (Realm steward). Approval assigns the folder — there is no\n// default folder, so `realmFileFolderId` is REQUIRED and the core verifies the folder is\n// under this exact Realm before flipping the file to `nonCanon` + the artisan tier.\nexport const ApproveRealmFilePromotionInputSchema = z.object({\n workRealmId: workRealmIdSchema,\n mediaAssetId: mediaAssetIdSchema,\n realmFileFolderId: realmFileFolderIdSchema,\n requestId: realmFileShareRequestIdSchema,\n}).strict();\nexport type ApproveRealmFilePromotionInput = z.infer<typeof ApproveRealmFilePromotionInputSchema>;\n\n// DECLINE a pending request (Realm steward). Returns the file to `none` and clears the Realm\n// + request fields. No folder is involved — a declined file never entered the pool.\nexport const DeclineRealmFilePromotionInputSchema = z.object({\n workRealmId: workRealmIdSchema,\n mediaAssetId: mediaAssetIdSchema,\n requestId: realmFileShareRequestIdSchema,\n}).strict();\nexport type DeclineRealmFilePromotionInput = z.infer<typeof DeclineRealmFilePromotionInputSchema>;\n\n// ADMIN un-share of an ALREADY-APPROVED realm file (`adminUpdateWorkFileRealmUnshare`).\n// Once a steward approves, sharing is PERMANENT for members — the only way out is an admin\n// acting on a support thread. This is its own input rather than a reuse of the share/request\n// shape: an approved file has NO pending request, so `requestId` is meaningless here and\n// requiring one would make the callable unusable against exactly the state it exists to\n// unwind. It carries the ORIGINAL two-field Work-coordinate shape the share input had before\n// the approval gate; the core resolves the file by collection-group query on\n// (`workProjectId`, `workFileId`). Admin authority is asserted at the callable's admin gate\n// and re-asserted in the core (which rejects any non-`adminOverride` actor) — never inferred\n// from anything in this payload.\nexport const AdminUpdateWorkFileRealmUnshareInputSchema = z.object({\n workProjectId: workProjectIdSchema,\n workFileId: workFileIdSchema,\n}).strict();\nexport type AdminUpdateWorkFileRealmUnshareInput = z.infer<typeof AdminUpdateWorkFileRealmUnshareInputSchema>;\n\n// ---- realm shared-file folders (steward-managed) ---------------------------------------\n// Mirrors the Work-side folder CRUD shapes, minus the trade-profession access lists: Realm\n// folders are organizational only (Realm-level visibility is the whole access model at\n// launch). Names reuse the ONE platform folder-name bound; the server derives\n// `name_lowercase` and enforces case-insensitive uniqueness within the Realm.\n\nexport const CreateRealmFileFolderInputSchema = z.object({\n workRealmId: workRealmIdSchema,\n name: z.string().min(1).max(MAX_FILE_FOLDER_NAME_LENGTH),\n}).strict();\nexport type CreateRealmFileFolderInput = z.infer<typeof CreateRealmFileFolderInputSchema>;\n\n/** Rename. `update*` per BACKEND-305 — it modifies an existing doc in place. */\nexport const UpdateRealmFileFolderInputSchema = z.object({\n workRealmId: workRealmIdSchema,\n realmFileFolderId: realmFileFolderIdSchema,\n name: z.string().min(1).max(MAX_FILE_FOLDER_NAME_LENGTH),\n}).strict();\nexport type UpdateRealmFileFolderInput = z.infer<typeof UpdateRealmFileFolderInputSchema>;\n\n/** Delete requires the folder to be EMPTY (the steward moves files out first) — no surprise\n * data moves and no reassignment-target picker at launch. Emptiness is proven by an\n * in-transaction query for ANY asset carrying this folder id, regardless of serving/hidden/\n * canon state: a hidden file still occupies its folder. */\nexport const DeleteRealmFileFolderInputSchema = z.object({\n workRealmId: workRealmIdSchema,\n realmFileFolderId: realmFileFolderIdSchema,\n}).strict();\nexport type DeleteRealmFileFolderInput = z.infer<typeof DeleteRealmFileFolderInputSchema>;\n\n/** Move an approved shared file between folders. `expectedRealmFileFolderId` is a\n * compare-and-set precondition — a steward acting on a stale view must not silently undo a\n * move made from another tab. */\nexport const UpdateRealmFileFolderAssignmentInputSchema = z.object({\n workRealmId: workRealmIdSchema,\n mediaAssetId: mediaAssetIdSchema,\n expectedRealmFileFolderId: realmFileFolderIdSchema,\n realmFileFolderId: realmFileFolderIdSchema,\n}).strict();\nexport type UpdateRealmFileFolderAssignmentInput = z.infer<typeof UpdateRealmFileFolderAssignmentInputSchema>;\n\n\n"]}
|