s-private API Documentation - v3.8.1
    Preparing search index...

    Domain event emitted when a note is created.

    Part of the event-driven architecture for cross-cutting concerns like notifications, logging, and analytics.

    const event = new NoteCreatedEvent({
    title: "Meeting Notes",
    markdown: "# Meeting Notes\n\n- Item 1",
    userId: "user-123",
    caller: "addNote",
    });

    // event.eventType === "note.created"
    await eventHandler.handle(event);

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Constructors

    • Creates a new NoteCreatedEvent.

      Parameters

      • data: { caller: string; markdown: string; title: string; userId: string }

        Event data containing note details and metadata

        • caller: string

          The function/method that triggered the event

        • markdown: string

          The markdown content

        • title: string

          The note title

        • userId: string

          The user who created the note

      Returns NoteCreatedEvent

    Properties

    eventType: string

    The type of event (e.g., "article.created")

    metadata: { caller: string; timestamp: Date; userId: string }

    Contextual information about the event

    Event-specific data