{"openapi":"3.1.0","info":{"title":"OAuth Callback Service","version":"0.1.0"},"paths":{"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/authorize/{agent}":{"get":{"summary":"Authorize","description":"Start OAuth flow. Redirects user to the provider's consent screen.\nExample: /authorize/sonia?provider=google&scope=calendar","operationId":"authorize_authorize__agent__get","parameters":[{"name":"agent","in":"path","required":true,"schema":{"type":"string","title":"Agent"}},{"name":"provider","in":"query","required":false,"schema":{"type":"string","default":"google","title":"Provider"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","default":"calendar","title":"Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/callback":{"get":{"summary":"Callback","description":"OAuth callback. Receives the authorization code from the provider,\nexchanges it for tokens, and stores the refresh token.","operationId":"callback_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","title":"State"}},{"name":"error","in":"query","required":false,"schema":{"type":"string","title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"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"}}}}