more bug fix
This commit is contained in:
parent
ad638e960f
commit
82623c0df8
|
@ -13,7 +13,7 @@ class TicketService
|
|||
}
|
||||
|
||||
/**
|
||||
* دریافت ابزارهای مربوط به تیکتها
|
||||
* Get the available tools for ticket management
|
||||
* @return array
|
||||
*/
|
||||
public function getTools(): array
|
||||
|
@ -21,60 +21,88 @@ class TicketService
|
|||
return [
|
||||
[
|
||||
'name' => 'get_user_tickets',
|
||||
'description' => 'دریافت لیست تیکتهای کاربر',
|
||||
'description' => 'Retrieve a list of tickets for the current user',
|
||||
'parameters' => [
|
||||
'type' => 'object',
|
||||
'properties' => [
|
||||
'user' => [
|
||||
'type' => 'object',
|
||||
'description' => 'کاربر درخواست کننده'
|
||||
'user_id' => [
|
||||
'type' => 'string',
|
||||
'description' => 'The ID of the user whose tickets to retrieve'
|
||||
],
|
||||
'status' => [
|
||||
'type' => 'string',
|
||||
'description' => 'Filter tickets by status (optional)',
|
||||
'enum' => ['open', 'closed', 'pending']
|
||||
]
|
||||
],
|
||||
'required' => ['user']
|
||||
'required' => ['user_id']
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => 'create_or_update_ticket',
|
||||
'description' => 'ایجاد یا بهروزرسانی تیکت',
|
||||
'description' => 'Create a new ticket or update an existing one',
|
||||
'parameters' => [
|
||||
'type' => 'object',
|
||||
'properties' => [
|
||||
'params' => [
|
||||
'type' => 'object',
|
||||
'description' => 'پارامترهای تیکت'
|
||||
],
|
||||
'files' => [
|
||||
'type' => 'array',
|
||||
'description' => 'فایلهای پیوست'
|
||||
],
|
||||
'user' => [
|
||||
'type' => 'object',
|
||||
'description' => 'کاربر درخواست کننده'
|
||||
],
|
||||
'id' => [
|
||||
'ticket_id' => [
|
||||
'type' => 'string',
|
||||
'description' => 'شناسه تیکت (برای بهروزرسانی)'
|
||||
]
|
||||
'description' => 'Ticket ID (required for updates, omit for new tickets)'
|
||||
],
|
||||
'subject' => [
|
||||
'type' => 'string',
|
||||
'description' => 'The subject/title of the ticket'
|
||||
],
|
||||
'message' => [
|
||||
'type' => 'string',
|
||||
'description' => 'The ticket message or description'
|
||||
],
|
||||
'priority' => [
|
||||
'type' => 'string',
|
||||
'description' => 'Ticket priority level',
|
||||
'enum' => ['low', 'medium', 'high']
|
||||
],
|
||||
'department' => [
|
||||
'type' => 'string',
|
||||
'description' => 'The department this ticket belongs to',
|
||||
'enum' => ['technical', 'financial', 'general']
|
||||
],
|
||||
'attachments' => [
|
||||
'type' => 'array',
|
||||
'description' => 'Array of file attachments',
|
||||
'items' => [
|
||||
'type' => 'object',
|
||||
'properties' => [
|
||||
'filename' => [
|
||||
'type' => 'string',
|
||||
'description' => 'Name of the attached file'
|
||||
],
|
||||
'content' => [
|
||||
'type' => 'string',
|
||||
'description' => 'Base64 encoded content of the file'
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
'required' => ['params', 'files', 'user']
|
||||
'required' => ['subject', 'message', 'priority', 'department']
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => 'get_ticket_details',
|
||||
'description' => 'دریافت جزئیات تیکت و پاسخهای آن',
|
||||
'description' => 'Get detailed information about a specific ticket including its conversation history',
|
||||
'parameters' => [
|
||||
'type' => 'object',
|
||||
'properties' => [
|
||||
'id' => [
|
||||
'ticket_id' => [
|
||||
'type' => 'string',
|
||||
'description' => 'شناسه تیکت'
|
||||
'description' => 'The unique identifier of the ticket'
|
||||
],
|
||||
'user' => [
|
||||
'type' => 'object',
|
||||
'description' => 'کاربر درخواست کننده'
|
||||
'include_messages' => [
|
||||
'type' => 'boolean',
|
||||
'description' => 'Whether to include the full conversation history'
|
||||
]
|
||||
],
|
||||
'required' => ['id', 'user']
|
||||
'required' => ['ticket_id']
|
||||
]
|
||||
]
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue