ConusAI vendor v0.1.0-dev.20261027+9b1131fb
ci / gate (push) Waiting to run

This commit is contained in:
ConusAI vendor v0.1.0-dev.20261027+9b1131fb
2026-10-27 18:05:17 +00:00
commit 3102273ec7
538 changed files with 80203 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
// The module's domain events (spec §8). Each is written to the outbox by the transaction that made
// the change, so a rolled-back write publishes nothing and the relay delivers it exactly once per
// subscriber. The audit event and the usage fact of this module hang off these records, not off
// the request that happened to run (core/subscribers.ts).
import { defineEvent } from "@conusai-kit/core"
import { z } from "zod"
const inProject = { orgId: z.string(), workspaceId: z.string(), projectId: z.string() }
export const noteCreated = defineEvent(
"notes.NoteCreated",
z.object({ ...inProject, noteId: z.string(), createdBy: z.string() }),
)
export const noteUpdated = defineEvent(
"notes.NoteUpdated",
z.object({ ...inProject, noteId: z.string(), version: z.number().int(), updatedBy: z.string() }),
)
export const noteDeleted = defineEvent(
"notes.NoteDeleted",
z.object({ ...inProject, noteId: z.string(), deletedBy: z.string(), attachmentCount: z.number().int() }),
)
export const attachmentAdded = defineEvent(
"notes.AttachmentAdded",
z.object({ ...inProject, noteId: z.string(), attachmentId: z.string(), fileId: z.string(), attachedBy: z.string() }),
)
export const attachmentRemoved = defineEvent(
"notes.AttachmentRemoved",
z.object({
...inProject,
noteId: z.string(),
attachmentId: z.string(),
fileId: z.string(),
removedBy: z.string(),
}),
)
/** Every event this module publishes, for the manifest. */
export const NOTES_EVENTS = [noteCreated, noteUpdated, noteDeleted, attachmentAdded, attachmentRemoved]