{"openapi":"3.1.0","info":{"title":"SnusCore Support","version":"0.1.0"},"paths":{"/api/config":{"get":{"summary":"Public Config","operationId":"public_config_api_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/chat/start":{"post":{"summary":"Chat Start","operationId":"chat_start_api_chat_start_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/{cid}":{"get":{"summary":"Chat Get","operationId":"chat_get_api_chat__cid__get","parameters":[{"name":"cid","in":"path","required":true,"schema":{"type":"string","title":"Cid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/{cid}/message":{"post":{"summary":"Chat Message","operationId":"chat_message_api_chat__cid__message_post","parameters":[{"name":"cid","in":"path","required":true,"schema":{"type":"string","title":"Cid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MsgIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/{cid}/handoff":{"post":{"summary":"Chat Handoff","operationId":"chat_handoff_api_chat__cid__handoff_post","parameters":[{"name":"cid","in":"path","required":true,"schema":{"type":"string","title":"Cid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoffIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/widget.js":{"get":{"summary":"Widget Js","operationId":"widget_js_widget_js_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin":{"get":{"summary":"Admin Page","operationId":"admin_page_admin_get","parameters":[{"name":"err","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Err"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/login":{"post":{"summary":"Admin Login","operationId":"admin_login_admin_login_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/logout":{"get":{"summary":"Admin Logout","operationId":"admin_logout_admin_logout_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/api/overview":{"get":{"summary":"Admin Overview","operationId":"admin_overview_admin_api_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/api/chats":{"get":{"summary":"Admin Chats","operationId":"admin_chats_admin_api_chats_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api/chats/{cid}":{"get":{"summary":"Admin Chat","operationId":"admin_chat_admin_api_chats__cid__get","parameters":[{"name":"cid","in":"path","required":true,"schema":{"type":"string","title":"Cid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api/chats/{cid}/status":{"post":{"summary":"Admin Set Status","operationId":"admin_set_status_admin_api_chats__cid__status_post","parameters":[{"name":"cid","in":"path","required":true,"schema":{"type":"string","title":"Cid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api/chats/{cid}/reply":{"post":{"summary":"Admin Reply","operationId":"admin_reply_admin_api_chats__cid__reply_post","parameters":[{"name":"cid","in":"path","required":true,"schema":{"type":"string","title":"Cid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentMsgIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api/actions":{"get":{"summary":"Admin Actions","operationId":"admin_actions_admin_api_actions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/api/settings":{"post":{"summary":"Admin Settings","operationId":"admin_settings_admin_api_settings_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api/articles":{"get":{"summary":"Admin Articles","operationId":"admin_articles_admin_api_articles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Admin Save Article","operationId":"admin_save_article_admin_api_articles_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArticleIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api/articles/{slug}/delete":{"post":{"summary":"Admin Delete Article","operationId":"admin_delete_article_admin_api_articles__slug__delete_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api/articles/reimport":{"post":{"summary":"Admin Reimport","operationId":"admin_reimport_admin_api_articles_reimport_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AgentMsgIn":{"properties":{"text":{"type":"string","maxLength":4000,"minLength":1,"title":"Text"}},"type":"object","required":["text"],"title":"AgentMsgIn"},"ArticleIn":{"properties":{"slug":{"type":"string","pattern":"^[a-z0-9-]{2,80}$","title":"Slug"},"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"body":{"type":"string","maxLength":30000,"minLength":1,"title":"Body"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"published":{"type":"boolean","title":"Published","default":true}},"type":"object","required":["slug","title","body"],"title":"ArticleIn"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HandoffIn":{"properties":{"name":{"type":"string","maxLength":120,"title":"Name","default":""},"email":{"type":"string","maxLength":200,"minLength":3,"title":"Email"},"message":{"type":"string","maxLength":3000,"minLength":1,"title":"Message"}},"type":"object","required":["email","message"],"title":"HandoffIn"},"MsgIn":{"properties":{"text":{"type":"string","maxLength":4000,"minLength":1,"title":"Text"}},"type":"object","required":["text"],"title":"MsgIn"},"SettingsIn":{"properties":{"write_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Write Enabled"},"bot_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Bot Enabled"},"greeting":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Greeting"}},"type":"object","title":"SettingsIn"},"StartIn":{"properties":{"page_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Page Url"}},"type":"object","title":"StartIn"},"StatusIn":{"properties":{"status":{"type":"string","title":"Status"},"admin_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Note"}},"type":"object","required":["status"],"title":"StatusIn"},"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"}}}}