{"openapi":"3.1.0","info":{"title":"EssayCompass API","version":"0.1.0"},"paths":{"/api/payment/stripe-config":{"get":{"tags":["payment"],"summary":"Get Stripe Config","description":"Return the Stripe publishable key for the frontend.","operationId":"get_stripe_config_api_payment_stripe_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/payment/credits":{"get":{"tags":["payment"],"summary":"List Credits","description":"List active credit packages available for purchase.","operationId":"list_credits_api_payment_credits_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CreditResponse"},"type":"array","title":"Response List Credits Api Payment Credits Get"}}}}}}},"/api/payment/balance/{user_id}":{"get":{"tags":["payment"],"summary":"Get Balance","description":"Return the user's current credit balance.","operationId":"get_balance_api_payment_balance__user_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditBalanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/payment/history/{user_id}":{"get":{"tags":["payment"],"summary":"Get History","description":"Return the user's payment/accounting history.","operationId":"get_history_api_payment_history__user_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccountingRecordResponse"},"title":"Response Get History Api Payment History  User Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/payment/create-payment-intent":{"post":{"tags":["payment"],"summary":"Create Payment Intent","description":"Create a Stripe PaymentIntent for a credit-package purchase.","operationId":"create_payment_intent_api_payment_create_payment_intent_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentIntentCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentIntentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/payment/confirm-payment":{"post":{"tags":["payment"],"summary":"Confirm Payment","description":"Confirm a payment and grant credit.","operationId":"confirm_payment_api_payment_confirm_payment_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentConfirmRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentConfirmResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/payment/webhook":{"post":{"tags":["payment"],"summary":"Stripe Webhook","description":"Handle Stripe webhook events (payment_intent.succeeded).","operationId":"stripe_webhook_api_payment_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/essay/traits":{"get":{"summary":"List Active Traits","operationId":"list_active_traits_api_essay_traits_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/essay/tags":{"get":{"summary":"List My Tags","description":"Distinct active tags across all essays created by the current user.","operationId":"list_my_tags_api_essay_tags_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/essay/generate":{"post":{"summary":"Generate Essay","operationId":"generate_essay_api_essay_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EssayGenerateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/essay/job/{job_id}":{"get":{"summary":"Get Essay Job","description":"Poll job status from DB. Frontend no longer polls remote API directly.","operationId":"get_essay_job_api_essay_job__job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/essay/by-job/{job_id}":{"get":{"summary":"Get Essay By Job","description":"Fetch one essay by job_id or by public uuid.\n\nOptional auth: public essays are readable by anyone (including anonymous\nvisitors arriving from the Library); private essays still require the owner,\nthe creator, or a roster manager.\n\nversion=0 is the base essay. version=N returns revision N's text and analysis\nin the same shape. Revisions are private to the people who may manage the\nessay, even when the base essay is public.","operationId":"get_essay_by_job_api_essay_by_job__job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"version","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/essay/{essay_id}/revise":{"post":{"summary":"Revise Essay","description":"Queue a new revision of an essay. Costs 1 credit.\n\nBuilds on the latest finished version (the base essay when there is none), so\nrevisions chain. One revision at a time per essay: the next one needs the text\nof the previous one.","operationId":"revise_essay_api_essay__essay_id__revise_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"essay_id","in":"path","required":true,"schema":{"type":"integer","title":"Essay Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EssayReviseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/essay/{essay_id}/versions":{"get":{"summary":"List Essay Versions","description":"Revision list (no text) — the page polls this while a revision is generating.","operationId":"list_essay_versions_api_essay__essay_id__versions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"essay_id","in":"path","required":true,"schema":{"type":"integer","title":"Essay Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/essay/public-config":{"get":{"summary":"Get Public Essay Config","description":"Tell the frontend whether the free public-essay path is available.\n\nAnonymous callers get the flags only; signed-in callers also get their own\nusage so the UI can disable the switch once the quota is spent.","operationId":"get_public_essay_config_api_essay_public_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/essay/public-list":{"get":{"summary":"List Public Essays","description":"Public essay library. Anonymous visitors see a teaser slice only.\n\nOptional filters:\n- q: full-text search across essay_prompt and content (ILIKE)\n- essay_type: \"Common App\" | \"Supplemental\" | \"Scholarship\" | \"Personal Statement\"\n  Derived at query time from essay_prompt text — no DB column needed.","operationId":"list_public_essays_api_essay_public_list_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"essay_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Essay Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/essay/{essay_ref}/comments":{"get":{"summary":"List Essay Comments","description":"Paginated comments. Open to anyone for public essays.","operationId":"list_essay_comments_api_essay__essay_ref__comments_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"essay_ref","in":"path","required":true,"schema":{"type":"string","title":"Essay Ref"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Essay Comment","operationId":"create_essay_comment_api_essay__essay_ref__comments_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"essay_ref","in":"path","required":true,"schema":{"type":"string","title":"Essay Ref"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EssayCommentCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/essay/{essay_ref}/comments/{comment_id}":{"put":{"summary":"Update Essay Comment","description":"Re-write / re-rate one's own comment. The essay average follows.","operationId":"update_essay_comment_api_essay__essay_ref__comments__comment_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"essay_ref","in":"path","required":true,"schema":{"type":"string","title":"Essay Ref"}},{"name":"comment_id","in":"path","required":true,"schema":{"type":"integer","title":"Comment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EssayCommentCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Essay Comment","description":"Soft-delete one's own comment, then drop it out of the essay average.","operationId":"delete_essay_comment_api_essay__essay_ref__comments__comment_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"essay_ref","in":"path","required":true,"schema":{"type":"string","title":"Essay Ref"}},{"name":"comment_id","in":"path","required":true,"schema":{"type":"integer","title":"Comment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/essay/{essay_id}/tags":{"post":{"summary":"Add Essay Tag","operationId":"add_essay_tag_api_essay__essay_id__tags_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"essay_id","in":"path","required":true,"schema":{"type":"integer","title":"Essay Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EssayTagAdd"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/essay/{essay_id}/tags/{tag}":{"delete":{"summary":"Delete Essay Tag","operationId":"delete_essay_tag_api_essay__essay_id__tags__tag__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"essay_id","in":"path","required":true,"schema":{"type":"integer","title":"Essay Id"}},{"name":"tag","in":"path","required":true,"schema":{"type":"string","title":"Tag"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/essay/{essay_id}/remark":{"patch":{"summary":"Update Essay Remark","operationId":"update_essay_remark_api_essay__essay_id__remark_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"essay_id","in":"path","required":true,"schema":{"type":"integer","title":"Essay Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EssayRemarkUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/essay/admin/{essay_id}":{"get":{"summary":"Admin Get Essay","description":"Full row for the admin manager page, private columns included.","operationId":"admin_get_essay_api_essay_admin__essay_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"essay_id","in":"path","required":true,"schema":{"type":"integer","title":"Essay Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Admin Update Essay","description":"Update any editable column. Only fields present in the body are touched.","operationId":"admin_update_essay_api_essay_admin__essay_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"essay_id","in":"path","required":true,"schema":{"type":"integer","title":"Essay Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EssayAdminUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/essay/list/{user_id}":{"get":{"summary":"List Essays","operationId":"list_essays_api_essay_list__user_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"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/review/traits":{"get":{"summary":"List Review Traits","description":"The trait picker list, with catalogue teaching copy as help text.\n\nRows come from tbl_trait — the same table the generate picker uses — so both\nfeatures always offer the same 13 traits. Teaching copy is looked up in\ntbl_review_trait_def by key and is optional: that catalogue is filled by\nseed_review_catalogue.py and by review ingest, so requiring it here would\nleave the picker empty on a database where the seed has not been run.","operationId":"list_review_traits_api_review_traits_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/review/quota":{"get":{"summary":"Get Review Quota","description":"What the review page needs to show before the user submits.","operationId":"get_review_quota_api_review_quota_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/review/submit":{"post":{"summary":"Submit Review","description":"Queue one review. Free while the shared quota lasts, then 1 credit.","operationId":"submit_review_api_review_submit_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewSubmitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/review/job/{job_id}":{"get":{"summary":"Get Review Job","description":"Poll review status from OUR database.\n\nThe scheduler owns the remote polling, so this answer is correct whether or\nnot a browser was ever watching.","operationId":"get_review_job_api_review_job__job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/review/list":{"get":{"summary":"List My Reviews","description":"Every review belonging to the caller, newest first.\n\nIncludes in-flight and failed rows: a student needs to see that the review\nthey queued twenty minutes ago is still running.","operationId":"list_my_reviews_api_review_list_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/review/admin/list":{"get":{"summary":"Admin List Reviews","description":"Every completed review across all users, newest first, paginated.\n\nGod-only. Powers the Review Management screen: show the prompt, open the\ndetail page, and flip public/private. Only 'done' reviews are listed — an\nin-flight or errored row has nothing to publish.","operationId":"admin_list_reviews_api_review_admin_list_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/review/admin/{review_id}/public":{"patch":{"summary":"Admin Set Review Public","description":"Flip a review's Library visibility. God-only.\n\nA published review needs a uuid — the public detail route resolves by it,\nand the Library links to it. Mint one on first publish if missing so an\nolder review can still go public.","operationId":"admin_set_review_public_api_review_admin__review_id__public_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"integer","title":"Review Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewPublicUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/review/{review_ref}":{"get":{"summary":"Get Review Detail","description":"One review, in full.\n\n`payload` is the verbatim envelope.review the service returned — the render\npath reads that, so nothing is lost to normalisation. The child tables are\nthe analytics surface, not a substitute for it; `rows` is returned alongside\nonly for the mutable action worklist (is_done / student_note), which the\nfrozen payload cannot carry.\n\nAccess: the owner (or their counselor) sees any of their reviews. Anyone —\nsigned in or not — may read a review the author published to the Library\n(is_public + done + active). Non-owners get a read-only view: `is_owner` is\nFalse, and the action worklist is not theirs to tick off.","operationId":"get_review_detail_api_review__review_ref__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"review_ref","in":"path","required":true,"schema":{"type":"string","title":"Review Ref"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/review/{review_id}/revise":{"post":{"summary":"Revise Review","description":"Write an improved draft of a reviewed essay. Costs 1 credit.\n\nThe rewrite starts from this review's frozen essay text and gets the review's\nfeedback alongside the student's instruction. The result is NOT reviewed yet:\nthe student reads it, and asks for feedback when they want it.","operationId":"revise_review_api_review__review_id__revise_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"integer","title":"Review Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewReviseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/review/revision/{revision_id}":{"get":{"summary":"Get Review Revision","description":"One revision with its text. The history list leaves the text out.","operationId":"get_review_revision_api_review_revision__revision_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"revision_id","in":"path","required":true,"schema":{"type":"integer","title":"Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/review/revision/{revision_id}/review":{"post":{"summary":"Review Revision","description":"Ask for feedback on a revision.\n\nGoes through the normal submit path (so the same free-quota / credit rules\napply), with the source review as parent so the draft lands in the same chain.","operationId":"review_revision_api_review_revision__revision_id__review_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"revision_id","in":"path","required":true,"schema":{"type":"integer","title":"Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/review/{review_ref}/history":{"get":{"summary":"Get Review History","description":"The whole revision chain this review belongs to.\n\nDrafts are the reviews linked through parent_review_id, oldest first. Each\ncarries where it improved on its parent (per-dimension score change) and what\nto do next (its weakest dimensions and the fix for each). Revisions that have\nnot been reviewed yet are listed separately, since they have no score.","operationId":"get_review_history_api_review__review_ref__history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"review_ref","in":"path","required":true,"schema":{"type":"string","title":"Review Ref"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/review/action/{action_id}":{"patch":{"summary":"Update Review Action","description":"Tick off a revision step / drill, or attach a note. The only mutable part\nof a review — everything else is a frozen record of one draft.","operationId":"update_review_action_api_review_action__action_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"integer","title":"Action Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/review/{review_id}":{"delete":{"summary":"Delete Review","description":"Soft delete. The row stays so the revision chain and any credit audit\nremain intact.","operationId":"delete_review_api_review__review_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"integer","title":"Review Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/resource":{"get":{"summary":"List Resources","description":"Public paginated list. Non-god callers see only active resources.","operationId":"list_resources_api_resource_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":9,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Resource","operationId":"create_resource_api_resource_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/resource/{resource_id}":{"get":{"summary":"Get Resource","operationId":"get_resource_api_resource__resource_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"resource_id","in":"path","required":true,"schema":{"type":"integer","title":"Resource Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Update Resource","operationId":"update_resource_api_resource__resource_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"resource_id","in":"path","required":true,"schema":{"type":"integer","title":"Resource Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Resource","operationId":"delete_resource_api_resource__resource_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"resource_id","in":"path","required":true,"schema":{"type":"integer","title":"Resource Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/injection/config":{"get":{"summary":"Injection Config","description":"What the page needs to render before an upload: readiness and list sizes.","operationId":"injection_config_api_injection_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/injection/run":{"post":{"summary":"Start Injection","description":"Validate an upload, then run the injection in the background.\n\nReturns as soon as the batch is accepted. Everything cheap and fail-fast happens\nhere — file reads, splitting, size and count limits, LLM config — so a bad batch\nis rejected synchronously and never becomes a background run. Poll /run/{run_id}\nfor progress.","operationId":"start_injection_api_injection_run_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"max_words","in":"query","required":false,"schema":{"type":"integer","default":650,"title":"Max Words"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_start_injection_api_injection_run_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/injection/run/{run_id}":{"get":{"summary":"Injection Status","description":"Poll one run. Results accumulate as chunks finish, so the page can stream them.","operationId":"injection_status_api_injection_run__run_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/injection/runs":{"get":{"summary":"List Injection Runs","description":"Recent runs, newest last. Lets the page recover a run after a page reload.","operationId":"list_injection_runs_api_injection_runs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/":{"get":{"summary":"Root","description":"Serve frontend index.html for root route","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/health":{"get":{"summary":"Health Check","operationId":"health_check_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/sitemap.xml":{"get":{"summary":"Sitemap","description":"Dynamic sitemap: static public pages + every active resource, always fresh.","operationId":"sitemap_sitemap_xml_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/register":{"post":{"summary":"Register User","description":"Register a new user and email a verification link.","operationId":"register_user_api_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRegisterRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRegisterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/login":{"post":{"summary":"Login","description":"Authenticate a user by username/email and password.","operationId":"login_api_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/verify/{token}":{"get":{"summary":"Verify Account","description":"Verify an account by its email-verification token.","operationId":"verify_account_api_verify__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/google":{"post":{"summary":"Google Auth","description":"Verify a Google ID token and return a session (find-or-create user).","operationId":"google_auth_api_auth_google_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleAuthRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/reset-password/request":{"post":{"summary":"Request Password Reset","description":"Request a password reset email.","operationId":"request_password_reset_api_reset_password_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/reset-password":{"post":{"summary":"Reset Password With Token","description":"Reset password using a reset token.","operationId":"reset_password_with_token_api_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordWithTokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordWithTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users":{"get":{"summary":"Get Users","description":"Get paginated users.","operationId":"get_users_api_users_get","parameters":[{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of records to skip","default":0,"title":"Offset"},"description":"Number of records to skip"},{"name":"length","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of records to return","default":10,"title":"Length"},"description":"Number of records to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsersPaginatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/{user_id}":{"get":{"summary":"Get User Info","description":"Get user information.","operationId":"get_user_info_api_user__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserInfoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Update User Profile","description":"Update editable user fields (self, or a roster member you own).","operationId":"update_user_profile_api_user__user_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserInfoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/credit/{user_id}":{"get":{"summary":"Get User Credit Count","description":"Return the user's credit_count from tbl_user.","operationId":"get_user_credit_count_api_user_credit__user_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"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/profile/{user_id}":{"get":{"summary":"Get Profile","description":"Get a user's onboarding profile (self, or a roster member you own).","operationId":"get_profile_api_profile__user_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Update Profile","description":"Create or update a profile (self, or a roster member you own).","operationId":"update_profile_api_profile__user_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/roster":{"get":{"summary":"List Roster","description":"List roster members owned by the current user.","operationId":"list_roster_api_roster_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RosterMemberResponse"},"type":"array","title":"Response List Roster Api Roster Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Create Roster Member","description":"Create a non-login member user and link it to the current user's roster.","operationId":"create_roster_member_api_roster_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterMemberCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterMemberResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/roster/{roster_id}/active":{"patch":{"summary":"Toggle Roster Member","description":"Toggle is_active for a roster entry owned by the current user.","operationId":"toggle_roster_member_api_roster__roster_id__active_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"roster_id","in":"path","required":true,"schema":{"type":"integer","title":"Roster Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users":{"get":{"summary":"Admin List Users","description":"List all users with roles (admin only).","operationId":"admin_list_users_api_admin_users_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"length","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"title":"Length"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUsersPaginatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{user_id}/role":{"patch":{"summary":"Admin Set User Role","description":"Set a user's role (admin only).","operationId":"admin_set_user_role_api_admin_users__user_id__role_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetUserRoleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/check":{"get":{"summary":"Admin Check","description":"Return whether the current user is an admin (used to gate the admin UI).","operationId":"admin_check_api_admin_check_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/indexnow-essays":{"post":{"summary":"Indexnow New Essays","description":"Submit public essay URLs added in the last N days to IndexNow.\n\nCall weekly (e.g. cron or manual admin trigger) to keep Bing/ChatGPT\nindex current as new essays accumulate. Admin-only.","operationId":"indexnow_new_essays_api_admin_indexnow_essays_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"description":"Submit essays created within this many days","default":7,"title":"Days"},"description":"Submit essays created within this many days"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/god/check":{"get":{"summary":"God Check","operationId":"god_check_api_god_check_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/god/users":{"get":{"summary":"God List Users","operationId":"god_list_users_api_god_users_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"search","in":"query","required":false,"schema":{"type":"string","default":"","title":"Search"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GodUsersPaginatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"God Create User","operationId":"god_create_user_api_god_users_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GodUserCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GodUserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/god/users/{user_id}":{"patch":{"summary":"God Update User","operationId":"god_update_user_api_god_users__user_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GodUserUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GodUserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"God Delete User","operationId":"god_delete_user_api_god_users__user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/god/users/{user_id}/grant-credits":{"patch":{"summary":"God Grant Credits","operationId":"god_grant_credits_api_god_users__user_id__grant_credits_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"amount","in":"query","required":true,"schema":{"type":"integer","title":"Amount"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/god/credits":{"get":{"summary":"God List Credits","operationId":"god_list_credits_api_god_credits_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CreditResponse"},"type":"array","title":"Response God List Credits Api God Credits Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"God Create Credit","operationId":"god_create_credit_api_god_credits_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/god/credits/{credit_id}":{"patch":{"summary":"God Update Credit","operationId":"god_update_credit_api_god_credits__credit_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"credit_id","in":"path","required":true,"schema":{"type":"integer","title":"Credit Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"God Delete Credit","operationId":"god_delete_credit_api_god_credits__credit_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"credit_id","in":"path","required":true,"schema":{"type":"integer","title":"Credit Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/god/traits":{"get":{"summary":"God List Traits","operationId":"god_list_traits_api_god_traits_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TraitResponse"},"type":"array","title":"Response God List Traits Api God Traits Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"God Create Trait","operationId":"god_create_trait_api_god_traits_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraitCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/god/traits/{trait_id}":{"patch":{"summary":"God Update Trait","operationId":"god_update_trait_api_god_traits__trait_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"trait_id","in":"path","required":true,"schema":{"type":"integer","title":"Trait Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraitUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"God Delete Trait","operationId":"god_delete_trait_api_god_traits__trait_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"trait_id","in":"path","required":true,"schema":{"type":"integer","title":"Trait Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/prompts":{"get":{"summary":"List Prompts","operationId":"list_prompts_api_prompts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/contact":{"post":{"summary":"Submit Contact","description":"Send a contact-form message to our own inbox (from_email in .env).","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"}}}}}}},"/home":{"get":{"summary":"Redirect Home","operationId":"redirect_home_home_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/resource/{resource_id}/{slug}":{"get":{"summary":"Serve Resource","operationId":"serve_resource_resource__resource_id___slug__get","parameters":[{"name":"resource_id","in":"path","required":true,"schema":{"type":"integer","title":"Resource Id"}},{"name":"slug","in":"path","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/resource/{resource_id}":{"get":{"summary":"Serve Resource","operationId":"serve_resource_resource__resource_id__get","parameters":[{"name":"resource_id","in":"path","required":true,"schema":{"type":"integer","title":"Resource Id"}},{"name":"slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/essay/{essay_ref}":{"get":{"summary":"Serve Public Essay","operationId":"serve_public_essay_essay__essay_ref__get","parameters":[{"name":"essay_ref","in":"path","required":true,"schema":{"type":"string","title":"Essay Ref"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/resource":{"get":{"summary":"Serve Resource Hub","operationId":"serve_resource_hub_resource_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/library":{"get":{"summary":"Serve Public Library","operationId":"serve_public_library_library_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/{full_path}":{"get":{"summary":"Serve Frontend","description":"Serve frontend for all non-API routes (SPA fallback).\n\nPrefers a prerendered dist/<route>/index.html snapshot (Puppeteer\nbuild step) so crawlers get real HTML for static pages. Paths the SPA\nhas no route for get a real 404 status, still carrying the shell so the\nclient-side Oops page renders for humans.","operationId":"serve_frontend__full_path__get","parameters":[{"name":"full_path","in":"path","required":true,"schema":{"type":"string","title":"Full Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AccountingRecordResponse":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"type":"integer","title":"User Id"},"payment_in_cent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Payment In Cent"},"credit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credit"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"transaction_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transaction Id"},"transaction_datetime":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Transaction Datetime"}},"type":"object","required":["id","user_id"],"title":"AccountingRecordResponse"},"ActionUpdateRequest":{"properties":{"is_done":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Done"},"student_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Student Note"}},"type":"object","title":"ActionUpdateRequest"},"AdminUserResponse":{"properties":{"id":{"type":"integer","title":"Id"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","required":["id"],"title":"AdminUserResponse"},"AdminUsersPaginatedResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AdminUserResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"offset":{"type":"integer","title":"Offset"},"limit":{"type":"integer","title":"Limit"}},"type":"object","required":["items","total","offset","limit"],"title":"AdminUsersPaginatedResponse"},"Body_start_injection_api_injection_run_post":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"Body_start_injection_api_injection_run_post"},"ContactRequest":{"properties":{"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"message":{"type":"string","title":"Message"}},"type":"object","required":["name","email","message"],"title":"ContactRequest"},"CreditBalanceResponse":{"properties":{"user_id":{"type":"integer","title":"User Id"},"balance":{"type":"integer","title":"Balance"}},"type":"object","required":["user_id","balance"],"title":"CreditBalanceResponse"},"CreditCreateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"price_in_cent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price In Cent"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default","default":true},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","default":true}},"type":"object","title":"CreditCreateRequest"},"CreditResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"price_in_cent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price In Cent"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","required":["id"],"title":"CreditResponse"},"CreditUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"price_in_cent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price In Cent"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"CreditUpdateRequest"},"EssayAdminUpdate":{"properties":{"essay_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Essay Prompt"},"user_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Prompt"},"opening_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Opening Hint"},"remark":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remark"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"essay_analysis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Essay Analysis"},"background_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Background Info"},"why_this_works":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Why This Works"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"story_provided":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Story Provided"},"max_words":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Words"},"score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Score"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"is_guess_mode":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Guess Mode"},"need_humanization":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Need Humanization"},"is_public":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Public"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"},"creator_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Creator Id"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"traits":{"anyOf":[{"items":{"$ref":"#/components/schemas/EssayTraitInput"},"type":"array"},{"type":"null"}],"title":"Traits"},"paragraph_summary":{"anyOf":[{"items":{"$ref":"#/components/schemas/ParagraphSummaryInput"},"type":"array"},{"type":"null"}],"title":"Paragraph Summary"}},"type":"object","title":"EssayAdminUpdate"},"EssayCommentCreate":{"properties":{"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Score"}},"type":"object","title":"EssayCommentCreate"},"EssayGenerateRequest":{"properties":{"prompt":{"type":"string","title":"Prompt"},"traits":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Traits"},"opening_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Opening Hint"},"max_words":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Words","default":650},"background_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Background Info"},"guess":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Guess","default":false},"humanize":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Humanize","default":true},"target_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Target User Id"},"remark":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remark"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"is_public":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Public","default":false},"temp_story":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Temp Story"}},"type":"object","required":["prompt"],"title":"EssayGenerateRequest"},"EssayRemarkUpdate":{"properties":{"remark":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remark"}},"type":"object","title":"EssayRemarkUpdate"},"EssayReviseRequest":{"properties":{"instruction":{"type":"string","title":"Instruction"}},"type":"object","required":["instruction"],"title":"EssayReviseRequest"},"EssayTagAdd":{"properties":{"tag":{"type":"string","title":"Tag"}},"type":"object","required":["tag"],"title":"EssayTagAdd"},"EssayTraitInput":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"trait_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trait Id"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"}},"type":"object","title":"EssayTraitInput","description":"One row of tbl_essay_trait.\n\ntrait_id points at the shared tbl_trait catalogue; the admin picks from it\nrather than typing a name, because renaming a Trait would rewrite it for every\nessay that uses it (that is TraitMgr's job, not this page's). text is the\nexact sentence highlighted in this essay's body, so it is per-essay."},"GodUserCreateRequest":{"properties":{"user_name":{"type":"string","title":"User Name"},"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role","default":"user"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","default":true}},"type":"object","required":["user_name","email","password"],"title":"GodUserCreateRequest"},"GodUserResponse":{"properties":{"id":{"type":"integer","title":"Id"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"remark":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remark"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"create_datetime":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Create Datetime"},"has_google":{"type":"boolean","title":"Has Google","default":false}},"type":"object","required":["id"],"title":"GodUserResponse"},"GodUserUpdateRequest":{"properties":{"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"remark":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remark"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"GodUserUpdateRequest"},"GodUsersPaginatedResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/GodUserResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"offset":{"type":"integer","title":"Offset"},"limit":{"type":"integer","title":"Limit"}},"type":"object","required":["items","total","offset","limit"],"title":"GodUsersPaginatedResponse"},"GoogleAuthRequest":{"properties":{"credential":{"type":"string","title":"Credential","description":"Google ID token from frontend"}},"type":"object","required":["credential"],"title":"GoogleAuthRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LoginRequest":{"properties":{"username_or_email":{"type":"string","title":"Username Or Email","description":"Username or email address"},"password":{"type":"string","title":"Password","description":"User password"}},"type":"object","required":["username_or_email","password"],"title":"LoginRequest"},"LoginResponse":{"properties":{"code":{"type":"integer","title":"Code","description":"Response code (200 for success, 401 for failure)"},"result":{"type":"boolean","title":"Result","description":"Authentication result (true if successful)"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Response message"},"user_data":{"anyOf":[{"$ref":"#/components/schemas/UserData"},{"type":"null"}],"description":"User data (only present on successful login)"},"access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token","description":"Signed JWT (only present on successful login)"}},"type":"object","required":["code","result"],"title":"LoginResponse"},"ParagraphSummaryInput":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"paragraph_no":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Paragraph No"},"key_words":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Words"},"sentence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sentence"}},"type":"object","title":"ParagraphSummaryInput","description":"One row of tbl_paragraph_summary.\n\nThese rows hang off a single essay and are shared with nothing, so all three\ncolumns are edited in place and a removed row is deleted outright. paragraph_no\nis what the reader keys its numbered markers off."},"PasswordResetRequest":{"properties":{"username_or_email":{"type":"string","title":"Username Or Email","description":"Username or email address"}},"type":"object","required":["username_or_email"],"title":"PasswordResetRequest"},"PasswordResetResponse":{"properties":{"code":{"type":"integer","title":"Code","description":"Response code (200 for success, 400/404/500 for failure)"},"result":{"type":"boolean","title":"Result","description":"Password reset request result (true if successful)"},"message":{"type":"string","title":"Message","description":"Response message"}},"type":"object","required":["code","result","message"],"title":"PasswordResetResponse"},"PaymentConfirmRequest":{"properties":{"payment_intent_id":{"type":"string","title":"Payment Intent Id"},"credit_id":{"type":"integer","title":"Credit Id"},"quantity":{"type":"integer","title":"Quantity","default":1}},"type":"object","required":["payment_intent_id","credit_id"],"title":"PaymentConfirmRequest"},"PaymentConfirmResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"payment_status":{"type":"string","title":"Payment Status"},"credit_added":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credit Added"},"balance":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Balance"},"accounting_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Accounting Id"}},"type":"object","required":["success","message","payment_status"],"title":"PaymentConfirmResponse"},"PaymentIntentCreate":{"properties":{"credit_id":{"type":"integer","title":"Credit Id"},"quantity":{"type":"integer","title":"Quantity","default":1},"payment_method":{"type":"string","title":"Payment Method","default":"card"}},"type":"object","required":["credit_id"],"title":"PaymentIntentCreate"},"PaymentIntentResponse":{"properties":{"client_secret":{"type":"string","title":"Client Secret"},"payment_intent_id":{"type":"string","title":"Payment Intent Id"},"amount":{"type":"integer","title":"Amount"},"currency":{"type":"string","title":"Currency"}},"type":"object","required":["client_secret","payment_intent_id","amount","currency"],"title":"PaymentIntentResponse"},"ProfileResponse":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"type":"integer","title":"User Id"},"fact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fact"},"story":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Story"}},"type":"object","required":["id","user_id"],"title":"ProfileResponse"},"ProfileUpdateRequest":{"properties":{"fact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fact"},"story":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Story"}},"type":"object","title":"ProfileUpdateRequest"},"ResetPasswordWithTokenRequest":{"properties":{"token":{"type":"string","title":"Token","description":"Password reset token"},"password":{"type":"string","title":"Password","description":"New password"}},"type":"object","required":["token","password"],"title":"ResetPasswordWithTokenRequest"},"ResetPasswordWithTokenResponse":{"properties":{"code":{"type":"integer","title":"Code","description":"Response code (200 for success, 400/404/500 for failure)"},"result":{"type":"boolean","title":"Result","description":"Password reset result (true if successful)"},"message":{"type":"string","title":"Message","description":"Response message"}},"type":"object","required":["code","result","message"],"title":"ResetPasswordWithTokenResponse"},"ResourceCreate":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"html_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Html Content"},"base64_img":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base64 Img"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","default":true}},"type":"object","title":"ResourceCreate"},"ResourceUpdate":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"html_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Html Content"},"base64_img":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base64 Img"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"ResourceUpdate"},"ReviewPublicUpdate":{"properties":{"is_public":{"type":"boolean","title":"Is Public"}},"type":"object","required":["is_public"],"title":"ReviewPublicUpdate"},"ReviewReviseRequest":{"properties":{"instruction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instruction"}},"type":"object","title":"ReviewReviseRequest"},"ReviewSubmitRequest":{"properties":{"essay":{"type":"string","title":"Essay"},"essay_prompt":{"type":"string","title":"Essay Prompt"},"background_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Background Info"},"traits":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Traits"},"essay_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Essay Id"},"parent_review_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Review Id"}},"type":"object","required":["essay","essay_prompt"],"title":"ReviewSubmitRequest"},"RosterMemberCreateRequest":{"properties":{"name":{"type":"string","title":"Name"},"remark":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remark"}},"type":"object","required":["name"],"title":"RosterMemberCreateRequest"},"RosterMemberResponse":{"properties":{"roster_id":{"type":"integer","title":"Roster Id"},"member_id":{"type":"integer","title":"Member Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"create_datetime":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Create Datetime"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","default":true}},"type":"object","required":["roster_id","member_id"],"title":"RosterMemberResponse"},"SetUserRoleRequest":{"properties":{"role":{"type":"string","title":"Role","description":"New role: 'user' or 'admin'"}},"type":"object","required":["role"],"title":"SetUserRoleRequest"},"TraitCreateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","default":true}},"type":"object","title":"TraitCreateRequest"},"TraitResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","required":["id"],"title":"TraitResponse"},"TraitUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"TraitUpdateRequest"},"UserData":{"properties":{"user_id":{"type":"integer","title":"User Id","description":"User ID"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name","description":"Username"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"User email"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role","description":"User role (e.g. 'user', 'admin')"}},"type":"object","required":["user_id"],"title":"UserData"},"UserInfoResponse":{"properties":{"user_id":{"type":"integer","title":"User Id","description":"User ID"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name","description":"Username"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User full name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"User email"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"User title"},"remark":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remark","description":"User remark"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","description":"User active status"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role","description":"User role"},"create_datetime":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Create Datetime","description":"User creation datetime"}},"type":"object","required":["user_id"],"title":"UserInfoResponse"},"UserProfileUpdateRequest":{"properties":{"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name","description":"Username"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User full name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"User email"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"User title"},"remark":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remark","description":"User remark"}},"type":"object","title":"UserProfileUpdateRequest"},"UserRegisterRequest":{"properties":{"name":{"type":"string","title":"Name","description":"User's full name"},"username":{"type":"string","title":"Username","description":"Username"},"email":{"type":"string","title":"Email","description":"User email"},"password":{"type":"string","title":"Password","description":"User password"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"User title"},"alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Alias","description":"User alias"},"is_group":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Group","description":"Register as a group account","default":false}},"type":"object","required":["name","username","email","password"],"title":"UserRegisterRequest"},"UserRegisterResponse":{"properties":{"user_id":{"type":"integer","title":"User Id","description":"Created user ID"},"message":{"type":"string","title":"Message","description":"Success message"}},"type":"object","required":["user_id","message"],"title":"UserRegisterResponse"},"UserResponse":{"properties":{"id":{"type":"integer","title":"Id"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","required":["id"],"title":"UserResponse"},"UsersPaginatedResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/UserResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"offset":{"type":"integer","title":"Offset"},"limit":{"type":"integer","title":"Limit"}},"type":"object","required":["items","total","offset","limit"],"title":"UsersPaginatedResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifyResponse":{"properties":{"code":{"type":"integer","title":"Code","description":"Response code (200 for success, 400/404 for failure)"},"result":{"type":"boolean","title":"Result","description":"Verification result (true if successful)"},"message":{"type":"string","title":"Message","description":"Response message"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"Email associated with the account"}},"type":"object","required":["code","result","message"],"title":"VerifyResponse"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}