getAttributeSetByMarker
الحصول على مجموعة سمات واحدة حسب علامتها.
الوصف
يجلب مجموعة سمات حسب علامتها، بما في ذلك مخططها. يُعيد IAttributeSetsEntity.
.getAttributeSetByMarker(
,
);
مخطط المعلمات
المخطط
marker(required): string
علامة مجموعة السمات.
مثال: "productAttributes"
langCode: string
رمز اللغة. الافتراضي: langCode المُمرَّر إلى defineOneEntry ("en_US" إذا لم يُمرَّر).
مثال: "en_US"
أمثلة
مثال بسيط
const response = await AttributesSets.getAttributeSetByMarker('admins');
مثال مع langCode
const response = await AttributesSets.getAttributeSetByMarker('admins', 'en_US');
مثال على الاستجابة
{
"id": 27,
"createdDate": "2025-10-28T13:50:27.426Z",
"updatedDate": "2025-02-26T17:18:11.275Z",
"version": 0,
"identifier": "admins",
"title": "Admins",
"schema": {
"admin-text": {
"id": 1,
"type": "string",
"original": true,
"isVisible": true,
"identifier": "admin-text",
"initialValue": null,
"localizeInfos": {
"title": "Admins text"
}
}
},
"isVisible": true,
"type": {
"id": 1,
"type": "forAdmins"
},
"position": 1
}
مخطط الاستجابة
المخطط: IAttributeSetsEntity
id: number
معرّف مجموعة السمات.
مثال: 123
createdDate: string
تاريخ إنشاء مجموعة السمات.
مثال: "2023-10-01T12:00:00Z"
updatedDate: string
تاريخ آخر تحديث لمجموعة السمات.
مثال: "2023-10-01T12:00:00Z"
version: number
رقم إصدار مجموعة السمات؛ يتغير مع كل تحديث.
مثال: 1
identifier: string
علامة مجموعة السمات.
مثال: "attributeSet1"
title: string
اسم مجموعة السمات.
مثال: "Product Attributes"
schema: Record<string, IAttributeSchemaItem>
حقول المخطط المفاتيح حسب العلامة.
مثال:
{
"attribute1": {
"id": 1,
"type": "string",
"isPrice": false,
"original": true,
"identifier": "string",
"localizeInfos": {
"title": "String"
}
}
}
isVisible: boolean
هل مجموعة السمات ظاهرة.
مثال: true
type: IAttributeSetTypeRef
نوع مجموعة السمات: كائن يحتوي على معرّف النوع واسمه.
مثال:
{ "id": 1, "type": "forProducts" }
type.id: number
معرّف النوع الداخلي.
مثال: 1
type.type: string
معرّف النوع (مثل "forAdmins" أو "forForms" أو "forProducts").
مثال: "forAdmins"
position: number
موضع ترتيب المجموعة (مكانها في ترتيب sortBy=position)؛ ثابت عبر الطلبات، وليس الفهرس في المصفوفة المُرجَعة.
مثال: 1