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 }), Copy
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 }),
Optional
The id of the event. If not provided, it will be generated automatically
The creation date of the event. If not provided will be generated automatically
This is the structure of an event to give to the Sorci.appendEvent function
Example