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

getAttributes

الحصول على جميع كائنات مجموعة السمات

AttributesSets.getAttributes(langCode, offset, limit, typeId, sortBy)

const value = await AttributesSets.getAttributes()
Schema

langCode: string
رمز اللغة
مثال: en_US

offset: number
معامل إزاحة اختيار السجلات، الافتراضي - 0
مثال: 0

limit: number
معامل يحدد عدد السجلات المختارة، الافتراضي - 30
مثال: 30

typeId: any
معرف نوع مجموعة السمات
مثال: null

sortBy: string
مفتاح الترتيب
مثال: id

تُرجع هذه الطريقة جميع كائنات مجموعات السمات والإجمالي.

مثال على الإرجاع:

{
"total": 100,
"items": [
{
"id": 1764,
"updatedDate": "2025-01-31T21:53:39.276Z",
"version": 10,
"identifier": "my_id",
"title": "مجموعة للصفحات",
"schema": {
"attribute1": {
"id": 1,
"type": "string",
"isPrice": false,
"original": true,
"identifier": "string",
"localizeInfos": {
"en_US": {
"title": "String"
}
}
}
},
"isVisible": true,
"type": {
"id": 5,
"type": "forProducts"
},
"position": 1
}
]
}
Schema

total: number
إجمالي عدد السجلات الموجودة
مثال: 100

items: Array
**

id: number
معرف الكائن
مثال: 1764

updatedDate: string($date-time)
تاريخ تعديل الكائن
مثال: ''

version: number
رقم إصدار تعديل الكائن
مثال: 10

identifier: string
معرف نصي لحقل السجل
مثال: 'my-id'

title: string
اسم مجموعة السمات
مثال: مجموعة للصفحات

schema: Record<string, string>
وصف JSON للمخطط (السمات المستخدمة من قبل المجموعة) لمجموعة السمات
مثال:

{
"attribute1": {
"id": 1,
"type": "string",
"isPrice": false,
"original": true,
"identifier": "string",
"localizeInfos": {
"en_US": { "title": "String" }
}
}
}

title: string
اسم مجموعة السمات
مثال: مجموعة للصفحات

isVisible: boolean
علامة رؤية المجموعة

type: object
كائن نوع المجموعة

position: number
رقم الموضع
مثال: 1