diff options
Diffstat (limited to 'jb-ui/src/api_jb/openapi.json')
| -rw-r--r-- | jb-ui/src/api_jb/openapi.json | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/jb-ui/src/api_jb/openapi.json b/jb-ui/src/api_jb/openapi.json new file mode 100644 index 0000000..6133ec2 --- /dev/null +++ b/jb-ui/src/api_jb/openapi.json @@ -0,0 +1 @@ +{"openapi":"3.1.0","info":{"title":"jb","version":"1.0.0"},"servers":[{"url":"https://jamesbillings67.com/","description":"Production environment"}],"paths":{"/work/":{"get":{"tags":["API"],"summary":"Work","description":"HTML Page that the worker lands on in an iFrame.\nThey can either be previewing the HIT, or have already accepted it.","operationId":"work_work__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/work/direct/":{"get":{"tags":["API"],"summary":"Work Direct","description":"View for direct work (not on AMT).\nMakes sure user is authenticated.","operationId":"work_direct_work_direct__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/magic-link/request/":{"post":{"tags":["Auth"],"summary":"Request Magic Link","description":"Create a magic link.","operationId":"request_magic_link_auth_magic_link_request__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountLogin"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Request Magic Link Auth Magic Link Request Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/magic-link/exchange/":{"post":{"tags":["Auth"],"summary":"Exchange Magic Link","description":"Exchange a magic link only after its landing page makes an explicit POST.","operationId":"exchange_magic_link_auth_magic_link_exchange__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicLinkExchangeRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/link-amt/request/":{"post":{"tags":["Auth"],"summary":"Link Amt Account","description":"Link an AMT account and login.","operationId":"link_amt_account_auth_link_amt_request__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AmtAccountLink"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Link Amt Account Auth Link Amt Request Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/link-amt/invite/":{"post":{"tags":["Auth"],"summary":"Invite Amt Account Link","description":"Create a long-lived AMT account-link URL without sending an email.","operationId":"invite_amt_account_link_auth_link_amt_invite__post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AmtAccountLink"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Invite Amt Account Link Auth Link Amt Invite Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/link-amt/exchange/":{"post":{"tags":["Auth"],"summary":"Exchange Amt Account Link","description":"Validate the email link, then transition the bound AMT account.","operationId":"exchange_amt_account_link_auth_link_amt_exchange__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicLinkExchangeRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/session/":{"get":{"tags":["Auth"],"summary":"Get Session","operationId":"get_session_auth_session__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Auth"],"summary":"Delete Session","operationId":"delete_session_auth_session__delete","responses":{"204":{"description":"Successful Response"}}}},"/wallet/cashout/request/":{"post":{"tags":["Wallet"],"summary":"Request Cashout","description":"Email the authenticated user a link confirming the requested amount.","operationId":"request_cashout_wallet_cashout_request__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Request Cashout Wallet Cashout Request Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/wallet/cashout/confirm/":{"post":{"tags":["Wallet"],"summary":"Confirm Cashout","operationId":"confirm_cashout_wallet_cashout_confirm__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashoutConfirmation"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashoutRequestInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/wallet/cashout/postback/":{"post":{"tags":["Wallet"],"summary":"Cashout Postback","operationId":"cashout_postback_wallet_cashout_postback__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashoutPostback"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/favicon.ico":{"get":{"summary":"Return Nothing","operationId":"return_nothing_favicon_ico_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Return Nothing Favicon Ico Get"}}}}}}},"/sitemap.xml":{"get":{"summary":"Return Nothing","operationId":"return_nothing_sitemap_xml_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Return Nothing Sitemap Xml Get"}}}}}}},"/robots.txt":{"get":{"summary":"Return Nothing","operationId":"return_nothing_robots_txt_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Return Nothing Robots Txt Get"}}}}}}},"/{full_path}":{"get":{"summary":"Serve React App","operationId":"serve_react_app__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":{"AccountLogin":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"AccountLogin"},"AmtAccountLink":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"amt_worker_id":{"type":"string","maxLength":50,"minLength":3,"title":"Amt Worker Id"}},"additionalProperties":false,"type":"object","required":["email","amt_worker_id"],"title":"AmtAccountLink"},"CashoutConfirmation":{"properties":{"token":{"type":"string","minLength":1,"title":"Token"}},"additionalProperties":false,"type":"object","required":["token"],"title":"CashoutConfirmation"},"CashoutPostback":{"properties":{"cashout_id":{"type":"string","maxLength":32,"minLength":32,"title":"Cashout Id"}},"additionalProperties":false,"type":"object","required":["cashout_id"],"title":"CashoutPostback"},"CashoutRequest":{"properties":{"amount":{"type":"integer","minimum":0.0,"title":"Amount","description":"Amount in USD cents","gt":0,"le":10000},"cashout_method_id":{"type":"string","maxLength":32,"minLength":32,"title":"Cashout Method Id","description":"Cashout method ID"}},"additionalProperties":false,"type":"object","required":["amount","cashout_method_id"],"title":"CashoutRequest"},"CashoutRequestInfo":{"properties":{"id":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Id","description":"Unique ID for this cashout. This may be NULL if the status is REJECTED or FAILED, which may happen if the request is invalid.","examples":["3ceb847aaf9f40f4bd15b2b5e083abf6"]},"description":{"type":"string","title":"Description","description":"This is the name of the cashout method.","examples":["Visa® Prepaid Card USD"]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"status":{"anyOf":[{"$ref":"#/components/schemas/PayoutStatus"},{"type":"null"}],"description":" - `PENDING` = PENDING\n - `APPROVED` = APPROVED\n - `REJECTED` = REJECTED\n - `CANCELLED` = CANCELLED\n - `FAILED` = FAILED\n - `COMPLETE` = COMPLETE","default":"PENDING","examples":["PENDING"]},"transaction_info":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Transaction Info"},"product_id":{"type":"string","maxLength":32,"minLength":32,"title":"Product Id"},"product_user_id":{"type":"string","maxLength":128,"minLength":3,"title":"Product User Id"},"payout_type":{"$ref":"#/components/schemas/PayoutType","description":" - `PAYPAL` = PAYPAL\n - `TANGO` = TANGO\n - `TREMENDOUS` = TREMENDOUS\n - `DWOLLA` = DWOLLA\n - `ACH` = ACH\n - `WIRE` = WIRE\n - `CASH_IN_MAIL` = CASH_IN_MAIL\n - `PRIZE` = PRIZE\n - `AMT` = AMT\n - `AMT_BONUS` = AMT_BONUS\n - `AMT_ASSIGNMENT` = AMT_HIT","examples":["ACH"]},"amount":{"type":"integer","exclusiveMaximum":9.223372036854776e+18,"exclusiveMinimum":0.0,"title":"Amount","description":"The USDCent amount int. This cannot be 0 or negative","examples":[531]}},"type":"object","required":["id","description","product_id","product_user_id","payout_type","amount"],"title":"CashoutRequestInfo","description":"See models.thl.payout: PayoutEvent. We've confused a CashOut and a\nPayout. This is used only in the API response."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"MagicLinkExchangeRequest":{"properties":{"token":{"type":"string","minLength":1,"title":"Token"}},"additionalProperties":false,"type":"object","required":["token"],"title":"MagicLinkExchangeRequest"},"PayoutStatus":{"type":"string","enum":["PENDING","APPROVED","REJECTED","CANCELLED","FAILED","COMPLETE"],"title":"PayoutStatus","description":"The max size of the db field that holds this value is 20, so please\ndon't add new values longer than that!"},"PayoutType":{"type":"string","enum":["PAYPAL","TANGO","TREMENDOUS","DWOLLA","ACH","WIRE","CASH_IN_MAIL","PRIZE","AMT","AMT_BONUS","AMT_ASSIGNMENT","AMT_ASSIGNMENT"],"title":"PayoutType","description":"The method in which the requested payout is delivered."},"User":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"display_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Display Name"},"blocked":{"type":"boolean","title":"Blocked","default":false},"product_user_id":{"type":"string","title":"Product User Id","readOnly":true}},"type":"object","required":["email","product_user_id"],"title":"User","description":"A user that has been authenticated and exists in THL"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}
\ No newline at end of file |
