@ttt-productions/ttt-core 0.79.0 → 0.79.2
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/doc-schemas/chat-sync.d.ts +4 -0
- package/dist/doc-schemas/chat-sync.d.ts.map +1 -1
- package/dist/doc-schemas/chat-sync.js +12 -1
- package/dist/doc-schemas/chat-sync.js.map +1 -1
- package/dist/doc-schemas/messaging.d.ts +2 -2
- package/dist/doc-schemas/messaging.d.ts.map +1 -1
- package/dist/doc-schemas/messaging.js +9 -7
- package/dist/doc-schemas/messaging.js.map +1 -1
- package/dist/doc-schemas/registry.d.ts +6 -2
- package/dist/doc-schemas/registry.d.ts.map +1 -1
- package/dist/schemas/conversation-files.d.ts +13 -0
- package/dist/schemas/conversation-files.d.ts.map +1 -0
- package/dist/schemas/conversation-files.js +11 -0
- package/dist/schemas/conversation-files.js.map +1 -0
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +1 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/upload-variables/index.d.ts +1 -0
- package/dist/upload-variables/index.d.ts.map +1 -1
- package/dist/upload-variables/index.js +1 -0
- package/dist/upload-variables/index.js.map +1 -1
- package/dist/upload-variables/upload-conversation-file-variables.d.ts +15 -0
- package/dist/upload-variables/upload-conversation-file-variables.d.ts.map +1 -0
- package/dist/upload-variables/upload-conversation-file-variables.js +13 -0
- package/dist/upload-variables/upload-conversation-file-variables.js.map +1 -0
- package/package.json +1 -1
|
@@ -152,6 +152,7 @@ export declare const ChatAdminActionCommandSchema: z.ZodObject<{
|
|
|
152
152
|
deadLetter: "deadLetter";
|
|
153
153
|
queued: "queued";
|
|
154
154
|
delivering: "delivering";
|
|
155
|
+
safetyRepair: "safetyRepair";
|
|
155
156
|
}>;
|
|
156
157
|
attemptCount: z.ZodNumber;
|
|
157
158
|
nextAttemptAt: z.ZodNumber;
|
|
@@ -165,6 +166,9 @@ export declare const ChatAdminActionCommandSchema: z.ZodObject<{
|
|
|
165
166
|
deadLetteredAt: z.ZodNullable<z.ZodNumber>;
|
|
166
167
|
reconciled: z.ZodBoolean;
|
|
167
168
|
reconciledAt: z.ZodNullable<z.ZodNumber>;
|
|
169
|
+
safetyRepair: z.ZodBoolean;
|
|
170
|
+
safetyRepairGeneration: z.ZodNumber;
|
|
171
|
+
reconcileAttemptCount: z.ZodNumber;
|
|
168
172
|
expireAt: z.ZodOptional<z.ZodUnknown>;
|
|
169
173
|
}, z.core.$strip>;
|
|
170
174
|
export type ChatAdminActionCommand = z.infer<typeof ChatAdminActionCommandSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-sync.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/chat-sync.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;iBAW1C,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAIxF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;iBAUlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,4BAA4B;;;;;;;;iBAKvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAGlF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiB9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAGhE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmBlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,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C;AAKxE,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqCvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAgBlF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsB5C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAK5F,eAAO,MAAM,2CAA2C;;;;;;;;;;;;;;iBAQtD,CAAC;AACH,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2CAA2C,CAAC,CAAC"}
|
|
@@ -113,7 +113,10 @@ export const ChatAdminActionCommandSchema = z.object({
|
|
|
113
113
|
reason: z.string(),
|
|
114
114
|
expectedMessageRevision: z.number(),
|
|
115
115
|
payloadHash: z.string(),
|
|
116
|
-
|
|
116
|
+
// `safetyRepair` is the NONTERMINAL stall loop: a RESERVED command whose reconcile
|
|
117
|
+
// leg (PROBE → FINALIZE) failed past ADMIN_COMMAND_MAX_ATTEMPTS. Drained like
|
|
118
|
+
// `delivering`; never dead-letters.
|
|
119
|
+
state: z.enum(['queued', 'delivering', 'safetyRepair', 'applied', 'failed', 'deadLetter']),
|
|
117
120
|
attemptCount: z.number(),
|
|
118
121
|
nextAttemptAt: z.number(),
|
|
119
122
|
lastError: z.string().nullable(),
|
|
@@ -126,6 +129,14 @@ export const ChatAdminActionCommandSchema = z.object({
|
|
|
126
129
|
deadLetteredAt: z.number().nullable(),
|
|
127
130
|
reconciled: z.boolean(),
|
|
128
131
|
reconciledAt: z.number().nullable(),
|
|
132
|
+
safetyRepair: z.boolean(),
|
|
133
|
+
// Monotonic counter of distinct entries into the safety-repair loop — keys the
|
|
134
|
+
// per-entry idempotent failure audit.
|
|
135
|
+
safetyRepairGeneration: z.number(),
|
|
136
|
+
// Failed reconcile passes on an already-reserved command. Separate from
|
|
137
|
+
// `attemptCount` (delivery attempts, which dead-letter); at the cap it escalates
|
|
138
|
+
// once into `safetyRepair` instead of dead-lettering.
|
|
139
|
+
reconcileAttemptCount: z.number(),
|
|
129
140
|
expireAt: expireAtField,
|
|
130
141
|
});
|
|
131
142
|
// ── chatHistoryAnonymizationJobs/{jobId} ────────────────────────────────────
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-sync.js","sourceRoot":"","sources":["../../src/doc-schemas/chat-sync.ts"],"names":[],"mappings":"AAAA,sFAAsF;AACtF,+EAA+E;AAC/E,gFAAgF;AAChF,mFAAmF;AACnF,+EAA+E;AAC/E,iFAAiF;AACjF,iFAAiF;AACjF,gEAAgE;AAEhE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,6GAA6G;AAC7G,MAAM,aAAa,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC;AAE7C,+EAA+E;AAC/E,+EAA+E;AAC/E,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IACtD,eAAe,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC9C,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,gBAAgB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;IACnD,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC9B,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE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AC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACzC,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;CACzC,CAAC,CAAC","sourcesContent":["// Chat realtime SYNC / projection / command Firestore schemas (chat-edge-rebuild P1).\n// The chat sync / projection / command (Firestore-side) field lists are FROZEN\n// here — this file is their single source; the durable design owner is ttt-prod\n// docs/design/chat-realtime-system.md. All of these collections are Admin-SDK-only\n// (`allow read, write: if false`). Per the TTT timestamp convention every time\n// field is epoch-ms `number`; the SINGLE exception is the native-TTL `expireAt`,\n// which is a real Firestore `Timestamp` (modeled as `unknown` so the drift-check\n// does not false-flag a Timestamp object against `z.number()`).\n\nimport { z } from 'zod';\n\n/** Native-TTL field — a real Firestore Timestamp (NOT epoch-ms). Absent until the terminal that sets TTL. */\nconst expireAtField = z.unknown().optional();\n\n// ── chatChannelAuthProjections/{authPairKey} ────────────────────────────────\n// Per-(user, channel) authorization FACT. Absent ⇒ removed/deny (fail-closed).\nexport const ChatChannelAuthProjectionSchema = z.object({\n channelRefScope: z.enum(['channel', 'invite']),\n workProjectId: z.string().nullable(),\n guildChatChannelId: z.string().nullable(),\n guildInviteId: z.string().nullable(),\n uid: z.string(),\n channelKey: z.string(),\n channelAuthState: z.enum(['authorized', 'removed']),\n channelAuthVersion: z.number(),\n inputFingerprint: z.string(),\n updatedAt: z.number(),\n});\nexport type ChatChannelAuthProjection = z.infer<typeof ChatChannelAuthProjectionSchema>;\n\n// ── chatScopeDegraded/{scopeKey} (+ causes/{causeId}) ───────────────────────\n// Exists IFF unresolvedCauseCount > 0. Grant mints fail closed while it exists.\nexport const ChatScopeDegradedSchema = z.object({\n scopeKey: z.string(),\n scopeKind: z.enum(['channel', 'memberInWork']),\n // channel scope carries the channelRef tuple; memberInWork carries {uid, workProjectId}.\n workProjectId: z.string().nullable(),\n guildChatChannelId: z.string().nullable(),\n guildInviteId: z.string().nullable(),\n uid: z.string().nullable(),\n unresolvedCauseCount: z.number(),\n updatedAt: z.number(),\n});\nexport type ChatScopeDegraded = z.infer<typeof ChatScopeDegradedSchema>;\n\nexport const ChatScopeDegradedCauseSchema = z.object({\n causeId: z.string(),\n kind: z.enum(['syncEvent', 'fanoutJob']),\n ref: z.string(),\n deadLetteredAt: z.number(),\n});\nexport type ChatScopeDegradedCause = z.infer<typeof ChatScopeDegradedCauseSchema>;\n\n// ── chatSyncEvents/{eventId} ────────────────────────────────────────────────\nexport const ChatSyncEventSchema = z.object({\n eventId: z.string(),\n targetDo: z.string(),\n kind: z.enum(['channelAuth', 'accountAccess', 'config', 'serverMessage']),\n version: z.number(),\n payload: z.record(z.string(), z.unknown()).nullable(),\n tombstone: z.boolean().optional(),\n payloadHash: z.string(),\n status: z.enum(['pending', 'delivered', 'deadLetter']),\n attemptCount: z.number(),\n nextAttemptAt: z.number(),\n lastError: z.string().nullable(),\n createdAt: z.number(),\n deliveredResult: z.record(z.string(), z.unknown()).nullable(),\n deliveredAt: z.number().nullable(),\n deadLetteredAt: z.number().nullable(),\n expireAt: expireAtField,\n});\nexport type ChatSyncEvent = z.infer<typeof ChatSyncEventSchema>;\n\n// ── chatSyncFanoutJobs/{jobId} ──────────────────────────────────────────────\nexport const ChatSyncFanoutJobSchema = z.object({\n jobId: z.string(),\n selectorKind: z.enum(['channelMembers', 'workChannelsForUser', 'policyEditAffectedUsers']),\n selectorArgs: z.object({\n workProjectId: z.string().optional(),\n channelKey: z.string().optional(),\n uid: z.string().optional(),\n }),\n causeVersion: z.number(),\n cursor: z.object({ pageIndex: z.number(), lastDocId: z.string().nullable() }),\n revision: z.number(),\n status: z.enum(['pending', 'complete', 'deadLetter']),\n attemptCount: z.number(),\n nextAttemptAt: z.number(),\n lastError: z.string().nullable(),\n createdAt: z.number(),\n completedAt: z.number().nullable(),\n deadLetteredAt: z.number().nullable(),\n expireAt: expireAtField,\n});\nexport type ChatSyncFanoutJob = z.infer<typeof ChatSyncFanoutJobSchema>;\n\n// ── chatMessageOutbox/{commandId} ───────────────────────────────────────────\nexport const ChatMessageOutboxSchema = z.object({\n commandId: z.string(),\n kind: z.enum(['userMsg', 'systemMsg']),\n threadRef: z.string(),\n payload: z.record(z.string(), z.unknown()),\n payloadVersion: z.number(),\n status: z.enum(['pending', 'applied', 'deadLetter']),\n attemptCount: z.number(),\n nextAttemptAt: z.number(),\n lastError: z.string().nullable(),\n createdAt: z.number(),\n appliedAt: z.number().nullable(),\n deadLetteredAt: z.number().nullable(),\n expireAt: expireAtField,\n});\nexport type ChatMessageOutbox = z.infer<typeof ChatMessageOutboxSchema>;\n\n// ── chatAdminActionCommands/{requestId} ─────────────────────────────────────\n// `requestId` IS the doc id + DO dedup key. `delivering` is NOT a lease (it sets\n// nextAttemptAt = now + DELIVERY_TIMEOUT). terminalFailureGeneration default 0.\nexport const ChatAdminActionCommandSchema = z.object({\n requestId: z.string(),\n actorUid: z.string(),\n actorMode: z.enum(['adminReview', 'adminOverride']),\n systemRole: z.enum(['admin', 'jrAdmin']),\n channelRef: z.record(z.string(), z.unknown()),\n messageSeq: z.number(),\n action: z.enum(['hide', 'delete']),\n caseId: z.string(),\n reason: z.string(),\n expectedMessageRevision: z.number(),\n payloadHash: z.string(),\n state: z.enum(['queued', 'delivering', 'applied', 'failed', 'deadLetter']),\n attemptCount: z.number(),\n nextAttemptAt: z.number(),\n lastError: z.string().nullable(),\n result: z.record(z.string(), z.unknown()).nullable(),\n doRevisionId: z.string().nullable(),\n terminalFailureGeneration: z.number(),\n createdAt: z.number(),\n appliedAt: z.number().nullable(),\n failedAt: z.number().nullable(),\n deadLetteredAt: z.number().nullable(),\n reconciled: z.boolean(),\n reconciledAt: z.number().nullable(),\n expireAt: expireAtField,\n});\nexport type ChatAdminActionCommand = z.infer<typeof ChatAdminActionCommandSchema>;\n\n// ── chatHistoryAnonymizationJobs/{jobId} ────────────────────────────────────\n// Account-deletion history anonymization (Contract F; P8). Resumable + crash-safe:\n// the recorded source-manifest identity (key/hash/generation) + the three cursors\n// (scan/rewrite/delete) make every boundary restartable. jobId =\n// hash('chat-anonymize', channelDoId, epoch, anonymizedUid). `expireAt` (native TTL)\n// is set ONLY when the job reaches `done`.\n//\n// C-B1: the replacement generation is DO-OWNED — the Channel DO (single-threaded per\n// channel) allocates a DISTINCT monotonic generation per erasure off the epoch row and\n// rewrites against the CURRENT live manifest, so two erasures on one epoch chain instead\n// of colliding on a shared `anon-1` keyspace. These four fields are therefore RECORDED AT\n// SCAN (null until the DO reports/allocates them), not pinned at enqueue; if a concurrent\n// anonymization supersedes the source between scan and swap, the job resets to `scanning`\n// to re-derive against the new current manifest (keeping its own allocated generation).\nexport const ChatHistoryAnonymizationJobSchema = z.object({\n jobId: z.string(),\n channelDoId: z.string(),\n epoch: z.number(),\n anonymizedUid: z.string(),\n sourceManifestKey: z.string().nullable(),\n sourceManifestHash: z.string().nullable(),\n sourceGeneration: z.number().nullable(),\n replacementGeneration: z.number().nullable(),\n newManifestKey: z.string().nullable(),\n scanCursor: z.number(),\n rewriteCursor: z.number(),\n deleteCursor: z.number(),\n swappedAt: z.number().nullable(),\n state: z.enum(['scanning', 'rewriting', 'swapping', 'deleting', 'done', 'failed']),\n legalHoldPaused: z.boolean(),\n attemptCount: z.number(),\n nextAttemptAt: z.number(),\n lastError: z.string().nullable(),\n createdAt: z.number(),\n updatedAt: z.number(),\n expireAt: expireAtField,\n});\nexport type ChatHistoryAnonymizationJob = z.infer<typeof ChatHistoryAnonymizationJobSchema>;\n\n// ── chatHistoryAnonymizationJobs/{jobId}/affectedChunks/{chunkOrdinal} ───────\n// The non-contiguous affected-chunk set (round-16 finding 7) — a crash after the\n// manifest swap resumes deletion from these rows + `deleteCursor` without re-listing R2.\nexport const ChatHistoryAnonymizationAffectedChunkSchema = z.object({\n chunkOrdinal: z.number(),\n sourceChunkKey: z.string(),\n sourceSha256: z.string(),\n replacementChunkKey: z.string().nullable(),\n replacementSha256: z.string().nullable(),\n rewriteState: z.enum(['pending', 'done']),\n deleteState: z.enum(['pending', 'done']),\n});\nexport type ChatHistoryAnonymizationAffectedChunk = z.infer<typeof ChatHistoryAnonymizationAffectedChunkSchema>;\n"]}
|
|
1
|
+
{"version":3,"file":"chat-sync.js","sourceRoot":"","sources":["../../src/doc-schemas/chat-sync.ts"],"names":[],"mappings":"AAAA,sFAAsF;AACtF,+EAA+E;AAC/E,gFAAgF;AAChF,mFAAmF;AACnF,+EAA+E;AAC/E,iFAAiF;AACjF,iFAAiF;AACjF,gEAAgE;AAEhE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,6GAA6G;AAC7G,MAAM,aAAa,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC;AAE7C,+EAA+E;AAC/E,+EAA+E;AAC/E,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IACtD,eAAe,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC9C,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,gBAAgB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;IACnD,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC9B,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC5B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC;AAGH,+EAA+E;AAC/E,gFAAgF;AAChF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,Q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AAQ,EAAE;IAC1C,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACxC,YAAY,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACzC,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;CACzC,CAAC,CAAC","sourcesContent":["// Chat realtime SYNC / projection / command Firestore schemas (chat-edge-rebuild P1).\n// The chat sync / projection / command (Firestore-side) field lists are FROZEN\n// here — this file is their single source; the durable design owner is ttt-prod\n// docs/design/chat-realtime-system.md. All of these collections are Admin-SDK-only\n// (`allow read, write: if false`). Per the TTT timestamp convention every time\n// field is epoch-ms `number`; the SINGLE exception is the native-TTL `expireAt`,\n// which is a real Firestore `Timestamp` (modeled as `unknown` so the drift-check\n// does not false-flag a Timestamp object against `z.number()`).\n\nimport { z } from 'zod';\n\n/** Native-TTL field — a real Firestore Timestamp (NOT epoch-ms). Absent until the terminal that sets TTL. */\nconst expireAtField = z.unknown().optional();\n\n// ── chatChannelAuthProjections/{authPairKey} ────────────────────────────────\n// Per-(user, channel) authorization FACT. Absent ⇒ removed/deny (fail-closed).\nexport const ChatChannelAuthProjectionSchema = z.object({\n channelRefScope: z.enum(['channel', 'invite']),\n workProjectId: z.string().nullable(),\n guildChatChannelId: z.string().nullable(),\n guildInviteId: z.string().nullable(),\n uid: z.string(),\n channelKey: z.string(),\n channelAuthState: z.enum(['authorized', 'removed']),\n channelAuthVersion: z.number(),\n inputFingerprint: z.string(),\n updatedAt: z.number(),\n});\nexport type ChatChannelAuthProjection = z.infer<typeof ChatChannelAuthProjectionSchema>;\n\n// ── chatScopeDegraded/{scopeKey} (+ causes/{causeId}) ───────────────────────\n// Exists IFF unresolvedCauseCount > 0. Grant mints fail closed while it exists.\nexport const ChatScopeDegradedSchema = z.object({\n scopeKey: z.string(),\n scopeKind: z.enum(['channel', 'memberInWork']),\n // channel scope carries the channelRef tuple; memberInWork carries {uid, workProjectId}.\n workProjectId: z.string().nullable(),\n guildChatChannelId: z.string().nullable(),\n guildInviteId: z.string().nullable(),\n uid: z.string().nullable(),\n unresolvedCauseCount: z.number(),\n updatedAt: z.number(),\n});\nexport type ChatScopeDegraded = z.infer<typeof ChatScopeDegradedSchema>;\n\nexport const ChatScopeDegradedCauseSchema = z.object({\n causeId: z.string(),\n kind: z.enum(['syncEvent', 'fanoutJob']),\n ref: z.string(),\n deadLetteredAt: z.number(),\n});\nexport type ChatScopeDegradedCause = z.infer<typeof ChatScopeDegradedCauseSchema>;\n\n// ── chatSyncEvents/{eventId} ────────────────────────────────────────────────\nexport const ChatSyncEventSchema = z.object({\n eventId: z.string(),\n targetDo: z.string(),\n kind: z.enum(['channelAuth', 'accountAccess', 'config', 'serverMessage']),\n version: z.number(),\n payload: z.record(z.string(), z.unknown()).nullable(),\n tombstone: z.boolean().optional(),\n payloadHash: z.string(),\n status: z.enum(['pending', 'delivered', 'deadLetter']),\n attemptCount: z.number(),\n nextAttemptAt: z.number(),\n lastError: z.string().nullable(),\n createdAt: z.number(),\n deliveredResult: z.record(z.string(), z.unknown()).nullable(),\n deliveredAt: z.number().nullable(),\n deadLetteredAt: z.number().nullable(),\n expireAt: expireAtField,\n});\nexport type ChatSyncEvent = z.infer<typeof ChatSyncEventSchema>;\n\n// ── chatSyncFanoutJobs/{jobId} ──────────────────────────────────────────────\nexport const ChatSyncFanoutJobSchema = z.object({\n jobId: z.string(),\n selectorKind: z.enum(['channelMembers', 'workChannelsForUser', 'policyEditAffectedUsers']),\n selectorArgs: z.object({\n workProjectId: z.string().optional(),\n channelKey: z.string().optional(),\n uid: z.string().optional(),\n }),\n causeVersion: z.number(),\n cursor: z.object({ pageIndex: z.number(), lastDocId: z.string().nullable() }),\n revision: z.number(),\n status: z.enum(['pending', 'complete', 'deadLetter']),\n attemptCount: z.number(),\n nextAttemptAt: z.number(),\n lastError: z.string().nullable(),\n createdAt: z.number(),\n completedAt: z.number().nullable(),\n deadLetteredAt: z.number().nullable(),\n expireAt: expireAtField,\n});\nexport type ChatSyncFanoutJob = z.infer<typeof ChatSyncFanoutJobSchema>;\n\n// ── chatMessageOutbox/{commandId} ───────────────────────────────────────────\nexport const ChatMessageOutboxSchema = z.object({\n commandId: z.string(),\n kind: z.enum(['userMsg', 'systemMsg']),\n threadRef: z.string(),\n payload: z.record(z.string(), z.unknown()),\n payloadVersion: z.number(),\n status: z.enum(['pending', 'applied', 'deadLetter']),\n attemptCount: z.number(),\n nextAttemptAt: z.number(),\n lastError: z.string().nullable(),\n createdAt: z.number(),\n appliedAt: z.number().nullable(),\n deadLetteredAt: z.number().nullable(),\n expireAt: expireAtField,\n});\nexport type ChatMessageOutbox = z.infer<typeof ChatMessageOutboxSchema>;\n\n// ── chatAdminActionCommands/{requestId} ─────────────────────────────────────\n// `requestId` IS the doc id + DO dedup key. `delivering` is NOT a lease (it sets\n// nextAttemptAt = now + DELIVERY_TIMEOUT). terminalFailureGeneration default 0.\nexport const ChatAdminActionCommandSchema = z.object({\n requestId: z.string(),\n actorUid: z.string(),\n actorMode: z.enum(['adminReview', 'adminOverride']),\n systemRole: z.enum(['admin', 'jrAdmin']),\n channelRef: z.record(z.string(), z.unknown()),\n messageSeq: z.number(),\n action: z.enum(['hide', 'delete']),\n caseId: z.string(),\n reason: z.string(),\n expectedMessageRevision: z.number(),\n payloadHash: z.string(),\n // `safetyRepair` is the NONTERMINAL stall loop: a RESERVED command whose reconcile\n // leg (PROBE → FINALIZE) failed past ADMIN_COMMAND_MAX_ATTEMPTS. Drained like\n // `delivering`; never dead-letters.\n state: z.enum(['queued', 'delivering', 'safetyRepair', 'applied', 'failed', 'deadLetter']),\n attemptCount: z.number(),\n nextAttemptAt: z.number(),\n lastError: z.string().nullable(),\n result: z.record(z.string(), z.unknown()).nullable(),\n doRevisionId: z.string().nullable(),\n terminalFailureGeneration: z.number(),\n createdAt: z.number(),\n appliedAt: z.number().nullable(),\n failedAt: z.number().nullable(),\n deadLetteredAt: z.number().nullable(),\n reconciled: z.boolean(),\n reconciledAt: z.number().nullable(),\n safetyRepair: z.boolean(),\n // Monotonic counter of distinct entries into the safety-repair loop — keys the\n // per-entry idempotent failure audit.\n safetyRepairGeneration: z.number(),\n // Failed reconcile passes on an already-reserved command. Separate from\n // `attemptCount` (delivery attempts, which dead-letter); at the cap it escalates\n // once into `safetyRepair` instead of dead-lettering.\n reconcileAttemptCount: z.number(),\n expireAt: expireAtField,\n});\nexport type ChatAdminActionCommand = z.infer<typeof ChatAdminActionCommandSchema>;\n\n// ── chatHistoryAnonymizationJobs/{jobId} ────────────────────────────────────\n// Account-deletion history anonymization (Contract F; P8). Resumable + crash-safe:\n// the recorded source-manifest identity (key/hash/generation) + the three cursors\n// (scan/rewrite/delete) make every boundary restartable. jobId =\n// hash('chat-anonymize', channelDoId, epoch, anonymizedUid). `expireAt` (native TTL)\n// is set ONLY when the job reaches `done`.\n//\n// C-B1: the replacement generation is DO-OWNED — the Channel DO (single-threaded per\n// channel) allocates a DISTINCT monotonic generation per erasure off the epoch row and\n// rewrites against the CURRENT live manifest, so two erasures on one epoch chain instead\n// of colliding on a shared `anon-1` keyspace. These four fields are therefore RECORDED AT\n// SCAN (null until the DO reports/allocates them), not pinned at enqueue; if a concurrent\n// anonymization supersedes the source between scan and swap, the job resets to `scanning`\n// to re-derive against the new current manifest (keeping its own allocated generation).\nexport const ChatHistoryAnonymizationJobSchema = z.object({\n jobId: z.string(),\n channelDoId: z.string(),\n epoch: z.number(),\n anonymizedUid: z.string(),\n sourceManifestKey: z.string().nullable(),\n sourceManifestHash: z.string().nullable(),\n sourceGeneration: z.number().nullable(),\n replacementGeneration: z.number().nullable(),\n newManifestKey: z.string().nullable(),\n scanCursor: z.number(),\n rewriteCursor: z.number(),\n deleteCursor: z.number(),\n swappedAt: z.number().nullable(),\n state: z.enum(['scanning', 'rewriting', 'swapping', 'deleting', 'done', 'failed']),\n legalHoldPaused: z.boolean(),\n attemptCount: z.number(),\n nextAttemptAt: z.number(),\n lastError: z.string().nullable(),\n createdAt: z.number(),\n updatedAt: z.number(),\n expireAt: expireAtField,\n});\nexport type ChatHistoryAnonymizationJob = z.infer<typeof ChatHistoryAnonymizationJobSchema>;\n\n// ── chatHistoryAnonymizationJobs/{jobId}/affectedChunks/{chunkOrdinal} ───────\n// The non-contiguous affected-chunk set (round-16 finding 7) — a crash after the\n// manifest swap resumes deletion from these rows + `deleteCursor` without re-listing R2.\nexport const ChatHistoryAnonymizationAffectedChunkSchema = z.object({\n chunkOrdinal: z.number(),\n sourceChunkKey: z.string(),\n sourceSha256: z.string(),\n replacementChunkKey: z.string().nullable(),\n replacementSha256: z.string().nullable(),\n rewriteState: z.enum(['pending', 'done']),\n deleteState: z.enum(['pending', 'done']),\n});\nexport type ChatHistoryAnonymizationAffectedChunk = z.infer<typeof ChatHistoryAnonymizationAffectedChunkSchema>;\n"]}
|
|
@@ -137,10 +137,10 @@ export declare const AdminDispatchSchema: z.ZodObject<{
|
|
|
137
137
|
conversationFileUploadCount: z.ZodOptional<z.ZodNumber>;
|
|
138
138
|
conversationFileBytesReserved: z.ZodOptional<z.ZodNumber>;
|
|
139
139
|
adminDispatchId: z.ZodString;
|
|
140
|
-
partyKind: z.
|
|
140
|
+
partyKind: z.ZodEnum<{
|
|
141
141
|
workProject: "workProject";
|
|
142
142
|
user: "user";
|
|
143
|
-
}
|
|
143
|
+
}>;
|
|
144
144
|
workProjectId: z.ZodOptional<z.ZodString>;
|
|
145
145
|
contextRef: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
146
146
|
kind: z.ZodLiteral<"thresholdItem">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messaging.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/messaging.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA8BxB;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,sBAAsB;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AAC;AAQtE,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmCxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAMpF,eAAO,MAAM,6BAA6B;;;;;;;;;;2BASxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,eAAO,MAAM,4BAA4B;;;EAAkC,CAAC;AAC5E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2B9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAWhE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;iBAoB9B,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -143,13 +143,15 @@ export const AdminDispatchPartyKindSchema = z.enum(['user', 'workProject']);
|
|
|
143
143
|
export const AdminDispatchSchema = z.object({
|
|
144
144
|
adminDispatchId: z.string(),
|
|
145
145
|
// Party-generic dispatch: the platform corresponds with a PARTY — a user or a
|
|
146
|
-
// workProject.
|
|
147
|
-
//
|
|
148
|
-
//
|
|
149
|
-
//
|
|
150
|
-
//
|
|
151
|
-
//
|
|
152
|
-
|
|
146
|
+
// workProject. REQUIRED and written explicitly at creation: the personal-threads
|
|
147
|
+
// client query filters `partyKind == 'user'` and the Firestore read rules branch
|
|
148
|
+
// on it party-aware, so an absent field is unqueryable and unauthorizable. For
|
|
149
|
+
// 'user' threads `userId` is the thread owner (the sole member-side authority).
|
|
150
|
+
// For 'workProject' threads `workProjectId` is set, read/reply authority is
|
|
151
|
+
// ACTIVE GUILDMATE standing evaluated server-side (never a stored member list),
|
|
152
|
+
// and `userId` holds the INITIATING member's uid for attribution only — it is
|
|
153
|
+
// never a work-thread authority.
|
|
154
|
+
partyKind: AdminDispatchPartyKindSchema,
|
|
153
155
|
workProjectId: z.string().optional(),
|
|
154
156
|
contextRef: AdminDispatchContextRefSchema.optional(),
|
|
155
157
|
userId: z.string(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messaging.js","sourceRoot":"","sources":["../../src/doc-schemas/messaging.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,sFAAsF;AACtF,qFAAqF;AACrF,8BAA8B;AAE9B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,mCAAmC,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAEpD,8EAA8E;AAC9E,8EAA8E;AAC9E,iFAAiF;AACjF,wEAAwE;AACxE,yDAAyD;AACzD,8EAA8E;AAE9E;;;6EAG6E;AAC7E,MAAM,6BAA6B,GAAG;IACpC,mDAAmD;IACnD,qBAAqB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5C,0DAA0D;IAC1D,yBAAyB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChD,qDAAqD;IACrD,2BAA2B,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClD,wCA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AAC,QAAQ,EAAE;IAC/B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,oFAAoF;IACpF,iFAAiF;IACjF,6EAA6E;IAC7E,+CAA+C;IAC/C,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,OAAO,EAAE,aAAa,CAAC,QAAQ,EAAE;IACjC,eAAe,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACvC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;IAClD,gFAAgF;IAChF,mFAAmF;IACnF,+EAA+E;IAC/E,kEAAkE;IAClE,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC,CAAC","sourcesContent":["// Messaging parent-thread Firestore document SCHEMAS — guildChatChannels, the\n// guildInviteConversations shell, and pendingAdminDispatches. Per-message body shapes\n// live in @ttt-productions/chat-core (ChatMessageV1); ttt-core owns the thread docs.\n// Types inferred via z.infer.\n\nimport { z } from 'zod';\nimport { ReplyToSchema } from '@ttt-productions/chat-schemas';\nimport { InviteSourceSchema } from '../schemas/work-project-management.js';\nimport { guildInviteConversationStatusSchema } from '../schemas/atoms.js';\nimport { ContentMediaKindSchema } from './media-assets.js';\n\nconst userRefSchema = z.object({ uid: z.string() });\n\n// ===========================================================================\n// CONVERSATION FILES — the flat, Firestore-owned file list on a conversation.\n// Replaces inline chat attachments: a file is associated WITH a conversation but\n// never embedded in, sequenced with, or mutated through a chat message.\n// See ttt-prod docs/design/upload-and-media-pipeline.md.\n// ===========================================================================\n\n/** Backend-owned Conversation Files counters carried by EVERY conversation parent\n * (guildInviteConversations/{id} and pendingAdminDispatches/{id}). All four are\n * optional — an absent field reads as 0, so no pre-existing conversation needs a\n * backfill. Clients can never write them (rules + callable-only writes). */\nconst conversationFileCounterFields = {\n /** Published ACTIVE files in this conversation. */\n conversationFileCount: z.number().optional(),\n /** Published STORED-OUTPUT bytes in this conversation. */\n conversationFileBytesUsed: z.number().optional(),\n /** Active quota RESERVATIONS (uploads in flight). */\n conversationFileUploadCount: z.number().optional(),\n /** Bytes reserved by active uploads. */\n conversationFileBytesReserved: z.number().optional(),\n} as const;\n\n/**\n * `{conversationParent}/conversationFiles/{conversationFileId}` — the conversation's\n * lightweight ownership/list projection, analogous to `WorkFileSchema`.\n *\n * DELIBERATELY ABSENT (owned elsewhere, never duplicated here):\n * - no `status` / `ready` / `publicationState` / processing progress — `pendingMedia`\n * and `mediaAssets` own the lifecycle; the mere EXISTENCE of this doc means the\n * asset is published;\n * - no Firebase / R2 / gateway / signed / download URL — display URLs are built at\n * render time through the protected media gateway;\n * - no Firebase staging `storagePath`;\n * - no username / display name / avatar / Work name snapshot (ARCH-103) — resolve\n * `uploadedByUid` at render time.\n *\n * `conversationFileId` is deterministic: it IS the `pendingMediaId`. The publication\n * adapter creates this doc with `transaction.create` (never `set`), so an id\n * collision cannot overwrite and double-count an existing file.\n */\nexport const ConversationFileSchema = z.object({\n conversationFileId: z.string(),\n mediaAssetId: z.string(),\n name: z.string(),\n // The canonical stored content media kind — never a re-declared union (ARCH-102).\n mediaKind: ContentMediaKindSchema,\n contentType: z.string(),\n /** Sum of the PUBLISHED variant bytes (stored output, not raw upload bytes). */\n sizeBytes: z.number(),\n uploadedByUid: z.string(),\n createdAt: z.number(),\n});\nexport type ConversationFile = z.infer<typeof ConversationFileSchema>;\n\nexport const GuildChatChannelSchema = z.object({\n guildChatChannelId: z.string(),\n workProjectId: z.string(),\n channelName: z.string(),\n description: z.string().optional(),\n requiredGuildStandings: z.array(z.string()),\n allowedUserIds: z.array(z.string()),\n createdAt: z.number(),\n // NOTE: createdBy here is a flat uid string (unlike the `{ uid }` object form on\n // most other docs). Preserved as-is; flagged in the schema-registry recon.\n createdBy: z.string(),\n lastMessageAt: z.string().optional(),\n lastMessage: z.string().optional(),\n messageCount: z.number(),\n isArchived: z.boolean(),\n // Delete/tombstone marker (ttt-prod docs/design/chat-realtime-system.md \"Channel lifecycle semantics\").\n // Independent of `isArchived`: archive = visible-under-a-toggle, delete = gone from every user's\n // UI with grants revoked and sends rejected DO-side; storage is RETAINED (never a physical purge).\n // Optional, absent ⇒ false, so existing/seeded channels need no backfill. Backend-only-writable.\n isDeleted: z.boolean().optional(),\n // Monotonic config version for the chat-realtime sync layer (Contract B). Bumped by\n // each channel create / edit / archive / delete in the authoritative txn; the\n // `config` chatSyncEvents + channel-scoped fanout key on it. Absent ⇒ 0.\n configVersion: z.number().optional(),\n});\nexport type GuildChatChannel = z.infer<typeof GuildChatChannelSchema>;\n\n// The guildInviteConversations/{guildInviteId} doc as actually written by inviteUserToGuild\n// (and mutated by the accept/decline/finalize/cancel callables). This is the single source of\n// truth — the former duplicate `GuildInviteSchema` in ./work-project.ts was a stale, narrower\n// shape that the callable bypassed with an `as unknown as` cast. The inviter is `createdBy`\n// (== `sender`); there is no separate `workSteward`/`workProjectTitle` field (the title lives in\n// `workProject.workingTitle`).\nexport const GuildInviteConversationSchema = z.object({\n guildInviteId: z.string(),\n workProjectId: z.string(),\n relatedUserIds: z.array(z.string()),\n // Title/description are NOT snapshotted (Display Identity Invariant — resolve at render\n // from publicWorkProjects by id). `type` (Tales/Tunes/Television) is an immutable\n // classification, not display text, and IS consumed by an invites-list type filter\n // (guild-invites-section.tsx), so it stays. Triggers read only `workProjectId`.\n workProject: z.object({\n workProjectId: z.string(),\n type: z.string(),\n }),\n createdBy: userRefSchema,\n sender: userRefSchema,\n recipient: userRefSchema,\n stakeSharesOffered: z.number(),\n source: InviteSourceSchema,\n // State machine: pending → accepted (transient, trigger-consumed) → finalized (terminal\n // success), or pending → declined / cancelled (terminal failure). No 'error' state is ever\n // written (dead state removed 2026-07-03). See ttt-prod\n // docs/design/work-guild-membership-and-stake.md for the invite lifecycle.\n status: guildInviteConversationStatusSchema,\n createdAt: z.number(),\n updatedAt: z.number(),\n lastUpdatedAt: z.number(),\n finalizedAt: z.number().optional(),\n senderConfirmed: z.boolean(),\n recipientConfirmed: z.boolean(),\n lastMessage: z.string().optional(),\n lastMessageAt: z.string().optional(),\n // Conversation Files quota counters for THIS invite conversation (per-conversation\n // caps: MAX_CONVERSATION_FILES / MAX_CONVERSATION_FILE_STORAGE_BYTES). Reserved at\n // startUpload, transferred to used at publication, released on every terminal path,\n // decremented on delete. Backend-only-writable; absent ⇒ 0.\n ...conversationFileCounterFields,\n});\nexport type GuildInviteConversation = z.infer<typeof GuildInviteConversationSchema>;\n\n// Typed context ref carried by a dispatch thread born from a review send-back, a\n// moderation placeholder, or a published change request — lets the admin queue card\n// say what the thread is about without parsing the subject line. Extensible union;\n// server-validated against the thread's party (never trusted raw from the client).\nexport const AdminDispatchContextRefSchema = z.discriminatedUnion('kind', [\n z.object({ kind: z.literal('thresholdItem'), thresholdItemId: z.string() }),\n z.object({\n kind: z.literal('hallContent'),\n hallItemId: z.string(),\n // null ⇒ the hall parent DETAIL; set ⇒ a chapter/track/episode sub-item.\n subItemId: z.string().nullable(),\n }),\n z.object({ kind: z.literal('hallContentChangeRequest'), changeRequestId: z.string() }),\n]);\nexport type AdminDispatchContextRef = z.infer<typeof AdminDispatchContextRefSchema>;\n\nexport const AdminDispatchPartyKindSchema = z.enum(['user', 'workProject']);\nexport type AdminDispatchPartyKind = z.infer<typeof AdminDispatchPartyKindSchema>;\n\nexport const AdminDispatchSchema = z.object({\n adminDispatchId: z.string(),\n // Party-generic dispatch: the platform corresponds with a PARTY — a user or a\n // workProject. Absent ⇒ 'user' (every pre-generalization thread). For 'user'\n // threads `userId` is the thread owner (the sole member-side authority). For\n // 'workProject' threads `workProjectId` is set, read/reply authority is ACTIVE\n // GUILDMATE standing evaluated server-side (never a stored member list), and\n // `userId` holds the INITIATING member's uid for attribution only — it is never\n // a work-thread authority.\n partyKind: AdminDispatchPartyKindSchema.optional(),\n workProjectId: z.string().optional(),\n contextRef: AdminDispatchContextRefSchema.optional(),\n userId: z.string(),\n initiatorUserId: z.string(),\n initiatedBy: z.enum(['user', 'admin']),\n subject: z.string(),\n status: z.enum(['open', 'user_reply', 'admin_reply', 'closed_resolved', 'closed_unresolved']),\n createdAt: z.number(),\n lastUpdatedAt: z.number(),\n readByAdmin: z.boolean(),\n readByUser: z.boolean(),\n closedBy: z.string().optional(),\n // Conversation Files quota counters for THIS admin-support thread — same\n // per-conversation caps and same backend-only ownership as the invite conversation.\n ...conversationFileCounterFields,\n});\nexport type AdminDispatch = z.infer<typeof AdminDispatchSchema>;\n\n// Per-message body for admin-support `conversationMessages` — the ONE chat surface still\n// transported through Firestore (guild channel + invite messages are realtime-only, served\n// by the chat Worker Durable Object). Written by runSendGuildChatMessage (senderId/text/\n// createdAt + optional replyTo); the admin-dispatch INITIAL message\n// (runStartAdminSupportThread) additionally stores `messageId`. This is the STORED shape — a relaxed\n// @ttt-productions/chat-core ChatMessageV1: `messageId` is the doc id (only sometimes persisted) and\n// `threadId` is not stored. Reuses the chat-schemas ReplyTo Zod shape.\n// A chat message carries NO file reference — files live in the conversation's\n// `conversationFiles` subcollection (ConversationFileSchema above).\nexport const ChatMessageV1Schema = z.object({\n senderId: z.string(),\n text: z.string(),\n createdAt: z.number(),\n messageId: z.string().optional(),\n threadId: z.string().optional(),\n type: z.string().optional(),\n // Rides on the realtime invite-thread envelope (chat Worker invite Durable Object);\n // guild-invite messages are realtime-only — there is no Firestore inviteMessages\n // subcollection. Optional so the same body schema still fits the guildChat /\n // admin-dispatch messages that don't carry it.\n guildInviteId: z.string().optional(),\n replyTo: ReplyToSchema.optional(),\n isSystemMessage: z.boolean().optional(),\n meta: z.record(z.string(), z.unknown()).optional(),\n // Moderation tombstone flag — the single-doc `hidden` flip written by the admin\n // moderateReportedContent pipeline (the admin-work-message itemType). Backend-only\n // writable (conversationMessages is callable-only in rules); absent ⇒ visible.\n // Thread views render a hidden message as a moderation tombstone.\n hidden: z.boolean().optional(),\n});\nexport type ChatMessageV1Doc = z.infer<typeof ChatMessageV1Schema>;\n"]}
|
|
1
|
+
{"version":3,"file":"messaging.js","sourceRoot":"","sources":["../../src/doc-schemas/messaging.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,sFAAsF;AACtF,qFAAqF;AACrF,8BAA8B;AAE9B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,mCAAmC,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAEpD,8EAA8E;AAC9E,8EAA8E;AAC9E,iFAAiF;AACjF,wEAAwE;AACxE,yDAAyD;AACzD,8EAA8E;AAE9E;;;6EAG6E;AAC7E,MAAM,6BAA6B,GAAG;IACpC,mDAAmD;IACnD,qBAAqB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5C,0DAA0D;IAC1D,yBAAyB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChD,qDAAqD;IACrD,2BAA2B,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClD,wCAAwC;IACxC,6BAA6B,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC5C,CAAC;AAEX;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC9B,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,IAAI,EA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AAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACvC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;IAClD,gFAAgF;IAChF,mFAAmF;IACnF,+EAA+E;IAC/E,kEAAkE;IAClE,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC,CAAC","sourcesContent":["// Messaging parent-thread Firestore document SCHEMAS — guildChatChannels, the\n// guildInviteConversations shell, and pendingAdminDispatches. Per-message body shapes\n// live in @ttt-productions/chat-core (ChatMessageV1); ttt-core owns the thread docs.\n// Types inferred via z.infer.\n\nimport { z } from 'zod';\nimport { ReplyToSchema } from '@ttt-productions/chat-schemas';\nimport { InviteSourceSchema } from '../schemas/work-project-management.js';\nimport { guildInviteConversationStatusSchema } from '../schemas/atoms.js';\nimport { ContentMediaKindSchema } from './media-assets.js';\n\nconst userRefSchema = z.object({ uid: z.string() });\n\n// ===========================================================================\n// CONVERSATION FILES — the flat, Firestore-owned file list on a conversation.\n// Replaces inline chat attachments: a file is associated WITH a conversation but\n// never embedded in, sequenced with, or mutated through a chat message.\n// See ttt-prod docs/design/upload-and-media-pipeline.md.\n// ===========================================================================\n\n/** Backend-owned Conversation Files counters carried by EVERY conversation parent\n * (guildInviteConversations/{id} and pendingAdminDispatches/{id}). All four are\n * optional — an absent field reads as 0, so no pre-existing conversation needs a\n * backfill. Clients can never write them (rules + callable-only writes). */\nconst conversationFileCounterFields = {\n /** Published ACTIVE files in this conversation. */\n conversationFileCount: z.number().optional(),\n /** Published STORED-OUTPUT bytes in this conversation. */\n conversationFileBytesUsed: z.number().optional(),\n /** Active quota RESERVATIONS (uploads in flight). */\n conversationFileUploadCount: z.number().optional(),\n /** Bytes reserved by active uploads. */\n conversationFileBytesReserved: z.number().optional(),\n} as const;\n\n/**\n * `{conversationParent}/conversationFiles/{conversationFileId}` — the conversation's\n * lightweight ownership/list projection, analogous to `WorkFileSchema`.\n *\n * DELIBERATELY ABSENT (owned elsewhere, never duplicated here):\n * - no `status` / `ready` / `publicationState` / processing progress — `pendingMedia`\n * and `mediaAssets` own the lifecycle; the mere EXISTENCE of this doc means the\n * asset is published;\n * - no Firebase / R2 / gateway / signed / download URL — display URLs are built at\n * render time through the protected media gateway;\n * - no Firebase staging `storagePath`;\n * - no username / display name / avatar / Work name snapshot (ARCH-103) — resolve\n * `uploadedByUid` at render time.\n *\n * `conversationFileId` is deterministic: it IS the `pendingMediaId`. The publication\n * adapter creates this doc with `transaction.create` (never `set`), so an id\n * collision cannot overwrite and double-count an existing file.\n */\nexport const ConversationFileSchema = z.object({\n conversationFileId: z.string(),\n mediaAssetId: z.string(),\n name: z.string(),\n // The canonical stored content media kind — never a re-declared union (ARCH-102).\n mediaKind: ContentMediaKindSchema,\n contentType: z.string(),\n /** Sum of the PUBLISHED variant bytes (stored output, not raw upload bytes). */\n sizeBytes: z.number(),\n uploadedByUid: z.string(),\n createdAt: z.number(),\n});\nexport type ConversationFile = z.infer<typeof ConversationFileSchema>;\n\nexport const GuildChatChannelSchema = z.object({\n guildChatChannelId: z.string(),\n workProjectId: z.string(),\n channelName: z.string(),\n description: z.string().optional(),\n requiredGuildStandings: z.array(z.string()),\n allowedUserIds: z.array(z.string()),\n createdAt: z.number(),\n // NOTE: createdBy here is a flat uid string (unlike the `{ uid }` object form on\n // most other docs). Preserved as-is; flagged in the schema-registry recon.\n createdBy: z.string(),\n lastMessageAt: z.string().optional(),\n lastMessage: z.string().optional(),\n messageCount: z.number(),\n isArchived: z.boolean(),\n // Delete/tombstone marker (ttt-prod docs/design/chat-realtime-system.md \"Channel lifecycle semantics\").\n // Independent of `isArchived`: archive = visible-under-a-toggle, delete = gone from every user's\n // UI with grants revoked and sends rejected DO-side; storage is RETAINED (never a physical purge).\n // Optional, absent ⇒ false, so existing/seeded channels need no backfill. Backend-only-writable.\n isDeleted: z.boolean().optional(),\n // Monotonic config version for the chat-realtime sync layer (Contract B). Bumped by\n // each channel create / edit / archive / delete in the authoritative txn; the\n // `config` chatSyncEvents + channel-scoped fanout key on it. Absent ⇒ 0.\n configVersion: z.number().optional(),\n});\nexport type GuildChatChannel = z.infer<typeof GuildChatChannelSchema>;\n\n// The guildInviteConversations/{guildInviteId} doc as actually written by inviteUserToGuild\n// (and mutated by the accept/decline/finalize/cancel callables). This is the single source of\n// truth — the former duplicate `GuildInviteSchema` in ./work-project.ts was a stale, narrower\n// shape that the callable bypassed with an `as unknown as` cast. The inviter is `createdBy`\n// (== `sender`); there is no separate `workSteward`/`workProjectTitle` field (the title lives in\n// `workProject.workingTitle`).\nexport const GuildInviteConversationSchema = z.object({\n guildInviteId: z.string(),\n workProjectId: z.string(),\n relatedUserIds: z.array(z.string()),\n // Title/description are NOT snapshotted (Display Identity Invariant — resolve at render\n // from publicWorkProjects by id). `type` (Tales/Tunes/Television) is an immutable\n // classification, not display text, and IS consumed by an invites-list type filter\n // (guild-invites-section.tsx), so it stays. Triggers read only `workProjectId`.\n workProject: z.object({\n workProjectId: z.string(),\n type: z.string(),\n }),\n createdBy: userRefSchema,\n sender: userRefSchema,\n recipient: userRefSchema,\n stakeSharesOffered: z.number(),\n source: InviteSourceSchema,\n // State machine: pending → accepted (transient, trigger-consumed) → finalized (terminal\n // success), or pending → declined / cancelled (terminal failure). No 'error' state is ever\n // written (dead state removed 2026-07-03). See ttt-prod\n // docs/design/work-guild-membership-and-stake.md for the invite lifecycle.\n status: guildInviteConversationStatusSchema,\n createdAt: z.number(),\n updatedAt: z.number(),\n lastUpdatedAt: z.number(),\n finalizedAt: z.number().optional(),\n senderConfirmed: z.boolean(),\n recipientConfirmed: z.boolean(),\n lastMessage: z.string().optional(),\n lastMessageAt: z.string().optional(),\n // Conversation Files quota counters for THIS invite conversation (per-conversation\n // caps: MAX_CONVERSATION_FILES / MAX_CONVERSATION_FILE_STORAGE_BYTES). Reserved at\n // startUpload, transferred to used at publication, released on every terminal path,\n // decremented on delete. Backend-only-writable; absent ⇒ 0.\n ...conversationFileCounterFields,\n});\nexport type GuildInviteConversation = z.infer<typeof GuildInviteConversationSchema>;\n\n// Typed context ref carried by a dispatch thread born from a review send-back, a\n// moderation placeholder, or a published change request — lets the admin queue card\n// say what the thread is about without parsing the subject line. Extensible union;\n// server-validated against the thread's party (never trusted raw from the client).\nexport const AdminDispatchContextRefSchema = z.discriminatedUnion('kind', [\n z.object({ kind: z.literal('thresholdItem'), thresholdItemId: z.string() }),\n z.object({\n kind: z.literal('hallContent'),\n hallItemId: z.string(),\n // null ⇒ the hall parent DETAIL; set ⇒ a chapter/track/episode sub-item.\n subItemId: z.string().nullable(),\n }),\n z.object({ kind: z.literal('hallContentChangeRequest'), changeRequestId: z.string() }),\n]);\nexport type AdminDispatchContextRef = z.infer<typeof AdminDispatchContextRefSchema>;\n\nexport const AdminDispatchPartyKindSchema = z.enum(['user', 'workProject']);\nexport type AdminDispatchPartyKind = z.infer<typeof AdminDispatchPartyKindSchema>;\n\nexport const AdminDispatchSchema = z.object({\n adminDispatchId: z.string(),\n // Party-generic dispatch: the platform corresponds with a PARTY — a user or a\n // workProject. REQUIRED and written explicitly at creation: the personal-threads\n // client query filters `partyKind == 'user'` and the Firestore read rules branch\n // on it party-aware, so an absent field is unqueryable and unauthorizable. For\n // 'user' threads `userId` is the thread owner (the sole member-side authority).\n // For 'workProject' threads `workProjectId` is set, read/reply authority is\n // ACTIVE GUILDMATE standing evaluated server-side (never a stored member list),\n // and `userId` holds the INITIATING member's uid for attribution only — it is\n // never a work-thread authority.\n partyKind: AdminDispatchPartyKindSchema,\n workProjectId: z.string().optional(),\n contextRef: AdminDispatchContextRefSchema.optional(),\n userId: z.string(),\n initiatorUserId: z.string(),\n initiatedBy: z.enum(['user', 'admin']),\n subject: z.string(),\n status: z.enum(['open', 'user_reply', 'admin_reply', 'closed_resolved', 'closed_unresolved']),\n createdAt: z.number(),\n lastUpdatedAt: z.number(),\n readByAdmin: z.boolean(),\n readByUser: z.boolean(),\n closedBy: z.string().optional(),\n // Conversation Files quota counters for THIS admin-support thread — same\n // per-conversation caps and same backend-only ownership as the invite conversation.\n ...conversationFileCounterFields,\n});\nexport type AdminDispatch = z.infer<typeof AdminDispatchSchema>;\n\n// Per-message body for admin-support `conversationMessages` — the ONE chat surface still\n// transported through Firestore (guild channel + invite messages are realtime-only, served\n// by the chat Worker Durable Object). Written by runSendGuildChatMessage (senderId/text/\n// createdAt + optional replyTo); the admin-dispatch INITIAL message\n// (runStartAdminSupportThread) additionally stores `messageId`. This is the STORED shape — a relaxed\n// @ttt-productions/chat-core ChatMessageV1: `messageId` is the doc id (only sometimes persisted) and\n// `threadId` is not stored. Reuses the chat-schemas ReplyTo Zod shape.\n// A chat message carries NO file reference — files live in the conversation's\n// `conversationFiles` subcollection (ConversationFileSchema above).\nexport const ChatMessageV1Schema = z.object({\n senderId: z.string(),\n text: z.string(),\n createdAt: z.number(),\n messageId: z.string().optional(),\n threadId: z.string().optional(),\n type: z.string().optional(),\n // Rides on the realtime invite-thread envelope (chat Worker invite Durable Object);\n // guild-invite messages are realtime-only — there is no Firestore inviteMessages\n // subcollection. Optional so the same body schema still fits the guildChat /\n // admin-dispatch messages that don't carry it.\n guildInviteId: z.string().optional(),\n replyTo: ReplyToSchema.optional(),\n isSystemMessage: z.boolean().optional(),\n meta: z.record(z.string(), z.unknown()).optional(),\n // Moderation tombstone flag — the single-doc `hidden` flip written by the admin\n // moderateReportedContent pipeline (the admin-work-message itemType). Backend-only\n // writable (conversationMessages is callable-only in rules); absent ⇒ visible.\n // Thread views render a hidden message as a moderation tombstone.\n hidden: z.boolean().optional(),\n});\nexport type ChatMessageV1Doc = z.infer<typeof ChatMessageV1Schema>;\n"]}
|
|
@@ -1712,10 +1712,10 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
1712
1712
|
conversationFileUploadCount: z.ZodOptional<z.ZodNumber>;
|
|
1713
1713
|
conversationFileBytesReserved: z.ZodOptional<z.ZodNumber>;
|
|
1714
1714
|
adminDispatchId: z.ZodString;
|
|
1715
|
-
partyKind: z.
|
|
1715
|
+
partyKind: z.ZodEnum<{
|
|
1716
1716
|
workProject: "workProject";
|
|
1717
1717
|
user: "user";
|
|
1718
|
-
}
|
|
1718
|
+
}>;
|
|
1719
1719
|
workProjectId: z.ZodOptional<z.ZodString>;
|
|
1720
1720
|
contextRef: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1721
1721
|
kind: z.ZodLiteral<"thresholdItem">;
|
|
@@ -4052,6 +4052,7 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
4052
4052
|
deadLetter: "deadLetter";
|
|
4053
4053
|
queued: "queued";
|
|
4054
4054
|
delivering: "delivering";
|
|
4055
|
+
safetyRepair: "safetyRepair";
|
|
4055
4056
|
}>;
|
|
4056
4057
|
attemptCount: z.ZodNumber;
|
|
4057
4058
|
nextAttemptAt: z.ZodNumber;
|
|
@@ -4065,6 +4066,9 @@ export declare const COLLECTION_SCHEMAS: {
|
|
|
4065
4066
|
deadLetteredAt: z.ZodNullable<z.ZodNumber>;
|
|
4066
4067
|
reconciled: z.ZodBoolean;
|
|
4067
4068
|
reconciledAt: z.ZodNullable<z.ZodNumber>;
|
|
4069
|
+
safetyRepair: z.ZodBoolean;
|
|
4070
|
+
safetyRepairGeneration: z.ZodNumber;
|
|
4071
|
+
reconcileAttemptCount: z.ZodNumber;
|
|
4068
4072
|
expireAt: z.ZodOptional<z.ZodUnknown>;
|
|
4069
4073
|
}, z.core.$strip>;
|
|
4070
4074
|
readonly 'chatHistoryAnonymizationJobs/{jobId}': z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/registry.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiM7B,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"registry.d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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6NkB,CAAC;AAElD,MAAM,MAAM,wBAAwB,GAAG,MAAM,OAAO,kBAAkB,CAAC;AAEvE;;;;;;;;;GASG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;CAmBiC,CAAC;AAEvE;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAOvC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const DeleteConversationFileInputSchema: z.ZodObject<{
|
|
3
|
+
conversation: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4
|
+
kind: z.ZodLiteral<"guildInvite">;
|
|
5
|
+
guildInviteId: z.ZodString;
|
|
6
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
7
|
+
kind: z.ZodLiteral<"adminSupport">;
|
|
8
|
+
adminDispatchId: z.ZodString;
|
|
9
|
+
}, z.core.$strict>], "kind">;
|
|
10
|
+
conversationFileId: z.ZodString;
|
|
11
|
+
}, z.core.$strict>;
|
|
12
|
+
export type DeleteConversationFileInput = z.infer<typeof DeleteConversationFileInputSchema>;
|
|
13
|
+
//# sourceMappingURL=conversation-files.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation-files.d.ts","sourceRoot":"","sources":["../../src/schemas/conversation-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,iCAAiC;;;;;;;;;kBAGnC,CAAC;AACZ,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ConversationFileRefSchema } from '../media/conversation-file-ref.js';
|
|
3
|
+
// ---- conversation files (guild-invite / admin-support Conversation Files) -------------
|
|
4
|
+
// Delete a single Conversation File. Authorization (uploader-owns-file, or admin on an
|
|
5
|
+
// admin-support thread) is enforced inside the callable core's transaction; the ref's
|
|
6
|
+
// two-kind union makes a guild-CHANNEL target unrepresentable at the wire boundary.
|
|
7
|
+
export const DeleteConversationFileInputSchema = z.object({
|
|
8
|
+
conversation: ConversationFileRefSchema,
|
|
9
|
+
conversationFileId: z.string().min(1),
|
|
10
|
+
}).strict();
|
|
11
|
+
//# sourceMappingURL=conversation-files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation-files.js","sourceRoot":"","sources":["../../src/schemas/conversation-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAE9E,0FAA0F;AAE1F,uFAAuF;AACvF,sFAAsF;AACtF,oFAAoF;AACpF,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,MAAM,CAAC;IACxD,YAAY,EAAE,yBAAyB;IACvC,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACtC,CAAC,CAAC,MAAM,EAAE,CAAC","sourcesContent":["import { z } from 'zod';\nimport { ConversationFileRefSchema } from '../media/conversation-file-ref.js';\n\n// ---- conversation files (guild-invite / admin-support Conversation Files) -------------\n\n// Delete a single Conversation File. Authorization (uploader-owns-file, or admin on an\n// admin-support thread) is enforced inside the callable core's transaction; the ref's\n// two-kind union makes a guild-CHANNEL target unrepresentable at the wire boundary.\nexport const DeleteConversationFileInputSchema = z.object({\n conversation: ConversationFileRefSchema,\n conversationFileId: z.string().min(1),\n}).strict();\nexport type DeleteConversationFileInput = z.infer<typeof DeleteConversationFileInputSchema>;\n"]}
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export * from './users.js';
|
|
|
18
18
|
export * from './utility.js';
|
|
19
19
|
export * from './voting.js';
|
|
20
20
|
export * from './notification.js';
|
|
21
|
+
export * from './conversation-files.js';
|
|
21
22
|
export { AddToMentionHistoryResultSchema, type AddToMentionHistoryResult, } from '../doc-schemas/social.js';
|
|
22
23
|
export { CreateCommissionProposalTextResultSchema, type CreateCommissionProposalTextResult, } from '../doc-schemas/commissions.js';
|
|
23
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AAMxC,OAAO,EACL,+BAA+B,EAC/B,KAAK,yBAAyB,GAC/B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,wCAAwC,EACxC,KAAK,kCAAkC,GACxC,MAAM,+BAA+B,CAAC"}
|
package/dist/schemas/index.js
CHANGED
|
@@ -18,6 +18,7 @@ export * from './users.js';
|
|
|
18
18
|
export * from './utility.js';
|
|
19
19
|
export * from './voting.js';
|
|
20
20
|
export * from './notification.js';
|
|
21
|
+
export * from './conversation-files.js';
|
|
21
22
|
// Authoritative mutation results homed in ../doc-schemas (each composes a doc schema
|
|
22
23
|
// whose module already imports from ./schemas — the reverse runtime import would be a
|
|
23
24
|
// module cycle). Surfaced here so callables/hooks import ALL wire contracts from the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AAExC,qFAAqF;AACrF,sFAAsF;AACtF,qFAAqF;AACrF,yBAAyB;AACzB,OAAO,EACL,+BAA+B,GAEhC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,wCAAwC,GAEzC,MAAM,+BAA+B,CAAC","sourcesContent":["export * from './atoms.js';\nexport * from './stake-share-operation.js';\nexport * from './admin.js';\nexport * from './safety.js';\nexport * from './ncii.js';\nexport * from './uploads.js';\nexport * from './chat.js';\nexport * from './media.js';\nexport * from './commissions.js';\nexport * from './hall-library.js';\nexport * from './auditions.js';\nexport * from './payments.js';\nexport * from './work-project-management.js';\nexport * from './craft-skills.js';\nexport * from './social.js';\nexport * from './admin-dispatch-actions.js';\nexport * from './users.js';\nexport * from './utility.js';\nexport * from './voting.js';\nexport * from './notification.js';\nexport * from './conversation-files.js';\n\n// Authoritative mutation results homed in ../doc-schemas (each composes a doc schema\n// whose module already imports from ./schemas — the reverse runtime import would be a\n// module cycle). Surfaced here so callables/hooks import ALL wire contracts from the\n// one ./schemas subpath.\nexport {\n AddToMentionHistoryResultSchema,\n type AddToMentionHistoryResult,\n} from '../doc-schemas/social.js';\nexport {\n CreateCommissionProposalTextResultSchema,\n type CreateCommissionProposalTextResult,\n} from '../doc-schemas/commissions.js';\n"]}
|
|
@@ -12,4 +12,5 @@ export * from './update-television-cover-photo-variables.js';
|
|
|
12
12
|
export * from './update-episode-media-variables.js';
|
|
13
13
|
export * from './update-chapter-media-variables.js';
|
|
14
14
|
export * from './update-track-media-variables.js';
|
|
15
|
+
export * from './upload-conversation-file-variables.js';
|
|
15
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/upload-variables/index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,sCAAsC,CAAC;AACrD,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/upload-variables/index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,sCAAsC,CAAC;AACrD,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC"}
|
|
@@ -12,4 +12,5 @@ export * from './update-television-cover-photo-variables.js';
|
|
|
12
12
|
export * from './update-episode-media-variables.js';
|
|
13
13
|
export * from './update-chapter-media-variables.js';
|
|
14
14
|
export * from './update-track-media-variables.js';
|
|
15
|
+
export * from './upload-conversation-file-variables.js';
|
|
15
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/upload-variables/index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,sCAAsC,CAAC;AACrD,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC","sourcesContent":["export * from './square-streetz-post-variables.js';\nexport * from './create-commission-variables.js';\nexport * from './apply-to-commission-variables.js';\nexport * from './create-work-project-audition-variables.js';\nexport * from './create-admin-audition-variables.js';\nexport * from './create-audition-entry-variables.js';\nexport * from './upload-profile-picture-variables.js';\nexport * from './upload-craft-skill-variables.js';\nexport * from './update-tale-cover-photo-variables.js';\nexport * from './update-tune-cover-photo-variables.js';\nexport * from './update-television-cover-photo-variables.js';\nexport * from './update-episode-media-variables.js';\nexport * from './update-chapter-media-variables.js';\nexport * from './update-track-media-variables.js';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/upload-variables/index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,sCAAsC,CAAC;AACrD,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC","sourcesContent":["export * from './square-streetz-post-variables.js';\nexport * from './create-commission-variables.js';\nexport * from './apply-to-commission-variables.js';\nexport * from './create-work-project-audition-variables.js';\nexport * from './create-admin-audition-variables.js';\nexport * from './create-audition-entry-variables.js';\nexport * from './upload-profile-picture-variables.js';\nexport * from './upload-craft-skill-variables.js';\nexport * from './update-tale-cover-photo-variables.js';\nexport * from './update-tune-cover-photo-variables.js';\nexport * from './update-television-cover-photo-variables.js';\nexport * from './update-episode-media-variables.js';\nexport * from './update-chapter-media-variables.js';\nexport * from './update-track-media-variables.js';\nexport * from './upload-conversation-file-variables.js';\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const UploadConversationFileVariablesSchema: z.ZodObject<{
|
|
3
|
+
conversation: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4
|
+
kind: z.ZodLiteral<"guildInvite">;
|
|
5
|
+
guildInviteId: z.ZodString;
|
|
6
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
7
|
+
kind: z.ZodLiteral<"adminSupport">;
|
|
8
|
+
adminDispatchId: z.ZodString;
|
|
9
|
+
}, z.core.$strict>], "kind">;
|
|
10
|
+
file: z.ZodCustom<File, File>;
|
|
11
|
+
onProgress: z.ZodOptional<z.ZodCustom<(state: import("@ttt-productions/media-schemas").UploadState | null) => void, (state: import("@ttt-productions/media-schemas").UploadState | null) => void>>;
|
|
12
|
+
signal: z.ZodOptional<z.ZodCustom<AbortSignal, AbortSignal>>;
|
|
13
|
+
}, z.core.$strict>;
|
|
14
|
+
export type UploadConversationFileVariables = z.infer<typeof UploadConversationFileVariablesSchema>;
|
|
15
|
+
//# sourceMappingURL=upload-conversation-file-variables.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-conversation-file-variables.d.ts","sourceRoot":"","sources":["../../src/upload-variables/upload-conversation-file-variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,qCAAqC;;;;;;;;;;;kBAKvC,CAAC;AACZ,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { onProgressSchema } from './on-progress.js';
|
|
3
|
+
import { ConversationFileRefSchema } from '../media/conversation-file-ref.js';
|
|
4
|
+
// Variables for the conversation-file upload mutation hook (MEDIA-005). The
|
|
5
|
+
// conversation ref is the strict two-kind ConversationFileRef — a guild-CHANNEL
|
|
6
|
+
// target is unrepresentable.
|
|
7
|
+
export const UploadConversationFileVariablesSchema = z.object({
|
|
8
|
+
conversation: ConversationFileRefSchema,
|
|
9
|
+
file: z.instanceof(File),
|
|
10
|
+
onProgress: onProgressSchema,
|
|
11
|
+
signal: z.instanceof(AbortSignal).optional(),
|
|
12
|
+
}).strict();
|
|
13
|
+
//# sourceMappingURL=upload-conversation-file-variables.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-conversation-file-variables.js","sourceRoot":"","sources":["../../src/upload-variables/upload-conversation-file-variables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAE9E,4EAA4E;AAC5E,gFAAgF;AAChF,6BAA6B;AAC7B,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5D,YAAY,EAAE,yBAAyB;IACvC,IAAI,EAAE,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC;IACxB,UAAU,EAAE,gBAAgB;IAC5B,MAAM,EAAE,CAAC,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,QAAQ,EAAE;CAC7C,CAAC,CAAC,MAAM,EAAE,CAAC","sourcesContent":["import { z } from 'zod';\nimport { onProgressSchema } from './on-progress.js';\nimport { ConversationFileRefSchema } from '../media/conversation-file-ref.js';\n\n// Variables for the conversation-file upload mutation hook (MEDIA-005). The\n// conversation ref is the strict two-kind ConversationFileRef — a guild-CHANNEL\n// target is unrepresentable.\nexport const UploadConversationFileVariablesSchema = z.object({\n conversation: ConversationFileRefSchema,\n file: z.instanceof(File),\n onProgress: onProgressSchema,\n signal: z.instanceof(AbortSignal).optional(),\n}).strict();\nexport type UploadConversationFileVariables = z.infer<typeof UploadConversationFileVariablesSchema>;\n"]}
|