{"openapi":"3.1.0","info":{"title":"Poc API","version":"0.1.0"},"paths":{"/caloratio/get-caloratio-score":{"get":{"tags":["Caloratio"],"summary":"Get Caloratio Score","description":"Delegate caloratio score computation to the service layer. The user is resolved\nby get_current_user (which bypasses localhost and enforces valid roles).\nOnly staff/admin may override `user_id`.","operationId":"get_caloratio_score","security":[{"HTTPBearer":[]}],"parameters":[{"name":"start_date","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Start date in ISO format (YYYY-MM-DD)","title":"Start Date"},"description":"Start date in ISO format (YYYY-MM-DD)"},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","format":"date","description":"End date in ISO format (YYYY-MM-DD)","title":"End Date"},"description":"End date in ISO format (YYYY-MM-DD)"},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Override user ID","title":"User Id"},"description":"Override user ID"},{"name":"meal","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by meal type","title":"Meal"},"description":"Filter by meal type"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/caloratio/vision/analyze":{"post":{"tags":["Caloratio Log"],"summary":"Analyze Food Image Endpoint","description":"Kept for app builds that call it on photo upload (and disable Submit until it returns).\n\nThe food log agent now reads the photo itself, so this returns immediately without a model call.","operationId":"analyze_food_image_endpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaloratioVisionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaloratioVisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/caloratio/log/stream":{"post":{"tags":["Caloratio Log"],"summary":"Log Food Stream","description":"Log food with AI-calculated Caloratio score (streaming response).\n\nSSE Events:\n- `start`: Connection established\n- `text_delta`: AI text response chunks\n- `thinking_status`: AI processing status\n- `food_match_clarification`: Need user to select from matches\n- `portion_clarification`: Need user to provide portion size\n- `food_logged`: Entry successfully logged\n- `done`: Completion signal with tool_calls\n- `error`: Error information","operationId":"log_food_stream","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaloratiologWithClarificationRequest"}}},"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":[]}]}},"/caloratio/edit/stream":{"put":{"tags":["Caloratio Log"],"summary":"Edit Food Stream","description":"Edit a food entry with AI recalculation (streaming response).\n\nSSE Events:\n- `start`: Connection established\n- `text_delta`: AI text response chunks\n- `thinking_status`: AI processing status\n- `food_updated`: Entry successfully updated\n- `done`: Completion signal with tool_calls\n- `error`: Error information","operationId":"edit_food_stream","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaloratioEditRequest"}}},"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":[]}]}},"/caloratio/log/{food_log_id}":{"put":{"tags":["Caloratio Log"],"summary":"Edit Food","description":"Edit a food entry with AI recalculation (non-streaming).","operationId":"edit_food","security":[{"HTTPBearer":[]}],"parameters":[{"name":"food_log_id","in":"path","required":true,"schema":{"type":"string","title":"Food Log Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaloratioEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaloratioFoodEntry"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Caloratio Log"],"summary":"Delete Food Entry","description":"Delete a food entry.","operationId":"delete_food_entry","security":[{"HTTPBearer":[]}],"parameters":[{"name":"food_log_id","in":"path","required":true,"schema":{"type":"string","title":"Food Log Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/caloratio/log/today":{"get":{"tags":["Caloratio Log"],"summary":"Get Today Log","description":"Get today's food log with entries and daily totals.","operationId":"get_today_log","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaloratioDailySummary"}}}}},"security":[{"HTTPBearer":[]}]}},"/caloratio/log/{meal_date}":{"get":{"tags":["Caloratio Log"],"summary":"Get Date Log","description":"Get food log for a specific date with entries and daily totals.","operationId":"get_date_log","security":[{"HTTPBearer":[]}],"parameters":[{"name":"meal_date","in":"path","required":true,"schema":{"type":"string","format":"date","title":"Meal Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaloratioDailySummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/caloratio/log/entry/{food_log_id}":{"get":{"tags":["Caloratio Log"],"summary":"Get Food Entry","description":"Get a single food entry by ID (for edit screen).","operationId":"get_food_entry","security":[{"HTTPBearer":[]}],"parameters":[{"name":"food_log_id","in":"path","required":true,"schema":{"type":"string","title":"Food Log Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaloratioFoodEntry"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/caloratio/log/{food_log_id}/meal":{"patch":{"tags":["Caloratio Log"],"summary":"Update Meal","description":"Reassign a food entry to a different meal.","operationId":"update_meal","security":[{"HTTPBearer":[]}],"parameters":[{"name":"food_log_id","in":"path","required":true,"schema":{"type":"string","title":"Food Log Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaloratioUpdateMealRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/caloratio/feedback":{"post":{"tags":["Caloratio Log"],"summary":"Submit Feedback","description":"Submit thumbs up/down feedback for a food entry.","operationId":"submit_feedback","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaloratioFeedbackRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaloratioFeedbackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/caloratio/log-again":{"post":{"tags":["Caloratio Log"],"summary":"Log Again","description":"Re-log a previous food entry to a new meal/date.","operationId":"log_again","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaloratioLogAgainRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaloratioLogAgainResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/caloratio/fluids":{"get":{"tags":["Caloratio Log"],"summary":"Get Fluids","description":"Get all standalone fluid entries, most recent first.","operationId":"get_fluids","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Caloratio Log"],"summary":"Log Fluid","description":"Log a standalone fluid entry.","operationId":"log_fluid","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FluidLogCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaloratioFoodEntry"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/caloratio/fluids/today-total":{"get":{"tags":["Caloratio Log"],"summary":"Get Fluid Today Total","description":"Get today's combined fluid total (all sources). Pass ?date=YYYY-MM-DD to use client's local date.","operationId":"get_fluid_today_total","security":[{"HTTPBearer":[]}],"parameters":[{"name":"date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/caloratio/fluids/{entry_id}":{"patch":{"tags":["Caloratio Log"],"summary":"Update Fluid","description":"Update a standalone fluid entry.","operationId":"update_fluid","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FluidLogUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaloratioFoodEntry"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/notifications/send-push-notification":{"post":{"tags":["Notifications"],"summary":"Send Push Notification","description":"Send push notification to users.","operationId":"send_push_notification","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserNotificationsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]},{"APIKeyQuery":[]}]}},"/credits/me":{"get":{"tags":["Credits"],"summary":"Get My Credits","description":"Get the current user's AI credits status.\n\nElevated roles (admin, staff, instructor, provider) show\nas having unlimited credits.","operationId":"get_my_credits","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreditsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/credits/add-ai-credits":{"post":{"tags":["Credits"],"summary":"Add Credits Endpoint","description":"Add AI credits to a user account from JotForm webhook.","operationId":"add_credits_endpoint","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_add_credits_endpoint"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddAICreditsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]},{"APIKeyQuery":[]}]}},"/subscriptions/me":{"get":{"tags":["Subscriptions"],"summary":"Get My Entitlement","description":"Get the current user's subscription entitlement and access rights.\n\nElevated roles (admin, staff, instructor, provider) bypass\npaywall restrictions and receive full access to all features.\n\nFor regular users with no active subscription, runs a synchronous\nlegacy check (TeamUp, old Stripe, RevenueCat) before returning.","operationId":"get_my_entitlement","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserEntitlementResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/subscriptions/checkout":{"post":{"tags":["Subscriptions"],"summary":"Create Checkout Url","description":"Create a checkout URL for user subscriptions.","operationId":"create_checkout_url","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_identifier","in":"query","required":true,"schema":{"type":"string","title":"Product Identifier"}},{"name":"affiliate_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Affiliate Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/subscriptions/portal":{"post":{"tags":["Subscriptions"],"summary":"Create Portal Url","description":"Create a Stripe billing portal session URL for the authenticated user.","operationId":"create_portal_url","responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalSessionResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/subscriptions/upgrade":{"post":{"tags":["Subscriptions"],"summary":"Subscription Update","description":"Upgrade the user's subscription to a higher tier.\n\nFor legacy subscriptions, cancels the legacy sub and returns a checkout URL.\nFor Stripe subscriptions, performs a proration update.","operationId":"subscription_update","security":[{"HTTPBearer":[]}],"parameters":[{"name":"product_identifier","in":"query","required":true,"schema":{"type":"string","title":"Product Identifier"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/subscriptions/check-legacy":{"post":{"tags":["Subscriptions"],"summary":"Check Legacy Subscription","description":"Check legacy subscriptions (TeamUp, old Stripe, RevenueCat) synchronously.\n\nRuns the lookup inline and creates a subscription record if a legacy\nmembership is found. Idempotent — skips if already checked or subscribed.\nCalled automatically after sign-up in the mobile app.","operationId":"check_legacy_subscription","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/subscriptions/cancel":{"post":{"tags":["Subscriptions"],"summary":"Cancel Subscription","description":"Cancel the authenticated user's TeamUp membership.","operationId":"cancel_subscription","responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/subscriptions/platinum-eligibility":{"get":{"tags":["Subscriptions"],"summary":"Check Platinum Eligibility","description":"Check if Platinum is available in the user's state.","operationId":"check_platinum_eligibility","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/subscriptions/platinum-eligible-states":{"get":{"tags":["Subscriptions"],"summary":"Get Eligible States","description":"Return list of US states where Platinum is currently available.","operationId":"get_eligible_states","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/subscriptions/products":{"get":{"tags":["Admin"],"summary":"List Products Endpoint","description":"List subscription products with pricing info for the invite form.","operationId":"list_products_endpoint","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ProductInfo"},"type":"array","title":"Response List Products Endpoint"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/subscriptions/search-users":{"get":{"tags":["Admin"],"summary":"Search Users Endpoint","description":"Search users for subscription management.","operationId":"search_users_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"description":"Search query (email, name, or user ID)","title":"Q"},"description":"Search query (email, name, or user ID)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserWithSubscription"},"title":"Response Search Users Endpoint"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/subscriptions/pre-check-email":{"post":{"tags":["Admin"],"summary":"Pre Check Email Endpoint","description":"Check if an email already has an active subscription, legacy membership, or pending invitation.","operationId":"pre_check_email_endpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailPreCheckRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailPreCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/subscriptions/user/{user_id}":{"get":{"tags":["Admin"],"summary":"Get User Subscription Endpoint","description":"Get subscription details for a specific user, including history.","operationId":"get_user_subscription_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","description":"Firebase user ID","title":"User Id"},"description":"Firebase user ID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSubscriptionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/subscriptions":{"get":{"tags":["Admin"],"summary":"Get Subscriptions","description":"Get user subscriptions.","operationId":"get_subscriptions","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/subscriptions/stripe/fulfillment":{"post":{"tags":["Admin"],"summary":"Stripe Webhook","description":"Receive webhook events from Stripe.","operationId":"stripe_webhook","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/subscriptions/stripe/create-product":{"post":{"tags":["Admin"],"summary":"Create Product","description":"Create a new product in Stripe.","operationId":"create_product","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}},"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":[]}]}},"/admin/subscriptions/create":{"post":{"tags":["Admin"],"summary":"Create Subscription Endpoint","description":"Create a subscription for a specific user (generates checkout or creates directly).","operationId":"create_subscription_endpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSubscriptionCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSubscriptionCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/subscriptions/send-payment-link":{"post":{"tags":["Admin"],"summary":"Send Payment Link Endpoint","description":"Generate a Stripe checkout URL and send it to the user via email.","operationId":"send_payment_link_endpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendPaymentLinkRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendPaymentLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/subscriptions/create-with-payment":{"post":{"tags":["Admin"],"summary":"Create With Payment Endpoint","description":"Create a subscription with direct payment using a Stripe payment method.","operationId":"create_with_payment_endpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWithPaymentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWithPaymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/subscriptions/{uid}/cancel":{"post":{"tags":["Admin"],"summary":"Cancel Subscription Endpoint","description":"Cancel a subscription for a specific user (admin action).","operationId":"cancel_subscription_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string","description":"Firebase user ID","title":"Uid"},"description":"Firebase user ID"}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AdminCancelSubscriptionRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCancelSubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/subscriptions/{uid}/refund":{"post":{"tags":["Admin"],"summary":"Refund Subscription Endpoint","description":"Issue a full or partial refund for a user's subscription.\n\nAdmins can always refund. Staff members need the 'can_refund' permission.","operationId":"refund_subscription_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string","description":"User ID","title":"Uid"},"description":"User ID"}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AdminRefundRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRefundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/subscriptions/payments":{"get":{"tags":["Admin"],"summary":"List Payments Endpoint","description":"List all Stripe payments with user info.","operationId":"list_payments_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"starting_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Stripe charge ID for cursor pagination","title":"Starting After"},"description":"Stripe charge ID for cursor pagination"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/subscriptions/browse":{"get":{"tags":["Admin"],"summary":"Browse Subscriptions Endpoint","description":"Browse all subscriptions with filtering and pagination.","operationId":"browse_subscriptions_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by user email or name","title":"Q"},"description":"Search by user email or name"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source type","title":"Source"},"description":"Filter by source type"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status (active/ended)","title":"Status"},"description":"Filter by status (active/ended)"},{"name":"entitlement","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by entitlement","title":"Entitlement"},"description":"Filter by entitlement"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionBrowseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/subscriptions/legacy-search":{"post":{"tags":["Admin"],"summary":"Legacy Search Endpoint","description":"Search legacy platforms (TeamUp, old Stripe, RevenueCat) by email.","operationId":"legacy_search_endpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegacySearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegacySearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/subscriptions/legacy-link":{"post":{"tags":["Admin"],"summary":"Legacy Link Endpoint","description":"Link a legacy platform subscription to a user.","operationId":"legacy_link_endpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegacyLinkRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegacyLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/subscriptions/legacy-lookup/{user_id}":{"post":{"tags":["Admin"],"summary":"Admin Legacy Lookup Endpoint","description":"Manually trigger a legacy subscription lookup for a user (admin action).","operationId":"admin_legacy_lookup_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","description":"User ID to check for legacy subscriptions","title":"User Id"},"description":"User ID to check for legacy subscriptions"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/subscriptions/legacy-lookup-log/{user_id}":{"get":{"tags":["Admin"],"summary":"Admin Legacy Lookup Log Endpoint","description":"Get legacy subscription lookup history for a user (admin action).","operationId":"admin_legacy_lookup_log_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","description":"User ID to get legacy lookup history for","title":"User Id"},"description":"User ID to get legacy lookup history for"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/subscriptions/grant-complimentary":{"post":{"tags":["Admin"],"summary":"Grant Complimentary Endpoint","description":"Grant a user complimentary access for a set period (admin only).","operationId":"grant_complimentary_endpoint","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Request"}}},"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":[]}]}},"/admin/subscriptions/extend-complimentary":{"post":{"tags":["Admin"],"summary":"Extend Complimentary Endpoint","description":"Extend a complimentary subscription's duration (admin/staff).","operationId":"extend_complimentary_endpoint","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Request"}}},"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":[]}]}},"/admin/roles/{userId}":{"get":{"tags":["Admin"],"summary":"Get User Roles Endpoint","description":"Get all roles for a specific user (Admin only).","operationId":"get_user_roles_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","title":"Userid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRolesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/roles/set-role":{"post":{"tags":["Admin"],"summary":"Set User Role Endpoint","description":"Add or remove a role from a user (Admin only).\n\nWhen adding instructor or provider role, automatically creates the corresponding\ninstructor or provider record.\n\nWhen removing instructor or provider role, validates that there are no active\nschedules before allowing removal.","operationId":"set_user_role_endpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetUserRoleRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetUserRoleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/roles/{userId}/validate-removal/{role}":{"get":{"tags":["Admin"],"summary":"Validate Role Removal Endpoint","description":"Check if a role can be removed from a user (Admin only).\n\nReturns whether the role can be removed and the reason if it cannot\n(e.g., user has active support groups or office hours).","operationId":"validate_role_removal_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","title":"Userid"}},{"name":"role","in":"path","required":true,"schema":{"$ref":"#/components/schemas/UserRole"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleValidationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/roles/{userId}/sync-metadata":{"post":{"tags":["Admin"],"summary":"Sync User Role Metadata Endpoint","description":"Sync a user's role from user_roles table to app_metadata (Admin only).\n\nThis fixes users who have roles in the database but not in their JWT.\nAfter syncing, the user needs to re-login to get the updated JWT.","operationId":"sync_user_role_metadata_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","title":"Userid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Sync User Role Metadata Endpoint"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/roles/sync-metadata-all":{"post":{"tags":["Admin"],"summary":"Sync All Users Metadata Endpoint","description":"Backfill app_metadata.roles for every user with DB roles (Admin only).\n\nRun once after deploying multi-role JWT support. Affected users must\nre-login to get the updated JWT.","operationId":"sync_all_users_metadata_endpoint","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Sync All Users Metadata Endpoint"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/roles/{userId}/permissions":{"get":{"tags":["Admin"],"summary":"Get Staff Permissions Endpoint","description":"Get all granular permissions for a user (Admin only).","operationId":"get_staff_permissions_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","title":"Userid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffPermissionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Admin"],"summary":"Update Staff Permissions Endpoint","description":"Update granular permissions for a staff member (Admin only).\n\nPermissions are stored on the staff role row. Only meaningful for non-admin roles\nsince admins implicitly have all permissions.","operationId":"update_staff_permissions_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","title":"Userid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStaffPermissionsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffPermissionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/me":{"get":{"tags":["Admin"],"summary":"Get Admin Profile Endpoint","description":"Get current authenticated admin/staff profile and permissions.","operationId":"get_admin_profile_endpoint","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminProfileResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/users/invite":{"post":{"tags":["Admin"],"summary":"Invite Staff Endpoint","description":"Invite a new staff member to the admin dashboard.","operationId":"invite_staff_endpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffInviteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffInviteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/users/invitations/{invitation_id}":{"delete":{"tags":["Admin"],"summary":"Delete Staff Invitation Endpoint","description":"Delete a staff invitation and its associated auth user.","operationId":"delete_staff_invitation_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","title":"Invitation Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/invitations/notify-accepted":{"post":{"tags":["Admin"],"summary":"Notify Invitation Accepted Endpoint","description":"Called after an invited user sets their password.\n\nMarks the invitation as accepted and notifies the inviter\nif the invited user has an affiliate role.","operationId":"notify_invitation_accepted_endpoint","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Notify Invitation Accepted Endpoint"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/users/invitations":{"get":{"tags":["Admin"],"summary":"List Staff Invitations Endpoint","description":"List staff invitations.","operationId":"list_staff_invitations_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffInvitationListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/search":{"get":{"tags":["Admin"],"summary":"Search Users Endpoint","description":"Search users by name or email. If no query provided, returns all users (Admin & Staff access).","operationId":"search_users_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":2},{"type":"null"}],"description":"Search query (optional, min 2 chars if provided)","title":"Q"},"description":"Search query (optional, min 2 chars if provided)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Results per page","default":25,"title":"Limit"},"description":"Results per page"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pagination cursor","title":"Cursor"},"description":"Pagination cursor"},{"name":"role","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by role(s), comma-separated (e.g. 'admin,staff')","title":"Role"},"description":"Filter by role(s), comma-separated (e.g. 'admin,staff')"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/{userId}":{"get":{"tags":["Admin"],"summary":"Get User Endpoint","description":"Get detailed user information (Admin & Staff access).","operationId":"get_user_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","title":"Userid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Admin"],"summary":"Update User Endpoint","description":"Update user profile information (Admin & Staff access).","operationId":"update_user_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","title":"Userid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Admin Soft Delete User","description":"Soft delete a user (Admin only).\n\nThis marks the user as deleted but preserves their data for potential\nrestoration. The user will be unable to log in. Stripe subscription is canceled.","operationId":"admin_soft_delete_user","security":[{"HTTPBearer":[]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","title":"Userid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Soft Delete User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/{userId}/subscription":{"get":{"tags":["Admin"],"summary":"Get User Subscription Endpoint","description":"Get subscription details for a specific user (Admin & Staff access).","operationId":"get_user_subscription_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","title":"Userid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/{userId}/email-consent":{"get":{"tags":["Admin"],"summary":"Get User Email Consent Endpoint","description":"A user's current email permissions and their history (Admin & Staff access).","operationId":"get_user_email_consent_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","title":"Userid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserEmailConsentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/{userId}/deletion-analysis":{"get":{"tags":["Admin"],"summary":"Get Deletion Analysis","description":"Analyze what will happen when a user is deleted (Admin only).\n\nReturns information about shared content that needs reassignment\nand potential users to reassign content to.","operationId":"get_deletion_analysis","security":[{"HTTPBearer":[]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","title":"Userid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletionAnalysis"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/{userId}/hard":{"delete":{"tags":["Admin"],"summary":"Admin Hard Delete User","description":"Permanently delete a user and all their data (Admin only).\n\nThis is irreversible - all user data will be permanently removed via CASCADE.\nStripe subscription is canceled before deletion.\n\nIf the user has shared content (e.g., instructor with support group types),\nthis will return a DeletionAnalysis with reassignment candidates instead of\ndeleting. Call again with reassign_to parameter to complete the deletion.","operationId":"admin_hard_delete_user","security":[{"HTTPBearer":[]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","title":"Userid"}},{"name":"reassign_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User ID to reassign shared content to","title":"Reassign To"},"description":"User ID to reassign shared content to"},{"name":"force","in":"query","required":false,"schema":{"type":"boolean","description":"Force delete shared content without reassignment","default":false,"title":"Force"},"description":"Force delete shared content without reassignment"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","additionalProperties":true},{"$ref":"#/components/schemas/DeletionAnalysis"}],"title":"Response Admin Hard Delete User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/{userId}/restore":{"post":{"tags":["Admin"],"summary":"Admin Restore User","description":"Restore a soft-deleted user (Admin only).\n\nThis clears the deleted_at flag and re-enables the auth account.\nNote: Stripe subscription is NOT restored - user will need to resubscribe.","operationId":"admin_restore_user","security":[{"HTTPBearer":[]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","title":"Userid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Restore User"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/analytics/dashboard":{"get":{"tags":["Admin"],"summary":"Get Analytics Dashboard Endpoint","description":"Get dashboard analytics metrics (Admin only).","operationId":"get_analytics_dashboard_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"startDate","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Start date for metrics (default: 7 days ago)","title":"Startdate"},"description":"Start date for metrics (default: 7 days ago)"},{"name":"endDate","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"End date for metrics (default: today)","title":"Enddate"},"description":"End date for metrics (default: today)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsDashboardResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/analytics/engagement":{"get":{"tags":["Admin"],"summary":"Get Engagement Analytics Endpoint","description":"Get engagement analytics: DAU/WAU/MAU, feature usage, retention (Admin only).","operationId":"get_engagement_analytics_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"startDate","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Start date (default: 30 days ago)","title":"Startdate"},"description":"Start date (default: 30 days ago)"},{"name":"endDate","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"End date (default: today)","title":"Enddate"},"description":"End date (default: today)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EngagementAnalyticsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/foods":{"get":{"tags":["Admin"],"summary":"List Foods Endpoint","description":"List Caloratio foods with search/filter (Admin only).","operationId":"list_foods_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search food name","title":"Query"},"description":"Search food name"},{"name":"flags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by flag (e.g., isGrain=true)","title":"Flags"},"description":"Filter by flag (e.g., isGrain=true)"},{"name":"sort","in":"query","required":false,"schema":{"type":"string","description":"Sort field","default":"name","title":"Sort"},"description":"Sort field"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Results per page","default":25,"title":"Limit"},"description":"Results per page"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pagination cursor","title":"Cursor"},"description":"Pagination cursor"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin"],"summary":"Create Food Endpoint","description":"Create new Caloratio food (Admin only).","operationId":"create_food_endpoint","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/foods/empty-searches":{"get":{"tags":["Admin"],"summary":"List Empty Searches","description":"List empty food searches ranked by frequency (Admin only).","operationId":"list_empty_searches","security":[{"HTTPBearer":[]}],"parameters":[{"name":"include_cleared","in":"query","required":false,"schema":{"type":"boolean","description":"Include cleared searches","default":false,"title":"Include Cleared"},"description":"Include cleared searches"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptySearchListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/foods/empty-searches/{searchId}/clear":{"post":{"tags":["Admin"],"summary":"Clear Empty Search","description":"Mark an empty search as cleared/resolved (Admin only).","operationId":"clear_empty_search","security":[{"HTTPBearer":[]}],"parameters":[{"name":"searchId","in":"path","required":true,"schema":{"type":"integer","title":"Searchid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Clear Empty Search"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/foods/empty-searches/{searchId}/create-food":{"post":{"tags":["Admin"],"summary":"Create Food From Empty Search","description":"Create a new food from an empty search, linking them together (Admin only).","operationId":"create_food_from_empty_search","security":[{"HTTPBearer":[]}],"parameters":[{"name":"searchId","in":"path","required":true,"schema":{"type":"integer","title":"Searchid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/foods/{foodId}":{"get":{"tags":["Admin"],"summary":"Get Food Endpoint","description":"Get single food by ID (Admin only).","operationId":"get_food_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"foodId","in":"path","required":true,"schema":{"type":"string","title":"Foodid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Admin"],"summary":"Update Food Endpoint","description":"Update existing food (Admin only).","operationId":"update_food_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"foodId","in":"path","required":true,"schema":{"type":"string","title":"Foodid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete Food Endpoint","description":"Delete food (Admin only).","operationId":"delete_food_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"foodId","in":"path","required":true,"schema":{"type":"string","title":"Foodid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/foods/{foodId}/servings":{"post":{"tags":["Admin"],"summary":"Create Serving Endpoint","description":"Add serving to food (Admin only).","operationId":"create_serving_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"foodId","in":"path","required":true,"schema":{"type":"string","title":"Foodid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServingSize"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServingSize"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/foods/{foodId}/servings/{servingId}":{"patch":{"tags":["Admin"],"summary":"Update Serving Endpoint","description":"Update serving (Admin only).","operationId":"update_serving_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"foodId","in":"path","required":true,"schema":{"type":"string","title":"Foodid"}},{"name":"servingId","in":"path","required":true,"schema":{"type":"string","title":"Servingid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServingSize"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServingSize"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete Serving Endpoint","description":"Delete serving (Admin only).","operationId":"delete_serving_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"foodId","in":"path","required":true,"schema":{"type":"string","title":"Foodid"}},{"name":"servingId","in":"path","required":true,"schema":{"type":"string","title":"Servingid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/caloratio-ai-logs":{"get":{"tags":["Admin"],"summary":"Get Caloratio Ai Logs Endpoint","description":"View Caloratio AI-logged food entries (Admin only, read-only).","operationId":"get_caloratio_ai_logs_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search food name or input text","title":"Query"},"description":"Search food name or input text"},{"name":"startDate","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Filter start date","title":"Startdate"},"description":"Filter start date"},{"name":"endDate","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Filter end date","title":"Enddate"},"description":"Filter end date"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Results per page","default":25,"title":"Limit"},"description":"Results per page"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pagination cursor","title":"Cursor"},"description":"Pagination cursor"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AILogListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/support-groups":{"get":{"tags":["Admin"],"summary":"List Support Groups Endpoint","description":"List support groups.\n- Admins: see all groups\n- Instructors: see only their own groups","operationId":"list_support_groups_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search group name","title":"Query"},"description":"Search group name"},{"name":"includeCompleted","in":"query","required":false,"schema":{"type":"boolean","description":"Include completed groups","default":false,"title":"Includecompleted"},"description":"Include completed groups"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Results per page","default":25,"title":"Limit"},"description":"Results per page"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pagination cursor","title":"Cursor"},"description":"Pagination cursor"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportGroupListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin"],"summary":"Create Support Group Endpoint","description":"Create support group.\n- Admins: can create for any instructor\n- Instructors: can only create groups for themselves","operationId":"create_support_group_endpoint","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportGroupCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportGroupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/support-groups/generate-schedule":{"post":{"tags":["Admin"],"summary":"Generate Schedule Endpoint","description":"Generate schedule times from recurrence patterns.\n\nSupports patterns like:\n- Weekly: \"Every Monday at 4:00pm\"\n- Biweekly: \"Every other Tuesday at 3:30pm\"\n- Monthly: \"1st and 3rd Wednesday of every month at 11:30am\"","operationId":"generate_schedule_endpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateScheduleRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateScheduleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/support-groups/{groupId}":{"get":{"tags":["Admin"],"summary":"Get Support Group Endpoint","description":"Get single support group (checks ownership for instructors).","operationId":"get_support_group_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string","title":"Groupid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportGroupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Admin"],"summary":"Update Support Group Endpoint","description":"Update support group (checks ownership for instructors).","operationId":"update_support_group_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string","title":"Groupid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportGroupCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportGroupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete Support Group Endpoint","description":"Delete support group (checks ownership for instructors).","operationId":"delete_support_group_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string","title":"Groupid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/support-groups/{groupId}/schedule":{"post":{"tags":["Admin"],"summary":"Create Schedule Time Endpoint","description":"Add schedule time to group (checks ownership for instructors).","operationId":"create_schedule_time_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string","title":"Groupid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleTime"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleTime"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/support-groups/{groupId}/schedule/{scheduleId}":{"patch":{"tags":["Admin"],"summary":"Update Schedule Time Endpoint","description":"Update schedule time (checks ownership for instructors).","operationId":"update_schedule_time_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string","title":"Groupid"}},{"name":"scheduleId","in":"path","required":true,"schema":{"type":"string","title":"Scheduleid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleTime"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleTime"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete Schedule Time Endpoint","description":"Delete schedule time (checks ownership for instructors).","operationId":"delete_schedule_time_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string","title":"Groupid"}},{"name":"scheduleId","in":"path","required":true,"schema":{"type":"string","title":"Scheduleid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/support-groups/{groupId}/sessions/{sessionId}/start":{"post":{"tags":["Admin"],"summary":"Admin Start Session","description":"Start a group session. Admin acts on behalf of the instructor.","operationId":"admin_start_session","security":[{"HTTPBearer":[]}],"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string","title":"Groupid"}},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","title":"Sessionid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/support-groups/{groupId}/sessions/{sessionId}/end":{"post":{"tags":["Admin"],"summary":"Admin End Session","description":"End a group session. Admin acts on behalf of the instructor.","operationId":"admin_end_session","security":[{"HTTPBearer":[]}],"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string","title":"Groupid"}},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","title":"Sessionid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/support-groups/{groupId}/sessions/{sessionId}/participants":{"get":{"tags":["Admin"],"summary":"Admin Get Session Participants","description":"Get current participants in a live session.","operationId":"admin_get_session_participants","security":[{"HTTPBearer":[]}],"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string","title":"Groupid"}},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","title":"Sessionid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionParticipants"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/support-groups/{groupId}/sessions/{sessionId}/registrants":{"get":{"tags":["Admin"],"summary":"Admin Get Session Registrants","description":"Get registered users for a support group session.","operationId":"admin_get_session_registrants","security":[{"HTTPBearer":[]}],"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string","title":"Groupid"}},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","title":"Sessionid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionRegistrantsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/support-groups/{groupId}/sessions/{sessionId}/registrants/notify":{"post":{"tags":["Admin"],"summary":"Admin Send Session Registrants Notification","description":"Send a push notification to registered users for a support group session.","operationId":"admin_send_session_registrants_notification","security":[{"HTTPBearer":[]}],"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string","title":"Groupid"}},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","title":"Sessionid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendSessionNotificationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendSessionNotificationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/support-groups/{groupId}/sessions/{sessionId}/eject/{userId}":{"post":{"tags":["Admin"],"summary":"Admin Eject Participant","description":"Eject a participant from a live session, optionally blocking them.","operationId":"admin_eject_participant","security":[{"HTTPBearer":[]}],"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string","title":"Groupid"}},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","title":"Sessionid"}},{"name":"userId","in":"path","required":true,"schema":{"type":"string","title":"Userid"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EjectRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/instructors":{"get":{"tags":["Admin"],"summary":"List Instructors Endpoint","description":"List instructors.\n- Admins: see all instructors\n- Instructors: see only their own record","operationId":"list_instructors_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search instructor name","title":"Query"},"description":"Search instructor name"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Results per page","default":25,"title":"Limit"},"description":"Results per page"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pagination cursor","title":"Cursor"},"description":"Pagination cursor"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstructorListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin"],"summary":"Create Instructor Endpoint","description":"Create instructor (Admin only - instructors cannot create new instructors).","operationId":"create_instructor_endpoint","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstructorCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstructorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/instructors/{instructorId}":{"get":{"tags":["Admin"],"summary":"Get Instructor Endpoint","description":"Get single instructor (checks ownership for non-admins).","operationId":"get_instructor_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"instructorId","in":"path","required":true,"schema":{"type":"string","title":"Instructorid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstructorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Admin"],"summary":"Update Instructor Endpoint","description":"Update instructor (checks ownership for non-admins).","operationId":"update_instructor_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"instructorId","in":"path","required":true,"schema":{"type":"string","title":"Instructorid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstructorCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstructorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete Instructor Endpoint","description":"Delete instructor (Admin only).","operationId":"delete_instructor_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"instructorId","in":"path","required":true,"schema":{"type":"string","title":"Instructorid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/providers":{"get":{"tags":["Admin"],"summary":"List Providers Endpoint","description":"List providers.\n- Admins: see all providers\n- Providers: see only their own record","operationId":"list_providers_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search provider name","title":"Query"},"description":"Search provider name"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Results per page","default":25,"title":"Limit"},"description":"Results per page"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pagination cursor","title":"Cursor"},"description":"Pagination cursor"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin"],"summary":"Create Provider Endpoint","description":"Create provider (Admin only - providers cannot create new providers).","operationId":"create_provider_endpoint","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/providers/visit-types":{"get":{"tags":["Admin"],"summary":"List Visit Types Endpoint","description":"List all active visit types.","operationId":"list_visit_types_endpoint","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitTypeListResponse"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Admin"],"summary":"Create Visit Type Endpoint","description":"Create a new visit type (admin only).","operationId":"create_visit_type_endpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitTypeCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitTypeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/providers/{providerId}":{"get":{"tags":["Admin"],"summary":"Get Provider Endpoint","description":"Get single provider (checks ownership for non-admins).","operationId":"get_provider_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"providerId","in":"path","required":true,"schema":{"type":"string","title":"Providerid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Admin"],"summary":"Update Provider Endpoint","description":"Update provider (checks ownership for non-admins).","operationId":"update_provider_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"providerId","in":"path","required":true,"schema":{"type":"string","title":"Providerid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete Provider Endpoint","description":"Delete provider (Admin only).","operationId":"delete_provider_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"providerId","in":"path","required":true,"schema":{"type":"string","title":"Providerid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/office-hours/providers":{"get":{"tags":["Admin"],"summary":"List Providers Endpoint","description":"List all providers with office hours enabled.\n- Admins: see all providers\n- Providers: see only themselves","operationId":"list_providers_endpoint","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderBriefListResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/office-hours/{provider_id}/schedule":{"get":{"tags":["Admin"],"summary":"Get Schedule Endpoint","description":"Get full provider schedule with recurring hours, exclusions, and overrides.","operationId":"get_schedule_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string","description":"Provider ID","title":"Provider Id"},"description":"Provider ID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderScheduleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/office-hours/{provider_id}/appointments":{"get":{"tags":["Admin"],"summary":"List Appointments Endpoint","description":"List active patient bookings for this provider's office hours.","operationId":"list_appointments_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string","description":"Provider ID","title":"Provider Id"},"description":"Provider ID"},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfficeHoursAppointmentListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/office-hours/{provider_id}/recurring":{"put":{"tags":["Admin"],"summary":"Update Recurring Endpoint","description":"Update recurring office hours schedule.","operationId":"update_recurring_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string","description":"Provider ID","title":"Provider Id"},"description":"Provider ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OfficeHoursSlotRequest"},"title":"Slots"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/office-hours/{provider_id}/exclusions":{"get":{"tags":["Admin"],"summary":"List Exclusions Endpoint","description":"List all exclusion periods for a provider.","operationId":"list_exclusions_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string","description":"Provider ID","title":"Provider Id"},"description":"Provider ID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExclusionPeriodListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin"],"summary":"Create Exclusion Endpoint","description":"Create an exclusion period (e.g., vacation, time off).","operationId":"create_exclusion_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string","description":"Provider ID","title":"Provider Id"},"description":"Provider ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExclusionPeriodRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExclusionPeriodResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/office-hours/{provider_id}/exclusions/{exclusion_id}":{"delete":{"tags":["Admin"],"summary":"Delete Exclusion Endpoint","description":"Delete an exclusion period.","operationId":"delete_exclusion_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string","description":"Provider ID","title":"Provider Id"},"description":"Provider ID"},{"name":"exclusion_id","in":"path","required":true,"schema":{"type":"string","description":"Exclusion ID","title":"Exclusion Id"},"description":"Exclusion ID"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/office-hours/{provider_id}/overrides":{"get":{"tags":["Admin"],"summary":"List Overrides Endpoint","description":"List all one-off override sessions for a provider.","operationId":"list_overrides_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string","description":"Provider ID","title":"Provider Id"},"description":"Provider ID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverrideSessionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin"],"summary":"Create Override Endpoint","description":"Create a one-off override session.","operationId":"create_override_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string","description":"Provider ID","title":"Provider Id"},"description":"Provider ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverrideSessionRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverrideSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/office-hours/{provider_id}/overrides/{override_id}":{"patch":{"tags":["Admin"],"summary":"Update Override Endpoint","description":"Update a one-off override session.","operationId":"update_override_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string","description":"Provider ID","title":"Provider Id"},"description":"Provider ID"},{"name":"override_id","in":"path","required":true,"schema":{"type":"string","description":"Override ID","title":"Override Id"},"description":"Override ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverrideSessionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverrideSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete Override Endpoint","description":"Delete a one-off override session.","operationId":"delete_override_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string","description":"Provider ID","title":"Provider Id"},"description":"Provider ID"},{"name":"override_id","in":"path","required":true,"schema":{"type":"string","description":"Override ID","title":"Override Id"},"description":"Override ID"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/educational-content":{"get":{"tags":["Admin"],"summary":"List Educational Content Endpoint","description":"List educational content (Admin only).","operationId":"list_educational_content_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search title","title":"Query"},"description":"Search title"},{"name":"contentType","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by type","title":"Contenttype"},"description":"Filter by type"},{"name":"publishedAfter","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Filter by publication date (after)","title":"Publishedafter"},"description":"Filter by publication date (after)"},{"name":"publishedBefore","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Filter by publication date (before)","title":"Publishedbefore"},"description":"Filter by publication date (before)"},{"name":"premium","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by premium status","title":"Premium"},"description":"Filter by premium status"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Results per page","default":25,"title":"Limit"},"description":"Results per page"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pagination cursor","title":"Cursor"},"description":"Pagination cursor"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EducationalContentListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin"],"summary":"Create Educational Content Endpoint","description":"Create educational content (Admin only).","operationId":"create_educational_content_endpoint","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EducationalContentCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EducationalContentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/educational-content/{contentId}":{"get":{"tags":["Admin"],"summary":"Get Educational Content Endpoint","description":"Get single content item (Admin only).","operationId":"get_educational_content_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"contentId","in":"path","required":true,"schema":{"type":"string","title":"Contentid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EducationalContentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Admin"],"summary":"Update Educational Content Endpoint","description":"Update educational content (Admin only).","operationId":"update_educational_content_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"contentId","in":"path","required":true,"schema":{"type":"string","title":"Contentid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EducationalContentUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EducationalContentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete Educational Content Endpoint","description":"Delete educational content (Admin only).","operationId":"delete_educational_content_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"contentId","in":"path","required":true,"schema":{"type":"string","title":"Contentid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/educational-content/extract-pdf-text":{"post":{"tags":["Admin"],"summary":"Extract Pdf Text Endpoint","description":"Extract text from a PDF in Supabase Storage (Admin only).","operationId":"extract_pdf_text_endpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractPdfTextRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractPdfTextResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/shop/items":{"get":{"tags":["Admin"],"summary":"List Sale Items Endpoint","description":"List sale items (Admin only).","operationId":"list_sale_items_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search item name","title":"Query"},"description":"Search item name"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category ID","title":"Category"},"description":"Filter by category ID"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Results per page","default":25,"title":"Limit"},"description":"Results per page"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pagination cursor","title":"Cursor"},"description":"Pagination cursor"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleItemListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin"],"summary":"Create Sale Item Endpoint","description":"Create sale item (Admin only).","operationId":"create_sale_item_endpoint","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleItemCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/shop/items/{itemId}":{"get":{"tags":["Admin"],"summary":"Get Sale Item Endpoint","description":"Get single sale item (Admin only).","operationId":"get_sale_item_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string","title":"Itemid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Admin"],"summary":"Update Sale Item Endpoint","description":"Update sale item (Admin only).","operationId":"update_sale_item_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string","title":"Itemid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleItemCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete Sale Item Endpoint","description":"Delete sale item (Admin only).","operationId":"delete_sale_item_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"itemId","in":"path","required":true,"schema":{"type":"string","title":"Itemid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/shop/categories":{"get":{"tags":["Admin"],"summary":"List Sale Categories Endpoint","description":"List sale categories (Admin only).","operationId":"list_sale_categories_endpoint","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SaleCategoryResponse"},"type":"array","title":"Response List Sale Categories Endpoint"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Admin"],"summary":"Create Sale Category Endpoint","description":"Create sale category (Admin only).","operationId":"create_sale_category_endpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleCategoryCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleCategoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/shop/categories/{categoryId}":{"patch":{"tags":["Admin"],"summary":"Update Sale Category Endpoint","description":"Update sale category (Admin only).","operationId":"update_sale_category_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"categoryId","in":"path","required":true,"schema":{"type":"string","title":"Categoryid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleCategoryCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleCategoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete Sale Category Endpoint","description":"Delete sale category (Admin only).","operationId":"delete_sale_category_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"categoryId","in":"path","required":true,"schema":{"type":"string","title":"Categoryid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/uploads/sign":{"post":{"tags":["Admin"],"summary":"Sign Upload Endpoint","description":"Generate signed upload URL for Supabase Storage (Admin only).","operationId":"sign_upload_endpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadSignRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadSignResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/uploads/complete":{"post":{"tags":["Admin"],"summary":"Complete Upload Endpoint","description":"Confirm upload completion and perform any post-processing (Admin only).","operationId":"complete_upload_endpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadCompleteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadCompleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/invitations/create":{"post":{"tags":["Admin"],"summary":"Create Invitation Endpoint","description":"Create and send an invitation email to a new user.","operationId":"create_invitation_endpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/invitations":{"get":{"tags":["Admin"],"summary":"List Invitations Endpoint","description":"List all invitations with filtering and pagination.","operationId":"list_invitations_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status","title":"Status"},"description":"Filter by status"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max results","default":20,"title":"Limit"},"description":"Max results"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Pagination offset","default":0,"title":"Offset"},"description":"Pagination offset"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/invitations/{invitation_id}":{"get":{"tags":["Admin"],"summary":"Get Invitation Endpoint","description":"Get details of a specific invitation.","operationId":"get_invitation_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","description":"Invitation ID","title":"Invitation Id"},"description":"Invitation ID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Cancel Invitation Endpoint","description":"Cancel/revoke a pending invitation.","operationId":"cancel_invitation_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","description":"Invitation ID","title":"Invitation Id"},"description":"Invitation ID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cancel Invitation Endpoint"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/invitations/{invitation_id}/resend":{"post":{"tags":["Admin"],"summary":"Resend Invitation Endpoint","description":"Resend the invitation email for a pending invitation.","operationId":"resend_invitation_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","description":"Invitation ID","title":"Invitation Id"},"description":"Invitation ID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Resend Invitation Endpoint"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/education/certifications":{"get":{"tags":["Admin Education"],"summary":"List Certifications Endpoint","description":"List all user certifications.","operationId":"list_certifications_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by user name or email","title":"Query"},"description":"Search by user name or email"},{"name":"courseId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by course","title":"Courseid"},"description":"Filter by course"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Results per page","default":25,"title":"Limit"},"description":"Results per page"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pagination cursor","title":"Cursor"},"description":"Pagination cursor"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CertificationListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/education/topics":{"get":{"tags":["Admin Education"],"summary":"List Topics Endpoint","description":"List educational topics (Admin only).","operationId":"list_topics_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by name","title":"Query"},"description":"Search by name"},{"name":"includeUnpublished","in":"query","required":false,"schema":{"type":"boolean","description":"Include unpublished topics","default":true,"title":"Includeunpublished"},"description":"Include unpublished topics"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Results per page","default":25,"title":"Limit"},"description":"Results per page"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pagination cursor","title":"Cursor"},"description":"Pagination cursor"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin Education"],"summary":"Create Topic Endpoint","description":"Create educational topic (Admin only).","operationId":"create_topic_endpoint","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/education/topics/{topicId}":{"get":{"tags":["Admin Education"],"summary":"Get Topic Endpoint","description":"Get single topic (Admin only).","operationId":"get_topic_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"topicId","in":"path","required":true,"schema":{"type":"string","title":"Topicid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Admin Education"],"summary":"Update Topic Endpoint","description":"Update educational topic (Admin only).","operationId":"update_topic_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"topicId","in":"path","required":true,"schema":{"type":"string","title":"Topicid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin Education"],"summary":"Delete Topic Endpoint","description":"Delete educational topic (Admin only).","operationId":"delete_topic_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"topicId","in":"path","required":true,"schema":{"type":"string","title":"Topicid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/education/courses":{"get":{"tags":["Admin Education"],"summary":"List Courses Endpoint","description":"List courses (Admin only).","operationId":"list_courses_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"topicId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by topic","title":"Topicid"},"description":"Filter by topic"},{"name":"includeUnpublished","in":"query","required":false,"schema":{"type":"boolean","description":"Include unpublished courses","default":true,"title":"Includeunpublished"},"description":"Include unpublished courses"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Results per page","default":25,"title":"Limit"},"description":"Results per page"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pagination cursor","title":"Cursor"},"description":"Pagination cursor"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin Education"],"summary":"Create Course Endpoint","description":"Create course with modules (Admin only).","operationId":"create_course_endpoint","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/education/courses/{courseId}":{"get":{"tags":["Admin Education"],"summary":"Get Course Endpoint","description":"Get course with modules (Admin only).","operationId":"get_course_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"courseId","in":"path","required":true,"schema":{"type":"string","title":"Courseid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Admin Education"],"summary":"Update Course Endpoint","description":"Update course with modules (Admin only).","operationId":"update_course_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"courseId","in":"path","required":true,"schema":{"type":"string","title":"Courseid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin Education"],"summary":"Delete Course Endpoint","description":"Delete course (Admin only).","operationId":"delete_course_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"courseId","in":"path","required":true,"schema":{"type":"string","title":"Courseid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/education/courses/{courseId}/quiz":{"get":{"tags":["Admin Education"],"summary":"Get Course Quiz Endpoint","description":"Get quiz for course (Admin only).","operationId":"get_course_quiz_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"courseId","in":"path","required":true,"schema":{"type":"string","title":"Courseid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/QuizResponse"},{"type":"null"}],"title":"Response Get Course Quiz Endpoint"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/education/quizzes":{"post":{"tags":["Admin Education"],"summary":"Create Quiz Endpoint","description":"Create quiz with questions and answers (Admin only).","operationId":"create_quiz_endpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuizCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuizResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/education/quizzes/{quizId}":{"patch":{"tags":["Admin Education"],"summary":"Update Quiz Endpoint","description":"Update quiz with questions and answers (Admin only).","operationId":"update_quiz_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"quizId","in":"path","required":true,"schema":{"type":"string","title":"Quizid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuizCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuizResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin Education"],"summary":"Delete Quiz Endpoint","description":"Delete quiz (Admin only).","operationId":"delete_quiz_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"quizId","in":"path","required":true,"schema":{"type":"string","title":"Quizid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/education/topics/{topicId}/forum":{"get":{"tags":["Admin Education"],"summary":"Get Forum Endpoint","description":"Get forum for topic (Admin only).","operationId":"get_forum_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"topicId","in":"path","required":true,"schema":{"type":"string","title":"Topicid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ForumResponse"},{"type":"null"}],"title":"Response Get Forum Endpoint"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/education/forum/posts/{postId}":{"delete":{"tags":["Admin Education"],"summary":"Delete Post Endpoint","description":"Soft-delete forum post (Admin only).","operationId":"delete_post_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"postId","in":"path","required":true,"schema":{"type":"string","title":"Postid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/education/forum/replies/{replyId}":{"delete":{"tags":["Admin Education"],"summary":"Delete Reply Endpoint","description":"Soft-delete forum reply (Admin only).","operationId":"delete_reply_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"replyId","in":"path","required":true,"schema":{"type":"string","title":"Replyid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/oauth-clients":{"get":{"tags":["Admin Webhooks"],"summary":"List Clients","operationId":"list_clients","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClientListResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/webhook-config":{"get":{"tags":["Admin Webhooks"],"summary":"Read Webhook Config","operationId":"read_webhook_config","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"query","required":true,"schema":{"type":"string","title":"Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookConfigReadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin Webhooks"],"summary":"Configure Webhook","operationId":"configure_webhook","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookConfigRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/integrations/grail-active-nutrition":{"get":{"tags":["Admin Integrations"],"summary":"Get Grail Active Nutrition Status","operationId":"get_grail_active_nutrition_status","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrailConnectionStatus"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Admin Integrations"],"summary":"Disconnect Grail Active Nutrition","operationId":"disconnect_grail_active_nutrition","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrailConnectionStatus"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/integrations/grail-active-nutrition/patients/search":{"get":{"tags":["Admin Integrations"],"summary":"Search Grail Active Nutrition Patients","operationId":"search_grail_active_nutrition_patients","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":25,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrailPatientSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/integrations/grail-active-nutrition/connect":{"post":{"tags":["Admin Integrations"],"summary":"Start Grail Active Nutrition Connect","operationId":"start_grail_active_nutrition_connect","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrailOAuthStartRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrailOAuthStartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/integrations/grail-active-nutrition/callback":{"post":{"tags":["Admin Integrations"],"summary":"Complete Grail Active Nutrition Connect","operationId":"complete_grail_active_nutrition_connect","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrailOAuthCallbackRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrailConnectionStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/invitations/validate/{token}":{"get":{"tags":["Invitations"],"summary":"Validate Invitation Endpoint","description":"Public endpoint to validate an invitation token (used on signup page).","operationId":"validate_invitation_endpoint","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","description":"Invitation token from URL","title":"Token"},"description":"Invitation token from URL"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationValidateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invitations/accept/{token}":{"post":{"tags":["Invitations"],"summary":"Accept Invitation Endpoint","description":"Accept an invitation after account creation (links new user to invitation).","operationId":"accept_invitation_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","description":"Invitation token","title":"Token"},"description":"Invitation token"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationAcceptRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationAcceptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invitations/{token}/signup":{"post":{"tags":["Invitations"],"summary":"Signup With Invitation Endpoint","description":"Create an account using an invitation token.\n\nEmail is derived from the invitation record (not the request body) to prevent\naccount creation for arbitrary emails. Email is auto-confirmed because the\ninvitation link proves ownership.","operationId":"signup_with_invitation_endpoint","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","description":"Invitation token","title":"Token"},"description":"Invitation token"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationSignupRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationSignupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invitations/pending":{"get":{"tags":["Invitations"],"summary":"Get Pending Invitations Endpoint","description":"Get pending invitations for the authenticated user's email.","operationId":"get_pending_invitations_endpoint","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PendingInvitationItem"},"type":"array","title":"Response Get Pending Invitations Endpoint"}}}}},"security":[{"HTTPBearer":[]}]}},"/invitations/conference-trial":{"post":{"tags":["Invitations"],"summary":"Conference Trial Signup Endpoint","description":"Public conference form for a one-month complimentary app trial.","operationId":"conference_trial_signup_endpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConferenceTrialSignupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConferenceTrialSignupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/education/topics":{"get":{"tags":["Education"],"summary":"List Topics Endpoint","description":"List all published educational topics.","operationId":"list_topics_endpoint","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TopicResponse"},"type":"array","title":"Response List Topics Endpoint"}}}}},"security":[{"HTTPBearer":[]}]}},"/education/topics/by-slug/{slug}":{"get":{"tags":["Education"],"summary":"Get Topic By Slug Endpoint","description":"Get topic by slug.","operationId":"get_topic_by_slug_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/education/topics/{topicId}":{"get":{"tags":["Education"],"summary":"Get Topic Endpoint","description":"Get topic by ID.","operationId":"get_topic_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"topicId","in":"path","required":true,"schema":{"type":"string","title":"Topicid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/education/topics/{topicId}/courses":{"get":{"tags":["Education"],"summary":"Get Courses Endpoint","description":"Get all published courses for a topic.","operationId":"get_courses_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"topicId","in":"path","required":true,"schema":{"type":"string","title":"Topicid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CourseResponse"},"title":"Response Get Courses Endpoint"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/education/courses/{courseId}":{"get":{"tags":["Education"],"summary":"Get Course Endpoint","description":"Get course with all modules.","operationId":"get_course_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"courseId","in":"path","required":true,"schema":{"type":"string","title":"Courseid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/education/podcast/listened":{"get":{"tags":["Education"],"summary":"Get Podcast Listened Endpoint","description":"Get list of podcast episode GUIDs the user has listened to.","operationId":"get_podcast_listened_endpoint","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PodcastListenedResponse"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Education"],"summary":"Mark Podcast Listened Endpoint","description":"Mark a podcast episode as listened to.","operationId":"mark_podcast_listened_endpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkListenedRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/education/modules/{moduleId}/complete":{"post":{"tags":["Education"],"summary":"Complete Module Endpoint","description":"Mark a module as complete for the current user.","operationId":"complete_module_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"moduleId","in":"path","required":true,"schema":{"type":"string","title":"Moduleid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/education/topics/{topicId}/progress":{"get":{"tags":["Education"],"summary":"Get Progress Endpoint","description":"Get user's progress for a topic including course completion and certification status.","operationId":"get_progress_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"topicId","in":"path","required":true,"schema":{"type":"string","title":"Topicid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicProgressResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/education/my-certifications":{"get":{"tags":["Education"],"summary":"Get My Certifications Endpoint","description":"Get all certifications earned by the current user.","operationId":"get_my_certifications_endpoint","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UserCertificationResponse"},"type":"array","title":"Response Get My Certifications Endpoint"}}}}},"security":[{"HTTPBearer":[]}]}},"/education/certifications/{certificationId}/pdf":{"get":{"tags":["Education"],"summary":"Get Certification Pdf Endpoint","description":"Get or generate a PDF certificate for a certification.","operationId":"get_certification_pdf_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"certificationId","in":"path","required":true,"schema":{"type":"string","title":"Certificationid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CertificatePdfResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/education/courses/{courseId}/quiz":{"get":{"tags":["Education"],"summary":"Get Course Quiz Endpoint","description":"Get quiz for a course (answers hidden).","operationId":"get_course_quiz_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"courseId","in":"path","required":true,"schema":{"type":"string","title":"Courseid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/QuizForUserResponse"},{"type":"null"}],"title":"Response Get Course Quiz Endpoint"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/education/quizzes/{quizId}/submit":{"post":{"tags":["Education"],"summary":"Submit Quiz Endpoint","description":"Submit quiz answers and get results. Awards certification if passed.","operationId":"submit_quiz_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"quizId","in":"path","required":true,"schema":{"type":"string","title":"Quizid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuizSubmitRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuizResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/education/topics/{topicId}/forum":{"get":{"tags":["Education"],"summary":"Get Forum Info Endpoint","description":"Get forum info for a topic.","operationId":"get_forum_info_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"topicId","in":"path","required":true,"schema":{"type":"string","title":"Topicid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/education/forums/{forumId}/posts":{"get":{"tags":["Education"],"summary":"List Posts Endpoint","description":"List forum posts sorted by activity.","operationId":"list_posts_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"forumId","in":"path","required":true,"schema":{"type":"string","title":"Forumid"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Results per page","default":20,"title":"Limit"},"description":"Results per page"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pagination cursor (last_activity_at)","title":"Cursor"},"description":"Pagination cursor (last_activity_at)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Education"],"summary":"Create Post Endpoint","description":"Create a new forum post.","operationId":"create_post_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"forumId","in":"path","required":true,"schema":{"type":"string","title":"Forumid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/education/posts/{postId}":{"get":{"tags":["Education"],"summary":"Get Post Endpoint","description":"Get post with all replies.","operationId":"get_post_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"postId","in":"path","required":true,"schema":{"type":"string","title":"Postid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/education/posts/{postId}/replies":{"post":{"tags":["Education"],"summary":"Create Reply Endpoint","description":"Create a reply to a post. Can be nested under another reply.","operationId":"create_reply_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"postId","in":"path","required":true,"schema":{"type":"string","title":"Postid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/education/modules/{moduleId}/video-url":{"get":{"tags":["Education"],"summary":"Get Module Video Url","description":"Get a signed playback URL for a GCS-hosted video module.","operationId":"get_module_video_url","security":[{"HTTPBearer":[]}],"parameters":[{"name":"moduleId","in":"path","required":true,"schema":{"type":"string","title":"Moduleid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile/me":{"get":{"tags":["Profile"],"summary":"Get My Profile","description":"Get the current user's profile.","operationId":"get_my_profile","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResponse"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Profile"],"summary":"Delete My Account","description":"Permanently delete the current user's account and all associated data.\n\nThis is a HARD DELETE that:\n- Cancels any active Stripe subscription\n- Deletes the user from auth.users (cascades to all related data)\n\nThis action is irreversible - all user data will be permanently removed.","operationId":"delete_my_account","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Profile"],"summary":"Update My Profile","description":"Update the current user's profile. Empty body returns current profile.","operationId":"update_my_profile","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UserProfileUpdate"},{"type":"null"}],"title":"Profile"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/profile/preferences":{"get":{"tags":["Profile"],"summary":"Get My Preferences","description":"Get the user's preferences.","operationId":"get_my_preferences","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferencesResponse"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["Profile"],"summary":"Update My Preferences","description":"Update the user's preferences.","operationId":"update_my_preferences","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferencesUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferencesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/profile/weight-summary":{"get":{"tags":["Profile"],"summary":"Get My Weight Summary","description":"Get the current weight summary for the profile page.","operationId":"get_my_weight_summary","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeightSummaryResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/profile/weights":{"get":{"tags":["Profile"],"summary":"Get My Weights","description":"Get all weight entries for the current user.","operationId":"get_my_weights","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WeightResponse"},"type":"array","title":"Response Get My Weights"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Profile"],"summary":"Create Weight","description":"Create a new weight entry.","operationId":"create_weight","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeightCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/profile/weights/{entry_id}":{"patch":{"tags":["Profile"],"summary":"Update Weight","description":"Update a weight entry by ID.","operationId":"update_weight","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeightUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Profile"],"summary":"Delete Weight","description":"Delete a weight entry by ID.","operationId":"delete_weight","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile/medications":{"get":{"tags":["Profile"],"summary":"Get My Medications","description":"Get all medication entries for the current user.","operationId":"get_my_medications","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MedicationResponse"},"type":"array","title":"Response Get My Medications"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Profile"],"summary":"Create Medication","description":"Create a new medication entry.","operationId":"create_medication","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MedicationCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MedicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/profile/medications/{entry_id}":{"patch":{"tags":["Profile"],"summary":"Update Medication","description":"Update a medication entry by ID.","operationId":"update_medication","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MedicationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MedicationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Profile"],"summary":"Delete Medication","description":"Delete a medication entry by ID.","operationId":"delete_medication","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile/exercises":{"get":{"tags":["Profile"],"summary":"Get Exercises","description":"Get all exercise entries, sorted chronologically.","operationId":"get_exercises","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ExerciseResponse"},"type":"array","title":"Response Get Exercises"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Profile"],"summary":"Create Exercise","description":"Create a new exercise entry.","operationId":"create_exercise","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExerciseCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExerciseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/profile/exercises/{entry_id}":{"patch":{"tags":["Profile"],"summary":"Update Exercise","description":"Update an exercise entry by ID.","operationId":"update_exercise","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExerciseUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExerciseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Profile"],"summary":"Delete Exercise","description":"Delete an exercise entry by ID.","operationId":"delete_exercise","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profile/tracked-medications":{"get":{"tags":["Profile"],"summary":"Get Tracked Medications","description":"Get the list of tracked GLP-1 medications from app settings.","operationId":"get_tracked_medications","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/profile/about-me":{"get":{"tags":["Profile"],"summary":"Get About Me","description":"Get AI-generated summary of the user's patient knowledge graph.","operationId":"get_about_me","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AboutMeResponse"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Profile"],"summary":"Clear About Me Endpoint","description":"Erase the user's patient knowledge graph (About Me data).","operationId":"clear_about_me_endpoint","responses":{"204":{"description":"Successful Response"}},"security":[{"HTTPBearer":[]}]}},"/profile/about-me/update":{"post":{"tags":["Profile"],"summary":"Update About Me Endpoint","description":"Update patient knowledge graph based on free-text correction.","operationId":"update_about_me_endpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AboutMeUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AboutMeUpdateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/privacy/ai-consent":{"get":{"tags":["Privacy"],"summary":"Read Ai Consent","operationId":"read_ai_consent","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIConsentResponse"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["Privacy"],"summary":"Update Ai Consent","operationId":"update_ai_consent","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIConsentUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIConsentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/me/email-preferences":{"get":{"tags":["Email Preferences"],"summary":"Read Email Preferences","operationId":"read_email_preferences","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailPreferencesResponse"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["Email Preferences"],"summary":"Write Email Preferences","operationId":"write_email_preferences","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailPreferencesUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailPreferencesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/email/unsubscribe":{"get":{"tags":["Email Preferences"],"summary":"Unsubscribe Page","operationId":"unsubscribe_page","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":512,"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Email Preferences"],"summary":"Unsubscribe","description":"Form button and RFC 8058 one-click (List-Unsubscribe=One-Click body) both land here.","operationId":"unsubscribe","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":512,"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/plans":{"get":{"tags":["Plans"],"summary":"List Plans","description":"List plans for the current user. Excludes archived by default.","operationId":"list_plans","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PlanListResponse"},"title":"Response List Plans"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Plans"],"summary":"Create Plan","description":"Create a plan with optional items.","operationId":"create_plan","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/plans/actionable-items":{"get":{"tags":["Plans"],"summary":"Get Actionable Items","description":"Get incomplete items across all active plans.","operationId":"get_actionable_items","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PlanItemResponse"},"type":"array","title":"Response Get Actionable Items"}}}}},"security":[{"HTTPBearer":[]}]}},"/plans/reminders":{"get":{"tags":["Plans"],"summary":"Get Reminders Hub","description":"Get all active reminders across plans with context (reminders hub).","operationId":"get_reminders_hub","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ReminderHubItem"},"type":"array","title":"Response Get Reminders Hub"}}}}},"security":[{"HTTPBearer":[]}]}},"/plans/items/{item_id}/complete-from-notification":{"post":{"tags":["Plans"],"summary":"Complete From Notification","description":"Mark a plan item as completed for today via push notification action.","operationId":"complete_from_notification","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/plans/shared/{share_token}":{"get":{"tags":["Plans"],"summary":"Get Shared Plan Preview","description":"Get a lightweight preview of a shared plan (no auth required).","operationId":"get_shared_plan_preview","parameters":[{"name":"share_token","in":"path","required":true,"schema":{"type":"string","title":"Share Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharedPlanPreview"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/plans/claim/{share_token}":{"post":{"tags":["Plans"],"summary":"Claim Shared Plan","description":"Claim a shared plan via its single-use token.","operationId":"claim_shared_plan","security":[{"HTTPBearer":[]}],"parameters":[{"name":"share_token","in":"path","required":true,"schema":{"type":"string","title":"Share Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimPlanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/plans/{plan_id}":{"get":{"tags":["Plans"],"summary":"Get Plan","description":"Get a single plan with all items.","operationId":"get_plan","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","title":"Plan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Plans"],"summary":"Update Plan","description":"Update plan fields.","operationId":"update_plan","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","title":"Plan Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Plans"],"summary":"Archive Plan","description":"Archive a plan (soft delete).","operationId":"archive_plan","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","title":"Plan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/plans/{plan_id}/modify/stream":{"post":{"tags":["Plans"],"summary":"Modify Plan Stream","description":"Stream AI-powered plan modifications based on natural language instruction.","operationId":"modify_plan_stream","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","title":"Plan Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanModifyStreamRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/plans/{plan_id}/share":{"post":{"tags":["Plans"],"summary":"Share Plan","description":"Generate a single-use share link for a plan.","operationId":"share_plan","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","title":"Plan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharePlanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/plans/{plan_id}/items":{"post":{"tags":["Plans"],"summary":"Add Plan Item","description":"Add an item to an existing plan.","operationId":"add_plan_item","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","title":"Plan Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanItemCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/plans/{plan_id}/items/{item_id}":{"patch":{"tags":["Plans"],"summary":"Update Plan Item","description":"Update an item's fields.","operationId":"update_plan_item","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","title":"Plan Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanItemUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Plans"],"summary":"Delete Plan Item","description":"Delete a plan item.","operationId":"delete_plan_item","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","title":"Plan Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/plans/{plan_id}/items/{item_id}/toggle":{"post":{"tags":["Plans"],"summary":"Toggle Item","description":"Toggle an item's completion status.","operationId":"toggle_item","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","title":"Plan Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToggleBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/plans/{plan_id}/items/{item_id}/reminder":{"put":{"tags":["Plans"],"summary":"Set Reminder","description":"Create or update the accountability reminder for a plan item.","operationId":"set_reminder","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","title":"Plan Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReminderConfigCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReminderConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Plans"],"summary":"Get Reminder","description":"Get the reminder config for a plan item.","operationId":"get_reminder","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","title":"Plan Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReminderConfigResponse"},{"type":"null"}],"title":"Response Get Reminder"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Plans"],"summary":"Remove Reminder","description":"Delete the reminder for a plan item.","operationId":"remove_reminder","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","title":"Plan Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/plans/{plan_id}/items/{item_id}/completions":{"post":{"tags":["Plans"],"summary":"Record Item Completion","description":"Record today's completion for a recurring plan item.","operationId":"record_item_completion","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","title":"Plan Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompletionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Plans"],"summary":"Get Item Completions","description":"Get completion history and current streak for a plan item.","operationId":"get_item_completions","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","title":"Plan Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompletionHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/plans/{plan_id}/items/{item_id}/completions/{completion_date}":{"delete":{"tags":["Plans"],"summary":"Remove Item Completion","description":"Remove a daily completion (un-complete).","operationId":"remove_item_completion","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","title":"Plan Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"completion_date","in":"path","required":true,"schema":{"type":"string","format":"date","title":"Completion Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accountability/{plan_item_id}/context":{"get":{"tags":["Accountability"],"summary":"Get Context","description":"Get accountability item context for the message page header.","operationId":"get_context","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_item_id","in":"path","required":true,"schema":{"type":"string","title":"Plan Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accountability/{plan_item_id}/coach-message":{"post":{"tags":["Accountability"],"summary":"Stream Coach Message","description":"Stream a motivational message from the user's selected accountability coach.","operationId":"stream_coach_message","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_item_id","in":"path","required":true,"schema":{"type":"string","title":"Plan Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/resources":{"get":{"tags":["Resources"],"summary":"List Resources","description":"List RAG-indexed educational content, optionally filtered by content_type.","operationId":"list_resources","security":[{"HTTPBearer":[]}],"parameters":[{"name":"content_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ResourceListItem"},"title":"Response List Resources"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/resources/{resource_id}":{"get":{"tags":["Resources"],"summary":"Get Resource","description":"Get a single resource. Premium content URL is gated by entitlement.","operationId":"get_resource","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":{"$ref":"#/components/schemas/ResourceDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/schedule/today":{"get":{"tags":["Schedule"],"summary":"Get Schedule Today","description":"Get today's schedule with groups and office hours.\n\nReturns upcoming group sessions and office hours organized by day.\nThe timezone parameter controls date bucketing and day labels so they\nmatch the caller's local calendar.","operationId":"get_schedule_today","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days_ahead","in":"query","required":false,"schema":{"type":"integer","default":9,"title":"Days Ahead"}},{"name":"days_behind","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Days Behind"}},{"name":"timezone","in":"query","required":false,"schema":{"type":"string","default":"America/Phoenix","title":"Timezone"}},{"name":"provider_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Provider Id"}},{"name":"instructor_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Instructor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TodaySchedule"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/schedule/team":{"get":{"tags":["Schedule"],"summary":"List Team Members","description":"Get unified list of staff members (providers + instructors).","operationId":"list_team_members","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamListResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/schedule/groups":{"get":{"tags":["Schedule"],"summary":"List Group Sessions","description":"List upcoming group sessions.\n\nArgs:\n    limit: Maximum number of results (default 20)\n    include_past: Include past sessions (default False)","operationId":"list_group_sessions","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"include_past","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Past"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/schedule/groups/{session_id}":{"get":{"tags":["Schedule"],"summary":"Get Group Session Detail","description":"Get details for a specific group session.","operationId":"get_group_session_detail","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupSession"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/schedule/groups/{session_id}/register":{"post":{"tags":["Schedule"],"summary":"Register For Group","description":"Register for a group session.\n\nUsers can register for upcoming sessions to reserve their spot.","operationId":"register_for_group","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Schedule"],"summary":"Cancel Group Registration","description":"Cancel registration for a group session.","operationId":"cancel_group_registration","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/schedule/groups/{session_id}/join":{"post":{"tags":["Schedule"],"summary":"Join Group Session","description":"Join a group session video call.\n\nCreates a video room if needed and returns join token.\nSession must be live or starting soon.","operationId":"join_group_session","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/schedule/groups/{session_id}/leave":{"post":{"tags":["Schedule"],"summary":"Leave Group Session","description":"Leave a group session video call.","operationId":"leave_group_session","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/schedule/groups/{session_id}/start":{"post":{"tags":["Schedule"],"summary":"Start Group Session","description":"Start a group session (instructor only).\n\nCreates a video room and sets session to live.\nIdempotent - if already live, returns existing credentials.","operationId":"start_group_session","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/schedule/groups/{session_id}/end":{"post":{"tags":["Schedule"],"summary":"End Group Session","description":"End a group session (instructor only). Disconnects all participants.","operationId":"end_group_session","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/schedule/instructor/sessions":{"get":{"tags":["Schedule"],"summary":"List Instructor Sessions","description":"List upcoming sessions where the current user is the instructor.","operationId":"list_instructor_sessions","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupListResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/schedule/groups/{session_id}/participants":{"get":{"tags":["Schedule"],"summary":"List Session Participants","description":"Get current participants in a live session (instructor only).","operationId":"list_session_participants","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionParticipants"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/schedule/groups/{session_id}/eject/{user_id}":{"post":{"tags":["Schedule"],"summary":"Eject Participant","description":"Eject a participant from a live session (instructor only).\n\nQuery param ?block=true to also prevent them from rejoining.","operationId":"eject_participant","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"block","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Block"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/schedule/office-hours":{"get":{"tags":["Schedule"],"summary":"List Office Hours","description":"List all providers with office hours.\n\nReturns providers with their schedule, queue status, and availability.","operationId":"list_office_hours","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routers__schedule_router__ProviderListResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/schedule/office-hours/{provider_id}":{"get":{"tags":["Schedule"],"summary":"Get Provider Office Hours Endpoint","description":"Get detailed office hours info for a specific provider.","operationId":"get_provider_office_hours_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"integer","title":"Provider Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderWithOfficeHours"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/schedule/office-hours/{provider_id}/queue/leave":{"delete":{"tags":["Schedule"],"summary":"Leave Office Hours Queue","description":"Cancel the user's active appointment for a provider.","operationId":"leave_office_hours_queue","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"integer","title":"Provider Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveQueueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/schedule/office-hours/{provider_id}/queue/status":{"get":{"tags":["Schedule"],"summary":"Get Queue Status","description":"Get current appointment status for the user.\n\nReturns appointment position, estimated wait time, and queue length.\nPoll this endpoint every 30 seconds for updates.","operationId":"get_queue_status","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"integer","title":"Provider Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/schedule/office-hours/{provider_id}/queue/checkin":{"post":{"tags":["Schedule"],"summary":"Checkin Queue","description":"Patient signals they are on the queue screen and ready.","operationId":"checkin_queue","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"integer","title":"Provider Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/schedule/office-hours/{provider_id}/queue/report-no-show":{"post":{"tags":["Schedule"],"summary":"Report No Show","description":"Report that the patient hasn't joined the video call within the grace period.\n\nFires a webhook to notify the provider. Does NOT change queue status —\nthe patient can still join after this fires.","operationId":"report_no_show","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"integer","title":"Provider Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/schedule/office-hours/{provider_id}/queue/ready":{"post":{"tags":["Schedule"],"summary":"Get Ready Session","description":"Get video session details when it's the user's turn.\n\nCalled after receiving \"your turn\" push notification.\nReturns room URL and token if user is in_session status.","operationId":"get_ready_session","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"integer","title":"Provider Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/schedule/office-hours/{provider_id}/queue/end-session":{"post":{"tags":["Schedule"],"summary":"End Office Hours Session","description":"End the current 1:1 session.\n\nCalled when user leaves the video call.\nAutomatically advances to the next person in queue.","operationId":"end_office_hours_session","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"integer","title":"Provider Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveQueueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/schedule/office-hours/{provider_id}/queue/confirm":{"post":{"tags":["Schedule"],"summary":"Confirm Advance Booking","description":"Confirm an advance booking appointment.\n\nAdvance bookings require confirmation before the appointment time.\nUnconfirmed bookings are auto-cancelled 10 minutes before the scheduled time.","operationId":"confirm_advance_booking","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"integer","title":"Provider Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/schedule/office-hours/{provider_id}/queue/advance-join":{"post":{"tags":["Schedule"],"summary":"Advance Join Queue","description":"Join the queue with an advance booking at a specific time.\n\nThe requested time must be within the provider's office hours and\nwithin their advance_queue_window_hours (default 48h).","operationId":"advance_join_queue","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"integer","title":"Provider Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvanceJoinQueueRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueJoinResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/schedule/office-hours/{provider_id}/queue/defer":{"post":{"tags":["Schedule"],"summary":"Defer Queue Turn","description":"Defer/snooze your turn to a later time within office hours.\n\nOnly available when your status is 'notified' (it's your turn).\nThe provider immediately moves to the next patient.","operationId":"defer_queue_turn","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"integer","title":"Provider Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeferTurnRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/schedule/office-hours/{provider_id}/queue/accept-early":{"post":{"tags":["Schedule"],"summary":"Accept Early Offer","description":"Accept an early availability offer from the provider.\n\nWhen the provider is idle and your advance booking is next but not yet due,\nyou'll get a push notification offering an earlier slot. This endpoint accepts it.","operationId":"accept_early_offer","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"integer","title":"Provider Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/schedule/office-hours/{provider_id}/advance-availability":{"get":{"tags":["Schedule"],"summary":"Get Advance Availability","description":"Check available advance booking slots for a provider on a given date.\n\nReturns office hours slots with total, booked, and available capacity.","operationId":"get_advance_availability","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"integer","title":"Provider Id"}},{"name":"target_date","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Date to check availability for (YYYY-MM-DD)","title":"Target Date"},"description":"Date to check availability for (YYYY-MM-DD)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvanceAvailabilityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/schedule/my-schedule":{"get":{"tags":["Schedule"],"summary":"Get My Schedule","description":"Get user's upcoming registrations and queue entries.\n\nReturns group sessions they're registered for and any active queue entries.","operationId":"get_my_schedule","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MyRegistrationsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/sage/chat":{"post":{"tags":["Sage"],"summary":"Sage Chat","description":"Send a message to Sage and receive a response.\n\n- Starts a new conversation if conversation_id is not provided\n- Continues existing conversation if conversation_id is provided\n- Returns sources from the knowledge base when relevant","operationId":"sage_chat","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SageChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SageChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/sage/chat/stream":{"post":{"tags":["Sage"],"summary":"Sage Chat Stream","description":"Stream a message response from Sage using Server-Sent Events (SSE).\n\nSSE Events emitted:\n- `text_delta`: Streaming text content chunks {\"content\": \"...\"}\n- `sources`: Clickable source references {\"sources\": [...]}\n- `data`: Data completeness info {\"completeness_percent\": 80.0, \"missing_fields\": [...]}\n- `done`: Completion signal {\"conversation_id\": \"...\", \"topic\": \"...\"}\n- `error`: Error information {\"message\": \"...\"}\n\nThe stream ends after the `done` or `error` event.","operationId":"sage_chat_stream","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SageStreamRequest"}}},"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":[]}]}},"/sage/clarification/submit":{"post":{"tags":["Sage"],"summary":"Submit Clarification","description":"Submit answers from the clarification wizard.\n\nAfter the frontend receives a `clarification` SSE event, it presents the\nwizard UI to the user. Once the user completes all questions and submits,\nthis endpoint is called with the answers.\n\nFlow:\n1. Store answers using append-with-timestamp strategy\n2. Exit clarification mode for the conversation\n3. Return success with count of fields updated\n\nAfter this call, the frontend should resume the chat by sending the\noriginal message again (or a follow-up) to get the topic agent response.","operationId":"submit_clarification","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClarificationSubmission"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClarificationSubmissionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/sage/clarification/submit/stream":{"post":{"tags":["Sage"],"summary":"Submit Clarification And Stream","description":"Submit clarification answers and stream the Sage agent response.\n\nThis is a convenience endpoint that combines:\n1. Submit clarification answers (save to patient knowledge graph)\n2. Exit clarification mode\n3. Stream the single agent response with updated user context\n\nUse this instead of calling submit + chat/stream separately.","operationId":"submit_clarification_and_stream","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClarificationSubmission"}}},"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":[]}]}},"/sage/clarification/dismiss":{"post":{"tags":["Sage"],"summary":"Dismiss Clarification","description":"Dismiss the clarification wizard without submitting answers.\n\nThis clears the awaiting_clarification state on the backend,\nsyncing with the mobile app's local dismissal.","operationId":"dismiss_clarification","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"query","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sage/conversations":{"get":{"tags":["Sage"],"summary":"List Conversations","description":"Get list of user's conversations with Sage.\n\nReturns conversation summaries with previews.","operationId":"list_conversations","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SageConversationSummary"},"title":"Response List Conversations"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sage/conversations/{conversation_id}":{"get":{"tags":["Sage"],"summary":"Get Conversation","description":"Get a specific conversation with all messages.","operationId":"get_conversation","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SageConversation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Sage"],"summary":"Delete Conversation","description":"Delete a conversation and all its messages.","operationId":"delete_conversation","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sage/search":{"post":{"tags":["Sage"],"summary":"Search Knowledge Base","description":"Search the sage_rag_content knowledge base using hybrid search.\n\nReturns relevant content chunks with similarity scores.","operationId":"search_knowledge_base","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SageSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SageSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/sage/admin/process-content":{"post":{"tags":["Sage"],"summary":"Process Content","description":"Process educational content through ragproc to create RAG chunks.\n\nAdmin only. Processes content and stores embeddings for Sage to use.","operationId":"process_content","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentProcessRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentProcessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/sage/admin/rag/process-all":{"post":{"tags":["Sage"],"summary":"Process All Unprocessed","description":"Process all unprocessed educational content through ragproc.\n\nAdmin only. Batch processes content without RAG embeddings.","operationId":"process_all_unprocessed","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sage/admin/rag/queue/process":{"post":{"tags":["Sage"],"summary":"Process Rag Queue","description":"Process pending RAG jobs from unified background queue.\n\nAdmin only. Handles items queued by database trigger.","operationId":"process_rag_queue","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sage/admin/rag/queue/status":{"get":{"tags":["Sage"],"summary":"Get Rag Queue Status","description":"Get RAG processing queue statistics from unified background jobs.\n\nAdmin only. Shows pending, processing, and failed counts.","operationId":"get_rag_queue_status","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/sage/admin/rag/index/rebuild-bm25":{"post":{"tags":["Sage"],"summary":"Rebuild Bm25 Index","description":"Force rebuild the BM25 search index.\n\nAdmin only. Rebuilds in-memory BM25 index from all chunks.","operationId":"rebuild_bm25_index","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/sage/admin/rag/youtube/ingest":{"post":{"tags":["Sage"],"summary":"Ingest Youtube Channel","description":"Ingest new videos from YouTube channel.\n\nAdmin only. Fetches new videos, gets transcripts, and creates records.","operationId":"ingest_youtube_channel","security":[{"HTTPBearer":[]}],"parameters":[{"name":"channel_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sage/admin/rag/search/hybrid":{"post":{"tags":["Sage"],"summary":"Test Hybrid Search","description":"Test hybrid search with debug information.\n\nAdmin only. Returns search results with vector, BM25, and RRF fusion scores.","operationId":"test_hybrid_search","security":[{"HTTPBearer":[]}],"parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","title":"Query"}},{"name":"top_k","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Top K"}},{"name":"content_type_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sage/context":{"get":{"tags":["Sage"],"summary":"Get User Context","description":"Get the user's stored conversation context.\n\nThis shows the AI-compacted summary from previous conversations,\nwhich is used to provide personalized responses.","operationId":"get_user_context","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserContextResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/sage/conversations/{conversation_id}/stats":{"get":{"tags":["Sage"],"summary":"Get Conversation Stats","description":"Get token count and compaction status for a conversation.\n\nUseful for understanding conversation size and whether\ncompaction will be triggered soon.","operationId":"get_conversation_stats","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sage/conversations/{conversation_id}/compact":{"post":{"tags":["Sage"],"summary":"Compact Conversation","description":"Manually trigger compaction for a conversation.\n\nThis queues a background job to summarize older messages and archive them,\nkeeping only recent messages in the active conversation. The summary is stored\nin user_context for future personalization.\n\nReturns immediately with job status. Check conversation status to see when complete.","operationId":"compact_conversation","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompactionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sage/admin/rag-chat":{"post":{"tags":["Sage"],"summary":"Rag Chat Endpoint","description":"RAG-augmented chat for testing the knowledge base. Staff and above.","operationId":"rag_chat_endpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RagChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RagChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/settings/{key}":{"get":{"tags":["App Settings","app-settings"],"summary":"Get Public Setting Endpoint","description":"Get a single setting value (admin only).","operationId":"get_public_setting_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicSettingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sage/welcome-message":{"get":{"tags":["App Settings","app-settings"],"summary":"Get Sage Welcome Message Endpoint","description":"Get the Sage welcome message for new conversations.","operationId":"get_sage_welcome_message_endpoint","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/settings":{"get":{"tags":["App Settings","app-settings"],"summary":"List Settings Endpoint","description":"List all app settings (admin only).","operationId":"list_settings_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"include_inactive","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Inactive"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppSettingListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["App Settings","app-settings"],"summary":"Create Setting Endpoint","description":"Create a new app setting (admin only).","operationId":"create_setting_endpoint","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppSettingCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppSettingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/settings/model-options":{"get":{"tags":["App Settings","app-settings"],"summary":"Get Model Setting Options Endpoint","description":"AI model setting keys and the model choices allowed for each (admin only).","operationId":"get_model_setting_options_endpoint","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelSettingOptionsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/settings/{key}":{"get":{"tags":["App Settings","app-settings"],"summary":"Get Setting Endpoint","description":"Get a single setting by key (admin only).","operationId":"get_setting_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppSettingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["App Settings","app-settings"],"summary":"Update Setting Endpoint","description":"Update an app setting (admin only).","operationId":"update_setting_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppSettingUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppSettingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["App Settings","app-settings"],"summary":"Delete Setting Endpoint","description":"Soft delete (deactivate) an app setting (admin only).","operationId":"delete_setting_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/settings/{key}/history":{"get":{"tags":["App Settings","app-settings"],"summary":"Get Setting History Endpoint","description":"Get the change history for a setting (admin only).","operationId":"get_setting_history_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/support-tickets":{"post":{"tags":["Support Tickets"],"summary":"Create Support Ticket","description":"Create a support ticket (authenticated users).","operationId":"create_support_ticket","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTicketRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTicketResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/support-tickets":{"get":{"tags":["Admin - Support Tickets"],"summary":"List Support Tickets","description":"List support tickets (Admin & Staff).","operationId":"list_support_tickets","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status (open/resolved)","title":"Status"},"description":"Filter by status (open/resolved)"},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search subject, email, or name","title":"Q"},"description":"Search subject, email, or name"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/support-tickets/{ticketId}":{"get":{"tags":["Admin - Support Tickets"],"summary":"Get Support Ticket","description":"Get support ticket detail with replies (Admin & Staff).","operationId":"get_support_ticket","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ticketId","in":"path","required":true,"schema":{"type":"string","title":"Ticketid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Admin - Support Tickets"],"summary":"Update Support Ticket","description":"Update support ticket status (Admin & Staff).","operationId":"update_support_ticket","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ticketId","in":"path","required":true,"schema":{"type":"string","title":"Ticketid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTicketRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/support-tickets/{ticketId}/reply":{"post":{"tags":["Admin - Support Tickets"],"summary":"Reply To Support Ticket","description":"Reply to a support ticket (Admin & Staff). Sends email notification to user.","operationId":"reply_to_support_ticket","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ticketId","in":"path","required":true,"schema":{"type":"string","title":"Ticketid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyToTicketRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketReply"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/affiliates/by-code/{code}":{"get":{"tags":["Admin - Affiliates"],"summary":"Get Affiliate By Code Endpoint","description":"Public: look up affiliate by promotion code for the referral landing page.","operationId":"get_affiliate_by_code_endpoint","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliatePublicInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/affiliates/my-dashboard":{"get":{"tags":["Admin - Affiliates"],"summary":"Get My Dashboard","description":"Affiliate's own dashboard with earnings, payments, and referred subscribers.","operationId":"get_my_dashboard","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateDashboard"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/affiliates/my-codes":{"get":{"tags":["Admin - Affiliates"],"summary":"List My Codes Endpoint","description":"Self-service: list an affiliate's own active codes.","operationId":"list_my_codes_endpoint","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateCodesResponse"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Admin - Affiliates"],"summary":"Add My Code Endpoint","description":"Self-service: add a new promotion code (max 5 active).","operationId":"add_my_code_endpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddCodeRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateCode"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/affiliates/my-codes/{code_id}":{"delete":{"tags":["Admin - Affiliates"],"summary":"Delete My Code Endpoint","description":"Self-service: delete (deactivate) one of the affiliate's own codes.","operationId":"delete_my_code_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"code_id","in":"path","required":true,"schema":{"type":"integer","title":"Code Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/affiliates":{"get":{"tags":["Admin - Affiliates"],"summary":"List Affiliates Endpoint","description":"List all affiliates.","operationId":"list_affiliates_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Query"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/affiliates/{affiliate_id}/dashboard":{"get":{"tags":["Admin - Affiliates"],"summary":"Get Affiliate Dashboard Admin","description":"Admin: view any affiliate's dashboard.","operationId":"get_affiliate_dashboard_admin","security":[{"HTTPBearer":[]}],"parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"integer","title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateDashboard"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/affiliates/{affiliate_id}":{"get":{"tags":["Admin - Affiliates"],"summary":"Get Affiliate Endpoint","description":"Get affiliate detail.","operationId":"get_affiliate_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"integer","title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/affiliates/{affiliate_id}/settings":{"patch":{"tags":["Admin - Affiliates"],"summary":"Update Affiliate Settings Endpoint","description":"Update affiliate settings (discount %, revenue share %, name, notes).","operationId":"update_affiliate_settings_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"integer","title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAffiliateSettingsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/affiliates/{affiliate_id}/codes":{"get":{"tags":["Admin - Affiliates"],"summary":"List Codes Endpoint","description":"Admin: list all active codes for an affiliate.","operationId":"list_codes_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"integer","title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateCodesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin - Affiliates"],"summary":"Add Code Endpoint","description":"Admin: add a new promotion code for an affiliate (max 5 active).","operationId":"add_code_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"integer","title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddCodeRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateCode"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/affiliates/{affiliate_id}/codes/{code_id}":{"delete":{"tags":["Admin - Affiliates"],"summary":"Delete Code Endpoint","description":"Admin: delete (deactivate) a promotion code.\n\nPast attributions are preserved via affiliate_subscriptions rows.\nFuture signups with this code will not be attributed or discounted.","operationId":"delete_code_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"integer","title":"Affiliate Id"}},{"name":"code_id","in":"path","required":true,"schema":{"type":"integer","title":"Code Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/affiliates/{affiliate_id}/subscriptions":{"get":{"tags":["Admin - Affiliates"],"summary":"Get Affiliate Subscriptions Endpoint","description":"List subscriptions referred by this affiliate.","operationId":"get_affiliate_subscriptions_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"integer","title":"Affiliate Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliateSubscriptionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/affiliates/{affiliate_id}/earnings":{"get":{"tags":["Admin - Affiliates"],"summary":"Get Affiliate Earnings Endpoint","description":"List monthly earnings for an affiliate.","operationId":"get_affiliate_earnings_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"integer","title":"Affiliate Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":60,"minimum":1,"default":24,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AffiliateEarning"},"title":"Response Get Affiliate Earnings Endpoint"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/affiliates/{affiliate_id}/payments":{"get":{"tags":["Admin - Affiliates"],"summary":"Get Affiliate Payments Endpoint","description":"List payments made to an affiliate.","operationId":"get_affiliate_payments_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"integer","title":"Affiliate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AffiliatePayment"},"title":"Response Get Affiliate Payments Endpoint"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin - Affiliates"],"summary":"Record Payment Endpoint","description":"Record a manual payment to an affiliate.","operationId":"record_payment_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"affiliate_id","in":"path","required":true,"schema":{"type":"integer","title":"Affiliate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordPaymentRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AffiliatePayment"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/affiliates/aggregate-earnings":{"post":{"tags":["Admin - Affiliates"],"summary":"Aggregate Earnings Endpoint","description":"Manually trigger earnings aggregation for a given month.","operationId":"aggregate_earnings_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"year","in":"query","required":true,"schema":{"type":"integer","title":"Year"}},{"name":"month","in":"query","required":true,"schema":{"type":"integer","maximum":12,"minimum":1,"title":"Month"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Aggregate Earnings Endpoint"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/observability/ai-logs":{"get":{"tags":["Admin Observability","admin-observability"],"summary":"List Ai Logs","description":"List AI generation logs with filtering.","operationId":"list_ai_logs","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Type"}},{"name":"agent_type_contains","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter agent_type by 'contains'","title":"Agent Type Contains"},"description":"Filter agent_type by 'contains'"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["success","failed","in_progress"],"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"topic","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic"}},{"name":"flagged","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Flagged"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":7,"title":"Days"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"include_stats","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Stats"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__admin_observability_schemas__AILogListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/observability/ai-logs/statistics":{"get":{"tags":["Admin Observability","admin-observability"],"summary":"Get Ai Log Statistics","description":"Get aggregated statistics for AI logs.","operationId":"get_ai_log_statistics","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":7,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AILogStatistics"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/observability/ai-logs/{log_id}":{"get":{"tags":["Admin Observability","admin-observability"],"summary":"Get Ai Log Detail","description":"Get full details of an AI log entry.","operationId":"get_ai_log_detail","security":[{"HTTPBearer":[]}],"parameters":[{"name":"log_id","in":"path","required":true,"schema":{"type":"string","title":"Log Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AILogDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/observability/ai-logs/{log_id}/flag":{"patch":{"tags":["Admin Observability","admin-observability"],"summary":"Toggle Ai Log Flag","description":"Toggle the flagged status of an AI log entry.","operationId":"toggle_ai_log_flag","security":[{"HTTPBearer":[]}],"parameters":[{"name":"log_id","in":"path","required":true,"schema":{"type":"string","title":"Log Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlagRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AILogDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/observability/ai-logs/{log_id}/replay":{"post":{"tags":["Admin Observability","admin-observability"],"summary":"Replay Ai Log","description":"Replay an AI log with optionally modified prompts.","operationId":"replay_ai_log","security":[{"HTTPBearer":[]}],"parameters":[{"name":"log_id","in":"path","required":true,"schema":{"type":"string","title":"Log Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplayRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplayResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/observability/error-logs":{"get":{"tags":["Admin Observability","admin-observability"],"summary":"List Error Logs","description":"List error logs with filtering.","operationId":"list_error_logs","security":[{"HTTPBearer":[]}],"parameters":[{"name":"severity","in":"query","required":false,"schema":{"anyOf":[{"enum":["critical","error","warning"],"type":"string"},{"type":"null"}],"title":"Severity"}},{"name":"error_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Type"}},{"name":"resolved","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolved"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":30,"title":"Days"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorLogListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin Observability","admin-observability"],"summary":"Create Error Log","description":"Create a new error log entry.","operationId":"create_error_log","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorLogCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorLogSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/observability/error-logs/{log_id}":{"get":{"tags":["Admin Observability","admin-observability"],"summary":"Get Error Log Detail","description":"Get full details of an error log.","operationId":"get_error_log_detail","security":[{"HTTPBearer":[]}],"parameters":[{"name":"log_id","in":"path","required":true,"schema":{"type":"string","title":"Log Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorLogDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/observability/error-logs/{log_id}/resolve":{"patch":{"tags":["Admin Observability","admin-observability"],"summary":"Resolve Error Log","description":"Mark an error log as resolved.","operationId":"resolve_error_log","security":[{"HTTPBearer":[]}],"parameters":[{"name":"log_id","in":"path","required":true,"schema":{"type":"string","title":"Log Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorLogResolve"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorLogDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/observability/performance":{"get":{"tags":["Admin Observability","admin-observability"],"summary":"Get Performance Overview","description":"Get performance overview with top errors and slow traces.","operationId":"get_performance_overview","security":[{"HTTPBearer":[]}],"parameters":[{"name":"time_range","in":"query","required":false,"schema":{"enum":["1h","24h","7d","30d"],"type":"string","default":"24h","title":"Time Range"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceOverview"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/observability/performance/diagnostics":{"get":{"tags":["Admin Observability","admin-observability"],"summary":"Get Performance Diagnostics","description":"Get performance monitoring configuration status.","operationId":"get_performance_diagnostics","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceDiagnostics"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/observability/performance/ai-prompt/error/{issue_id}":{"get":{"tags":["Admin Observability","admin-observability"],"summary":"Generate Error Repair Prompt","description":"Generate an AI prompt for fixing a Sentry error.","operationId":"generate_error_repair_prompt","security":[{"HTTPBearer":[]}],"parameters":[{"name":"issue_id","in":"path","required":true,"schema":{"type":"string","title":"Issue Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIRepairPrompt"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/observability/performance/ai-prompt/trace/{trace_id}":{"get":{"tags":["Admin Observability","admin-observability"],"summary":"Generate Trace Optimization Prompt","description":"Generate an AI prompt for optimizing a slow trace.","operationId":"generate_trace_optimization_prompt","security":[{"HTTPBearer":[]}],"parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"time_range","in":"query","required":false,"schema":{"enum":["1h","6h","24h"],"type":"string","default":"1h","title":"Time Range"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIRepairPrompt"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cron/ingest-youtube":{"post":{"tags":["Cron"],"summary":"Ingest Youtube Videos","description":"Ingest new YouTube videos from the configured channel.\n\nFetches new videos via RSS, gets transcripts, and queues for RAG processing.\nCall this endpoint daily via Cloud Scheduler.\n\nReturns:\n    Dict with ingestion summary","operationId":"ingest_youtube_videos","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Ingest Youtube Videos"}}}}},"security":[{"HTTPBearer":[]}]}},"/cron/schedule-youtube-ingestion":{"post":{"tags":["Cron"],"summary":"Schedule Youtube Ingestion","description":"Queue the weekly YouTube ingestion job from Cloud Scheduler.","operationId":"schedule_youtube_ingestion","parameters":[{"name":"X-Cron-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Cron-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Schedule Youtube Ingestion"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cron/backfill-youtube":{"post":{"tags":["Cron"],"summary":"Schedule Youtube Backfill","description":"Queue an operator-requested historical YouTube backfill.","operationId":"schedule_youtube_backfill","parameters":[{"name":"published_after","in":"query","required":true,"schema":{"type":"string","format":"date","title":"Published After"}},{"name":"X-Cron-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Cron-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Schedule Youtube Backfill"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cron/ingest-google-drive":{"post":{"tags":["Cron"],"summary":"Ingest Google Drive Documents","description":"Ingest new documents from Google Drive folder.\n\nRecursively scans the folder for new documents, extracts text,\nand queues for RAG processing. Documents are stored WITHOUT URLs\nso they cannot be externally referenced.\n\nArgs:\n    folder_id: Google Drive folder ID to scan\n\nReturns:\n    Dict with ingestion summary","operationId":"ingest_google_drive_documents","security":[{"HTTPBearer":[]}],"parameters":[{"name":"folder_id","in":"query","required":false,"schema":{"type":"string","default":"1XjKqi_vjI5IfcI2aGuO1CN3GOM2Wm7TI","title":"Folder Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Ingest Google Drive Documents"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cron/process-rag-queue":{"post":{"tags":["Cron"],"summary":"Process Rag Queue","description":"Process RAG jobs from unified background queue.\n\nCreates embeddings, assigns topics, and stores chunks for Sage retrieval.\n\nArgs:\n    limit: Maximum number of jobs to process\n\nReturns:\n    Dict with processing summary","operationId":"process_rag_queue","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Process Rag Queue"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cron/process-rag/{content_id}":{"post":{"tags":["Cron"],"summary":"Process Single Rag Resource","description":"Process a single educational content item through RAG pipeline.\n\nUse this to:\n- Import new content to RAG (if not yet processed)\n- Reprocess existing content (re-chunk and re-embed)\n\nChunks are created synchronously. Clarification field population\nruns in the background after the response is returned.\n\nArgs:\n    content_id: ID of the educational_content record\n\nReturns:\n    Dict with processing results","operationId":"process_single_rag_resource","security":[{"HTTPBearer":[]}],"parameters":[{"name":"content_id","in":"path","required":true,"schema":{"type":"integer","title":"Content Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Process Single Rag Resource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cron/cleanup-stale-sessions":{"post":{"tags":["Cron"],"summary":"Cleanup Stale Sessions","description":"Clean up stale queue sessions and expired video rooms.\n\nThis endpoint should be called periodically (e.g., every 30 minutes) to:\n1. Delete queue entries stuck in 'in_session' for too long (user can rejoin)\n2. Mark expired video rooms as inactive\n\nReturns:\n    Dict with cleanup summary","operationId":"cleanup_stale_sessions","parameters":[{"name":"X-Cron-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Cron-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cleanup Stale Sessions"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cron/notify-queue":{"post":{"tags":["Cron"],"summary":"Notify Queue Users","description":"Send early notifications to users whose turn is approaching.\n\nCalled every 60 seconds by Cloud Scheduler to check all online providers\nand notify users ~3 minutes before their expected turn.\n\nThe notification helps users prepare their camera/microphone before being admitted.\n\nReturns:\n    Dict with notification summary","operationId":"notify_queue_users","parameters":[{"name":"X-Cron-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Cron-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Notify Queue Users"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cron/auto-offline-providers":{"post":{"tags":["Cron"],"summary":"Auto Offline Providers","description":"Auto-offline providers who are past their office hours.\n\nSafety net for when Grail fails to send an offline webhook.\nChecks each online provider's local time against their office hours,\nwith a 15-minute grace period.\n\nDoes NOT destroy video rooms — flag only.\n\nShould run every 5 minutes via Cloud Scheduler.\n\nReturns:\n    Dict with summary","operationId":"auto_offline_providers","parameters":[{"name":"X-Cron-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Cron-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Auto Offline Providers"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cron/cleanup-provider-disconnects":{"post":{"tags":["Cron"],"summary":"Cleanup Provider Disconnects","description":"Clean up stale provider disconnects.\n\nThis is a safety net for missed webhooks. Normally, the webhook\nhandler schedules a delayed check when a provider disconnects.\nThis cron job catches any disconnects that slip through after 60 seconds.\n\nCalled every 60 seconds by Cloud Scheduler.\n\nReturns:\n    Dict with cleanup summary","operationId":"cleanup_provider_disconnects","parameters":[{"name":"X-Cron-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Cron-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cleanup Provider Disconnects"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cron/aggregate-performance-metrics":{"post":{"tags":["Cron"],"summary":"Aggregate Performance Metrics","description":"Aggregate slow traces from Cloud Trace into performance_metrics table.\n\nFetches traces >= 500ms from the last hour, normalizes endpoints,\ncomputes percentiles, and upserts into the DB. Cleans up records > 7 days.\n\nShould run every 30 minutes via Cloud Scheduler.\n\nReturns:\n    Dict with aggregation summary","operationId":"aggregate_performance_metrics","parameters":[{"name":"X-Cron-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Cron-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Aggregate Performance Metrics"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cron/notify-group-sessions":{"post":{"tags":["Cron"],"summary":"Notify Group Sessions","description":"Send pre-session push and email reminders for upcoming group sessions.\n\nChecks two windows: T-5min and T-1min before session start.\nRespects each user's notification_method preference (push/email/both).\n\nShould run every 60 seconds via Cloud Scheduler.\n\nReturns:\n    Dict with notification summary","operationId":"notify_group_sessions","parameters":[{"name":"X-Cron-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Cron-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Notify Group Sessions"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cron/notify-office-hours-reminders":{"post":{"tags":["Cron"],"summary":"Notify Office Hours Reminders","description":"Send pre-appointment reminders for confirmed office hours bookings.\n\nChecks two windows: T-5min and T-1min before appointment time.\nShould run every 60 seconds via Cloud Scheduler.","operationId":"notify_office_hours_reminders","parameters":[{"name":"X-Cron-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Cron-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Notify Office Hours Reminders"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cron/schedule-queue-compaction":{"post":{"tags":["Cron"],"summary":"Schedule Queue Compaction","description":"Schedule a queue compaction job.\n\nEnqueues a low-priority job to clean up old completed/failed jobs.\nShould run daily via Cloud Scheduler.\n\nReturns:\n    Dict with status: \"queued\" or \"already_queued\"","operationId":"schedule_queue_compaction","parameters":[{"name":"X-Cron-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Cron-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Schedule Queue Compaction"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cron/send-accountability-reminders":{"post":{"tags":["Cron"],"summary":"Send Accountability Reminders","description":"Send accountability reminders for plan items.\n\nRuns every minute via Cloud Scheduler. Evaluates smart conditions\nand sends push notifications (never email) for matching reminders.","operationId":"send_accountability_reminders","parameters":[{"name":"X-Cron-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Cron-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Send Accountability Reminders"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cron/generate-blog-post":{"post":{"tags":["Cron"],"summary":"Generate Blog Post","description":"Generate a blog post targeting untargeted SEO keywords.\n\nShould run Mon+Thu 9am ET via Cloud Scheduler.\nEnqueues a blog_generation background job.","operationId":"generate_blog_post","parameters":[{"name":"X-Cron-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Cron-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Generate Blog Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cron/refresh-seo-keywords":{"post":{"tags":["Cron"],"summary":"Refresh Seo Keywords","description":"Refresh SEO keyword metrics from DataForSEO.\n\nShould run weekly (Sunday) via Cloud Scheduler.","operationId":"refresh_seo_keywords","parameters":[{"name":"X-Cron-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Cron-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Refresh Seo Keywords"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cron/refresh-markdown-cache":{"post":{"tags":["Cron"],"summary":"Refresh Markdown Cache","description":"Rebuild AI markdown cache for all published content.\n\nShould run daily at 3am via Cloud Scheduler.","operationId":"refresh_markdown_cache","parameters":[{"name":"X-Cron-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Cron-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Refresh Markdown Cache"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cron/send-trial-invitations":{"post":{"tags":["Cron"],"summary":"Send Trial Invitations","description":"Invite people with upcoming Grail appointments to a free app trial.\n\nFetches appointments in the next 30 days and emails a trial invitation\nto anyone with no prior trial and no active subscription. The trial ends\nat the end of the day after the appointment (America/Phoenix).\n\nShould run hourly via Cloud Scheduler.","operationId":"send_trial_invitations","parameters":[{"name":"X-Cron-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Cron-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Send Trial Invitations"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cron/trial-end-gate":{"post":{"tags":["Cron"],"summary":"Trial End Gate","description":"Gate appointment-trial subscriptions shortly before trial end.\n\nSyncs Grail reschedules to the Stripe trial end, and cancels the\nsubscription BEFORE the card is charged when the appointment was a\nno-show/cancellation (or never happened).\n\nShould run hourly (at least daily) via Cloud Scheduler.","operationId":"trial_end_gate","parameters":[{"name":"X-Cron-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Cron-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Trial End Gate"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cron/aggregate-affiliate-earnings":{"post":{"tags":["Cron"],"summary":"Aggregate Affiliate Earnings Cron","description":"Aggregate affiliate earnings for the previous month.\n\nShould run on the 2nd of each month via Cloud Scheduler.","operationId":"aggregate_affiliate_earnings_cron","parameters":[{"name":"X-Cron-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Cron-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Aggregate Affiliate Earnings Cron"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/.well-known/apple-app-site-association":{"get":{"tags":["Well-Known"],"summary":"Apple App Site Association","description":"Apple App Site Association file for Universal Links and Web Credentials.","operationId":"apple_app_site_association","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/apple-app-site-association":{"get":{"tags":["Well-Known"],"summary":"Apple App Site Association","description":"Apple App Site Association file for Universal Links and Web Credentials.","operationId":"apple_app_site_association","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/auth/migrate-firebase-password":{"post":{"tags":["Auth"],"summary":"Migrate Firebase Password Endpoint","description":"Verify a user's password against Firebase, set it in Supabase, and\nreturn a Supabase session — all in one atomic call.\n\nOnly works for users with the firebase_migration flag in app_metadata.\nExpires 2026-06-30.","operationId":"migrate_firebase_password_endpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MigratePasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/authorize":{"get":{"tags":["OAuth"],"summary":"Authorize","description":"OAuth 2.0 authorization endpoint.\n\nIf the provider is not authenticated, redirects to /oauth/login.\nOtherwise validates the request and issues an authorization code, after a\nconsent page for third-party (self-registered) clients.","operationId":"authorize","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"query","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"redirect_uri","in":"query","required":true,"schema":{"type":"string","title":"Redirect Uri"}},{"name":"response_type","in":"query","required":false,"schema":{"type":"string","default":"code","title":"Response Type"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","default":"","title":"Scope"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","default":"","title":"State"}},{"name":"code_challenge","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Challenge"}},{"name":"code_challenge_method","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Challenge Method"}},{"name":"resource","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource"}},{"name":"oauth_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Oauth Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/consent":{"post":{"tags":["OAuth"],"summary":"Consent Submit","description":"Approve or deny a consent page. Re-validates the whole request before issuing a code.","operationId":"consent_submit","security":[{"HTTPBearer":[]}],"parameters":[{"name":"oauth_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Oauth Session"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_consent_submit"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/login":{"get":{"tags":["OAuth"],"summary":"Login Page","description":"Render the OAuth login page with email/password and Google sign-in.","operationId":"login_page","parameters":[{"name":"client_id","in":"query","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"redirect_uri","in":"query","required":true,"schema":{"type":"string","title":"Redirect Uri"}},{"name":"response_type","in":"query","required":false,"schema":{"type":"string","default":"code","title":"Response Type"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","default":"","title":"Scope"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","default":"","title":"State"}},{"name":"code_challenge","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Challenge"}},{"name":"code_challenge_method","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Challenge Method"}},{"name":"resource","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["OAuth"],"summary":"Login Submit","description":"Handle email/password login for the OAuth flow.","operationId":"login_submit","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_submit"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/callback":{"get":{"tags":["OAuth"],"summary":"Oauth Callback Page","description":"Intermediary page after Google OAuth redirect.\n\nSupabase JS v2 uses PKCE by default, so tokens are NOT in the URL fragment.\nInstead:\n- PKCE flow: Supabase redirects here with ?code=<auth_code> in the query\n- Implicit flow: tokens appear in the URL fragment (#access_token=...)\n\noauth_params (client_id, redirect_uri, etc.) were stored in sessionStorage\nby the login page before the Google redirect, since Supabase strips query\nparams from the redirectTo URL in PKCE flow.","operationId":"oauth_callback_page","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["OAuth"],"summary":"Oauth Callback Exchange","description":"Receives the Supabase access token from client-side JS (Google OAuth),\nvalidates it, sets an httponly cookie, and returns the authorize redirect URL.","operationId":"oauth_callback_exchange","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/token":{"post":{"tags":["OAuth"],"summary":"Token","description":"OAuth 2.0 token endpoint.\n\nSupports:\n- authorization_code: Exchange auth code for tokens\n- refresh_token: Refresh an expired access token\n\nConfidential clients authenticate with client_secret (form or Basic).\nPublic clients send client_id only; PKCE and refresh rotation apply.","operationId":"token","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_token"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/revoke":{"post":{"tags":["OAuth"],"summary":"Revoke","description":"OAuth 2.0 token revocation (RFC 7009).\n\nAlways returns 200 per spec, even if token not found. Public clients send\nclient_id only.","operationId":"revoke","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_revoke"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/introspect":{"post":{"tags":["OAuth"],"summary":"Introspect","description":"Token introspection for resource servers (RFC 7662).\n\nCallers authenticate with HTTP Basic as a client flagged `can_introspect`\nand only ever learn about tokens issued for their own resources. The token\nis never logged.","operationId":"introspect","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_introspect"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/register":{"post":{"tags":["OAuth"],"summary":"Register","description":"Register a public client (Claude Code, or Claude's hosted connectors) for the marketing MCP.\n\nUnauthenticated by design (RFC 7591 open registration), so registered\nclients are tightly fenced: loopback or Claude's exact connector callback\nredirects, marketing scopes only, and\na consent page on every authorization.","operationId":"register","responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/external/marketing-signups":{"get":{"tags":["External API"],"summary":"Api Get Marketing Signups","description":"v1 (default) is unchanged. v2 adds practice-news consent: docs/integrations/app-marketing-feed-v2.md","operationId":"api_get_marketing_signups","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Limit"}},{"name":"schema_version","in":"query","required":false,"schema":{"type":"integer","maximum":2,"minimum":1,"default":1,"title":"Schema Version"}},{"name":"X-Marketing-Sync-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Marketing-Sync-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MarketingSignupFeedResponse"},{"$ref":"#/components/schemas/MarketingConsentFeedResponse"}],"title":"Response Api Get Marketing Signups"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/external/marketing-signups/ack":{"post":{"tags":["External API"],"summary":"Api Ack Marketing Signups","operationId":"api_ack_marketing_signups","parameters":[{"name":"X-Marketing-Sync-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Marketing-Sync-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingSignupAckRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingSignupAckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/external/marketing-consent-events":{"post":{"tags":["External API"],"summary":"Api Ingest Marketing Consent Events","description":"Unsubscribes and complaints from pound-of-cure-web emails. Idempotent on event_id.","operationId":"api_ingest_marketing_consent_events","parameters":[{"name":"X-Marketing-Sync-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Marketing-Sync-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingConsentInboundRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingConsentInboundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/external/connection/check":{"get":{"tags":["External API"],"summary":"Connection Check","description":"Validate token and return API version info.","operationId":"connection_check","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionCheckResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/external/me":{"get":{"tags":["External API"],"summary":"Api Get Current User","description":"Return the authenticated user's identity and provider mapping.","operationId":"api_get_current_user","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/external/patients/{user_id}":{"get":{"tags":["External API"],"summary":"Api Get Patient","operationId":"api_get_patient","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","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/external/patients":{"get":{"tags":["External API"],"summary":"Api Search Patients","operationId":"api_search_patients","security":[{"HTTPBearer":[]}],"parameters":[{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/external/patients/{user_id}/context":{"get":{"tags":["External API"],"summary":"Api Get Patient Context","operationId":"api_get_patient_context","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","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/external/patients/{user_id}/subscription":{"get":{"tags":["External API"],"summary":"Api Get Patient Subscription","description":"Get a patient's subscription status and entitlement level.","operationId":"api_get_patient_subscription","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/external/patients/{user_id}/vitals":{"get":{"tags":["External API"],"summary":"Api Get Patient Vitals","operationId":"api_get_patient_vitals","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"type","in":"query","required":false,"schema":{"type":"string","default":"weight","title":"Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/external/patients/{user_id}/food-logs":{"get":{"tags":["External API"],"summary":"Api Get Patient Food Logs","description":"Get a patient's food logs for the last N days (default 10).","operationId":"api_get_patient_food_logs","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":10,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodLogsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/external/patients/{user_id}/ai-summary":{"get":{"tags":["External API"],"summary":"Api Get Ai Summary","operationId":"api_get_ai_summary","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","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/external/patients/{user_id}/documents":{"get":{"tags":["External API"],"summary":"Api Get Documents","operationId":"api_get_documents","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/external/patients/{user_id}/documents/{doc_id}":{"get":{"tags":["External API"],"summary":"Api Get Document Detail","operationId":"api_get_document_detail","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"doc_id","in":"path","required":true,"schema":{"type":"string","title":"Doc Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/external/document-types":{"get":{"tags":["External API"],"summary":"Api Get Document Types","operationId":"api_get_document_types","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/external/patients/{user_id}/notes":{"get":{"tags":["External API"],"summary":"Api Get Patient Notes","operationId":"api_get_patient_notes","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/external/patients/{user_id}/notes/{note_id}":{"get":{"tags":["External API"],"summary":"Api Get Patient Note","operationId":"api_get_patient_note","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"note_id","in":"path","required":true,"schema":{"type":"string","title":"Note Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/external/appointments/{appointment_id}/note":{"post":{"tags":["External API"],"summary":"Api Create Note","operationId":"api_create_note","security":[{"HTTPBearer":[]}],"parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"integer","title":"Appointment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/external/appointments":{"get":{"tags":["External API"],"summary":"Api Get Appointments","operationId":"api_get_appointments","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"query","required":true,"schema":{"type":"string","title":"Provider Id"}},{"name":"date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["External API"],"summary":"Api Create Appointment","operationId":"api_create_appointment","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/external/appointments/{appointment_id}":{"get":{"tags":["External API"],"summary":"Api Get Appointment","operationId":"api_get_appointment","security":[{"HTTPBearer":[]}],"parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"integer","title":"Appointment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["External API"],"summary":"Api Update Appointment","operationId":"api_update_appointment","security":[{"HTTPBearer":[]}],"parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"integer","title":"Appointment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/external/appointments/{appointment_id}/telemed":{"get":{"tags":["External API"],"summary":"Api Get Telemed","operationId":"api_get_telemed","security":[{"HTTPBearer":[]}],"parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"integer","title":"Appointment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/external/appointments/{appointment_id}/telemed/initiate":{"post":{"tags":["External API"],"summary":"Api Initiate Telemed","description":"Initiate a telemed session (provider clicks Connect in Grail).\n\nWGN sends daily_room_url + daily_token + room_name for the patient to join.","operationId":"api_initiate_telemed","security":[{"HTTPBearer":[]}],"parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"integer","title":"Appointment Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TelemedInitiateRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/external/appointments/{appointment_id}/telemed/notify-patient":{"post":{"tags":["External API"],"summary":"Api Notify Telemed Patient","description":"Send a push notification to the patient (provider clicks Notify in Grail).","operationId":"api_notify_telemed_patient","security":[{"HTTPBearer":[]}],"parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"integer","title":"Appointment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/external/appointments/{appointment_id}/complete":{"post":{"tags":["External API"],"summary":"Api Complete Appointment","operationId":"api_complete_appointment","security":[{"HTTPBearer":[]}],"parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"integer","title":"Appointment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/external/providers/{provider_id}/notify-next-patient":{"post":{"tags":["External API"],"summary":"Api Notify Next Patient","description":"Notify the next waiting patient to get ready.\n\nCalled by WGN when provider clicks 'Generate Note' — gives the next\npatient lead time to open the app and prepare.","operationId":"api_notify_next_patient","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"integer","title":"Provider Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/external/providers/{provider_id}/queue":{"get":{"tags":["External API"],"summary":"Api Get Provider Queue","description":"Get provider's current queue with patient readiness status.\n\nReturns queue entries enriched with is_ready based on patient heartbeat.\nPolled by WGN's embedded queue sidebar.","operationId":"api_get_provider_queue","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"integer","title":"Provider Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/external/queue/{appointment_id}":{"delete":{"tags":["External API"],"summary":"Api Remove From Queue","description":"Remove a patient from the telemed queue.\n\nAccepts an optional JSON body with a message to include in the\npush notification sent to the patient.","operationId":"api_remove_from_queue","security":[{"HTTPBearer":[]}],"parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"integer","title":"Appointment Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RemoveFromQueueBody"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/external/providers":{"get":{"tags":["External API"],"summary":"Api Get Providers","operationId":"api_get_providers","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/external/providers/{provider_id}":{"get":{"tags":["External API"],"summary":"Api Get Provider","operationId":"api_get_provider","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string","title":"Provider Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/external/locations":{"get":{"tags":["External API"],"summary":"Api Get Locations","operationId":"api_get_locations","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/external/visit-types":{"get":{"tags":["External API"],"summary":"Api Get Visit Types","operationId":"api_get_visit_types","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/external/provider/status":{"get":{"tags":["External API"],"summary":"Api Get Provider Status","description":"Get a provider's current online/offline status and office hours info.","operationId":"api_get_provider_status","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"query","required":true,"schema":{"type":"string","description":"Provider ID (integer, UUID, or Grail ID)","title":"Provider Id"},"description":"Provider ID (integer, UUID, or Grail ID)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["External API"],"summary":"Api Update Provider Status","description":"Update a provider's online/offline status flag.\n\nFlag-only: sets is_online and last_online_at. Does NOT create/destroy video rooms.\nIdempotent: setting the same status returns success without a DB write.","operationId":"api_update_provider_status","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/external/provider/office-hours":{"get":{"tags":["External API"],"summary":"Api Get Provider Office Hours","description":"Get a provider's office hours for a specific date.\n\nReturns scheduled time slots (in the provider's local timezone) after\napplying exclusions and overrides.","operationId":"api_get_provider_office_hours","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"query","required":true,"schema":{"type":"string","description":"Provider ID (integer, UUID, or Grail ID)","title":"Provider Id"},"description":"Provider ID (integer, UUID, or Grail ID)"},{"name":"date","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Date to check (YYYY-MM-DD)","title":"Date"},"description":"Date to check (YYYY-MM-DD)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderOfficeHoursResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/external/provider/availability":{"get":{"tags":["External API"],"summary":"Api Get Provider Availability","description":"Return provider availability slots for external schedulers.","operationId":"api_get_provider_availability","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"query","required":true,"schema":{"type":"string","description":"Provider ID (integer, UUID, or Grail ID)","title":"Provider Id"},"description":"Provider ID (integer, UUID, or Grail ID)"},{"name":"from_date","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Start date (YYYY-MM-DD)","title":"From Date"},"description":"Start date (YYYY-MM-DD)"},{"name":"to_date","in":"query","required":true,"schema":{"type":"string","format":"date","description":"End date (YYYY-MM-DD)","title":"To Date"},"description":"End date (YYYY-MM-DD)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/external/patient-transcript-learning":{"post":{"tags":["External API"],"summary":"Api Patient Transcript Learning","description":"Extract patient-specific knowledge graph from a telemed transcript.\n\nQueues a background job that:\n1. Extracts patient-specific entities using program vocabulary\n2. Validates entity labels and relationship types\n3. Links entities to program graph canonical names\n4. Merges into the patient's knowledge graph (graph_id = patient_id)\n\nAuth: X-API-KEY header (server-to-server from WGN).\nUses transcription_id for idempotency. Returns immediately with job status.","operationId":"api_patient_transcript_learning","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientTranscriptRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientTranscriptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/external/transcript-learning":{"post":{"tags":["External API"],"summary":"Api Process Transcript","description":"Process a patient-provider encounter via two-phase KG extraction.\n\nAccepts a paired transcription + visit note with metadata.\nQueues a background job that:\n1. Distills clinical decision-making (H→A→P framework)\n2. Extracts entities and relationships into the program knowledge graph\n\nAuth: X-API-KEY header (server-to-server from WGN).\nUses transcription_id for idempotency. Returns immediately with job status.","operationId":"api_process_transcript","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessTranscriptionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessTranscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/external/courses/topics":{"get":{"tags":["External API"],"summary":"Api List Topics With Courses","description":"List all topics with their courses. Use course IDs when ingesting videos.","operationId":"api_list_topics_with_courses","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TopicWithCourses"},"type":"array","title":"Response Api List Topics With Courses"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/external/courses/videos":{"post":{"tags":["External API"],"summary":"Api Ingest Video","description":"Ingest a GCS-hosted video into a course as a new module.\n\n- Validates the course exists and belongs to a valid topic\n- Re-hosts the thumbnail from GCS/HTTP to Supabase Storage\n- Stores the GCS video URL for signed-URL playback","operationId":"api_ingest_video","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoIngestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoIngestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/external/membership-products":{"get":{"tags":["External API"],"summary":"Api Membership Products","description":"List membership products for the trial-config product picker.","operationId":"api_membership_products","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MembershipProductsResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/external/trial-config":{"get":{"tags":["External API"],"summary":"Api Get Trial Config","description":"Read the trial-invitation config (camelCase).","operationId":"api_get_trial_config","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrialConfigResponse"}}}}},"security":[{"APIKeyHeader":[]}]},"put":{"tags":["External API"],"summary":"Api Update Trial Config","description":"Update the trial-invitation config.\n\nValidates emailBodyHtml against the renderer allowlist — returns 400\nlisting any unknown `{{token}}`.","operationId":"api_update_trial_config","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrialConfigUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrialConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/external/generate-blog-post":{"post":{"tags":["External API"],"summary":"Api Generate Blog Post","description":"Generate a blog post and return as JSON. Stateless — no DB writes.\n\nAuth: X-API-KEY header (server-to-server from poundofcure-web).","operationId":"api_generate_blog_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalBlogGenerationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalBlogGenerationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/external/images/search":{"post":{"tags":["External API"],"summary":"Api Search Images","description":"Search the image library. Returns matching images ordered by similarity.\n\nAuth: X-API-KEY header (server-to-server from poundofcure-web).","operationId":"api_search_images","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalImageSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/external/marketing-images":{"get":{"tags":["External API"],"summary":"Api List Marketing Images","description":"List the image library, newest first. Auth: X-API-KEY.","operationId":"api_list_marketing_images","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"topic_cluster","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic Cluster"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/external/marketing-images/search":{"post":{"tags":["External API"],"summary":"Api Search Marketing Images","description":"Semantic + text search; each image carries `similarity`. Auth: X-API-KEY.","operationId":"api_search_marketing_images","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingImageSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/external/marketing-images/{image_id}":{"get":{"tags":["External API"],"summary":"Api Get Marketing Image","description":"One image by id; 404 if unknown. Auth: X-API-KEY.","operationId":"api_get_marketing_image","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"image_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Image Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/appointments/{appointment_id}/telemed/patient-token":{"post":{"tags":["Appointments"],"summary":"Api Get Telemed Patient Token","description":"Return Daily.co credentials for a patient's telemed appointment.\n\nReturns the daily_room_url + daily_token that WGN pushed via initiate.\nReturns 404 if the appointment doesn't belong to this user or credentials\nhaven't been received from WGN yet.","operationId":"api_get_telemed_patient_token","security":[{"HTTPBearer":[]}],"parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"integer","title":"Appointment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemedPatientTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/appointments/{appointment_id}/telemed/wait":{"get":{"tags":["Appointments"],"summary":"Api Telemed Wait","description":"SSE endpoint — streams telemed session status to the patient app.\n\nThe patient opens this connection while waiting for the provider to\nstart the video call. Once WGN pushes Daily.co credentials via\ninitiate_telemed_session, this endpoint delivers them instantly\n(within ~3 seconds) as a session_ready event.\n\nEvents:\n  - session_ready: {daily_room_url, daily_token} — credentials available\n  - heartbeat: {} — connection keepalive (every 3s)\n  - timeout: {} — 20-minute wait exceeded","operationId":"api_telemed_wait","security":[{"HTTPBearer":[]}],"parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"integer","title":"Appointment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/appointments/{appointment_id}/telemed/heartbeat":{"post":{"tags":["Appointments"],"summary":"Api Telemed Heartbeat","description":"Patient readiness heartbeat — called every 15 seconds from mobile.\n\nUpdates patient_ready_at timestamp. The provider's queue sidebar\nuses this to determine which patients are ready (within 30s = ready).","operationId":"api_telemed_heartbeat","security":[{"HTTPBearer":[]}],"parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"integer","title":"Appointment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/daily/webhooks":{"get":{"tags":["Webhooks"],"summary":"Daily Webhook Health","description":"Health check endpoint for Daily.co webhook URL validation.\n\nDaily.co sends a GET request to validate the webhook URL before activating it.\nMust return 200 for webhook registration to succeed.","operationId":"daily_webhook_health","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Webhooks"],"summary":"Handle Daily Webhook","description":"Receive and process Daily.co webhook events.\n\nDaily.co sends events for participant lifecycle and meeting state changes.\nThe request is verified using HMAC-SHA256 before processing.","operationId":"handle_daily_webhook","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/my-chart/visits":{"get":{"tags":["My Chart"],"summary":"List My Visits","description":"List all visit notes for the current user.","operationId":"list_my_visits","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/my-chart/visits/{note_id}":{"get":{"tags":["My Chart"],"summary":"Get My Visit","description":"Get a single visit note detail.","operationId":"get_my_visit","security":[{"HTTPBearer":[]}],"parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"string","title":"Note Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/knowledge-graph/nodes":{"get":{"tags":["Admin KG Explorer"],"summary":"List Nodes","operationId":"list_nodes","security":[{"HTTPBearer":[]}],"parameters":[{"name":"label","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KGNodeListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin KG Explorer"],"summary":"Create Node","operationId":"create_node","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNodeRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Node"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/knowledge-graph/stats":{"get":{"tags":["Admin KG Explorer"],"summary":"Stats","operationId":"stats","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KGStatsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/knowledge-graph/nodes/merge":{"post":{"tags":["Admin KG Explorer"],"summary":"Merge","operationId":"merge","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeNodesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Merge"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/knowledge-graph/enrich":{"post":{"tags":["Admin KG Explorer"],"summary":"Enrich Kg Endpoint","operationId":"enrich_kg_endpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichKGRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Enrich Kg Endpoint"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/knowledge-graph/enrich-status/{job_id}":{"get":{"tags":["Admin KG Explorer"],"summary":"Enrich Job Status","operationId":"enrich_job_status","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":{"type":"object","additionalProperties":true,"title":"Response Enrich Job Status"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/knowledge-graph/dedup-preview":{"get":{"tags":["Admin KG Explorer"],"summary":"Dedup Preview","operationId":"dedup_preview","security":[{"HTTPBearer":[]}],"parameters":[{"name":"threshold","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.8},{"type":"null"}],"title":"Threshold"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DedupPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/knowledge-graph/dedup":{"post":{"tags":["Admin KG Explorer"],"summary":"Start Dedup","operationId":"start_dedup","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DedupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DedupJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/knowledge-graph/dedup-status/{job_id}":{"get":{"tags":["Admin KG Explorer"],"summary":"Dedup Status","operationId":"dedup_status","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":{"$ref":"#/components/schemas/DedupStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/knowledge-graph/nodes/{node_id}":{"get":{"tags":["Admin KG Explorer"],"summary":"Get Node","operationId":"get_node","security":[{"HTTPBearer":[]}],"parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KGNodeDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Admin KG Explorer"],"summary":"Patch Node","operationId":"patch_node","security":[{"HTTPBearer":[]}],"parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNodeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Patch Node"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin KG Explorer"],"summary":"Remove Node","operationId":"remove_node","security":[{"HTTPBearer":[]}],"parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/knowledge-graph/nodes/{node_id}/edges":{"get":{"tags":["Admin KG Explorer"],"summary":"Node Edges","operationId":"node_edges","security":[{"HTTPBearer":[]}],"parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Node Edges"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/knowledge-graph/edges":{"post":{"tags":["Admin KG Explorer"],"summary":"Create Edge","operationId":"create_edge","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEdgeRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Edge"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/knowledge-graph/edges/{edge_id}":{"patch":{"tags":["Admin KG Explorer"],"summary":"Patch Edge","operationId":"patch_edge","security":[{"HTTPBearer":[]}],"parameters":[{"name":"edge_id","in":"path","required":true,"schema":{"type":"string","title":"Edge Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEdgeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Patch Edge"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin KG Explorer"],"summary":"Remove Edge","operationId":"remove_edge","security":[{"HTTPBearer":[]}],"parameters":[{"name":"edge_id","in":"path","required":true,"schema":{"type":"string","title":"Edge Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/evals/personas":{"get":{"tags":["Admin Sage Evals"],"summary":"List All Personas","operationId":"list_all_personas","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PersonaListItem"},"type":"array","title":"Response List All Personas"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/evals/personas/{persona_id}":{"get":{"tags":["Admin Sage Evals"],"summary":"Get Persona Detail","operationId":"get_persona_detail","security":[{"HTTPBearer":[]}],"parameters":[{"name":"persona_id","in":"path","required":true,"schema":{"type":"string","title":"Persona Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Admin Sage Evals"],"summary":"Patch Persona","operationId":"patch_persona","security":[{"HTTPBearer":[]}],"parameters":[{"name":"persona_id","in":"path","required":true,"schema":{"type":"string","title":"Persona Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePersonaRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin Sage Evals"],"summary":"Remove Persona","operationId":"remove_persona","security":[{"HTTPBearer":[]}],"parameters":[{"name":"persona_id","in":"path","required":true,"schema":{"type":"string","title":"Persona Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/evals/personas/generate":{"post":{"tags":["Admin Sage Evals"],"summary":"Create Persona","description":"Generate a new persona -- LLM creates mock user profile + patient KG.","operationId":"create_persona","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePersonaRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/evals/personas/{persona_id}/regenerate-kg":{"post":{"tags":["Admin Sage Evals"],"summary":"Regenerate Kg","description":"Regenerate mock user profile + patient KG from the persona description.","operationId":"regenerate_kg","security":[{"HTTPBearer":[]}],"parameters":[{"name":"persona_id","in":"path","required":true,"schema":{"type":"string","title":"Persona Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Regenerate Kg"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/evals/personas/{persona_id}/kg":{"get":{"tags":["Admin Sage Evals"],"summary":"Persona Kg","operationId":"persona_kg","security":[{"HTTPBearer":[]}],"parameters":[{"name":"persona_id","in":"path","required":true,"schema":{"type":"string","title":"Persona Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaKGResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/evals/personas/{persona_id}/chat":{"post":{"tags":["Admin Sage Evals"],"summary":"Persona Chat","description":"SSE streaming -- run the query agent as this test persona.","operationId":"persona_chat","security":[{"HTTPBearer":[]}],"parameters":[{"name":"persona_id","in":"path","required":true,"schema":{"type":"string","title":"Persona Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaChatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/evals/personas/{persona_id}/extract-qa":{"post":{"tags":["Admin Sage Evals"],"summary":"Extract Persona Qa","description":"Extract Q&A pairs from persona's transcript + note.","operationId":"extract_persona_qa","security":[{"HTTPBearer":[]}],"parameters":[{"name":"persona_id","in":"path","required":true,"schema":{"type":"string","title":"Persona Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QAPairItem"},"title":"Response Extract Persona Qa"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/evals/personas/{persona_id}/qa-pairs":{"get":{"tags":["Admin Sage Evals"],"summary":"Get Persona Qa Pairs","operationId":"get_persona_qa_pairs","security":[{"HTTPBearer":[]}],"parameters":[{"name":"persona_id","in":"path","required":true,"schema":{"type":"string","title":"Persona Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QAPairItem"},"title":"Response Get Persona Qa Pairs"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/evals/personas/{persona_id}/eval-runs":{"post":{"tags":["Admin Sage Evals"],"summary":"Create Eval Run","description":"Start a new eval run for a persona.","operationId":"create_eval_run","security":[{"HTTPBearer":[]}],"parameters":[{"name":"persona_id","in":"path","required":true,"schema":{"type":"string","title":"Persona Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalRunListItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Admin Sage Evals"],"summary":"Get Persona Eval Runs","operationId":"get_persona_eval_runs","security":[{"HTTPBearer":[]}],"parameters":[{"name":"persona_id","in":"path","required":true,"schema":{"type":"string","title":"Persona Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EvalRunListItem"},"title":"Response Get Persona Eval Runs"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/evals/eval-runs/{run_id}":{"get":{"tags":["Admin Sage Evals"],"summary":"Get Eval Run","operationId":"get_eval_run","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":{"$ref":"#/components/schemas/EvalRunDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/evals/eval-runs/{run_id}/rescore":{"post":{"tags":["Admin Sage Evals"],"summary":"Rescore Eval Run","description":"Re-score all results in an eval run.","operationId":"rescore_eval_run","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/background-jobs":{"get":{"tags":["Admin Background Jobs"],"summary":"List Background Jobs","operationId":"list_background_jobs","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status (pending/processing/completed/failed)","title":"Status"},"description":"Filter by status (pending/processing/completed/failed)"},{"name":"job_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by job type","title":"Job Type"},"description":"Filter by job type"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackgroundJobListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/background-jobs/summary":{"get":{"tags":["Admin Background Jobs"],"summary":"Background Jobs Summary","operationId":"background_jobs_summary","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueSummaryResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/background-jobs/{job_id}":{"get":{"tags":["Admin Background Jobs"],"summary":"Get Background Job","operationId":"get_background_job","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":{"$ref":"#/components/schemas/BackgroundJobDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/background-jobs/{job_id}/rerun":{"post":{"tags":["Admin Background Jobs"],"summary":"Rerun Background Job","operationId":"rerun_background_job","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":{"type":"object","additionalProperties":true,"title":"Response Rerun Background Job"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/embeddings/status":{"get":{"tags":["Admin Embeddings"],"summary":"Embedding Status","operationId":"embedding_status","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Embedding Status"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/embeddings/backfill":{"post":{"tags":["Admin Embeddings"],"summary":"Start Embedding Backfill","operationId":"start_embedding_backfill","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingBackfillRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Start Embedding Backfill"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/faq/load-canonical":{"post":{"tags":["Admin Canonical FAQs"],"summary":"Load Canonical","operationId":"load_canonical","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoadCanonicalFaqsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Load Canonical"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/faq/reactivate-transcript-faqs":{"post":{"tags":["Admin Canonical FAQs"],"summary":"Reactivate Transcript","operationId":"reactivate_transcript","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReactivateTranscriptFaqsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Reactivate Transcript"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/e2e-tests/runs":{"get":{"tags":["Admin E2E Tests"],"summary":"List E2E Test Runs","operationId":"list_e2e_test_runs","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status","title":"Status"},"description":"Filter by status"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/E2ETestRunListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/e2e-tests/runs/{run_id}":{"get":{"tags":["Admin E2E Tests"],"summary":"Get E2E Test Run","operationId":"get_e2e_test_run","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":{"$ref":"#/components/schemas/E2ETestRunDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/e2e-tests/runs/trigger":{"post":{"tags":["Admin E2E Tests"],"summary":"Trigger E2E Test","operationId":"trigger_e2e_test","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerE2ETestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/E2ETestRunSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/e2e-tests/flows":{"get":{"tags":["Admin E2E Tests"],"summary":"List E2E Flows","operationId":"list_e2e_flows","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/E2EFlowInfo"},"type":"array","title":"Response List E2E Flows"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/e2e-tests/runs/{run_id}/results":{"post":{"tags":["Admin E2E Tests"],"summary":"Submit E2E Results","operationId":"submit_e2e_results","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitE2EResultsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/E2ETestRunDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/sage/plan-types":{"get":{"tags":["Admin Plan Types"],"summary":"List All Plan Types","description":"List all plan types.","operationId":"list_all_plan_types","security":[{"HTTPBearer":[]}],"parameters":[{"name":"include_inactive","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Inactive"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanTypeListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin Plan Types"],"summary":"Create New Plan Type","description":"Create a new plan type.","operationId":"create_new_plan_type","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanTypeCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanTypeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/sage/plan-types/{plan_type}":{"get":{"tags":["Admin Plan Types"],"summary":"Get Single Plan Type","description":"Get a single plan type by its slug.","operationId":"get_single_plan_type","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_type","in":"path","required":true,"schema":{"type":"string","title":"Plan Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanTypeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Admin Plan Types"],"summary":"Update Existing Plan Type","description":"Update an existing plan type.","operationId":"update_existing_plan_type","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_type","in":"path","required":true,"schema":{"type":"string","title":"Plan Type"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanTypeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanTypeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin Plan Types"],"summary":"Deactivate Plan Type","description":"Soft-delete (deactivate) a plan type.","operationId":"deactivate_plan_type","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_type","in":"path","required":true,"schema":{"type":"string","title":"Plan Type"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/transcript-faqs":{"get":{"tags":["Admin Transcript FAQs"],"summary":"List Staging","description":"List transcript FAQ staging entries.","operationId":"list_staging","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status: pending, approved, dismissed","title":"Status"},"description":"Filter by status: pending, approved, dismissed"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StagingListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/transcript-faqs/stats":{"get":{"tags":["Admin Transcript FAQs"],"summary":"Get Stats","description":"Get counts by status (pending, approved, dismissed).","operationId":"get_stats","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StagingStats"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/transcript-faqs/duplicates":{"get":{"tags":["Admin Transcript FAQs"],"summary":"Find Duplicates","description":"Find clusters of duplicate pending/approved FAQ entries.","operationId":"find_duplicates","security":[{"HTTPBearer":[]}],"parameters":[{"name":"similarity_threshold","in":"query","required":false,"schema":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.5},{"type":"null"}],"title":"Similarity Threshold"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DuplicateClustersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/transcript-faqs/backfill-embeddings":{"post":{"tags":["Admin Transcript FAQs"],"summary":"Backfill Embeddings","description":"Backfill embeddings for staging entries that lack them (one-time).","operationId":"backfill_embeddings","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackfillResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/transcript-faqs/combine":{"post":{"tags":["Admin Transcript FAQs"],"summary":"Combine Faqs","description":"Combine multiple duplicate FAQs into a single merged entry.","operationId":"combine_faqs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CombineRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CombineResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/transcript-faqs/bulk-approve":{"post":{"tags":["Admin Transcript FAQs"],"summary":"Bulk Approve","description":"Approve multiple staging entries.","operationId":"bulk_approve","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkActionRequest"}}},"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":[]}]}},"/admin/transcript-faqs/bulk-dismiss":{"post":{"tags":["Admin Transcript FAQs"],"summary":"Bulk Dismiss","description":"Dismiss multiple staging entries.","operationId":"bulk_dismiss","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkActionRequest"}}},"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":[]}]}},"/admin/transcript-faqs/approved":{"get":{"tags":["Admin Transcript FAQs"],"summary":"List Approved","description":"List approved transcript FAQ entries in sage_rag_content.","operationId":"list_approved","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovedListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/transcript-faqs/{staging_id}/approve":{"post":{"tags":["Admin Transcript FAQs"],"summary":"Approve Entry","description":"Approve a staging entry, promoting it to sage_rag_content.","operationId":"approve_entry","security":[{"HTTPBearer":[]}],"parameters":[{"name":"staging_id","in":"path","required":true,"schema":{"type":"string","title":"Staging Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApproveRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/transcript-faqs/{staging_id}/dismiss":{"post":{"tags":["Admin Transcript FAQs"],"summary":"Dismiss Entry","description":"Dismiss a staging entry.","operationId":"dismiss_entry","security":[{"HTTPBearer":[]}],"parameters":[{"name":"staging_id","in":"path","required":true,"schema":{"type":"string","title":"Staging Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DismissRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/transcript-faqs/approved/{rag_content_id}":{"delete":{"tags":["Admin Transcript FAQs"],"summary":"Delete Approved","description":"Delete an approved RAG entry and unlink from staging.","operationId":"delete_approved","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rag_content_id","in":"path","required":true,"schema":{"type":"string","title":"Rag Content Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketing/blog/posts":{"get":{"tags":["Marketing"],"summary":"List Published Posts","description":"List published blog posts (paginated).","operationId":"list_published_posts","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketing/blog/posts/{slug}":{"get":{"tags":["Marketing"],"summary":"Get Post By Slug","description":"Get a single published blog post by slug.","operationId":"get_post_by_slug","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketing/blog/approve/{token}":{"get":{"tags":["Marketing"],"summary":"Approve Blog Post","description":"One-click blog approval from email. Token-based, no auth required.\n\nLicenses the Shutterstock image (if any) and publishes the post.\nReturns an HTML page confirming the action.","operationId":"approve_blog_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketing/blog/feed/rss":{"get":{"tags":["Marketing"],"summary":"Rss Feed","description":"RSS 2.0 feed.","operationId":"rss_feed","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/marketing/blog/feed/atom":{"get":{"tags":["Marketing"],"summary":"Atom Feed","description":"Atom XML feed.","operationId":"atom_feed","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/marketing/blog/feed/json":{"get":{"tags":["Marketing"],"summary":"Json Feed","description":"JSON Feed 1.1.","operationId":"json_feed","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/marketing/markdown/{path}":{"get":{"tags":["Marketing"],"summary":"Get Markdown","description":"Get cached markdown for AI agent consumption.","operationId":"get_markdown","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketing/calculators/glp1":{"post":{"tags":["Marketing"],"summary":"Calculate Glp1","description":"GLP-1 weight loss calculator.","operationId":"calculate_glp1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GLP1CalculatorInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketing/calculators/bariatric":{"post":{"tags":["Marketing"],"summary":"Calculate Bariatric","description":"Bariatric surgery weight loss calculator.","operationId":"calculate_bariatric","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BariatricCalculatorInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/marketing/calculators/medication-check":{"post":{"tags":["Marketing"],"summary":"Check Medication","description":"Check if a medication is weight-gaining (Haiku-powered).","operationId":"check_medication","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MedicationCheckRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/marketing/blog/posts":{"get":{"tags":["Admin Marketing"],"summary":"List All Posts","description":"List all blog posts (including drafts).","operationId":"list_all_posts","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin Marketing"],"summary":"Create Post","description":"Create a new blog post.","operationId":"create_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/marketing/blog/posts/{post_id}":{"get":{"tags":["Admin Marketing"],"summary":"Get Post","description":"Get a single blog post by ID.","operationId":"get_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Admin Marketing"],"summary":"Update Post","description":"Update a blog post.","operationId":"update_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","title":"Post Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin Marketing"],"summary":"Delete Post","description":"Delete a blog post.","operationId":"delete_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/marketing/blog/posts/{post_id}/edit-with-ai":{"post":{"tags":["Admin Marketing"],"summary":"Edit With Ai","description":"Apply AI editing instructions to a blog post using Sonnet 4.6.","operationId":"edit_with_ai","security":[{"HTTPBearer":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","title":"Post Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/marketing/blog/posts/{post_id}/publish":{"post":{"tags":["Admin Marketing"],"summary":"Publish Post","description":"Publish a blog post. Licenses Shutterstock image if present (legacy).","operationId":"publish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/marketing/blog/posts/{post_id}/unpublish":{"post":{"tags":["Admin Marketing"],"summary":"Unpublish Post","description":"Revert a published post back to draft.","operationId":"unpublish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/marketing/images":{"get":{"tags":["Admin Marketing"],"summary":"List Library Images","description":"List images in the blog image library.","operationId":"list_library_images","security":[{"HTTPBearer":[]}],"parameters":[{"name":"topic_cluster","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic Cluster"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/marketing/images/search":{"post":{"tags":["Admin Marketing"],"summary":"Search Images","description":"Search the image library by semantic similarity.","operationId":"search_images","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageSearchRequest"}}},"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":[]}]}},"/admin/marketing/images/upload":{"post":{"tags":["Admin Marketing"],"summary":"Upload Image","description":"Upload an image to the blog image library.","operationId":"upload_image","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_image"}}},"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":[]}]}},"/admin/marketing/images/upload-batch":{"post":{"tags":["Admin Marketing"],"summary":"Upload Image Batch","description":"Batch upload images. `metadata` is a JSON array of objects with\ndescription, tags, topic_cluster, source, source_url — one per file.","operationId":"upload_image_batch","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_image_batch"}}},"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":[]}]}},"/admin/marketing/images/{image_id}":{"put":{"tags":["Admin Marketing"],"summary":"Update Library Image","description":"Update image metadata (description, tags, cluster).","operationId":"update_library_image","security":[{"HTTPBearer":[]}],"parameters":[{"name":"image_id","in":"path","required":true,"schema":{"type":"string","title":"Image Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin Marketing"],"summary":"Delete Library Image","description":"Delete an image from the library.","operationId":"delete_library_image","security":[{"HTTPBearer":[]}],"parameters":[{"name":"image_id","in":"path","required":true,"schema":{"type":"string","title":"Image Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/marketing/images/deduplicate":{"post":{"tags":["Admin Marketing"],"summary":"Deduplicate Library Images","description":"Remove duplicate images from the library. Keeps oldest entry for each unique description+filename.","operationId":"deduplicate_library_images","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/marketing/images/backfill-descriptions":{"post":{"tags":["Admin Marketing"],"summary":"Backfill Image Descriptions","description":"Re-describe all images using Gemini vision and re-embed for better search.","operationId":"backfill_image_descriptions","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/marketing/blog/posts/{post_id}/image":{"put":{"tags":["Admin Marketing"],"summary":"Update Post Image","description":"Set a blog post's featured image from the library.","operationId":"update_post_image","security":[{"HTTPBearer":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","title":"Post Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/marketing/blog/generate":{"post":{"tags":["Admin Marketing"],"summary":"Generate Blog Post","description":"Trigger blog post generation as a background job.","operationId":"generate_blog_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"topic_cluster","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic Cluster"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/marketing/videos":{"get":{"tags":["Admin Marketing"],"summary":"List Library Videos","description":"List video library entries with optional type/feature filters.","operationId":"list_library_videos","security":[{"HTTPBearer":[]}],"parameters":[{"name":"video_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Type"}},{"name":"feature","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feature"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/marketing/videos/upload":{"post":{"tags":["Admin Marketing"],"summary":"Upload Library Video","description":"Upload a video to the media library.","operationId":"upload_library_video","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_library_video"}}},"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":[]}]}},"/admin/marketing/videos/register":{"post":{"tags":["Admin Marketing"],"summary":"Register Library Video","description":"Register a video that was uploaded directly to storage via signed URL.","operationId":"register_library_video","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Data"}}},"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":[]}]}},"/admin/marketing/videos/{video_id}":{"put":{"tags":["Admin Marketing"],"summary":"Update Library Video","description":"Update video metadata.","operationId":"update_library_video","security":[{"HTTPBearer":[]}],"parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"string","title":"Video Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin Marketing"],"summary":"Delete Library Video","description":"Delete a video from the library.","operationId":"delete_library_video","security":[{"HTTPBearer":[]}],"parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"string","title":"Video Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/marketing/seo/keywords/search":{"get":{"tags":["Admin Marketing"],"summary":"Search Keywords","description":"Search SEO keywords by text with targeting counts.","operationId":"search_keywords","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/marketing/seo/keywords":{"get":{"tags":["Admin Marketing"],"summary":"List Keywords","description":"List SEO keywords with optional filters.","operationId":"list_keywords","security":[{"HTTPBearer":[]}],"parameters":[{"name":"topic_cluster","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic Cluster"}},{"name":"intent","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent"}},{"name":"untargeted_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Untargeted Only"}},{"name":"targeting_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Targeting Status"}},{"name":"recommendation","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recommendation"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/marketing/seo/research":{"post":{"tags":["Admin Marketing"],"summary":"Research Keywords","description":"Trigger DataForSEO keyword research.","operationId":"research_keywords","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SEOResearchRequest"}}},"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":[]}]}},"/admin/marketing/seo/keywords/recompute":{"post":{"tags":["Admin Marketing"],"summary":"Recompute Recommendations","description":"Recompute recommendation scores for all keywords.","operationId":"recompute_recommendations","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/marketing/seo/keywords/bulk-status":{"post":{"tags":["Admin Marketing"],"summary":"Bulk Update Targeting Status","description":"Approve or reject multiple keywords at once.","operationId":"bulk_update_targeting_status","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SEOBulkTargetingRequest"}}},"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":[]}]}},"/admin/marketing/seo/keywords/{keyword_id}/targeting-status":{"put":{"tags":["Admin Marketing"],"summary":"Update Targeting Status","description":"Approve or reject a keyword for targeting.","operationId":"update_targeting_status","security":[{"HTTPBearer":[]}],"parameters":[{"name":"keyword_id","in":"path","required":true,"schema":{"type":"string","title":"Keyword Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SEOTargetingStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/marketing/seo/keywords/{keyword_id}":{"put":{"tags":["Admin Marketing"],"summary":"Update Keyword","description":"Update a keyword's metadata.","operationId":"update_keyword","security":[{"HTTPBearer":[]}],"parameters":[{"name":"keyword_id","in":"path","required":true,"schema":{"type":"string","title":"Keyword Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SEOKeywordUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/marketing/config":{"get":{"tags":["Admin Marketing"],"summary":"Get Config","description":"Get all marketing config values.","operationId":"get_config","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["Admin Marketing"],"summary":"Update Config","description":"Update marketing config values.","operationId":"update_config","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingConfigUpdate"}}},"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":[]}]}},"/admin/marketing/calculator-submissions":{"get":{"tags":["Admin Marketing"],"summary":"List Submissions","description":"List calculator submissions.","operationId":"list_submissions","security":[{"HTTPBearer":[]}],"parameters":[{"name":"calculator_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calculator Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/video-creator/projects":{"get":{"tags":["Admin Video Creator"],"summary":"List Projects Endpoint","description":"List all video projects.","operationId":"list_projects_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query"}},{"name":"folder_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"UUID, or \"unfiled\" for no-folder, or omit/\"all\" for no filter","title":"Folder Id"},"description":"UUID, or \"unfiled\" for no-folder, or omit/\"all\" for no filter"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoProjectListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin Video Creator"],"summary":"Create Project Endpoint","description":"Create a new video project from a content brief.","operationId":"create_project_endpoint","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoProjectCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/video-creator/projects/{project_id}":{"get":{"tags":["Admin Video Creator"],"summary":"Get Project Endpoint","description":"Get a single video project.","operationId":"get_project_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Admin Video Creator"],"summary":"Update Project Endpoint","description":"Update a video project's basic fields.","operationId":"update_project_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoProjectUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin Video Creator"],"summary":"Delete Project Endpoint","description":"Delete a draft or failed video project.","operationId":"delete_project_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/video-creator/projects/{project_id}/generate-pptx":{"post":{"tags":["Admin Video Creator"],"summary":"Generate Pptx Endpoint","description":"Trigger AI slide planning + PPTX generation.","operationId":"generate_pptx_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/video-creator/projects/{project_id}/reupload-pptx":{"post":{"tags":["Admin Video Creator"],"summary":"Reupload Pptx Endpoint","description":"Handle re-upload of an edited PPTX.","operationId":"reupload_pptx_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PptxReuploadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/video-creator/projects/{project_id}/approve-pptx":{"post":{"tags":["Admin Video Creator"],"summary":"Approve Pptx Endpoint","description":"Approve the PPTX for script generation.","operationId":"approve_pptx_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/video-creator/projects/{project_id}/generate-script":{"post":{"tags":["Admin Video Creator"],"summary":"Generate Script Endpoint","description":"Trigger AI script generation from approved PPTX.","operationId":"generate_script_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/video-creator/projects/{project_id}/script":{"patch":{"tags":["Admin Video Creator"],"summary":"Update Script Endpoint","description":"Update the narration script (human edits).","operationId":"update_script_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScriptUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/video-creator/projects/{project_id}/approve-script":{"post":{"tags":["Admin Video Creator"],"summary":"Approve Script Endpoint","description":"Approve the script for video rendering.","operationId":"approve_script_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/video-creator/projects/{project_id}/render":{"post":{"tags":["Admin Video Creator"],"summary":"Render Endpoint","description":"Trigger video rendering (TTS + ffmpeg stitching).","operationId":"render_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/video-creator/projects/{project_id}/publish":{"post":{"tags":["Admin Video Creator"],"summary":"Publish Endpoint","description":"Publish rendered video to the Education Hub as a course module.","operationId":"publish_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/video-creator/projects/{project_id}/stream-video":{"get":{"tags":["Admin Video Creator"],"summary":"Stream Video Endpoint","description":"Stream video from GCS — fallback when signed URL generation fails (local dev).\nNo auth required since this is only used as a fallback URL in video elements\nwhich cannot send Authorization headers.","operationId":"stream_video_endpoint","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/video-creator/folders":{"get":{"tags":["Admin Video Creator"],"summary":"List Folders Endpoint","description":"List folders with per-folder video counts.","operationId":"list_folders_endpoint","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoFolderListResponse"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Admin Video Creator"],"summary":"Create Folder Endpoint","description":"Create a new folder.","operationId":"create_folder_endpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoFolderCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoFolderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/video-creator/folders/{folder_id}":{"patch":{"tags":["Admin Video Creator"],"summary":"Update Folder Endpoint","description":"Rename a folder.","operationId":"update_folder_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","title":"Folder Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoFolderUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoFolderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin Video Creator"],"summary":"Delete Folder Endpoint","description":"Delete a folder. Contained videos are moved to Unfiled (ON DELETE SET NULL).","operationId":"delete_folder_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","title":"Folder Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/promo-video/projects":{"get":{"tags":["Admin Promo Video"],"summary":"List Projects Endpoint","description":"List all promo video projects.","operationId":"list_projects_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoVideoListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin Promo Video"],"summary":"Create Project Endpoint","description":"Create a new promo video project.","operationId":"create_project_endpoint","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoVideoCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoVideoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/promo-video/projects/{project_id}":{"get":{"tags":["Admin Promo Video"],"summary":"Get Project Endpoint","description":"Get a single promo video project.","operationId":"get_project_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoVideoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Admin Promo Video"],"summary":"Update Project Endpoint","description":"Update a promo video project's basic fields.","operationId":"update_project_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoVideoUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoVideoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin Promo Video"],"summary":"Delete Project Endpoint","description":"Delete a promo video project.","operationId":"delete_project_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/promo-video/projects/{project_id}/generate-script":{"post":{"tags":["Admin Promo Video"],"summary":"Generate Script Endpoint","description":"Trigger AI script generation.","operationId":"generate_script_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoVideoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/promo-video/projects/{project_id}/script":{"patch":{"tags":["Admin Promo Video"],"summary":"Update Script Endpoint","description":"Update the script (human edits).","operationId":"update_script_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoScriptUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoVideoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/promo-video/projects/{project_id}/approve-script":{"post":{"tags":["Admin Promo Video"],"summary":"Approve Script Endpoint","description":"Approve the script.","operationId":"approve_script_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoVideoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/promo-video/projects/{project_id}/ai-edit-script":{"post":{"tags":["Admin Promo Video"],"summary":"Ai Edit Script Endpoint","description":"Use AI to edit the script based on a natural language instruction.","operationId":"ai_edit_script_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoScriptAIEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoVideoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/promo-video/projects/{project_id}/scene-assets":{"put":{"tags":["Admin Promo Video"],"summary":"Update Scene Assets Endpoint","description":"Update per-scene video clip assets.","operationId":"update_scene_assets_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoSceneAssetsUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoVideoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/promo-video/projects/{project_id}/configure-audio":{"post":{"tags":["Admin Promo Video"],"summary":"Configure Audio Endpoint","description":"Configure audio source (TTS voice or uploaded recordings).","operationId":"configure_audio_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoAudioConfigRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoVideoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/promo-video/projects/{project_id}/generate-audio":{"post":{"tags":["Admin Promo Video"],"summary":"Generate Audio Endpoint","description":"Trigger TTS audio generation.","operationId":"generate_audio_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoVideoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/promo-video/projects/{project_id}/composition":{"patch":{"tags":["Admin Promo Video"],"summary":"Update Composition Endpoint","description":"Update Remotion composition props.","operationId":"update_composition_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoCompositionUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoVideoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/promo-video/projects/{project_id}/approve-composition":{"post":{"tags":["Admin Promo Video"],"summary":"Approve Composition Endpoint","description":"Approve the composition for final rendering.","operationId":"approve_composition_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoVideoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/promo-video/projects/{project_id}/stale-audio":{"get":{"tags":["Admin Promo Video"],"summary":"Check Stale Audio Endpoint","description":"Check which scenes have stale audio (narration changed since TTS).","operationId":"check_stale_audio_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/promo-video/projects/{project_id}/sync-audio":{"post":{"tags":["Admin Promo Video"],"summary":"Sync Audio Endpoint","description":"Regenerate only stale audio scenes (narration changed since TTS).","operationId":"sync_audio_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoVideoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/promo-video/projects/{project_id}/generate-custom-composition":{"post":{"tags":["Admin Promo Video"],"summary":"Generate Custom Composition Endpoint","description":"Generate a custom AI-written Remotion composition for this project.","operationId":"generate_custom_composition_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoVideoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/promo-video/projects/{project_id}/edit-custom-composition":{"post":{"tags":["Admin Promo Video"],"summary":"Edit Custom Composition Endpoint","description":"Edit the custom composition using Claude Agent SDK based on a natural language instruction.","operationId":"edit_custom_composition_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoScriptAIEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/promo-video/projects/{project_id}/render":{"post":{"tags":["Admin Promo Video"],"summary":"Render Endpoint","description":"Trigger Remotion video rendering.","operationId":"render_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoVideoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/promo-video/projects/{project_id}/download":{"get":{"tags":["Admin Promo Video"],"summary":"Download Endpoint","description":"Get a signed download URL for the rendered video.","operationId":"download_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/promo-video/projects/{project_id}/stream-video":{"get":{"tags":["Admin Promo Video"],"summary":"Stream Video Promo Endpoint","description":"Stream video from GCS — fallback when signed URLs fail (local dev).","operationId":"stream_video_promo_endpoint","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/promo-video/projects/{project_id}/generate-post":{"post":{"tags":["Admin Promo Video"],"summary":"Generate Post Endpoint","description":"Generate social media post content from the project's script and brief.","operationId":"generate_post_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoPostGenerateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoVideoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/promo-video/projects/{project_id}/post":{"put":{"tags":["Admin Promo Video"],"summary":"Save Post Endpoint","description":"Save manually edited post content.","operationId":"save_post_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoPostSaveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoVideoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/promo-video/projects/{project_id}/ai-edit-post":{"post":{"tags":["Admin Promo Video"],"summary":"Ai Edit Post Endpoint","description":"Edit post content using AI based on a natural language instruction.","operationId":"ai_edit_post_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoPostAIEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoVideoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/promo-video/voice-preview/{voice_id}":{"get":{"tags":["Admin Promo Video"],"summary":"Voice Preview Endpoint","description":"Generate a short TTS preview for a voice via ElevenLabs.","operationId":"voice_preview_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"voice_id","in":"path","required":true,"schema":{"type":"string","title":"Voice Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/promo-video/projects/{project_id}/upload-token":{"post":{"tags":["Admin Promo Video"],"summary":"Send Upload Link Endpoint","description":"Create a single-use upload token for a scene and email it.","operationId":"send_upload_link_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/promo-video/projects/{project_id}/upload-tokens":{"get":{"tags":["Admin Promo Video"],"summary":"List Upload Tokens Endpoint","description":"List all upload tokens for a project.","operationId":"list_upload_tokens_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/promo-video/projects/{project_id}/scenes/{scene_number}/recording":{"delete":{"tags":["Admin Promo Video"],"summary":"Clear Scene Recording Endpoint","description":"Clear uploaded recording for a scene and expire its token.","operationId":"clear_scene_recording_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"scene_number","in":"path","required":true,"schema":{"type":"integer","title":"Scene Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/promo-video/upload/{token}":{"get":{"tags":["Admin Promo Video"],"summary":"Get Upload Page Data","description":"Get scene info for the public upload page (no auth required).","operationId":"get_upload_page_data","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin Promo Video"],"summary":"Handle Upload","description":"Complete an upload (no auth required — token is the auth).","operationId":"handle_upload","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/promo-video/upload/{token}/file":{"post":{"tags":["Admin Promo Video"],"summary":"Upload File Endpoint","description":"Upload a video file for a scene (no auth — token is the auth).","operationId":"upload_file_endpoint","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_file_endpoint"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/link-routes/resolve/{slug}":{"get":{"tags":["Link Routes"],"summary":"Resolve Link Route","description":"Resolve a link route slug to its destination path.\n\nUsed by the mobile app when iOS universal links bypass the link resolver.","operationId":"resolve_link_route","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkRouteResolveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/link-routes/public/{slug}":{"get":{"tags":["Link Routes"],"summary":"Get Public Link Route","description":"Destination and preview text for an active short link.\n\nUnauthenticated: called by the link.gololi.ai resolver on every click, so\nit is exempt from the per-IP limit (all resolver traffic shares a few\negress IPs; an email send can produce bursts of clicks). It exposes only\nwhat the public short-link page already shows.","operationId":"get_public_link_route","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicLinkRouteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/link-routes/targets":{"get":{"tags":["Admin Link Routes"],"summary":"List Link Route Targets Endpoint","operationId":"list_link_route_targets_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"targetType","in":"query","required":true,"schema":{"enum":["education_topic","education_course","schedule","food_log","sage_chat","app_home"],"type":"string","title":"Targettype"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkRouteTargetListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/link-routes":{"get":{"tags":["Admin Link Routes"],"summary":"List Link Routes Endpoint","operationId":"list_link_routes_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by slug","title":"Query"},"description":"Search by slug"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkRouteListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin Link Routes"],"summary":"Create Link Route Endpoint","operationId":"create_link_route_endpoint","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkRouteCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkRouteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/link-routes/{route_id}":{"get":{"tags":["Admin Link Routes"],"summary":"Get Link Route Endpoint","operationId":"get_link_route_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"route_id","in":"path","required":true,"schema":{"type":"integer","title":"Route Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkRouteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Admin Link Routes"],"summary":"Update Link Route Endpoint","operationId":"update_link_route_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"route_id","in":"path","required":true,"schema":{"type":"integer","title":"Route Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkRouteUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkRouteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin Link Routes"],"summary":"Delete Link Route Endpoint","operationId":"delete_link_route_endpoint","security":[{"HTTPBearer":[]}],"parameters":[{"name":"route_id","in":"path","required":true,"schema":{"type":"integer","title":"Route Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/taste-test/{share_token}":{"get":{"tags":["Taste Test"],"summary":"Get Taste Test Round","operationId":"get_taste_test_round","parameters":[{"name":"share_token","in":"path","required":true,"schema":{"type":"string","title":"Share Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TasteTestRoundInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/taste-test/{share_token}/voters":{"post":{"tags":["Taste Test"],"summary":"Register Taste Test Voter","operationId":"register_taste_test_voter","parameters":[{"name":"share_token","in":"path","required":true,"schema":{"type":"string","title":"Share Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoterRegisterRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoterRegisterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/taste-test/{share_token}/session":{"get":{"tags":["Taste Test"],"summary":"Get Taste Test Session","operationId":"get_taste_test_session","parameters":[{"name":"share_token","in":"path","required":true,"schema":{"type":"string","title":"Share Token"}},{"name":"x-taste-test-voter","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Taste-Test-Voter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoterSession"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/taste-test/{share_token}/answers/{answer_id}/rating":{"put":{"tags":["Taste Test"],"summary":"Rate Taste Test Answer","operationId":"rate_taste_test_answer","parameters":[{"name":"share_token","in":"path","required":true,"schema":{"type":"string","title":"Share Token"}},{"name":"answer_id","in":"path","required":true,"schema":{"type":"string","title":"Answer Id"}},{"name":"x-taste-test-voter","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Taste-Test-Voter"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerRatingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoterQuestion"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/taste-test/{share_token}/answers/{answer_id}/flag":{"put":{"tags":["Taste Test"],"summary":"Flag Taste Test Answer","operationId":"flag_taste_test_answer","parameters":[{"name":"share_token","in":"path","required":true,"schema":{"type":"string","title":"Share Token"}},{"name":"answer_id","in":"path","required":true,"schema":{"type":"string","title":"Answer Id"}},{"name":"x-taste-test-voter","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Taste-Test-Voter"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsafeFlagRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoterQuestion"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/taste-test/{share_token}/questions/{question_id}/pick":{"put":{"tags":["Taste Test"],"summary":"Pick Taste Test Answer","operationId":"pick_taste_test_answer","parameters":[{"name":"share_token","in":"path","required":true,"schema":{"type":"string","title":"Share Token"}},{"name":"question_id","in":"path","required":true,"schema":{"type":"string","title":"Question Id"}},{"name":"x-taste-test-voter","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Taste-Test-Voter"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionPickRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoterQuestion"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/taste-test/{share_token}/ranking":{"get":{"tags":["Taste Test"],"summary":"Get Taste Test Ranking","operationId":"get_taste_test_ranking","parameters":[{"name":"share_token","in":"path","required":true,"schema":{"type":"string","title":"Share Token"}},{"name":"x-taste-test-voter","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Taste-Test-Voter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalRanking"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/taste-test/{share_token}/choice":{"post":{"tags":["Taste Test"],"summary":"Choose Taste Test Model","operationId":"choose_taste_test_model","parameters":[{"name":"share_token","in":"path","required":true,"schema":{"type":"string","title":"Share Token"}},{"name":"x-taste-test-voter","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Taste-Test-Voter"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChoiceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalRanking"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/taste-test/{share_token}/reveal":{"get":{"tags":["Taste Test"],"summary":"Get Taste Test Reveal","operationId":"get_taste_test_reveal","parameters":[{"name":"share_token","in":"path","required":true,"schema":{"type":"string","title":"Share Token"}},{"name":"x-taste-test-voter","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Taste-Test-Voter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalReveal"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/taste-test/rounds":{"get":{"tags":["Admin Taste Test"],"summary":"List Taste Test Rounds","operationId":"list_taste_test_rounds","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRoundList"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/taste-test/rounds/{round_id}":{"patch":{"tags":["Admin Taste Test"],"summary":"Update Taste Test Round","operationId":"update_taste_test_round","security":[{"HTTPBearer":[]}],"parameters":[{"name":"round_id","in":"path","required":true,"schema":{"type":"string","title":"Round Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRoundUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRoundSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/taste-test/rounds/{round_id}/rotate-link":{"post":{"tags":["Admin Taste Test"],"summary":"Rotate Taste Test Link","operationId":"rotate_taste_test_link","security":[{"HTTPBearer":[]}],"parameters":[{"name":"round_id","in":"path","required":true,"schema":{"type":"string","title":"Round Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRoundSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/taste-test/rounds/{round_id}/results":{"get":{"tags":["Admin Taste Test"],"summary":"Get Taste Test Results","operationId":"get_taste_test_results","security":[{"HTTPBearer":[]}],"parameters":[{"name":"round_id","in":"path","required":true,"schema":{"type":"string","title":"Round Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoundResults"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/taste-test/rounds/{round_id}/export":{"get":{"tags":["Admin Taste Test"],"summary":"Export Taste Test Ratings","operationId":"export_taste_test_ratings","security":[{"HTTPBearer":[]}],"parameters":[{"name":"round_id","in":"path","required":true,"schema":{"type":"string","title":"Round Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RatingsExport"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Read Root","operationId":"read_root","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health Check","operationId":"health_check","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health/grail":{"get":{"summary":"Grail Health Check","description":"Diagnostic-only Grail integration health check; not used for readiness.","operationId":"grail_health_check","parameters":[{"name":"X-Cron-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Cron-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ready":{"get":{"summary":"Readiness Check","description":"Readiness probe that checks if all dependencies are available.\nReturns 503 if any dependency is not ready, 200 if ready.\nUsed by Cloud Run startup probes to avoid routing traffic to cold instances.","operationId":"readiness_check","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AIConsentResponse":{"properties":{"version":{"type":"string","title":"Version"},"status":{"type":"string","enum":["unknown","granted","declined"],"title":"Status"},"title":{"type":"string","title":"Title"},"summary":{"type":"string","title":"Summary"},"data_shared":{"items":{"type":"string"},"type":"array","title":"Data Shared"},"providers":{"items":{"$ref":"#/components/schemas/AIProviderDisclosure"},"type":"array","title":"Providers"},"privacy_policy_url":{"type":"string","title":"Privacy Policy Url"}},"type":"object","required":["version","status","title","summary","data_shared","providers","privacy_policy_url"],"title":"AIConsentResponse"},"AIConsentUpdateRequest":{"properties":{"version":{"type":"string","title":"Version"},"granted":{"type":"boolean","title":"Granted"}},"type":"object","required":["version","granted"],"title":"AIConsentUpdateRequest"},"AILogDetail":{"properties":{"id":{"type":"string","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"agent_type":{"type":"string","title":"Agent Type"},"model_name":{"type":"string","title":"Model Name"},"topic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic"},"status":{"type":"string","title":"Status"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"cost_usd":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Cost Usd"},"token_usage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Token Usage"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"flagged":{"type":"boolean","title":"Flagged","default":false},"input_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input Text"},"input_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input Image Url"},"food_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Food Name"},"caloratio_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Caloratio Score"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt"},"user_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Prompt"},"ai_response":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Response"},"latency_breakdown_ms":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Latency Breakdown Ms"},"error_traceback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Traceback"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"tool_calls":{"items":{"$ref":"#/components/schemas/ToolCall"},"type":"array","title":"Tool Calls"},"agent_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Agent Context"},"available_tools":{"items":{"type":"string"},"type":"array","title":"Available Tools"},"is_replay":{"type":"boolean","title":"Is Replay","default":false},"original_log_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Log Id"}},"type":"object","required":["id","created_at","agent_type","model_name","status"],"title":"AILogDetail","description":"Full AI log entry with prompts and response."},"AILogEntry":{"properties":{"id":{"type":"string","title":"Id"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"userId":{"type":"string","title":"Userid"},"foodName":{"type":"string","title":"Foodname"},"calories":{"type":"number","title":"Calories"},"rawText":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rawtext"},"modelVersion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Modelversion"}},"type":"object","required":["id","createdAt","userId","foodName","calories"],"title":"AILogEntry"},"AILogListResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/AILogEntry"},"type":"array","title":"Results"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextcursor"}},"type":"object","required":["results"],"title":"AILogListResponse"},"AILogStatistics":{"properties":{"total_requests":{"type":"integer","title":"Total Requests","default":0},"successful_requests":{"type":"integer","title":"Successful Requests","default":0},"failed_requests":{"type":"integer","title":"Failed Requests","default":0},"total_cost_usd":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Cost Usd","default":"0"},"total_tokens":{"type":"integer","title":"Total Tokens","default":0},"avg_latency_ms":{"type":"number","title":"Avg Latency Ms","default":0},"by_agent_type":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"By Agent Type"},"by_model":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"By Model"}},"type":"object","title":"AILogStatistics","description":"Aggregated statistics for AI logs."},"AILogSummary":{"properties":{"id":{"type":"string","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"agent_type":{"type":"string","title":"Agent Type"},"model_name":{"type":"string","title":"Model Name"},"topic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic"},"status":{"type":"string","title":"Status"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"cost_usd":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Cost Usd"},"token_usage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Token Usage"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"flagged":{"type":"boolean","title":"Flagged","default":false},"input_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input Text"},"input_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input Image Url"},"food_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Food Name"},"caloratio_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Caloratio Score"}},"type":"object","required":["id","created_at","agent_type","model_name","status"],"title":"AILogSummary","description":"Summary of an AI log entry for list view."},"AIProviderDisclosure":{"properties":{"name":{"type":"string","title":"Name"},"purpose":{"type":"string","title":"Purpose"},"privacy_url":{"type":"string","title":"Privacy Url"}},"type":"object","required":["name","purpose","privacy_url"],"title":"AIProviderDisclosure"},"AIRepairPrompt":{"properties":{"prompt":{"type":"string","title":"Prompt"},"issue_type":{"type":"string","title":"Issue Type"},"issue_id":{"type":"string","title":"Issue Id"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"}},"type":"object","required":["prompt","issue_type","issue_id","generated_at"],"title":"AIRepairPrompt","description":"AI-generated prompt for fixing an issue."},"AboutMeChangeItem":{"properties":{"action":{"type":"string","title":"Action"},"description":{"type":"string","title":"Description"}},"type":"object","required":["action","description"],"title":"AboutMeChangeItem"},"AboutMeResponse":{"properties":{"sections":{"additionalProperties":{"$ref":"#/components/schemas/AboutMeSectionResponse"},"type":"object","title":"Sections"},"is_empty":{"type":"boolean","title":"Is Empty"},"generated_at":{"type":"string","title":"Generated At"}},"type":"object","required":["sections","is_empty","generated_at"],"title":"AboutMeResponse"},"AboutMeSectionResponse":{"properties":{"title":{"type":"string","title":"Title"},"bullets":{"items":{"type":"string"},"type":"array","title":"Bullets"}},"type":"object","required":["title","bullets"],"title":"AboutMeSectionResponse"},"AboutMeUpdateRequest":{"properties":{"correction":{"type":"string","minLength":1,"title":"Correction","description":"Free-text description of what to change"}},"type":"object","required":["correction"],"title":"AboutMeUpdateRequest"},"AboutMeUpdateResponse":{"properties":{"changes":{"items":{"$ref":"#/components/schemas/AboutMeChangeItem"},"type":"array","title":"Changes"},"sections":{"additionalProperties":{"$ref":"#/components/schemas/AboutMeSectionResponse"},"type":"object","title":"Sections"},"is_empty":{"type":"boolean","title":"Is Empty"},"generated_at":{"type":"string","title":"Generated At"}},"type":"object","required":["changes","sections","is_empty","generated_at"],"title":"AboutMeUpdateResponse"},"ActiveUserSummary":{"properties":{"dau":{"type":"integer","title":"Dau"},"wau":{"type":"integer","title":"Wau"},"mau":{"type":"integer","title":"Mau"},"avgDauLast7Days":{"type":"number","title":"Avgdaulast7Days","default":0},"avgDauMauRatioLast7Days":{"type":"number","title":"Avgdaumauratiolast7Days","default":0}},"type":"object","required":["dau","wau","mau"],"title":"ActiveUserSummary"},"AddAICreditsResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"AddAICreditsResponse","description":"Response model for adding AI credits to a user."},"AddCodeRequest":{"properties":{"code":{"type":"string","maxLength":30,"minLength":3,"title":"Code"}},"type":"object","required":["code"],"title":"AddCodeRequest","description":"Request to add a new promotion code for an affiliate."},"AdminCancelSubscriptionRequest":{"properties":{"cancelImmediately":{"type":"boolean","title":"Cancelimmediately","default":false},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"AdminCancelSubscriptionRequest"},"AdminCancelSubscriptionResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"subscriptionId":{"type":"string","title":"Subscriptionid"},"status":{"type":"string","title":"Status"},"canceledAt":{"type":"string","format":"date-time","title":"Canceledat"},"cancelAtPeriodEnd":{"type":"boolean","title":"Cancelatperiodend"}},"type":"object","required":["success","subscriptionId","status","canceledAt","cancelAtPeriodEnd"],"title":"AdminCancelSubscriptionResponse"},"AdminProfileResponse":{"properties":{"user":{"$ref":"#/components/schemas/UserInfo"},"role":{"type":"string","title":"Role"}},"type":"object","required":["user","role"],"title":"AdminProfileResponse"},"AdminRefundRequest":{"properties":{"paymentIntentId":{"type":"string","title":"Paymentintentid"},"amountInCents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amountincents"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"cancelSubscription":{"type":"boolean","title":"Cancelsubscription","default":false}},"type":"object","required":["paymentIntentId"],"title":"AdminRefundRequest"},"AdminRefundResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"refundId":{"type":"string","title":"Refundid"},"amountRefunded":{"type":"integer","title":"Amountrefunded"},"status":{"type":"string","title":"Status"},"subscriptionCanceled":{"type":"boolean","title":"Subscriptioncanceled","default":false}},"type":"object","required":["success","refundId","amountRefunded","status"],"title":"AdminRefundResponse"},"AdminRoundList":{"properties":{"results":{"items":{"$ref":"#/components/schemas/AdminRoundSummary"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"AdminRoundList"},"AdminRoundSummary":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"sourceVersion":{"type":"integer","title":"Sourceversion"},"sourceGeneratedAt":{"type":"string","title":"Sourcegeneratedat"},"shareToken":{"type":"string","title":"Sharetoken"},"isActive":{"type":"boolean","title":"Isactive"},"votingOpen":{"type":"boolean","title":"Votingopen"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"voterCount":{"type":"integer","title":"Votercount"}},"type":"object","required":["id","name","sourceVersion","sourceGeneratedAt","shareToken","isActive","votingOpen","createdAt","voterCount"],"title":"AdminRoundSummary"},"AdminRoundUpdate":{"properties":{"votingOpen":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Votingopen"},"isActive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Isactive"}},"type":"object","title":"AdminRoundUpdate"},"AdminSubscriptionCreateRequest":{"properties":{"uid":{"type":"string","title":"Uid"},"productIdentifier":{"type":"string","title":"Productidentifier"},"priceInCents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priceincents"},"billingFrequency":{"type":"string","title":"Billingfrequency"},"trialPeriodDays":{"type":"integer","title":"Trialperioddays","default":0}},"type":"object","required":["uid","productIdentifier","billingFrequency"],"title":"AdminSubscriptionCreateRequest"},"AdminSubscriptionCreateResponse":{"properties":{"subscriptionId":{"type":"string","title":"Subscriptionid"},"stripeSubscriptionId":{"type":"string","title":"Stripesubscriptionid"},"status":{"type":"string","title":"Status"},"checkoutUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkouturl"}},"type":"object","required":["subscriptionId","stripeSubscriptionId","status"],"title":"AdminSubscriptionCreateResponse"},"AdminUserEmailConsentResponse":{"properties":{"activity_emails":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Activity Emails"},"activity_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activity Source"},"activity_recorded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Activity Recorded At"},"activity_wording_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activity Wording Version"},"marketing_emails":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Marketing Emails"},"marketing_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Marketing Source"},"marketing_recorded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Marketing Recorded At"},"marketing_wording_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Marketing Wording Version"},"history":{"items":{"$ref":"#/components/schemas/EmailConsentHistoryEntry"},"type":"array","title":"History"}},"type":"object","required":["activity_emails","activity_source","activity_recorded_at","activity_wording_version","marketing_emails","marketing_source","marketing_recorded_at","marketing_wording_version","history"],"title":"AdminUserEmailConsentResponse"},"AdvanceAvailabilityResponse":{"properties":{"slots":{"items":{"$ref":"#/components/schemas/AdvanceSlot"},"type":"array","title":"Slots"}},"type":"object","required":["slots"],"title":"AdvanceAvailabilityResponse","description":"Available advance booking slots for a date."},"AdvanceJoinQueueRequest":{"properties":{"requested_time":{"type":"string","format":"date-time","title":"Requested Time"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"user_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Timezone"}},"type":"object","required":["requested_time"],"title":"AdvanceJoinQueueRequest","description":"Request body for advance queue booking."},"AdvanceSlot":{"properties":{"officeHoursId":{"type":"integer","title":"Officehoursid"},"startTime":{"type":"string","title":"Starttime"},"endTime":{"type":"string","title":"Endtime"},"totalSlots":{"type":"integer","title":"Totalslots"},"bookedSlots":{"type":"integer","title":"Bookedslots"},"availableSlots":{"type":"integer","title":"Availableslots"}},"type":"object","required":["officeHoursId","startTime","endTime","totalSlots","bookedSlots","availableSlots"],"title":"AdvanceSlot","description":"A single office hours slot with capacity info."},"AffiliateCode":{"properties":{"id":{"type":"integer","title":"Id"},"code":{"type":"string","title":"Code"},"stripeCouponId":{"type":"string","title":"Stripecouponid"},"stripePromotionCodeId":{"type":"string","title":"Stripepromotioncodeid"},"isActive":{"type":"boolean","title":"Isactive"},"createdAt":{"type":"string","title":"Createdat"},"deactivatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deactivatedat"}},"type":"object","required":["id","code","stripeCouponId","stripePromotionCodeId","isActive","createdAt"],"title":"AffiliateCode","description":"A single promotion code belonging to an affiliate."},"AffiliateCodesResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AffiliateCode"},"type":"array","title":"Items"},"activeCount":{"type":"integer","title":"Activecount"},"maxActive":{"type":"integer","title":"Maxactive","default":5}},"type":"object","required":["items","activeCount"],"title":"AffiliateCodesResponse","description":"List of an affiliate's promotion codes."},"AffiliateDashboard":{"properties":{"affiliate":{"$ref":"#/components/schemas/AffiliateInfo"},"earnings":{"items":{"$ref":"#/components/schemas/AffiliateEarning"},"type":"array","title":"Earnings"},"payments":{"items":{"$ref":"#/components/schemas/AffiliatePayment"},"type":"array","title":"Payments"},"referredSubscriptions":{"items":{"$ref":"#/components/schemas/AffiliateSubscription"},"type":"array","title":"Referredsubscriptions"},"totalEarnedCents":{"type":"integer","title":"Totalearnedcents"},"totalPaidCents":{"type":"integer","title":"Totalpaidcents"},"balanceCents":{"type":"integer","title":"Balancecents"}},"type":"object","required":["affiliate","earnings","payments","referredSubscriptions","totalEarnedCents","totalPaidCents","balanceCents"],"title":"AffiliateDashboard","description":"Aggregated dashboard data for an affiliate."},"AffiliateEarning":{"properties":{"id":{"type":"integer","title":"Id"},"periodStart":{"type":"string","title":"Periodstart"},"periodEnd":{"type":"string","title":"Periodend"},"referredSubscriptionCount":{"type":"integer","title":"Referredsubscriptioncount"},"grossRevenueCents":{"type":"integer","title":"Grossrevenuecents"},"earnedCents":{"type":"integer","title":"Earnedcents"},"isFinalized":{"type":"boolean","title":"Isfinalized"}},"type":"object","required":["id","periodStart","periodEnd","referredSubscriptionCount","grossRevenueCents","earnedCents","isFinalized"],"title":"AffiliateEarning","description":"Monthly earnings aggregation for an affiliate."},"AffiliateInfo":{"properties":{"id":{"type":"integer","title":"Id"},"userId":{"type":"string","title":"Userid"},"affiliateName":{"type":"string","title":"Affiliatename"},"isActive":{"type":"boolean","title":"Isactive"},"discountPercent":{"type":"number","title":"Discountpercent"},"revenueSharePercent":{"type":"number","title":"Revenuesharepercent"},"codes":{"items":{"$ref":"#/components/schemas/AffiliateCode"},"type":"array","title":"Codes","default":[]},"referredCount":{"type":"integer","title":"Referredcount","default":0},"totalEarnedCents":{"type":"integer","title":"Totalearnedcents","default":0},"totalPaidCents":{"type":"integer","title":"Totalpaidcents","default":0},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["id","userId","affiliateName","isActive","discountPercent","revenueSharePercent"],"title":"AffiliateInfo","description":"Affiliate profile with commission settings.\n\nCoupon codes are tracked separately in `affiliate_promotion_codes` and\nreturned via the `codes` list (active codes only)."},"AffiliateListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AffiliateInfo"},"type":"array","title":"Items"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextcursor"}},"type":"object","required":["items"],"title":"AffiliateListResponse","description":"Paginated list of affiliates."},"AffiliatePayment":{"properties":{"id":{"type":"integer","title":"Id"},"createdAt":{"type":"string","title":"Createdat"},"amountCents":{"type":"integer","title":"Amountcents"},"paymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentmethod"},"referenceNote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenote"},"periodStart":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Periodstart"},"periodEnd":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Periodend"}},"type":"object","required":["id","createdAt","amountCents"],"title":"AffiliatePayment","description":"Manual payout recorded by admin."},"AffiliatePublicInfo":{"properties":{"affiliateName":{"type":"string","title":"Affiliatename"},"discountPercent":{"type":"number","title":"Discountpercent"},"code":{"type":"string","title":"Code"}},"type":"object","required":["affiliateName","discountPercent","code"],"title":"AffiliatePublicInfo","description":"Public-facing affiliate info for a referral URL (?ref=CODE).\n\nReturned by the link-resolver landing page after resolving a code."},"AffiliateSubscription":{"properties":{"id":{"type":"integer","title":"Id"},"createdAt":{"type":"string","title":"Createdat"},"subscriptionId":{"type":"integer","title":"Subscriptionid"},"userId":{"type":"string","title":"Userid"},"userEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Useremail"},"userName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"productName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Productname"},"entitlement":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entitlement"},"isActive":{"type":"boolean","title":"Isactive","default":true}},"type":"object","required":["id","createdAt","subscriptionId","userId"],"title":"AffiliateSubscription","description":"A subscription attributed to an affiliate."},"AffiliateSubscriptionsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AffiliateSubscription"},"type":"array","title":"Items"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextcursor"}},"type":"object","required":["items"],"title":"AffiliateSubscriptionsResponse","description":"List of referred subscriptions."},"AnalyticsCards":{"properties":{"totalUsers":{"type":"integer","title":"Totalusers"},"newUsers":{"type":"integer","title":"Newusers"},"totalPaidSubscribers":{"type":"integer","title":"Totalpaidsubscribers"},"paidSubscribersBySource":{"additionalProperties":{"type":"integer"},"type":"object","title":"Paidsubscribersbysource"},"newSubscriptions":{"type":"integer","title":"Newsubscriptions"},"newSubscriptionsByType":{"additionalProperties":{"type":"integer"},"type":"object","title":"Newsubscriptionsbytype"},"totalRevenueCents":{"type":"integer","title":"Totalrevenuecents"},"foodItemsLogged":{"type":"integer","title":"Fooditemslogged"},"supportGroupsRegistered":{"type":"integer","title":"Supportgroupsregistered"},"supportGroupsAttended":{"type":"integer","title":"Supportgroupsattended"},"officeHoursQueued":{"type":"integer","title":"Officehoursqueued"},"officeHoursCompleted":{"type":"integer","title":"Officehourscompleted"},"caloratioAIAnalyses":{"type":"integer","title":"Caloratioaianalyses"},"caloratioSuccessful":{"type":"integer","title":"Caloratiosuccessful"},"certificationsEarned":{"type":"integer","title":"Certificationsearned"},"videoMinutesWatched":{"type":"integer","title":"Videominuteswatched"}},"type":"object","required":["totalUsers","newUsers","totalPaidSubscribers","paidSubscribersBySource","newSubscriptions","newSubscriptionsByType","totalRevenueCents","foodItemsLogged","supportGroupsRegistered","supportGroupsAttended","officeHoursQueued","officeHoursCompleted","caloratioAIAnalyses","caloratioSuccessful","certificationsEarned","videoMinutesWatched"],"title":"AnalyticsCards"},"AnalyticsDashboardResponse":{"properties":{"cards":{"$ref":"#/components/schemas/AnalyticsCards"},"series":{"$ref":"#/components/schemas/AnalyticsSeries"}},"type":"object","required":["cards","series"],"title":"AnalyticsDashboardResponse"},"AnalyticsSeries":{"properties":{"userGrowth":{"items":{"$ref":"#/components/schemas/TimeSeriesPoint"},"type":"array","title":"Usergrowth"},"foodLogs":{"items":{"$ref":"#/components/schemas/TimeSeriesPoint"},"type":"array","title":"Foodlogs"}},"type":"object","required":["userGrowth","foodLogs"],"title":"AnalyticsSeries"},"AnswerCreateRequest":{"properties":{"answerText":{"type":"string","title":"Answertext"},"isCorrect":{"type":"boolean","title":"Iscorrect","default":false},"sortOrder":{"type":"integer","title":"Sortorder","default":0}},"type":"object","required":["answerText"],"title":"AnswerCreateRequest"},"AnswerRatingRequest":{"properties":{"rating":{"anyOf":[{"type":"string","enum":["up","average","down"]},{"type":"null"}],"title":"Rating"}},"type":"object","required":["rating"],"title":"AnswerRatingRequest"},"AnswerResponse":{"properties":{"id":{"type":"string","title":"Id"},"answerText":{"type":"string","title":"Answertext"},"isCorrect":{"type":"boolean","title":"Iscorrect"},"sortOrder":{"type":"integer","title":"Sortorder"}},"type":"object","required":["id","answerText","isCorrect","sortOrder"],"title":"AnswerResponse"},"AppSettingCreate":{"properties":{"key":{"type":"string","maxLength":100,"minLength":1,"pattern":"^[a-z_]+$","title":"Key"},"value":{"type":"string","minLength":1,"title":"Value"},"setting_type":{"type":"string","pattern":"^(text|markdown|json)$","title":"Setting Type","default":"markdown"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"admin_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Notes"}},"type":"object","required":["key","value"],"title":"AppSettingCreate","description":"Schema for creating a new app setting."},"AppSettingListResponse":{"properties":{"settings":{"items":{"$ref":"#/components/schemas/AppSettingResponse"},"type":"array","title":"Settings"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["settings","total"],"title":"AppSettingListResponse","description":"Response schema for listing app settings."},"AppSettingResponse":{"properties":{"id":{"type":"string","title":"Id"},"key":{"type":"string","title":"Key"},"value":{"type":"string","title":"Value"},"setting_type":{"type":"string","title":"Setting Type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_active":{"type":"boolean","title":"Is Active"},"version":{"type":"integer","title":"Version"},"modified_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Modified By"},"admin_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","key","value","setting_type","is_active","version","created_at","updated_at"],"title":"AppSettingResponse","description":"Response schema for a single app setting."},"AppSettingUpdate":{"properties":{"value":{"type":"string","minLength":1,"title":"Value"},"admin_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Notes"}},"type":"object","required":["value"],"title":"AppSettingUpdate","description":"Schema for updating an app setting."},"AppointmentCreateRequest":{"properties":{"patient_id":{"type":"string","title":"Patient Id"},"provider_id":{"type":"string","title":"Provider Id"},"appointment_datetime":{"type":"string","format":"date-time","title":"Appointment Datetime"},"duration_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Minutes"},"is_telemed":{"type":"boolean","title":"Is Telemed","default":true},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"appointment_details":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Appointment Details"},"visit_type_id":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Visit Type Id"}},"type":"object","required":["patient_id","provider_id","appointment_datetime"],"title":"AppointmentCreateRequest","description":"Create an advance office-hours appointment from an external scheduler."},"AppointmentUpdateRequest":{"properties":{"patient_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Id"},"provider_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Id"},"appointment_datetime":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Appointment Datetime"},"duration_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Minutes"},"is_telemed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Telemed"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"appointment_details":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Appointment Details"},"visit_type_id":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Visit Type Id"}},"type":"object","title":"AppointmentUpdateRequest","description":"Update an existing office-hours appointment from an external scheduler."},"ApproveRequest":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"admin_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Notes"}},"type":"object","title":"ApproveRequest","description":"Request body for approving a staging entry with optional edits."},"ApprovedEntry":{"properties":{"id":{"type":"string","title":"Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"content":{"type":"string","title":"Content"},"source_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Type"},"source_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","content"],"title":"ApprovedEntry","description":"An approved RAG content entry sourced from transcript FAQs."},"ApprovedListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ApprovedEntry"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"ApprovedListResponse","description":"Paginated list of approved transcript FAQ RAG entries."},"AuthorInfo":{"properties":{"id":{"type":"string","title":"Id"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Displayname"},"photoUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photourl"}},"type":"object","required":["id"],"title":"AuthorInfo"},"BackfillResponse":{"properties":{"processed":{"type":"integer","title":"Processed"},"failed":{"type":"integer","title":"Failed"},"total_missing":{"type":"integer","title":"Total Missing"}},"type":"object","required":["processed","failed","total_missing"],"title":"BackfillResponse","description":"Response from embedding backfill operation."},"BackgroundJobDetail":{"properties":{"id":{"type":"string","title":"Id"},"job_type":{"type":"string","title":"Job Type"},"status":{"type":"string","title":"Status"},"priority":{"type":"integer","title":"Priority"},"retry_count":{"type":"integer","title":"Retry Count"},"max_retries":{"type":"integer","title":"Max Retries"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_at":{"type":"string","title":"Created At"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"run_after":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run After"},"idempotency_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency Key"},"payload_preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payload Preview"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"}},"type":"object","required":["id","job_type","status","priority","retry_count","max_retries","created_at","payload"],"title":"BackgroundJobDetail"},"BackgroundJobListResponse":{"properties":{"jobs":{"items":{"$ref":"#/components/schemas/BackgroundJobSummary"},"type":"array","title":"Jobs"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["jobs","total","limit","offset"],"title":"BackgroundJobListResponse"},"BackgroundJobSummary":{"properties":{"id":{"type":"string","title":"Id"},"job_type":{"type":"string","title":"Job Type"},"status":{"type":"string","title":"Status"},"priority":{"type":"integer","title":"Priority"},"retry_count":{"type":"integer","title":"Retry Count"},"max_retries":{"type":"integer","title":"Max Retries"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_at":{"type":"string","title":"Created At"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"run_after":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run After"},"idempotency_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency Key"},"payload_preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payload Preview"}},"type":"object","required":["id","job_type","status","priority","retry_count","max_retries","created_at"],"title":"BackgroundJobSummary"},"BariatricCalculatorInput":{"properties":{"age":{"type":"integer","maximum":100.0,"minimum":18.0,"title":"Age"},"height_feet":{"type":"integer","maximum":8.0,"minimum":3.0,"title":"Height Feet"},"height_inches":{"type":"integer","maximum":11.0,"minimum":0.0,"title":"Height Inches"},"weight_lbs":{"type":"number","maximum":1000.0,"exclusiveMinimum":50.0,"title":"Weight Lbs"},"highest_weight_lbs":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Highest Weight Lbs"},"gender":{"type":"string","pattern":"^(male|female)$","title":"Gender"},"has_diabetes":{"type":"boolean","title":"Has Diabetes","default":false},"takes_insulin":{"type":"boolean","title":"Takes Insulin","default":false},"insulin_units_per_day":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Insulin Units Per Day"},"weight_gaining_medications":{"items":{"type":"string"},"type":"array","title":"Weight Gaining Medications","default":[]},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"}},"type":"object","required":["age","height_feet","height_inches","weight_lbs","gender"],"title":"BariatricCalculatorInput"},"BlogPostCreate":{"properties":{"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"subtitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtitle"},"slug":{"type":"string","maxLength":200,"minLength":1,"title":"Slug"},"meta_description":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Meta Description"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"content_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Html"},"excerpt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Excerpt"},"featured_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Featured Image Url"},"author":{"type":"string","title":"Author","default":"Dr. Matthew Weiner"},"status":{"type":"string","title":"Status","default":"draft"},"target_keywords":{"items":{"type":"string"},"type":"array","title":"Target Keywords","default":[]},"ai_search_terms":{"items":{"type":"string"},"type":"array","title":"Ai Search Terms","default":[]},"structured_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Structured Data"},"app_promotion":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"App Promotion"}},"type":"object","required":["title","slug"],"title":"BlogPostCreate"},"BlogPostEditRequest":{"properties":{"instructions":{"type":"string","maxLength":5000,"minLength":1,"title":"Instructions"}},"type":"object","required":["instructions"],"title":"BlogPostEditRequest"},"BlogPostUpdate":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"subtitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtitle"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"meta_description":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Meta Description"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"content_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Html"},"excerpt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Excerpt"},"featured_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Featured Image Url"},"author":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"target_keywords":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Target Keywords"},"ai_search_terms":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Ai Search Terms"},"structured_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Structured Data"},"app_promotion":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"App Promotion"}},"type":"object","title":"BlogPostUpdate"},"Body_add_credits_endpoint":{"properties":{"formID":{"type":"string","title":"Formid"},"submissionID":{"type":"string","title":"Submissionid"},"rawRequest":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rawrequest"}},"type":"object","required":["formID","submissionID"],"title":"Body_add_credits_endpoint"},"Body_consent_submit":{"properties":{"decision":{"type":"string","title":"Decision"},"csrf_token":{"type":"string","title":"Csrf Token"},"client_id":{"type":"string","title":"Client Id"},"redirect_uri":{"type":"string","title":"Redirect Uri"},"response_type":{"type":"string","title":"Response Type","default":"code"},"scope":{"type":"string","title":"Scope","default":""},"state":{"type":"string","title":"State","default":""},"code_challenge":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Challenge"},"code_challenge_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Challenge Method"},"resource":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource"}},"type":"object","required":["decision","csrf_token","client_id","redirect_uri"],"title":"Body_consent_submit"},"Body_introspect":{"properties":{"token":{"type":"string","title":"Token","default":""},"token_type_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Type Hint"}},"type":"object","title":"Body_introspect"},"Body_login_submit":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"},"client_id":{"type":"string","title":"Client Id"},"redirect_uri":{"type":"string","title":"Redirect Uri"},"response_type":{"type":"string","title":"Response Type","default":"code"},"scope":{"type":"string","title":"Scope","default":""},"state":{"type":"string","title":"State","default":""},"code_challenge":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Challenge"},"code_challenge_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Challenge Method"},"resource":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource"}},"type":"object","required":["email","password","client_id","redirect_uri"],"title":"Body_login_submit"},"Body_revoke":{"properties":{"token":{"type":"string","title":"Token"},"token_type_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Type Hint"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"}},"type":"object","required":["token"],"title":"Body_revoke"},"Body_token":{"properties":{"grant_type":{"type":"string","title":"Grant Type"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"redirect_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Uri"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"},"code_verifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"},"resource":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource"}},"type":"object","required":["grant_type"],"title":"Body_token"},"Body_upload_file_endpoint":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_file_endpoint"},"Body_upload_image":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"description":{"type":"string","title":"Description","default":""},"tags":{"type":"string","title":"Tags","default":""},"topic_cluster":{"type":"string","title":"Topic Cluster","default":""},"source":{"type":"string","title":"Source","default":"upload"},"source_url":{"type":"string","title":"Source Url","default":""}},"type":"object","required":["file"],"title":"Body_upload_image"},"Body_upload_image_batch":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files"},"metadata":{"type":"string","title":"Metadata","default":"[]"}},"type":"object","required":["files"],"title":"Body_upload_image_batch"},"Body_upload_library_video":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"name":{"type":"string","title":"Name","default":""},"description":{"type":"string","title":"Description","default":""},"video_type":{"type":"string","title":"Video Type","default":"normal"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"resolution_width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Resolution Width"},"resolution_height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Resolution Height"},"trim_start_seconds":{"type":"number","title":"Trim Start Seconds","default":0},"trim_end_seconds":{"type":"number","title":"Trim End Seconds","default":0},"features":{"type":"string","title":"Features","default":"[]"},"tags":{"type":"string","title":"Tags","default":""}},"type":"object","required":["file"],"title":"Body_upload_library_video"},"BulkActionRequest":{"properties":{"ids":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Ids"},"admin_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Notes"}},"type":"object","required":["ids"],"title":"BulkActionRequest","description":"Request body for bulk approve/dismiss."},"CaloratioDailySummary":{"properties":{"date":{"type":"string","format":"date","title":"Date"},"entries":{"items":{"$ref":"#/components/schemas/CaloratioFoodEntry"},"type":"array","title":"Entries"},"totals":{"$ref":"#/components/schemas/CaloratioDailyTotals"}},"type":"object","required":["date","entries","totals"],"title":"CaloratioDailySummary","description":"Summary of a day's food log."},"CaloratioDailyTotals":{"properties":{"caloratio_score":{"type":"number","title":"Caloratio Score","default":0},"total_cals":{"type":"number","title":"Total Cals","default":0},"protein_grams":{"type":"number","title":"Protein Grams","default":0},"veg_oz":{"type":"number","title":"Veg Oz","default":0},"fluid_oz":{"type":"number","title":"Fluid Oz","default":0},"num_items":{"type":"integer","title":"Num Items","default":0}},"type":"object","title":"CaloratioDailyTotals","description":"Daily aggregated totals."},"CaloratioEditRequest":{"properties":{"food_log_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Food Log Id","description":"UUID of the food log entry (optional, can be provided via path param)"},"user_comment":{"type":"string","maxLength":2000,"title":"User Comment","description":"User's correction text"}},"type":"object","required":["user_comment"],"title":"CaloratioEditRequest","description":"Request to edit an existing food entry."},"CaloratioFeedbackRequest":{"properties":{"food_log_id":{"type":"string","title":"Food Log Id","description":"UUID of the food log entry"},"feedback":{"type":"string","enum":["thumbs_up","thumbs_down"],"title":"Feedback"}},"type":"object","required":["food_log_id","feedback"],"title":"CaloratioFeedbackRequest","description":"Request to submit feedback on a food entry."},"CaloratioFeedbackResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"CaloratioFeedbackResponse","description":"Response after submitting feedback."},"CaloratioFoodEntry":{"properties":{"id":{"type":"string","title":"Id"},"food_name":{"type":"string","title":"Food Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"serving_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Serving Amount"},"serving_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serving Unit"},"good_cals":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Good Cals"},"total_cals":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Cals"},"penalties":{"type":"number","title":"Penalties","default":0},"caloratio_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Caloratio Score"},"protein_grams":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Protein Grams"},"veg_oz":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Veg Oz"},"fluid_oz":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fluid Oz"},"is_scb":{"type":"boolean","title":"Is Scb","default":false},"is_grain":{"type":"boolean","title":"Is Grain","default":false},"is_dairy":{"type":"boolean","title":"Is Dairy","default":false},"is_junk":{"type":"boolean","title":"Is Junk","default":false},"is_high_in_salt":{"type":"boolean","title":"Is High In Salt","default":false},"is_a_sweet":{"type":"boolean","title":"Is A Sweet","default":false},"is_artificially_sweetened":{"type":"boolean","title":"Is Artificially Sweetened","default":false},"meal":{"type":"string","title":"Meal"},"meal_date":{"type":"string","format":"date","title":"Meal Date"},"meal_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meal Time"},"logged_at":{"type":"string","format":"date-time","title":"Logged At"},"source_type":{"type":"string","title":"Source Type"},"user_feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Feedback"}},"type":"object","required":["id","food_name","meal","meal_date","logged_at","source_type"],"title":"CaloratioFoodEntry","description":"A single food log entry."},"CaloratioLogAgainRequest":{"properties":{"source_food_log_id":{"type":"string","title":"Source Food Log Id","description":"UUID of the original entry"},"meal":{"type":"string","maxLength":50,"minLength":1,"title":"Meal"},"meal_date":{"type":"string","format":"date","title":"Meal Date"}},"type":"object","required":["source_food_log_id","meal"],"title":"CaloratioLogAgainRequest","description":"Request to re-log a previous food entry."},"CaloratioLogAgainResponse":{"properties":{"entry":{"$ref":"#/components/schemas/CaloratioFoodEntry"},"message":{"type":"string","title":"Message"}},"type":"object","required":["entry","message"],"title":"CaloratioLogAgainResponse","description":"Response after re-logging a food entry."},"CaloratioUpdateMealRequest":{"properties":{"meal":{"type":"string","maxLength":50,"minLength":1,"title":"Meal"}},"type":"object","required":["meal"],"title":"CaloratioUpdateMealRequest","description":"Request to reassign a food entry to a different meal."},"CaloratioVisionRequest":{"properties":{"input_image_url":{"type":"string","maxLength":2048,"title":"Input Image Url","description":"Supabase storage URL of food photo"}},"type":"object","required":["input_image_url"],"title":"CaloratioVisionRequest","description":"Legacy photo pre-analysis request (app builds up to 335 send it on photo upload)."},"CaloratioVisionResponse":{"properties":{"vision_result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Vision Result"}},"type":"object","title":"CaloratioVisionResponse","description":"Always `vision_result: null` since Slice 6: the food log agent reads the photo itself."},"CaloratiologWithClarificationRequest":{"properties":{"input_text":{"type":"string","maxLength":4000,"title":"Input Text"},"meal":{"type":"string","maxLength":50,"minLength":1,"title":"Meal"},"meal_date":{"type":"string","format":"date","title":"Meal Date"},"meal_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meal Time","description":"Time of meal in HH:MM format (24-hour)"},"input_image_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Input Image Url"},"selected_food_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Selected Food Id"},"portion_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Portion Amount"},"portion_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Portion Unit"},"user_comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Comment"},"custom_answer":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Custom Answer","description":"User's answer to a custom clarification question"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Links clarification turns for message history"},"excluded_food_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Excluded Food Ids","description":"Food IDs to exclude from search results"},"vision_result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Vision Result","description":"Ignored (legacy photo pre-analysis)"}},"type":"object","required":["input_text","meal"],"title":"CaloratiologWithClarificationRequest","description":"Request to log food with clarification context."},"CalorieBreakdown":{"properties":{"veggies":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Veggies"},"nutsAndSeeds":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Nutsandseeds"},"animalProtein":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Animalprotein"},"oil":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Oil"},"beans":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Beans"},"fruit":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Fruit"},"other":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Other"}},"type":"object","required":["veggies","nutsAndSeeds","animalProtein","oil","beans","fruit","other"],"title":"CalorieBreakdown"},"CertificatePdfResponse":{"properties":{"pdfUrl":{"type":"string","title":"Pdfurl"}},"type":"object","required":["pdfUrl"],"title":"CertificatePdfResponse"},"CertificationListResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/CertificationResponse"},"type":"array","title":"Results"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextcursor"}},"type":"object","required":["results"],"title":"CertificationListResponse"},"CertificationResponse":{"properties":{"id":{"type":"string","title":"Id"},"userId":{"type":"string","title":"Userid"},"userName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"userEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Useremail"},"courseId":{"type":"string","title":"Courseid"},"courseTitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coursetitle"},"badgeName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Badgename"},"badgeImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Badgeimageurl"},"certificateNumber":{"type":"string","title":"Certificatenumber"},"certificatePdfUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Certificatepdfurl"},"quizAttemptId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quizattemptid"},"scorePercent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Scorepercent"},"earnedAt":{"type":"string","format":"date-time","title":"Earnedat"}},"type":"object","required":["id","userId","courseId","certificateNumber","earnedAt"],"title":"CertificationResponse"},"CheckoutSessionResponse":{"properties":{"checkout_url":{"type":"string","title":"Checkout Url"}},"type":"object","required":["checkout_url"],"title":"CheckoutSessionResponse","description":"Schema for checkout session response."},"ChoiceDetail":{"properties":{"voterRole":{"type":"string","enum":["patient","staff","other"],"title":"Voterrole"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firstname"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"chosenAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Chosenat"}},"type":"object","required":["voterRole","firstName","reason","chosenAt"],"title":"ChoiceDetail"},"ChoiceRequest":{"properties":{"option":{"type":"integer","minimum":1.0,"title":"Option"},"reason":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Reason"}},"type":"object","required":["option"],"title":"ChoiceRequest"},"ClaimPlanResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"plan_id":{"type":"string","title":"Plan Id"}},"type":"object","required":["success","plan_id"],"title":"ClaimPlanResponse","description":"Response after claiming a shared plan."},"ClarificationAnswer":{"properties":{"field_path":{"type":"string","title":"Field Path","description":"Semantic identifier for the question"},"value":{"title":"Value","description":"The user's answer (type depends on field)"},"skipped":{"type":"boolean","title":"Skipped","description":"User skipped this question","default":false},"kg_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kg Label","description":"KG entity type (e.g., 'Condition', 'Medication')"},"kg_entity_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kg Entity Name","description":"Existing entity to update (optional)"},"kg_property_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kg Property Key","description":"Property key to store answer as (optional)"}},"type":"object","required":["field_path","value"],"title":"ClarificationAnswer","description":"Single answer from the wizard"},"ClarificationSubmission":{"properties":{"answers":{"items":{"$ref":"#/components/schemas/ClarificationAnswer"},"type":"array","title":"Answers"},"conversation_id":{"type":"string","title":"Conversation Id"},"partial":{"type":"boolean","title":"Partial","description":"True when user dismissed wizard early","default":false}},"type":"object","required":["answers","conversation_id"],"title":"ClarificationSubmission","description":"All answers from a wizard session (complete or partial on dismiss)"},"ClarificationSubmissionResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"fields_updated":{"type":"integer","title":"Fields Updated"},"conversation_id":{"type":"string","title":"Conversation Id"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["success","fields_updated","conversation_id"],"title":"ClarificationSubmissionResponse","description":"Response after processing wizard submission"},"CombineRequest":{"properties":{"ids":{"items":{"type":"string"},"type":"array","minItems":2,"title":"Ids"}},"type":"object","required":["ids"],"title":"CombineRequest","description":"Request body for combining duplicate FAQs."},"CombineResponse":{"properties":{"new_staging_id":{"type":"string","title":"New Staging Id"},"merged_title":{"type":"string","title":"Merged Title"},"dismissed_count":{"type":"integer","title":"Dismissed Count"}},"type":"object","required":["new_staging_id","merged_title","dismissed_count"],"title":"CombineResponse","description":"Response after combining FAQs."},"CompactionResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"original_message_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Original Message Count"},"original_token_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Original Token Count"},"messages_archived":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Messages Archived"},"messages_preserved":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Messages Preserved"},"new_token_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"New Token Count"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"CompactionResponse","description":"Response from compaction operation"},"CompletionHistoryResponse":{"properties":{"completions":{"items":{"$ref":"#/components/schemas/CompletionResponse"},"type":"array","title":"Completions"},"currentStreak":{"type":"integer","title":"Currentstreak"}},"type":"object","required":["completions","currentStreak"],"title":"CompletionHistoryResponse"},"CompletionResponse":{"properties":{"id":{"type":"string","title":"Id"},"planItemId":{"type":"string","title":"Planitemid"},"completionDate":{"type":"string","format":"date","title":"Completiondate"},"completedAt":{"type":"string","format":"date-time","title":"Completedat"},"source":{"type":"string","title":"Source"}},"type":"object","required":["id","planItemId","completionDate","completedAt","source"],"title":"CompletionResponse","description":"Completion response (camelCase for mobile)."},"ConferenceTrialSignupRequest":{"properties":{"firstName":{"type":"string","title":"Firstname"},"lastName":{"type":"string","title":"Lastname"},"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["firstName","lastName","email"],"title":"ConferenceTrialSignupRequest"},"ConferenceTrialSignupResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"ConferenceTrialSignupResponse"},"ConnectionCheckResponse":{"properties":{"status":{"type":"string","title":"Status","default":"ok"},"api_version":{"type":"string","title":"Api Version","default":"1.0"},"client_id":{"type":"string","title":"Client Id"},"user_id":{"type":"string","title":"User Id"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"}},"type":"object","required":["client_id","user_id","scopes"],"title":"ConnectionCheckResponse","description":"Response for connection health check."},"ContentProcessRequest":{"properties":{"content_id":{"type":"integer","title":"Content Id","description":"ID of educational_content to process"},"topics":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Topics","description":"List of topics to classify content against"},"force_reprocess":{"type":"boolean","title":"Force Reprocess","description":"Re-process even if already entered_in_RAG","default":false}},"type":"object","required":["content_id","topics"],"title":"ContentProcessRequest","description":"Request to process educational content through ragproc"},"ContentProcessResponse":{"properties":{"content_id":{"type":"integer","title":"Content Id"},"chunks_created":{"type":"integer","title":"Chunks Created"},"topics_found":{"items":{"type":"string"},"type":"array","title":"Topics Found"},"success":{"type":"boolean","title":"Success"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["content_id","chunks_created","topics_found","success"],"title":"ContentProcessResponse","description":"Response from content processing"},"ContentQualityMetrics":{"properties":{"avg_confidence":{"type":"number","title":"Avg Confidence","default":0.0},"low_confidence_edge_count":{"type":"integer","title":"Low Confidence Edge Count","default":0},"pct_nodes_with_aliases":{"type":"number","title":"Pct Nodes With Aliases","default":0.0},"pct_nodes_with_properties":{"type":"number","title":"Pct Nodes With Properties","default":0.0},"avg_aliases_per_node":{"type":"number","title":"Avg Aliases Per Node","default":0.0}},"type":"object","title":"ContentQualityMetrics","description":"Content quality metrics for the knowledge graph."},"ConversationStatsResponse":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"},"message_count":{"type":"integer","title":"Message Count"},"token_count":{"type":"integer","title":"Token Count"},"needs_compaction":{"type":"boolean","title":"Needs Compaction"},"token_limit":{"type":"integer","title":"Token Limit"}},"type":"object","required":["conversation_id","message_count","token_count","needs_compaction","token_limit"],"title":"ConversationStatsResponse","description":"Stats about a conversation's context"},"CourseCreateRequest":{"properties":{"topicId":{"type":"string","title":"Topicid"},"title":{"type":"string","title":"Title"},"slug":{"type":"string","title":"Slug"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"thumbnailUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnailurl"},"sortOrder":{"type":"integer","title":"Sortorder","default":0},"isPublished":{"type":"boolean","title":"Ispublished","default":false},"badgeName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Badgename"},"badgeImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Badgeimageurl"},"certificateDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Certificatedescription"},"modules":{"items":{"$ref":"#/components/schemas/ModuleCreateRequest"},"type":"array","title":"Modules","default":[]}},"type":"object","required":["topicId","title","slug"],"title":"CourseCreateRequest"},"CourseListItem":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"slug":{"type":"string","title":"Slug"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"topic_id":{"type":"string","title":"Topic Id"},"topic_name":{"type":"string","title":"Topic Name"},"is_published":{"type":"boolean","title":"Is Published"},"module_count":{"type":"integer","title":"Module Count"}},"type":"object","required":["id","title","slug","topic_id","topic_name","is_published","module_count"],"title":"CourseListItem"},"CourseListResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/CourseResponse"},"type":"array","title":"Results"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextcursor"}},"type":"object","required":["results"],"title":"CourseListResponse"},"CourseProgressResponse":{"properties":{"courseId":{"type":"string","title":"Courseid"},"totalModules":{"type":"integer","title":"Totalmodules"},"completedModules":{"type":"integer","title":"Completedmodules"},"progressPercent":{"type":"integer","title":"Progresspercent"},"completedModuleIds":{"items":{"type":"string"},"type":"array","title":"Completedmoduleids"},"hasCertification":{"type":"boolean","title":"Hascertification","default":false},"certificationId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Certificationid"},"certificateNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Certificatenumber"},"certificatePdfUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Certificatepdfurl"},"badgeName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Badgename"},"badgeImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Badgeimageurl"}},"type":"object","required":["courseId","totalModules","completedModules","progressPercent","completedModuleIds"],"title":"CourseProgressResponse"},"CourseResponse":{"properties":{"id":{"type":"string","title":"Id"},"topicId":{"type":"string","title":"Topicid"},"title":{"type":"string","title":"Title"},"slug":{"type":"string","title":"Slug"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"thumbnailUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnailurl"},"sortOrder":{"type":"integer","title":"Sortorder"},"isPublished":{"type":"boolean","title":"Ispublished"},"badgeName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Badgename"},"badgeImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Badgeimageurl"},"certificateDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Certificatedescription"},"createdBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdby"},"modules":{"items":{"$ref":"#/components/schemas/ModuleResponse"},"type":"array","title":"Modules","default":[]}},"type":"object","required":["id","topicId","title","slug","sortOrder","isPublished"],"title":"CourseResponse"},"CreateEdgeRequest":{"properties":{"source_node_id":{"type":"string","title":"Source Node Id"},"target_node_id":{"type":"string","title":"Target Node Id"},"relationship":{"type":"string","title":"Relationship","description":"Relationship type (e.g., TREATS)"},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence","default":0.8},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context"}},"type":"object","required":["source_node_id","target_node_id","relationship"],"title":"CreateEdgeRequest","description":"Create a relationship."},"CreateNodeRequest":{"properties":{"label":{"type":"string","title":"Label","description":"Entity label (e.g., Medication)"},"display_name":{"type":"string","maxLength":200,"minLength":1,"title":"Display Name"},"aliases":{"items":{"type":"string"},"type":"array","title":"Aliases"},"properties":{"additionalProperties":true,"type":"object","title":"Properties"}},"type":"object","required":["label","display_name"],"title":"CreateNodeRequest","description":"Create a new entity."},"CreatePersonaRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"description":{"type":"string","minLength":10,"title":"Description","description":"Patient description or transcript"},"input_mode":{"type":"string","pattern":"^(description|transcript)$","title":"Input Mode","default":"description"},"note_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note Content","description":"Visit note (CC, HPI, PMH, assessment, plan)"}},"type":"object","required":["name","description"],"title":"CreatePersonaRequest","description":"Generate a new persona."},"CreateTicketRequest":{"properties":{"subject":{"type":"string","maxLength":200,"minLength":1,"title":"Subject"},"description":{"type":"string","maxLength":5000,"minLength":1,"title":"Description"},"screenContext":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screencontext"},"appVersion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Appversion"}},"type":"object","required":["subject","description"],"title":"CreateTicketRequest"},"CreateTicketResponse":{"properties":{"id":{"type":"string","title":"Id"},"subject":{"type":"string","title":"Subject"},"status":{"type":"string","title":"Status"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"}},"type":"object","required":["id","subject","status","createdAt"],"title":"CreateTicketResponse"},"CreateWithPaymentRequest":{"properties":{"uid":{"type":"string","title":"Uid"},"productIdentifier":{"type":"string","title":"Productidentifier"},"priceInCents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priceincents"},"billingFrequency":{"type":"string","title":"Billingfrequency"},"paymentMethodId":{"type":"string","title":"Paymentmethodid"},"trialPeriodDays":{"type":"integer","title":"Trialperioddays","default":0}},"type":"object","required":["uid","productIdentifier","billingFrequency","paymentMethodId"],"title":"CreateWithPaymentRequest"},"CreateWithPaymentResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"subscriptionId":{"type":"string","title":"Subscriptionid"},"stripeSubscriptionId":{"type":"string","title":"Stripesubscriptionid"},"status":{"type":"string","title":"Status"},"currentPeriodEnd":{"type":"string","format":"date-time","title":"Currentperiodend"}},"type":"object","required":["success","subscriptionId","stripeSubscriptionId","status","currentPeriodEnd"],"title":"CreateWithPaymentResponse"},"DauPoint":{"properties":{"date":{"type":"string","title":"Date"},"activeUsers":{"type":"integer","title":"Activeusers"}},"type":"object","required":["date","activeUsers"],"title":"DauPoint"},"DayOfWeek":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],"title":"DayOfWeek"},"DedupClusterInput":{"properties":{"target_node_id":{"type":"string","title":"Target Node Id"},"source_node_ids":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Source Node Ids"}},"type":"object","required":["target_node_id","source_node_ids"],"title":"DedupClusterInput","description":"A single cluster to merge: one target absorbs the sources."},"DedupJobResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"status":{"type":"string","title":"Status"}},"type":"object","required":["job_id","status"],"title":"DedupJobResponse"},"DedupPreviewResponse":{"properties":{"threshold":{"type":"number","title":"Threshold"},"clusters":{"items":{"$ref":"#/components/schemas/DuplicateCluster"},"type":"array","title":"Clusters"},"total_clusters":{"type":"integer","title":"Total Clusters"},"total_removable_nodes":{"type":"integer","title":"Total Removable Nodes"}},"type":"object","required":["threshold","clusters","total_clusters","total_removable_nodes"],"title":"DedupPreviewResponse","description":"Preview of duplicate clusters found above a similarity threshold."},"DedupRequest":{"properties":{"clusters":{"items":{"$ref":"#/components/schemas/DedupClusterInput"},"type":"array","minItems":1,"title":"Clusters"}},"type":"object","required":["clusters"],"title":"DedupRequest","description":"Admin-curated list of clusters to merge."},"DedupStatusResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"status":{"type":"string","title":"Status"},"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["job_id","status"],"title":"DedupStatusResponse"},"DeferTurnRequest":{"properties":{"deferred_until":{"type":"string","format":"date-time","title":"Deferred Until"}},"type":"object","required":["deferred_until"],"title":"DeferTurnRequest","description":"Request body for deferring/snoozing a turn."},"DegreeDistribution":{"properties":{"isolated":{"type":"integer","title":"Isolated","default":0},"sparse":{"type":"integer","title":"Sparse","default":0},"moderate":{"type":"integer","title":"Moderate","default":0},"rich":{"type":"integer","title":"Rich","default":0}},"type":"object","title":"DegreeDistribution","description":"Distribution of node connectivity."},"DeletionAnalysis":{"properties":{"user_id":{"type":"string","title":"User Id"},"user_email":{"type":"string","title":"User Email"},"user_roles":{"items":{"type":"string"},"type":"array","title":"User Roles"},"can_delete_immediately":{"type":"boolean","title":"Can Delete Immediately"},"shared_content":{"items":{"$ref":"#/components/schemas/SharedContent"},"type":"array","title":"Shared Content"},"reassignment_candidates":{"items":{"$ref":"#/components/schemas/ReassignmentCandidate"},"type":"array","title":"Reassignment Candidates"},"will_cancel_subscription":{"type":"boolean","title":"Will Cancel Subscription"},"subscription_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Plan"}},"type":"object","required":["user_id","user_email","user_roles","can_delete_immediately","shared_content","reassignment_candidates","will_cancel_subscription","subscription_plan"],"title":"DeletionAnalysis","description":"Result of analyzing what will happen when a user is deleted."},"DismissRequest":{"properties":{"admin_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Notes"}},"type":"object","title":"DismissRequest","description":"Request body for dismissing a staging entry."},"DuplicateCandidate":{"properties":{"id":{"type":"string","title":"Id"},"display_name":{"type":"string","title":"Display Name"},"label":{"type":"string","title":"Label"},"degree":{"type":"integer","title":"Degree"},"is_target":{"type":"boolean","title":"Is Target","default":false}},"type":"object","required":["id","display_name","label","degree"],"title":"DuplicateCandidate","description":"A node within a duplicate cluster."},"DuplicateCluster":{"properties":{"nodes":{"items":{"$ref":"#/components/schemas/DuplicateCandidate"},"type":"array","title":"Nodes"},"avg_similarity":{"type":"number","title":"Avg Similarity"}},"type":"object","required":["nodes","avg_similarity"],"title":"DuplicateCluster","description":"A group of near-duplicate nodes to be merged."},"DuplicateClusterItem":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"content":{"type":"string","title":"Content"},"status":{"type":"string","title":"Status"},"patient_question":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Question"},"provider_answer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Answer"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","title","content","status"],"title":"DuplicateClusterItem","description":"A single item within a duplicate cluster."},"DuplicateClustersResponse":{"properties":{"clusters":{"items":{"$ref":"#/components/schemas/app__schemas__transcript_faq_schemas__DuplicateCluster"},"type":"array","title":"Clusters"},"total_duplicate_items":{"type":"integer","title":"Total Duplicate Items"},"total_clusters":{"type":"integer","title":"Total Clusters"}},"type":"object","required":["clusters","total_duplicate_items","total_clusters"],"title":"DuplicateClustersResponse","description":"Response for the find-duplicates endpoint."},"E2EFlowInfo":{"properties":{"file":{"type":"string","title":"File"},"name":{"type":"string","title":"Name"},"category":{"type":"string","title":"Category"}},"type":"object","required":["file","name","category"],"title":"E2EFlowInfo"},"E2ETestResult":{"properties":{"id":{"type":"string","title":"Id"},"run_id":{"type":"string","title":"Run Id"},"flow_file":{"type":"string","title":"Flow File"},"flow_name":{"type":"string","title":"Flow Name"},"status":{"type":"string","title":"Status"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"screenshot_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screenshot Url"},"maestro_output":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Maestro Output"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","run_id","flow_file","flow_name","status","created_at"],"title":"E2ETestResult"},"E2ETestRunDetail":{"properties":{"id":{"type":"string","title":"Id"},"run_number":{"type":"integer","title":"Run Number"},"environment":{"type":"string","title":"Environment"},"trigger_type":{"type":"string","title":"Trigger Type"},"triggered_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Triggered By"},"test_suite":{"type":"string","title":"Test Suite"},"test_flow":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Test Flow"},"status":{"type":"string","title":"Status"},"total_tests":{"type":"integer","title":"Total Tests"},"passed_tests":{"type":"integer","title":"Passed Tests"},"failed_tests":{"type":"integer","title":"Failed Tests"},"skipped_tests":{"type":"integer","title":"Skipped Tests"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"created_at":{"type":"string","title":"Created At"},"results":{"items":{"$ref":"#/components/schemas/E2ETestResult"},"type":"array","title":"Results"}},"type":"object","required":["id","run_number","environment","trigger_type","test_suite","status","total_tests","passed_tests","failed_tests","skipped_tests","created_at","results"],"title":"E2ETestRunDetail"},"E2ETestRunListResponse":{"properties":{"runs":{"items":{"$ref":"#/components/schemas/E2ETestRunSummary"},"type":"array","title":"Runs"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["runs","total","limit","offset"],"title":"E2ETestRunListResponse"},"E2ETestRunSummary":{"properties":{"id":{"type":"string","title":"Id"},"run_number":{"type":"integer","title":"Run Number"},"environment":{"type":"string","title":"Environment"},"trigger_type":{"type":"string","title":"Trigger Type"},"triggered_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Triggered By"},"test_suite":{"type":"string","title":"Test Suite"},"test_flow":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Test Flow"},"status":{"type":"string","title":"Status"},"total_tests":{"type":"integer","title":"Total Tests"},"passed_tests":{"type":"integer","title":"Passed Tests"},"failed_tests":{"type":"integer","title":"Failed Tests"},"skipped_tests":{"type":"integer","title":"Skipped Tests"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","run_number","environment","trigger_type","test_suite","status","total_tests","passed_tests","failed_tests","skipped_tests","created_at"],"title":"E2ETestRunSummary"},"EducationalContentCreateRequest":{"properties":{"title":{"type":"string","title":"Title"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"contentType":{"type":"string","title":"Contenttype"},"publicationDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Publicationdate"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"thumbnailUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnailurl"},"videoId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Videoid"},"transcript":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcript"},"startTime":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Starttime"},"duration":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration"},"premiumContent":{"type":"boolean","title":"Premiumcontent","default":false}},"type":"object","required":["title","contentType"],"title":"EducationalContentCreateRequest"},"EducationalContentListResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/EducationalContentResponse"},"type":"array","title":"Results"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextcursor"}},"type":"object","required":["results"],"title":"EducationalContentListResponse"},"EducationalContentResponse":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"contentType":{"type":"string","title":"Contenttype"},"publicationDate":{"type":"string","format":"date","title":"Publicationdate"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"thumbnailUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnailurl"},"videoId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Videoid"},"transcript":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcript"},"startTime":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Starttime"},"duration":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration"},"enteredInRag":{"type":"boolean","title":"Enteredinrag","default":false},"premiumContent":{"type":"boolean","title":"Premiumcontent","default":false},"clickCount":{"type":"integer","title":"Clickcount","default":0},"createdAt":{"type":"string","title":"Createdat"},"lastUpdated":{"type":"string","title":"Lastupdated"}},"type":"object","required":["id","title","contentType","publicationDate","createdAt","lastUpdated"],"title":"EducationalContentResponse"},"EducationalContentUpdateRequest":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"contentType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contenttype"},"publicationDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Publicationdate"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"thumbnailUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnailurl"},"videoId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Videoid"},"transcript":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcript"},"startTime":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Starttime"},"duration":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration"},"premiumContent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Premiumcontent"}},"type":"object","title":"EducationalContentUpdateRequest"},"EjectRequest":{"properties":{"block":{"type":"boolean","title":"Block","default":false},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"EjectRequest","description":"Request body for ejecting a participant."},"EmailConsentHistoryEntry":{"properties":{"consent_type":{"type":"string","enum":["activity","marketing"],"title":"Consent Type"},"granted":{"type":"boolean","title":"Granted"},"previous_granted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Previous Granted"},"applied":{"type":"boolean","title":"Applied"},"source":{"type":"string","title":"Source"},"wording_version":{"type":"string","title":"Wording Version"},"recorded_at":{"type":"string","format":"date-time","title":"Recorded At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["consent_type","granted","previous_granted","applied","source","wording_version","recorded_at","created_at"],"title":"EmailConsentHistoryEntry"},"EmailPreCheckRequest":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"EmailPreCheckRequest"},"EmailPreCheckResponse":{"properties":{"email":{"type":"string","title":"Email"},"warnings":{"items":{"$ref":"#/components/schemas/EmailPreCheckWarning"},"type":"array","title":"Warnings"},"canProceed":{"type":"boolean","title":"Canproceed","default":true}},"type":"object","required":["email","warnings"],"title":"EmailPreCheckResponse"},"EmailPreCheckWarning":{"properties":{"type":{"type":"string","title":"Type"},"message":{"type":"string","title":"Message"},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details"}},"type":"object","required":["type","message"],"title":"EmailPreCheckWarning"},"EmailPreferencesResponse":{"properties":{"activity_emails":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Activity Emails"},"marketing_emails":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Marketing Emails"},"activity_recorded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Activity Recorded At"},"marketing_recorded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Marketing Recorded At"},"wording_version":{"type":"string","title":"Wording Version"},"activity_wording":{"type":"string","title":"Activity Wording"},"marketing_wording":{"type":"string","title":"Marketing Wording"},"needs_signup_consent":{"type":"boolean","title":"Needs Signup Consent"}},"type":"object","required":["activity_emails","marketing_emails","activity_recorded_at","marketing_recorded_at","wording_version","activity_wording","marketing_wording","needs_signup_consent"],"title":"EmailPreferencesResponse"},"EmailPreferencesUpdateRequest":{"properties":{"activity_emails":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Activity Emails"},"marketing_emails":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Marketing Emails"},"wording_version":{"type":"string","maxLength":40,"minLength":1,"title":"Wording Version"},"source":{"type":"string","enum":["signup","settings"],"title":"Source"}},"type":"object","required":["wording_version","source"],"title":"EmailPreferencesUpdateRequest"},"EmbeddingBackfillRequest":{"properties":{"stores":{"anyOf":[{"items":{"$ref":"#/components/schemas/EmbeddingStore"},"type":"array"},{"type":"null"}],"title":"Stores","description":"Default: every store"},"column":{"type":"string","enum":["embedding","embedding_v2"],"title":"Column","default":"embedding_v2"}},"type":"object","title":"EmbeddingBackfillRequest"},"EmbeddingStore":{"type":"string","enum":["sage_rag_content","caloratio_food","transcript_faq_staging","blog_image_library","kg_node"],"title":"EmbeddingStore"},"EmptySearchItem":{"properties":{"id":{"type":"integer","title":"Id"},"query":{"type":"string","title":"Query"},"normalized_query":{"type":"string","title":"Normalized Query"},"hit_count":{"type":"integer","title":"Hit Count"},"first_seen_at":{"type":"string","title":"First Seen At"},"last_seen_at":{"type":"string","title":"Last Seen At"},"cleared_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cleared At"},"created_food_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created Food Id"}},"type":"object","required":["id","query","normalized_query","hit_count","first_seen_at","last_seen_at"],"title":"EmptySearchItem"},"EmptySearchListResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/EmptySearchItem"},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["results","total"],"title":"EmptySearchListResponse"},"EngagementAnalyticsResponse":{"properties":{"summary":{"$ref":"#/components/schemas/ActiveUserSummary"},"dauSeries":{"items":{"$ref":"#/components/schemas/DauPoint"},"type":"array","title":"Dauseries"},"featureUsage":{"items":{"$ref":"#/components/schemas/FeatureUsage"},"type":"array","title":"Featureusage"},"retention":{"items":{"$ref":"#/components/schemas/RetentionRow"},"type":"array","title":"Retention"}},"type":"object","required":["summary","dauSeries","featureUsage","retention"],"title":"EngagementAnalyticsResponse"},"EnrichKGRequest":{"properties":{"text":{"type":"string","minLength":10,"title":"Text"},"source_label":{"type":"string","maxLength":200,"title":"Source Label","description":"Optional label for this source","default":""}},"type":"object","required":["text"],"title":"EnrichKGRequest","description":"Enrich the program KG from arbitrary clinical text."},"ErrorLogCreate":{"properties":{"severity":{"type":"string","title":"Severity","default":"error"},"error_type":{"type":"string","title":"Error Type"},"title":{"type":"string","title":"Title"},"message":{"type":"string","title":"Message"},"context":{"additionalProperties":true,"type":"object","title":"Context"},"debug_info":{"additionalProperties":true,"type":"object","title":"Debug Info"},"log_links":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Log Links"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}},"type":"object","required":["error_type","title","message"],"title":"ErrorLogCreate","description":"Request to create an error log."},"ErrorLogDetail":{"properties":{"id":{"type":"string","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"severity":{"type":"string","title":"Severity"},"error_type":{"type":"string","title":"Error Type"},"title":{"type":"string","title":"Title"},"message":{"type":"string","title":"Message"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"resolved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolved At"},"resolved_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolved By"},"context":{"additionalProperties":true,"type":"object","title":"Context"},"debug_info":{"additionalProperties":true,"type":"object","title":"Debug Info"},"log_links":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Log Links"},"resolution_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Notes"}},"type":"object","required":["id","created_at","severity","error_type","title","message"],"title":"ErrorLogDetail","description":"Full error log with debug info."},"ErrorLogListResponse":{"properties":{"logs":{"items":{"$ref":"#/components/schemas/ErrorLogSummary"},"type":"array","title":"Logs"},"total":{"type":"integer","title":"Total"},"unresolved_count":{"type":"integer","title":"Unresolved Count"}},"type":"object","required":["logs","total","unresolved_count"],"title":"ErrorLogListResponse","description":"Response for listing error logs."},"ErrorLogResolve":{"properties":{"resolution_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution Notes"}},"type":"object","title":"ErrorLogResolve","description":"Request to resolve an error log."},"ErrorLogSummary":{"properties":{"id":{"type":"string","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"severity":{"type":"string","title":"Severity"},"error_type":{"type":"string","title":"Error Type"},"title":{"type":"string","title":"Title"},"message":{"type":"string","title":"Message"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"resolved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolved At"},"resolved_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolved By"}},"type":"object","required":["id","created_at","severity","error_type","title","message"],"title":"ErrorLogSummary","description":"Summary of an error log for list view."},"EvalResultItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"qa_pair_id":{"type":"string","format":"uuid","title":"Qa Pair Id"},"patient_question":{"type":"string","title":"Patient Question"},"provider_answer":{"type":"string","title":"Provider Answer"},"sage_response":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sage Response"},"tool_calls":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Tool Calls"},"sources":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvalSourceItem"},"type":"array"},{"type":"null"}],"title":"Sources"},"consistent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Consistent"},"reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","qa_pair_id","patient_question","provider_answer","status"],"title":"EvalResultItem","description":"Per-question result within an eval run."},"EvalRunDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","title":"Status"},"passed":{"type":"integer","title":"Passed","default":0},"failed":{"type":"integer","title":"Failed","default":0},"total":{"type":"integer","title":"Total","default":0},"created_at":{"type":"string","format":"date-time","title":"Created At"},"persona_id":{"type":"string","format":"uuid","title":"Persona Id"},"summary":{"anyOf":[{"$ref":"#/components/schemas/EvalSummaryData"},{"type":"null"}]},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"results":{"items":{"$ref":"#/components/schemas/EvalResultItem"},"type":"array","title":"Results"}},"type":"object","required":["id","status","created_at","persona_id"],"title":"EvalRunDetail","description":"Full eval run detail with results."},"EvalRunListItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","title":"Status"},"passed":{"type":"integer","title":"Passed","default":0},"failed":{"type":"integer","title":"Failed","default":0},"total":{"type":"integer","title":"Total","default":0},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","status","created_at"],"title":"EvalRunListItem","description":"An eval run in the list view."},"EvalSourceItem":{"properties":{"title":{"type":"string","title":"Title"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"educational_content_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Educational Content Id"}},"type":"object","required":["title"],"title":"EvalSourceItem","description":"A RAG source referenced by Sage during an eval."},"EvalSummaryData":{"properties":{"summary":{"type":"string","title":"Summary"},"key_failures":{"items":{"type":"string"},"type":"array","title":"Key Failures"},"key_successes":{"items":{"type":"string"},"type":"array","title":"Key Successes"},"actionable_items":{"items":{"type":"string"},"type":"array","title":"Actionable Items"}},"type":"object","required":["summary"],"title":"EvalSummaryData","description":"Haiku-generated summary of an eval run."},"ExclusionPeriodListResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/ExclusionPeriodResponse"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"ExclusionPeriodListResponse","description":"List of exclusion periods."},"ExclusionPeriodRequest":{"properties":{"startDate":{"type":"string","format":"date","title":"Startdate"},"endDate":{"type":"string","format":"date","title":"Enddate"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"allowOverrides":{"type":"boolean","title":"Allowoverrides","default":false}},"type":"object","required":["startDate","endDate"],"title":"ExclusionPeriodRequest","description":"Request to create an exclusion period (time off)."},"ExclusionPeriodResponse":{"properties":{"id":{"type":"string","title":"Id"},"providerId":{"type":"string","title":"Providerid"},"startDate":{"type":"string","format":"date","title":"Startdate"},"endDate":{"type":"string","format":"date","title":"Enddate"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"allowOverrides":{"type":"boolean","title":"Allowoverrides","default":false},"createdAt":{"type":"string","format":"date-time","title":"Createdat"}},"type":"object","required":["id","providerId","startDate","endDate","createdAt"],"title":"ExclusionPeriodResponse","description":"Exclusion period response."},"ExerciseCreate":{"properties":{"exercise_types":{"items":{"type":"string"},"type":"array","title":"Exercise Types"},"activity_name":{"type":"string","title":"Activity Name"},"duration_minutes":{"type":"integer","title":"Duration Minutes"},"rpe":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rpe"},"date":{"type":"string","title":"Date"},"time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["exercise_types","activity_name","duration_minutes","date"],"title":"ExerciseCreate"},"ExerciseResponse":{"properties":{"id":{"type":"string","title":"Id"},"exercise_types":{"items":{"type":"string"},"type":"array","title":"Exercise Types"},"activity_name":{"type":"string","title":"Activity Name"},"duration_minutes":{"type":"integer","title":"Duration Minutes"},"rpe":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rpe"},"date":{"type":"string","title":"Date"},"time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time"},"source":{"type":"string","title":"Source","default":"manual"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"sort_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort Date"},"sort_confidence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort Confidence"}},"type":"object","required":["id","exercise_types","activity_name","duration_minutes","date"],"title":"ExerciseResponse"},"ExerciseUpdate":{"properties":{"exercise_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Exercise Types"},"activity_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activity Name"},"duration_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Minutes"},"rpe":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rpe"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"ExerciseUpdate"},"ExternalBlogGenerationRequest":{"properties":{"topic":{"type":"string","title":"Topic"},"target_keywords":{"items":{"type":"string"},"type":"array","title":"Target Keywords"},"category":{"type":"string","title":"Category"},"author":{"type":"string","title":"Author","default":"Dr. Matthew Weiner"},"tone":{"type":"string","title":"Tone","default":"authoritative but approachable, written by a bariatric surgeon with 20+ years experience"},"word_count_target":{"type":"integer","title":"Word Count Target","default":2000},"generate_faq":{"type":"boolean","title":"Generate Faq","default":true},"ai_search_terms":{"items":{"type":"string"},"type":"array","title":"Ai Search Terms","default":[]},"source_context":{"type":"string","title":"Source Context","default":""}},"type":"object","required":["topic","target_keywords","category"],"title":"ExternalBlogGenerationRequest"},"ExternalBlogGenerationResponse":{"properties":{"title":{"type":"string","title":"Title"},"slug":{"type":"string","title":"Slug"},"meta_description":{"type":"string","title":"Meta Description"},"content":{"type":"string","title":"Content"},"content_html":{"type":"string","title":"Content Html"},"excerpt":{"type":"string","title":"Excerpt"},"author":{"type":"string","title":"Author"},"category":{"type":"string","title":"Category"},"target_keywords":{"items":{"type":"string"},"type":"array","title":"Target Keywords"},"ai_search_terms":{"items":{"type":"string"},"type":"array","title":"Ai Search Terms"},"faq_data":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Faq Data"},"featured_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Featured Image Url"},"word_count":{"type":"integer","title":"Word Count"},"reading_time_minutes":{"type":"integer","title":"Reading Time Minutes"}},"type":"object","required":["title","slug","meta_description","content","content_html","excerpt","author","category","target_keywords","ai_search_terms","faq_data","featured_image_url","word_count","reading_time_minutes"],"title":"ExternalBlogGenerationResponse"},"ExternalImageSearchRequest":{"properties":{"query":{"type":"string","title":"Query"},"topic_cluster":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic Cluster"},"limit":{"type":"integer","title":"Limit","default":12}},"type":"object","required":["query"],"title":"ExternalImageSearchRequest"},"ExtractPdfTextRequest":{"properties":{"storagePath":{"type":"string","title":"Storagepath"}},"type":"object","required":["storagePath"],"title":"ExtractPdfTextRequest"},"ExtractPdfTextResponse":{"properties":{"text":{"type":"string","title":"Text"},"pageCount":{"type":"integer","title":"Pagecount"}},"type":"object","required":["text","pageCount"],"title":"ExtractPdfTextResponse"},"FeatureUsage":{"properties":{"feature":{"type":"string","title":"Feature"},"uniqueUsers":{"type":"integer","title":"Uniqueusers"}},"type":"object","required":["feature","uniqueUsers"],"title":"FeatureUsage"},"FinalReveal":{"properties":{"options":{"items":{"$ref":"#/components/schemas/RevealOption"},"type":"array","title":"Options"},"chosenOption":{"type":"integer","title":"Chosenoption"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["options","chosenOption","reason"],"title":"FinalReveal"},"FlagRequest":{"properties":{"flagged":{"type":"boolean","title":"Flagged"}},"type":"object","required":["flagged"],"title":"FlagRequest"},"FluidLogCreate":{"properties":{"beverage":{"type":"string","maxLength":100,"minLength":1,"title":"Beverage"},"amount_oz":{"type":"number","exclusiveMinimum":0.0,"title":"Amount Oz"},"meal_date":{"type":"string","title":"Meal Date"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["beverage","amount_oz","meal_date"],"title":"FluidLogCreate","description":"Create a standalone fluid entry."},"FluidLogUpdate":{"properties":{"beverage":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Beverage"},"amount_oz":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Amount Oz"},"meal_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meal Date"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"FluidLogUpdate","description":"Update a standalone fluid entry."},"FoodCreateRequest":{"properties":{"name":{"type":"string","title":"Name"},"rankPoints":{"type":"number","minimum":0.0,"title":"Rankpoints"},"flags":{"$ref":"#/components/schemas/FoodFlags"},"calorieBreakdown":{"$ref":"#/components/schemas/CalorieBreakdown"},"servings":{"items":{"$ref":"#/components/schemas/ServingSize"},"type":"array","title":"Servings"}},"type":"object","required":["name","rankPoints","flags","calorieBreakdown","servings"],"title":"FoodCreateRequest"},"FoodFlags":{"properties":{"isSugarSweetenedBeverage":{"type":"boolean","title":"Issugarsweetenedbeverage","default":false},"isGrain":{"type":"boolean","title":"Isgrain","default":false},"isDairy":{"type":"boolean","title":"Isdairy","default":false},"isJunkFood":{"type":"boolean","title":"Isjunkfood","default":false},"isHighInSalt":{"type":"boolean","title":"Ishighinsalt","default":false},"isSweet":{"type":"boolean","title":"Issweet","default":false},"isArtificiallySweetened":{"type":"boolean","title":"Isartificiallysweetened","default":false}},"type":"object","title":"FoodFlags"},"FoodListResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/FoodResponse"},"type":"array","title":"Results"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextcursor"}},"type":"object","required":["results"],"title":"FoodListResponse"},"FoodLogEntry":{"properties":{"id":{"type":"string","title":"Id"},"meal_date":{"type":"string","title":"Meal Date"},"meal":{"type":"string","title":"Meal"},"meal_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meal Time"},"food_name":{"type":"string","title":"Food Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"serving":{"$ref":"#/components/schemas/FoodLogServing"},"grade":{"$ref":"#/components/schemas/FoodLogGrade"},"nutrition":{"$ref":"#/components/schemas/FoodLogNutrition"},"flags":{"$ref":"#/components/schemas/FoodLogFlags"},"logged_at":{"type":"string","title":"Logged At"},"source_type":{"type":"string","title":"Source Type"}},"type":"object","required":["id","meal_date","meal","food_name","serving","grade","nutrition","flags","logged_at","source_type"],"title":"FoodLogEntry"},"FoodLogFlags":{"properties":{"is_scb":{"type":"boolean","title":"Is Scb","default":false},"is_grain":{"type":"boolean","title":"Is Grain","default":false},"is_dairy":{"type":"boolean","title":"Is Dairy","default":false},"is_junk":{"type":"boolean","title":"Is Junk","default":false},"is_high_in_salt":{"type":"boolean","title":"Is High In Salt","default":false},"is_a_sweet":{"type":"boolean","title":"Is A Sweet","default":false},"is_artificially_sweetened":{"type":"boolean","title":"Is Artificially Sweetened","default":false}},"type":"object","title":"FoodLogFlags"},"FoodLogGrade":{"properties":{"caloratio_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Caloratio Score"},"letter_grade":{"type":"string","title":"Letter Grade","default":"N/A"},"good_cals":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Good Cals"},"total_cals":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Cals"},"penalties":{"type":"number","title":"Penalties","default":0}},"type":"object","title":"FoodLogGrade"},"FoodLogNutrition":{"properties":{"protein_grams":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Protein Grams"},"veg_oz":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Veg Oz"},"fluid_oz":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fluid Oz"}},"type":"object","title":"FoodLogNutrition"},"FoodLogServing":{"properties":{"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"}},"type":"object","title":"FoodLogServing"},"FoodLogsResponse":{"properties":{"food_logs":{"items":{"$ref":"#/components/schemas/FoodLogEntry"},"type":"array","title":"Food Logs"},"meal_summaries":{"items":{"$ref":"#/components/schemas/MealSummary"},"type":"array","title":"Meal Summaries"},"total_count":{"type":"integer","title":"Total Count"},"start_date":{"type":"string","title":"Start Date"}},"type":"object","required":["food_logs","meal_summaries","total_count","start_date"],"title":"FoodLogsResponse"},"FoodResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"rankPoints":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rankpoints"},"flags":{"$ref":"#/components/schemas/FoodFlags"},"calorieBreakdown":{"$ref":"#/components/schemas/CalorieBreakdown"},"servings":{"items":{"$ref":"#/components/schemas/ServingSize"},"type":"array","title":"Servings"}},"type":"object","required":["id","name","flags","calorieBreakdown","servings"],"title":"FoodResponse"},"ForumResponse":{"properties":{"id":{"type":"string","title":"Id"},"topicId":{"type":"string","title":"Topicid"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"isActive":{"type":"boolean","title":"Isactive"},"postCount":{"type":"integer","title":"Postcount","default":0}},"type":"object","required":["id","topicId","name","isActive"],"title":"ForumResponse"},"FrequencyType":{"type":"string","enum":["weekly","biweekly","monthly"],"title":"FrequencyType"},"GLP1CalculatorInput":{"properties":{"age":{"type":"integer","maximum":100.0,"minimum":18.0,"title":"Age"},"height_feet":{"type":"integer","maximum":8.0,"minimum":3.0,"title":"Height Feet"},"height_inches":{"type":"integer","maximum":11.0,"minimum":0.0,"title":"Height Inches"},"weight_lbs":{"type":"number","maximum":1000.0,"exclusiveMinimum":50.0,"title":"Weight Lbs"},"gender":{"type":"string","pattern":"^(male|female)$","title":"Gender"},"medication":{"type":"string","pattern":"^(tirzepatide|semaglutide_injection|semaglutide_oral)$","title":"Medication","default":"tirzepatide"},"has_diabetes":{"type":"boolean","title":"Has Diabetes","default":false},"a1c":{"anyOf":[{"type":"number","maximum":20.0,"minimum":4.0},{"type":"null"}],"title":"A1C"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"}},"type":"object","required":["age","height_feet","height_inches","weight_lbs","gender"],"title":"GLP1CalculatorInput"},"GenerateScheduleRequest":{"properties":{"patterns":{"items":{"$ref":"#/components/schemas/RecurrencePattern"},"type":"array","title":"Patterns"}},"type":"object","required":["patterns"],"title":"GenerateScheduleRequest"},"GenerateScheduleResponse":{"properties":{"scheduleTimes":{"items":{"$ref":"#/components/schemas/ScheduleTime"},"type":"array","title":"Scheduletimes"}},"type":"object","required":["scheduleTimes"],"title":"GenerateScheduleResponse"},"GrailConnectionStatus":{"properties":{"connected":{"type":"boolean","title":"Connected"},"clientIdConfigured":{"type":"boolean","title":"Clientidconfigured"},"tokenUrlConfigured":{"type":"boolean","title":"Tokenurlconfigured"},"tagSyncUrlConfigured":{"type":"boolean","title":"Tagsyncurlconfigured"},"connectedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connectedat"},"tokenExpiresAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tokenexpiresat"}},"type":"object","required":["connected","clientIdConfigured","tokenUrlConfigured","tagSyncUrlConfigured"],"title":"GrailConnectionStatus"},"GrailOAuthCallbackRequest":{"properties":{"code":{"type":"string","title":"Code"},"state":{"type":"string","title":"State"},"redirectUri":{"type":"string","title":"Redirecturi"}},"type":"object","required":["code","state","redirectUri"],"title":"GrailOAuthCallbackRequest"},"GrailOAuthStartRequest":{"properties":{"redirectUri":{"type":"string","title":"Redirecturi"}},"type":"object","required":["redirectUri"],"title":"GrailOAuthStartRequest"},"GrailOAuthStartResponse":{"properties":{"authorizationUrl":{"type":"string","title":"Authorizationurl"},"expiresAt":{"type":"string","title":"Expiresat"}},"type":"object","required":["authorizationUrl","expiresAt"],"title":"GrailOAuthStartResponse"},"GrailPatientIdent":{"properties":{"isLocal":{"type":"boolean","title":"Islocal"},"patientId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patientid"},"externalPatientId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Externalpatientid"}},"type":"object","required":["isLocal"],"title":"GrailPatientIdent"},"GrailPatientSearchResponse":{"properties":{"patients":{"items":{"$ref":"#/components/schemas/GrailPatientSearchResult"},"type":"array","title":"Patients"}},"type":"object","required":["patients"],"title":"GrailPatientSearchResponse"},"GrailPatientSearchResult":{"properties":{"patientIdent":{"$ref":"#/components/schemas/GrailPatientIdent"},"grailPatientId":{"type":"string","title":"Grailpatientid"},"mrn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mrn"},"firstName":{"type":"string","title":"Firstname"},"lastName":{"type":"string","title":"Lastname"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"dateOfBirth":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dateofbirth"},"isLocal":{"type":"boolean","title":"Islocal"}},"type":"object","required":["patientIdent","grailPatientId","firstName","lastName","isLocal"],"title":"GrailPatientSearchResult"},"GroupListResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/GroupSession"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"GroupListResponse","description":"List of group sessions."},"GroupSession":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"instructor":{"$ref":"#/components/schemas/InstructorBrief"},"startTimeUtc":{"type":"string","format":"date-time","title":"Starttimeutc"},"endTimeUtc":{"type":"string","format":"date-time","title":"Endtimeutc"},"status":{"type":"string","title":"Status"},"isRegistered":{"type":"boolean","title":"Isregistered","default":false},"isInstructor":{"type":"boolean","title":"Isinstructor","default":false},"registrationCount":{"type":"integer","title":"Registrationcount","default":0},"maxParticipants":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Maxparticipants"},"isFree":{"type":"boolean","title":"Isfree","default":false},"canRegister":{"type":"boolean","title":"Canregister","default":true}},"type":"object","required":["id","name","instructor","startTimeUtc","endTimeUtc","status"],"title":"GroupSession","description":"A scheduled group session."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImageSearchRequest":{"properties":{"query":{"type":"string","maxLength":200,"minLength":1,"title":"Query"},"per_page":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Per Page","default":10}},"type":"object","required":["query"],"title":"ImageSearchRequest"},"InstructorBrief":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"photoUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photourl"}},"type":"object","required":["id","name"],"title":"InstructorBrief","description":"Brief instructor info for listings."},"InstructorCreateRequest":{"properties":{"name":{"type":"string","title":"Name"},"bio":{"type":"string","title":"Bio"},"linkedUserId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkeduserid"},"timezone":{"type":"string","title":"Timezone","default":"America/Phoenix"}},"type":"object","required":["name","bio"],"title":"InstructorCreateRequest"},"InstructorListResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/InstructorResponse"},"type":"array","title":"Results"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextcursor"}},"type":"object","required":["results"],"title":"InstructorListResponse"},"InstructorResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"bio":{"type":"string","title":"Bio"},"photoUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photourl"},"linkedUserId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkeduserid"},"timezone":{"type":"string","title":"Timezone","default":"America/Phoenix"}},"type":"object","required":["id","name","bio"],"title":"InstructorResponse"},"InvitationAcceptRequest":{"properties":{"uid":{"type":"string","title":"Uid"}},"type":"object","required":["uid"],"title":"InvitationAcceptRequest"},"InvitationAcceptResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"checkoutUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkouturl"},"productIdentifier":{"type":"string","title":"Productidentifier"},"priceInCents":{"type":"integer","title":"Priceincents"},"billingFrequency":{"type":"string","title":"Billingfrequency"},"complimentary":{"type":"boolean","title":"Complimentary","default":false}},"type":"object","required":["success","productIdentifier","priceInCents","billingFrequency"],"title":"InvitationAcceptResponse"},"InvitationCreateRequest":{"properties":{"email":{"type":"string","title":"Email"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firstname"},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastname"},"productIdentifier":{"type":"string","title":"Productidentifier"},"priceInCents":{"type":"integer","title":"Priceincents","default":0},"billingFrequency":{"type":"string","title":"Billingfrequency","default":"month"},"customMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custommessage"},"durationMonths":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Durationmonths"},"complimentary":{"type":"boolean","title":"Complimentary","default":false},"upgrade":{"type":"boolean","title":"Upgrade","default":false},"grailMrn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grailmrn"},"grailPatientIdent":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Grailpatientident"},"grailInquiryId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grailinquiryid"},"trialEndAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trialendat"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expiresat"}},"type":"object","required":["email","productIdentifier"],"title":"InvitationCreateRequest"},"InvitationDetailResponse":{"properties":{"invitationId":{"type":"string","title":"Invitationid"},"email":{"type":"string","title":"Email"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firstname"},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastname"},"productIdentifier":{"type":"string","title":"Productidentifier"},"priceInCents":{"type":"integer","title":"Priceincents"},"billingFrequency":{"type":"string","title":"Billingfrequency"},"customMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custommessage"},"status":{"type":"string","title":"Status"},"invitationUrl":{"type":"string","title":"Invitationurl"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"expiresAt":{"type":"string","format":"date-time","title":"Expiresat"},"acceptedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Acceptedat"},"createdByUid":{"type":"string","title":"Createdbyuid"},"createdByEmail":{"type":"string","title":"Createdbyemail"}},"type":"object","required":["invitationId","email","productIdentifier","priceInCents","billingFrequency","status","invitationUrl","createdAt","expiresAt","createdByUid","createdByEmail"],"title":"InvitationDetailResponse"},"InvitationListItem":{"properties":{"invitationId":{"type":"string","title":"Invitationid"},"email":{"type":"string","title":"Email"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firstname"},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastname"},"productIdentifier":{"type":"string","title":"Productidentifier"},"priceInCents":{"type":"integer","title":"Priceincents"},"billingFrequency":{"type":"string","title":"Billingfrequency"},"durationMonths":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Durationmonths"},"complimentary":{"type":"boolean","title":"Complimentary","default":false},"status":{"type":"string","title":"Status"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"expiresAt":{"type":"string","format":"date-time","title":"Expiresat"},"acceptedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Acceptedat"},"createdByUid":{"type":"string","title":"Createdbyuid"}},"type":"object","required":["invitationId","email","productIdentifier","priceInCents","billingFrequency","status","createdAt","expiresAt","createdByUid"],"title":"InvitationListItem"},"InvitationListResponse":{"properties":{"invitations":{"items":{"$ref":"#/components/schemas/InvitationListItem"},"type":"array","title":"Invitations"},"totalCount":{"type":"integer","title":"Totalcount"},"hasMore":{"type":"boolean","title":"Hasmore"}},"type":"object","required":["invitations","totalCount","hasMore"],"title":"InvitationListResponse"},"InvitationResponse":{"properties":{"invitationId":{"type":"string","title":"Invitationid"},"invitationToken":{"type":"string","title":"Invitationtoken"},"invitationUrl":{"type":"string","title":"Invitationurl"},"emailSentTo":{"type":"string","title":"Emailsentto"},"expiresAt":{"type":"string","format":"date-time","title":"Expiresat"},"status":{"type":"string","title":"Status"}},"type":"object","required":["invitationId","invitationToken","invitationUrl","emailSentTo","expiresAt","status"],"title":"InvitationResponse"},"InvitationSignupRequest":{"properties":{"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firstname"},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastname"}},"type":"object","title":"InvitationSignupRequest"},"InvitationSignupResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"email":{"type":"string","title":"Email"},"checkout_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkout Url"}},"type":"object","required":["success","email"],"title":"InvitationSignupResponse"},"InvitationValidateResponse":{"properties":{"valid":{"type":"boolean","title":"Valid"},"invitation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Invitation"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["valid"],"title":"InvitationValidateResponse"},"JoinSessionResponse":{"properties":{"roomUrl":{"type":"string","title":"Roomurl"},"token":{"type":"string","title":"Token"},"roomName":{"type":"string","title":"Roomname"},"expiresAt":{"type":"string","format":"date-time","title":"Expiresat"},"dailyRoomUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dailyroomurl"},"dailyToken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dailytoken"},"providerName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Providername"}},"type":"object","required":["roomUrl","token","roomName","expiresAt"],"title":"JoinSessionResponse","description":"Response for joining a video session."},"KGNodeDetail":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"aliases":{"items":{"type":"string"},"type":"array","title":"Aliases"},"properties":{"additionalProperties":true,"type":"object","title":"Properties"},"source_type":{"type":"string","title":"Source Type","default":"transcript"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"neighbors":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Neighbors"}},"type":"object","required":["id","label","name","display_name"],"title":"KGNodeDetail","description":"Full node detail including neighbors."},"KGNodeListItem":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"aliases":{"items":{"type":"string"},"type":"array","title":"Aliases"},"properties":{"additionalProperties":true,"type":"object","title":"Properties"},"source_type":{"type":"string","title":"Source Type","default":"transcript"},"relationship_count":{"type":"integer","title":"Relationship Count","default":0},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","label","name","display_name"],"title":"KGNodeListItem","description":"A node in the list view."},"KGNodeListResponse":{"properties":{"nodes":{"items":{"$ref":"#/components/schemas/KGNodeListItem"},"type":"array","title":"Nodes"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["nodes","total","limit","offset"],"title":"KGNodeListResponse","description":"Paginated list of nodes."},"KGStatsResponse":{"properties":{"total_nodes":{"type":"integer","title":"Total Nodes","default":0},"total_edges":{"type":"integer","title":"Total Edges","default":0},"nodes_by_label":{"additionalProperties":{"type":"integer"},"type":"object","title":"Nodes By Label"},"edges_by_type":{"additionalProperties":{"type":"integer"},"type":"object","title":"Edges By Type"},"structural":{"$ref":"#/components/schemas/StructuralMetrics"},"content_quality":{"$ref":"#/components/schemas/ContentQualityMetrics"},"top_connected_nodes":{"items":{"$ref":"#/components/schemas/TopConnectedNode"},"type":"array","title":"Top Connected Nodes"}},"type":"object","title":"KGStatsResponse","description":"Graph statistics with quality metrics."},"LeaveQueueResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"LeaveQueueResponse","description":"Response for cancelling an appointment or ending a session."},"LegacyLinkRequest":{"properties":{"userId":{"type":"string","title":"Userid"},"source":{"type":"string","title":"Source"},"sourceId":{"type":"string","title":"Sourceid"},"entitlement":{"type":"string","title":"Entitlement"},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details"}},"type":"object","required":["userId","source","sourceId","entitlement"],"title":"LegacyLinkRequest"},"LegacyLinkResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"subscriptionId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subscriptionid"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"LegacyLinkResponse"},"LegacyPlatformMatch":{"properties":{"source":{"type":"string","title":"Source"},"sourceId":{"type":"string","title":"Sourceid"},"entitlement":{"type":"string","title":"Entitlement"},"details":{"additionalProperties":true,"type":"object","title":"Details"}},"type":"object","required":["source","sourceId","entitlement","details"],"title":"LegacyPlatformMatch"},"LegacySearchRequest":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"LegacySearchRequest"},"LegacySearchResponse":{"properties":{"email":{"type":"string","title":"Email"},"matches":{"items":{"$ref":"#/components/schemas/LegacyPlatformMatch"},"type":"array","title":"Matches"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"},"platformStatuses":{"additionalProperties":{"type":"string"},"type":"object","title":"Platformstatuses","default":{}}},"type":"object","required":["email","matches","errors"],"title":"LegacySearchResponse"},"LinkRouteCreate":{"properties":{"slug":{"type":"string","maxLength":100,"minLength":1,"title":"Slug"},"destination":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Destination"},"targetType":{"anyOf":[{"type":"string","enum":["education_topic","education_course","schedule","food_log","sage_chat","app_home"]},{"type":"null"}],"title":"Targettype"},"targetId":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Targetid"},"ogTitle":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Ogtitle"},"ogDescription":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Ogdescription"},"isActive":{"type":"boolean","title":"Isactive","default":true}},"type":"object","required":["slug"],"title":"LinkRouteCreate"},"LinkRouteListResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/LinkRouteResponse"},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["results","total"],"title":"LinkRouteListResponse"},"LinkRouteResolveResponse":{"properties":{"destination":{"type":"string","title":"Destination"}},"type":"object","required":["destination"],"title":"LinkRouteResolveResponse"},"LinkRouteResponse":{"properties":{"id":{"type":"integer","title":"Id"},"slug":{"type":"string","title":"Slug"},"destination":{"type":"string","title":"Destination"},"targetType":{"anyOf":[{"type":"string","enum":["education_topic","education_course","schedule","food_log","sage_chat","app_home"]},{"type":"null"}],"title":"Targettype"},"targetId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Targetid"},"ogTitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ogtitle"},"ogDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ogdescription"},"isActive":{"type":"boolean","title":"Isactive"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"updatedAt":{"type":"string","format":"date-time","title":"Updatedat"}},"type":"object","required":["id","slug","destination","isActive","createdAt","updatedAt"],"title":"LinkRouteResponse"},"LinkRouteTargetListResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/LinkRouteTargetOption"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"LinkRouteTargetListResponse"},"LinkRouteTargetOption":{"properties":{"targetType":{"type":"string","enum":["education_topic","education_course","schedule","food_log","sage_chat","app_home"],"title":"Targettype"},"targetId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Targetid"},"label":{"type":"string","title":"Label"},"destination":{"type":"string","title":"Destination"}},"type":"object","required":["targetType","targetId","label","destination"],"title":"LinkRouteTargetOption"},"LinkRouteUpdate":{"properties":{"slug":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Slug"},"destination":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Destination"},"targetType":{"anyOf":[{"type":"string","enum":["education_topic","education_course","schedule","food_log","sage_chat","app_home"]},{"type":"null"}],"title":"Targettype"},"targetId":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Targetid"},"ogTitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ogtitle"},"ogDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ogdescription"},"isActive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Isactive"}},"type":"object","title":"LinkRouteUpdate"},"LoadCanonicalFaqsRequest":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run","default":false}},"type":"object","title":"LoadCanonicalFaqsRequest"},"MarkListenedRequest":{"properties":{"episodeGuid":{"type":"string","title":"Episodeguid"}},"type":"object","required":["episodeGuid"],"title":"MarkListenedRequest"},"MarketingConfigItem":{"properties":{"key":{"type":"string","title":"Key"},"value":{"type":"string","title":"Value"}},"type":"object","required":["key","value"],"title":"MarketingConfigItem"},"MarketingConfigUpdate":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MarketingConfigItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"MarketingConfigUpdate"},"MarketingConsent":{"properties":{"state":{"type":"string","const":"unknown","title":"State"}},"type":"object","required":["state"],"title":"MarketingConsent"},"MarketingConsentEventV2":{"properties":{"schema_version":{"type":"integer","const":2,"title":"Schema Version"},"event_id":{"type":"string","format":"uuid","title":"Event Id"},"event_type":{"type":"string","enum":["app_account_created","app_marketing_consent_changed"],"title":"Event Type"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"person":{"$ref":"#/components/schemas/MarketingSignupPerson"},"source":{"$ref":"#/components/schemas/MarketingSignupSourceV2"},"marketing_consent":{"$ref":"#/components/schemas/MarketingConsentV2"}},"type":"object","required":["schema_version","event_id","event_type","occurred_at","person","source","marketing_consent"],"title":"MarketingConsentEventV2"},"MarketingConsentFeedResponse":{"properties":{"schema_version":{"type":"integer","const":2,"title":"Schema Version"},"items":{"items":{"$ref":"#/components/schemas/MarketingConsentEventV2"},"type":"array","title":"Items"},"pending_count":{"type":"integer","minimum":0.0,"title":"Pending Count"}},"type":"object","required":["schema_version","items","pending_count"],"title":"MarketingConsentFeedResponse"},"MarketingConsentInboundItem":{"properties":{"event_id":{"type":"string","format":"uuid","title":"Event Id"},"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"},"app_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"App User Id"},"state":{"type":"string","const":"declined","title":"State"},"reason":{"type":"string","enum":["email_unsubscribe","complaint","hard_bounce"],"title":"Reason"},"recorded_at":{"type":"string","format":"date-time","title":"Recorded At"}},"type":"object","required":["event_id","email","state","reason","recorded_at"],"title":"MarketingConsentInboundItem"},"MarketingConsentInboundRequest":{"properties":{"schema_version":{"type":"integer","const":1,"title":"Schema Version"},"items":{"items":{"$ref":"#/components/schemas/MarketingConsentInboundItem"},"type":"array","maxItems":100,"minItems":1,"title":"Items"}},"type":"object","required":["schema_version","items"],"title":"MarketingConsentInboundRequest"},"MarketingConsentInboundResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MarketingConsentInboundResult"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"MarketingConsentInboundResponse"},"MarketingConsentInboundResult":{"properties":{"event_id":{"type":"string","format":"uuid","title":"Event Id"},"status":{"type":"string","enum":["accepted","duplicate","not_found"],"title":"Status"}},"type":"object","required":["event_id","status"],"title":"MarketingConsentInboundResult"},"MarketingConsentV2":{"properties":{"state":{"type":"string","enum":["granted","declined","unknown"],"title":"State"},"recorded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Recorded At"},"wording_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wording Version"},"source":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Source"}},"type":"object","required":["state","recorded_at","wording_version"],"title":"MarketingConsentV2"},"MarketingImageSearchRequest":{"properties":{"query":{"type":"string","maxLength":500,"minLength":1,"title":"Query"},"topic_cluster":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic Cluster"},"limit":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Limit","default":12}},"type":"object","required":["query"],"title":"MarketingImageSearchRequest"},"MarketingSignupAckRequest":{"properties":{"event_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":100,"minItems":1,"title":"Event Ids"}},"type":"object","required":["event_ids"],"title":"MarketingSignupAckRequest"},"MarketingSignupAckResponse":{"properties":{"acknowledged":{"type":"integer","minimum":0.0,"title":"Acknowledged"}},"type":"object","required":["acknowledged"],"title":"MarketingSignupAckResponse"},"MarketingSignupEvent":{"properties":{"schema_version":{"type":"integer","const":1,"title":"Schema Version"},"event_id":{"type":"string","format":"uuid","title":"Event Id"},"event_type":{"type":"string","const":"app_account_created","title":"Event Type"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"person":{"$ref":"#/components/schemas/MarketingSignupPerson"},"source":{"$ref":"#/components/schemas/MarketingSignupSource"},"marketing_consent":{"$ref":"#/components/schemas/MarketingConsent"}},"type":"object","required":["schema_version","event_id","event_type","occurred_at","person","source","marketing_consent"],"title":"MarketingSignupEvent"},"MarketingSignupFeedResponse":{"properties":{"schema_version":{"type":"integer","const":1,"title":"Schema Version"},"items":{"items":{"$ref":"#/components/schemas/MarketingSignupEvent"},"type":"array","title":"Items"},"pending_count":{"type":"integer","minimum":0.0,"title":"Pending Count"}},"type":"object","required":["schema_version","items","pending_count"],"title":"MarketingSignupFeedResponse"},"MarketingSignupPerson":{"properties":{"email":{"type":"string","title":"Email"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"}},"type":"object","required":["email"],"title":"MarketingSignupPerson"},"MarketingSignupSource":{"properties":{"system":{"type":"string","const":"pound_of_cure_app","title":"System"},"label":{"type":"string","const":"Pound of Cure App","title":"Label"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"signup_origin":{"type":"string","enum":["auth_account","oauth_account","checkout"],"title":"Signup Origin"}},"type":"object","required":["system","label","user_id","signup_origin"],"title":"MarketingSignupSource"},"MarketingSignupSourceV2":{"properties":{"system":{"type":"string","const":"pound_of_cure_app","title":"System"},"label":{"type":"string","const":"Pound of Cure App","title":"Label"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"signup_origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signup Origin"}},"type":"object","required":["system","label","user_id","signup_origin"],"title":"MarketingSignupSourceV2"},"MealSummary":{"properties":{"meal_date":{"type":"string","title":"Meal Date"},"meal":{"type":"string","title":"Meal"},"caloratio_score":{"type":"number","title":"Caloratio Score"},"letter_grade":{"type":"string","title":"Letter Grade"},"good_cals":{"type":"number","title":"Good Cals"},"total_cals":{"type":"number","title":"Total Cals"},"penalties":{"type":"number","title":"Penalties"},"num_items":{"type":"integer","title":"Num Items"}},"type":"object","required":["meal_date","meal","caloratio_score","letter_grade","good_cals","total_cals","penalties","num_items"],"title":"MealSummary"},"MedicationCheckRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"MedicationCheckRequest"},"MedicationCreate":{"properties":{"name":{"type":"string","title":"Name"},"dose":{"type":"string","title":"Dose"},"date_taken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date Taken"},"symptoms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symptoms"},"weight":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["name","dose"],"title":"MedicationCreate"},"MedicationResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"dose":{"type":"string","title":"Dose"},"date_taken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date Taken"},"symptoms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symptoms"},"weight":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight"},"source":{"type":"string","title":"Source","default":"manual"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"sort_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort Date"},"sort_confidence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort Confidence"}},"type":"object","required":["id","name","dose"],"title":"MedicationResponse"},"MedicationUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"dose":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dose"},"date_taken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date Taken"},"symptoms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symptoms"},"weight":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"MedicationUpdate"},"MembershipProduct":{"properties":{"identifier":{"type":"string","title":"Identifier"},"name":{"type":"string","title":"Name"},"priceCents":{"type":"integer","title":"Pricecents"},"priceDisplay":{"type":"string","title":"Pricedisplay"},"billingInterval":{"type":"string","title":"Billinginterval"},"trialPeriodDays":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trialperioddays"},"entitlement":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entitlement"}},"type":"object","required":["identifier","name","priceCents","priceDisplay","billingInterval"],"title":"MembershipProduct"},"MembershipProductsResponse":{"properties":{"products":{"items":{"$ref":"#/components/schemas/MembershipProduct"},"type":"array","title":"Products"}},"type":"object","required":["products"],"title":"MembershipProductsResponse"},"MergeNodesRequest":{"properties":{"target_node_id":{"type":"string","title":"Target Node Id"},"source_node_ids":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Source Node Ids"}},"type":"object","required":["target_node_id","source_node_ids"],"title":"MergeNodesRequest","description":"Merge multiple source nodes into a target node."},"MigratePasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"MigratePasswordRequest"},"MockedWrite":{"properties":{"tool_name":{"type":"string","title":"Tool Name"},"args":{"additionalProperties":true,"type":"object","title":"Args"},"would_save":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Would Save"},"description":{"type":"string","title":"Description"}},"type":"object","required":["tool_name","args","description"],"title":"MockedWrite","description":"Preview of what a WRITE tool would have done."},"ModelOption":{"properties":{"value":{"type":"string","title":"Value"},"label":{"type":"string","title":"Label"}},"type":"object","required":["value","label"],"title":"ModelOption"},"ModelResult":{"properties":{"rank":{"type":"integer","title":"Rank"},"modelKey":{"type":"string","title":"Modelkey"},"displayName":{"type":"string","title":"Displayname"},"modelId":{"type":"string","title":"Modelid"},"provider":{"type":"string","title":"Provider"},"baaPathToday":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Baapathtoday"},"priceTier":{"type":"string","enum":["Low","Medium","High","Extra high"],"title":"Pricetier"},"costPerMessageUsdNow":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Costpermessageusdnow"},"costPerMessageUsd2027":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Costpermessageusd2027"},"ttfwP50S":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ttfwp50S"},"ttfwP95S":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ttfwp95S"},"ttcP50S":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ttcp50S"},"ttcP95S":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ttcp95S"},"judgeScoreAvg":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Judgescoreavg"},"errors":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Errors"},"retries":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retries"},"fallbacks":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fallbacks"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"overall":{"$ref":"#/components/schemas/RatingStats"},"byRole":{"additionalProperties":{"$ref":"#/components/schemas/RatingStats"},"type":"object","title":"Byrole"},"choices":{"items":{"$ref":"#/components/schemas/ChoiceDetail"},"type":"array","title":"Choices"},"unsafeFlags":{"items":{"$ref":"#/components/schemas/UnsafeFlagDetail"},"type":"array","title":"Unsafeflags"}},"type":"object","required":["rank","modelKey","displayName","modelId","provider","baaPathToday","priceTier","costPerMessageUsdNow","costPerMessageUsd2027","ttfwP50S","ttfwP95S","ttcP50S","ttcP95S","judgeScoreAvg","errors","retries","fallbacks","notes","overall","byRole","choices","unsafeFlags"],"title":"ModelResult"},"ModelSettingOptions":{"properties":{"key":{"type":"string","title":"Key"},"workload":{"type":"string","title":"Workload"},"label":{"type":"string","title":"Label"},"default":{"type":"string","title":"Default"},"patient_facing":{"type":"boolean","title":"Patient Facing"},"gemini_thinking_level":{"type":"string","title":"Gemini Thinking Level"},"gemini_max_tokens":{"type":"integer","title":"Gemini Max Tokens"},"options":{"items":{"$ref":"#/components/schemas/ModelOption"},"type":"array","title":"Options"}},"type":"object","required":["key","workload","label","default","patient_facing","gemini_thinking_level","gemini_max_tokens","options"],"title":"ModelSettingOptions","description":"An AI workload's app_settings key and the model choices allowed for it."},"ModelSettingOptionsResponse":{"properties":{"models":{"items":{"$ref":"#/components/schemas/ModelSettingOptions"},"type":"array","title":"Models"}},"type":"object","required":["models"],"title":"ModelSettingOptionsResponse"},"ModuleCreateRequest":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"title":{"type":"string","title":"Title"},"contentType":{"type":"string","pattern":"^(video|text)$","title":"Contenttype"},"videoUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Videourl"},"videoDurationSeconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Videodurationseconds"},"videoStorageType":{"type":"string","title":"Videostoragetype","default":"youtube"},"textContent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Textcontent"},"sortOrder":{"type":"integer","title":"Sortorder","default":0}},"type":"object","required":["title","contentType"],"title":"ModuleCreateRequest"},"ModuleResponse":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"contentType":{"type":"string","title":"Contenttype"},"videoUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Videourl"},"videoDurationSeconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Videodurationseconds"},"videoStorageType":{"type":"string","title":"Videostoragetype","default":"youtube"},"thumbnailUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnailurl"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"textContent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Textcontent"},"sortOrder":{"type":"integer","title":"Sortorder"},"audioUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audiourl"},"episodeGuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Episodeguid"}},"type":"object","required":["id","title","contentType","sortOrder"],"title":"ModuleResponse"},"MonthlyOccurrence":{"type":"string","enum":["first","second","third","fourth","last"],"title":"MonthlyOccurrence"},"MyRegistrationsResponse":{"properties":{"groupRegistrations":{"items":{"$ref":"#/components/schemas/GroupSession"},"type":"array","title":"Groupregistrations"},"queueEntries":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Queueentries"}},"type":"object","required":["groupRegistrations","queueEntries"],"title":"MyRegistrationsResponse","description":"User's registrations and queue entries."},"NoteCreateRequest":{"properties":{"summary":{"type":"string","maxLength":10000,"minLength":1,"title":"Summary"},"instructions":{"type":"string","maxLength":10000,"minLength":1,"title":"Instructions"},"followup_recommendation":{"type":"string","maxLength":10000,"minLength":1,"title":"Followup Recommendation"},"visit_type_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Visit Type Id"},"visit_type":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Visit Type"},"signed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signed By"},"signed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signed At"}},"type":"object","required":["summary","instructions","followup_recommendation"],"title":"NoteCreateRequest"},"OAuthClientBrief":{"properties":{"client_id":{"type":"string","title":"Client Id"},"client_name":{"type":"string","title":"Client Name"}},"type":"object","required":["client_id","client_name"],"title":"OAuthClientBrief"},"OAuthClientListResponse":{"properties":{"clients":{"items":{"$ref":"#/components/schemas/OAuthClientBrief"},"type":"array","title":"Clients"}},"type":"object","required":["clients"],"title":"OAuthClientListResponse"},"OfficeHoursAppointmentListResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/OfficeHoursAppointmentResponse"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"OfficeHoursAppointmentListResponse","description":"List of office hours patient bookings."},"OfficeHoursAppointmentResponse":{"properties":{"id":{"type":"string","title":"Id"},"providerId":{"type":"string","title":"Providerid"},"providerName":{"type":"string","title":"Providername"},"userId":{"type":"string","title":"Userid"},"patientName":{"type":"string","title":"Patientname"},"patientEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patientemail"},"status":{"type":"string","title":"Status"},"bookingType":{"type":"string","title":"Bookingtype"},"queueDate":{"type":"string","format":"date","title":"Queuedate"},"requestedTime":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Requestedtime"},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Confirmedat"},"joinedQueueAt":{"type":"string","format":"date-time","title":"Joinedqueueat"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["id","providerId","providerName","userId","patientName","status","bookingType","queueDate","joinedQueueAt"],"title":"OfficeHoursAppointmentResponse","description":"A patient booking in the office hours queue."},"OfficeHoursByDay":{"properties":{"date":{"type":"string","format":"date","title":"Date"},"dayLabel":{"type":"string","title":"Daylabel"},"providers":{"items":{"$ref":"#/components/schemas/ProviderWithOfficeHours"},"type":"array","title":"Providers"}},"type":"object","required":["date","dayLabel","providers"],"title":"OfficeHoursByDay","description":"Office hours grouped by day."},"OfficeHoursSlot":{"properties":{"id":{"type":"string","title":"Id"},"dayOfWeek":{"type":"integer","title":"Dayofweek"},"startTime":{"type":"string","title":"Starttime"},"endTime":{"type":"string","title":"Endtime"},"timezone":{"type":"string","title":"Timezone"}},"type":"object","required":["id","dayOfWeek","startTime","endTime","timezone"],"title":"OfficeHoursSlot","description":"An office hours availability slot."},"OfficeHoursSlotRequest":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"dayOfWeek":{"type":"integer","maximum":6.0,"minimum":0.0,"title":"Dayofweek"},"startTime":{"type":"string","title":"Starttime"},"endTime":{"type":"string","title":"Endtime"},"timezone":{"type":"string","title":"Timezone","default":"America/Phoenix"},"isActive":{"type":"boolean","title":"Isactive","default":true}},"type":"object","required":["dayOfWeek","startTime","endTime"],"title":"OfficeHoursSlotRequest","description":"Request to create/update an office hours slot."},"OfficeHoursSlotResponse":{"properties":{"start_time":{"type":"string","title":"Start Time"},"end_time":{"type":"string","title":"End Time"}},"type":"object","required":["start_time","end_time"],"title":"OfficeHoursSlotResponse","description":"A single office hours time slot."},"OverrideSessionListResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/OverrideSessionResponse"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"OverrideSessionListResponse","description":"List of override sessions."},"OverrideSessionRequest":{"properties":{"overrideDate":{"type":"string","format":"date","title":"Overridedate"},"startTime":{"type":"string","title":"Starttime"},"endTime":{"type":"string","title":"Endtime"},"timezone":{"type":"string","title":"Timezone","default":"America/Phoenix"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"isActive":{"type":"boolean","title":"Isactive","default":true}},"type":"object","required":["overrideDate","startTime","endTime"],"title":"OverrideSessionRequest","description":"Request to create/update a one-off office hours session."},"OverrideSessionResponse":{"properties":{"id":{"type":"string","title":"Id"},"providerId":{"type":"string","title":"Providerid"},"overrideDate":{"type":"string","format":"date","title":"Overridedate"},"startTime":{"type":"string","title":"Starttime"},"endTime":{"type":"string","title":"Endtime"},"timezone":{"type":"string","title":"Timezone"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"isActive":{"type":"boolean","title":"Isactive"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"}},"type":"object","required":["id","providerId","overrideDate","startTime","endTime","timezone","isActive","createdAt"],"title":"OverrideSessionResponse","description":"One-off office hours session response."},"ParticipantInfo":{"properties":{"userId":{"type":"string","title":"Userid"},"displayName":{"type":"string","title":"Displayname"},"sessionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sessionid"}},"type":"object","required":["userId","displayName"],"title":"ParticipantInfo","description":"A participant currently in the video call."},"PatientTranscriptRequest":{"properties":{"patient_id":{"type":"string","minLength":1,"title":"Patient Id","description":"Patient's user UUID (required for graph scoping)"},"transcription_id":{"type":"string","minLength":1,"title":"Transcription Id","description":"WGN's unique transcription ID (used for idempotency)"},"transcription":{"type":"string","minLength":50,"title":"Transcription","description":"Full text of the patient-provider conversation"},"note_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note Id","description":"WGN's note ID"},"note_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note Content","description":"Visit note content (CC, HPI, PMH, assessment, plan)"},"encounter_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Encounter Date","description":"ISO date of the encounter (YYYY-MM-DD)"}},"type":"object","required":["patient_id","transcription_id","transcription"],"title":"PatientTranscriptRequest","description":"Request body for POST /api/external/patient-transcript-learning.\n\nWGN sends a telemed transcript for patient-specific KG extraction.\nThe transcription_id serves as an idempotency key."},"PatientTranscriptResponse":{"properties":{"status":{"type":"string","title":"Status","description":"'queued' or 'already_queued'"},"message":{"type":"string","title":"Message","default":""},"job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id"}},"type":"object","required":["status"],"title":"PatientTranscriptResponse","description":"Response from patient transcript processing."},"PendingInvitationItem":{"properties":{"token":{"type":"string","title":"Token"},"email":{"type":"string","title":"Email"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firstname"},"productIdentifier":{"type":"string","title":"Productidentifier"},"planName":{"type":"string","title":"Planname"},"priceInCents":{"type":"integer","title":"Priceincents"},"billingFrequency":{"type":"string","title":"Billingfrequency"},"expiresAt":{"type":"string","format":"date-time","title":"Expiresat"}},"type":"object","required":["token","email","productIdentifier","planName","priceInCents","billingFrequency","expiresAt"],"title":"PendingInvitationItem"},"PerformanceDiagnostics":{"properties":{"sentry_configured":{"type":"boolean","title":"Sentry Configured","default":false},"sentry_project":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sentry Project"},"cloud_trace_configured":{"type":"boolean","title":"Cloud Trace Configured","default":false},"gcp_project":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gcp Project"},"last_check":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Check"},"metrics_table_configured":{"type":"boolean","title":"Metrics Table Configured","default":false},"last_aggregation":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Aggregation"}},"type":"object","title":"PerformanceDiagnostics","description":"Performance monitoring configuration status."},"PerformanceOverview":{"properties":{"top_errors":{"items":{"$ref":"#/components/schemas/SentryError"},"type":"array","title":"Top Errors"},"slow_traces":{"items":{"$ref":"#/components/schemas/SlowTrace"},"type":"array","title":"Slow Traces"},"diagnostics":{"$ref":"#/components/schemas/PerformanceDiagnostics"}},"type":"object","required":["diagnostics"],"title":"PerformanceOverview","description":"Performance overview with errors and traces."},"PersonaChatRequest":{"properties":{"message":{"type":"string","minLength":1,"title":"Message"}},"type":"object","required":["message"],"title":"PersonaChatRequest","description":"Chat with a persona."},"PersonaDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"input_mode":{"type":"string","title":"Input Mode","default":"description"},"auto_created":{"type":"boolean","title":"Auto Created","default":false},"mock_user":{"additionalProperties":true,"type":"object","title":"Mock User"},"note_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note Content"},"transcription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcription Id"},"patient_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Id"},"kg_stats":{"additionalProperties":true,"type":"object","title":"Kg Stats"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","name","description"],"title":"PersonaDetail","description":"Full persona detail."},"PersonaKGResponse":{"properties":{"nodes":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Nodes"},"edges":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Edges"}},"type":"object","title":"PersonaKGResponse","description":"Persona's patient KG data."},"PersonaListItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"input_mode":{"type":"string","title":"Input Mode","default":"description"},"auto_created":{"type":"boolean","title":"Auto Created","default":false},"kg_stats":{"additionalProperties":true,"type":"object","title":"Kg Stats"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","name","description"],"title":"PersonaListItem","description":"A persona in the list view."},"PersonalRanking":{"properties":{"options":{"items":{"$ref":"#/components/schemas/RankingOption"},"type":"array","title":"Options"},"chosenOption":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chosenoption"}},"type":"object","required":["options","chosenOption"],"title":"PersonalRanking"},"PlanCreateRequest":{"properties":{"title":{"type":"string","title":"Title"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"content":{"type":"string","title":"Content"},"planType":{"type":"string","title":"Plantype"},"items":{"items":{"$ref":"#/components/schemas/PlanItemCreate"},"type":"array","title":"Items","default":[]}},"type":"object","required":["title","content","planType"],"title":"PlanCreateRequest","description":"Request body for creating a plan."},"PlanItemCreate":{"properties":{"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"cadence":{"type":"string","title":"Cadence","default":"once"},"dueDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Duedate"},"cadenceDetails":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cadencedetails"},"sortOrder":{"type":"integer","title":"Sortorder","default":0}},"type":"object","required":["title"],"title":"PlanItemCreate","description":"Schema for creating a plan item (used in plan creation and add-item)."},"PlanItemResponse":{"properties":{"id":{"type":"string","title":"Id"},"planId":{"type":"string","title":"Planid"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"sortOrder":{"type":"integer","title":"Sortorder"},"cadence":{"type":"string","title":"Cadence"},"dueDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Duedate"},"cadenceDetails":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cadencedetails"},"isCompleted":{"type":"boolean","title":"Iscompleted"},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completedat"},"completedBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completedby"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"isAccountable":{"type":"boolean","title":"Isaccountable","default":false},"suggestedReminder":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Suggestedreminder"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["id","planId","title","sortOrder","cadence","isCompleted","createdAt"],"title":"PlanItemResponse","description":"Full plan item response (camelCase for mobile)."},"PlanItemUpdate":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"cadence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cadence"},"dueDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Duedate"},"cadenceDetails":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cadencedetails"},"sortOrder":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sortorder"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"PlanItemUpdate","description":"Schema for updating a plan item — all fields optional."},"PlanListResponse":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"planType":{"type":"string","title":"Plantype"},"status":{"type":"string","title":"Status"},"createdBy":{"type":"string","title":"Createdby"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updatedat"},"itemCount":{"type":"integer","title":"Itemcount","default":0},"completedItemCount":{"type":"integer","title":"Completeditemcount","default":0}},"type":"object","required":["id","title","planType","status","createdBy","createdAt"],"title":"PlanListResponse","description":"Lightweight plan for list views (no items, no full content)."},"PlanModifyStreamRequest":{"properties":{"instruction":{"type":"string","maxLength":2000,"minLength":1,"title":"Instruction","description":"Natural language description of desired plan changes"}},"type":"object","required":["instruction"],"title":"PlanModifyStreamRequest","description":"Request body for AI-powered plan modification via streaming."},"PlanResponse":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"content":{"type":"string","title":"Content"},"planType":{"type":"string","title":"Plantype"},"status":{"type":"string","title":"Status"},"conversationId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversationid"},"createdBy":{"type":"string","title":"Createdby"},"updatedBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedby"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updatedat"},"items":{"items":{"$ref":"#/components/schemas/PlanItemResponse"},"type":"array","title":"Items","default":[]},"completionPercent":{"type":"integer","title":"Completionpercent","default":0},"isOwner":{"type":"boolean","title":"Isowner","default":true},"activeReminderCount":{"type":"integer","title":"Activeremindercount","default":0}},"type":"object","required":["id","title","content","planType","status","createdBy","createdAt"],"title":"PlanResponse","description":"Full plan response with items (camelCase for mobile)."},"PlanTypeCreate":{"properties":{"plan_type":{"type":"string","title":"Plan Type","description":"Unique identifier (e.g., nutrition_plan)"},"display_name":{"type":"string","title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"plan_structure":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Plan Structure","description":"Suggested structure/sections"},"construction_guidelines":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Construction Guidelines","description":"How to build this plan type"},"quality_criteria":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quality Criteria","description":"What makes a good plan"},"example_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Example Plan","description":"Example plan content"},"goal_guidance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Goal Guidance","description":"SMART goal guidance"},"typical_cadences":{"items":{"type":"string"},"type":"array","title":"Typical Cadences","description":"Common cadences"},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["plan_type","display_name"],"title":"PlanTypeCreate","description":"Request to create a new plan type."},"PlanTypeListResponse":{"properties":{"plan_types":{"items":{"$ref":"#/components/schemas/PlanTypeResponse"},"type":"array","title":"Plan Types"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["plan_types","total"],"title":"PlanTypeListResponse","description":"List of plan types."},"PlanTypeResponse":{"properties":{"plan_type":{"type":"string","title":"Plan Type","description":"Unique identifier (e.g., nutrition_plan)"},"display_name":{"type":"string","title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"plan_structure":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Plan Structure","description":"Suggested structure/sections"},"construction_guidelines":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Construction Guidelines","description":"How to build this plan type"},"quality_criteria":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quality Criteria","description":"What makes a good plan"},"example_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Example Plan","description":"Example plan content"},"goal_guidance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Goal Guidance","description":"SMART goal guidance"},"typical_cadences":{"items":{"type":"string"},"type":"array","title":"Typical Cadences","description":"Common cadences"},"is_active":{"type":"boolean","title":"Is Active","default":true},"id":{"type":"string","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["plan_type","display_name","id","created_at","updated_at"],"title":"PlanTypeResponse","description":"Full plan type response."},"PlanTypeUpdate":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"plan_structure":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Plan Structure"},"construction_guidelines":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Construction Guidelines"},"quality_criteria":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quality Criteria"},"example_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Example Plan"},"goal_guidance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Goal Guidance"},"typical_cadences":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Typical Cadences"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"PlanTypeUpdate","description":"Request to update an existing plan type — all fields optional."},"PlanUpdateRequest":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","title":"PlanUpdateRequest","description":"Request body for updating a plan — all fields optional."},"PodcastListenedResponse":{"properties":{"listenedEpisodeGuids":{"items":{"type":"string"},"type":"array","title":"Listenedepisodeguids"}},"type":"object","required":["listenedEpisodeGuids"],"title":"PodcastListenedResponse"},"PortalSessionResponse":{"properties":{"provider":{"type":"string","title":"Provider","default":"stripe"},"portal_url":{"type":"string","title":"Portal Url"}},"type":"object","required":["portal_url"],"title":"PortalSessionResponse","description":"Schema for billing portal session response."},"PostCreateRequest":{"properties":{"title":{"type":"string","title":"Title"},"body":{"type":"string","title":"Body"}},"type":"object","required":["title","body"],"title":"PostCreateRequest"},"PostDetailResponse":{"properties":{"id":{"type":"string","title":"Id"},"forumId":{"type":"string","title":"Forumid"},"authorId":{"type":"string","title":"Authorid"},"author":{"$ref":"#/components/schemas/AuthorInfo"},"title":{"type":"string","title":"Title"},"body":{"type":"string","title":"Body"},"isPinned":{"type":"boolean","title":"Ispinned"},"replyCount":{"type":"integer","title":"Replycount"},"lastActivityAt":{"type":"string","format":"date-time","title":"Lastactivityat"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updatedat"},"replies":{"items":{"$ref":"#/components/schemas/ReplyResponse"},"type":"array","title":"Replies","default":[]}},"type":"object","required":["id","forumId","authorId","author","title","body","isPinned","replyCount","lastActivityAt","createdAt"],"title":"PostDetailResponse"},"PostListResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/PostResponse"},"type":"array","title":"Results"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextcursor"}},"type":"object","required":["results"],"title":"PostListResponse"},"PostResponse":{"properties":{"id":{"type":"string","title":"Id"},"forumId":{"type":"string","title":"Forumid"},"authorId":{"type":"string","title":"Authorid"},"author":{"$ref":"#/components/schemas/AuthorInfo"},"title":{"type":"string","title":"Title"},"body":{"type":"string","title":"Body"},"isPinned":{"type":"boolean","title":"Ispinned"},"replyCount":{"type":"integer","title":"Replycount"},"lastActivityAt":{"type":"string","format":"date-time","title":"Lastactivityat"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["id","forumId","authorId","author","title","body","isPinned","replyCount","lastActivityAt","createdAt"],"title":"PostResponse"},"PptxReuploadRequest":{"properties":{"pptx_url":{"type":"string","title":"Pptx Url"}},"type":"object","required":["pptx_url"],"title":"PptxReuploadRequest"},"PreferencesResponse":{"properties":{"unit_system":{"type":"string","title":"Unit System"},"notification_method":{"type":"string","title":"Notification Method"},"accountability_coach":{"type":"string","title":"Accountability Coach"}},"type":"object","required":["unit_system","notification_method","accountability_coach"],"title":"PreferencesResponse"},"PreferencesUpdate":{"properties":{"unit_system":{"anyOf":[{"type":"string","enum":["imperial","metric"]},{"type":"null"}],"title":"Unit System"},"notification_method":{"anyOf":[{"type":"string","enum":["push","email","both"]},{"type":"null"}],"title":"Notification Method"},"accountability_coach":{"anyOf":[{"type":"string","enum":["zoe","dr_w","deidre"]},{"type":"null"}],"title":"Accountability Coach"}},"type":"object","title":"PreferencesUpdate"},"ProcessTranscriptionRequest":{"properties":{"patient_id":{"type":"string","minLength":1,"title":"Patient Id","description":"Patient's Pound of Cure user UUID for AI-consent enforcement"},"transcription_id":{"type":"string","minLength":1,"title":"Transcription Id","description":"WGN's unique transcription ID (used for idempotency)"},"transcription":{"type":"string","minLength":50,"title":"Transcription","description":"Full text of the patient-provider conversation"},"note_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note Id","description":"WGN's note ID"},"note_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note Content","description":"Visit note content (CC, HPI, PMH, assessment, plan)"},"encounter_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Encounter Date","description":"ISO date of the encounter (YYYY-MM-DD)"}},"type":"object","required":["patient_id","transcription_id","transcription"],"title":"ProcessTranscriptionRequest","description":"Request body for POST /api/external/transcript-learning.\n\nWGN sends a paired transcription + note for a single encounter.\nThe transcription_id serves as an idempotency key."},"ProcessTranscriptionResponse":{"properties":{"status":{"type":"string","title":"Status","description":"'queued', 'already_queued', or 'skipped'"},"message":{"type":"string","title":"Message","default":""},"job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id"}},"type":"object","required":["status"],"title":"ProcessTranscriptionResponse","description":"Response from transcript processing."},"Product":{"properties":{"identifier":{"type":"string","title":"Identifier"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"price_in_cents":{"type":"integer","title":"Price In Cents"},"billing_frequency":{"type":"string","title":"Billing Frequency"},"entitlement":{"type":"string","title":"Entitlement"},"trial_period_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trial Period Days"},"tax_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Code"},"features_included":{"items":{"type":"string"},"type":"array","title":"Features Included","default":[]},"features_missing":{"items":{"type":"string"},"type":"array","title":"Features Missing","default":[]},"features_addons":{"items":{"type":"string"},"type":"array","title":"Features Addons","default":[]},"include_in_paywall":{"type":"boolean","title":"Include In Paywall","default":false},"currency":{"type":"string","title":"Currency","default":"usd"},"sort_order":{"type":"integer","title":"Sort Order","default":0},"stripe_product_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Product Id"},"stripe_price_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Price Id"}},"type":"object","required":["identifier","name","description","price_in_cents","billing_frequency","entitlement"],"title":"Product","description":"Schema for a product."},"ProductInfo":{"properties":{"identifier":{"type":"string","title":"Identifier"},"name":{"type":"string","title":"Name"},"priceInCents":{"type":"integer","title":"Priceincents"},"billingFrequency":{"type":"string","title":"Billingfrequency"},"entitlement":{"type":"string","title":"Entitlement"}},"type":"object","required":["identifier","name","priceInCents","billingFrequency","entitlement"],"title":"ProductInfo"},"PromoAudioConfigRequest":{"properties":{"audio_source":{"type":"string","enum":["tts","uploaded","video"],"title":"Audio Source","default":"tts"},"tts_voice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tts Voice Id"},"uploaded_audio_urls":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Uploaded Audio Urls"}},"type":"object","title":"PromoAudioConfigRequest"},"PromoCompositionUpdateRequest":{"properties":{"composition_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Composition Id"},"composition_props":{"additionalProperties":true,"type":"object","title":"Composition Props"}},"type":"object","title":"PromoCompositionUpdateRequest"},"PromoPostAIEditRequest":{"properties":{"platform":{"type":"string","maxLength":50,"minLength":1,"title":"Platform"},"content":{"type":"string","maxLength":10000,"minLength":1,"title":"Content"},"instruction":{"type":"string","maxLength":2000,"minLength":1,"title":"Instruction"}},"type":"object","required":["platform","content","instruction"],"title":"PromoPostAIEditRequest"},"PromoPostGenerateRequest":{"properties":{"platform":{"type":"string","maxLength":50,"minLength":1,"title":"Platform"}},"type":"object","required":["platform"],"title":"PromoPostGenerateRequest"},"PromoPostSaveRequest":{"properties":{"platform":{"type":"string","maxLength":50,"minLength":1,"title":"Platform"},"content":{"type":"string","maxLength":10000,"minLength":1,"title":"Content"}},"type":"object","required":["platform","content"],"title":"PromoPostSaveRequest"},"PromoSceneAsset":{"properties":{"sceneNumber":{"type":"integer","title":"Scenenumber"},"videoUrl":{"type":"string","title":"Videourl"},"originalDuration":{"type":"number","title":"Originalduration"},"targetDuration":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Targetduration"},"trimStart":{"type":"number","title":"Trimstart","default":0},"trimEnd":{"type":"number","title":"Trimend","default":0},"sourceTrimStart":{"type":"number","title":"Sourcetrimstart","default":0},"sourceTrimEnd":{"type":"number","title":"Sourcetrimend","default":0},"displayMode":{"type":"string","title":"Displaymode","default":"phone-frame"},"durationMode":{"type":"string","title":"Durationmode","default":"scene-length"},"playbackSpeed":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Playbackspeed"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Imageurl"},"imageDisplayStyle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Imagedisplaystyle"},"scale":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Scale"},"imageAnimation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Imageanimation"},"rotation":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rotation"},"perspectiveX":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Perspectivex"},"perspectiveY":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Perspectivey"}},"type":"object","required":["sceneNumber","videoUrl","originalDuration"],"title":"PromoSceneAsset"},"PromoSceneAssetsUpdateRequest":{"properties":{"scene_assets":{"items":{"$ref":"#/components/schemas/PromoSceneAsset"},"type":"array","title":"Scene Assets"}},"type":"object","required":["scene_assets"],"title":"PromoSceneAssetsUpdateRequest"},"PromoSceneEntry":{"properties":{"sceneNumber":{"type":"integer","title":"Scenenumber"},"sceneDescription":{"type":"string","title":"Scenedescription"},"narration":{"type":"string","title":"Narration"},"durationSeconds":{"type":"number","title":"Durationseconds"},"compositionHints":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Compositionhints"}},"type":"object","required":["sceneNumber","sceneDescription","narration","durationSeconds"],"title":"PromoSceneEntry"},"PromoScriptAIEditRequest":{"properties":{"instruction":{"type":"string","maxLength":2000,"minLength":1,"title":"Instruction"}},"type":"object","required":["instruction"],"title":"PromoScriptAIEditRequest"},"PromoScriptUpdateRequest":{"properties":{"script":{"items":{"$ref":"#/components/schemas/PromoSceneEntry"},"type":"array","title":"Script"}},"type":"object","required":["script"],"title":"PromoScriptUpdateRequest"},"PromoVideoCreateRequest":{"properties":{"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"video_purpose":{"type":"string","title":"Video Purpose","default":"social_media"},"aspect_ratio":{"type":"string","title":"Aspect Ratio","default":"16:9"},"target_duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Target Duration Seconds"},"features":{"items":{"type":"string"},"type":"array","title":"Features"},"creative_brief":{"type":"string","title":"Creative Brief","default":""}},"type":"object","required":["title"],"title":"PromoVideoCreateRequest"},"PromoVideoListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PromoVideoResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"PromoVideoListResponse"},"PromoVideoResponse":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"slug":{"type":"string","title":"Slug"},"video_purpose":{"type":"string","title":"Video Purpose"},"aspect_ratio":{"type":"string","title":"Aspect Ratio"},"target_duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Target Duration Seconds"},"features":{"items":{"type":"string"},"type":"array","title":"Features"},"creative_brief":{"type":"string","title":"Creative Brief"},"script_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script Status"},"audio_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio Status"},"composition_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Composition Status"},"render_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Render Status"},"script":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Script"},"audio_source":{"type":"string","title":"Audio Source"},"tts_voice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tts Voice Id"},"audio_urls":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Audio Urls"},"scene_assets":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Scene Assets"},"composition_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Composition Id"},"composition_props":{"additionalProperties":true,"type":"object","title":"Composition Props"},"video_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Url"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"post_content":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Post Content"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"error_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Source"},"created_by":{"type":"string","title":"Created By"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","title","slug","video_purpose","aspect_ratio","target_duration_seconds","features","creative_brief","script_status","audio_status","composition_status","render_status","script","audio_source","tts_voice_id","audio_urls","scene_assets","composition_id","composition_props","video_url","thumbnail_url","duration_seconds","post_content","error_message","error_source","created_by","created_at","updated_at"],"title":"PromoVideoResponse"},"PromoVideoUpdateRequest":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"video_purpose":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Purpose"},"aspect_ratio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aspect Ratio"},"target_duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Target Duration Seconds"},"features":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Features"},"creative_brief":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creative Brief"}},"type":"object","title":"PromoVideoUpdateRequest"},"ProviderAccessLevel":{"type":"string","enum":["support","pound_of_cure","platinum"],"title":"ProviderAccessLevel","description":"Provider access level determining which subscription tiers can book."},"ProviderBriefListResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/ProviderBriefResponse"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"ProviderBriefListResponse","description":"List of providers with office hours."},"ProviderBriefResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"photoUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photourl"},"officeHoursEnabled":{"type":"boolean","title":"Officehoursenabled"}},"type":"object","required":["id","name","officeHoursEnabled"],"title":"ProviderBriefResponse","description":"Brief provider info for office hours dropdowns."},"ProviderCreateRequest":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description","default":""},"linkedUserId":{"type":"string","title":"Linkeduserid"},"externalProviderId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Externalproviderid"},"accessLevel":{"$ref":"#/components/schemas/ProviderAccessLevel","default":"support"},"timezone":{"type":"string","title":"Timezone","default":"America/Phoenix"},"queueWindowMinutes":{"type":"integer","maximum":60.0,"minimum":0.0,"title":"Queuewindowminutes","default":15},"sessionDurationMinutes":{"type":"integer","maximum":30.0,"minimum":1.0,"title":"Sessiondurationminutes","default":6},"officeHours":{"items":{"$ref":"#/components/schemas/OfficeHoursSlotRequest"},"type":"array","title":"Officehours","default":[]},"licenses":{"items":{"$ref":"#/components/schemas/ProviderLicenseRequest"},"type":"array","title":"Licenses","default":[]},"stateLicenseNotRequired":{"type":"boolean","title":"Statelicensenotrequired","default":false},"defaultVisitTypeId":{"type":"integer","title":"Defaultvisittypeid"}},"type":"object","required":["name","linkedUserId","defaultVisitTypeId"],"title":"ProviderCreateRequest","description":"Request to create/update a provider."},"ProviderLicenseRequest":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"state":{"type":"string","maxLength":2,"minLength":2,"title":"State"},"licenseNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Licensenumber"},"expirationDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expirationdate"}},"type":"object","required":["state"],"title":"ProviderLicenseRequest","description":"Request to create/update a provider license."},"ProviderLicenseResponse":{"properties":{"id":{"type":"integer","title":"Id"},"state":{"type":"string","title":"State"},"licenseNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Licensenumber"},"expirationDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expirationdate"}},"type":"object","required":["id","state"],"title":"ProviderLicenseResponse","description":"A provider's state license."},"ProviderListResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/ProviderResponse"},"type":"array","title":"Results"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextcursor"}},"type":"object","required":["results"],"title":"ProviderListResponse"},"ProviderOfficeHoursResponse":{"properties":{"provider_id":{"type":"string","title":"Provider Id"},"provider_name":{"type":"string","title":"Provider Name"},"date":{"type":"string","format":"date","title":"Date"},"timezone":{"type":"string","title":"Timezone"},"office_hours":{"items":{"$ref":"#/components/schemas/OfficeHoursSlotResponse"},"type":"array","title":"Office Hours"},"is_excluded":{"type":"boolean","title":"Is Excluded"}},"type":"object","required":["provider_id","provider_name","date","timezone","office_hours","is_excluded"],"title":"ProviderOfficeHoursResponse","description":"Provider office hours for a specific date."},"ProviderResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"photoUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photourl"},"linkedUserId":{"type":"string","title":"Linkeduserid"},"externalProviderId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Externalproviderid"},"accessLevel":{"$ref":"#/components/schemas/ProviderAccessLevel","default":"support"},"timezone":{"type":"string","title":"Timezone","default":"America/Phoenix"},"queueWindowMinutes":{"type":"integer","title":"Queuewindowminutes","default":15},"sessionDurationMinutes":{"type":"integer","title":"Sessiondurationminutes","default":6},"officeHours":{"items":{"$ref":"#/components/schemas/app__schemas__admin_schemas__OfficeHoursSlotResponse"},"type":"array","title":"Officehours","default":[]},"licenses":{"items":{"$ref":"#/components/schemas/ProviderLicenseResponse"},"type":"array","title":"Licenses","default":[]},"stateLicenseNotRequired":{"type":"boolean","title":"Statelicensenotrequired","default":false},"isActive":{"type":"boolean","title":"Isactive","default":true},"defaultVisitTypeId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Defaultvisittypeid"},"defaultVisitTypeName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Defaultvisittypename"}},"type":"object","required":["id","name","description","linkedUserId"],"title":"ProviderResponse","description":"Provider (office hours host) response."},"ProviderScheduleResponse":{"properties":{"provider":{"$ref":"#/components/schemas/ProviderResponse"},"exclusions":{"items":{"$ref":"#/components/schemas/ExclusionPeriodResponse"},"type":"array","title":"Exclusions"},"overrides":{"items":{"$ref":"#/components/schemas/OverrideSessionResponse"},"type":"array","title":"Overrides"}},"type":"object","required":["provider","exclusions","overrides"],"title":"ProviderScheduleResponse","description":"Full provider schedule with recurring hours, exclusions, and overrides."},"ProviderStatusRequest":{"properties":{"provider_id":{"type":"string","title":"Provider Id"},"status":{"type":"string","pattern":"^(online|offline)$","title":"Status"}},"type":"object","required":["provider_id","status"],"title":"ProviderStatusRequest","description":"Request to update a provider's online/offline status."},"ProviderStatusResponse":{"properties":{"provider_id":{"type":"string","title":"Provider Id"},"provider_name":{"type":"string","title":"Provider Name"},"current_status":{"type":"string","title":"Current Status"},"available_statuses":{"items":{"type":"string"},"type":"array","title":"Available Statuses","default":["online","offline"]},"is_within_office_hours":{"type":"boolean","title":"Is Within Office Hours"},"last_online_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Online At"},"has_active_room":{"type":"boolean","title":"Has Active Room"}},"type":"object","required":["provider_id","provider_name","current_status","is_within_office_hours","has_active_room"],"title":"ProviderStatusResponse","description":"Provider status for external API consumers (Grail)."},"ProviderWithOfficeHours":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"photoUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photourl"},"officeHours":{"items":{"$ref":"#/components/schemas/OfficeHoursSlot"},"type":"array","title":"Officehours"},"queueWindowMinutes":{"type":"integer","title":"Queuewindowminutes"},"sessionDurationMinutes":{"type":"integer","title":"Sessiondurationminutes"},"currentQueueLength":{"type":"integer","title":"Currentqueuelength","default":0},"isOnline":{"type":"boolean","title":"Isonline","default":false},"isQueueOpen":{"type":"boolean","title":"Isqueueopen","default":false},"nextAvailableTime":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Nextavailabletime"},"userQueueStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Userqueuestatus"},"userQueuePosition":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Userqueueposition"},"advanceQueueWindowHours":{"type":"integer","title":"Advancequeuewindowhours","default":0}},"type":"object","required":["id","name","officeHours","queueWindowMinutes","sessionDurationMinutes"],"title":"ProviderWithOfficeHours","description":"Provider with their office hours for display."},"PublicLinkRouteResponse":{"properties":{"destination":{"type":"string","title":"Destination"},"ogTitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ogtitle"},"ogDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ogdescription"}},"type":"object","required":["destination"],"title":"PublicLinkRouteResponse","description":"What the link.gololi.ai resolver needs to render a short link page."},"PublicSettingResponse":{"properties":{"key":{"type":"string","title":"Key"},"value":{"type":"string","title":"Value"},"setting_type":{"type":"string","title":"Setting Type"}},"type":"object","required":["key","value","setting_type"],"title":"PublicSettingResponse","description":"Public response for a single setting value (no admin fields)."},"PublishRequest":{"properties":{"course_id":{"type":"integer","title":"Course Id"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"}},"type":"object","required":["course_id"],"title":"PublishRequest"},"QAPairItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"patient_question":{"type":"string","title":"Patient Question"},"provider_answer":{"type":"string","title":"Provider Answer"},"excerpt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Excerpt"},"sort_order":{"type":"integer","title":"Sort Order","default":0}},"type":"object","required":["id","patient_question","provider_answer"],"title":"QAPairItem","description":"An extracted Q&A pair from a transcript."},"QuestionCreateRequest":{"properties":{"questionText":{"type":"string","title":"Questiontext"},"explanation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation"},"sortOrder":{"type":"integer","title":"Sortorder","default":0},"answers":{"items":{"$ref":"#/components/schemas/AnswerCreateRequest"},"type":"array","title":"Answers","default":[]}},"type":"object","required":["questionText"],"title":"QuestionCreateRequest"},"QuestionPickRequest":{"properties":{"kind":{"type":"string","enum":["best","worst"],"title":"Kind"},"answerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Answerid"}},"type":"object","required":["kind","answerId"],"title":"QuestionPickRequest"},"QuestionResponse":{"properties":{"id":{"type":"string","title":"Id"},"questionText":{"type":"string","title":"Questiontext"},"explanation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation"},"sortOrder":{"type":"integer","title":"Sortorder"},"answers":{"items":{"$ref":"#/components/schemas/AnswerResponse"},"type":"array","title":"Answers","default":[]}},"type":"object","required":["id","questionText","sortOrder"],"title":"QuestionResponse"},"QueueEntry":{"properties":{"id":{"type":"string","title":"Id"},"providerId":{"type":"string","title":"Providerid"},"userId":{"type":"string","title":"Userid"},"position":{"type":"integer","title":"Position"},"status":{"type":"string","title":"Status"},"joinedQueueAt":{"type":"string","format":"date-time","title":"Joinedqueueat"},"sessionStartedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sessionstartedat"},"bookingType":{"type":"string","title":"Bookingtype","default":"advance"},"requestedTime":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Requestedtime"},"deferredUntil":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deferreduntil"},"deferCount":{"type":"integer","title":"Defercount","default":0},"effectiveTime":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effectivetime"}},"type":"object","required":["id","providerId","userId","position","status","joinedQueueAt"],"title":"QueueEntry","description":"A queue entry for office hours."},"QueueJoinResult":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"entry":{"anyOf":[{"$ref":"#/components/schemas/QueueEntry"},{"type":"null"}]},"position":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Position"}},"type":"object","required":["success","message"],"title":"QueueJoinResult","description":"Result of joining the queue."},"QueueStatusResponse":{"properties":{"inQueue":{"type":"boolean","title":"Inqueue"},"position":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Position"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"estimatedWaitMinutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Estimatedwaitminutes"},"queueLength":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Queuelength"},"sessionDurationMinutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sessiondurationminutes"},"bookingType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bookingtype"},"requestedTime":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Requestedtime"},"deferredUntil":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deferreduntil"},"canDefer":{"type":"boolean","title":"Candefer","default":false},"canJoin":{"type":"boolean","title":"Canjoin","default":false},"confirmedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Confirmedat"},"providerTimezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Providertimezone"}},"type":"object","required":["inQueue"],"title":"QueueStatusResponse","description":"Queue status for a user."},"QueueSummaryResponse":{"properties":{"pending":{"type":"integer","title":"Pending"},"processing":{"type":"integer","title":"Processing"},"completed":{"type":"integer","title":"Completed"},"failed":{"type":"integer","title":"Failed"},"total":{"type":"integer","title":"Total"},"job_types":{"items":{"type":"string"},"type":"array","title":"Job Types"}},"type":"object","required":["pending","processing","completed","failed","total","job_types"],"title":"QueueSummaryResponse"},"QuizAnswerForUser":{"properties":{"id":{"type":"string","title":"Id"},"answerText":{"type":"string","title":"Answertext"}},"type":"object","required":["id","answerText"],"title":"QuizAnswerForUser"},"QuizAnswerSubmission":{"properties":{"questionId":{"type":"string","title":"Questionid"},"answerId":{"type":"string","title":"Answerid"}},"type":"object","required":["questionId","answerId"],"title":"QuizAnswerSubmission"},"QuizCreateRequest":{"properties":{"courseId":{"type":"string","title":"Courseid"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"passingScorePercent":{"type":"integer","title":"Passingscorepercent","default":80},"timeLimitMinutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Timelimitminutes"},"allowRetakes":{"type":"boolean","title":"Allowretakes","default":true},"isPublished":{"type":"boolean","title":"Ispublished","default":false},"questions":{"items":{"$ref":"#/components/schemas/QuestionCreateRequest"},"type":"array","title":"Questions","default":[]}},"type":"object","required":["courseId","title"],"title":"QuizCreateRequest"},"QuizForUserResponse":{"properties":{"id":{"type":"string","title":"Id"},"courseId":{"type":"string","title":"Courseid"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"passingScorePercent":{"type":"integer","title":"Passingscorepercent"},"timeLimitMinutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Timelimitminutes"},"allowRetakes":{"type":"boolean","title":"Allowretakes"},"questionCount":{"type":"integer","title":"Questioncount"},"questions":{"items":{"$ref":"#/components/schemas/QuizQuestionForUser"},"type":"array","title":"Questions"}},"type":"object","required":["id","courseId","title","passingScorePercent","allowRetakes","questionCount","questions"],"title":"QuizForUserResponse"},"QuizQuestionForUser":{"properties":{"id":{"type":"string","title":"Id"},"questionText":{"type":"string","title":"Questiontext"},"answers":{"items":{"$ref":"#/components/schemas/QuizAnswerForUser"},"type":"array","title":"Answers"}},"type":"object","required":["id","questionText","answers"],"title":"QuizQuestionForUser"},"QuizResponse":{"properties":{"id":{"type":"string","title":"Id"},"courseId":{"type":"string","title":"Courseid"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"passingScorePercent":{"type":"integer","title":"Passingscorepercent"},"timeLimitMinutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Timelimitminutes"},"allowRetakes":{"type":"boolean","title":"Allowretakes"},"isPublished":{"type":"boolean","title":"Ispublished"},"questions":{"items":{"$ref":"#/components/schemas/QuestionResponse"},"type":"array","title":"Questions","default":[]}},"type":"object","required":["id","courseId","title","passingScorePercent","allowRetakes","isPublished"],"title":"QuizResponse"},"QuizResultResponse":{"properties":{"attemptId":{"type":"string","title":"Attemptid"},"scorePercent":{"type":"integer","title":"Scorepercent"},"passed":{"type":"boolean","title":"Passed"},"correctAnswers":{"type":"integer","title":"Correctanswers"},"totalQuestions":{"type":"integer","title":"Totalquestions"},"earnedCertification":{"type":"boolean","title":"Earnedcertification"},"certificateNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Certificatenumber"},"certificationId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Certificationid"}},"type":"object","required":["attemptId","scorePercent","passed","correctAnswers","totalQuestions","earnedCertification"],"title":"QuizResultResponse"},"QuizSubmitRequest":{"properties":{"answers":{"items":{"$ref":"#/components/schemas/QuizAnswerSubmission"},"type":"array","title":"Answers"},"timeTakenSeconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Timetakenseconds"}},"type":"object","required":["answers"],"title":"QuizSubmitRequest"},"RagChatMessage":{"properties":{"role":{"type":"string","title":"Role","description":"'user' or 'assistant'"},"content":{"type":"string","title":"Content","description":"Message content"}},"type":"object","required":["role","content"],"title":"RagChatMessage","description":"A single message in the RAG chat"},"RagChatRequest":{"properties":{"message":{"type":"string","minLength":1,"title":"Message","description":"User's message"},"model":{"type":"string","title":"Model","description":"Model to use for response generation","default":"claude-sonnet-4-6"},"messages":{"items":{"$ref":"#/components/schemas/RagChatMessage"},"type":"array","title":"Messages","description":"Previous messages in conversation (for context)"},"top_k":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Top K","description":"Number of RAG results to include","default":5},"include_sources":{"type":"boolean","title":"Include Sources","description":"Include source citations in response","default":true}},"type":"object","required":["message"],"title":"RagChatRequest","description":"Request for RAG-augmented chat"},"RagChatResponse":{"properties":{"response":{"type":"string","title":"Response","description":"AI-generated response"},"sources":{"items":{"$ref":"#/components/schemas/RagChatSource"},"type":"array","title":"Sources","description":"Sources used"},"model_used":{"type":"string","title":"Model Used","description":"Model that generated the response"},"rag_results_count":{"type":"integer","title":"Rag Results Count","description":"Number of RAG results retrieved"},"input_tokens":{"type":"integer","title":"Input Tokens","description":"Number of input tokens","default":0},"output_tokens":{"type":"integer","title":"Output Tokens","description":"Number of output tokens","default":0},"total_tokens":{"type":"integer","title":"Total Tokens","description":"Total tokens used","default":0},"estimated_cost_usd":{"type":"number","title":"Estimated Cost Usd","description":"Estimated cost in USD","default":0.0}},"type":"object","required":["response","model_used","rag_results_count"],"title":"RagChatResponse","description":"Response from RAG chat"},"RagChatSource":{"properties":{"title":{"type":"string","title":"Title"},"content_type":{"type":"string","title":"Content Type"},"score":{"type":"number","title":"Score"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},"type":"object","required":["title","content_type","score"],"title":"RagChatSource","description":"A source used in the RAG response"},"RankingOption":{"properties":{"option":{"type":"integer","title":"Option"},"score":{"type":"number","title":"Score"},"upCount":{"type":"integer","title":"Upcount"},"averageCount":{"type":"integer","title":"Averagecount"},"downCount":{"type":"integer","title":"Downcount"},"bestCount":{"type":"integer","title":"Bestcount"},"worstCount":{"type":"integer","title":"Worstcount"},"priceTier":{"type":"string","enum":["Low","Medium","High","Extra high"],"title":"Pricetier"},"costPerMessageUsd2027":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Costpermessageusd2027"},"medianTimeToFirstWordS":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mediantimetofirstwords"},"medianTimeToCompleteS":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mediantimetocompletes"}},"type":"object","required":["option","score","upCount","averageCount","downCount","bestCount","worstCount","priceTier","costPerMessageUsd2027","medianTimeToFirstWordS","medianTimeToCompleteS"],"title":"RankingOption"},"RatingStats":{"properties":{"ratings":{"type":"integer","title":"Ratings"},"upRate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Uprate"},"averageRate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Averagerate"},"downRate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Downrate"},"bestCount":{"type":"integer","title":"Bestcount"},"worstCount":{"type":"integer","title":"Worstcount"},"avgPersonalScore":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avgpersonalscore"},"choiceCount":{"type":"integer","title":"Choicecount"},"choiceShare":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Choiceshare"}},"type":"object","required":["ratings","upRate","averageRate","downRate","bestCount","worstCount","avgPersonalScore","choiceCount","choiceShare"],"title":"RatingStats"},"RatingsExport":{"properties":{"filename":{"type":"string","title":"Filename"},"csv":{"type":"string","title":"Csv"}},"type":"object","required":["filename","csv"],"title":"RatingsExport"},"ReactivateTranscriptFaqsRequest":{"properties":{"include_removed":{"type":"boolean","title":"Include Removed","default":false}},"type":"object","title":"ReactivateTranscriptFaqsRequest"},"ReassignmentCandidate":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"role":{"type":"string","title":"Role"}},"type":"object","required":["id","email","name","role"],"title":"ReassignmentCandidate","description":"A user who can receive reassigned content."},"RecordPaymentRequest":{"properties":{"amountCents":{"type":"integer","exclusiveMinimum":0.0,"title":"Amountcents"},"paymentMethod":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paymentmethod"},"referenceNote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referencenote"},"periodStart":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Periodstart"},"periodEnd":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Periodend"}},"type":"object","required":["amountCents"],"title":"RecordPaymentRequest","description":"Request to record a manual affiliate payment."},"RecurrencePattern":{"properties":{"id":{"type":"string","title":"Id"},"frequencyType":{"$ref":"#/components/schemas/FrequencyType"},"dayOfWeek":{"$ref":"#/components/schemas/DayOfWeek"},"monthlyOccurrences":{"items":{"$ref":"#/components/schemas/MonthlyOccurrence"},"type":"array","title":"Monthlyoccurrences"},"startTime":{"type":"string","title":"Starttime"},"durationMinutes":{"type":"integer","title":"Durationminutes"},"timezone":{"type":"string","title":"Timezone"},"startDate":{"type":"string","title":"Startdate"},"endDate":{"type":"string","title":"Enddate"}},"type":"object","required":["id","frequencyType","dayOfWeek","monthlyOccurrences","startTime","durationMinutes","timezone","startDate","endDate"],"title":"RecurrencePattern"},"RegistrationResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"registrationId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrationid"}},"type":"object","required":["success","message"],"title":"RegistrationResponse","description":"Response for registration actions."},"ReminderConfigCreate":{"properties":{"reminder_time":{"type":"string","pattern":"^\\d{2}:\\d{2}$","title":"Reminder Time","description":"HH:MM format"},"reminder_days":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Reminder Days"},"reminder_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reminder Message"},"condition_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Condition Type"},"condition_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Condition Threshold"},"auto_complete_condition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auto Complete Condition"},"auto_complete_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Auto Complete Threshold"},"celebration_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Celebration Message"}},"type":"object","required":["reminder_time","reminder_days"],"title":"ReminderConfigCreate"},"ReminderConfigResponse":{"properties":{"id":{"type":"string","title":"Id"},"planItemId":{"type":"string","title":"Planitemid"},"isActive":{"type":"boolean","title":"Isactive"},"reminderTime":{"type":"string","title":"Remindertime"},"reminderDays":{"items":{"type":"string"},"type":"array","title":"Reminderdays"},"reminderMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remindermessage"},"conditionType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conditiontype"},"conditionThreshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Conditionthreshold"},"autoCompleteCondition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Autocompletecondition"},"autoCompleteThreshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Autocompletethreshold"},"celebrationMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Celebrationmessage"},"lastSentAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Lastsentat"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["id","planItemId","isActive","reminderTime","reminderDays","reminderMessage","conditionType","conditionThreshold","autoCompleteCondition","autoCompleteThreshold","celebrationMessage","lastSentAt","createdAt","updatedAt"],"title":"ReminderConfigResponse","description":"Reminder config response (camelCase for mobile)."},"ReminderHubItem":{"properties":{"reminder":{"$ref":"#/components/schemas/ReminderConfigResponse"},"planId":{"type":"string","title":"Planid"},"planTitle":{"type":"string","title":"Plantitle"},"itemTitle":{"type":"string","title":"Itemtitle"},"itemCadence":{"type":"string","title":"Itemcadence"},"completedToday":{"type":"boolean","title":"Completedtoday"},"currentStreak":{"type":"integer","title":"Currentstreak"}},"type":"object","required":["reminder","planId","planTitle","itemTitle","itemCadence","completedToday","currentStreak"],"title":"ReminderHubItem","description":"Reminder with parent plan/item context for the reminders hub (camelCase for mobile)."},"RemoveFromQueueBody":{"properties":{"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"RemoveFromQueueBody"},"ReplayRequest":{"properties":{"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt"},"user_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Prompt"}},"type":"object","title":"ReplayRequest","description":"Request to replay an AI log with modified prompts."},"ReplayResponse":{"properties":{"replay_log_id":{"type":"string","title":"Replay Log Id"},"original_log_id":{"type":"string","title":"Original Log Id"},"system_prompt":{"type":"string","title":"System Prompt"},"user_prompt":{"type":"string","title":"User Prompt"},"ai_response":{"type":"string","title":"Ai Response"},"tool_calls":{"items":{"$ref":"#/components/schemas/ToolCall"},"type":"array","title":"Tool Calls"},"mocked_writes":{"items":{"$ref":"#/components/schemas/MockedWrite"},"type":"array","title":"Mocked Writes"},"duration_seconds":{"type":"number","title":"Duration Seconds"},"token_usage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Token Usage"},"cost_usd":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Cost Usd"}},"type":"object","required":["replay_log_id","original_log_id","system_prompt","user_prompt","ai_response","duration_seconds"],"title":"ReplayResponse","description":"Response from replaying an AI log."},"ReplyCreateRequest":{"properties":{"body":{"type":"string","title":"Body"},"parentReplyId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentreplyid"}},"type":"object","required":["body"],"title":"ReplyCreateRequest"},"ReplyResponse":{"properties":{"id":{"type":"string","title":"Id"},"authorId":{"type":"string","title":"Authorid"},"author":{"$ref":"#/components/schemas/AuthorInfo"},"body":{"type":"string","title":"Body"},"parentReplyId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentreplyid"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updatedat"}},"type":"object","required":["id","authorId","author","body","createdAt"],"title":"ReplyResponse"},"ReplyToTicketRequest":{"properties":{"message":{"type":"string","maxLength":5000,"minLength":1,"title":"Message"}},"type":"object","required":["message"],"title":"ReplyToTicketRequest"},"ResourceDetail":{"properties":{"id":{"type":"integer","title":"Id"},"title":{"type":"string","title":"Title"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"content_type":{"type":"string","title":"Content Type"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"is_premium":{"type":"boolean","title":"Is Premium"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"video_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Id"},"publication_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Publication Date"},"user_has_access":{"type":"boolean","title":"User Has Access"}},"type":"object","required":["id","title","content_type","is_premium","user_has_access"],"title":"ResourceDetail","description":"Full resource detail, with access control."},"ResourceListItem":{"properties":{"id":{"type":"integer","title":"Id"},"title":{"type":"string","title":"Title"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"content_type":{"type":"string","title":"Content Type"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"is_premium":{"type":"boolean","title":"Is Premium"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"video_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Id"},"publication_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Publication Date"}},"type":"object","required":["id","title","content_type","is_premium"],"title":"ResourceListItem","description":"Summary for resource list view."},"RetentionRow":{"properties":{"cohortWeek":{"type":"string","title":"Cohortweek"},"cohortSize":{"type":"integer","title":"Cohortsize"},"weekNumber":{"type":"integer","title":"Weeknumber"},"retainedUsers":{"type":"integer","title":"Retainedusers"},"retentionPct":{"type":"number","title":"Retentionpct"}},"type":"object","required":["cohortWeek","cohortSize","weekNumber","retainedUsers","retentionPct"],"title":"RetentionRow"},"RevealOption":{"properties":{"option":{"type":"integer","title":"Option"},"score":{"type":"number","title":"Score"},"upCount":{"type":"integer","title":"Upcount"},"averageCount":{"type":"integer","title":"Averagecount"},"downCount":{"type":"integer","title":"Downcount"},"bestCount":{"type":"integer","title":"Bestcount"},"worstCount":{"type":"integer","title":"Worstcount"},"priceTier":{"type":"string","enum":["Low","Medium","High","Extra high"],"title":"Pricetier"},"costPerMessageUsd2027":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Costpermessageusd2027"},"medianTimeToFirstWordS":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mediantimetofirstwords"},"medianTimeToCompleteS":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Mediantimetocompletes"},"displayName":{"type":"string","title":"Displayname"},"provider":{"type":"string","title":"Provider"},"costPerMessageUsdNow":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Costpermessageusdnow"},"chosen":{"type":"boolean","title":"Chosen"}},"type":"object","required":["option","score","upCount","averageCount","downCount","bestCount","worstCount","priceTier","costPerMessageUsd2027","medianTimeToFirstWordS","medianTimeToCompleteS","displayName","provider","costPerMessageUsdNow","chosen"],"title":"RevealOption"},"RoleCount":{"properties":{"registered":{"type":"integer","title":"Registered"},"finishedQuestions":{"type":"integer","title":"Finishedquestions"},"chose":{"type":"integer","title":"Chose"},"completionRate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Completionrate"}},"type":"object","required":["registered","finishedQuestions","chose","completionRate"],"title":"RoleCount"},"RoleValidationResponse":{"properties":{"canChange":{"type":"boolean","title":"Canchange"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"activeScheduleCount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Activeschedulecount"}},"type":"object","required":["canChange"],"title":"RoleValidationResponse","description":"Validation result for role changes."},"RoundResults":{"properties":{"round":{"$ref":"#/components/schemas/AdminRoundSummary"},"questionCount":{"type":"integer","title":"Questioncount"},"voters":{"additionalProperties":{"$ref":"#/components/schemas/RoleCount"},"type":"object","title":"Voters"},"models":{"items":{"$ref":"#/components/schemas/ModelResult"},"type":"array","title":"Models"}},"type":"object","required":["round","questionCount","voters","models"],"title":"RoundResults"},"SEOBulkTargetingRequest":{"properties":{"keyword_ids":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Keyword Ids"},"status":{"type":"string","pattern":"^(approved|rejected|pending)$","title":"Status"}},"type":"object","required":["keyword_ids","status"],"title":"SEOBulkTargetingRequest"},"SEOKeywordUpdate":{"properties":{"topic_cluster":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic Cluster"},"intent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent"},"targeted_by_post_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Targeted By Post Id"}},"type":"object","title":"SEOKeywordUpdate"},"SEOResearchRequest":{"properties":{"seed_terms":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Seed Terms"},"topic_cluster":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic Cluster"}},"type":"object","required":["seed_terms"],"title":"SEOResearchRequest"},"SEOTargetingStatusRequest":{"properties":{"status":{"type":"string","pattern":"^(approved|rejected|pending)$","title":"Status"}},"type":"object","required":["status"],"title":"SEOTargetingStatusRequest"},"SageChatRequest":{"properties":{"message":{"type":"string","maxLength":4000,"minLength":1,"title":"Message"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id","description":"Continue an existing conversation. If None, starts a new one."}},"type":"object","required":["message"],"title":"SageChatRequest","description":"Request to send a message to Sage"},"SageChatResponse":{"properties":{"response":{"type":"string","title":"Response"},"conversation_id":{"type":"string","title":"Conversation Id"},"sources":{"items":{"$ref":"#/components/schemas/SageSource"},"type":"array","title":"Sources"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["response","conversation_id","created_at"],"title":"SageChatResponse","description":"Response from Sage chat"},"SageContentType":{"type":"string","enum":["video","web_page","audio","pdf","book","faq"],"title":"SageContentType","description":"Media format types for RAG sources.\n\nUsed for determining how to display content and route deep links."},"SageConversation":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"messages":{"items":{"$ref":"#/components/schemas/SageConversationMessage"},"type":"array","title":"Messages"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","user_id","messages","created_at","updated_at"],"title":"SageConversation","description":"A full conversation with Sage"},"SageConversationMessage":{"properties":{"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"sources":{"items":{"$ref":"#/components/schemas/SageSource"},"type":"array","title":"Sources"}},"type":"object","required":["role","content","created_at"],"title":"SageConversationMessage","description":"A single message in a conversation"},"SageConversationSummary":{"properties":{"id":{"type":"string","title":"Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"preview":{"type":"string","title":"Preview"},"message_count":{"type":"integer","title":"Message Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","preview","message_count","created_at","updated_at"],"title":"SageConversationSummary","description":"Summary of a conversation for listing"},"SageSearchRequest":{"properties":{"query":{"type":"string","maxLength":1000,"minLength":1,"title":"Query"},"content_type_filter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type Filter","description":"Filter results to a specific content type (video, web_page, audio, pdf, book, faq)"},"limit":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Limit","default":5}},"type":"object","required":["query"],"title":"SageSearchRequest","description":"Request to search sage_rag_content via hybrid search"},"SageSearchResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/SageSearchResult"},"type":"array","title":"Results"},"query":{"type":"string","title":"Query"},"content_type_filter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type Filter"}},"type":"object","required":["results","query"],"title":"SageSearchResponse","description":"Response from RAG search"},"SageSearchResult":{"properties":{"chunk_id":{"type":"string","title":"Chunk Id"},"content":{"type":"string","title":"Content"},"title":{"type":"string","title":"Title"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"content_type":{"$ref":"#/components/schemas/SageContentType"},"similarity":{"type":"number","title":"Similarity"},"is_premium":{"type":"boolean","title":"Is Premium","default":false},"deep_link_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deep Link Id"}},"type":"object","required":["chunk_id","content","title","content_type","similarity"],"title":"SageSearchResult","description":"A single RAG search result from sage_rag_content"},"SageSource":{"properties":{"id":{"type":"string","title":"Id","description":"RAG content UUID for deep linking"},"title":{"type":"string","title":"Title"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"Original source URL"},"content_type":{"$ref":"#/components/schemas/SageContentType","description":"Media format type for routing and display","default":"web_page"},"relevance_score":{"type":"number","title":"Relevance Score","description":"Similarity score from vector search"},"is_premium":{"type":"boolean","title":"Is Premium","description":"Whether this content requires premium subscription","default":false},"deep_link_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deep Link Id","description":"educational_content.id for in-app navigation (None for FAQs)"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url","description":"Thumbnail image URL for video/article cards"}},"type":"object","required":["id","title","relevance_score"],"title":"SageSource","description":"A source document referenced in Sage's response.\n\nEnhanced for two-tier architecture with deep linking support."},"SageStreamRequest":{"properties":{"message":{"type":"string","maxLength":4000,"minLength":1,"title":"Message"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id","description":"Continue an existing conversation. If None, starts a new one."},"images":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Images","description":"Optional base64-encoded images for food logging"},"timezone":{"type":"string","title":"Timezone","description":"IANA timezone from the user's device (e.g. 'America/Chicago')","default":"America/Phoenix"}},"type":"object","required":["message"],"title":"SageStreamRequest","description":"Request to stream a message to Sage"},"SaleCategoryCreateRequest":{"properties":{"name":{"type":"string","title":"Name"},"sortOrder":{"type":"integer","title":"Sortorder"}},"type":"object","required":["name","sortOrder"],"title":"SaleCategoryCreateRequest"},"SaleCategoryResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"sortOrder":{"type":"integer","title":"Sortorder"}},"type":"object","required":["id","name","sortOrder"],"title":"SaleCategoryResponse"},"SaleItemCreateRequest":{"properties":{"name":{"type":"string","title":"Name"},"shortDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shortdescription"},"description":{"type":"string","title":"Description"},"category":{"type":"string","title":"Category"},"photoUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photourl"},"saleUrl":{"type":"string","title":"Saleurl"},"price":{"type":"number","minimum":0.0,"title":"Price"},"sortOrder":{"type":"integer","title":"Sortorder"}},"type":"object","required":["name","description","category","saleUrl","price","sortOrder"],"title":"SaleItemCreateRequest"},"SaleItemListResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/SaleItemResponse"},"type":"array","title":"Results"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextcursor"}},"type":"object","required":["results"],"title":"SaleItemListResponse"},"SaleItemResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"shortDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shortdescription"},"description":{"type":"string","title":"Description"},"category":{"type":"string","title":"Category"},"photoUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photourl"},"saleUrl":{"type":"string","title":"Saleurl"},"price":{"type":"number","title":"Price"},"sortOrder":{"type":"integer","title":"Sortorder"}},"type":"object","required":["id","name","description","category","saleUrl","price","sortOrder"],"title":"SaleItemResponse"},"ScheduleCadence":{"properties":{"type":{"type":"string","title":"Type"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"}},"type":"object","required":["type","label","description"],"title":"ScheduleCadence","description":"A recurring schedule entry for a team member."},"ScheduleTime":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"startTime":{"type":"string","format":"date-time","title":"Starttime"},"endTime":{"type":"string","format":"date-time","title":"Endtime"},"isCompleted":{"type":"boolean","title":"Iscompleted","default":false},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"registrationCount":{"type":"integer","title":"Registrationcount","default":0},"attendees":{"anyOf":[{"items":{"$ref":"#/components/schemas/SessionAttendee"},"type":"array"},{"type":"null"}],"title":"Attendees"}},"type":"object","required":["startTime","endTime"],"title":"ScheduleTime"},"ScriptEntry":{"properties":{"slideNumber":{"type":"integer","title":"Slidenumber"},"slideTitle":{"type":"string","title":"Slidetitle"},"narration":{"type":"string","title":"Narration"},"estimatedDurationSeconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimateddurationseconds"},"audioUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audiourl"},"videoUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Videourl"},"videoOverlay":{"anyOf":[{"$ref":"#/components/schemas/VideoOverlaySettings"},{"type":"null"}]},"transition":{"anyOf":[{"$ref":"#/components/schemas/TransitionSettings"},{"type":"null"}]}},"type":"object","required":["slideNumber","slideTitle","narration"],"title":"ScriptEntry"},"ScriptUpdateRequest":{"properties":{"script":{"items":{"$ref":"#/components/schemas/ScriptEntry"},"type":"array","title":"Script"}},"type":"object","required":["script"],"title":"ScriptUpdateRequest"},"SendPaymentLinkRequest":{"properties":{"uid":{"type":"string","title":"Uid"},"productIdentifier":{"type":"string","title":"Productidentifier"},"priceInCents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priceincents"},"billingFrequency":{"type":"string","title":"Billingfrequency"},"customMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custommessage"}},"type":"object","required":["uid","productIdentifier","billingFrequency"],"title":"SendPaymentLinkRequest"},"SendPaymentLinkResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"checkoutUrl":{"type":"string","title":"Checkouturl"},"emailSentTo":{"type":"string","title":"Emailsentto"},"expiresAt":{"type":"string","format":"date-time","title":"Expiresat"}},"type":"object","required":["success","checkoutUrl","emailSentTo","expiresAt"],"title":"SendPaymentLinkResponse"},"SendSessionNotificationRequest":{"properties":{"title":{"type":"string","maxLength":80,"minLength":1,"title":"Title"},"body":{"type":"string","maxLength":240,"minLength":1,"title":"Body"}},"type":"object","required":["title","body"],"title":"SendSessionNotificationRequest"},"SendSessionNotificationResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"recipientCount":{"type":"integer","title":"Recipientcount"}},"type":"object","required":["success","recipientCount"],"title":"SendSessionNotificationResponse"},"SentryError":{"properties":{"issue_id":{"type":"string","title":"Issue Id"},"title":{"type":"string","title":"Title"},"culprit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Culprit"},"count":{"type":"integer","title":"Count","default":0},"user_count":{"type":"integer","title":"User Count","default":0},"first_seen":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Seen"},"last_seen":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen"},"level":{"type":"string","title":"Level","default":"error"},"status":{"type":"string","title":"Status","default":"unresolved"},"short_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Id"},"permalink":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Permalink"}},"type":"object","required":["issue_id","title"],"title":"SentryError","description":"Sentry error summary."},"ServingSize":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"name":{"type":"string","title":"Name"},"defaultAmount":{"type":"number","minimum":0.0,"title":"Defaultamount"},"ouncesOfVeggies":{"type":"number","minimum":0.0,"title":"Ouncesofveggies"},"totalCalories":{"type":"number","minimum":0.0,"title":"Totalcalories"},"proteinGrams":{"type":"number","minimum":0.0,"title":"Proteingrams"},"fluidOunces":{"type":"number","minimum":0.0,"title":"Fluidounces"}},"type":"object","required":["name","defaultAmount","ouncesOfVeggies","totalCalories","proteinGrams","fluidOunces"],"title":"ServingSize"},"SessionAttendee":{"properties":{"userId":{"type":"string","title":"Userid"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Displayname"},"attended":{"type":"boolean","title":"Attended","default":false},"joinedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Joinedat"},"leftAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Leftat"}},"type":"object","required":["userId"],"title":"SessionAttendee"},"SessionParticipants":{"properties":{"participants":{"items":{"$ref":"#/components/schemas/ParticipantInfo"},"type":"array","title":"Participants"},"blockedUsers":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Blockedusers"}},"type":"object","required":["participants","blockedUsers"],"title":"SessionParticipants","description":"Current participants and block list for a session."},"SessionRegistrant":{"properties":{"userId":{"type":"string","title":"Userid"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Displayname"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"registeredAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Registeredat"}},"type":"object","required":["userId"],"title":"SessionRegistrant"},"SessionRegistrantsResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/SessionRegistrant"},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["results","total"],"title":"SessionRegistrantsResponse"},"SetUserRoleRequest":{"properties":{"userId":{"type":"string","title":"Userid"},"role":{"$ref":"#/components/schemas/UserRole"},"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["userId","role","enabled"],"title":"SetUserRoleRequest","description":"Request to add or remove a user role."},"SetUserRoleResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"userId":{"type":"string","title":"Userid"},"roles":{"items":{"$ref":"#/components/schemas/UserRole"},"type":"array","title":"Roles"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["success","userId","roles"],"title":"SetUserRoleResponse","description":"Response after setting a user role."},"SharePlanResponse":{"properties":{"share_url":{"type":"string","title":"Share Url"},"share_token":{"type":"string","title":"Share Token"}},"type":"object","required":["share_url","share_token"],"title":"SharePlanResponse","description":"Response after generating a share link."},"SharedContent":{"properties":{"table":{"type":"string","title":"Table"},"count":{"type":"integer","title":"Count"},"description":{"type":"string","title":"Description"}},"type":"object","required":["table","count","description"],"title":"SharedContent","description":"Content that needs reassignment before deletion."},"SharedPlanPreview":{"properties":{"title":{"type":"string","title":"Title"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"plan_type":{"type":"string","title":"Plan Type"}},"type":"object","required":["title","plan_type"],"title":"SharedPlanPreview","description":"Public preview of a shared plan (no auth required)."},"SlowTrace":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"name":{"type":"string","title":"Name"},"duration_ms":{"type":"number","title":"Duration Ms"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"spans":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Spans"},"tags":{"additionalProperties":true,"type":"object","title":"Tags"},"request_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Request Count"},"avg_latency_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Latency Ms"},"p50_latency_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P50 Latency Ms"},"p95_latency_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P95 Latency Ms"},"p99_latency_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P99 Latency Ms"}},"type":"object","required":["trace_id","name","duration_ms","timestamp"],"title":"SlowTrace","description":"Slow trace / endpoint performance summary."},"StaffInvitationListItem":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"firstName":{"type":"string","title":"Firstname"},"lastName":{"type":"string","title":"Lastname"},"roles":{"items":{"type":"string"},"type":"array","title":"Roles"},"status":{"type":"string","title":"Status"},"invitedBy":{"type":"string","title":"Invitedby"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"expiresAt":{"type":"string","format":"date-time","title":"Expiresat"},"acceptedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Acceptedat"}},"type":"object","required":["id","email","firstName","lastName","roles","status","invitedBy","createdAt","expiresAt"],"title":"StaffInvitationListItem"},"StaffInvitationListResponse":{"properties":{"invitations":{"items":{"$ref":"#/components/schemas/StaffInvitationListItem"},"type":"array","title":"Invitations"},"totalCount":{"type":"integer","title":"Totalcount"}},"type":"object","required":["invitations","totalCount"],"title":"StaffInvitationListResponse"},"StaffInviteRequest":{"properties":{"email":{"type":"string","minLength":1,"title":"Email"},"firstName":{"type":"string","maxLength":100,"minLength":1,"title":"Firstname"},"lastName":{"type":"string","maxLength":100,"minLength":1,"title":"Lastname"},"roles":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Roles"}},"type":"object","required":["email","firstName","lastName","roles"],"title":"StaffInviteRequest"},"StaffInviteResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"invitationId":{"type":"string","title":"Invitationid"},"email":{"type":"string","title":"Email"},"roles":{"items":{"type":"string"},"type":"array","title":"Roles"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","invitationId","email","roles","message"],"title":"StaffInviteResponse"},"StaffPermissionsResponse":{"properties":{"userId":{"type":"string","title":"Userid"},"role":{"type":"string","title":"Role"},"permissions":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Permissions"}},"type":"object","required":["userId","role","permissions"],"title":"StaffPermissionsResponse"},"StagingEntry":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"content":{"type":"string","title":"Content"},"transcription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcription Id"},"source_excerpt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Excerpt"},"encounter_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Encounter Date"},"patient_question":{"type":"string","title":"Patient Question"},"provider_answer":{"type":"string","title":"Provider Answer"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"status":{"type":"string","title":"Status"},"reviewed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewed By"},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reviewed At"},"admin_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Notes"},"rag_content_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rag Content Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","title","content","patient_question","provider_answer","status","created_at","updated_at"],"title":"StagingEntry","description":"A single transcript FAQ staging entry."},"StagingListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/StagingEntry"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"StagingListResponse","description":"Paginated list of staging entries."},"StagingStats":{"properties":{"pending":{"type":"integer","title":"Pending","default":0},"approved":{"type":"integer","title":"Approved","default":0},"dismissed":{"type":"integer","title":"Dismissed","default":0}},"type":"object","title":"StagingStats","description":"Counts by status for the staging table."},"StructuralMetrics":{"properties":{"avg_degree":{"type":"number","title":"Avg Degree","default":0.0},"median_degree":{"type":"number","title":"Median Degree","default":0.0},"degree_distribution":{"$ref":"#/components/schemas/DegreeDistribution"},"label_coverage_pct":{"type":"number","title":"Label Coverage Pct","default":0.0},"relationship_coverage_pct":{"type":"number","title":"Relationship Coverage Pct","default":0.0}},"type":"object","title":"StructuralMetrics","description":"Structural quality metrics for the knowledge graph."},"SubmitE2EResultRequest":{"properties":{"flow_file":{"type":"string","title":"Flow File"},"flow_name":{"type":"string","title":"Flow Name"},"status":{"type":"string","title":"Status"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"screenshot_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screenshot Url"},"maestro_output":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Maestro Output"}},"type":"object","required":["flow_file","flow_name","status"],"title":"SubmitE2EResultRequest"},"SubmitE2EResultsRequest":{"properties":{"status":{"type":"string","title":"Status","default":"passed"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"results":{"items":{"$ref":"#/components/schemas/SubmitE2EResultRequest"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"SubmitE2EResultsRequest"},"SubscriptionBrowseItem":{"properties":{"id":{"type":"integer","title":"Id"},"userId":{"type":"string","title":"Userid"},"userEmail":{"type":"string","title":"Useremail"},"userName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"entitlement":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entitlement"},"sourceType":{"type":"string","title":"Sourcetype"},"status":{"type":"string","title":"Status"},"productName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Productname"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat"},"endDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enddate"},"isDuplicate":{"type":"boolean","title":"Isduplicate","default":false}},"type":"object","required":["id","userId","userEmail","sourceType","status"],"title":"SubscriptionBrowseItem"},"SubscriptionBrowseResponse":{"properties":{"subscriptions":{"items":{"$ref":"#/components/schemas/SubscriptionBrowseItem"},"type":"array","title":"Subscriptions"},"totalCount":{"type":"integer","title":"Totalcount"},"hasMore":{"type":"boolean","title":"Hasmore"}},"type":"object","required":["subscriptions","totalCount","hasMore"],"title":"SubscriptionBrowseResponse"},"SubscriptionDetail":{"properties":{"id":{"type":"string","title":"Id"},"stripeSubscriptionId":{"type":"string","title":"Stripesubscriptionid"},"productIdentifier":{"type":"string","title":"Productidentifier"},"planName":{"type":"string","title":"Planname"},"status":{"type":"string","title":"Status"},"priceInCents":{"type":"integer","title":"Priceincents"},"currency":{"type":"string","title":"Currency"},"billingFrequency":{"type":"string","title":"Billingfrequency"},"currentPeriodStart":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Currentperiodstart"},"currentPeriodEnd":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Currentperiodend"},"cancelAtPeriodEnd":{"type":"boolean","title":"Cancelatperiodend","default":false},"canceledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Canceledat"},"trialStart":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trialstart"},"trialEnd":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trialend"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"}},"type":"object","required":["id","stripeSubscriptionId","productIdentifier","planName","status","priceInCents","currency","billingFrequency","createdAt"],"title":"SubscriptionDetail"},"SubscriptionHistoryItem":{"properties":{"id":{"type":"string","title":"Id"},"plan":{"type":"string","title":"Plan"},"price":{"type":"integer","title":"Price"},"billingInterval":{"type":"string","title":"Billinginterval"},"startDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Startdate"},"endDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enddate"},"stripeSubscriptionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripesubscriptionid"},"legacySource":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legacysource"}},"type":"object","required":["id","plan","price","billingInterval"],"title":"SubscriptionHistoryItem"},"SubscriptionResponse":{"properties":{"id":{"type":"string","title":"Id"},"userId":{"type":"string","title":"Userid"},"plan":{"type":"string","title":"Plan"},"price":{"type":"integer","title":"Price"},"billingInterval":{"type":"string","title":"Billinginterval"},"status":{"type":"string","title":"Status"},"startDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Startdate"},"nextBillingDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextbillingdate"},"stripeSubscriptionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripesubscriptionid"},"trialPeriodDays":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trialperioddays"},"legacySource":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legacysource"},"legacySourceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legacysourceid"}},"type":"object","required":["id","userId","plan","price","billingInterval","status"],"title":"SubscriptionResponse"},"SubscriptionStatusResponse":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"entitlement":{"type":"string","title":"Entitlement","default":"Free"},"plan_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Name"},"end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date"},"is_active":{"type":"boolean","title":"Is Active","default":false}},"type":"object","title":"SubscriptionStatusResponse","description":"Patient subscription status for external API consumers."},"SupportGroupCreateRequest":{"properties":{"name":{"type":"string","title":"Name"},"instructorId":{"type":"string","title":"Instructorid"},"description":{"type":"string","title":"Description"},"isOnline":{"type":"boolean","title":"Isonline"},"isFree":{"type":"boolean","title":"Isfree"},"requiredEntitlements":{"items":{"type":"string"},"type":"array","title":"Requiredentitlements","default":["Support"]},"scheduleDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheduledescription"},"schedule":{"items":{"$ref":"#/components/schemas/ScheduleTime"},"type":"array","title":"Schedule"}},"type":"object","required":["name","instructorId","description","isOnline","isFree","schedule"],"title":"SupportGroupCreateRequest"},"SupportGroupListResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/SupportGroupResponse"},"type":"array","title":"Results"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextcursor"}},"type":"object","required":["results"],"title":"SupportGroupListResponse"},"SupportGroupResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"instructorId":{"type":"string","title":"Instructorid"},"description":{"type":"string","title":"Description"},"isOnline":{"type":"boolean","title":"Isonline"},"isFree":{"type":"boolean","title":"Isfree"},"requiredEntitlements":{"items":{"type":"string"},"type":"array","title":"Requiredentitlements","default":["Support"]},"scheduleDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheduledescription"},"schedule":{"items":{"$ref":"#/components/schemas/ScheduleTime"},"type":"array","title":"Schedule"}},"type":"object","required":["id","name","instructorId","description","isOnline","isFree","schedule"],"title":"SupportGroupResponse"},"TasteTestRoundInfo":{"properties":{"name":{"type":"string","title":"Name"},"votingOpen":{"type":"boolean","title":"Votingopen"},"questionCount":{"type":"integer","title":"Questioncount"},"answersPerQuestion":{"type":"integer","title":"Answersperquestion"}},"type":"object","required":["name","votingOpen","questionCount","answersPerQuestion"],"title":"TasteTestRoundInfo"},"TeamListResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/TeamMember"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"TeamListResponse","description":"List of team members."},"TeamMember":{"properties":{"id":{"type":"string","title":"Id"},"providerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Providerid"},"instructorId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructorid"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"photoUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photourl"},"role":{"type":"string","title":"Role"},"schedules":{"items":{"$ref":"#/components/schemas/ScheduleCadence"},"type":"array","title":"Schedules","default":[]}},"type":"object","required":["id","name","role"],"title":"TeamMember","description":"Unified staff member combining provider and instructor data."},"TelemedInitiateRequest":{"properties":{"dailyRoomUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dailyroomurl"},"dailyToken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dailytoken"},"roomName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Roomname"}},"type":"object","title":"TelemedInitiateRequest","description":"Daily.co room info pushed by WGN for the patient's telemed session."},"TelemedPatientTokenResponse":{"properties":{"daily_room_url":{"type":"string","title":"Daily Room Url"},"daily_token":{"type":"string","title":"Daily Token"}},"type":"object","required":["daily_room_url","daily_token"],"title":"TelemedPatientTokenResponse"},"TicketDetailResponse":{"properties":{"id":{"type":"string","title":"Id"},"userId":{"type":"string","title":"Userid"},"userEmail":{"type":"string","title":"Useremail"},"userName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"subject":{"type":"string","title":"Subject"},"description":{"type":"string","title":"Description"},"screenContext":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screencontext"},"appVersion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Appversion"},"status":{"type":"string","title":"Status"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolvedat"},"replies":{"items":{"$ref":"#/components/schemas/TicketReply"},"type":"array","title":"Replies","default":[]}},"type":"object","required":["id","userId","userEmail","subject","description","status","createdAt"],"title":"TicketDetailResponse"},"TicketListItem":{"properties":{"id":{"type":"string","title":"Id"},"userId":{"type":"string","title":"Userid"},"userEmail":{"type":"string","title":"Useremail"},"userName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"subject":{"type":"string","title":"Subject"},"status":{"type":"string","title":"Status"},"replyCount":{"type":"integer","title":"Replycount","default":0},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolvedat"}},"type":"object","required":["id","userId","userEmail","subject","status","createdAt"],"title":"TicketListItem"},"TicketListResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/TicketListItem"},"type":"array","title":"Results"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextcursor"}},"type":"object","required":["results"],"title":"TicketListResponse"},"TicketReply":{"properties":{"id":{"type":"string","title":"Id"},"repliedBy":{"type":"string","title":"Repliedby"},"repliedByName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repliedbyname"},"repliedByEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repliedbyemail"},"message":{"type":"string","title":"Message"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"emailStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emailstatus"},"emailStatusDetail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emailstatusdetail"}},"type":"object","required":["id","repliedBy","message","createdAt"],"title":"TicketReply"},"TimeSeriesPoint":{"properties":{"date":{"type":"string","title":"Date"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["date","count"],"title":"TimeSeriesPoint"},"TodaySchedule":{"properties":{"groups":{"items":{"$ref":"#/components/schemas/GroupSession"},"type":"array","title":"Groups"},"officeHours":{"items":{"$ref":"#/components/schemas/OfficeHoursByDay"},"type":"array","title":"Officehours"}},"type":"object","required":["groups","officeHours"],"title":"TodaySchedule","description":"Combined schedule for today."},"ToggleBody":{"properties":{"completed":{"type":"boolean","title":"Completed"}},"type":"object","required":["completed"],"title":"ToggleBody"},"ToolCall":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"args":{"additionalProperties":true,"type":"object","title":"Args"},"result":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result"},"duration_ms":{"type":"number","title":"Duration Ms"},"timestamp":{"type":"string","title":"Timestamp"},"category":{"type":"string","title":"Category"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["id","name","args","duration_ms","timestamp","category"],"title":"ToolCall","description":"Record of a tool call made during an AI agent run."},"TopConnectedNode":{"properties":{"display_name":{"type":"string","title":"Display Name"},"label":{"type":"string","title":"Label"},"degree":{"type":"integer","title":"Degree"}},"type":"object","required":["display_name","label","degree"],"title":"TopConnectedNode","description":"A highly-connected node in the graph."},"TopicCreateRequest":{"properties":{"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"iconUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iconurl"},"bannerUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bannerurl"},"sortOrder":{"type":"integer","title":"Sortorder","default":0},"isPublished":{"type":"boolean","title":"Ispublished","default":false},"isPremium":{"type":"boolean","title":"Ispremium","default":false}},"type":"object","required":["name","slug"],"title":"TopicCreateRequest"},"TopicListResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/TopicResponse"},"type":"array","title":"Results"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextcursor"}},"type":"object","required":["results"],"title":"TopicListResponse"},"TopicProgressResponse":{"properties":{"topicId":{"type":"string","title":"Topicid"},"courses":{"items":{"$ref":"#/components/schemas/CourseProgressResponse"},"type":"array","title":"Courses"}},"type":"object","required":["topicId","courses"],"title":"TopicProgressResponse"},"TopicResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"iconUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iconurl"},"bannerUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bannerurl"},"sortOrder":{"type":"integer","title":"Sortorder"},"isPublished":{"type":"boolean","title":"Ispublished"},"isPremium":{"type":"boolean","title":"Ispremium"}},"type":"object","required":["id","name","slug","sortOrder","isPublished","isPremium"],"title":"TopicResponse"},"TopicWithCourses":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"courses":{"items":{"$ref":"#/components/schemas/CourseListItem"},"type":"array","title":"Courses"}},"type":"object","required":["id","name","slug","courses"],"title":"TopicWithCourses"},"TransitionSettings":{"properties":{"type":{"type":"string","title":"Type","default":"none"},"duration":{"type":"number","maximum":3.0,"minimum":0.1,"title":"Duration","default":0.5}},"type":"object","title":"TransitionSettings"},"TrialConfigResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"visitTypeIds":{"items":{"type":"string"},"type":"array","title":"Visittypeids"},"emailSubject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emailsubject"},"emailBodyHtml":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emailbodyhtml"},"productIdentifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Productidentifier"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedat"},"updatedBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedby"}},"type":"object","required":["enabled","visitTypeIds"],"title":"TrialConfigResponse"},"TrialConfigUpdateRequest":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"visitTypeIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Visittypeids"},"emailSubject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emailsubject"},"emailBodyHtml":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emailbodyhtml"},"productIdentifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Productidentifier"},"updatedBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedby"}},"type":"object","title":"TrialConfigUpdateRequest","description":"Partial update of the trial-invitation config (all fields optional)."},"TriggerE2ETestRequest":{"properties":{"test_suite":{"type":"string","title":"Test Suite","default":"smoke"},"test_flow":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Test Flow"},"environment":{"type":"string","title":"Environment","default":"development"}},"type":"object","title":"TriggerE2ETestRequest"},"UnsafeFlagDetail":{"properties":{"questionOrder":{"type":"integer","title":"Questionorder"},"questionKey":{"type":"string","title":"Questionkey"},"questionText":{"type":"string","title":"Questiontext"},"voterRole":{"type":"string","enum":["patient","staff","other"],"title":"Voterrole"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["questionOrder","questionKey","questionText","voterRole","note"],"title":"UnsafeFlagDetail"},"UnsafeFlagRequest":{"properties":{"unsafe":{"type":"boolean","title":"Unsafe"},"note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Note"}},"type":"object","required":["unsafe"],"title":"UnsafeFlagRequest"},"UpdateAffiliateSettingsRequest":{"properties":{"discountPercent":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Discountpercent"},"revenueSharePercent":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Revenuesharepercent"},"affiliateName":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Affiliatename"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"UpdateAffiliateSettingsRequest","description":"Request to update affiliate settings."},"UpdateEdgeRequest":{"properties":{"confidence":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Confidence"},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context"}},"type":"object","title":"UpdateEdgeRequest","description":"Update a relationship."},"UpdateNodeRequest":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"aliases":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Aliases"},"properties":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Properties"}},"type":"object","title":"UpdateNodeRequest","description":"Update an entity."},"UpdatePersonaRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"UpdatePersonaRequest","description":"Update persona metadata."},"UpdateStaffPermissionsRequest":{"properties":{"userId":{"type":"string","title":"Userid"},"permissions":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Permissions"}},"type":"object","required":["userId","permissions"],"title":"UpdateStaffPermissionsRequest"},"UpdateTicketRequest":{"properties":{"status":{"type":"string","pattern":"^(open|resolved)$","title":"Status"}},"type":"object","required":["status"],"title":"UpdateTicketRequest"},"UpdateUserRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","title":"UpdateUserRequest"},"UpdateUserResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"UpdateUserResponse"},"UploadCompleteRequest":{"properties":{"storagePath":{"type":"string","title":"Storagepath"}},"type":"object","required":["storagePath"],"title":"UploadCompleteRequest"},"UploadCompleteResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"publicUrl":{"type":"string","title":"Publicurl"}},"type":"object","required":["success","publicUrl"],"title":"UploadCompleteResponse"},"UploadSignRequest":{"properties":{"bucket":{"type":"string","title":"Bucket"},"pathPrefix":{"type":"string","title":"Pathprefix"},"filename":{"type":"string","title":"Filename"},"contentType":{"type":"string","title":"Contenttype"},"contentLength":{"type":"integer","title":"Contentlength"}},"type":"object","required":["bucket","pathPrefix","filename","contentType","contentLength"],"title":"UploadSignRequest"},"UploadSignResponse":{"properties":{"uploadUrl":{"type":"string","title":"Uploadurl"},"method":{"type":"string","title":"Method","default":"PUT"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers"},"storagePath":{"type":"string","title":"Storagepath"},"publicUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publicurl"},"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"}},"type":"object","required":["uploadUrl","headers","storagePath"],"title":"UploadSignResponse"},"UserCertificationResponse":{"properties":{"id":{"type":"string","title":"Id"},"courseId":{"type":"string","title":"Courseid"},"courseTitle":{"type":"string","title":"Coursetitle"},"badgeName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Badgename"},"badgeImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Badgeimageurl"},"certificateNumber":{"type":"string","title":"Certificatenumber"},"certificatePdfUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Certificatepdfurl"},"earnedAt":{"type":"string","format":"date-time","title":"Earnedat"}},"type":"object","required":["id","courseId","courseTitle","certificateNumber","earnedAt"],"title":"UserCertificationResponse","description":"Lightweight certification for mobile 'My Badges' screen."},"UserContextResponse":{"properties":{"has_context":{"type":"boolean","title":"Has Context"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"key_facts":{"items":{"type":"string"},"type":"array","title":"Key Facts"},"health_context":{"items":{"type":"string"},"type":"array","title":"Health Context"},"ongoing_concerns":{"items":{"type":"string"},"type":"array","title":"Ongoing Concerns"},"topics_discussed":{"items":{"type":"string"},"type":"array","title":"Topics Discussed"},"last_compacted_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Compacted At"},"total_messages_compacted":{"type":"integer","title":"Total Messages Compacted","default":0}},"type":"object","required":["has_context"],"title":"UserContextResponse","description":"User's stored context summary"},"UserCreditsResponse":{"properties":{"remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Remaining"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"is_unlimited":{"type":"boolean","title":"Is Unlimited"}},"type":"object","required":["remaining","limit","is_unlimited"],"title":"UserCreditsResponse","description":"Response model for getting user's AI credits status."},"UserDetailResponse":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"birthDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Birthdate"},"role":{"type":"string","title":"Role"},"roles":{"items":{"type":"string"},"type":"array","title":"Roles","default":[]},"isInstructor":{"type":"boolean","title":"Isinstructor","default":false},"isProvider":{"type":"boolean","title":"Isprovider","default":false},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deletedat"},"deletedBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deletedby"}},"type":"object","required":["id","email","role"],"title":"UserDetailResponse"},"UserEntitlementResponse":{"properties":{"entitlement":{"type":"string","title":"Entitlement"},"can_access_learn":{"type":"boolean","title":"Can Access Learn"},"can_access_support_groups":{"type":"boolean","title":"Can Access Support Groups"},"can_access_office_hours":{"type":"boolean","title":"Can Access Office Hours"},"has_unlimited_ai":{"type":"boolean","title":"Has Unlimited Ai"},"subscription_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Source"}},"type":"object","required":["entitlement","can_access_learn","can_access_support_groups","can_access_office_hours","has_unlimited_ai"],"title":"UserEntitlementResponse","description":"Schema for user's current entitlement status."},"UserInfo":{"properties":{"firebaseUid":{"type":"string","title":"Firebaseuid"},"email":{"type":"string","title":"Email"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Displayname"}},"type":"object","required":["firebaseUid","email"],"title":"UserInfo"},"UserNotificationsRequest":{"properties":{"recipient_ids":{"items":{"type":"string"},"type":"array","title":"Recipient Ids"},"title":{"type":"string","title":"Title","default":"A Pound of Cure"},"body":{"type":"string","title":"Body","default":"You have a new notification"},"deep_link_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deep Link Url"}},"type":"object","required":["recipient_ids"],"title":"UserNotificationsRequest"},"UserProfileResponse":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"photo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photo Url"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"date_of_birth":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date Of Birth"},"gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gender"},"street_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street Address"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"}},"type":"object","required":["id","email"],"title":"UserProfileResponse"},"UserProfileUpdate":{"properties":{"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"photo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photo Url"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"date_of_birth":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date Of Birth"},"gender":{"anyOf":[{"type":"string","enum":["male","female","non-binary"]},{"type":"null"}],"title":"Gender"},"street_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street Address"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"}},"type":"object","title":"UserProfileUpdate"},"UserRole":{"type":"string","enum":["admin","staff","instructor","provider","affiliate","authenticated"],"title":"UserRole","description":"Available user roles."},"UserRolesResponse":{"properties":{"userId":{"type":"string","title":"Userid"},"roles":{"items":{"$ref":"#/components/schemas/UserRole"},"type":"array","title":"Roles"},"isInstructor":{"type":"boolean","title":"Isinstructor"},"isProvider":{"type":"boolean","title":"Isprovider"}},"type":"object","required":["userId","roles","isInstructor","isProvider"],"title":"UserRolesResponse","description":"User's current roles."},"UserSearchResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/UserSearchResult"},"type":"array","title":"Results"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextcursor"}},"type":"object","required":["results"],"title":"UserSearchResponse"},"UserSearchResult":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"birthDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Birthdate"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"roles":{"items":{"type":"string"},"type":"array","title":"Roles","default":[]},"permissions":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Permissions","default":{}},"isInstructor":{"type":"boolean","title":"Isinstructor","default":false},"isProvider":{"type":"boolean","title":"Isprovider","default":false},"deletedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deletedat"}},"type":"object","required":["id","email"],"title":"UserSearchResult"},"UserSubscriptionInfo":{"properties":{"id":{"type":"string","title":"Id"},"plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"price":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price"}},"type":"object","required":["id"],"title":"UserSubscriptionInfo"},"UserSubscriptionResponse":{"properties":{"hasSubscription":{"type":"boolean","title":"Hassubscription"},"subscription":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionDetail"},{"type":"null"}]}},"type":"object","required":["hasSubscription"],"title":"UserSubscriptionResponse"},"UserSubscriptionsResponse":{"properties":{"current":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionResponse"},{"type":"null"}]},"history":{"items":{"$ref":"#/components/schemas/SubscriptionHistoryItem"},"type":"array","title":"History","default":[]}},"type":"object","title":"UserSubscriptionsResponse"},"UserWithSubscription":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"subscription":{"anyOf":[{"$ref":"#/components/schemas/UserSubscriptionInfo"},{"type":"null"}]}},"type":"object","required":["id","email"],"title":"UserWithSubscription"},"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"},"VideoFolderCreateRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"VideoFolderCreateRequest"},"VideoFolderListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/VideoFolderResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"VideoFolderListResponse"},"VideoFolderResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"video_count":{"type":"integer","title":"Video Count"},"created_by":{"type":"string","title":"Created By"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","name","video_count","created_by","created_at","updated_at"],"title":"VideoFolderResponse"},"VideoFolderUpdateRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"VideoFolderUpdateRequest"},"VideoIngestRequest":{"properties":{"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"video_url":{"type":"string","title":"Video Url"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"course_id":{"type":"string","title":"Course Id"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"}},"type":"object","required":["title","video_url","course_id"],"title":"VideoIngestRequest"},"VideoIngestResponse":{"properties":{"module_id":{"type":"string","title":"Module Id"},"course_id":{"type":"string","title":"Course Id"},"title":{"type":"string","title":"Title"},"video_url":{"type":"string","title":"Video Url"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"status":{"type":"string","title":"Status","default":"created"}},"type":"object","required":["module_id","course_id","title","video_url"],"title":"VideoIngestResponse"},"VideoOverlaySettings":{"properties":{"x":{"type":"number","maximum":1.0,"minimum":0.0,"title":"X","default":0.72},"y":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Y","default":0.67},"width":{"type":"number","maximum":0.8,"minimum":0.1,"title":"Width","default":0.25},"cropX":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Cropx","default":0},"cropY":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Cropy","default":0},"cropW":{"type":"number","maximum":1.0,"minimum":0.1,"title":"Cropw","default":1},"cropH":{"type":"number","maximum":1.0,"minimum":0.1,"title":"Croph","default":1}},"type":"object","title":"VideoOverlaySettings"},"VideoProjectCreateRequest":{"properties":{"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"content_brief":{"additionalProperties":true,"type":"object","title":"Content Brief"},"folder_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder Id"}},"type":"object","required":["title"],"title":"VideoProjectCreateRequest"},"VideoProjectListItem":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"slug":{"type":"string","title":"Slug"},"status":{"type":"string","title":"Status"},"pptx_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pptx Url"},"video_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Url"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"course_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Course Id"},"module_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Module Id"},"folder_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder Id"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"tts_speed":{"type":"number","title":"Tts Speed"},"created_by":{"type":"string","title":"Created By"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","title","slug","status","pptx_url","video_url","thumbnail_url","duration_seconds","course_id","module_id","folder_id","error_message","tts_speed","created_by","created_at","updated_at"],"title":"VideoProjectListItem","description":"Slim shape used in list responses — omits heavy fields (slide_data, slide_previews, script, content_brief)."},"VideoProjectListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/VideoProjectListItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"VideoProjectListResponse"},"VideoProjectResponse":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"slug":{"type":"string","title":"Slug"},"status":{"type":"string","title":"Status"},"content_brief":{"additionalProperties":true,"type":"object","title":"Content Brief"},"slide_data":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Slide Data"},"pptx_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pptx Url"},"slide_previews":{"items":{"type":"string"},"type":"array","title":"Slide Previews"},"script":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Script"},"video_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Url"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"course_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Course Id"},"module_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Module Id"},"folder_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder Id"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"tts_speed":{"type":"number","title":"Tts Speed"},"created_by":{"type":"string","title":"Created By"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","title","slug","status","content_brief","slide_data","pptx_url","slide_previews","script","video_url","thumbnail_url","duration_seconds","course_id","module_id","folder_id","error_message","tts_speed","created_by","created_at","updated_at"],"title":"VideoProjectResponse"},"VideoProjectUpdateRequest":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"content_brief":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Content Brief"},"slide_data":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Slide Data"},"tts_speed":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tts Speed"},"folder_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder Id"}},"type":"object","title":"VideoProjectUpdateRequest"},"VisitTypeCreateRequest":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["name"],"title":"VisitTypeCreateRequest","description":"Request to create a visit type."},"VisitTypeListResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/VisitTypeResponse"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"VisitTypeListResponse","description":"List of visit types."},"VisitTypeResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"isActive":{"type":"boolean","title":"Isactive","default":true}},"type":"object","required":["id","name"],"title":"VisitTypeResponse","description":"Visit type response."},"VoterAnswer":{"properties":{"id":{"type":"string","title":"Id"},"position":{"type":"integer","title":"Position"},"text":{"type":"string","title":"Text"},"timeToFirstWordS":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Timetofirstwords"},"timeToCompleteS":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Timetocompletes"},"timeline":{"anyOf":[{"items":{"items":{"type":"number"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Timeline"},"rating":{"anyOf":[{"type":"string","enum":["up","average","down"]},{"type":"null"}],"title":"Rating"},"unsafe":{"type":"boolean","title":"Unsafe"},"unsafeNote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unsafenote"}},"type":"object","required":["id","position","text","timeToFirstWordS","timeToCompleteS","timeline","rating","unsafe","unsafeNote"],"title":"VoterAnswer"},"VoterQuestion":{"properties":{"id":{"type":"string","title":"Id"},"order":{"type":"integer","title":"Order"},"text":{"type":"string","title":"Text"},"bestAnswerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bestanswerid"},"worstAnswerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Worstanswerid"},"complete":{"type":"boolean","title":"Complete"},"answers":{"items":{"$ref":"#/components/schemas/VoterAnswer"},"type":"array","title":"Answers"}},"type":"object","required":["id","order","text","bestAnswerId","worstAnswerId","complete","answers"],"title":"VoterQuestion"},"VoterRegisterRequest":{"properties":{"role":{"type":"string","enum":["patient","staff","other"],"title":"Role"},"firstName":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Firstname"}},"type":"object","required":["role"],"title":"VoterRegisterRequest"},"VoterRegisterResponse":{"properties":{"voterToken":{"type":"string","title":"Votertoken"}},"type":"object","required":["voterToken"],"title":"VoterRegisterResponse"},"VoterSession":{"properties":{"role":{"type":"string","enum":["patient","staff","other"],"title":"Role"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firstname"},"votingOpen":{"type":"boolean","title":"Votingopen"},"stage":{"type":"string","enum":["questions","ranking","revealed"],"title":"Stage"},"questionsLocked":{"type":"boolean","title":"Questionslocked"},"completedQuestions":{"type":"integer","title":"Completedquestions"},"questions":{"items":{"$ref":"#/components/schemas/VoterQuestion"},"type":"array","title":"Questions"}},"type":"object","required":["role","firstName","votingOpen","stage","questionsLocked","completedQuestions","questions"],"title":"VoterSession"},"WebhookConfigReadResponse":{"properties":{"client_id":{"type":"string","title":"Client Id"},"webhook_url":{"type":"string","title":"Webhook Url"},"has_secret":{"type":"boolean","title":"Has Secret"}},"type":"object","required":["client_id","webhook_url","has_secret"],"title":"WebhookConfigReadResponse"},"WebhookConfigRequest":{"properties":{"client_id":{"type":"string","title":"Client Id"},"webhook_url":{"type":"string","title":"Webhook Url"},"webhook_secret":{"type":"string","title":"Webhook Secret"}},"type":"object","required":["client_id","webhook_url","webhook_secret"],"title":"WebhookConfigRequest"},"WebhookConfigResponse":{"properties":{"client_id":{"type":"string","title":"Client Id"},"webhook_url":{"type":"string","title":"Webhook Url"},"message":{"type":"string","title":"Message","default":"Webhook configured"}},"type":"object","required":["client_id","webhook_url"],"title":"WebhookConfigResponse"},"WeightCreate":{"properties":{"weight":{"type":"number","title":"Weight"},"date":{"type":"string","title":"Date"},"unit":{"type":"string","title":"Unit","default":"lbs"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["weight","date"],"title":"WeightCreate"},"WeightResponse":{"properties":{"id":{"type":"string","title":"Id"},"weight":{"type":"number","title":"Weight"},"date":{"type":"string","title":"Date"},"unit":{"type":"string","title":"Unit","default":"lbs"},"source":{"type":"string","title":"Source","default":"manual"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"sort_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort Date"},"sort_confidence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort Confidence"}},"type":"object","required":["id","weight","date"],"title":"WeightResponse"},"WeightSummaryResponse":{"properties":{"current_weight":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Weight"},"unit":{"type":"string","title":"Unit","default":"lbs"}},"type":"object","title":"WeightSummaryResponse"},"WeightUpdate":{"properties":{"weight":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"WeightUpdate"},"app__routers__schedule_router__ProviderListResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/ProviderWithOfficeHours"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"ProviderListResponse","description":"List of providers with office hours."},"app__schemas__admin_observability_schemas__AILogListResponse":{"properties":{"logs":{"items":{"$ref":"#/components/schemas/AILogSummary"},"type":"array","title":"Logs"},"total":{"type":"integer","title":"Total"},"statistics":{"anyOf":[{"$ref":"#/components/schemas/AILogStatistics"},{"type":"null"}]}},"type":"object","required":["logs","total"],"title":"AILogListResponse","description":"Response for listing AI logs."},"app__schemas__admin_schemas__OfficeHoursSlotResponse":{"properties":{"id":{"type":"string","title":"Id"},"dayOfWeek":{"type":"integer","title":"Dayofweek"},"startTime":{"type":"string","title":"Starttime"},"endTime":{"type":"string","title":"Endtime"},"timezone":{"type":"string","title":"Timezone","default":"America/Phoenix"},"isActive":{"type":"boolean","title":"Isactive","default":true}},"type":"object","required":["id","dayOfWeek","startTime","endTime"],"title":"OfficeHoursSlotResponse","description":"An office hours availability slot."},"app__schemas__transcript_faq_schemas__DuplicateCluster":{"properties":{"cluster_id":{"type":"integer","title":"Cluster Id"},"items":{"items":{"$ref":"#/components/schemas/DuplicateClusterItem"},"type":"array","title":"Items"}},"type":"object","required":["cluster_id","items"],"title":"DuplicateCluster","description":"A group of similar FAQ entries."}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"},"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-KEY"},"APIKeyQuery":{"type":"apiKey","in":"query","name":"api_key"}}}}