getAttributes
Obteniendo todos los objetos de conjuntos de atributos.
AttributesSets?.getAttributes( langCode?, offset?, limit?, typeId?, sortBy? );
Ejemplo mínimo
const value = await AttributesSets.getAttributes()
Esquema
langCode: string
Código de idioma. Por defecto: "en_US"
ejemplo: "en_US"
limit: number
parámetro que limita la selección de registros. Por defecto: 30
ejemplo: 30
offset: number
parámetro de desplazamiento de la selección de registros. Por defecto: 0
ejemplo: 0
typeId: number
identificador del tipo de conjunto de atributos. Por defecto: null
ejemplo: NaN
sortBy: string
identificador del tipo de conjunto de atributos. Por defecto: "id"
ejemplo: "id"
Este método devuelve todos los objetos de conjuntos de atributos y el total.
Ejemplo de respuesta
{
"total": 16,
"items": [
{
"id": 27,
"updatedDate": "2025-02-26T17:18:11.275Z",
"version": 0,
"identifier": "admins",
"typeId": 1,
"title": "Admins",
"schema": {
"admin-text": {
"id": 1,
"type": "string",
"isPrice": false,
"original": true,
"isVisible": true,
"identifier": "admin-text",
"localizeInfos": {
"title": "Texto de administradores"
}
}
},
"isVisible": true,
"properties": {},
"type": {
"id": 1,
"type": "forAdmins"
},
"position": 1
},
{
"id": 22,
"updatedDate": "2025-03-23T12:23:56.420Z",
"version": 0,
"identifier": "block",
"typeId": 2,
"title": "Bloque",
"schema": {
"block-text": {
"id": 1,
"type": "string",
"isPrice": false,
"original": true,
"isVisible": true,
"identifier": "block-text",
"localizeInfos": {
"title": "Texto del bloque"
}
},
"interval": {
"id": 2,
"type": "timeInterval",
"isPrice": false,
"original": true,
"isVisible": true,
"identifier": "interval",
"localizeInfos": {
"title": "Intervalo",
"intervals": [
{
"id": "c6466cd8-c55d-4583-97c5-42b684210f12",
"range": [],
"external": [],
"fullMonth": 2,
"intervals": [
{
"id": "ab0e3e90-8153-4679-aea4-198c5022f8d4",
"end": {
"hours": 19,
"minutes": 0
},
"start": {
"hours": 9,
"minutes": 0
},
"period": 60
}
],
"inEveryMonth": true,
"selectedYear": 2025
}
]
}
}
},
"isVisible": true,
"properties": {},
"type": {
"id": 2,
"type": "forBlocks"
},
"position": 2
},
{
"id": 17,
"updatedDate": "2025-02-26T16:25:01.688Z",
"version": 0,
"identifier": "page",
"typeId": 4,
"title": "Página",
"schema": {
"text": {
"id": 1,
"type": "string",
"isPrice": false,
"original": true,
"isVisible": true,
"identifier": "text",
"localizeInfos": {
"title": "texto"
}
},
"number": {
"id": 2,
"type": "integer",
"isPrice": false,
"original": true,
"isVisible": true,
"identifier": "number",
"localizeInfos": {
"title": "Número"
}
},
"real": {
"id": 3,
"type": "real",
"isPrice": false,
"original": true,
"isVisible": true,
"identifier": "real",
"localizeInfos": {
"title": "Real"
}
},
"float": {
"id": 4,
"type": "float",
"isPrice": false,
"original": true,
"isVisible": true,
"identifier": "float",
"localizeInfos": {
"title": "Flotante"
}
}
},
"isVisible": true,
"properties": {},
"type": {
"id": 4,
"type": "forPages"
},
"position": 3
},
"..."
]
}
Esquema de respuesta
Esquema
total: number
Total de elementos.
ejemplo: 100
items: IAttributeSetsEntity[]
Array de IAttributeSetsEntity que contiene entidades de conjuntos de atributos.
ejemplo:
[
{
"id": 1,
"identifier": "set1"
},
{
"id": 2,
"identifier": "set2"
}
]