{"openapi":"3.1.0","info":{"title":"Jamb Registration Gateway","version":"0.1.0"},"paths":{"/api/whitelist/phone":{"get":{"tags":["whitelist"],"summary":"Check Whitelist","operationId":"check_whitelist_api_whitelist_phone_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"phone_number","in":"query","required":true,"schema":{"type":"string","title":"Phone Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelistCheck"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/whitelist":{"post":{"tags":["whitelist"],"summary":"Create Invites","operationId":"create_invites_api_whitelist_post","security":[{"HTTPBasic":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelistCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelistCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["whitelist"],"summary":"List Whitelist","operationId":"list_whitelist_api_whitelist_get","security":[{"HTTPBasic":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedWhitelistResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/waitlist/join":{"post":{"tags":["waitlist"],"summary":"Join Waitlist","operationId":"join_waitlist_api_waitlist_join_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistJoinRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistJoinResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBasic":[]}]}},"/api/auth/login":{"get":{"tags":["auth"],"summary":"Login","operationId":"login_api_auth_login_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/callback":{"get":{"tags":["auth"],"summary":"Auth Callback","operationId":"auth_callback_api_auth_callback_get","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/me":{"get":{"tags":["auth"],"summary":"Me","operationId":"me_api_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","operationId":"logout_api_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/settings":{"get":{"tags":["admin"],"summary":"Admin Get Settings","operationId":"admin_get_settings_api_admin_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsResponse"}}}}}},"put":{"tags":["admin"],"summary":"Admin Update Settings","operationId":"admin_update_settings_api_admin_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/metrics":{"get":{"tags":["admin"],"summary":"Admin Metrics","operationId":"admin_metrics_api_admin_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardMetrics"}}}}}}},"/api/admin/whitelist/export":{"get":{"tags":["admin"],"summary":"Admin Export Whitelist","operationId":"admin_export_whitelist_api_admin_whitelist_export_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/whitelist":{"get":{"tags":["admin"],"summary":"Admin List Whitelist","operationId":"admin_list_whitelist_api_admin_whitelist_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedDashboardResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin"],"summary":"Admin Create Entry","operationId":"admin_create_entry_api_admin_whitelist_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminWhitelistCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelistEntry"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/whitelist/{phone_number}":{"put":{"tags":["admin"],"summary":"Admin Update Entry","operationId":"admin_update_entry_api_admin_whitelist__phone_number__put","parameters":[{"name":"phone_number","in":"path","required":true,"schema":{"type":"string","title":"Phone Number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminWhitelistUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelistEntry"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Admin Delete Entry","operationId":"admin_delete_entry_api_admin_whitelist__phone_number__delete","parameters":[{"name":"phone_number","in":"path","required":true,"schema":{"type":"string","title":"Phone Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/waitlist/{phone_number}/approve":{"put":{"tags":["admin"],"summary":"Admin Approve Waitlisted","operationId":"admin_approve_waitlisted_api_admin_waitlist__phone_number__approve_put","parameters":[{"name":"phone_number","in":"path","required":true,"schema":{"type":"string","title":"Phone Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelistEntry"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/service/whitelist":{"post":{"tags":["service"],"summary":"Service Whitelist","operationId":"service_whitelist_api_service_whitelist_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceWhitelistRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceWhitelistResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/healthz":{"get":{"summary":"Health Check","operationId":"health_check_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/{full_path}":{"get":{"summary":"Serve Spa","operationId":"serve_spa__full_path__get","parameters":[{"name":"full_path","in":"path","required":true,"schema":{"type":"string","title":"Full Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AdminWhitelistCreate":{"properties":{"phone_number":{"type":"string","title":"Phone Number"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"invite_allocation":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Invite Allocation"},"status":{"type":"string","title":"Status","default":"whitelisted"}},"type":"object","required":["phone_number"],"title":"AdminWhitelistCreate"},"AdminWhitelistUpdate":{"properties":{"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"invite_allocation":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Invite Allocation"},"registered":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Registered"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","title":"AdminWhitelistUpdate"},"DashboardMetrics":{"properties":{"total_registered":{"type":"integer","title":"Total Registered"},"total_waitlisted":{"type":"integer","title":"Total Waitlisted"},"virality":{"type":"number","title":"Virality"},"registration_rate":{"type":"number","title":"Registration Rate"}},"type":"object","required":["total_registered","total_waitlisted","virality","registration_rate"],"title":"DashboardMetrics"},"DashboardWhitelistEntry":{"properties":{"phone_number":{"type":"string","title":"Phone Number"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"invited_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invited By"},"registered":{"type":"boolean","title":"Registered"},"status":{"type":"string","title":"Status"},"invite_allocation":{"type":"integer","title":"Invite Allocation"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"waitlisted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Waitlisted At"},"invites_remaining":{"type":"integer","title":"Invites Remaining","default":0}},"type":"object","required":["phone_number","registered","status","invite_allocation"],"title":"DashboardWhitelistEntry"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Invitee":{"properties":{"phone_number":{"type":"string","title":"Phone Number"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"}},"type":"object","required":["phone_number"],"title":"Invitee"},"PaginatedDashboardResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DashboardWhitelistEntry"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"PaginatedDashboardResponse"},"PaginatedWhitelistResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WhitelistEntry"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"PaginatedWhitelistResponse"},"ServiceWhitelistRequest":{"properties":{"phone_number":{"type":"string","title":"Phone Number"},"invited_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invited By"},"source":{"type":"string","maxLength":32,"minLength":1,"title":"Source","default":"service"}},"type":"object","required":["phone_number"],"title":"ServiceWhitelistRequest"},"ServiceWhitelistResponse":{"properties":{"phone_number":{"type":"string","title":"Phone Number"},"result":{"type":"string","enum":["created","promoted","already_whitelisted"],"title":"Result"}},"type":"object","required":["phone_number","result"],"title":"ServiceWhitelistResponse"},"SettingsResponse":{"properties":{"default_invite_allocation":{"type":"integer","title":"Default Invite Allocation"}},"type":"object","required":["default_invite_allocation"],"title":"SettingsResponse"},"SettingsUpdate":{"properties":{"default_invite_allocation":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Invite Allocation"}},"type":"object","title":"SettingsUpdate"},"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"},"WaitlistJoinRequest":{"properties":{"phone_number":{"type":"string","title":"Phone Number"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"}},"type":"object","required":["phone_number"],"title":"WaitlistJoinRequest"},"WaitlistJoinResponse":{"properties":{"waitlist_position":{"type":"integer","title":"Waitlist Position"}},"type":"object","required":["waitlist_position"],"title":"WaitlistJoinResponse"},"WhitelistCheck":{"properties":{"whitelisted":{"type":"boolean","title":"Whitelisted"},"registered":{"type":"boolean","title":"Registered","default":false},"waitlist_position":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Waitlist Position"},"invite_allocation":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Invite Allocation"},"invites_remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Invites Remaining"}},"type":"object","required":["whitelisted"],"title":"WhitelistCheck"},"WhitelistCreateRequest":{"properties":{"inviter_phone":{"type":"string","title":"Inviter Phone"},"invitees":{"items":{"$ref":"#/components/schemas/Invitee"},"type":"array","title":"Invitees"}},"type":"object","required":["inviter_phone","invitees"],"title":"WhitelistCreateRequest"},"WhitelistCreateResponse":{"properties":{"created":{"items":{"$ref":"#/components/schemas/WhitelistEntry"},"type":"array","title":"Created"},"skipped":{"items":{"type":"string"},"type":"array","title":"Skipped"}},"type":"object","required":["created","skipped"],"title":"WhitelistCreateResponse"},"WhitelistEntry":{"properties":{"phone_number":{"type":"string","title":"Phone Number"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"invited_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invited By"},"registered":{"type":"boolean","title":"Registered"},"status":{"type":"string","title":"Status"},"invite_allocation":{"type":"integer","title":"Invite Allocation"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"waitlisted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Waitlisted At"}},"type":"object","required":["phone_number","registered","status","invite_allocation"],"title":"WhitelistEntry"}},"securitySchemes":{"HTTPBasic":{"type":"http","scheme":"basic"},"HTTPBearer":{"type":"http","scheme":"bearer"}}}}