Ana içeriğe geç

getAttributes

Tüm özellik set nesnelerini almak. Bu yöntem, tüm özellik set nesnelerini ve toplamı döndürür. Bir IAttributesSetsResponse nesnesine çözülmekte olan bir Promise döndürür.

Açıklama

  • Özellik set nesnelerinin listesini döndürmenin yanı sıra, bu yöntem aynı zamanda bu nesnelerin toplam sayısını da sağlar. Bu, geliştiricilerin ve yöneticilerin yönetilen özellik setlerinin kapsamını ve ölçeğini anlamalarına yardımcı olmak için sayfalama, raporlama ve analiz amaçları için özellikle faydalıdır.

  • Bu işlevsellik, dinamik veri modellemesinin gerekli olduğu uygulamalar için esastır. Örneğin, e-ticaret platformları, her biri kendi benzersiz özellik setine sahip farklı ürün kategorilerini tanımlamak için özellik setlerini kullanabilir; bu özellikler arasında boyut, renk, malzeme vb. yer alır. Ayrıca, farklı kullanıcı rollerinin belirgin özellik gereksinimlerine sahip olduğu kullanıcı yönetim sistemlerinde de kullanılabilir.

  • Bu yöntem, sistemin diğer bileşenleriyle sorunsuz bir şekilde entegre olacak şekilde tasarlanmış olabilir ve belirli kriterler veya iş mantığına dayalı olarak özellik setlerini filtreleme, sıralama veya dönüştürme gibi esnek veri manipülasyonu ve sunumu sağlar.

AttributesSets.getAttributes(

langCode, offset, limit, typeId, sortBy

);

Parametreler şeması

Şema

langCode: string
Dil kodu. Varsayılan: "en_US"
örnek: "en_US"

offset: number
Kayıt seçiminde parametre kaydırma. Varsayılan: 0
örnek: 0

limit: number
Kayıt seçiminde sınırlama parametresi. Varsayılan: 30
örnek: 30

typeId: number
Özellik seti türünün tanımlayıcısı. Varsayılan: null
örnek: NaN

sortBy: string
Özellik seti türünün tanımlayıcısı. Varsayılan: "id"
örnek: "id"

Varsayılan olarak, 10 nesne alabilirsiniz. Bu, modülün izin ayarlarında kayıt limitinden kaynaklanmaktadır.
Sayfalamanın doğru çalışması için, ihtiyaçlarınıza göre Modül izinlerini ilgili bölümde yapılandırmanız gerekir.

Örnekler

Minimal örnek

const response = await AttributesSets.getAttributes();

Özelliklerle örnek

const response = await AttributesSets.getAttributes('en_US', 0, 30, null, 'id');

Örnek yanıt

