{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/all/api/ticket":{"get":{"tags":["ticket"],"summary":"Get Tickets","description":"Get all user's tickets","operationId":"get_tickets_all_api_ticket_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SupportTicket"},"type":"array","title":"Response Get Tickets All Api Ticket Get"}}}},"404":{"description":"Not found"}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"tags":["ticket"],"summary":"Create Ticket","description":"Create a ticket with a starting message","operationId":"create_ticket_all_api_ticket_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTicketPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/all/api/ticket/unread":{"get":{"tags":["ticket"],"summary":"Get Unread","description":"Check if any message is unread","operationId":"get_unread_all_api_ticket_unread_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"boolean","title":"Response Get Unread All Api Ticket Unread Get"}}}},"404":{"description":"Not found"}},"security":[{"OAuth2PasswordBearer":[]}]}},"/all/api/ticket/{ticket_id}":{"get":{"tags":["ticket"],"summary":"Get Ticket","description":"Get specific ticket data","operationId":"get_ticket_all_api_ticket__ticket_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"integer","title":"Ticket Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportTicket"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/all/api/ticket/{ticket_id}/message":{"post":{"tags":["ticket"],"summary":"Post Message","description":"Send a message to specific ticket","operationId":"post_message_all_api_ticket__ticket_id__message_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"integer","title":"Ticket Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostMessagePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportMessage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/all/api/working-hours":{"get":{"tags":["working-hours"],"summary":"Get Working Hours","description":"Get working hours for the whole week","operationId":"get_working_hours_all_api_working_hours_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"prefixItems":[{"anyOf":[{"type":"string","format":"time"},{"type":"null"}]},{"anyOf":[{"type":"string","format":"time"},{"type":"null"}]}],"type":"array","maxItems":2,"minItems":2},"type":"array","title":"Response Get Working Hours All Api Working Hours Get"}}}},"404":{"description":"Not found"}},"security":[{"OAuth2PasswordBearer":[]}]}},"/all/api/working-hours/active":{"get":{"tags":["working-hours"],"summary":"Is Support Active","description":"Check if support is active and return next active time if not","operationId":"is_support_active_all_api_working_hours_active_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkingHoursActive"}}}},"404":{"description":"Not found"}},"security":[{"OAuth2PasswordBearer":[]}]}},"/all/api/attachment":{"post":{"tags":["attachment"],"summary":"Upload Attachment","description":"Uploads attachment to S3 bucket before sending message","operationId":"upload_attachment_all_api_attachment_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_attachment_all_api_attachment_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","title":"Response Upload Attachment All Api Attachment Post"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/all/api/attachment/start":{"post":{"tags":["attachment"],"summary":"Start Upload","description":"Starts file upload in chunks, creates and returns urls for each chunk to upload straight to s3","operationId":"start_upload_all_api_attachment_start_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartUploadPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartUploadResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/all/api/attachment/complete":{"post":{"tags":["attachment"],"summary":"Complete Upload","description":"Completes file upload in chunks and adds file to database","operationId":"complete_upload_all_api_attachment_complete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteUploadPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"string","title":"Response Complete Upload All Api Attachment Complete Post"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/all/api/attachment/abort":{"post":{"tags":["attachment"],"summary":"Abort Upload","description":"Aborts multipart upload","operationId":"abort_upload_all_api_attachment_abort_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AbortUploadPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/all/api/attachment/{attachment_id}/file":{"get":{"tags":["attachment"],"summary":"Get Attachment","description":"Returns url to the file in S3","operationId":"get_attachment_all_api_attachment__attachment_id__file_get","parameters":[{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string","title":"Attachment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/all/api/attachment/{attachment_id}":{"delete":{"tags":["attachment"],"summary":"Delete Attachment","description":"Deletes attachment from S3","operationId":"delete_attachment_all_api_attachment__attachment_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string","title":"Attachment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/all/api/zendesk/webhook":{"post":{"tags":["zendesk"],"summary":"Post Zendesk Message","description":"Zendesk sends comment added event which is created in db and sent to user through socketio","operationId":"post_zendesk_message_all_api_zendesk_webhook_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentAddedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/all/api/zendesk/status":{"post":{"tags":["zendesk"],"summary":"Post Status Change","operationId":"post_status_change_all_api_zendesk_status_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusChangedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/all/api/zendesk/deletion":{"post":{"tags":["zendesk"],"summary":"Post Deletion Change","operationId":"post_deletion_change_all_api_zendesk_deletion_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletionChangedPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/misc":{"post":{"summary":"Misc","operationId":"misc_misc_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AbortUploadPayload":{"properties":{"key":{"type":"string","title":"Key"},"uploadId":{"type":"string","title":"Uploadid"}},"type":"object","required":["key","uploadId"],"title":"AbortUploadPayload"},"Body_upload_attachment_all_api_attachment_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_attachment_all_api_attachment_post"},"CommentAddedPayload":{"properties":{"eventName":{"type":"string","title":"Eventname"},"ticketId":{"type":"integer","title":"Ticketid"},"latestCommentId":{"type":"integer","title":"Latestcommentid"}},"type":"object","required":["eventName","ticketId","latestCommentId"],"title":"CommentAddedPayload"},"CompleteUploadPayload":{"properties":{"key":{"type":"string","title":"Key"},"uploadId":{"type":"string","title":"Uploadid"},"filename":{"type":"string","title":"Filename"},"contentType":{"type":"string","title":"Contenttype"},"size":{"type":"integer","title":"Size"},"etags":{"items":{"type":"string"},"type":"array","title":"Etags"}},"type":"object","required":["key","uploadId","filename","contentType","size","etags"],"title":"CompleteUploadPayload"},"CreateTicketPayload":{"properties":{"description":{"type":"string","title":"Description"},"attachmentIds":{"items":{"type":"string"},"type":"array","title":"Attachmentids"},"name":{"type":"string","title":"Name"},"cenosApp":{"type":"string","title":"Cenosapp"},"licensee":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Licensee"},"licenseeData":{"$ref":"#/components/schemas/LicenseeDataPayload"},"followUpSourceId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Followupsourceid"}},"type":"object","required":["description","attachmentIds","name","cenosApp","licenseeData"],"title":"CreateTicketPayload"},"DeletionChangedPayload":{"properties":{"detail":{"$ref":"#/components/schemas/ZendeskEventDetail"}},"type":"object","required":["detail"],"title":"DeletionChangedPayload"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LicenseeDataPayload":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"isAltair":{"type":"boolean","title":"Isaltair"}},"type":"object","required":["isAltair"],"title":"LicenseeDataPayload"},"PostMessagePayload":{"properties":{"body":{"type":"string","title":"Body"},"attachmentIds":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Attachmentids"}},"type":"object","required":["body","attachmentIds"],"title":"PostMessagePayload"},"StartUploadPayload":{"properties":{"contentType":{"type":"string","title":"Contenttype"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["contentType","size"],"title":"StartUploadPayload"},"StartUploadResponse":{"properties":{"key":{"type":"string","title":"Key"},"upload_id":{"type":"string","title":"Upload Id"},"part_size":{"type":"integer","title":"Part Size"},"urls":{"items":{"type":"string"},"type":"array","title":"Urls"}},"type":"object","required":["key","upload_id","part_size","urls"],"title":"StartUploadResponse"},"StatusChangedPayload":{"properties":{"eventName":{"type":"string","title":"Eventname"},"ticketId":{"type":"integer","title":"Ticketid"},"ticketStatus":{"type":"string","enum":["New","Open","Pending","On-hold","Solved","Closed"],"title":"Ticketstatus"}},"type":"object","required":["eventName","ticketId","ticketStatus"],"title":"StatusChangedPayload"},"SupportAttachment":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["id","name","type","size"],"title":"SupportAttachment"},"SupportMessage":{"properties":{"id":{"type":"integer","title":"Id"},"body":{"type":"string","title":"Body"},"slackSentBy":{"anyOf":[{"$ref":"#/components/schemas/SupportMessageSender"},{"type":"null"}]},"zendeskSentBy":{"anyOf":[{"$ref":"#/components/schemas/SupportMessageSender"},{"type":"null"}]},"createdOn":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"string","format":"date-time"}],"title":"Createdon"},"updatedOn":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Updatedon"},"editedOn":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Editedon"},"ticketId":{"type":"integer","title":"Ticketid"},"attachments":{"anyOf":[{"items":{"$ref":"#/components/schemas/SupportAttachment"},"type":"array"},{"type":"null"}],"title":"Attachments"}},"type":"object","required":["id","body","zendeskSentBy","createdOn","ticketId"],"title":"SupportMessage"},"SupportMessageSender":{"properties":{"name":{"type":"string","title":"Name"},"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatarurl"}},"type":"object","required":["name","avatarUrl"],"title":"SupportMessageSender"},"SupportTicket":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"messageCount":{"type":"integer","title":"Messagecount"},"licenseeId":{"type":"integer","title":"Licenseeid"},"createdOn":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"string","format":"date-time"}],"title":"Createdon"},"updatedOn":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Updatedon"},"messages":{"anyOf":[{"items":{"$ref":"#/components/schemas/SupportMessage"},"type":"array"},{"type":"null"}],"title":"Messages"},"isUnread":{"type":"boolean","title":"Isunread"},"status":{"$ref":"#/components/schemas/ZendeskStatus"}},"type":"object","required":["id","name","description","messageCount","licenseeId","createdOn","isUnread","status"],"title":"SupportTicket"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WorkingHoursActive":{"properties":{"isActive":{"type":"boolean","title":"Isactive"},"nextActive":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Nextactive"}},"type":"object","required":["isActive","nextActive"],"title":"WorkingHoursActive"},"ZendeskEventDetail":{"properties":{"id":{"type":"integer","title":"Id"},"status":{"$ref":"#/components/schemas/ZendeskStatus"}},"type":"object","required":["id","status"],"title":"ZendeskEventDetail"},"ZendeskStatus":{"type":"string","enum":["NEW","OPEN","PENDING","HOLD","SOLVED","CLOSED","DELETED"],"title":"ZendeskStatus"}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"token"}}}}}}