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

getAllEvents

احصل على جميع الأحداث المتاحة.

الوصف

ترجع هذه الطريقة جميع الأحداث المتاحة في المشروع. ترجع Promise التي تحل إلى مصفوفة من كائنات 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
الوحدة التي ينتمي إليها الحدث.
مثال: "catalog"