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

getAllTypes

الحصول على جميع الأنواع.

Description​

تسترجع هذه الطريقة جميع الكائنات من نوع GeneralTypeEntity من واجهة برمجة التطبيقات (API). تعيد Promise التي تحل إلى مصفوفة من كائنات GeneralTypeEntity.

.getAllTypes();

Examples​

Minimal example​

const response = await GeneralTypes.getAllTypes();

Example response​

[
{
"id": 20,
"type": "service"
},
{
"id": 1,
"type": "product"
},
{
"id": 3,
"type": "error_page"
},
"..."
]

Response schema​

Schema: IGeneralTypesEntity[]

id: number
معرف النوع.
مثال: 1

type: BlockType
تعداد الأنواع.
مثال: "product", "category", "etc"