{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/":{"get":{"summary":"Public Route","operationId":"public_route","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/protected":{"get":{"summary":"Protected Route","operationId":"protected_route","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/users/me":{"delete":{"tags":["Auth"],"summary":"Delete User","operationId":"delete_user","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Delete User"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/registration-receipts":{"get":{"tags":["Billing"],"summary":"List My Registration Receipts","description":"Return CHA registration receipts for the member (generates missing PDFs).","operationId":"list_my_registration_receipts","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationReceiptsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/payments":{"get":{"tags":["Billing"],"summary":"List My Payments","description":"Return Stripe Charges (payments + receipts) for the calling member.","operationId":"list_my_payments","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max number of Stripe charges to fetch.","default":100,"title":"Limit"},"description":"Max number of Stripe charges to fetch."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingPaymentsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/checkout":{"post":{"tags":["Billing"],"summary":"Create Checkout Session","operationId":"create_checkout_session","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__billing_router__CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/member/conversations/support-unread-count":{"get":{"tags":["Member – Conversations"],"summary":"Support Unread Count","description":"Count unread staff replies in the member's app support (web_chat) threads.","operationId":"support_unread_count","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/member/conversations":{"get":{"tags":["Member – Conversations"],"summary":"List Conversations","description":"List the authenticated member's conversations.","operationId":"list_conversations","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Member – Conversations"],"summary":"Start Conversation","description":"Start a new web_chat conversation (or reuse an existing open one)\nand send the first message.","operationId":"start_conversation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageBody"}}},"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":[]}]}},"/member/conversations/{conversation_id}":{"get":{"tags":["Member – Conversations"],"summary":"Get Conversation","description":"Get a single conversation with its 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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/member/conversations/{conversation_id}/messages":{"post":{"tags":["Member – Conversations"],"summary":"Send Message","description":"Send a message in an existing conversation.","operationId":"send_message","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/member/conversations/{conversation_id}/read":{"post":{"tags":["Member – Conversations"],"summary":"Mark Read","description":"Mark all messages in a conversation as read.","operationId":"mark_read","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"}}}}}}},"/member/credits":{"get":{"tags":["Member"],"summary":"Get My Credits","operationId":"get_my_credits","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditBalanceResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/member/enrollments/{roster_id}/cancel":{"post":{"tags":["Member"],"summary":"Cancel Live Enrollment","description":"Cancel the member's live cohort registration.\n\nWhen the enrollment was paid, the course fee is issued as an available\ncourse credit (non-refundable per CHA policy). Unpaid registrations are\ncancelled without credit.","operationId":"cancel_live_enrollment","security":[{"HTTPBearer":[]}],"parameters":[{"name":"roster_id","in":"path","required":true,"schema":{"type":"string","title":"Roster Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__member_credits_router__CancelEnrollmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/member/course-finder-url":{"get":{"tags":["Member"],"summary":"Get Course Finder Launch Url","operationId":"get_course_finder_launch_url","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseFinderLaunchResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/member/certificates/{certificate_id}/apple-wallet":{"get":{"tags":["Member"],"summary":"Download a signed Apple Wallet pass for a member certificate.","operationId":"download_member_certificate_wallet_pass","security":[{"HTTPBearer":[]}],"parameters":[{"name":"certificate_id","in":"path","required":true,"schema":{"type":"string","title":"Certificate Id"}},{"name":"kind","in":"query","required":false,"schema":{"enum":["course","n95"],"type":"string","description":"course for completion certificates, n95 for fit-test certificates","default":"course","title":"Kind"},"description":"course for completion certificates, n95 for fit-test certificates"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/billing/invoices":{"post":{"tags":["Admin Billing"],"summary":"Create Admin Invoice","operationId":"create_admin_invoice","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAdminInvoiceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminInvoiceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/billing/clients/{client_id}/payments":{"get":{"tags":["Admin Billing"],"summary":"List Client Payments","description":"Return the same Stripe-charges list the member sees for themselves,\nbut for an arbitrary client. Includes the email-based back-fill so\nhistorical receipts surface even before the member has logged in.","operationId":"list_client_payments","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","description":"UUID of the public.clients row.","title":"Client Id"},"description":"UUID of the public.clients row."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max number of Stripe charges to fetch.","default":100,"title":"Limit"},"description":"Max number of Stripe charges to fetch."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPaymentsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/billing/refunds":{"post":{"tags":["Admin Billing"],"summary":"Create Admin Refund","operationId":"create_admin_refund","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRefundRequest"}}},"required":true},"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"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/billing/payment-plans":{"post":{"tags":["Admin Billing"],"summary":"Create Admin Payment Plan","operationId":"create_admin_payment_plan","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAdminPaymentPlanRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPaymentPlanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/clients/{client_id}/credits":{"get":{"tags":["Admin Credits"],"summary":"Get Client Credits","operationId":"get_client_credits","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientCreditsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/clients/{client_id}/credits/adjust":{"post":{"tags":["Admin Credits"],"summary":"Adjust Client Credits","operationId":"adjust_client_credits","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdjustClientCreditsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdjustClientCreditsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/clients/search":{"get":{"tags":["Admin Clients"],"summary":"Search Clients","description":"Search clients by name, email, or phone for comms compose.","operationId":"search_clients","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","minLength":0,"default":"","title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Search Clients"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/clients/{client_id}/comms-profile":{"get":{"tags":["Admin Clients"],"summary":"Get Client Comms Profile","description":"Summary for comms side panel: programs, certificates, course credits.","operationId":"get_client_comms_profile","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Client Comms Profile"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/{user_id}/impersonate-member":{"post":{"tags":["Admin Users"],"summary":"Impersonate Member Portal","description":"Issue a one-time magic link that signs the admin into the member portal\nas the target user (members.canadianheart.com).","operationId":"impersonate_member_portal","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/ImpersonateMemberResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users":{"post":{"tags":["Admin Users"],"summary":"Create Student","description":"Create a new student account and email them a set-up invite.\n\nUses Supabase's invite flow so the welcome email is routed through our\nSend Email auth hook (`/webhooks/supabase-auth/send-email`) and rendered\nfrom the admin-editable `auth_invite` SendGrid template. The invite link\ndrops the user on the member portal's `/auth/callback`, where they\nconfirm their email and are prompted to set a password.","operationId":"create_student","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStudentPayload"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStudentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/users/{user_id}":{"patch":{"tags":["Admin Users"],"summary":"Update Student","description":"Update a member's profile (name, email, phone, designation).","operationId":"update_student","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStudentPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStudentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin Users"],"summary":"Delete User As Admin","description":"Permanently delete a member account from Supabase Auth.\n\nCascades to public.users, public.clients, rosters, credits, and related\nrows per database FK rules.","operationId":"delete_user_as_admin","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":{"type":"object","additionalProperties":true,"title":"Response Delete User As Admin"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/merge":{"post":{"tags":["Admin Users"],"summary":"Merge Member Accounts As Admin","description":"Merge two member accounts; secondary email becomes an alternate login address.","operationId":"merge_member_accounts_as_admin","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeMemberAccountsPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeMemberAccountsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/course-certificates/cohorts/{course_code}/issue-bundled-bls":{"post":{"tags":["Admin Course Certificates"],"summary":"Issue Bundled Bls For Acls Cohort","description":"Issue missing bundled BLS Provider certificates for an in-person ACLS cohort.","operationId":"issue_bundled_bls_for_acls_cohort","security":[{"HTTPBearer":[]}],"parameters":[{"name":"course_code","in":"path","required":true,"schema":{"type":"string","title":"Course Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminIssueBundledBlsForCohortResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/course-certificates/{certificate_id}/regenerate-pdf":{"post":{"tags":["Admin Course Certificates"],"summary":"Regenerate Course Certificate Pdf","description":"Re-render the stored PDF from current certificate data and template.","operationId":"regenerate_course_certificate_pdf","security":[{"HTTPBearer":[]}],"parameters":[{"name":"certificate_id","in":"path","required":true,"schema":{"type":"string","title":"Certificate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRegenerateCourseCertificatePdfResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/n95-certificates":{"get":{"tags":["Admin N95 Certificates"],"summary":"Search N95 Certificates","description":"Search N95 certificates by certificate number or participant.","operationId":"search_n95_certificates","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"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/AdminN95SearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/n95-certificates/{certificate_id}":{"patch":{"tags":["Admin N95 Certificates"],"summary":"Update N95 Certificate","description":"Update an N95 certificate (admin). Regenerates PDF when applicable.","operationId":"update_n95_certificate","security":[{"HTTPBearer":[]}],"parameters":[{"name":"certificate_id","in":"path","required":true,"schema":{"type":"string","title":"Certificate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminN95UpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminN95CertificateRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin N95 Certificates"],"summary":"Delete N95 Certificate","description":"Delete an N95 certificate and its PDF (admin).","operationId":"delete_n95_certificate","security":[{"HTTPBearer":[]}],"parameters":[{"name":"certificate_id","in":"path","required":true,"schema":{"type":"string","title":"Certificate Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/training-centers/{training_center_id}/impersonate":{"post":{"tags":["Admin Training Centers"],"summary":"Impersonate Training Center Admin","description":"Generate a magic-link URL for the default CHA impersonation user, scoped\nto the requested training center.\n\nSets `users.training_center_id` and `is_tc_admin` on that account before\nissuing the link so the partner portal sees the correct center (not a\nmember/student account picked at random).","operationId":"impersonate_training_center_admin","security":[{"HTTPBearer":[]}],"parameters":[{"name":"training_center_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Training Center Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImpersonateTrainingCenterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/conversations":{"get":{"tags":["Admin – Conversations"],"summary":"List Conversations","operationId":"list_conversations","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Filter"}},{"name":"assigned_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"}},{"name":"channel","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel"}},{"name":"inbox_email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inbox Email"}},{"name":"tag","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tag"}},{"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":"object","additionalProperties":true,"title":"Response List Conversations"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/conversations/inboxes":{"get":{"tags":["Admin – Conversations"],"summary":"List Inboxes","description":"Return distinct inbox_email values for the inbox switcher.","operationId":"list_inboxes","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Inboxes"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/conversations/sms":{"post":{"tags":["Admin – Conversations"],"summary":"Start Sms Conversation","description":"Start (or reopen) an SMS thread with a client and send the first message.","operationId":"start_sms_conversation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartSmsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Start Sms Conversation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/conversations/{conversation_id}":{"get":{"tags":["Admin – Conversations"],"summary":"Get Conversation","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":{"type":"object","additionalProperties":true,"title":"Response Get Conversation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin – Conversations"],"summary":"Delete Conversation","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":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Delete Conversation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/conversations/{conversation_id}/reply":{"post":{"tags":["Admin – Conversations"],"summary":"Reply To Conversation","operationId":"reply_to_conversation","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__admin_conversations_router__ReplyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Reply To Conversation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/conversations/{conversation_id}/messages/{message_id}":{"patch":{"tags":["Admin – Conversations"],"summary":"Update Message Follow Up","operationId":"update_message_follow_up","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageFollowUpRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Message Follow Up"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/conversations/{conversation_id}/messages/{message_id}/forward":{"post":{"tags":["Admin – Conversations"],"summary":"Forward Message","operationId":"forward_message","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForwardMessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Forward Message"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/conversations/{conversation_id}/read":{"post":{"tags":["Admin – Conversations"],"summary":"Mark Conversation Read","operationId":"mark_conversation_read","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":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Mark Conversation Read"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/conversations/{conversation_id}/close":{"post":{"tags":["Admin – Conversations"],"summary":"Close Conversation","operationId":"close_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":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Close Conversation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/conversations/{conversation_id}/complete":{"post":{"tags":["Admin – Conversations"],"summary":"Complete Web Chat","operationId":"complete_web_chat","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":{"type":"object","additionalProperties":true,"title":"Response Complete Web Chat"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/conversations/{conversation_id}/reopen":{"post":{"tags":["Admin – Conversations"],"summary":"Reopen Conversation","operationId":"reopen_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":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Reopen Conversation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/conversations/{conversation_id}/archive":{"post":{"tags":["Admin – Conversations"],"summary":"Archive Conversation","operationId":"archive_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":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Archive Conversation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/conversations/{conversation_id}/assign":{"post":{"tags":["Admin – Conversations"],"summary":"Assign Conversation","operationId":"assign_conversation","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Assign Conversation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/conversations/ai/status":{"get":{"tags":["Admin – Comms AI"],"summary":"Comms Ai Status","description":"Whether comms AI (draft + analyze) is available on this API deployment.","operationId":"comms_ai_status","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Comms Ai Status"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/conversations/{conversation_id}/ai":{"get":{"tags":["Admin – Comms AI"],"summary":"Get Conversation Ai","operationId":"get_conversation_ai","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":{"type":"object","additionalProperties":true,"title":"Response Get Conversation Ai"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/conversations/{conversation_id}/ai/analyze":{"post":{"tags":["Admin – Comms AI"],"summary":"Analyze Conversation","operationId":"analyze_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":{"type":"object","additionalProperties":true,"title":"Response Analyze Conversation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/conversations/{conversation_id}/ai/draft-reply":{"post":{"tags":["Admin – Comms AI"],"summary":"Draft Reply","operationId":"draft_reply","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__admin_course_reviews_ai_router__DraftReplyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Draft Reply"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/conversations/{conversation_id}/ai/apply-tags":{"post":{"tags":["Admin – Comms AI"],"summary":"Apply Suggested Tags","description":"Merge suggested tags into the conversation (staff-confirmed).","operationId":"apply_suggested_tags","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyTagsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Apply Suggested Tags"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/course-reviews/ai/status":{"get":{"tags":["Admin – Course review AI"],"summary":"Course Reviews Ai Status","operationId":"course_reviews_ai_status","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Course Reviews Ai Status"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/course-reviews/{review_id}/ai/draft-reply":{"post":{"tags":["Admin – Course review AI"],"summary":"Draft Review Reply","operationId":"draft_review_reply","security":[{"HTTPBearer":[]}],"parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","title":"Review Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__admin_course_reviews_ai_router__DraftReplyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Draft Review Reply"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/google-reviews/status":{"get":{"tags":["Admin – Google reviews"],"summary":"Google Reviews Status","operationId":"google_reviews_status","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Google Reviews Status"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/google-reviews/settings":{"patch":{"tags":["Admin – Google reviews"],"summary":"Update Google Reviews Settings","operationId":"update_google_reviews_settings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Update Google Reviews Settings"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/google-reviews":{"get":{"tags":["Admin – Google reviews"],"summary":"List Google Reviews","operationId":"list_google_reviews","security":[{"HTTPBearer":[]}],"parameters":[{"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":{"type":"object","additionalProperties":true,"title":"Response List Google Reviews"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/google-reviews/reviews/{review_id}/visibility":{"patch":{"tags":["Admin – Google reviews"],"summary":"Set Google Review Visibility","operationId":"set_google_review_visibility","security":[{"HTTPBearer":[]}],"parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","title":"Review Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisibilityRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Set Google Review Visibility"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/google-reviews/reviews/{review_id}/reply":{"post":{"tags":["Admin – Google reviews"],"summary":"Reply To Google Review","operationId":"reply_to_google_review","security":[{"HTTPBearer":[]}],"parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","title":"Review Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__admin_google_reviews_router__ReplyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Reply To Google Review"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/google-reviews/sync":{"post":{"tags":["Admin – Google reviews"],"summary":"Sync Google Reviews","operationId":"sync_google_reviews","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Sync Google Reviews"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/google-reviews/oauth/start":{"get":{"tags":["Admin – Google reviews"],"summary":"Google Oauth Start","operationId":"google_oauth_start","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Google Oauth Start"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/google-reviews/oauth/callback":{"get":{"tags":["Admin – Google reviews"],"summary":"Google Oauth Callback","operationId":"google_oauth_callback","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"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"}}}}}}},"/admin/google-reviews/oauth/disconnect":{"post":{"tags":["Admin – Google reviews"],"summary":"Google Oauth Disconnect","operationId":"google_oauth_disconnect","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Google Oauth Disconnect"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/google-reviews/locations":{"get":{"tags":["Admin – Google reviews"],"summary":"List Gbp Locations","operationId":"list_gbp_locations","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Gbp Locations"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/google-reviews/locations/select":{"post":{"tags":["Admin – Google reviews"],"summary":"Select Gbp Location","operationId":"select_gbp_location","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelectLocationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Select Gbp Location"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/notifications/templates":{"get":{"tags":["Admin Notifications"],"summary":"List Templates","description":"List every notification template, sorted by kind/channel.","operationId":"list_templates","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TemplateRow"},"type":"array","title":"Response List Templates"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Admin Notifications"],"summary":"Create Template","description":"Create a brand-new template.\n\nValidates channel-specific body requirements (mirrors the DB CHECK\nconstraints) and rejects duplicates against the partial unique\nindex `notification_templates_active_idx (kind, channel)\nWHERE is_active`. Returning a 409 here keeps the UI flow simple --\nthe create-template dialog hides kinds that already have an active\nrow, so a 409 only happens on a tight race.","operationId":"create_template","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/notifications/templates/{template_id}":{"get":{"tags":["Admin Notifications"],"summary":"Get Template","operationId":"get_template","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","description":"UUID of the template.","title":"Template Id"},"description":"UUID of the template."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Admin Notifications"],"summary":"Update Template","operationId":"update_template","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","description":"UUID of the template.","title":"Template Id"},"description":"UUID of the template."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin Notifications"],"summary":"Delete Template","description":"Hard-delete a template.\n\nNotifications already dispatched against this template keep working\n-- `notifications.template_id` has ON DELETE SET NULL. The\nNotificationsService re-resolves the active template per send, so a\ndeletion only affects future sends, not historical audit rows.","operationId":"delete_template","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","description":"UUID of the template.","title":"Template Id"},"description":"UUID of the template."}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/notifications/twilio-status":{"get":{"tags":["Admin Notifications"],"summary":"Twilio Status","description":"Whether SMS can be sent from this environment (for admin UI banners).","operationId":"twilio_status","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwilioStatusResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/notifications/templates/{template_id}/test-send":{"post":{"tags":["Admin Notifications"],"summary":"Test Send Template","description":"Render the template with sample data and ship a one-off test message.\n\nBypasses NotificationsService entirely so we don't write a\nnotifications row, don't apply opt-out checks, and don't dedupe by\nidempotency key. This is a developer / preview tool, not a real send.","operationId":"test_send_template","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","description":"UUID of the template.","title":"Template Id"},"description":"UUID of the template."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestSendRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestSendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/broadcasts":{"get":{"tags":["Admin Notifications"],"summary":"List Broadcasts","operationId":"list_broadcasts","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/BroadcastRow"},"type":"array","title":"Response List Broadcasts"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Admin Notifications"],"summary":"Create Broadcast","operationId":"create_broadcast","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastUpsert"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/broadcasts/{broadcast_id}":{"get":{"tags":["Admin Notifications"],"summary":"Get Broadcast","operationId":"get_broadcast","security":[{"HTTPBearer":[]}],"parameters":[{"name":"broadcast_id","in":"path","required":true,"schema":{"type":"string","description":"UUID of the broadcast.","title":"Broadcast Id"},"description":"UUID of the broadcast."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Admin Notifications"],"summary":"Update Broadcast","description":"Edit a draft broadcast. Once status leaves 'draft', edits are rejected.","operationId":"update_broadcast","security":[{"HTTPBearer":[]}],"parameters":[{"name":"broadcast_id","in":"path","required":true,"schema":{"type":"string","description":"UUID of the broadcast.","title":"Broadcast Id"},"description":"UUID of the broadcast."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastUpsert"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin Notifications"],"summary":"Cancel Broadcast","description":"Cancel a draft. Sent / sending broadcasts are left immutable so\naudit trails stay clean; admins can soft-cancel a draft and the row\nkeeps existing for history.","operationId":"cancel_broadcast","security":[{"HTTPBearer":[]}],"parameters":[{"name":"broadcast_id","in":"path","required":true,"schema":{"type":"string","description":"UUID of the broadcast.","title":"Broadcast Id"},"description":"UUID of the broadcast."}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/broadcasts/{broadcast_id}/recipients/count":{"post":{"tags":["Admin Notifications"],"summary":"Count Recipients","description":"Preview how many clients would receive the broadcast.\n\nAccepts a fresh `RecipientFilter` in the body so the composer can\nupdate the count as the admin tweaks the picker without having to\nsave the broadcast first.","operationId":"count_recipients","security":[{"HTTPBearer":[]}],"parameters":[{"name":"broadcast_id","in":"path","required":true,"schema":{"type":"string","description":"UUID of the broadcast.","title":"Broadcast Id"},"description":"UUID of the broadcast."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipientFilter"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipientCountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/broadcasts/{broadcast_id}/send":{"post":{"tags":["Admin Notifications"],"summary":"Send Broadcast","description":"Kick off the fan-out asynchronously and return immediately.","operationId":"send_broadcast","security":[{"HTTPBearer":[]}],"parameters":[{"name":"broadcast_id","in":"path","required":true,"schema":{"type":"string","description":"UUID of the broadcast.","title":"Broadcast Id"},"description":"UUID of the broadcast."}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastSendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/notifications/clients/{client_id}":{"get":{"tags":["Admin Notifications"],"summary":"List Client Notifications","description":"List a single client's notifications history, newest first.\n\nMirrors the data the Notifications tab on the student profile reads,\nbut routed through the API so we can apply server-side ordering and\npagination caps without leaking RLS-bypassing reads to the browser.","operationId":"list_client_notifications","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","description":"UUID of the client.","title":"Client Id"},"description":"UUID of the client."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NotificationRow"},"title":"Response List Client Notifications"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/notifications/by-broadcast/{broadcast_id}":{"get":{"tags":["Admin Notifications"],"summary":"List Broadcast Notifications","description":"All notifications produced by a single broadcast fan-out.\n\nJoined via `context->>'broadcast_id'`. The fan-out writes the\nbroadcast's id into context so the detail page can query without\nneeding a foreign key column. Capped server-side at 500 so we\ndon't wedge the API for huge campaigns; pagination can come later.","operationId":"list_broadcast_notifications","security":[{"HTTPBearer":[]}],"parameters":[{"name":"broadcast_id","in":"path","required":true,"schema":{"type":"string","description":"UUID of the broadcast.","title":"Broadcast Id"},"description":"UUID of the broadcast."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":500,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NotificationRow"},"title":"Response List Broadcast Notifications"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/notifications/{notification_id}/resend":{"post":{"tags":["Admin Notifications"],"summary":"Resend Notification","description":"Re-dispatch a single notifications row.\n\nBypasses idempotency by minting a fresh key, re-resolves the\nrecipient and the active template, and writes a brand-new\nnotifications row for the new attempt. Always honors opt-outs --\nforcing a send around an unsubscribed user would be a CASL violation\nno matter who pressed the button.","operationId":"resend_notification","security":[{"HTTPBearer":[]}],"parameters":[{"name":"notification_id","in":"path","required":true,"schema":{"type":"string","description":"UUID of the notifications row.","title":"Notification Id"},"description":"UUID of the notifications row."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/course-rosters/{roster_id}/send-registration-confirmation":{"post":{"tags":["Admin"],"summary":"Send Registration Confirmation","description":"Send registration_confirmation after a manual roster add.","operationId":"send_registration_confirmation","security":[{"HTTPBearer":[]}],"parameters":[{"name":"roster_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Roster Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__training_centers_router__SendRegistrationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/course-rosters/{roster_id}/reconcile-payment":{"post":{"tags":["Admin"],"summary":"Reconcile Roster Payment","description":"Link a manual roster row to an existing succeeded Stripe payment if found.","operationId":"reconcile_roster_payment","security":[{"HTTPBearer":[]}],"parameters":[{"name":"roster_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Roster Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__training_centers_router__ReconcilePaymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/automations/triggers":{"get":{"tags":["Admin Automations"],"summary":"List Trigger Specs","description":"Return the trigger registry the editor uses to populate the\ntrigger picker. Static for now; a future \"custom event\" feature\nwould persist additions here too.","operationId":"list_trigger_specs","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TriggerSpecRow"},"type":"array","title":"Response List Trigger Specs"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/automations":{"get":{"tags":["Admin Automations"],"summary":"List Automations","operationId":"list_automations","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AutomationRow"},"type":"array","title":"Response List Automations"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Admin Automations"],"summary":"Create Automation","operationId":"create_automation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationUpsert"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/automations/{automation_id}":{"get":{"tags":["Admin Automations"],"summary":"Get Automation","operationId":"get_automation","security":[{"HTTPBearer":[]}],"parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","description":"Automation UUID.","title":"Automation Id"},"description":"Automation UUID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Admin Automations"],"summary":"Update Automation","description":"Edit the workflow.\n\nActive automations can be edited but the next tick will respect\nthe new graph immediately, so admins should generally archive ->\nduplicate -> edit -> activate when making breaking changes.","operationId":"update_automation","security":[{"HTTPBearer":[]}],"parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","description":"Automation UUID.","title":"Automation Id"},"description":"Automation UUID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationUpsert"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin Automations"],"summary":"Delete Automation","operationId":"delete_automation","security":[{"HTTPBearer":[]}],"parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","description":"Automation UUID.","title":"Automation Id"},"description":"Automation UUID."}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/automations/{automation_id}/activate":{"post":{"tags":["Admin Automations"],"summary":"Activate Automation","operationId":"activate_automation","security":[{"HTTPBearer":[]}],"parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","description":"Automation UUID.","title":"Automation Id"},"description":"Automation UUID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/automations/{automation_id}/archive":{"post":{"tags":["Admin Automations"],"summary":"Archive Automation","description":"Archive an automation. Existing enrollments keep walking until\nthey finish (the tick treats archived parents as still readable\nfor in-flight runs); future events of the same trigger no longer\nenroll new clients.","operationId":"archive_automation","security":[{"HTTPBearer":[]}],"parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","description":"Automation UUID.","title":"Automation Id"},"description":"Automation UUID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/automations/{automation_id}/test-enroll":{"post":{"tags":["Admin Automations"],"summary":"Test Enroll","description":"Drop a single client into the automation as if a real trigger\nfired. Useful for end-to-end QA on a draft.\n\nNote: works for any trigger type because we publish a manual.test\nevent, and the matcher runs every active automation against it.\nThe TriggerSpec for manual.test only matches when the event's\nautomation_id field matches the automation, so this stays scoped.","operationId":"test_enroll","security":[{"HTTPBearer":[]}],"parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","description":"Automation UUID.","title":"Automation Id"},"description":"Automation UUID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEnrollRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEnrollResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/automations/{automation_id}/enrollments/{enrollment_id}/cancel":{"post":{"tags":["Admin Automations"],"summary":"Cancel Enrollment","operationId":"cancel_enrollment","security":[{"HTTPBearer":[]}],"parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","description":"Automation UUID.","title":"Automation Id"},"description":"Automation UUID."},{"name":"enrollment_id","in":"path","required":true,"schema":{"type":"string","description":"Enrollment UUID.","title":"Enrollment Id"},"description":"Enrollment UUID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__automations_router__CancelEnrollmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/automations/{automation_id}/enrollments":{"get":{"tags":["Admin Automations"],"summary":"List Enrollments","operationId":"list_enrollments","security":[{"HTTPBearer":[]}],"parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","description":"Automation UUID.","title":"Automation Id"},"description":"Automation UUID."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by enrollment status.","title":"Status"},"description":"Filter by enrollment status."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EnrollmentRow"},"title":"Response List Enrollments"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/automations/enrollments/{enrollment_id}/runs":{"get":{"tags":["Admin Automations"],"summary":"List Step Runs","operationId":"list_step_runs","security":[{"HTTPBearer":[]}],"parameters":[{"name":"enrollment_id","in":"path","required":true,"schema":{"type":"string","description":"Enrollment UUID.","title":"Enrollment Id"},"description":"Enrollment UUID."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StepRunRow"},"title":"Response List Step Runs"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/automations/tick":{"post":{"tags":["Internal"],"summary":"Tick","operationId":"tick","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TickResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/automations/process-events":{"post":{"tags":["Internal"],"summary":"Process Events","description":"Drain unprocessed automation_events into enrollments.\n\npublish_event() runs the matcher synchronously so this endpoint\nis rarely needed in production; it's here for one-off backfills\n(e.g. after a deploy that adds a new trigger to an existing\nautomation).","operationId":"process_events","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessEventsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/automations/sweep-cohorts":{"post":{"tags":["Internal"],"summary":"Sweep Cohorts","description":"Emit cohort.upcoming events at fixed offsets before each cohort.\n\nIdempotent at the DB layer (unique (event_type, source_id) index)\nso missed runs catch up automatically the next time the sweeper\nfires.","operationId":"sweep_cohorts","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SweepCohortsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/n95-certificates/finalize-due":{"post":{"tags":["Internal"],"summary":"Finalize Due Sweep","description":"Release every N95 certificate past its 10-minute grace window.\n\nIdempotent: rows already marked `member_issued_at` are skipped, and\nthe notification send path uses an idempotency key keyed on the\ncertificate id so re-running the sweep can't double-email.","operationId":"finalize_due_sweep","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeDueSweepResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/google-reviews/sync":{"post":{"tags":["Internal"],"summary":"Internal Sync Google Reviews","operationId":"internal_sync_google_reviews","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Internal Sync Google Reviews"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/roster-registrations/send":{"post":{"tags":["Internal"],"summary":"Send Registration Confirmation","description":"Send registration_confirmation for one roster row if eligible.","operationId":"send_registration_confirmation","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendRegistrationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__training_centers_router__SendRegistrationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/roster-registrations/reconcile-payment":{"post":{"tags":["Internal"],"summary":"Reconcile Roster Payment","description":"Link a manual roster add to an existing succeeded Stripe payment if found.","operationId":"reconcile_roster_payment","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendRegistrationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__training_centers_router__ReconcilePaymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/contact":{"post":{"tags":["Public"],"summary":"Send a marketing-site contact form message to support.","operationId":"contact_form","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactFormPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactFormResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/sms-signup":{"post":{"tags":["Public"],"summary":"Record an SMS opt-in consent submission.","operationId":"sms_signup","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsSignupPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsSignupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/support/sessions":{"post":{"tags":["Public – Support chat"],"summary":"Create Session","operationId":"create_session","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Session"}}}}}}},"/public/support/sessions/{session_id}":{"get":{"tags":["Public – Support chat"],"summary":"Get Session","operationId":"get_session","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Session"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/support/sessions/{session_id}/messages":{"post":{"tags":["Public – Support chat"],"summary":"Post Message","operationId":"post_message","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Post Message"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/support/sessions/{session_id}/escalate":{"post":{"tags":["Public – Support chat"],"summary":"Escalate Session","operationId":"escalate_session","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Escalate Session"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/member/support/sessions":{"post":{"tags":["Member – Support chat"],"summary":"Create Session","operationId":"create_session","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Session"}}}}},"security":[{"HTTPBearer":[]}]}},"/member/support/sessions/{session_id}":{"get":{"tags":["Member – Support chat"],"summary":"Get Session","operationId":"get_session","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Session"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/member/support/sessions/{session_id}/messages":{"post":{"tags":["Member – Support chat"],"summary":"Post Message","operationId":"post_message","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Post Message"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/member/support/sessions/{session_id}/escalate":{"post":{"tags":["Member – Support chat"],"summary":"Escalate Session","operationId":"escalate_session","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Escalate Session"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/member/support/sessions/{session_id}/escalate-to-chat":{"post":{"tags":["Member – Support chat"],"summary":"Escalate Session To Chat","operationId":"escalate_session_to_chat","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Escalate Session To Chat"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/cohort-registration/funnel-event":{"post":{"tags":["Public"],"summary":"Record a cohort registration funnel event (page view, login, etc.).","operationId":"record_funnel_event","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelEventPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelEventResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/cohort-registration/check-email":{"post":{"tags":["Public"],"summary":"Check whether an account exists for an email.","operationId":"check_email","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckEmailPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckEmailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/cohort-registration/registration-prefill":{"get":{"tags":["Public"],"summary":"Resolve a short-lived mobile handoff token into registration prefill fields.","operationId":"get_registration_prefill","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","minLength":20,"maxLength":8192,"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationPrefillResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/cohort-registration/enroll":{"post":{"tags":["Public"],"summary":"Register an authenticated user on a public cohort and start checkout.","operationId":"enroll","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__public_cohort_registration_router__CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/public/cohort-registration/signup-and-checkout":{"post":{"tags":["Public"],"summary":"Create an account, register on a public cohort, and start checkout.","operationId":"signup_and_checkout","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupAndCheckoutPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__public_cohort_registration_router__CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/public/cohort-registration/release-seat":{"post":{"tags":["Public"],"summary":"Release an unpaid seat after the in-modal hold timer expires.","description":"Cancel the Stripe PaymentIntent and mark the roster cancelled so the\nseat returns to the pool.\n\nThe PaymentIntent ``client_secret`` is its own bearer credential -- only\nthe browser that created the intent ever saw it -- so this endpoint\nneeds no Supabase auth. We still:\n\n  * Validate the secret shape (``pi_<id>_secret_<rand>``).\n  * Retrieve the PI from Stripe to confirm it belongs to a CHA cohort\n    registration (metadata ``kind == live_cohort``) before touching DB.\n  * No-op (return ``released=False``) when the PI is already paid or\n    already cancelled; never overwrite a paid roster.","operationId":"release_seat","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReleaseSeatPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReleaseSeatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/public/cohort-registration/confirm-payment":{"post":{"tags":["Public"],"summary":"Fulfill a cohort registration after embedded Stripe payment succeeds.","description":"Idempotently mark the roster paid when the browser completes Payment Element\ncheckout. Uses the PaymentIntent ``client_secret`` as proof of ownership\n(same model as ``/release-seat``). Safe to call if the Stripe webhook\nalready fulfilled the row.","operationId":"confirm_payment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmPaymentPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmPaymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/cohort-registration/confirm-credits":{"post":{"tags":["Public"],"summary":"Fulfill a registration paid entirely with course credits.","description":"Redeem held course credits and mark the roster paid after the member\nconfirms on the credit-review step. ``/enroll`` only holds credits for\nfull-credit checkouts so cancel can release the seat without sending\nregistration_confirmation.","operationId":"confirm_credits_checkout","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmCreditsPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmCreditsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/training-centers/cohorts/{cohort_id}/sms-opt-in":{"get":{"tags":["Training Centers"],"summary":"List Cohort Sms Opt In","description":"SMS opt-in status for each student on a CHA cohort roster.","operationId":"list_cohort_sms_opt_in","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Cohort Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortSmsOptInResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/training-centers/clients/{client_id}/sms-opt-in":{"patch":{"tags":["Training Centers"],"summary":"Update Client Sms Opt In","description":"Toggle SMS opt-in for a student on a CHA cohort roster.","operationId":"update_client_sms_opt_in","security":[{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Client Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientSmsOptInRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientSmsOptInResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/training-centers/rosters/{roster_id}/send-registration-confirmation":{"post":{"tags":["Training Centers"],"summary":"Send Roster Registration Confirmation","description":"Send registration_confirmation after a TC portal roster add.","operationId":"send_roster_registration_confirmation","security":[{"HTTPBearer":[]}],"parameters":[{"name":"roster_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Roster Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__training_centers_router__SendRegistrationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/training-centers/rosters/{roster_id}/reconcile-payment":{"post":{"tags":["Training Centers"],"summary":"Reconcile Roster Payment","description":"Link a manual roster row to an existing succeeded Stripe payment if found.","operationId":"reconcile_roster_payment","security":[{"HTTPBearer":[]}],"parameters":[{"name":"roster_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Roster Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__training_centers_router__ReconcilePaymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/training-centers/rosters/{roster_id}/issue-certificate":{"post":{"tags":["Training Centers"],"summary":"Issue Roster Certificate","description":"Issue a completion certificate for a roster student.\n\nGenerates a PDF from the global course certificate template, stores it in\nthe private certificates bucket, creates a certificates row for the member\nportal, and locks the roster entry.","operationId":"issue_roster_certificate","security":[{"HTTPBearer":[]}],"parameters":[{"name":"roster_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Roster Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueCertificateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/training-centers/members/lookup-email":{"post":{"tags":["Training Centers"],"summary":"Lookup Member By Email","description":"Look up a CHA member account by email (training center administrators).","operationId":"lookup_member_by_email","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberEmailLookupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberEmailLookupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/training-centers/members/provision":{"post":{"tags":["Training Centers"],"summary":"Provision Member Account","description":"Create a CHA member account for roster / N95 workflows.","operationId":"provision_member_account","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionMemberRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionMemberResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/training-centers/n95-certificates":{"post":{"tags":["Training Centers"],"summary":"Issue N95 Certificate","description":"Issue an N95 fit-test certificate for a registered participant.","operationId":"issue_n95_certificate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueN95CertificateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueCertificateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/training-centers/n95-certificates/finalize-due":{"post":{"tags":["Training Centers"],"summary":"Finalize Due N95 Certificates","description":"Release legacy N95 certificates that are still missing member_issued_at.","operationId":"finalize_due_n95_certificates","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeDueN95Response"}}}}},"security":[{"HTTPBearer":[]}]}},"/training-centers/n95-certificates/{certificate_id}":{"delete":{"tags":["Training Centers"],"summary":"Delete N95 Certificate","description":"Delete an N95 certificate within 10 minutes of creation.","operationId":"delete_n95_certificate","security":[{"HTTPBearer":[]}],"parameters":[{"name":"certificate_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Certificate Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Training Centers"],"summary":"Update N95 Certificate Mask","description":"Update mask model within 24 hours of creation (regenerates PDF).","operationId":"update_n95_certificate_mask","security":[{"HTTPBearer":[]}],"parameters":[{"name":"certificate_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Certificate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateN95MaskRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateN95MaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/training-centers/cohorts/{cohort_id}/sms":{"post":{"tags":["Training Centers"],"summary":"Send Roster Sms","description":"Send a transactional SMS to all students on a cohort roster (CHA only).","operationId":"send_roster_sms","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Cohort Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterSmsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RosterSmsSendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/training-centers/cohorts/{cohort_id}/live-event-instructor-link":{"post":{"tags":["Training Centers"],"summary":"Live Event Instructor Link","description":"Open the CHA live instructor console for a virtual cohort (CHA TC only).","operationId":"live_event_instructor_link","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Cohort Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveEventInstructorLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/instructors/rosters/{roster_id}/issue-certificate":{"post":{"tags":["Instructors"],"summary":"Issue Roster Certificate","description":"Issue a completion certificate for a student on a cohort the instructor\nis assigned to teach.","operationId":"issue_roster_certificate","security":[{"HTTPBearer":[]}],"parameters":[{"name":"roster_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Roster Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueCertificateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/email-signatures":{"get":{"tags":["Admin – Email Signatures"],"summary":"List Signatures","operationId":"list_signatures","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Signatures"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Admin – Email Signatures"],"summary":"Create Signature","operationId":"create_signature","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignatureRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Signature"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/email-signatures/{signature_id}":{"put":{"tags":["Admin – Email Signatures"],"summary":"Update Signature","operationId":"update_signature","security":[{"HTTPBearer":[]}],"parameters":[{"name":"signature_id","in":"path","required":true,"schema":{"type":"string","title":"Signature Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignatureRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Signature"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin – Email Signatures"],"summary":"Delete Signature","operationId":"delete_signature","security":[{"HTTPBearer":[]}],"parameters":[{"name":"signature_id","in":"path","required":true,"schema":{"type":"string","title":"Signature Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Delete Signature"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/live-events":{"post":{"tags":["Admin – Live Events"],"summary":"Create Event","operationId":"create_event","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEventRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Event"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Admin – Live Events"],"summary":"List Events","operationId":"list_events","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"today","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Today"}},{"name":"upcoming","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Upcoming"}},{"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":"object","additionalProperties":true,"title":"Response List Events"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/live-events/{event_id}":{"patch":{"tags":["Admin – Live Events"],"summary":"Update Event","operationId":"update_event","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Event Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEventRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Event"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Admin – Live Events"],"summary":"Get Event","operationId":"get_event","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Event"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/live-events/{event_id}/start":{"post":{"tags":["Admin – Live Events"],"summary":"Start Event","operationId":"start_event","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Start Event"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/live-events/{event_id}/end":{"post":{"tags":["Admin – Live Events"],"summary":"End Event","operationId":"end_event","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response End Event"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/live-events/{event_id}/clear-chat":{"post":{"tags":["Admin – Live Events"],"summary":"Clear Event Chat","operationId":"clear_event_chat","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Clear Event Chat"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/live-events/{event_id}/reset":{"post":{"tags":["Admin – Live Events"],"summary":"Reset Event Session","operationId":"reset_event_session","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Reset Event Session"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/live-events/{event_id}/questions":{"post":{"tags":["Admin – Live Events"],"summary":"Push Question","operationId":"push_question","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Event Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushQuestionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Push Question"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/live-events/{event_id}/activate-slide":{"post":{"tags":["Admin – Live Events"],"summary":"Activate Slide","operationId":"activate_slide","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Event Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateSlideRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Activate Slide"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/live-events/{event_id}/presenter-token/regenerate":{"post":{"tags":["Admin – Live Events"],"summary":"Regenerate Presenter Token","operationId":"regenerate_presenter_token","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Regenerate Presenter Token"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/live-events/{event_id}/questions/{question_id}":{"patch":{"tags":["Admin – Live Events"],"summary":"Update Question","operationId":"update_question","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Event Id"}},{"name":"question_id","in":"path","required":true,"schema":{"type":"string","title":"Question Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateQuestionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Question"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/live-events/{event_id}/answers":{"get":{"tags":["Admin – Live Events"],"summary":"Get Answers","operationId":"get_answers","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Answers"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/live-events/{event_id}/participants":{"get":{"tags":["Admin – Live Events"],"summary":"Get Participants","operationId":"get_participants","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Participants"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/live-events/{event_id}/participants/{client_id}/messages":{"get":{"tags":["Admin – Live Events"],"summary":"Get Participant Messages","operationId":"get_participant_messages","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Event Id"}},{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":5,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Participant Messages"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/live-events/{event_id}/participants/{client_id}/answers":{"get":{"tags":["Admin – Live Events"],"summary":"Get Participant Answers","operationId":"get_participant_answers","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Event Id"}},{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Participant Answers"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/live-events/{event_id}/messages":{"get":{"tags":["Admin – Live Events"],"summary":"Get Messages","operationId":"get_messages","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Event Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"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":"object","additionalProperties":true,"title":"Response Get Messages"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin – Live Events"],"summary":"Send Message","operationId":"send_message","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Event Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__member_live_events_router__SendMessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Send Message"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/live-events/{event_id}/realtime/config":{"get":{"tags":["Admin – Live Events"],"summary":"Get Admin Realtime Config","operationId":"get_admin_realtime_config","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Admin Realtime Config"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/live-events/{event_id}/realtime/session":{"post":{"tags":["Admin – Live Events"],"summary":"Create Admin Realtime Session","operationId":"create_admin_realtime_session","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Admin Realtime Session"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/live-events/{event_id}/realtime/tracks":{"get":{"tags":["Admin – Live Events"],"summary":"List Publishable Realtime Tracks","operationId":"list_publishable_realtime_tracks","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Publishable Realtime Tracks"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/live-events/{event_id}/realtime/tracks/new":{"post":{"tags":["Admin – Live Events"],"summary":"Admin Realtime Tracks New","operationId":"admin_realtime_tracks_new","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Event Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__member_live_events_router__RealtimeProxyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Realtime Tracks New"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/live-events/{event_id}/realtime/renegotiate":{"put":{"tags":["Admin – Live Events"],"summary":"Admin Realtime Renegotiate","operationId":"admin_realtime_renegotiate","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"title":"Event Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__member_live_events_router__RealtimeProxyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Realtime Renegotiate"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/presenter/live-events/{event_id}/slide":{"post":{"tags":["Presenter – Live Events"],"summary":"Presenter Activate Slide","operationId":"presenter_activate_slide","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresenterSlideRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Presenter Activate Slide"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/member/live-events/by-code/{course_code}":{"get":{"tags":["Member – Live Events"],"summary":"Get Event By Code","operationId":"get_event_by_code","security":[{"HTTPBearer":[]}],"parameters":[{"name":"course_code","in":"path","required":true,"schema":{"type":"string","title":"Course Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Event By Code"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/member/live-events/by-code/{course_code}/token":{"post":{"tags":["Member – Live Events"],"summary":"Generate Token By Code","operationId":"generate_token_by_code","security":[{"HTTPBearer":[]}],"parameters":[{"name":"course_code","in":"path","required":true,"schema":{"type":"string","title":"Course Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Generate Token By Code"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/member/live-events/{event_id}":{"get":{"tags":["Member – Live Events"],"summary":"Get Event","operationId":"get_event","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Event"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/member/live-events/{event_id}/join":{"post":{"tags":["Member – Live Events"],"summary":"Join Event","operationId":"join_event","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Join Event"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/member/live-events/{event_id}/presence":{"post":{"tags":["Member – Live Events"],"summary":"Touch Presence","operationId":"touch_presence","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Touch Presence"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/member/live-events/{event_id}/answers":{"post":{"tags":["Member – Live Events"],"summary":"Submit Answer","operationId":"submit_answer","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitAnswerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Submit Answer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/member/live-events/{event_id}/messages":{"post":{"tags":["Member – Live Events"],"summary":"Send Message","operationId":"send_message","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__member_live_events_router__SendMessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Send Message"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Member – Live Events"],"summary":"Get Messages","operationId":"get_messages","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":250,"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":"object","additionalProperties":true,"title":"Response Get Messages"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/member/live-events/{event_id}/token":{"post":{"tags":["Member – Live Events"],"summary":"Generate Token","operationId":"generate_token","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Generate Token"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/member/live-events/{event_id}/realtime/config":{"get":{"tags":["Member – Live Events"],"summary":"Get Realtime Config","operationId":"get_realtime_config","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Realtime Config"}}}}},"security":[{"HTTPBearer":[]}]}},"/member/live-events/{event_id}/realtime/session":{"post":{"tags":["Member – Live Events"],"summary":"Create Member Realtime Session","operationId":"create_member_realtime_session","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Member Realtime Session"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/member/live-events/{event_id}/realtime/tracks/new":{"post":{"tags":["Member – Live Events"],"summary":"Member Realtime Tracks New","operationId":"member_realtime_tracks_new","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__member_live_events_router__RealtimeProxyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Member Realtime Tracks New"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/member/live-events/{event_id}/realtime/renegotiate":{"put":{"tags":["Member – Live Events"],"summary":"Member Realtime Renegotiate","operationId":"member_realtime_renegotiate","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__member_live_events_router__RealtimeProxyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Member Realtime Renegotiate"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/member/live-events/{event_id}/realtime/tracks/close":{"put":{"tags":["Member – Live Events"],"summary":"Member Realtime Tracks Close","operationId":"member_realtime_tracks_close","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routes__member_live_events_router__RealtimeProxyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Member Realtime Tracks Close"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/member/live-events/{event_id}/realtime/media-status":{"put":{"tags":["Member – Live Events"],"summary":"Update Member Realtime Media Status","operationId":"update_member_realtime_media_status","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimeMediaStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Member Realtime Media Status"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/live-token-exchange":{"post":{"tags":["Auth – Live Token"],"summary":"Exchange Token","operationId":"exchange_token","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenExchangeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Exchange Token"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ActivateSlideRequest":{"properties":{"slide_number":{"type":"integer","minimum":1.0,"title":"Slide Number"}},"type":"object","required":["slide_number"],"title":"ActivateSlideRequest"},"AdjustClientCreditsRequest":{"properties":{"mode":{"type":"string","enum":["add","set"],"title":"Mode","description":"add: apply a signed delta; set: set available balance to amount_cad."},"amount_cad":{"type":"number","title":"Amount Cad","description":"For add, positive or negative delta. For set, the target balance (>= 0)."},"note":{"type":"string","maxLength":500,"minLength":1,"title":"Note"}},"type":"object","required":["mode","amount_cad","note"],"title":"AdjustClientCreditsRequest"},"AdjustClientCreditsResponse":{"properties":{"client_id":{"type":"string","title":"Client Id"},"available_balance_cad":{"type":"number","title":"Available Balance Cad"}},"type":"object","required":["client_id","available_balance_cad"],"title":"AdjustClientCreditsResponse"},"AdminInvoiceLineItem":{"properties":{"description":{"type":"string","maxLength":500,"minLength":1,"title":"Description","description":"Line item description that appears on the Stripe invoice."},"quantity":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Quantity","description":"Line item quantity (>= 1)."},"unit_amount":{"type":"number","minimum":0.0,"title":"Unit Amount","description":"Per-unit amount in CAD (e.g. 150.00). Stripe stores cents internally."}},"type":"object","required":["description","quantity","unit_amount"],"title":"AdminInvoiceLineItem"},"AdminInvoiceResponse":{"properties":{"stripe_invoice_id":{"type":"string","title":"Stripe Invoice Id"},"stripe_customer_id":{"type":"string","title":"Stripe Customer Id"},"hosted_invoice_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hosted Invoice Url"},"pdf_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pdf Url"},"status":{"type":"string","title":"Status"},"number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number"},"total":{"type":"number","title":"Total"},"currency":{"type":"string","title":"Currency"}},"type":"object","required":["stripe_invoice_id","stripe_customer_id","hosted_invoice_url","pdf_url","status","number","total","currency"],"title":"AdminInvoiceResponse"},"AdminIssueBundledBlsForCohortResponse":{"properties":{"course_code":{"type":"string","title":"Course Code"},"issued_count":{"type":"integer","title":"Issued Count"},"skipped_count":{"type":"integer","title":"Skipped Count"},"error_count":{"type":"integer","title":"Error Count"},"issued":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Issued"},"errors":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Errors"}},"type":"object","required":["course_code","issued_count","skipped_count","error_count","issued","errors"],"title":"AdminIssueBundledBlsForCohortResponse"},"AdminN95CertificateRow":{"properties":{"id":{"type":"string","title":"Id"},"certificate_number":{"type":"string","title":"Certificate Number"},"fit_test_date":{"type":"string","title":"Fit Test Date"},"mask_model":{"type":"string","title":"Mask Model"},"certified_tester_name":{"type":"string","title":"Certified Tester Name"},"issued_at":{"type":"string","title":"Issued At"},"created_at":{"type":"string","title":"Created At"},"member_issued_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Member Issued At"},"certificate_invoiced":{"type":"boolean","title":"Certificate Invoiced"},"pdf_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pdf Path"},"legacy_certificate_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legacy Certificate Url"},"client_id":{"type":"string","title":"Client Id"},"training_center_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Training Center Id"},"training_center_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Training Center Name"},"participant_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Participant Name"},"participant_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Participant Email"}},"type":"object","required":["id","certificate_number","fit_test_date","mask_model","certified_tester_name","issued_at","created_at","certificate_invoiced","client_id"],"title":"AdminN95CertificateRow"},"AdminN95SearchResponse":{"properties":{"certificates":{"items":{"$ref":"#/components/schemas/AdminN95CertificateRow"},"type":"array","title":"Certificates"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["certificates","total"],"title":"AdminN95SearchResponse"},"AdminN95UpdateRequest":{"properties":{"mask_model":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Mask Model"},"fit_test_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fit Test Date","description":"ISO date YYYY-MM-DD"},"certified_tester_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Certified Tester Name"},"certificate_invoiced":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Certificate Invoiced"},"member_issued_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Member Issued At","description":"ISO datetime for member release"},"clear_member_issued_at":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Clear Member Issued At","description":"When true, clears member_issued_at (hides from member portal)"}},"type":"object","title":"AdminN95UpdateRequest"},"AdminPayment":{"properties":{"id":{"type":"string","title":"Id"},"amount":{"type":"number","title":"Amount"},"amount_refunded":{"type":"number","title":"Amount Refunded"},"currency":{"type":"string","title":"Currency"},"status":{"type":"string","title":"Status"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"receipt_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Url"},"card_brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Card Brand"},"card_last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Card Last4"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"invoice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Id"},"invoice_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Number"},"invoice_hosted_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Hosted Url"},"invoice_pdf_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Pdf Url"},"payment_intent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Intent Id"}},"type":"object","required":["id","amount","amount_refunded","currency","status","description","receipt_url","card_brand","card_last4","created_at","invoice_id","invoice_number","invoice_hosted_url","invoice_pdf_url","payment_intent_id"],"title":"AdminPayment","description":"Mirror of BillingPayment in the member portal -- one row per Stripe Charge."},"AdminPaymentPlanInstallmentInput":{"properties":{"amount":{"type":"number","exclusiveMinimum":0.0,"title":"Amount","description":"Installment amount in CAD (e.g. 250.00)."},"due_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","title":"Due Date","description":"ISO calendar date (YYYY-MM-DD) when this installment is due."}},"type":"object","required":["amount","due_date"],"title":"AdminPaymentPlanInstallmentInput"},"AdminPaymentPlanInstallmentResponse":{"properties":{"id":{"type":"string","title":"Id"},"sequence_number":{"type":"integer","title":"Sequence Number"},"amount":{"type":"number","title":"Amount"},"due_date":{"type":"string","title":"Due Date"},"status":{"type":"string","title":"Status"},"stripe_invoice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Invoice Id"},"hosted_invoice_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hosted Invoice Url"},"invoice_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Number"}},"type":"object","required":["id","sequence_number","amount","due_date","status","stripe_invoice_id","hosted_invoice_url","invoice_number"],"title":"AdminPaymentPlanInstallmentResponse"},"AdminPaymentPlanResponse":{"properties":{"id":{"type":"string","title":"Id"},"client_id":{"type":"string","title":"Client Id"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"total_amount":{"type":"number","title":"Total Amount"},"currency":{"type":"string","title":"Currency"},"status":{"type":"string","title":"Status"},"installments":{"items":{"$ref":"#/components/schemas/AdminPaymentPlanInstallmentResponse"},"type":"array","title":"Installments"}},"type":"object","required":["id","client_id","title","description","total_amount","currency","status","installments"],"title":"AdminPaymentPlanResponse"},"AdminPaymentsResponse":{"properties":{"payments":{"items":{"$ref":"#/components/schemas/AdminPayment"},"type":"array","title":"Payments"}},"type":"object","required":["payments"],"title":"AdminPaymentsResponse"},"AdminRefundResponse":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"charge_id":{"type":"string","title":"Charge Id"},"amount":{"type":"number","title":"Amount"},"currency":{"type":"string","title":"Currency"},"status":{"type":"string","title":"Status"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["id","charge_id","amount","currency","status","reason"],"title":"AdminRefundResponse"},"AdminRegenerateCourseCertificatePdfResponse":{"properties":{"certificate_id":{"type":"string","title":"Certificate Id"},"certificate_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Certificate Number"},"pdf_path":{"type":"string","title":"Pdf Path"}},"type":"object","required":["certificate_id","pdf_path"],"title":"AdminRegenerateCourseCertificatePdfResponse"},"ApplyTagsRequest":{"properties":{"tags":{"items":{"type":"string"},"type":"array","maxItems":10,"minItems":1,"title":"Tags"}},"type":"object","required":["tags"],"title":"ApplyTagsRequest"},"AssignRequest":{"properties":{"assigned_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"}},"type":"object","title":"AssignRequest"},"AutomationRow":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"type":"string","enum":["draft","active","archived"],"title":"Status"},"trigger_type":{"type":"string","title":"Trigger Type"},"trigger_config":{"additionalProperties":true,"type":"object","title":"Trigger Config"},"graph_json":{"additionalProperties":true,"type":"object","title":"Graph Json"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","name","description","status","trigger_type","trigger_config","graph_json","created_by","created_at","updated_at"],"title":"AutomationRow"},"AutomationUpsert":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"trigger_type":{"type":"string","maxLength":80,"minLength":1,"title":"Trigger Type"},"trigger_config":{"additionalProperties":true,"type":"object","title":"Trigger Config"},"graph_json":{"additionalProperties":true,"type":"object","title":"Graph Json"}},"type":"object","required":["name","trigger_type","graph_json"],"title":"AutomationUpsert"},"BillingPayment":{"properties":{"id":{"type":"string","title":"Id"},"amount":{"type":"number","title":"Amount"},"amount_refunded":{"type":"number","title":"Amount Refunded"},"currency":{"type":"string","title":"Currency"},"status":{"type":"string","title":"Status"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"receipt_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Receipt Url"},"card_brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Card Brand"},"card_last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Card Last4"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"invoice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Id"},"invoice_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Number"},"invoice_hosted_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Hosted Url"},"invoice_pdf_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Pdf Url"},"payment_intent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Intent Id"}},"type":"object","required":["id","amount","amount_refunded","currency","status","description","receipt_url","card_brand","card_last4","created_at","invoice_id","invoice_number","invoice_hosted_url","invoice_pdf_url","payment_intent_id"],"title":"BillingPayment","description":"A row in the member's Billing page list."},"BillingPaymentsResponse":{"properties":{"payments":{"items":{"$ref":"#/components/schemas/BillingPayment"},"type":"array","title":"Payments"}},"type":"object","required":["payments"],"title":"BillingPaymentsResponse"},"BroadcastRow":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"subject":{"type":"string","title":"Subject"},"preheader":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preheader"},"design_json":{"title":"Design Json"},"compiled_html":{"type":"string","title":"Compiled Html"},"design_json_dark":{"title":"Design Json Dark"},"compiled_html_dark":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compiled Html Dark"},"recipient_filter":{"additionalProperties":true,"type":"object","title":"Recipient Filter"},"status":{"type":"string","title":"Status"},"recipient_count":{"type":"integer","title":"Recipient Count"},"sent_count":{"type":"integer","title":"Sent Count"},"failed_count":{"type":"integer","title":"Failed Count"},"sent_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sent At"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","name","subject","preheader","design_json","compiled_html","recipient_filter","status","recipient_count","sent_count","failed_count","sent_at","created_by","created_at","updated_at"],"title":"BroadcastRow"},"BroadcastSendResponse":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","status"],"title":"BroadcastSendResponse"},"BroadcastUpsert":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"subject":{"type":"string","maxLength":998,"minLength":1,"title":"Subject"},"preheader":{"anyOf":[{"type":"string","maxLength":150},{"type":"null"}],"title":"Preheader"},"design_json":{"title":"Design Json"},"compiled_html":{"type":"string","maxLength":2000000,"minLength":1,"title":"Compiled Html"},"design_json_dark":{"title":"Design Json Dark"},"compiled_html_dark":{"anyOf":[{"type":"string","maxLength":2000000},{"type":"null"}],"title":"Compiled Html Dark"},"recipient_filter":{"$ref":"#/components/schemas/RecipientFilter"}},"type":"object","required":["name","subject","design_json","compiled_html","recipient_filter"],"title":"BroadcastUpsert"},"CheckEmailPayload":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"CheckEmailPayload"},"CheckEmailResponse":{"properties":{"exists":{"type":"boolean","title":"Exists"},"login_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Login Email"},"sms_available":{"type":"boolean","title":"Sms Available","default":false},"sms_masked":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sms Masked"},"sms_phone_e164":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sms Phone E164"}},"type":"object","required":["exists"],"title":"CheckEmailResponse"},"CheckoutRequest":{"properties":{"kind":{"type":"string","title":"Kind","description":"Billable target kind."},"target_id":{"type":"string","title":"Target Id","description":"UUID of the roster/registration row to pay for."},"success_url":{"type":"string","title":"Success Url","description":"Where Stripe redirects after a successful payment."},"cancel_url":{"type":"string","title":"Cancel Url","description":"Where Stripe redirects if the user cancels."}},"type":"object","required":["kind","target_id","success_url","cancel_url"],"title":"CheckoutRequest","description":"Request body for POST /billing/checkout."},"ClientCreditsResponse":{"properties":{"client_id":{"type":"string","title":"Client Id"},"available_balance_cad":{"type":"number","title":"Available Balance Cad"},"credits":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Credits"}},"type":"object","required":["client_id","available_balance_cad","credits"],"title":"ClientCreditsResponse"},"ClientSmsOptInRequest":{"properties":{"cohort_id":{"type":"string","minLength":1,"title":"Cohort Id"},"sms_opt_in":{"type":"boolean","title":"Sms Opt In"}},"type":"object","required":["cohort_id","sms_opt_in"],"title":"ClientSmsOptInRequest"},"ClientSmsOptInResponse":{"properties":{"client_id":{"type":"string","title":"Client Id"},"sms_opt_in":{"type":"boolean","title":"Sms Opt In"}},"type":"object","required":["client_id","sms_opt_in"],"title":"ClientSmsOptInResponse"},"CohortSmsOptInItem":{"properties":{"client_id":{"type":"string","title":"Client Id"},"sms_opt_in":{"type":"boolean","title":"Sms Opt In"},"has_phone":{"type":"boolean","title":"Has Phone"}},"type":"object","required":["client_id","sms_opt_in","has_phone"],"title":"CohortSmsOptInItem"},"CohortSmsOptInResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CohortSmsOptInItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"CohortSmsOptInResponse"},"ConfirmCreditsPayload":{"properties":{"roster_id":{"type":"string","maxLength":64,"minLength":1,"title":"Roster Id"}},"type":"object","required":["roster_id"],"title":"ConfirmCreditsPayload","description":"Body for ``/confirm-credits`` after the member accepts credit checkout."},"ConfirmCreditsResponse":{"properties":{"fulfilled":{"type":"boolean","title":"Fulfilled"},"roster_id":{"type":"string","title":"Roster Id"},"already_paid":{"type":"boolean","title":"Already Paid","default":false}},"type":"object","required":["fulfilled","roster_id"],"title":"ConfirmCreditsResponse"},"ConfirmPaymentPayload":{"properties":{"client_secret":{"type":"string","maxLength":512,"minLength":20,"title":"Client Secret"}},"type":"object","required":["client_secret"],"title":"ConfirmPaymentPayload","description":"Body for ``/confirm-payment`` after Stripe.js ``confirmPayment`` succeeds."},"ConfirmPaymentResponse":{"properties":{"fulfilled":{"type":"boolean","title":"Fulfilled"},"roster_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Roster Id"},"already_paid":{"type":"boolean","title":"Already Paid","default":false}},"type":"object","required":["fulfilled"],"title":"ConfirmPaymentResponse"},"ContactFormPayload":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Phone"},"subject":{"type":"string","maxLength":200,"minLength":1,"title":"Subject"},"message":{"type":"string","maxLength":5000,"minLength":10,"title":"Message"},"source":{"type":"string","maxLength":80,"title":"Source","default":"website_contact_v1"}},"type":"object","required":["name","email","subject","message"],"title":"ContactFormPayload"},"ContactFormResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"}},"type":"object","required":["ok"],"title":"ContactFormResponse"},"CourseFinderLaunchResponse":{"properties":{"url":{"type":"string","title":"Url","description":"edu course finder URL with short-lived prefill token"}},"type":"object","required":["url"],"title":"CourseFinderLaunchResponse"},"CreateAdminInvoiceRequest":{"properties":{"client_id":{"type":"string","title":"Client Id","description":"UUID of the public.clients row to invoice."},"line_items":{"items":{"$ref":"#/components/schemas/AdminInvoiceLineItem"},"type":"array","maxItems":50,"minItems":1,"title":"Line Items","description":"One or more line items to put on the invoice."},"due_days":{"type":"integer","maximum":365.0,"minimum":0.0,"title":"Due Days","description":"Days until the invoice is due (Stripe `days_until_due`).","default":30},"memo":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Memo","description":"Internal description shown on the hosted invoice."},"footer":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Footer","description":"Footer text printed at the bottom of the invoice PDF."},"auto_advance":{"type":"boolean","title":"Auto Advance","description":"If true, Stripe automatically transitions the invoice through open → past_due → uncollectible without manual intervention.","default":true},"send_now":{"type":"boolean","title":"Send Now","description":"If true, immediately email the customer the hosted-invoice link after finalisation. Set false to leave it as 'open' for manual handling.","default":true}},"type":"object","required":["client_id","line_items"],"title":"CreateAdminInvoiceRequest"},"CreateAdminPaymentPlanRequest":{"properties":{"client_id":{"type":"string","title":"Client Id","description":"UUID of the public.clients row."},"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title","description":"Short label shown on each installment invoice."},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description","description":"Optional memo printed on the Stripe invoices."},"footer":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Footer","description":"Optional footer printed on each installment invoice PDF."},"installments":{"items":{"$ref":"#/components/schemas/AdminPaymentPlanInstallmentInput"},"type":"array","maxItems":24,"minItems":2,"title":"Installments","description":"Two or more installments with amount and due date."},"send_now":{"type":"boolean","title":"Send Now","description":"If true, email the customer each hosted-invoice link as the installment invoices are finalised.","default":true}},"type":"object","required":["client_id","title","installments"],"title":"CreateAdminPaymentPlanRequest"},"CreateEventRequest":{"properties":{"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"cohort_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cohort Id"},"stream_whep_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Whep Url"},"stream_whip_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Whip Url"}},"type":"object","required":["title"],"title":"CreateEventRequest"},"CreateRefundRequest":{"properties":{"charge_id":{"type":"string","maxLength":255,"minLength":1,"title":"Charge Id","description":"Stripe Charge id (`ch_...`) to refund."},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id","description":"Optional UUID of the public.clients row this charge belongs to. When provided the API verifies the charge actually belongs to this client's Stripe customer (defence in depth)."},"amount":{"anyOf":[{"type":"number","minimum":0.01},{"type":"null"}],"title":"Amount","description":"Refund amount in CAD. Omit for a full refund of the remaining balance on the charge."},"reason":{"anyOf":[{"type":"string","enum":["duplicate","fraudulent","requested_by_customer"]},{"type":"null"}],"title":"Reason","description":"Optional Stripe-enumerated reason. Most refunds are 'requested_by_customer'."}},"type":"object","required":["charge_id"],"title":"CreateRefundRequest"},"CreateStudentPayload":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"first_name":{"type":"string","maxLength":80,"minLength":1,"title":"First Name"},"last_name":{"type":"string","maxLength":80,"minLength":1,"title":"Last Name"},"sms_number":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Sms Number"},"professional_designation":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Professional Designation"}},"type":"object","required":["email","first_name","last_name"],"title":"CreateStudentPayload","description":"Body for `POST /admin/users` — create + invite a new member."},"CreateStudentResponse":{"properties":{"user_id":{"type":"string","title":"User Id","description":"public.users.id of the new account."},"email":{"type":"string","title":"Email","description":"Email address the invite was sent to."},"invited":{"type":"boolean","title":"Invited","description":"True when Supabase accepted the invite and an email was queued via the Send Email auth hook (SendGrid). False if the row was created but the welcome email failed to send."}},"type":"object","required":["user_id","email","invited"],"title":"CreateStudentResponse"},"CreditBalanceResponse":{"properties":{"available_balance_cad":{"type":"number","title":"Available Balance Cad"},"credits":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Credits"}},"type":"object","required":["available_balance_cad","credits"],"title":"CreditBalanceResponse"},"EnrollPayload":{"properties":{"course_code":{"type":"string","maxLength":60,"minLength":1,"title":"Course Code"},"success_url":{"type":"string","maxLength":2000,"minLength":1,"title":"Success Url"},"cancel_url":{"type":"string","maxLength":2000,"minLength":1,"title":"Cancel Url"},"embedded":{"type":"boolean","title":"Embedded","default":true},"apply_course_credit":{"type":"boolean","title":"Apply Course Credit","default":true},"sms_number":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Sms Number"},"professional_designation":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Professional Designation"},"first_name":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Last Name"},"private_registration_token":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Private Registration Token"}},"type":"object","required":["course_code","success_url","cancel_url"],"title":"EnrollPayload","description":"Body for `/enroll` (authenticated existing-user flow)."},"EnrollmentRow":{"properties":{"id":{"type":"string","title":"Id"},"automation_id":{"type":"string","title":"Automation Id"},"client_id":{"type":"string","title":"Client Id"},"source_event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Event Id"},"current_node_id":{"type":"string","title":"Current Node Id"},"status":{"type":"string","enum":["active","completed","cancelled","errored"],"title":"Status"},"context":{"additionalProperties":true,"type":"object","title":"Context"},"wakeup_at":{"type":"string","title":"Wakeup At"},"started_at":{"type":"string","title":"Started At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","automation_id","client_id","source_event_id","current_node_id","status","context","wakeup_at","started_at","completed_at","error","created_at","updated_at"],"title":"EnrollmentRow"},"FinalizeDueN95Response":{"properties":{"finalized":{"type":"integer","title":"Finalized"}},"type":"object","required":["finalized"],"title":"FinalizeDueN95Response"},"FinalizeDueSweepResponse":{"properties":{"scanned":{"type":"integer","title":"Scanned"},"finalized":{"type":"integer","title":"Finalized"}},"type":"object","required":["scanned","finalized"],"title":"FinalizeDueSweepResponse"},"ForwardMessageRequest":{"properties":{"to_emails":{"items":{"type":"string"},"type":"array","maxItems":10,"minItems":1,"title":"To Emails"},"note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Note"}},"type":"object","required":["to_emails"],"title":"ForwardMessageRequest"},"FunnelEventPayload":{"properties":{"event_type":{"type":"string","pattern":"^(page_view|login|signup|checkout_started)$","title":"Event Type"},"page_kind":{"anyOf":[{"type":"string","pattern":"^(private|public|edu)$"},{"type":"null"}],"title":"Page Kind"},"course_code":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Course Code"},"user_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"User Id"}},"type":"object","required":["event_type"],"title":"FunnelEventPayload","description":"Best-effort telemetry from registration pages and the checkout API."},"FunnelEventResponse":{"properties":{"recorded":{"type":"boolean","title":"Recorded"}},"type":"object","required":["recorded"],"title":"FunnelEventResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImpersonateMemberResponse":{"properties":{"login_url":{"type":"string","title":"Login Url","description":"One-time magic link; open in a new browser tab."},"member_email":{"type":"string","title":"Member Email","description":"Email of the member account being signed in as."}},"type":"object","required":["login_url","member_email"],"title":"ImpersonateMemberResponse"},"ImpersonateTrainingCenterResponse":{"properties":{"login_url":{"type":"string","title":"Login Url","description":"One-time Supabase magic link; open in a new browser tab."},"impersonated_email":{"type":"string","title":"Impersonated Email","description":"Email of the TC admin account being signed in as."}},"type":"object","required":["login_url","impersonated_email"],"title":"ImpersonateTrainingCenterResponse"},"IssueCertificateResponse":{"properties":{"certificate_id":{"type":"string","title":"Certificate Id"},"certificate_number":{"type":"string","title":"Certificate Number"},"pdf_path":{"type":"string","title":"Pdf Path"},"issued_at":{"type":"string","title":"Issued At"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"member_issued_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Member Issued At"},"pending_member_release":{"type":"boolean","title":"Pending Member Release","default":false},"delete_until":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delete Until"},"mask_edit_until":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mask Edit Until"},"member_download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Member Download Url","description":"Member portal download URL (available after release to member)."}},"type":"object","required":["certificate_id","certificate_number","pdf_path","issued_at"],"title":"IssueCertificateResponse"},"IssueN95CertificateRequest":{"properties":{"participant_client_id":{"type":"string","minLength":1,"title":"Participant Client Id"},"fit_test_date":{"type":"string","title":"Fit Test Date","description":"ISO date (YYYY-MM-DD) of the qualitative fit test."},"mask_model":{"type":"string","maxLength":120,"minLength":1,"title":"Mask Model"},"n95_tester_id":{"type":"string","minLength":1,"title":"N95 Tester Id"},"should_issue":{"type":"boolean","title":"Should Issue","default":true}},"type":"object","required":["participant_client_id","fit_test_date","mask_model","n95_tester_id"],"title":"IssueN95CertificateRequest"},"LiveEventInstructorLinkResponse":{"properties":{"login_url":{"type":"string","title":"Login Url"},"event_id":{"type":"string","title":"Event Id"}},"type":"object","required":["login_url","event_id"],"title":"LiveEventInstructorLinkResponse"},"MemberEmailLookupClient":{"properties":{"id":{"type":"string","title":"Id"},"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"},"display_name":{"type":"string","title":"Display Name"},"sms_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sms Number"},"professional_designation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Professional Designation"}},"type":"object","required":["id","display_name"],"title":"MemberEmailLookupClient"},"MemberEmailLookupRequest":{"properties":{"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"}},"type":"object","required":["email"],"title":"MemberEmailLookupRequest"},"MemberEmailLookupResponse":{"properties":{"exists":{"type":"boolean","title":"Exists"},"client":{"anyOf":[{"$ref":"#/components/schemas/MemberEmailLookupClient"},{"type":"null"}]}},"type":"object","required":["exists"],"title":"MemberEmailLookupResponse"},"MergeMemberAccountsPayload":{"properties":{"primary_user_id":{"type":"string","title":"Primary User Id","description":"Account to keep (auth email + profile)."},"secondary_user_id":{"type":"string","title":"Secondary User Id","description":"Duplicate account to absorb and delete."}},"type":"object","required":["primary_user_id","secondary_user_id"],"title":"MergeMemberAccountsPayload","description":"Merge `secondary_user_id` into `primary_user_id`."},"MergeMemberAccountsResponse":{"properties":{"primary_user_id":{"type":"string","title":"Primary User Id"},"secondary_user_id":{"type":"string","title":"Secondary User Id"},"primary_email":{"type":"string","title":"Primary Email"},"linked_emails":{"items":{"type":"string"},"type":"array","title":"Linked Emails"}},"type":"object","required":["primary_user_id","secondary_user_id","primary_email","linked_emails"],"title":"MergeMemberAccountsResponse"},"MergeVariable":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"title":"Name"},"label":{"type":"string","maxLength":200,"minLength":1,"title":"Label"},"sample_value":{"type":"string","maxLength":50000,"title":"Sample Value","default":""}},"type":"object","required":["name","label"],"title":"MergeVariable","description":"One row in `notification_templates.merge_variables`."},"MessageFollowUpRequest":{"properties":{"follow_up":{"type":"boolean","title":"Follow Up"}},"type":"object","required":["follow_up"],"title":"MessageFollowUpRequest"},"NotificationRow":{"properties":{"id":{"type":"string","title":"Id"},"client_id":{"type":"string","title":"Client Id"},"kind":{"type":"string","title":"Kind"},"channel":{"type":"string","title":"Channel"},"status":{"type":"string","title":"Status"},"recipient_address":{"type":"string","title":"Recipient Address"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"provider_message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Message Id"},"provider_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Status"},"context":{"additionalProperties":true,"type":"object","title":"Context"},"template_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Id"},"scheduled_for":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheduled For"},"sent_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sent At"},"delivered_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivered At"},"failed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failed At"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","client_id","kind","channel","status","recipient_address","created_at"],"title":"NotificationRow","description":"Read-shape for an entry on the per-client notifications history."},"PresenterSlideRequest":{"properties":{"slide_number":{"type":"integer","minimum":1.0,"title":"Slide Number"}},"type":"object","required":["slide_number"],"title":"PresenterSlideRequest"},"ProcessEventsResponse":{"properties":{"enrollments_created":{"type":"integer","title":"Enrollments Created"}},"type":"object","required":["enrollments_created"],"title":"ProcessEventsResponse"},"ProvisionMemberRequest":{"properties":{"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"},"first_name":{"type":"string","maxLength":80,"minLength":1,"title":"First Name"},"last_name":{"type":"string","maxLength":80,"minLength":1,"title":"Last Name"},"password":{"anyOf":[{"type":"string","maxLength":128,"minLength":8},{"type":"null"}],"title":"Password","description":"Optional. When omitted, the server assigns a random password because Supabase requires one for create_user."},"sms_number":{"type":"string","maxLength":20,"minLength":10,"title":"Sms Number"},"professional_designation":{"type":"string","maxLength":20,"minLength":1,"title":"Professional Designation"}},"type":"object","required":["email","first_name","last_name","sms_number","professional_designation"],"title":"ProvisionMemberRequest"},"ProvisionMemberResponse":{"properties":{"client_id":{"type":"string","title":"Client Id"}},"type":"object","required":["client_id"],"title":"ProvisionMemberResponse"},"PushQuestionRequest":{"properties":{"question_text":{"type":"string","minLength":1,"title":"Question Text"},"question_type":{"type":"string","title":"Question Type","default":"free_text"},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options"},"slide_number":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Slide Number"}},"type":"object","required":["question_text"],"title":"PushQuestionRequest"},"RealtimeMediaStatusRequest":{"properties":{"session_id":{"type":"string","title":"Session Id"},"camera_enabled":{"type":"boolean","title":"Camera Enabled","default":false},"mic_enabled":{"type":"boolean","title":"Mic Enabled","default":false},"video_track_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Track Name"},"audio_track_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio Track Name"}},"type":"object","required":["session_id"],"title":"RealtimeMediaStatusRequest"},"RecipientCountResponse":{"properties":{"count":{"type":"integer","title":"Count"}},"type":"object","required":["count"],"title":"RecipientCountResponse"},"RecipientFilter":{"properties":{"type":{"type":"string","enum":["all_clients","cohort","training_center","organization","explicit"],"title":"Type"},"cohort_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cohort Id"},"training_center_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Training Center Id"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id"},"client_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Client Ids"}},"type":"object","required":["type"],"title":"RecipientFilter","description":"Validated mirror of recipientFilterSchema in cha-webapp."},"RegistrationPrefillResponse":{"properties":{"email":{"type":"string","title":"Email"},"first_name":{"type":"string","title":"First Name","default":""},"last_name":{"type":"string","title":"Last Name","default":""},"sms_number":{"type":"string","title":"Sms Number","default":""},"professional_designation":{"type":"string","title":"Professional Designation","default":""}},"type":"object","required":["email"],"title":"RegistrationPrefillResponse","description":"Profile fields for edu registration after cha-mobile handoff."},"RegistrationReceipt":{"properties":{"id":{"type":"string","title":"Id"},"kind":{"type":"string","title":"Kind"},"description":{"type":"string","title":"Description"},"receipt_number":{"type":"string","title":"Receipt Number"},"amount":{"type":"number","title":"Amount"},"credit_applied":{"type":"number","title":"Credit Applied"},"currency":{"type":"string","title":"Currency"},"paid_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paid At"},"pdf_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pdf Path"}},"type":"object","required":["id","kind","description","receipt_number","amount","credit_applied","currency","paid_at","pdf_path"],"title":"RegistrationReceipt","description":"CHA-generated payment receipt for a paid registration."},"RegistrationReceiptsResponse":{"properties":{"receipts":{"items":{"$ref":"#/components/schemas/RegistrationReceipt"},"type":"array","title":"Receipts"}},"type":"object","required":["receipts"],"title":"RegistrationReceiptsResponse"},"ReleaseSeatPayload":{"properties":{"client_secret":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Client Secret"},"roster_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Roster Id"}},"type":"object","title":"ReleaseSeatPayload","description":"Body for `/release-seat` (frees an unpaid roster when the seat-hold timer expires)."},"ReleaseSeatResponse":{"properties":{"released":{"type":"boolean","title":"Released"}},"type":"object","required":["released"],"title":"ReleaseSeatResponse"},"ResendResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"notification_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notification Id"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success","notification_id","status"],"title":"ResendResponse"},"RosterSmsRequest":{"properties":{"message":{"type":"string","maxLength":1600,"minLength":1,"title":"Message"}},"type":"object","required":["message"],"title":"RosterSmsRequest"},"RosterSmsSendResponse":{"properties":{"sent":{"type":"integer","title":"Sent"},"failed":{"type":"integer","title":"Failed"},"skipped":{"type":"integer","title":"Skipped"}},"type":"object","required":["sent","failed","skipped"],"title":"RosterSmsSendResponse"},"SelectLocationRequest":{"properties":{"account_name":{"type":"string","minLength":1,"title":"Account Name"},"location_name":{"type":"string","minLength":1,"title":"Location Name"}},"type":"object","required":["account_name","location_name"],"title":"SelectLocationRequest"},"SendMessageBody":{"properties":{"body":{"type":"string","title":"Body"}},"type":"object","required":["body"],"title":"SendMessageBody"},"SendRegistrationRequest":{"properties":{"roster_id":{"type":"string","format":"uuid","title":"Roster Id"}},"type":"object","required":["roster_id"],"title":"SendRegistrationRequest"},"SignatureRequest":{"properties":{"from_email":{"type":"string","minLength":1,"title":"From Email"},"label":{"type":"string","title":"Label","default":""},"html_signature":{"type":"string","title":"Html Signature","default":""},"plain_text_signature":{"type":"string","title":"Plain Text Signature","default":""},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["from_email"],"title":"SignatureRequest"},"SignupAndCheckoutPayload":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"},"first_name":{"type":"string","maxLength":80,"minLength":1,"title":"First Name"},"last_name":{"type":"string","maxLength":80,"minLength":1,"title":"Last Name"},"sms_number":{"type":"string","maxLength":20,"minLength":10,"title":"Sms Number"},"professional_designation":{"type":"string","maxLength":20,"title":"Professional Designation"},"course_code":{"type":"string","maxLength":60,"minLength":1,"title":"Course Code"},"success_url":{"type":"string","maxLength":2000,"minLength":1,"title":"Success Url"},"cancel_url":{"type":"string","maxLength":2000,"minLength":1,"title":"Cancel Url"},"embedded":{"type":"boolean","title":"Embedded","default":true},"apply_course_credit":{"type":"boolean","title":"Apply Course Credit","default":true},"private_registration_token":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Private Registration Token"}},"type":"object","required":["email","password","first_name","last_name","sms_number","professional_designation","course_code","success_url","cancel_url"],"title":"SignupAndCheckoutPayload","description":"Body for `/signup-and-checkout` (anonymous create + register + pay).\n\nDeprecated — new edu signups verify via email OTP then call `/enroll`."},"SmsSignupPayload":{"properties":{"first_name":{"type":"string","maxLength":80,"minLength":1,"title":"First Name"},"last_name":{"type":"string","maxLength":80,"minLength":1,"title":"Last Name"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"sms_number":{"type":"string","maxLength":20,"minLength":10,"title":"Sms Number"},"sms_opt_in":{"type":"boolean","title":"Sms Opt In"},"email_opt_in":{"type":"boolean","title":"Email Opt In","default":false},"consent_text":{"type":"string","maxLength":4000,"minLength":10,"title":"Consent Text"},"source":{"type":"string","maxLength":80,"title":"Source","default":"web_signup_v1"}},"type":"object","required":["first_name","last_name","sms_number","sms_opt_in","consent_text"],"title":"SmsSignupPayload"},"SmsSignupResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"},"consent_id":{"type":"string","title":"Consent Id"},"matched_existing_client":{"type":"boolean","title":"Matched Existing Client"}},"type":"object","required":["ok","consent_id","matched_existing_client"],"title":"SmsSignupResponse"},"StartSmsRequest":{"properties":{"client_id":{"type":"string","minLength":1,"title":"Client Id"},"body":{"type":"string","maxLength":50000,"minLength":1,"title":"Body"}},"type":"object","required":["client_id","body"],"title":"StartSmsRequest"},"StepRunRow":{"properties":{"id":{"type":"string","title":"Id"},"enrollment_id":{"type":"string","title":"Enrollment Id"},"node_id":{"type":"string","title":"Node Id"},"node_type":{"type":"string","title":"Node Type"},"outcome":{"type":"string","title":"Outcome"},"notification_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notification Id"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"details":{"additionalProperties":true,"type":"object","title":"Details"},"ran_at":{"type":"string","title":"Ran At"}},"type":"object","required":["id","enrollment_id","node_id","node_type","outcome","notification_id","error","details","ran_at"],"title":"StepRunRow"},"SubmitAnswerRequest":{"properties":{"answer_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Answer Text"},"selected_option":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selected Option"}},"type":"object","title":"SubmitAnswerRequest"},"SweepCohortsResponse":{"properties":{"events_emitted":{"type":"integer","title":"Events Emitted"},"cohorts_scanned":{"type":"integer","title":"Cohorts Scanned"}},"type":"object","required":["events_emitted","cohorts_scanned"],"title":"SweepCohortsResponse"},"TemplateCreate":{"properties":{"kind":{"type":"string","maxLength":64,"minLength":1,"title":"Kind"},"channel":{"type":"string","enum":["email","sms","push"],"title":"Channel"},"display_name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Display Name"},"subject":{"anyOf":[{"type":"string","maxLength":998},{"type":"null"}],"title":"Subject"},"preheader":{"anyOf":[{"type":"string","maxLength":150},{"type":"null"}],"title":"Preheader"},"design_json":{"title":"Design Json"},"compiled_html":{"anyOf":[{"type":"string","maxLength":2000000},{"type":"null"}],"title":"Compiled Html"},"design_json_dark":{"title":"Design Json Dark"},"compiled_html_dark":{"anyOf":[{"type":"string","maxLength":2000000},{"type":"null"}],"title":"Compiled Html Dark"},"body_template":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Body Template"},"sendgrid_template_id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Sendgrid Template Id"},"merge_variables":{"items":{"$ref":"#/components/schemas/MergeVariable"},"type":"array","title":"Merge Variables"},"is_active":{"type":"boolean","title":"Is Active","default":true},"is_transactional":{"type":"boolean","title":"Is Transactional","default":false},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"}},"type":"object","required":["kind","channel"],"title":"TemplateCreate","description":"POST body for creating a brand-new template.\n\nChannel-specific validity is checked in the handler (matching what\nthe migration's CHECK constraints enforce, but with a nicer 422 than\nthe raw DB error). Uniqueness on (kind, channel) when is_active=true\nis also enforced in the handler so we surface a friendly 409 to the\nUI instead of a Postgres unique-violation 500."},"TemplateRow":{"properties":{"id":{"type":"string","title":"Id"},"kind":{"type":"string","title":"Kind"},"channel":{"type":"string","title":"Channel"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"sendgrid_template_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sendgrid Template Id"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"preheader":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preheader"},"body_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Template"},"design_json":{"title":"Design Json"},"compiled_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compiled Html"},"design_json_dark":{"title":"Design Json Dark"},"compiled_html_dark":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compiled Html Dark"},"merge_variables":{"items":{"$ref":"#/components/schemas/MergeVariable"},"type":"array","title":"Merge Variables","default":[]},"is_active":{"type":"boolean","title":"Is Active","default":true},"is_transactional":{"type":"boolean","title":"Is Transactional","default":false},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","kind","channel"],"title":"TemplateRow","description":"Read-shape for a notification_templates row."},"TemplateUpdate":{"properties":{"display_name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Display Name"},"subject":{"anyOf":[{"type":"string","maxLength":998},{"type":"null"}],"title":"Subject"},"preheader":{"anyOf":[{"type":"string","maxLength":150},{"type":"null"}],"title":"Preheader"},"design_json":{"title":"Design Json"},"compiled_html":{"anyOf":[{"type":"string","maxLength":2000000},{"type":"null"}],"title":"Compiled Html"},"design_json_dark":{"title":"Design Json Dark"},"compiled_html_dark":{"anyOf":[{"type":"string","maxLength":2000000},{"type":"null"}],"title":"Compiled Html Dark"},"body_template":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Body Template"},"merge_variables":{"anyOf":[{"items":{"$ref":"#/components/schemas/MergeVariable"},"type":"array"},{"type":"null"}],"title":"Merge Variables"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"is_transactional":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Transactional"},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"},"sendgrid_template_id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Sendgrid Template Id"}},"type":"object","title":"TemplateUpdate","description":"PUT body for the template editor.\n\n`subject` is required for email channels; the migration enforces a\nbody, but the subject column is nullable in the schema so this is\nenforced here at the API layer instead."},"TestEnrollRequest":{"properties":{"client_id":{"type":"string","title":"Client Id"}},"type":"object","required":["client_id"],"title":"TestEnrollRequest"},"TestEnrollResponse":{"properties":{"event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Id"}},"type":"object","required":["event_id"],"title":"TestEnrollResponse"},"TestSendRequest":{"properties":{"to_email":{"anyOf":[{"type":"string","maxLength":320,"minLength":3},{"type":"null"}],"title":"To Email"},"to_phone":{"anyOf":[{"type":"string","maxLength":20,"minLength":10},{"type":"null"}],"title":"To Phone"},"sample_overrides":{"additionalProperties":true,"type":"object","title":"Sample Overrides"}},"type":"object","title":"TestSendRequest"},"TestSendResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message Id"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success","message_id","error"],"title":"TestSendResponse"},"TickResponse":{"properties":{"processed":{"type":"integer","title":"Processed"},"completed":{"type":"integer","title":"Completed"},"errored":{"type":"integer","title":"Errored"},"waited":{"type":"integer","title":"Waited"}},"type":"object","required":["processed","completed","errored","waited"],"title":"TickResponse"},"TokenExchangeRequest":{"properties":{"token":{"type":"string","minLength":1,"title":"Token"}},"type":"object","required":["token"],"title":"TokenExchangeRequest"},"TriggerSpecRow":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"},"config_keys":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Config Keys"}},"type":"object","required":["id","label","description","config_keys"],"title":"TriggerSpecRow"},"TwilioStatusResponse":{"properties":{"configured":{"type":"boolean","title":"Configured"},"sender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender"},"webhook_status_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Status Url"}},"type":"object","required":["configured"],"title":"TwilioStatusResponse"},"UpdateEventRequest":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Title"},"stream_whep_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Whep Url"},"stream_whip_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Whip Url"}},"type":"object","title":"UpdateEventRequest"},"UpdateN95MaskRequest":{"properties":{"mask_model":{"type":"string","maxLength":120,"minLength":1,"title":"Mask Model"}},"type":"object","required":["mask_model"],"title":"UpdateN95MaskRequest"},"UpdateN95MaskResponse":{"properties":{"certificate_id":{"type":"string","title":"Certificate Id"},"mask_model":{"type":"string","title":"Mask Model"},"pdf_path":{"type":"string","title":"Pdf Path"}},"type":"object","required":["certificate_id","mask_model","pdf_path"],"title":"UpdateN95MaskResponse"},"UpdateQuestionRequest":{"properties":{"question_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question Text"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"UpdateQuestionRequest"},"UpdateSettingsRequest":{"properties":{"place_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Place Id"},"min_rating_for_google_invite":{"anyOf":[{"type":"integer","maximum":5.0,"minimum":1.0},{"type":"null"}],"title":"Min Rating For Google Invite"},"sync_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sync Enabled"},"maps_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Maps Url"}},"type":"object","title":"UpdateSettingsRequest"},"UpdateStudentPayload":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"first_name":{"type":"string","maxLength":80,"minLength":1,"title":"First Name"},"last_name":{"type":"string","maxLength":80,"minLength":1,"title":"Last Name"},"sms_number":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Sms Number"},"professional_designation":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Professional Designation"}},"type":"object","required":["email","first_name","last_name"],"title":"UpdateStudentPayload","description":"Body for `PATCH /admin/users/{user_id}` — edit member profile fields."},"UpdateStudentResponse":{"properties":{"user_id":{"type":"string","title":"User Id","description":"public.users.id of the updated account."},"email":{"type":"string","title":"Email","description":"Email address now on file for sign-in."}},"type":"object","required":["user_id","email"],"title":"UpdateStudentResponse"},"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"},"VisibilityRequest":{"properties":{"is_visible_on_website":{"type":"boolean","title":"Is Visible On Website"}},"type":"object","required":["is_visible_on_website"],"title":"VisibilityRequest"},"app__routes__admin_conversations_router__ReplyRequest":{"properties":{"body":{"type":"string","maxLength":50000,"minLength":1,"title":"Body"},"html_body":{"anyOf":[{"type":"string","maxLength":50000},{"type":"null"}],"title":"Html Body"},"media_urls":{"items":{"type":"string"},"type":"array","title":"Media Urls"},"cc":{"items":{"type":"string"},"type":"array","maxItems":10,"title":"Cc"}},"type":"object","required":["body"],"title":"ReplyRequest"},"app__routes__admin_course_reviews_ai_router__DraftReplyRequest":{"properties":{"instruction":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Instruction"}},"type":"object","title":"DraftReplyRequest"},"app__routes__admin_google_reviews_router__ReplyRequest":{"properties":{"comment":{"type":"string","maxLength":4096,"minLength":1,"title":"Comment"}},"type":"object","required":["comment"],"title":"ReplyRequest"},"app__routes__automations_router__CancelEnrollmentResponse":{"properties":{"cancelled":{"type":"integer","title":"Cancelled"}},"type":"object","required":["cancelled"],"title":"CancelEnrollmentResponse"},"app__routes__billing_router__CheckoutResponse":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"CheckoutResponse"},"app__routes__member_credits_router__CancelEnrollmentResponse":{"properties":{"roster_id":{"type":"string","title":"Roster Id"},"status":{"type":"string","title":"Status"},"credit_issued_cad":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Credit Issued Cad"},"credit_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credit Id"}},"type":"object","required":["roster_id","status"],"title":"CancelEnrollmentResponse"},"app__routes__member_live_events_router__RealtimeProxyRequest":{"properties":{"session_id":{"type":"string","title":"Session Id"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"}},"type":"object","required":["session_id","payload"],"title":"RealtimeProxyRequest"},"app__routes__member_live_events_router__SendMessageRequest":{"properties":{"body":{"type":"string","maxLength":2000,"minLength":1,"title":"Body"}},"type":"object","required":["body"],"title":"SendMessageRequest"},"app__routes__public_cohort_registration_router__CheckoutResponse":{"properties":{"checkout_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkout Url"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"},"user_id":{"type":"string","title":"User Id"},"roster_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Roster Id"},"payment_required":{"type":"boolean","title":"Payment Required","default":true},"course_price_cad":{"type":"number","title":"Course Price Cad","default":0},"credit_applied_cad":{"type":"number","title":"Credit Applied Cad","default":0},"amount_due_cad":{"type":"number","title":"Amount Due Cad","default":0},"available_credit_balance_cad":{"type":"number","title":"Available Credit Balance Cad","default":0}},"type":"object","required":["user_id"],"title":"CheckoutResponse","description":"Hosted Checkout returns ``checkout_url``; on-page pay returns PaymentIntent ``client_secret``."},"app__routes__training_centers_router__ReconcilePaymentResponse":{"properties":{"roster_id":{"type":"string","title":"Roster Id"},"reconciled":{"type":"boolean","title":"Reconciled"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"payment_intent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Intent Id"}},"type":"object","required":["roster_id","reconciled"],"title":"ReconcilePaymentResponse"},"app__routes__training_centers_router__SendRegistrationResponse":{"properties":{"roster_id":{"type":"string","title":"Roster Id"},"sent":{"type":"boolean","title":"Sent"}},"type":"object","required":["roster_id","sent"],"title":"SendRegistrationResponse"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}