{"swagger":"2.0","info":{"version":"1.0.0","title":"Ticketing App","description":"API documentation for managing tickets, ticket types, ticket statuses, ticket priorities, accounts,roles,teams, tickets and Authentication","license":{"name":"MIT","url":"https://opensource.org/licenses/MIT"}},"host":"localhost:8118","basePath":"","tags":[{"name":"TicketTypes","description":"API for managing ticket types in the system"},{"name":"TicketStatus","description":"API for managing ticket statuses in the system"},{"name":"TicketPriority","description":"API for managing ticket priorities in the system"},{"name":"TicketTags","description":"API for managing ticket tags in the system"},{"name":"Accounts","description":"API for managing user accounts"},{"name":"Roles","description":"API for managing user roles"},{"name":"Teams","description":"API for managing teams"},{"name":"Tickets","description":"API for managing tickets"},{"name":"Settings","description":"API for managing settings"},{"name":"Messages","description":"API for managing tickets"},{"name":"Dashboard","description":"API for managing dashboard"},{"name":"Notifications","description":"API for managing notifications"}],"schemes":["http"],"consumes":["application/json"],"produces":["application/json"],"securityDefinitions":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"security":[{"BearerAuth":[]}],"paths":{"/notifications/create":{"post":{"tags":["Notifications"],"summary":"Create a new notification","parameters":[{"name":"body","in":"body","description":"data to create new notification","required":true,"schema":{"$ref":"#/definitions/CreateNotification"}}],"responses":{"200":{"description":"New ticket type is created"}},"security":[{"BearerAuth":[]}]}},"/notifications/update":{"post":{"tags":["Notifications"],"summary":"update notification by notification id","parameters":[{"name":"notificationId","in":"query","description":"id which need to be updated","required":true}],"responses":{"200":{"description":"Notification updated succesfully"}},"security":[{"BearerAuth":[]}]}},"/notifications/updateAll":{"post":{"tags":["Notifications"],"summary":"update notification by owner id","parameters":[{"name":"ownerId","in":"query","description":"owner id which need to be updated","required":true}],"responses":{"200":{"description":"Notifications updated succesfully"}},"security":[{"BearerAuth":[]}]}},"/notifications/list":{"get":{"tags":["Notifications"],"summary":"List all unread notification owner id","parameters":[{"name":"ownerId","in":"query","description":"owner id whose unread notification are to be listed","required":true}],"responses":{"200":{"description":"List of unread Notifications"}},"security":[{"BearerAuth":[]}]}},"/ticketTypes/createTicketType":{"post":{"tags":["TicketTypes"],"summary":"Create a new ticket type","parameters":[{"name":"body","in":"body","description":"Ticket type data to create","required":true,"schema":{"$ref":"#/definitions/CreateTicketType"}}],"responses":{"200":{"description":"New ticket type is created","schema":{"$ref":"#/definitions/TicketType"}}},"security":[{"BearerAuth":[]}]}},"/ticketTypes/getTicketType":{"get":{"tags":["TicketTypes"],"summary":"Get all ticket types","responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/TicketType"}}},"security":[{"BearerAuth":[]}]}}},"/ticketTypes/getTicketType/{id}":{"get":{"tags":["TicketTypes"],"summary":"Get a ticket type by ID","parameters":[{"name":"id","in":"path","required":true,"description":"ID of the ticket type","type":"string"}],"responses":{"200":{"description":"Ticket type is found","schema":{"$ref":"#/definitions/TicketType"}}},"security":[{"BearerAuth":[]}]}},"/ticketTypes/updateTicketType/{id}":{"post":{"tags":["TicketTypes"],"summary":"Update a ticket type by ID","parameters":[{"name":"id","in":"path","required":true,"description":"ID of the ticket type to update","type":"string"},{"name":"body","in":"body","description":"Updated ticket type data","required":true,"schema":{"$ref":"#/definitions/UpdateTicketTypeRequest"}}],"responses":{"200":{"description":"Ticket type is updated","schema":{"$ref":"#/definitions/TicketType"}}},"security":[{"BearerAuth":[]}]}},"/ticketTypes/deleteTicketType/{id}":{"post":{"tags":["TicketTypes"],"summary":"Delete a ticket type by ID","parameters":[{"name":"id","in":"path","required":true,"description":"ID of the ticket type to delete","type":"string"}],"responses":{"200":{"description":"Ticket type is deleted","schema":{"$ref":"#/definitions/TicketType"}}},"security":[{"BearerAuth":[]}]}},"/ticketStatuses/createTicketStatus":{"post":{"tags":["TicketStatus"],"summary":"Create a new ticket status","parameters":[{"name":"body","in":"body","description":"Ticket status data to create","required":true,"schema":{"$ref":"#/definitions/CreateTicketStatus"}}],"responses":{"201":{"description":"New ticket status is created","schema":{"$ref":"#/definitions/TicketStatus"}}},"security":[{"BearerAuth":[]}]}},"/ticketStatuses/updateTicketStatus/{id}":{"post":{"tags":["TicketStatus"],"summary":"Update a ticket status by ID","parameters":[{"name":"id","in":"path","required":true,"description":"ID of the ticket status to update","type":"string"},{"name":"body","in":"body","description":"Updated ticket status data","required":true,"schema":{"$ref":"#/definitions/UpdateTicketStatusRequest"}}],"responses":{"200":{"description":"Ticket status is updated","schema":{"$ref":"#/definitions/TicketStatus"}}},"security":[{"BearerAuth":[]}]}},"/ticketStatuses/getTicketStatus/{id}":{"get":{"tags":["TicketStatus"],"summary":"Get a ticket status by ID","parameters":[{"name":"id","in":"path","required":true,"description":"ID of the ticket status","type":"string"}],"responses":{"200":{"description":"Ticket status is found","schema":{"$ref":"#/definitions/TicketStatus"}}},"security":[{"BearerAuth":[]}]}},"/ticketStatuses/getTicketStatus":{"get":{"tags":["TicketStatus"],"summary":"Get all ticket statuses","responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/TicketStatus"}}},"security":[{"BearerAuth":[]}]}}},"/ticketStatuses/deleteTicketStatus/{id}":{"post":{"tags":["TicketStatus"],"summary":"Delete a ticket status by ID","parameters":[{"name":"id","in":"path","required":true,"description":"ID of the ticket status to delete","type":"string"}],"responses":{"200":{"description":"Ticket status is deleted","schema":{"$ref":"#/definitions/TicketStatus"}}},"security":[{"BearerAuth":[]}]}},"/ticketPriorities/createTicketPriority":{"post":{"tags":["TicketPriority"],"summary":"Create a new ticket priority","parameters":[{"name":"body","in":"body","description":"Ticket priority data to create","required":true,"schema":{"$ref":"#/definitions/CreateTicketPriority"}}],"responses":{"201":{"description":"New ticket priority is created","schema":{"$ref":"#/definitions/TicketPriority"}}},"security":[{"BearerAuth":[]}]}},"/ticketPriorities/updateTicketPriority/{id}":{"post":{"tags":["TicketPriority"],"summary":"Update a ticket priority by ID","parameters":[{"name":"id","in":"path","required":true,"description":"ID of the ticket priority to update","type":"string"},{"name":"body","in":"body","description":"Updated ticket priority data","required":true,"schema":{"$ref":"#/definitions/UpdateTicketPriorityRequest"}}],"responses":{"200":{"description":"Ticket priority is updated","schema":{"$ref":"#/definitions/TicketPriority"}}},"security":[{"BearerAuth":[]}]}},"/ticketPriorities/getTicketPriority/{id}":{"get":{"tags":["TicketPriority"],"summary":"Get a ticket priority by ID","parameters":[{"name":"id","in":"path","required":true,"description":"ID of the ticket priority","type":"string"}],"responses":{"200":{"description":"Ticket priority is found","schema":{"$ref":"#/definitions/TicketPriority"}}},"security":[{"BearerAuth":[]}]}},"/ticketPriorities/getTicketPriority":{"get":{"tags":["TicketPriority"],"summary":"Get all ticket priorities","responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/TicketPriority"}}},"security":[{"BearerAuth":[]}]}}},"/ticketPriorities/deleteTicketPriority/{id}":{"post":{"tags":["TicketPriority"],"summary":"Delete a ticket priority by ID","parameters":[{"name":"id","in":"path","required":true,"description":"ID of the ticket priority to delete","type":"string"}],"responses":{"200":{"description":"Ticket priority is deleted","schema":{"$ref":"#/definitions/TicketPriority"}}},"security":[{"BearerAuth":[]}]}},"/ticketTags/createTicketTag":{"post":{"tags":["TicketTags"],"summary":"Create a new ticket tag","parameters":[{"name":"body","in":"body","description":"Ticket tag data to create","required":true,"schema":{"$ref":"#/definitions/CreateTicketTag"}}],"responses":{"201":{"description":"New ticket tag is created","schema":{"$ref":"#/definitions/TicketTag"}}},"security":[{"BearerAuth":[]}]}},"/ticketTags/updateTicketTag/{id}":{"post":{"tags":["TicketTags"],"summary":"Update a ticket tag by ID","parameters":[{"name":"id","in":"path","required":true,"description":"ID of the ticket tag to update","type":"string"},{"name":"body","in":"body","description":"Updated ticket tag data","required":true,"schema":{"$ref":"#/definitions/UpdateTicketTagRequest"}}],"responses":{"200":{"description":"Ticket tag is updated","schema":{"$ref":"#/definitions/TicketTag"}}},"security":[{"BearerAuth":[]}]}},"/ticketTags/getTicketTag/{id}":{"get":{"tags":["TicketTags"],"summary":"Get a ticket tag by ID","parameters":[{"name":"id","in":"path","required":true,"description":"ID of the ticket tag","type":"string"}],"responses":{"200":{"description":"Ticket tag is found","schema":{"$ref":"#/definitions/TicketTag"}}},"security":[{"BearerAuth":[]}]}},"/ticketTags/getTicketTag":{"get":{"tags":["TicketTags"],"summary":"Get all ticket tags","responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/TicketTag"}}},"security":[{"BearerAuth":[]}]}}},"/ticketTags/deleteTicketTag/{id}":{"post":{"tags":["TicketTags"],"summary":"Delete a ticket tag by ID","parameters":[{"name":"id","in":"path","required":true,"description":"ID of the ticket tag to delete","type":"string"}],"responses":{"200":{"description":"Ticket tag is deleted","schema":{"$ref":"#/definitions/TicketTag"}}},"security":[{"BearerAuth":[]}]}},"/account/create":{"post":{"tags":["Accounts"],"summary":"Create a new user account","parameters":[{"name":"body","in":"body","description":"User account data to create","required":true,"schema":{"$ref":"#/definitions/CreateAccountRequest"}}],"responses":{"200":{"description":"Account created Successfully","schema":{"$ref":"#/definitions/Account"}}},"security":[{"BearerAuth":[]}]}},"/account/iceuser/create":{"post":{"tags":["Accounts"],"summary":"New ice user","description":"create new ice user","parameters":[{"name":"Authorization","in":"header","description":"JWT token for authentication","required":true,"type":"string","default":"Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZW5hbnRAdnZkbnRlY2guaW4iLCJ1c2VySWQiOiJiNDIxNWQ3MC0x1."}],"responses":{"200":{"description":"User created successfully","schema":{"type":"object","properties":{"token":{"type":"string","description":"JWT token for authentication","example":"Bearer your_jwt_token_here"}}}},"400":{"description":"Bad Request","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}}},"500":{"description":"Internal Server Error","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}}}}}},"/account/iceuser/delete":{"post":{"tags":["Accounts"],"summary":"delete ice user","description":"delete ice user","parameters":[{"name":"Authorization","in":"header","description":"JWT token for authentication","required":true,"type":"string","default":"Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZW5hbnRAdnZkbnRlY2guaW4iLCJ1c2VySWQiOiJiNDIxNWQ3MC0x1."}],"responses":{"200":{"description":"User deleted successfully","schema":{"type":"object","properties":{"token":{"type":"string","description":"JWT token for authentication","example":"Bearer your_jwt_token_here"}}}},"400":{"description":"Bad Request","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}}},"500":{"description":"Internal Server Error","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}}}}}},"/account/list":{"get":{"tags":["Accounts"],"summary":"Get user accounts","parameters":[{"name":"type","in":"query","description":"Type of accounts (all, users, admins)","type":"string","default":"users"},{"name":"limit","in":"query","description":"Maximum number of accounts to retrieve","type":"integer","default":25},{"name":"page","in":"query","description":"Page number for pagination","type":"integer","default":0}],"responses":{"200":{"description":"Accounts fetched successfully","schema":{"type":"array","items":{"$ref":"#/definitions/Account"}}}},"security":[{"BearerAuth":[]}]}},"/account/update/{id}":{"post":{"tags":["Accounts"],"summary":"Update user account by ID","parameters":[{"name":"id","in":"path","description":"ID of the user account to update","type":"string","required":true},{"name":"body","in":"body","description":"Updated user account data","required":true,"schema":{"$ref":"#/definitions/UpdateAccountRequest"}}],"responses":{"200":{"description":"Account updated successfully","schema":{"$ref":"#/definitions/Account"}}},"security":[{"BearerAuth":[]}]}},"/account/delete/{id}":{"delete":{"tags":["Accounts"],"summary":"Delete user account by ID","parameters":[{"name":"id","in":"path","description":"ID of the user account to delete","type":"string","required":true}],"responses":{"200":{"description":"Account deleted successfully","schema":{"$ref":"#/definitions/Account"}}},"security":[{"BearerAuth":[]}]}},"/account/authorizeToken":{"get":{"tags":["Accounts"],"summary":"User Login","description":"Authenticate a user by username and password.","parameters":[{"name":"Authorization","in":"header","description":"JWT token for authentication","required":true,"type":"string","default":"Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0ZW5hbnRAdnZkbnRlY2guaW4iLCJ1c2VySWQiOiJiNDIxNWQ3MC0x1."}],"responses":{"200":{"description":"User logged in successfully","schema":{"type":"object","properties":{"token":{"type":"string","description":"JWT token for authentication","example":"Bearer your_jwt_token_here"}}}},"400":{"description":"Bad Request","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}}},"500":{"description":"Internal Server Error","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}}}}}},"/roles/create":{"post":{"tags":["Roles"],"summary":"Create a new role","parameters":[{"name":"body","in":"body","description":"Role data to create","required":true,"schema":{"$ref":"#/definitions/CreateRoleRequest"}}],"responses":{"200":{"description":"Role created successfully","schema":{"$ref":"#/definitions/Role"}}},"security":[{"BearerAuth":[]}]}},"/roles/list":{"get":{"tags":["Roles"],"summary":"Get roles","parameters":[{"name":"limit","in":"query","description":"Maximum number of roles to retrieve","type":"integer","default":25},{"name":"page","in":"query","description":"Page number for pagination","type":"integer","default":0}],"responses":{"200":{"description":"Roles fetched successfully","schema":{"type":"array","items":{"$ref":"#/definitions/Role"}}}},"security":[{"BearerAuth":[]}]}},"/roles/list/{id}":{"get":{"tags":["Roles"],"summary":"Get roles","parameters":[{"name":"id","in":"path","description":"ID of the role to update","type":"string","required":true},{"name":"limit","in":"query","description":"Maximum number of roles to retrieve","type":"integer","default":25},{"name":"page","in":"query","description":"Page number for pagination","type":"integer","default":0}],"responses":{"200":{"description":"Roles fetched successfully","schema":{"type":"array","items":{"$ref":"#/definitions/Role"}}}},"security":[{"BearerAuth":[]}]}},"/roles/updateRoleOrder/":{"post":{"tags":["Roles"],"summary":"Update role order","parameters":[{"name":"body","in":"body","description":"Updated role data","required":true,"schema":{"$ref":"#/definitions/UpdateRoleOrderRequest"}}],"responses":{"200":{"description":"Role order updated successfully","schema":{"$ref":"#/definitions/Role"}}},"security":[{"BearerAuth":[]}]}},"/roles/updateRolePermission/{id}":{"post":{"tags":["Roles"],"summary":"Update role permission by id","parameters":[{"name":"id","in":"path","description":"ID of the role to update","type":"string","required":true},{"name":"body","in":"body","description":"Updated role data","required":true,"schema":{"$ref":"#/definitions/UpdateRolePermissionRequest"}}],"responses":{"200":{"description":"Role permission updated successfully","schema":{"$ref":"#/definitions/Role"}}},"security":[{"BearerAuth":[]}]}},"/roles/delete/{id}":{"delete":{"tags":["Roles"],"summary":"Delete role by ID","parameters":[{"name":"id","in":"path","description":"ID of the role to delete","type":"string","required":true}],"responses":{"200":{"description":"Role deleted successfully","schema":{"$ref":"#/definitions/Role"}}},"security":[{"BearerAuth":[]}]}},"/team/list":{"get":{"tags":["Teams"],"summary":"Get a list of teams","parameters":[{"name":"limit","in":"query","description":"Maximum number of teams to retrieve","type":"integer","default":25},{"name":"page","in":"query","description":"Page number for pagination","type":"integer","default":0}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Successful response","schema":{"type":"array","items":{"$ref":"#/definitions/Team"}}},"400":{"description":"Bad request","content":{"application/json":{"example":{"message":"Team not Found"}}}},"500":{"description":"Internal Server Error"}}}},"/team/create":{"post":{"tags":["Teams"],"summary":"Create a new team","parameters":[{"name":"body","in":"body","description":"User account data to create","required":true,"schema":{"$ref":"#/definitions/CreateTeamRequest"}}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Team Created Successfully","schema":{"$ref":"#/definitions/Team"}},"400":{"description":"Bad request","content":{"application/json":{"example":{"message":"Validation error message"}}}},"500":{"description":"Internal Server Error"}}}},"/team/update/{id}":{"post":{"tags":["Teams"],"summary":"Update a team by ID","parameters":[{"name":"id","in":"path","required":true,"description":"ID of the team to update","schema":{"type":"string"}},{"name":"body","in":"body","description":"Updated team data","required":true,"schema":{"$ref":"#/definitions/UpdateTeamRequest"}}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Team updated successfully","schema":{"$ref":"#/definitions/Team"}}}}},"/team/delete/{id}":{"delete":{"tags":["Teams"],"summary":"Delete a team by ID","parameters":[{"name":"id","in":"path","required":true,"description":"ID of the team to delete","schema":{"type":"string"}}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Team Deleted Successfully","content":{"application/json":{"example":{"message":"Team Deleted Successfully"}}}},"400":{"description":"Bad request","content":{"application/json":{"example":{"message":"Validation error message"}}}},"500":{"description":"Internal Server Error"}}}},"/tickets/create":{"post":{"tags":["Tickets"],"summary":"Create a new ticket ","parameters":[{"name":"body","in":"body","description":"Ticket  data to create","required":true,"schema":{"$ref":"#/definitions/CreateTicketRequest"}}],"responses":{"200":{"description":"New ticket is created","schema":{"$ref":"#/definitions/Ticket"}}},"security":[{"BearerAuth":[]}]}},"/tickets/list":{"get":{"tags":["Tickets"],"summary":"Get a list of tickets raised","parameters":[{"name":"limit","in":"query","description":"Maximum number of tickets to retrieve","type":"integer","default":25},{"name":"page","in":"query","description":"Page number for pagination","type":"integer","default":0}],"security":[{"BearerAuth":[]}],"responses":{"200":{"400":{"description":"Bad request","content":{"application/json":{"example":{"message":"Ticket not Found"}}}},"500":{"description":"Internal Server Error"},"description":"Successful response","schema":{"$ref":"#/definitions/Ticket"}}}}},"/tickets/list/{uid}":{"get":{"tags":["Tickets"],"summary":"Get ticket","parameters":[{"name":"uid","in":"path","description":"UID of the ticket to display","type":"number","required":true}],"responses":{"200":{"description":"Tickets fetched successfully","schema":{"$ref":"#/definitions/Ticket"}}}},"security":[{"BearerAuth":[]}]},"/tickets/Status/update":{"post":{"tags":["Tickets"],"summary":"Update a ticket status by UID and ticket status id","parameters":[{"name":"body","in":"body","description":"Updated ticket data","required":true,"schema":{"$ref":"#/definitions/UpdateStatusRequest"},"collectionFormat":"multi"}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Ticket updated successfully","schema":{"$ref":"#/definitions/Ticket"}}}}},"/tickets/CommentsAndNotes/add":{"post":{"tags":["Tickets"],"summary":"Add comments and notes to the existing ticket through uid ","parameters":[{"name":"body","in":"body","description":"Comments and notes to be added to the ticket","required":true,"schema":{"$ref":"#/definitions/AddCommentsAndNotesRequest"}}],"responses":{"200":{"description":"Commenst and notes are created","schema":{"$ref":"#/definitions/Ticket"}}},"security":[{"BearerAuth":[]}]}},"/tickets/CommentsAndNotes/edit":{"post":{"tags":["Tickets"],"summary":"Update a ticket status by UID and ticket status id","parameters":[{"name":"body","in":"body","description":"ticket id and id and the Updated comment and note ","required":true,"schema":{"$ref":"#/definitions/EditCommentsAndNotesRequest"}}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Ticket updated successfully","schema":{"$ref":"#/definitions/Ticket"}}}}},"/tickets/CommentsAndNotes/delete":{"post":{"tags":["Tickets"],"summary":"delete a ticket comment by _id and ticket id","parameters":[{"name":"body","in":"body","description":"ticket id and id of the comment to be deleted","required":true,"schema":{"$ref":"#/definitions/DeleteCommentsAndNotesRequest"}}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"comment deleted successfully","schema":{"$ref":"#/definitions/Ticket"}}}}},"/tickets/subscribe":{"post":{"tags":["Tickets"],"summary":"to suscribe or unsubscribe user","parameters":[{"name":"body","in":"body","description":"ticketId and user to be subscribe or unsuscrib","required":true,"schema":{"$ref":"#/definitions/SubscribeRequest"}}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"suscribed successfully","schema":{"$ref":"#/definitions/Ticket"}}}}},"/tickets/Assignee/update":{"post":{"tags":["Tickets"],"summary":"update assignee","parameters":[{"name":"body","in":"body","description":"ticket id and user_id of accounts","required":true,"schema":{"$ref":"#/definitions/AssigneeUpdateRequest"}}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"assignee updated successfully","schema":{"$ref":"#/definitions/Ticket"}}}}},"/tickets/attachment/update/{uid}":{"post":{"tags":["Tickets"],"summary":"upload attachment","parameters":[{"name":"uid","in":"path","description":"UID of the ticket to b updated","type":"number","required":true},{"name":"files","in":"formData","description":"file to be uploaded","required":true,"type":"file"}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"attachment uploaded successfully","schema":{"$ref":"#/definitions/Ticket"}}}}},"/tickets/delete/attachment":{"post":{"tags":["Tickets"],"summary":"upload attachment","parameters":[{"name":"body","in":"body","description":"ticket id and file id","required":true,"schema":{"$ref":"#/definitions/DeleteAttachmentRequest"}}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"attachment deleted successfully","schema":{"$ref":"#/definitions/Ticket"}}}}},"/tickets/reports/get":{"post":{"tags":["Tickets"],"summary":"Get report","parameters":[{"name":"body","in":"body","description":"get report","required":true,"schema":{"$ref":"#/definitions/GetReportRequest"}}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Report list","schema":{"$ref":"#/definitions/Ticket"}}}}},"/tickets/reports/download/{id}":{"get":{"tags":["Tickets"],"summary":"Get report","parameters":[{"name":"id","in":"path","required":true,"description":"To get report with particular id","type":"string"}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Report list with particular id","schema":{"$ref":"#/definitions/Ticket"}}}}},"/tickets/reports/list":{"get":{"tags":["Tickets"],"summary":"Get Bulk Report List","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Report list","schema":{"$ref":"#/definitions/Ticket"}}}}},"/tickets/update":{"post":{"tags":["Tickets"],"summary":"update ticket","parameters":[{"name":"body","in":"body","description":"ticket id ,subject and id of ticket tags and ticket types to be updated","required":true,"schema":{"$ref":"#/definitions/UpdateTicketRequest"}}],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"assignee updated successfully","schema":{"$ref":"#/definitions/Ticket"}}}}},"/message/startConvo":{"post":{"tags":["Messages"],"summary":"Create a new conversation","parameters":[{"name":"body","in":"body","description":"conversation owner and participants","required":true,"schema":{"$ref":"#/definitions/StartConversationRequest"}}],"responses":{"200":{"description":"New conversation started","schema":{"$ref":"#/definitions/Message"}}},"security":[{"BearerAuth":[]}]}},"/message/sendMessage":{"post":{"tags":["Messages"],"summary":"Send a new message","parameters":[{"name":"body","in":"body","description":"convo id, owner id and message to sent","required":true,"schema":{"$ref":"#/definitions/SendMessageRequest"}}],"responses":{"200":{"description":"message sent successfully","schema":{"$ref":"#/definitions/Message"}}},"security":[{"BearerAuth":[]}]}},"/message/listConvo":{"get":{"tags":["Messages"],"summary":"list of conversation of particular user","parameters":[{"name":"limit","in":"path","required":true,"description":"limit","type":"number"},{"name":"page","in":"path","required":true,"description":"page","type":"number"}],"responses":{"200":{"description":"Messages fetched successfully","schema":{"$ref":"#/definitions/Message"}}},"security":[{"BearerAuth":[]}]}},"/message/deleteConvo/{id}":{"post":{"tags":["Messages"],"summary":"delete conversation","parameters":[{"name":"id","in":"path","required":true,"description":"id of user","type":"string"}],"responses":{"200":{"description":"Conversation deleted successfully","schema":{"$ref":"#/definitions/Message"}}},"security":[{"BearerAuth":[]}]}},"/message/listMessages/{id}":{"get":{"tags":["Messages"],"summary":"list messages","parameters":[{"name":"id","in":"path","required":true,"description":"id of user","type":"string"}],"responses":{"200":{"description":"messages fetched succesfully","schema":{"$ref":"#/definitions/Message"}}},"security":[{"BearerAuth":[]}]}},"/settings/get":{"get":{"tags":["Settings"],"summary":"Get all settings","responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/Settings"}}},"security":[{"BearerAuth":[]}]}}},"/settings/update":{"post":{"tags":["Settings"],"summary":"update settings","parameters":[{"name":"body","in":"body","required":true,"description":"data to be updated","type":"array"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/Settings"}}},"security":[{"BearerAuth":[]}]}}},"/settings/update/mailer":{"post":{"tags":["Settings"],"summary":"update settings","parameters":[{"name":"body","in":"body","required":true,"description":"data to be updated","type":"array"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/Settings"}}},"security":[{"BearerAuth":[]}]}}},"/settings/permission/update":{"post":{"tags":["Settings"],"summary":"update settings","parameters":[{"name":"body","in":"body","required":true,"description":"data to be updated","type":"array","schema":{"$ref":"#/definitions/SettingsPermissionUpdateRequest"}}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/Settings"}}},"security":[{"BearerAuth":[]}]}}},"/dashboard/overDueTickets":{"get":{"tags":["Dashboard"],"summary":"Get a list of overdue tickets","description":"Retrieves a list of tickets that are overdue.","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Successful response","schema":{"type":"array","items":{"$ref":"#/definitions/Ticket"}}},"400":{"description":"Bad request","content":{"application/json":{"example":{"message":"Overdue tickets not found"}}}},"500":{"description":"Internal Server Error"}}}},"/dashboard/ticketStatus":{"get":{"tags":["Dashboard"],"summary":"Get a list of ticket status","description":"Retrieves a list of tickets status.","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Successful response","schema":{"type":"array","items":{"$ref":"#/definitions/Ticket"}}},"400":{"description":"Bad request","content":{"application/json":{"example":{"message":"ticket status not found"}}}},"500":{"description":"Internal Server Error"}}}},"/dashboard/topteams":{"get":{"tags":["Dashboard"],"summary":"Get a list of top teams","description":"Retrieves a list of top teams.","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Successful response","schema":{"type":"array","items":{"$ref":"#/definitions/Ticket"}}},"400":{"description":"Bad request","content":{"application/json":{"example":{"message":"teams not found"}}}},"500":{"description":"Internal Server Error"}}}},"/dashboard/getTicketStatusCounts":{"get":{"tags":["Dashboard"],"summary":"Get ticket status counts","description":"get ticket statuses count","security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Successful response","schema":{"type":"array","items":{"$ref":"#/definitions/TicketStatus"}}},"400":{"description":"Bad request","content":{"application/json":{"example":{"message":"ticket status not found"}}}},"500":{"description":"Internal Server Error"}}}},"/dashboard/ticketBreakdown/{timespan}":{"get":{"tags":["Dashboard"],"summary":"Get ticket breakdown for a specified time span","description":"Retrieves ticket breakdown data for a specified time span.","parameters":[{"name":"timespan","in":"path","description":"Time span in days (30, 60, 90, 180, or 365)","required":true,"type":"integer","enum":[30,60,90,180,365],"example":30}],"responses":{"200":{"description":"Successful response","schema":{"type":"object","properties":{"data":{"type":"object","description":"Ticket breakdown data for the specified time span."}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"example":{"message":"Internal Server Error"}}}}}}},"/auth/login":{"post":{"tags":["Authentication"],"summary":"User Login","description":"Authenticate a user by username and password.","parameters":[{"name":"body","in":"body","description":"User login credentials","required":true,"schema":{"type":"object","properties":{"username":{"type":"string","description":"Username of the user","example":"john_doe"},"password":{"type":"string","description":"User's password","example":"secret_password"}},"required":["username","password"]}}],"responses":{"200":{"description":"User logged in successfully","schema":{"type":"object","properties":{"token":{"type":"string","description":"JWT token for authentication","example":"your_jwt_token_here"}}}},"400":{"description":"Bad Request","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}}},"500":{"description":"Internal Server Error","schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}}}},"security":[{"BearerAuth":[]}]}}},"definitions":{"CreateTicketType":{"type":"object","properties":{"name":{"type":"string","description":"Name of the ticket type"},"priorities":{"type":"array","items":{"type":"string","description":"Priority ID associated with the ticket type"}}},"required":["name"]},"TicketType":{"type":"object","properties":{"_id":{"type":"string","uniqueItems":true},"name":{"type":"string"},"priorities":{"type":"array","items":{"type":"string"}}}},"UpdateTicketTypeRequest":{"type":"object","properties":{"name":{"type":"string","description":"Updated name of the ticket type"}}},"CreateTicketStatus":{"type":"object","properties":{"name":{"type":"string","description":"Name of the ticket status"},"htmlColor":{"type":"string","description":"HTML color code associated with the ticket status"},"order":{"type":"integer","description":"Order of the ticket status"}},"required":["name"]},"TicketStatus":{"type":"object","properties":{"_id":{"type":"string","uniqueItems":true},"name":{"type":"string"},"htmlColor":{"type":"string"},"order":{"type":"integer"}}},"UpdateTicketStatusRequest":{"type":"object","properties":{"name":{"type":"string","description":"Updated name of the ticket status"},"htmlColor":{"type":"string","description":"Updated HTML color code associated with the ticket status"},"order":{"type":"integer","description":"Updated order of the ticket status"}}},"CreateTicketPriority":{"type":"object","properties":{"name":{"type":"string","description":"Name of the ticket priority"},"overdueIn":{"type":"integer","description":"Overdue time in minutes"},"htmlColor":{"type":"string","description":"HTML color code associated with the ticket priority"},"migrationNum":{"type":"integer","description":"Migration number"},"isDefault":{"type":"boolean","description":"Indicates whether the ticket priority is default"}},"required":["name"]},"TicketPriority":{"type":"object","properties":{"_id":{"type":"string","uniqueItems":true},"name":{"type":"string"},"overdueIn":{"type":"integer"},"htmlColor":{"type":"string"},"migrationNum":{"type":"integer"},"isDefault":{"type":"boolean"}}},"UpdateTicketPriorityRequest":{"type":"object","properties":{"name":{"type":"string","description":"Updated name of the ticket priority"},"overdueIn":{"type":"integer","description":"Updated overdue time in minutes"},"htmlColor":{"type":"string","description":"Updated HTML color code associated with the ticket priority"},"migrationNum":{"type":"integer","description":"Updated migration number"},"isDefault":{"type":"boolean","description":"Updated value indicating whether the ticket priority is default"}}},"CreateTicketTag":{"type":"object","properties":{"name":{"type":"string","description":"Name of the ticket tag"}},"required":["name"]},"UpdateTicketTagRequest":{"type":"object","properties":{"name":{"type":"string","description":"Updated name of the ticket tag"}}},"TicketTag":{"type":"object","properties":{"_id":{"type":"string","uniqueItems":true},"name":{"type":"string"}}},"CreateAccountRequest":{"type":"object","properties":{"username":{"type":"string"},"email":{"type":"string","format":"email"},"fullname":{"type":"string"},"title":{"type":"string"},"password":{"type":"string"},"passwordConfirm":{"type":"string"},"role":{"type":"string"}},"required":["username","email","fullname","password","passwordConfirm","role"]},"CreateIceUserRequest":{"type":"object","properties":{"username":{"type":"string"},"email":{"type":"string","format":"email"},"fullname":{"type":"string"},"title":{"type":"string"},"password":{"type":"string"},"passwordConfirm":{"type":"string"},"role":{"type":"string"}},"required":["username","email","fullname","password","passwordConfirm","role"]},"Account":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"email":{"type":"string","format":"email"},"roles":{"type":"array","items":{"type":"string"}}}},"UpdateAccountRequest":{"type":"object","properties":{"username":{"type":"string"},"email":{"type":"string","format":"email"},"password":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}}}},"CreateRoleRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"grants":{"type":"object"}},"required":["name"]},"Role":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"}}}},"UpdateRoleOrderRequest":{"type":"object","properties":{"roleOrder":{"type":"array"}}},"UpdateRolePermissionRequest":{"type":"object","properties":{"id":{"type":"array"},"name":{"type":"array"},"description":{"type":"array"},"grants":{"type":"object"}}},"CreateTeamRequest":{"type":"object","properties":{"name":{"type":"string","description":"Name of the team"},"members":{"type":"array","items":{"type":"string","description":"User IDs of team members"}}},"required":["name"]},"Team":{"type":"object","properties":{"_id":{"type":"string","uniqueItems":true},"name":{"type":"string"},"members":{"type":"array","items":{"type":"string"}}}},"UpdateTeamRequest":{"type":"object","properties":{"name":{"type":"string","description":"Updated name of the team"},"members":{"type":"array","items":{"type":"string","description":"Updated account IDs associated with the team"}}}},"CreateTicketRequest":{"type":"object","properties":{"subject":{"type":"string","description":"Subject of the ticket"},"teams":{"type":"string","description":"ID of the team associated with the ticket"},"type":{"type":"string","description":"ID of the ticket type"},"tags":{"type":"array","items":{"type":"string","description":"IDs of tags associated with the ticket"}},"priority":{"type":"string","description":"ID of the ticket priority"},"issue":{"type":"string","description":"Description of the ticket issue"},"issueDate":{"type":"string","description":"Date on which the ticket is raised"},"deviceId":{"type":"string","description":"ID of the device"},"deviceDetails":{"type":"object","description":"Details of the device"},"userDetails":{"type":"object","description":"Details of the user"},"ticketOwner":{"type":"string","description":"ID of the ticket owner"},"pid":{"type":"string"}},"required":["subject","type","priority","issue","issueDate"]},"Ticket":{"type":"object","properties":{"uid":{"type":"number","description":"Unique identifier for the ticket"},"owner":{"type":"object","description":"ID of the owner (account) of the ticket"},"date":{"type":"string","format":"date-time","description":"Date and time when the ticket was created"},"deleted":{"type":"boolean","description":"Flag indicating whether the ticket is deleted"},"teams":{"type":"string","description":"ID of the team associated with the ticket"},"type":{"type":"object","description":"ID of the ticket type"},"status":{"type":"object","description":"ID of the ticket status"},"priority":{"type":"object","description":"ID of the ticket priority"},"assignee":{"type":"string","description":"ID of the assignee (account) for the ticket"},"tags":{"type":"array","items":{"type":"string","description":"IDs of tags associated with the ticket"}},"subject":{"type":"string","description":"Subject of the ticket"},"issue":{"type":"string","description":"Description of the ticket issue"},"comments":{"type":"array","items":{"type":"object","properties":{"owner":{"type":"object","description":"ID of the owner (account) of the comment"},"date":{"type":"string","format":"date-time","description":"Date and time when the comment was added"},"comment":{"type":"string","description":"Content of the comment"},"deleted":{"type":"boolean","description":"Flag indicating whether the comment is deleted"}}},"description":"Comments associated with the ticket"},"notes":{"type":"array","items":{"type":"object","properties":{"owner":{"type":"object","description":"ID of the owner (account) of the note"},"date":{"type":"string","format":"date-time","description":"Date and time when the note was added"},"note":{"type":"string","description":"Content of the note"},"deleted":{"type":"boolean","description":"Flag indicating whether the note is deleted"}}},"description":"Notes associated with the ticket"},"attachments":{"type":"array","items":{"type":"object","properties":{"owner":{"type":"object","description":"ID of the owner (account) of the attachment"},"name":{"type":"array","items":{"type":"string","description":"Names of the attachment files"}},"date":{"type":"string","format":"date-time","description":"Date and time when the attachment was added"},"path":{"type":"array","items":{"type":"string","description":"Paths to the attachment files"}},"type":{"type":"object","description":"Type of the attachment"}}},"description":"Attachments associated with the ticket"},"history":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","description":"Description of the action"},"date":{"type":"string","format":"date-time","description":"Date and time when the action occurred"},"owner":{"type":"object","description":"ID of the owner (account) who performed the action"},"description":{"type":"string","description":"Description of the action"}}},"description":"History of actions associated with the ticket"},"subscribers":{"type":"array","items":{"type":"string","description":"IDs of subscribers (accounts) following the ticket"}},"dueDate":{"type":"string","format":"date-time","description":"Due date for the ticket"},"updated":{"type":"string","format":"date-time","description":"Date and time when the ticket was last updated"}},"required":["type","priority","subject","issue"]},"UpdateTicketRequest":{"type":"object","properties":{"owner":{"type":"object","description":"ID of the owner (account) updating the ticket"},"teams":{"type":"string","description":"ID of the team associated with the updated ticket"},"type":{"type":"object","description":"ID of the updated ticket type"},"status":{"type":"object","description":"ID of the updated ticket status"},"priority":{"type":"object","description":"ID of the updated ticket priority"},"assignee":{"type":"string","description":"ID of the assignee (account) for the updated ticket"},"tags":{"type":"array","items":{"type":"string","description":"IDs of tags associated with the updated ticket"}},"subject":{"type":"string","description":"Updated subject of the ticket"},"issue":{"type":"string","description":"Updated description of the ticket issue"},"dueDate":{"type":"string","description":"Updated due date for the ticket"}},"required":["owner","teams","type","status","priority","subject","issue"]},"AddCommentsAndNotesRequest":{"type":"object","properties":{"_id":{"type":"string","description":"Unique identifier for the ticket"},"comment":{"oneOf":[{"type":"string","description":"Comments associated with the ticket"},{"type":"boolean","description":"Indicates if comments are present (true/false)"}]},"note":{"oneOf":[{"type":"string","description":"Notes associated with the ticket"},{"type":"boolean","description":"Indicates if notes are present (true/false)"}]}},"required":["_id","comment","note"]},"EditCommentsAndNotesRequest":{"type":"object","properties":{"ticketId":{"type":"string","description":"Unique identifier for the ticket"},"_id":{"type":"string","description":"Unique identifier for the particular comment to be edited"},"comment":{"oneOf":[{"type":"string","description":"Comments associated with the ticket","example":"String/Boolean"},{"type":"boolean","description":"Indicates if comments are present (true/false)","example":"boolean"}]},"note":{"oneOf":[{"type":"string","description":"Notes associated with the ticket","example":"String/Boolean"},{"type":"boolean","description":"Indicates if notes are present (true/false)","example":"boolean"}]}},"required":["ticketId","_id","comment","note"]},"DeleteCommentsAndNotesRequest":{"type":"object","properties":{"ticketId":{"type":"string","description":"Unique identifier for the ticket"},"_id":{"type":"string","description":"Unique identifier for the particular comment to be deleted"},"comment":{"type":"boolean","description":"Comments associated with the ticket","example":"boolean"},"note":{"type":"boolean","description":"Notes associated with the ticket","example":"boolean"}},"required":["ticketId","_id","comment","note"]},"SubscribeRequest":{"type":"object","properties":{"ticketId":{"type":"string","description":"Unique identifier for the ticket"},"user":{"type":"string","description":"id of user to be subscribed"},"is_subscribed":{"type":"boolean","description":"To subscribe or unsubscribe"}},"required":["ticketId","user","is_subscribed"]},"AssigneeUpdateRequest":{"type":"object","properties":{"ticketId":{"type":"string","description":"Unique identifier for the ticket"},"user_id":{"type":"string","description":"id of accounts"},"is_cleared":{"type":"boolean","description":"To remove or keep assignee"}},"required":["ticketId","user_id","is_cleared"]},"TicketUpdateRequest":{"type":"object","properties":{"ticketId":{"type":"string","description":"Unique identifier for the ticket"},"type":{"type":"string","description":"id of ticket types"},"subject":{"type":"string","description":"subject of ticket"},"tags":{"type":"string","description":"id of ticket tags"}},"required":["ticketId","type","subject","tags"]},"GetReportRequest":{"type":"object","properties":{"tags":{"type":"array","description":"Unique identifier for the ticket"},"priority":{"type":"array","description":"id of ticket types"},"status":{"type":"array","description":"subject of ticket"},"StartDate":{"type":"string","description":"id of ticket tags"},"EndDate":{"type":"string","description":"id of ticket tags"},"is_download":{"type":"boolean"}},"required":["tags","priority","status","StartDate","EndDate","is_download"]},"Settings":{"type":"object","properties":{"name":{"type":"string","description":"name"},"value":{"type":"string","description":"value"}},"required":["name"]},"Message":{"type":"object","properties":{"conversationId":{"type":"string","description":"name"},"owner":{"type":"string","description":"name"},"body":{"type":"string","description":"name"},"timestamps":{"type":"string","description":"name"}},"required":["conversationId","owner","body","timestamps"]},"StartConversationRequest":{"type":"object","properties":{"owner":{"type":"string","description":"owner id from accounts"},"participants":{"type":"array","description":"participants id from accounts"}},"required":["owner","participants"]},"SendMessageRequest":{"type":"object","properties":{"convoId":{"type":"string","description":"id of the conversation"},"owner":{"type":"string","description":"id of owner is messaging"},"body":{"type":"string","description":"message to be sent"}},"required":["convoId","owner","body"]},"UpdateSettingsRequest":{"type":"array","properties":{"name":{"type":"string","description":"name"},"value":{"type":"string","description":"value"}},"required":["name","value"]},"SettingsPermissionUpdateRequest":{"type":"object","properties":{"roles":{"type":"object","properties":{"role_id":{"type":"string"},"grants":{"type":"object","properties":{"accounts":{"type":"array","items":{}},"teams":{"type":"array","items":{}},"tickets":{"type":"array","items":{}},"comments":{"type":"array","items":{}},"reports":{"type":"array","items":{}},"chat":{"type":"array","items":{}},"dashboard":{"type":"array","items":{}},"permission_settings":{"type":"array","items":{}},"master_settings":{"type":"array","items":{}}}}},"required":["role_id","grants"]},"settings":{"type":"object","properties":{"mailer":{"type":"boolean"}},"required":["mailer"]}},"required":["roles","settings"]},"UpdateStatusRequest":{"type":"array","properties":{"id":{"type":"string","description":"ticket status id"},"uid":{"type":"number","description":"ticket id"}},"required":["id","uid"]},"DeleteAttachmentRequest":{"type":"object","properties":{"ticketId":{"type":"string","description":"ticket id of which file attachment needs to be deleted"},"fileId":{"type":"string","description":"file id that is to be deleted"}},"required":["fileId","ticketId"]},"CreateNotification":{"type":"object","properties":{"owner":{"type":"string","description":"owner id who is sending the notification"},"message":{"type":"string","description":"message to send"},"isRead":{"type":"boolean","description":"message is read or not"}},"required":["owner","message"]}}}