@ttt-productions/ttt-core 0.79.11 → 0.79.13

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.
Files changed (50) hide show
  1. package/dist/constants/business-content.d.ts +7 -0
  2. package/dist/constants/business-content.d.ts.map +1 -1
  3. package/dist/constants/business-content.js +7 -0
  4. package/dist/constants/business-content.js.map +1 -1
  5. package/dist/constants/business-user.d.ts +8 -0
  6. package/dist/constants/business-user.d.ts.map +1 -1
  7. package/dist/constants/business-user.js +8 -0
  8. package/dist/constants/business-user.js.map +1 -1
  9. package/dist/constants/chat.d.ts +9 -0
  10. package/dist/constants/chat.d.ts.map +1 -1
  11. package/dist/constants/chat.js +9 -0
  12. package/dist/constants/chat.js.map +1 -1
  13. package/dist/doc-schemas/account-deletion.d.ts +1 -0
  14. package/dist/doc-schemas/account-deletion.d.ts.map +1 -1
  15. package/dist/doc-schemas/account-deletion.js +7 -0
  16. package/dist/doc-schemas/account-deletion.js.map +1 -1
  17. package/dist/doc-schemas/registry.d.ts +13 -4
  18. package/dist/doc-schemas/registry.d.ts.map +1 -1
  19. package/dist/doc-schemas/report-docs.d.ts +21 -0
  20. package/dist/doc-schemas/report-docs.d.ts.map +1 -1
  21. package/dist/doc-schemas/report-docs.js +31 -1
  22. package/dist/doc-schemas/report-docs.js.map +1 -1
  23. package/dist/media/domain-events-work.d.ts +2 -2
  24. package/dist/media/domain-events-work.d.ts.map +1 -1
  25. package/dist/media/domain-events-work.js +5 -2
  26. package/dist/media/domain-events-work.js.map +1 -1
  27. package/dist/media/domain-events.d.ts +1 -1
  28. package/dist/media/domain-events.js +2 -2
  29. package/dist/media/domain-events.js.map +1 -1
  30. package/dist/media/pending-media.d.ts +11 -11
  31. package/dist/permissions/work-project-permissions-data.d.ts +1 -6
  32. package/dist/permissions/work-project-permissions-data.d.ts.map +1 -1
  33. package/dist/permissions/work-project-permissions-data.js +1 -6
  34. package/dist/permissions/work-project-permissions-data.js.map +1 -1
  35. package/dist/schemas/chat.d.ts +5 -0
  36. package/dist/schemas/chat.d.ts.map +1 -1
  37. package/dist/schemas/chat.js +10 -0
  38. package/dist/schemas/chat.js.map +1 -1
  39. package/dist/schemas/commissions.d.ts +0 -4
  40. package/dist/schemas/commissions.d.ts.map +1 -1
  41. package/dist/schemas/commissions.js +0 -3
  42. package/dist/schemas/commissions.js.map +1 -1
  43. package/dist/schemas/users.d.ts +11 -0
  44. package/dist/schemas/users.d.ts.map +1 -1
  45. package/dist/schemas/users.js +15 -0
  46. package/dist/schemas/users.js.map +1 -1
  47. package/dist/types/audit.d.ts +1 -1
  48. package/dist/types/audit.d.ts.map +1 -1
  49. package/dist/types/audit.js.map +1 -1
  50. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"commissions.js","sourceRoot":"","sources":["../../src/schemas/commissions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AACnF,OAAO,EAAE,iCAAiC,EAAE,MAAM,0BAA0B,CAAC;AAE7E,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,IAAI,CAAC;IACnD,MAAM;IACN,SAAS;IACT,UAAU;IACV,UAAU;CACX,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,mBAAmB,EAAE,yBAAyB;CAC/C,CAAC,CAAC,MAAM,EAAE,CAAC;AAGZ,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,mBAAmB,EAAE,yBAAyB;CAC/C,CAAC,CAAC,MAAM,EAAE,CAAC;AAGZ,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1D,mBAAmB,EAAE,yBAAyB;IAC9C,oBAAoB,EAAE,0BAA0B;CACjD,CAAC,CAAC,MAAM,EAAE,CAAC;AAGZ,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5D,mBAAmB,EAAE,yBAAyB;IAC9C,oBAAoB,EAAE,0BAA0B;IAChD,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE;CACnB,CAAC,CAAC,MAAM,EAAE,CAAC;AAGZ,MAAM,CAAC,MAAM,uCAAuC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9D,mBAAmB,EAAE,yBAAyB;IAC9C,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,iCAAiC,CAAC;CAC1E,CAAC,CAAC,MAAM,EAAE,CAAC;AAGZ,uFAAuF;AACvF,sFAAsF;AACtF,8EAA8E;AAC9E,uFAAuF;AACvF,6EAA6E;AAC7E,wFAAwF;AACxF,oFAAoF;AACpF,+EAA+E;AAC/E,kDAAkD;AAClD,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5D,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IACxB,mBAAmB,EAAE,yBAAyB;IAC9C,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACjC,+EAA+E;IAC/E,oBAAoB,EAAE,0BAA0B;CACjD,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { commissionListingIdSchema, commissionProposalIdSchema } from './atoms.js';\nimport { MAX_COMMISSION_DESCRIPTION_LENGTH } from '../constants/business.js';\n\nexport const CommissionProposalStatusSchema = z.enum([\n 'open',\n 'invited',\n 'accepted',\n 'rejected',\n]);\nexport type CommissionProposalStatus = z.infer<typeof CommissionProposalStatusSchema>;\n\nexport const CloseCommissionInputSchema = z.object({\n commissionListingId: commissionListingIdSchema,\n}).strict();\nexport type CloseCommissionInput = z.infer<typeof CloseCommissionInputSchema>;\n\nexport const DeleteCommissionInputSchema = z.object({\n commissionListingId: commissionListingIdSchema,\n}).strict();\nexport type DeleteCommissionInput = z.infer<typeof DeleteCommissionInputSchema>;\n\nexport const RejectCommissionProposalInputSchema = z.object({\n commissionListingId: commissionListingIdSchema,\n commissionProposalId: commissionProposalIdSchema,\n}).strict();\nexport type RejectCommissionProposalInput = z.infer<typeof RejectCommissionProposalInputSchema>;\n\nexport const SetCommissionProposalSavedInputSchema = z.object({\n commissionListingId: commissionListingIdSchema,\n commissionProposalId: commissionProposalIdSchema,\n saved: z.boolean(),\n}).strict();\nexport type SetCommissionProposalSavedInput = z.infer<typeof SetCommissionProposalSavedInputSchema>;\n\nexport const CreateCommissionProposalTextInputSchema = z.object({\n commissionListingId: commissionListingIdSchema,\n coverLetterText: z.string().min(1).max(MAX_COMMISSION_DESCRIPTION_LENGTH),\n}).strict();\nexport type CreateCommissionProposalTextInput = z.infer<typeof CreateCommissionProposalTextInputSchema>;\n\n// Acceptance result of the commission-proposal MEDIA path (startUpload with fileOrigin\n// 'commission-proposal'). Creation itself is asynchronous via the media pipeline; the\n// proposal doc id is the CALLER's uid (one proposal per user per commission —\n// runCreateCommissionProposal: commissionProposalId = callerUid), so it is knowable at\n// accept time without any read. Non-strict (server → client result posture).\n// (The TEXT path's created-item result, CreateCommissionProposalTextResultSchema, lives\n// in ../doc-schemas/commissions.ts — it composes CommissionProposalSchema, and that\n// module imports THIS one, so declaring it here would be a module cycle. It is\n// re-exported on ./schemas via schemas/index.ts.)\nexport const ApplyToCommissionAcceptedResultSchema = z.object({\n success: z.literal(true),\n commissionListingId: commissionListingIdSchema,\n pendingMediaId: z.string().min(1),\n /** The eventual proposal doc id — the caller's uid (one proposal per user). */\n commissionProposalId: commissionProposalIdSchema,\n});\nexport type ApplyToCommissionAcceptedResult = z.infer<typeof ApplyToCommissionAcceptedResultSchema>;\n\n\n"]}
1
+ {"version":3,"file":"commissions.js","sourceRoot":"","sources":["../../src/schemas/commissions.ts"],"names":[],"mappings":"AAAA,OAAO,E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C,OAAO,CAAC,IAAI,CAAC;IACxB,mBAAmB,EAAE,yBAAyB;IAC9C,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACjC,+EAA+E;IAC/E,oBAAoB,EAAE,0BAA0B;CACjD,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { commissionListingIdSchema, commissionProposalIdSchema } from './atoms.js';\nimport { MAX_COMMISSION_DESCRIPTION_LENGTH } from '../constants/business.js';\n\nexport const CommissionProposalStatusSchema = z.enum([\n 'open',\n 'invited',\n 'accepted',\n 'rejected',\n]);\nexport type CommissionProposalStatus = z.infer<typeof CommissionProposalStatusSchema>;\n\nexport const CloseCommissionInputSchema = z.object({\n commissionListingId: commissionListingIdSchema,\n}).strict();\nexport type CloseCommissionInput = z.infer<typeof CloseCommissionInputSchema>;\n\nexport const RejectCommissionProposalInputSchema = z.object({\n commissionListingId: commissionListingIdSchema,\n commissionProposalId: commissionProposalIdSchema,\n}).strict();\nexport type RejectCommissionProposalInput = z.infer<typeof RejectCommissionProposalInputSchema>;\n\nexport const SetCommissionProposalSavedInputSchema = z.object({\n commissionListingId: commissionListingIdSchema,\n commissionProposalId: commissionProposalIdSchema,\n saved: z.boolean(),\n}).strict();\nexport type SetCommissionProposalSavedInput = z.infer<typeof SetCommissionProposalSavedInputSchema>;\n\nexport const CreateCommissionProposalTextInputSchema = z.object({\n commissionListingId: commissionListingIdSchema,\n coverLetterText: z.string().min(1).max(MAX_COMMISSION_DESCRIPTION_LENGTH),\n}).strict();\nexport type CreateCommissionProposalTextInput = z.infer<typeof CreateCommissionProposalTextInputSchema>;\n\n// Acceptance result of the commission-proposal MEDIA path (startUpload with fileOrigin\n// 'commission-proposal'). Creation itself is asynchronous via the media pipeline; the\n// proposal doc id is the CALLER's uid (one proposal per user per commission —\n// runCreateCommissionProposal: commissionProposalId = callerUid), so it is knowable at\n// accept time without any read. Non-strict (server → client result posture).\n// (The TEXT path's created-item result, CreateCommissionProposalTextResultSchema, lives\n// in ../doc-schemas/commissions.ts — it composes CommissionProposalSchema, and that\n// module imports THIS one, so declaring it here would be a module cycle. It is\n// re-exported on ./schemas via schemas/index.ts.)\nexport const ApplyToCommissionAcceptedResultSchema = z.object({\n success: z.literal(true),\n commissionListingId: commissionListingIdSchema,\n pendingMediaId: z.string().min(1),\n /** The eventual proposal doc id — the caller's uid (one proposal per user). */\n commissionProposalId: commissionProposalIdSchema,\n});\nexport type ApplyToCommissionAcceptedResult = z.infer<typeof ApplyToCommissionAcceptedResultSchema>;\n\n\n"]}
@@ -82,4 +82,15 @@ export declare const LookupUserByEmailOrUidInputSchema: z.ZodObject<{
82
82
  query: z.ZodString;
83
83
  }, z.core.$strict>;
84
84
  export type LookupUserByEmailOrUidInput = z.infer<typeof LookupUserByEmailOrUidInputSchema>;
85
+ export declare const RequestAccountDeletionResultSchema: z.ZodObject<{
86
+ success: z.ZodLiteral<true>;
87
+ scheduledScrubAt: z.ZodNumber;
88
+ alreadyPending: z.ZodBoolean;
89
+ }, z.core.$strip>;
90
+ export type RequestAccountDeletionResult = z.infer<typeof RequestAccountDeletionResultSchema>;
91
+ export declare const CancelAccountDeletionResultSchema: z.ZodObject<{
92
+ success: z.ZodLiteral<true>;
93
+ cancelled: z.ZodBoolean;
94
+ }, z.core.$strip>;
95
+ export type CancelAccountDeletionResult = z.infer<typeof CancelAccountDeletionResultSchema>;
85
96
  //# sourceMappingURL=users.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/schemas/users.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB;gFACgF;AAChF,eAAO,MAAM,iBAAiB,aAIN,CAAC;AAEzB,eAAO,MAAM,wCAAwC,iCAAwB,CAAC;AAC9E,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wCAAwC,CAAC,CAAC;AAM1G,eAAO,MAAM,4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GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAE9F,eAAO,MAAM,iCAAiC;;;iBAI5C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC"}
