{"openapi":"3.1.0","info":{"title":"DataAssist-IO Server","version":"0.1.0"},"paths":{"/api/me":{"get":{"tags":["import"],"summary":"Get Current User Info","operationId":"get_current_user_info_api_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"tags":["import"],"summary":"Update Me","operationId":"update_me_api_me_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/me/password":{"post":{"tags":["import"],"summary":"Change My Password","operationId":"change_my_password_api_me_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users/paginated":{"get":{"tags":["import"],"summary":"List Org Users Paginated","description":"Paginated + filtered users list for the admin Users page.\n\nAll filters AND'd together; ``search`` matches email or display_name\n(LIKE %q%). Backend is the source of truth for filter + LIMIT/OFFSET —\nthe SPA passes query params and renders only the rows it receives.\n\nReturns `{total, page, page_size, total_pages, users: [...]}` where\neach user matches the legacy ``GET /api/users`` shape (incl. usage +\nteams) so the SPA can swap between the two cheaply.","operationId":"list_org_users_paginated_api_users_paginated_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"role","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Team Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users":{"get":{"tags":["import"],"summary":"List Org Users","operationId":"list_org_users_api_users_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["import"],"summary":"Create Org User","operationId":"create_org_user_api_users_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users/{user_id}":{"put":{"tags":["import"],"summary":"Update Org User","operationId":"update_org_user_api_users__user_id__put","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/org/settings":{"get":{"tags":["import"],"summary":"Get Org Settings","description":"Read-only per-org settings shown in the admin Settings page.\n\nOAuth client_id / client_secret / redirect_uris no longer live here — MCP\nclients (Claude / ChatGPT) register dynamically via DCR using the\nsystem-wide platform allowlist. See `/api/super-admin/oauth/clients/...`\nfor the system-wide config (super-admin only).","operationId":"get_org_settings_api_org_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"tags":["import"],"summary":"Update Org Settings","operationId":"update_org_settings_api_org_settings_put","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/audit/tools":{"get":{"tags":["import"],"summary":"Audit Tools","description":"Distinct MCP tool names this org has logged — drives the filter\ndropdown on the Tool Calls page. Admin-only.","operationId":"audit_tools_api_audit_tools_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/audit/total":{"get":{"tags":["import"],"summary":"Audit Total","description":"Total MCP tool calls for the org — admin-only, count-only.\n\nPowers the Dashboard \"Tool Calls\" stat card. Returns a single\ninteger, no aggregation across users or tools (those views are\nintentionally MCP-side). Not gated on ``audit_detailed`` — it's\njust a row count, no payloads.","operationId":"audit_total_api_audit_total_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/audit/daily":{"get":{"tags":["import"],"summary":"Audit Daily","description":"Daily tool-call counts for the last N days — admin-only.\n\nPowers the Dashboard activity graph. Returns one entry per day\n(including zeros for days with no calls) so the chart always has\na full window.","operationId":"audit_daily_api_audit_daily_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audit/logs":{"get":{"tags":["import"],"summary":"Audit Logs","description":"Per-call audit rows for the org with filters + pagination.\n\nAlways reachable (no ``audit_detailed`` gate on the endpoint itself).\nThe ``audit_detailed`` toggle acts as a hard privacy gate on the\npayload fields: when ``FALSE``, the API masks ``request_args`` and\n``response_data`` to ``None`` even for older rows captured while it\nwas ``TRUE`` — so flipping the toggle off is a real \"I don't want\nthese payloads readable\" action, not just a UI hide (SOC2 posture).\nThe audit_wrapper also never *writes* those fields while the toggle\nis off, so the strip here is for historical rows. Viewers are\nauto-restricted to their own ``user_id``.\n\nFilters (all optional, AND'd together):\n  * ``user_id``    — admin-only; viewer is force-scoped to themselves.\n  * ``tool_name``  — exact match.\n  * ``success``    — 'true' / 'false'.\n  * ``date_from`` / ``date_to`` — inclusive day boundaries. Format\n    ``YYYY-MM-DD`` (interpreted in server local time).","operationId":"audit_logs_api_audit_logs_get","parameters":[{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"}},{"name":"tool_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Name"}},{"name":"success","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date To"}},{"name":"team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Team Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/signup/captcha":{"get":{"tags":["signup"],"summary":"Get Signup Captcha","description":"CAPTCHA image for the signup form. Token returned in the X-Captcha-Token header.","operationId":"get_signup_captcha_api_signup_captcha_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/signup":{"post":{"tags":["signup"],"summary":"Signup","operationId":"signup_api_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/signup/verify-email":{"post":{"tags":["signup"],"summary":"Verify Email","description":"Consume a verification code, mark the email verified, and log the user in.\n\nOn success returns a session token so the SPA can drop the user straight onto\nthe dashboard. Used by:\n  - the signup admin (after they create the org)\n  - any user the admin adds via /api/users (who lands here from the link in\n    their welcome email)","operationId":"verify_email_api_signup_verify_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/signup/resend-verification":{"post":{"tags":["signup"],"summary":"Resend Verification","description":"Issue a fresh verification code for an unverified user. Always 200 to avoid email enumeration.","operationId":"resend_verification_api_signup_resend_verification_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendVerificationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/contact/captcha":{"get":{"tags":["contact"],"summary":"Get Captcha","description":"Generate a CAPTCHA image and return it with a token header.","operationId":"get_captcha_api_contact_captcha_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/contact":{"post":{"tags":["contact"],"summary":"Submit Contact","operationId":"submit_contact_api_contact_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login":{"get":{"tags":["auth"],"summary":"Login Page","operationId":"login_page_auth_login_get","parameters":[{"name":"state","in":"query","required":false,"schema":{"type":"string","default":"","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["auth"],"summary":"Login Password","description":"OAuth-flow password sign-in. Verifies and completes the OAuth redirect.","operationId":"login_password_auth_login_post","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_password_auth_login_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login/code":{"post":{"tags":["auth"],"summary":"Login Request Code","description":"OAuth-flow alternative: email a one-time code. Same form as password sign-in\nso the user doesn't have to retype their email.","operationId":"login_request_code_auth_login_code_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_request_code_auth_login_code_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login/verify":{"post":{"tags":["auth"],"summary":"Login Verify","description":"OAuth-flow OTP verify. Completes the OAuth redirect on success.","operationId":"login_verify_auth_login_verify_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_verify_auth_login_verify_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login-api/captcha":{"get":{"tags":["auth"],"summary":"Login Api Captcha","description":"CAPTCHA image for the SPA login form. Token in the X-Captcha-Token header.","operationId":"login_api_captcha_auth_login_api_captcha_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/auth/login-api":{"post":{"tags":["auth"],"summary":"Login Api Password","description":"SPA password sign-in.","operationId":"login_api_password_auth_login_api_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordLoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login-api/code":{"post":{"tags":["auth"],"summary":"Login Api Send Code","description":"SPA OTP step 1: issue + email a code.\n\nErrors surfaced to the UI:\n  - 400 if CAPTCHA fails\n  - 401 if the email isn't a known active account\n  - 403 if the account exists but hasn't verified its email\nSMTP delivery is fire-and-forget — a transient SMTP outage no longer blocks\nthe request; failures land in logs/Sentry and the user can hit Resend.\nHoneypot triggers a silent 200 with no code issued, so bots see \"success\"\nbut no email actually goes out.","operationId":"login_api_send_code_auth_login_api_code_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login-api/verify":{"post":{"tags":["auth"],"summary":"Login Api Verify","description":"SPA OTP step 2: verify the code, return an access token.","operationId":"login_api_verify_auth_login_api_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/orgs/paginated":{"get":{"tags":["super-admin"],"summary":"List Orgs Paginated","description":"Paginated + filtered orgs list — drives the super-admin Orgs page.\n\nFilters all AND together; ``search`` matches slug or name (LIKE %q%).\nReturns ``{total, page, page_size, total_pages, orgs: [...]}`` with\nthe same per-org shape as ``GET /api/super-admin/orgs``.","operationId":"list_orgs_paginated_super_admin_orgs_paginated_get","parameters":[{"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"}},{"name":"audit","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audit"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date To"}},{"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":200,"minimum":1,"default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/orgs":{"get":{"summary":"Spa Super Admin Orgs","operationId":"spa_super_admin_orgs_super_admin_orgs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/super-admin/orgs/{org_id}":{"patch":{"tags":["super-admin"],"summary":"Patch Org","operationId":"patch_org_super_admin_orgs__org_id__patch","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"integer","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchOrgRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["super-admin"],"summary":"Delete Org","description":"Hard-delete an org.\n\nSequence:\n  1. Block if the org is an active marketing partner (promo codes / commission\n     history must be preserved — deactivate the partnership first).\n  2. Drop physical MySQL tables for every local-sync (CSV/SFTP) source so\n     imported data is cleaned up before metadata rows disappear.\n  3. Delete data_source_sync_runs (large payload rows not reached by cascade).\n  4. DELETE FROM orgs — ON DELETE CASCADE handles everything else:\n     users, OAuth tokens, data_sources, data_source_tables, audit_logs,\n     credit_purchases, credit_balances, teams, team_users, team_tables, …","operationId":"delete_org_super_admin_orgs__org_id__delete","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"integer","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/data-sources":{"get":{"summary":"Spa Super Admin Data Sources","operationId":"spa_super_admin_data_sources_super_admin_data_sources_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/super-admin/data-sources/{source_id}":{"delete":{"tags":["super-admin"],"summary":"Delete Data Source","description":"Cross-org hard-delete of a data source.\n\nMirrors the admin DELETE /api/data-sources/{id} but without the org_id\nguard, so super-admin can clean up any org's source directly.\n\nSequence:\n  1. Collect physical (non-live-query) table names before the cascade fires.\n  2. DELETE data_sources row — cascades data_source_tables, table_meta,\n     sync_runs, team_tables automatically.\n  3. DROP each physical MySQL table.\n  4. DELETE data_sources row — cascades everything else.","operationId":"delete_data_source_super_admin_data_sources__source_id__delete","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/teams":{"get":{"summary":"Spa Super Admin Teams","operationId":"spa_super_admin_teams_super_admin_teams_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/super-admin/users/paginated":{"get":{"tags":["super-admin"],"summary":"List Users Paginated","description":"Paginated + filtered users list — drives the super-admin Users page.","operationId":"list_users_paginated_super_admin_users_paginated_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"role","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"org_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Org Id"}},{"name":"verified","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verified"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date To"}},{"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":200,"minimum":1,"default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/users":{"get":{"summary":"Spa Super Admin Users","operationId":"spa_super_admin_users_super_admin_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/super-admin/users/{user_id}":{"patch":{"tags":["super-admin"],"summary":"Patch User","operationId":"patch_user_super_admin_users__user_id__patch","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchUserRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/audit":{"get":{"summary":"Spa Super Admin Audit","operationId":"spa_super_admin_audit_super_admin_audit_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/super-admin/settings":{"get":{"summary":"Spa Super Admin Settings","operationId":"spa_super_admin_settings_super_admin_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/super-admin/settings/{key}":{"put":{"tags":["super-admin"],"summary":"Put Setting","operationId":"put_setting_super_admin_settings__key__put","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchSettingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/marketer-orgs":{"get":{"summary":"Spa Super Admin Marketer Orgs","operationId":"spa_super_admin_marketer_orgs_super_admin_marketer_orgs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["super-admin"],"summary":"Create Marketer Org","description":"Flag an existing org as a marketing org. Idempotent — if the org is\nalready flagged the row is UPDATEd with the new payout details / notes.\n\nEmails active admins of the org via marketer_org_onboarded template.","operationId":"create_marketer_org_super_admin_marketer_orgs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMarketerOrgRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/marketer-orgs/{org_id}":{"get":{"tags":["super-admin"],"summary":"Get Marketer Org Detail","description":"Full detail: marketing-org row + their codes + commissions summary.","operationId":"get_marketer_org_detail_super_admin_marketer_orgs__org_id__get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"integer","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["super-admin"],"summary":"Patch Marketer Org","description":"Edit a marketing-org row. Deactivating cascades a sanity flip on all\nits codes (sets `promo_codes.is_active=FALSE` for everything that org\nowns) so both layers reflect the same truth.\n\nField semantics use Pydantic's `model_fields_set` so the SPA can\nexplicitly CLEAR a value: omitting a key from the body = no change;\nsending `null` or an empty string = clear to NULL.","operationId":"patch_marketer_org_super_admin_marketer_orgs__org_id__patch","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"integer","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchMarketerOrgRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["super-admin"],"summary":"Delete Marketer Org","description":"Un-flag a marketing org. FK RESTRICT from promo_codes blocks the\ndelete if any codes exist — deactivate instead in that case.","operationId":"delete_marketer_org_super_admin_marketer_orgs__org_id__delete","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"integer","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/promo-codes":{"get":{"summary":"Spa Super Admin Promo Codes","operationId":"spa_super_admin_promo_codes_super_admin_promo_codes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["super-admin"],"summary":"Create Promo Code","description":"Create a promo code owned by a marketing org. The org must already\nbe flagged via POST /super-admin/marketer-orgs. Emails active admins\nof the marketing org with the code + share URL.","operationId":"create_promo_code_super_admin_promo_codes_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePromoCodeRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/promo-codes/{promo_id}":{"patch":{"tags":["super-admin"],"summary":"Patch Promo Code","description":"Edit a promo code. Pricing edits (discount %, commission %) affect\nonly FUTURE redemptions — existing org_promo_signups and\npurchase_promo_applications carry their own snapshots.","operationId":"patch_promo_code_super_admin_promo_codes__promo_id__patch","parameters":[{"name":"promo_id","in":"path","required":true,"schema":{"type":"integer","title":"Promo Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchPromoCodeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/promo-codes/{promo_id}/applications":{"get":{"tags":["super-admin"],"summary":"List Promo Applications","description":"All purchase-time applications of a promo code, with org + purchase\n+ commission status.\n\nPowers the \"View\" drilldown on /super-admin/promo-codes — shows EXACTLY\nwhich orgs applied the code, when, on which purchase, whether the\npurchase actually completed, and whether the marketer earned a\ncommission. Useful for support / dispute resolution.","operationId":"list_promo_applications_super_admin_promo_codes__promo_id__applications_get","parameters":[{"name":"promo_id","in":"path","required":true,"schema":{"type":"integer","title":"Promo Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/commissions":{"get":{"summary":"Spa Super Admin Commissions","operationId":"spa_super_admin_commissions_super_admin_commissions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/super-admin/commissions/{commission_id}/approve":{"post":{"tags":["super-admin"],"summary":"Approve Commission","operationId":"approve_commission_super_admin_commissions__commission_id__approve_post","parameters":[{"name":"commission_id","in":"path","required":true,"schema":{"type":"integer","title":"Commission Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/commissions/{commission_id}/pay":{"post":{"tags":["super-admin"],"summary":"Pay Commission","description":"Mark an approved commission as paid. Emails the marketing-org admins.\n\nOut-of-band: the actual money transfer happens via bank/UPI/PayPal —\n`payout_ref` is the receipt the super admin records here.","operationId":"pay_commission_super_admin_commissions__commission_id__pay_post","parameters":[{"name":"commission_id","in":"path","required":true,"schema":{"type":"integer","title":"Commission Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayCommissionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/commissions/{commission_id}/reverse":{"post":{"tags":["super-admin"],"summary":"Reverse Commission","description":"Mark a commission as reversed (e.g. after a Razorpay refund/dispute).\nAllowed from any non-reversed state.","operationId":"reverse_commission_super_admin_commissions__commission_id__reverse_post","parameters":[{"name":"commission_id","in":"path","required":true,"schema":{"type":"integer","title":"Commission Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReverseCommissionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/commissions/bulk-approve":{"post":{"tags":["super-admin"],"summary":"Bulk Approve Commissions","operationId":"bulk_approve_commissions_super_admin_commissions_bulk_approve_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCommissionIdsBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/commissions/bulk-pay":{"post":{"tags":["super-admin"],"summary":"Bulk Pay Commissions","description":"Mark a batch of approved commissions as paid. Sends one email per\ncommission to the relevant marketing org's admins (matches single-row\nsemantics — recipients see one email per commission line so they can\nreconcile against their bank statement).","operationId":"bulk_pay_commissions_super_admin_commissions_bulk_pay_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkPayCommissionsBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/commissions/bulk-reverse":{"post":{"tags":["super-admin"],"summary":"Bulk Reverse Commissions","description":"Mark a batch of commissions as reversed. Skips rows already reversed.","operationId":"bulk_reverse_commissions_super_admin_commissions_bulk_reverse_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkReverseCommissionsBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/billing":{"get":{"summary":"Spa Super Admin Billing","operationId":"spa_super_admin_billing_super_admin_billing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/super-admin/billing/{org_id}/purchases":{"get":{"tags":["super-admin"],"summary":"Super Admin Org Purchases","description":"Full purchase history for one org, newest first.","operationId":"super_admin_org_purchases_super_admin_billing__org_id__purchases_get","parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"integer","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/orgs/eligible-for-marketer":{"get":{"tags":["super-admin"],"summary":"List Orgs Eligible For Marketer","description":"Orgs not already flagged as marketing orgs. Used by the\n/super-admin/marketer-orgs create form. Filters by slug/name.","operationId":"list_orgs_eligible_for_marketer_super_admin_orgs_eligible_for_marketer_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/packs":{"get":{"tags":["billing"],"summary":"Get Packs","description":"Returns public packs for the org's region + any custom packs assigned to it.\n\nRegion is derived from the org's `billing_country` (IN → 'in', else 'global').\nIf billing_country isn't set yet, defaults to 'global'.\n\nResponse is extended with `active_promo` when the org has a signup-attached\npromo that has not yet been consumed on any purchase. The SPA surfaces this\nas an auto-apply banner.","operationId":"get_packs_api_billing_packs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/billing/details":{"get":{"tags":["billing"],"summary":"Get Billing Details Endpoint","operationId":"get_billing_details_endpoint_api_billing_details_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"tags":["billing"],"summary":"Put Billing Details Endpoint","operationId":"put_billing_details_endpoint_api_billing_details_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingDetailsBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/balance":{"get":{"tags":["billing"],"summary":"Get Balance Endpoint","operationId":"get_balance_endpoint_api_billing_balance_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/billing/promo/validate":{"post":{"tags":["billing"],"summary":"Validate Promo","description":"Lightweight validation called by the SPA when the user types a code.\n\nReturns either a successful preview ({valid, discount_amount, final_amount})\nor a structured error with a `code` the SPA can branch on. Does NOT\nconsume the code — checkout/create is the only path that records an\napplication.","operationId":"validate_promo_api_billing_promo_validate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoValidateBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/checkout":{"post":{"tags":["billing"],"summary":"Checkout","description":"Create a Razorpay order and a pending credit_purchases row.\n\nPrecondition: billing details must be complete (approach A — block paid\ncheckout until name/address/country are filled).\n\nIf `promo_code` is supplied, the price charged is the post-discount\n`final_amount`. The promo validation + the application-row INSERT happen\nin the same transaction as the credit_purchases INSERT — a stale code\ncannot lead to a credited purchase at the discounted price.","operationId":"checkout_api_billing_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/checkout/verify":{"post":{"tags":["billing"],"summary":"Checkout Verify","description":"Client-side success callback from Razorpay Checkout JS.\n\nWe verify the signature here, but the authoritative status flip + balance\nbump happens in the webhook (idempotent). This endpoint only acknowledges\nthe client redirect so the SPA can show a success screen immediately.","operationId":"checkout_verify_api_billing_checkout_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutVerifyBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/checkout/abandon":{"post":{"tags":["billing"],"summary":"Checkout Abandon","description":"User closed the Razorpay modal without paying — flip pending row to failed.\n\nIdempotent (only flips rows still in `pending`). Verifies with Razorpay\nBEFORE marking failed — if the payment was actually captured (e.g., a hard\nrefresh ate the success callback), completes the purchase instead. Returns\n`{ok, status}` where status is one of `failed`, `completed`, `noop`.","operationId":"checkout_abandon_api_billing_checkout_abandon_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutAbandonBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/transactions/reconcile-pending":{"post":{"tags":["billing"],"summary":"Reconcile Pending","description":"Scan this org's non-terminal purchases and reconcile each against Razorpay.\n\nCalled by the SPA when the Billing page loads. Handles two cases where a\nwebhook never reached us:\n\n  1. `payment.captured` lost → row stuck `pending`. We ask Razorpay, and\n     if a payment is captured we flip to `completed` and credit the balance.\n  2. `payment.failed` arrived but the subsequent retry's `payment.captured`\n     was lost → row is `failed` even though money moved. Same recovery —\n     Razorpay returns the captured payment on the same order, we flip\n     `failed → completed`.\n\nFor (2) we time-bound the scan to the last 7 days so we don't repeatedly\nquery Razorpay for ancient genuinely-failed rows.","operationId":"reconcile_pending_api_billing_transactions_reconcile_pending_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/billing/transactions":{"get":{"tags":["billing"],"summary":"Get Transactions","operationId":"get_transactions_api_billing_transactions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/billing/transactions.csv":{"get":{"tags":["billing"],"summary":"Get Transactions Csv","operationId":"get_transactions_csv_api_billing_transactions_csv_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/billing/transactions/{purchase_id}/invoice.pdf":{"get":{"tags":["billing"],"summary":"Get Invoice Pdf","operationId":"get_invoice_pdf_api_billing_transactions__purchase_id__invoice_pdf_get","parameters":[{"name":"purchase_id","in":"path","required":true,"schema":{"type":"integer","title":"Purchase Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/usage.csv":{"get":{"tags":["billing"],"summary":"Get Usage Csv","description":"Usage CSV from audit_logs. Admin sees full org; viewer sees own.","operationId":"get_usage_csv_api_billing_usage_csv_get","parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/razorpay/webhook":{"post":{"tags":["razorpay"],"summary":"Razorpay Webhook","description":"Razorpay sends POST events here.\n\nConfigure in Razorpay Dashboard → Settings → Webhooks:\n  - URL:    https://<host>/api/razorpay/webhook\n  - Secret: must match RAZORPAY_WEBHOOK_SECRET\n  - Active events:\n      - payment.captured  (required — money received, credit the balance)\n      - payment.failed    (optional — flip pending row to failed for clean UX)\nAll other events are acknowledged with 200 so Razorpay stops retrying.","operationId":"razorpay_webhook_api_razorpay_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/data-source-engines":{"get":{"tags":["data_sources"],"summary":"List Engines","operationId":"list_engines_api_admin_data_source_engines_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/data-source-engines/{engine_id}":{"put":{"tags":["data_sources"],"summary":"Update Engine","operationId":"update_engine_api_admin_data_source_engines__engine_id__put","parameters":[{"name":"engine_id","in":"path","required":true,"schema":{"type":"integer","title":"Engine Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEngineRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/data-source-types":{"get":{"tags":["data_sources"],"summary":"List Types","operationId":"list_types_api_data_source_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/data-source-types":{"post":{"tags":["data_sources"],"summary":"Create Type","operationId":"create_type_api_admin_data_source_types_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTypeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/data-source-types/{type_id}":{"put":{"tags":["data_sources"],"summary":"Update Type","operationId":"update_type_api_admin_data_source_types__type_id__put","parameters":[{"name":"type_id","in":"path","required":true,"schema":{"type":"integer","title":"Type Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTypeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/data-sources":{"get":{"tags":["data_sources"],"summary":"List Data Sources","operationId":"list_data_sources_api_data_sources_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["data_sources"],"summary":"Create Data Source","operationId":"create_data_source_api_data_sources_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDataSourceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/data-sources/{source_id}":{"get":{"tags":["data_sources"],"summary":"Get Data Source","operationId":"get_data_source_api_data_sources__source_id__get","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["data_sources"],"summary":"Update Data Source","operationId":"update_data_source_api_data_sources__source_id__put","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDataSourceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["data_sources"],"summary":"Delete Data Source","operationId":"delete_data_source_api_data_sources__source_id__delete","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/data-sources/{source_id}/config":{"get":{"tags":["data_sources"],"summary":"Get Data Source Config","operationId":"get_data_source_config_api_data_sources__source_id__config_get","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/data-sources/test-config":{"post":{"tags":["data_sources"],"summary":"Test Config","description":"Test a connection before creating the data source.","operationId":"test_config_api_data_sources_test_config_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestConfigRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/data-sources/{source_id}/test":{"post":{"tags":["data_sources"],"summary":"Test Data Source","operationId":"test_data_source_api_data_sources__source_id__test_post","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/data-sources/{source_id}/browse":{"get":{"tags":["data_sources"],"summary":"Browse Data Source","operationId":"browse_data_source_api_data_sources__source_id__browse_get","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/data-sources/{source_id}/upload":{"post":{"tags":["data_sources"],"summary":"Upload Csv","operationId":"upload_csv_api_data_sources__source_id__upload_post","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_csv_api_data_sources__source_id__upload_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/excel-sheets/inspect":{"post":{"tags":["data_sources"],"summary":"Inspect Excel No Source","description":"Inspect Excel sheet names without an existing data source — used by the create wizard.","operationId":"inspect_excel_no_source_api_excel_sheets_inspect_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_inspect_excel_no_source_api_excel_sheets_inspect_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/data-sources/{source_id}/excel-sheets":{"post":{"tags":["data_sources"],"summary":"Inspect Excel Sheets","description":"Return sheet names from an Excel file without importing anything.","operationId":"inspect_excel_sheets_api_data_sources__source_id__excel_sheets_post","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_inspect_excel_sheets_api_data_sources__source_id__excel_sheets_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/data-sources/{source_id}/upload-excel":{"post":{"tags":["data_sources"],"summary":"Upload Excel","description":"Import selected sheets from an Excel file — one table per sheet.","operationId":"upload_excel_api_data_sources__source_id__upload_excel_post","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_excel_api_data_sources__source_id__upload_excel_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/data-sources/{source_id}/tables":{"get":{"tags":["data_sources"],"summary":"List Source Tables","operationId":"list_source_tables_api_data_sources__source_id__tables_get","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["data_sources"],"summary":"Expose Tables","operationId":"expose_tables_api_data_sources__source_id__tables_post","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"integer","title":"Source Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExposeTablesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/data-sources/tables/{table_id}":{"patch":{"tags":["data_sources"],"summary":"Patch Table","operationId":"patch_table_api_data_sources_tables__table_id__patch","parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"integer","title":"Table Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchTableRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["data_sources"],"summary":"Remove Table","operationId":"remove_table_api_data_sources_tables__table_id__delete","parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"integer","title":"Table Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/data-sources/tables/{table_id}/sync":{"post":{"tags":["data_sources"],"summary":"Sync Table","operationId":"sync_table_api_data_sources_tables__table_id__sync_post","parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"integer","title":"Table Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/data-sources/tables/{table_id}/meta":{"get":{"tags":["data_sources"],"summary":"Get Table Meta","description":"Return table metadata.\n\nWith ``refresh=true`` and a live-query source, also introspects the remote\nschema and merges the result into the response in-memory — new remote columns\nare flagged ``status=\"new\"``, stored columns missing remotely are flagged\n``status=\"dropped\"``. Nothing is written; persistence happens only when the\ncaller subsequently PUTs ``/meta/columns``.","operationId":"get_table_meta_api_data_sources_tables__table_id__meta_get","parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"integer","title":"Table Id"}},{"name":"refresh","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Refresh"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["data_sources"],"summary":"Update Table Meta","operationId":"update_table_meta_api_data_sources_tables__table_id__meta_put","parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"integer","title":"Table Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMetaRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/data-sources/tables/{table_id}/meta/columns":{"put":{"tags":["data_sources"],"summary":"Update Table Columns","description":"Persist column metadata.\n\nFor non-live tables (csv / sftp) — the local schema is the source of truth,\nso we only merge label/description for the columns the caller sent.\n\nFor live-query tables — re-introspect the remote schema and reconcile:\n  * only columns the caller sent AND that exist remotely are kept,\n  * stored columns missing from the caller's set are dropped,\n  * remote columns the caller didn't send are NOT auto-added (the user\n    explicitly opts-in via the NEW checkbox on the detail page).","operationId":"update_table_columns_api_data_sources_tables__table_id__meta_columns_put","parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"integer","title":"Table Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateColumnsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/my-tables":{"get":{"tags":["data_sources"],"summary":"List My Tables","description":"Flat list of all tables in the org — readable by any authenticated user.\n\nViewers only see tables from active, connected sources and column counts\nreflect committed columns only (pending ``status=\"new\"``/``\"dropped\"`` entries\nare hidden). Admins see everything so they can manage broken sources.\n\nTeam scope (V1, see docs/teams.md): a viewer with one or more\n``team_users`` rows is restricted to the union of their teams'\n``team_tables``; a viewer with zero rows sees every active+connected\norg table (the opt-in restriction model — teams narrow, not gate).\nAdmin role bypasses the team filter.","operationId":"list_my_tables_api_my_tables_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/my-tables/{table_id}":{"get":{"tags":["data_sources"],"summary":"Get My Table","description":"Read-only column metadata for one table — readable by any authenticated user.\n\nViewers can only read tables whose source is active+connected and only\nsee committed columns (pending ``status=\"new\"``/``\"dropped\"`` hidden).\nAdmins see everything.\n\nTeam scope (V1, see docs/teams.md): a viewer with one or more\n``team_users`` rows can only read tables granted to those teams.","operationId":"get_my_table_api_my_tables__table_id__get","parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"integer","title":"Table Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketer/codes":{"get":{"tags":["marketer"],"summary":"List My Codes","description":"The caller's org's promo codes — full detail for the dashboard table.\n\nAll counters surface ONLY successful outcomes — failed checkouts\n(Razorpay decline, abandoned modal, etc.) leave their application row\nfor audit but are deliberately invisible to the marketer because they\ndon't represent real conversions or earnings.","operationId":"list_my_codes_api_marketer_codes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/marketer/codes/{promo_id}/signups":{"get":{"tags":["marketer"],"summary":"List Signups For Code","description":"Orgs that signed up with the caller's promo code.\n\nSCOPE GUARD: the WHERE filter binds promo_code_id to the caller's\nmarketer_org_id so a marketer can't read another marketer's signups\nby guessing IDs.\n\nPII rule: returns slug + name only. No admin emails, no internal org_ids.","operationId":"list_signups_for_code_api_marketer_codes__promo_id__signups_get","parameters":[{"name":"promo_id","in":"path","required":true,"schema":{"type":"integer","title":"Promo Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketer/codes/{promo_id}/applications":{"get":{"tags":["marketer"],"summary":"List Applications For Code","description":"Every checkout that applied this code, with purchase + commission status.\n\nWhere /signups answers \"who signed up via this URL?\", /applications\nanswers \"who actually used this code at checkout?\" — including manual\nentry, failed payment attempts, and completed sales. This is the\nmarketer's performance view per code.\n\nSCOPE GUARD: the promo code must belong to the caller's marketing org.\nReturns 404 otherwise. Same PII rule as /signups — slug + name only,\nnever admin email or internal org_id.\n\nFailed applications (Razorpay decline, abandoned modal) are filtered\nout — they're kept in the DB for audit but invisible to the marketer\nbecause they represent no real outcome (no money, no commission).","operationId":"list_applications_for_code_api_marketer_codes__promo_id__applications_get","parameters":[{"name":"promo_id","in":"path","required":true,"schema":{"type":"integer","title":"Promo Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketer/earnings":{"get":{"tags":["marketer"],"summary":"Get Earnings Summary","description":"Aggregate earnings for the marketing-org dashboard's headline card.","operationId":"get_earnings_summary_api_marketer_earnings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/marketer/earnings/transactions":{"get":{"tags":["marketer"],"summary":"List Commissions","description":"Per-row commission ledger.","operationId":"list_commissions_api_marketer_earnings_transactions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/marketer/earnings/transactions.csv":{"get":{"tags":["marketer"],"summary":"Commissions Csv","operationId":"commissions_csv_api_marketer_earnings_transactions_csv_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/super-admin/oauth/global":{"get":{"tags":["super-admin","oauth"],"summary":"Get Oauth Global","description":"Read-only view of the env-sourced global OAuth settings.\n\nThese are bootstrap deployment values — not stored in the DB and not\neditable through the API. The endpoint exists so an operator can verify\nwhat's currently in effect on a given environment.","operationId":"get_oauth_global_api_super_admin_oauth_global_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/super-admin/oauth/clients/{platform}":{"get":{"tags":["super-admin","oauth"],"summary":"Get Oauth Client","operationId":"get_oauth_client_api_super_admin_oauth_clients__platform__get","parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","title":"Platform"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["super-admin","oauth"],"summary":"Put Oauth Client","operationId":"put_oauth_client_api_super_admin_oauth_clients__platform__put","parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","title":"Platform"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/teams/by-table/{table_id}":{"get":{"tags":["teams"],"summary":"List Teams For Table","description":"Teams the given table is currently granted to.\n\nMirrors the team-detail page's `tables` list but inverted — lets the\ntable-management UI show \"which teams can see this table\" without\niterating every team. Cross-org safe: returns 404 if the table is\nnot in the caller's org.","operationId":"list_teams_for_table_api_teams_by_table__table_id__get","parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"integer","title":"Table Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/teams/paginated":{"get":{"tags":["teams"],"summary":"List Teams Paginated","description":"Paginated + searchable teams list — drives the Teams admin page.\n\nBackend handles filter + LIMIT/OFFSET. Returns\n`{total, page, page_size, total_pages, teams: [...]}` with the same\nper-team shape as ``GET /api/teams``.","operationId":"list_teams_paginated_api_teams_paginated_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/teams":{"get":{"tags":["teams"],"summary":"List Teams","description":"List teams for the caller's org with member + table counts.\n\nReturns the full array (no pagination) — used by dropdowns and\nlookup callers that need to know every team. The admin Teams page\nuses ``/paginated`` instead.","operationId":"list_teams_api_teams_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["teams"],"summary":"Create Team","description":"Create a new team. Slug is derived from name; collisions return 409.","operationId":"create_team_api_teams_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTeamRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/teams/{team_id}":{"get":{"tags":["teams"],"summary":"Get Team","description":"Team detail with members + assigned tables.","operationId":"get_team_api_teams__team_id__get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["teams"],"summary":"Update Team","description":"Rename a team. Slug is regenerated; collisions return 409.","operationId":"update_team_api_teams__team_id__put","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTeamRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["teams"],"summary":"Delete Team","description":"Delete a team. Cascades both team_users and team_tables junctions.","operationId":"delete_team_api_teams__team_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/teams/{team_id}/users":{"post":{"tags":["teams"],"summary":"Add Team Members","description":"Add one or more users to the team. Idempotent (INSERT IGNORE).","operationId":"add_team_members_api_teams__team_id__users_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddMembersRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/teams/{team_id}/users/{user_id}":{"delete":{"tags":["teams"],"summary":"Remove Team Member","description":"Remove one user from the team.","operationId":"remove_team_member_api_teams__team_id__users__user_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/teams/{team_id}/tables":{"post":{"tags":["teams"],"summary":"Grant Team Tables","description":"Grant one or more tables to the team. Idempotent (INSERT IGNORE).","operationId":"grant_team_tables_api_teams__team_id__tables_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantTablesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/teams/{team_id}/tables/{table_id}":{"delete":{"tags":["teams"],"summary":"Revoke Team Table","description":"Revoke one table from the team.","operationId":"revoke_team_table_api_teams__team_id__tables__table_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"integer","title":"Team Id"}},{"name":"table_id","in":"path","required":true,"schema":{"type":"integer","title":"Table Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/openai-apps-challenge":{"get":{"summary":"Openai Apps Challenge","description":"Domain verification for the ChatGPT app submission. OpenAI fetches this\npath and expects the challenge token served verbatim as text/plain. The\ntoken is stored on the ChatGPT OAuth client config in `system_settings`\n(`oauth.client.chatgpt`.apps_challenge_token), so it can be rotated via SQL\nor the super-admin OAuth UI without a redeploy.","operationId":"openai_apps_challenge__well_known_openai_apps_challenge_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/favicon.ico":{"get":{"summary":"Favicon","operationId":"favicon_favicon_ico_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"summary":"Spa Root","operationId":"spa_root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/signup":{"get":{"summary":"Spa Signup","operationId":"spa_signup_signup_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/login":{"get":{"summary":"Spa Login","operationId":"spa_login_login_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/verify-email":{"get":{"summary":"Spa Verify Email","operationId":"spa_verify_email_verify_email_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/suspended":{"get":{"summary":"Spa Suspended","operationId":"spa_suspended_suspended_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/dashboard":{"get":{"summary":"Spa Dashboard","operationId":"spa_dashboard_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/users":{"get":{"summary":"Spa Users","operationId":"spa_users_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/settings":{"get":{"summary":"Spa Settings","operationId":"spa_settings_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/audit":{"get":{"summary":"Spa Audit","operationId":"spa_audit_audit_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/billing":{"get":{"summary":"Spa Billing","operationId":"spa_billing_billing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/super-admin/settings/{rest}":{"get":{"summary":"Spa Super Admin Settings Sub","operationId":"spa_super_admin_settings_sub_super_admin_settings__rest__get","parameters":[{"name":"rest","in":"path","required":true,"schema":{"type":"string","title":"Rest"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/oauth":{"get":{"summary":"Spa Super Admin Oauth","operationId":"spa_super_admin_oauth_super_admin_oauth_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/data-sources":{"get":{"summary":"Spa Data Sources","operationId":"spa_data_sources_data_sources_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/data-sources/new":{"get":{"summary":"Spa Data Sources New","operationId":"spa_data_sources_new_data_sources_new_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/data-sources/{rest}":{"get":{"summary":"Spa Data Sources Sub","operationId":"spa_data_sources_sub_data_sources__rest__get","parameters":[{"name":"rest","in":"path","required":true,"schema":{"type":"string","title":"Rest"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tables":{"get":{"summary":"Spa Tables","operationId":"spa_tables_tables_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/my-tables":{"get":{"summary":"Spa My Tables","operationId":"spa_my_tables_my_tables_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/my-tables/{rest}":{"get":{"summary":"Spa My Tables Sub","operationId":"spa_my_tables_sub_my_tables__rest__get","parameters":[{"name":"rest","in":"path","required":true,"schema":{"type":"string","title":"Rest"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/account":{"get":{"summary":"Spa Account","operationId":"spa_account_account_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/super-admin/data-source-types":{"get":{"summary":"Spa Super Admin Ds Types","operationId":"spa_super_admin_ds_types_super_admin_data_source_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/super-admin/data-source-engines":{"get":{"summary":"Spa Super Admin Ds Engines","operationId":"spa_super_admin_ds_engines_super_admin_data_source_engines_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/marketer":{"get":{"summary":"Spa Marketer Root","operationId":"spa_marketer_root_marketer_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/marketer/{rest}":{"get":{"summary":"Spa Marketer Sub","operationId":"spa_marketer_sub_marketer__rest__get","parameters":[{"name":"rest","in":"path","required":true,"schema":{"type":"string","title":"Rest"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AddMembersRequest":{"properties":{"user_ids":{"items":{"type":"integer"},"type":"array","title":"User Ids"}},"type":"object","required":["user_ids"],"title":"AddMembersRequest"},"BillingDetailsBody":{"properties":{"billing_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Name"},"billing_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Address"},"billing_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Country"},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id"}},"type":"object","title":"BillingDetailsBody"},"Body_inspect_excel_no_source_api_excel_sheets_inspect_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_inspect_excel_no_source_api_excel_sheets_inspect_post"},"Body_inspect_excel_sheets_api_data_sources__source_id__excel_sheets_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_inspect_excel_sheets_api_data_sources__source_id__excel_sheets_post"},"Body_login_password_auth_login_post":{"properties":{"state":{"type":"string","title":"State"},"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password","default":""},"captcha_token":{"type":"string","title":"Captcha Token","default":""},"captcha_code":{"type":"string","title":"Captcha Code","default":""},"website":{"type":"string","title":"Website","default":""}},"type":"object","required":["state","email"],"title":"Body_login_password_auth_login_post"},"Body_login_request_code_auth_login_code_post":{"properties":{"state":{"type":"string","title":"State"},"email":{"type":"string","title":"Email","default":""},"captcha_token":{"type":"string","title":"Captcha Token","default":""},"captcha_code":{"type":"string","title":"Captcha Code","default":""},"website":{"type":"string","title":"Website","default":""}},"type":"object","required":["state"],"title":"Body_login_request_code_auth_login_code_post"},"Body_login_verify_auth_login_verify_post":{"properties":{"state":{"type":"string","title":"State"},"email":{"type":"string","title":"Email"},"code":{"type":"string","title":"Code"}},"type":"object","required":["state","email","code"],"title":"Body_login_verify_auth_login_verify_post"},"Body_upload_csv_api_data_sources__source_id__upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"display_name":{"type":"string","title":"Display Name"}},"type":"object","required":["file","display_name"],"title":"Body_upload_csv_api_data_sources__source_id__upload_post"},"Body_upload_excel_api_data_sources__source_id__upload_excel_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"sheets":{"type":"string","title":"Sheets"}},"type":"object","required":["file","sheets"],"title":"Body_upload_excel_api_data_sources__source_id__upload_excel_post"},"BulkCommissionIdsBody":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","title":"Ids"}},"type":"object","required":["ids"],"title":"BulkCommissionIdsBody"},"BulkPayCommissionsBody":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","title":"Ids"},"payout_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payout Ref"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["ids"],"title":"BulkPayCommissionsBody"},"BulkReverseCommissionsBody":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","title":"Ids"},"notes":{"type":"string","title":"Notes"}},"type":"object","required":["ids","notes"],"title":"BulkReverseCommissionsBody"},"ChangePasswordRequest":{"properties":{"current_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Password"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["new_password"],"title":"ChangePasswordRequest"},"CheckoutAbandonBody":{"properties":{"purchase_id":{"type":"integer","title":"Purchase Id"},"reason":{"type":"string","title":"Reason","default":"user_dismissed"}},"type":"object","required":["purchase_id"],"title":"CheckoutAbandonBody"},"CheckoutBody":{"properties":{"pack_id":{"type":"string","title":"Pack Id"},"promo_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Promo Code"}},"type":"object","required":["pack_id"],"title":"CheckoutBody"},"CheckoutResponse":{"properties":{"purchase_id":{"type":"integer","title":"Purchase Id"},"razorpay_order_id":{"type":"string","title":"Razorpay Order Id"},"razorpay_key_id":{"type":"string","title":"Razorpay Key Id"},"amount":{"type":"integer","title":"Amount"},"currency":{"type":"string","title":"Currency"},"pack":{"additionalProperties":true,"type":"object","title":"Pack"},"promo_applied":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Promo Applied"}},"type":"object","required":["purchase_id","razorpay_order_id","razorpay_key_id","amount","currency","pack"],"title":"CheckoutResponse"},"CheckoutVerifyBody":{"properties":{"purchase_id":{"type":"integer","title":"Purchase Id"},"razorpay_order_id":{"type":"string","title":"Razorpay Order Id"},"razorpay_payment_id":{"type":"string","title":"Razorpay Payment Id"},"razorpay_signature":{"type":"string","title":"Razorpay Signature"}},"type":"object","required":["purchase_id","razorpay_order_id","razorpay_payment_id","razorpay_signature"],"title":"CheckoutVerifyBody"},"CodeRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"captcha_token":{"type":"string","title":"Captcha Token"},"captcha_code":{"type":"string","title":"Captcha Code"},"website":{"type":"string","title":"Website","default":""}},"type":"object","required":["email","captcha_token","captcha_code"],"title":"CodeRequest"},"ContactRequest":{"properties":{"name":{"type":"string","title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"message":{"type":"string","title":"Message"},"captcha_token":{"type":"string","title":"Captcha Token"},"captcha_code":{"type":"string","title":"Captcha Code"},"website":{"type":"string","title":"Website","default":""}},"type":"object","required":["name","email","message","captcha_token","captcha_code"],"title":"ContactRequest"},"CreateDataSourceRequest":{"properties":{"name":{"type":"string","title":"Name"},"source_type":{"type":"string","title":"Source Type"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"dialect":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dialect"}},"type":"object","required":["name","source_type","config"],"title":"CreateDataSourceRequest"},"CreateMarketerOrgRequest":{"properties":{"org_id":{"type":"integer","title":"Org Id"},"payout_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payout Method"},"payout_details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payout Details"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["org_id"],"title":"CreateMarketerOrgRequest"},"CreatePromoCodeRequest":{"properties":{"code":{"type":"string","title":"Code"},"marketer_org_id":{"type":"integer","title":"Marketer Org Id"},"org_discount_percent":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Org Discount Percent"},"marketer_commission_percent":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Marketer Commission Percent"},"max_uses":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Uses"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["code","marketer_org_id","org_discount_percent","marketer_commission_percent"],"title":"CreatePromoCodeRequest"},"CreateTeamRequest":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"CreateTeamRequest"},"CreateTypeRequest":{"properties":{"source_type":{"type":"string","title":"Source Type"},"label":{"type":"string","title":"Label"},"default_query_engine_id":{"type":"integer","title":"Default Query Engine Id","default":1},"can_schedule":{"type":"boolean","title":"Can Schedule","default":false},"can_browse":{"type":"boolean","title":"Can Browse","default":false},"is_live_query":{"type":"boolean","title":"Is Live Query","default":false},"is_active":{"type":"boolean","title":"Is Active","default":true},"config_schema":{"additionalProperties":true,"type":"object","title":"Config Schema","default":{}},"supported_dialects":{"items":{"type":"string"},"type":"array","title":"Supported Dialects","default":[]}},"type":"object","required":["source_type","label"],"title":"CreateTypeRequest"},"CreateUserRequest":{"properties":{"email":{"type":"string","title":"Email"},"display_name":{"type":"string","title":"Display Name","default":""},"role":{"type":"string","title":"Role","default":"viewer"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"team_ids":{"items":{"type":"integer"},"type":"array","title":"Team Ids","default":[]}},"type":"object","required":["email"],"title":"CreateUserRequest"},"ExposeTableItem":{"properties":{"remote_path":{"type":"string","title":"Remote Path"},"display_name":{"type":"string","title":"Display Name"}},"type":"object","required":["remote_path","display_name"],"title":"ExposeTableItem"},"ExposeTablesRequest":{"properties":{"tables":{"items":{"$ref":"#/components/schemas/ExposeTableItem"},"type":"array","title":"Tables"}},"type":"object","required":["tables"],"title":"ExposeTablesRequest"},"GrantTablesRequest":{"properties":{"table_ids":{"items":{"type":"integer"},"type":"array","title":"Table Ids"}},"type":"object","required":["table_ids"],"title":"GrantTablesRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"PasswordLoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"},"captcha_token":{"type":"string","title":"Captcha Token"},"captcha_code":{"type":"string","title":"Captcha Code"},"website":{"type":"string","title":"Website","default":""}},"type":"object","required":["email","password","captcha_token","captcha_code"],"title":"PasswordLoginRequest"},"PatchMarketerOrgRequest":{"properties":{"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"payout_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payout Method"},"payout_details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payout Details"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"PatchMarketerOrgRequest"},"PatchOrgRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"audit_detailed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Audit Detailed"},"csv_versions_to_keep":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Csv Versions To Keep"}},"type":"object","title":"PatchOrgRequest"},"PatchPromoCodeRequest":{"properties":{"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"org_discount_percent":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Org Discount Percent"},"marketer_commission_percent":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Marketer Commission Percent"},"max_uses":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Uses"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"PatchPromoCodeRequest"},"PatchSettingRequest":{"properties":{"value":{"type":"string","maxLength":1024,"title":"Value"}},"type":"object","required":["value"],"title":"PatchSettingRequest"},"PatchTableRequest":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","title":"PatchTableRequest"},"PatchUserRequest":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","title":"PatchUserRequest"},"PayCommissionRequest":{"properties":{"payout_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payout Ref"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"PayCommissionRequest"},"PromoValidateBody":{"properties":{"code":{"type":"string","title":"Code"},"pack_id":{"type":"string","title":"Pack Id"}},"type":"object","required":["code","pack_id"],"title":"PromoValidateBody"},"ResendVerificationRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ResendVerificationRequest"},"ReverseCommissionRequest":{"properties":{"notes":{"type":"string","title":"Notes"}},"type":"object","required":["notes"],"title":"ReverseCommissionRequest"},"SignupRequest":{"properties":{"name":{"type":"string","title":"Name"},"admin_email":{"type":"string","format":"email","title":"Admin Email"},"admin_password":{"type":"string","title":"Admin Password"},"admin_display_name":{"type":"string","title":"Admin Display Name","default":""},"captcha_token":{"type":"string","title":"Captcha Token"},"captcha_code":{"type":"string","title":"Captcha Code"},"website":{"type":"string","title":"Website","default":""},"promo_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Promo Code"}},"type":"object","required":["name","admin_email","admin_password","captcha_token","captcha_code"],"title":"SignupRequest"},"SignupResponse":{"properties":{"org_id":{"type":"integer","title":"Org Id"},"slug":{"type":"string","title":"Slug"},"user_id":{"type":"integer","title":"User Id"},"verification_required":{"type":"boolean","title":"Verification Required","default":true},"promo_applied":{"type":"boolean","title":"Promo Applied","default":false},"promo_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Promo Code"}},"type":"object","required":["org_id","slug","user_id"],"title":"SignupResponse"},"TestConfigRequest":{"properties":{"source_type":{"type":"string","title":"Source Type"},"config":{"additionalProperties":true,"type":"object","title":"Config"}},"type":"object","required":["source_type","config"],"title":"TestConfigRequest"},"UpdateColumnsRequest":{"properties":{"columns":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Columns"}},"type":"object","required":["columns"],"title":"UpdateColumnsRequest"},"UpdateDataSourceRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"sync_schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Schedule"},"dialect":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dialect"}},"type":"object","title":"UpdateDataSourceRequest"},"UpdateEngineRequest":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"UpdateEngineRequest"},"UpdateMeRequest":{"properties":{"display_name":{"type":"string","title":"Display Name"}},"type":"object","required":["display_name"],"title":"UpdateMeRequest"},"UpdateMetaRequest":{"properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"}},"type":"object","title":"UpdateMetaRequest"},"UpdateTeamRequest":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"UpdateTeamRequest"},"UpdateTypeRequest":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"default_query_engine_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Query Engine Id"},"can_schedule":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Can Schedule"},"can_browse":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Can Browse"},"is_live_query":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live Query"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"config_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config Schema"},"supported_dialects":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Supported Dialects"}},"type":"object","title":"UpdateTypeRequest"},"UpdateUserRequest":{"properties":{"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","title":"UpdateUserRequest"},"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"},"VerifyEmailRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"code":{"type":"string","title":"Code"}},"type":"object","required":["email","code"],"title":"VerifyEmailRequest"},"VerifyEmailResponse":{"properties":{"verified":{"type":"boolean","title":"Verified"},"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"},"org_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Org Id"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"}},"type":"object","required":["verified"],"title":"VerifyEmailResponse"},"VerifyRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"code":{"type":"string","title":"Code"}},"type":"object","required":["email","code"],"title":"VerifyRequest"}}}}