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

    Domain event emitted when an image is created.

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

    const event = new ImageCreatedEvent({
    id: "01912c9a-5e8a-7b5c-8a1b-2c3d4e5f6a7b",
    path: "image.jpg",
    userId: "user-123",
    caller: "addImage",
    });

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

    Hierarchy (View Summary)

    Index
    • Creates a new ImageCreatedEvent.

      Parameters

      • data: { caller: string; id: string; path: string; userId: string }

        Event data containing image details and metadata

        • caller: string

          The function/method that triggered the event

        • id: string

          The image ID

        • path: string

          The image storage path

        • userId: string

          The user who created the image

      Returns ImageCreatedEvent

    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