انتقل إلى المحتوى الرئيسي

getAllEvents

احصل على جميع الأحداث المتاحة. 🔐 تتطلب هذه الطريقة التفويض.

الوصف​

يجلب الأحداث المضبوطة في المشروع ويُعيد مصفوفة من كائنات IContentApiEvent.

.getAllEvents(

);

أمثلة​

مثال بسيط​

const response = await Events.getAllEvents();

مثال على الاستجابة​

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

مخطط الاستجابة​

المخطط: IContentApiEvent[]

id: number
معرّف الحدث.
مثال: 1

identifier: string
علامة الحدث.
مثال: "price_change"

localizeInfos: Record<string, unknown>
البيانات المترجمة للحدث.

module: string
الوحدة التي ينتمي إليها الحدث؛ غير موجودة في أحداث النظام غير المرتبطة بوحدة، مثل send_code.
مثال: "catalog"