{"openapi":"3.1.0","info":{"title":"VerifyAI Main API","description":"Main API service for VerifyAI medical equipment inspection system","version":"2.56.7"},"paths":{"/api/v1/companies/list":{"get":{"tags":["companies"],"summary":"Get Companies List","description":"Get list of companies that the user has access to","operationId":"get_companies_list_api_v1_companies_list_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CompanyList"},"type":"array","title":"Response Get Companies List Api V1 Companies List Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/companies/{company_id}/info":{"get":{"tags":["companies"],"summary":"Get Company Info","description":"Get detailed information about a company including departments and devices","operationId":"get_company_info_api_v1_companies__company_id__info_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/companies/{company_id}":{"delete":{"tags":["companies"],"summary":"Delete Company","description":"Delete a company (only accessible to system admins and network admins)","operationId":"delete_company_api_v1_companies__company_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["companies"],"summary":"Update Company","description":"Update company details (available for system-admins, network admins, and company admins)","operationId":"update_company_api_v1_companies__company_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/companies/new":{"post":{"tags":["companies"],"summary":"Create Company","description":"Create a new company. Allowed for system-admins, network-admins, and a\nstandalone self-registered company-admin (no parent company yet) bootstrapping\ntheir own company.","operationId":"create_company_api_v1_companies_new_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/companies/{company_id}/devices":{"get":{"tags":["companies"],"summary":"Get Company Devices","description":"Get all hardware devices for a specific company","operationId":"get_company_devices_api_v1_companies__company_id__devices_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HardwareDeviceInfo"},"title":"Response Get Company Devices Api V1 Companies  Company Id  Devices Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/companies/{company_id}/departments":{"get":{"tags":["companies"],"summary":"Get Company Departments","description":"Get all active departments for a specific company","operationId":"get_company_departments_api_v1_companies__company_id__departments_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentInfo"},"title":"Response Get Company Departments Api V1 Companies  Company Id  Departments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/departments/new":{"post":{"tags":["departments"],"summary":"Create Department","description":"Create a new department in a company that the user has access to","operationId":"create_department_api_v1_departments_new_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepartmentCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepartmentCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/departments/{department_id}":{"put":{"tags":["departments"],"summary":"Update Department","description":"Update department information (available for system-admins, network admins, and company admins)","operationId":"update_department_api_v1_departments__department_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"department_id","in":"path","required":true,"schema":{"type":"integer","title":"Department Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepartmentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepartmentUpdateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["departments"],"summary":"Delete Department","description":"Delete a department (available for system-admins, network admins, and company admins)","operationId":"delete_department_api_v1_departments__department_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"department_id","in":"path","required":true,"schema":{"type":"integer","title":"Department Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/licenses/{company_id}":{"get":{"tags":["licenses"],"summary":"Get Company Licenses","description":"Every license this company owns, live or lapsed, latest expiry first.\n\nLapsed and revoked licenses are included rather than filtered out: \"we thought we still had\nthat one\" is the most common reason anyone opens this page, and a renewal conversation\nstarts from seeing the row.\n\nOne query for the whole list — the device a license sits on is outer-joined rather than\nlooked up per row, because a distributor with a few hundred licenses would otherwise pay\nfor a few hundred round trips to render one table.","operationId":"get_company_licenses_api_v1_licenses__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}},{"name":"license_type","in":"query","required":false,"schema":{"anyOf":[{"enum":["device","user"],"type":"string"},{"type":"null"}],"description":"Filter to device or user licenses. Omit to get both.","title":"License Type"},"description":"Filter to device or user licenses. Omit to get both."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LicenseInfo"},"title":"Response Get Company Licenses Api V1 Licenses  Company Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/licenses/{company_id}/seat-pools":{"get":{"tags":["licenses"],"summary":"Get Company Seat Pools","description":"The company's user-license pools and who is sitting in them right now.\n\nA pool exists for every user bundle the company has ever bought on, including one whose\nlicenses have all lapsed — that shows as capacity 0, which is the useful thing to see. The\ncounting rules themselves come from `verifyai_db.seats`, the same code the acquire path\nuses, so this can never report a capacity the Inspector would not honour.","operationId":"get_company_seat_pools_api_v1_licenses__company_id__seat_pools_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SeatPoolInfo"},"title":"Response Get Company Seat Pools Api V1 Licenses  Company Id  Seat Pools Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/subscriptions/{company_id}":{"get":{"tags":["subscriptions"],"summary":"Get Company Subscriptions","description":"DEPRECATED — use GET /api/v1/licenses/{company_id} instead.\n\nSubscription information for a company (system-admins, network admins, company admins).","operationId":"get_company_subscriptions_api_v1_subscriptions__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionInfo"},"title":"Response Get Company Subscriptions Api V1 Subscriptions  Company Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/videos/{company_id}/filter-options":{"get":{"tags":["videos"],"summary":"Get Company Video Filter Options","description":"Get filter options for videos in a company - aggregated data for dropdowns and filters","operationId":"get_company_video_filter_options_api_v1_videos__company_id__filter_options_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}},{"name":"time_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter videos from this date (YYYY-MM-DD or ISO datetime format)","title":"Time From"},"description":"Filter videos from this date (YYYY-MM-DD or ISO datetime format)"},{"name":"time_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter videos to this date (YYYY-MM-DD or ISO datetime format)","title":"Time To"},"description":"Filter videos to this date (YYYY-MM-DD or ISO datetime format)"},{"name":"rep_man","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Manual reports filter: '1' to show only videos with manual reports","title":"Rep Man"},"description":"Manual reports filter: '1' to show only videos with manual reports"},{"name":"rep_ai","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"AI reports filter: '1' to show only videos with AI reports","title":"Rep Ai"},"description":"AI reports filter: '1' to show only videos with AI reports"},{"name":"recorded_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of user names who recorded videos","title":"Recorded By"},"description":"Comma-separated list of user names who recorded videos"},{"name":"generated_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of user names who generated reports","title":"Generated By"},"description":"Comma-separated list of user names who generated reports"},{"name":"device_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of device types","title":"Device Type"},"description":"Comma-separated list of device types"},{"name":"endosc_prod","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of equipment producers","title":"Endosc Prod"},"description":"Comma-separated list of equipment producers"},{"name":"endosc_model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of equipment models","title":"Endosc Model"},"description":"Comma-separated list of equipment models"},{"name":"endosc_serial","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of equipment serials","title":"Endosc Serial"},"description":"Comma-separated list of equipment serials"},{"name":"endosc_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of endoscope types from special_info (preset/legacy_preset values)","title":"Endosc Type"},"description":"Comma-separated list of endoscope types from special_info (preset/legacy_preset values)"},{"name":"cont_spec","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of contamination specifications","title":"Cont Spec"},"description":"Comma-separated list of contamination specifications"},{"name":"customer","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of company names","title":"Customer"},"description":"Comma-separated list of company names"},{"name":"hw_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of hardware device aliases","title":"Hw Id"},"description":"Comma-separated list of hardware device aliases"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/videos/{company_id}":{"get":{"tags":["videos"],"summary":"Get Company Videos","description":"Get paginated list of videos for a company with filtering","operationId":"get_company_videos_api_v1_videos__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}},{"name":"time_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter videos from this date (YYYY-MM-DD or ISO datetime format)","title":"Time From"},"description":"Filter videos from this date (YYYY-MM-DD or ISO datetime format)"},{"name":"time_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter videos to this date (YYYY-MM-DD or ISO datetime format)","title":"Time To"},"description":"Filter videos to this date (YYYY-MM-DD or ISO datetime format)"},{"name":"rep_man","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Manual reports filter: '1' to show only videos with manual reports","title":"Rep Man"},"description":"Manual reports filter: '1' to show only videos with manual reports"},{"name":"rep_ai","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"AI reports filter: '1' to show only videos with AI reports","title":"Rep Ai"},"description":"AI reports filter: '1' to show only videos with AI reports"},{"name":"recorded_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of user names who recorded videos","title":"Recorded By"},"description":"Comma-separated list of user names who recorded videos"},{"name":"generated_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of user names who generated reports","title":"Generated By"},"description":"Comma-separated list of user names who generated reports"},{"name":"device_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of device types","title":"Device Type"},"description":"Comma-separated list of device types"},{"name":"endosc_prod","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of equipment producers","title":"Endosc Prod"},"description":"Comma-separated list of equipment producers"},{"name":"endosc_model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of equipment models","title":"Endosc Model"},"description":"Comma-separated list of equipment models"},{"name":"endosc_serial","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of equipment serials","title":"Endosc Serial"},"description":"Comma-separated list of equipment serials"},{"name":"endosc_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of endoscope types from special_info (preset/legacy_preset values)","title":"Endosc Type"},"description":"Comma-separated list of endoscope types from special_info (preset/legacy_preset values)"},{"name":"cont_spec","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of contamination specifications","title":"Cont Spec"},"description":"Comma-separated list of contamination specifications"},{"name":"customer","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of company names","title":"Customer"},"description":"Comma-separated list of company names"},{"name":"hw_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of hardware device aliases","title":"Hw Id"},"description":"Comma-separated list of hardware device aliases"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideosPaginatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/videos/{company_id}/optimized":{"get":{"tags":["videos"],"summary":"Get Company Videos Optimized","description":"OPTIMIZED: Get paginated videos for a company using database views\n60-70% faster than standard endpoint due to pre-joined data","operationId":"get_company_videos_optimized_api_v1_videos__company_id__optimized_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (1-based)","default":1,"title":"Page"},"description":"Page number (1-based)"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page","default":20,"title":"Page Size"},"description":"Items per page"},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Filter videos from this date","title":"Date From"},"description":"Filter videos from this date"},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Filter videos to this date","title":"Date To"},"description":"Filter videos to this date"},{"name":"has_manual_reports","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by manual reports presence","title":"Has Manual Reports"},"description":"Filter by manual reports presence"},{"name":"has_ai_reports","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by AI reports presence","title":"Has Ai Reports"},"description":"Filter by AI reports presence"},{"name":"equipment_types","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated equipment types","title":"Equipment Types"},"description":"Comma-separated equipment types"},{"name":"producers","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated producers","title":"Producers"},"description":"Comma-separated producers"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/videos/stream/url/{wt_wo}/{video_id}":{"get":{"tags":["videos"],"summary":"Get Video Signed Url","description":"Return a signed GCS URL for a video as JSON (no redirect).\n\nIdentical auth/access logic to /stream/{wt_wo}/{video_id} but returns\n{\"url\": \"<signed-url>\"} so the browser can set <video src> directly,\navoiding the Origin: null problem that arises when following a 302\ncross-origin redirect.","operationId":"get_video_signed_url_api_v1_videos_stream_url__wt_wo___video_id__get","parameters":[{"name":"wt_wo","in":"path","required":true,"schema":{"type":"string","title":"Wt Wo"}},{"name":"video_id","in":"path","required":true,"schema":{"type":"integer","title":"Video Id"}},{"name":"token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Legacy: JWT token for authentication","title":"Token"},"description":"Legacy: JWT token for authentication"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Bearer token","title":"Authorization"},"description":"Bearer token"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/videos/stream/{wt_wo}/{video_id}":{"get":{"tags":["videos"],"summary":"Stream Video","description":"Stream a video file via signed URL redirect\n\nSupports two authentication methods:\n1. Bearer token in Authorization header (current)\n2. Legacy: token query parameter (?token=...)\n\nArgs:\n    wt_wo: 'wt' for processed video (google_bucket_processed_path) \n           or 'wo' for original video (google_bucket_path)\n    video_id: ID of the video to stream\n    token: Optional query parameter for legacy authentication\n\nReturns:\n    RedirectResponse to signed GCS URL","operationId":"stream_video_api_v1_videos_stream__wt_wo___video_id__get","parameters":[{"name":"wt_wo","in":"path","required":true,"schema":{"type":"string","title":"Wt Wo"}},{"name":"video_id","in":"path","required":true,"schema":{"type":"integer","title":"Video Id"}},{"name":"token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Legacy: JWT token for authentication","title":"Token"},"description":"Legacy: JWT token for authentication"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Bearer token","title":"Authorization"},"description":"Bearer token"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/videos/{video_id}/alerts":{"get":{"tags":["videos"],"summary":"Get Video Alerts","description":"ALERTs a technician raised during this video's inspection (VER-1413).\n\nMatched by video_id, recording file name or the recording window; see\napp/video_alerts.py. position_s is seconds into the video, for the Device\nmap; null when it cannot be placed.","operationId":"get_video_alerts_api_v1_videos__video_id__alerts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"integer","title":"Video Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoAlertsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/medical_equipment/{video_id}/used":{"get":{"tags":["medical_equipment"],"summary":"Get Medical Equipment Used For Video","description":"Get information about the medical equipment used to record a specific video\n\nReturns detailed information about:\n- Video recording parameters (fps, record_mode, record_speed, led_brightness)\n- Hardware device used (alias/hw_id)\n- Recording metadata (recorded by user, recording datetime)\n- Medical equipment details (endoscope info, producer, model, serial, length, owner, type)\n\nResponse format matches the expected structure with endoscope object containing\nall equipment-specific information and owner details.\n\nAccess control: User must have access to the company that owns the video\n\nNote: If FPS is 0 in the database, this endpoint will automatically download the video\nfrom GCS, extract the FPS using OpenCV, update the database, and return the correct value.","operationId":"get_medical_equipment_used_for_video_api_v1_medical_equipment__video_id__used_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"integer","title":"Video Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/medical_equipment/{medical_equipment_id}/history":{"get":{"tags":["medical_equipment"],"summary":"Get Medical Equipment History","description":"Get history of all videos recorded with a specific medical equipment and their reports","operationId":"get_medical_equipment_history_api_v1_medical_equipment__medical_equipment_id__history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"medical_equipment_id","in":"path","required":true,"schema":{"type":"integer","title":"Medical Equipment Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Maximum number of videos to return","default":50,"title":"Limit"},"description":"Maximum number of videos to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of videos to skip","default":0,"title":"Offset"},"description":"Number of videos to skip"},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Filter videos from this date","title":"Date From"},"description":"Filter videos from this date"},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Filter videos until this date","title":"Date To"},"description":"Filter videos until this date"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/docs/{app_web}/{doc_type}":{"get":{"tags":["docs"],"summary":"Get Document","description":"Get a PDF document from Google Cloud Storage and return it as base64 encoded string.\n\nArgs:\n    app_web (str): Application web identifier (e.g., 'admin', 'mobile', 'web')\n    doc_type (str): Document type/name (e.g., 'user_manual', 'privacy_policy')\n    current_user (AuthUser): Authenticated user (required)\n\nReturns:\n    Dict containing base64 encoded PDF string\n    \nRaises:\n    HTTPException: \n        - 404 if document is not found\n        - 500 if there are issues accessing Google Cloud Storage\n        - 401 if user is not authenticated","operationId":"get_document_api_v1_docs__app_web___doc_type__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"app_web","in":"path","required":true,"schema":{"type":"string","title":"App Web"}},{"name":"doc_type","in":"path","required":true,"schema":{"type":"string","title":"Doc Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Get Document Api V1 Docs  App Web   Doc Type  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/docs/{app_web}/{doc_type}/info":{"get":{"tags":["docs"],"summary":"Get Document Info","description":"Get information about a document without downloading its content.\n\nArgs:\n    app_web (str): Application web identifier\n    doc_type (str): Document type/name\n    current_user (AuthUser): Authenticated user (required)\n\nReturns:\n    Dict containing document metadata","operationId":"get_document_info_api_v1_docs__app_web___doc_type__info_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"app_web","in":"path","required":true,"schema":{"type":"string","title":"App Web"}},{"name":"doc_type","in":"path","required":true,"schema":{"type":"string","title":"Doc Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Document Info Api V1 Docs  App Web   Doc Type  Info Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/docs/faq":{"get":{"tags":["docs"],"summary":"Get Faq","description":"Get FAQ (Frequently Asked Questions) content from Google Docs.\n\nThe FAQ content is fetched from a Google Doc and cached for 1 hour.\nThe response includes categories with questions and answers, supporting\nrich text formatting (bold, italic, underline, links).\n\nArgs:\n    current_user (AuthUser): Authenticated user (required)\n\nReturns:\n    FAQResponse: Structured FAQ data with categories, items, and formatting\n    \nRaises:\n    HTTPException:\n        - 500 if there are issues accessing Google Docs API\n        - 401 if user is not authenticated","operationId":"get_faq_api_v1_docs_faq_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FAQResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/upload_videos/register_video":{"post":{"tags":["upload_videos"],"summary":"Register Video","description":"Register video details before upload - creates/updates device, medical equipment, and video record","operationId":"register_video_api_v1_upload_videos_register_video_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterVideoRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterVideoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/upload_videos/{video_id}/upload-url":{"get":{"tags":["upload_videos"],"summary":"Get Upload Url","description":"Return a GCS resumable upload session URL so the client can upload\nthe video file directly to GCS (bypassing Cloud Run's 32 MB request limit).","operationId":"get_upload_url_api_v1_upload_videos__video_id__upload_url_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"integer","title":"Video Id"}},{"name":"content_type","in":"query","required":false,"schema":{"type":"string","default":"video/mp4","title":"Content Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/upload_videos/{video_id}/confirm":{"post":{"tags":["upload_videos"],"summary":"Confirm Video Upload","description":"Called by the client after a direct-to-GCS upload completes.\nVerifies the object is actually in the bucket, then updates the video\nstatus and queues it for processing.","operationId":"confirm_video_upload_api_v1_upload_videos__video_id__confirm_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"integer","title":"Video Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports/{report_id}/download":{"get":{"tags":["reports"],"summary":"Download Report","description":"Get signed download URL for a report PDF","operationId":"download_report_api_v1_reports__report_id__download_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportDownloadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports/{report_id}/frames":{"get":{"tags":["reports"],"summary":"Get Report Frames","description":"Get bounding box detections for a report grouped by frame number\n\nSupports dynamic label filtering via query parameters.\nExample: GET /reports/123/frames?contamination_dirt=false&damage_crack=false\n\nWhen a label filter is set to false, all detections with that label will be excluded.\nMultiple filters can be applied simultaneously.\n\nSeverity filtering:\n    ?severity=high,medium         -> only these severity levels (absent = all)\n    ?severity_mode=object         -> filter by each object's MAX severity across\n                                     frames (default; keeps escalating objects whole)\n    ?severity_mode=detection      -> filter each bounding box by its own severity","operationId":"get_report_frames_api_v1_reports__report_id__frames_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportFramesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports/{report_id}":{"delete":{"tags":["reports"],"summary":"Delete Report","description":"Delete a report and all related data (system/network admin only)","operationId":"delete_report_api_v1_reports__report_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports/{report_id}/download-package":{"post":{"tags":["reports"],"summary":"Initiate Download Package","description":"Initiate background download package creation for a report with all images and bounding boxes","operationId":"initiate_download_package_api_v1_reports__report_id__download_package_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}},{"name":"include_video","in":"query","required":false,"schema":{"type":"boolean","description":"Whether to include the original video file in the download package","default":false,"title":"Include Video"},"description":"Whether to include the original video file in the download package"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadPackageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports/download-job/{job_id}/status":{"get":{"tags":["reports"],"summary":"Check Download Job Status","description":"Check status of download job and get download URL when completed","operationId":"check_download_job_status_api_v1_reports_download_job__job_id__status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadJobStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports/{video_id}/{source}":{"post":{"tags":["reports"],"summary":"Create Report","description":"Create a new report and queue it for PDF generation","operationId":"create_report_api_v1_reports__video_id___source__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"integer","title":"Video Id"}},{"name":"source","in":"path","required":true,"schema":{"type":"integer","title":"Source"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReportRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reports/{company_id}/get_tags":{"get":{"tags":["reports"],"summary":"Get Company Tags","description":"Get unique tags used in reports for a specific company","operationId":"get_company_tags_api_v1_reports__company_id__get_tags_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Response Get Company Tags Api V1 Reports  Company Id  Get Tags Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/draft-reports/{video_id}/save":{"post":{"tags":["draft-reports"],"summary":"Save Draft Report","description":"Save a draft report with detection frames","operationId":"save_draft_report_api_v1_draft_reports__video_id__save_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"integer","title":"Video Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftReportSaveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftReportSaveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/draft-reports/{report_id}/delete":{"delete":{"tags":["draft-reports"],"summary":"Delete Draft Report","description":"Delete a draft report (only by the user who created it)","operationId":"delete_draft_report_api_v1_draft_reports__report_id__delete_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"integer","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/offline/check-actions":{"post":{"tags":["offline-sync"],"summary":"Check Actions File","description":"Check if an actions.csv file has been processed before and extract video filenames.\n\nReturns:\n- If hash exists in DB: {\"actions_processed\": true}\n- If new file: {\"actions_processed\": false, \"files\": [\"file1.mp4\", \"file2.mp4\", ...]}\n\nThe endpoint:\n1. Calculates hash of the actions.csv file\n2. Checks if this hash exists in the database\n3. If new, extracts video filenames from the CSV\n4. Filters out filenames that already exist in the database for the company","operationId":"check_actions_file_api_v1_offline_check_actions_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_check_actions_file_api_v1_offline_check_actions_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/offline/check-duplicate/{csv_hash}":{"get":{"tags":["offline-sync"],"summary":"Check Duplicate Dump","description":"Check if a dump with this actions.csv hash already exists\nReturns existing dump info if found","operationId":"check_duplicate_dump_api_v1_offline_check_duplicate__csv_hash__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"csv_hash","in":"path","required":true,"schema":{"type":"string","title":"Csv Hash"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/offline/upload":{"post":{"tags":["offline-sync"],"summary":"Upload Offline Dump","description":"Phase 1: Upload offline dump files to temporary GCS storage\n\nExpected files:\n- actions.csv (required)\n- .vid files (JSON metadata for videos)\n- .rep files (JSON metadata for reports)\n- .mp4 files (actual video files)\n\nOptional: device_dump_id (UUID generated by device)\n\nReturns dump_id for subsequent processing\n\nNote: The authentication token from the request is stored for later use\nin background processing (e.g., calling authentication API for user creation)","operationId":"upload_offline_dump_api_v1_offline_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_offline_dump_api_v1_offline_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfflineDumpResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/offline/dumps":{"get":{"tags":["offline-sync"],"summary":"List Offline Dumps","description":"List offline dumps with optional filtering","operationId":"list_offline_dumps_api_v1_offline_dumps_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/OfflineDumpStatus"},{"type":"null"}],"title":"Status"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfflineDumpListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/offline/dumps/{dump_id}":{"get":{"tags":["offline-sync"],"summary":"Get Offline Dump Details","description":"Get detailed information about an offline dump including actions and ID mappings","operationId":"get_offline_dump_details_api_v1_offline_dumps__dump_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"dump_id","in":"path","required":true,"schema":{"type":"integer","title":"Dump Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfflineDumpDetailedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/offline/process/{dump_id}":{"post":{"tags":["offline-sync"],"summary":"Process Offline Dump","description":"Phase 2: Process offline dump actions sequentially\n\nThis endpoint triggers background processing of all actions in the dump.\nProcessing is done in sequence according to action order in CSV.\n\nThe authentication token from this request is used for any API calls\nduring processing (e.g., calling authentication API for user creation).","operationId":"process_offline_dump_api_v1_offline_process__dump_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"dump_id","in":"path","required":true,"schema":{"type":"integer","title":"Dump Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfflineProcessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/offline/retry/{dump_id}":{"post":{"tags":["offline-sync"],"summary":"Retry Failed Dump","description":"Retry processing a failed or partially completed dump\n\nOnly pending and failed actions will be retried.\nCompleted actions will be skipped.\n\nThe authentication token from this request is used for any API calls\nduring processing (e.g., calling authentication API for user creation).","operationId":"retry_failed_dump_api_v1_offline_retry__dump_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"dump_id","in":"path","required":true,"schema":{"type":"integer","title":"Dump Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfflineProcessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/offline/device/{device_id}/history":{"get":{"tags":["offline-sync"],"summary":"Get Device Dump History","description":"Get all dumps uploaded from a specific device\nUseful for identifying continuation dumps and patterns","operationId":"get_device_dump_history_api_v1_offline_device__device_id__history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"integer","title":"Device Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/OfflineDumpStatus"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/offline/device/{device_id}/incomplete":{"get":{"tags":["offline-sync"],"summary":"Get Device Incomplete Dumps","description":"Get incomplete dumps from a device (uploaded but not fully processed)\nHelps identify dumps that need attention or retry","operationId":"get_device_incomplete_dumps_api_v1_offline_device__device_id__incomplete_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"integer","title":"Device Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/offline/company/{company_id}/related-dumps/{dump_id}":{"get":{"tags":["offline-sync"],"summary":"Find Related Dumps","description":"Find dumps from the same company/device that are likely related\n(continuation dumps, overlapping time ranges, etc.)","operationId":"find_related_dumps_api_v1_offline_company__company_id__related_dumps__dump_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}},{"name":"dump_id","in":"path","required":true,"schema":{"type":"integer","title":"Dump Id"}},{"name":"time_window_hours","in":"query","required":false,"schema":{"type":"integer","default":48,"title":"Time Window Hours"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/offline/dumps/{dump_id}/summary":{"get":{"tags":["offline-sync"],"summary":"Get Dump Processing Summary","description":"Get detailed processing summary for a dump\n\nReturns comprehensive information about what was processed:\n- Overall dump status and statistics\n- Action-by-action results with created entity IDs\n- UUID to database ID mappings\n- Failed actions with error messages","operationId":"get_dump_processing_summary_api_v1_offline_dumps__dump_id__summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"dump_id","in":"path","required":true,"schema":{"type":"integer","title":"Dump Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/offline/stats/company/{company_id}":{"get":{"tags":["offline-sync"],"summary":"Get Company Offline Sync Stats","description":"Get offline sync statistics for a company","operationId":"get_company_offline_sync_stats_api_v1_offline_stats_company__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/offline/firmware-download":{"get":{"tags":["offline-sync"],"summary":"Download Firmware Update","description":"Download the latest firmware release from GitHub as a password-protected ZIP file.\n\nPassword is generated based on company's hardware IDs combined with base password.\nAny authenticated user can download the firmware.\nDownloads are logged for audit purposes.\n\nReturns:\n    StreamingResponse: Password-protected ZIP file containing the latest firmware release","operationId":"download_firmware_update_api_v1_offline_firmware_download_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/offline/company-snapshot":{"get":{"tags":["offline-sync"],"summary":"Get Company Snapshot","description":"Get comprehensive database snapshot of all entities for the user's company.\n\nReturns current state information about:\n- All users for the company\n- All medical equipment for the company\n- Equipment owners (companies/departments)\n\nThis endpoint helps devices sync their local database with the online system.\nCreates a snapshot of the database state at the time of the request.","operationId":"get_company_snapshot_api_v1_offline_company_snapshot_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/recordings/create":{"post":{"tags":["recordings"],"summary":"Create Recording","description":"Create a new recording session and generate signed upload URL for GCS.\n\nThis endpoint:\n1. Validates user access to company and medical equipment\n2. Creates a new video record in the database\n3. Generates a GCS resumable upload URL\n4. Returns the recording ID and upload URL to the frontend","operationId":"create_recording_api_v1_recordings_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRecordingRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRecordingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/recordings/{recording_id}/finalize":{"post":{"tags":["recordings"],"summary":"Finalize Recording","description":"Finalize a recording after upload is complete.\n\nThis endpoint:\n1. Verifies the video file exists in GCS\n2. Updates video metadata (file size, duration, status)\n3. Marks the recording as completed","operationId":"finalize_recording_api_v1_recordings__recording_id__finalize_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"recording_id","in":"path","required":true,"schema":{"type":"integer","title":"Recording Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeRecordingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeRecordingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/activity/company/{company_id}/summary":{"get":{"tags":["activity"],"summary":"Get Activity Summary","description":"Headline weekly-activity numbers for a single company.","operationId":"get_activity_summary_api_v1_activity_company__company_id__summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":366,"minimum":1,"description":"Rolling window length in days","default":7,"title":"Days"},"description":"Rolling window length in days"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivitySummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/activity/company/{company_id}/by-inspector":{"get":{"tags":["activity"],"summary":"Get Activity By Inspector","description":"Per-user inspection counts for the window.","operationId":"get_activity_by_inspector_api_v1_activity_company__company_id__by_inspector_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":366,"minimum":1,"default":7,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InspectorActivity"},"title":"Response Get Activity By Inspector Api V1 Activity Company  Company Id  By Inspector Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/activity/company/{company_id}/by-report-author":{"get":{"tags":["activity"],"summary":"Get Activity By Report Author","description":"Per-user report-creation counts for the window.","operationId":"get_activity_by_report_author_api_v1_activity_company__company_id__by_report_author_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":366,"minimum":1,"default":7,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportAuthorActivity"},"title":"Response Get Activity By Report Author Api V1 Activity Company  Company Id  By Report Author Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/activity/company/{company_id}/by-device":{"get":{"tags":["activity"],"summary":"Get Activity By Device","description":"Per-hardware-device inspection counts for the window.","operationId":"get_activity_by_device_api_v1_activity_company__company_id__by_device_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":366,"minimum":1,"default":7,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeviceActivity"},"title":"Response Get Activity By Device Api V1 Activity Company  Company Id  By Device Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/activity/company/{company_id}/by-endoscope":{"get":{"tags":["activity"],"summary":"Get Activity By Endoscope","description":"Per-endoscope inspection counts for the window.","operationId":"get_activity_by_endoscope_api_v1_activity_company__company_id__by_endoscope_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","title":"Company Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":366,"minimum":1,"default":7,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EndoscopeActivity"},"title":"Response Get Activity By Endoscope Api V1 Activity Company  Company Id  By Endoscope Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/distributors":{"get":{"tags":["onboarding"],"summary":"List Distributors","description":"Distributors a case can be filed against.\n\nAdmin-only: a distributor can only ever file as itself, so it has nothing to\nchoose from.","operationId":"list_distributors_api_v1_onboarding_distributors_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CompanyOption"},"type":"array","title":"Response List Distributors Api V1 Onboarding Distributors Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/onboarding/customers":{"get":{"tags":["onboarding"],"summary":"List Customers","description":"Customer companies an add_device case can target.\n\nScoped to the acting distributor — its own for a distributor caller, the named\none for an admin.","operationId":"list_customers_api_v1_onboarding_customers_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"distributor_company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Distributor Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CompanyOption"},"title":"Response List Customers Api V1 Onboarding Customers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/cases":{"post":{"tags":["onboarding"],"summary":"Create Case","description":"Create a draft onboarding case.\n\nDistributors file for themselves; system admins file on behalf of a\ndistributor named in the payload.","operationId":"create_case_api_v1_onboarding_cases_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCaseCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCaseInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["onboarding"],"summary":"List Cases","description":"List the distributor's own onboarding cases (their company only).\n\nSorting and column filters are described in app.onboarding_table.","operationId":"list_cases_api_v1_onboarding_cases_get","security":[{"HTTPBearer":[]}],"parameters":[{"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"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Company name, case reference, or case/company id","title":"Search"},"description":"Company name, case reference, or case/company id"},{"name":"status_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated statuses, or 'all'","title":"Status Filter"},"description":"Comma-separated statuses, or 'all'"},{"name":"case_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated case types","title":"Case Type"},"description":"Comma-separated case types"},{"name":"reference","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Reference contains","title":"Reference"},"description":"Reference contains"},{"name":"company","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Company name contains (proposed or approved)","title":"Company"},"description":"Company name contains (proposed or approved)"},{"name":"distributor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Distributor name contains","title":"Distributor"},"description":"Distributor name contains"},{"name":"my_turn","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only cases waiting on the caller (true) or on the other side (false)","title":"My Turn"},"description":"Only cases waiting on the caller (true) or on the other side (false)"},{"name":"has_po","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only cases with (true) or without (false) a purchase order","title":"Has Po"},"description":"Only cases with (true) or without (false) a purchase order"},{"name":"quiet","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only open cases with no activity for 7+ days (true)","title":"Quiet"},"description":"Only open cases with no activity for 7+ days (true)"},{"name":"created_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Created on or after this day","title":"Created From"},"description":"Created on or after this day"},{"name":"created_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Created on or before this day","title":"Created To"},"description":"Created on or before this day"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"One of: reference, company, distributor, case_type, status, last_activity, po_count, created_at, submitted_at","title":"Sort By"},"description":"One of: reference, company, distributor, case_type, status, last_activity, po_count, created_at, submitted_at"},{"name":"sort_dir","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","default":"desc","title":"Sort Dir"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCaseListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/attention":{"get":{"tags":["onboarding"],"summary":"Attention Summary","description":"Open cases nobody has touched for 7+ days, most urgent first.\n\nWhat the strip at the top of the onboarding page reads: how long each case\nhas been quiet, who it waits on, and what to do - our move, chase the\ncustomer, or escalate to the distributor once the customer has been silent\npast 14 days. A distributor sees only their own cases, with the parties\nsimplified and no escalation wording. Nothing is sent to anyone.","operationId":"attention_summary_api_v1_onboarding_attention_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttentionSummary"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/onboarding/cases/{case_id}":{"get":{"tags":["onboarding"],"summary":"Get Case","operationId":"get_case_api_v1_onboarding_cases__case_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCaseInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["onboarding"],"summary":"Update Case","description":"Edit a case.\n\nTwo tiers. What the case *is* — the company it names, its justification —\nstays draft-only, because changing it after approval would rewrite what\nVerifyAI signed off on. The process fields (project lead, IT ticket,\nshipping party) stay editable through the whole pipeline: a project lead\nchanges jobs, an IT ticket number arrives during the IT meeting rather than\nbefore it, and the shipping arrangement is often settled late.","operationId":"update_case_api_v1_onboarding_cases__case_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCaseUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCaseInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/cases/{case_id}/purchase-orders":{"post":{"tags":["onboarding"],"summary":"Upload Purchase Order","description":"Upload a PO document to a case. Stored in the verifyai-pos bucket.","operationId":"upload_purchase_order_api_v1_onboarding_cases__case_id__purchase_orders_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_purchase_order_api_v1_onboarding_cases__case_id__purchase_orders_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/cases/{case_id}/purchase-orders/{po_id}/download":{"get":{"tags":["onboarding"],"summary":"Download Purchase Order","description":"Short-lived signed URL for a PO file, so the reviewer can read it.\n\nThe file never passes through ui-api; the browser fetches it from GCS.","operationId":"download_purchase_order_api_v1_onboarding_cases__case_id__purchase_orders__po_id__download_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}},{"name":"po_id","in":"path","required":true,"schema":{"type":"integer","title":"Po Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderDownload"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/cases/{case_id}/submit":{"post":{"tags":["onboarding"],"summary":"Submit Case","description":"Submit a draft case for admin approval.\n\nWhat blocks submission is read from the lifecycle module rather than\nrestated here: a PO and the customer's project lead. Without a project lead\nthe entire post-approval process has nobody to chase, so it is a submission\nrequirement rather than something collected later.","operationId":"submit_case_api_v1_onboarding_cases__case_id__submit_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCaseActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/admin/cases":{"get":{"tags":["onboarding"],"summary":"Admin List Cases","description":"Admin queue — cases across all distributors.\n\nDefaults to the review queue (submitted); pass status_filter=all for the full\nonboarding table, optionally narrowed to one distributor. Sorting and\ncolumn filters are described in app.onboarding_table.","operationId":"admin_list_cases_api_v1_onboarding_admin_cases_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"distributor_company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Distributor Company Id"}},{"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"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Company name, case reference, or case/company id","title":"Search"},"description":"Company name, case reference, or case/company id"},{"name":"status_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated statuses, or 'all'","title":"Status Filter"},"description":"Comma-separated statuses, or 'all'"},{"name":"case_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated case types","title":"Case Type"},"description":"Comma-separated case types"},{"name":"reference","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Reference contains","title":"Reference"},"description":"Reference contains"},{"name":"company","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Company name contains (proposed or approved)","title":"Company"},"description":"Company name contains (proposed or approved)"},{"name":"distributor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Distributor name contains","title":"Distributor"},"description":"Distributor name contains"},{"name":"my_turn","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only cases waiting on the caller (true) or on the other side (false)","title":"My Turn"},"description":"Only cases waiting on the caller (true) or on the other side (false)"},{"name":"has_po","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only cases with (true) or without (false) a purchase order","title":"Has Po"},"description":"Only cases with (true) or without (false) a purchase order"},{"name":"quiet","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only open cases with no activity for 7+ days (true)","title":"Quiet"},"description":"Only open cases with no activity for 7+ days (true)"},{"name":"created_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Created on or after this day","title":"Created From"},"description":"Created on or after this day"},{"name":"created_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Created on or before this day","title":"Created To"},"description":"Created on or before this day"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"One of: reference, company, distributor, case_type, status, last_activity, po_count, created_at, submitted_at","title":"Sort By"},"description":"One of: reference, company, distributor, case_type, status, last_activity, po_count, created_at, submitted_at"},{"name":"sort_dir","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","default":"desc","title":"Sort Dir"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCaseListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/admin/cases/{case_id}":{"get":{"tags":["onboarding"],"summary":"Admin Get Case","operationId":"admin_get_case_api_v1_onboarding_admin_cases__case_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCaseInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/admin/cases/{case_id}/approve":{"post":{"tags":["onboarding"],"summary":"Admin Approve Case","description":"Approve a submitted case.\n\nnew_company -> create the customer company (status=pending) owned by the\ndistributor, and link it as the case target.\nadd_device  -> approve the addition (device attach happens in app_api).","operationId":"admin_approve_case_api_v1_onboarding_admin_cases__case_id__approve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCaseApprove"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCaseActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/admin/cases/{case_id}/reject":{"post":{"tags":["onboarding"],"summary":"Admin Reject Case","description":"Reject / request changes on a submitted case.","operationId":"admin_reject_case_api_v1_onboarding_admin_cases__case_id__reject_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCaseReject"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCaseActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/marketing-materials":{"get":{"tags":["onboarding"],"summary":"List Marketing Materials","description":"Files in the curated onboarding marketing/instructions bucket.\n\nNot case-scoped — the same list for every distributor and admin. The\nbucket itself is the catalog (curated by hand), so this just reflects\nwhatever is in there right now; no caching, no separate DB table.","operationId":"list_marketing_materials_api_v1_onboarding_marketing_materials_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MarketingMaterialInfo"},"type":"array","title":"Response List Marketing Materials Api V1 Onboarding Marketing Materials Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/onboarding/cases/{case_id}/contacts":{"get":{"tags":["onboarding"],"summary":"List Case Contacts","description":"Everyone this case can be talked to about, on all three sides.\n\nThe customer's contacts, the distributor's own users, and the VerifyAI admin\nwho reviewed it. One call rather than three because the caller wants a\nsingle list of people, and because the answer is case-scoped either way —\n`_case_for_actor` already decides who may see this case at all, which makes\nthis readable by a distributor without handing them the user directory.\nThat matters: auth-api's user list is admin-gated, so a distributor user\ncould not have assembled this for themselves.\n\nAn address appears once. Someone who is both the project lead and a manager\non the customer company is one person, and listing them twice would produce\ntwo threads holding the same messages.","operationId":"list_case_contacts_api_v1_onboarding_cases__case_id__contacts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CaseContactInfo"},"title":"Response List Case Contacts Api V1 Onboarding Cases  Case Id  Contacts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/cases/{case_id}/messages":{"get":{"tags":["onboarding"],"summary":"List Case Messages","description":"Everything this case has emailed out, newest first.\n\nThe rows were always written; this is the read side. It is what turns the\nsend buttons from fire-and-forget into a record the next person on the case\ncan act on — who got which document, and when.","operationId":"list_case_messages_api_v1_onboarding_cases__case_id__messages_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OnboardingCaseMessageInfo"},"title":"Response List Case Messages Api V1 Onboarding Cases  Case Id  Messages Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/cases/{case_id}/attachments":{"get":{"tags":["onboarding"],"summary":"List Case Attachments","description":"Every file this case's mail carried, newest first.\n\nThe files were always here — each one hangs off the message it arrived on,\nwhich means finding the network diagram a customer sent last month costs a\nwalk through the whole Conversation tab. This flattens them into one list\nwithout moving or copying anything: the rows still own the files, this is a\nread across them.\n\nBoth directions, because \"what did we send them\" and \"what did they send us\"\nare the same question asked from two ends, and a view that answered only one\nwould send someone back to the threads for the other. `direction` narrows it.\n\nMarketing materials count as sent files. They are stored apart because they\ncome from a curated bucket rather than an upload, but on a case they are\nsimply something that went out, and `source` keeps them distinguishable.","operationId":"list_case_attachments_api_v1_onboarding_cases__case_id__attachments_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}},{"name":"direction","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"in = files customers sent us, out = files we sent. Omit for both.","title":"Direction"},"description":"in = files customers sent us, out = files we sent. Omit for both."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CaseAttachmentInfo"},"title":"Response List Case Attachments Api V1 Onboarding Cases  Case Id  Attachments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/cases/{case_id}/messages/{message_id}/attachments/{index}/download":{"get":{"tags":["onboarding"],"summary":"Download Case Message Attachment","description":"Short-lived signed URL for one file on a sent message.\n\nMirrors download_case_document: same guard, same expiry, the file never\npasses through ui-api. The two kinds live in different buckets and are\nstored in separate JSON arrays on the row, so the index alone is ambiguous\nand `source` says which array to walk.\n\nA message row is an audit snapshot of what was sent, and the curated\nmarketing bucket is edited by hand outside the app — so a file named on an\nold row can legitimately be gone. That is a 404 on the file, not a broken\nmessage: the record of what was sent stays true either way.","operationId":"download_case_message_attachment_api_v1_onboarding_cases__case_id__messages__message_id__attachments__index__download_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}},{"name":"message_id","in":"path","required":true,"schema":{"type":"integer","title":"Message Id"}},{"name":"index","in":"path","required":true,"schema":{"type":"integer","title":"Index"}},{"name":"source","in":"query","required":false,"schema":{"type":"string","description":"attachment = an ad-hoc upload, marketing = a curated-bucket file","default":"attachment","title":"Source"},"description":"attachment = an ad-hoc upload, marketing = a curated-bucket file"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseDocumentDownload"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/inbound":{"post":{"tags":["onboarding"],"summary":"Receive Inbound Email","description":"Resend's `email.received` webhook: a reply landing on a case.\n\nPublic in the session sense — there is no user here, and the signature is\nwhat stands in for one.\n\nAlmost everything that goes wrong returns 200. Resend retries on a\nnon-2xx, and the failures this endpoint actually sees are permanent ones:\nthe receiving domain is catch-all, so spam and typos arrive here addressed\nto cases that do not exist, and retrying those forever helps nobody. 5xx is\nreserved for the transient case, where a retry is the right answer.","operationId":"receive_inbound_email_api_v1_onboarding_inbound_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/onboarding/cases/{case_id}/send-package":{"post":{"tags":["onboarding"],"summary":"Send Case Message","description":"Email a customer's manager(s) marketing/instructions material plus any\nad-hoc attachments, with a copy to whoever else the distributor names.\n\nStandalone and repeatable — not tied to creating a manager, not limited\nto one send per case. Resolves every attachment (marketing download +\nad-hoc upload) before sending: this is an audit record, so a partial\nfailure aborts the whole request rather than emailing something short an\nattachment the distributor picked.","operationId":"send_case_message_api_v1_onboarding_cases__case_id__send_package_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_send_case_message_api_v1_onboarding_cases__case_id__send_package_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCaseMessageInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/cases/{case_id}/messages/{message_id}/reply-defaults":{"get":{"tags":["onboarding"],"summary":"Get Reply Defaults","description":"Who a reply to this message would go to, both ways round.\n\nExists so the dashboard can show the addresses before anything is sent\nwithout deciding them itself. A reply-all that silently drops half the\nthread is the bug this whole path is here to prevent, and a client that\ncomputed its own audience would only reintroduce it one copy of the rule\nlater.","operationId":"get_reply_defaults_api_v1_onboarding_cases__case_id__messages__message_id__reply_defaults_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}},{"name":"message_id","in":"path","required":true,"schema":{"type":"integer","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyDefaults"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/cases/{case_id}/messages/{message_id}/reply":{"post":{"tags":["onboarding"],"summary":"Reply To Case Message","description":"Answer inside an existing thread rather than starting a new one.\n\nEverything a reply needs is already on the parent — who to write to, what\nthe subject is, which conversation it belongs to — so all of it is defaulted\nand all of it can be overridden. The reply is stored against the thread's\nroot, not its immediate parent, so a thread stays flat: an email client\ndraws one conversation, not a tree of them.\n\nReply-all is the default, and it is the whole thread's audience rather than\nthe parent message's. One customer answering us with plain Reply used to\ndrop everyone we had CC'd, permanently and without saying so — every later\nmessage in that thread went to one person because one person's mail client\nhad decided so.","operationId":"reply_to_case_message_api_v1_onboarding_cases__case_id__messages__message_id__reply_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}},{"name":"message_id","in":"path","required":true,"schema":{"type":"integer","title":"Message Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_reply_to_case_message_api_v1_onboarding_cases__case_id__messages__message_id__reply_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCaseMessageInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/cases/{case_id}/send-welcome-email":{"post":{"tags":["onboarding"],"summary":"Send Manager Welcome Email","description":"The one email a newly-created company admin gets: their activation link,\nand an explanation of what the account is and what happens after they use\nit.\n\nThe body is rendered by verifyai-email, not composed here and not passed in\nby the caller. It used to take `subject` and `body` overrides; those are\ngone, because an operator editing the activation email by hand is how two\ncustomers end up with different versions of the same first impression.\n\nIt also no longer carries attachments. Materials go out through\nsend-package, which exists for exactly that and can address more than one\nperson — this email is the credential, and keeping it to one job keeps it\nshort enough to read.\n\nDeliberately **not** the same endpoint as send-package: that one supports\na CC list, and CC'ing a one-time activation link would hand someone\nelse's password-setup link to a third party. This endpoint has no `cc`\nparameter at all — structural, not just convention. One recipient, one\ncall, one audit row per manager instead of a batch.","operationId":"send_manager_welcome_email_api_v1_onboarding_cases__case_id__send_welcome_email_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_send_manager_welcome_email_api_v1_onboarding_cases__case_id__send_welcome_email_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCaseMessageInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/cases/{case_id}/advance":{"post":{"tags":["onboarding"],"summary":"Advance Case","description":"Mark an active case live. VerifyAI only.\n\nThe only lifecycle move this endpoint makes now. Submission and approval\nkeep their own endpoints because they do more than move the pointer, and\nthe work in between is the checklist, which has no order to advance\nthrough. Open steps do not stop a case going live; the checklist warns\nabout them instead.","operationId":"advance_case_api_v1_onboarding_cases__case_id__advance_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StageAdvanceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCaseInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/cases/{case_id}/back":{"post":{"tags":["onboarding"],"summary":"Step Case Back","description":"Take a live case back to active. VerifyAI only, and the note is mandatory.\n\nGoing live by mistake is the one lifecycle move worth undoing; the\nalternative is somebody editing the status column by hand. Individual\nsteps are reopened through the step endpoint, not here.","operationId":"step_case_back_api_v1_onboarding_cases__case_id__back_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StageBackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCaseInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/cases/{case_id}/steps/{step_key}":{"put":{"tags":["onboarding"],"summary":"Set Case Step","description":"Put one checklist step in a state: not_started, in_progress, complete or\nskipped. Any step, any time, in any order.\n\nVerifyAI staff change any step; a distributor only the steps they own (PO,\nshipping when they ship, Building Services install). A skip needs a note.\nRejected and closed cases are finished with and refuse changes.","operationId":"set_case_step_api_v1_onboarding_cases__case_id__steps__step_key__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}},{"name":"step_key","in":"path","required":true,"schema":{"type":"string","title":"Step Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCaseInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/cases/{case_id}/escalate":{"post":{"tags":["onboarding"],"summary":"Escalate Case","description":"Pull the rep back in, or stand them down again.\n\nPoint 3 of the process: once VerifyAI takes ownership the distributor has\nnothing to do unless the customer's project lead fails. That is not a stage\n— it can happen anywhere in the chain — so it is a flag that rewrites what\nthe distributor is told to do without stopping the case advancing.","operationId":"escalate_case_api_v1_onboarding_cases__case_id__escalate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EscalationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCaseInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/cases/{case_id}/it-approval":{"post":{"tags":["onboarding"],"summary":"Confirm It Approval","description":"Confirm that customer IT approved this rollout — the IT_REVIEW gate.\n\nThis replaced an uploaded approval document. What IT sends back is a line in\na ticket, a yes in the meeting, or a mail in a thread already on this case,\nso requiring a file collected screenshots of approvals rather than approvals\nand stalled cases behind paperwork nobody had.\n\nAdmin-only, and it records who: an attestation whose author is unknown is\nworth less than the document it replaced. Reversible, because a confirmation\ngiven in error has to be takeable back — and doing so re-blocks the stage.","operationId":"confirm_it_approval_api_v1_onboarding_cases__case_id__it_approval_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StageConfirmationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCaseInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/cases/{case_id}/devices-shipped":{"post":{"tags":["onboarding"],"summary":"Confirm Devices Shipped","description":"Confirm the devices have left — the READY_TO_SHIP gate.\n\nThe one confirmation that is not admin-only, because it is not ours to give:\non most cases the distributor is holding the hardware, and nothing else in\nthe system can see a box leave a warehouse. `_case_for_actor` already scopes\nthis to the case's own distributor and to VerifyAI staff, which is exactly\nthe set of people who could know.\n\nDeliberately separate from the delivery proof upload, which stays where it\nis. That document is evidence about a shipment that already happened; it\narrives after the fact and often days later, and gating the stage on it\nwould hold every case open waiting for a courier.","operationId":"confirm_devices_shipped_api_v1_onboarding_cases__case_id__devices_shipped_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StageConfirmationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCaseInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/cases/{case_id}/data-self-loaded":{"post":{"tags":["onboarding"],"summary":"Confirm Data Self Loaded","description":"Confirm the customer loaded their own users and inventory.\n\nDATA_COLLECTION otherwise counts rows on the customer company, which is the\nright check when we run the import and a blind one when the customer does it\nthemselves — the rows arrive the same way and nothing ties them to this case.\nRather than loosen the count into something that passes on any pre-existing\ndata, an admin says so explicitly and is recorded as having said it.","operationId":"confirm_data_self_loaded_api_v1_onboarding_cases__case_id__data_self_loaded_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StageConfirmationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingCaseInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/cases/{case_id}/documents":{"post":{"tags":["onboarding"],"summary":"Upload Case Document","description":"Attach a typed artifact to a case.\n\nStorage is the same verifyai-pos bucket the POs already use, so nothing new\nhad to be provisioned. A NAM report may carry its verdict on upload or be\nmarked afterwards through the review endpoint; either way it is the recorded\nverdict, not the file's contents, that the network-provisioning gate reads.","operationId":"upload_case_document_api_v1_onboarding_cases__case_id__documents_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_case_document_api_v1_onboarding_cases__case_id__documents_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseDocumentInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["onboarding"],"summary":"List Case Documents","description":"Documents on a case, newest first, optionally narrowed to one type.","operationId":"list_case_documents_api_v1_onboarding_cases__case_id__documents_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}},{"name":"document_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CaseDocumentInfo"},"title":"Response List Case Documents Api V1 Onboarding Cases  Case Id  Documents Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/cases/{case_id}/documents/{document_id}/download":{"get":{"tags":["onboarding"],"summary":"Download Case Document","description":"Short-lived signed URL — the file never passes through ui-api.","operationId":"download_case_document_api_v1_onboarding_cases__case_id__documents__document_id__download_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"integer","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseDocumentDownload"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/onboarding/cases/{case_id}/documents/{document_id}":{"patch":{"tags":["onboarding"],"summary":"Review Case Document","description":"Record the verdict on a document — in practice, pass or fail a NAM report.\n\nVerifyAI-only: this is the control that opens the shipping gate, so it does\nnot belong to the party whose hardware is waiting to move.","operationId":"review_case_document_api_v1_onboarding_cases__case_id__documents__document_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"integer","title":"Case Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"integer","title":"Document Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseDocumentReview"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseDocumentInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/seats/acquire":{"post":{"tags":["seats"],"summary":"Acquire","description":"Take a seat, or refresh the one you already hold.\n\nIdempotent: opening the Inspector in a second tab returns the same lease with a pushed-out\nexpiry rather than spending another seat.\n\n409 means every seat is genuinely in use right now; 402 means the company has not bought\nany (or they have all lapsed), which no amount of waiting will fix.","operationId":"acquire_api_v1_seats_acquire_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcquireIn","default":{"bundle_code":"ai_inspector"}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeatOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/seats/heartbeat":{"post":{"tags":["seats"],"summary":"Heartbeat","description":"Keep a held seat alive. 409 if it already lapsed — acquire again.","operationId":"heartbeat_api_v1_seats_heartbeat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaseIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeatOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/seats/release":{"post":{"tags":["seats"],"summary":"Release","description":"Hand a seat back. Releasing an already-released seat is a no-op, not an error — this is\nroutinely called from a page-unload beacon that may fire twice or arrive late.","operationId":"release_api_v1_seats_release_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaseIn"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/seats/release-all":{"post":{"tags":["seats"],"summary":"Release All","description":"Drop every seat this user holds. Call this on logout: a seat does not survive a session,\nand the next person should not have to wait out a TTL for one whose holder has gone.","operationId":"release_all_api_v1_seats_release_all_post","responses":{"204":{"description":"Successful Response"}},"security":[{"HTTPBearer":[]}]}},"/api/v1/seats/status":{"get":{"tags":["seats"],"summary":"Seat Status","description":"Pool state and whether this user is holding one. Cheap enough to call on page load to\ndecide whether to show the Inspector entry point at all.","operationId":"seat_status_api_v1_seats_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bundle_code","in":"query","required":false,"schema":{"type":"string","default":"ai_inspector","title":"Bundle Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeatStatusOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gold/concepts":{"get":{"tags":["gold"],"summary":"List Concepts","operationId":"list_concepts_api_v1_gold_concepts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Also return existing concepts with a similar name","title":"Q"},"description":"Also return existing concepts with a similar name"},{"name":"include_test","in":"query","required":false,"schema":{"type":"boolean","description":"Include concepts made by the E2E suite","default":false,"title":"Include Test"},"description":"Include concepts made by the E2E suite"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConceptList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["gold"],"summary":"Create Concept","operationId":"create_concept_api_v1_gold_concepts_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConceptCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConceptOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gold/concepts/{concept_id}":{"patch":{"tags":["gold"],"summary":"Update Concept","operationId":"update_concept_api_v1_gold_concepts__concept_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"concept_id","in":"path","required":true,"schema":{"type":"integer","title":"Concept Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConceptUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConceptOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["gold"],"summary":"Delete Concept","description":"Only an unused concept (a typo, an E2E leftover) can be deleted; otherwise merge it.","operationId":"delete_concept_api_v1_gold_concepts__concept_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"concept_id","in":"path","required":true,"schema":{"type":"integer","title":"Concept Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gold/concepts/{concept_id}/merge":{"post":{"tags":["gold"],"summary":"Merge Concept","description":"Fold a duplicate into another concept: its examples move, its name is retired.","operationId":"merge_concept_api_v1_gold_concepts__concept_id__merge_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"concept_id","in":"path","required":true,"schema":{"type":"integer","title":"Concept Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConceptMerge"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConceptOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gold/frames":{"post":{"tags":["gold"],"summary":"Save Frame","description":"Add a frame and its examples. The same image again adds the examples to the existing frame.","operationId":"save_frame_api_v1_gold_frames_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_save_frame_api_v1_gold_frames_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FrameSaved"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["gold"],"summary":"List Frames","operationId":"list_frames_api_v1_gold_frames_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"concept_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Concept Id"}},{"name":"tube_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/TubeType"},{"type":"null"}],"title":"Tube Type"}},{"name":"severity","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/GoldSeverity"},{"type":"null"}],"title":"Severity"}},{"name":"source_env","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/GoldEnv"},{"type":"null"}],"title":"Source Env"}},{"name":"benchmark","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only benchmark frames (true) or only the others (false)","title":"Benchmark"},"description":"Only benchmark frames (true) or only the others (false)"},{"name":"verified","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only verified (true) or not yet verified (false)","title":"Verified"},"description":"Only verified (true) or not yet verified (false)"},{"name":"include_test","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Test"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":60,"minimum":1,"default":24,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FramePage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gold/frames/{frame_id}":{"get":{"tags":["gold"],"summary":"Get Frame","operationId":"get_frame_api_v1_gold_frames__frame_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"frame_id","in":"path","required":true,"schema":{"type":"integer","title":"Frame Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FrameOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["gold"],"summary":"Update Frame","operationId":"update_frame_api_v1_gold_frames__frame_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"frame_id","in":"path","required":true,"schema":{"type":"integer","title":"Frame Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FrameUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FrameOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["gold"],"summary":"Delete Frame","operationId":"delete_frame_api_v1_gold_frames__frame_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"frame_id","in":"path","required":true,"schema":{"type":"integer","title":"Frame Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gold/frames/{frame_id}/verify":{"post":{"tags":["gold"],"summary":"Verify Frame","description":"A second admin confirms every defect on a benchmark frame is boxed, and boxed right.","operationId":"verify_frame_api_v1_gold_frames__frame_id__verify_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"frame_id","in":"path","required":true,"schema":{"type":"integer","title":"Frame Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FrameOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gold/frames/{frame_id}/examples":{"post":{"tags":["gold"],"summary":"Add Examples","description":"Add more examples to a frame already in the set (from the Atlas).","operationId":"add_examples_api_v1_gold_frames__frame_id__examples_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"frame_id","in":"path","required":true,"schema":{"type":"integer","title":"Frame Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExampleIn"},"title":"Items"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FrameOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["gold"],"summary":"Replace Examples","description":"Replace every box of a frame in one transaction: the benchmark editor's save.\n\nRows with an id update that box, rows without one are added, boxes left out are\ndeleted. ``version`` is the one the editor loaded: if the frame changed since\n(another admin saved or verified it), nothing is written and 409 carries the\nframe as it is now. A change to a concept, box or severity clears verification.","operationId":"replace_examples_api_v1_gold_frames__frame_id__examples_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"frame_id","in":"path","required":true,"schema":{"type":"integer","title":"Frame Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FrameBoxes"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FrameOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gold/examples/{example_id}":{"patch":{"tags":["gold"],"summary":"Update Example","operationId":"update_example_api_v1_gold_examples__example_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"example_id","in":"path","required":true,"schema":{"type":"integer","title":"Example Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExampleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExampleOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["gold"],"summary":"Delete Example","description":"The frame stays, with its tube type: delete the frame itself to remove the image.","operationId":"delete_example_api_v1_gold_examples__example_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"example_id","in":"path","required":true,"schema":{"type":"integer","title":"Example Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gold/coverage":{"get":{"tags":["gold"],"summary":"Get Coverage","description":"Examples and recordings per concept and tube type: what to look for next.","operationId":"get_coverage_api_v1_gold_coverage_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"include_test","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Test"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConceptCoverage"},"title":"Response Get Coverage Api V1 Gold Coverage Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gold/benchmark/recordings/{video_id}":{"get":{"tags":["gold"],"summary":"Benchmark Recording","description":"Which tube sections of this recording (in this environment) can give benchmark\nframes, and which benchmark frames it has given.","operationId":"benchmark_recording_api_v1_gold_benchmark_recordings__video_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"integer","title":"Video Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordingStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gold/benchmark/coverage":{"get":{"tags":["gold"],"summary":"Benchmark Coverage","description":"Benchmark progress per tube type and catalog class, against the targets.","operationId":"benchmark_coverage_api_v1_gold_benchmark_coverage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BenchmarkCoverage"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/gold/benchmark/snapshots":{"get":{"tags":["gold"],"summary":"List Snapshots","operationId":"list_snapshots_api_v1_gold_benchmark_snapshots_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SnapshotOut"},"type":"array","title":"Response List Snapshots Api V1 Gold Benchmark Snapshots Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["gold"],"summary":"Create Snapshot","description":"Freeze the benchmark frames of one tube type into a manifest in the gold bucket.\n\nEvery benchmark frame counts: one admin marking it is enough (no second approval).\n\nModels are only ever compared on one snapshot, so later edits to gold rows\ncannot quietly move a past result.","operationId":"create_snapshot_api_v1_gold_benchmark_snapshots_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/gold/benchmark/candidates":{"get":{"tags":["gold"],"summary":"Benchmark Candidates","description":"Videos where the production model saw ``label`` and a tube section is still free.","operationId":"benchmark_candidates_api_v1_gold_benchmark_candidates_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"label","in":"query","required":true,"schema":{"type":"string","maxLength":100,"description":"Catalog label, e.g. damage_deformed","title":"Label"},"description":"Catalog label, e.g. damage_deformed"},{"name":"min_confidence","in":"query","required":false,"schema":{"type":"number","maximum":0.99,"minimum":0.25,"default":0.5,"title":"Min Confidence"}},{"name":"min_hits","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Flags in at least this many frames","default":5,"title":"Min Hits"},"description":"Flags in at least this many frames"},{"name":"min_duration_s","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Shorter videos are usually tests","default":20,"title":"Min Duration S"},"description":"Shorter videos are usually tests"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CandidatePage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gold/benchmark/hidden":{"get":{"tags":["gold"],"summary":"List Hidden","operationId":"list_hidden_api_v1_gold_benchmark_hidden_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/HiddenOut"},"type":"array","title":"Response List Hidden Api V1 Gold Benchmark Hidden Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["gold"],"summary":"Hide Candidate","description":"Rule a video or a whole company out of the finder: test recordings, demos, junk.","operationId":"hide_candidate_api_v1_gold_benchmark_hidden_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HiddenIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HiddenOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/gold/benchmark/hidden/{hidden_id}":{"delete":{"tags":["gold"],"summary":"Unhide Candidate","operationId":"unhide_candidate_api_v1_gold_benchmark_hidden__hidden_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"hidden_id","in":"path","required":true,"schema":{"type":"integer","title":"Hidden Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/feature-flags":{"get":{"tags":["feature-flags"],"summary":"Get Feature Flags","description":"Keys of the flags that are on for the logged-in user, e.g. {\"flags\": [\"outliers\"]}.\n\nNever cached: turning a flag off has to reach open dashboards within minutes.\nThe dashboard treats any error as \"all flags off\".","operationId":"get_feature_flags_api_v1_feature_flags_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureFlagsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/":{"get":{"summary":"Root","description":"Root endpoint","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health Check","description":"Health check endpoint with database connectivity","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/status":{"get":{"summary":"Api Status","description":"API status endpoint","operationId":"api_status_api_v1_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/share/{video_id}":{"post":{"summary":"Share Video","description":"Share inspection video and report information via email.\n\nThe email itself is drafted in verifyai-email (VER-1433); this gathers the\ndata and decides what may be attached.","operationId":"share_video_api_v1_share__video_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"integer","title":"Video Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareVideoRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/contactus":{"post":{"summary":"Contact Us","description":"Contact Us endpoint - sends user inquiry to help email.\nDrafted in verifyai-email (VER-1433).","operationId":"contact_us_api_v1_contactus_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactUsRequest"}}},"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":[]}]}}},"components":{"schemas":{"AcquireIn":{"properties":{"bundle_code":{"type":"string","title":"Bundle Code","default":"ai_inspector"},"session_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Session Id","description":"Opaque per-tab/session key. Optional, and it does not affect how many seats you get — a user holds at most one seat per pool regardless — it just records which client is holding it."}},"type":"object","title":"AcquireIn"},"ActivitySummaryResponse":{"properties":{"company_id":{"type":"integer","title":"Company Id"},"period_days":{"type":"integer","title":"Period Days"},"period_start":{"type":"string","format":"date-time","title":"Period Start"},"period_end":{"type":"string","format":"date-time","title":"Period End"},"endoscopes_inspected":{"type":"integer","title":"Endoscopes Inspected"},"inspections":{"type":"integer","title":"Inspections"},"reports_created":{"type":"integer","title":"Reports Created"},"devices_used":{"type":"integer","title":"Devices Used"},"users_inspecting":{"type":"integer","title":"Users Inspecting"},"users_reporting":{"type":"integer","title":"Users Reporting"},"video_status_breakdown":{"additionalProperties":{"type":"integer"},"type":"object","title":"Video Status Breakdown"},"report_status_breakdown":{"additionalProperties":{"type":"integer"},"type":"object","title":"Report Status Breakdown"},"equipment_status_breakdown":{"additionalProperties":{"type":"integer"},"type":"object","title":"Equipment Status Breakdown"},"report_type_breakdown":{"additionalProperties":{"type":"integer"},"type":"object","title":"Report Type Breakdown"},"flagged_reports":{"type":"integer","title":"Flagged Reports"},"flagged_endoscopes":{"type":"integer","title":"Flagged Endoscopes"}},"type":"object","required":["company_id","period_days","period_start","period_end","endoscopes_inspected","inspections","reports_created","devices_used","users_inspecting","users_reporting","video_status_breakdown","report_status_breakdown","equipment_status_breakdown","report_type_breakdown","flagged_reports","flagged_endoscopes"],"title":"ActivitySummaryResponse"},"AttentionCase":{"properties":{"id":{"type":"integer","title":"Id"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference"},"company_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Display Name"},"distributor_company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Distributor Company Name"},"status":{"type":"string","title":"Status"},"attention":{"$ref":"#/components/schemas/AttentionInfo"}},"type":"object","required":["id","status","attention"],"title":"AttentionCase"},"AttentionInfo":{"properties":{"level":{"type":"string","title":"Level"},"idle_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Idle Days"},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Activity At"},"waiting_on":{"items":{"type":"string"},"type":"array","title":"Waiting On","default":[]},"waiting_steps":{"items":{"$ref":"#/components/schemas/WaitingStep"},"type":"array","title":"Waiting Steps","default":[]},"customer_silent_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Customer Silent Days"},"suggestion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggestion"}},"type":"object","required":["level"],"title":"AttentionInfo","description":"How long a case has been quiet, who it waits on, and what to do.\n\nlevel: none (live/rejected/closed) | ok | amber (7+ days) | red (14+ days).\nsuggestion (VerifyAI): our_move | chase_customer | chase_distributor |\nescalate_distributor | already_escalated. Distributor: your_move.\nDistributors get parties collapsed to you / customer / verifyai."},"AttentionSummary":{"properties":{"total":{"type":"integer","title":"Total"},"counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Counts","default":{}},"cases":{"items":{"$ref":"#/components/schemas/AttentionCase"},"type":"array","title":"Cases","default":[]}},"type":"object","required":["total"],"title":"AttentionSummary","description":"Open cases quiet for 7+ days, most urgent first, with counts per\nsuggestion for the strip at the top of the onboarding page."},"BaseResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"BaseResponse"},"BenchmarkCell":{"properties":{"tube_type":{"type":"string","title":"Tube Type"},"label":{"type":"string","title":"Label"},"instances":{"type":"integer","title":"Instances"},"verified":{"type":"integer","title":"Verified"},"recordings":{"type":"integer","title":"Recordings"},"severity":{"additionalProperties":{"type":"integer"},"type":"object","title":"Severity","default":{}},"status":{"type":"string","title":"Status"}},"type":"object","required":["tube_type","label","instances","verified","recordings","status"],"title":"BenchmarkCell"},"BenchmarkCoverage":{"properties":{"tubes":{"additionalProperties":{"$ref":"#/components/schemas/BenchmarkTube"},"type":"object","title":"Tubes"},"cells":{"items":{"$ref":"#/components/schemas/BenchmarkCell"},"type":"array","title":"Cells"},"targets":{"additionalProperties":true,"type":"object","title":"Targets"},"reserved_recordings":{"type":"integer","title":"Reserved Recordings","default":0},"reserved_segments":{"type":"integer","title":"Reserved Segments","default":0}},"type":"object","required":["tubes","cells","targets"],"title":"BenchmarkCoverage"},"BenchmarkTube":{"properties":{"frames":{"type":"integer","title":"Frames"},"verified_frames":{"type":"integer","title":"Verified Frames"},"clean_frames":{"type":"integer","title":"Clean Frames"},"recordings":{"type":"integer","title":"Recordings"}},"type":"object","required":["frames","verified_frames","clean_frames","recordings"],"title":"BenchmarkTube"},"Body_check_actions_file_api_v1_offline_check_actions_post":{"properties":{"actions_file":{"type":"string","format":"binary","title":"Actions File"}},"type":"object","required":["actions_file"],"title":"Body_check_actions_file_api_v1_offline_check_actions_post"},"Body_reply_to_case_message_api_v1_onboarding_cases__case_id__messages__message_id__reply_post":{"properties":{"body":{"type":"string","title":"Body"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject","description":"Defaults to Re: the thread's subject"},"recipients":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipients","description":"JSON array; defaults to whoever wrote last"},"cc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cc","description":"JSON array of CC emails; defaults to the rest of the thread"},"reply_all":{"type":"boolean","title":"Reply All","description":"Copy everyone else on the thread. Ignored where `cc` is given explicitly.","default":true},"marketing_material_keys":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Marketing Material Keys","description":"JSON array of GCS object paths"},"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files","default":[]}},"type":"object","required":["body"],"title":"Body_reply_to_case_message_api_v1_onboarding_cases__case_id__messages__message_id__reply_post"},"Body_save_frame_api_v1_gold_frames_post":{"properties":{"image":{"type":"string","format":"binary","title":"Image","description":"The frame as shown, JPEG"},"meta":{"type":"string","title":"Meta","description":"FrameMeta as JSON"}},"type":"object","required":["image","meta"],"title":"Body_save_frame_api_v1_gold_frames_post"},"Body_send_case_message_api_v1_onboarding_cases__case_id__send_package_post":{"properties":{"recipients":{"type":"string","title":"Recipients","description":"JSON array of recipient emails"},"cc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cc","description":"JSON array of CC emails"},"marketing_material_keys":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Marketing Material Keys","description":"JSON array of GCS object paths"},"subject":{"type":"string","title":"Subject"},"body":{"type":"string","title":"Body"},"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files","default":[]}},"type":"object","required":["recipients","subject","body"],"title":"Body_send_case_message_api_v1_onboarding_cases__case_id__send_package_post"},"Body_send_manager_welcome_email_api_v1_onboarding_cases__case_id__send_welcome_email_post":{"properties":{"recipient":{"type":"string","title":"Recipient","description":"Single manager email — no CC field exists on this endpoint"},"activation_url":{"type":"string","title":"Activation Url"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"When the activation link stops working"}},"type":"object","required":["recipient","activation_url"],"title":"Body_send_manager_welcome_email_api_v1_onboarding_cases__case_id__send_welcome_email_post"},"Body_upload_case_document_api_v1_onboarding_cases__case_id__documents_post":{"properties":{"document_type":{"type":"string","title":"Document Type","description":"it_form | it_approval | data_users | data_inventory | nam_report | delivery_proof | training_material | other"},"file":{"type":"string","format":"binary","title":"File"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"result":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result","description":"pass | fail — nam_report only"}},"type":"object","required":["document_type","file"],"title":"Body_upload_case_document_api_v1_onboarding_cases__case_id__documents_post"},"Body_upload_offline_dump_api_v1_offline_upload_post":{"properties":{"company_id":{"type":"integer","title":"Company Id"},"device_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Device Id"},"device_dump_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Dump Id"},"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files"}},"type":"object","required":["company_id","files"],"title":"Body_upload_offline_dump_api_v1_offline_upload_post"},"Body_upload_purchase_order_api_v1_onboarding_cases__case_id__purchase_orders_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"po_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Po Number"},"po_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Po Date"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["file"],"title":"Body_upload_purchase_order_api_v1_onboarding_cases__case_id__purchase_orders_post"},"BoxIn":{"properties":{"x_min":{"type":"number","title":"X Min"},"y_min":{"type":"number","title":"Y Min"},"x_max":{"type":"number","title":"X Max"},"y_max":{"type":"number","title":"Y Max"}},"type":"object","required":["x_min","y_min","x_max","y_max"],"title":"BoxIn","description":"Normalised to the frame, 0..1. Out-of-range corners are clamped, not refused."},"BoxRow":{"properties":{"concept_id":{"type":"integer","title":"Concept Id"},"box":{"anyOf":[{"$ref":"#/components/schemas/BoxIn"},{"type":"null"}]},"severity":{"anyOf":[{"$ref":"#/components/schemas/GoldSeverity"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"is_gold":{"type":"boolean","title":"Is Gold","default":true},"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"}},"type":"object","required":["concept_id"],"title":"BoxRow","description":"One box of a whole-frame save. With ``id`` it updates that box; without, it is new."},"CandidateOut":{"properties":{"video_id":{"type":"integer","title":"Video Id"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"recorded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Recorded At"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"hits":{"type":"integer","title":"Hits"},"best_confidence":{"type":"number","title":"Best Confidence"},"moments":{"items":{"type":"number"},"type":"array","title":"Moments","default":[]},"free_tubes":{"items":{"type":"string"},"type":"array","title":"Free Tubes","default":[]},"benchmark_frames":{"type":"integer","title":"Benchmark Frames","default":0}},"type":"object","required":["video_id","hits","best_confidence"],"title":"CandidateOut","description":"A video the production model flagged for a class, with a tube section still free."},"CandidatePage":{"properties":{"label":{"type":"string","title":"Label"},"min_confidence":{"type":"number","title":"Min Confidence"},"flagged":{"type":"integer","title":"Flagged"},"items":{"items":{"$ref":"#/components/schemas/CandidateOut"},"type":"array","title":"Items"}},"type":"object","required":["label","min_confidence","flagged","items"],"title":"CandidatePage"},"CaseAttachmentInfo":{"properties":{"message_id":{"type":"integer","title":"Message Id"},"index":{"type":"integer","title":"Index"},"source":{"type":"string","title":"Source","description":"attachment | marketing"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"},"direction":{"type":"string","title":"Direction"},"from_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Email"},"recipients":{"items":{"type":"string"},"type":"array","title":"Recipients","default":[]},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"sent_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sent By Name"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"},"thread_root_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Thread Root Id"}},"type":"object","required":["message_id","index","source","direction"],"title":"CaseAttachmentInfo","description":"One file on one message, flattened out of the message it rode in on.\n\nCarries the coordinates the download endpoint needs — `message_id`, `index`\nand `source`, since the two kinds live in different buckets and different\nJSON arrays — plus enough of the message to say where the file came from\nwithout opening the thread it belongs to."},"CaseContactInfo":{"properties":{"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"role":{"type":"string","title":"Role"},"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"},"is_case_owner":{"type":"boolean","title":"Is Case Owner","default":false}},"type":"object","required":["email","role"],"title":"CaseContactInfo","description":"One person reachable on a case, whichever side of it they sit on.\n\nRoles are what the caller renders a group by; `is_case_owner` marks the\ndistributor user who raised the case, who is the default person to talk to\non that side."},"CaseDocumentDownload":{"properties":{"url":{"type":"string","title":"Url"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"}},"type":"object","required":["url"],"title":"CaseDocumentDownload"},"CaseDocumentInfo":{"properties":{"id":{"type":"integer","title":"Id"},"document_type":{"type":"string","title":"Document Type"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"file_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Size Bytes"},"result":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"uploaded_by":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Uploaded By"},"uploaded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Uploaded At"},"reviewed_by":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reviewed By"},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reviewed At"}},"type":"object","required":["id","document_type"],"title":"CaseDocumentInfo"},"CaseDocumentReview":{"properties":{"result":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result","description":"pass | fail"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"CaseDocumentReview","description":"Records the human verdict on a document. Only NAM reports use `result`,\nand it is what the network-provisioning gate reads."},"CompanyCreate":{"properties":{"name":{"type":"string","title":"Name"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"company_type":{"$ref":"#/components/schemas/CompanyType","default":"service"},"service_company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Service Company Id"},"representative_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Representative Name"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"company_network_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Network Id"},"department":{"anyOf":[{"$ref":"#/components/schemas/DepartmentBase"},{"type":"null"}]}},"type":"object","required":["name"],"title":"CompanyCreate"},"CompanyCreateResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"company_id":{"type":"integer","title":"Company Id"},"company_info":{"additionalProperties":true,"type":"object","title":"Company Info"}},"type":"object","required":["success","message","company_id","company_info"],"title":"CompanyCreateResponse"},"CompanyInfo":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"company_type":{"$ref":"#/components/schemas/CompanyType"},"service_company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Service Company Id"},"representative_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Representative Name"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"is_active":{"type":"boolean","title":"Is Active"},"departments":{"items":{"$ref":"#/components/schemas/DepartmentInfo"},"type":"array","title":"Departments"},"hardware_devices":{"items":{"$ref":"#/components/schemas/HardwareDeviceInfo"},"type":"array","title":"Hardware Devices"},"medical_equipment":{"items":{"$ref":"#/components/schemas/MedicalEquipmentInfo"},"type":"array","title":"Medical Equipment"}},"type":"object","required":["id","name","address","phone","email","website","company_type","service_company_id","representative_name","comment","created_at","is_active","departments","hardware_devices","medical_equipment"],"title":"CompanyInfo"},"CompanyList":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"company_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Type"}},"type":"object","required":["id","name"],"title":"CompanyList"},"CompanyOption":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"CompanyOption","description":"Picker entry for the distributor / target-company selects."},"CompanyType":{"type":"string","enum":["regular","service","distributor"],"title":"CompanyType"},"CompanyUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"company_type":{"anyOf":[{"$ref":"#/components/schemas/CompanyType"},{"type":"null"}]},"service_company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Service Company Id"},"company_network_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Network Id"},"representative_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Representative Name"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"}},"type":"object","title":"CompanyUpdate"},"ConceptCoverage":{"properties":{"concept_id":{"type":"integer","title":"Concept Id"},"name":{"type":"string","title":"Name"},"examples":{"type":"integer","title":"Examples"},"recordings":{"type":"integer","title":"Recordings"},"by_tube":{"additionalProperties":{"$ref":"#/components/schemas/CoverageCell"},"type":"object","title":"By Tube","default":{}}},"type":"object","required":["concept_id","name","examples","recordings"],"title":"ConceptCoverage"},"ConceptCreate":{"properties":{"name":{"type":"string","maxLength":200,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"category":{"$ref":"#/components/schemas/GoldCategory"},"scope":{"$ref":"#/components/schemas/GoldScope","default":"region"},"has_severity":{"type":"boolean","title":"Has Severity","default":false},"catalog_label":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Catalog Label"}},"type":"object","required":["name","category"],"title":"ConceptCreate"},"ConceptList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ConceptOut"},"type":"array","title":"Items"},"similar":{"items":{"$ref":"#/components/schemas/ConceptOut"},"type":"array","title":"Similar","default":[]}},"type":"object","required":["items"],"title":"ConceptList"},"ConceptMerge":{"properties":{"into_id":{"type":"integer","title":"Into Id"}},"type":"object","required":["into_id"],"title":"ConceptMerge"},"ConceptOut":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"category":{"$ref":"#/components/schemas/GoldCategory"},"scope":{"$ref":"#/components/schemas/GoldScope"},"has_severity":{"type":"boolean","title":"Has Severity"},"catalog_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Catalog Label"},"examples":{"type":"integer","title":"Examples","default":0},"recordings":{"type":"integer","title":"Recordings","default":0},"created_by_env":{"anyOf":[{"$ref":"#/components/schemas/GoldEnv"},{"type":"null"}]},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","name","category","scope","has_severity"],"title":"ConceptOut"},"ConceptUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"category":{"anyOf":[{"$ref":"#/components/schemas/GoldCategory"},{"type":"null"}]},"scope":{"anyOf":[{"$ref":"#/components/schemas/GoldScope"},{"type":"null"}]},"has_severity":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Severity"},"catalog_label":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Catalog Label"}},"type":"object","title":"ConceptUpdate"},"ContactUsRequest":{"properties":{"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"email":{"type":"string","title":"Email"},"company_name":{"type":"string","title":"Company Name"},"subject":{"type":"string","title":"Subject"},"message":{"type":"string","title":"Message"}},"type":"object","required":["first_name","last_name","email","company_name","subject","message"],"title":"ContactUsRequest"},"CoverageCell":{"properties":{"examples":{"type":"integer","title":"Examples"},"recordings":{"type":"integer","title":"Recordings"}},"type":"object","required":["examples","recordings"],"title":"CoverageCell"},"CreateRecordingRequest":{"properties":{"medical_equipment_id":{"type":"integer","title":"Medical Equipment Id"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"device_id":{"type":"integer","title":"Device Id"},"resolution":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution","default":"1920x1080"},"fps":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fps","default":30.0},"video_bitrate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Video Bitrate","default":2500000},"audio_bitrate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Audio Bitrate","default":128000},"recording_comments":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Comments"}},"type":"object","required":["medical_equipment_id","device_id"],"title":"CreateRecordingRequest","description":"Request to create a new recording session"},"CreateRecordingResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"recording_id":{"type":"integer","title":"Recording Id"},"upload_url":{"type":"string","title":"Upload Url"},"gcs_path":{"type":"string","title":"Gcs Path"},"expires_in_hours":{"type":"integer","title":"Expires In Hours"}},"type":"object","required":["success","message","recording_id","upload_url","gcs_path","expires_in_hours"],"title":"CreateRecordingResponse","description":"Response after creating recording session with GCS upload URL"},"CreateReportRequest":{"properties":{"generated_by":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Generated By"},"frames":{"additionalProperties":{"items":{"$ref":"#/components/schemas/ReportDetectionRequest"},"type":"array"},"type":"object","title":"Frames"},"lang":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang","default":"en"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","default":[]}},"type":"object","required":["frames"],"title":"CreateReportRequest"},"CreateReportResponse":{"properties":{"id":{"type":"string","title":"Id"},"video_id":{"type":"string","title":"Video Id"},"generated_dt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generated Dt"},"generated_by":{"type":"string","title":"Generated By"},"generated_by_name":{"type":"string","title":"Generated By Name"},"report_manual":{"type":"integer","title":"Report Manual"},"link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link"},"spec_cont":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Spec Cont"},"status":{"type":"string","title":"Status"},"endoscope":{"anyOf":[{},{"type":"null"}],"title":"Endoscope"},"draft":{"type":"boolean","title":"Draft"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"}},"type":"object","required":["id","video_id","generated_by","generated_by_name","report_manual","status","draft"],"title":"CreateReportResponse"},"DepartmentBase":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"head_of_department":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Head Of Department"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Phone"}},"type":"object","required":["name"],"title":"DepartmentBase"},"DepartmentCreate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"head_of_department":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Head Of Department"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Phone"},"company_id":{"type":"integer","title":"Company Id"}},"type":"object","required":["name","company_id"],"title":"DepartmentCreate"},"DepartmentCreateResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"department_id":{"type":"integer","title":"Department Id"},"department_info":{"additionalProperties":true,"type":"object","title":"Department Info"}},"type":"object","required":["success","message","department_id","department_info"],"title":"DepartmentCreateResponse"},"DepartmentInfo":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"head_of_department":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Head Of Department"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Phone"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["id","name","description","head_of_department","contact_email","contact_phone","created_at","is_active"],"title":"DepartmentInfo"},"DepartmentUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"head_of_department":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Head Of Department"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Phone"}},"type":"object","title":"DepartmentUpdate"},"DepartmentUpdateResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"department_id":{"type":"integer","title":"Department Id"},"department_info":{"additionalProperties":true,"type":"object","title":"Department Info"}},"type":"object","required":["success","message","department_id","department_info"],"title":"DepartmentUpdateResponse"},"DetectionResponse":{"properties":{"object_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Object Id"},"label":{"type":"string","title":"Label"},"x_min":{"type":"number","title":"X Min"},"x_max":{"type":"number","title":"X Max"},"y_min":{"type":"number","title":"Y Min"},"y_max":{"type":"number","title":"Y Max"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"},"timestamp_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Timestamp Ms"}},"type":"object","required":["label","x_min","x_max","y_min","y_max"],"title":"DetectionResponse"},"DeviceActivity":{"properties":{"device_id":{"type":"integer","title":"Device Id"},"alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Alias"},"inspections":{"type":"integer","title":"Inspections"}},"type":"object","required":["device_id","inspections"],"title":"DeviceActivity"},"DeviceStatus":{"type":"string","enum":["online","offline","maintenance","disabled"],"title":"DeviceStatus"},"DownloadJobStatusResponse":{"properties":{"job_id":{"type":"integer","title":"Job Id"},"status":{"type":"string","title":"Status"},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["job_id","status","created_at"],"title":"DownloadJobStatusResponse"},"DownloadPackageResponse":{"properties":{"job_id":{"type":"integer","title":"Job Id"},"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"}},"type":"object","required":["job_id","status","message"],"title":"DownloadPackageResponse"},"DraftDetectionRequest":{"properties":{"x_min":{"type":"number","title":"X Min"},"x_max":{"type":"number","title":"X Max"},"y_min":{"type":"number","title":"Y Min"},"y_max":{"type":"number","title":"Y Max"},"label":{"type":"string","title":"Label"},"severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"timestamp_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Timestamp Ms"}},"type":"object","required":["x_min","x_max","y_min","y_max","label"],"title":"DraftDetectionRequest"},"DraftReportSaveRequest":{"properties":{"generated_by":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"null"}],"title":"Generated By"},"report_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Source"},"frames":{"additionalProperties":{"items":{"$ref":"#/components/schemas/DraftDetectionRequest"},"type":"array"},"type":"object","title":"Frames"}},"type":"object","required":["frames"],"title":"DraftReportSaveRequest"},"DraftReportSaveResponse":{"properties":{"id":{"type":"string","title":"Id"},"video_id":{"type":"string","title":"Video Id"},"generated_dt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generated Dt"},"generated_by":{"type":"string","title":"Generated By"},"generated_by_name":{"type":"string","title":"Generated By Name"},"report_manual":{"type":"integer","title":"Report Manual"},"link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link"},"spec_cont":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Spec Cont"},"status":{"type":"string","title":"Status"},"endoscope":{"anyOf":[{},{"type":"null"}],"title":"Endoscope"},"draft":{"type":"boolean","title":"Draft"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"}},"type":"object","required":["id","video_id","generated_by","generated_by_name","report_manual","status","draft"],"title":"DraftReportSaveResponse"},"EndoscopeActivity":{"properties":{"equipment_id":{"type":"integer","title":"Equipment Id"},"equipment_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment Type"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"serial":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serial"},"inspections":{"type":"integer","title":"Inspections"},"last_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Status"}},"type":"object","required":["equipment_id","inspections"],"title":"EndoscopeActivity"},"EscalationRequest":{"properties":{"needs_rep_intervention":{"type":"boolean","title":"Needs Rep Intervention"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["needs_rep_intervention"],"title":"EscalationRequest","description":"Point 3 of the process: the rep comes back only if the project lead\nfails. Informational — it never blocks the case from advancing."},"ExampleIn":{"properties":{"concept_id":{"type":"integer","title":"Concept Id"},"box":{"anyOf":[{"$ref":"#/components/schemas/BoxIn"},{"type":"null"}]},"severity":{"anyOf":[{"$ref":"#/components/schemas/GoldSeverity"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"is_gold":{"type":"boolean","title":"Is Gold","default":true}},"type":"object","required":["concept_id"],"title":"ExampleIn"},"ExampleOut":{"properties":{"id":{"type":"integer","title":"Id"},"gold_frame_id":{"type":"integer","title":"Gold Frame Id"},"concept_id":{"type":"integer","title":"Concept Id"},"concept_name":{"type":"string","title":"Concept Name"},"box":{"anyOf":[{"$ref":"#/components/schemas/BoxIn"},{"type":"null"}]},"severity":{"anyOf":[{"$ref":"#/components/schemas/GoldSeverity"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"is_gold":{"type":"boolean","title":"Is Gold","default":true},"created_by_env":{"anyOf":[{"$ref":"#/components/schemas/GoldEnv"},{"type":"null"}]},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Name"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","gold_frame_id","concept_id","concept_name"],"title":"ExampleOut"},"ExampleUpdate":{"properties":{"concept_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Concept Id"},"box":{"anyOf":[{"$ref":"#/components/schemas/BoxIn"},{"type":"null"}]},"severity":{"anyOf":[{"$ref":"#/components/schemas/GoldSeverity"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"is_gold":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Gold"}},"type":"object","title":"ExampleUpdate","description":"Partial: only the fields sent are changed. Send ``\"box\": null`` to clear a box."},"FAQCategory":{"properties":{"category_id":{"type":"string","title":"Category Id"},"category_name":{"type":"string","title":"Category Name"},"items":{"items":{"$ref":"#/components/schemas/FAQItem"},"type":"array","title":"Items"}},"type":"object","required":["category_id","category_name","items"],"title":"FAQCategory","description":"Represents a category/section of FAQ items"},"FAQItem":{"properties":{"id":{"type":"string","title":"Id"},"question":{"items":{"$ref":"#/components/schemas/TextFormat"},"type":"array","title":"Question"},"answer":{"items":{"$ref":"#/components/schemas/TextFormat"},"type":"array","title":"Answer"}},"type":"object","required":["id","question","answer"],"title":"FAQItem","description":"Represents a single FAQ question and answer pair"},"FAQResponse":{"properties":{"categories":{"items":{"$ref":"#/components/schemas/FAQCategory"},"type":"array","title":"Categories"},"last_updated":{"type":"string","title":"Last Updated"},"total_count":{"type":"integer","title":"Total Count"}},"type":"object","required":["categories","last_updated","total_count"],"title":"FAQResponse","description":"Response model for FAQ endpoint"},"FeatureFlagsResponse":{"properties":{"flags":{"items":{"type":"string"},"type":"array","title":"Flags"}},"type":"object","required":["flags"],"title":"FeatureFlagsResponse","description":"Dashboard flags that are on for the caller. Only enabled keys, never the full list."},"FinalizeRecordingRequest":{"properties":{"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"final_comments":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Final Comments"},"actual_resolution":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actual Resolution"},"actual_fps":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Actual Fps"}},"type":"object","title":"FinalizeRecordingRequest","description":"Request to finalize a recording after upload completes"},"FinalizeRecordingResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"recording_id":{"type":"integer","title":"Recording Id"},"status":{"type":"string","title":"Status"},"file_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Size Bytes"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"gcs_path":{"type":"string","title":"Gcs Path"}},"type":"object","required":["success","message","recording_id","status","gcs_path"],"title":"FinalizeRecordingResponse","description":"Response after finalizing recording"},"FrameBoxes":{"properties":{"version":{"type":"string","title":"Version"},"examples":{"items":{"$ref":"#/components/schemas/BoxRow"},"type":"array","title":"Examples"}},"type":"object","required":["version","examples"],"title":"FrameBoxes","description":"Every box of a frame, as the editor has it. Boxes left out are deleted."},"FrameOut":{"properties":{"id":{"type":"integer","title":"Id"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"width":{"type":"integer","title":"Width"},"height":{"type":"integer","title":"Height"},"tube_type":{"$ref":"#/components/schemas/TubeType"},"source_env":{"$ref":"#/components/schemas/GoldEnv"},"same_env":{"type":"boolean","title":"Same Env","default":false},"video_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Video Id"},"report_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Report Id"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"device_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Device Id"},"medical_equipment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Medical Equipment Id"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"device_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Label"},"endoscope_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endoscope Label"},"video_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Name"},"recorded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Recorded At"},"media_time_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Media Time S"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"benchmark":{"type":"boolean","title":"Benchmark","default":false},"benchmark_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Benchmark By Name"},"benchmark_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Benchmark At"},"verified":{"type":"boolean","title":"Verified","default":false},"verified_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verified By Name"},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Verified At"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"created_by_env":{"anyOf":[{"$ref":"#/components/schemas/GoldEnv"},{"type":"null"}]},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"examples":{"items":{"$ref":"#/components/schemas/ExampleOut"},"type":"array","title":"Examples","default":[]}},"type":"object","required":["id","width","height","tube_type","source_env"],"title":"FrameOut"},"FramePage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/FrameOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"FramePage"},"FrameSaved":{"properties":{"frame":{"$ref":"#/components/schemas/FrameOut"},"reused":{"type":"boolean","title":"Reused"},"coverage":{"items":{"$ref":"#/components/schemas/ConceptCoverage"},"type":"array","title":"Coverage"}},"type":"object","required":["frame","reused","coverage"],"title":"FrameSaved"},"FrameUpdate":{"properties":{"tube_type":{"anyOf":[{"$ref":"#/components/schemas/TubeType"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"benchmark":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Benchmark"}},"type":"object","title":"FrameUpdate"},"GoldCategory":{"type":"string","enum":["contamination","damage","manufacturing","normal","frame","other"],"title":"GoldCategory"},"GoldEnv":{"type":"string","enum":["staging","production"],"title":"GoldEnv"},"GoldScope":{"type":"string","enum":["region","frame"],"title":"GoldScope"},"GoldSeverity":{"type":"string","enum":["low","medium","high"],"title":"GoldSeverity"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HardwareDeviceInfo":{"properties":{"id":{"type":"integer","title":"Id"},"hardware_id":{"type":"string","title":"Hardware Id"},"mac_address":{"type":"string","title":"Mac Address"},"alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Alias"},"factory_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Factory Serial"},"status":{"$ref":"#/components/schemas/DeviceStatus"},"last_seen":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen"},"department_id":{"type":"integer","title":"Department Id"},"operation_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operation Mode"},"representative_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Representative Phone"},"representative_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Representative Email"},"department_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Department Name"}},"type":"object","required":["id","hardware_id","mac_address","alias","factory_serial","status","last_seen","department_id","operation_mode","representative_phone","representative_email","department_name"],"title":"HardwareDeviceInfo"},"HiddenIn":{"properties":{"kind":{"$ref":"#/components/schemas/HiddenKind"},"ref_id":{"type":"integer","title":"Ref Id"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["kind","ref_id"],"title":"HiddenIn"},"HiddenKind":{"type":"string","enum":["video","company"],"title":"HiddenKind"},"HiddenOut":{"properties":{"id":{"type":"integer","title":"Id"},"kind":{"type":"string","title":"Kind"},"source_env":{"type":"string","title":"Source Env"},"ref_id":{"type":"integer","title":"Ref Id"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","kind","source_env","ref_id"],"title":"HiddenOut"},"InspectorActivity":{"properties":{"user_id":{"type":"integer","title":"User Id"},"name":{"type":"string","title":"Name"},"inspections":{"type":"integer","title":"Inspections"},"endoscopes":{"type":"integer","title":"Endoscopes"}},"type":"object","required":["user_id","name","inspections","endoscopes"],"title":"InspectorActivity"},"LeaseIn":{"properties":{"lease_id":{"type":"integer","title":"Lease Id"}},"type":"object","required":["lease_id"],"title":"LeaseIn"},"LicenseDeviceInfo":{"properties":{"id":{"type":"integer","title":"Id"},"hardware_id":{"type":"string","title":"Hardware Id"},"alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Alias"},"department_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Department Name"},"assigned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Assigned At"}},"type":"object","required":["id","hardware_id","alias","department_name","assigned_at"],"title":"LicenseDeviceInfo","description":"The device a license currently sits on. Null on the license itself when nothing holds it."},"LicenseInfo":{"properties":{"id":{"type":"integer","title":"Id"},"license_number":{"type":"string","title":"License Number"},"license_type":{"type":"string","title":"License Type"},"bundle_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bundle Code"},"bundle_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bundle Label"},"tier_level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tier Level"},"start_date":{"type":"string","format":"date","title":"Start Date"},"end_date":{"type":"string","format":"date","title":"End Date"},"status":{"type":"string","title":"Status"},"days_remaining":{"type":"integer","title":"Days Remaining"},"po_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Po Number"},"device":{"anyOf":[{"$ref":"#/components/schemas/LicenseDeviceInfo"},{"type":"null"}]}},"type":"object","required":["id","license_number","license_type","bundle_code","bundle_label","tier_level","start_date","end_date","status","days_remaining","po_number"],"title":"LicenseInfo","description":"One purchased license, as the company's own admins see it.\n\n`status` is the effective status, not the stored one -- see effective_license_status in\nverifyai_db.licensing. `days_remaining` is negative once lapsed, so the UI can say \"expired\n9 days ago\" without recomputing the same subtraction against a possibly different clock.\n\nPrice and payment fields are deliberately absent: the dashboard tells a company what it\nowns and until when, and billing lives with the people who issued the PO."},"MarketingMaterialInfo":{"properties":{"gcs_object_path":{"type":"string","title":"Gcs Object Path"},"filename":{"type":"string","title":"Filename"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"}},"type":"object","required":["gcs_object_path","filename"],"title":"MarketingMaterialInfo","description":"One file in the curated marketing-materials bucket. The bucket itself\nis the catalog — this is just what list_blobs returns, not a DB row."},"MedicalEquipmentInfo":{"properties":{"id":{"type":"integer","title":"Id"},"equipment_type":{"type":"string","title":"Equipment Type"},"producer":{"type":"string","title":"Producer"},"model":{"type":"string","title":"Model"},"serial":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serial"},"property_tag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property Tag"},"short_comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Comment"},"department_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Department Id"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"}},"type":"object","required":["id","equipment_type","producer","model","serial","property_tag","short_comment","department_id","company_id"],"title":"MedicalEquipmentInfo"},"MessageAttachmentInfo":{"properties":{"gcs_object_path":{"type":"string","title":"Gcs Object Path"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"},"file_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Hash"}},"type":"object","required":["gcs_object_path"],"title":"MessageAttachmentInfo","description":"One ad-hoc file the distributor uploaded when sending a message."},"NearFrame":{"properties":{"id":{"type":"integer","title":"Id"},"media_time_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Media Time S"},"tube_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tube Type"}},"type":"object","required":["id"],"title":"NearFrame"},"OfflineActionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"sequence_number":{"type":"integer","title":"Sequence Number"},"action_type":{"$ref":"#/components/schemas/OfflineActionType"},"action_timestamp":{"type":"string","format":"date-time","title":"Action Timestamp"},"status":{"$ref":"#/components/schemas/OfflineActionStatus"},"result_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Result Id"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["id","sequence_number","action_type","action_timestamp","status"],"title":"OfflineActionResponse"},"OfflineActionStatus":{"type":"string","enum":["pending","processing","completed","failed","skipped"],"title":"OfflineActionStatus"},"OfflineActionType":{"type":"string","enum":["email","user","equipment","video","report"],"title":"OfflineActionType"},"OfflineDumpDetailedResponse":{"properties":{"id":{"type":"integer","title":"Id"},"company_id":{"type":"integer","title":"Company Id"},"device_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Device Id"},"device_alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Alias"},"uploaded_by":{"type":"integer","title":"Uploaded By"},"uploaded_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uploaded By Name"},"status":{"$ref":"#/components/schemas/OfflineDumpStatus"},"total_actions":{"type":"integer","title":"Total Actions"},"completed_actions":{"type":"integer","title":"Completed Actions"},"failed_actions":{"type":"integer","title":"Failed Actions"},"skipped_actions":{"type":"integer","title":"Skipped Actions"},"gcs_temp_folder":{"type":"string","title":"Gcs Temp Folder"},"upload_started_at":{"type":"string","format":"date-time","title":"Upload Started At"},"upload_completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Upload Completed At"},"processing_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Processing Started At"},"processing_completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Processing Completed At"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"actions":{"items":{"$ref":"#/components/schemas/OfflineActionResponse"},"type":"array","title":"Actions","default":[]},"id_mappings":{"items":{"$ref":"#/components/schemas/OfflineIdMappingResponse"},"type":"array","title":"Id Mappings","default":[]}},"type":"object","required":["id","company_id","uploaded_by","status","total_actions","completed_actions","failed_actions","skipped_actions","gcs_temp_folder","upload_started_at"],"title":"OfflineDumpDetailedResponse"},"OfflineDumpListResponse":{"properties":{"dumps":{"items":{"$ref":"#/components/schemas/OfflineDumpResponse"},"type":"array","title":"Dumps"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["dumps","total","page","page_size","total_pages"],"title":"OfflineDumpListResponse"},"OfflineDumpResponse":{"properties":{"id":{"type":"integer","title":"Id"},"company_id":{"type":"integer","title":"Company Id"},"device_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Device Id"},"device_alias":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Alias"},"uploaded_by":{"type":"integer","title":"Uploaded By"},"uploaded_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uploaded By Name"},"status":{"$ref":"#/components/schemas/OfflineDumpStatus"},"total_actions":{"type":"integer","title":"Total Actions"},"completed_actions":{"type":"integer","title":"Completed Actions"},"failed_actions":{"type":"integer","title":"Failed Actions"},"skipped_actions":{"type":"integer","title":"Skipped Actions"},"gcs_temp_folder":{"type":"string","title":"Gcs Temp Folder"},"upload_started_at":{"type":"string","format":"date-time","title":"Upload Started At"},"upload_completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Upload Completed At"},"processing_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Processing Started At"},"processing_completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Processing Completed At"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["id","company_id","uploaded_by","status","total_actions","completed_actions","failed_actions","skipped_actions","gcs_temp_folder","upload_started_at"],"title":"OfflineDumpResponse"},"OfflineDumpStatus":{"type":"string","enum":["uploaded","processing","completed","failed","partial"],"title":"OfflineDumpStatus"},"OfflineIdMappingResponse":{"properties":{"id":{"type":"integer","title":"Id"},"entity_type":{"type":"string","title":"Entity Type"},"offline_id":{"type":"string","title":"Offline Id"},"online_id":{"type":"integer","title":"Online Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","entity_type","offline_id","online_id","created_at"],"title":"OfflineIdMappingResponse"},"OfflineProcessResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"dump_id":{"type":"integer","title":"Dump Id"},"status":{"$ref":"#/components/schemas/OfflineDumpStatus"}},"type":"object","required":["success","message","dump_id","status"],"title":"OfflineProcessResponse"},"OnboardingCaseActionResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"case_id":{"type":"integer","title":"Case Id"},"status":{"type":"string","title":"Status"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"}},"type":"object","required":["success","message","case_id","status"],"title":"OnboardingCaseActionResponse"},"OnboardingCaseApprove":{"properties":{"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"review_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Notes"}},"type":"object","title":"OnboardingCaseApprove"},"OnboardingCaseCreate":{"properties":{"case_type":{"type":"string","title":"Case Type","description":"new_company | add_device"},"proposed_company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Company Name"},"target_company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Target Company Id"},"case_details":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Details"},"distributor_company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Distributor Company Id"},"project_lead_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Lead First Name"},"project_lead_last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Lead Last Name"},"project_lead_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Lead Name"},"project_lead_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Lead Email"},"project_lead_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Lead Phone"},"project_lead_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Lead Notes"},"it_ticket_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"It Ticket Ref"},"it_contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"It Contact Name"},"it_contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"It Contact Email"},"it_contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"It Contact Phone"},"it_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"It Notes"},"shipped_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shipped By","description":"distributor | verifyai"}},"type":"object","required":["case_type"],"title":"OnboardingCaseCreate"},"OnboardingCaseInfo":{"properties":{"id":{"type":"integer","title":"Id"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference"},"distributor_company_id":{"type":"integer","title":"Distributor Company Id"},"distributor_company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Distributor Company Name"},"target_company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Company Name"},"case_type":{"type":"string","title":"Case Type"},"status":{"type":"string","title":"Status"},"target_company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Target Company Id"},"proposed_company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Company Name"},"case_details":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Details"},"internal_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Internal Notes"},"manager_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Manager User Id"},"created_by":{"type":"integer","title":"Created By"},"submitted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Submitted At"},"reviewed_by":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reviewed By"},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reviewed At"},"rejection_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rejection Reason"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"purchase_orders":{"items":{"$ref":"#/components/schemas/PurchaseOrderInfo"},"type":"array","title":"Purchase Orders","default":[]},"documents":{"items":{"$ref":"#/components/schemas/CaseDocumentInfo"},"type":"array","title":"Documents","default":[]},"project_lead_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Lead Name"},"project_lead_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Lead First Name"},"project_lead_last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Lead Last Name"},"project_lead_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Lead Email"},"project_lead_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Lead Phone"},"project_lead_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Lead Notes"},"it_ticket_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"It Ticket Ref"},"it_contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"It Contact Name"},"it_contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"It Contact Email"},"it_contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"It Contact Phone"},"it_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"It Notes"},"shipped_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shipped By"},"needs_rep_intervention":{"type":"boolean","title":"Needs Rep Intervention","default":false},"rep_intervention_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rep Intervention Reason"},"it_approval_confirmed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"It Approval Confirmed At"},"it_approval_confirmed_by":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"It Approval Confirmed By"},"it_approval_confirmed_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"It Approval Confirmed By Name"},"data_self_loaded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Data Self Loaded At"},"data_self_loaded_by":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Data Self Loaded By"},"data_self_loaded_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Self Loaded By Name"},"devices_shipped_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Devices Shipped At"},"devices_shipped_by":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Devices Shipped By"},"devices_shipped_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Devices Shipped By Name"},"stage":{"anyOf":[{"$ref":"#/components/schemas/StageInfo"},{"type":"null"}]},"stage_history":{"items":{"$ref":"#/components/schemas/StageHistoryEntry"},"type":"array","title":"Stage History","default":[]},"tracks":{"items":{"$ref":"#/components/schemas/TrackInfo"},"type":"array","title":"Tracks","default":[]},"checklist":{"items":{"$ref":"#/components/schemas/StepInfo"},"type":"array","title":"Checklist","default":[]},"step_warnings":{"items":{"type":"string"},"type":"array","title":"Step Warnings","default":[]},"step_history":{"items":{"$ref":"#/components/schemas/StepHistoryEntry"},"type":"array","title":"Step History","default":[]},"attention":{"anyOf":[{"$ref":"#/components/schemas/AttentionInfo"},{"type":"null"}]}},"type":"object","required":["id","distributor_company_id","case_type","status","target_company_id","proposed_company_name","case_details","manager_user_id","created_by","submitted_at","reviewed_by","reviewed_at","rejection_reason","created_at","updated_at"],"title":"OnboardingCaseInfo"},"OnboardingCaseListItem":{"properties":{"id":{"type":"integer","title":"Id"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference"},"case_type":{"type":"string","title":"Case Type"},"status":{"type":"string","title":"Status"},"distributor_company_id":{"type":"integer","title":"Distributor Company Id"},"distributor_company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Distributor Company Name"},"proposed_company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Company Name"},"target_company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Target Company Id"},"target_company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Company Name"},"company_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Display Name"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"submitted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Submitted At"},"po_count":{"type":"integer","title":"Po Count","default":0},"stage":{"anyOf":[{"$ref":"#/components/schemas/StageInfo"},{"type":"null"}]},"attention":{"anyOf":[{"$ref":"#/components/schemas/AttentionInfo"},{"type":"null"}]}},"type":"object","required":["id","case_type","status","distributor_company_id"],"title":"OnboardingCaseListItem"},"OnboardingCaseListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/OnboardingCaseListItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"OnboardingCaseListResponse","description":"Paginated envelope — the tables need a total to page against."},"OnboardingCaseMessageInfo":{"properties":{"id":{"type":"integer","title":"Id"},"onboarding_case_id":{"type":"integer","title":"Onboarding Case Id"},"direction":{"type":"string","title":"Direction","default":"out"},"from_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Email"},"recipients":{"items":{"type":"string"},"type":"array","title":"Recipients"},"cc":{"items":{"type":"string"},"type":"array","title":"Cc","default":[]},"marketing_materials":{"items":{"$ref":"#/components/schemas/MarketingMaterialInfo"},"type":"array","title":"Marketing Materials","default":[]},"attachments":{"items":{"$ref":"#/components/schemas/MessageAttachmentInfo"},"type":"array","title":"Attachments","default":[]},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message Id"},"in_reply_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"In Reply To"},"thread_root_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Thread Root Id"},"sent_by":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sent By"},"sent_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sent By Name"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"}},"type":"object","required":["id","onboarding_case_id","recipients"],"title":"OnboardingCaseMessageInfo"},"OnboardingCaseReject":{"properties":{"rejection_reason":{"type":"string","title":"Rejection Reason"}},"type":"object","required":["rejection_reason"],"title":"OnboardingCaseReject"},"OnboardingCaseUpdate":{"properties":{"proposed_company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Company Name"},"target_company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Target Company Id"},"case_details":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Case Details"},"project_lead_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Lead First Name"},"project_lead_last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Lead Last Name"},"project_lead_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Lead Name"},"project_lead_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Lead Email"},"project_lead_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Lead Phone"},"project_lead_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Lead Notes"},"it_ticket_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"It Ticket Ref"},"it_contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"It Contact Name"},"it_contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"It Contact Email"},"it_contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"It Contact Phone"},"it_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"It Notes"},"shipped_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shipped By"},"internal_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Internal Notes"}},"type":"object","title":"OnboardingCaseUpdate"},"PurchaseOrderDownload":{"properties":{"url":{"type":"string","title":"Url"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"}},"type":"object","required":["url"],"title":"PurchaseOrderDownload","description":"Short-lived signed GCS link — the browser fetches the file directly."},"PurchaseOrderInfo":{"properties":{"id":{"type":"integer","title":"Id"},"po_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Po Number"},"po_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Po Date"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"file_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Size Bytes"},"uploaded_by":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Uploaded By"},"uploaded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Uploaded At"},"reviewed_by":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reviewed By"},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reviewed At"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["id","po_number","po_date","filename","content_type","file_size_bytes","uploaded_by","uploaded_at","reviewed_by","reviewed_at","notes"],"title":"PurchaseOrderInfo"},"RecordingStatus":{"properties":{"video_id":{"type":"integer","title":"Video Id"},"recording_key":{"type":"string","title":"Recording Key"},"eligible":{"type":"boolean","title":"Eligible"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"reserved":{"type":"boolean","title":"Reserved","default":false},"segments":{"additionalProperties":{"$ref":"#/components/schemas/SegmentStatus"},"type":"object","title":"Segments","default":{}},"frames":{"items":{"$ref":"#/components/schemas/NearFrame"},"type":"array","title":"Frames","default":[]}},"type":"object","required":["video_id","recording_key","eligible"],"title":"RecordingStatus","description":"Which tube sections of a recording in this environment can give benchmark frames."},"RegisterVideoRequest":{"properties":{"company_id":{"type":"integer","title":"Company Id"},"dep_id":{"type":"integer","title":"Dep Id"},"recorded_by_user_id":{"type":"integer","title":"Recorded By User Id"},"dev_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dev Id"},"med_equipment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Med Equipment Id"},"share_reports":{"items":{"type":"string"},"type":"array","title":"Share Reports","default":[]},"end_producer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Producer"},"end_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Model"},"end_serial":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Serial"},"end_length":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Length"},"end_equipment_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Equipment Type"}},"type":"object","required":["company_id","dep_id","recorded_by_user_id"],"title":"RegisterVideoRequest"},"RegisterVideoResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"video_id":{"type":"integer","title":"Video Id"},"device_id":{"type":"integer","title":"Device Id"},"medical_equipment_id":{"type":"integer","title":"Medical Equipment Id"}},"type":"object","required":["success","message","video_id","device_id","medical_equipment_id"],"title":"RegisterVideoResponse"},"ReplyAudience":{"properties":{"to":{"items":{"type":"string"},"type":"array","title":"To","default":[]},"cc":{"items":{"type":"string"},"type":"array","title":"Cc","default":[]}},"type":"object","title":"ReplyAudience","description":"The `to` and `cc` one choice of reply would send to."},"ReplyDefaults":{"properties":{"subject":{"type":"string","title":"Subject"},"reply_all":{"$ref":"#/components/schemas/ReplyAudience"},"reply_to_sender":{"$ref":"#/components/schemas/ReplyAudience"}},"type":"object","required":["subject","reply_all","reply_to_sender"],"title":"ReplyDefaults","description":"What a reply to a given message would be addressed to, both ways.\n\nBoth audiences are resolved server-side and handed over together so the\ndashboard can show the addresses — and switch between reply and reply-all —\nwithout owning a second copy of the rule that decides them. What is\ndisplayed is what the API would send."},"ReportAuthorActivity":{"properties":{"user_id":{"type":"integer","title":"User Id"},"name":{"type":"string","title":"Name"},"reports":{"type":"integer","title":"Reports"}},"type":"object","required":["user_id","name","reports"],"title":"ReportAuthorActivity"},"ReportDetectionRequest":{"properties":{"x_min":{"type":"number","title":"X Min"},"x_max":{"type":"number","title":"X Max"},"y_min":{"type":"number","title":"Y Min"},"y_max":{"type":"number","title":"Y Max"},"label":{"type":"string","title":"Label"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"timestamp_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Timestamp Ms"}},"type":"object","required":["x_min","x_max","y_min","y_max","label"],"title":"ReportDetectionRequest"},"ReportDownloadResponse":{"properties":{"report_id":{"type":"integer","title":"Report Id"},"link":{"type":"string","title":"Link"}},"type":"object","required":["report_id","link"],"title":"ReportDownloadResponse"},"ReportFramesResponse":{"properties":{"report_id":{"type":"integer","title":"Report Id"},"frames":{"additionalProperties":{"items":{"$ref":"#/components/schemas/DetectionResponse"},"type":"array"},"type":"object","title":"Frames"}},"type":"object","required":["report_id","frames"],"title":"ReportFramesResponse"},"SeatHolderInfo":{"properties":{"user_id":{"type":"integer","title":"User Id"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"acquired_at":{"type":"string","format":"date-time","title":"Acquired At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["user_id","user_name","acquired_at","expires_at"],"title":"SeatHolderInfo","description":"Who is holding a seat right now. Names only -- the dashboard's audience is the company's\nown admins looking at their own colleagues."},"SeatOut":{"properties":{"lease_id":{"type":"integer","title":"Lease Id"},"bundle_code":{"type":"string","title":"Bundle Code"},"acquired_at":{"type":"string","title":"Acquired At"},"expires_at":{"type":"string","title":"Expires At"},"heartbeat_interval_seconds":{"type":"integer","title":"Heartbeat Interval Seconds"},"capacity":{"type":"integer","title":"Capacity"},"in_use":{"type":"integer","title":"In Use"}},"type":"object","required":["lease_id","bundle_code","acquired_at","expires_at","heartbeat_interval_seconds","capacity","in_use"],"title":"SeatOut","description":"A held seat, plus enough pool context for the UI to say something useful."},"SeatPoolInfo":{"properties":{"bundle_code":{"type":"string","title":"Bundle Code"},"bundle_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bundle Label"},"capacity":{"type":"integer","title":"Capacity"},"in_use":{"type":"integer","title":"In Use"},"holders":{"items":{"$ref":"#/components/schemas/SeatHolderInfo"},"type":"array","title":"Holders"}},"type":"object","required":["bundle_code","bundle_label","capacity","in_use","holders"],"title":"SeatPoolInfo","description":"A company's user-license pool for one bundle, as of right now.\n\nCapacity is a count of live user licenses, so it drops on its own as licenses lapse; in_use\nis a count of live leases and is a snapshot that can change between requests."},"SeatStatusOut":{"properties":{"bundle_code":{"type":"string","title":"Bundle Code"},"capacity":{"type":"integer","title":"Capacity"},"in_use":{"type":"integer","title":"In Use"},"heartbeat_interval_seconds":{"type":"integer","title":"Heartbeat Interval Seconds"},"held":{"anyOf":[{"$ref":"#/components/schemas/SeatOut"},{"type":"null"}]}},"type":"object","required":["bundle_code","capacity","in_use","heartbeat_interval_seconds"],"title":"SeatStatusOut"},"SegmentStatus":{"properties":{"eligible":{"type":"boolean","title":"Eligible"},"reserved":{"type":"boolean","title":"Reserved","default":false},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["eligible"],"title":"SegmentStatus","description":"One tube section of a recording."},"ShareVideoRequest":{"properties":{"emails":{"items":{"type":"string","format":"email"},"type":"array","title":"Emails"},"comment":{"type":"string","title":"Comment","default":""},"att_report":{"type":"boolean","title":"Att Report","default":false},"report_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Report Id"}},"type":"object","required":["emails"],"title":"ShareVideoRequest","description":"POST /api/v1/share/{video_id}.\n\nAddresses are validated as emails and de-duplicated case-insensitively\nhere, so the recipient cap (VER-1439) counts people, not spellings. The\ncap itself and the comment length are configuration, checked in\napp/share_email.py, so this schema does not load settings."},"SnapshotCreate":{"properties":{"tube_type":{"$ref":"#/components/schemas/TubeType"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["tube_type"],"title":"SnapshotCreate"},"SnapshotOut":{"properties":{"id":{"type":"integer","title":"Id"},"snapshot_key":{"type":"string","title":"Snapshot Key"},"tube_type":{"$ref":"#/components/schemas/TubeType"},"gcs_manifest_path":{"type":"string","title":"Gcs Manifest Path"},"gcs_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gcs Uri"},"manifest_sha256":{"type":"string","title":"Manifest Sha256"},"frames":{"type":"integer","title":"Frames"},"boxes":{"type":"integer","title":"Boxes"},"recordings":{"type":"integer","title":"Recordings"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","snapshot_key","tube_type","gcs_manifest_path","manifest_sha256","frames","boxes","recordings"],"title":"SnapshotOut"},"StageAdvanceRequest":{"properties":{"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","title":"StageAdvanceRequest"},"StageBackRequest":{"properties":{"note":{"type":"string","title":"Note"}},"type":"object","required":["note"],"title":"StageBackRequest","description":"Stepping backwards always needs a reason — it is a correction, and the\nhistory row is the only record of why."},"StageConfirmationRequest":{"properties":{"confirmed":{"type":"boolean","title":"Confirmed","default":true}},"type":"object","title":"StageConfirmationRequest","description":"Setting or clearing one of the admin-attested stage gates."},"StageHistoryEntry":{"properties":{"id":{"type":"integer","title":"Id"},"from_stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Stage"},"to_stage":{"type":"string","title":"To Stage"},"changed_by":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Changed By"},"changed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Changed At"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["id","to_stage"],"title":"StageHistoryEntry"},"StageInfo":{"properties":{"stage":{"type":"string","title":"Stage"},"stage_label":{"type":"string","title":"Stage Label"},"stage_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stage Index"},"stage_count":{"type":"integer","title":"Stage Count"},"is_my_turn":{"type":"boolean","title":"Is My Turn","default":false},"next_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Action"},"can_advance":{"type":"boolean","title":"Can Advance","default":false},"blocked_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Blocked Reason"},"advance_via":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Advance Via"},"is_gate":{"type":"boolean","title":"Is Gate","default":false},"next_stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Stage"},"previous_stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Stage"},"needs_rep_intervention":{"type":"boolean","title":"Needs Rep Intervention","default":false},"open_step_count":{"type":"integer","title":"Open Step Count","default":0},"progress":{"anyOf":[{"additionalProperties":{"additionalProperties":{"type":"integer"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Progress"}},"type":"object","required":["stage","stage_label","stage_count"],"title":"StageInfo","description":"Where a case is and what the *calling user* should do about it.\n\nResolved server-side per role: the distributor and a VerifyAI admin get\ndifferent `next_action` text on the same case, and usually one of them is\nsimply waiting. The dashboard renders this rather than carrying its own copy\nof the stage table."},"StepHistoryEntry":{"properties":{"id":{"type":"integer","title":"Id"},"step_key":{"type":"string","title":"Step Key"},"from_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From State"},"to_state":{"type":"string","title":"To State"},"changed_by":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Changed By"},"changed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Changed At"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["id","step_key","to_state"],"title":"StepHistoryEntry"},"StepInfo":{"properties":{"key":{"type":"string","title":"Key"},"tracker":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tracker"},"label":{"type":"string","title":"Label"},"track":{"type":"string","title":"Track"},"owner":{"type":"string","title":"Owner"},"state":{"type":"string","title":"State"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"updated_by":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Updated By"},"updated_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Name"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"can_edit":{"type":"boolean","title":"Can Edit","default":false},"evidence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evidence"},"waits_on":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Waits On"}},"type":"object","required":["key","label","track","owner","state"],"title":"StepInfo","description":"One checklist step, resolved for the caller.\n\n`evidence` is what the system can see that suggests the step is done. It\nnever ticks the step - a person does."},"StepUpdateRequest":{"properties":{"state":{"type":"string","title":"State"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["state"],"title":"StepUpdateRequest","description":"not_started | in_progress | complete | skipped. A skip needs a note."},"SubscriptionInfo":{"properties":{"id":{"type":"integer","title":"Id"},"subscription_type":{"$ref":"#/components/schemas/SubscriptionType"},"start_date":{"type":"string","format":"date","title":"Start Date"},"end_date":{"type":"string","format":"date","title":"End Date"},"status":{"$ref":"#/components/schemas/SubscriptionStatus"},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price"},"currency":{"type":"string","title":"Currency"},"payment_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Method"},"billing_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Email"},"auto_renew":{"type":"boolean","title":"Auto Renew"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","subscription_type","start_date","end_date","status","price","currency","payment_method","billing_email","auto_renew","created_at"],"title":"SubscriptionInfo"},"SubscriptionStatus":{"type":"string","enum":["active","expired","suspended","cancelled","pending"],"title":"SubscriptionStatus"},"SubscriptionType":{"type":"string","enum":["free","basic","premium","enterprise","distributor"],"title":"SubscriptionType"},"TextFormat":{"properties":{"text":{"type":"string","title":"Text"},"bold":{"type":"boolean","title":"Bold","default":false},"italic":{"type":"boolean","title":"Italic","default":false},"underline":{"type":"boolean","title":"Underline","default":false},"link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link"}},"type":"object","required":["text"],"title":"TextFormat","description":"Represents a text segment with optional formatting"},"TrackInfo":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"}},"type":"object","required":["key","label"],"title":"TrackInfo"},"TubeType":{"type":"string","enum":["clear","spiral","white","outside","transition","unknown"],"title":"TubeType"},"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"},"VideoAlertItem":{"properties":{"alert_id":{"type":"string","title":"Alert Id"},"captured_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Captured At"},"position_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Position S"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"recipients":{"type":"integer","title":"Recipients","default":0}},"type":"object","required":["alert_id"],"title":"VideoAlertItem","description":"One ALERT on a video's Device map (VER-1413)."},"VideoAlertsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/VideoAlertItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"VideoAlertsResponse"},"VideosPaginatedResponse":{"properties":{"videos":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Videos"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["videos","total","page","page_size","total_pages"],"title":"VideosPaginatedResponse"},"WaitingStep":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"party":{"type":"string","title":"Party"},"since":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},"type":"object","required":["key","label","party"],"title":"WaitingStep"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}