AdminType


Tipo de Administrador. Esta entidad contiene valores de configuración de interfaz.

Modelo AdminType

{
    "id": 1,
    "name": "Operador de Comercio",
    "default_key": "dashboard",
    "content": [
        {
            "key": "Branch dashboard",
            "value": {
                "is_visible": false
            }
        },
        {
            "key": "map",
            "value": {
                "is_visible": false
            }
        },
        {
            "key": "orders",
            "value": {
                "is_visible": true
            },
            "default_key": "in_queue",
            "content": {
                "0.key": "in_queue",
                "0.value.is_visible": true,
                "1.key": "preparation_started",
                "1.value.is_visible": true,
                "2.key": "prepared",
                "2.value.is_visible": true,
                "3.key": "dispatched",
                "3.value.is_visible": true
            }
        },
        {
            "key": "categories",
            "value": {
                "is_visible": false
            }
        },
        {
            "key": "goods",
            "value": {
                "is_visible": true
            }
        },
        {
            "key": "attributes",
            "value": {
                "is_visible": false
            }
        },
        {
            "key": "company",
            "value": {
                "is_visible": false
            }
        },
        {
            "key": "reports",
            "value": {
                "is_visible": false
            }
        }
    ],
    "created_at": "2020-06-09 19:40:57",
    "updated_at": "2024-12-11 18:02:48",
    "code": 1,
    "roles": [
        {
            "id": 626,
            "role": "access_clients-management",
            "created_at": "2025-02-28 20:28:20",
            "updated_at": "2025-02-28 20:28:20",
            "admin_type_id": 1
        },
        {
            "id": 249,
            "role": "access_dashboard",
            "created_at": "2024-12-11 18:02:48",
            "updated_at": "2024-12-11 18:02:48",
            "admin_type_id": 1
        },
        {
            "id": 250,
            "role": "access_map",
            "created_at": "2024-12-11 18:02:48",
            "updated_at": "2024-12-11 18:02:48",
            "admin_type_id": 1
        },
        {
            "id": 627,
            "role": "access_settings",
            "created_at": "2025-02-28 20:28:20",
            "updated_at": "2025-02-28 20:28:20",
            "admin_type_id": 1
        }
    ],
    "uid": 1
}
Atributo Tipo Descripción
id int -
name string -
default_key string -
content array -
created_at datetime\|null -
updated_at datetime\|null -
code int\|null -

Insertar AdminType

Método URI Cabeceras
POST /companies/{companyId}/admin-types Authorization
{
    "name": "required|string|max:32",
    "code": "integer",
    "default_key": "required|string|max:32",
    "content": [
        {
            "key": "string|max:32",
            "value": "",
            "default_key": "string|max:32",
            "content": [
                {
                    "key": "string|max:32",
                    "value": ""
                }
            ]
        }
    ],
    "roles": [
        {
            "string": true,
            "regex": "/^(access|can)\_.+$/"
        }
    ]
}

Listar AdminType

{info} Soporta: Paginación Filters Carga dinámica

Método URI Cabeceras
GET /companies/{companyId}/admin-types Authorization

Mostrar AdminType

{info} Soporta: Carga dinámica

Método URI Cabeceras
GET /companies/{companyId}/admin-types/{adminTypeId} Authorization

Actualizar AdminType

Método URI Cabeceras
PATCH /companies/{companyId}/admin-types/{adminTypeId} Authorization
{
    "name": "string|max:32",
    "code": "integer",
    "default_key": "string|max:32",
    "content": [
        {
            "key": "string|max:32",
            "value": "",
            "default_key": "string|max:32",
            "content": [
                {
                    "key": "string|max:32",
                    "value": ""
                }
            ]
        }
    ],
    "roles": [
        {
            "string": true,
            "regex": "/^(access|can)\_.+$/"
        }
    ]
}

Vincular AdminType

Vincular Role

Método URI Cabeceras
POST /companies/{companyId}/admin-types/{adminTypeId}/roles Authorization
[
    "string"
]

Desvincular AdminType

Desvincular Role

Método URI Cabeceras
DELETE /companies/{companyId}/admin-types/{adminTypeId}/roles Authorization
[
    "string"
]

Eliminar AdminType

Método URI Cabeceras
DELETE /companies/{companyId}/admin-types/{adminTypeId} Authorization

Enlaces de AdminType