Ana içeriğe geç

getAllEvents

Get all available events.

Description

This method returns all events available in the project. It returns a Promise that resolves to an array of IContentApiEvent objects.

Events.getAllEvents(

);

Examples

Minimal example

const response = await Events.getAllEvents();

Example response

[
{
"id": 4,
"identifier": "send_code",
"localizeInfos": {
"title": "Code"
}
},
{
"id": 3,
"identifier": "registration_event",
"localizeInfos": {
"title": "Registration"
}
},
{
"id": 2,
"identifier": "lessPrice",
"localizeInfos": {
"title": "less price"
},
"module": "catalog"
}
]

Response schema

Schema: IContentApiEvent[]

id: number
Event identifier.
example: 1

identifier: string
Event text identifier.
example: "price_change"

localizeInfos: Record<string, unknown>
Localized info of the event.

module: string
Module the event belongs to.
example: "catalog"