{"openapi":"3.1.0","info":{"title":"nutrack-backend","version":"0.0.5"},"paths":{"/auth/token":{"get":{"tags":["auth"],"summary":"Refresh Token","operationId":"refresh_token_auth_token_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/auth/wstoken":{"get":{"tags":["auth"],"summary":"Get Ws Token","operationId":"get_ws_token_auth_wstoken_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WsTokenResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/auth/login":{"post":{"tags":["auth"],"summary":"Returns a jwt token in exchange for a users credentials","operationId":"login_auth_login_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_auth_login_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/register":{"post":{"tags":["auth"],"summary":"Register","operationId":"register_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/reset_password":{"post":{"tags":["auth"],"summary":"Reset Password","operationId":"reset_password_auth_reset_password_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/generate":{"post":{"tags":["api"],"summary":"Generate Api Key","description":"Generate a new api key to be returned once before hashing","operationId":"generate_api_key_api_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ViewOnceApiKeyRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/email/frontend-mail-contact":{"post":{"tags":["email"],"summary":"Send Email Route","operationId":"send_email_route_email_frontend_mail_contact_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactFormMessage"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/healthz":{"get":{"tags":["health"],"summary":"Healthz","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Healthz Healthz Get"}}}}}}}},"components":{"schemas":{"ApiKeyCreate":{"properties":{"key_name":{"type":"string","title":"Key Name"},"org_id":{"type":"string","title":"Org Id"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["key_name","org_id"],"title":"ApiKeyCreate"},"Body_login_auth_login_post":{"properties":{"grant_type":{"type":"string","pattern":"^password$","title":"Grant Type"},"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"},"scope":{"type":"string","title":"Scope","default":""},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"}},"type":"object","required":["grant_type","username","password"],"title":"Body_login_auth_login_post"},"ContactFormMessage":{"properties":{"name":{"type":"string","title":"Name"},"contact":{"type":"string","format":"email","title":"Contact"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"message":{"type":"string","title":"Message"}},"type":"object","required":["name","contact","subject","message"],"title":"ContactFormMessage"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LoginResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"}},"type":"object","required":["access_token","refresh_token"],"title":"LoginResponse"},"SendEmailResponse":{"properties":{"success":{"type":"boolean","title":"Success"}},"type":"object","required":["success"],"title":"SendEmailResponse"},"UserCreate":{"properties":{"username":{"type":"string","maxLength":30,"minLength":2,"title":"Username"},"given_name":{"type":"string","maxLength":255,"minLength":1,"title":"Given Name"},"family_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Family Name"},"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":12,"title":"Password"}},"type":"object","required":["username","given_name","email","password"],"title":"UserCreate"},"UserRead":{"properties":{"username":{"type":"string","maxLength":30,"minLength":2,"title":"Username"},"given_name":{"type":"string","maxLength":255,"minLength":1,"title":"Given Name"},"family_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Family Name"},"email":{"type":"string","format":"email","title":"Email"},"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["username","given_name","email","id","created_at","updated_at"],"title":"UserRead"},"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"},"ViewOnceApiKeyRead":{"properties":{"key_name":{"type":"string","title":"Key Name"},"key_hash":{"type":"string","title":"Key Hash"},"key_preview":{"type":"string","title":"Key Preview"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"key_plaintext":{"type":"string","title":"Key Plaintext"}},"type":"object","required":["key_name","key_hash","key_preview","created_at","expires_at","key_plaintext"],"title":"ViewOnceApiKeyRead"},"WsTokenResponse":{"properties":{"websocket_token":{"type":"string","title":"Websocket Token"}},"type":"object","required":["websocket_token"],"title":"WsTokenResponse"}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"auth/login"}}}}}}