{
    "openapi": "3.1.2",
    "info": {
        "title": "Laravel",
        "version": "0.0.1"
    },
    "servers": [
        {
            "url": "https:\/\/devchat.lifemedia.id\/api"
        }
    ],
    "paths": {
        "\/admin\/agents": {
            "get": {
                "operationId": "admin.agents.index",
                "summary": "List live chat agents, optionally filtered",
                "tags": [
                    "Agent"
                ],
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 100
                        }
                    },
                    {
                        "name": "agent_type",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "enum": [
                                "HD",
                                "CCARE",
                                null
                            ]
                        }
                    },
                    {
                        "name": "is_active",
                        "in": "query",
                        "schema": {
                            "type": [
                                "boolean",
                                "null"
                            ]
                        }
                    },
                    {
                        "name": "group_id",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "user_id": {
                                                        "type": "integer"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "email": {
                                                        "type": "string"
                                                    },
                                                    "role": {
                                                        "type": "string"
                                                    },
                                                    "user_is_active": {
                                                        "type": "boolean"
                                                    },
                                                    "password_expired_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "agent_type": {
                                                        "type": "string"
                                                    },
                                                    "agent_icon": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "is_active": {
                                                        "type": "boolean"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "groups": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "properties": {
                                                                "id": {
                                                                    "type": "integer"
                                                                },
                                                                "code": {
                                                                    "type": "string"
                                                                },
                                                                "name": {
                                                                    "type": "string"
                                                                },
                                                                "group_type": {
                                                                    "type": "string"
                                                                }
                                                            },
                                                            "required": [
                                                                "id",
                                                                "code",
                                                                "name",
                                                                "group_type"
                                                            ]
                                                        }
                                                    },
                                                    "created_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "updated_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "user_id",
                                                    "name",
                                                    "email",
                                                    "role",
                                                    "user_is_active",
                                                    "password_expired_at",
                                                    "agent_type",
                                                    "agent_icon",
                                                    "is_active",
                                                    "status",
                                                    "groups",
                                                    "created_at",
                                                    "updated_at"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "admin.agents.store",
                "summary": "Create a user account together with its live chat agent profile",
                "tags": [
                    "Agent"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "email": {
                                        "type": "string",
                                        "format": "email",
                                        "maxLength": 255
                                    },
                                    "password": {
                                        "type": "string"
                                    },
                                    "role": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "ADMIN",
                                            "MANAGER",
                                            "SUPERVISOR",
                                            "AGENT",
                                            null
                                        ]
                                    },
                                    "agent_type": {
                                        "type": "string",
                                        "enum": [
                                            "HD",
                                            "CCARE"
                                        ]
                                    },
                                    "agent_icon": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "is_active": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "group_ids": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "integer"
                                        }
                                    },
                                    "reason": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "name",
                                    "email",
                                    "password",
                                    "agent_type"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "user_id": {
                                                    "type": "integer"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "email": {
                                                    "type": "string"
                                                },
                                                "role": {
                                                    "type": "string"
                                                },
                                                "user_is_active": {
                                                    "type": "boolean"
                                                },
                                                "password_expired_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "agent_type": {
                                                    "type": "string"
                                                },
                                                "agent_icon": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "is_active": {
                                                    "type": "boolean"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "groups": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "code": {
                                                                "type": "string"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "group_type": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "code",
                                                            "name",
                                                            "group_type"
                                                        ]
                                                    }
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "updated_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "user_id",
                                                "name",
                                                "email",
                                                "role",
                                                "user_is_active",
                                                "password_expired_at",
                                                "agent_type",
                                                "agent_icon",
                                                "is_active",
                                                "status",
                                                "groups",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/agents\/{agent}": {
            "get": {
                "operationId": "admin.agents.show",
                "summary": "Show a single agent",
                "tags": [
                    "Agent"
                ],
                "parameters": [
                    {
                        "name": "agent",
                        "in": "path",
                        "required": true,
                        "description": "The agent ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "user_id": {
                                                    "type": "integer"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "email": {
                                                    "type": "string"
                                                },
                                                "role": {
                                                    "type": "string"
                                                },
                                                "user_is_active": {
                                                    "type": "boolean"
                                                },
                                                "password_expired_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "agent_type": {
                                                    "type": "string"
                                                },
                                                "agent_icon": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "is_active": {
                                                    "type": "boolean"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "groups": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "code": {
                                                                "type": "string"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "group_type": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "code",
                                                            "name",
                                                            "group_type"
                                                        ]
                                                    }
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "updated_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "user_id",
                                                "name",
                                                "email",
                                                "role",
                                                "user_is_active",
                                                "password_expired_at",
                                                "agent_type",
                                                "agent_icon",
                                                "is_active",
                                                "status",
                                                "groups",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "put": {
                "operationId": "admin.agents.update",
                "summary": "Update the agent profile and its underlying user account directly",
                "tags": [
                    "Agent"
                ],
                "parameters": [
                    {
                        "name": "agent",
                        "in": "path",
                        "required": true,
                        "description": "The agent ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "email": {
                                        "type": "string",
                                        "format": "email",
                                        "maxLength": 255
                                    },
                                    "password": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "role": {
                                        "type": "string",
                                        "enum": [
                                            "ADMIN",
                                            "SUPERVISOR",
                                            "AGENT",
                                            "MANAGER"
                                        ]
                                    },
                                    "agent_type": {
                                        "type": "string",
                                        "enum": [
                                            "HD",
                                            "CCARE"
                                        ]
                                    },
                                    "agent_icon": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "is_active": {
                                        "type": "boolean"
                                    },
                                    "group_ids": {
                                        "type": "array",
                                        "items": {
                                            "type": "integer"
                                        }
                                    },
                                    "reason": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 1000
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "user_id": {
                                                    "type": "integer"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "email": {
                                                    "type": "string"
                                                },
                                                "role": {
                                                    "type": "string"
                                                },
                                                "user_is_active": {
                                                    "type": "boolean"
                                                },
                                                "password_expired_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "agent_type": {
                                                    "type": "string"
                                                },
                                                "agent_icon": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "is_active": {
                                                    "type": "boolean"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "groups": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "code": {
                                                                "type": "string"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "group_type": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "code",
                                                            "name",
                                                            "group_type"
                                                        ]
                                                    }
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "updated_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "user_id",
                                                "name",
                                                "email",
                                                "role",
                                                "user_is_active",
                                                "password_expired_at",
                                                "agent_type",
                                                "agent_icon",
                                                "is_active",
                                                "status",
                                                "groups",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "delete": {
                "operationId": "admin.agents.destroy",
                "summary": "Delete the agent profile and its user account",
                "tags": [
                    "Agent"
                ],
                "parameters": [
                    {
                        "name": "agent",
                        "in": "path",
                        "required": true,
                        "description": "The agent ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "reason",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Pastikan semua room chat yang melibatkan agent sudah resolved."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Akun agent harus dinonaktifkan terlebih dahulu."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/agents\/{agent}\/groups": {
            "put": {
                "operationId": "admin.agents.groups",
                "summary": "Replace the agent's group memberships",
                "tags": [
                    "Agent"
                ],
                "parameters": [
                    {
                        "name": "agent",
                        "in": "path",
                        "required": true,
                        "description": "The agent ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "group_ids": {
                                        "type": "array",
                                        "items": {
                                            "type": "integer"
                                        }
                                    },
                                    "reason": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "group_ids"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "user_id": {
                                                    "type": "integer"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "email": {
                                                    "type": "string"
                                                },
                                                "role": {
                                                    "type": "string"
                                                },
                                                "user_is_active": {
                                                    "type": "boolean"
                                                },
                                                "password_expired_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "agent_type": {
                                                    "type": "string"
                                                },
                                                "agent_icon": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "is_active": {
                                                    "type": "boolean"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "groups": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "code": {
                                                                "type": "string"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "group_type": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "code",
                                                            "name",
                                                            "group_type"
                                                        ]
                                                    }
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "updated_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "user_id",
                                                "name",
                                                "email",
                                                "role",
                                                "user_is_active",
                                                "password_expired_at",
                                                "agent_type",
                                                "agent_icon",
                                                "is_active",
                                                "status",
                                                "groups",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/web\/agent-activity-logs": {
            "get": {
                "operationId": "web.agent-activity-logs",
                "description": "MANAGER sees activity logs for agents that share at least one\ngroup with them.",
                "summary": "GET \/api\/web\/agent-activity-logs",
                "tags": [
                    "AgentActivityLog"
                ],
                "parameters": [
                    {
                        "name": "action_type",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "enum": [
                                "PASSWORD_CHANGE",
                                null
                            ]
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "title": {
                                                                "type": "string"
                                                            },
                                                            "description": {
                                                                "type": "string"
                                                            },
                                                            "action_type": {
                                                                "type": "string"
                                                            },
                                                            "user": {
                                                                "type": [
                                                                    "object",
                                                                    "null"
                                                                ],
                                                                "properties": {
                                                                    "id": {
                                                                        "type": "integer"
                                                                    },
                                                                    "name": {
                                                                        "type": "string"
                                                                    },
                                                                    "email": {
                                                                        "type": "string"
                                                                    },
                                                                    "role": {
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "id",
                                                                    "name",
                                                                    "email",
                                                                    "role"
                                                                ]
                                                            },
                                                            "performed_by": {
                                                                "type": [
                                                                    "object",
                                                                    "null"
                                                                ],
                                                                "properties": {
                                                                    "id": {
                                                                        "type": "integer"
                                                                    },
                                                                    "name": {
                                                                        "type": "string"
                                                                    },
                                                                    "email": {
                                                                        "type": "string"
                                                                    },
                                                                    "role": {
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "id",
                                                                    "name",
                                                                    "email",
                                                                    "role"
                                                                ]
                                                            },
                                                            "metadata": {
                                                                "type": [
                                                                    "array",
                                                                    "null"
                                                                ],
                                                                "items": {}
                                                            },
                                                            "ip_address": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "created_at": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "title",
                                                            "description",
                                                            "action_type",
                                                            "user",
                                                            "performed_by",
                                                            "metadata",
                                                            "ip_address",
                                                            "created_at"
                                                        ]
                                                    }
                                                },
                                                "meta": {
                                                    "type": "object",
                                                    "properties": {
                                                        "current_page": {
                                                            "type": "integer"
                                                        },
                                                        "last_page": {
                                                            "type": "integer"
                                                        },
                                                        "per_page": {
                                                            "type": "integer"
                                                        },
                                                        "total": {
                                                            "type": "integer"
                                                        },
                                                        "from": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        "to": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        "has_more": {
                                                            "type": "boolean"
                                                        }
                                                    },
                                                    "required": [
                                                        "current_page",
                                                        "last_page",
                                                        "per_page",
                                                        "total",
                                                        "from",
                                                        "to",
                                                        "has_more"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data",
                                                "meta"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    },
                                                    "minItems": 0,
                                                    "maxItems": 0
                                                },
                                                "meta": {
                                                    "type": "object",
                                                    "properties": {
                                                        "current_page": {
                                                            "type": "integer",
                                                            "const": 1
                                                        },
                                                        "last_page": {
                                                            "type": "integer",
                                                            "const": 1
                                                        },
                                                        "per_page": {
                                                            "type": "integer"
                                                        },
                                                        "total": {
                                                            "type": "integer",
                                                            "const": 0
                                                        },
                                                        "from": {
                                                            "type": "null"
                                                        },
                                                        "to": {
                                                            "type": "null"
                                                        },
                                                        "has_more": {
                                                            "type": "boolean"
                                                        }
                                                    },
                                                    "required": [
                                                        "current_page",
                                                        "last_page",
                                                        "per_page",
                                                        "total",
                                                        "from",
                                                        "to",
                                                        "has_more"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data",
                                                "meta"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Hanya manager yang dapat mengakses riwayat ini."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/agent\/dashboard": {
            "get": {
                "operationId": "agent.dashboard",
                "description": "1. Total room chat per agent (rooms where the agent sent >= 1 message).\n2. First Response Time: total first-response minutes \/ total chat rooms.\n   First response = first agent message after the first customer message.\n3. Incoming (customer) & outgoing (agent) messages, overall and per agent.\n\nWhen `agent_id` is provided every metric is scoped to that agent.",
                "summary": "Agent dashboard metrics",
                "tags": [
                    "AgentDashboard"
                ],
                "parameters": [
                    {
                        "name": "agent_id",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "period": {
                                            "type": "object",
                                            "properties": {
                                                "label": {
                                                    "type": "string"
                                                },
                                                "date_from": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "date_to": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "timezone": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "label",
                                                "date_from",
                                                "date_to",
                                                "timezone"
                                            ]
                                        },
                                        "agent_id": {
                                            "type": [
                                                "integer",
                                                "null"
                                            ]
                                        },
                                        "summary": {
                                            "type": "object",
                                            "properties": {
                                                "total_rooms": {
                                                    "type": "integer"
                                                },
                                                "total_agents": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "first_response_time": {
                                                    "type": "object",
                                                    "properties": {
                                                        "average_minutes": {
                                                            "type": "number"
                                                        },
                                                        "total_minutes": {
                                                            "type": "number"
                                                        },
                                                        "rooms_with_response": {
                                                            "type": "integer",
                                                            "minimum": 0
                                                        },
                                                        "total_rooms": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "average_minutes",
                                                        "total_minutes",
                                                        "rooms_with_response",
                                                        "total_rooms"
                                                    ]
                                                },
                                                "messages": {
                                                    "type": "object",
                                                    "properties": {
                                                        "incoming": {
                                                            "type": "integer"
                                                        },
                                                        "outgoing": {
                                                            "type": "integer"
                                                        },
                                                        "total": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "incoming",
                                                        "outgoing",
                                                        "total"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "total_rooms",
                                                "total_agents",
                                                "first_response_time",
                                                "messages"
                                            ]
                                        },
                                        "rooms_per_agent": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "agent_id": {
                                                        "type": "integer"
                                                    },
                                                    "agent_name": {
                                                        "type": "string"
                                                    },
                                                    "total_rooms": {
                                                        "type": "integer"
                                                    }
                                                },
                                                "required": [
                                                    "agent_id",
                                                    "agent_name",
                                                    "total_rooms"
                                                ]
                                            }
                                        },
                                        "messages_per_agent": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "agent_id": {
                                                        "type": "integer"
                                                    },
                                                    "agent_name": {
                                                        "type": "string"
                                                    },
                                                    "incoming": {
                                                        "type": "integer"
                                                    },
                                                    "outgoing": {
                                                        "type": "integer"
                                                    },
                                                    "total": {
                                                        "type": "integer"
                                                    }
                                                },
                                                "required": [
                                                    "agent_id",
                                                    "agent_name",
                                                    "incoming",
                                                    "outgoing",
                                                    "total"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "period",
                                        "agent_id",
                                        "summary",
                                        "rooms_per_agent",
                                        "messages_per_agent"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/agent\/dashboard\/agents": {
            "get": {
                "operationId": "agent.dashboard.agents",
                "summary": "List agents (users) available for filtering the dashboard",
                "tags": [
                    "AgentDashboard"
                ],
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 100
                        }
                    },
                    {
                        "name": "is_active",
                        "in": "query",
                        "schema": {
                            "type": [
                                "boolean",
                                "null"
                            ]
                        }
                    },
                    {
                        "name": "group_id",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "user_id": {
                                                        "type": "integer"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "email": {
                                                        "type": "string"
                                                    },
                                                    "agent_type": {
                                                        "type": "string"
                                                    },
                                                    "agent_icon": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "is_active": {
                                                        "type": "boolean"
                                                    },
                                                    "groups": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "properties": {
                                                                "id": {
                                                                    "type": "integer"
                                                                },
                                                                "code": {
                                                                    "type": "string"
                                                                },
                                                                "name": {
                                                                    "type": "string"
                                                                }
                                                            },
                                                            "required": [
                                                                "id",
                                                                "code",
                                                                "name"
                                                            ]
                                                        }
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "user_id",
                                                    "name",
                                                    "email",
                                                    "agent_type",
                                                    "agent_icon",
                                                    "is_active",
                                                    "groups"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/audit-logs": {
            "get": {
                "operationId": "admin.audit-logs.index",
                "summary": "List audit logs of every activity, newest first",
                "tags": [
                    "AuditLog"
                ],
                "parameters": [
                    {
                        "name": "action",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 60
                        }
                    },
                    {
                        "name": "entity_type",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 60
                        }
                    },
                    {
                        "name": "entity_id",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ]
                        }
                    },
                    {
                        "name": "actor_user_id",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ]
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 100
                        }
                    },
                    {
                        "name": "date_from",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "format": "date-time"
                        }
                    },
                    {
                        "name": "date_to",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "format": "date-time"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "action": {
                                                        "type": "string"
                                                    },
                                                    "entity_type": {
                                                        "type": "string"
                                                    },
                                                    "entity_id": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "reason": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "metadata": {
                                                        "type": [
                                                            "array",
                                                            "null"
                                                        ],
                                                        "items": {}
                                                    },
                                                    "actor": {
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "email": {
                                                                "type": "string"
                                                            },
                                                            "role": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "name",
                                                            "email",
                                                            "role"
                                                        ]
                                                    },
                                                    "actor_user_id": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "created_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "action",
                                                    "entity_type",
                                                    "entity_id",
                                                    "reason",
                                                    "metadata",
                                                    "actor",
                                                    "actor_user_id",
                                                    "created_at"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "has_more": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "last_page",
                                                "per_page",
                                                "total",
                                                "from",
                                                "to",
                                                "has_more"
                                            ]
                                        },
                                        "filters_applied": {
                                            "type": "object",
                                            "properties": {
                                                "action": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "entity_type": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "entity_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "actor_user_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "date_from": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "date_to": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "q": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "action",
                                                "entity_type",
                                                "entity_id",
                                                "actor_user_id",
                                                "date_from",
                                                "date_to",
                                                "q"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta",
                                        "filters_applied"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/audit-logs\/actions": {
            "get": {
                "operationId": "admin.audit-logs.actions",
                "summary": "List distinct actions with their total, used to build filter options",
                "tags": [
                    "AuditLog"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "action": {
                                                        "type": "string"
                                                    },
                                                    "total": {
                                                        "type": "integer"
                                                    }
                                                },
                                                "required": [
                                                    "action",
                                                    "total"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/audit-logs\/{auditLog}": {
            "get": {
                "operationId": "admin.audit-logs.show",
                "summary": "Show a single audit log entry",
                "tags": [
                    "AuditLog"
                ],
                "parameters": [
                    {
                        "name": "auditLog",
                        "in": "path",
                        "required": true,
                        "description": "The audit log ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "action": {
                                                    "type": "string"
                                                },
                                                "entity_type": {
                                                    "type": "string"
                                                },
                                                "entity_id": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "reason": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "metadata": {
                                                    "type": [
                                                        "array",
                                                        "null"
                                                    ],
                                                    "items": {}
                                                },
                                                "actor": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "email": {
                                                            "type": "string"
                                                        },
                                                        "role": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "name",
                                                        "email",
                                                        "role"
                                                    ]
                                                },
                                                "actor_user_id": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "action",
                                                "entity_type",
                                                "entity_id",
                                                "reason",
                                                "metadata",
                                                "actor",
                                                "actor_user_id",
                                                "created_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/web\/change-password": {
            "post": {
                "operationId": "web.change-password",
                "summary": "Allow the authenticated user (AGENT \/ SUPERVISOR \/ MANAGER) to change\ntheir own password.  Admins already have PUT \/api\/web\/profile",
                "tags": [
                    "ChangePassword"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "current_password": {
                                        "type": "string"
                                    },
                                    "password": {
                                        "type": "string"
                                    },
                                    "password_confirmation": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "current_password",
                                    "password",
                                    "password_confirmation"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Kata sandi berhasil diubah."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Akun tidak aktif."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/chat\/messages": {
            "post": {
                "operationId": "chatMessage.store",
                "tags": [
                    "ChatMessage"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart\/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "chat_room_id": {
                                        "type": "integer"
                                    },
                                    "session_id": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ]
                                    },
                                    "text": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "image": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "binary",
                                        "contentMediaType": "application\/octet-stream",
                                        "description": "Maximum file size: 5120 kilobytes."
                                    }
                                },
                                "required": [
                                    "chat_room_id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "dispatched": {
                                            "type": "string",
                                            "const": "chat.message.sent"
                                        },
                                        "message_id": {
                                            "type": "integer"
                                        },
                                        "message_type": {
                                            "type": "string"
                                        },
                                        "media_url": {
                                            "type": "null"
                                        },
                                        "channels": {
                                            "type": "array",
                                            "items": {}
                                        }
                                    },
                                    "required": [
                                        "dispatched",
                                        "message_id",
                                        "message_type",
                                        "media_url",
                                        "channels"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Anda tidak memiliki akses ke room ini."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/chat\/pending-rating": {
            "get": {
                "operationId": "chat.pending-rating",
                "description": "Returns the most-recently resolved session that has not been rated or\nskipped and was resolved within the last 24 hours.",
                "summary": "Check whether the customer has a resolved session awaiting a rating",
                "tags": [
                    "ChatRating"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "has_pending": {
                                                    "type": "boolean"
                                                },
                                                "data": {
                                                    "type": "object",
                                                    "properties": {
                                                        "session_id": {
                                                            "type": "integer"
                                                        },
                                                        "room_id": {
                                                            "type": "integer"
                                                        },
                                                        "resolved_at": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "session_id",
                                                        "room_id",
                                                        "resolved_at"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "has_pending",
                                                "data"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "has_pending": {
                                                    "type": "boolean"
                                                },
                                                "data": {
                                                    "type": "null"
                                                }
                                            },
                                            "required": [
                                                "has_pending",
                                                "data"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/chat\/sessions\/{session}\/rating": {
            "get": {
                "operationId": "chat.sessions.rating.show",
                "description": "Useful for the admin dashboard to display rating status,\nor for mobile apps as a fallback check.",
                "summary": "Check whether a session has been rated",
                "tags": [
                    "ChatRating"
                ],
                "parameters": [
                    {
                        "name": "session",
                        "in": "path",
                        "required": true,
                        "description": "The session ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "session_id": {
                                            "type": "integer"
                                        },
                                        "status": {
                                            "type": "string"
                                        },
                                        "is_rated": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "type": [
                                                "object",
                                                "null"
                                            ],
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "rating": {
                                                    "type": "integer"
                                                },
                                                "feedback": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "submitted_at": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "rating",
                                                "feedback",
                                                "submitted_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "session_id",
                                        "status",
                                        "is_rated",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Anda tidak memiliki akses ke session ini."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "chat.sessions.rating.store",
                "description": "Rating is optional \u2014 the customer may call this endpoint or skip it entirely.\nOnly one rating per session is allowed; subsequent attempts return 409.",
                "summary": "Submit a rating for a resolved session",
                "tags": [
                    "ChatRating"
                ],
                "parameters": [
                    {
                        "name": "session",
                        "in": "path",
                        "required": true,
                        "description": "The session ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "rating": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 5
                                    },
                                    "feedback": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 1000
                                    }
                                },
                                "required": [
                                    "rating"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Terima kasih atas rating Anda."
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "session_id": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "rating": {
                                                    "type": "integer"
                                                },
                                                "feedback": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "submitted_at": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "session_id",
                                                "rating",
                                                "feedback",
                                                "submitted_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Rating sudah pernah diberikan untuk session ini."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Anda tidak memiliki akses ke session ini."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/chat\/sessions\/{session}\/skip-rating": {
            "post": {
                "operationId": "chat.sessions.rating.skip",
                "description": "Marks the session so the pending-rating check will no longer surface it.",
                "summary": "Skip rating for a resolved session",
                "tags": [
                    "ChatRating"
                ],
                "parameters": [
                    {
                        "name": "session",
                        "in": "path",
                        "required": true,
                        "description": "The session ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Rating dilewati."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Session ini sudah pernah dilewati atau di-rating."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Anda tidak memiliki akses ke session ini."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Hanya session yang sudah di-resolve yang bisa dilewati."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/chat\/rooms\/active": {
            "get": {
                "operationId": "chat.rooms.active",
                "tags": [
                    "ChatRoom"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "object",
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "uuid": {
                                                            "type": "string"
                                                        },
                                                        "status": {
                                                            "type": "string"
                                                        },
                                                        "last_message_at": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "customer": {
                                                            "type": "object",
                                                            "properties": {
                                                                "id": {
                                                                    "type": "integer"
                                                                },
                                                                "external_customer_id": {
                                                                    "type": "string"
                                                                },
                                                                "name": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                }
                                                            },
                                                            "required": [
                                                                "id",
                                                                "external_customer_id",
                                                                "name"
                                                            ]
                                                        },
                                                        "current_session": {
                                                            "type": [
                                                                "object",
                                                                "null"
                                                            ],
                                                            "properties": {
                                                                "id": {
                                                                    "type": "integer"
                                                                },
                                                                "status": {
                                                                    "type": "string"
                                                                },
                                                                "started_at": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "group": {
                                                                    "type": [
                                                                        "object",
                                                                        "null"
                                                                    ],
                                                                    "properties": {
                                                                        "id": {
                                                                            "type": "integer"
                                                                        },
                                                                        "code": {
                                                                            "type": "string"
                                                                        },
                                                                        "name": {
                                                                            "type": "string"
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "id",
                                                                        "code",
                                                                        "name"
                                                                    ]
                                                                }
                                                            },
                                                            "required": [
                                                                "id",
                                                                "status",
                                                                "started_at",
                                                                "group"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "uuid",
                                                        "status",
                                                        "last_message_at",
                                                        "customer",
                                                        "current_session"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "null"
                                                }
                                            },
                                            "required": [
                                                "data"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Customer tidak aktif."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/chat\/rooms\/{room}\/broadcast": {
            "post": {
                "operationId": "chatRoom.broadcast",
                "tags": [
                    "ChatRoom"
                ],
                "parameters": [
                    {
                        "name": "room",
                        "in": "path",
                        "required": true,
                        "description": "The room ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "dispatched": {
                                            "type": "string",
                                            "const": "chat.room.updated"
                                        },
                                        "channel": {
                                            "type": "string"
                                        },
                                        "room_id": {
                                            "type": "integer"
                                        },
                                        "action": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "dispatched",
                                        "channel",
                                        "room_id",
                                        "action"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                }
            }
        },
        "\/admin\/chat\/rooms\/{room}": {
            "delete": {
                "operationId": "admin.chat.rooms.destroy",
                "summary": "Delete a chat room together with its sessions, messages, transfers and ratings",
                "tags": [
                    "ChatRoom"
                ],
                "parameters": [
                    {
                        "name": "room",
                        "in": "path",
                        "required": true,
                        "description": "The room ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "reason",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/chat\/rooms\/{room}\/transfers": {
            "get": {
                "operationId": "chat.transfers.index",
                "tags": [
                    "ChatRoomTransfer"
                ],
                "parameters": [
                    {
                        "name": "room",
                        "in": "path",
                        "required": true,
                        "description": "The room ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "chat_room_id": {
                                                        "type": "integer"
                                                    },
                                                    "session_id": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "from_group": {
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "code": {
                                                                "type": "string"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "code",
                                                            "name"
                                                        ]
                                                    },
                                                    "to_group": {
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "code": {
                                                                "type": "string"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "code",
                                                            "name"
                                                        ]
                                                    },
                                                    "transferred_by_agent": {
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "name"
                                                        ]
                                                    },
                                                    "note": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "transferred_at": {
                                                        "type": "string"
                                                    },
                                                    "created_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "chat_room_id",
                                                    "session_id",
                                                    "from_group",
                                                    "to_group",
                                                    "transferred_by_agent",
                                                    "note",
                                                    "transferred_at",
                                                    "created_at"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/chat\/rooms\/{room}\/transfer": {
            "post": {
                "operationId": "chat.transfers.store",
                "tags": [
                    "ChatRoomTransfer"
                ],
                "parameters": [
                    {
                        "name": "room",
                        "in": "path",
                        "required": true,
                        "description": "The room ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "to_group_id": {
                                        "type": "integer"
                                    },
                                    "note": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 1000
                                    }
                                },
                                "required": [
                                    "to_group_id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "chat_room_id": {
                                                    "type": "integer"
                                                },
                                                "session_id": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "from_group": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "code": {
                                                            "type": "string"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "code",
                                                        "name"
                                                    ]
                                                },
                                                "to_group": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "code": {
                                                            "type": "string"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "code",
                                                        "name"
                                                    ]
                                                },
                                                "transferred_by_agent": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "name"
                                                    ]
                                                },
                                                "note": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "transferred_at": {
                                                    "type": "string"
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "chat_room_id",
                                                "session_id",
                                                "from_group",
                                                "to_group",
                                                "transferred_by_agent",
                                                "note",
                                                "transferred_at",
                                                "created_at"
                                            ]
                                        },
                                        "session_id": {
                                            "type": "integer"
                                        },
                                        "channels": {
                                            "type": "array",
                                            "prefixItems": [
                                                {
                                                    "type": "string"
                                                },
                                                {
                                                    "type": "string"
                                                }
                                            ],
                                            "minItems": 2,
                                            "maxItems": 2
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "session_id",
                                        "channels"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Hanya agent dari group aktif yang dapat mentransfer room."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/chat\/rooms\/{room}\/transfers\/{transfer}": {
            "get": {
                "operationId": "chat.transfers.show",
                "tags": [
                    "ChatRoomTransfer"
                ],
                "parameters": [
                    {
                        "name": "room",
                        "in": "path",
                        "required": true,
                        "description": "The room ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "transfer",
                        "in": "path",
                        "required": true,
                        "description": "The transfer ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "chat_room_id": {
                                                    "type": "integer"
                                                },
                                                "session_id": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "from_group": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "code": {
                                                            "type": "string"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "code",
                                                        "name"
                                                    ]
                                                },
                                                "to_group": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "code": {
                                                            "type": "string"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "code",
                                                        "name"
                                                    ]
                                                },
                                                "transferred_by_agent": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "name"
                                                    ]
                                                },
                                                "note": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "transferred_at": {
                                                    "type": "string"
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "chat_room_id",
                                                "session_id",
                                                "from_group",
                                                "to_group",
                                                "transferred_by_agent",
                                                "note",
                                                "transferred_at",
                                                "created_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/chat\/sessions": {
            "post": {
                "operationId": "chatSession.store",
                "tags": [
                    "ChatSession"
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "chat_room_id": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ]
                                    },
                                    "group_code": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 50
                                    },
                                    "group_name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 150
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "chat_room_id": {
                                            "type": "integer"
                                        },
                                        "session_id": {
                                            "type": "integer"
                                        },
                                        "group_id": {
                                            "type": "integer"
                                        },
                                        "customer_id": {
                                            "type": "integer"
                                        },
                                        "channels": {
                                            "type": "array",
                                            "prefixItems": [
                                                {
                                                    "type": "string"
                                                },
                                                {
                                                    "type": "string"
                                                }
                                            ],
                                            "minItems": 2,
                                            "maxItems": 2
                                        }
                                    },
                                    "required": [
                                        "chat_room_id",
                                        "session_id",
                                        "group_id",
                                        "customer_id",
                                        "channels"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Anda tidak memiliki akses ke room ini."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/chat\/sessions\/{session}\/messages": {
            "get": {
                "operationId": "chat.sessions.messages",
                "tags": [
                    "ChatSession"
                ],
                "parameters": [
                    {
                        "name": "session",
                        "in": "path",
                        "required": true,
                        "description": "The session ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "before_id",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1
                        }
                    },
                    {
                        "name": "after_id",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "chat_room_id": {
                                                        "type": "integer"
                                                    },
                                                    "session_id": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "sender_type": {
                                                        "type": "string"
                                                    },
                                                    "sender_agent_id": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "sender_name_snapshot": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "sender_icon_snapshot": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "message_type": {
                                                        "type": "string"
                                                    },
                                                    "text_body": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "media_url": {
                                                        "type": "null"
                                                    },
                                                    "media_mime_type": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "media_size_bytes": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "sent_at": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "chat_room_id",
                                                    "session_id",
                                                    "sender_type",
                                                    "sender_agent_id",
                                                    "sender_name_snapshot",
                                                    "sender_icon_snapshot",
                                                    "message_type",
                                                    "text_body",
                                                    "media_url",
                                                    "media_mime_type",
                                                    "media_size_bytes",
                                                    "sent_at"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "has_more": {
                                                    "type": "boolean"
                                                },
                                                "next_cursor": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "limit": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "has_more",
                                                "next_cursor",
                                                "limit"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Anda tidak memiliki akses ke session ini."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                }
            }
        },
        "\/devices": {
            "post": {
                "operationId": "devices.store",
                "summary": "Register \/ refresh the FCM token of the calling customer's device.\nCalled by the mobile app after login (brief Opsi B)",
                "tags": [
                    "Device"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "fcm_token": {
                                        "type": "string",
                                        "maxLength": 4096
                                    },
                                    "platform": {
                                        "type": "string",
                                        "enum": [
                                            "ANDROID",
                                            "IOS",
                                            "WEB"
                                        ]
                                    }
                                },
                                "required": [
                                    "fcm_token",
                                    "platform"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "device": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "platform": {
                                                    "type": "string"
                                                },
                                                "registered_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "platform",
                                                "registered_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "device"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "delete": {
                "operationId": "devices.destroy",
                "summary": "Remove the given FCM token (used on mobile logout)",
                "tags": [
                    "Device"
                ],
                "parameters": [
                    {
                        "name": "fcm_token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "maxLength": 4096
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "deleted": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "deleted"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/groups": {
            "get": {
                "operationId": "admin.groups.index",
                "summary": "List agent groups with member counts",
                "tags": [
                    "Group"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "code": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "group_type": {
                                                        "type": "string"
                                                    },
                                                    "is_active": {
                                                        "type": "boolean"
                                                    },
                                                    "members_count": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "code",
                                                    "name",
                                                    "group_type",
                                                    "is_active",
                                                    "members_count"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "admin.groups.store",
                "summary": "Create a new agent group",
                "tags": [
                    "Group"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "code": {
                                        "type": "string",
                                        "maxLength": 50
                                    },
                                    "name": {
                                        "type": "string",
                                        "maxLength": 150
                                    },
                                    "group_type": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "HD",
                                            "CCARE",
                                            "OTHER",
                                            null
                                        ]
                                    },
                                    "description": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "is_active": {
                                        "type": [
                                            "boolean",
                                            "null"
                                        ]
                                    },
                                    "reason": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "code",
                                    "name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "code": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "group_type": {
                                                    "type": "string"
                                                },
                                                "is_active": {
                                                    "type": "boolean"
                                                },
                                                "members_count": {
                                                    "type": "integer",
                                                    "const": 0
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "code",
                                                "name",
                                                "group_type",
                                                "is_active",
                                                "members_count"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/groups\/{group}": {
            "delete": {
                "operationId": "admin.groups.destroy",
                "summary": "Delete an agent group that is no longer bound to any chat room",
                "tags": [
                    "Group"
                ],
                "parameters": [
                    {
                        "name": "group",
                        "in": "path",
                        "required": true,
                        "description": "The group ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "reason",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/manager\/agents": {
            "get": {
                "operationId": "manager.agents.index",
                "summary": "List agents matching the manager's division",
                "tags": [
                    "ManagerAgent"
                ],
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 100
                        }
                    },
                    {
                        "name": "agent_type",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "enum": [
                                "HD",
                                "CCARE",
                                null
                            ]
                        }
                    },
                    {
                        "name": "is_active",
                        "in": "query",
                        "schema": {
                            "type": [
                                "boolean",
                                "null"
                            ]
                        }
                    },
                    {
                        "name": "group_id",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "user_id": {
                                                        "type": "integer"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "email": {
                                                        "type": "string"
                                                    },
                                                    "role": {
                                                        "type": "string"
                                                    },
                                                    "user_is_active": {
                                                        "type": "boolean"
                                                    },
                                                    "password_expired_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "agent_type": {
                                                        "type": "string"
                                                    },
                                                    "agent_icon": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "is_active": {
                                                        "type": "boolean"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "groups": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "properties": {
                                                                "id": {
                                                                    "type": "integer"
                                                                },
                                                                "code": {
                                                                    "type": "string"
                                                                },
                                                                "name": {
                                                                    "type": "string"
                                                                },
                                                                "group_type": {
                                                                    "type": "string"
                                                                }
                                                            },
                                                            "required": [
                                                                "id",
                                                                "code",
                                                                "name",
                                                                "group_type"
                                                            ]
                                                        }
                                                    },
                                                    "created_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "updated_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "user_id",
                                                    "name",
                                                    "email",
                                                    "role",
                                                    "user_is_active",
                                                    "password_expired_at",
                                                    "agent_type",
                                                    "agent_icon",
                                                    "is_active",
                                                    "status",
                                                    "groups",
                                                    "created_at",
                                                    "updated_at"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error\n\nAn error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "description": "Error overview.",
                                                    "examples": [
                                                        "Manager belum terdaftar dalam profil agent."
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "description": "Error overview.",
                                                    "examples": [
                                                        "Manager tidak memiliki grup agent yang valid."
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/manager\/agents\/{agent}": {
            "get": {
                "operationId": "manager.agents.show",
                "summary": "Show agent profile details for manager",
                "tags": [
                    "ManagerAgent"
                ],
                "parameters": [
                    {
                        "name": "agent",
                        "in": "path",
                        "required": true,
                        "description": "The agent ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "user_id": {
                                                    "type": "integer"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "email": {
                                                    "type": "string"
                                                },
                                                "role": {
                                                    "type": "string"
                                                },
                                                "user_is_active": {
                                                    "type": "boolean"
                                                },
                                                "password_expired_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "agent_type": {
                                                    "type": "string"
                                                },
                                                "agent_icon": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "is_active": {
                                                    "type": "boolean"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "groups": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "code": {
                                                                "type": "string"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "group_type": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "code",
                                                            "name",
                                                            "group_type"
                                                        ]
                                                    }
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "updated_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "user_id",
                                                "name",
                                                "email",
                                                "role",
                                                "user_is_active",
                                                "password_expired_at",
                                                "agent_type",
                                                "agent_icon",
                                                "is_active",
                                                "status",
                                                "groups",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Manager hanya dapat melihat profil agent."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "put": {
                "operationId": "manager.agents.update",
                "summary": "Update an agent's profile including password, agent attributes, and groups",
                "tags": [
                    "ManagerAgent"
                ],
                "parameters": [
                    {
                        "name": "agent",
                        "in": "path",
                        "required": true,
                        "description": "The agent ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "email": {
                                        "type": "string",
                                        "format": "email",
                                        "maxLength": 255
                                    },
                                    "password": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "role": {
                                        "type": "string",
                                        "enum": [
                                            "ADMIN",
                                            "SUPERVISOR",
                                            "AGENT",
                                            "MANAGER"
                                        ]
                                    },
                                    "agent_type": {
                                        "type": "string",
                                        "enum": [
                                            "HD",
                                            "CCARE"
                                        ]
                                    },
                                    "agent_icon": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "is_active": {
                                        "type": "boolean"
                                    },
                                    "group_ids": {
                                        "type": "array",
                                        "items": {
                                            "type": "integer"
                                        }
                                    },
                                    "reason": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 1000
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Profil agent berhasil diperbarui."
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "user_id": {
                                                    "type": "integer"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "email": {
                                                    "type": "string"
                                                },
                                                "role": {
                                                    "type": "string"
                                                },
                                                "user_is_active": {
                                                    "type": "boolean"
                                                },
                                                "password_expired_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "agent_type": {
                                                    "type": "string"
                                                },
                                                "agent_icon": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "is_active": {
                                                    "type": "boolean"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "groups": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "code": {
                                                                "type": "string"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "group_type": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "code",
                                                            "name",
                                                            "group_type"
                                                        ]
                                                    }
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "updated_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "user_id",
                                                "name",
                                                "email",
                                                "role",
                                                "user_is_active",
                                                "password_expired_at",
                                                "agent_type",
                                                "agent_icon",
                                                "is_active",
                                                "status",
                                                "groups",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error\n\nAn error\n\nAn error\n\nAn error\n\nAn error\n\nAn error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "description": "Error overview.",
                                                    "examples": [
                                                        "Manager hanya dapat mengubah profil agent."
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "description": "Error overview.",
                                                    "examples": [
                                                        "Manager belum terdaftar dalam profil agent."
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "description": "Error overview.",
                                                    "examples": [
                                                        "Manager tidak memiliki grup agent yang valid."
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "description": "Error overview.",
                                                    "examples": [
                                                        "Manager HD hanya dapat mengubah profil agent HD."
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "description": "Error overview.",
                                                    "examples": [
                                                        "Manager CCare hanya dapat mengubah profil agent CCare."
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "description": "Error overview.",
                                                    "examples": [
                                                        "Hanya admin yang dapat mengubah role agent."
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/mobile\/auth\/login": {
            "post": {
                "operationId": "mobile.login",
                "summary": "Exchange an external customer id + shared secret for a Sanctum token\nthat the mobile app uses to authorize private broadcasting channels",
                "tags": [
                    "MobileAuth"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "external_customer_id": {
                                        "type": "string",
                                        "pattern": "^[A-Z]{2}\\d{6}$"
                                    },
                                    "secret": {
                                        "type": "string"
                                    },
                                    "device_name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "customer_name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 150
                                    },
                                    "phone": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 30
                                    },
                                    "email": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "email",
                                        "maxLength": 255
                                    }
                                },
                                "required": [
                                    "external_customer_id",
                                    "secret"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "token": {
                                            "type": "string"
                                        },
                                        "token_type": {
                                            "type": "string",
                                            "const": "Bearer"
                                        },
                                        "abilities": {
                                            "type": "array",
                                            "prefixItems": [
                                                {
                                                    "type": "string",
                                                    "const": "customer:chat"
                                                }
                                            ],
                                            "minItems": 1,
                                            "maxItems": 1
                                        },
                                        "customer": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "external_customer_id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "phone": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "email": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "avatar_path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "is_active": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "external_customer_id",
                                                "name",
                                                "phone",
                                                "email",
                                                "avatar_path",
                                                "is_active"
                                            ]
                                        },
                                        "broadcasting": {
                                            "type": "object",
                                            "properties": {
                                                "auth_endpoint": {
                                                    "type": "string"
                                                },
                                                "channel_prefix": {
                                                    "type": "string",
                                                    "const": "private-chat-"
                                                },
                                                "rooms": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "chat_room_id": {
                                                                "type": "integer"
                                                            },
                                                            "session_id": {
                                                                "type": "integer"
                                                            },
                                                            "channel": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "chat_room_id",
                                                            "session_id",
                                                            "channel"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "auth_endpoint",
                                                "channel_prefix",
                                                "rooms"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "token",
                                        "token_type",
                                        "abilities",
                                        "customer",
                                        "broadcasting"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Kredensial tidak valid."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Autentikasi mobile belum dikonfigurasi."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/mobile\/me": {
            "get": {
                "operationId": "mobile.me",
                "summary": "Return the currently authenticated customer",
                "tags": [
                    "MobileAuth"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "customer": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "external_customer_id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "phone": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "email": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "avatar_path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "is_active": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "external_customer_id",
                                                "name",
                                                "phone",
                                                "email",
                                                "avatar_path",
                                                "is_active"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "customer"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/mobile\/auth\/logout": {
            "post": {
                "operationId": "mobile.logout",
                "summary": "Revoke the token used for the current request",
                "tags": [
                    "MobileAuth"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Token dicabut."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/ratings": {
            "get": {
                "operationId": "ratings.index",
                "summary": "Retrieve chat ratings data and recap summary via API",
                "tags": [
                    "RatingReport"
                ],
                "parameters": [
                    {
                        "name": "period",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "default": "all"
                        }
                    },
                    {
                        "name": "rating",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "group_id",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "has_feedback",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "date_from",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "date_to",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "recap": {
                                            "type": "object",
                                            "properties": {
                                                "total_ratings": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "average_rating": {
                                                    "type": "number"
                                                },
                                                "csat_score": {
                                                    "type": "number"
                                                },
                                                "satisfied_count": {
                                                    "type": "integer"
                                                },
                                                "with_feedback_count": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "without_feedback_count": {
                                                    "type": "integer"
                                                },
                                                "feedback_ratio": {
                                                    "type": "number"
                                                },
                                                "star_breakdown": {
                                                    "type": "string"
                                                },
                                                "group_recap": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "code": {
                                                                "type": "string"
                                                            },
                                                            "total": {
                                                                "type": "integer"
                                                            },
                                                            "avg_rating": {
                                                                "type": "number"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "name",
                                                            "code",
                                                            "total",
                                                            "avg_rating"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "total_ratings",
                                                "average_rating",
                                                "csat_score",
                                                "satisfied_count",
                                                "with_feedback_count",
                                                "without_feedback_count",
                                                "feedback_ratio",
                                                "star_breakdown",
                                                "group_recap"
                                            ]
                                        },
                                        "ratings": {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "chat_room_id": {
                                                                "type": "integer"
                                                            },
                                                            "session_id": {
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            },
                                                            "rating": {
                                                                "type": "integer"
                                                            },
                                                            "feedback": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "submitted_at": {
                                                                "type": "string"
                                                            },
                                                            "submitted_at_formatted": {
                                                                "type": "string"
                                                            },
                                                            "submitted_at_human": {
                                                                "type": "string"
                                                            },
                                                            "customer": {
                                                                "type": [
                                                                    "object",
                                                                    "null"
                                                                ],
                                                                "properties": {
                                                                    "id": {
                                                                        "type": "integer"
                                                                    },
                                                                    "name": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "external_customer_id": {
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "id",
                                                                    "name",
                                                                    "external_customer_id"
                                                                ]
                                                            },
                                                            "group": {
                                                                "type": [
                                                                    "object",
                                                                    "null"
                                                                ],
                                                                "properties": {
                                                                    "id": {
                                                                        "type": "integer"
                                                                    },
                                                                    "name": {
                                                                        "type": "string"
                                                                    },
                                                                    "code": {
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "id",
                                                                    "name",
                                                                    "code"
                                                                ]
                                                            },
                                                            "resolved_by": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "agent_name": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "source": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "is_auto_resolve": {
                                                                        "type": "boolean"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "agent_name",
                                                                    "source",
                                                                    "is_auto_resolve"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "chat_room_id",
                                                            "session_id",
                                                            "rating",
                                                            "feedback",
                                                            "submitted_at",
                                                            "submitted_at_formatted",
                                                            "submitted_at_human",
                                                            "customer",
                                                            "group",
                                                            "resolved_by"
                                                        ]
                                                    }
                                                },
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "has_more": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "data",
                                                "current_page",
                                                "last_page",
                                                "per_page",
                                                "total",
                                                "from",
                                                "to",
                                                "has_more"
                                            ]
                                        },
                                        "filters_applied": {
                                            "type": "object",
                                            "properties": {
                                                "period": {
                                                    "type": [
                                                        "string",
                                                        "array",
                                                        "null"
                                                    ]
                                                },
                                                "rating": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "group_id": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "has_feedback": {
                                                    "type": [
                                                        "string",
                                                        "array",
                                                        "null"
                                                    ]
                                                },
                                                "q": {
                                                    "type": "string"
                                                },
                                                "date_from": {
                                                    "type": [
                                                        "string",
                                                        "array",
                                                        "null"
                                                    ]
                                                },
                                                "date_to": {
                                                    "type": [
                                                        "string",
                                                        "array",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "period",
                                                "rating",
                                                "group_id",
                                                "has_feedback",
                                                "q",
                                                "date_from",
                                                "date_to"
                                            ]
                                        },
                                        "available_groups": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/AgentGroup"
                                            }
                                        }
                                    },
                                    "required": [
                                        "recap",
                                        "ratings",
                                        "filters_applied",
                                        "available_groups"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/test\/ping": {
            "get": {
                "operationId": "test.ping",
                "tags": [
                    "Test"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "dispatched": {
                                            "type": "string",
                                            "const": "test.ping"
                                        },
                                        "channel": {
                                            "type": "string",
                                            "const": "test"
                                        }
                                    },
                                    "required": [
                                        "dispatched",
                                        "channel"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/agent\/rooms": {
            "get": {
                "operationId": "agent.rooms",
                "description": "Room list the authenticated agent may access.",
                "summary": "GET \/api\/agent\/rooms",
                "tags": [
                    "WebAgentChat"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "enum": [
                                "ACTIVE",
                                "RESOLVED",
                                null
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "uuid": {
                                                        "type": "string"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "customer": {
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "name": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "external_customer_id": {
                                                                "type": "string"
                                                            },
                                                            "avatar_path": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "name",
                                                            "external_customer_id",
                                                            "avatar_path"
                                                        ]
                                                    },
                                                    "group": {
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "code": {
                                                                "type": "string"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "code",
                                                            "name"
                                                        ]
                                                    },
                                                    "session_id": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "last_message_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "last_customer_message_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "last_agent_message_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "can_send_message": {
                                                        "type": "boolean"
                                                    },
                                                    "is_previous_group_room": {
                                                        "type": "boolean"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "uuid",
                                                    "status",
                                                    "customer",
                                                    "group",
                                                    "session_id",
                                                    "last_message_at",
                                                    "last_customer_message_at",
                                                    "last_agent_message_at",
                                                    "can_send_message",
                                                    "is_previous_group_room"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "count": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "limit": {
                                                    "type": "integer"
                                                },
                                                "status": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "count",
                                                "limit",
                                                "status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/agent\/rooms\/{room}\/messages": {
            "get": {
                "operationId": "agent.rooms.messages",
                "description": "Cursor-based pagination: 40 messages per page.\nUse ?before_id=N to load older messages (scrolling up).\nUse ?after_id=N to load newer messages (polling \/ real-time catch-up).",
                "summary": "GET \/api\/agent\/rooms\/{room}\/messages",
                "tags": [
                    "WebAgentChat"
                ],
                "parameters": [
                    {
                        "name": "room",
                        "in": "path",
                        "required": true,
                        "description": "The room ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "before_id",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1
                        }
                    },
                    {
                        "name": "after_id",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "chat_room_id": {
                                                        "type": "integer"
                                                    },
                                                    "session_id": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "session_number": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "sender_type": {
                                                        "type": "string"
                                                    },
                                                    "sender_agent_id": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "sender_name_snapshot": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "sender_icon_snapshot": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "message_type": {
                                                        "type": "string"
                                                    },
                                                    "text_body": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "media_url": {
                                                        "type": "null"
                                                    },
                                                    "media_mime_type": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "media_size_bytes": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "sent_at": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "chat_room_id",
                                                    "session_id",
                                                    "session_number",
                                                    "sender_type",
                                                    "sender_agent_id",
                                                    "sender_name_snapshot",
                                                    "sender_icon_snapshot",
                                                    "message_type",
                                                    "text_body",
                                                    "media_url",
                                                    "media_mime_type",
                                                    "media_size_bytes",
                                                    "sent_at"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "has_more": {
                                                    "type": "boolean"
                                                },
                                                "oldest_id": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "newest_id": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "limit": {
                                                    "type": "integer"
                                                },
                                                "can_send_message": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "has_more",
                                                "oldest_id",
                                                "newest_id",
                                                "limit",
                                                "can_send_message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "agent.rooms.messages.store",
                "description": "Agent sends a message. Supports text, image, or both (multipart\/form-data).\nImage: jpeg, jpg, png, webp \u2014 max 5 MB.",
                "summary": "POST \/api\/agent\/rooms\/{room}\/messages",
                "tags": [
                    "WebAgentChat"
                ],
                "parameters": [
                    {
                        "name": "room",
                        "in": "path",
                        "required": true,
                        "description": "The room ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "multipart\/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "text": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 2000
                                    },
                                    "image": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "binary",
                                        "contentMediaType": "application\/octet-stream",
                                        "description": "Maximum file size: 5120 kilobytes."
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "chat_room_id": {
                                                    "type": "integer"
                                                },
                                                "session_id": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "session_number": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "sender_type": {
                                                    "type": "string"
                                                },
                                                "sender_agent_id": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "sender_name_snapshot": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "sender_icon_snapshot": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "message_type": {
                                                    "type": "string"
                                                },
                                                "text_body": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "media_url": {
                                                    "type": "null"
                                                },
                                                "media_mime_type": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "media_size_bytes": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "sent_at": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "chat_room_id",
                                                "session_id",
                                                "session_number",
                                                "sender_type",
                                                "sender_agent_id",
                                                "sender_name_snapshot",
                                                "sender_icon_snapshot",
                                                "message_type",
                                                "text_body",
                                                "media_url",
                                                "media_mime_type",
                                                "media_size_bytes",
                                                "sent_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error\n\nAn error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "description": "Error overview.",
                                                    "examples": [
                                                        "Group agent sebelumnya hanya dapat membaca riwayat chat dan tidak dapat mengirim pesan."
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "description": "Error overview.",
                                                    "examples": [
                                                        "Anda tidak memiliki akses untuk mengirim pesan di room ini."
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/agent\/rooms\/{room}\/resolve": {
            "post": {
                "operationId": "agent.rooms.resolve",
                "summary": "POST \/api\/agent\/rooms\/{room}\/resolve",
                "tags": [
                    "WebAgentChat"
                ],
                "parameters": [
                    {
                        "name": "room",
                        "in": "path",
                        "required": true,
                        "description": "The room ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Room berhasil di-resolve."
                                        },
                                        "room_id": {
                                            "type": "integer"
                                        },
                                        "session_id": {
                                            "type": "integer"
                                        },
                                        "resolved_at": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "room_id",
                                        "session_id",
                                        "resolved_at"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "description": "An error\n\nAn error\n\nAn error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "description": "Error overview.",
                                                    "examples": [
                                                        "Role CCare tidak memiliki izin untuk me-resolve room. Hanya role HD yang dapat me-resolve room."
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "description": "Error overview.",
                                                    "examples": [
                                                        "Hanya agent dengan role HD yang dapat me-resolve room."
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "description": "Error overview.",
                                                    "examples": [
                                                        "Hanya agent dari group aktif yang dapat me-resolve room."
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Room sudah di-resolve."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                }
            }
        },
        "\/agent\/rooms\/{room}\/simulate-customer": {
            "post": {
                "operationId": "agent.rooms.simulate",
                "description": "Demo\/testing helper: insert a customer message into the room.",
                "summary": "POST \/api\/agent\/rooms\/{room}\/simulate-customer",
                "tags": [
                    "WebAgentChat"
                ],
                "parameters": [
                    {
                        "name": "room",
                        "in": "path",
                        "required": true,
                        "description": "The room ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "text": {
                                        "type": "string",
                                        "maxLength": 2000
                                    }
                                },
                                "required": [
                                    "text"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ChatMessage"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/agent\/messages\/search": {
            "get": {
                "operationId": "agent.messages.search",
                "description": "Search customer messages matching a keyword in text_body, sender snapshot,\nor customer identity across accessible rooms (or within a specific room).",
                "summary": "GET \/api\/agent\/messages\/search\nGET \/api\/agent\/rooms\/{room}\/messages\/search",
                "tags": [
                    "WebAgentChat"
                ],
                "parameters": [
                    {
                        "name": "keyword",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 255
                        }
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 255
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 255
                        }
                    },
                    {
                        "name": "room_id",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1
                        }
                    },
                    {
                        "name": "customer_id",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1
                        }
                    },
                    {
                        "name": "sender_type",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "enum": [
                                "CUSTOMER",
                                "AGENT",
                                "ALL",
                                null
                            ]
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "date_from",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "format": "date-time"
                        }
                    },
                    {
                        "name": "date_to",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "format": "date-time"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "chat_room_id": {
                                                        "type": "integer"
                                                    },
                                                    "session_id": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "sender_type": {
                                                        "type": "string"
                                                    },
                                                    "sender_agent_id": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "sender_name_snapshot": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "sender_icon_snapshot": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "message_type": {
                                                        "type": "string"
                                                    },
                                                    "text_body": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "media_url": {
                                                        "type": "null"
                                                    },
                                                    "media_mime_type": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "media_size_bytes": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "sent_at": {
                                                        "type": "string"
                                                    },
                                                    "customer": {
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "name": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "external_customer_id": {
                                                                "type": "string"
                                                            },
                                                            "phone": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "email": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "avatar_path": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "name",
                                                            "external_customer_id",
                                                            "phone",
                                                            "email",
                                                            "avatar_path"
                                                        ]
                                                    },
                                                    "room": {
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "uuid": {
                                                                "type": "string"
                                                            },
                                                            "status": {
                                                                "type": "string"
                                                            },
                                                            "active_group": {
                                                                "type": [
                                                                    "object",
                                                                    "null"
                                                                ],
                                                                "properties": {
                                                                    "id": {
                                                                        "type": "integer"
                                                                    },
                                                                    "code": {
                                                                        "type": "string"
                                                                    },
                                                                    "name": {
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "id",
                                                                    "code",
                                                                    "name"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "uuid",
                                                            "status",
                                                            "active_group"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "chat_room_id",
                                                    "session_id",
                                                    "sender_type",
                                                    "sender_agent_id",
                                                    "sender_name_snapshot",
                                                    "sender_icon_snapshot",
                                                    "message_type",
                                                    "text_body",
                                                    "media_url",
                                                    "media_mime_type",
                                                    "media_size_bytes",
                                                    "sent_at",
                                                    "customer",
                                                    "room"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "has_more": {
                                                    "type": "boolean"
                                                },
                                                "keyword": {
                                                    "type": "string"
                                                },
                                                "sender_type": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "enum": [
                                                                "CUSTOMER"
                                                            ]
                                                        }
                                                    ]
                                                },
                                                "room_id": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "last_page",
                                                "per_page",
                                                "total",
                                                "from",
                                                "to",
                                                "has_more",
                                                "keyword",
                                                "sender_type",
                                                "room_id"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/agent\/rooms\/{room}\/messages\/search": {
            "get": {
                "operationId": "agent.rooms.messages.search",
                "description": "Search customer messages matching a keyword in text_body, sender snapshot,\nor customer identity across accessible rooms (or within a specific room).",
                "summary": "GET \/api\/agent\/messages\/search\nGET \/api\/agent\/rooms\/{room}\/messages\/search",
                "tags": [
                    "WebAgentChat"
                ],
                "parameters": [
                    {
                        "name": "room",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "default": null
                        }
                    },
                    {
                        "name": "keyword",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 255
                        }
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 255
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 255
                        }
                    },
                    {
                        "name": "room_id",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1
                        }
                    },
                    {
                        "name": "customer_id",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1
                        }
                    },
                    {
                        "name": "sender_type",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "enum": [
                                "CUSTOMER",
                                "AGENT",
                                "ALL",
                                null
                            ]
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "date_from",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "format": "date-time"
                        }
                    },
                    {
                        "name": "date_to",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "format": "date-time"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "chat_room_id": {
                                                        "type": "integer"
                                                    },
                                                    "session_id": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "sender_type": {
                                                        "type": "string"
                                                    },
                                                    "sender_agent_id": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "sender_name_snapshot": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "sender_icon_snapshot": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "message_type": {
                                                        "type": "string"
                                                    },
                                                    "text_body": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "media_url": {
                                                        "type": "null"
                                                    },
                                                    "media_mime_type": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "media_size_bytes": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "sent_at": {
                                                        "type": "string"
                                                    },
                                                    "customer": {
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "name": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "external_customer_id": {
                                                                "type": "string"
                                                            },
                                                            "phone": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "email": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "avatar_path": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "name",
                                                            "external_customer_id",
                                                            "phone",
                                                            "email",
                                                            "avatar_path"
                                                        ]
                                                    },
                                                    "room": {
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "uuid": {
                                                                "type": "string"
                                                            },
                                                            "status": {
                                                                "type": "string"
                                                            },
                                                            "active_group": {
                                                                "type": [
                                                                    "object",
                                                                    "null"
                                                                ],
                                                                "properties": {
                                                                    "id": {
                                                                        "type": "integer"
                                                                    },
                                                                    "code": {
                                                                        "type": "string"
                                                                    },
                                                                    "name": {
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "id",
                                                                    "code",
                                                                    "name"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "uuid",
                                                            "status",
                                                            "active_group"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "chat_room_id",
                                                    "session_id",
                                                    "sender_type",
                                                    "sender_agent_id",
                                                    "sender_name_snapshot",
                                                    "sender_icon_snapshot",
                                                    "message_type",
                                                    "text_body",
                                                    "media_url",
                                                    "media_mime_type",
                                                    "media_size_bytes",
                                                    "sent_at",
                                                    "customer",
                                                    "room"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "has_more": {
                                                    "type": "boolean"
                                                },
                                                "keyword": {
                                                    "type": "string"
                                                },
                                                "sender_type": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "enum": [
                                                                "CUSTOMER"
                                                            ]
                                                        }
                                                    ]
                                                },
                                                "room_id": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "last_page",
                                                "per_page",
                                                "total",
                                                "from",
                                                "to",
                                                "has_more",
                                                "keyword",
                                                "sender_type",
                                                "room_id"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/agent\/sessions": {
            "get": {
                "operationId": "agent.sessions",
                "description": "Session list the authenticated agent may access.",
                "summary": "GET \/api\/agent\/sessions",
                "tags": [
                    "WebAgentChat"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 50
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "room_id": {
                                                        "type": "integer"
                                                    },
                                                    "room_uuid": {
                                                        "type": "string"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "group": {
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "code": {
                                                                "type": "string"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "group_type": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "code",
                                                            "name",
                                                            "group_type"
                                                        ]
                                                    },
                                                    "customer": {
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "name": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "external_customer_id": {
                                                                "type": "string"
                                                            },
                                                            "avatar_path": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "name",
                                                            "external_customer_id",
                                                            "avatar_path"
                                                        ]
                                                    },
                                                    "last_message_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "last_customer_message_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "last_agent_message_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "resolved_source": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "resolved_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "can_send_message": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "room_id",
                                                    "room_uuid",
                                                    "status",
                                                    "group",
                                                    "customer",
                                                    "last_message_at",
                                                    "last_customer_message_at",
                                                    "last_agent_message_at",
                                                    "resolved_source",
                                                    "resolved_at",
                                                    "can_send_message"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "count": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "limit": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "count",
                                                "limit"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/agent\/sessions\/{session}": {
            "get": {
                "operationId": "agent.sessions.show",
                "summary": "GET \/api\/agent\/sessions\/{session}",
                "tags": [
                    "WebAgentChat"
                ],
                "parameters": [
                    {
                        "name": "session",
                        "in": "path",
                        "required": true,
                        "description": "The session ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "room_id": {
                                                    "type": "integer"
                                                },
                                                "room_uuid": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "group": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "code": {
                                                            "type": "string"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "group_type": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "code",
                                                        "name",
                                                        "group_type"
                                                    ]
                                                },
                                                "customer": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "name": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "external_customer_id": {
                                                            "type": "string"
                                                        },
                                                        "avatar_path": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "name",
                                                        "external_customer_id",
                                                        "avatar_path"
                                                    ]
                                                },
                                                "last_message_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last_customer_message_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last_agent_message_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "resolved_source": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "resolved_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "can_send_message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "room_id",
                                                "room_uuid",
                                                "status",
                                                "group",
                                                "customer",
                                                "last_message_at",
                                                "last_customer_message_at",
                                                "last_agent_message_at",
                                                "resolved_source",
                                                "resolved_at",
                                                "can_send_message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Anda tidak memiliki akses ke session ini."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/agent\/sessions\/{session}\/messages": {
            "get": {
                "operationId": "agent.sessions.messages",
                "summary": "GET \/api\/agent\/sessions\/{session}\/messages",
                "tags": [
                    "WebAgentChat"
                ],
                "parameters": [
                    {
                        "name": "session",
                        "in": "path",
                        "required": true,
                        "description": "The session ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "before_id",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1
                        }
                    },
                    {
                        "name": "after_id",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "chat_room_id": {
                                                        "type": "integer"
                                                    },
                                                    "session_id": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "session_number": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "sender_type": {
                                                        "type": "string"
                                                    },
                                                    "sender_agent_id": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "sender_name_snapshot": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "sender_icon_snapshot": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "message_type": {
                                                        "type": "string"
                                                    },
                                                    "text_body": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "media_url": {
                                                        "type": "null"
                                                    },
                                                    "media_mime_type": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "media_size_bytes": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "sent_at": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "chat_room_id",
                                                    "session_id",
                                                    "session_number",
                                                    "sender_type",
                                                    "sender_agent_id",
                                                    "sender_name_snapshot",
                                                    "sender_icon_snapshot",
                                                    "message_type",
                                                    "text_body",
                                                    "media_url",
                                                    "media_mime_type",
                                                    "media_size_bytes",
                                                    "sent_at"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "has_more": {
                                                    "type": "boolean"
                                                },
                                                "oldest_id": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "newest_id": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "limit": {
                                                    "type": "integer"
                                                },
                                                "session_id": {
                                                    "type": "integer"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "can_send_message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "has_more",
                                                "oldest_id",
                                                "newest_id",
                                                "limit",
                                                "session_id",
                                                "status",
                                                "can_send_message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Anda tidak memiliki akses ke session ini."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/web\/approvals": {
            "get": {
                "operationId": "web.approvals.index",
                "description": "Requests created by the authenticated user (usually a manager).",
                "summary": "GET \/api\/web\/approvals",
                "tags": [
                    "WebApproval"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "enum": [
                                "PENDING",
                                "APPROVED",
                                "REJECTED",
                                null
                            ]
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "changes": {
                                                        "type": "array",
                                                        "items": {}
                                                    },
                                                    "password_change_requested": {
                                                        "type": "boolean"
                                                    },
                                                    "reason": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "requester": {
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "email": {
                                                                "type": "string"
                                                            },
                                                            "role": {
                                                                "type": "string"
                                                            },
                                                            "is_active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "name",
                                                            "email",
                                                            "role",
                                                            "is_active"
                                                        ]
                                                    },
                                                    "target": {
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "email": {
                                                                "type": "string"
                                                            },
                                                            "role": {
                                                                "type": "string"
                                                            },
                                                            "is_active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "name",
                                                            "email",
                                                            "role",
                                                            "is_active"
                                                        ]
                                                    },
                                                    "reviewer": {
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "email": {
                                                                "type": "string"
                                                            },
                                                            "role": {
                                                                "type": "string"
                                                            },
                                                            "is_active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "name",
                                                            "email",
                                                            "role",
                                                            "is_active"
                                                        ]
                                                    },
                                                    "review_note": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "reviewed_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "created_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "updated_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "status",
                                                    "changes",
                                                    "password_change_requested",
                                                    "reason",
                                                    "requester",
                                                    "target",
                                                    "reviewer",
                                                    "review_note",
                                                    "reviewed_at",
                                                    "created_at",
                                                    "updated_at"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "string"
                                                },
                                                "last_page": {
                                                    "type": "string"
                                                },
                                                "per_page": {
                                                    "type": "string"
                                                },
                                                "total": {
                                                    "type": "string"
                                                },
                                                "from": {
                                                    "type": "string"
                                                },
                                                "to": {
                                                    "type": "string"
                                                },
                                                "has_more": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "last_page",
                                                "per_page",
                                                "total",
                                                "from",
                                                "to",
                                                "has_more"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/web\/approvals\/{approval}": {
            "get": {
                "operationId": "web.approvals.show",
                "description": "Owner of the request or an admin can read a single request.",
                "summary": "GET \/api\/web\/approvals\/{approval}",
                "tags": [
                    "WebApproval"
                ],
                "parameters": [
                    {
                        "name": "approval",
                        "in": "path",
                        "required": true,
                        "description": "The approval ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "changes": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "password_change_requested": {
                                                    "type": "boolean"
                                                },
                                                "reason": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "requester": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "email": {
                                                            "type": "string"
                                                        },
                                                        "role": {
                                                            "type": "string"
                                                        },
                                                        "is_active": {
                                                            "type": "boolean"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "name",
                                                        "email",
                                                        "role",
                                                        "is_active"
                                                    ]
                                                },
                                                "target": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "email": {
                                                            "type": "string"
                                                        },
                                                        "role": {
                                                            "type": "string"
                                                        },
                                                        "is_active": {
                                                            "type": "boolean"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "name",
                                                        "email",
                                                        "role",
                                                        "is_active"
                                                    ]
                                                },
                                                "reviewer": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "email": {
                                                            "type": "string"
                                                        },
                                                        "role": {
                                                            "type": "string"
                                                        },
                                                        "is_active": {
                                                            "type": "boolean"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "name",
                                                        "email",
                                                        "role",
                                                        "is_active"
                                                    ]
                                                },
                                                "review_note": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "reviewed_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "updated_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "status",
                                                "changes",
                                                "password_change_requested",
                                                "reason",
                                                "requester",
                                                "target",
                                                "reviewer",
                                                "review_note",
                                                "reviewed_at",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Anda tidak memiliki akses ke request ini."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/approvals": {
            "get": {
                "operationId": "admin.approvals.index",
                "description": "Every request submitted by a manager, newest first.",
                "summary": "GET \/api\/admin\/approvals",
                "tags": [
                    "WebApproval"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "enum": [
                                "PENDING",
                                "APPROVED",
                                "REJECTED",
                                null
                            ]
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 100
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "changes": {
                                                        "type": "array",
                                                        "items": {}
                                                    },
                                                    "password_change_requested": {
                                                        "type": "boolean"
                                                    },
                                                    "reason": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "requester": {
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "email": {
                                                                "type": "string"
                                                            },
                                                            "role": {
                                                                "type": "string"
                                                            },
                                                            "is_active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "name",
                                                            "email",
                                                            "role",
                                                            "is_active"
                                                        ]
                                                    },
                                                    "target": {
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "email": {
                                                                "type": "string"
                                                            },
                                                            "role": {
                                                                "type": "string"
                                                            },
                                                            "is_active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "name",
                                                            "email",
                                                            "role",
                                                            "is_active"
                                                        ]
                                                    },
                                                    "reviewer": {
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "email": {
                                                                "type": "string"
                                                            },
                                                            "role": {
                                                                "type": "string"
                                                            },
                                                            "is_active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "name",
                                                            "email",
                                                            "role",
                                                            "is_active"
                                                        ]
                                                    },
                                                    "review_note": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "reviewed_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "created_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "updated_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "status",
                                                    "changes",
                                                    "password_change_requested",
                                                    "reason",
                                                    "requester",
                                                    "target",
                                                    "reviewer",
                                                    "review_note",
                                                    "reviewed_at",
                                                    "created_at",
                                                    "updated_at"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "string"
                                                },
                                                "last_page": {
                                                    "type": "string"
                                                },
                                                "per_page": {
                                                    "type": "string"
                                                },
                                                "total": {
                                                    "type": "string"
                                                },
                                                "from": {
                                                    "type": "string"
                                                },
                                                "to": {
                                                    "type": "string"
                                                },
                                                "has_more": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "last_page",
                                                "per_page",
                                                "total",
                                                "from",
                                                "to",
                                                "has_more"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/approvals\/{approval}": {
            "get": {
                "operationId": "admin.approvals.show",
                "description": "Owner of the request or an admin can read a single request.",
                "summary": "GET \/api\/web\/approvals\/{approval}",
                "tags": [
                    "WebApproval"
                ],
                "parameters": [
                    {
                        "name": "approval",
                        "in": "path",
                        "required": true,
                        "description": "The approval ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "changes": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "password_change_requested": {
                                                    "type": "boolean"
                                                },
                                                "reason": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "requester": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "email": {
                                                            "type": "string"
                                                        },
                                                        "role": {
                                                            "type": "string"
                                                        },
                                                        "is_active": {
                                                            "type": "boolean"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "name",
                                                        "email",
                                                        "role",
                                                        "is_active"
                                                    ]
                                                },
                                                "target": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "email": {
                                                            "type": "string"
                                                        },
                                                        "role": {
                                                            "type": "string"
                                                        },
                                                        "is_active": {
                                                            "type": "boolean"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "name",
                                                        "email",
                                                        "role",
                                                        "is_active"
                                                    ]
                                                },
                                                "reviewer": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "email": {
                                                            "type": "string"
                                                        },
                                                        "role": {
                                                            "type": "string"
                                                        },
                                                        "is_active": {
                                                            "type": "boolean"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "name",
                                                        "email",
                                                        "role",
                                                        "is_active"
                                                    ]
                                                },
                                                "review_note": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "reviewed_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "updated_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "status",
                                                "changes",
                                                "password_change_requested",
                                                "reason",
                                                "requester",
                                                "target",
                                                "reviewer",
                                                "review_note",
                                                "reviewed_at",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Anda tidak memiliki akses ke request ini."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/approvals\/{approval}\/approve": {
            "post": {
                "operationId": "admin.approvals.approve",
                "description": "Apply the proposed changes to the target user.",
                "summary": "POST \/api\/admin\/approvals\/{approval}\/approve",
                "tags": [
                    "WebApproval"
                ],
                "parameters": [
                    {
                        "name": "approval",
                        "in": "path",
                        "required": true,
                        "description": "The approval ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "review_note": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 1000
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "changes": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "password_change_requested": {
                                                    "type": "boolean"
                                                },
                                                "reason": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "requester": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "email": {
                                                            "type": "string"
                                                        },
                                                        "role": {
                                                            "type": "string"
                                                        },
                                                        "is_active": {
                                                            "type": "boolean"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "name",
                                                        "email",
                                                        "role",
                                                        "is_active"
                                                    ]
                                                },
                                                "target": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "email": {
                                                            "type": "string"
                                                        },
                                                        "role": {
                                                            "type": "string"
                                                        },
                                                        "is_active": {
                                                            "type": "boolean"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "name",
                                                        "email",
                                                        "role",
                                                        "is_active"
                                                    ]
                                                },
                                                "reviewer": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "email": {
                                                            "type": "string"
                                                        },
                                                        "role": {
                                                            "type": "string"
                                                        },
                                                        "is_active": {
                                                            "type": "boolean"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "name",
                                                        "email",
                                                        "role",
                                                        "is_active"
                                                    ]
                                                },
                                                "review_note": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "reviewed_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "updated_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "status",
                                                "changes",
                                                "password_change_requested",
                                                "reason",
                                                "requester",
                                                "target",
                                                "reviewer",
                                                "review_note",
                                                "reviewed_at",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/admin\/approvals\/{approval}\/reject": {
            "post": {
                "operationId": "admin.approvals.reject",
                "description": "Reject a request with a required note; the target user is not modified.",
                "summary": "POST \/api\/admin\/approvals\/{approval}\/reject",
                "tags": [
                    "WebApproval"
                ],
                "parameters": [
                    {
                        "name": "approval",
                        "in": "path",
                        "required": true,
                        "description": "The approval ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "review_note": {
                                        "type": "string",
                                        "maxLength": 1000
                                    }
                                },
                                "required": [
                                    "review_note"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "changes": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "password_change_requested": {
                                                    "type": "boolean"
                                                },
                                                "reason": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "requester": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "email": {
                                                            "type": "string"
                                                        },
                                                        "role": {
                                                            "type": "string"
                                                        },
                                                        "is_active": {
                                                            "type": "boolean"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "name",
                                                        "email",
                                                        "role",
                                                        "is_active"
                                                    ]
                                                },
                                                "target": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "email": {
                                                            "type": "string"
                                                        },
                                                        "role": {
                                                            "type": "string"
                                                        },
                                                        "is_active": {
                                                            "type": "boolean"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "name",
                                                        "email",
                                                        "role",
                                                        "is_active"
                                                    ]
                                                },
                                                "reviewer": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "email": {
                                                            "type": "string"
                                                        },
                                                        "role": {
                                                            "type": "string"
                                                        },
                                                        "is_active": {
                                                            "type": "boolean"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "name",
                                                        "email",
                                                        "role",
                                                        "is_active"
                                                    ]
                                                },
                                                "review_note": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "reviewed_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "updated_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "status",
                                                "changes",
                                                "password_change_requested",
                                                "reason",
                                                "requester",
                                                "target",
                                                "reviewer",
                                                "review_note",
                                                "reviewed_at",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/web\/auth\/login": {
            "post": {
                "operationId": "web.login",
                "summary": "Exchange an email + password for a Sanctum token used by the web\ndashboard front-end (Next.js) to call the dashboard API",
                "tags": [
                    "WebAuth"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "format": "email",
                                        "maxLength": 255
                                    },
                                    "password": {
                                        "type": "string"
                                    },
                                    "device_name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    }
                                },
                                "required": [
                                    "email",
                                    "password"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "token": {
                                            "type": "string"
                                        },
                                        "token_type": {
                                            "type": "string",
                                            "const": "Bearer"
                                        },
                                        "abilities": {
                                            "type": "array",
                                            "prefixItems": [
                                                {
                                                    "type": "string",
                                                    "const": "admin:access"
                                                }
                                            ],
                                            "minItems": 1,
                                            "maxItems": 1
                                        },
                                        "expires_at": {
                                            "type": "string"
                                        },
                                        "expires_in": {
                                            "type": "integer"
                                        },
                                        "user": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "email": {
                                                    "type": "string"
                                                },
                                                "role": {
                                                    "type": "string"
                                                },
                                                "is_active": {
                                                    "type": "boolean"
                                                },
                                                "password_expired_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last_login_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "agent": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "id": {
                                                            "type": "string"
                                                        },
                                                        "agent_type": {
                                                            "type": "string"
                                                        },
                                                        "is_active": {
                                                            "type": "string"
                                                        },
                                                        "groups": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "agent_type",
                                                        "is_active",
                                                        "groups"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "email",
                                                "role",
                                                "is_active",
                                                "password_expired_at",
                                                "last_login_at",
                                                "agent"
                                            ]
                                        },
                                        "broadcasting": {
                                            "type": "object",
                                            "properties": {
                                                "auth_endpoint": {
                                                    "type": "string"
                                                },
                                                "channel_prefix": {
                                                    "type": "string",
                                                    "const": "private-chat-"
                                                }
                                            },
                                            "required": [
                                                "auth_endpoint",
                                                "channel_prefix"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "token",
                                        "token_type",
                                        "abilities",
                                        "expires_at",
                                        "expires_in",
                                        "user",
                                        "broadcasting"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Password telah kedaluwarsa. Silakan perbarui password Anda."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Email atau password tidak valid."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/web\/auth\/forgot-password": {
            "post": {
                "operationId": "web.forgot-password",
                "summary": "Request a magic link for password reset (manager & agent only)",
                "tags": [
                    "WebAuth"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "format": "email",
                                        "maxLength": 255
                                    }
                                },
                                "required": [
                                    "email"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Magic link reset password telah dikirim ke alamat email Anda."
                                        },
                                        "email": {
                                            "type": "string"
                                        },
                                        "magic_link": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "email",
                                        "magic_link"
                                    ]
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Gagal mengirim email reset password. Pastikan konfigurasi SMTP email benar."
                                        },
                                        "error": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/web\/auth\/reset-password": {
            "post": {
                "operationId": "web.reset-password",
                "summary": "Reset the user password using the token from magic link",
                "tags": [
                    "WebAuth"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "format": "email",
                                        "maxLength": 255
                                    },
                                    "token": {
                                        "type": "string"
                                    },
                                    "password": {
                                        "type": "string"
                                    },
                                    "password_confirmation": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "email",
                                    "token",
                                    "password",
                                    "password_confirmation"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Password berhasil direset. Silakan login menggunakan password baru Anda."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/web\/auth\/reset-password\/validate": {
            "get": {
                "operationId": "web.reset-password.validate",
                "summary": "Validate a reset password token (read-only check)",
                "tags": [
                    "WebAuth"
                ],
                "parameters": [
                    {
                        "name": "email",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "token",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "valid": {
                                                    "type": "boolean"
                                                },
                                                "expiresAt": {
                                                    "type": "string"
                                                },
                                                "serverNow": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "valid",
                                                "expiresAt",
                                                "serverNow"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "valid": {
                                                    "type": "boolean"
                                                },
                                                "reason": {
                                                    "type": "string",
                                                    "const": "expired"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "Link reset password ini sudah kadaluarsa karena telah ada permintaan link reset password yang lebih baru. Silahkan minta link baru melalui fitur lupa password di halaman login atau gunakan link terbaru yang telah dikirim."
                                                },
                                                "serverNow": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "valid",
                                                "reason",
                                                "message",
                                                "serverNow"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "valid": {
                                                    "type": "boolean"
                                                },
                                                "reason": {
                                                    "type": "string",
                                                    "const": "expired"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "Link reset password sudah kadaluarsa karena telah melewati batas waktu 60 menit. Silahkan minta link baru melalui fitur lupa password di halaman login."
                                                },
                                                "serverNow": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "valid",
                                                "reason",
                                                "message",
                                                "serverNow"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "valid": {
                                                    "type": "boolean"
                                                },
                                                "reason": {
                                                    "type": "string",
                                                    "const": "missing"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "Token reset password tidak ditemukan atau sudah digunakan. Silahkan minta link baru melalui fitur lupa password di halaman login."
                                                },
                                                "serverNow": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "valid",
                                                "reason",
                                                "message",
                                                "serverNow"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "valid": {
                                                    "type": "boolean"
                                                },
                                                "reason": {
                                                    "type": "string",
                                                    "const": "invalid"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "Reset password hanya dapat dilakukan untuk akun manager dan agent."
                                                },
                                                "serverNow": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "valid",
                                                "reason",
                                                "message",
                                                "serverNow"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "valid": {
                                                    "type": "boolean"
                                                },
                                                "reason": {
                                                    "type": "string",
                                                    "const": "invalid"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "Akun dengan email ini tidak ditemukan atau sedang tidak aktif."
                                                },
                                                "serverNow": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "valid",
                                                "reason",
                                                "message",
                                                "serverNow"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "valid": {
                                                    "type": "boolean"
                                                },
                                                "reason": {
                                                    "type": "string",
                                                    "const": "missing"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "Token reset password tidak ditemukan atau tidak valid. Silahkan minta link baru melalui fitur lupa password di halaman login."
                                                },
                                                "serverNow": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "valid",
                                                "reason",
                                                "message",
                                                "serverNow"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/web\/auth\/password\/email": {
            "post": {
                "operationId": "web.password.email",
                "summary": "Request a magic link for password reset (manager & agent only)",
                "tags": [
                    "WebAuth"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "format": "email",
                                        "maxLength": 255
                                    }
                                },
                                "required": [
                                    "email"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Magic link reset password telah dikirim ke alamat email Anda."
                                        },
                                        "email": {
                                            "type": "string"
                                        },
                                        "magic_link": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "email",
                                        "magic_link"
                                    ]
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Gagal mengirim email reset password. Pastikan konfigurasi SMTP email benar."
                                        },
                                        "error": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "error"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/web\/auth\/password\/reset": {
            "post": {
                "operationId": "web.password.reset",
                "summary": "Reset the user password using the token from magic link",
                "tags": [
                    "WebAuth"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "format": "email",
                                        "maxLength": 255
                                    },
                                    "token": {
                                        "type": "string"
                                    },
                                    "password": {
                                        "type": "string"
                                    },
                                    "password_confirmation": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "email",
                                    "token",
                                    "password",
                                    "password_confirmation"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Password berhasil direset. Silakan login menggunakan password baru Anda."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/web\/auth\/password\/reset\/validate": {
            "get": {
                "operationId": "web.password.reset.validate",
                "summary": "Validate a reset password token (read-only check)",
                "tags": [
                    "WebAuth"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "valid": {
                                                    "type": "boolean"
                                                },
                                                "expiresAt": {
                                                    "type": "string"
                                                },
                                                "serverNow": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "valid",
                                                "expiresAt",
                                                "serverNow"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "valid": {
                                                    "type": "boolean"
                                                },
                                                "reason": {
                                                    "type": "string",
                                                    "const": "expired"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "Link reset password ini sudah kadaluarsa karena telah ada permintaan link reset password yang lebih baru. Silahkan minta link baru melalui fitur lupa password di halaman login atau gunakan link terbaru yang telah dikirim."
                                                },
                                                "serverNow": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "valid",
                                                "reason",
                                                "message",
                                                "serverNow"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "valid": {
                                                    "type": "boolean"
                                                },
                                                "reason": {
                                                    "type": "string",
                                                    "const": "expired"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "Link reset password sudah kadaluarsa karena telah melewati batas waktu 60 menit. Silahkan minta link baru melalui fitur lupa password di halaman login."
                                                },
                                                "serverNow": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "valid",
                                                "reason",
                                                "message",
                                                "serverNow"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "valid": {
                                                    "type": "boolean"
                                                },
                                                "reason": {
                                                    "type": "string",
                                                    "const": "missing"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "Token reset password tidak ditemukan atau sudah digunakan. Silahkan minta link baru melalui fitur lupa password di halaman login."
                                                },
                                                "serverNow": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "valid",
                                                "reason",
                                                "message",
                                                "serverNow"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "valid": {
                                                    "type": "boolean"
                                                },
                                                "reason": {
                                                    "type": "string",
                                                    "const": "invalid"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "Reset password hanya dapat dilakukan untuk akun manager dan agent."
                                                },
                                                "serverNow": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "valid",
                                                "reason",
                                                "message",
                                                "serverNow"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "valid": {
                                                    "type": "boolean"
                                                },
                                                "reason": {
                                                    "type": "string",
                                                    "const": "invalid"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "Akun dengan email ini tidak ditemukan atau sedang tidak aktif."
                                                },
                                                "serverNow": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "valid",
                                                "reason",
                                                "message",
                                                "serverNow"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "valid": {
                                                    "type": "boolean"
                                                },
                                                "reason": {
                                                    "type": "string",
                                                    "const": "missing"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "Token reset password tidak ditemukan atau tidak valid. Silahkan minta link baru melalui fitur lupa password di halaman login."
                                                },
                                                "serverNow": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "valid",
                                                "reason",
                                                "message",
                                                "serverNow"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/auth\/reset-password\/validate": {
            "get": {
                "operationId": "auth.reset-password.validate",
                "summary": "Validate a reset password token (read-only check)",
                "tags": [
                    "WebAuth"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "valid": {
                                                    "type": "boolean"
                                                },
                                                "expiresAt": {
                                                    "type": "string"
                                                },
                                                "serverNow": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "valid",
                                                "expiresAt",
                                                "serverNow"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "valid": {
                                                    "type": "boolean"
                                                },
                                                "reason": {
                                                    "type": "string",
                                                    "const": "expired"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "Link reset password ini sudah kadaluarsa karena telah ada permintaan link reset password yang lebih baru. Silahkan minta link baru melalui fitur lupa password di halaman login atau gunakan link terbaru yang telah dikirim."
                                                },
                                                "serverNow": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "valid",
                                                "reason",
                                                "message",
                                                "serverNow"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "valid": {
                                                    "type": "boolean"
                                                },
                                                "reason": {
                                                    "type": "string",
                                                    "const": "expired"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "Link reset password sudah kadaluarsa karena telah melewati batas waktu 60 menit. Silahkan minta link baru melalui fitur lupa password di halaman login."
                                                },
                                                "serverNow": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "valid",
                                                "reason",
                                                "message",
                                                "serverNow"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "valid": {
                                                    "type": "boolean"
                                                },
                                                "reason": {
                                                    "type": "string",
                                                    "const": "missing"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "Token reset password tidak ditemukan atau sudah digunakan. Silahkan minta link baru melalui fitur lupa password di halaman login."
                                                },
                                                "serverNow": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "valid",
                                                "reason",
                                                "message",
                                                "serverNow"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "valid": {
                                                    "type": "boolean"
                                                },
                                                "reason": {
                                                    "type": "string",
                                                    "const": "invalid"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "Reset password hanya dapat dilakukan untuk akun manager dan agent."
                                                },
                                                "serverNow": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "valid",
                                                "reason",
                                                "message",
                                                "serverNow"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "valid": {
                                                    "type": "boolean"
                                                },
                                                "reason": {
                                                    "type": "string",
                                                    "const": "invalid"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "Akun dengan email ini tidak ditemukan atau sedang tidak aktif."
                                                },
                                                "serverNow": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "valid",
                                                "reason",
                                                "message",
                                                "serverNow"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "valid": {
                                                    "type": "boolean"
                                                },
                                                "reason": {
                                                    "type": "string",
                                                    "const": "missing"
                                                },
                                                "message": {
                                                    "type": "string",
                                                    "const": "Token reset password tidak ditemukan atau tidak valid. Silahkan minta link baru melalui fitur lupa password di halaman login."
                                                },
                                                "serverNow": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "valid",
                                                "reason",
                                                "message",
                                                "serverNow"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/web\/me": {
            "get": {
                "operationId": "web.me",
                "summary": "Return the currently authenticated dashboard user",
                "tags": [
                    "WebAuth"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "user": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "email": {
                                                    "type": "string"
                                                },
                                                "role": {
                                                    "type": "string"
                                                },
                                                "is_active": {
                                                    "type": "boolean"
                                                },
                                                "password_expired_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last_login_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "agent": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "id": {
                                                            "type": "string"
                                                        },
                                                        "agent_type": {
                                                            "type": "string"
                                                        },
                                                        "is_active": {
                                                            "type": "string"
                                                        },
                                                        "groups": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "agent_type",
                                                        "is_active",
                                                        "groups"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "email",
                                                "role",
                                                "is_active",
                                                "password_expired_at",
                                                "last_login_at",
                                                "agent"
                                            ]
                                        },
                                        "token_expires_at": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "user",
                                        "token_expires_at"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/web\/auth\/logout": {
            "post": {
                "operationId": "web.logout",
                "summary": "Revoke the token used for the current request",
                "tags": [
                    "WebAuth"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Token dicabut."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/web\/profile": {
            "put": {
                "operationId": "web.profile.update",
                "summary": "Update the authenticated admin or manager's own profile (name, email)",
                "tags": [
                    "WebAuth"
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "email": {
                                        "type": "string",
                                        "format": "email",
                                        "maxLength": 255
                                    },
                                    "reason": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 1000
                                    },
                                    "password": {
                                        "type": "string"
                                    },
                                    "current_password": {
                                        "type": "string"
                                    },
                                    "password_confirmation": {
                                        "type": "string"
                                    },
                                    "role": {
                                        "type": "string"
                                    },
                                    "is_active": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "user": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "email": {
                                                    "type": "string"
                                                },
                                                "role": {
                                                    "type": "string"
                                                },
                                                "is_active": {
                                                    "type": "boolean"
                                                },
                                                "password_expired_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last_login_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "agent": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "id": {
                                                            "type": "string"
                                                        },
                                                        "agent_type": {
                                                            "type": "string"
                                                        },
                                                        "is_active": {
                                                            "type": "string"
                                                        },
                                                        "groups": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "agent_type",
                                                        "is_active",
                                                        "groups"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "email",
                                                "role",
                                                "is_active",
                                                "password_expired_at",
                                                "last_login_at",
                                                "agent"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "user"
                                    ]
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Perubahan profil manager diajukan untuk persetujuan admin."
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "approval_id": {
                                                    "type": "integer"
                                                },
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "changes": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "password_change_requested": {
                                                    "type": "boolean"
                                                },
                                                "reason": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "requester": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "email": {
                                                            "type": "string"
                                                        },
                                                        "role": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "name",
                                                        "email",
                                                        "role"
                                                    ]
                                                },
                                                "target": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "id": {
                                                            "type": "integer"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "email": {
                                                            "type": "string"
                                                        },
                                                        "role": {
                                                            "type": "string"
                                                        },
                                                        "is_active": {
                                                            "type": "boolean"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "name",
                                                        "email",
                                                        "role",
                                                        "is_active"
                                                    ]
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "updated_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "approval_id",
                                                "id",
                                                "status",
                                                "changes",
                                                "password_change_requested",
                                                "reason",
                                                "requester",
                                                "target",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Hanya admin dan manager yang dapat mengubah profil."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "AgentGroup": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "code": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "group_type": {
                        "type": "string"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "code",
                    "name",
                    "group_type",
                    "description",
                    "is_active",
                    "created_at",
                    "updated_at"
                ],
                "title": "AgentGroup"
            },
            "ChatMessage": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "chat_room_id": {
                        "type": "integer"
                    },
                    "session_id": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "sender_type": {
                        "type": "string"
                    },
                    "sender_agent_id": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "sender_name_snapshot": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "sender_icon_snapshot": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "message_type": {
                        "type": "string"
                    },
                    "text_body": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "media_path": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "media_mime_type": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "media_size_bytes": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "sent_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "chat_room_id",
                    "session_id",
                    "sender_type",
                    "sender_agent_id",
                    "sender_name_snapshot",
                    "sender_icon_snapshot",
                    "message_type",
                    "text_body",
                    "media_path",
                    "media_mime_type",
                    "media_size_bytes",
                    "sent_at",
                    "created_at",
                    "updated_at"
                ],
                "title": "ChatMessage"
            },
            "MessageBag": {
                "type": "object",
                "additionalProperties": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "title": "MessageBag"
            }
        },
        "responses": {
            "ValidationException": {
                "description": "Validation error",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Errors overview."
                                },
                                "errors": {
                                    "type": "object",
                                    "description": "A detailed description of each field that failed validation.",
                                    "additionalProperties": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "required": [
                                "message",
                                "errors"
                            ]
                        }
                    }
                }
            },
            "AuthenticationException": {
                "description": "Unauthenticated",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            },
            "ModelNotFoundException": {
                "description": "Not found",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            }
        }
    }
}