{
"total": 17,
"items": [
{
"id": 27,
"createdDate": "2025-10-28T13:50:27.426Z",
"updatedDate": "2025-02-26T17:18:11.275Z",
"version": 0,
"identifier": "admins",
"typeId": 1,
"title": "Yöneticiler",
"schema": {
"admin-text": {
"id": 1,
"type": "string",
"isPrice": false,
"original": true,
"isVisible": true,
"identifier": "admin-text",
"localizeInfos": {
"title": "Yönetici metni"
}
}
},
"isVisible": true,
"properties": {},
"type": {
"id": 1,
"type": "forAdmins"
},
"position": 1
},
{
"id": 20,
"createdDate": "2025-10-28T13:50:27.426Z",
"updatedDate": "2025-02-26T16:52:53.463Z",
"version": 0,
"identifier": "reg",
"typeId": 6,
"title": "Kayıt",
"schema": {
"email_reg": {
"id": 1,
"type": "string",
"isLogin": true,
"isPrice": false,
"isSignUp": false,
"original": true,
"isVisible": true,
"identifier": "email_reg",
"isPassword": false,
"validators": {
"emailInspectionValidator": true
},
"localizeInfos": {
"title": "e-posta"
},
"isNotificationEmail": false,
"isNotificationPhoneSMS": false
},
"password_reg": {
"id": 2,
"type": "string",
"isPrice": false,
"isSignUp": false,
"original": true,
"isVisible": true,
"identifier": "password_reg",
"isPassword": true,
"validators": {
"requiredValidator": {
"strict": true
},
"stringInspectionValidator": {
"stringMax": 0,
"stringMin": 0,
"stringLength": 0
}
},
"localizeInfos": {
"title": "şifre"
},
"isNotificationEmail": false,
"isNotificationPhoneSMS": false
},
"name_reg": {
"id": 3,
"type": "string",
"isPrice": false,
"isSignUp": true,
"original": true,
"isVisible": true,
"identifier": "name_reg",
"localizeInfos": {
"title": "isim"
},
"isNotificationEmail": false,
"isNotificationPhoneSMS": false
},
"phone_reg": {
"id": 4,
"type": "string",
"isPrice": false,
"isSignUp": true,
"original": true,
"isVisible": true,
"identifier": "phone_reg",
"validators": {
"requiredValidator": {
"strict": true
}
},
"localizeInfos": {
"title": "telefon"
},
"isNotificationEmail": false,
"isNotificationPhoneSMS": true
},
"email_notification_reg": {
"id": 5,
"type": "string",
"isPrice": false,
"original": true,
"isVisible": true,
"identifier": "email_notification_reg",
"localizeInfos": {
"title": "e-posta bildirim"
},
"isNotificationEmail": true
}
},
"isVisible": true,
"properties": {},
"type": {
"id": 6,
"type": "forUsers"
},
"position": 2
},
{
"id": 11,
"createdDate": "2025-10-28T13:50:27.426Z",
"updatedDate": "2025-05-05T10:41:05.287Z",
"version": 0,
"identifier": "user_form_set",
"typeId": 6,
"title": "user_form_set",
"schema": {
"name_attr": {
"id": 1,
"type": "string",
"isLogin": false,
"isPrice": false,
"original": true,
"isVisible": true,
"identifier": "name_attr",
"isPassword": false,
"localizeInfos": {
"title": "isim"
},
"isNotificationEmail": false,
"isNotificationPhoneSMS": false,
"isNotificationPhonePush": false
},
"username": {
"id": 2,
"type": "string",
"isLogin": true,
"isPrice": false,
"original": true,
"isVisible": true,
"identifier": "username",
"isPassword": false,
"localizeInfos": {
"title": "kullanıcı adı"
},
"isNotificationEmail": false,
"isNotificationPhoneSMS": false,
"isNotificationPhonePush": false
},
"password": {
"id": 3,
"type": "string",
"isPrice": false,
"original": true,
"isVisible": true,
"identifier": "password",
"isPassword": true,
"localizeInfos": {
"title": "şifre"
},
"isNotificationEmail": false,
"isNotificationPhoneSMS": false,
"isNotificationPhonePush": false
},
"phone": {
"id": 4,
"type": "string",
"isPrice": false,
"original": true,
"isVisible": true,
"identifier": "phone",
"localizeInfos": {
"title": "telefon"
},
"isNotificationEmail": false,
"isNotificationPhoneSMS": true,
"isNotificationPhonePush": true
},
"email": {
"id": 5,
"type": "string",
"isPrice": false,
"original": true,
"isVisible": true,
"identifier": "email",
"localizeInfos": {
"title": "e-posta"
},
"additionalFields": [],
"isNotificationEmail": true
}
},
"isVisible": true,
"properties": {},
"type": {
"id": 6,
"type": "forUsers"
},
"position": 3
},
"..."
]
}

Yanıt şeması

Şema: IAttributesSetsResponse

total: number
Toplam öğeler.
örnek: 100

items: IAttributeSetsEntity[]
Özellik seti varlıklarını içeren IAttributeSetsEntity dizisi.
örnek:

[
{
"id": 1,
"identifier": "set1"
},
{
"id": 2,
"identifier": "set2"
}
]