Composables
useXAdminSupport
Provides admin actions for support ticket assignment, closure, and replies against the support queue API.
useXAdminSupport
Support queue composable. Wraps /api/admin/support/* endpoints with typed async methods for assigning tickets to agents, closing resolved tickets, and posting replies — optionally closing on reply. Pairs with XAdminSupportTickets and XAdminSupportTicketsDetail.
Usage
const support = useXAdminSupport()
await support.assignTicket(ticketId, agentId)
await support.closeTicket(ticketId, "Resolved")
await support.replyToTicket(ticketId, "Hello!", { close: true })
Returns
| Key | Type | Description |
|---|---|---|
assignTicket | (ticketId: string, agentId: string) => Promise<void> | Assigns a support ticket to a specific agent. |
closeTicket | (ticketId: string, resolution?: string) => Promise<void> | Closes a ticket with an optional resolution note. |
replyToTicket | (ticketId: string, message: string, opts?: { close: boolean }) => Promise<void> | Posts a reply to a ticket and optionally closes it in the same request. |
AI Context
composable: useXAdminSupport
package: "@xenterprises/nuxt-x-app-admin"
use-when: >
Working with the support ticket queue in the admin panel — assigning tickets
to agents, closing resolved tickets, or posting replies with optional auto-close.
pairs-with: XAdminSupportTickets, XAdminSupportTicketsDetail
