Lewati ke konten utama

getAllEvents

Ambil semua acara yang tersedia.

Deskripsi

Metode ini mengembalikan semua acara yang tersedia dalam proyek. Ini mengembalikan sebuah Promise yang menyelesaikan menjadi array dari objek IContentApiEvent.

Events.getAllEvents(

);

Contoh

Contoh minimal

const response = await Events.getAllEvents();

Contoh respons

[
{
"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"
}
]

Skema respons

Skema: IContentApiEvent[]

id: number
Identifikasi acara.
contoh: 1

identifier: string
Identifikasi teks acara.
contoh: "price_change"

localizeInfos: Record<string, unknown>
Info terlokalisasi dari acara.

module: string
Modul yang menjadi bagian dari acara.
contoh: "catalog"