Sorci.js
    Preparing search index...

    Type Alias ToPersistEvent

    This is the structure of an event to give to the Sorci.appendEvent function

     const sourcingEvent: ToPersistEvent = {
    type: "course-created",
    data: {
    courseId: "6c811e1c-a441-4dc0-af89-b92f6e1784ed",
    name: "Maths",
    },
    identifier: {
    courseId: "6c811e1c-a441-4dc0-af89-b92f6e1784ed",
    },
    }

    await sorci.appendEvent({
    sourcingEvent
    }),
    type ToPersistEvent = {
        data: Record<string, any>;
        id?: EventId;
        identifier: Record<string, any>;
        timestamp?: Date;
        type: string;
    }
    Index

    Properties

    data: Record<string, any>
    id?: EventId

    The id of the event. If not provided, it will be generated automatically

    identifier: Record<string, any>
    timestamp?: Date

    The creation date of the event. If not provided will be generated automatically

    type: string