@@ -128,4 +128,19 @@ export const SearchPublicUsersInputSchema = z.object({
128
128
  export const LookupUserByEmailOrUidInputSchema = z.object({
129
129
  query: z.string().trim().min(1).max(MAX_USER_SEARCH_QUERY_LENGTH),
130
130
  }).strict();
131
+ // N3 account deletion — wire result contracts for the two user-facing callables (both take
132
+ // no input). Previously declared independently in functions/src and src/hooks — one drifting
133
+ // pair per callable. Non-strict (server → client result posture).
134
+ export const RequestAccountDeletionResultSchema = z.object({
135
+ success: z.literal(true),
136
+ /** When the scheduled scrub will run (requestedAt + the grace window), epoch ms. */
137
+ scheduledScrubAt: z.number(),
138
+ /** True when an ACTIVE request already existed and its schedule was re-returned. */
139
+ alreadyPending: z.boolean(),
140
+ });
141
+ export const CancelAccountDeletionResultSchema = z.object({
142
+ success: z.literal(true),
143
+ /** False when there was no active request to cancel (idempotent no-op). */
144
+ cancelled: z.boolean(),
145
+ });
131
146
  //# sourceMappingURL=users.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"users.js","sourceRoot":"","sources":["../../src/schemas/users.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACd,2BAA2B,EAC3B,0BAA0B,EAC1B,4BAA4B,GAC7B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEjE;gFACgF;AAChF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC;KAC/B,MAAM,EAAE;KACR,GAAG,CAAC,mBAAmB,CAAC;K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_INTERNAL_REASON_LENGTH,\n MAX_USER_SEARCH_QUERY_LENGTH,\n} from '../constants/business.js';\nimport { UserAccountStatusSchema } from '../doc-schemas/user.js';\n\n/** The ONE composed display-name field validator (length bounds + charset). Every\n * callable accepting a display name spreads this — never a re-composed copy. */\nexport const displayNameSchema = z\n .string()\n .min(USERNAME_MIN_LENGTH)\n .max(USERNAME_MAX_LENGTH)\n .regex(USERNAME_REGEX);\n\nexport const AcceptSquareStreetzAgreementsInputSchema = z.object({}).strict();\nexport type AcceptSquareStreetzAgreementsInput = z.infer<typeof AcceptSquareStreetzAgreementsInputSchema>;\n\n// One-time acknowledgement gate before a user may download Hall content for personal\n// offline use (final wording owned by the legal-and-content step). No payload — the\n// callable records the timestamp in the caller's privateData. See\n// docs/design/media-assets-and-protected-serving.md (Hall/Library downloads).\nexport const AcceptHallDownloadAcknowledgementInputSchema = z.object({}).strict();\nexport type AcceptHallDownloadAcknowledgementInput = z.infer<typeof AcceptHallDownloadAcknowledgementInputSchema>;\n\n// The become-creator dialog's \"I confirm I am 18 years of age or older\" checkbox must reach the\n// server: the callable rejects when absent and records the attestation on the\n// artisanCreator.grantedToUser audit event (immutable, timestamped, with IP/UA) so it is provable.\nexport const BecomeArtisanCreatorInputSchema = z.object({\n ageAttested: z.literal(true),\n // \"I confirm I am a person located in the United States\" — required for now (only U.S. persons\n // may become artisans). Mirrors ageAttested: the callable rejects when absent and records the\n // attestation timestamp (privateData.usPersonAttestedAt) + the grant audit event.\n usPersonAttested: z.literal(true),\n // [Q21.5 REVISED — DJ 2026-07-06] The artisan's date of birth — the ONLY point in the system\n // where a DOB is collected for persistence (registration/upgrade derive the bracket and store\n // nothing). The dialog copy tells the user this must be THEIR birthday: when the payout system\n // ships, it has to match their payout (KYC) identity. The callable re-derives 18+ server-side\n // from this value; an under-18 derivation rejects (failure audit, nothing stored). Stored as\n // privateData attestedDateOfBirth + attestedDobSource 'artisanOnboarding'.\n dob: z.object({\n year: z.number().int(),\n month: z.number().int().min(1).max(12),\n day: z.number().int().min(1).max(31),\n }).strict(),\n}).strict();\nexport type BecomeArtisanCreatorInput = z.infer<typeof BecomeArtisanCreatorInputSchema>;\n\nexport const MarkWaitingForNewsApprovalInputSchema = z.object({}).strict();\nexport type MarkWaitingForNewsApprovalInput = z.infer<typeof MarkWaitingForNewsApprovalInputSchema>;\n\n// First-visit site-tour preference writer (updateSiteTourPreference). This is the ONE\n// server writer for `privateData/{uid}.siteTour`; the client never writes tour state\n// directly. Discriminated on `action`:\n// - deferToday: records the member's LOCAL calendar `date` (\"Not today\"); the automatic\n// invitation is suppressed for exactly that date.\n// - dismissAutomaticInvites: records the permanent \"Don't show this again\" time; no payload.\n// - completeTour: records completion; the callable stamps SITE_TOUR_CURRENT_VERSION and\n// completedAt server-side, so no version is accepted from the client (mirrors the\n// acknowledgement callables that record the authoritative value server-side rather than\n// trusting a client-supplied one). Bump SITE_TOUR_CURRENT_VERSION to re-invite everyone.\n// `date` uses the same strict YYYY-MM-DD convention as the age cluster's attestedDateOfBirth.\nexport const UpdateSiteTourPreferenceInputSchema = z.discriminatedUnion('action', [\n z.object({\n action: z.literal('deferToday'),\n date: z.string().regex(/^\\d{4}-\\d{2}-\\d{2}$/), // 'YYYY-MM-DD' (member's LOCAL calendar date)\n }).strict(),\n z.object({\n action: z.literal('dismissAutomaticInvites'),\n }).strict(),\n z.object({\n action: z.literal('completeTour'),\n }).strict(),\n]);\nexport type UpdateSiteTourPreferenceInput = z.infer<typeof UpdateSiteTourPreferenceInputSchema>;\n\n// Non-U.S. artisan-interest signup (the FCFS \"waitlist\" fields on privateData). Mirrors\n// MarkWaitingForNewsApproval but carries the applicant's country (+ optional region) so signups\n// can be opened by jurisdiction as each region's laws clear. The callable records it ONLY for\n// adult accounts (never a minor's location).\nexport const MarkNonUsArtisanInterestInputSchema = z.object({\n country: z.string().min(1).max(MAX_ARTISAN_LOCATION_LENGTH),\n region: z.string().max(MAX_ARTISAN_LOCATION_LENGTH).optional(),\n}).strict();\nexport type MarkNonUsArtisanInterestInput = z.infer<typeof MarkNonUsArtisanInterestInputSchema>;\n\nexport const RegisterUserInputSchema = z.object({\n displayName: displayNameSchema,\n agreements: z.object({\n age: z.literal(true),\n nudity: z.literal(true),\n meet: z.literal(true),\n cookies: z.literal(true),\n terms: z.literal(true),\n }).strict(),\n}).strict();\nexport type RegisterUserInput = z.infer<typeof RegisterUserInputSchema>;\n\nexport const SetUserStatusInputSchema = z.object({\n userId: userIdSchema,\n status: UserAccountStatusSchema,\n // Required by the callable when status is 'suspended' or 'banned' (shown to the\n // user in their restricted view and recorded on the audit event). Optional here\n // so reinstating to 'active' can omit it; the callable enforces presence.\n reason: z.string().trim().min(1).max(MAX_INTERNAL_REASON_LENGTH).optional(),\n}).strict();\nexport type SetUserStatusInput = z.infer<typeof SetUserStatusInputSchema>;\n\n// Admin forces an abusive display name off a user: the name is swapped to a neutral\n// placeholder, the old name is blocked from reuse, and the user must pick a new one.\nexport const ForceDisplayNameResetInputSchema = z.object({\n userId: userIdSchema,\n // Optional admin note recorded on the audit event.\n reason: z.string().trim().min(1).max(MAX_INTERNAL_REASON_LENGTH).optional(),\n}).strict();\nexport type ForceDisplayNameResetInput = z.infer<typeof ForceDisplayNameResetInputSchema>;\n\n// User completes a forced display-name reset by choosing a new name. Only honored while\n// the caller's userProfiles doc has `displayNameResetRequired === true`.\nexport const SetMyDisplayNameInputSchema = z.object({\n displayName: displayNameSchema,\n}).strict();\nexport type SetMyDisplayNameInput = z.infer<typeof SetMyDisplayNameInputSchema>;\n\n// Unauthenticated soft-check the register page runs BEFORE creating the Auth user so a\n// taken name never orphans an auth account. Mirrors the RegisterUser displayName contract\n// (same length + regex). The authoritative claim still happens inside registerUser.\nexport const CheckDisplayNameAvailableInputSchema = z.object({\n displayName: displayNameSchema,\n}).strict();\nexport type CheckDisplayNameAvailableInput = z.infer<typeof CheckDisplayNameAvailableInputSchema>;\n\n// Teen→adult upgrade: a transient DOB (never persisted) the callable re-derives adult\n// eligibility from server-side against a fresh attestation. Only the shape is validated\n// here; the age math + attestation binding live in the callable.\nexport const UpgradeAccountToAdultInputSchema = z.object({\n dob: z.object({\n year: z.number().int(),\n month: z.number().int().min(1).max(12),\n day: z.number().int().min(1).max(31),\n }).strict(),\n}).strict();\nexport type UpgradeAccountToAdultInput = z.infer<typeof UpgradeAccountToAdultInputSchema>;\n\n// Admin-only user lookup for the User Management view (prefix search on publicUsers by\n// displayName). Only the trimmed query string is validated here; authz (admin/jr-admin)\n// lives in the callable.\nexport const SearchPublicUsersInputSchema = z.object({\n query: z.string().trim().min(1).max(MAX_USER_SEARCH_QUERY_LENGTH),\n}).strict();\nexport type SearchPublicUsersInput = z.infer<typeof SearchPublicUsersInputSchema>;\n\n// Admin exact-account lookup (\"look up by email or uid\" in User Management): a solo full\n// admin resolves ONE account by its exact email, uid, or display name. The app detects\n// email-vs-uid-vs-name both client- and server-side, so there is ONE query field (mirrors\n// SearchPublicUsersInput's single trimmed-query shape + bound). Only the trimmed query is\n// validated here; authz (full admin) lives in the callable.\nexport const LookupUserByEmailOrUidInputSchema = z.object({\n query: z.string().trim().min(1).max(MAX_USER_SEARCH_QUERY_LENGTH),\n}).strict();\nexport type LookupUserByEmailOrUidInput = z.infer<typeof LookupUserByEmailOrUidInputSchema>;\n\n"]}
1
+ {"version":3,"file":"users.js","sourceRoot":"","sources":["../../src/schemas/users.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACd,2BAA2B,EAC3B,0BAA0B,EAC1B,4BAA4B,GAC7B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEjE;gFACgF;AAChF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC;KAC/B,MAAM,EAAE;KACR,GAAG,CAAC,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C,CAAC,OAAO,CAAC,IAAI,CAAC;IACxB,oFAAoF;IACpF,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC5B,oFAAoF;IACpF,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE;CAC5B,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,MAAM,CAAC;IACxD,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IACxB,2EAA2E;IAC3E,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;CACvB,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { userIdSchema } from './atoms.js';\nimport {\n USERNAME_MIN_LENGTH,\n USERNAME_MAX_LENGTH,\n USERNAME_REGEX,\n MAX_ARTISAN_LOCATION_LENGTH,\n MAX_INTERNAL_REASON_LENGTH,\n MAX_USER_SEARCH_QUERY_LENGTH,\n} from '../constants/business.js';\nimport { UserAccountStatusSchema } from '../doc-schemas/user.js';\n\n/** The ONE composed display-name field validator (length bounds + charset). Every\n * callable accepting a display name spreads this — never a re-composed copy. */\nexport const displayNameSchema = z\n .string()\n .min(USERNAME_MIN_LENGTH)\n .max(USERNAME_MAX_LENGTH)\n .regex(USERNAME_REGEX);\n\nexport const AcceptSquareStreetzAgreementsInputSchema = z.object({}).strict();\nexport type AcceptSquareStreetzAgreementsInput = z.infer<typeof AcceptSquareStreetzAgreementsInputSchema>;\n\n// One-time acknowledgement gate before a user may download Hall content for personal\n// offline use (final wording owned by the legal-and-content step). No payload — the\n// callable records the timestamp in the caller's privateData. See\n// docs/design/media-assets-and-protected-serving.md (Hall/Library downloads).\nexport const AcceptHallDownloadAcknowledgementInputSchema = z.object({}).strict();\nexport type AcceptHallDownloadAcknowledgementInput = z.infer<typeof AcceptHallDownloadAcknowledgementInputSchema>;\n\n// The become-creator dialog's \"I confirm I am 18 years of age or older\" checkbox must reach the\n// server: the callable rejects when absent and records the attestation on the\n// artisanCreator.grantedToUser audit event (immutable, timestamped, with IP/UA) so it is provable.\nexport const BecomeArtisanCreatorInputSchema = z.object({\n ageAttested: z.literal(true),\n // \"I confirm I am a person located in the United States\" — required for now (only U.S. persons\n // may become artisans). Mirrors ageAttested: the callable rejects when absent and records the\n // attestation timestamp (privateData.usPersonAttestedAt) + the grant audit event.\n usPersonAttested: z.literal(true),\n // [Q21.5 REVISED — DJ 2026-07-06] The artisan's date of birth — the ONLY point in the system\n // where a DOB is collected for persistence (registration/upgrade derive the bracket and store\n // nothing). The dialog copy tells the user this must be THEIR birthday: when the payout system\n // ships, it has to match their payout (KYC) identity. The callable re-derives 18+ server-side\n // from this value; an under-18 derivation rejects (failure audit, nothing stored). Stored as\n // privateData attestedDateOfBirth + attestedDobSource 'artisanOnboarding'.\n dob: z.object({\n year: z.number().int(),\n month: z.number().int().min(1).max(12),\n day: z.number().int().min(1).max(31),\n }).strict(),\n}).strict();\nexport type BecomeArtisanCreatorInput = z.infer<typeof BecomeArtisanCreatorInputSchema>;\n\nexport const MarkWaitingForNewsApprovalInputSchema = z.object({}).strict();\nexport type MarkWaitingForNewsApprovalInput = z.infer<typeof MarkWaitingForNewsApprovalInputSchema>;\n\n// First-visit site-tour preference writer (updateSiteTourPreference). This is the ONE\n// server writer for `privateData/{uid}.siteTour`; the client never writes tour state\n// directly. Discriminated on `action`:\n// - deferToday: records the member's LOCAL calendar `date` (\"Not today\"); the automatic\n// invitation is suppressed for exactly that date.\n// - dismissAutomaticInvites: records the permanent \"Don't show this again\" time; no payload.\n// - completeTour: records completion; the callable stamps SITE_TOUR_CURRENT_VERSION and\n// completedAt server-side, so no version is accepted from the client (mirrors the\n// acknowledgement callables that record the authoritative value server-side rather than\n// trusting a client-supplied one). Bump SITE_TOUR_CURRENT_VERSION to re-invite everyone.\n// `date` uses the same strict YYYY-MM-DD convention as the age cluster's attestedDateOfBirth.\nexport const UpdateSiteTourPreferenceInputSchema = z.discriminatedUnion('action', [\n z.object({\n action: z.literal('deferToday'),\n date: z.string().regex(/^\\d{4}-\\d{2}-\\d{2}$/), // 'YYYY-MM-DD' (member's LOCAL calendar date)\n }).strict(),\n z.object({\n action: z.literal('dismissAutomaticInvites'),\n }).strict(),\n z.object({\n action: z.literal('completeTour'),\n }).strict(),\n]);\nexport type UpdateSiteTourPreferenceInput = z.infer<typeof UpdateSiteTourPreferenceInputSchema>;\n\n// Non-U.S. artisan-interest signup (the FCFS \"waitlist\" fields on privateData). Mirrors\n// MarkWaitingForNewsApproval but carries the applicant's country (+ optional region) so signups\n// can be opened by jurisdiction as each region's laws clear. The callable records it ONLY for\n// adult accounts (never a minor's location).\nexport const MarkNonUsArtisanInterestInputSchema = z.object({\n country: z.string().min(1).max(MAX_ARTISAN_LOCATION_LENGTH),\n region: z.string().max(MAX_ARTISAN_LOCATION_LENGTH).optional(),\n}).strict();\nexport type MarkNonUsArtisanInterestInput = z.infer<typeof MarkNonUsArtisanInterestInputSchema>;\n\nexport const RegisterUserInputSchema = z.object({\n displayName: displayNameSchema,\n agreements: z.object({\n age: z.literal(true),\n nudity: z.literal(true),\n meet: z.literal(true),\n cookies: z.literal(true),\n terms: z.literal(true),\n }).strict(),\n}).strict();\nexport type RegisterUserInput = z.infer<typeof RegisterUserInputSchema>;\n\nexport const SetUserStatusInputSchema = z.object({\n userId: userIdSchema,\n status: UserAccountStatusSchema,\n // Required by the callable when status is 'suspended' or 'banned' (shown to the\n // user in their restricted view and recorded on the audit event). Optional here\n // so reinstating to 'active' can omit it; the callable enforces presence.\n reason: z.string().trim().min(1).max(MAX_INTERNAL_REASON_LENGTH).optional(),\n}).strict();\nexport type SetUserStatusInput = z.infer<typeof SetUserStatusInputSchema>;\n\n// Admin forces an abusive display name off a user: the name is swapped to a neutral\n// placeholder, the old name is blocked from reuse, and the user must pick a new one.\nexport const ForceDisplayNameResetInputSchema = z.object({\n userId: userIdSchema,\n // Optional admin note recorded on the audit event.\n reason: z.string().trim().min(1).max(MAX_INTERNAL_REASON_LENGTH).optional(),\n}).strict();\nexport type ForceDisplayNameResetInput = z.infer<typeof ForceDisplayNameResetInputSchema>;\n\n// User completes a forced display-name reset by choosing a new name. Only honored while\n// the caller's userProfiles doc has `displayNameResetRequired === true`.\nexport const SetMyDisplayNameInputSchema = z.object({\n displayName: displayNameSchema,\n}).strict();\nexport type SetMyDisplayNameInput = z.infer<typeof SetMyDisplayNameInputSchema>;\n\n// Unauthenticated soft-check the register page runs BEFORE creating the Auth user so a\n// taken name never orphans an auth account. Mirrors the RegisterUser displayName contract\n// (same length + regex). The authoritative claim still happens inside registerUser.\nexport const CheckDisplayNameAvailableInputSchema = z.object({\n displayName: displayNameSchema,\n}).strict();\nexport type CheckDisplayNameAvailableInput = z.infer<typeof CheckDisplayNameAvailableInputSchema>;\n\n// Teen→adult upgrade: a transient DOB (never persisted) the callable re-derives adult\n// eligibility from server-side against a fresh attestation. Only the shape is validated\n// here; the age math + attestation binding live in the callable.\nexport const UpgradeAccountToAdultInputSchema = z.object({\n dob: z.object({\n year: z.number().int(),\n month: z.number().int().min(1).max(12),\n day: z.number().int().min(1).max(31),\n }).strict(),\n}).strict();\nexport type UpgradeAccountToAdultInput = z.infer<typeof UpgradeAccountToAdultInputSchema>;\n\n// Admin-only user lookup for the User Management view (prefix search on publicUsers by\n// displayName). Only the trimmed query string is validated here; authz (admin/jr-admin)\n// lives in the callable.\nexport const SearchPublicUsersInputSchema = z.object({\n query: z.string().trim().min(1).max(MAX_USER_SEARCH_QUERY_LENGTH),\n}).strict();\nexport type SearchPublicUsersInput = z.infer<typeof SearchPublicUsersInputSchema>;\n\n// Admin exact-account lookup (\"look up by email or uid\" in User Management): a solo full\n// admin resolves ONE account by its exact email, uid, or display name. The app detects\n// email-vs-uid-vs-name both client- and server-side, so there is ONE query field (mirrors\n// SearchPublicUsersInput's single trimmed-query shape + bound). Only the trimmed query is\n// validated here; authz (full admin) lives in the callable.\nexport const LookupUserByEmailOrUidInputSchema = z.object({\n query: z.string().trim().min(1).max(MAX_USER_SEARCH_QUERY_LENGTH),\n}).strict();\nexport type LookupUserByEmailOrUidInput = z.infer<typeof LookupUserByEmailOrUidInputSchema>;\n\n// N3 account deletion — wire result contracts for the two user-facing callables (both take\n// no input). Previously declared independently in functions/src and src/hooks — one drifting\n// pair per callable. Non-strict (server → client result posture).\nexport const RequestAccountDeletionResultSchema = z.object({\n success: z.literal(true),\n /** When the scheduled scrub will run (requestedAt + the grace window), epoch ms. */\n scheduledScrubAt: z.number(),\n /** True when an ACTIVE request already existed and its schedule was re-returned. */\n alreadyPending: z.boolean(),\n});\nexport type RequestAccountDeletionResult = z.infer<typeof RequestAccountDeletionResultSchema>;\n\nexport const CancelAccountDeletionResultSchema = z.object({\n success: z.literal(true),\n /** False when there was no active request to cancel (idempotent no-op). */\n cancelled: z.boolean(),\n});\nexport type CancelAccountDeletionResult = z.infer<typeof CancelAccountDeletionResultSchema>;\n\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { AuditEvent } from '@ttt-productions/audit-core';
2
- export type AuditEventType = 'artisanCreator.grantedToUser' | 'user.accountRegistered' | 'user.statusChanged' | 'user.accountSuspended' | 'user.accountBanned' | 'user.accountUnbanned' | 'user.displayNameResetForced' | 'user.displayNameChanged' | 'user.nonUsArtisanInterestRecorded' | 'account.deletionRequested' | 'account.deletionCancelled' | 'account.erasureCompleted' | 'account.erasureParkedOnHold' | 'account.erasureSuperseded' | 'admin.systemRoleGranted' | 'admin.systemRoleRevoked' | 'admin.systemRoleSyncedFromDirectEdit' | 'admin.contentAppealReviewed' | 'admin.thresholdItemReviewed' | 'admin.futurePlansUpdated' | 'admin.rulesAndAgreementsUpdated' | 'admin.termsPageUpdated' | 'admin.privacyPageUpdated' | 'admin.takeItDownPageCopyUpdated' | 'admin.reservedUsernamesSeeded' | 'admin.blockedFranchiseNamesSeeded' | 'admin.rulesAndAgreementsSeeded' | 'admin.futurePlansSeeded' | 'admin.termsPageSeeded' | 'admin.privacyPageSeeded' | 'admin.takeItDownPageCopySeeded' | 'admin.dispatchDeleted' | 'admin.shortLinkDeleted' | 'admin.trademarkChecked' | 'content.parodyDisclaimerApplied' | 'workProject.created' | 'workProject.guildmateUserGuildStandingChanged' | 'workProject.guildmateUserTradeProfessionsChanged' | 'workProject.guildMemberDeparted' | 'workProject.publicDetailsUpdated' | 'workProject.workAssetDeleted' | 'workProject.fileFolderCreated' | 'workProject.fileFolderRenamed' | 'workProject.fileFolderAccessChanged' | 'workProject.fileFolderDeleted' | 'workProject.guildInviteSent' | 'workProject.guildInviteAccepted' | 'workProject.guildInviteDeclined' | 'workProject.guildInviteCancelled' | 'workProject.guildInviteStakeSharesUpdated' | 'workProject.commissionListingCreated' | 'workProject.commissionProposalCreated' | 'workProject.commissionClosed' | 'workProject.commissionDeleted' | 'workProject.commissionProposalSaveToggled' | 'workProject.commissionProposalRejected' | 'workProject.stakeSharesChanged' | 'workProject.stakeShares.created' | 'workProject.stakeShares.increased' | 'workProject.stakeShares.anomaly' | 'workFile.sharedToRealm' | 'workFile.realmCanonChanged' | 'workFile.unsharedFromRealm' | 'craftSkill.userCraftSkillDeleted' | 'craftSkill.hidden' | 'craftSkill.restored' | 'craftSkill.removed' | 'content.itemReported' | 'content.violationRecorded' | 'content.thresholdItemSubmitted' | 'content.thresholdItemWithdrawn' | 'content.hallItemPublished' | 'content.hallContentChangeRequestSubmitted' | 'admin.hallContentChangeRequestResolved' | 'content.appealSubmitted' | 'content.violationAccepted' | 'content.hidden' | 'content.restored' | 'content.removed' | 'content.taleDetailsUpdated' | 'content.taleWorkGenresUpdated' | 'content.chapterCreated' | 'content.chapterDetailsUpdated' | 'content.tuneDetailsUpdated' | 'content.tuneWorkGenresUpdated' | 'content.tuneTrackCreated' | 'content.tuneTrackDetailsUpdated' | 'content.televisionDetailsUpdated' | 'content.televisionWorkGenresUpdated' | 'content.televisionEpisodeCreated' | 'content.televisionEpisodeDetailsUpdated' | 'payment.sessionCreated' | 'payment.pledgePaymentCompleted' | 'payment.pledgePaymentAbandoned' | 'payment.pledgePaymentFailed' | 'payment.pledgePaymentQuarantined' | 'payment.pledgePaymentRefunded' | 'payment.pledgePaymentDisputeOpened' | 'payment.pledgePaymentDisputeClosed' | 'payment.pledgeRefundRequested' | 'payment.pledgeRefundRequestResolved' | 'payment.pledgeLedger.recorded' | 'payment.pledgeLedger.anomaly' | 'admin.taskCheckedOut' | 'admin.taskCheckedIn' | 'admin.taskReleased' | 'admin.taskAutoReleased' | 'admin.taskDeferredLater' | 'workProject.auditionCreated' | 'admin.auditionCreated' | 'audition.entryCreated' | 'audition.closedByUser' | 'audition.curatedBatchFailed' | 'system.manualIntervention' | 'system.appConfigUpdated' | 'admin.appModeFlipRecorded' | 'system.pendingMediaArchived' | 'system.orphanUploadsCleanedUp' | 'admin.profanityListSeeded' | 'admin.profanityListCurated' | 'social.squareStreetzPostLiked' | 'social.squareStreetzPostUnliked' | 'social.targetFollowed' | 'social.targetUnfollowed' | 'chat.guildChatChannelCreated' | 'chat.guildChatChannelUpdated' | 'chat.guildChatChannelArchived' | 'chat.guildChatChannelUnarchived' | 'chat.guildChatChannelDeleted' | 'chat.adminThreadStarted' | 'chat.adminThreadStatusChanged' | 'conversationFile.deleted' | 'chat.moderationActionRequested' | 'chat.moderationActionApplied' | 'chat.moderationActionFailed' | 'chat.moderationContextRead' | 'notification.broadcastSent' | 'notification.adminArchived' | 'workProject.released' | 'workProject.hidden' | 'workProject.restored' | 'workProject.moderationPlaceholderApplied' | 'workProject.moderationRetitleCleared' | 'workRealm.created' | 'workRealm.released' | 'workRealm.detailsUpdated' | 'workRealm.hidden' | 'workRealm.restored' | 'workRealm.moderationPlaceholderApplied' | 'workRealm.moderationRetitleCleared' | 'hallItem.moderationPlaceholderApplied' | 'report.childSafetyCaseOpened' | 'report.nciiCaseOpened' | 'childSafety.reportDispositionSet' | 'childSafety.holdPlaced' | 'childSafety.holdReleased' | 'childSafety.accountActionApplied' | 'childSafety.accountActionReverted' | 'childSafety.evidenceManifestCreated' | 'childSafety.evidenceDisposed' | 'childSafety.quarantineCompleted' | 'childSafety.ncmecSubmissionCompleted' | 'childSafety.ncmecPortalReceiptArtifactRecorded' | 'childSafety.legalProcessRecorded' | 'childSafety.falsePositiveCorrected' | 'user.ageAttested' | 'user.ageUpgradedToAdult' | 'user.orphanAuthDeleted' | 'user.accountClosedUnder13' | 'user.safetyLocked' | 'ncii.requestReceived' | 'ncii.requestSupplemented' | 'ncii.completenessDetermined' | 'ncii.validityDecided' | 'ncii.tempHoldPlaced' | 'ncii.tempHoldReleased' | 'ncii.removalCompleted' | 'ncii.removalUnableToComplete' | 'ncii.evidenceMarked' | 'ncii.evidenceScanValidatedMatch' | 'ncii.hashBlockReversed' | 'ncii.requesterPiiScrubbed' | 'ncii.policyConfigUpdated' | 'ncii.minorAssessmentSet' | 'ncii.crossoverLegReconciled' | 'safety.privilegedReauthPerformed' | 'safety.privilegedRawLocatorRead' | 'safety.deadlineBreachRecorded' | 'safety.reviewerCapabilityGranted' | 'safety.reviewerCapabilityRevoked';
2
+ export type AuditEventType = 'artisanCreator.grantedToUser' | 'user.accountRegistered' | 'user.statusChanged' | 'user.accountSuspended' | 'user.accountBanned' | 'user.accountUnbanned' | 'user.displayNameResetForced' | 'user.displayNameChanged' | 'user.nonUsArtisanInterestRecorded' | 'account.deletionRequested' | 'account.deletionCancelled' | 'account.erasureCompleted' | 'account.erasureParkedOnHold' | 'account.erasureSuperseded' | 'admin.systemRoleGranted' | 'admin.systemRoleRevoked' | 'admin.systemRoleSyncedFromDirectEdit' | 'admin.contentAppealReviewed' | 'admin.thresholdItemReviewed' | 'admin.futurePlansUpdated' | 'admin.rulesAndAgreementsUpdated' | 'admin.termsPageUpdated' | 'admin.privacyPageUpdated' | 'admin.takeItDownPageCopyUpdated' | 'admin.reservedUsernamesSeeded' | 'admin.blockedFranchiseNamesSeeded' | 'admin.rulesAndAgreementsSeeded' | 'admin.futurePlansSeeded' | 'admin.termsPageSeeded' | 'admin.privacyPageSeeded' | 'admin.takeItDownPageCopySeeded' | 'admin.dispatchDeleted' | 'admin.shortLinkDeleted' | 'admin.trademarkChecked' | 'content.parodyDisclaimerApplied' | 'workProject.created' | 'workProject.guildmateUserGuildStandingChanged' | 'workProject.guildmateUserTradeProfessionsChanged' | 'workProject.guildMemberDeparted' | 'workProject.publicDetailsUpdated' | 'workProject.workAssetDeleted' | 'workProject.fileFolderCreated' | 'workProject.fileFolderRenamed' | 'workProject.fileFolderAccessChanged' | 'workProject.fileFolderDeleted' | 'workProject.guildInviteSent' | 'workProject.guildInviteAccepted' | 'workProject.guildInviteDeclined' | 'workProject.guildInviteCancelled' | 'workProject.guildInviteStakeSharesUpdated' | 'workProject.commissionListingCreated' | 'workProject.commissionProposalCreated' | 'workProject.commissionClosed' | 'workProject.commissionProposalSaveToggled' | 'workProject.commissionProposalRejected' | 'workProject.stakeSharesChanged' | 'workProject.stakeShares.created' | 'workProject.stakeShares.increased' | 'workProject.stakeShares.anomaly' | 'workFile.sharedToRealm' | 'workFile.realmCanonChanged' | 'workFile.unsharedFromRealm' | 'craftSkill.userCraftSkillDeleted' | 'craftSkill.hidden' | 'craftSkill.restored' | 'craftSkill.removed' | 'content.itemReported' | 'content.violationRecorded' | 'content.thresholdItemSubmitted' | 'content.thresholdItemWithdrawn' | 'content.hallItemPublished' | 'content.hallContentChangeRequestSubmitted' | 'admin.hallContentChangeRequestResolved' | 'content.appealSubmitted' | 'content.violationAccepted' | 'content.hidden' | 'content.restored' | 'content.removed' | 'content.taleDetailsUpdated' | 'content.taleWorkGenresUpdated' | 'content.chapterCreated' | 'content.chapterDetailsUpdated' | 'content.tuneDetailsUpdated' | 'content.tuneWorkGenresUpdated' | 'content.tuneTrackCreated' | 'content.tuneTrackDetailsUpdated' | 'content.televisionDetailsUpdated' | 'content.televisionWorkGenresUpdated' | 'content.televisionEpisodeCreated' | 'content.televisionEpisodeDetailsUpdated' | 'payment.sessionCreated' | 'payment.pledgePaymentCompleted' | 'payment.pledgePaymentAbandoned' | 'payment.pledgePaymentFailed' | 'payment.pledgePaymentQuarantined' | 'payment.pledgePaymentRefunded' | 'payment.pledgePaymentDisputeOpened' | 'payment.pledgePaymentDisputeClosed' | 'payment.pledgeRefundRequested' | 'payment.pledgeRefundRequestResolved' | 'payment.pledgeLedger.recorded' | 'payment.pledgeLedger.anomaly' | 'admin.taskCheckedOut' | 'admin.taskCheckedIn' | 'admin.taskReleased' | 'admin.taskAutoReleased' | 'admin.taskDeferredLater' | 'workProject.auditionCreated' | 'admin.auditionCreated' | 'audition.entryCreated' | 'audition.closedByUser' | 'audition.curatedBatchFailed' | 'system.manualIntervention' | 'system.appConfigUpdated' | 'admin.appModeFlipRecorded' | 'system.pendingMediaArchived' | 'system.orphanUploadsCleanedUp' | 'admin.profanityListSeeded' | 'admin.profanityListCurated' | 'social.squareStreetzPostLiked' | 'social.squareStreetzPostUnliked' | 'social.targetFollowed' | 'social.targetUnfollowed' | 'chat.guildChatChannelCreated' | 'chat.guildChatChannelUpdated' | 'chat.guildChatChannelArchived' | 'chat.guildChatChannelUnarchived' | 'chat.guildChatChannelDeleted' | 'chat.adminThreadStarted' | 'chat.adminThreadStatusChanged' | 'conversationFile.deleted' | 'chat.moderationActionRequested' | 'chat.moderationActionApplied' | 'chat.moderationActionFailed' | 'chat.moderationContextRead' | 'notification.broadcastSent' | 'notification.adminArchived' | 'workProject.released' | 'workProject.hidden' | 'workProject.restored' | 'workProject.moderationPlaceholderApplied' | 'workProject.moderationRetitleCleared' | 'workRealm.created' | 'workRealm.released' | 'workRealm.detailsUpdated' | 'workRealm.hidden' | 'workRealm.restored' | 'workRealm.moderationPlaceholderApplied' | 'workRealm.moderationRetitleCleared' | 'hallItem.moderationPlaceholderApplied' | 'report.childSafetyCaseOpened' | 'report.nciiCaseOpened' | 'childSafety.reportDispositionSet' | 'childSafety.holdPlaced' | 'childSafety.holdReleased' | 'childSafety.accountActionApplied' | 'childSafety.accountActionReverted' | 'childSafety.evidenceManifestCreated' | 'childSafety.evidenceDisposed' | 'childSafety.quarantineCompleted' | 'childSafety.ncmecSubmissionCompleted' | 'childSafety.ncmecPortalReceiptArtifactRecorded' | 'childSafety.legalProcessRecorded' | 'childSafety.falsePositiveCorrected' | 'user.ageAttested' | 'user.ageUpgradedToAdult' | 'user.orphanAuthDeleted' | 'user.accountClosedUnder13' | 'user.safetyLocked' | 'ncii.requestReceived' | 'ncii.requestSupplemented' | 'ncii.completenessDetermined' | 'ncii.validityDecided' | 'ncii.tempHoldPlaced' | 'ncii.tempHoldReleased' | 'ncii.removalCompleted' | 'ncii.removalUnableToComplete' | 'ncii.evidenceMarked' | 'ncii.evidenceScanValidatedMatch' | 'ncii.hashBlockReversed' | 'ncii.requesterPiiScrubbed' | 'ncii.policyConfigUpdated' | 'ncii.minorAssessmentSet' | 'ncii.crossoverLegReconciled' | 'safety.privilegedReauthPerformed' | 'safety.privilegedRawLocatorRead' | 'safety.deadlineBreachRecorded' | 'safety.reviewerCapabilityGranted' | 'safety.reviewerCapabilityRevoked';
3
3
  /**
4
4
  * How the actor was acting when the audited action was performed. This is
5
5
  * orthogonal to the event name — the same event type can be produced by
@@ -1 +1 @@
1
- {"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/types/audit.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D,MAAM,MAAM,cAAc,GAEtB,8BAA8B,GAC9B,wBAAwB,GACxB,oBAAoB,GACpB,uBAAuB,GACvB,oBAAoB,GACpB,sBAAsB,GACtB,6BAA6B,GAC7B,yBAAyB,GACzB,mCAAmC,GAEnC,2BAA2B,GAC3B,2BAA2B,GAC3B,0BAA0B,GAC1B,6BAA6B,GAC7B,2BAA2B,GAE3B,yBAAyB,GACzB,yBAAyB,GACzB,sCAAsC,GACtC,6BAA6B,GAC7B,6BAA6B,GAC7B,0BAA0B,GAC1B,iCAAiC,GAEjC,wBAAwB,GACxB,0BAA0B,GAC1B,iCAAiC,GAEjC,+BAA+B,GAC/B,mCAAmC,GACnC,gCAAgC,GAChC,yBAAyB,GACz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yB,GAGzB,6BAA6B,GAI7B,kCAAkC,GAKlC,iCAAiC,GACjC,+BAA+B,GAG/B,kCAAkC,GAClC,kCAAkC,CAAC;AAEvC;;;;;;;;;;GAUG;AACH,MAAM,MAAM,iBAAiB,GACzB,MAAM,GACN,eAAe,GACf,aAAa,GACb,eAAe,GACf,QAAQ,CAAC;AAEb;;6DAE6D;AAC7D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;;kCAIkC;AAClC,MAAM,MAAM,aAAa,GACrB,CAAC,iBAAiB,GAAG;IACnB,SAAS,EAAE,MAAM,GAAG,eAAe,GAAG,QAAQ,CAAC;IAC/C,UAAU,CAAC,EAAE,KAAK,CAAC;CACpB,CAAC,GACF,CAAC,iBAAiB,GAAG;IACnB,SAAS,EAAE,aAAa,GAAG,eAAe,CAAC;IAC3C,UAAU,EAAE,OAAO,GAAG,SAAS,CAAC;CACjC,CAAC,CAAC;AAEP;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AAExE;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,CACpC,cAAc,EACd,aAAa,EACb,cAAc,EACd,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CACxB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"audit.js","sourceRoot":"","sources":["../../src/types/audit.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,oEAAoE;AACpE,yEAAyE;AACzE,sEAAsE;AACtE,4DAA4D;AAC5D,EAAE;AACF,wEAAwE;AACxE,qBAAqB","sourcesContent":["// TTT audit event catalog. The `AuditEventType` union is the canonical list\n// of all sensitive actions the system logs. The `TTTAuditActor` and\n// `TTTAuditTarget` shapes describe who performed the action and what was\n// affected. `TTTAuditEvent` specializes the generic `AuditEvent` from\n// @ttt-productions/audit-core with the TTT-specific shapes.\n//\n// Backend writers and future native/TV/console readers all consume this\n// catalog from here.\n\nimport type { AuditEvent } from '@ttt-productions/audit-core';\n\nexport type AuditEventType =\n // user status\n | 'artisanCreator.grantedToUser'\n | 'user.accountRegistered'\n | 'user.statusChanged'\n | 'user.accountSuspended'\n | 'user.accountBanned'\n | 'user.accountUnbanned'\n | 'user.displayNameResetForced'\n | 'user.displayNameChanged'\n | 'user.nonUsArtisanInterestRecorded'\n // account deletion / GDPR erasure (N3)\n | 'account.deletionRequested'\n | 'account.deletionCancelled'\n | 'account.erasureCompleted'\n | 'account.erasureParkedOnHold'\n | 'account.erasureSuperseded'\n // admin actions\n | 'admin.systemRoleGranted'\n | 'admin.systemRoleRevoked'\n | 'admin.systemRoleSyncedFromDirectEdit'\n | 'admin.contentAppealReviewed'\n | 'admin.thresholdItemReviewed'\n | 'admin.futurePlansUpdated'\n | 'admin.rulesAndAgreementsUpdated'\n // content-pages migration (DJ ruling 2026-07-06): per-page admin editors\n | 'admin.termsPageUpdated'\n | 'admin.privacyPageUpdated'\n | 'admin.takeItDownPageCopyUpdated'\n // admin launch-seed actions (Ready for Launch tab)\n | 'admin.reservedUsernamesSeeded'\n | 'admin.blockedFranchiseNamesSeeded'\n | 'admin.rulesAndAgreementsSeeded'\n | 'admin.futurePlansSeeded'\n | 'admin.termsPageSeeded'\n | 'admin.privacyPageSeeded'\n | 'admin.takeItDownPageCopySeeded'\n // admin direct-delete callables (replaced the last two direct-SDK admin-browser deletes):\n // deleteAdminDispatch (support thread + its conversationMessages) and deleteShortLink.\n | 'admin.dispatchDeleted'\n | 'admin.shortLinkDeleted'\n // trademark-assist (advisory check at approval) + parody/real-people disclaimer baked at approval\n | 'admin.trademarkChecked'\n | 'content.parodyDisclaimerApplied'\n // workProject\n | 'workProject.created'\n | 'workProject.guildmateUserGuildStandingChanged'\n | 'workProject.guildmateUserTradeProfessionsChanged'\n // Member self-leave (leaveWorkProject) — pre-publish voluntary exit, shares forfeited to the pool.\n | 'workProject.guildMemberDeparted'\n | 'workProject.publicDetailsUpdated'\n | 'workProject.workAssetDeleted'\n // work-file folders (S7). fileFolderAccessChanged is an ACL change (folder trade-profession\n // view/upload/delete lists gate custom-folder confidentiality) — audited with before/after lists.\n | 'workProject.fileFolderCreated'\n | 'workProject.fileFolderRenamed'\n | 'workProject.fileFolderAccessChanged'\n | 'workProject.fileFolderDeleted'\n | 'workProject.guildInviteSent'\n | 'workProject.guildInviteAccepted'\n | 'workProject.guildInviteDeclined'\n | 'workProject.guildInviteCancelled'\n | 'workProject.guildInviteStakeSharesUpdated'\n | 'workProject.commissionListingCreated'\n | 'workProject.commissionProposalCreated'\n | 'workProject.commissionClosed'\n | 'workProject.commissionDeleted'\n | 'workProject.commissionProposalSaveToggled'\n | 'workProject.commissionProposalRejected'\n | 'workProject.stakeSharesChanged'\n | 'workProject.stakeShares.created'\n | 'workProject.stakeShares.increased'\n | 'workProject.stakeShares.anomaly'\n // realm shared files — a work file promoted into its realm's shared pool + canon toggles + un-share\n | 'workFile.sharedToRealm'\n | 'workFile.realmCanonChanged'\n | 'workFile.unsharedFromRealm'\n // craft-skills\n | 'craftSkill.userCraftSkillDeleted'\n | 'craftSkill.hidden'\n | 'craftSkill.restored'\n | 'craftSkill.removed'\n // content\n | 'content.itemReported'\n | 'content.violationRecorded'\n | 'content.thresholdItemSubmitted'\n // Member-initiated pull-back of a still-pending threshold submission (withdraw callable —\n // deletes the threshold doc + admin task, flips the live sub-item back to unpublished).\n | 'content.thresholdItemWithdrawn'\n | 'content.hallItemPublished'\n // Published change requests (text-only at launch): a member proposes new text-field values\n // for a PUBLISHED hall item; an admin approves (server writes values in place) or denies.\n | 'content.hallContentChangeRequestSubmitted'\n | 'admin.hallContentChangeRequestResolved'\n | 'content.appealSubmitted'\n | 'content.violationAccepted'\n | 'content.hidden'\n | 'content.restored'\n | 'content.removed'\n // content (workProject content)\n | 'content.taleDetailsUpdated'\n | 'content.taleWorkGenresUpdated'\n | 'content.chapterCreated'\n | 'content.chapterDetailsUpdated'\n | 'content.tuneDetailsUpdated'\n | 'content.tuneWorkGenresUpdated'\n | 'content.tuneTrackCreated'\n | 'content.tuneTrackDetailsUpdated'\n | 'content.televisionDetailsUpdated'\n | 'content.televisionWorkGenresUpdated'\n | 'content.televisionEpisodeCreated'\n | 'content.televisionEpisodeDetailsUpdated'\n // money\n | 'payment.sessionCreated'\n | 'payment.pledgePaymentCompleted'\n | 'payment.pledgePaymentAbandoned'\n | 'payment.pledgePaymentFailed'\n | 'payment.pledgePaymentQuarantined'\n // money — refund + dispute lifecycle (post-launch handlers; types added now to avoid a\n // second package publish). Refund REQUESTS are the user-initiated ask; the refund itself is\n // the money movement. Disputes are Stripe-initiated (chargeback) open/close.\n | 'payment.pledgePaymentRefunded'\n | 'payment.pledgePaymentDisputeOpened'\n | 'payment.pledgePaymentDisputeClosed'\n | 'payment.pledgeRefundRequested'\n | 'payment.pledgeRefundRequestResolved'\n // money — independent ledger-integrity trigger (mirrors workProject.stakeShares.*)\n | 'payment.pledgeLedger.recorded'\n | 'payment.pledgeLedger.anomaly'\n // admin task lifecycle\n | 'admin.taskCheckedOut'\n | 'admin.taskCheckedIn'\n | 'admin.taskReleased'\n | 'admin.taskAutoReleased'\n | 'admin.taskDeferredLater'\n // audition\n | 'workProject.auditionCreated'\n | 'admin.auditionCreated'\n | 'audition.entryCreated'\n | 'audition.closedByUser'\n // system-actor event: a curated audition's option batch failed to assemble (media\n // rejection) and its curatedAssemblyStatus flipped to 'failed' (runFailCuratedAudition).\n | 'audition.curatedBatchFailed'\n // system\n | 'system.manualIntervention'\n | 'system.appConfigUpdated'\n // records (never controls) a charter↔full APP_MODE flip after deploy — written\n // by the idempotent recordAppModeFlip admin callable\n | 'admin.appModeFlipRecorded'\n | 'system.pendingMediaArchived'\n | 'system.orphanUploadsCleanedUp'\n | 'admin.profanityListSeeded'\n | 'admin.profanityListCurated'\n // social\n | 'social.squareStreetzPostLiked'\n | 'social.squareStreetzPostUnliked'\n | 'social.targetFollowed'\n | 'social.targetUnfollowed'\n // chat\n | 'chat.guildChatChannelCreated'\n | 'chat.guildChatChannelUpdated'\n | 'chat.guildChatChannelArchived'\n | 'chat.guildChatChannelUnarchived'\n | 'chat.guildChatChannelDeleted'\n | 'chat.adminThreadStarted'\n | 'chat.adminThreadStatusChanged'\n // conversation files — every successful delete is audited with UID references and\n // canonical resource ids (the conversation ref, conversationFileId, mediaAssetId).\n | 'conversationFile.deleted'\n // chat moderation (DO-owned hide/delete via chatAdminActionCommands) — append-only,\n // deterministic ids hash('chat-moderation-{requested,applied,failed}', requestId, …).\n | 'chat.moderationActionRequested'\n | 'chat.moderationActionApplied'\n | 'chat.moderationActionFailed'\n // case-bound admin context read (read-on-demand, REVIEW-ONLY) — audits the request\n // AND outcome; one event per read keyed deterministically by the read's requestId.\n | 'chat.moderationContextRead'\n // notification (admin-only). Actor mode is always adminReview / adminOverride.\n // Payload shapes: NotificationBroadcastSentAuditMetadata /\n // NotificationAdminArchivedAuditMetadata in ../schemas/notification.ts.\n | 'notification.broadcastSent'\n | 'notification.adminArchived'\n // workProject\n | 'workProject.released'\n | 'workProject.hidden'\n | 'workProject.restored'\n | 'workProject.moderationPlaceholderApplied'\n | 'workProject.moderationRetitleCleared'\n | 'workRealm.created'\n | 'workRealm.released'\n | 'workRealm.detailsUpdated'\n | 'workRealm.hidden'\n | 'workRealm.restored'\n | 'workRealm.moderationPlaceholderApplied'\n | 'workRealm.moderationRetitleCleared'\n // hall-content moderation text-clear remedy (extends the workProject/workRealm placeholder\n // family across Tale/Tune/Television details + their chapter/track/episode sub-items and the\n // published Hall projections). Same past-tense placeholder-applied shape as the pair above.\n | 'hallItem.moderationPlaceholderApplied'\n // trust & safety — child safety / CSAM\n | 'report.childSafetyCaseOpened'\n | 'report.nciiCaseOpened'\n | 'childSafety.reportDispositionSet'\n | 'childSafety.holdPlaced'\n | 'childSafety.holdReleased'\n | 'childSafety.accountActionApplied'\n | 'childSafety.accountActionReverted'\n | 'childSafety.evidenceManifestCreated'\n | 'childSafety.evidenceDisposed'\n | 'childSafety.quarantineCompleted'\n | 'childSafety.ncmecSubmissionCompleted'\n | 'childSafety.ncmecPortalReceiptArtifactRecorded'\n | 'childSafety.legalProcessRecorded'\n | 'childSafety.falsePositiveCorrected'\n // trust & safety — age / registration\n | 'user.ageAttested'\n | 'user.ageUpgradedToAdult'\n | 'user.orphanAuthDeleted'\n | 'user.accountClosedUnder13'\n | 'user.safetyLocked'\n // trust & safety — NCII / TAKE IT DOWN\n | 'ncii.requestReceived'\n | 'ncii.requestSupplemented'\n | 'ncii.completenessDetermined'\n | 'ncii.validityDecided'\n | 'ncii.tempHoldPlaced'\n | 'ncii.tempHoldReleased'\n | 'ncii.removalCompleted'\n | 'ncii.removalUnableToComplete'\n // operator marks NCII evidence (e.g. flags/annotates an evidence item on the case) — a reviewed\n // evidence-handling action, audited like the other ncii evidence events.\n | 'ncii.evidenceMarked'\n | 'ncii.evidenceScanValidatedMatch'\n | 'ncii.hashBlockReversed'\n | 'ncii.requesterPiiScrubbed'\n | 'ncii.policyConfigUpdated'\n // operator sets the child-safety crossover minorAssessment on an NCII case (e.g. → possibleMinor):\n // routing action that opens/links a PARALLEL child-safety review + deny-serving + PhotoDNA, WITHOUT\n // touching the NCII removal clock and WITHOUT auto-NCMEC. Payload records from→to assessment.\n | 'ncii.minorAssessmentSet'\n // [H-2] a failed possible-minor crossover leg (serving-deny / PhotoDNA) was reconciled or replayed\n // by an operator/reconciler (crossoverLegs.<leg> failed → done). Payload records which leg + outcome.\n | 'ncii.crossoverLegReconciled'\n // trust & safety — operator security\n // Passkey enrollment/assertion reuses safety.privilegedReauthPerformed (the reauth catalog entry, as\n // the TOTP step-up enroll/confirm/verify phases already do) — no distinct passkey-registration type.\n | 'safety.privilegedReauthPerformed'\n // [P2-08] A privileged operator read of a TAKE IT DOWN request's RAW target locator (the\n // reveal-on-demand, review-only read of the sensitive locator itself — distinct from the\n // reveal reauth above, which is the step-up). One event per read. Mirrors the\n // chat.moderationContextRead privileged-read convention.\n | 'safety.privilegedRawLocatorRead'\n | 'safety.deadlineBreachRecorded'\n // [M-6] per-operator reviewer-capability grant lifecycle (privilegedReviewerCapabilityGrants/{uid}).\n // Granting/revoking a SafetyReviewerCapability is an authorization change — always audited.\n | 'safety.reviewerCapabilityGranted'\n | 'safety.reviewerCapabilityRevoked';\n\n/**\n * How the actor was acting when the audited action was performed. This is\n * orthogonal to the event name — the same event type can be produced by\n * different actor modes (e.g. a normal member vs. an admin override).\n *\n * - 'user' — authenticated action not tied to project membership\n * - 'projectMember' — acting through normal Work/project (guild standing) permissions\n * - 'adminReview' — admin queue/support work on admin surfaces (no project-permission concept)\n * - 'adminOverride' — system-admin authority superseding normal user/project permission\n * - 'system' — backend automation: trigger, scheduled job, migration, media pipeline\n */\nexport type TTTAuditActorMode =\n | 'user'\n | 'projectMember'\n | 'adminReview'\n | 'adminOverride'\n | 'system';\n\n/** Fields common to every audited actor regardless of mode. `isAdmin` is\n * claim-present metadata only — it records that the caller held an admin\n * claim at the time, NOT that the action was an override. */\nexport type TTTAuditActorBase = {\n uid: string | null;\n isAdmin: boolean;\n};\n\n/** TTT actor shape, discriminated on `actorMode`. The admin system role is\n * REQUIRED on admin modes (adminReview / adminOverride) and FORBIDDEN on\n * non-admin modes (user / projectMember / system) — so an admin action can\n * never be audited without recording full-vs-jr, and a non-admin action can\n * never carry a spurious role. */\nexport type TTTAuditActor =\n | (TTTAuditActorBase & {\n actorMode: 'user' | 'projectMember' | 'system';\n systemRole?: never;\n })\n | (TTTAuditActorBase & {\n actorMode: 'adminReview' | 'adminOverride';\n systemRole: 'admin' | 'jrAdmin';\n });\n\n/**\n * TTT target shape: the uid the audited action affects (if any), plus the\n * Firestore path of the affected document (if any).\n */\nexport type TTTAuditTarget = { uid: string | null; ref: string | null };\n\n/**\n * The canonical TTT audit event document shape. Specializes the generic\n * `AuditEvent` from @ttt-productions/audit-core with the TTT event-type\n * union, actor shape, target shape, and a generic metadata bag.\n */\nexport type TTTAuditEvent = AuditEvent<\n AuditEventType,\n TTTAuditActor,\n TTTAuditTarget,\n Record<string, unknown>\n>;\n\n"]}
1
+ {"version":3,"file":"audit.js","sourceRoot":"","sources":["../../src/types/audit.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,oEAAoE;AACpE,yEAAyE;AACzE,sEAAsE;AACtE,4DAA4D;AAC5D,EAAE;AACF,wEAAwE;AACxE,qBAAqB","sourcesContent":["// TTT audit event catalog. The `AuditEventType` union is the canonical list\n// of all sensitive actions the system logs. The `TTTAuditActor` and\n// `TTTAuditTarget` shapes describe who performed the action and what was\n// affected. `TTTAuditEvent` specializes the generic `AuditEvent` from\n// @ttt-productions/audit-core with the TTT-specific shapes.\n//\n// Backend writers and future native/TV/console readers all consume this\n// catalog from here.\n\nimport type { AuditEvent } from '@ttt-productions/audit-core';\n\nexport type AuditEventType =\n // user status\n | 'artisanCreator.grantedToUser'\n | 'user.accountRegistered'\n | 'user.statusChanged'\n | 'user.accountSuspended'\n | 'user.accountBanned'\n | 'user.accountUnbanned'\n | 'user.displayNameResetForced'\n | 'user.displayNameChanged'\n | 'user.nonUsArtisanInterestRecorded'\n // account deletion / GDPR erasure (N3)\n | 'account.deletionRequested'\n | 'account.deletionCancelled'\n | 'account.erasureCompleted'\n | 'account.erasureParkedOnHold'\n | 'account.erasureSuperseded'\n // admin actions\n | 'admin.systemRoleGranted'\n | 'admin.systemRoleRevoked'\n | 'admin.systemRoleSyncedFromDirectEdit'\n | 'admin.contentAppealReviewed'\n | 'admin.thresholdItemReviewed'\n | 'admin.futurePlansUpdated'\n | 'admin.rulesAndAgreementsUpdated'\n // content-pages migration (DJ ruling 2026-07-06): per-page admin editors\n | 'admin.termsPageUpdated'\n | 'admin.privacyPageUpdated'\n | 'admin.takeItDownPageCopyUpdated'\n // admin launch-seed actions (Ready for Launch tab)\n | 'admin.reservedUsernamesSeeded'\n | 'admin.blockedFranchiseNamesSeeded'\n | 'admin.rulesAndAgreementsSeeded'\n | 'admin.futurePlansSeeded'\n | 'admin.termsPageSeeded'\n | 'admin.privacyPageSeeded'\n | 'admin.takeItDownPageCopySeeded'\n // admin direct-delete callables (replaced the last two direct-SDK admin-browser deletes):\n // deleteAdminDispatch (support thread + its conversationMessages) and deleteShortLink.\n | 'admin.dispatchDeleted'\n | 'admin.shortLinkDeleted'\n // trademark-assist (advisory check at approval) + parody/real-people disclaimer baked at approval\n | 'admin.trademarkChecked'\n | 'content.parodyDisclaimerApplied'\n // workProject\n | 'workProject.created'\n | 'workProject.guildmateUserGuildStandingChanged'\n | 'workProject.guildmateUserTradeProfessionsChanged'\n // Member self-leave (leaveWorkProject) — pre-publish voluntary exit, shares forfeited to the pool.\n | 'workProject.guildMemberDeparted'\n | 'workProject.publicDetailsUpdated'\n | 'workProject.workAssetDeleted'\n // work-file folders (S7). fileFolderAccessChanged is an ACL change (folder trade-profession\n // view/upload/delete lists gate custom-folder confidentiality) — audited with before/after lists.\n | 'workProject.fileFolderCreated'\n | 'workProject.fileFolderRenamed'\n | 'workProject.fileFolderAccessChanged'\n | 'workProject.fileFolderDeleted'\n | 'workProject.guildInviteSent'\n | 'workProject.guildInviteAccepted'\n | 'workProject.guildInviteDeclined'\n | 'workProject.guildInviteCancelled'\n | 'workProject.guildInviteStakeSharesUpdated'\n | 'workProject.commissionListingCreated'\n | 'workProject.commissionProposalCreated'\n | 'workProject.commissionClosed'\n | 'workProject.commissionProposalSaveToggled'\n | 'workProject.commissionProposalRejected'\n | 'workProject.stakeSharesChanged'\n | 'workProject.stakeShares.created'\n | 'workProject.stakeShares.increased'\n | 'workProject.stakeShares.anomaly'\n // realm shared files — a work file promoted into its realm's shared pool + canon toggles + un-share\n | 'workFile.sharedToRealm'\n | 'workFile.realmCanonChanged'\n | 'workFile.unsharedFromRealm'\n // craft-skills\n | 'craftSkill.userCraftSkillDeleted'\n | 'craftSkill.hidden'\n | 'craftSkill.restored'\n | 'craftSkill.removed'\n // content\n | 'content.itemReported'\n | 'content.violationRecorded'\n | 'content.thresholdItemSubmitted'\n // Member-initiated pull-back of a still-pending threshold submission (withdraw callable —\n // deletes the threshold doc + admin task, flips the live sub-item back to unpublished).\n | 'content.thresholdItemWithdrawn'\n | 'content.hallItemPublished'\n // Published change requests (text-only at launch): a member proposes new text-field values\n // for a PUBLISHED hall item; an admin approves (server writes values in place) or denies.\n | 'content.hallContentChangeRequestSubmitted'\n | 'admin.hallContentChangeRequestResolved'\n | 'content.appealSubmitted'\n | 'content.violationAccepted'\n | 'content.hidden'\n | 'content.restored'\n | 'content.removed'\n // content (workProject content)\n | 'content.taleDetailsUpdated'\n | 'content.taleWorkGenresUpdated'\n | 'content.chapterCreated'\n | 'content.chapterDetailsUpdated'\n | 'content.tuneDetailsUpdated'\n | 'content.tuneWorkGenresUpdated'\n | 'content.tuneTrackCreated'\n | 'content.tuneTrackDetailsUpdated'\n | 'content.televisionDetailsUpdated'\n | 'content.televisionWorkGenresUpdated'\n | 'content.televisionEpisodeCreated'\n | 'content.televisionEpisodeDetailsUpdated'\n // money\n | 'payment.sessionCreated'\n | 'payment.pledgePaymentCompleted'\n | 'payment.pledgePaymentAbandoned'\n | 'payment.pledgePaymentFailed'\n | 'payment.pledgePaymentQuarantined'\n // money — refund + dispute lifecycle (post-launch handlers; types added now to avoid a\n // second package publish). Refund REQUESTS are the user-initiated ask; the refund itself is\n // the money movement. Disputes are Stripe-initiated (chargeback) open/close.\n | 'payment.pledgePaymentRefunded'\n | 'payment.pledgePaymentDisputeOpened'\n | 'payment.pledgePaymentDisputeClosed'\n | 'payment.pledgeRefundRequested'\n | 'payment.pledgeRefundRequestResolved'\n // money — independent ledger-integrity trigger (mirrors workProject.stakeShares.*)\n | 'payment.pledgeLedger.recorded'\n | 'payment.pledgeLedger.anomaly'\n // admin task lifecycle\n | 'admin.taskCheckedOut'\n | 'admin.taskCheckedIn'\n | 'admin.taskReleased'\n | 'admin.taskAutoReleased'\n | 'admin.taskDeferredLater'\n // audition\n | 'workProject.auditionCreated'\n | 'admin.auditionCreated'\n | 'audition.entryCreated'\n | 'audition.closedByUser'\n // system-actor event: a curated audition's option batch failed to assemble (media\n // rejection) and its curatedAssemblyStatus flipped to 'failed' (runFailCuratedAudition).\n | 'audition.curatedBatchFailed'\n // system\n | 'system.manualIntervention'\n | 'system.appConfigUpdated'\n // records (never controls) a charter↔full APP_MODE flip after deploy — written\n // by the idempotent recordAppModeFlip admin callable\n | 'admin.appModeFlipRecorded'\n | 'system.pendingMediaArchived'\n | 'system.orphanUploadsCleanedUp'\n | 'admin.profanityListSeeded'\n | 'admin.profanityListCurated'\n // social\n | 'social.squareStreetzPostLiked'\n | 'social.squareStreetzPostUnliked'\n | 'social.targetFollowed'\n | 'social.targetUnfollowed'\n // chat\n | 'chat.guildChatChannelCreated'\n | 'chat.guildChatChannelUpdated'\n | 'chat.guildChatChannelArchived'\n | 'chat.guildChatChannelUnarchived'\n | 'chat.guildChatChannelDeleted'\n | 'chat.adminThreadStarted'\n | 'chat.adminThreadStatusChanged'\n // conversation files — every successful delete is audited with UID references and\n // canonical resource ids (the conversation ref, conversationFileId, mediaAssetId).\n | 'conversationFile.deleted'\n // chat moderation (DO-owned hide/delete via chatAdminActionCommands) — append-only,\n // deterministic ids hash('chat-moderation-{requested,applied,failed}', requestId, …).\n | 'chat.moderationActionRequested'\n | 'chat.moderationActionApplied'\n | 'chat.moderationActionFailed'\n // case-bound admin context read (read-on-demand, REVIEW-ONLY) — audits the request\n // AND outcome; one event per read keyed deterministically by the read's requestId.\n | 'chat.moderationContextRead'\n // notification (admin-only). Actor mode is always adminReview / adminOverride.\n // Payload shapes: NotificationBroadcastSentAuditMetadata /\n // NotificationAdminArchivedAuditMetadata in ../schemas/notification.ts.\n | 'notification.broadcastSent'\n | 'notification.adminArchived'\n // workProject\n | 'workProject.released'\n | 'workProject.hidden'\n | 'workProject.restored'\n | 'workProject.moderationPlaceholderApplied'\n | 'workProject.moderationRetitleCleared'\n | 'workRealm.created'\n | 'workRealm.released'\n | 'workRealm.detailsUpdated'\n | 'workRealm.hidden'\n | 'workRealm.restored'\n | 'workRealm.moderationPlaceholderApplied'\n | 'workRealm.moderationRetitleCleared'\n // hall-content moderation text-clear remedy (extends the workProject/workRealm placeholder\n // family across Tale/Tune/Television details + their chapter/track/episode sub-items and the\n // published Hall projections). Same past-tense placeholder-applied shape as the pair above.\n | 'hallItem.moderationPlaceholderApplied'\n // trust & safety — child safety / CSAM\n | 'report.childSafetyCaseOpened'\n | 'report.nciiCaseOpened'\n | 'childSafety.reportDispositionSet'\n | 'childSafety.holdPlaced'\n | 'childSafety.holdReleased'\n | 'childSafety.accountActionApplied'\n | 'childSafety.accountActionReverted'\n | 'childSafety.evidenceManifestCreated'\n | 'childSafety.evidenceDisposed'\n | 'childSafety.quarantineCompleted'\n | 'childSafety.ncmecSubmissionCompleted'\n | 'childSafety.ncmecPortalReceiptArtifactRecorded'\n | 'childSafety.legalProcessRecorded'\n | 'childSafety.falsePositiveCorrected'\n // trust & safety — age / registration\n | 'user.ageAttested'\n | 'user.ageUpgradedToAdult'\n | 'user.orphanAuthDeleted'\n | 'user.accountClosedUnder13'\n | 'user.safetyLocked'\n // trust & safety — NCII / TAKE IT DOWN\n | 'ncii.requestReceived'\n | 'ncii.requestSupplemented'\n | 'ncii.completenessDetermined'\n | 'ncii.validityDecided'\n | 'ncii.tempHoldPlaced'\n | 'ncii.tempHoldReleased'\n | 'ncii.removalCompleted'\n | 'ncii.removalUnableToComplete'\n // operator marks NCII evidence (e.g. flags/annotates an evidence item on the case) — a reviewed\n // evidence-handling action, audited like the other ncii evidence events.\n | 'ncii.evidenceMarked'\n | 'ncii.evidenceScanValidatedMatch'\n | 'ncii.hashBlockReversed'\n | 'ncii.requesterPiiScrubbed'\n | 'ncii.policyConfigUpdated'\n // operator sets the child-safety crossover minorAssessment on an NCII case (e.g. → possibleMinor):\n // routing action that opens/links a PARALLEL child-safety review + deny-serving + PhotoDNA, WITHOUT\n // touching the NCII removal clock and WITHOUT auto-NCMEC. Payload records from→to assessment.\n | 'ncii.minorAssessmentSet'\n // [H-2] a failed possible-minor crossover leg (serving-deny / PhotoDNA) was reconciled or replayed\n // by an operator/reconciler (crossoverLegs.<leg> failed → done). Payload records which leg + outcome.\n | 'ncii.crossoverLegReconciled'\n // trust & safety — operator security\n // Passkey enrollment/assertion reuses safety.privilegedReauthPerformed (the reauth catalog entry, as\n // the TOTP step-up enroll/confirm/verify phases already do) — no distinct passkey-registration type.\n | 'safety.privilegedReauthPerformed'\n // [P2-08] A privileged operator read of a TAKE IT DOWN request's RAW target locator (the\n // reveal-on-demand, review-only read of the sensitive locator itself — distinct from the\n // reveal reauth above, which is the step-up). One event per read. Mirrors the\n // chat.moderationContextRead privileged-read convention.\n | 'safety.privilegedRawLocatorRead'\n | 'safety.deadlineBreachRecorded'\n // [M-6] per-operator reviewer-capability grant lifecycle (privilegedReviewerCapabilityGrants/{uid}).\n // Granting/revoking a SafetyReviewerCapability is an authorization change — always audited.\n | 'safety.reviewerCapabilityGranted'\n | 'safety.reviewerCapabilityRevoked';\n\n/**\n * How the actor was acting when the audited action was performed. This is\n * orthogonal to the event name — the same event type can be produced by\n * different actor modes (e.g. a normal member vs. an admin override).\n *\n * - 'user' — authenticated action not tied to project membership\n * - 'projectMember' — acting through normal Work/project (guild standing) permissions\n * - 'adminReview' — admin queue/support work on admin surfaces (no project-permission concept)\n * - 'adminOverride' — system-admin authority superseding normal user/project permission\n * - 'system' — backend automation: trigger, scheduled job, migration, media pipeline\n */\nexport type TTTAuditActorMode =\n | 'user'\n | 'projectMember'\n | 'adminReview'\n | 'adminOverride'\n | 'system';\n\n/** Fields common to every audited actor regardless of mode. `isAdmin` is\n * claim-present metadata only — it records that the caller held an admin\n * claim at the time, NOT that the action was an override. */\nexport type TTTAuditActorBase = {\n uid: string | null;\n isAdmin: boolean;\n};\n\n/** TTT actor shape, discriminated on `actorMode`. The admin system role is\n * REQUIRED on admin modes (adminReview / adminOverride) and FORBIDDEN on\n * non-admin modes (user / projectMember / system) — so an admin action can\n * never be audited without recording full-vs-jr, and a non-admin action can\n * never carry a spurious role. */\nexport type TTTAuditActor =\n | (TTTAuditActorBase & {\n actorMode: 'user' | 'projectMember' | 'system';\n systemRole?: never;\n })\n | (TTTAuditActorBase & {\n actorMode: 'adminReview' | 'adminOverride';\n systemRole: 'admin' | 'jrAdmin';\n });\n\n/**\n * TTT target shape: the uid the audited action affects (if any), plus the\n * Firestore path of the affected document (if any).\n */\nexport type TTTAuditTarget = { uid: string | null; ref: string | null };\n\n/**\n * The canonical TTT audit event document shape. Specializes the generic\n * `AuditEvent` from @ttt-productions/audit-core with the TTT event-type\n * union, actor shape, target shape, and a generic metadata bag.\n */\nexport type TTTAuditEvent = AuditEvent<\n AuditEventType,\n TTTAuditActor,\n TTTAuditTarget,\n Record<string, unknown>\n>;\n\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttt-productions/ttt-core",
3
- "version": "0.79.11",
3
+ "version": "0.79.13",
4
4
  "description": "Core types, Firestore path constants, and shared constants for TTT Productions",
5
5
  "repository": {
6
6
  "type": "git",
@@ -117,7 +117,7 @@
117
117
  "@ttt-productions/edge-protocol-core": "^0.1.5",
118
118
  "@ttt-productions/media-schemas": "^0.14.4",
119
119
  "@ttt-productions/notification-core": "^0.15.5",
120
- "@ttt-productions/report-core": "^0.16.7",
120
+ "@ttt-productions/report-core": "^0.16.8",
121
121
  "zod": "^4.4.3"
122
122
  },
123
123
  "devDependencies": {